@aintela/chat 0.2.34 → 0.2.35

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.
@@ -445,8 +445,8 @@ const Ho = 0.75, Eu = 1e3, Nn = 300 * 1e3, wr = 500, Iu = 2e4, va = class va {
445
445
  lt(this, "workingSessionId");
446
446
  lt(this, "pendingClosePromise");
447
447
  lt(this, "onSessionEstablished");
448
- this.sessionState = m.getState(), this.agentGatewayService = a, this.sessionService = l, this.artifactService = u, this.onSessionEstablished = s.onSessionEstablished, m.subscribe((x, g) => {
449
- this.sessionState = x;
448
+ this.sessionState = m.getState(), this.agentGatewayService = a, this.sessionService = l, this.artifactService = u, this.onSessionEstablished = s.onSessionEstablished, m.subscribe((v, g) => {
449
+ this.sessionState = v;
450
450
  }), this.paused = !1;
451
451
  }
452
452
  /**
@@ -484,7 +484,7 @@ const Ho = 0.75, Eu = 1e3, Nn = 300 * 1e3, wr = 500, Iu = 2e4, va = class va {
484
484
  }), u) : null;
485
485
  }
486
486
  async bindAndOpenLiveSession(a, l) {
487
- var s, x, g, T;
487
+ var s, v, g, T;
488
488
  this.pause(), this.sessionState.connectionStatus != ke.Disconnected && await this.stop(), this.pendingClosePromise && (await this.pendingClosePromise, this.pendingClosePromise = void 0);
489
489
  let u = this.sessionState.session;
490
490
  const m = l ? "EXISTING" : "NEW";
@@ -493,7 +493,7 @@ const Ho = 0.75, Eu = 1e3, Nn = 300 * 1e3, wr = 500, Iu = 2e4, va = class va {
493
493
  if (this.workingContext = a, this.workingSessionId = l, l && l != ((s = this.sessionState.session) == null ? void 0 : s.id)) {
494
494
  u = null, this.sessionState.setLoadingInformation(ke.Connecting, !0, m);
495
495
  try {
496
- u = await this.retrieveSession(a, l), (x = this.onSessionEstablished) == null || x.call(this, l), this.workingSessionId = l, this.agentGatewayService.setSession(l, "");
496
+ u = await this.retrieveSession(a, l), (v = this.onSessionEstablished) == null || v.call(this, l), this.workingSessionId = l, this.agentGatewayService.setSession(l, "");
497
497
  } finally {
498
498
  this.sessionState.setLoadingInformation(ke.Connecting, !1, m);
499
499
  }
@@ -595,8 +595,8 @@ function qo(e, a) {
595
595
  setNewMessage: /* @__PURE__ */ n((m) => {
596
596
  let s = u().messages;
597
597
  m.turn_complete = !0;
598
- const x = s.findIndex((T) => T.interactionId == m.interactionId);
599
- x == -1 ? s = [...s, m] : (s[x] = m, s = [...s]);
598
+ const v = s.findIndex((T) => T.interactionId == m.interactionId);
599
+ v == -1 ? s = [...s, m] : (s[v] = m, s = [...s]);
600
600
  const g = u().session;
601
601
  l({
602
602
  messages: s,
@@ -610,8 +610,8 @@ function qo(e, a) {
610
610
  }, "setTurnOpen"),
611
611
  setSuspendState: /* @__PURE__ */ n((m) => l({ suspendState: m }), "setSuspendState"),
612
612
  setConnectionStatus: /* @__PURE__ */ n((m) => {
613
- let s = u().loadingError, x = u().loading;
614
- m == ke.Connected && (s = null, x = !1), l({ connectionStatus: m, loadingError: s, loading: x });
613
+ let s = u().loadingError, v = u().loading;
614
+ m == ke.Connected && (s = null, v = !1), l({ connectionStatus: m, loadingError: s, loading: v });
615
615
  }, "setConnectionStatus"),
616
616
  setStatistics: /* @__PURE__ */ n((m) => {
617
617
  l({ statistics: m });
@@ -624,29 +624,29 @@ function qo(e, a) {
624
624
  m && m.activityCount++, l({ session: m, messages: (m == null ? void 0 : m.interactions) ?? [], currentMessage: null });
625
625
  }, "setSession"),
626
626
  subAgents: /* @__PURE__ */ new Map(),
627
- setSubAgentMessage: /* @__PURE__ */ n((m, s, x) => {
627
+ setSubAgentMessage: /* @__PURE__ */ n((m, s, v) => {
628
628
  const g = u().subAgents, T = new Map(g), E = T.get(m);
629
629
  T.set(m, {
630
630
  id: m,
631
- name: x ?? (E == null ? void 0 : E.name) ?? m,
631
+ name: v ?? (E == null ? void 0 : E.name) ?? m,
632
632
  interaction: s,
633
633
  completed: (E == null ? void 0 : E.completed) ?? !1
634
634
  }), l({ subAgents: T });
635
635
  }, "setSubAgentMessage"),
636
636
  completeSubAgent: /* @__PURE__ */ n((m) => {
637
- const s = u().subAgents, x = s.get(m);
638
- if (!x) return;
637
+ const s = u().subAgents, v = s.get(m);
638
+ if (!v) return;
639
639
  const g = new Map(s);
640
- g.set(m, { ...x, completed: !0 }), l({ subAgents: g });
640
+ g.set(m, { ...v, completed: !0 }), l({ subAgents: g });
641
641
  }, "completeSubAgent"),
642
642
  removeSubAgent: /* @__PURE__ */ n((m) => {
643
643
  const s = u().subAgents;
644
644
  if (!s.has(m)) return;
645
- const x = new Map(s);
646
- x.delete(m), l({ subAgents: x });
645
+ const v = new Map(s);
646
+ v.delete(m), l({ subAgents: v });
647
647
  }, "removeSubAgent"),
648
- setLoadingInformation: /* @__PURE__ */ n((m, s, x, g) => {
649
- l({ connectionStatus: m, loading: s, loadingType: x, loadingError: g ?? u().loadingError });
648
+ setLoadingInformation: /* @__PURE__ */ n((m, s, v, g) => {
649
+ l({ connectionStatus: m, loading: s, loadingType: v, loadingError: g ?? u().loadingError });
650
650
  }, "setLoadingInformation")
651
651
  }),
652
652
  { name: "AiChatStore" }
@@ -715,7 +715,7 @@ const os = /* @__PURE__ */ n(({
715
715
  sessionService: u = new Bc(a, l.access_token),
716
716
  sessionId: m,
717
717
  artifactService: s = new Rc(a, l.access_token),
718
- storageService: x,
718
+ storageService: v,
719
719
  eventBusService: g,
720
720
  notificationPort: T,
721
721
  showPromptHistory: E = !0,
@@ -724,7 +724,7 @@ const os = /* @__PURE__ */ n(({
724
724
  showStickyHeader: w = !0,
725
725
  autoCreateSession: S = !1,
726
726
  showModelSelector: d = !0,
727
- showSessionInfo: v = !0,
727
+ showSessionInfo: x = !0,
728
728
  // v2 is the default: TaskList and sub-agent boxes live in the
729
729
  // RunProgressPanel side rail, NOT inline in the chat. Legacy v1
730
730
  // surfaces opt back into inline rendering by passing
@@ -773,7 +773,7 @@ const os = /* @__PURE__ */ n(({
773
773
  loading: !1,
774
774
  sesssionActive: !1,
775
775
  loadingError: "------"
776
- }), yt = bt(), dt = pe(null), Be = Ce(() => g ?? new Mc(), [g]), At = Ce(() => x ?? new zc(), [x]), Ft = Ce(() => ({
776
+ }), yt = bt(), dt = pe(null), Be = Ce(() => g ?? new Mc(), [g]), At = Ce(() => v ?? new zc(), [v]), Ft = Ce(() => ({
777
777
  pushNotification: /* @__PURE__ */ n((Ie) => {
778
778
  $c(Ie.message, {
779
779
  variant: Ie.type,
@@ -903,7 +903,7 @@ const os = /* @__PURE__ */ n(({
903
903
  showStatistics: D,
904
904
  showStickyHeader: w,
905
905
  showModelSelector: d,
906
- showSessionInfo: v,
906
+ showSessionInfo: x,
907
907
  showTaskList: y,
908
908
  showSubAgents: b,
909
909
  compactPrompt: p,
@@ -925,10 +925,10 @@ const os = /* @__PURE__ */ n(({
925
925
  formatTimestamp: N,
926
926
  resolvePersona: B,
927
927
  userMessageRenderer: J
928
- }), [G, Qe, V, Be, s, be, At, xt, Oe, E, D, d, v, y, b, p, z, h, it, et, st, Nt, _t, je, qe, c, _, j, N, B, J]);
928
+ }), [G, Qe, V, Be, s, be, At, xt, Oe, E, D, d, x, y, b, p, z, h, it, et, st, Nt, _t, je, qe, c, _, j, N, B, J]);
929
929
  return /* @__PURE__ */ t(pn.Provider, { value: Fe, children: ze });
930
930
  }, "AiChatProvider"), Tu = /* @__PURE__ */ n(({ onPromptSelected: e, forceExpanded: a = 0, cancelTimeout: l, children: u }) => {
931
- const [m, s] = Q([]), [x, g] = Q(!1), { storageService: T } = Ze(), { promptState: E } = Li(T), D = pe(null), k = pe([]), w = bt();
931
+ const [m, s] = Q([]), [v, g] = Q(!1), { storageService: T } = Ze(), { promptState: E } = Li(T), D = pe(null), k = pe([]), w = bt();
932
932
  le(() => {
933
933
  S();
934
934
  }, [E]), le(() => {
@@ -948,12 +948,12 @@ const os = /* @__PURE__ */ n(({
948
948
  s(h);
949
949
  }, "loadPrompts"), d = /* @__PURE__ */ n((h, A) => {
950
950
  e(h, A), g(() => !1);
951
- }, "handlePromptClick"), v = /* @__PURE__ */ n(() => {
952
- g(!x), l();
951
+ }, "handlePromptClick"), x = /* @__PURE__ */ n(() => {
952
+ g(!v), l();
953
953
  }, "toggleExpanded");
954
954
  if (m.length === 0)
955
955
  return null;
956
- const y = $i(ke.Connected, w), b = x ? y : w.palette.divider, p = m.length > 0 ? m[0] : { promptText: "No prompts yet" }, z = Fc.truncateText(p.promptText, 50, m.length);
956
+ const y = $i(ke.Connected, w), b = v ? y : w.palette.divider, p = m.length > 0 ? m[0] : { promptText: "No prompts yet" }, z = Fc.truncateText(p.promptText, 50, m.length);
957
957
  return /* @__PURE__ */ I(
958
958
  R,
959
959
  {
@@ -989,12 +989,12 @@ const os = /* @__PURE__ */ n(({
989
989
  alignItems: "center",
990
990
  justifyContent: "space-between",
991
991
  bgcolor: "rgba(255, 255, 255, 0.02)",
992
- borderTop: x ? "1px solid rgba(255, 255, 255, 0.1)" : "none",
992
+ borderTop: v ? "1px solid rgba(255, 255, 255, 0.1)" : "none",
993
993
  "&:hover": {
994
994
  bgcolor: "rgba(255, 255, 255, 0.05)"
995
995
  }
996
996
  },
997
- onClick: v,
997
+ onClick: x,
998
998
  children: [
999
999
  /* @__PURE__ */ t(R, { sx: { overflow: "clip", width: "50%", textWrap: "nowrap", borderBottom: "none" }, children: /* @__PURE__ */ t(gt, { direction: "row", spacing: 0, children: /* @__PURE__ */ I(
1000
1000
  ee,
@@ -1005,17 +1005,17 @@ const os = /* @__PURE__ */ n(({
1005
1005
  fontSize: "0.7rem"
1006
1006
  },
1007
1007
  children: [
1008
- !x && `${z}`,
1009
- x && `Last ${m.length} prompt${m.length > 1 ? "s" : ""}`
1008
+ !v && `${z}`,
1009
+ v && `Last ${m.length} prompt${m.length > 1 ? "s" : ""}`
1010
1010
  ]
1011
1011
  }
1012
1012
  ) }) }),
1013
1013
  /* @__PURE__ */ t(R, { sx: { width: "47%", textAlign: "right" }, children: u }),
1014
- /* @__PURE__ */ t(R, { sx: { width: "3%", minWidth: "15px", textAlign: "right" }, children: x ? /* @__PURE__ */ t(td, { sx: { fontSize: "12px", transform: "rotate(90deg)", marginLeft: "0.5rem", border: "1px solid rgba(255, 255, 255, 0.1)" } }) : /* @__PURE__ */ t(_r, { sx: { fontSize: "12px", transform: "rotate(90deg)", marginLeft: "0.5rem", border: "1px solid rgba(255, 255, 255, 0.1)" } }) })
1014
+ /* @__PURE__ */ t(R, { sx: { width: "3%", minWidth: "15px", textAlign: "right" }, children: v ? /* @__PURE__ */ t(td, { sx: { fontSize: "12px", transform: "rotate(90deg)", marginLeft: "0.5rem", border: "1px solid rgba(255, 255, 255, 0.1)" } }) : /* @__PURE__ */ t(_r, { sx: { fontSize: "12px", transform: "rotate(90deg)", marginLeft: "0.5rem", border: "1px solid rgba(255, 255, 255, 0.1)" } }) })
1015
1015
  ]
1016
1016
  }
1017
1017
  ),
1018
- /* @__PURE__ */ t(Wi, { in: x, children: /* @__PURE__ */ t(
1018
+ /* @__PURE__ */ t(Wi, { in: v, children: /* @__PURE__ */ t(
1019
1019
  R,
1020
1020
  {
1021
1021
  ref: D,
@@ -1122,13 +1122,13 @@ function as({ value: e, valueBuffer: a, markers: l, sx: u }) {
1122
1122
  children: `${Math.round(m)}%`
1123
1123
  }
1124
1124
  ) }),
1125
- l.map((s, x) => /* @__PURE__ */ t(Tn, { title: s.label, placement: "top", arrow: !0, children: /* @__PURE__ */ t(
1125
+ l.map((s, v) => /* @__PURE__ */ t(Tn, { title: s.label, placement: "top", arrow: !0, children: /* @__PURE__ */ t(
1126
1126
  R,
1127
1127
  {
1128
1128
  sx: { ...Au, left: `${s.position}%`, backgroundColor: s.color }
1129
1129
  },
1130
- x
1131
- ) }, "TT" + x))
1130
+ v
1131
+ ) }, "TT" + v))
1132
1132
  ] }) });
1133
1133
  }
1134
1134
  n(as, "LinearProgressBarWithMarkers");
@@ -1233,7 +1233,7 @@ function Pu({ info: e }) {
1233
1233
  /* @__PURE__ */ t(R, { children: `Uso atual: ${l}%` }),
1234
1234
  /* @__PURE__ */ t(R, { children: `${e.size.toLocaleString()} / ${e.maxSize.toLocaleString()} tokens` }),
1235
1235
  /* @__PURE__ */ t(R, { children: `Limite: ${Math.round(e.threshold * 100)}%` })
1236
- ] }), s = 26, x = 2, g = (s - x) / 2, T = 2 * Math.PI * g, E = Math.max(0, Math.min(1, e.ratio)), D = T * E, k = "#26262d", w = u ? "#d97a7a" : a.palette.primary.light, S = u ? "#d97a7a" : "#ececef";
1236
+ ] }), s = 26, v = 2, g = (s - v) / 2, T = 2 * Math.PI * g, E = Math.max(0, Math.min(1, e.ratio)), D = T * E, k = "#26262d", w = u ? "#d97a7a" : a.palette.primary.light, S = u ? "#d97a7a" : "#ececef";
1237
1237
  return /* @__PURE__ */ t(He, { title: m, placement: "top", arrow: !0, children: /* @__PURE__ */ I(
1238
1238
  R,
1239
1239
  {
@@ -1269,7 +1269,7 @@ function Pu({ info: e }) {
1269
1269
  r: g,
1270
1270
  fill: "#17171b",
1271
1271
  stroke: k,
1272
- strokeWidth: x
1272
+ strokeWidth: v
1273
1273
  }
1274
1274
  ),
1275
1275
  /* @__PURE__ */ t(
@@ -1280,7 +1280,7 @@ function Pu({ info: e }) {
1280
1280
  r: g,
1281
1281
  fill: "none",
1282
1282
  stroke: w,
1283
- strokeWidth: x,
1283
+ strokeWidth: v,
1284
1284
  strokeLinecap: "round",
1285
1285
  strokeDasharray: `${D} ${T}`,
1286
1286
  style: { transition: "stroke-dasharray .25s ease" }
@@ -1319,7 +1319,7 @@ const xs = /* @__PURE__ */ n(({
1319
1319
  previousRatio: 0,
1320
1320
  threshold: 0.9,
1321
1321
  maxSize: 0
1322
- }, [u, m] = Q(0), s = bt(), [x, g] = Q(l), T = de((h) => h.session), E = de((h) => h.statistics), D = de((h) => h.connectionStatus);
1322
+ }, [u, m] = Q(0), s = bt(), [v, g] = Q(l), T = de((h) => h.session), E = de((h) => h.statistics), D = de((h) => h.connectionStatus);
1323
1323
  le(() => {
1324
1324
  g(l);
1325
1325
  }, [T]), le(() => {
@@ -1335,13 +1335,13 @@ const xs = /* @__PURE__ */ n(({
1335
1335
  const A = Math.floor(h / 60), c = h % 60;
1336
1336
  return `${A}.${Math.floor(c / 6)}min`;
1337
1337
  }
1338
- }, "formatElapsed"), v = ye((h) => h < 1024 ? `${h.toFixed(1)}B` : h < 1024 * 1024 ? `${(h / 1024).toFixed(1)}KB` : `${(h / (1024 * 1024)).toFixed(1)}MB`, [E]), y = /* @__PURE__ */ n(() => {
1338
+ }, "formatElapsed"), x = ye((h) => h < 1024 ? `${h.toFixed(1)}B` : h < 1024 * 1024 ? `${(h / 1024).toFixed(1)}KB` : `${(h / (1024 * 1024)).toFixed(1)}MB`, [E]), y = /* @__PURE__ */ n(() => {
1339
1339
  const h = (E == null ? void 0 : E.tokensPerSecond) ?? 0, A = 1e3 / 50;
1340
1340
  return h > A ? s.palette.warning.dark : h > A * 0.8 ? s.palette.secondary.light : h > A * 0.6 ? s.palette.secondary.dark : h > A * 0.4 ? s.palette.primary.dark : h > A * 0.2 ? s.palette.text.primary : s.palette.text.secondary;
1341
1341
  }, "getPerSecondColor"), b = ye((h) => {
1342
1342
  const A = 900 - Math.min(Math.round(1e3 * Math.max(h, 0.2) / 100), 9) * 100 + 100;
1343
1343
  return Hd[A];
1344
- }, [x]), p = e ? { fontFamily: Jo, fontSize: "0.7rem" } : { fontSize: "0.7rem" }, z = /* @__PURE__ */ n(() => {
1344
+ }, [v]), p = e ? { fontFamily: Jo, fontSize: "0.7rem" } : { fontSize: "0.7rem" }, z = /* @__PURE__ */ n(() => {
1345
1345
  if (!a) return null;
1346
1346
  const { turnOpen: h, suspended: A, suspending: c, onPause: _, onCancel: j } = a, N = A, B = h || A;
1347
1347
  return /* @__PURE__ */ t(He, { title: N ? "Cancelar — encerra o turno em execução" : c ? "Pausando…" : "Para continuar envie uma nova mensagem; o agente vai seguir do ponto que parou", placement: "top", arrow: !0, children: /* @__PURE__ */ t(R, { component: "span", sx: { display: "inline-flex" }, children: /* @__PURE__ */ t(
@@ -1407,7 +1407,7 @@ const xs = /* @__PURE__ */ n(({
1407
1407
  {
1408
1408
  variant: "caption",
1409
1409
  sx: { color: "text.secondary", ...p },
1410
- children: v((E == null ? void 0 : E.totalTransfered) ?? 0)
1410
+ children: x((E == null ? void 0 : E.totalTransfered) ?? 0)
1411
1411
  }
1412
1412
  ),
1413
1413
  /* @__PURE__ */ t(R, { sx: { width: "5px" } }),
@@ -1419,7 +1419,7 @@ const xs = /* @__PURE__ */ n(({
1419
1419
  {
1420
1420
  variant: "caption",
1421
1421
  sx: { color: "text.primary", fontStyle: "italic", ...p },
1422
- children: v(u)
1422
+ children: x(u)
1423
1423
  }
1424
1424
  )
1425
1425
  ] }),
@@ -1437,27 +1437,27 @@ const xs = /* @__PURE__ */ n(({
1437
1437
  ] })
1438
1438
  ] }),
1439
1439
  (() => {
1440
- const h = x ? Math.round(x.ratio * 100) : 0;
1441
- return !!x && x.size > 0 && h > 0 ? e ? (
1440
+ const h = v ? Math.round(v.ratio * 100) : 0;
1441
+ return !!v && v.size > 0 && h > 0 ? e ? (
1442
1442
  // v2 compact — replace the wide progress bar with
1443
1443
  // a small badge that surfaces the integer % and
1444
1444
  // exposes the full numbers via tooltip.
1445
1445
  /* @__PURE__ */ I(re, { children: [
1446
1446
  /* @__PURE__ */ t(R, { sx: { flex: 1 } }),
1447
- /* @__PURE__ */ t(Pu, { info: x })
1447
+ /* @__PURE__ */ t(Pu, { info: v })
1448
1448
  ] })
1449
1449
  ) : /* @__PURE__ */ t(
1450
1450
  as,
1451
1451
  {
1452
- value: x.ratio * 100,
1453
- valueBuffer: x.previousRatio * 100,
1454
- markers: [{ position: x.threshold * 100, label: "Limit", color: "error.main" }],
1455
- sx: { width: "100%", minWidth: "50px", color: b(x.ratio) }
1452
+ value: v.ratio * 100,
1453
+ valueBuffer: v.previousRatio * 100,
1454
+ markers: [{ position: v.threshold * 100, label: "Limit", color: "error.main" }],
1455
+ sx: { width: "100%", minWidth: "50px", color: b(v.ratio) }
1456
1456
  }
1457
1457
  ) : null;
1458
1458
  })(),
1459
1459
  e && a && /* @__PURE__ */ I(re, { children: [
1460
- !(x && x.size > 0 && Math.round(x.ratio * 100) > 0) && /* @__PURE__ */ t(R, { sx: { flex: 1 } }),
1460
+ !(v && v.size > 0 && Math.round(v.ratio * 100) > 0) && /* @__PURE__ */ t(R, { sx: { flex: 1 } }),
1461
1461
  z()
1462
1462
  ] })
1463
1463
  ] })
@@ -1508,7 +1508,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
1508
1508
  return null;
1509
1509
  const m = JSON.parse(l.eventData), s = u.getCurrentInteraction();
1510
1510
  u && s && (s.todoList = m);
1511
- const x = m.items.filter((d) => d.status === "completed").length, g = m.items.length, T = g > 0 ? x / g * 100 : 0, D = `${x > 0 ? `${x} de ${g} completos` : "Iniciando..."} - ${T.toFixed(0)}%`;
1511
+ const v = m.items.filter((d) => d.status === "completed").length, g = m.items.length, T = g > 0 ? v / g * 100 : 0, D = `${v > 0 ? `${v} de ${g} completos` : "Iniciando..."} - ${T.toFixed(0)}%`;
1512
1512
  if (g == 0) return null;
1513
1513
  const k = m.currentWorkingItemKey ? m.items.find((d) => d.key === m.currentWorkingItemKey) : null, w = k ? `${k.label}${k.detail ? `: ${k.detail}` : ""}` : "";
1514
1514
  return /* @__PURE__ */ t(
@@ -1590,7 +1590,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
1590
1590
  High: "info",
1591
1591
  Good: "warning"
1592
1592
  }, vs = /* @__PURE__ */ n(({ inline: e = !1 }) => {
1593
- const a = wt(), { currentModel: l, setCurrentModel: u } = Ze(), [m, s] = Q(null), x = ye((w) => {
1593
+ const a = wt(), { currentModel: l, setCurrentModel: u } = Ze(), [m, s] = Q(null), v = ye((w) => {
1594
1594
  s(w.currentTarget);
1595
1595
  }, []), g = ye(() => {
1596
1596
  s(null);
@@ -1601,7 +1601,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
1601
1601
  /* @__PURE__ */ t(Ee, { variant: "h6", width: "100%", textAlign: "center", children: "Fast models" }),
1602
1602
  /* @__PURE__ */ t(Ro, {}),
1603
1603
  di.map(({ id: w, config: S, vendor: d }) => {
1604
- const v = w === l, y = S.icon;
1604
+ const x = w === l, y = S.icon;
1605
1605
  return S.speed !== "Fast" ? null : /* @__PURE__ */ I(
1606
1606
  se,
1607
1607
  {
@@ -1614,19 +1614,19 @@ const Lu = /* @__PURE__ */ n(({}) => {
1614
1614
  borderRadius: 1.5,
1615
1615
  cursor: "pointer",
1616
1616
  border: "1px solid",
1617
- borderColor: v ? "primary.main" : "transparent",
1618
- bgcolor: v ? ln(a.palette.primary.main, 0.08) : "transparent",
1617
+ borderColor: x ? "primary.main" : "transparent",
1618
+ bgcolor: x ? ln(a.palette.primary.main, 0.08) : "transparent",
1619
1619
  transition: "all 0.15s ease",
1620
1620
  "&:hover": {
1621
- bgcolor: v ? ln(a.palette.primary.main, 0.12) : "action.hover"
1621
+ bgcolor: x ? ln(a.palette.primary.main, 0.12) : "action.hover"
1622
1622
  }
1623
1623
  },
1624
1624
  children: [
1625
- /* @__PURE__ */ t(se, { sx: { pt: 0.3 }, children: /* @__PURE__ */ t(y, { fontSize: "small", sx: { color: v ? "primary.main" : "text.secondary" } }) }),
1625
+ /* @__PURE__ */ t(se, { sx: { pt: 0.3 }, children: /* @__PURE__ */ t(y, { fontSize: "small", sx: { color: x ? "primary.main" : "text.secondary" } }) }),
1626
1626
  /* @__PURE__ */ I(se, { sx: { flex: 1, minWidth: 0, minHeight: "120px" }, children: [
1627
1627
  /* @__PURE__ */ I(_e, { direction: "row", alignItems: "center", spacing: 0.5, children: [
1628
1628
  /* @__PURE__ */ t(Ee, { variant: "body2", sx: { fontWeight: 600, fontSize: "0.8rem" }, children: S.name }),
1629
- v && /* @__PURE__ */ t(ii, { sx: { fontSize: 14, color: "primary.main" } })
1629
+ x && /* @__PURE__ */ t(ii, { sx: { fontSize: 14, color: "primary.main" } })
1630
1630
  ] }),
1631
1631
  /* @__PURE__ */ t(Ee, { variant: "caption", sx: { color: "text.secondary", fontSize: "0.68rem", display: "block", mb: 0.5 }, children: w }),
1632
1632
  /* @__PURE__ */ t(Ee, { variant: "caption", sx: { color: "text.secondary", fontSize: "0.7rem", lineHeight: 1.3, display: "block", whiteSpace: "pre-line" }, children: S.description }),
@@ -1672,7 +1672,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
1672
1672
  /* @__PURE__ */ t(Ee, { variant: "h6", width: "100%", textAlign: "center", children: "High Precision" }),
1673
1673
  /* @__PURE__ */ t(Ro, {}),
1674
1674
  di.map(({ id: w, config: S, vendor: d }) => {
1675
- const v = w === l, y = S.icon;
1675
+ const x = w === l, y = S.icon;
1676
1676
  return S.quality !== "Highest" ? null : /* @__PURE__ */ I(
1677
1677
  se,
1678
1678
  {
@@ -1685,19 +1685,19 @@ const Lu = /* @__PURE__ */ n(({}) => {
1685
1685
  borderRadius: 1.5,
1686
1686
  cursor: "pointer",
1687
1687
  border: "1px solid",
1688
- borderColor: v ? "primary.main" : "transparent",
1689
- bgcolor: v ? ln(a.palette.primary.main, 0.08) : "transparent",
1688
+ borderColor: x ? "primary.main" : "transparent",
1689
+ bgcolor: x ? ln(a.palette.primary.main, 0.08) : "transparent",
1690
1690
  transition: "all 0.15s ease",
1691
1691
  "&:hover": {
1692
- bgcolor: v ? ln(a.palette.primary.main, 0.12) : "action.hover"
1692
+ bgcolor: x ? ln(a.palette.primary.main, 0.12) : "action.hover"
1693
1693
  }
1694
1694
  },
1695
1695
  children: [
1696
- /* @__PURE__ */ t(se, { sx: { pt: 0.3 }, children: /* @__PURE__ */ t(y, { fontSize: "small", sx: { color: v ? "primary.main" : "text.secondary" } }) }),
1696
+ /* @__PURE__ */ t(se, { sx: { pt: 0.3 }, children: /* @__PURE__ */ t(y, { fontSize: "small", sx: { color: x ? "primary.main" : "text.secondary" } }) }),
1697
1697
  /* @__PURE__ */ I(se, { sx: { flex: 1, minWidth: 0, minHeight: "120px" }, children: [
1698
1698
  /* @__PURE__ */ I(_e, { direction: "row", alignItems: "center", spacing: 0.5, children: [
1699
1699
  /* @__PURE__ */ t(Ee, { variant: "body2", sx: { fontWeight: 600, fontSize: "0.8rem" }, children: S.name }),
1700
- v && /* @__PURE__ */ t(ii, { sx: { fontSize: 14, color: "primary.main" } })
1700
+ x && /* @__PURE__ */ t(ii, { sx: { fontSize: 14, color: "primary.main" } })
1701
1701
  ] }),
1702
1702
  /* @__PURE__ */ t(Ee, { variant: "caption", sx: { color: "text.secondary", fontSize: "0.68rem", display: "block", mb: 0.5 }, children: w }),
1703
1703
  /* @__PURE__ */ t(Ee, { variant: "caption", sx: { color: "text.secondary", fontSize: "0.7rem", lineHeight: 1.3, display: "block", whiteSpace: "pre-line" }, children: S.description }),
@@ -1745,7 +1745,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
1745
1745
  Wt,
1746
1746
  {
1747
1747
  size: "small",
1748
- onClick: x,
1748
+ onClick: v,
1749
1749
  sx: {
1750
1750
  color: "text.secondary",
1751
1751
  "&:hover": { color: "primary.main" },
@@ -1772,7 +1772,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
1772
1772
  ] });
1773
1773
  }, "ModelSelector"), $u = /* @__PURE__ */ n(() => null, "PromptEditorDialog"), Bu = /* @__PURE__ */ n(() => null, "ChatSettings"), Wu = /* @__PURE__ */ n(({ forceMessage: e, onHeightChange: a }) => {
1774
1774
  var it;
1775
- const [l, u] = Q(!1), m = wt(), s = Ar(m.breakpoints.down("sm")), x = Ar("(max-width: 900px)"), [g, T] = Q(!1), [E, D] = Q(!1), [k, w] = Q(!1), [S, d] = Q(!1), [v, y] = Q(0), b = pe(null), [p, z] = Gi(b, (/* @__PURE__ */ new Date()).getTime().toString());
1775
+ const [l, u] = Q(!1), m = wt(), s = Ar(m.breakpoints.down("sm")), v = Ar("(max-width: 900px)"), [g, T] = Q(!1), [E, D] = Q(!1), [k, w] = Q(!1), [S, d] = Q(!1), [x, y] = Q(0), b = pe(null), [p, z] = Gi(b, (/* @__PURE__ */ new Date()).getTime().toString());
1776
1776
  le(() => {
1777
1777
  a && a(z);
1778
1778
  }, [z]);
@@ -1936,13 +1936,13 @@ const Lu = /* @__PURE__ */ n(({}) => {
1936
1936
  flex: 1,
1937
1937
  fontFamily: m.typography.fontFamily,
1938
1938
  "& .MuiInputBase-input": {
1939
- fontSize: x ? s ? "1.2rem" : "1rem" : "0.8rem",
1940
- lineHeight: x ? 1.2 : 1.5,
1939
+ fontSize: v ? s ? "1.2rem" : "1rem" : "0.8rem",
1940
+ lineHeight: v ? 1.2 : 1.5,
1941
1941
  fontFamily: m.typography.fontFamily,
1942
1942
  paddingTop: "4px",
1943
1943
  // Additional mobile-specific styles
1944
1944
  ...s && {
1945
- fontSize: x && s ? "1.2rem" : "0.8rem",
1945
+ fontSize: v && s ? "1.2rem" : "0.8rem",
1946
1946
  WebkitTextSizeAdjust: "100%",
1947
1947
  MozTextSizeAdjust: "100%",
1948
1948
  msTextSizeAdjust: "100%"
@@ -1965,12 +1965,12 @@ const Lu = /* @__PURE__ */ n(({}) => {
1965
1965
  disableUnderline: !0,
1966
1966
  style: {
1967
1967
  fontFamily: m.typography.fontFamily,
1968
- fontSize: x ? s ? "1.2rem" : "1rem" : "0.8rem",
1969
- lineHeight: x ? s ? 1 : 1.2 : 1.5,
1968
+ fontSize: v ? s ? "1.2rem" : "1rem" : "0.8rem",
1969
+ lineHeight: v ? s ? 1 : 1.2 : 1.5,
1970
1970
  paddingTop: "4px",
1971
1971
  // Additional mobile-specific styles
1972
1972
  ...s && {
1973
- fontSize: x ? s ? "1.2rem" : "1rem" : "0.8rem",
1973
+ fontSize: v ? s ? "1.2rem" : "1rem" : "0.8rem",
1974
1974
  WebkitTextSizeAdjust: "100%",
1975
1975
  MozTextSizeAdjust: "100%",
1976
1976
  msTextSizeAdjust: "100%"
@@ -2052,7 +2052,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
2052
2052
  {
2053
2053
  cancelTimeout: Ft,
2054
2054
  onPromptSelected: ze,
2055
- forceExpanded: v,
2055
+ forceExpanded: x,
2056
2056
  children: N && /* @__PURE__ */ t(xs, {})
2057
2057
  }
2058
2058
  ),
@@ -2089,35 +2089,35 @@ function qu() {
2089
2089
  if (!("channels" in w[d])) throw new Error("missing channels property: " + d);
2090
2090
  if (!("labels" in w[d])) throw new Error("missing channel labels property: " + d);
2091
2091
  if (w[d].labels.length !== w[d].channels) throw new Error("channel and label counts mismatch: " + d);
2092
- const { channels: v, labels: y } = w[d];
2093
- delete w[d].channels, delete w[d].labels, Object.defineProperty(w[d], "channels", { value: v }), Object.defineProperty(w[d], "labels", { value: y });
2092
+ const { channels: x, labels: y } = w[d];
2093
+ delete w[d].channels, delete w[d].labels, Object.defineProperty(w[d], "channels", { value: x }), Object.defineProperty(w[d], "labels", { value: y });
2094
2094
  }
2095
- function S(d, v) {
2096
- return (d[0] - v[0]) ** 2 + (d[1] - v[1]) ** 2 + (d[2] - v[2]) ** 2;
2095
+ function S(d, x) {
2096
+ return (d[0] - x[0]) ** 2 + (d[1] - x[1]) ** 2 + (d[2] - x[2]) ** 2;
2097
2097
  }
2098
2098
  n(S, "s"), w.rgb.hsl = function(d) {
2099
- const v = d[0] / 255, y = d[1] / 255, b = d[2] / 255, p = Math.min(v, y, b), z = Math.max(v, y, b), h = z - p;
2099
+ const x = d[0] / 255, y = d[1] / 255, b = d[2] / 255, p = Math.min(x, y, b), z = Math.max(x, y, b), h = z - p;
2100
2100
  let A, c;
2101
- z === p ? A = 0 : v === z ? A = (y - b) / h : y === z ? A = 2 + (b - v) / h : b === z && (A = 4 + (v - y) / h), A = Math.min(60 * A, 360), A < 0 && (A += 360);
2101
+ z === p ? A = 0 : x === z ? A = (y - b) / h : y === z ? A = 2 + (b - x) / h : b === z && (A = 4 + (x - y) / h), A = Math.min(60 * A, 360), A < 0 && (A += 360);
2102
2102
  const _ = (p + z) / 2;
2103
2103
  return c = z === p ? 0 : _ <= 0.5 ? h / (z + p) : h / (2 - z - p), [A, 100 * c, 100 * _];
2104
2104
  }, w.rgb.hsv = function(d) {
2105
- let v, y, b, p, z;
2105
+ let x, y, b, p, z;
2106
2106
  const h = d[0] / 255, A = d[1] / 255, c = d[2] / 255, _ = Math.max(h, A, c), j = _ - Math.min(h, A, c), N = /* @__PURE__ */ n(function(B) {
2107
2107
  return (_ - B) / 6 / j + 0.5;
2108
2108
  }, "b");
2109
- return j === 0 ? (p = 0, z = 0) : (z = j / _, v = N(h), y = N(A), b = N(c), h === _ ? p = b - y : A === _ ? p = 0.3333333333333333 + v - b : c === _ && (p = 0.6666666666666666 + y - v), p < 0 ? p += 1 : p > 1 && (p -= 1)), [360 * p, 100 * z, 100 * _];
2109
+ return j === 0 ? (p = 0, z = 0) : (z = j / _, x = N(h), y = N(A), b = N(c), h === _ ? p = b - y : A === _ ? p = 0.3333333333333333 + x - b : c === _ && (p = 0.6666666666666666 + y - x), p < 0 ? p += 1 : p > 1 && (p -= 1)), [360 * p, 100 * z, 100 * _];
2110
2110
  }, w.rgb.hwb = function(d) {
2111
- const v = d[0], y = d[1];
2111
+ const x = d[0], y = d[1];
2112
2112
  let b = d[2];
2113
- const p = w.rgb.hsl(d)[0], z = 1 / 255 * Math.min(v, Math.min(y, b));
2114
- return b = 1 - 0.00392156862745098 * Math.max(v, Math.max(y, b)), [p, 100 * z, 100 * b];
2113
+ const p = w.rgb.hsl(d)[0], z = 1 / 255 * Math.min(x, Math.min(y, b));
2114
+ return b = 1 - 0.00392156862745098 * Math.max(x, Math.max(y, b)), [p, 100 * z, 100 * b];
2115
2115
  }, w.rgb.cmyk = function(d) {
2116
- const v = d[0] / 255, y = d[1] / 255, b = d[2] / 255, p = Math.min(1 - v, 1 - y, 1 - b);
2117
- return [100 * ((1 - v - p) / (1 - p) || 0), 100 * ((1 - y - p) / (1 - p) || 0), 100 * ((1 - b - p) / (1 - p) || 0), 100 * p];
2116
+ const x = d[0] / 255, y = d[1] / 255, b = d[2] / 255, p = Math.min(1 - x, 1 - y, 1 - b);
2117
+ return [100 * ((1 - x - p) / (1 - p) || 0), 100 * ((1 - y - p) / (1 - p) || 0), 100 * ((1 - b - p) / (1 - p) || 0), 100 * p];
2118
2118
  }, w.rgb.keyword = function(d) {
2119
- const v = k[d];
2120
- if (v) return v;
2119
+ const x = k[d];
2120
+ if (x) return x;
2121
2121
  let y, b = 1 / 0;
2122
2122
  for (const p of Object.keys(D)) {
2123
2123
  const z = S(d, D[p]);
@@ -2127,29 +2127,29 @@ function qu() {
2127
2127
  }, w.keyword.rgb = function(d) {
2128
2128
  return D[d];
2129
2129
  }, w.rgb.xyz = function(d) {
2130
- let v = d[0] / 255, y = d[1] / 255, b = d[2] / 255;
2131
- return v = v > 0.04045 ? ((v + 0.055) / 1.055) ** 2.4 : v / 12.92, y = y > 0.04045 ? ((y + 0.055) / 1.055) ** 2.4 : y / 12.92, b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92, [100 * (0.4124 * v + 0.3576 * y + 0.1805 * b), 100 * (0.2126 * v + 0.7152 * y + 0.0722 * b), 100 * (0.0193 * v + 0.1192 * y + 0.9505 * b)];
2130
+ let x = d[0] / 255, y = d[1] / 255, b = d[2] / 255;
2131
+ return x = x > 0.04045 ? ((x + 0.055) / 1.055) ** 2.4 : x / 12.92, y = y > 0.04045 ? ((y + 0.055) / 1.055) ** 2.4 : y / 12.92, b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92, [100 * (0.4124 * x + 0.3576 * y + 0.1805 * b), 100 * (0.2126 * x + 0.7152 * y + 0.0722 * b), 100 * (0.0193 * x + 0.1192 * y + 0.9505 * b)];
2132
2132
  }, w.rgb.lab = function(d) {
2133
- const v = w.rgb.xyz(d);
2134
- let y = v[0], b = v[1], p = v[2];
2133
+ const x = w.rgb.xyz(d);
2134
+ let y = x[0], b = x[1], p = x[2];
2135
2135
  return y /= 95.047, b /= 100, p /= 108.883, y = y > 8856e-6 ? y ** 0.3333333333333333 : 7.787 * y + 0.13793103448275862, b = b > 8856e-6 ? b ** 0.3333333333333333 : 7.787 * b + 0.13793103448275862, p = p > 8856e-6 ? p ** 0.3333333333333333 : 7.787 * p + 0.13793103448275862, [116 * b - 16, 500 * (y - b), 200 * (b - p)];
2136
2136
  }, w.hsl.rgb = function(d) {
2137
- const v = d[0] / 360, y = d[1] / 100, b = d[2] / 100;
2137
+ const x = d[0] / 360, y = d[1] / 100, b = d[2] / 100;
2138
2138
  let p, z, h;
2139
2139
  if (y === 0) return h = 255 * b, [h, h, h];
2140
2140
  p = b < 0.5 ? b * (1 + y) : b + y - b * y;
2141
2141
  const A = 2 * b - p, c = [0, 0, 0];
2142
- for (let _ = 0; _ < 3; _++) z = v + 0.3333333333333333 * -(_ - 1), z < 0 && z++, z > 1 && z--, h = 6 * z < 1 ? A + 6 * (p - A) * z : 2 * z < 1 ? p : 3 * z < 2 ? A + (p - A) * (0.6666666666666666 - z) * 6 : A, c[_] = 255 * h;
2142
+ for (let _ = 0; _ < 3; _++) z = x + 0.3333333333333333 * -(_ - 1), z < 0 && z++, z > 1 && z--, h = 6 * z < 1 ? A + 6 * (p - A) * z : 2 * z < 1 ? p : 3 * z < 2 ? A + (p - A) * (0.6666666666666666 - z) * 6 : A, c[_] = 255 * h;
2143
2143
  return c;
2144
2144
  }, w.hsl.hsv = function(d) {
2145
- const v = d[0];
2145
+ const x = d[0];
2146
2146
  let y = d[1] / 100, b = d[2] / 100, p = y;
2147
2147
  const z = Math.max(b, 0.01);
2148
- return b *= 2, y *= b <= 1 ? b : 2 - b, p *= z <= 1 ? z : 2 - z, [v, 100 * (b === 0 ? 2 * p / (z + p) : 2 * y / (b + y)), 100 * ((b + y) / 2)];
2148
+ return b *= 2, y *= b <= 1 ? b : 2 - b, p *= z <= 1 ? z : 2 - z, [x, 100 * (b === 0 ? 2 * p / (z + p) : 2 * y / (b + y)), 100 * ((b + y) / 2)];
2149
2149
  }, w.hsv.rgb = function(d) {
2150
- const v = d[0] / 60, y = d[1] / 100;
2150
+ const x = d[0] / 60, y = d[1] / 100;
2151
2151
  let b = d[2] / 100;
2152
- const p = Math.floor(v) % 6, z = v - Math.floor(v), h = 255 * b * (1 - y), A = 255 * b * (1 - y * z), c = 255 * b * (1 - y * (1 - z));
2152
+ const p = Math.floor(x) % 6, z = x - Math.floor(x), h = 255 * b * (1 - y), A = 255 * b * (1 - y * z), c = 255 * b * (1 - y * (1 - z));
2153
2153
  switch (b *= 255, p) {
2154
2154
  case 0:
2155
2155
  return [b, c, h];
@@ -2165,19 +2165,19 @@ function qu() {
2165
2165
  return [b, h, A];
2166
2166
  }
2167
2167
  }, w.hsv.hsl = function(d) {
2168
- const v = d[0], y = d[1] / 100, b = d[2] / 100, p = Math.max(b, 0.01);
2168
+ const x = d[0], y = d[1] / 100, b = d[2] / 100, p = Math.max(b, 0.01);
2169
2169
  let z, h;
2170
2170
  h = (2 - y) * b;
2171
2171
  const A = (2 - y) * p;
2172
- return z = y * p, z /= A <= 1 ? A : 2 - A, z = z || 0, h /= 2, [v, 100 * z, 100 * h];
2172
+ return z = y * p, z /= A <= 1 ? A : 2 - A, z = z || 0, h /= 2, [x, 100 * z, 100 * h];
2173
2173
  }, w.hwb.rgb = function(d) {
2174
- const v = d[0] / 360;
2174
+ const x = d[0] / 360;
2175
2175
  let y = d[1] / 100, b = d[2] / 100;
2176
2176
  const p = y + b;
2177
2177
  let z;
2178
2178
  p > 1 && (y /= p, b /= p);
2179
- const h = Math.floor(6 * v), A = 1 - b;
2180
- z = 6 * v - h, 1 & h && (z = 1 - z);
2179
+ const h = Math.floor(6 * x), A = 1 - b;
2180
+ z = 6 * x - h, 1 & h && (z = 1 - z);
2181
2181
  const c = y + z * (A - y);
2182
2182
  let _, j, N;
2183
2183
  switch (h) {
@@ -2203,76 +2203,76 @@ function qu() {
2203
2203
  }
2204
2204
  return [255 * _, 255 * j, 255 * N];
2205
2205
  }, w.cmyk.rgb = function(d) {
2206
- const v = d[0] / 100, y = d[1] / 100, b = d[2] / 100, p = d[3] / 100;
2207
- return [255 * (1 - Math.min(1, v * (1 - p) + p)), 255 * (1 - Math.min(1, y * (1 - p) + p)), 255 * (1 - Math.min(1, b * (1 - p) + p))];
2206
+ const x = d[0] / 100, y = d[1] / 100, b = d[2] / 100, p = d[3] / 100;
2207
+ return [255 * (1 - Math.min(1, x * (1 - p) + p)), 255 * (1 - Math.min(1, y * (1 - p) + p)), 255 * (1 - Math.min(1, b * (1 - p) + p))];
2208
2208
  }, w.xyz.rgb = function(d) {
2209
- const v = d[0] / 100, y = d[1] / 100, b = d[2] / 100;
2209
+ const x = d[0] / 100, y = d[1] / 100, b = d[2] / 100;
2210
2210
  let p, z, h;
2211
- return p = 3.2406 * v + -1.5372 * y + -0.4986 * b, z = -0.9689 * v + 1.8758 * y + 0.0415 * b, h = 0.0557 * v + -0.204 * y + 1.057 * b, p = p > 31308e-7 ? 1.055 * p ** 0.4166666666666667 - 0.055 : 12.92 * p, z = z > 31308e-7 ? 1.055 * z ** 0.4166666666666667 - 0.055 : 12.92 * z, h = h > 31308e-7 ? 1.055 * h ** 0.4166666666666667 - 0.055 : 12.92 * h, p = Math.min(Math.max(0, p), 1), z = Math.min(Math.max(0, z), 1), h = Math.min(Math.max(0, h), 1), [255 * p, 255 * z, 255 * h];
2211
+ return p = 3.2406 * x + -1.5372 * y + -0.4986 * b, z = -0.9689 * x + 1.8758 * y + 0.0415 * b, h = 0.0557 * x + -0.204 * y + 1.057 * b, p = p > 31308e-7 ? 1.055 * p ** 0.4166666666666667 - 0.055 : 12.92 * p, z = z > 31308e-7 ? 1.055 * z ** 0.4166666666666667 - 0.055 : 12.92 * z, h = h > 31308e-7 ? 1.055 * h ** 0.4166666666666667 - 0.055 : 12.92 * h, p = Math.min(Math.max(0, p), 1), z = Math.min(Math.max(0, z), 1), h = Math.min(Math.max(0, h), 1), [255 * p, 255 * z, 255 * h];
2212
2212
  }, w.xyz.lab = function(d) {
2213
- let v = d[0], y = d[1], b = d[2];
2214
- return v /= 95.047, y /= 100, b /= 108.883, v = v > 8856e-6 ? v ** 0.3333333333333333 : 7.787 * v + 0.13793103448275862, y = y > 8856e-6 ? y ** 0.3333333333333333 : 7.787 * y + 0.13793103448275862, b = b > 8856e-6 ? b ** 0.3333333333333333 : 7.787 * b + 0.13793103448275862, [116 * y - 16, 500 * (v - y), 200 * (y - b)];
2213
+ let x = d[0], y = d[1], b = d[2];
2214
+ return x /= 95.047, y /= 100, b /= 108.883, x = x > 8856e-6 ? x ** 0.3333333333333333 : 7.787 * x + 0.13793103448275862, y = y > 8856e-6 ? y ** 0.3333333333333333 : 7.787 * y + 0.13793103448275862, b = b > 8856e-6 ? b ** 0.3333333333333333 : 7.787 * b + 0.13793103448275862, [116 * y - 16, 500 * (x - y), 200 * (y - b)];
2215
2215
  }, w.lab.xyz = function(d) {
2216
- let v, y, b;
2217
- y = (d[0] + 16) / 116, v = d[1] / 500 + y, b = y - d[2] / 200;
2218
- const p = y ** 3, z = v ** 3, h = b ** 3;
2219
- return y = p > 8856e-6 ? p : (y - 0.13793103448275862) / 7.787, v = z > 8856e-6 ? z : (v - 0.13793103448275862) / 7.787, b = h > 8856e-6 ? h : (b - 0.13793103448275862) / 7.787, v *= 95.047, y *= 100, b *= 108.883, [v, y, b];
2216
+ let x, y, b;
2217
+ y = (d[0] + 16) / 116, x = d[1] / 500 + y, b = y - d[2] / 200;
2218
+ const p = y ** 3, z = x ** 3, h = b ** 3;
2219
+ return y = p > 8856e-6 ? p : (y - 0.13793103448275862) / 7.787, x = z > 8856e-6 ? z : (x - 0.13793103448275862) / 7.787, b = h > 8856e-6 ? h : (b - 0.13793103448275862) / 7.787, x *= 95.047, y *= 100, b *= 108.883, [x, y, b];
2220
2220
  }, w.lab.lch = function(d) {
2221
- const v = d[0], y = d[1], b = d[2];
2221
+ const x = d[0], y = d[1], b = d[2];
2222
2222
  let p;
2223
- return p = 360 * Math.atan2(b, y) / 2 / Math.PI, p < 0 && (p += 360), [v, Math.sqrt(y * y + b * b), p];
2223
+ return p = 360 * Math.atan2(b, y) / 2 / Math.PI, p < 0 && (p += 360), [x, Math.sqrt(y * y + b * b), p];
2224
2224
  }, w.lch.lab = function(d) {
2225
- const v = d[0], y = d[1], b = d[2] / 360 * 2 * Math.PI;
2226
- return [v, y * Math.cos(b), y * Math.sin(b)];
2227
- }, w.rgb.ansi16 = function(d, v = null) {
2225
+ const x = d[0], y = d[1], b = d[2] / 360 * 2 * Math.PI;
2226
+ return [x, y * Math.cos(b), y * Math.sin(b)];
2227
+ }, w.rgb.ansi16 = function(d, x = null) {
2228
2228
  const [y, b, p] = d;
2229
- let z = v === null ? w.rgb.hsv(d)[2] : v;
2229
+ let z = x === null ? w.rgb.hsv(d)[2] : x;
2230
2230
  if (z = Math.round(z / 50), z === 0) return 30;
2231
2231
  let h = 30 + (Math.round(p / 255) << 2 | Math.round(b / 255) << 1 | Math.round(y / 255));
2232
2232
  return z === 2 && (h += 60), h;
2233
2233
  }, w.hsv.ansi16 = function(d) {
2234
2234
  return w.rgb.ansi16(w.hsv.rgb(d), d[2]);
2235
2235
  }, w.rgb.ansi256 = function(d) {
2236
- const v = d[0], y = d[1], b = d[2];
2237
- return v === y && y === b ? v < 8 ? 16 : v > 248 ? 231 : Math.round((v - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(v / 255 * 5) + 6 * Math.round(y / 255 * 5) + Math.round(b / 255 * 5);
2236
+ const x = d[0], y = d[1], b = d[2];
2237
+ return x === y && y === b ? x < 8 ? 16 : x > 248 ? 231 : Math.round((x - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(x / 255 * 5) + 6 * Math.round(y / 255 * 5) + Math.round(b / 255 * 5);
2238
2238
  }, w.ansi16.rgb = function(d) {
2239
- let v = d % 10;
2240
- if (v === 0 || v === 7) return d > 50 && (v += 3.5), v = v / 10.5 * 255, [v, v, v];
2239
+ let x = d % 10;
2240
+ if (x === 0 || x === 7) return d > 50 && (x += 3.5), x = x / 10.5 * 255, [x, x, x];
2241
2241
  const y = 0.5 * (1 + ~~(d > 50));
2242
- return [(1 & v) * y * 255, (v >> 1 & 1) * y * 255, (v >> 2 & 1) * y * 255];
2242
+ return [(1 & x) * y * 255, (x >> 1 & 1) * y * 255, (x >> 2 & 1) * y * 255];
2243
2243
  }, w.ansi256.rgb = function(d) {
2244
2244
  if (d >= 232) {
2245
2245
  const y = 10 * (d - 232) + 8;
2246
2246
  return [y, y, y];
2247
2247
  }
2248
- let v;
2249
- return d -= 16, [Math.floor(d / 36) / 5 * 255, Math.floor((v = d % 36) / 6) / 5 * 255, v % 6 / 5 * 255];
2248
+ let x;
2249
+ return d -= 16, [Math.floor(d / 36) / 5 * 255, Math.floor((x = d % 36) / 6) / 5 * 255, x % 6 / 5 * 255];
2250
2250
  }, w.rgb.hex = function(d) {
2251
- const v = (((255 & Math.round(d[0])) << 16) + ((255 & Math.round(d[1])) << 8) + (255 & Math.round(d[2]))).toString(16).toUpperCase();
2252
- return "000000".substring(v.length) + v;
2251
+ const x = (((255 & Math.round(d[0])) << 16) + ((255 & Math.round(d[1])) << 8) + (255 & Math.round(d[2]))).toString(16).toUpperCase();
2252
+ return "000000".substring(x.length) + x;
2253
2253
  }, w.hex.rgb = function(d) {
2254
- const v = d.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
2255
- if (!v) return [0, 0, 0];
2256
- let y = v[0];
2257
- v[0].length === 3 && (y = y.split("").map((p) => p + p).join(""));
2254
+ const x = d.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
2255
+ if (!x) return [0, 0, 0];
2256
+ let y = x[0];
2257
+ x[0].length === 3 && (y = y.split("").map((p) => p + p).join(""));
2258
2258
  const b = parseInt(y, 16);
2259
2259
  return [b >> 16 & 255, b >> 8 & 255, 255 & b];
2260
2260
  }, w.rgb.hcg = function(d) {
2261
- const v = d[0] / 255, y = d[1] / 255, b = d[2] / 255, p = Math.max(Math.max(v, y), b), z = Math.min(Math.min(v, y), b), h = p - z;
2261
+ const x = d[0] / 255, y = d[1] / 255, b = d[2] / 255, p = Math.max(Math.max(x, y), b), z = Math.min(Math.min(x, y), b), h = p - z;
2262
2262
  let A, c;
2263
- return A = h < 1 ? z / (1 - h) : 0, c = h <= 0 ? 0 : p === v ? (y - b) / h % 6 : p === y ? 2 + (b - v) / h : 4 + (v - y) / h, c /= 6, c %= 1, [360 * c, 100 * h, 100 * A];
2263
+ return A = h < 1 ? z / (1 - h) : 0, c = h <= 0 ? 0 : p === x ? (y - b) / h % 6 : p === y ? 2 + (b - x) / h : 4 + (x - y) / h, c /= 6, c %= 1, [360 * c, 100 * h, 100 * A];
2264
2264
  }, w.hsl.hcg = function(d) {
2265
- const v = d[1] / 100, y = d[2] / 100, b = y < 0.5 ? 2 * v * y : 2 * v * (1 - y);
2265
+ const x = d[1] / 100, y = d[2] / 100, b = y < 0.5 ? 2 * x * y : 2 * x * (1 - y);
2266
2266
  let p = 0;
2267
2267
  return b < 1 && (p = (y - 0.5 * b) / (1 - b)), [d[0], 100 * b, 100 * p];
2268
2268
  }, w.hsv.hcg = function(d) {
2269
- const v = d[1] / 100, y = d[2] / 100, b = v * y;
2269
+ const x = d[1] / 100, y = d[2] / 100, b = x * y;
2270
2270
  let p = 0;
2271
2271
  return b < 1 && (p = (y - b) / (1 - b)), [d[0], 100 * b, 100 * p];
2272
2272
  }, w.hcg.rgb = function(d) {
2273
- const v = d[0] / 360, y = d[1] / 100, b = d[2] / 100;
2273
+ const x = d[0] / 360, y = d[1] / 100, b = d[2] / 100;
2274
2274
  if (y === 0) return [255 * b, 255 * b, 255 * b];
2275
- const p = [0, 0, 0], z = v % 1 * 6, h = z % 1, A = 1 - h;
2275
+ const p = [0, 0, 0], z = x % 1 * 6, h = z % 1, A = 1 - h;
2276
2276
  let c = 0;
2277
2277
  switch (Math.floor(z)) {
2278
2278
  case 0:
@@ -2295,18 +2295,18 @@ function qu() {
2295
2295
  }
2296
2296
  return c = (1 - y) * b, [255 * (y * p[0] + c), 255 * (y * p[1] + c), 255 * (y * p[2] + c)];
2297
2297
  }, w.hcg.hsv = function(d) {
2298
- const v = d[1] / 100, y = v + d[2] / 100 * (1 - v);
2298
+ const x = d[1] / 100, y = x + d[2] / 100 * (1 - x);
2299
2299
  let b = 0;
2300
- return y > 0 && (b = v / y), [d[0], 100 * b, 100 * y];
2300
+ return y > 0 && (b = x / y), [d[0], 100 * b, 100 * y];
2301
2301
  }, w.hcg.hsl = function(d) {
2302
- const v = d[1] / 100, y = d[2] / 100 * (1 - v) + 0.5 * v;
2302
+ const x = d[1] / 100, y = d[2] / 100 * (1 - x) + 0.5 * x;
2303
2303
  let b = 0;
2304
- return y > 0 && y < 0.5 ? b = v / (2 * y) : y >= 0.5 && y < 1 && (b = v / (2 * (1 - y))), [d[0], 100 * b, 100 * y];
2304
+ return y > 0 && y < 0.5 ? b = x / (2 * y) : y >= 0.5 && y < 1 && (b = x / (2 * (1 - y))), [d[0], 100 * b, 100 * y];
2305
2305
  }, w.hcg.hwb = function(d) {
2306
- const v = d[1] / 100, y = v + d[2] / 100 * (1 - v);
2307
- return [d[0], 100 * (y - v), 100 * (1 - y)];
2306
+ const x = d[1] / 100, y = x + d[2] / 100 * (1 - x);
2307
+ return [d[0], 100 * (y - x), 100 * (1 - y)];
2308
2308
  }, w.hwb.hcg = function(d) {
2309
- const v = d[1] / 100, y = 1 - d[2] / 100, b = y - v;
2309
+ const x = d[1] / 100, y = 1 - d[2] / 100, b = y - x;
2310
2310
  let p = 0;
2311
2311
  return b < 1 && (p = (y - b) / (1 - b)), [d[0], 100 * b, 100 * p];
2312
2312
  }, w.apple.rgb = function(d) {
@@ -2324,7 +2324,7 @@ function qu() {
2324
2324
  }, w.gray.lab = function(d) {
2325
2325
  return [d[0], 0, 0];
2326
2326
  }, w.gray.hex = function(d) {
2327
- const v = 255 & Math.round(d[0] / 100 * 255), y = ((v << 16) + (v << 8) + v).toString(16).toUpperCase();
2327
+ const x = 255 & Math.round(d[0] / 100 * 255), y = ((x << 16) + (x << 8) + x).toString(16).toUpperCase();
2328
2328
  return "000000".substring(y.length) + y;
2329
2329
  }, w.rgb.gray = function(d) {
2330
2330
  return [(d[0] + d[1] + d[2]) / 3 / 255 * 100];
@@ -2334,9 +2334,9 @@ function qu() {
2334
2334
  Object.keys(D).forEach((S) => {
2335
2335
  w[S] = {}, Object.defineProperty(w[S], "channels", { value: D[S].channels }), Object.defineProperty(w[S], "labels", { value: D[S].labels });
2336
2336
  const d = k(S);
2337
- Object.keys(d).forEach((v) => {
2338
- const y = d[v];
2339
- w[S][v] = (function(b) {
2337
+ Object.keys(d).forEach((x) => {
2338
+ const y = d[x];
2339
+ w[S][x] = (function(b) {
2340
2340
  const p = /* @__PURE__ */ n(function(...z) {
2341
2341
  const h = z[0];
2342
2342
  if (h == null) return h;
@@ -2346,7 +2346,7 @@ function qu() {
2346
2346
  return A;
2347
2347
  }, "t");
2348
2348
  return "conversion" in b && (p.conversion = b.conversion), p;
2349
- })(y), w[S][v].raw = (function(b) {
2349
+ })(y), w[S][x].raw = (function(b) {
2350
2350
  const p = /* @__PURE__ */ n(function(...z) {
2351
2351
  const h = z[0];
2352
2352
  return h == null ? h : (h.length > 1 && (z = h), b(z));
@@ -2358,38 +2358,38 @@ function qu() {
2358
2358
  }, 985(g, T, E) {
2359
2359
  const D = E(165);
2360
2360
  function k(d) {
2361
- const v = (function() {
2361
+ const x = (function() {
2362
2362
  const b = {}, p = Object.keys(D);
2363
2363
  for (let z = p.length, h = 0; h < z; h++) b[p[h]] = { distance: -1, parent: null };
2364
2364
  return b;
2365
2365
  })(), y = [d];
2366
- for (v[d].distance = 0; y.length; ) {
2366
+ for (x[d].distance = 0; y.length; ) {
2367
2367
  const b = y.pop(), p = Object.keys(D[b]);
2368
2368
  for (let z = p.length, h = 0; h < z; h++) {
2369
- const A = p[h], c = v[A];
2370
- c.distance === -1 && (c.distance = v[b].distance + 1, c.parent = b, y.unshift(A));
2369
+ const A = p[h], c = x[A];
2370
+ c.distance === -1 && (c.distance = x[b].distance + 1, c.parent = b, y.unshift(A));
2371
2371
  }
2372
2372
  }
2373
- return v;
2373
+ return x;
2374
2374
  }
2375
2375
  n(k, "r");
2376
- function w(d, v) {
2376
+ function w(d, x) {
2377
2377
  return function(y) {
2378
- return v(d(y));
2378
+ return x(d(y));
2379
2379
  };
2380
2380
  }
2381
2381
  n(w, "o");
2382
- function S(d, v) {
2383
- const y = [v[d].parent, d];
2384
- let b = D[v[d].parent][d], p = v[d].parent;
2385
- for (; v[p].parent; ) y.unshift(v[p].parent), b = w(D[v[p].parent][p], b), p = v[p].parent;
2382
+ function S(d, x) {
2383
+ const y = [x[d].parent, d];
2384
+ let b = D[x[d].parent][d], p = x[d].parent;
2385
+ for (; x[p].parent; ) y.unshift(x[p].parent), b = w(D[x[p].parent][p], b), p = x[p].parent;
2386
2386
  return b.conversion = y, b;
2387
2387
  }
2388
2388
  n(S, "s"), g.exports = function(d) {
2389
- const v = k(d), y = {}, b = Object.keys(v);
2389
+ const x = k(d), y = {}, b = Object.keys(x);
2390
2390
  for (let p = b.length, z = 0; z < p; z++) {
2391
2391
  const h = b[z];
2392
- v[h].parent !== null && (y[h] = S(h, v));
2392
+ x[h].parent !== null && (y[h] = S(h, x));
2393
2393
  }
2394
2394
  return y;
2395
2395
  };
@@ -2398,7 +2398,7 @@ function qu() {
2398
2398
  }, 138(g, T, E) {
2399
2399
  var D = E(877), k = E(403), w = Object.hasOwnProperty, S = /* @__PURE__ */ Object.create(null);
2400
2400
  for (var d in D) w.call(D, d) && (S[D[d]] = d);
2401
- var v = g.exports = { to: {}, get: {} };
2401
+ var x = g.exports = { to: {}, get: {} };
2402
2402
  function y(p, z, h) {
2403
2403
  return Math.min(Math.max(z, p), h);
2404
2404
  }
@@ -2407,20 +2407,20 @@ function qu() {
2407
2407
  var z = Math.round(p).toString(16).toUpperCase();
2408
2408
  return z.length < 2 ? "0" + z : z;
2409
2409
  }
2410
- n(b, "u"), v.get = function(p) {
2410
+ n(b, "u"), x.get = function(p) {
2411
2411
  var z, h;
2412
2412
  switch (p.substring(0, 3).toLowerCase()) {
2413
2413
  case "hsl":
2414
- z = v.get.hsl(p), h = "hsl";
2414
+ z = x.get.hsl(p), h = "hsl";
2415
2415
  break;
2416
2416
  case "hwb":
2417
- z = v.get.hwb(p), h = "hwb";
2417
+ z = x.get.hwb(p), h = "hwb";
2418
2418
  break;
2419
2419
  default:
2420
- z = v.get.rgb(p), h = "rgb";
2420
+ z = x.get.rgb(p), h = "rgb";
2421
2421
  }
2422
2422
  return z ? { model: h, value: z } : null;
2423
- }, v.get.rgb = function(p) {
2423
+ }, x.get.rgb = function(p) {
2424
2424
  if (!p) return null;
2425
2425
  var z, h, A, c = [0, 0, 0, 1];
2426
2426
  if (z = p.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)) {
@@ -2442,7 +2442,7 @@ function qu() {
2442
2442
  }
2443
2443
  for (h = 0; h < 3; h++) c[h] = y(c[h], 0, 255);
2444
2444
  return c[3] = y(c[3], 0, 1), c;
2445
- }, v.get.hsl = function(p) {
2445
+ }, x.get.hsl = function(p) {
2446
2446
  if (!p) return null;
2447
2447
  var z = p.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
2448
2448
  if (z) {
@@ -2450,7 +2450,7 @@ function qu() {
2450
2450
  return [(parseFloat(z[1]) % 360 + 360) % 360, y(parseFloat(z[2]), 0, 100), y(parseFloat(z[3]), 0, 100), y(isNaN(h) ? 1 : h, 0, 1)];
2451
2451
  }
2452
2452
  return null;
2453
- }, v.get.hwb = function(p) {
2453
+ }, x.get.hwb = function(p) {
2454
2454
  if (!p) return null;
2455
2455
  var z = p.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
2456
2456
  if (z) {
@@ -2458,34 +2458,34 @@ function qu() {
2458
2458
  return [(parseFloat(z[1]) % 360 + 360) % 360, y(parseFloat(z[2]), 0, 100), y(parseFloat(z[3]), 0, 100), y(isNaN(h) ? 1 : h, 0, 1)];
2459
2459
  }
2460
2460
  return null;
2461
- }, v.to.hex = function() {
2461
+ }, x.to.hex = function() {
2462
2462
  var p = k(arguments);
2463
2463
  return "#" + b(p[0]) + b(p[1]) + b(p[2]) + (p[3] < 1 ? b(Math.round(255 * p[3])) : "");
2464
- }, v.to.rgb = function() {
2464
+ }, x.to.rgb = function() {
2465
2465
  var p = k(arguments);
2466
2466
  return p.length < 4 || p[3] === 1 ? "rgb(" + Math.round(p[0]) + ", " + Math.round(p[1]) + ", " + Math.round(p[2]) + ")" : "rgba(" + Math.round(p[0]) + ", " + Math.round(p[1]) + ", " + Math.round(p[2]) + ", " + p[3] + ")";
2467
- }, v.to.rgb.percent = function() {
2467
+ }, x.to.rgb.percent = function() {
2468
2468
  var p = k(arguments), z = Math.round(p[0] / 255 * 100), h = Math.round(p[1] / 255 * 100), A = Math.round(p[2] / 255 * 100);
2469
2469
  return p.length < 4 || p[3] === 1 ? "rgb(" + z + "%, " + h + "%, " + A + "%)" : "rgba(" + z + "%, " + h + "%, " + A + "%, " + p[3] + ")";
2470
- }, v.to.hsl = function() {
2470
+ }, x.to.hsl = function() {
2471
2471
  var p = k(arguments);
2472
2472
  return p.length < 4 || p[3] === 1 ? "hsl(" + p[0] + ", " + p[1] + "%, " + p[2] + "%)" : "hsla(" + p[0] + ", " + p[1] + "%, " + p[2] + "%, " + p[3] + ")";
2473
- }, v.to.hwb = function() {
2473
+ }, x.to.hwb = function() {
2474
2474
  var p = k(arguments), z = "";
2475
2475
  return p.length >= 4 && p[3] !== 1 && (z = ", " + p[3]), "hwb(" + p[0] + ", " + p[1] + "%, " + p[2] + "%" + z + ")";
2476
- }, v.to.keyword = function(p) {
2476
+ }, x.to.keyword = function(p) {
2477
2477
  return S[p.slice(0, 3)];
2478
2478
  };
2479
2479
  }, 742(g, T, E) {
2480
2480
  const D = E(138), k = E(880), w = ["keyword", "gray", "hex"], S = {};
2481
2481
  for (const h of Object.keys(k)) S[[...k[h].labels].sort().join("")] = h;
2482
2482
  const d = {};
2483
- function v(h, A) {
2484
- if (!(this instanceof v)) return new v(h, A);
2483
+ function x(h, A) {
2484
+ if (!(this instanceof x)) return new x(h, A);
2485
2485
  if (A && A in w && (A = null), A && !(A in k)) throw new Error("Unknown model: " + A);
2486
2486
  let c, _;
2487
2487
  if (h == null) this.model = "rgb", this.color = [0, 0, 0], this.valpha = 1;
2488
- else if (h instanceof v) this.model = h.model, this.color = [...h.color], this.valpha = h.valpha;
2488
+ else if (h instanceof x) this.model = h.model, this.color = [...h.color], this.valpha = h.valpha;
2489
2489
  else if (typeof h == "string") {
2490
2490
  const j = D.get(h);
2491
2491
  if (j === null) throw new Error("Unable to parse color from string: " + h);
@@ -2512,7 +2512,7 @@ function qu() {
2512
2512
  }
2513
2513
  this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
2514
2514
  }
2515
- n(v, "c"), v.prototype = { toString() {
2515
+ n(x, "c"), x.prototype = { toString() {
2516
2516
  return this.string();
2517
2517
  }, toJSON() {
2518
2518
  return this[this.model]();
@@ -2537,15 +2537,15 @@ function qu() {
2537
2537
  const h = this.rgb().object();
2538
2538
  return h.r /= 255, h.g /= 255, h.b /= 255, this.valpha !== 1 && (h.alpha = this.valpha), h;
2539
2539
  }, round(h) {
2540
- return h = Math.max(h || 0, 0), new v([...this.color.map(y(h)), this.valpha], this.model);
2540
+ return h = Math.max(h || 0, 0), new x([...this.color.map(y(h)), this.valpha], this.model);
2541
2541
  }, alpha(h) {
2542
- return h !== void 0 ? new v([...this.color, Math.max(0, Math.min(1, h))], this.model) : this.valpha;
2542
+ return h !== void 0 ? new x([...this.color, Math.max(0, Math.min(1, h))], this.model) : this.valpha;
2543
2543
  }, red: b("rgb", 0, p(255)), green: b("rgb", 1, p(255)), blue: b("rgb", 2, p(255)), hue: b(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (h) => (h % 360 + 360) % 360), saturationl: b("hsl", 1, p(100)), lightness: b("hsl", 2, p(100)), saturationv: b("hsv", 1, p(100)), value: b("hsv", 2, p(100)), chroma: b("hcg", 1, p(100)), gray: b("hcg", 2, p(100)), white: b("hwb", 1, p(100)), wblack: b("hwb", 2, p(100)), cyan: b("cmyk", 0, p(100)), magenta: b("cmyk", 1, p(100)), yellow: b("cmyk", 2, p(100)), black: b("cmyk", 3, p(100)), x: b("xyz", 0, p(95.047)), y: b("xyz", 1, p(100)), z: b("xyz", 2, p(108.833)), l: b("lab", 0, p(100)), a: b("lab", 1), b: b("lab", 2), keyword(h) {
2544
- return h !== void 0 ? new v(h) : k[this.model].keyword(this.color);
2544
+ return h !== void 0 ? new x(h) : k[this.model].keyword(this.color);
2545
2545
  }, hex(h) {
2546
- return h !== void 0 ? new v(h) : D.to.hex(this.rgb().round().color);
2546
+ return h !== void 0 ? new x(h) : D.to.hex(this.rgb().round().color);
2547
2547
  }, hexa(h) {
2548
- if (h !== void 0) return new v(h);
2548
+ if (h !== void 0) return new x(h);
2549
2549
  const A = this.rgb().round().color;
2550
2550
  let c = Math.round(255 * this.valpha).toString(16).toUpperCase();
2551
2551
  return c.length === 1 && (c = "0" + c), D.to.hex(A) + c;
@@ -2594,7 +2594,7 @@ function qu() {
2594
2594
  return A.color[2] += A.color[2] * h, A;
2595
2595
  }, grayscale() {
2596
2596
  const h = this.rgb().color, A = 0.3 * h[0] + 0.59 * h[1] + 0.11 * h[2];
2597
- return v.rgb(A, A, A);
2597
+ return x.rgb(A, A, A);
2598
2598
  }, fade(h) {
2599
2599
  return this.alpha(this.valpha - this.valpha * h);
2600
2600
  }, opaquer(h) {
@@ -2606,17 +2606,17 @@ function qu() {
2606
2606
  }, mix(h, A) {
2607
2607
  if (!h || !h.rgb) throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof h);
2608
2608
  const c = h.rgb(), _ = this.rgb(), j = A === void 0 ? 0.5 : A, N = 2 * j - 1, B = c.alpha() - _.alpha(), J = ((N * B === -1 ? N : (N + B) / (1 + N * B)) + 1) / 2, q = 1 - J;
2609
- return v.rgb(J * c.red() + q * _.red(), J * c.green() + q * _.green(), J * c.blue() + q * _.blue(), c.alpha() * j + _.alpha() * (1 - j));
2609
+ return x.rgb(J * c.red() + q * _.red(), J * c.green() + q * _.green(), J * c.blue() + q * _.blue(), c.alpha() * j + _.alpha() * (1 - j));
2610
2610
  } };
2611
2611
  for (const h of Object.keys(k)) {
2612
2612
  if (w.includes(h)) continue;
2613
2613
  const { channels: A } = k[h];
2614
- v.prototype[h] = function(...c) {
2615
- return this.model === h ? new v(this) : c.length > 0 ? new v(c, h) : new v([...(_ = k[this.model][h].raw(this.color), Array.isArray(_) ? _ : [_]), this.valpha], h);
2614
+ x.prototype[h] = function(...c) {
2615
+ return this.model === h ? new x(this) : c.length > 0 ? new x(c, h) : new x([...(_ = k[this.model][h].raw(this.color), Array.isArray(_) ? _ : [_]), this.valpha], h);
2616
2616
  var _;
2617
- }, v[h] = function(...c) {
2617
+ }, x[h] = function(...c) {
2618
2618
  let _ = c[0];
2619
- return typeof _ == "number" && (_ = z(c, A)), new v(_, h);
2619
+ return typeof _ == "number" && (_ = z(c, A)), new x(_, h);
2620
2620
  };
2621
2621
  }
2622
2622
  function y(h) {
@@ -2646,7 +2646,7 @@ function qu() {
2646
2646
  for (let c = 0; c < A; c++) typeof h[c] != "number" && (h[c] = 0);
2647
2647
  return h;
2648
2648
  }
2649
- n(z, "d"), g.exports = v;
2649
+ n(z, "d"), g.exports = x;
2650
2650
  }, 784(g) {
2651
2651
  var T, E = typeof Reflect == "object" ? Reflect : null, D = E && typeof E.apply == "function" ? E.apply : function(_, j, N) {
2652
2652
  return Function.prototype.apply.call(_, j, N);
@@ -2681,14 +2681,14 @@ function qu() {
2681
2681
  if (typeof _ != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof _);
2682
2682
  }
2683
2683
  n(d, "i");
2684
- function v(_) {
2684
+ function x(_) {
2685
2685
  return _._maxListeners === void 0 ? w.defaultMaxListeners : _._maxListeners;
2686
2686
  }
2687
- n(v, "c");
2687
+ n(x, "c");
2688
2688
  function y(_, j, N, B) {
2689
2689
  var J, q, Z, K;
2690
2690
  if (d(N), (q = _._events) === void 0 ? (q = _._events = /* @__PURE__ */ Object.create(null), _._eventsCount = 0) : (q.newListener !== void 0 && (_.emit("newListener", j, N.listener ? N.listener : N), q = _._events), Z = q[j]), Z === void 0) Z = q[j] = N, ++_._eventsCount;
2691
- else if (typeof Z == "function" ? Z = q[j] = B ? [N, Z] : [Z, N] : B ? Z.unshift(N) : Z.push(N), (J = v(_)) > 0 && Z.length > J && !Z.warned) {
2691
+ else if (typeof Z == "function" ? Z = q[j] = B ? [N, Z] : [Z, N] : B ? Z.unshift(N) : Z.push(N), (J = x(_)) > 0 && Z.length > J && !Z.warned) {
2692
2692
  Z.warned = !0;
2693
2693
  var U = new Error("Possible EventEmitter memory leak detected. " + Z.length + " " + String(j) + " listeners added. Use emitter.setMaxListeners() to increase limit");
2694
2694
  U.name = "MaxListenersExceededWarning", U.emitter = _, U.type = j, U.count = Z.length, K = U, console && console.warn && console.warn(K);
@@ -2750,7 +2750,7 @@ function qu() {
2750
2750
  if (typeof _ != "number" || _ < 0 || k(_)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + _ + ".");
2751
2751
  return this._maxListeners = _, this;
2752
2752
  }, w.prototype.getMaxListeners = function() {
2753
- return v(this);
2753
+ return x(this);
2754
2754
  }, w.prototype.emit = function(_) {
2755
2755
  for (var j = [], N = 1; N < arguments.length; N++) j.push(arguments[N]);
2756
2756
  var B = _ === "error", J = this._events;
@@ -2822,11 +2822,11 @@ function qu() {
2822
2822
  };
2823
2823
  }, 403(g, T, E) {
2824
2824
  var D = E(94), k = Array.prototype.concat, w = Array.prototype.slice, S = g.exports = function(d) {
2825
- for (var v = [], y = 0, b = d.length; y < b; y++) {
2825
+ for (var x = [], y = 0, b = d.length; y < b; y++) {
2826
2826
  var p = d[y];
2827
- D(p) ? v = k.call(v, w.call(p)) : v.push(p);
2827
+ D(p) ? x = k.call(x, w.call(p)) : x.push(p);
2828
2828
  }
2829
- return v;
2829
+ return x;
2830
2830
  };
2831
2831
  S.wrap = function(d) {
2832
2832
  return function() {
@@ -2850,7 +2850,7 @@ function qu() {
2850
2850
  }, s.o = (g, T) => Object.prototype.hasOwnProperty.call(g, T), s.r = (g) => {
2851
2851
  typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(g, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(g, "__esModule", { value: !0 });
2852
2852
  };
2853
- var x = {};
2853
+ var v = {};
2854
2854
  return (() => {
2855
2855
  function g(o) {
2856
2856
  return g = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
@@ -2916,12 +2916,12 @@ function qu() {
2916
2916
  return r && S(o.prototype, r), i && S(o, i), Object.defineProperty(o, "prototype", { writable: !1 }), o;
2917
2917
  }
2918
2918
  n(d, "l");
2919
- function v(o) {
2920
- return v = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
2919
+ function x(o) {
2920
+ return x = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
2921
2921
  return r.__proto__ || Object.getPrototypeOf(r);
2922
- }, v(o);
2922
+ }, x(o);
2923
2923
  }
2924
- n(v, "u");
2924
+ n(x, "u");
2925
2925
  function y() {
2926
2926
  try {
2927
2927
  var o = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
@@ -2943,7 +2943,7 @@ function qu() {
2943
2943
  }
2944
2944
  n(b, "d");
2945
2945
  function p(o, r, i) {
2946
- return r = v(r), b(o, y() ? Reflect.construct(r, i || [], v(o).constructor) : r.apply(o, i));
2946
+ return r = x(r), b(o, y() ? Reflect.construct(r, i || [], x(o).constructor) : r.apply(o, i));
2947
2947
  }
2948
2948
  n(p, "p");
2949
2949
  function z(o, r) {
@@ -2956,7 +2956,7 @@ function qu() {
2956
2956
  if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
2957
2957
  o.prototype = Object.create(r && r.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), Object.defineProperty(o, "prototype", { writable: !1 }), r && z(o, r);
2958
2958
  }
2959
- n(h, "f"), s.r(x), s.d(x, { default: /* @__PURE__ */ n(() => cc, "default") });
2959
+ n(h, "f"), s.r(v), s.d(v, { default: /* @__PURE__ */ n(() => cc, "default") });
2960
2960
  var A = s(119), c = s.n(A);
2961
2961
  function _() {
2962
2962
  var o = this.constructor.getDerivedStateFromProps(this.props, this.state);
@@ -4401,7 +4401,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
4401
4401
  })(o.theme) || (console.error("react-json-view error:", "theme prop must be a theme name or valid base-16 theme object.", 'defaulting to "rjv-default" theme'), r.theme = "rjv-default"), ne(o.src) !== "object" && ne(o.src) !== "array" && (console.error("react-json-view error:", "src property must be a valid json object"), r.name = "ERROR", r.src = { message: "src property must be a valid json object" }), k(k({}, o), r);
4402
4402
  }, B(vr);
4403
4403
  const cc = vr;
4404
- })(), x;
4404
+ })(), v;
4405
4405
  })());
4406
4406
  })(Cr)), Cr.exports;
4407
4407
  }
@@ -4431,7 +4431,7 @@ function gi(e) {
4431
4431
  }
4432
4432
  n(gi, "a11yProps");
4433
4433
  const Ku = /* @__PURE__ */ n(({ open: e, onClose: a }) => {
4434
- const l = de((y) => y.session), u = de((y) => y.setSession), [m, s] = Q(0), [x, g] = Q(null), [T, E] = Q(1);
4434
+ const l = de((y) => y.session), u = de((y) => y.setSession), [m, s] = Q(0), [v, g] = Q(null), [T, E] = Q(1);
4435
4435
  le(() => {
4436
4436
  e && g(null);
4437
4437
  }, [e]);
@@ -4440,7 +4440,7 @@ const Ku = /* @__PURE__ */ n(({ open: e, onClose: a }) => {
4440
4440
  }, "handleTabChange"), k = /* @__PURE__ */ n((y) => {
4441
4441
  g(y.updated_src);
4442
4442
  }, "handleJsonEdit"), w = /* @__PURE__ */ n(() => {
4443
- x && u({ ...x, interactions: [...x.interactions ?? []] }), g(null), a();
4443
+ v && u({ ...v, interactions: [...v.interactions ?? []] }), g(null), a();
4444
4444
  }, "handleClose"), S = /* @__PURE__ */ n((y) => y ? y.map((b, p) => {
4445
4445
  const z = b.interactionQuestion || "No question available", h = b.parts.filter((A) => A.text).map((A) => A.text).join(`
4446
4446
 
@@ -4453,7 +4453,7 @@ ${h || "No response available"}
4453
4453
 
4454
4454
  `;
4455
4455
  }).join(`
4456
- `) : "", "formatInteractionsAsText"), d = x || l;
4456
+ `) : "", "formatInteractionsAsText"), d = v || l;
4457
4457
  if (!d)
4458
4458
  return /* @__PURE__ */ I(Po, { open: e, onClose: w, maxWidth: "lg", fullWidth: !0, children: [
4459
4459
  /* @__PURE__ */ I(Fo, { children: [
@@ -4476,10 +4476,10 @@ ${h || "No response available"}
4476
4476
  /* @__PURE__ */ t(jo, { children: /* @__PURE__ */ t(se, { sx: { p: 2, color: "text.secondary" }, children: "No session data available. Please start a conversation first." }) }),
4477
4477
  /* @__PURE__ */ t(Lo, { children: /* @__PURE__ */ t(Wn, { onClick: w, children: "Close" }) })
4478
4478
  ] });
4479
- function v(y, b, p) {
4479
+ function x(y, b, p) {
4480
4480
  E(b);
4481
4481
  }
4482
- return n(v, "handleSliderChange"), /* @__PURE__ */ I(
4482
+ return n(x, "handleSliderChange"), /* @__PURE__ */ I(
4483
4483
  Po,
4484
4484
  {
4485
4485
  open: e,
@@ -4496,7 +4496,7 @@ ${h || "No response available"}
4496
4496
  children: [
4497
4497
  /* @__PURE__ */ I(Fo, { sx: { color: "#ffffff", borderBottom: "1px solid rgba(255, 255, 255, 0.1)" }, children: [
4498
4498
  "Session Data Viewer",
4499
- x && /* @__PURE__ */ t(Ee, { component: "span", variant: "caption", sx: { ml: 2, color: "warning.main" }, children: "(locally edited)" }),
4499
+ v && /* @__PURE__ */ t(Ee, { component: "span", variant: "caption", sx: { ml: 2, color: "warning.main" }, children: "(locally edited)" }),
4500
4500
  /* @__PURE__ */ t(
4501
4501
  Wt,
4502
4502
  {
@@ -4585,7 +4585,7 @@ ${h || "No response available"}
4585
4585
  bc,
4586
4586
  {
4587
4587
  value: T,
4588
- onChange: v,
4588
+ onChange: x,
4589
4589
  min: 0,
4590
4590
  max: 7,
4591
4591
  step: 1,
@@ -4610,7 +4610,7 @@ ${h || "No response available"}
4610
4610
  ]
4611
4611
  }
4612
4612
  ) }),
4613
- x && /* @__PURE__ */ t(
4613
+ v && /* @__PURE__ */ t(
4614
4614
  Wn,
4615
4615
  {
4616
4616
  size: "medium",
@@ -4626,9 +4626,9 @@ ${h || "No response available"}
4626
4626
  }
4627
4627
  );
4628
4628
  }, "SessionDataDialog"), wo = 12, da = /* @__PURE__ */ n(({ onPromptSelected: e }) => {
4629
- const { storageService: a } = Ze(), { promptState: l } = Li(a), [u, m] = Q(null), [s, x] = Q([]), g = pe(null);
4629
+ const { storageService: a } = Ze(), { promptState: l } = Li(a), [u, m] = Q(null), [s, v] = Q([]), g = pe(null);
4630
4630
  le(() => {
4631
- x(a.getPrompts());
4631
+ v(a.getPrompts());
4632
4632
  }, [l, a]);
4633
4633
  const T = ye((d) => {
4634
4634
  m(d.currentTarget);
@@ -4638,7 +4638,7 @@ ${h || "No response available"}
4638
4638
  },
4639
4639
  [e]
4640
4640
  ), k = ye(() => {
4641
- a.clearAllPrompts(), x([]);
4641
+ a.clearAllPrompts(), v([]);
4642
4642
  }, [a]), w = Ce(() => s.slice(0, wo), [s]);
4643
4643
  if (s.length === 0) return null;
4644
4644
  const S = !!u;
@@ -4738,8 +4738,8 @@ ${h || "No response available"}
4738
4738
  overflowY: "auto",
4739
4739
  py: 0.5
4740
4740
  },
4741
- children: w.map((d, v) => {
4742
- const y = s.length - v;
4741
+ children: w.map((d, x) => {
4742
+ const y = s.length - x;
4743
4743
  return /* @__PURE__ */ I(
4744
4744
  R,
4745
4745
  {
@@ -4796,7 +4796,7 @@ ${h || "No response available"}
4796
4796
  )
4797
4797
  ]
4798
4798
  },
4799
- d.id ?? `${v}-${d.created}`
4799
+ d.id ?? `${x}-${d.created}`
4800
4800
  );
4801
4801
  })
4802
4802
  }
@@ -4831,14 +4831,14 @@ function ws({
4831
4831
  forceTooltipText: a
4832
4832
  }) {
4833
4833
  const l = bt(), [u, m] = Q(null);
4834
- return /* @__PURE__ */ t(re, { children: e.map((s, x) => /* @__PURE__ */ t(
4834
+ return /* @__PURE__ */ t(re, { children: e.map((s, v) => /* @__PURE__ */ t(
4835
4835
  He,
4836
4836
  {
4837
4837
  arrow: !0,
4838
4838
  placement: "top",
4839
- open: a === s.text || u === x,
4840
- onOpen: /* @__PURE__ */ n(() => m(x), "onOpen"),
4841
- onClose: /* @__PURE__ */ n(() => m((g) => g === x ? null : g), "onClose"),
4839
+ open: a === s.text || u === v,
4840
+ onOpen: /* @__PURE__ */ n(() => m(v), "onOpen"),
4841
+ onClose: /* @__PURE__ */ n(() => m((g) => g === v ? null : g), "onClose"),
4842
4842
  slotProps: { tooltip: { sx: { top: 10, backgroundColor: Ge(l.palette.background.paper, 0.8) } } },
4843
4843
  title: /* @__PURE__ */ I(ee, { sx: { fontSize: 12, whiteSpace: "nowrap", color: l.palette.text.secondary }, children: [
4844
4844
  s.text,
@@ -4856,7 +4856,7 @@ function ws({
4856
4856
  borderBottom: `3px solid ${Ge(l.palette.text.secondary, 0.5)}`
4857
4857
  } })
4858
4858
  },
4859
- `${x}-${s.text}`
4859
+ `${v}-${s.text}`
4860
4860
  )) });
4861
4861
  }
4862
4862
  n(ws, "PromptDateMarkers");
@@ -4867,7 +4867,7 @@ const bi = 70, yi = 300, ua = In(({
4867
4867
  showLastPrompts: u = !0,
4868
4868
  placeholder: m,
4869
4869
  inputPrefix: s,
4870
- topSlot: x,
4870
+ topSlot: v,
4871
4871
  borderRadius: g = bi,
4872
4872
  topSlotCollapsible: T = !1,
4873
4873
  topSlotExpanded: E = !0,
@@ -4876,7 +4876,7 @@ const bi = 70, yi = 300, ua = In(({
4876
4876
  inputMinHeight: w,
4877
4877
  onBeforeSend: S,
4878
4878
  onSubmit: d,
4879
- sendButtonProps: v,
4879
+ sendButtonProps: x,
4880
4880
  allowEmptyDraft: y = !0,
4881
4881
  submitAdornment: b,
4882
4882
  onSlashQuery: p,
@@ -5306,9 +5306,9 @@ const bi = 70, yi = 300, ua = In(({
5306
5306
  }
5307
5307
  C.key === "Enter" && !C.shiftKey && (C.preventDefault(), vn());
5308
5308
  }
5309
- }, "handleKeyDown"), to = !d && Xt === ke.Idle, no = !!d || Xt === ke.Connected, on = !d && Xt !== ke.Connected, mr = !no || Qt && !qt || Be || !y && !ue.trim() && rt.length === 0, ro = x && E ? "" : m ?? "Pergunte sobre seus dados…", oo = /* @__PURE__ */ n(() => {
5309
+ }, "handleKeyDown"), to = !d && Xt === ke.Idle, no = !!d || Xt === ke.Connected, on = !d && Xt !== ke.Connected, mr = !no || Qt && !qt || Be || !y && !ue.trim() && rt.length === 0, ro = v && E ? "" : m ?? "Pergunte sobre seus dados…", oo = /* @__PURE__ */ n(() => {
5310
5310
  k == null || k(!E);
5311
- }, "handleToggleTopSlot"), gr = x ? 2 : g ?? 999;
5311
+ }, "handleToggleTopSlot"), gr = v ? 2 : g ?? 999;
5312
5312
  return /* @__PURE__ */ I(
5313
5313
  R,
5314
5314
  {
@@ -5416,8 +5416,8 @@ const bi = 70, yi = 300, ua = In(({
5416
5416
  children: "Solte a imagem para anexar"
5417
5417
  }
5418
5418
  ),
5419
- x && /* @__PURE__ */ I(R, { sx: { position: "relative" }, children: [
5420
- x,
5419
+ v && /* @__PURE__ */ I(R, { sx: { position: "relative" }, children: [
5420
+ v,
5421
5421
  T && k && /* @__PURE__ */ t(
5422
5422
  He,
5423
5423
  {
@@ -5455,7 +5455,7 @@ const bi = 70, yi = 300, ua = In(({
5455
5455
  }
5456
5456
  )
5457
5457
  ] }),
5458
- x && /* @__PURE__ */ t(
5458
+ v && /* @__PURE__ */ t(
5459
5459
  R,
5460
5460
  {
5461
5461
  "aria-hidden": !0,
@@ -5802,7 +5802,7 @@ const bi = 70, yi = 300, ua = In(({
5802
5802
  Je,
5803
5803
  {
5804
5804
  size: "small",
5805
- ...v,
5805
+ ...x,
5806
5806
  onClick: /* @__PURE__ */ n(() => {
5807
5807
  vn(ue.trim() ? void 0 : "Continue");
5808
5808
  }, "onClick"),
@@ -5825,7 +5825,7 @@ const bi = 70, yi = 300, ua = In(({
5825
5825
  Je,
5826
5826
  {
5827
5827
  size: "small",
5828
- ...v,
5828
+ ...x,
5829
5829
  onClick: /* @__PURE__ */ n(() => void vn(), "onClick"),
5830
5830
  disabled: mr,
5831
5831
  sx: /* @__PURE__ */ n((C) => ({
@@ -6423,8 +6423,8 @@ typeof window < "u" && Promise.all([
6423
6423
  import("react-syntax-highlighter/dist/esm/languages/prism/css"),
6424
6424
  import("react-syntax-highlighter/dist/esm/languages/prism/csharp"),
6425
6425
  import("react-syntax-highlighter/dist/esm/languages/prism/yaml")
6426
- ]).then(([e, a, l, u, m, s, x, g, T, E, D, k, w]) => {
6427
- mt = e.default, ks = a.default, mt.registerLanguage("python", m.default), mt.registerLanguage("markdown", l.default), mt.registerLanguage("javascript", s.default), mt.registerLanguage("typescript", x.default), mt.registerLanguage("sql", g.default), mt.registerLanguage("json", T.default), mt.registerLanguage("bash", E.default), mt.registerLanguage("shell", E.default), mt.registerLanguage("html", u.default), mt.registerLanguage("xml", u.default), mt.registerLanguage("css", D.default), mt.registerLanguage("csharp", k.default), mt.registerLanguage("yaml", w.default);
6426
+ ]).then(([e, a, l, u, m, s, v, g, T, E, D, k, w]) => {
6427
+ mt = e.default, ks = a.default, mt.registerLanguage("python", m.default), mt.registerLanguage("markdown", l.default), mt.registerLanguage("javascript", s.default), mt.registerLanguage("typescript", v.default), mt.registerLanguage("sql", g.default), mt.registerLanguage("json", T.default), mt.registerLanguage("bash", E.default), mt.registerLanguage("shell", E.default), mt.registerLanguage("html", u.default), mt.registerLanguage("xml", u.default), mt.registerLanguage("css", D.default), mt.registerLanguage("csharp", k.default), mt.registerLanguage("yaml", w.default);
6428
6428
  }).catch((e) => console.error("Failed to load syntax highlighter:", e));
6429
6429
  const Gu = `${na()}/open/getImage`, Ju = Zo({}), Yu = /* @__PURE__ */ n(() => un(Ju), "useMarkdownExtendedDefaults"), Qu = /* @__PURE__ */ n(({ iconCode: e }) => /* @__PURE__ */ t("span", { style: {
6430
6430
  display: "inline-flex",
@@ -6458,9 +6458,9 @@ const Gu = `${na()}/open/getImage`, Ju = Zo({}), Yu = /* @__PURE__ */ n(() => un
6458
6458
  ":",
6459
6459
  e,
6460
6460
  ":"
6461
- ] }) }), "InlineIcon"), Xu = /* @__PURE__ */ n(({ children: e }) => /* @__PURE__ */ t("p", { style: { margin: "0 0 8px 0" }, children: e }), "MarkdownParagraph"), Pt = /* @__PURE__ */ n(({ text: e, sessionId: a, preStyle: l, onLinkClicked: u, partial: m, mode: s = "full", variant: x }) => {
6461
+ ] }) }), "InlineIcon"), Xu = /* @__PURE__ */ n(({ children: e }) => /* @__PURE__ */ t("p", { style: { margin: "0 0 8px 0" }, children: e }), "MarkdownParagraph"), Pt = /* @__PURE__ */ n(({ text: e, sessionId: a, preStyle: l, onLinkClicked: u, partial: m, mode: s = "full", variant: v }) => {
6462
6462
  const g = Yu();
6463
- x ?? g.variant;
6463
+ v ?? g.variant;
6464
6464
  const T = wt();
6465
6465
  let E = e;
6466
6466
  const { eventBusService: D } = Ze(), k = {
@@ -6520,7 +6520,7 @@ const Gu = `${na()}/open/getImage`, Ju = Zo({}), Yu = /* @__PURE__ */ n(() => un
6520
6520
  backgroundColor: "rgba(0, 0, 0, 0.3)",
6521
6521
  color: T.palette.text.primary,
6522
6522
  fontFamily: "monospace"
6523
- }, children: String(b) }) : v(b, z) : /* @__PURE__ */ t("code", { style: {
6523
+ }, children: String(b) }) : x(b, z) : /* @__PURE__ */ t("code", { style: {
6524
6524
  backgroundColor: T.palette.background.default,
6525
6525
  color: T.palette.text.primary,
6526
6526
  borderColor: T.palette.border.default,
@@ -6588,7 +6588,7 @@ const Gu = `${na()}/open/getImage`, Ju = Zo({}), Yu = /* @__PURE__ */ n(() => un
6588
6588
  em: /* @__PURE__ */ n(({ children: y }) => /* @__PURE__ */ t("em", { style: { fontStyle: "italic" }, children: y }), "em")
6589
6589
  } : k;
6590
6590
  e = s === "compact" ? e.substring(0, 400) : e;
6591
- const v = /* @__PURE__ */ n((y, b) => mt ? /* @__PURE__ */ t(
6591
+ const x = /* @__PURE__ */ n((y, b) => mt ? /* @__PURE__ */ t(
6592
6592
  mt,
6593
6593
  {
6594
6594
  style: ks || {},
@@ -6621,12 +6621,12 @@ const Gu = `${na()}/open/getImage`, Ju = Zo({}), Yu = /* @__PURE__ */ n(() => un
6621
6621
  onClose: u,
6622
6622
  anchor: m = "right",
6623
6623
  width: s = "40vw",
6624
- title: x,
6624
+ title: v,
6625
6625
  onVisibleQuestionChange: g,
6626
6626
  ...T
6627
6627
  } = e, [E, D] = Q(null), k = ye((S) => {
6628
6628
  D(S), g == null || g(S);
6629
- }, [g]), w = E || x || "Chat";
6629
+ }, [g]), w = E || v || "Chat";
6630
6630
  return /* @__PURE__ */ I(
6631
6631
  yc,
6632
6632
  {
@@ -6678,19 +6678,19 @@ const Zu = vc`
6678
6678
  fabContent: u,
6679
6679
  width: m = "50vw",
6680
6680
  height: s = "75vh",
6681
- title: x,
6681
+ title: v,
6682
6682
  borderRadius: g = 3,
6683
6683
  elevation: T = 8,
6684
6684
  onVisibleQuestionChange: E,
6685
6685
  ...D
6686
- } = e, [k, w] = Q(!1), [S, d] = Q(null), v = ye((N) => {
6686
+ } = e, [k, w] = Q(!1), [S, d] = Q(null), x = ye((N) => {
6687
6687
  let B = N;
6688
6688
  if (e.onRenderPrompt && N) {
6689
6689
  const { promptAsString: J, json: q } = e.onRenderPrompt(N);
6690
6690
  B = J ?? null;
6691
6691
  }
6692
6692
  d(B ?? ""), E == null || E(N);
6693
- }, [E]), y = S || x || "Chat", b = l.bottom ? l.bottom + (((A = e.chatPositionOffSet) == null ? void 0 : A.bottom) ?? 0) : void 0, p = l.right ? (l.right ?? 0) + (((c = e.chatPositionOffSet) == null ? void 0 : c.right) ?? 0) : void 0, z = l.left ? l.left + (((_ = e.chatPositionOffSet) == null ? void 0 : _.left) ?? 0) : void 0, h = l.top != null ? l.top + 20 + (((j = e.chatPositionOffSet) == null ? void 0 : j.top) ?? 0) : void 0;
6693
+ }, [E]), y = S || v || "Chat", b = l.bottom ? l.bottom + (((A = e.chatPositionOffSet) == null ? void 0 : A.bottom) ?? 0) : void 0, p = l.right ? (l.right ?? 0) + (((c = e.chatPositionOffSet) == null ? void 0 : c.right) ?? 0) : void 0, z = l.left ? l.left + (((_ = e.chatPositionOffSet) == null ? void 0 : _.left) ?? 0) : void 0, h = l.top != null ? l.top + 20 + (((j = e.chatPositionOffSet) == null ? void 0 : j.top) ?? 0) : void 0;
6694
6694
  return /* @__PURE__ */ I(re, { children: [
6695
6695
  /* @__PURE__ */ t(xc, { direction: "up", in: k, children: /* @__PURE__ */ I(
6696
6696
  ea,
@@ -6740,7 +6740,7 @@ const Zu = vc`
6740
6740
  ...D,
6741
6741
  borderRadius: 0,
6742
6742
  elevation: 0,
6743
- onVisibleQuestionChange: v
6743
+ onVisibleQuestionChange: x
6744
6744
  }
6745
6745
  ) })
6746
6746
  ]
@@ -6815,11 +6815,11 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
6815
6815
  if (Es(e.name)) return ep;
6816
6816
  }
6817
6817
  }, "askUserComponentOf"), As = /* @__PURE__ */ n(({ part: e, message: a, preview: l, onGoing: u, friendlyMode: m, onLinkClicked: s }) => {
6818
- const x = ot.getPartTextContent(e), g = e.author === Lc ? { backgroundColor: "var(--background-paper)", padding: "20px 10px", borderRadius: "5px" } : { margin: "5px 0px", display: "unset" };
6818
+ const v = ot.getPartTextContent(e), g = e.author === Lc ? { backgroundColor: "var(--background-paper)", padding: "20px 10px", borderRadius: "5px" } : { margin: "5px 0px", display: "unset" };
6819
6819
  return /* @__PURE__ */ t("div", { style: g, children: /* @__PURE__ */ t(
6820
6820
  Gs,
6821
6821
  {
6822
- content: x ?? "",
6822
+ content: v ?? "",
6823
6823
  partial: l,
6824
6824
  sessionId: a.sessionId ?? "ND",
6825
6825
  onLinkClicked: s,
@@ -6835,7 +6835,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
6835
6835
  preview: u,
6836
6836
  isLastInlineInGroup: m = !1,
6837
6837
  friendlyMode: s = !1,
6838
- onLinkClicked: x
6838
+ onLinkClicked: v
6839
6839
  }) => {
6840
6840
  var y;
6841
6841
  const [g, T] = Q(() => !l || !m), E = pe(null);
@@ -6847,7 +6847,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
6847
6847
  behavior: "smooth"
6848
6848
  });
6849
6849
  }, [(y = e.textDetails) == null ? void 0 : y.version]), !l) return null;
6850
- const D = ot.getPartTextContent(e), w = (((e.ended ?? /* @__PURE__ */ new Date()).getTime() - e.created.getTime()) / 1e3).toFixed(2), d = s ? m ? "Pensando..." : `Pensou por ${w}s` : `Thought ${w}s`, v = /* @__PURE__ */ n((b, p) => null, "onDrawCodeBlock");
6850
+ const D = ot.getPartTextContent(e), w = (((e.ended ?? /* @__PURE__ */ new Date()).getTime() - e.created.getTime()) / 1e3).toFixed(2), d = s ? m ? "Pensando..." : `Pensou por ${w}s` : `Thought ${w}s`, x = /* @__PURE__ */ n((b, p) => null, "onDrawCodeBlock");
6851
6851
  return /* @__PURE__ */ I(_e, { direction: "column", style: { display: "flex", borderRadius: "5px", marginTop: "10px", color: "var(--text-secondary)", fontSize: "0.75rem" }, children: [
6852
6852
  /* @__PURE__ */ t(Wt, { size: "small", disableRipple: !0, onClick: /* @__PURE__ */ n(() => T(!g), "onClick"), sx: {
6853
6853
  color: "inherit",
@@ -6878,8 +6878,8 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
6878
6878
  partial: u,
6879
6879
  sessionId: a.sessionId ?? "ND",
6880
6880
  text: D ?? "",
6881
- onDrawCodeBlock: v,
6882
- onLinkClicked: x
6881
+ onDrawCodeBlock: x,
6882
+ onLinkClicked: v
6883
6883
  }
6884
6884
  ) })
6885
6885
  ] });
@@ -6921,7 +6921,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
6921
6921
  u
6922
6922
  ))
6923
6923
  }
6924
- ), "LoadingDots"), Wr = /* @__PURE__ */ n(({ id: e, on: a, className: l = "", style: u = {}, showButton: m = !1, startingPoint: s, stopPoint: x }) => {
6924
+ ), "LoadingDots"), Wr = /* @__PURE__ */ n(({ id: e, on: a, className: l = "", style: u = {}, showButton: m = !1, startingPoint: s, stopPoint: v }) => {
6925
6925
  const [g, T] = Q(0), E = pe(void 0);
6926
6926
  le(() => {
6927
6927
  if (a)
@@ -6929,15 +6929,15 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
6929
6929
  const w = (Date.now() - s.getTime()) / 1e3;
6930
6930
  T(w);
6931
6931
  }, 100);
6932
- else if (E.current && (clearInterval(E.current), E.current = void 0), x) {
6933
- const w = (x.getTime() - s.getTime()) / 1e3;
6932
+ else if (E.current && (clearInterval(E.current), E.current = void 0), v) {
6933
+ const w = (v.getTime() - s.getTime()) / 1e3;
6934
6934
  T(w);
6935
6935
  } else
6936
6936
  console.error("[STOP WATCH]: Stop point is not set, " + e);
6937
6937
  return () => {
6938
6938
  E.current && (clearInterval(E.current), E.current = void 0);
6939
6939
  };
6940
- }, [a, s, x]);
6940
+ }, [a, s, v]);
6941
6941
  const D = /* @__PURE__ */ n(() => {
6942
6942
  T(0), E.current && (clearInterval(E.current), E.current = void 0);
6943
6943
  }, "reset"), k = /* @__PURE__ */ n((w) => w.toFixed(2), "formatTime");
@@ -6981,13 +6981,13 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
6981
6981
  sessionId: u,
6982
6982
  content: m,
6983
6983
  part: s,
6984
- onLinkClicked: x,
6984
+ onLinkClicked: v,
6985
6985
  preview: g,
6986
6986
  onDrawCodeBlock: T,
6987
6987
  isLastInlineInGroup: E = !1
6988
6988
  }) => {
6989
6989
  var K, U, ne, Se, Re, Ue;
6990
- const [D, k] = Q(null), w = pe(null), S = pe(null), d = wt(), v = Ar(d.breakpoints.down("sm")), y = !!D, b = /* @__PURE__ */ n((G) => {
6990
+ const [D, k] = Q(null), w = pe(null), S = pe(null), d = wt(), x = Ar(d.breakpoints.down("sm")), y = !!D, b = /* @__PURE__ */ n((G) => {
6991
6991
  k(G.currentTarget);
6992
6992
  }, "handleViewClick"), p = /* @__PURE__ */ n(() => {
6993
6993
  k(null);
@@ -7082,7 +7082,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
7082
7082
  ] })
7083
7083
  ] }) : null
7084
7084
  ] }),
7085
- !v && /* @__PURE__ */ t(
7085
+ !x && /* @__PURE__ */ t(
7086
7086
  Je,
7087
7087
  {
7088
7088
  size: "small",
@@ -7139,7 +7139,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
7139
7139
  preStyle: z,
7140
7140
  partial: g,
7141
7141
  text: Kc(m ?? ""),
7142
- onLinkClicked: x,
7142
+ onLinkClicked: v,
7143
7143
  onDrawCodeBlock: T
7144
7144
  }
7145
7145
  )
@@ -7205,13 +7205,13 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
7205
7205
  id: "preview-container",
7206
7206
  sx: {
7207
7207
  "&::-webkit-scrollbar": {
7208
- width: v ? "none" : "8px",
7209
- height: v ? "none" : "8px",
7208
+ width: x ? "none" : "8px",
7209
+ height: x ? "none" : "8px",
7210
7210
  background: d.palette.background.paper
7211
7211
  },
7212
7212
  "&::-webkit-scrollbar-track": {
7213
7213
  background: d.palette.background.paper,
7214
- width: v ? "none" : "5px"
7214
+ width: x ? "none" : "5px"
7215
7215
  },
7216
7216
  "&::-webkit-scrollbar-thumb": {
7217
7217
  background: d.palette.background.default,
@@ -7245,7 +7245,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
7245
7245
  sessionId: u,
7246
7246
  preStyle: z,
7247
7247
  text: m ?? "",
7248
- onLinkClicked: x,
7248
+ onLinkClicked: v,
7249
7249
  onDrawCodeBlock: T
7250
7250
  }
7251
7251
  )
@@ -7664,8 +7664,8 @@ function rp(e, a) {
7664
7664
  }
7665
7665
  n(rp, "configureFriendlyMapping");
7666
7666
  function Jn(e, a, l, u) {
7667
- const m = e.split("-"), s = m.length > 1 ? m.slice(1).join("") : e, x = zs[s];
7668
- if (!x) {
7667
+ const m = e.split("-"), s = m.length > 1 ? m.slice(1).join("") : e, v = zs[s];
7668
+ if (!v) {
7669
7669
  const T = e.replace(/_/g, " ");
7670
7670
  switch (a) {
7671
7671
  case "partial":
@@ -7676,11 +7676,11 @@ function Jn(e, a, l, u) {
7676
7676
  return `${T} concluído`;
7677
7677
  }
7678
7678
  }
7679
- if (a === "response" && u && x.responseError)
7680
- return x.responseError;
7681
- let g = x[a];
7682
- if (x.extractDetail) {
7683
- const T = x.extractDetail(l);
7679
+ if (a === "response" && u && v.responseError)
7680
+ return v.responseError;
7681
+ let g = v[a];
7682
+ if (v.extractDetail) {
7683
+ const T = v.extractDetail(l);
7684
7684
  T && (g = `${g} ${T}`);
7685
7685
  }
7686
7686
  return g;
@@ -7693,15 +7693,15 @@ const ko = 500, Si = 14, op = 8, ap = [
7693
7693
  ];
7694
7694
  function Ci({ streamedBytes: e = 0 }) {
7695
7695
  const a = Math.floor(e / ko), l = e % ko / ko, u = a + (l > 0 ? 1 : 0), m = Math.max(u, 1), s = wt();
7696
- function x(T, E = 2, D = !0) {
7696
+ function v(T, E = 2, D = !0) {
7697
7697
  const k = Math.abs(T);
7698
7698
  for (const [w, S] of ap)
7699
7699
  if (k >= w)
7700
7700
  return (T / w).toFixed(E) + (D ? S : "");
7701
7701
  return T.toFixed(0) + "b";
7702
7702
  }
7703
- n(x, "formatCompact");
7704
- const g = /* @__PURE__ */ n((T) => x(T), "formatBytes");
7703
+ n(v, "formatCompact");
7704
+ const g = /* @__PURE__ */ n((T) => v(T), "formatBytes");
7705
7705
  return /* @__PURE__ */ I(re, { children: [
7706
7706
  /* @__PURE__ */ t(se, { sx: {
7707
7707
  display: "inline-flex",
@@ -7755,7 +7755,7 @@ const ip = /* @__PURE__ */ n(({
7755
7755
  isError: u,
7756
7756
  startTime: m,
7757
7757
  endTime: s,
7758
- streamedBytes: x
7758
+ streamedBytes: v
7759
7759
  }) => {
7760
7760
  const g = Jn(e, a, l, u), T = m && s ? s.getTime() - m.getTime() : void 0;
7761
7761
  return /* @__PURE__ */ I(
@@ -7787,9 +7787,9 @@ const ip = /* @__PURE__ */ n(({
7787
7787
  children: g
7788
7788
  }
7789
7789
  ),
7790
- a === "partial" && /* @__PURE__ */ t(Ci, { streamedBytes: x ?? 0 }),
7790
+ a === "partial" && /* @__PURE__ */ t(Ci, { streamedBytes: v ?? 0 }),
7791
7791
  a === "call" && m && /* @__PURE__ */ I(re, { children: [
7792
- /* @__PURE__ */ t(Ci, { streamedBytes: x ?? 0 }),
7792
+ /* @__PURE__ */ t(Ci, { streamedBytes: v ?? 0 }),
7793
7793
  /* @__PURE__ */ I(_e, { direction: "row", alignItems: "center", gap: 0.5, sx: { fontSize: "0.78rem" }, children: [
7794
7794
  /* @__PURE__ */ t(Cn, { sx: { fontSize: "0.9rem" } }),
7795
7795
  /* @__PURE__ */ t(Wr, { startingPoint: m, on: !0, style: { fontSize: "0.78rem" } })
@@ -7807,10 +7807,10 @@ const ip = /* @__PURE__ */ n(({
7807
7807
  );
7808
7808
  }, "FriendlyPartDisplay"), sp = { fontSize: 10, color: "currentColor" };
7809
7809
  function lp(e) {
7810
- var x, g, T, E, D, k, w, S, d, v, y, b;
7810
+ var v, g, T, E, D, k, w, S, d, x, y, b;
7811
7811
  if (e.eventType === ve.PartialFunctionCall)
7812
7812
  return {
7813
- title: ei(((x = e.functionDetails) == null ? void 0 : x.name) ?? "Unknown"),
7813
+ title: ei(((v = e.functionDetails) == null ? void 0 : v.name) ?? "Unknown"),
7814
7814
  content: ot.getPartTextContent(e)
7815
7815
  };
7816
7816
  const a = (g = e.functionDetails) == null ? void 0 : g.name;
@@ -7831,7 +7831,7 @@ function lp(e) {
7831
7831
  try {
7832
7832
  s = JSON.stringify(((d = e.functionDetails) == null ? void 0 : d.args) ?? {}, null, 4);
7833
7833
  } catch {
7834
- s = String(((v = e.functionDetails) == null ? void 0 : v.args) ?? "{}");
7834
+ s = String(((x = e.functionDetails) == null ? void 0 : x.args) ?? "{}");
7835
7835
  }
7836
7836
  else {
7837
7837
  const p = (y = e.functionDetails) == null ? void 0 : y.response;
@@ -7867,7 +7867,7 @@ const cp = {
7867
7867
  onLinkClicked: s
7868
7868
  }) => {
7869
7869
  var D, k, w, S;
7870
- const x = lp(e);
7870
+ const v = lp(e);
7871
7871
  if (m) {
7872
7872
  const d = cp[e.eventType] ?? "partial";
7873
7873
  return /* @__PURE__ */ t(
@@ -7879,22 +7879,22 @@ const cp = {
7879
7879
  isError: !1,
7880
7880
  startTime: (w = e.functionDetails) == null ? void 0 : w.start,
7881
7881
  endTime: (S = e.functionDetails) == null ? void 0 : S.end,
7882
- streamedBytes: x.content.length
7882
+ streamedBytes: v.content.length
7883
7883
  }
7884
7884
  );
7885
7885
  }
7886
7886
  const T = `\`\`\`${e.eventType === ve.PartialFunctionCall ? "sql" : "json"}
7887
7887
 
7888
- ${x.content}
7888
+ ${v.content}
7889
7889
 
7890
- \`\`\``, E = /* @__PURE__ */ n((d, v) => null, "onDrawCodeBlock");
7890
+ \`\`\``, E = /* @__PURE__ */ n((d, x) => null, "onDrawCodeBlock");
7891
7891
  return /* @__PURE__ */ t(
7892
7892
  Ms,
7893
7893
  {
7894
7894
  sessionId: a.sessionId ?? "ND",
7895
- title: x.title,
7895
+ title: v.title,
7896
7896
  icon: /* @__PURE__ */ t(au, { style: sp }),
7897
- elapsed: x.elapsed,
7897
+ elapsed: v.elapsed,
7898
7898
  content: T,
7899
7899
  part: e,
7900
7900
  preview: l,
@@ -7957,10 +7957,10 @@ ${((E = e.rawDetails) == null ? void 0 : E.toString()) ?? ""}
7957
7957
  }, "BoxedPart"), pa = ["single", "multi", "dropdown"], Fr = /* @__PURE__ */ n((e) => e && typeof e == "object" ? e : null, "asObj$1"), Sn = /* @__PURE__ */ n((e) => typeof e == "string" ? e : "", "asStr"), up = "YYYY-MM-DD";
7958
7958
  function pp(e, a) {
7959
7959
  if (!e) return a;
7960
- const l = /* @__PURE__ */ n((x, g) => x === "0" || x === "9" ? /[0-9]/.test(g) : x === "A" ? /[a-zA-Z]/.test(g) : /[a-zA-Z0-9]/.test(g), "accepts"), u = /* @__PURE__ */ n((x) => x === "0" || x === "9" || x === "A" || x === "S", "isPlaceholder");
7960
+ const l = /* @__PURE__ */ n((v, g) => v === "0" || v === "9" ? /[0-9]/.test(g) : v === "A" ? /[a-zA-Z]/.test(g) : /[a-zA-Z0-9]/.test(g), "accepts"), u = /* @__PURE__ */ n((v) => v === "0" || v === "9" || v === "A" || v === "S", "isPlaceholder");
7961
7961
  let m = "", s = 0;
7962
- for (let x = 0; x < e.length; x++) {
7963
- const g = e[x];
7962
+ for (let v = 0; v < e.length; v++) {
7963
+ const g = e[v];
7964
7964
  if (u(g)) {
7965
7965
  for (; s < a.length && !l(g, a[s]); ) s++;
7966
7966
  if (s >= a.length) break;
@@ -7986,11 +7986,11 @@ function So(e) {
7986
7986
  if (!Array.isArray(l) || l.length === 0) return null;
7987
7987
  const u = [];
7988
7988
  for (const s of l) {
7989
- const x = Fr(s);
7990
- if (!x) continue;
7991
- const g = Sn(x.text).trim();
7989
+ const v = Fr(s);
7990
+ if (!v) continue;
7991
+ const g = Sn(v.text).trim();
7992
7992
  if (!g) continue;
7993
- const T = Sn(x.select).toLowerCase() === "multi" ? "multi" : "single", E = (Array.isArray(x.options) ? x.options : []).filter((S) => typeof S == "string" && S.trim().length > 0).map((S) => S.trim()), D = Sn(x.id).trim() || void 0, k = hp(x, T, E.length > 0), w = k === "masked" && Sn(x.mask).trim() || void 0;
7993
+ const T = Sn(v.select).toLowerCase() === "multi" ? "multi" : "single", E = (Array.isArray(v.options) ? v.options : []).filter((S) => typeof S == "string" && S.trim().length > 0).map((S) => S.trim()), D = Sn(v.id).trim() || void 0, k = hp(v, T, E.length > 0), w = k === "masked" && Sn(v.mask).trim() || void 0;
7994
7994
  u.push({ id: D, text: g, select: T, options: pa.includes(k) ? E : [], kind: k, mask: w });
7995
7995
  }
7996
7996
  return u.length === 0 ? null : { title: Sn(a.title).trim() || void 0, questions: u };
@@ -8046,7 +8046,7 @@ function gp(e) {
8046
8046
  n(gp, "sentinelOf$1");
8047
8047
  const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8048
8048
  var U, ne, Se, Re, Ue;
8049
- const { agentGatewayService: l } = Ze(), [u, m] = Q(null), [s, x] = Q({}), g = bt(), T = (U = e.functionDetails) == null ? void 0 : U.id, E = Ce(
8049
+ const { agentGatewayService: l } = Ze(), [u, m] = Q(null), [s, v] = Q({}), g = bt(), T = (U = e.functionDetails) == null ? void 0 : U.id, E = Ce(
8050
8050
  () => {
8051
8051
  var G;
8052
8052
  return fp((G = e.functionDetails) == null ? void 0 : G.args);
@@ -8063,7 +8063,7 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8063
8063
  );
8064
8064
  const D = e.eventType === ve.FunctionResponse ? ((Ue = e.functionDetails) == null ? void 0 : Ue.response) ?? null : null, k = u ?? D, w = k != null || !T || !E;
8065
8065
  if (!E) return null;
8066
- const { title: S, questions: d } = E, v = /* @__PURE__ */ n((G) => d[G].id || String(G), "qid"), y = a ? { maxWidth: "100%" } : { border: "1px solid", borderColor: "divider", borderRadius: 2, px: 2, py: 1.5, my: 0.5, maxWidth: "100%" };
8066
+ const { title: S, questions: d } = E, x = /* @__PURE__ */ n((G) => d[G].id || String(G), "qid"), y = a ? { maxWidth: "100%" } : { border: "1px solid", borderColor: "divider", borderRadius: 2, px: 2, py: 1.5, my: 0.5, maxWidth: "100%" };
8067
8067
  if (w) {
8068
8068
  if (k.indexOf("Prompt cancelado") != -1)
8069
8069
  return /* @__PURE__ */ I(gt, { sx: { display: "inline-flex", backgroundColor: g.palette.background.paper, px: 2, pb: 0.5, mb: 2, borderRadius: 1, flexWrap: "nowrap", alignItems: "center" }, direction: "row", gap: 1, children: [
@@ -8074,7 +8074,7 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8074
8074
  return /* @__PURE__ */ I(R, { sx: y, children: [
8075
8075
  S && /* @__PURE__ */ t(ee, { variant: "subtitle2", sx: { mb: 1.25, fontWeight: 600 }, children: S }),
8076
8076
  /* @__PURE__ */ t(gt, { spacing: 1.25, children: d.map((Pe, je) => {
8077
- const qe = ($ == null ? void 0 : $.find((Be) => Be.questionId === v(je))) ?? null, ze = (qe == null ? void 0 : qe.selected) ?? [], ue = ((qe == null ? void 0 : qe.note) ?? "").trim(), Ye = ze.length ? ze.join(", ") : ue || "—", yt = ze.length && ue ? ue : "", dt = ze.length > 0 || Pe.options.length === 0 && !!ue;
8077
+ const qe = ($ == null ? void 0 : $.find((Be) => Be.questionId === x(je))) ?? null, ze = (qe == null ? void 0 : qe.selected) ?? [], ue = ((qe == null ? void 0 : qe.note) ?? "").trim(), Ye = ze.length ? ze.join(", ") : ue || "—", yt = ze.length && ue ? ue : "", dt = ze.length > 0 || Pe.options.length === 0 && !!ue;
8078
8078
  return /* @__PURE__ */ I(R, { children: [
8079
8079
  /* @__PURE__ */ t(ee, { variant: "body2", sx: { fontWeight: 500 }, children: Pe.text }),
8080
8080
  /* @__PURE__ */ t(
@@ -8090,7 +8090,7 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8090
8090
  yt,
8091
8091
  "”"
8092
8092
  ] })
8093
- ] }, v(je));
8093
+ ] }, x(je));
8094
8094
  }) }),
8095
8095
  /* @__PURE__ */ t(ee, { variant: "caption", sx: { display: "block", mt: 1, color: "text.secondary" }, children: me ?? "✓ answered" })
8096
8096
  ] });
@@ -8110,14 +8110,14 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8110
8110
  N(je);
8111
8111
  return;
8112
8112
  }
8113
- x(je);
8113
+ v(je);
8114
8114
  }, "pickSingle"), J = /* @__PURE__ */ n((G, $) => {
8115
8115
  const me = b(G), Pe = me.selected.includes($) ? me.selected.filter((je) => je !== $) : [...me.selected, $];
8116
- x({ ...s, [G]: { ...me, selected: Pe } });
8116
+ v({ ...s, [G]: { ...me, selected: Pe } });
8117
8117
  }, "toggleMulti"), q = /* @__PURE__ */ n((G, $) => {
8118
- x({ ...s, [G]: { ...b(G), note: $ } });
8118
+ v({ ...s, [G]: { ...b(G), note: $ } });
8119
8119
  }, "setNote"), Z = /* @__PURE__ */ n((G, $) => {
8120
- x({ ...s, [G]: { ...b(G), selected: $ ? [$] : [] } });
8120
+ v({ ...s, [G]: { ...b(G), selected: $ ? [$] : [] } });
8121
8121
  }, "setValue"), K = /* @__PURE__ */ n((G) => p(G)[0] ?? "", "valueFor");
8122
8122
  return /* @__PURE__ */ I(R, { sx: y, children: [
8123
8123
  S && /* @__PURE__ */ t(ee, { variant: "subtitle2", sx: { mb: 1.25, fontWeight: 600 }, children: S }),
@@ -8195,7 +8195,7 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8195
8195
  sx: { mt: G.kind === "text" ? 0.5 : 1 }
8196
8196
  }
8197
8197
  )
8198
- ] }, v($))) }),
8198
+ ] }, x($))) }),
8199
8199
  /* @__PURE__ */ t(gt, { direction: "row", spacing: 1, alignItems: "center", sx: { mt: 1.5 }, children: _ ? /* @__PURE__ */ t(En, { size: "small", variant: "contained", color: "primary", onClick: /* @__PURE__ */ n(() => N(), "onClick"), children: "Submit" }) : /* @__PURE__ */ t(ee, { variant: "caption", sx: { color: "text.secondary" }, children: "Pick an option to answer" }) })
8200
8200
  ] });
8201
8201
  }, "AskUserPart"), Ei = /* @__PURE__ */ n((e) => e && typeof e == "object" ? e : null, "asObj");
@@ -8222,8 +8222,8 @@ function xp(e) {
8222
8222
  }
8223
8223
  n(xp, "sentinelOf");
8224
8224
  const vp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8225
- var v, y, b;
8226
- const { agentGatewayService: l, onRequestAuth: u, renderAuthPrompt: m } = Ze(), [s, x] = Q("idle"), g = (v = e.functionDetails) == null ? void 0 : v.id, T = Ce(() => {
8225
+ var x, y, b;
8226
+ const { agentGatewayService: l, onRequestAuth: u, renderAuthPrompt: m } = Ze(), [s, v] = Q("idle"), g = (x = e.functionDetails) == null ? void 0 : x.id, T = Ce(() => {
8227
8227
  var p;
8228
8228
  return yp((p = e.functionDetails) == null ? void 0 : p.args);
8229
8229
  }, [(y = e.functionDetails) == null ? void 0 : y.args]), E = e.eventType === ve.FunctionResponse ? ((b = e.functionDetails) == null ? void 0 : b.response) ?? null : null, D = s === "done" || E != null || !g, k = a ? { maxWidth: "100%", pb: 2 } : { border: "1px solid", borderColor: "divider", borderRadius: 2, px: 2, py: 1.5, my: 0.5, maxWidth: "100%" };
@@ -8232,15 +8232,15 @@ const vp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
8232
8232
  return /* @__PURE__ */ t(R, { sx: k, children: /* @__PURE__ */ t(ee, { variant: "body2", sx: { color: "text.secondary" }, children: p ?? "✓ Conectado" }) });
8233
8233
  }
8234
8234
  const w = /* @__PURE__ */ n((p) => {
8235
- g && (l.answerHumanTool(g, p), x("done"));
8236
- }, "deliverToken"), S = /* @__PURE__ */ n(() => x("idle"), "cancel"), d = /* @__PURE__ */ n(async () => {
8235
+ g && (l.answerHumanTool(g, p), v("done"));
8236
+ }, "deliverToken"), S = /* @__PURE__ */ n(() => v("idle"), "cancel"), d = /* @__PURE__ */ n(async () => {
8237
8237
  if (!(!g || !u)) {
8238
- x("pending");
8238
+ v("pending");
8239
8239
  try {
8240
8240
  const p = await u();
8241
- p ? w(p) : S(), p ? (l.answerHumanTool(g, p), x("done")) : x("idle");
8241
+ p ? w(p) : S();
8242
8242
  } catch {
8243
- x("failed");
8243
+ v("failed");
8244
8244
  }
8245
8245
  }
8246
8246
  }, "handleSignIn");
@@ -8309,14 +8309,14 @@ n(Nr, "parseUiArgs");
8309
8309
  function wp() {
8310
8310
  const e = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {
8311
8311
  render(u, m, s) {
8312
- const x = Co(u);
8313
- return e.set(x, { kind: "render", name: x, render: m, parse: s == null ? void 0 : s.parse }), l;
8312
+ const v = Co(u);
8313
+ return e.set(v, { kind: "render", name: v, render: m, parse: s == null ? void 0 : s.parse }), l;
8314
8314
  },
8315
8315
  action(u, m, s) {
8316
- const x = Co(u);
8317
- return e.set(x, {
8316
+ const v = Co(u);
8317
+ return e.set(v, {
8318
8318
  kind: "action",
8319
- name: x,
8319
+ name: v,
8320
8320
  run: m,
8321
8321
  parse: s == null ? void 0 : s.parse,
8322
8322
  status: s == null ? void 0 : s.status
@@ -8336,11 +8336,11 @@ function wp() {
8336
8336
  return {
8337
8337
  resolve(s) {
8338
8338
  if (!s) return;
8339
- const x = Co(s), g = u.get(x);
8339
+ const v = Co(s), g = u.get(v);
8340
8340
  if (g) return g;
8341
8341
  let T, E = -1;
8342
8342
  for (const [D, k] of u)
8343
- (x.endsWith("-" + D) || x.endsWith("_" + D)) && D.length > E && (T = k, E = D.length);
8343
+ (v.endsWith("-" + D) || v.endsWith("_" + D)) && D.length > E && (T = k, E = D.length);
8344
8344
  return T;
8345
8345
  },
8346
8346
  resolveAskUser(s) {
@@ -8358,7 +8358,7 @@ function wp() {
8358
8358
  n(wp, "createUiToolRegistry");
8359
8359
  const Qo = /* @__PURE__ */ n((e) => {
8360
8360
  var k, w;
8361
- const { part: a, message: l, onGoing: u = !1, preview: m = !1, embedded: s } = e, x = un(pn), g = a.functionDetails, T = tp(g), E = wt(), D = (k = x == null ? void 0 : x.uiTools) == null ? void 0 : k.resolveAskUser(T);
8361
+ const { part: a, message: l, onGoing: u = !1, preview: m = !1, embedded: s } = e, v = un(pn), g = a.functionDetails, T = tp(g), E = wt(), D = (k = v == null ? void 0 : v.uiTools) == null ? void 0 : k.resolveAskUser(T);
8362
8362
  if (D) {
8363
8363
  const S = D.parse ? D.parse(g == null ? void 0 : g.args) : Nr(g == null ? void 0 : g.args), d = {
8364
8364
  name: D.name,
@@ -8369,8 +8369,8 @@ const Qo = /* @__PURE__ */ n((e) => {
8369
8369
  message: l ?? { parts: [] },
8370
8370
  onGoing: u,
8371
8371
  preview: m
8372
- }, v = (g == null ? void 0 : g.status) === "Done";
8373
- if (!s && v) {
8372
+ }, x = (g == null ? void 0 : g.status) === "Done";
8373
+ if (!s && x) {
8374
8374
  if (((w = g == null ? void 0 : g.response) == null ? void 0 : w.indexOf("Prompt cancelado")) != -1)
8375
8375
  return /* @__PURE__ */ I(_e, { sx: { display: "inline-flex", backgroundColor: E.palette.background.paper, px: 2, pb: 0.5, mb: 2, borderRadius: 1, flexWrap: "nowrap", alignItems: "center" }, direction: "row", gap: 1, children: [
8376
8376
  /* @__PURE__ */ t(Ui, { sx: { display: "inline-flex", mt: 0.5 } }),
@@ -8405,7 +8405,7 @@ const js = /* @__PURE__ */ n(({ children: e }) => {
8405
8405
  return /* @__PURE__ */ t(Un.Provider, { value: l, children: e });
8406
8406
  }, "InertEnvironmentProvider"), Ls = /* @__PURE__ */ n((e) => {
8407
8407
  var S;
8408
- const { part: a, message: l, onGoing: u, preview: m } = e, s = un(pn), x = Fs(), g = a.functionDetails, T = (S = s == null ? void 0 : s.uiTools) == null ? void 0 : S.resolve(g == null ? void 0 : g.name);
8408
+ const { part: a, message: l, onGoing: u, preview: m } = e, s = un(pn), v = Fs(), g = a.functionDetails, T = (S = s == null ? void 0 : s.uiTools) == null ? void 0 : S.resolve(g == null ? void 0 : g.name);
8409
8409
  if (!T) return /* @__PURE__ */ t(Pr, { ...e });
8410
8410
  const E = (g == null ? void 0 : g.id) ?? "", D = ha(g == null ? void 0 : g.clientOutput);
8411
8411
  if (T.kind === "action")
@@ -8421,7 +8421,7 @@ const js = /* @__PURE__ */ n(({ children: e }) => {
8421
8421
  message: l,
8422
8422
  onGoing: u,
8423
8423
  preview: m,
8424
- env: x
8424
+ env: v
8425
8425
  }
8426
8426
  );
8427
8427
  if (T.kind !== "render") return /* @__PURE__ */ t(Pr, { ...e });
@@ -8445,7 +8445,7 @@ const js = /* @__PURE__ */ n(({ children: e }) => {
8445
8445
  response: u,
8446
8446
  clientOutput: m,
8447
8447
  parts: s,
8448
- message: x,
8448
+ message: v,
8449
8449
  onGoing: g,
8450
8450
  preview: T,
8451
8451
  env: E
@@ -8459,12 +8459,12 @@ const js = /* @__PURE__ */ n(({ children: e }) => {
8459
8459
  console.warn("[uiTool] action args rejected by parse():", e.name);
8460
8460
  return;
8461
8461
  }
8462
- const d = { name: e.name, callId: a, response: u, clientOutput: m, parts: s, message: x, onGoing: g, preview: T, env: E };
8462
+ const d = { name: e.name, callId: a, response: u, clientOutput: m, parts: s, message: v, onGoing: g, preview: T, env: E };
8463
8463
  Promise.resolve().then(() => e.run(S, d)).then(() => {
8464
- const v = typeof e.status == "function" ? e.status(S, d) : e.status ?? null;
8465
- v && w({ label: v, ok: !0 });
8466
- }).catch((v) => {
8467
- console.error("[uiTool] action failed:", e.name, v), w({ label: "Ação não pôde ser executada", ok: !1 });
8464
+ const x = typeof e.status == "function" ? e.status(S, d) : e.status ?? null;
8465
+ x && w({ label: x, ok: !0 });
8466
+ }).catch((x) => {
8467
+ console.error("[uiTool] action failed:", e.name, x), w({ label: "Ação não pôde ser executada", ok: !1 });
8468
8468
  });
8469
8469
  }, [a]), k ? /* @__PURE__ */ t(se, { sx: { my: 0.5 }, children: /* @__PURE__ */ t(sn, { size: "small", variant: "outlined", color: k.ok ? "default" : "error", label: k.label }) }) : null;
8470
8470
  }, "UiToolActionRunner"), fa = {
@@ -8528,8 +8528,8 @@ const Er = ct.memo((e) => {
8528
8528
  const u = ((m = a == null ? void 0 : a.partRenderers) == null ? void 0 : m[l]) ?? fa[l];
8529
8529
  return /* @__PURE__ */ t(u, { ...e });
8530
8530
  }, (e, a) => {
8531
- var l, u, m, s, x, g, T, E, D, k, w, S;
8532
- return !(e.part.id !== a.part.id || (((l = e.part.textDetails) == null ? void 0 : l.version) ?? 0) < (((u = a.part.textDetails) == null ? void 0 : u.version) ?? 0) || e.part.text !== a.part.text || e.part.eventType !== a.part.eventType || e.part.partial !== a.part.partial || ((m = e.part.functionDetails) == null ? void 0 : m.text) !== ((s = a.part.functionDetails) == null ? void 0 : s.text) || ((x = e.part.functionDetails) == null ? void 0 : x.args) !== ((g = a.part.functionDetails) == null ? void 0 : g.args) || ((T = e.part.functionDetails) == null ? void 0 : T.response) !== ((E = a.part.functionDetails) == null ? void 0 : E.response) || ((D = e.part.waitingDetails) == null ? void 0 : D.status) !== ((k = a.part.waitingDetails) == null ? void 0 : k.status) || ((w = e.part.waitingDetails) == null ? void 0 : w.stopPoint) !== ((S = a.part.waitingDetails) == null ? void 0 : S.stopPoint) || e.message.turn_complete !== a.message.turn_complete || e.message.asyncFinalResponse !== a.message.asyncFinalResponse || e.isLastInlineInGroup !== a.isLastInlineInGroup || e.preview !== a.preview || e.friendlyMode !== a.friendlyMode);
8531
+ var l, u, m, s, v, g, T, E, D, k, w, S;
8532
+ return !(e.part.id !== a.part.id || (((l = e.part.textDetails) == null ? void 0 : l.version) ?? 0) < (((u = a.part.textDetails) == null ? void 0 : u.version) ?? 0) || e.part.text !== a.part.text || e.part.eventType !== a.part.eventType || e.part.partial !== a.part.partial || ((m = e.part.functionDetails) == null ? void 0 : m.text) !== ((s = a.part.functionDetails) == null ? void 0 : s.text) || ((v = e.part.functionDetails) == null ? void 0 : v.args) !== ((g = a.part.functionDetails) == null ? void 0 : g.args) || ((T = e.part.functionDetails) == null ? void 0 : T.response) !== ((E = a.part.functionDetails) == null ? void 0 : E.response) || ((D = e.part.waitingDetails) == null ? void 0 : D.status) !== ((k = a.part.waitingDetails) == null ? void 0 : k.status) || ((w = e.part.waitingDetails) == null ? void 0 : w.stopPoint) !== ((S = a.part.waitingDetails) == null ? void 0 : S.stopPoint) || e.message.turn_complete !== a.message.turn_complete || e.message.asyncFinalResponse !== a.message.asyncFinalResponse || e.isLastInlineInGroup !== a.isLastInlineInGroup || e.preview !== a.preview || e.friendlyMode !== a.friendlyMode);
8533
8533
  }), Cp = {
8534
8534
  luzes: /* @__PURE__ */ I(re, { children: [
8535
8535
  /* @__PURE__ */ t("circle", { cx: "12", cy: "5", r: "2", fill: "currentColor", stroke: "none" }),
@@ -8736,7 +8736,7 @@ n(Op, "defaultFormatTimestamp");
8736
8736
  const Ws = /* @__PURE__ */ n(({ isUser: e, message: a, tone: l }) => {
8737
8737
  const { showPersona: u, formatTimestamp: m, resolvePersona: s } = Ze();
8738
8738
  if (!u) return null;
8739
- const x = l === "chrome", g = (s == null ? void 0 : s({ isUser: e, message: a })) ?? { label: e ? "Você" : "Agente", initials: e ? "V" : "A" }, T = g.initials ?? (g.label.slice(0, 1).toUpperCase() || "·"), E = (m ?? Op)(a.created), D = e && g.picture !== "guest";
8739
+ const v = l === "chrome", g = (s == null ? void 0 : s({ isUser: e, message: a })) ?? { label: e ? "Você" : "Agente", initials: e ? "V" : "A" }, T = g.initials ?? (g.label.slice(0, 1).toUpperCase() || "·"), E = (m ?? Op)(a.created), D = e && g.picture !== "guest";
8740
8740
  return /* @__PURE__ */ I(R, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 1.5, mb: 0.5 }, children: [
8741
8741
  e ? D ? /* @__PURE__ */ t(
8742
8742
  tu,
@@ -8748,8 +8748,8 @@ const Ws = /* @__PURE__ */ n(({ isUser: e, message: a, tone: l }) => {
8748
8748
  fontSize: 12,
8749
8749
  fontWeight: 500,
8750
8750
  flexShrink: 0,
8751
- bgcolor: x ? "#3A3935" : "text.primary",
8752
- color: x ? "#fff" : "primary.main"
8751
+ bgcolor: v ? "#3A3935" : "text.primary",
8752
+ color: v ? "#fff" : "primary.main"
8753
8753
  },
8754
8754
  children: T
8755
8755
  }
@@ -8775,29 +8775,29 @@ const Ws = /* @__PURE__ */ n(({ isUser: e, message: a, tone: l }) => {
8775
8775
  }, "MessagePersona");
8776
8776
  function Pp(e, a) {
8777
8777
  const l = /* @__PURE__ */ n((s) => {
8778
- var x;
8779
- return (s.eventType === ve.FunctionCall || s.eventType === ve.FunctionResponse || s.eventType === ve.PartialFunctionCall) && ((((x = s.functionDetails) == null ? void 0 : x.isUi) ?? !1) || Rr(s.functionDetails));
8778
+ var v;
8779
+ return (s.eventType === ve.FunctionCall || s.eventType === ve.FunctionResponse || s.eventType === ve.PartialFunctionCall) && ((((v = s.functionDetails) == null ? void 0 : v.isUi) ?? !1) || Rr(s.functionDetails));
8780
8780
  }, "isUi"), u = /* @__PURE__ */ n((s) => ot.uiSlotId(s), "slotOf"), m = /* @__PURE__ */ new Set();
8781
8781
  for (const s of e)
8782
8782
  if (s.eventType === ve.Text) {
8783
- const x = ot.getPartTextContent(s);
8784
- if (x) for (const g of x.matchAll(/\{\{\s*Component:\s*([\w-]+)\s*\}\}/g)) m.add(g[1]);
8783
+ const v = ot.getPartTextContent(s);
8784
+ if (v) for (const g of v.matchAll(/\{\{\s*Component:\s*([\w-]+)\s*\}\}/g)) m.add(g[1]);
8785
8785
  }
8786
8786
  return a ? e.filter((s) => {
8787
8787
  var g, T;
8788
8788
  if (!l(s)) return !0;
8789
- const x = u(s);
8790
- return Rr(s.functionDetails) ? ((g = s.functionDetails) == null ? void 0 : g.status) !== "Done" ? !1 : !(x && m.has(x)) : ((T = s.functionDetails) == null ? void 0 : T.status) !== "Done" ? !1 : !(x && m.has(x));
8789
+ const v = u(s);
8790
+ return Rr(s.functionDetails) ? ((g = s.functionDetails) == null ? void 0 : g.status) !== "Done" ? !1 : !(v && m.has(v)) : ((T = s.functionDetails) == null ? void 0 : T.status) !== "Done" ? !1 : !(v && m.has(v));
8791
8791
  }) : m.size === 0 ? e : e.filter((s) => {
8792
8792
  if (!l(s)) return !0;
8793
- const x = u(s);
8794
- return !(x && m.has(x));
8793
+ const v = u(s);
8794
+ return !(v && m.has(v));
8795
8795
  });
8796
8796
  }
8797
8797
  n(Pp, "suppressSlottedUiParts");
8798
- const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, container: u, preview: m, onLinkClicked: s, appendWaitingPart: x, messagesRef: g, isConnectionOpen: T, friendlyMode: E = !1 }) => {
8798
+ const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, container: u, preview: m, onLinkClicked: s, appendWaitingPart: v, messagesRef: g, isConnectionOpen: T, friendlyMode: E = !1 }) => {
8799
8799
  [...de((B) => B.subAgents).values()];
8800
- const { showToolCalls: k, showPersona: w } = Ze(), S = bt(), d = pe(null), [v, y] = Q(!1);
8800
+ const { showToolCalls: k, showPersona: w } = Ze(), S = bt(), d = pe(null), [x, y] = Q(!1);
8801
8801
  le(() => {
8802
8802
  const B = d.current;
8803
8803
  if (!B) return;
@@ -8810,7 +8810,7 @@ const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, contai
8810
8810
  }, [S.breakpoints.values.md]);
8811
8811
  const b = e.isSuspended === !0, p = (e.parts ?? []).filter((B) => B.eventType !== ve.UserAnswer).length;
8812
8812
  let z = null, h = null;
8813
- if (b ? z = ot.createSuspended() : z = ot.createWaiting(T && p == 0, !1, "", /* @__PURE__ */ new Date()), x && (!e.parts || e.parts.length == 1) && (h = ot.fromText("Planejando próximos passos", "system", "planningPart")), !e.asyncFinalResponse && e.parts.length > 0) {
8813
+ if (b ? z = ot.createSuspended() : z = ot.createWaiting(T && p == 0, !1, "", /* @__PURE__ */ new Date()), v && (!e.parts || e.parts.length == 1) && (h = ot.fromText("Planejando próximos passos", "system", "planningPart")), !e.asyncFinalResponse && e.parts.length > 0) {
8814
8814
  const B = e.parts[e.parts.length - 1];
8815
8815
  B.waitingDetails && (B.waitingDetails.loadDots = !0);
8816
8816
  }
@@ -8852,7 +8852,7 @@ const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, contai
8852
8852
  return /* @__PURE__ */ t(
8853
8853
  "div",
8854
8854
  {
8855
- style: Z ? { width: "100%", marginTop: 1 } : { flex: v ? "1 1 100%" : "1 1 calc(50% - 4px)", maxWidth: v ? "100%" : "calc(50% - 4px)", marginTop: 2 },
8855
+ style: Z ? { width: "100%", marginTop: 1 } : { flex: x ? "1 1 100%" : "1 1 calc(50% - 4px)", maxWidth: x ? "100%" : "calc(50% - 4px)", marginTop: 2 },
8856
8856
  children: q
8857
8857
  },
8858
8858
  `${e.interactionId}-${B.id}`
@@ -8897,7 +8897,7 @@ const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, contai
8897
8897
  `group-${J}-${e.interactionId}-${u}`
8898
8898
  );
8899
8899
  }),
8900
- (x || b) && z && /* @__PURE__ */ t(re, { children: /* @__PURE__ */ t(Er, { onGoing: l, part: z, message: e, onLinkClicked: s, preview: m, friendlyMode: E }) })
8900
+ (v || b) && z && /* @__PURE__ */ t(re, { children: /* @__PURE__ */ t(Er, { onGoing: l, part: z, message: e, onLinkClicked: s, preview: m, friendlyMode: E }) })
8901
8901
  ]
8902
8902
  }
8903
8903
  )
@@ -8930,15 +8930,15 @@ function jp(e) {
8930
8930
  }
8931
8931
  n(jp, "statusColor");
8932
8932
  const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) => {
8933
- const [u, m] = Q(a ? 1 : 0), [s, x] = Q(null), g = wt(), T = pe(null), E = !e.completed, D = de((c) => c.lastToolEvent);
8933
+ const [u, m] = Q(a ? 1 : 0), [s, v] = Q(null), g = wt(), T = pe(null), E = !e.completed, D = de((c) => c.lastToolEvent);
8934
8934
  le(() => {
8935
8935
  if ((D == null ? void 0 : D.eventName) === "todolistUpdated" && D.subAgentId === e.id)
8936
8936
  try {
8937
8937
  const c = JSON.parse(D.eventData);
8938
- x(c);
8938
+ v(c);
8939
8939
  } catch {
8940
8940
  }
8941
- (D == null ? void 0 : D.eventName) === "todolistUpdated" && (D == null ? void 0 : D.eventData) !== "" && !E && D.subAgentId === e.id && x(null);
8941
+ (D == null ? void 0 : D.eventName) === "todolistUpdated" && (D == null ? void 0 : D.eventData) !== "" && !E && D.subAgentId === e.id && v(null);
8942
8942
  }, [D, e.id]), le(() => {
8943
8943
  u > 0 && T.current && T.current.scrollIntoView({ behavior: "smooth", block: "nearest" });
8944
8944
  }, [u]);
@@ -9162,7 +9162,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9162
9162
  );
9163
9163
  }, "SubAgentBox"), $p = /* @__PURE__ */ n(({ message: e, onLinkClicked: a }) => {
9164
9164
  var h, A;
9165
- const [l, u] = Q(null), [m, s] = Q(!1), { onRenderPrompt: x, userMessageRenderer: g, showPersona: T } = Ze(), E = e.parts.filter((c) => c.eventType === ve.UserAnswer), D = bt(), k = 20;
9165
+ const [l, u] = Q(null), [m, s] = Q(!1), { onRenderPrompt: v, userMessageRenderer: g, showPersona: T } = Ze(), E = e.parts.filter((c) => c.eventType === ve.UserAnswer), D = bt(), k = 20;
9166
9166
  let w = e.parts.some((c) => {
9167
9167
  var _;
9168
9168
  return (_ = c.thoughtDetails) == null ? void 0 : _.text;
@@ -9182,11 +9182,11 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9182
9182
  }, [e.turn_complete, w]);
9183
9183
  const d = /* @__PURE__ */ n((c) => {
9184
9184
  u(c.currentTarget);
9185
- }, "handleTipsClick"), v = /* @__PURE__ */ n(() => {
9185
+ }, "handleTipsClick"), x = /* @__PURE__ */ n(() => {
9186
9186
  u(null);
9187
9187
  }, "handleTipsClose"), y = !!l, { promptAsString: b } = Ce(
9188
- () => x ? x(e.interactionQuestion ?? "") : { promptAsString: e.interactionQuestion ?? "" },
9189
- [x, e.interactionQuestion]
9188
+ () => v ? v(e.interactionQuestion ?? "") : { promptAsString: e.interactionQuestion ?? "" },
9189
+ [v, e.interactionQuestion]
9190
9190
  ), p = e.parts.filter((c) => {
9191
9191
  var _;
9192
9192
  return (_ = c.thoughtDetails) == null ? void 0 : _.text;
@@ -9353,7 +9353,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9353
9353
  {
9354
9354
  open: y,
9355
9355
  anchorEl: l,
9356
- onClose: v,
9356
+ onClose: x,
9357
9357
  anchorOrigin: {
9358
9358
  vertical: "bottom",
9359
9359
  horizontal: "right"
@@ -9391,7 +9391,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9391
9391
  {
9392
9392
  open: y,
9393
9393
  anchorEl: l,
9394
- onClose: v,
9394
+ onClose: x,
9395
9395
  anchorOrigin: {
9396
9396
  vertical: "bottom",
9397
9397
  horizontal: "right"
@@ -9441,11 +9441,11 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9441
9441
  const l = de((q) => {
9442
9442
  var Z;
9443
9443
  return (Z = q.session) == null ? void 0 : Z.id;
9444
- }), u = de((q) => q.loadingType), m = de((q) => q.loading), s = de((q) => q.messages), x = de((q) => q.sendingMessage), g = de((q) => q.currentMessage), [T, E] = Q(null), D = pe(null), k = bt(), w = k.breakpoints.down("sm");
9444
+ }), u = de((q) => q.loadingType), m = de((q) => q.loading), s = de((q) => q.messages), v = de((q) => q.sendingMessage), g = de((q) => q.currentMessage), [T, E] = Q(null), D = pe(null), k = bt(), w = k.breakpoints.down("sm");
9445
9445
  le(() => {
9446
9446
  }, [w]);
9447
- const { onVisibleQuestionChange: S } = Ze(), [d, v] = Q(null), [y] = Q(null), [b, p] = Q(!1), z = uu((q) => {
9448
- v(q);
9447
+ const { onVisibleQuestionChange: S } = Ze(), [d, x] = Q(null), [y] = Q(null), [b, p] = Q(!1), z = uu((q) => {
9448
+ x(q);
9449
9449
  }, 10);
9450
9450
  le(() => {
9451
9451
  S == null || S((d == null ? void 0 : d.question) ?? null);
@@ -9476,14 +9476,14 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9476
9476
  let K = !0;
9477
9477
  e && ((U = e.current) == null || U.forEach((ne) => {
9478
9478
  Z.observe(ne), K = !1;
9479
- })), K && !x && v(null);
9479
+ })), K && !v && x(null);
9480
9480
  }, 500);
9481
- }, [e.current, l, x, m, u, s, g]), le(() => {
9481
+ }, [e.current, l, v, m, u, s, g]), le(() => {
9482
9482
  let q = null;
9483
- g ? q = g.interactionQuestion ?? "Waiting" : s && s.length > 0 && (q = s[s.length - 1].interactionQuestion ?? "Waiting"), v(q ? {
9483
+ g ? q = g.interactionQuestion ?? "Waiting" : s && s.length > 0 && (q = s[s.length - 1].interactionQuestion ?? "Waiting"), x(q ? {
9484
9484
  question: q ?? "Waiting"
9485
9485
  } : null);
9486
- }, [g, s, x]);
9486
+ }, [g, s, v]);
9487
9487
  const _ = y == null ? void 0 : y.parts.some((q) => {
9488
9488
  var Z;
9489
9489
  return (Z = q.thoughtDetails) == null ? void 0 : Z.text;
@@ -9688,7 +9688,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9688
9688
  severity: u = "info",
9689
9689
  onClose: m,
9690
9690
  onRetry: s,
9691
- actionType: x = "retry"
9691
+ actionType: v = "retry"
9692
9692
  }) => {
9693
9693
  const g = /* @__PURE__ */ n(() => {
9694
9694
  switch (u) {
@@ -9730,8 +9730,8 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9730
9730
  l
9731
9731
  ] }) }) }) }),
9732
9732
  /* @__PURE__ */ I(Lo, { sx: { backgroundColor: "background.paper" }, children: [
9733
- x === "retry" && /* @__PURE__ */ t(Wn, { onClick: s, color: "primary", variant: "contained", autoFocus: !0, children: "Try Again" }),
9734
- x === "close" && /* @__PURE__ */ t(Wn, { onClick: m, color: "primary", variant: "contained", autoFocus: !0, children: "OK" })
9733
+ v === "retry" && /* @__PURE__ */ t(Wn, { onClick: s, color: "primary", variant: "contained", autoFocus: !0, children: "Try Again" }),
9734
+ v === "close" && /* @__PURE__ */ t(Wn, { onClick: m, color: "primary", variant: "contained", autoFocus: !0, children: "OK" })
9735
9735
  ] })
9736
9736
  ]
9737
9737
  }
@@ -9755,8 +9755,8 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
9755
9755
  n(ka, "ErrorBoundary");
9756
9756
  let Xo = ka;
9757
9757
  const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRef: l, artifactService: u, friendlyMode: m }) => {
9758
- const s = de((g) => g.turnOpen), x = de((g) => g.currentMessage);
9759
- return x ? /* @__PURE__ */ t(Xo, { children: /* @__PURE__ */ t(
9758
+ const s = de((g) => g.turnOpen), v = de((g) => g.currentMessage);
9759
+ return v ? /* @__PURE__ */ t(Xo, { children: /* @__PURE__ */ t(
9760
9760
  R,
9761
9761
  {
9762
9762
  sx: {
@@ -9826,12 +9826,12 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
9826
9826
  }
9827
9827
  }
9828
9828
  },
9829
- children: x && /* @__PURE__ */ t(ma, { showSubAgents: !0, onGoing: !0, container: "currentMessage", isConnectionOpen: s, message: x, onLinkClicked: e, appendWaitingPart: s, messagesRef: l, preview: !0, friendlyMode: m })
9829
+ children: v && /* @__PURE__ */ t(ma, { showSubAgents: !0, onGoing: !0, container: "currentMessage", isConnectionOpen: s, message: v, onLinkClicked: e, appendWaitingPart: s, messagesRef: l, preview: !0, friendlyMode: m })
9830
9830
  }
9831
9831
  ) }) : null;
9832
9832
  }, "CurrentMessage"), Hp = /* @__PURE__ */ n(({ promptHeight: e }) => {
9833
- var d, v;
9834
- const a = bt(), l = de((y) => y.turnOpen), u = de((y) => y.currentMessage), { agentGatewayService: m } = Ze(), [s, x] = Q(!1), [g, T] = Ce(() => {
9833
+ var d, x;
9834
+ const a = bt(), l = de((y) => y.turnOpen), u = de((y) => y.currentMessage), { agentGatewayService: m } = Ze(), [s, v] = Q(!1), [g, T] = Ce(() => {
9835
9835
  var y;
9836
9836
  if (!l || !(u != null && u.parts)) return [null, -1];
9837
9837
  for (let b = u.parts.length - 1; b >= 0; b--) {
@@ -9844,7 +9844,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
9844
9844
  y && m.answerHumanTool(y, '{status: "Prompt cancelado"}');
9845
9845
  }, "cancelResponse"), [D, k] = Q(null);
9846
9846
  le(() => {
9847
- g != D && x(!1), g && k(g);
9847
+ g != D && v(!1), g && k(g);
9848
9848
  }, [g]);
9849
9849
  const w = g ?? D, S = (d = w == null ? void 0 : w.functionDetails) == null ? void 0 : d.id;
9850
9850
  return /* @__PURE__ */ t(ts, { direction: "up", in: !!g, mountOnEnter: !0, unmountOnExit: !0, appear: !0, children: /* @__PURE__ */ I(
@@ -9852,17 +9852,17 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
9852
9852
  {
9853
9853
  sx: {
9854
9854
  position: "absolute",
9855
- left: "7%",
9855
+ left: "5%",
9856
9856
  right: 8,
9857
9857
  bottom: e - 10,
9858
9858
  zIndex: 1100,
9859
9859
  display: "flex",
9860
9860
  flexDirection: "column",
9861
- maxWidth: "85%",
9862
- maxHeight: "60%",
9861
+ maxWidth: "90%",
9862
+ maxHeight: "60vh",
9863
9863
  overflow: "hidden",
9864
9864
  // clip to the rounded top; inner area owns the scroll
9865
- backgroundColor: Ge((v = a.palette) == null ? void 0 : v.background.default, 0.6),
9865
+ backgroundColor: Ge((x = a.palette) == null ? void 0 : x.background.default, 0.8),
9866
9866
  backdropFilter: "blur(2px)",
9867
9867
  border: `1px solid ${a.palette.primary.dark}`,
9868
9868
  borderTopLeftRadius: 12,
@@ -9873,7 +9873,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
9873
9873
  w && /* @__PURE__ */ I(R, { sx: { flex: "1 1 auto", position: "relative", minHeight: 0, maxHeight: s ? 80 : 400, transition: "max-height 0.5s ease", overflowY: s ? "clip" : "auto", px: 1.5, pt: 1, pb: 1.25 }, children: [
9874
9874
  /* @__PURE__ */ t(R, { sx: { position: "absolute", left: "45%", width: 36, height: 4, borderRadius: 2, top: 5, bgcolor: "divider", mb: 1 } }),
9875
9875
  /* @__PURE__ */ I(_e, { sx: { position: "absolute", m: 0, p: 0, right: "1.5%", top: 5 }, gap: 1, direction: "row", children: [
9876
- /* @__PURE__ */ t(Wt, { onClick: /* @__PURE__ */ n(() => x(!s), "onClick"), type: "button", sx: { p: 0, color: a.palette.border.soft }, children: /* @__PURE__ */ t(Md, { sx: { rotate: s ? "-90deg" : "90deg", fontSize: "20px" } }) }),
9876
+ /* @__PURE__ */ t(Wt, { onClick: /* @__PURE__ */ n(() => v(!s), "onClick"), type: "button", sx: { p: 0, color: a.palette.border.soft }, children: /* @__PURE__ */ t(Md, { sx: { rotate: s ? "-90deg" : "90deg", fontSize: "20px" } }) }),
9877
9877
  /* @__PURE__ */ t(Wt, { onClick: /* @__PURE__ */ n(() => E(S), "onClick"), type: "button", sx: { p: 0, color: a.palette.border.soft }, children: /* @__PURE__ */ t(zd, { sx: { fontSize: "18px" } }) })
9878
9878
  ] }),
9879
9879
  /* @__PURE__ */ t(Qo, { part: w, message: u ?? void 0, onGoing: l, embedded: !0 })
@@ -9910,7 +9910,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
9910
9910
  }, Vp = /* @__PURE__ */ n(() => {
9911
9911
  const { connectionStatus: e, sessionActive: a, lastActivity: l, loadingError: u } = de(
9912
9912
  hu((S) => ({ connectionStatus: S.connectionStatus, loadingStatus: S.loading, loadingError: S.loadingError, sessionActive: S.sessionActive, lastActivity: S.lastActivity }))
9913
- ), [m, s] = Q(0), x = wt(), g = /* @__PURE__ */ n((S) => {
9913
+ ), [m, s] = Q(0), v = wt(), g = /* @__PURE__ */ n((S) => {
9914
9914
  switch (S) {
9915
9915
  case ke.Connected:
9916
9916
  return "OK";
@@ -9954,14 +9954,14 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
9954
9954
  }
9955
9955
  )
9956
9956
  ] }),
9957
- !!u && e != ke.Connected && /* @__PURE__ */ t(Tn, { title: u, sx: { cursor: "pointer" }, children: /* @__PURE__ */ t(Ee, { variant: "caption", noWrap: !0, style: { color: x.palette.error.light, fontStyle: "italic", overflow: "clip", minWidth: 0, maxWidth: "250px" }, children: u }) })
9957
+ !!u && e != ke.Connected && /* @__PURE__ */ t(Tn, { title: u, sx: { cursor: "pointer" }, children: /* @__PURE__ */ t(Ee, { variant: "caption", noWrap: !0, style: { color: v.palette.error.light, fontStyle: "italic", overflow: "clip", minWidth: 0, maxWidth: "250px" }, children: u }) })
9958
9958
  ] });
9959
9959
  }, "ConnectionState"), Up = na(), Kn = /* @__PURE__ */ n((e) => {
9960
9960
  var Nt;
9961
- const { eventBusService: l, showStickyHeader: u, currentModel: m, friendlyMode: s, compactPrompt: x, showConnectionState: g, hidePromptInput: T } = Ze(), E = m ? ta[m] : void 0, D = de((V) => {
9961
+ const { eventBusService: l, showStickyHeader: u, currentModel: m, friendlyMode: s, compactPrompt: v, showConnectionState: g, hidePromptInput: T } = Ze(), E = m ? ta[m] : void 0, D = de((V) => {
9962
9962
  var be;
9963
9963
  return (be = V.session) == null ? void 0 : be.id;
9964
- }), k = de((V) => V.turnOpen), w = de((V) => V.connectionStatus), S = de((V) => V.messages), d = de((V) => V.loadingType), v = de((V) => V.setLastActivity), y = pe(null), b = wt(), p = Ar(b.breakpoints.down("sm")), z = p, h = pe(null), A = pe(null), c = pe(!1), _ = pe(/* @__PURE__ */ new Map()), [j, N] = Q(null), { artifactService: B } = Ze(), [J, q] = Q(!1), [Z, K] = Q(!1), [U, ne] = Q(!1), [Se, Re] = Q(!1), [Ue, G] = Q(null), [$, me] = Q(!1), Pe = pe(!1), je = pe(0), qe = pe(0), [ze, ue] = Q(0), [Ye, yt] = Q({
9964
+ }), k = de((V) => V.turnOpen), w = de((V) => V.connectionStatus), S = de((V) => V.messages), d = de((V) => V.loadingType), x = de((V) => V.setLastActivity), y = pe(null), b = wt(), p = Ar(b.breakpoints.down("sm")), z = p, h = pe(null), A = pe(null), c = pe(!1), _ = pe(/* @__PURE__ */ new Map()), [j, N] = Q(null), { artifactService: B } = Ze(), [J, q] = Q(!1), [Z, K] = Q(!1), [U, ne] = Q(!1), [Se, Re] = Q(!1), [Ue, G] = Q(null), [$, me] = Q(!1), Pe = pe(!1), je = pe(0), qe = pe(0), [ze, ue] = Q(0), [Ye, yt] = Q({
9965
9965
  open: !1,
9966
9966
  title: "",
9967
9967
  message: "",
@@ -10011,19 +10011,19 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
10011
10011
  }, le(() => {
10012
10012
  const V = /* @__PURE__ */ n((at) => {
10013
10013
  y != null && y.current && clearTimeout(y.current), y.current = setTimeout(() => {
10014
- v(), y.current = null;
10014
+ x(), y.current = null;
10015
10015
  }, 50);
10016
10016
  }, "handleGlobalMouseMove"), be = /* @__PURE__ */ n(() => {
10017
- v();
10017
+ x();
10018
10018
  }, "handleGlobalMouseUp");
10019
10019
  document.addEventListener("mousemove", V), window.addEventListener("mouseup", be);
10020
10020
  const Fe = /* @__PURE__ */ n((at) => {
10021
- v();
10021
+ x();
10022
10022
  }, "handleKeyDown");
10023
10023
  return window.addEventListener("keydown", Fe), () => {
10024
10024
  document.removeEventListener("mousemove", V), window.removeEventListener("mouseup", be), window.removeEventListener("keydown", Fe);
10025
10025
  };
10026
- }, [v]), le(() => {
10026
+ }, [x]), le(() => {
10027
10027
  const V = A.current;
10028
10028
  if (!V) return;
10029
10029
  const be = new MutationObserver(() => xt.current());
@@ -10400,7 +10400,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
10400
10400
  }
10401
10401
  ),
10402
10402
  /* @__PURE__ */ t(Hp, { promptHeight: ze }),
10403
- !T && (x ? /* @__PURE__ */ t(
10403
+ !T && (v ? /* @__PURE__ */ t(
10404
10404
  ua,
10405
10405
  {
10406
10406
  onHeightChange: /* @__PURE__ */ n((V) => ue(() => V), "onHeightChange"),
@@ -10427,17 +10427,17 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
10427
10427
  )
10428
10428
  ] });
10429
10429
  }, "ChatPane"), Hs = In(
10430
- ({ bordered: e, borderRadius: a, elevation: l, onToolEvent: u, bottomSlot: m, children: s }, x) => {
10430
+ ({ bordered: e, borderRadius: a, elevation: l, onToolEvent: u, bottomSlot: m, children: s }, v) => {
10431
10431
  const { sessionStore: g, eventBusService: T, sendMessage: E } = Ze(), D = pe(u);
10432
- D.current = u, hc(x, () => ({
10432
+ D.current = u, hc(v, () => ({
10433
10433
  sendMessage: E,
10434
10434
  getMessages: /* @__PURE__ */ n(() => g.getState().messages, "getMessages"),
10435
10435
  getSession: /* @__PURE__ */ n(() => g.getState().session, "getSession"),
10436
10436
  getConnectionState: /* @__PURE__ */ n(() => g.getState().connectionStatus, "getConnectionState")
10437
10437
  }), [E, g]), le(() => {
10438
- const S = /* @__PURE__ */ n(async (d, v) => {
10438
+ const S = /* @__PURE__ */ n(async (d, x) => {
10439
10439
  var y;
10440
- (y = D.current) == null || y.call(D, d, v);
10440
+ (y = D.current) == null || y.call(D, d, x);
10441
10441
  }, "handler");
10442
10442
  return T.gatewayOnToolEvent(S), () => {
10443
10443
  T.gatewayOffToolEvent(S);
@@ -10461,7 +10461,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
10461
10461
  );
10462
10462
  Hs.displayName = "AiChatInner";
10463
10463
  const Yn = In((e, a) => {
10464
- const { bordered: l, borderRadius: u, elevation: m, children: s, bottomSlot: x, ...g } = e;
10464
+ const { bordered: l, borderRadius: u, elevation: m, children: s, bottomSlot: v, ...g } = e;
10465
10465
  return /* @__PURE__ */ t(os, { ...g, children: /* @__PURE__ */ t(
10466
10466
  Hs,
10467
10467
  {
@@ -10470,24 +10470,24 @@ const Yn = In((e, a) => {
10470
10470
  onToolEvent: e.onToolEvent,
10471
10471
  borderRadius: u,
10472
10472
  elevation: m,
10473
- bottomSlot: x,
10473
+ bottomSlot: v,
10474
10474
  children: s
10475
10475
  }
10476
10476
  ) });
10477
10477
  });
10478
10478
  Yn.displayName = "AiChat";
10479
- const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u, onExpand: m, renderMode: s = "browser", naked: x = !1, fullImage: g = !1 }) => {
10480
- var v;
10479
+ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u, onExpand: m, renderMode: s = "browser", naked: v = !1, fullImage: g = !1 }) => {
10480
+ var x;
10481
10481
  const T = wt();
10482
10482
  let E = !1, D = !1;
10483
10483
  e && s === "browser" && le(() => {
10484
10484
  e.mimeType == "text/html" && setTimeout(() => {
10485
10485
  const y = new Bi();
10486
- console.warn("Making sortable", `container-table_${(e == null ? void 0 : e.id) ?? "idnull"}_${a}_${x}`);
10487
- const b = document.getElementById(`container-table_${(e == null ? void 0 : e.id) ?? "idnull"}_${a}_${x}`);
10486
+ console.warn("Making sortable", `container-table_${(e == null ? void 0 : e.id) ?? "idnull"}_${a}_${v}`);
10487
+ const b = document.getElementById(`container-table_${(e == null ? void 0 : e.id) ?? "idnull"}_${a}_${v}`);
10488
10488
  console.log("Container", b), b && (console.log("Initializing sortable table", b), y.init(b));
10489
10489
  }, 400);
10490
- }, [e, u, x, a]);
10490
+ }, [e, u, v, a]);
10491
10491
  function k(y) {
10492
10492
  switch (y) {
10493
10493
  case "text/html":
@@ -10503,13 +10503,13 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u,
10503
10503
  n(k, "geticon");
10504
10504
  function w() {
10505
10505
  return /* @__PURE__ */ I(se, { sx: {
10506
- display: a === "compact" && x === !1 ? "flex" : "block",
10506
+ display: a === "compact" && v === !1 ? "flex" : "block",
10507
10507
  textAlign: "center",
10508
10508
  alignContent: "center",
10509
10509
  justifyContent: "center",
10510
- boxSizing: a === "compact" && x === !1 ? "border-box" : "auto",
10510
+ boxSizing: a === "compact" && v === !1 ? "border-box" : "auto",
10511
10511
  maxWidth: "100%",
10512
- maxHeight: s == "browser" && x && !g && a == "compact" ? "100%" : s == "serverside" ? "unset" : "100%",
10512
+ maxHeight: s == "browser" && v && !g && a == "compact" ? "100%" : s == "serverside" ? "unset" : "100%",
10513
10513
  width: "100%",
10514
10514
  height: a === "compact" ? "300px" : "100%",
10515
10515
  margin: a === "compact" ? "5px auto" : "0px",
@@ -10529,12 +10529,12 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u,
10529
10529
  n(w, "getMimeTypeCard");
10530
10530
  function S(y, b) {
10531
10531
  return b ? /* @__PURE__ */ t(se, { sx: {
10532
- display: a === "compact" && x === !1 ? "flex" : "block",
10532
+ display: a === "compact" && v === !1 ? "flex" : "block",
10533
10533
  textAlign: "center",
10534
10534
  justifyContent: a === "compact" ? "center" : "auto",
10535
- boxSizing: a === "compact" && x === !1 ? "border-box" : "auto",
10535
+ boxSizing: a === "compact" && v === !1 ? "border-box" : "auto",
10536
10536
  maxWidth: "100%",
10537
- maxHeight: s == "browser" && x && !g && a == "compact" ? "100%" : s == "serverside" ? "unset" : "100%",
10537
+ maxHeight: s == "browser" && v && !g && a == "compact" ? "100%" : s == "serverside" ? "unset" : "100%",
10538
10538
  width: "100%",
10539
10539
  height: a === "compact" ? "auto" : "100%",
10540
10540
  margin: a === "compact" ? "5px auto" : "0px",
@@ -10549,7 +10549,7 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u,
10549
10549
  }, children: /* @__PURE__ */ I(_e, { direction: "row", gap: 2, alignItems: "center", children: [
10550
10550
  /* @__PURE__ */ t(Oo, { size: 60 }),
10551
10551
  /* @__PURE__ */ t(Ee, { variant: "h4", color: "text.secondary", align: "center", children: "Loading..." })
10552
- ] }) }) : e != null && e.src ? /* @__PURE__ */ t("div", { className: "iframe-container", children: /* @__PURE__ */ t("iframe", { src: `${e == null ? void 0 : e.src}`, style: { minHeight: "80vh", width: "100%", borderRadius: "var(--radius-md)" } }) }) : /* @__PURE__ */ t("div", { id: `container-table_${(e == null ? void 0 : e.id) ?? "idnull"}_${a}_${x}`, children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: (e == null ? void 0 : e.html) ?? "" } }) });
10552
+ ] }) }) : e != null && e.src ? /* @__PURE__ */ t("div", { className: "iframe-container", children: /* @__PURE__ */ t("iframe", { src: `${e == null ? void 0 : e.src}`, style: { minHeight: "80vh", width: "100%", borderRadius: "var(--radius-md)" } }) }) : /* @__PURE__ */ t("div", { id: `container-table_${(e == null ? void 0 : e.id) ?? "idnull"}_${a}_${v}`, children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: (e == null ? void 0 : e.html) ?? "" } }) });
10553
10553
  }
10554
10554
  n(S, "getHtmlContent");
10555
10555
  function d(y) {
@@ -10558,12 +10558,12 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u,
10558
10558
  }, "handleImageLoad"), h = /* @__PURE__ */ n(() => {
10559
10559
  }, "handleImageError");
10560
10560
  return /* @__PURE__ */ I(se, { sx: {
10561
- display: a === "compact" && x === !1 ? "flex" : "block",
10561
+ display: a === "compact" && v === !1 ? "flex" : "block",
10562
10562
  textAlign: "center",
10563
10563
  justifyContent: a === "compact" ? "center" : "auto",
10564
- boxSizing: a === "compact" && x === !1 ? "border-box" : "auto",
10564
+ boxSizing: a === "compact" && v === !1 ? "border-box" : "auto",
10565
10565
  maxWidth: "100%",
10566
- maxHeight: s == "browser" && x && !g && a == "compact" ? "100%" : s == "serverside" ? "unset" : "100%",
10566
+ maxHeight: s == "browser" && v && !g && a == "compact" ? "100%" : s == "serverside" ? "unset" : "100%",
10567
10567
  width: "100%",
10568
10568
  height: a === "compact" ? "auto" : "100%",
10569
10569
  margin: a === "compact" ? "5px auto" : "0px",
@@ -10571,14 +10571,14 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u,
10571
10571
  minWidth: a === "compact" && s == "browser" ? "100%" : "300px",
10572
10572
  backgroundColor: T.palette.background.default,
10573
10573
  borderRadius: "10px",
10574
- border: x ? s == "browser" ? "1px solid" : "none" : "1px solid",
10574
+ border: v ? s == "browser" ? "1px solid" : "none" : "1px solid",
10575
10575
  borderColor: "divider",
10576
10576
  overflow: a === "compact" ? "hidden" : "auto",
10577
10577
  position: "relative"
10578
10578
  // For overlay positioning
10579
10579
  }, children: [
10580
10580
  s === "browser" && E,
10581
- x && /* @__PURE__ */ t(Ic, { onClick: /* @__PURE__ */ n(() => m ? m(y) : console.log("No subscriber"), "onClick"), sx: {
10581
+ v && /* @__PURE__ */ t(Ic, { onClick: /* @__PURE__ */ n(() => m ? m(y) : console.log("No subscriber"), "onClick"), sx: {
10582
10582
  position: "absolute",
10583
10583
  right: "0",
10584
10584
  top: "0",
@@ -10625,14 +10625,14 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u,
10625
10625
  )
10626
10626
  ] });
10627
10627
  }
10628
- return n(d, "getEmbbedImage"), (v = e == null ? void 0 : e.mimeType) != null && v.startsWith("image") ? d(e) : u ? w() : S((e == null ? void 0 : e.html) ?? "", !1);
10628
+ return n(d, "getEmbbedImage"), (x = e == null ? void 0 : e.mimeType) != null && x.startsWith("image") ? d(e) : u ? w() : S((e == null ? void 0 : e.html) ?? "", !1);
10629
10629
  }, "ArtifactRender"), Gp = /* @__PURE__ */ n(({
10630
10630
  text: e,
10631
10631
  totalTime: a,
10632
10632
  initialDelay: l,
10633
10633
  useMarkdown: u = !1
10634
10634
  }) => {
10635
- const [m, s] = Q(""), x = pe(!1);
10635
+ const [m, s] = Q(""), v = pe(!1);
10636
10636
  return le(() => {
10637
10637
  s("");
10638
10638
  const g = [...e], E = Jc(g, e.length / 100).map((D) => D.join(""));
@@ -10642,22 +10642,22 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: u,
10642
10642
  let w = "", S = l;
10643
10643
  const d = [];
10644
10644
  w = ":thumbsup: OK!";
10645
- const v = setTimeout(() => {
10645
+ const x = setTimeout(() => {
10646
10646
  s(":thumbsup: OK!");
10647
10647
  }, 0);
10648
- return d.push(v), E.forEach((y, b) => {
10648
+ return d.push(x), E.forEach((y, b) => {
10649
10649
  w += y;
10650
10650
  const p = w, z = (Math.random() - 0.5) * 2 * k, h = Math.max(150, D + z);
10651
10651
  S += h;
10652
10652
  const A = setTimeout(() => {
10653
- b == E.length - 1 && (x.current = !0), s(p);
10653
+ b == E.length - 1 && (v.current = !0), s(p);
10654
10654
  }, S);
10655
10655
  d.push(A);
10656
10656
  }), () => {
10657
10657
  d.forEach((y) => clearTimeout(y));
10658
10658
  };
10659
10659
  }, l);
10660
- }, [e, a, l]), x.current ? u ? /* @__PURE__ */ t(Pt, { sessionId: "", text: e }) : /* @__PURE__ */ t(re, { children: e }) : u ? /* @__PURE__ */ t(Pt, { sessionId: "", text: m }) : /* @__PURE__ */ t(re, { children: m });
10660
+ }, [e, a, l]), v.current ? u ? /* @__PURE__ */ t(Pt, { sessionId: "", text: e }) : /* @__PURE__ */ t(re, { children: e }) : u ? /* @__PURE__ */ t(Pt, { sessionId: "", text: m }) : /* @__PURE__ */ t(re, { children: m });
10661
10661
  }, "DelayTextComponent"), Jp = /* @__PURE__ */ new Set(["livetsx", "tsx", "jsx"]), Yp = /<div\b[^>]*\bdata-envision-livetsx="loading"[^>]*><\/div>/i, Ii = /<div\b[^>]*\bdata-envision-livetsx="loading"[^>]*><\/div>/gi, qs = /<i data-lt-tick><\/i>/g, Qp = 2e3, Xp = 100, Zp = /```(?:liveTsx|tsx|jsx)\s*\n[\s\S]*?\n```/i;
10662
10662
  function eh(e, a) {
10663
10663
  let l = -1, u;
@@ -10667,7 +10667,7 @@ function eh(e, a) {
10667
10667
  if (l === -1) return [0, 0];
10668
10668
  const s = e.slice(l);
10669
10669
  if (Zp.test(s)) return [0, 0];
10670
- const x = s.match(qs), g = x ? x.length : 0, T = Math.max(1, a / Xp);
10670
+ const v = s.match(qs), g = v ? v.length : 0, T = Math.max(1, a / Xp);
10671
10671
  return [Math.min(g / T, 1), g];
10672
10672
  }
10673
10673
  n(eh, "computeProgress");
@@ -10679,8 +10679,8 @@ function th(e) {
10679
10679
  if (!l) return null;
10680
10680
  const m = e.slice(l.index + l[0].length);
10681
10681
  if (/^```\s*$/m.test(m)) return null;
10682
- const x = e.slice(0, l.index), g = m.replace(/^\n/, "");
10683
- return { before: x, partialCode: g };
10682
+ const v = e.slice(0, l.index), g = m.replace(/^\n/, "");
10683
+ return { before: v, partialCode: g };
10684
10684
  }
10685
10685
  n(th, "extractTrailingUnclosedFence");
10686
10686
  const nh = /^\{\{\s*Component:\s*([\w-]+)\s*\}\}$/;
@@ -10700,14 +10700,14 @@ function Vs(e, a) {
10700
10700
  let m = null;
10701
10701
  const s = th(e);
10702
10702
  s && (e = s.before, m = s.partialCode);
10703
- const x = nu().use(ru).parse(e), g = [];
10703
+ const v = nu().use(ru).parse(e), g = [];
10704
10704
  let T = [], E = !1;
10705
10705
  const D = /* @__PURE__ */ n(() => {
10706
10706
  if (T.length === 0) return;
10707
10707
  const k = ou({ type: "root", children: T });
10708
10708
  k.trim() && g.push({ type: "markdown", content: k }), T = [];
10709
10709
  }, "flushBuffer");
10710
- for (const k of x.children) {
10710
+ for (const k of v.children) {
10711
10711
  if (k.type === "html" && Yp.test(k.value)) {
10712
10712
  D(), E = !0;
10713
10713
  continue;
@@ -10743,7 +10743,7 @@ const oh = /* @__PURE__ */ n(({ maxCharsForFull: e, children: a }) => {
10743
10743
  partial: u,
10744
10744
  eventBusService: m,
10745
10745
  onLinkClicked: s,
10746
- message: x,
10746
+ message: v,
10747
10747
  onGoing: g,
10748
10748
  friendlyMode: T
10749
10749
  }) => {
@@ -10752,12 +10752,12 @@ const oh = /* @__PURE__ */ n(({ maxCharsForFull: e, children: a }) => {
10752
10752
  [k, D]
10753
10753
  );
10754
10754
  return w.filter((d) => {
10755
- var v;
10756
- return (((v = d.code) == null ? void 0 : v.indexOf("<!--liveTsx:invalid-->")) ?? -1) > -1;
10757
- }).length > 0 ? null : w.map((d, v) => {
10755
+ var x;
10756
+ return (((x = d.code) == null ? void 0 : x.indexOf("<!--liveTsx:invalid-->")) ?? -1) > -1;
10757
+ }).length > 0 ? null : w.map((d, x) => {
10758
10758
  var y, b;
10759
10759
  if (d.type === "slot") {
10760
- const p = (y = x == null ? void 0 : x.parts) == null ? void 0 : y.find(
10760
+ const p = (y = v == null ? void 0 : v.parts) == null ? void 0 : y.find(
10761
10761
  (h) => ot.uiSlotId(h) === d.slotId
10762
10762
  ), z = ((b = E == null ? void 0 : E.partRenderers) == null ? void 0 : b.uiTool) ?? fa.uiTool;
10763
10763
  return !p || !z ? null : /* @__PURE__ */ t(
@@ -10776,7 +10776,7 @@ const oh = /* @__PURE__ */ n(({ maxCharsForFull: e, children: a }) => {
10776
10776
  z,
10777
10777
  {
10778
10778
  part: p,
10779
- message: x,
10779
+ message: v,
10780
10780
  onGoing: g ?? !1,
10781
10781
  preview: u,
10782
10782
  onLinkClicked: s,
@@ -10795,7 +10795,7 @@ const oh = /* @__PURE__ */ n(({ maxCharsForFull: e, children: a }) => {
10795
10795
  sessionId: a,
10796
10796
  onLinkClicked: s
10797
10797
  },
10798
- v
10798
+ x
10799
10799
  );
10800
10800
  });
10801
10801
  }, "LlmResponseRender"), Io = Symbol.for("envision:module-registry-extensions");
@@ -10892,7 +10892,7 @@ function Ti(e) {
10892
10892
  }
10893
10893
  n(Ti, "unitFromIndex");
10894
10894
  const _o = 15, ch = /* @__PURE__ */ n(() => {
10895
- const e = wt(), a = e.palette.mode === "dark", l = Ge(e.palette.text.primary, a ? 0.1 : 0.08), u = Ge(e.palette.text.primary, a ? 0.22 : 0.18), m = Ge(e.palette.text.primary, a ? 0.18 : 0.14), s = Ge(e.palette.text.primary, a ? 0.22 : 0.18), x = Ge(e.palette.text.primary, a ? 0.13 : 0.1), { bars: g, linePoints: T } = Ce(() => {
10895
+ const e = wt(), a = e.palette.mode === "dark", l = Ge(e.palette.text.primary, a ? 0.1 : 0.08), u = Ge(e.palette.text.primary, a ? 0.22 : 0.18), m = Ge(e.palette.text.primary, a ? 0.18 : 0.14), s = Ge(e.palette.text.primary, a ? 0.22 : 0.18), v = Ge(e.palette.text.primary, a ? 0.13 : 0.1), { bars: g, linePoints: T } = Ce(() => {
10896
10896
  const E = Array.from({ length: _o }, (_, j) => 0.18 + Ti(j) * 0.78), D = Array.from({ length: _o }, (_, j) => 0.18 + Ti(j + 100) * 0.78), k = 360, w = 160, S = 14, d = 12, y = w - d - 18, b = d + 6, p = y - b, z = (k - S * 2) / _o, h = z * 0.52, A = E.map((_, j) => {
10897
10897
  const N = _ * p, B = S + j * z + (z - h) / 2, J = y - N;
10898
10898
  return { x: B, y: J, w: h, h: N };
@@ -10951,7 +10951,7 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
10951
10951
  y1: "130",
10952
10952
  x2: "346",
10953
10953
  y2: "130",
10954
- stroke: x,
10954
+ stroke: v,
10955
10955
  strokeWidth: "1",
10956
10956
  strokeLinecap: "square"
10957
10957
  }
@@ -11030,7 +11030,7 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
11030
11030
  children: Array.from({ length: e }, (u, m) => /* @__PURE__ */ t(Xs, { showIcon: a, showChangeRow: l }, m))
11031
11031
  }
11032
11032
  ), "MetricGroupSkeleton"), dh = /* @__PURE__ */ n(({ columns: e = 5, rows: a = 10 }) => {
11033
- const l = wt(), u = Array.from({ length: e }, (E, D) => D), m = Array.from({ length: a }, (E, D) => D), s = l.palette.mode === "dark" ? Ge(l.palette.grey[700], 0.55) : Ge(l.palette.grey[300], 0.6), x = Ge(l.palette.divider, l.palette.mode === "dark" ? 0.9 : 1), g = Ge(l.palette.divider, 0.6), T = Ge(
11033
+ const l = wt(), u = Array.from({ length: e }, (E, D) => D), m = Array.from({ length: a }, (E, D) => D), s = l.palette.mode === "dark" ? Ge(l.palette.grey[700], 0.55) : Ge(l.palette.grey[300], 0.6), v = Ge(l.palette.divider, l.palette.mode === "dark" ? 0.9 : 1), g = Ge(l.palette.divider, 0.6), T = Ge(
11034
11034
  l.palette.common.white,
11035
11035
  l.palette.mode === "dark" ? 0.12 : 0.35
11036
11036
  );
@@ -11050,7 +11050,7 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
11050
11050
  padding: "10px 12px",
11051
11051
  textAlign: "left",
11052
11052
  backgroundColor: s,
11053
- borderBottom: `1px solid ${x}`
11053
+ borderBottom: `1px solid ${v}`
11054
11054
  },
11055
11055
  children: /* @__PURE__ */ t(
11056
11056
  Kt,
@@ -11103,7 +11103,7 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
11103
11103
  [1e6, "Mb"],
11104
11104
  [1e3, "Kb"]
11105
11105
  ], hh = /* @__PURE__ */ n(({ progress: e = 0, bytes: a }) => {
11106
- const l = wt(), u = l.palette.primary.main, m = l.palette.primary.softBg, s = l.palette.text.secondary, x = 10, g = [
11106
+ const l = wt(), u = l.palette.primary.main, m = l.palette.primary.softBg, s = l.palette.text.secondary, v = 10, g = [
11107
11107
  { x: 0, h: 50, acc: 0 },
11108
11108
  { x: 0, h: 65, acc: 0 },
11109
11109
  { x: 0, h: 60, acc: 0 },
@@ -11114,7 +11114,7 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
11114
11114
  ], T = 220 / g.length * 0.9, E = 220 / g.length * 0.8, D = 78, k = 2;
11115
11115
  let w = 0;
11116
11116
  for (let b = 0; b < g.length; b++)
11117
- w += g[b].h, g[b].acc = w, g[b].x = x + b * T;
11117
+ w += g[b].h, g[b].acc = w, g[b].x = v + b * T;
11118
11118
  function S(b, p = 2, z = !0) {
11119
11119
  const h = Math.abs(b);
11120
11120
  for (const [A, c] of ph)
@@ -11123,7 +11123,7 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
11123
11123
  return b.toFixed(0) + "b";
11124
11124
  }
11125
11125
  n(S, "formatCompact");
11126
- const d = g.reduce((b, p) => b + p.h, 0), v = e * d, y = /* @__PURE__ */ n((b) => g[b].h - Math.max(g[b].acc - v, 0), "barFill");
11126
+ const d = g.reduce((b, p) => b + p.h, 0), x = e * d, y = /* @__PURE__ */ n((b) => g[b].h - Math.max(g[b].acc - x, 0), "barFill");
11127
11127
  return /* @__PURE__ */ I(
11128
11128
  se,
11129
11129
  {
@@ -11275,19 +11275,19 @@ function mh(e, a) {
11275
11275
  }
11276
11276
  }
11277
11277
  if (u.size === 0 && m.size === 0) return null;
11278
- const x = ["LiveTsx: bundled JS references bindings that are not in the scope."];
11278
+ const v = ["LiveTsx: bundled JS references bindings that are not in the scope."];
11279
11279
  if (u.size > 0) {
11280
- x.push(""), x.push("Unregistered modules:");
11281
- for (const g of u) x.push(` • "${g}"`);
11282
- x.push(' Register via extendModuleRegistry("<specifier>", { ...exports }) before mounting the chat.');
11280
+ v.push(""), v.push("Unregistered modules:");
11281
+ for (const g of u) v.push(` • "${g}"`);
11282
+ v.push(' Register via extendModuleRegistry("<specifier>", { ...exports }) before mounting the chat.');
11283
11283
  }
11284
11284
  if (m.size > 0) {
11285
- x.push(""), x.push("Missing named exports:");
11285
+ v.push(""), v.push("Missing named exports:");
11286
11286
  for (const [g, T] of m)
11287
- x.push(` • "${g}" → ${Array.from(T).map((E) => `'${E}'`).join(", ")}`);
11288
- x.push(' Add these via extendModuleRegistry("' + Array.from(m.keys())[0] + '", { Chart, Metric, … }).');
11287
+ v.push(` • "${g}" → ${Array.from(T).map((E) => `'${E}'`).join(", ")}`);
11288
+ v.push(' Add these via extendModuleRegistry("' + Array.from(m.keys())[0] + '", { Chart, Metric, … }).');
11289
11289
  }
11290
- return new Error(x.join(`
11290
+ return new Error(v.join(`
11291
11291
  `));
11292
11292
  }
11293
11293
  n(mh, "checkScopeBindings");
@@ -11329,11 +11329,11 @@ const Sa = class Sa extends ct.Component {
11329
11329
  n(Sa, "JsxErrorBoundary");
11330
11330
  let jr = Sa;
11331
11331
  const vh = /* @__PURE__ */ n(({ code: e, partial: a, scope: l, progress: u = 0, bytes: m = 0 }) => {
11332
- const [s, x] = Q(null);
11332
+ const [s, v] = Q(null);
11333
11333
  le(() => {
11334
11334
  let h = !1;
11335
11335
  return lh().then((A) => {
11336
- h || x(A);
11336
+ h || v(A);
11337
11337
  }).catch((A) => {
11338
11338
  console.error("[LiveJsxBlock] Failed to load module registry:", A);
11339
11339
  }), () => {
@@ -11374,23 +11374,23 @@ const vh = /* @__PURE__ */ n(({ code: e, partial: a, scope: l, progress: u = 0,
11374
11374
  h.message
11375
11375
  ] }),
11376
11376
  /* @__PURE__ */ t("pre", { style: { fontSize: "0.8em", overflow: "auto", margin: 0, opacity: 0.7, whiteSpace: "pre-wrap" }, children: /* @__PURE__ */ t("code", { children: e }) })
11377
- ] }), "errorFallback"), D = wt(), k = a || !g, w = !k && !!T.error, [S, d] = Q(() => k ? "partial" : "final"), v = pe(null), y = pe(null);
11377
+ ] }), "errorFallback"), D = wt(), k = a || !g, w = !k && !!T.error, [S, d] = Q(() => k ? "partial" : "final"), x = pe(null), y = pe(null);
11378
11378
  if (Xa(() => {
11379
11379
  if (S === "partial" && !k && !w) {
11380
- const h = v.current, A = (h == null ? void 0 : h.offsetHeight) ?? 0;
11380
+ const h = x.current, A = (h == null ? void 0 : h.offsetHeight) ?? 0;
11381
11381
  h && A > 0 && (h.style.height = `${A}px`), d("arriving");
11382
11382
  } else if (S !== "partial" && k) {
11383
- const h = v.current;
11383
+ const h = x.current;
11384
11384
  h && (h.style.height = "", h.style.transition = ""), d("partial");
11385
11385
  }
11386
11386
  }, [S, k, w]), Xa(() => {
11387
11387
  if (S !== "arriving") return;
11388
- const h = v.current, A = y.current;
11388
+ const h = x.current, A = y.current;
11389
11389
  if (!h || !A) return;
11390
11390
  const c = A.offsetHeight;
11391
11391
  h.offsetHeight, h.style.transition = "height 1500ms cubic-bezier(0.16, 1, 0.3, 1)", h.style.height = `${c}px`;
11392
11392
  const _ = window.setTimeout(() => {
11393
- const j = v.current;
11393
+ const j = x.current;
11394
11394
  j && (j.style.height = "", j.style.transition = ""), d("final");
11395
11395
  }, 1500);
11396
11396
  return () => window.clearTimeout(_);
@@ -11404,7 +11404,7 @@ ${e}\`\`\``, sessionId: "" }) }) })
11404
11404
  return /* @__PURE__ */ I(
11405
11405
  se,
11406
11406
  {
11407
- ref: v,
11407
+ ref: x,
11408
11408
  sx: {
11409
11409
  position: "relative",
11410
11410
  overflow: "hidden",
@@ -11720,19 +11720,19 @@ ${e}\`\`\``, sessionId: "" }) }) })
11720
11720
  fill: m = !0,
11721
11721
  strokeWidth: s = 1.5
11722
11722
  }) => {
11723
- const x = bt(), g = a ?? x.palette.primary.main, T = mc();
11723
+ const v = bt(), g = a ?? v.palette.primary.main, T = mc();
11724
11724
  if (!e || e.length === 0) return null;
11725
11725
  const E = Math.max(...e), D = Math.min(...e), k = E - D || 1, w = e.length > 1 ? l / (e.length - 1) : l, d = e.map((y, b) => [
11726
11726
  b * w,
11727
11727
  u - (y - D) / k * (u - 4) - 2
11728
- ]).map((y, b) => (b === 0 ? "M" : "L") + y[0].toFixed(1) + "," + y[1].toFixed(1)).join(" "), v = `${d} L${l},${u} L0,${u} Z`;
11728
+ ]).map((y, b) => (b === 0 ? "M" : "L") + y[0].toFixed(1) + "," + y[1].toFixed(1)).join(" "), x = `${d} L${l},${u} L0,${u} Z`;
11729
11729
  return /* @__PURE__ */ I("svg", { width: l, height: u, style: { display: "block" }, "aria-hidden": !0, children: [
11730
11730
  m && /* @__PURE__ */ I(re, { children: [
11731
11731
  /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ I("linearGradient", { id: T, x1: "0", x2: "0", y1: "0", y2: "1", children: [
11732
11732
  /* @__PURE__ */ t("stop", { offset: "0%", stopColor: g, stopOpacity: 0.25 }),
11733
11733
  /* @__PURE__ */ t("stop", { offset: "100%", stopColor: g, stopOpacity: 0 })
11734
11734
  ] }) }),
11735
- /* @__PURE__ */ t("path", { d: v, fill: `url(#${T})` })
11735
+ /* @__PURE__ */ t("path", { d: x, fill: `url(#${T})` })
11736
11736
  ] }),
11737
11737
  /* @__PURE__ */ t(
11738
11738
  "path",
@@ -11793,26 +11793,26 @@ const Mh = 48, tl = /* @__PURE__ */ n(({ views: e, logo: a, footer: l }) => {
11793
11793
  {
11794
11794
  component: rs,
11795
11795
  to: m.to,
11796
- sx: /* @__PURE__ */ n((x) => ({
11796
+ sx: /* @__PURE__ */ n((v) => ({
11797
11797
  width: 32,
11798
11798
  height: 32,
11799
11799
  display: "inline-flex",
11800
11800
  alignItems: "center",
11801
11801
  justifyContent: "center",
11802
- borderRadius: `${x.shape.radiusSm}px`,
11802
+ borderRadius: `${v.shape.radiusSm}px`,
11803
11803
  // Active icon picks up the brand amber so
11804
11804
  // it reads as "selected" at a glance — the
11805
11805
  // previous text-primary + raised-bg combo
11806
11806
  // was too subtle, especially next to the
11807
11807
  // breadcrumb in the AppBar that names the
11808
11808
  // same view.
11809
- color: s ? x.palette.primary.main : x.palette.text.disabled,
11810
- backgroundColor: s ? x.palette.surface.hover : "transparent",
11809
+ color: s ? v.palette.primary.main : v.palette.text.disabled,
11810
+ backgroundColor: s ? v.palette.surface.hover : "transparent",
11811
11811
  textDecoration: "none",
11812
11812
  transition: "background-color .12s, color .12s",
11813
11813
  "&:hover": {
11814
- backgroundColor: s ? x.palette.surface.hover : x.palette.surface.raised,
11815
- color: s ? x.palette.primary.main : x.palette.text.primary
11814
+ backgroundColor: s ? v.palette.surface.hover : v.palette.surface.raised,
11815
+ color: s ? v.palette.primary.main : v.palette.text.primary
11816
11816
  }
11817
11817
  }), "sx"),
11818
11818
  "aria-label": m.label,
@@ -11835,7 +11835,7 @@ const nl = 48, rl = /* @__PURE__ */ n(({
11835
11835
  rightAccessory: u,
11836
11836
  onSearchClick: m,
11837
11837
  searchPlaceholder: s = "Buscar dashboards, métricas…",
11838
- hideSearch: x = !1,
11838
+ hideSearch: v = !1,
11839
11839
  searchSlot: g,
11840
11840
  hamburger: T,
11841
11841
  compact: E = !1
@@ -11875,7 +11875,7 @@ const nl = 48, rl = /* @__PURE__ */ n(({
11875
11875
  /* @__PURE__ */ t(R, { sx: /* @__PURE__ */ n((k) => ({ display: "flex", alignItems: "center", gap: 0.75, fontSize: 12, color: k.palette.text.secondary, minWidth: 0, overflow: "hidden" }), "sx"), children: l })
11876
11876
  ] }),
11877
11877
  /* @__PURE__ */ t(R, { sx: { flex: 1 } }),
11878
- !(x || E) && (g ?? /* @__PURE__ */ I(
11878
+ !(v || E) && (g ?? /* @__PURE__ */ I(
11879
11879
  R,
11880
11880
  {
11881
11881
  role: "button",
@@ -11945,7 +11945,7 @@ const zh = 300, ol = [
11945
11945
  width: u = zh,
11946
11946
  logo: m,
11947
11947
  productName: s = "Agentic Explorer",
11948
- userProfile: x,
11948
+ userProfile: v,
11949
11949
  sessionsList: g,
11950
11950
  dashboardsList: T,
11951
11951
  closeOnNavigate: E = !0
@@ -11959,20 +11959,20 @@ const zh = 300, ol = [
11959
11959
  component: rs,
11960
11960
  to: S.to,
11961
11961
  onClick: /* @__PURE__ */ n(() => E && a(), "onClick"),
11962
- sx: /* @__PURE__ */ n((v) => ({
11962
+ sx: /* @__PURE__ */ n((x) => ({
11963
11963
  display: "flex",
11964
11964
  alignItems: "center",
11965
11965
  gap: 1.5,
11966
11966
  px: 1.5,
11967
11967
  py: 1.25,
11968
- borderRadius: `${v.shape.radiusSm}px`,
11969
- color: d ? v.palette.primary.main : v.palette.text.secondary,
11970
- backgroundColor: d ? v.palette.surface.hover : "transparent",
11968
+ borderRadius: `${x.shape.radiusSm}px`,
11969
+ color: d ? x.palette.primary.main : x.palette.text.secondary,
11970
+ backgroundColor: d ? x.palette.surface.hover : "transparent",
11971
11971
  textDecoration: "none",
11972
11972
  transition: "background-color .12s, color .12s",
11973
11973
  "&:hover": {
11974
- backgroundColor: v.palette.surface.raised,
11975
- color: d ? v.palette.primary.main : v.palette.text.primary
11974
+ backgroundColor: x.palette.surface.raised,
11975
+ color: d ? x.palette.primary.main : x.palette.text.primary
11976
11976
  }
11977
11977
  }), "sx"),
11978
11978
  "aria-current": d ? "page" : void 0,
@@ -12081,7 +12081,7 @@ const zh = 300, ol = [
12081
12081
  children: k
12082
12082
  }
12083
12083
  ),
12084
- x && /* @__PURE__ */ t(
12084
+ v && /* @__PURE__ */ t(
12085
12085
  R,
12086
12086
  {
12087
12087
  sx: /* @__PURE__ */ n((S) => ({
@@ -12090,7 +12090,7 @@ const zh = 300, ol = [
12090
12090
  px: 1.5,
12091
12091
  py: 1
12092
12092
  }), "sx"),
12093
- children: x
12093
+ children: v
12094
12094
  }
12095
12095
  )
12096
12096
  ]
@@ -12171,20 +12171,20 @@ const ba = /* @__PURE__ */ n(() => {
12171
12171
  u == null ? void 0 : u.subAgentId
12172
12172
  ),
12173
12173
  [u == null ? void 0 : u.eventName, u == null ? void 0 : u.eventData, u == null ? void 0 : u.subAgentId]
12174
- ), s = de((S) => S.currentMessage), x = de((S) => S.messages), g = Ce(() => {
12175
- const S = s ?? (x == null ? void 0 : x[x.length - 1]) ?? null;
12174
+ ), s = de((S) => S.currentMessage), v = de((S) => S.messages), g = Ce(() => {
12175
+ const S = s ?? (v == null ? void 0 : v[v.length - 1]) ?? null;
12176
12176
  if (!(S != null && S.parts)) return null;
12177
12177
  for (let d = S.parts.length - 1; d >= 0; d--) {
12178
- const v = S.parts[d];
12179
- if (!(v.eventType === "function_call" || v.eventType === "partial_function_call" || v.eventType === "function_response")) continue;
12180
- const b = v.functionDetails;
12178
+ const x = S.parts[d];
12179
+ if (!(x.eventType === "function_call" || x.eventType === "partial_function_call" || x.eventType === "function_response")) continue;
12180
+ const b = x.functionDetails;
12181
12181
  if (!b || b.silent) continue;
12182
- const p = v.eventType === "function_response" ? "response" : v.eventType === "partial_function_call" || b.status === "Composing" ? "partial" : "call", h = Jn(b.name, p, b.args ?? b.text, !1);
12182
+ const p = x.eventType === "function_response" ? "response" : x.eventType === "partial_function_call" || b.status === "Composing" ? "partial" : "call", h = Jn(b.name, p, b.args ?? b.text, !1);
12183
12183
  if (h)
12184
12184
  return { label: h };
12185
12185
  }
12186
12186
  return null;
12187
- }, [s, x]), T = (m == null ? void 0 : m.items.length) ?? 0, E = (m == null ? void 0 : m.items.filter(
12187
+ }, [s, v]), T = (m == null ? void 0 : m.items.length) ?? 0, E = (m == null ? void 0 : m.items.filter(
12188
12188
  (S) => String(S.status).toLowerCase() === "completed"
12189
12189
  ).length) ?? 0, D = Ce(() => {
12190
12190
  if (m != null && m.currentWorkingItemKey) {
@@ -12194,8 +12194,8 @@ const ba = /* @__PURE__ */ n(() => {
12194
12194
  const S = m == null ? void 0 : m.items.find(
12195
12195
  (y) => String(y.status).toLowerCase() === "in_progress"
12196
12196
  );
12197
- let v = `${S != null && S.label ? `${S == null ? void 0 : S.label} - ` : ""}`;
12198
- return u != null && u.eventName && u.eventName !== "todolistUpdated" && (v += Ph(u.eventName)), v += (g == null ? void 0 : g.label) ?? "", v == "" && a && (v = "em execução…"), a || (v = "Conectado"), v;
12197
+ let x = `${S != null && S.label ? `${S == null ? void 0 : S.label} - ` : ""}`;
12198
+ return u != null && u.eventName && u.eventName !== "todolistUpdated" && (x += Ph(u.eventName)), x += (g == null ? void 0 : g.label) ?? "", x == "" && a && (x = "em execução…"), a || (x = "Conectado"), x;
12199
12199
  }, [m, g, u == null ? void 0 : u.eventName, a]), k = Ce(() => {
12200
12200
  switch (l) {
12201
12201
  case ke.Connected:
@@ -12298,19 +12298,19 @@ const Fh = 440, jh = 480, sl = In((e, a) => {
12298
12298
  chatPositionOffSet: u,
12299
12299
  fabContent: m,
12300
12300
  width: s = Fh,
12301
- height: x = jh,
12301
+ height: v = jh,
12302
12302
  title: g = "Assistente",
12303
12303
  onVisibleQuestionChange: T,
12304
12304
  onFloatingOpened: E,
12305
12305
  ...D
12306
- } = e, k = { bottom: 20, right: 20, ...l }, [w, S] = Q(!1), [d, v] = Q(null), y = ye(
12306
+ } = e, k = { bottom: 20, right: 20, ...l }, [w, S] = Q(!1), [d, x] = Q(null), y = ye(
12307
12307
  (_) => {
12308
12308
  let j = _;
12309
12309
  if (e.onRenderPrompt && _) {
12310
12310
  const { promptAsString: N } = e.onRenderPrompt(_);
12311
12311
  j = N ?? null;
12312
12312
  }
12313
- v(j ?? ""), T == null || T(_);
12313
+ x(j ?? ""), T == null || T(_);
12314
12314
  },
12315
12315
  [T, e.onRenderPrompt]
12316
12316
  ), b = (d == null ? void 0 : d.trim()) || g, p = k.bottom != null ? k.bottom + ((u == null ? void 0 : u.bottom) ?? 0) : void 0, z = k.right != null ? k.right + ((u == null ? void 0 : u.right) ?? 0) : void 0, h = k.left != null ? k.left + ((u == null ? void 0 : u.left) ?? 0) : void 0, A = k.top != null ? k.top + ((u == null ? void 0 : u.top) ?? 0) : void 0, c = /* @__PURE__ */ n(() => {
@@ -12328,7 +12328,7 @@ const Fh = 440, jh = 480, sl = In((e, a) => {
12328
12328
  right: z,
12329
12329
  left: h,
12330
12330
  width: s,
12331
- height: x,
12331
+ height: v,
12332
12332
  backgroundColor: _.palette.background.paper,
12333
12333
  border: `1px solid ${_.palette.divider}`,
12334
12334
  borderRadius: `${_.shape.radiusLg}px`,
@@ -12556,9 +12556,9 @@ const Lh = /* @__PURE__ */ n(({
12556
12556
  m.current = e;
12557
12557
  const s = Math.max(20, 1e3 / a);
12558
12558
  u("-");
12559
- let x = 0;
12559
+ let v = 0;
12560
12560
  const g = window.setInterval(() => {
12561
- x += 1, u(e.slice(0, x)), x >= e.length && window.clearInterval(g);
12561
+ v += 1, u(e.slice(0, v)), v >= e.length && window.clearInterval(g);
12562
12562
  }, s);
12563
12563
  return () => window.clearInterval(g);
12564
12564
  }, [e, a]), /* @__PURE__ */ t(re, { children: l });
@@ -12569,7 +12569,7 @@ const Lh = /* @__PURE__ */ n(({
12569
12569
  onSelect: u,
12570
12570
  onNewSession: m,
12571
12571
  onRename: s,
12572
- onDelete: x,
12572
+ onDelete: v,
12573
12573
  footer: g,
12574
12574
  header: T,
12575
12575
  searchPlaceholder: E,
@@ -12577,7 +12577,7 @@ const Lh = /* @__PURE__ */ n(({
12577
12577
  }) => {
12578
12578
  const [k, w] = Q("");
12579
12579
  Ce(() => e.reduce((U, ne) => U + ne.items.length, 0), [e]);
12580
- const S = E ?? "Buscar...", [d, v] = Q(null), y = /* @__PURE__ */ n(() => v(null), "closeMenu"), [b, p] = Q(null), [z, h] = Q(""), A = pe(null), c = pe(!1), _ = /* @__PURE__ */ n((U) => {
12580
+ const S = E ?? "Buscar...", [d, x] = Q(null), y = /* @__PURE__ */ n(() => x(null), "closeMenu"), [b, p] = Q(null), [z, h] = Q(""), A = pe(null), c = pe(!1), _ = /* @__PURE__ */ n((U) => {
12581
12581
  U && (U.style.height = "auto", U.style.height = `${Math.min(U.scrollHeight, 80)}px`);
12582
12582
  }, "fitTextarea");
12583
12583
  le(() => {
@@ -12598,7 +12598,7 @@ const Lh = /* @__PURE__ */ n(({
12598
12598
  }, "commitRename"), Z = /* @__PURE__ */ n(() => {
12599
12599
  if (!j) return;
12600
12600
  const U = j;
12601
- N(null), Promise.resolve(x == null ? void 0 : x(U.id));
12601
+ N(null), Promise.resolve(v == null ? void 0 : v(U.id));
12602
12602
  }, "confirmDelete"), K = Ce(() => {
12603
12603
  var Re;
12604
12604
  let U = a ? {
@@ -12688,7 +12688,7 @@ const Lh = /* @__PURE__ */ n(({
12688
12688
  }
12689
12689
  ),
12690
12690
  U.items.map((ne) => {
12691
- const Se = ne.id === l, Re = b === ne.id, Ue = (s || x) && !Re;
12691
+ const Se = ne.id === l, Re = b === ne.id, Ue = (s || v) && !Re;
12692
12692
  return /* @__PURE__ */ I(
12693
12693
  R,
12694
12694
  {
@@ -12842,7 +12842,7 @@ const Lh = /* @__PURE__ */ n(({
12842
12842
  size: "small",
12843
12843
  "aria-label": "Mais ações",
12844
12844
  onClick: /* @__PURE__ */ n((G) => {
12845
- G.stopPropagation(), v({ el: G.currentTarget, item: ne });
12845
+ G.stopPropagation(), x({ el: G.currentTarget, item: ne });
12846
12846
  }, "onClick"),
12847
12847
  sx: /* @__PURE__ */ n((G) => ({
12848
12848
  color: G.palette.text.secondary,
@@ -12914,7 +12914,7 @@ const Lh = /* @__PURE__ */ n(({
12914
12914
  ]
12915
12915
  }
12916
12916
  ),
12917
- x && /* @__PURE__ */ I(
12917
+ v && /* @__PURE__ */ I(
12918
12918
  Gt,
12919
12919
  {
12920
12920
  onClick: /* @__PURE__ */ n(() => {
@@ -13071,11 +13071,11 @@ const Qn = /* @__PURE__ */ n(({ todoList: e, dense: a }) => {
13071
13071
  return /* @__PURE__ */ I(re, { children: [
13072
13072
  /* @__PURE__ */ t("style", { children: Bh }),
13073
13073
  /* @__PURE__ */ t(R, { sx: { display: "flex", flexDirection: "column", overflow: "scroll" }, children: e.items.map((m) => {
13074
- const s = Wh(m.status), x = m.key === u;
13074
+ const s = Wh(m.status), v = m.key === u;
13075
13075
  return /* @__PURE__ */ I(
13076
13076
  R,
13077
13077
  {
13078
- ref: x ? l : void 0,
13078
+ ref: v ? l : void 0,
13079
13079
  sx: /* @__PURE__ */ n((g) => ({
13080
13080
  display: "flex",
13081
13081
  alignItems: "flex-start",
@@ -13096,8 +13096,8 @@ const Qn = /* @__PURE__ */ n(({ todoList: e, dense: a }) => {
13096
13096
  sx: /* @__PURE__ */ n((g) => ({
13097
13097
  fontSize: 12,
13098
13098
  lineHeight: 1.4,
13099
- fontWeight: x && s === "in_progress" ? 500 : 400,
13100
- color: s === "pending" ? g.palette.text.disabled : x && s === "in_progress" ? g.palette.primary.main : g.palette.text.primary,
13099
+ fontWeight: v && s === "in_progress" ? 500 : 400,
13100
+ color: s === "pending" ? g.palette.text.disabled : v && s === "in_progress" ? g.palette.primary.main : g.palette.text.primary,
13101
13101
  textDecoration: s === "completed" ? "line-through" : "none",
13102
13102
  // Match the completed TaskDot's success green so the
13103
13103
  // strikethrough reads as "this is done" rather than as
@@ -13157,16 +13157,16 @@ const ya = /* @__PURE__ */ n(({
13157
13157
  defaultLevel: a = 1,
13158
13158
  hideMessageLevel: l = !0
13159
13159
  }) => {
13160
- const [u, m] = Q(a), [s, x] = Q(null), g = de((S) => S.lastToolEvent), T = !e.completed;
13160
+ const [u, m] = Q(a), [s, v] = Q(null), g = de((S) => S.lastToolEvent), T = !e.completed;
13161
13161
  le(() => {
13162
13162
  if ((g == null ? void 0 : g.eventName) === "todolistUpdated" && g.subAgentId === e.id) {
13163
13163
  const S = qh(g.eventData);
13164
- S && x(S);
13164
+ S && v(S);
13165
13165
  }
13166
13166
  }, [g, e.id]);
13167
13167
  const E = Ce(() => {
13168
- const S = (s == null ? void 0 : s.items) ?? [], d = S.filter((b) => String(b.status).toLowerCase() === "completed").length, v = S.length, y = v > 0 ? d / v : 0;
13169
- return { completed: d, total: v, pct: y };
13168
+ const S = (s == null ? void 0 : s.items) ?? [], d = S.filter((b) => String(b.status).toLowerCase() === "completed").length, x = S.length, y = x > 0 ? d / x : 0;
13169
+ return { completed: d, total: x, pct: y };
13170
13170
  }, [s]), D = ye(() => {
13171
13171
  m((S) => S >= (l ? 1 : 2) ? 0 : S + 1);
13172
13172
  }, [l]), k = u >= 1 && ((s == null ? void 0 : s.items.length) ?? 0) > 0, w = u >= 2 && !l;
@@ -13369,7 +13369,7 @@ function Jh({ bytes: e }) {
13369
13369
  },
13370
13370
  "aria-hidden": !0,
13371
13371
  children: Array.from({ length: u }, (m, s) => {
13372
- const x = s < a, g = !x && s === a && l > 0, T = x ? 1 : g ? l : 0;
13372
+ const v = s < a, g = !v && s === a && l > 0, T = v ? 1 : g ? l : 0;
13373
13373
  return /* @__PURE__ */ t(
13374
13374
  R,
13375
13375
  {
@@ -13393,7 +13393,7 @@ function Jh({ bytes: e }) {
13393
13393
  bottom: 0,
13394
13394
  height: `${T * 100}%`,
13395
13395
  backgroundColor: E.palette.primary.main,
13396
- opacity: x ? 0.85 : 0.7,
13396
+ opacity: v ? 0.85 : 0.7,
13397
13397
  transition: "height .15s ease-out",
13398
13398
  animation: g ? "v2aapulse 0.9s ease-in-out infinite" : "none"
13399
13399
  }), "sx")
@@ -13456,7 +13456,7 @@ n(Yh, "ToolGlyph");
13456
13456
  function Qh({ part: e, isLast: a, compact: l = !0 }) {
13457
13457
  const [u, m] = Q(!1), s = e.functionDetails;
13458
13458
  if (!s) return null;
13459
- const x = s.start ? new Date(s.start).getTime() : void 0, g = s.end ? new Date(s.end).getTime() : void 0, T = s.status === "Done" ? "done" : s.status === "Executing" || s.status === "Composing" ? "running" : "pending", E = T === "done" && x && g ? Vh(g - x) : null, D = T === "running", k = s.status === "Composing", w = Ce(() => {
13459
+ const v = s.start ? new Date(s.start).getTime() : void 0, g = s.end ? new Date(s.end).getTime() : void 0, T = s.status === "Done" ? "done" : s.status === "Executing" || s.status === "Composing" ? "running" : "pending", E = T === "done" && v && g ? Vh(g - v) : null, D = T === "running", k = s.status === "Composing", w = Ce(() => {
13460
13460
  if (s.text) return Ir(s.text);
13461
13461
  if (s.args == null) return "";
13462
13462
  if (typeof s.args == "string") return Ir(s.args);
@@ -13472,9 +13472,9 @@ function Qh({ part: e, isLast: a, compact: l = !0 }) {
13472
13472
  } catch {
13473
13473
  return String(s.response);
13474
13474
  }
13475
- }, [s.response]), d = e.eventType === "function_response" ? "response" : e.eventType === "partial_function_call" || k ? "partial" : "call", v = !1, y = Ce(
13476
- () => Jn(s.name, d, s.args ?? s.text, v),
13477
- [s.name, d, s.args, s.text, v]
13475
+ }, [s.response]), d = e.eventType === "function_response" ? "response" : e.eventType === "partial_function_call" || k ? "partial" : "call", x = !1, y = Ce(
13476
+ () => Jn(s.name, d, s.args ?? s.text, x),
13477
+ [s.name, d, s.args, s.text, x]
13478
13478
  ), b = Ce(() => {
13479
13479
  const p = ot.getPartTextContent(e);
13480
13480
  return typeof p == "string" && p.length > 0 ? p.length : w.length;
@@ -13673,7 +13673,7 @@ function e0({
13673
13673
  selectedKey: a,
13674
13674
  onSelect: l
13675
13675
  }) {
13676
- const u = pe(null), [m, s] = Q(!1), [x, g] = Q(!1), T = ye(() => {
13676
+ const u = pe(null), [m, s] = Q(!1), [v, g] = Q(!1), T = ye(() => {
13677
13677
  const k = u.current;
13678
13678
  if (!k) return;
13679
13679
  const w = k.scrollWidth - k.clientWidth;
@@ -13699,30 +13699,30 @@ function e0({
13699
13699
  role: "button",
13700
13700
  tabIndex: 0,
13701
13701
  onClick: d,
13702
- onKeyDown: /* @__PURE__ */ n((v) => {
13703
- (v.key === "Enter" || v.key === " ") && (v.preventDefault(), d());
13702
+ onKeyDown: /* @__PURE__ */ n((x) => {
13703
+ (x.key === "Enter" || x.key === " ") && (x.preventDefault(), d());
13704
13704
  }, "onKeyDown"),
13705
- sx: /* @__PURE__ */ n((v) => ({
13705
+ sx: /* @__PURE__ */ n((x) => ({
13706
13706
  flex: "0 0 auto",
13707
13707
  px: 1.25,
13708
13708
  py: 0.5,
13709
13709
  borderRadius: 999,
13710
13710
  cursor: "pointer",
13711
- backgroundColor: S ? v.palette.surface.raised : "transparent",
13711
+ backgroundColor: S ? x.palette.surface.raised : "transparent",
13712
13712
  // Every pill carries a border so they read as discrete
13713
13713
  // chips even when nothing is selected. The selected
13714
13714
  // state just bumps the border to the brighter `border`
13715
13715
  // tone vs. the muted `borderSoft` on the rest.
13716
- border: `1px solid ${S ? v.palette.divider : v.palette.border.soft}`,
13717
- color: S ? v.palette.text.primary : v.palette.text.secondary,
13718
- fontFamily: v.typography.fontFamily,
13716
+ border: `1px solid ${S ? x.palette.divider : x.palette.border.soft}`,
13717
+ color: S ? x.palette.text.primary : x.palette.text.secondary,
13718
+ fontFamily: x.typography.fontFamily,
13719
13719
  fontSize: 11.5,
13720
13720
  fontWeight: S ? 500 : 400,
13721
13721
  whiteSpace: "nowrap",
13722
13722
  transition: "background-color .12s, color .12s",
13723
13723
  "&:hover": {
13724
- backgroundColor: v.palette.surface.raised,
13725
- color: v.palette.text.primary
13724
+ backgroundColor: x.palette.surface.raised,
13725
+ color: x.palette.text.primary
13726
13726
  }
13727
13727
  }), "sx"),
13728
13728
  children: w
@@ -13796,7 +13796,7 @@ function e0({
13796
13796
  ]
13797
13797
  }
13798
13798
  ),
13799
- x && /* @__PURE__ */ t(
13799
+ v && /* @__PURE__ */ t(
13800
13800
  Je,
13801
13801
  {
13802
13802
  size: "small",
@@ -13824,7 +13824,7 @@ const xa = /* @__PURE__ */ n(({
13824
13824
  compact: m = !0,
13825
13825
  showTurnHistory: s = !1
13826
13826
  }) => {
13827
- const x = de((b) => b.currentMessage), g = de((b) => b.messages), T = de((b) => b.turnOpen), E = Ce(() => {
13827
+ const v = de((b) => b.currentMessage), g = de((b) => b.messages), T = de((b) => b.turnOpen), E = Ce(() => {
13828
13828
  if (!s || !g || g.length === 0) return [];
13829
13829
  const b = /* @__PURE__ */ new Set(["thought", "function_call", "function_response", "partial_function_call"]), p = [...g].sort((h, A) => {
13830
13830
  const c = h.created ? new Date(h.created).getTime() : 0, _ = A.created ? new Date(A.created).getTime() : 0;
@@ -13865,16 +13865,16 @@ const xa = /* @__PURE__ */ n(({
13865
13865
  });
13866
13866
  if (h.forEach((A) => {
13867
13867
  z = z.concat(p(A));
13868
- }), x && kn(x) !== null) {
13869
- const A = kn(x);
13870
- h.some((_) => kn(_) === A) || (z = z.concat(p(x)));
13868
+ }), v && kn(v) !== null) {
13869
+ const A = kn(v);
13870
+ h.some((_) => kn(_) === A) || (z = z.concat(p(v)));
13871
13871
  }
13872
13872
  } else if (D) {
13873
- const A = kn(x) === D ? x : (g ?? []).find((c) => kn(c) === D) ?? null;
13873
+ const A = kn(v) === D ? v : (g ?? []).find((c) => kn(c) === D) ?? null;
13874
13874
  z = p(A);
13875
- } else T && x && (z = p(x));
13875
+ } else T && v && (z = p(v));
13876
13876
  return u === "newest-first" ? [...z].reverse() : z;
13877
- }, [D, x, g, T, u]), d = pe(null);
13877
+ }, [D, v, g, T, u]), d = pe(null);
13878
13878
  le(() => {
13879
13879
  if (u !== "chronological") return;
13880
13880
  const b = d.current;
@@ -13892,7 +13892,7 @@ const xa = /* @__PURE__ */ n(({
13892
13892
  }
13893
13893
  p.scrollHeight - p.scrollTop - p.clientHeight < 120 && b.scrollIntoView({ block: "end", behavior: "smooth" });
13894
13894
  }, [S.length, u]);
13895
- const v = s && E.length > 0 && !T ? /* @__PURE__ */ t(
13895
+ const x = s && E.length > 0 && !T ? /* @__PURE__ */ t(
13896
13896
  e0,
13897
13897
  {
13898
13898
  turns: E,
@@ -13903,13 +13903,13 @@ const xa = /* @__PURE__ */ n(({
13903
13903
  if (S.length === 0)
13904
13904
  return /* @__PURE__ */ I(re, { children: [
13905
13905
  /* @__PURE__ */ t("style", { children: `${Ai}${_i}${Mi}` }),
13906
- v,
13906
+ x,
13907
13907
  l ?? null
13908
13908
  ] });
13909
13909
  const y = u === "newest-first" ? 0 : S.length - 1;
13910
13910
  return /* @__PURE__ */ I(re, { children: [
13911
13911
  /* @__PURE__ */ t("style", { children: `${Ai}${_i}${Mi}` }),
13912
- v,
13912
+ x,
13913
13913
  /* @__PURE__ */ I(R, { sx: { py: 1, minHeight: "410px", maxHeight: a, overflow: a ? "auto" : "visible" }, children: [
13914
13914
  S.map((b, p) => b.eventType === "thought" ? e ? null : /* @__PURE__ */ t(
13915
13915
  Xh,
@@ -14104,7 +14104,7 @@ const c0 = 4, Fi = 8, zo = 500, d0 = 12, ul = ct.memo(({ bytes: e, compact: a =
14104
14104
  gap: s,
14105
14105
  flexShrink: 0
14106
14106
  },
14107
- children: Array.from({ length: m }, (x, g) => {
14107
+ children: Array.from({ length: m }, (v, g) => {
14108
14108
  const T = g < l, E = !T && g === l && u > 0, D = T ? 1 : E ? u : 0;
14109
14109
  return /* @__PURE__ */ t(
14110
14110
  R,
@@ -14148,19 +14148,19 @@ ul.displayName = "RailBuckets";
14148
14148
  const pl = ct.memo(({ start: e }) => {
14149
14149
  const [, a] = Q(0);
14150
14150
  le(() => {
14151
- const x = setInterval(() => a((g) => (g + 1) % 1024), 1e3);
14152
- return () => clearInterval(x);
14151
+ const v = setInterval(() => a((g) => (g + 1) % 1024), 1e3);
14152
+ return () => clearInterval(v);
14153
14153
  }, []);
14154
14154
  const l = Math.max(0, Math.floor((Date.now() - e.getTime()) / 1e3)), u = Math.floor(l / 60), m = l % 60, s = u > 0 ? `${u}:${m.toString().padStart(2, "0")}` : `${m}s`;
14155
14155
  return /* @__PURE__ */ t(
14156
14156
  R,
14157
14157
  {
14158
14158
  component: "span",
14159
- sx: /* @__PURE__ */ n((x) => ({
14160
- fontFamily: x.typography.fontFamilyMono,
14159
+ sx: /* @__PURE__ */ n((v) => ({
14160
+ fontFamily: v.typography.fontFamilyMono,
14161
14161
  fontSize: 8.5,
14162
14162
  lineHeight: 1,
14163
- color: x.palette.text.primary
14163
+ color: v.palette.text.primary
14164
14164
  }), "sx"),
14165
14165
  children: s
14166
14166
  }
@@ -14170,7 +14170,7 @@ pl.displayName = "RailCallTimer";
14170
14170
  const hl = /* @__PURE__ */ n(({ call: e }) => {
14171
14171
  const a = e.functionDetails;
14172
14172
  if (!(a != null && a.name)) return null;
14173
- const l = n0(a.name), m = t0[l].Icon, s = a.status === "Composing" || e.eventType === "partial_function_call", x = a.status === "Executing", g = a.status === "Done", T = l0(e), E = s0(e), D = Jn(a.name, E, a.args ?? a.text, T), k = (() => {
14173
+ const l = n0(a.name), m = t0[l].Icon, s = a.status === "Composing" || e.eventType === "partial_function_call", v = a.status === "Executing", g = a.status === "Done", T = l0(e), E = s0(e), D = Jn(a.name, E, a.args ?? a.text, T), k = (() => {
14174
14174
  const w = ot.getPartTextContent(e);
14175
14175
  if (typeof w == "string" && w.length > 0) return w.length;
14176
14176
  if (typeof a.text == "string" && a.text.length > 0) return a.text.length;
@@ -14187,7 +14187,7 @@ const hl = /* @__PURE__ */ n(({ call: e }) => {
14187
14187
  R,
14188
14188
  {
14189
14189
  sx: /* @__PURE__ */ n((w) => {
14190
- const S = T ? w.palette.secondary.main : x ? w.palette.primary.main : g ? w.palette.success.main : w.palette.text.disabled, d = x || s || T;
14190
+ const S = T ? w.palette.secondary.main : v ? w.palette.primary.main : g ? w.palette.success.main : w.palette.text.disabled, d = v || s || T;
14191
14191
  return {
14192
14192
  width: 30,
14193
14193
  maxHeight: "50px",
@@ -14213,19 +14213,19 @@ const hl = /* @__PURE__ */ n(({ call: e }) => {
14213
14213
  R,
14214
14214
  {
14215
14215
  sx: /* @__PURE__ */ n((w) => ({
14216
- color: T ? w.palette.secondary.main : g ? w.palette.success.main : x ? w.palette.primary.main : w.palette.text.disabled,
14216
+ color: T ? w.palette.secondary.main : g ? w.palette.success.main : v ? w.palette.primary.main : w.palette.text.disabled,
14217
14217
  display: "flex",
14218
14218
  position: "relative",
14219
14219
  top: "3px",
14220
14220
  right: "-4px",
14221
- animation: x ? "v2rppulse 1.5s ease-in-out infinite" : "none"
14221
+ animation: v ? "v2rppulse 1.5s ease-in-out infinite" : "none"
14222
14222
  }), "sx"),
14223
14223
  children: g ? /* @__PURE__ */ t(ys, { size: 10 }) : /* @__PURE__ */ t(bs, { size: 10 })
14224
14224
  }
14225
14225
  ),
14226
14226
  /* @__PURE__ */ t(m, { size: 14 }),
14227
14227
  s && /* @__PURE__ */ t(ul, { bytes: k, compact: !0 }),
14228
- x && a.start && /* @__PURE__ */ t(pl, { start: a.start })
14228
+ v && a.start && /* @__PURE__ */ t(pl, { start: a.start })
14229
14229
  ]
14230
14230
  }
14231
14231
  ) });
@@ -14297,7 +14297,7 @@ const ml = ct.memo(() => {
14297
14297
  });
14298
14298
  ml.displayName = "RailTokensPerSecond";
14299
14299
  const gl = /* @__PURE__ */ n(({ todoList: e, completed: a, total: l, pct: u }) => {
14300
- const m = bt(), s = 30, x = 2.5, g = (s - x) / 2, T = 2 * Math.PI * g, E = Math.max(0, Math.min(1, u)), D = T * E, k = Math.round(E * 100), w = e ? /* @__PURE__ */ I(R, { sx: { width: 280 }, children: [
14300
+ const m = bt(), s = 30, v = 2.5, g = (s - v) / 2, T = 2 * Math.PI * g, E = Math.max(0, Math.min(1, u)), D = T * E, k = Math.round(E * 100), w = e ? /* @__PURE__ */ I(R, { sx: { width: 280 }, children: [
14301
14301
  /* @__PURE__ */ I(
14302
14302
  R,
14303
14303
  {
@@ -14385,7 +14385,7 @@ const gl = /* @__PURE__ */ n(({ todoList: e, completed: a, total: l, pct: u }) =
14385
14385
  r: g,
14386
14386
  fill: "none",
14387
14387
  stroke: m.palette.surface.hover,
14388
- strokeWidth: x
14388
+ strokeWidth: v
14389
14389
  }
14390
14390
  ),
14391
14391
  /* @__PURE__ */ t(
@@ -14396,7 +14396,7 @@ const gl = /* @__PURE__ */ n(({ todoList: e, completed: a, total: l, pct: u }) =
14396
14396
  r: g,
14397
14397
  fill: "none",
14398
14398
  stroke: m.palette.primary.main,
14399
- strokeWidth: x,
14399
+ strokeWidth: v,
14400
14400
  strokeLinecap: "round",
14401
14401
  strokeDasharray: `${D} ${T}`,
14402
14402
  style: { transition: "stroke-dasharray .25s ease" }
@@ -14481,17 +14481,17 @@ const yl = /* @__PURE__ */ n(({
14481
14481
  onCancel: u,
14482
14482
  hideReasoning: m = !0,
14483
14483
  collapsed: s,
14484
- onCollapsedChange: x,
14484
+ onCollapsedChange: v,
14485
14485
  defaultCollapsed: g = !1
14486
14486
  }) => {
14487
14487
  const T = bt(), [E, D] = Q(g), k = s ?? E, w = /* @__PURE__ */ n((K) => {
14488
- s === void 0 && D(K), x == null || x(K);
14489
- }, "setCollapsed"), S = de((K) => K.turnOpen), d = de((K) => K.lastToolEvent), v = de((K) => K.connectionStatus), { agentGatewayService: y } = Ze();
14488
+ s === void 0 && D(K), v == null || v(K);
14489
+ }, "setCollapsed"), S = de((K) => K.turnOpen), d = de((K) => K.lastToolEvent), x = de((K) => K.connectionStatus), { agentGatewayService: y } = Ze();
14490
14490
  le(() => {
14491
14491
  D(g);
14492
14492
  }, [g]);
14493
14493
  const b = Ce(() => {
14494
- switch (v) {
14494
+ switch (x) {
14495
14495
  case ke.Connected:
14496
14496
  return {
14497
14497
  color: T.palette.success.main,
@@ -14513,7 +14513,7 @@ const yl = /* @__PURE__ */ n(({
14513
14513
  default:
14514
14514
  return { color: T.palette.text.disabled, label: "Sessão Inativa", pulse: !1 };
14515
14515
  }
14516
- }, [v, S, T]), p = de((K) => K.suspendState), z = de((K) => K.setSuspendState), h = p === "suspending", A = p === "suspended", c = ye(async () => {
14516
+ }, [x, S, T]), p = de((K) => K.suspendState), z = de((K) => K.setSuspendState), h = p === "suspending", A = p === "suspended", c = ye(async () => {
14517
14517
  if (y instanceof dn) {
14518
14518
  if (A) {
14519
14519
  z("idle");