@pagelines/sdk 1.0.760 → 1.0.762

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/AgentWrap.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import "./rolldown-runtime.js";
2
2
  import { s as e, t } from "./sdkClient.js";
3
3
  import { Agent as n, CHAT_ISSUE_COPY as r, SettingsObject as i, createLogger as a, getDefaultAvatarUrl as o, isAssistantSilenceControl as s, parseChatCardFencePayload as c, parseChatVisualFencePayload as u } from "@pagelines/core";
4
- import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as b, createVNode as x, defineComponent as S, nextTick as C, normalizeClass as T, normalizeStyle as k, onBeforeUnmount as te, onMounted as ne, onUnmounted as re, openBlock as A, ref as j, renderList as M, renderSlot as ie, resolveDynamicComponent as P, shallowRef as ae, toDisplayString as F, unref as oe, vModelText as se, watch as ce, withCtx as I, withDirectives as ue, withKeys as de, withModifiers as pe } from "vue";
4
+ import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as _, createElementVNode as v, createTextVNode as b, createVNode as x, defineComponent as S, nextTick as C, normalizeClass as T, normalizeStyle as k, onBeforeUnmount as A, onMounted as te, onUnmounted as ne, openBlock as j, ref as M, renderList as P, renderSlot as re, resolveDynamicComponent as F, shallowRef as ie, toDisplayString as I, unref as ae, vModelText as oe, watch as se, withCtx as R, withDirectives as ce, withKeys as ue, withModifiers as de } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
- var R = { class: "spinner max-w-sm" }, B = {
6
+ var B = { class: "spinner max-w-sm" }, H = {
7
7
  class: "ring-circular h-full w-full origin-center",
8
8
  viewBox: "25 25 50 50"
9
- }, he = /* @__PURE__ */ S({
9
+ }, pe = /* @__PURE__ */ S({
10
10
  __name: "FSpinner",
11
11
  props: {
12
12
  width: {
@@ -19,7 +19,7 @@ var R = { class: "spinner max-w-sm" }, B = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (A(), _("div", R, [(A(), _("svg", B, [v("circle", {
22
+ return (t, n) => (j(), _("div", B, [(j(), _("svg", H, [v("circle", {
23
23
  class: T([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
@@ -30,7 +30,7 @@ var R = { class: "spinner max-w-sm" }, B = {
30
30
  "stroke-miterlimit": "30"
31
31
  }, null, 2)]))]));
32
32
  }
33
- }), _e = [
33
+ }), he = [
34
34
  {
35
35
  mode: "self",
36
36
  label: "Overview",
@@ -70,7 +70,7 @@ function recorderMimeType() {
70
70
  }
71
71
  var VoiceRecorderController = class extends i {
72
72
  constructor(t) {
73
- super("VoiceRecorderController", t), e(this, "state", j({
73
+ super("VoiceRecorderController", t), e(this, "state", M({
74
74
  phase: "idle",
75
75
  elapsedMs: 0
76
76
  })), e(this, "isActive", p(() => this.state.value.phase !== "idle")), e(this, "isBusy", p(() => this.state.value.phase !== "idle")), e(this, "elapsedLabel", p(() => formatVoiceRecordingDuration({ ms: this.state.value.elapsedMs }))), e(this, "statusText", p(() => this.state.value.phase === "preparing" ? "Starting microphone" : this.state.value.phase === "sending" ? "Sending voice message" : "Release to send")), e(this, "recorder", void 0), e(this, "stream", void 0), e(this, "chunks", []), e(this, "timer", void 0), e(this, "startedAt", 0), e(this, "cancelOnStop", !1), e(this, "stopAfterStart", !1), e(this, "startToken", 0);
@@ -185,7 +185,7 @@ var VoiceRecorderController = class extends i {
185
185
  function durableJournalOutcome(e) {
186
186
  return e.turnOutcome === "failed" ? "failed" : e.turnOutcome === "stopped" ? "stopped" : e.sender === "system" ? "failed" : "completed";
187
187
  }
188
- var H = {
188
+ var _e = {
189
189
  waiting: "Waiting for results",
190
190
  finishing: "Finishing up",
191
191
  completed: "Work complete",
@@ -247,7 +247,7 @@ function buildWorkJournalModel(e) {
247
247
  terminal: {
248
248
  id: "work-complete",
249
249
  tone: "completed",
250
- label: H.completed
250
+ label: _e.completed
251
251
  }
252
252
  };
253
253
  if (n === "failed") {
@@ -261,7 +261,7 @@ function buildWorkJournalModel(e) {
261
261
  terminal: {
262
262
  id: "work-failed",
263
263
  tone: "failed",
264
- label: H.failed,
264
+ label: _e.failed,
265
265
  ...o && e?.note ? { note: e.note } : {}
266
266
  }
267
267
  };
@@ -275,7 +275,7 @@ function buildWorkJournalModel(e) {
275
275
  terminal: {
276
276
  id: "work-stopped",
277
277
  tone: "stopped",
278
- label: H.stopped
278
+ label: _e.stopped
279
279
  }
280
280
  };
281
281
  }
@@ -285,8 +285,8 @@ function buildWorkJournalModel(e) {
285
285
  }, Infinity), h = p + ve, _ = (Number.isFinite(m) ? m : p) + U, v = r >= h, b = u || v ? {
286
286
  id: u?.activityId ?? "work-active",
287
287
  tone: "active",
288
- label: v ? u ? H.waiting : H.finishing : u.label
289
- } : void 0, x = v && r >= _ ? i ? H.notifyHint : H.leaveHint : void 0, S = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
288
+ label: v ? u ? _e.waiting : _e.finishing : u.label
289
+ } : void 0, x = v && r >= _ ? i ? _e.notifyHint : _e.leaveHint : void 0, S = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
290
290
  return {
291
291
  outcome: n,
292
292
  visibleRows: s,
@@ -424,12 +424,12 @@ var AgentChatController = class extends i {
424
424
  super("AgentChatController", t), e(this, "isTextMode", !1), e(this, "lastMessage", {
425
425
  hash: "",
426
426
  time: 0
427
- }), e(this, "isConnecting", !1), e(this, "turnEpoch", 0), e(this, "nextStreamToken", 0), e(this, "runningStreamToken", void 0), e(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), e(this, "queuedMessageIdSet", j(/* @__PURE__ */ new Set())), e(this, "queuedMessageIds", p(() => this.queuedMessageIdSet.value)), e(this, "boundaryTimer", void 0), e(this, "nowMs", ae(Date.now())), e(this, "toolActivityTiming", ae({})), e(this, "lastVisibleProgressAtMs", ae()), e(this, "liveSegments", ae([])), e(this, "liveStreamMessageId", ae(void 0)), e(this, "conversationId", void 0), e(this, "textState", j({
427
+ }), e(this, "isConnecting", !1), e(this, "turnEpoch", 0), e(this, "nextStreamToken", 0), e(this, "runningStreamToken", void 0), e(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), e(this, "queuedMessageIdSet", M(/* @__PURE__ */ new Set())), e(this, "queuedMessageIds", p(() => this.queuedMessageIdSet.value)), e(this, "boundaryTimer", void 0), e(this, "nowMs", ie(Date.now())), e(this, "toolActivityTiming", ie({})), e(this, "lastVisibleProgressAtMs", ie()), e(this, "liveSegments", ie([])), e(this, "liveStreamMessageId", ie(void 0)), e(this, "conversationId", void 0), e(this, "textState", M({
428
428
  isActive: !1,
429
429
  isConnected: !1,
430
430
  isThinking: !1,
431
431
  connectionStatus: "disconnected"
432
- })), e(this, "agentMode", j("self")), e(this, "sharedMessages", j([])), e(this, "composerState", j({
432
+ })), e(this, "agentMode", M("self")), e(this, "sharedMessages", M([])), e(this, "composerState", M({
433
433
  text: "",
434
434
  pendingAttachments: [],
435
435
  isUploading: !1
@@ -606,7 +606,7 @@ Current User:
606
606
  });
607
607
  }
608
608
  setupBoundaryWatcher() {
609
- ce(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
609
+ se(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
610
610
  this.scheduleBoundary(e);
611
611
  });
612
612
  }
@@ -668,12 +668,12 @@ Current User:
668
668
  });
669
669
  }
670
670
  setupModeWatcher() {
671
- ce(this.agentMode, async (e, t) => {
671
+ se(this.agentMode, async (e, t) => {
672
672
  this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
673
673
  });
674
674
  }
675
675
  setupAvailabilityWatcher() {
676
- ce(() => this.chatEnabled, (e) => {
676
+ se(() => this.chatEnabled, (e) => {
677
677
  if (!(!this.isTextMode || this.isConnecting)) {
678
678
  if (e) {
679
679
  this.textState.value.isConnected || this.updateState(this.textState, {
@@ -1013,13 +1013,13 @@ var Ce = {
1013
1013
  md: "size-4",
1014
1014
  lg: "size-5"
1015
1015
  })[e.size]);
1016
- return (i, a) => (A(), _("button", { class: T(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, n.value]]) }, [e.loading ? (A(), _("div", Ce, [...a[0] || (a[0] = [v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : h("", !0), v("span", { class: T(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1017
- e.icon ? (A(), _("i", {
1016
+ return (i, a) => (j(), _("button", { class: T(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, n.value]]) }, [e.loading ? (j(), _("div", Ce, [...a[0] || (a[0] = [v("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : h("", !0), v("span", { class: T(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1017
+ e.icon ? (j(), _("i", {
1018
1018
  key: 0,
1019
1019
  class: T([e.icon, r.value])
1020
1020
  }, null, 2)) : h("", !0),
1021
- ie(i.$slots, "default"),
1022
- e.iconAfter ? (A(), _("i", {
1021
+ re(i.$slots, "default"),
1022
+ e.iconAfter ? (j(), _("i", {
1023
1023
  key: 1,
1024
1024
  class: T([e.iconAfter, r.value])
1025
1025
  }, null, 2)) : h("", !0)
@@ -1031,7 +1031,7 @@ var Ce = {
1031
1031
  emits: ["update:modelValue"],
1032
1032
  setup(e, { emit: t }) {
1033
1033
  let n = t;
1034
- return (t, r) => (A(), _("input", {
1034
+ return (t, r) => (j(), _("input", {
1035
1035
  name: "username",
1036
1036
  type: "email",
1037
1037
  inputmode: "email",
@@ -1055,15 +1055,15 @@ var Ce = {
1055
1055
  },
1056
1056
  emits: ["update:modelValue", "autoSubmit"],
1057
1057
  setup(e, { emit: t }) {
1058
- let n = e, r = t, i = j(null), a = p(() => "0".repeat(n.length));
1059
- ne(() => {
1058
+ let n = e, r = t, i = M(null), a = p(() => "0".repeat(n.length));
1059
+ te(() => {
1060
1060
  n.focusFirst && !("ontouchstart" in window) && i.value?.focus();
1061
1061
  });
1062
1062
  function onInput(e) {
1063
1063
  let t = e.target.value.replace(/\D/g, "").slice(0, n.length);
1064
1064
  r("update:modelValue", t), t.length === n.length && r("autoSubmit", t);
1065
1065
  }
1066
- return (t, n) => (A(), _("input", {
1066
+ return (t, n) => (j(), _("input", {
1067
1067
  ref_key: "input",
1068
1068
  ref: i,
1069
1069
  name: "one-time-code",
@@ -1096,15 +1096,15 @@ var Ce = {
1096
1096
  layout: { default: "centered" }
1097
1097
  },
1098
1098
  setup(e) {
1099
- return (t, n) => (A(), _("div", { class: T(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [v("div", ke, [v("div", { class: T(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [v("img", {
1099
+ return (t, n) => (j(), _("div", { class: T(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [v("div", ke, [v("div", { class: T(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [v("img", {
1100
1100
  src: e.agent.avatarUrl.value,
1101
1101
  alt: e.agent.displayName.value,
1102
1102
  class: "w-full h-full object-cover",
1103
- onError: n[0] || (n[0] = (...e) => oe(handleImageError) && oe(handleImageError)(...e))
1104
- }, null, 40, Ae)], 2), v("div", je, [e.isOnline ? (A(), _(f, { key: 0 }, [n[1] || (n[1] = v("div", {
1103
+ onError: n[0] || (n[0] = (...e) => ae(handleImageError) && ae(handleImageError)(...e))
1104
+ }, null, 40, Ae)], 2), v("div", je, [e.isOnline ? (j(), _(f, { key: 0 }, [n[1] || (n[1] = v("div", {
1105
1105
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1106
1106
  style: { "animation-duration": "3s" }
1107
- }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (A(), _("div", Me))])]), v("div", Ne, [v("h1", { class: T(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, F(e.agent.displayName.value), 3), v("p", { class: T(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, F(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1107
+ }, null, -1)), n[2] || (n[2] = v("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (j(), _("div", Me))])]), v("div", Ne, [v("h1", { class: T(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, I(e.agent.displayName.value), 3), v("p", { class: T(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, I(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1108
1108
  }
1109
1109
  }), Fe = { class: "relative shrink-0 rounded-full" }, Ie = ["src", "alt"], Le = ["src", "alt"], Re = ["aria-label"], ze = /* @__PURE__ */ S({
1110
1110
  __name: "AgentAvatar",
@@ -1138,26 +1138,26 @@ var Ce = {
1138
1138
  top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
1139
1139
  right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
1140
1140
  }, i = p(() => e.isLight ? "ring-white" : "ring-theme-900");
1141
- return (t, a) => (A(), _("div", Fe, [
1141
+ return (t, a) => (j(), _("div", Fe, [
1142
1142
  v("img", {
1143
1143
  src: e.agent.avatarUrl.value,
1144
1144
  alt: e.agent.displayName.value,
1145
1145
  class: T(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1146
1146
  }, null, 10, Ie),
1147
- e.showOwnerMark && e.agent.ownerMarkUrl.value ? (A(), _("img", {
1147
+ e.showOwnerMark && e.agent.ownerMarkUrl.value ? (j(), _("img", {
1148
1148
  key: 0,
1149
1149
  src: e.agent.ownerMarkUrl.value,
1150
1150
  alt: e.agent.owner.value?.fullName ? `Owned by ${e.agent.owner.value.fullName}` : "Owner",
1151
1151
  class: T(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
1152
1152
  }, null, 10, Le)) : h("", !0),
1153
- n.value ? (A(), _("span", {
1153
+ n.value ? (j(), _("span", {
1154
1154
  key: 1,
1155
1155
  role: "status",
1156
1156
  "aria-label": e.agent.state.value.tooltip,
1157
1157
  class: T(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
1158
1158
  style: r
1159
1159
  }, null, 10, Re)) : h("", !0),
1160
- n.value && e.agent.state.value.lifecycle === "running" ? (A(), _("span", {
1160
+ n.value && e.agent.state.value.lifecycle === "running" ? (j(), _("span", {
1161
1161
  key: 2,
1162
1162
  "aria-hidden": "true",
1163
1163
  class: T(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]", n.value]),
@@ -1186,7 +1186,7 @@ var Ce = {
1186
1186
  isLight: { type: Boolean }
1187
1187
  },
1188
1188
  setup(e) {
1189
- let t = e, n = ae(!1);
1189
+ let t = e, n = ie(!1);
1190
1190
  function toggle() {
1191
1191
  n.value = !n.value;
1192
1192
  }
@@ -1256,9 +1256,9 @@ var Ce = {
1256
1256
  }
1257
1257
  };
1258
1258
  });
1259
- return (t, u) => (A(), _("div", { class: T(["w-full py-0.5", s.value.muted]) }, [
1260
- a.value ? (A(), _("span", Be, F(a.value), 1)) : h("", !0),
1261
- r.value ? (A(), _("button", {
1259
+ return (t, u) => (j(), _("div", { class: T(["w-full py-0.5", s.value.muted]) }, [
1260
+ a.value ? (j(), _("span", Be, I(a.value), 1)) : h("", !0),
1261
+ r.value ? (j(), _("button", {
1262
1262
  key: 1,
1263
1263
  type: "button",
1264
1264
  "data-test": "messaging-tool-activity-summary",
@@ -1273,13 +1273,13 @@ var Ce = {
1273
1273
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1274
1274
  "aria-hidden": "true"
1275
1275
  }, null, -1)),
1276
- v("span", { class: T(["text-[12.5px] font-medium leading-none", s.value.muted]) }, F(e.model.terminal?.label), 3),
1277
- i.value ? (A(), _("i", {
1276
+ v("span", { class: T(["text-[12.5px] font-medium leading-none", s.value.muted]) }, I(e.model.terminal?.label), 3),
1277
+ i.value ? (j(), _("i", {
1278
1278
  key: 0,
1279
1279
  class: T(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1280
1280
  "aria-hidden": "true"
1281
1281
  }, null, 2)) : h("", !0)
1282
- ], 10, Ve)) : i.value ? (A(), _("button", {
1282
+ ], 10, Ve)) : i.value ? (j(), _("button", {
1283
1283
  key: 2,
1284
1284
  type: "button",
1285
1285
  "data-test": "messaging-tool-activity-summary",
@@ -1290,30 +1290,30 @@ var Ce = {
1290
1290
  }, [v("span", Ue, [v("span", {
1291
1291
  "data-journal-spine": "dashed",
1292
1292
  class: T(["w-0 border-l border-dashed", s.value.dashed])
1293
- }, null, 2)]), v("span", { class: T(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [b(F(i.value) + " earlier updates ", 1), v("i", {
1293
+ }, null, 2)]), v("span", { class: T(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [b(I(i.value) + " earlier updates ", 1), v("i", {
1294
1294
  class: T(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1295
1295
  "aria-hidden": "true"
1296
1296
  }, null, 2)], 2)], 10, He)) : h("", !0),
1297
- (A(!0), _(f, null, M(o.value, (e, t) => (A(), _("div", {
1297
+ (j(!0), _(f, null, P(o.value, (e, t) => (j(), _("div", {
1298
1298
  key: e.id,
1299
1299
  "data-test": "messaging-tool-activity-row",
1300
1300
  "data-journal-row": e.tone,
1301
1301
  class: T([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1302
- }, [v("div", Ge, [v("span", Ke, [(A(), m(P(c.value[e.tone].station.tag), {
1302
+ }, [v("div", Ge, [v("span", Ke, [(j(), m(F(c.value[e.tone].station.tag), {
1303
1303
  "data-journal-station": e.tone,
1304
1304
  class: T(c.value[e.tone].station.class)
1305
- }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? h("", !0) : (A(), _("span", {
1305
+ }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? h("", !0) : (j(), _("span", {
1306
1306
  key: 0,
1307
1307
  class: T(["w-px flex-1", s.value.spine])
1308
- }, null, 2))]), v("div", { class: T(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: T(["relative block leading-snug", c.value[e.tone].label]) }, [b(F(e.label), 1), c.value[e.tone].statusWord ? (A(), _("span", qe, ", " + F(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (A(), _("p", {
1308
+ }, null, 2))]), v("div", { class: T(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [v("span", { class: T(["relative block leading-snug", c.value[e.tone].label]) }, [b(I(e.label), 1), c.value[e.tone].statusWord ? (j(), _("span", qe, ", " + I(c.value[e.tone].statusWord), 1)) : h("", !0)], 2), e.note ? (j(), _("p", {
1309
1309
  key: 0,
1310
1310
  class: T(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1311
- }, F(e.note), 3)) : h("", !0)], 2)], 10, We))), 128)),
1312
- !r.value && e.model.hint ? (A(), _("p", {
1311
+ }, I(e.note), 3)) : h("", !0)], 2)], 10, We))), 128)),
1312
+ !r.value && e.model.hint ? (j(), _("p", {
1313
1313
  key: 3,
1314
1314
  "data-test": "messaging-tool-activity-hint",
1315
1315
  class: T(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1316
- }, F(e.model.hint), 3)) : h("", !0)
1316
+ }, I(e.model.hint), 3)) : h("", !0)
1317
1317
  ], 2));
1318
1318
  }
1319
1319
  });
@@ -1358,7 +1358,7 @@ function _unsupportedIterableToArray(e, t) {
1358
1358
  return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
1359
1359
  }
1360
1360
  }
1361
- var Ye = Object.entries, K = Object.setPrototypeOf, Xe = Object.isFrozen, Ze = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, q = Object.freeze, J = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
1361
+ var Ye = Object.entries, Xe = Object.setPrototypeOf, K = Object.isFrozen, Ze = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, q = Object.freeze, J = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
1362
1362
  q || (q = function freeze(e) {
1363
1363
  return e;
1364
1364
  }), J || (J = function seal(e) {
@@ -1384,13 +1384,13 @@ function unconstruct(e) {
1384
1384
  }
1385
1385
  function addToSet(e, t) {
1386
1386
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ut;
1387
- if (K && K(e, null), !lt(t)) return e;
1387
+ if (Xe && Xe(e, null), !lt(t)) return e;
1388
1388
  let r = t.length;
1389
1389
  for (; r--;) {
1390
1390
  let i = t[r];
1391
1391
  if (typeof i == "string") {
1392
1392
  let e = n(i);
1393
- e !== i && (Xe(t) || (t[r] = e), i = e);
1393
+ e !== i && (K(t) || (t[r] = e), i = e);
1394
1394
  }
1395
1395
  e[i] = !0;
1396
1396
  }
@@ -1581,27 +1581,27 @@ function createDOMPurify() {
1581
1581
  let e = t.createElement("template");
1582
1582
  e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
1583
1583
  }
1584
- let T, k = "", te, ne = !1, re = 0, A = function _assertNotInTrustedTypesPolicy() {
1585
- if (re > 0) throw xt("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1586
- }, j = function _createTrustedHTML(e) {
1587
- A(), re++;
1584
+ let T, k = "", A, te = !1, ne = 0, j = function _assertNotInTrustedTypesPolicy() {
1585
+ if (ne > 0) throw xt("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1586
+ }, M = function _createTrustedHTML(e) {
1587
+ j(), ne++;
1588
1588
  try {
1589
1589
  return T.createHTML(e);
1590
1590
  } finally {
1591
- re--;
1591
+ ne--;
1592
1592
  }
1593
- }, M = function _createTrustedScriptURL(e) {
1594
- A(), re++;
1593
+ }, P = function _createTrustedScriptURL(e) {
1594
+ j(), ne++;
1595
1595
  try {
1596
1596
  return T.createScriptURL(e);
1597
1597
  } finally {
1598
- re--;
1598
+ ne--;
1599
1599
  }
1600
- }, ie = function _getDefaultTrustedTypesPolicy() {
1601
- return ne || (te = Yt(u, r), ne = !0), te;
1602
- }, P = t, ae = P.implementation, F = P.createNodeIterator, oe = P.createDocumentFragment, se = P.getElementsByTagName, ce = n.importNode, I = Xt();
1603
- DOMPurify.isSupported = typeof Ye == "function" && typeof v == "function" && ae && ae.createHTMLDocument !== void 0;
1604
- let ue = Nt, de = Pt, pe = Ft, R = It, B = Lt, he = zt, _e = Bt, H = Ht, ve = Rt, U = null, ye = addToSet({}, [
1600
+ }, re = function _getDefaultTrustedTypesPolicy() {
1601
+ return te || (A = Yt(u, r), te = !0), A;
1602
+ }, F = t, ie = F.implementation, I = F.createNodeIterator, ae = F.createDocumentFragment, oe = F.getElementsByTagName, se = n.importNode, R = Xt();
1603
+ DOMPurify.isSupported = typeof Ye == "function" && typeof v == "function" && ie && ie.createHTMLDocument !== void 0;
1604
+ let ce = Nt, ue = Pt, de = Ft, B = It, H = Lt, pe = zt, he = Bt, _e = Ht, ve = Rt, U = null, ye = addToSet({}, [
1605
1605
  ...St,
1606
1606
  ...Ct,
1607
1607
  ...wt,
@@ -1651,7 +1651,7 @@ function createDOMPurify() {
1651
1651
  "source",
1652
1652
  "image",
1653
1653
  "track"
1654
- ]), K = null, Xe = addToSet({}, [
1654
+ ]), Xe = null, K = addToSet({}, [
1655
1655
  "alt",
1656
1656
  "class",
1657
1657
  "for",
@@ -1687,15 +1687,15 @@ function createDOMPurify() {
1687
1687
  }, on = function _parseConfig() {
1688
1688
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1689
1689
  if (nn && nn === e) return;
1690
- (!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? dt : ut, U = Zt(e, "ALLOWED_TAGS", ye, { transform: Q }), W = Zt(e, "ALLOWED_ATTR", be, { transform: Q }), gt = Zt(e, "ALLOWED_NAMESPACES", _t, { transform: dt }), K = Zt(e, "ADD_URI_SAFE_ATTR", Xe, {
1690
+ (!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? dt : ut, U = Zt(e, "ALLOWED_TAGS", ye, { transform: Q }), W = Zt(e, "ALLOWED_ATTR", be, { transform: Q }), gt = Zt(e, "ALLOWED_NAMESPACES", _t, { transform: dt }), Xe = Zt(e, "ADD_URI_SAFE_ATTR", K, {
1691
1691
  transform: Q,
1692
- base: Xe
1692
+ base: K
1693
1693
  }), qe = Zt(e, "ADD_DATA_URI_TAGS", Je, {
1694
1694
  transform: Q,
1695
1695
  base: Je
1696
1696
  }), Ge = Zt(e, "FORBID_CONTENTS", Ke, { transform: Q }), Se = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), Ce = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), We = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Te = e.ALLOW_ARIA_ATTR !== !1, Ee = e.ALLOW_DATA_ATTR !== !1, De = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ke = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, He = e.KEEP_CONTENT !== !1, Ue = e.IN_PLACE || !1, ve = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1697
1697
  let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1698
- if (G = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (G.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (G.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(G), ke && (Ee = !1), Le && (Ie = !0), We && (U = addToSet({}, Ot), W = $e(null), We.html === !0 && (addToSet(U, St), addToSet(W, kt)), We.svg === !0 && (addToSet(U, Ct), addToSet(W, At), addToSet(W, Mt)), We.svgFilters === !0 && (addToSet(U, wt), addToSet(W, At), addToSet(W, Mt)), We.mathMl === !0 && (addToSet(U, Et), addToSet(W, jt), addToSet(W, Mt))), we.tagCheck = null, we.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? we.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (U === ye && (U = clone(U)), addToSet(U, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? we.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (W === be && (W = clone(W)), addToSet(W, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(K, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.ADD_FORBID_CONTENTS, Q)), He && (U["#text"] = !0), je && addToSet(U, [
1698
+ if (G = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (G.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (G.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(G), ke && (Ee = !1), Le && (Ie = !0), We && (U = addToSet({}, Ot), W = $e(null), We.html === !0 && (addToSet(U, St), addToSet(W, kt)), We.svg === !0 && (addToSet(U, Ct), addToSet(W, At), addToSet(W, Mt)), We.svgFilters === !0 && (addToSet(U, wt), addToSet(W, At), addToSet(W, Mt)), We.mathMl === !0 && (addToSet(U, Et), addToSet(W, jt), addToSet(W, Mt))), we.tagCheck = null, we.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? we.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (U === ye && (U = clone(U)), addToSet(U, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? we.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (W === be && (W = clone(W)), addToSet(W, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Xe, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.ADD_FORBID_CONTENTS, Q)), He && (U["#text"] = !0), je && addToSet(U, [
1699
1699
  "html",
1700
1700
  "head",
1701
1701
  "body"
@@ -1705,11 +1705,11 @@ function createDOMPurify() {
1705
1705
  let t = T;
1706
1706
  T = e.TRUSTED_TYPES_POLICY;
1707
1707
  try {
1708
- k = j("");
1708
+ k = M("");
1709
1709
  } catch (e) {
1710
1710
  throw T = t, e;
1711
1711
  }
1712
- } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, k = "") : (T === void 0 && (T = ie()), T && typeof k == "string" && (k = j("")));
1712
+ } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, k = "") : (T === void 0 && (T = re()), T && typeof k == "string" && (k = M("")));
1713
1713
  q && q(e), nn = e;
1714
1714
  }, sn = addToSet({}, [
1715
1715
  ...Ct,
@@ -1818,25 +1818,25 @@ function createDOMPurify() {
1818
1818
  r = t && t[0];
1819
1819
  }
1820
1820
  en === "application/xhtml+xml" && tt === et && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1821
- let i = T ? j(e) : e;
1821
+ let i = T ? M(e) : e;
1822
1822
  if (tt === et) try {
1823
1823
  n = new c().parseFromString(i, en);
1824
1824
  } catch {}
1825
1825
  if (!n || !n.documentElement) {
1826
- n = ae.createDocument(tt, "template", null);
1826
+ n = ie.createDocument(tt, "template", null);
1827
1827
  try {
1828
1828
  n.documentElement.innerHTML = nt ? k : i;
1829
1829
  } catch {}
1830
1830
  }
1831
1831
  let a = n.body || n.documentElement;
1832
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? se.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1832
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? oe.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1833
1833
  }, bn = function _createNodeIterator(e) {
1834
- return F.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1834
+ return I.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1835
1835
  }, xn = function _stripTemplateExpressions(e) {
1836
- return e = pt(e, ue, " "), e = pt(e, de, " "), e = pt(e, pe, " "), e;
1836
+ return e = pt(e, ce, " "), e = pt(e, ue, " "), e = pt(e, de, " "), e;
1837
1837
  }, Sn = function _scrubTemplateExpressions(e) {
1838
1838
  e.normalize();
1839
- let t = F.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1839
+ let t = I.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1840
1840
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1841
1841
  let r = e.querySelectorAll?.call(e, "template");
1842
1842
  r && rt(r, (e) => {
@@ -1881,31 +1881,31 @@ function createDOMPurify() {
1881
1881
  }
1882
1882
  return pn(e), !0;
1883
1883
  }, On = function _sanitizeElements(e, t) {
1884
- if (_executeHooks(I.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1884
+ if (_executeHooks(R.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1885
1885
  if (Cn(e)) return pn(e), !0;
1886
1886
  let n = Q(C ? C(e) : e.nodeName);
1887
- if (_executeHooks(I.uponSanitizeElement, e, {
1887
+ if (_executeHooks(R.uponSanitizeElement, e, {
1888
1888
  tagName: n,
1889
1889
  allowedTags: U
1890
1890
  }), e !== t && v(e) === null) return !0;
1891
1891
  if (En(e, n)) return pn(e), !0;
1892
1892
  if (Se[n] || !(we.tagCheck instanceof Function && we.tagCheck(n)) && !U[n]) {
1893
1893
  let t = Dn(e, n);
1894
- return t === !1 && _executeHooks(I.afterSanitizeElements, e, null), t;
1894
+ return t === !1 && _executeHooks(R.afterSanitizeElements, e, null), t;
1895
1895
  }
1896
1896
  if ((S ? S(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Z(Gt, e.innerHTML)) return pn(e), !0;
1897
1897
  if (ke && e.nodeType === qt.text) {
1898
1898
  let t = xn(e.textContent);
1899
1899
  e.textContent !== t && (st(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1900
1900
  }
1901
- return _executeHooks(I.afterSanitizeElements, e, null), !1;
1901
+ return _executeHooks(R.afterSanitizeElements, e, null), !1;
1902
1902
  }, kn = function _isValidAttribute(e, n, r) {
1903
1903
  if (Ce[n] || Ae && n === "patchsrc" || Ae && n === "for" && e !== "label" && e !== "output" || ze && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1904
1904
  let i = W[n] || we.attributeCheck instanceof Function && we.attributeCheck(n, e);
1905
- if (!(Ee && Z(R, n)) && !(Te && Z(B, n))) {
1905
+ if (!(Ee && Z(B, n)) && !(Te && Z(H, n))) {
1906
1906
  if (!i) {
1907
1907
  if (!(jn(e) && (G.tagNameCheck instanceof RegExp && Z(G.tagNameCheck, e) || G.tagNameCheck instanceof Function && G.tagNameCheck(e)) && (G.attributeNameCheck instanceof RegExp && Z(G.attributeNameCheck, n) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(n, e)) || n === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && Z(G.tagNameCheck, r) || G.tagNameCheck instanceof Function && G.tagNameCheck(r)))) return !1;
1908
- } else if (!K[n] && !Z(ve, pt(r, _e, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && qe[e]) && !(De && !Z(he, pt(r, _e, ""))) && r) return !1;
1908
+ } else if (!Xe[n] && !Z(ve, pt(r, he, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && qe[e]) && !(De && !Z(pe, pt(r, he, ""))) && r) return !1;
1909
1909
  }
1910
1910
  return !0;
1911
1911
  }, An = addToSet({}, [
@@ -1918,11 +1918,11 @@ function createDOMPurify() {
1918
1918
  "font-face-uri",
1919
1919
  "missing-glyph"
1920
1920
  ]), jn = function _isBasicCustomElement(e) {
1921
- return !An[ut(e)] && Z(H, e);
1921
+ return !An[ut(e)] && Z(_e, e);
1922
1922
  }, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
1923
1923
  if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1924
- case "TrustedHTML": return j(r);
1925
- case "TrustedScriptURL": return M(r);
1924
+ case "TrustedHTML": return M(r);
1925
+ case "TrustedScriptURL": return P(r);
1926
1926
  }
1927
1927
  return r;
1928
1928
  }, Nn = function _setAttributeValue(e, t, n, r) {
@@ -1932,7 +1932,7 @@ function createDOMPurify() {
1932
1932
  hn(t, e);
1933
1933
  }
1934
1934
  }, Pn = function _sanitizeAttributes(e) {
1935
- _executeHooks(I.beforeSanitizeAttributes, e, null);
1935
+ _executeHooks(R.beforeSanitizeAttributes, e, null);
1936
1936
  let t = e.attributes;
1937
1937
  if (!t || Cn(e)) return;
1938
1938
  let n = {
@@ -1944,7 +1944,7 @@ function createDOMPurify() {
1944
1944
  }, r = t.length, i = Q(e.nodeName);
1945
1945
  for (; r--;) {
1946
1946
  let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : ht(f);
1947
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(I.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, Ve) !== 0 && (hn(o, e), p = Ve + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1947
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(R.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, Ve) !== 0 && (hn(o, e), p = Ve + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1948
1948
  hn(o, e);
1949
1949
  continue;
1950
1950
  }
@@ -1968,14 +1968,14 @@ function createDOMPurify() {
1968
1968
  p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
1969
1969
  }
1970
1970
  }
1971
- _executeHooks(I.afterSanitizeAttributes, e, null);
1971
+ _executeHooks(R.afterSanitizeAttributes, e, null);
1972
1972
  }, Fn = function _sanitizeShadowDOM(e) {
1973
1973
  let t = null, n = bn(e);
1974
- for (_executeHooks(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(I.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (S ? S(t) : t.nodeType) === qt.element) {
1974
+ for (_executeHooks(R.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(R.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (S ? S(t) : t.nodeType) === qt.element) {
1975
1975
  let e = b(t);
1976
1976
  wn(e) && (In(e), Fn(e));
1977
1977
  }
1978
- _executeHooks(I.afterSanitizeShadowDOM, e, null);
1978
+ _executeHooks(R.afterSanitizeShadowDOM, e, null);
1979
1979
  }, In = function _sanitizeAttachedShadowRoots(e) {
1980
1980
  let t = [{
1981
1981
  node: e,
@@ -2018,7 +2018,7 @@ function createDOMPurify() {
2018
2018
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
2019
2019
  if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
2020
2020
  if (!DOMPurify.isSupported) return e;
2021
- Me ? (U = Ne, W = Pe) : on(t), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (U = clone(U)), I.uponSanitizeAttribute.length > 0 && (W = clone(W)), DOMPurify.removed = [];
2021
+ Me ? (U = Ne, W = Pe) : on(t), (R.uponSanitizeElement.length > 0 || R.uponSanitizeAttribute.length > 0) && (U = clone(U)), R.uponSanitizeAttribute.length > 0 && (W = clone(W)), DOMPurify.removed = [];
2022
2022
  let s = Ue && typeof e != "string" && Tn(e);
2023
2023
  if (s) {
2024
2024
  vn(e);
@@ -2035,7 +2035,7 @@ function createDOMPurify() {
2035
2035
  }
2036
2036
  } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === qt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2037
2037
  else {
2038
- if (!Ie && !ke && !je && e.indexOf("<") === -1) return T && Re ? j(e) : e;
2038
+ if (!Ie && !ke && !je && e.indexOf("<") === -1) return T && Re ? M(e) : e;
2039
2039
  if (r = yn(e), !r) return Ie ? null : Re ? k : "";
2040
2040
  }
2041
2041
  r && Fe && pn(r.firstChild);
@@ -2051,35 +2051,35 @@ function createDOMPurify() {
2051
2051
  e.element && _n(e.element);
2052
2052
  }), ke && Sn(e), e;
2053
2053
  if (Ie) {
2054
- if (ke && Sn(r), Le) for (o = oe.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2054
+ if (ke && Sn(r), Le) for (o = ae.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2055
2055
  else o = r;
2056
- return (W.shadowroot || W.shadowrootmode) && (o = ce.call(n, o, !0)), o;
2056
+ return (W.shadowroot || W.shadowrootmode) && (o = se.call(n, o, !0)), o;
2057
2057
  }
2058
2058
  let f = je ? r.outerHTML : r.innerHTML;
2059
- return je && U["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), ke && (f = xn(f)), T && Re ? j(f) : f;
2059
+ return je && U["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), ke && (f = xn(f)), T && Re ? M(f) : f;
2060
2060
  }, DOMPurify.setConfig = function() {
2061
2061
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2062
2062
  on(e), Me = !0, Ne = U, Pe = W;
2063
2063
  }, DOMPurify.clearConfig = function() {
2064
- nn = null, Me = !1, Ne = null, Pe = null, T = te, k = "";
2064
+ nn = null, Me = !1, Ne = null, Pe = null, T = A, k = "";
2065
2065
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2066
2066
  nn || on({});
2067
2067
  let r = Q(e), i = Q(t);
2068
2068
  return kn(r, i, n);
2069
2069
  }, DOMPurify.addHook = function(e, t) {
2070
- typeof t == "function" && X(I, e) && st(I[e], t);
2070
+ typeof t == "function" && X(R, e) && st(R[e], t);
2071
2071
  }, DOMPurify.removeHook = function(e, t) {
2072
- if (X(I, e)) {
2072
+ if (X(R, e)) {
2073
2073
  if (t !== void 0) {
2074
- let n = it(I[e], t);
2075
- return n === -1 ? void 0 : ct(I[e], n, 1)[0];
2074
+ let n = it(R[e], t);
2075
+ return n === -1 ? void 0 : ct(R[e], n, 1)[0];
2076
2076
  }
2077
- return at(I[e]);
2077
+ return at(R[e]);
2078
2078
  }
2079
2079
  }, DOMPurify.removeHooks = function(e) {
2080
- X(I, e) && (I[e] = []);
2080
+ X(R, e) && (R[e] = []);
2081
2081
  }, DOMPurify.removeAllHooks = function() {
2082
- I = Xt();
2082
+ R = Xt();
2083
2083
  }, DOMPurify;
2084
2084
  }
2085
2085
  var Qt = createDOMPurify(), _Class;
@@ -3531,7 +3531,7 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3531
3531
  color: s.value
3532
3532
  };
3533
3533
  }
3534
- return (t, n) => (A(), _("div", {
3534
+ return (t, n) => (j(), _("div", {
3535
3535
  "data-test": "chat-card",
3536
3536
  class: "my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-2xl",
3537
3537
  style: k({
@@ -3543,25 +3543,25 @@ var mr = ["aria-label"], hr = { class: "px-4 pb-2 pt-4" }, gr = ["innerHTML"], _
3543
3543
  v("div", hr, [v("div", {
3544
3544
  class: "text-[14px] font-semibold leading-tight",
3545
3545
  style: k({ color: s.value })
3546
- }, F(e.spec.title), 5)]),
3547
- i.value ? (A(), _("div", {
3546
+ }, I(e.spec.title), 5)]),
3547
+ i.value ? (j(), _("div", {
3548
3548
  key: 0,
3549
3549
  class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
3550
3550
  style: k({ color: c.value }),
3551
3551
  innerHTML: i.value
3552
3552
  }, null, 12, gr)) : h("", !0),
3553
- e.spec.actions?.length ? (A(), _("div", {
3553
+ e.spec.actions?.length ? (j(), _("div", {
3554
3554
  key: 1,
3555
3555
  class: "flex flex-wrap items-center gap-2 px-3 py-2.5",
3556
3556
  style: k({ borderTop: `1px solid ${o.value}` })
3557
- }, [(A(!0), _(f, null, M(e.spec.actions, (e) => (A(), _("button", {
3557
+ }, [(j(!0), _(f, null, P(e.spec.actions, (e) => (j(), _("button", {
3558
3558
  key: e.label,
3559
3559
  type: "button",
3560
3560
  "data-test": "chat-card-action",
3561
3561
  class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
3562
3562
  style: k(actionStyle(e.style)),
3563
3563
  onClick: (t) => r("action", e.reply)
3564
- }, F(e.label), 13, _r))), 128))], 4)) : h("", !0)
3564
+ }, I(e.label), 13, _r))), 128))], 4)) : h("", !0)
3565
3565
  ], 12, mr));
3566
3566
  }
3567
3567
  }), yr = 112, br = 52, xr = 14, Sr = 54, Cr = 34, wr = 260;
@@ -3796,13 +3796,13 @@ var kr = [
3796
3796
  inverted: { type: Boolean }
3797
3797
  },
3798
3798
  setup(e) {
3799
- let t = e, n = j(), r = ae(360), i;
3800
- ne(() => {
3799
+ let t = e, n = M(), r = ie(360), i;
3800
+ te(() => {
3801
3801
  typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
3802
3802
  let t = e[0]?.contentRect.width;
3803
3803
  t && (r.value = Math.round(t));
3804
3804
  }), i.observe(n.value));
3805
- }), te(() => i?.disconnect());
3805
+ }), A(() => i?.disconnect());
3806
3806
  let a = p(() => Math.min(720, Math.max(280, r.value))), o = p(() => t.result.ok ? t.result.spec : null), s = p(() => o.value?.visualType === "chart" ? o.value : null), c = p(() => o.value?.visualType === "diagram" ? o.value : null);
3807
3807
  function isCartesianChart(e) {
3808
3808
  return e?.chartType === "bar" || e?.chartType === "line" || e?.chartType === "scatter";
@@ -3886,7 +3886,7 @@ var kr = [
3886
3886
  max: a,
3887
3887
  ticks: o
3888
3888
  };
3889
- }), re = p(() => resolveSharedSeriesFormat({ series: b.value })), ie = p(() => {
3889
+ }), ne = p(() => resolveSharedSeriesFormat({ series: b.value })), re = p(() => {
3890
3890
  let e = m.value;
3891
3891
  if (!e) return {
3892
3892
  mode: "horizontal",
@@ -3897,8 +3897,8 @@ var kr = [
3897
3897
  labels: e.data.map((e) => String(e?.[t] ?? "")),
3898
3898
  plotWidth: Math.max(200, a.value - 42)
3899
3899
  });
3900
- }), P = p(() => {
3901
- let e = re.value?.valueFormat, t = !!(re.value && (e === "currency" || e === "percent" || re.value.valuePrefix || re.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = ie.value.mode === "angled";
3900
+ }), F = p(() => {
3901
+ let e = ne.value?.valueFormat, t = !!(ne.value && (e === "currency" || e === "percent" || ne.value.valuePrefix || ne.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = re.value.mode === "angled";
3902
3902
  return {
3903
3903
  width: a.value,
3904
3904
  height: 168 + (r ? 36 : 0),
@@ -3909,7 +3909,7 @@ var kr = [
3909
3909
  };
3910
3910
  });
3911
3911
  function labelCenterX(e, t) {
3912
- let n = m.value, r = P.value;
3912
+ let n = m.value, r = F.value;
3913
3913
  if (n?.chartType === "bar") {
3914
3914
  let n = r.width - r.left - r.right;
3915
3915
  return r.left + (e + .5) * (n / Math.max(t, 1));
@@ -3917,11 +3917,11 @@ var kr = [
3917
3917
  return xForIndex(e, t);
3918
3918
  }
3919
3919
  function xForIndex(e, t) {
3920
- let n = P.value, r = n.width - n.left - n.right;
3920
+ let n = F.value, r = n.width - n.left - n.right;
3921
3921
  return t <= 1 ? n.left + r / 2 : n.left + r * e / (t - 1);
3922
3922
  }
3923
3923
  function yForValue(e) {
3924
- let { min: t, max: n } = T.value, r = P.value, i = r.height - r.top - r.bottom;
3924
+ let { min: t, max: n } = T.value, r = F.value, i = r.height - r.top - r.bottom;
3925
3925
  return r.top + (n - e) / (n - t || 1) * i;
3926
3926
  }
3927
3927
  function pathForSeries(e) {
@@ -3931,7 +3931,7 @@ var kr = [
3931
3931
  return `${r === 0 ? "M" : "L"} ${xForIndex(r, t.data.length).toFixed(1)} ${yForValue(i).toFixed(1)}`;
3932
3932
  }).join(" ") : "";
3933
3933
  }
3934
- let se = p(() => {
3934
+ let oe = p(() => {
3935
3935
  let e = m.value;
3936
3936
  if (!e?.trendLine || e.chartType !== "line" && e.chartType !== "scatter") return null;
3937
3937
  let t = trendLinePoints(e, e.trendLine.dataKey), n = linearTrend(t);
@@ -3942,10 +3942,10 @@ var kr = [
3942
3942
  dataKey: e.trendLine.dataKey,
3943
3943
  seriesIndex: s
3944
3944
  };
3945
- }), ce = p(() => {
3945
+ }), se = p(() => {
3946
3946
  let e = m.value;
3947
3947
  if (!e || e.chartType !== "bar") return [];
3948
- let t = P.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3948
+ let t = F.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3949
3949
  if (S.value) {
3950
3950
  let r = Math.max(4, Math.min(24, n * .42));
3951
3951
  return e.data.flatMap((i, a) => {
@@ -3979,12 +3979,12 @@ var kr = [
3979
3979
  dataKey: e.dataKey
3980
3980
  };
3981
3981
  }));
3982
- }), I = p(() => {
3982
+ }), R = p(() => {
3983
3983
  let e = m.value;
3984
3984
  if (!e) return [];
3985
3985
  let t = e.data;
3986
3986
  if (!t.length) return [];
3987
- let n = t.length - 1, r = ie.value, i = r.mode === "angled";
3987
+ let n = t.length - 1, r = re.value, i = r.mode === "angled";
3988
3988
  return r.entries.map(({ index: e, text: r }) => ({
3989
3989
  key: `${e}`,
3990
3990
  label: r,
@@ -3992,7 +3992,7 @@ var kr = [
3992
3992
  anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
3993
3993
  angled: i
3994
3994
  })).filter((e) => e.label);
3995
- }), ue = p(() => {
3995
+ }), ce = p(() => {
3996
3996
  let e = m.value;
3997
3997
  if (!e || e.chartType !== "bar" || e.series.length !== 1 || S.value) return [];
3998
3998
  let t = e.series[0], n = e.data.map((n, r) => {
@@ -4015,7 +4015,7 @@ var kr = [
4015
4015
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
4016
4016
  seriesIndex: 0
4017
4017
  }));
4018
- }), de = p(() => {
4018
+ }), ue = p(() => {
4019
4019
  let e = m.value;
4020
4020
  if (!e?.data.length) return [];
4021
4021
  let t = e.data[e.data.length - 1];
@@ -4031,7 +4031,7 @@ var kr = [
4031
4031
  seriesIndex: n
4032
4032
  };
4033
4033
  });
4034
- }), pe = p(() => {
4034
+ }), de = p(() => {
4035
4035
  let e = m.value;
4036
4036
  if (!e?.data.length || e.chartType !== "line") return [];
4037
4037
  let t = e.data.length - 1, n = e.data[t];
@@ -4044,7 +4044,7 @@ var kr = [
4044
4044
  seriesIndex: i
4045
4045
  };
4046
4046
  }).filter((e) => e !== null);
4047
- }), R = p(() => {
4047
+ }), B = p(() => {
4048
4048
  let e = x.value;
4049
4049
  if (!e) return [];
4050
4050
  let t = e.data.map((t) => ({
@@ -4060,17 +4060,17 @@ var kr = [
4060
4060
  series: r
4061
4061
  })
4062
4062
  }));
4063
- }), B = p(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), he = [
4063
+ }), H = p(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), pe = [
4064
4064
  "var(--color-theme-900)",
4065
4065
  "var(--color-primary-500)",
4066
4066
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
4067
- ], _e = [
4067
+ ], he = [
4068
4068
  "rgba(255, 255, 255, 0.92)",
4069
4069
  "color-mix(in oklch, white 30%, var(--color-primary-500))",
4070
4070
  "rgba(255, 255, 255, 0.55)"
4071
4071
  ];
4072
4072
  function seriesColor(e) {
4073
- let n = t.inverted ? _e : he;
4073
+ let n = t.inverted ? he : pe;
4074
4074
  return n[e % n.length];
4075
4075
  }
4076
4076
  function diagramNodeFill(e) {
@@ -4079,8 +4079,8 @@ var kr = [
4079
4079
  function diagramNodeStroke(e) {
4080
4080
  return e === "decision" ? t.inverted ? "rgba(255, 255, 255, 0.26)" : "color-mix(in oklch, var(--color-primary-500) 32%, var(--color-theme-300))" : be.value;
4081
4081
  }
4082
- let H = p(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ve = p(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), U = p(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ye = p(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), W = p(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), be = p(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), G = p(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Se = p(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Ce = p(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), we = p(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4083
- return (e, r) => o.value ? (A(), _("section", {
4082
+ let _e = p(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ve = p(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), U = p(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ye = p(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), W = p(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), be = p(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), G = p(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), Se = p(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Ce = p(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), we = p(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4083
+ return (e, r) => o.value ? (j(), _("section", {
4084
4084
  key: 0,
4085
4085
  "data-test": "chat-visual",
4086
4086
  "data-visual-type": o.value.visualType,
@@ -4096,30 +4096,30 @@ var kr = [
4096
4096
  }, [
4097
4097
  v("header", Ar, [v("h4", {
4098
4098
  class: "text-[13px] font-semibold leading-tight",
4099
- style: k({ color: H.value })
4100
- }, F(o.value.meta.title), 5), o.value.meta.description ? (A(), _("p", {
4099
+ style: k({ color: _e.value })
4100
+ }, I(o.value.meta.title), 5), o.value.meta.description ? (j(), _("p", {
4101
4101
  key: 0,
4102
4102
  class: "mt-0.5 text-[12px] leading-snug",
4103
4103
  style: k({ color: ve.value })
4104
- }, F(o.value.meta.description), 5)) : h("", !0)]),
4104
+ }, I(o.value.meta.description), 5)) : h("", !0)]),
4105
4105
  v("div", {
4106
4106
  ref_key: "bodyEl",
4107
4107
  ref: n
4108
- }, [m.value ? (A(), _("div", {
4108
+ }, [m.value ? (j(), _("div", {
4109
4109
  key: 0,
4110
4110
  role: "img",
4111
4111
  "aria-label": o.value.meta.title
4112
- }, [ue.value.length ? (A(), _("div", Mr, [(A(!0), _(f, null, M(ue.value, (e) => (A(), _("div", {
4112
+ }, [ce.value.length ? (j(), _("div", Mr, [(j(!0), _(f, null, P(ce.value, (e) => (j(), _("div", {
4113
4113
  key: e.key,
4114
4114
  "data-test": "chat-visual-horizontal-bar",
4115
4115
  class: "min-w-0"
4116
4116
  }, [v("div", Nr, [v("span", {
4117
4117
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4118
- style: k({ color: H.value })
4119
- }, F(e.label), 5), v("span", {
4118
+ style: k({ color: _e.value })
4119
+ }, I(e.label), 5), v("span", {
4120
4120
  class: "shrink-0 font-semibold tabular-nums",
4121
- style: k({ color: H.value })
4122
- }, F(e.value), 5)]), v("div", {
4121
+ style: k({ color: _e.value })
4122
+ }, I(e.value), 5)]), v("div", {
4123
4123
  class: "h-2 w-full overflow-hidden rounded-full",
4124
4124
  style: k({ background: we.value })
4125
4125
  }, [v("div", {
@@ -4128,36 +4128,36 @@ var kr = [
4128
4128
  width: `${e.width}%`,
4129
4129
  background: seriesColor(e.seriesIndex)
4130
4130
  })
4131
- }, null, 4)], 4)]))), 128))])) : (A(), _("svg", {
4131
+ }, null, 4)], 4)]))), 128))])) : (j(), _("svg", {
4132
4132
  key: 1,
4133
4133
  class: "block h-auto w-full overflow-visible",
4134
- viewBox: `0 0 ${P.value.width} ${P.value.height}`,
4135
- style: k({ aspectRatio: `${P.value.width} / ${P.value.height}` }),
4134
+ viewBox: `0 0 ${F.value.width} ${F.value.height}`,
4135
+ style: k({ aspectRatio: `${F.value.width} / ${F.value.height}` }),
4136
4136
  preserveAspectRatio: "xMidYMid meet",
4137
4137
  "aria-hidden": "true"
4138
4138
  }, [
4139
- (A(!0), _(f, null, M(T.value.ticks, (e) => (A(), _("line", {
4139
+ (j(!0), _(f, null, P(T.value.ticks, (e) => (j(), _("line", {
4140
4140
  key: `grid-${e}`,
4141
- x1: P.value.left,
4142
- x2: P.value.width - P.value.right,
4141
+ x1: F.value.left,
4142
+ x2: F.value.width - F.value.right,
4143
4143
  y1: yForValue(e),
4144
4144
  y2: yForValue(e),
4145
4145
  "stroke-width": "1",
4146
4146
  "vector-effect": "non-scaling-stroke",
4147
4147
  style: k({ stroke: e === 0 ? W.value : ye.value })
4148
4148
  }, null, 12, Fr))), 128)),
4149
- v("g", null, [(A(!0), _(f, null, M(T.value.ticks, (e) => (A(), _("text", {
4149
+ v("g", null, [(j(!0), _(f, null, P(T.value.ticks, (e) => (j(), _("text", {
4150
4150
  key: `y-${e}`,
4151
- x: P.value.left - 7,
4151
+ x: F.value.left - 7,
4152
4152
  y: yForValue(e) + 3,
4153
4153
  "text-anchor": "end",
4154
4154
  "font-size": "9.5",
4155
4155
  style: k({ fill: U.value })
4156
- }, F(oe(formatChatVisualTick)({
4156
+ }, I(ae(formatChatVisualTick)({
4157
4157
  value: e,
4158
- shared: re.value
4158
+ shared: ne.value
4159
4159
  })), 13, Ir))), 128))]),
4160
- m.value.chartType === "bar" ? (A(!0), _(f, { key: 0 }, M(ce.value, (e) => (A(), _("rect", {
4160
+ m.value.chartType === "bar" ? (j(!0), _(f, { key: 0 }, P(se.value, (e) => (j(), _("rect", {
4161
4161
  key: e.key,
4162
4162
  "data-test": "chat-visual-bar",
4163
4163
  "data-row-index": e.rowIndex,
@@ -4169,21 +4169,21 @@ var kr = [
4169
4169
  height: e.height,
4170
4170
  rx: "2.5",
4171
4171
  style: k({ fill: seriesColor(e.seriesIndex) })
4172
- }, null, 12, Lr))), 128)) : (A(), _(f, { key: 1 }, [
4173
- se.value ? (A(), _("path", {
4172
+ }, null, 12, Lr))), 128)) : (j(), _(f, { key: 1 }, [
4173
+ oe.value ? (j(), _("path", {
4174
4174
  key: 0,
4175
4175
  "data-test": "chat-visual-trend-line",
4176
- "data-trend-key": se.value.dataKey,
4177
- d: se.value.path,
4176
+ "data-trend-key": oe.value.dataKey,
4177
+ d: oe.value.path,
4178
4178
  fill: "none",
4179
4179
  "stroke-width": "1.4",
4180
4180
  "stroke-linecap": "round",
4181
4181
  "stroke-linejoin": "round",
4182
4182
  "stroke-dasharray": "4 3",
4183
4183
  "vector-effect": "non-scaling-stroke",
4184
- style: k({ stroke: seriesColor(se.value.seriesIndex) })
4184
+ style: k({ stroke: seriesColor(oe.value.seriesIndex) })
4185
4185
  }, null, 12, Rr)) : h("", !0),
4186
- (A(!0), _(f, null, M(b.value, (e, t) => (A(), _("g", { key: e.dataKey }, [m.value.chartType === "line" ? (A(), _("path", {
4186
+ (j(!0), _(f, null, P(b.value, (e, t) => (j(), _("g", { key: e.dataKey }, [m.value.chartType === "line" ? (j(), _("path", {
4187
4187
  key: 0,
4188
4188
  d: pathForSeries(e.dataKey),
4189
4189
  fill: "none",
@@ -4192,14 +4192,14 @@ var kr = [
4192
4192
  "stroke-linejoin": "round",
4193
4193
  "vector-effect": "non-scaling-stroke",
4194
4194
  style: k({ stroke: seriesColor(t) })
4195
- }, null, 12, zr)) : h("", !0), (A(!0), _(f, null, M(u.value, (n, r) => (A(), _(f, { key: `${e.dataKey}-${r}` }, [m.value.chartType === "scatter" ? (A(), _("circle", {
4195
+ }, null, 12, zr)) : h("", !0), (j(!0), _(f, null, P(u.value, (n, r) => (j(), _(f, { key: `${e.dataKey}-${r}` }, [m.value.chartType === "scatter" ? (j(), _("circle", {
4196
4196
  key: 0,
4197
4197
  cx: xForIndex(r, u.value.length),
4198
4198
  cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
4199
4199
  r: "2.6",
4200
4200
  style: k({ fill: seriesColor(t) })
4201
4201
  }, null, 12, Br)) : h("", !0)], 64))), 128))]))), 128)),
4202
- (A(!0), _(f, null, M(pe.value, (e) => (A(), _("circle", {
4202
+ (j(!0), _(f, null, P(de.value, (e) => (j(), _("circle", {
4203
4203
  key: `marker-${e.key}`,
4204
4204
  cx: e.cx,
4205
4205
  cy: e.cy,
@@ -4207,16 +4207,16 @@ var kr = [
4207
4207
  style: k({ fill: seriesColor(e.seriesIndex) })
4208
4208
  }, null, 12, Vr))), 128))
4209
4209
  ], 64)),
4210
- (A(!0), _(f, null, M(I.value, (e) => (A(), _("text", {
4210
+ (j(!0), _(f, null, P(R.value, (e) => (j(), _("text", {
4211
4211
  key: e.key,
4212
4212
  x: e.x,
4213
- y: e.angled ? P.value.height - P.value.bottom + 12 : P.value.height - 6,
4213
+ y: e.angled ? F.value.height - F.value.bottom + 12 : F.value.height - 6,
4214
4214
  "text-anchor": e.anchor,
4215
4215
  "font-size": "9.5",
4216
- transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${P.value.height - P.value.bottom + 12})` : void 0,
4216
+ transform: e.angled ? `rotate(${ae(-40)} ${e.x} ${F.value.height - F.value.bottom + 12})` : void 0,
4217
4217
  style: k({ fill: U.value })
4218
- }, F(e.label), 13, Hr))), 128))
4219
- ], 12, Pr)), de.value.length > 1 || m.value.chartType !== "bar" ? (A(), _("div", Ur, [(A(!0), _(f, null, M(de.value, (e) => (A(), _("div", {
4218
+ }, I(e.label), 13, Hr))), 128))
4219
+ ], 12, Pr)), ue.value.length > 1 || m.value.chartType !== "bar" ? (j(), _("div", Ur, [(j(!0), _(f, null, P(ue.value, (e) => (j(), _("div", {
4220
4220
  key: e.key,
4221
4221
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4222
4222
  }, [
@@ -4224,21 +4224,21 @@ var kr = [
4224
4224
  class: "size-2.5 shrink-0 rounded-full",
4225
4225
  style: k({ background: seriesColor(e.seriesIndex) })
4226
4226
  }, null, 4),
4227
- v("span", { style: k({ color: ve.value }) }, F(e.label), 5),
4227
+ v("span", { style: k({ color: ve.value }) }, I(e.label), 5),
4228
4228
  v("span", {
4229
4229
  class: "font-semibold tabular-nums",
4230
- style: k({ color: H.value })
4231
- }, F(e.value), 5)
4232
- ]))), 128))])) : h("", !0)], 8, jr)) : x.value ? (A(), _("div", Wr, [(A(!0), _(f, null, M(R.value, (e, t) => (A(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4230
+ style: k({ color: _e.value })
4231
+ }, I(e.value), 5)
4232
+ ]))), 128))])) : h("", !0)], 8, jr)) : x.value ? (j(), _("div", Wr, [(j(!0), _(f, null, P(B.value, (e, t) => (j(), _("div", { key: e.key }, [v("div", Gr, [v("span", {
4233
4233
  class: "truncate font-medium",
4234
- style: k({ color: H.value })
4235
- }, F(e.name), 5), v("span", Kr, [v("span", {
4234
+ style: k({ color: _e.value })
4235
+ }, I(e.name), 5), v("span", Kr, [v("span", {
4236
4236
  class: "font-semibold",
4237
- style: k({ color: H.value })
4238
- }, F(e.display), 5), v("span", {
4237
+ style: k({ color: _e.value })
4238
+ }, I(e.display), 5), v("span", {
4239
4239
  class: "ml-1.5",
4240
4240
  style: k({ color: ve.value })
4241
- }, F(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4241
+ }, I(Math.round(e.percent * 100)) + "%", 5)])]), v("div", {
4242
4242
  class: "h-1.5 w-full overflow-hidden rounded-full",
4243
4243
  style: k({ background: we.value })
4244
4244
  }, [v("div", {
@@ -4247,18 +4247,18 @@ var kr = [
4247
4247
  width: `${Math.max(2, e.percent * 100)}%`,
4248
4248
  background: seriesColor(t)
4249
4249
  })
4250
- }, null, 4)], 4)]))), 128))])) : c.value && B.value ? (A(), _("div", qr, [(A(), _("svg", {
4250
+ }, null, 4)], 4)]))), 128))])) : c.value && H.value ? (j(), _("div", qr, [(j(), _("svg", {
4251
4251
  "data-test": "chat-visual-diagram-svg",
4252
4252
  class: "block h-auto overflow-visible",
4253
- viewBox: `0 0 ${B.value.width} ${B.value.height}`,
4253
+ viewBox: `0 0 ${H.value.width} ${H.value.height}`,
4254
4254
  style: k({
4255
- width: `${B.value.width}px`,
4256
- aspectRatio: `${B.value.width} / ${B.value.height}`
4255
+ width: `${H.value.width}px`,
4256
+ aspectRatio: `${H.value.width} / ${H.value.height}`
4257
4257
  }),
4258
4258
  role: "img",
4259
4259
  "aria-label": o.value.meta.title
4260
4260
  }, [
4261
- (A(!0), _(f, null, M(B.value.edges, (e) => (A(), _("line", {
4261
+ (j(!0), _(f, null, P(H.value.edges, (e) => (j(), _("line", {
4262
4262
  key: e.key,
4263
4263
  "data-test": "chat-visual-diagram-edge",
4264
4264
  "data-from": e.from,
@@ -4272,14 +4272,14 @@ var kr = [
4272
4272
  "vector-effect": "non-scaling-stroke",
4273
4273
  style: k({ stroke: Ce.value })
4274
4274
  }, null, 12, Yr))), 128)),
4275
- (A(!0), _(f, null, M(B.value.edges, (e) => (A(), _("circle", {
4275
+ (j(!0), _(f, null, P(H.value.edges, (e) => (j(), _("circle", {
4276
4276
  key: `${e.key}-dot`,
4277
4277
  cx: e.x2,
4278
4278
  cy: e.y2,
4279
4279
  r: "2.4",
4280
4280
  style: k({ fill: Ce.value })
4281
4281
  }, null, 12, Xr))), 128)),
4282
- (A(!0), _(f, null, M(B.value.edges.filter((e) => e.label), (e) => (A(), _("foreignObject", {
4282
+ (j(!0), _(f, null, P(H.value.edges.filter((e) => e.label), (e) => (j(), _("foreignObject", {
4283
4283
  key: `${e.key}-label`,
4284
4284
  x: e.labelX - 55,
4285
4285
  y: e.labelY - 12,
@@ -4292,14 +4292,14 @@ var kr = [
4292
4292
  color: ve.value,
4293
4293
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4294
4294
  })
4295
- }, F(e.label), 5)], 8, Zr))), 128)),
4296
- (A(!0), _(f, null, M(B.value.nodes, (e) => (A(), _("g", {
4295
+ }, I(e.label), 5)], 8, Zr))), 128)),
4296
+ (j(!0), _(f, null, P(H.value.nodes, (e) => (j(), _("g", {
4297
4297
  key: e.id,
4298
4298
  "data-test": "chat-visual-diagram-node",
4299
4299
  "data-node-id": e.id,
4300
4300
  "data-node-kind": e.kind,
4301
4301
  transform: `translate(${e.x} ${e.y})`
4302
- }, [e.kind === "decision" ? (A(), _("polygon", {
4302
+ }, [e.kind === "decision" ? (j(), _("polygon", {
4303
4303
  key: 0,
4304
4304
  points: `${e.width / 2},0 ${e.width},${e.height / 2} ${e.width / 2},${e.height} 0,${e.height / 2}`,
4305
4305
  "stroke-width": "1",
@@ -4308,7 +4308,7 @@ var kr = [
4308
4308
  fill: diagramNodeFill(e.kind),
4309
4309
  stroke: diagramNodeStroke(e.kind)
4310
4310
  })
4311
- }, null, 12, $r)) : (A(), _("rect", {
4311
+ }, null, 12, $r)) : (j(), _("rect", {
4312
4312
  key: 1,
4313
4313
  width: e.width,
4314
4314
  height: e.height,
@@ -4319,25 +4319,25 @@ var kr = [
4319
4319
  fill: diagramNodeFill(e.kind),
4320
4320
  stroke: diagramNodeStroke(e.kind)
4321
4321
  })
4322
- }, null, 12, ei)), (A(), _("foreignObject", {
4322
+ }, null, 12, ei)), (j(), _("foreignObject", {
4323
4323
  x: "8",
4324
4324
  y: "5",
4325
4325
  width: e.width - 16,
4326
4326
  height: e.height - 10
4327
4327
  }, [v("div", ni, [v("div", {
4328
4328
  class: "line-clamp-2 text-[13px] font-semibold leading-tight",
4329
- style: k({ color: H.value })
4330
- }, F(e.label), 5), e.detail ? (A(), _("div", {
4329
+ style: k({ color: _e.value })
4330
+ }, I(e.label), 5), e.detail ? (j(), _("div", {
4331
4331
  key: 0,
4332
4332
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4333
4333
  style: k({ color: ve.value })
4334
- }, F(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4334
+ }, I(e.detail), 5)) : h("", !0)])], 8, ti))], 8, Qr))), 128))
4335
4335
  ], 12, Jr))])) : h("", !0)], 512),
4336
- o.value.meta.footer ? (A(), _("footer", {
4336
+ o.value.meta.footer ? (j(), _("footer", {
4337
4337
  key: 0,
4338
4338
  class: "mt-3 text-[11px] leading-snug",
4339
4339
  style: k({ color: U.value })
4340
- }, F(o.value.meta.footer), 5)) : h("", !0)
4340
+ }, I(o.value.meta.footer), 5)) : h("", !0)
4341
4341
  ], 12, kr)) : h("", !0);
4342
4342
  }
4343
4343
  }), ii = ["innerHTML"], ai = /* @__PURE__ */ S({
@@ -4349,8 +4349,8 @@ var kr = [
4349
4349
  },
4350
4350
  emits: ["action"],
4351
4351
  setup(e, { emit: t }) {
4352
- let n = e, r = t, i = ae(n.text), a;
4353
- ce([() => n.text, () => n.streaming], ([e, t]) => {
4352
+ let n = e, r = t, i = ie(n.text), a;
4353
+ se([() => n.text, () => n.streaming], ([e, t]) => {
4354
4354
  if (!t) {
4355
4355
  a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
4356
4356
  return;
@@ -4358,7 +4358,7 @@ var kr = [
4358
4358
  a === void 0 && (a = requestAnimationFrame(() => {
4359
4359
  a = void 0, i.value = n.text;
4360
4360
  }));
4361
- }), te(() => {
4361
+ }), A(() => {
4362
4362
  a !== void 0 && cancelAnimationFrame(a);
4363
4363
  });
4364
4364
  let o = new g.Renderer();
@@ -4511,23 +4511,23 @@ var kr = [
4511
4511
  streaming: !!n.streaming
4512
4512
  }) : [];
4513
4513
  });
4514
- return (t, n) => (A(), _("div", {
4514
+ return (t, n) => (j(), _("div", {
4515
4515
  class: "chat-msg-rich break-words text-[14px] leading-relaxed @sm/chat:max-w-[65ch] @sm/chat:text-[16px] @sm/chat:leading-relaxed",
4516
4516
  onErrorCapture: onRichTextAssetError
4517
- }, [(A(!0), _(f, null, M(h.value, (t) => (A(), _(f, { key: t.key }, [t.kind === "markdown" ? (A(), _("div", {
4517
+ }, [(j(!0), _(f, null, P(h.value, (t) => (j(), _(f, { key: t.key }, [t.kind === "markdown" ? (j(), _("div", {
4518
4518
  key: 0,
4519
4519
  class: T(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4520
4520
  innerHTML: t.html
4521
- }, null, 10, ii)) : t.kind === "visual" ? (A(), m(ri, {
4521
+ }, null, 10, ii)) : t.kind === "visual" ? (j(), m(ri, {
4522
4522
  key: 1,
4523
4523
  result: t.result,
4524
4524
  inverted: e.inverted
4525
- }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (A(), m(vr, {
4525
+ }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (j(), m(vr, {
4526
4526
  key: 2,
4527
4527
  spec: t.spec,
4528
4528
  inverted: e.inverted,
4529
4529
  onAction: n[0] || (n[0] = (e) => r("action", e))
4530
- }, null, 8, ["spec", "inverted"])) : (A(), _("div", {
4530
+ }, null, 8, ["spec", "inverted"])) : (j(), _("div", {
4531
4531
  key: 3,
4532
4532
  "data-test": "chat-visual-pending",
4533
4533
  role: "status",
@@ -4545,7 +4545,7 @@ var kr = [
4545
4545
  }), oi = 80, si = 600, ci = /* @__PURE__ */ S({
4546
4546
  __name: "ChatScroller",
4547
4547
  setup(e, { expose: t }) {
4548
- let n = j(), r = j(), i = j(!0), a, o = 0;
4548
+ let n = M(), r = M(), i = M(!0), a, o = 0;
4549
4549
  function scrollToBottom() {
4550
4550
  let e = n.value;
4551
4551
  e && (e.scrollTop = e.scrollHeight);
@@ -4560,15 +4560,15 @@ var kr = [
4560
4560
  function pin() {
4561
4561
  i.value = !0, scrollToBottom();
4562
4562
  }
4563
- return t({ pin }), ne(() => {
4563
+ return t({ pin }), te(() => {
4564
4564
  requestAnimationFrame(() => {
4565
4565
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4566
4566
  }), r.value && (a = new ResizeObserver(() => {
4567
4567
  i.value && Date.now() > o && scrollToBottom();
4568
4568
  }), a.observe(r.value), n.value && a.observe(n.value));
4569
- }), te(() => {
4569
+ }), A(() => {
4570
4570
  a?.disconnect();
4571
- }), (e, t) => (A(), _("div", {
4571
+ }), (e, t) => (j(), _("div", {
4572
4572
  ref_key: "viewport",
4573
4573
  ref: n,
4574
4574
  class: T(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
@@ -4579,7 +4579,7 @@ var kr = [
4579
4579
  ref_key: "content",
4580
4580
  ref: r,
4581
4581
  class: "flex-1 flex flex-col"
4582
- }, [ie(e.$slots, "default")], 512)], 34));
4582
+ }, [re(e.$slots, "default")], 512)], 34));
4583
4583
  }
4584
4584
  }), li = ["data-voice-state", "data-voice-activity"], ui = { class: "flex flex-1 flex-col items-center justify-center pb-8" }, di = { "data-voice-assistant-avatar": "" }, fi = {
4585
4585
  "data-test": "voice-histogram",
@@ -4601,64 +4601,68 @@ var kr = [
4601
4601
  }
4602
4602
  },
4603
4603
  emits: ["end"],
4604
- setup(e, { emit: t }) {
4605
- let n = t, r = j(0), i = j("mic"), a = j("idle"), o = j(!1), s = ae(), c = !1, u, m = p(() => o.value ? "error" : a.value === "live" ? i.value === "playback" && r.value > .01 ? "speaking" : "listening" : "connecting"), h = [
4604
+ setup(e, { expose: t, emit: n }) {
4605
+ let r = n, i = M(0), a = M("mic"), o = M("idle"), s = M(!1), c = ie(), u = !1, m, h = p(() => s.value ? "error" : o.value === "live" ? a.value === "playback" && i.value > .01 ? "speaking" : "listening" : "connecting"), b = [
4606
4606
  0,
4607
4607
  2,
4608
4608
  4,
4609
4609
  6,
4610
4610
  8
4611
- ], b = h.map(() => 0), S = j(b), C = j(b), te = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : void 0, ie = typeof window < "u" && typeof window.requestAnimationFrame == "function" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(performance.now()), 16), P = 0, oe = 0;
4611
+ ], S = b.map(() => 0), C = M(S), A = M(S), re = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : void 0, F = typeof window < "u" && typeof window.requestAnimationFrame == "function" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(performance.now()), 16), ae = 0, oe = 0;
4612
+ async function end() {
4613
+ u = !0, await c.value?.end();
4614
+ }
4615
+ t({ end });
4612
4616
  function easeFrame(e) {
4613
- P = 0;
4617
+ ae = 0;
4614
4618
  let t = Math.min(64, Math.max(0, e - oe));
4615
4619
  oe = e;
4616
4620
  let ease = (e, n) => {
4617
4621
  let r = n > e ? hi : gi;
4618
4622
  return e + (n - e) * (1 - Math.exp(-t / r));
4619
4623
  };
4620
- C.value = C.value.map((e, t) => ease(e, S.value[t] ?? 0)), !C.value.every((e, t) => Math.abs((S.value[t] ?? 0) - e) <= 5e-4) || S.value.some((e) => e > 0) ? P = ie(easeFrame) : C.value = b;
4624
+ A.value = A.value.map((e, t) => ease(e, C.value[t] ?? 0)), !A.value.every((e, t) => Math.abs((C.value[t] ?? 0) - e) <= 5e-4) || C.value.some((e) => e > 0) ? ae = F(easeFrame) : A.value = S;
4621
4625
  }
4622
4626
  function followLevel(e) {
4623
4627
  let gate = (e) => Math.max(0, e - mi) / (1 - mi);
4624
- if (S.value = h.map((t) => gate(Math.min(1, Math.max(0, e?.[t] ?? r.value)))), te?.matches) {
4625
- C.value = S.value;
4628
+ if (C.value = b.map((t) => gate(Math.min(1, Math.max(0, e?.[t] ?? i.value)))), re?.matches) {
4629
+ A.value = C.value;
4626
4630
  return;
4627
4631
  }
4628
- P || (oe = performance.now(), P = ie(easeFrame));
4632
+ ae || (oe = performance.now(), ae = F(easeFrame));
4629
4633
  }
4630
- let se = p(() => C.value.map((e) => Math.round((2 + Math.sqrt(Math.min(1, Math.max(0, e))) * 14) * 10) / 10)), ce = p(() => m.value === "error" ? "bg-red-500" : m.value === "connecting" ? "bg-amber-500" : m.value === "speaking" ? "bg-primary-500" : "bg-green-500"), I = {
4634
+ let se = p(() => A.value.map((e) => Math.round((2 + Math.sqrt(Math.min(1, Math.max(0, e))) * 14) * 10) / 10)), R = p(() => h.value === "error" ? "bg-red-500" : h.value === "connecting" ? "bg-amber-500" : h.value === "speaking" ? "bg-primary-500" : "bg-green-500"), ce = {
4631
4635
  connecting: "Connecting",
4632
4636
  listening: "Listening",
4633
4637
  speaking: "Speaking",
4634
4638
  error: "Connection problem"
4635
- }, ue = p(() => I[m.value]);
4639
+ }, ue = p(() => ce[h.value]);
4636
4640
  function emitEnd() {
4637
- c || (c = !0, n("end"));
4641
+ u || (u = !0, r("end"));
4638
4642
  }
4639
- return ne(async () => {
4643
+ return te(async () => {
4640
4644
  let t = e.chatController?.createVoiceClient({
4641
4645
  onLevel: (e) => {
4642
- i.value = e.source, r.value = e.level, followLevel(e.bands);
4646
+ a.value = e.source, i.value = e.level, followLevel(e.bands);
4643
4647
  },
4644
4648
  onStateChange: (e) => {
4645
- a.value = e, e === "ended" && (o.value ? u = setTimeout(emitEnd, 1600) : emitEnd());
4649
+ o.value = e, e === "ended" && (s.value ? m = setTimeout(emitEnd, 1600) : emitEnd());
4646
4650
  },
4647
4651
  onError: (t) => {
4648
- o.value = !0, e.chatController?.notify?.(t.message);
4652
+ s.value = !0, e.chatController?.notify?.(t.message);
4649
4653
  }
4650
4654
  });
4651
4655
  if (!t) {
4652
4656
  emitEnd();
4653
4657
  return;
4654
4658
  }
4655
- s.value = t, await t.start();
4656
- }), re(() => {
4657
- c = !0, u && clearTimeout(u), P && typeof window < "u" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(P), P = 0, s.value?.end();
4658
- }), (t, n) => (A(), _("div", {
4659
+ c.value = t, await t.start();
4660
+ }), ne(() => {
4661
+ u = !0, m && clearTimeout(m), ae && typeof window < "u" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(ae), ae = 0, c.value?.end();
4662
+ }), (t, n) => (j(), _("div", {
4659
4663
  "data-test": "voice-mode",
4660
- "data-voice-state": a.value,
4661
- "data-voice-activity": m.value,
4664
+ "data-voice-state": o.value,
4665
+ "data-voice-activity": h.value,
4662
4666
  class: "relative flex min-h-0 flex-1 flex-col px-4 pt-8 pb-5"
4663
4667
  }, [v("div", ui, [
4664
4668
  v("div", di, [x(ze, {
@@ -4668,16 +4672,16 @@ var kr = [
4668
4672
  "is-light": e.isLight,
4669
4673
  class: "size-28"
4670
4674
  }, null, 8, ["agent", "is-light"])]),
4671
- v("div", fi, [(A(!0), _(f, null, M(se.value, (e, t) => (A(), _("span", {
4675
+ v("div", fi, [(j(!0), _(f, null, P(se.value, (e, t) => (j(), _("span", {
4672
4676
  key: t,
4673
4677
  "data-test": "voice-histogram-bar",
4674
- class: T(["w-[2.5px] rounded-full transition-colors duration-150", [ce.value, m.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
4678
+ class: T(["w-[2.5px] rounded-full transition-colors duration-150", [R.value, h.value === "connecting" ? "pl-voice-bar-wave" : ""]]),
4675
4679
  style: k({
4676
4680
  height: `${e}px`,
4677
- ...m.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
4681
+ ...h.value === "connecting" ? { animationDelay: `${t * 90}ms` } : {}
4678
4682
  })
4679
4683
  }, null, 6))), 128))]),
4680
- v("div", pi, F(ue.value), 1)
4684
+ v("div", pi, I(ue.value), 1)
4681
4685
  ])], 8, li));
4682
4686
  }
4683
4687
  }), vi = {
@@ -4822,7 +4826,7 @@ var kr = [
4822
4826
  }, n = p(() => {
4823
4827
  let n = { ...t[e.scope] };
4824
4828
  return e.scope === "org" && e.scopeName && (n.label = e.scopeName, n.tooltip = `Visible to ${e.scopeName} members`), n;
4825
- }), r = j(), i = j(), a = j();
4829
+ }), r = M(), i = M(), a = M();
4826
4830
  function containsMarkdownLink(e) {
4827
4831
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
4828
4832
  }
@@ -4833,23 +4837,23 @@ var kr = [
4833
4837
  let n = e[t], r = e[t + 1];
4834
4838
  return !r || r.sender !== n.sender;
4835
4839
  }
4836
- let o = p(() => e.chatController?.textState.value), s = p(() => o.value?.isConnected ?? !1), c = p(() => o.value?.isThinking ?? !1), u = p(() => o.value?.connectionStatus === "disconnected" && !!o.value?.error), S = p(() => o.value?.connectionStatus !== "connected" && !o.value?.error), te = j(!1), P = p(() => e.chatController?.liveTurnBlocks?.value ?? []), ae = p(() => {
4837
- for (let e = P.value.length - 1; e >= 0; e--) {
4838
- let t = P.value[e];
4840
+ let o = p(() => e.chatController?.textState.value), s = p(() => o.value?.isConnected ?? !1), c = p(() => o.value?.isThinking ?? !1), u = p(() => o.value?.connectionStatus === "disconnected" && !!o.value?.error), S = p(() => o.value?.connectionStatus !== "connected" && !o.value?.error), A = M(!1), F = p(() => e.chatController?.liveTurnBlocks?.value ?? []), ie = p(() => {
4841
+ for (let e = F.value.length - 1; e >= 0; e--) {
4842
+ let t = F.value[e];
4839
4843
  if (t?.kind === "text") return t.id;
4840
4844
  }
4841
- }), oe = p(() => e.chatController?.liveStreamMessageId?.value), R = p(() => {
4845
+ }), ae = p(() => e.chatController?.liveStreamMessageId?.value), B = p(() => {
4842
4846
  let t = e.chatController?.sharedMessages.value ?? [];
4843
- return P.value.length && oe.value ? t.filter((e) => e.id !== oe.value) : t;
4844
- }), B = p(() => {
4847
+ return F.value.length && ae.value ? t.filter((e) => e.id !== ae.value) : t;
4848
+ }), H = p(() => {
4845
4849
  if (!e.chatController?.workJournal?.value) return o.value?.workingDescription?.trim() || void 0;
4846
- }), _e = p(() => e.chatController?.workJournal?.value), H = p(() => {
4847
- if (!_e.value && !P.value.length) return;
4848
- let e = R.value, t = e[e.length - 1];
4850
+ }), he = p(() => e.chatController?.workJournal?.value), _e = p(() => {
4851
+ if (!he.value && !F.value.length) return;
4852
+ let e = B.value, t = e[e.length - 1];
4849
4853
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
4850
4854
  }), ve = p(() => {
4851
4855
  let t = {};
4852
- for (let n of R.value) {
4856
+ for (let n of B.value) {
4853
4857
  if (n.sender === "user" || !n.toolActivities?.length) continue;
4854
4858
  let r = e.chatController?.workJournalFor?.({
4855
4859
  activities: n.toolActivities,
@@ -4911,9 +4915,9 @@ var kr = [
4911
4915
  }
4912
4916
  let U = p(() => o.value?.transientIssue), ye = p(() => {
4913
4917
  if (!c.value) return;
4914
- let e = R.value, t = e[e.length - 1];
4918
+ let e = B.value, t = e[e.length - 1];
4915
4919
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
4916
- }), W = p(() => !c.value || B.value || _e.value || P.value.length ? !1 : ye.value === void 0), be = p(() => B.value ?? (W.value ? "Thinking…" : void 0)), G = p(() => o.value?.sendBlockedReason), Se = p(() => G.value === "agent_deleted"), Ce = p(() => u.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : S.value ? "Connecting..." : G.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), we = p(() => e.chatController?.composerState?.value ?? {
4920
+ }), W = p(() => !c.value || H.value || he.value || F.value.length ? !1 : ye.value === void 0), be = p(() => H.value ?? (W.value ? "Thinking…" : void 0)), G = p(() => o.value?.sendBlockedReason), Se = p(() => G.value === "agent_deleted"), Ce = p(() => u.value ? `${e.agent.displayName.value || e.agent.name.value || "Assistant"} is offline` : S.value ? "Connecting..." : G.value === "agent_deleted" ? "This assistant was deleted" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), we = p(() => e.chatController?.composerState?.value ?? {
4917
4921
  text: "",
4918
4922
  pendingAttachments: [],
4919
4923
  isUploading: !1
@@ -4924,17 +4928,19 @@ var kr = [
4924
4928
  function isQueuedMessage(e) {
4925
4929
  return Ie.value?.has(e) ?? !1;
4926
4930
  }
4927
- let Le = p(() => Me.value === "stop" ? "Stop reply" : Fe.value ? "Send — answered after current work" : "Send message"), Re = p(() => je.value && !ke.value && !!Oe.value?.canUseBrowserRecording), Be = p(() => Oe.value?.isActive.value ?? !1), Ve = p(() => Oe.value?.elapsedLabel.value ?? "0:00"), He = p(() => Oe.value?.statusText.value ?? "Release to send"), Ue = p(() => Oe.value?.state.value.phase === "sending" ? "Sending voice message" : Be.value ? "Release to send voice message" : "Hold to record voice message"), We = j(!1), Ge = p(() => e.chatController?.canStartVoice?.value ?? !1), Ke = p(() => Ge.value && !We.value && !Be.value && Me.value === "idle"), qe = p(() => !s.value), Ye = p(() => qe.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
4931
+ let Le = p(() => Me.value === "stop" ? "Stop reply" : Fe.value ? "Send — answered after current work" : "Send message"), Re = p(() => je.value && !ke.value && !!Oe.value?.canUseBrowserRecording), Be = p(() => Oe.value?.isActive.value ?? !1), Ve = p(() => Oe.value?.elapsedLabel.value ?? "0:00"), He = p(() => Oe.value?.statusText.value ?? "Release to send"), Ue = p(() => Oe.value?.state.value.phase === "sending" ? "Sending voice message" : Be.value ? "Release to send voice message" : "Hold to record voice message"), We = M(!1), Ge = M(), Ke = p(() => e.chatController?.canStartVoice?.value ?? !1), qe = p(() => Ke.value && !We.value && !Be.value && Me.value === "idle"), Ye = p(() => !s.value), Xe = p(() => Ye.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
4928
4932
  function startVoiceConversation() {
4929
- !Ke.value || qe.value || (We.value = !0);
4933
+ !qe.value || Ye.value || (We.value = !0);
4930
4934
  }
4931
4935
  async function endVoiceConversation() {
4932
- We.value && (We.value = !1, await C(), i.value?.focus(), await e.chatController?.refreshMessages());
4936
+ if (!We.value) return;
4937
+ let t = Ge.value?.end();
4938
+ We.value = !1, await C(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
4933
4939
  }
4934
- let K = p(() => e.variant === "light"), Xe = p(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), Ze = p(() => K.value ? "text-theme-300" : "text-white/30");
4935
- ne(async () => {
4940
+ let K = p(() => e.variant === "light"), Ze = p(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), Qe = p(() => K.value ? "text-theme-300" : "text-white/30");
4941
+ te(async () => {
4936
4942
  e.chatController && !s.value && await e.chatController.startTextConversation();
4937
- }), re(() => {
4943
+ }), ne(() => {
4938
4944
  e.chatController?.voiceRecorder?.teardown();
4939
4945
  });
4940
4946
  async function sendMessage() {
@@ -4967,7 +4973,7 @@ var kr = [
4967
4973
  function adjustTextareaHeight() {
4968
4974
  i.value && (i.value.style.height = "auto", i.value.style.height = `${Math.min(i.value.scrollHeight, 150)}px`);
4969
4975
  }
4970
- ce(Te, () => C(() => adjustTextareaHeight()));
4976
+ se(Te, () => C(() => adjustTextareaHeight()));
4971
4977
  function triggerFileInput() {
4972
4978
  a.value?.click();
4973
4979
  }
@@ -5011,24 +5017,26 @@ var kr = [
5011
5017
  ...o ? {} : { year: "numeric" }
5012
5018
  })}, ${a}`;
5013
5019
  }
5014
- return (t, o) => (A(), _("div", {
5020
+ return (t, o) => (j(), _("div", {
5015
5021
  "data-test": "messaging-root",
5016
- class: T(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5022
+ class: T(["@container/chat relative flex h-full flex-col", B.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5017
5023
  }, [
5018
- e.showHeader && !K.value ? (A(), _("div", vi, [x(Pe, {
5024
+ e.showHeader && !K.value ? (j(), _("div", vi, [x(Pe, {
5019
5025
  agent: e.agent,
5020
5026
  "is-online": s.value
5021
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (A(), _("div", yi, [v("div", { class: T(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5027
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (j(), _("div", yi, [v("div", { class: T(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5022
5028
  x(ze, {
5023
5029
  agent: e.agent,
5024
5030
  "is-light": K.value,
5025
5031
  class: "size-10"
5026
5032
  }, null, 8, ["agent", "is-light"]),
5027
- v("div", bi, [v("div", xi, F(e.agent.displayName.value), 1), v("div", Si, F(e.agent.title.value || "Assistant"), 1)]),
5028
- e.headerMeta ? (A(), _("span", Ci, F(e.headerMeta), 1)) : h("", !0)
5033
+ v("div", bi, [v("div", xi, I(e.agent.displayName.value), 1), v("div", Si, I(e.agent.title.value || "Assistant"), 1)]),
5034
+ e.headerMeta ? (j(), _("span", Ci, I(e.headerMeta), 1)) : h("", !0)
5029
5035
  ], 2)])) : h("", !0),
5030
- We.value ? (A(), m(_i, {
5036
+ We.value ? (j(), m(_i, {
5031
5037
  key: 2,
5038
+ ref_key: "voiceMode",
5039
+ ref: Ge,
5032
5040
  agent: e.agent,
5033
5041
  "chat-controller": e.chatController,
5034
5042
  "is-light": K.value,
@@ -5037,36 +5045,36 @@ var kr = [
5037
5045
  "agent",
5038
5046
  "chat-controller",
5039
5047
  "is-light"
5040
- ])) : (A(), _(f, { key: 3 }, [S.value ? (A(), _("div", {
5048
+ ])) : (j(), _(f, { key: 3 }, [S.value ? (j(), _("div", {
5041
5049
  key: 0,
5042
5050
  class: T(["py-16 flex flex-col items-center justify-center gap-2 text-sm", K.value ? "text-theme-400" : "text-theme-600"])
5043
- }, [x(he, { class: "size-4" })], 2)) : e.setupHint ? (A(), _("div", {
5051
+ }, [x(pe, { class: "size-4" })], 2)) : e.setupHint ? (j(), _("div", {
5044
5052
  key: 1,
5045
- class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", Ze.value])
5046
- }, [o[21] || (o[21] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, F(e.setupHint), 1)], 2)) : h("", !0), x(ci, {
5053
+ class: T(["flex items-center justify-center gap-1.5 py-2 text-[11px]", Qe.value])
5054
+ }, [o[21] || (o[21] = v("i", { class: "i-tabler-tool size-3" }, null, -1)), v("span", null, I(e.setupHint), 1)], 2)) : h("", !0), x(ci, {
5047
5055
  ref_key: "chatScroller",
5048
5056
  ref: r,
5049
- class: T(R.value.length === 0 ? "flex-none" : "flex-1")
5057
+ class: T(B.value.length === 0 ? "flex-none" : "flex-1")
5050
5058
  }, {
5051
- default: I(() => [v("div", { class: T([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5052
- R.value.length === 0 && !S.value ? (A(), _("div", wi, [ie(t.$slots, "empty-heading", {
5059
+ default: R(() => [v("div", { class: T([B.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 space-y-2" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? B.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5060
+ B.value.length === 0 && !S.value ? (j(), _("div", wi, [re(t.$slots, "empty-heading", {
5053
5061
  agent: e.agent,
5054
5062
  isLight: K.value
5055
5063
  }, () => [x(ze, {
5056
5064
  agent: e.agent,
5057
5065
  "is-light": K.value,
5058
5066
  class: "mb-4 size-20 @sm/chat:size-24"
5059
- }, null, 8, ["agent", "is-light"]), v("div", { class: T(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, F(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (A(), _(f, { key: 0 }, [v("p", { class: T(["mt-1 text-center text-xs @sm/chat:text-sm", Ze.value]) }, F(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
5067
+ }, null, 8, ["agent", "is-light"]), v("div", { class: T(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, I(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? h("", !0) : (j(), _(f, { key: 0 }, [v("p", { class: T(["mt-1 text-center text-xs @sm/chat:text-sm", Qe.value]) }, I(e.emptyStateMessage || "Type your message to get started."), 3), v("div", {
5060
5068
  class: T(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5061
5069
  title: n.value.tooltip
5062
- }, [v("i", { class: T([n.value.icon, "size-3"]) }, null, 2), v("span", null, F(n.value.label), 1)], 10, Ti)], 64))])) : h("", !0),
5063
- (A(!0), _(f, null, M(R.value, (e, t) => (A(), _(f, { key: e.id }, [
5064
- shouldShowTimeDivider(R.value, t) ? (A(), _("div", Ei, [
5065
- v("div", { class: T(["flex-1 h-px", Xe.value]) }, null, 2),
5066
- v("span", { class: T(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Ze.value]) }, F(shouldShowTimeDivider(R.value, t)), 3),
5067
- v("div", { class: T(["flex-1 h-px", Xe.value]) }, null, 2)
5070
+ }, [v("i", { class: T([n.value.icon, "size-3"]) }, null, 2), v("span", null, I(n.value.label), 1)], 10, Ti)], 64))])) : h("", !0),
5071
+ (j(!0), _(f, null, P(B.value, (e, t) => (j(), _(f, { key: e.id }, [
5072
+ shouldShowTimeDivider(B.value, t) ? (j(), _("div", Ei, [
5073
+ v("div", { class: T(["flex-1 h-px", Ze.value]) }, null, 2),
5074
+ v("span", { class: T(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Qe.value]) }, I(shouldShowTimeDivider(B.value, t)), 3),
5075
+ v("div", { class: T(["flex-1 h-px", Ze.value]) }, null, 2)
5068
5076
  ])) : h("", !0),
5069
- messageWorkJournal(e) ? (A(), _("div", {
5077
+ messageWorkJournal(e) ? (j(), _("div", {
5070
5078
  key: 1,
5071
5079
  "data-test": "messaging-message-tool-activity",
5072
5080
  "data-journal-outcome": messageWorkJournal(e)?.outcome,
@@ -5075,7 +5083,7 @@ var kr = [
5075
5083
  model: messageWorkJournal(e),
5076
5084
  "is-light": K.value
5077
5085
  }, null, 8, ["model", "is-light"])], 8, Di)) : h("", !0),
5078
- isSystemExplainerMessage(e) ? (A(), _("div", {
5086
+ isSystemExplainerMessage(e) ? (j(), _("div", {
5079
5087
  key: 2,
5080
5088
  "data-test": "messaging-system-msg",
5081
5089
  "data-message-id": e.id,
@@ -5089,28 +5097,28 @@ var kr = [
5089
5097
  "data-issue-action-url": e.issue?.actionUrl,
5090
5098
  "data-streaming": e.id === ye.value ? "true" : void 0,
5091
5099
  class: "flex gap-2 items-end justify-start mb-4"
5092
- }, [v("div", ki, [v("div", { class: T(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: T(["pl-1", K.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (A(), m(ai, {
5100
+ }, [v("div", ki, [v("div", { class: T(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), v("div", { class: T(["pl-1", K.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (j(), m(ai, {
5093
5101
  key: 0,
5094
5102
  text: e.text,
5095
5103
  inverted: !K.value,
5096
5104
  streaming: e.id === ye.value,
5097
- onClick: o[0] || (o[0] = pe(() => {}, ["stop"])),
5105
+ onClick: o[0] || (o[0] = de(() => {}, ["stop"])),
5098
5106
  onAction: handleCardAction
5099
5107
  }, null, 8, [
5100
5108
  "text",
5101
5109
  "inverted",
5102
5110
  "streaming"
5103
- ])) : e.issue?.help ? (A(), m(ai, {
5111
+ ])) : e.issue?.help ? (j(), m(ai, {
5104
5112
  key: 1,
5105
5113
  text: e.issue.help,
5106
5114
  inverted: !K.value
5107
- }, null, 8, ["text", "inverted"])) : h("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (A(), _("a", {
5115
+ }, null, 8, ["text", "inverted"])) : h("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (j(), _("a", {
5108
5116
  key: 2,
5109
5117
  href: e.issue.actionUrl,
5110
5118
  "data-test": "messaging-system-msg-action",
5111
5119
  class: T(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5112
- onClick: o[1] || (o[1] = pe(() => {}, ["stop"]))
5113
- }, [b(F(e.issue.actionLabel) + " ", 1), o[22] || (o[22] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Ai)) : h("", !0)], 2)])], 8, Oi)) : e.sender === "system" ? (A(), _("div", {
5120
+ onClick: o[1] || (o[1] = de(() => {}, ["stop"]))
5121
+ }, [b(I(e.issue.actionLabel) + " ", 1), o[22] || (o[22] = v("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Ai)) : h("", !0)], 2)])], 8, Oi)) : e.sender === "system" ? (j(), _("div", {
5114
5122
  key: 3,
5115
5123
  "data-test": "messaging-system-status-msg",
5116
5124
  "data-message-id": e.id,
@@ -5128,8 +5136,8 @@ var kr = [
5128
5136
  }, null, -1)), x(ai, {
5129
5137
  text: e.text,
5130
5138
  inverted: !K.value,
5131
- onClick: o[2] || (o[2] = pe(() => {}, ["stop"]))
5132
- }, null, 8, ["text", "inverted"])], 10, ji)) : (A(), _("div", {
5139
+ onClick: o[2] || (o[2] = de(() => {}, ["stop"]))
5140
+ }, null, 8, ["text", "inverted"])], 10, ji)) : (j(), _("div", {
5133
5141
  key: 4,
5134
5142
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
5135
5143
  "data-message-id": e.id,
@@ -5143,30 +5151,30 @@ var kr = [
5143
5151
  class: T(["flex gap-2 items-end", {
5144
5152
  "justify-end": e.sender === "user",
5145
5153
  "justify-start": e.sender === "agent",
5146
- "mb-6": isGroupEnd(R.value, t),
5154
+ "mb-6": isGroupEnd(B.value, t),
5147
5155
  "opacity-70": isQueuedMessage(e.id)
5148
5156
  }])
5149
5157
  }, [v("div", {
5150
5158
  "data-test": "messaging-message-body",
5151
- class: T(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0 @sm/chat:pr-[1em] @lg/chat:pr-[2em]")
5152
- }, [blockAttachmentsForMessage(e).length ? (A(), _("div", {
5159
+ class: T(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0")
5160
+ }, [blockAttachmentsForMessage(e).length ? (j(), _("div", {
5153
5161
  key: 0,
5154
5162
  class: T(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
5155
- }, [(A(!0), _(f, null, M(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (A(), _(f, { key: attachmentKey(e, t) }, [e.type === "image" ? (A(), _("img", {
5163
+ }, [(j(!0), _(f, null, P(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (j(), _(f, { key: attachmentKey(e, t) }, [e.type === "image" ? (j(), _("img", {
5156
5164
  key: 0,
5157
5165
  src: e.src,
5158
5166
  alt: e.filename,
5159
5167
  "data-test": "messaging-attachment",
5160
5168
  "data-attachment-placement": "block",
5161
5169
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5162
- }, null, 8, Ni)) : e.type === "audio" ? (A(), _("audio", {
5170
+ }, null, 8, Ni)) : e.type === "audio" ? (j(), _("audio", {
5163
5171
  key: 1,
5164
5172
  src: e.src,
5165
5173
  controls: "",
5166
5174
  "data-test": "messaging-attachment",
5167
5175
  "data-attachment-placement": "block",
5168
5176
  class: "max-w-full"
5169
- }, null, 8, Pi)) : (A(), _("a", {
5177
+ }, null, 8, Pi)) : (j(), _("a", {
5170
5178
  key: 2,
5171
5179
  href: e.src,
5172
5180
  target: "_blank",
@@ -5174,35 +5182,35 @@ var kr = [
5174
5182
  "data-test": "messaging-attachment",
5175
5183
  "data-attachment-placement": "block",
5176
5184
  class: T(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5177
- }, [o[24] || (o[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + F(e.filename), 1)], 10, Fi))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (A(), _("div", {
5185
+ }, [o[24] || (o[24] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(e.filename), 1)], 10, Fi))], 64))), 128))], 2)) : h("", !0), messageRenderParts(e).length ? (j(), _("div", {
5178
5186
  key: 1,
5179
5187
  "data-test": "messaging-message-content",
5180
- class: T(e.sender === "user" ? K.value ? "rounded-[14px] px-4 py-2.5 bg-theme-100 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : K.value ? "text-theme-800" : "text-white/95")
5181
- }, [(A(!0), _(f, null, M(messageRenderParts(e), (t) => (A(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (A(), _("div", Ii, [x(ai, {
5188
+ class: T(e.sender === "user" ? K.value ? "rounded-[14px] px-4 py-2.5 bg-theme-100 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : K.value ? "text-theme-800 @lg/chat:px-[1em]" : "text-white/95 @lg/chat:px-[1em]")
5189
+ }, [(j(!0), _(f, null, P(messageRenderParts(e), (t) => (j(), _(f, { key: t.key }, [t.kind === "text" && t.text ? (j(), _("div", Ii, [x(ai, {
5182
5190
  text: t.text,
5183
5191
  inverted: e.sender === "user" || !K.value,
5184
5192
  streaming: e.id === ye.value,
5185
- onClick: o[3] || (o[3] = pe(() => {}, ["stop"])),
5193
+ onClick: o[3] || (o[3] = de(() => {}, ["stop"])),
5186
5194
  onAction: handleCardAction
5187
5195
  }, null, 8, [
5188
5196
  "text",
5189
5197
  "inverted",
5190
5198
  "streaming"
5191
- ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (A(), _("img", {
5199
+ ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (j(), _("img", {
5192
5200
  key: 1,
5193
5201
  src: t.attachment.src,
5194
5202
  alt: t.attachment.filename,
5195
5203
  "data-test": "messaging-attachment",
5196
5204
  "data-attachment-placement": t.placement,
5197
5205
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5198
- }, null, 8, Li)) : t.kind === "attachment" && t.attachment.type === "audio" ? (A(), _("audio", {
5206
+ }, null, 8, Li)) : t.kind === "attachment" && t.attachment.type === "audio" ? (j(), _("audio", {
5199
5207
  key: 2,
5200
5208
  src: t.attachment.src,
5201
5209
  controls: "",
5202
5210
  "data-test": "messaging-attachment",
5203
5211
  "data-attachment-placement": t.placement,
5204
5212
  class: "my-2 max-w-full"
5205
- }, null, 8, Ri)) : t.kind === "attachment" ? (A(), _("a", {
5213
+ }, null, 8, Ri)) : t.kind === "attachment" ? (j(), _("a", {
5206
5214
  key: 3,
5207
5215
  href: t.attachment.src,
5208
5216
  target: "_blank",
@@ -5210,8 +5218,8 @@ var kr = [
5210
5218
  "data-test": "messaging-attachment",
5211
5219
  "data-attachment-placement": t.placement,
5212
5220
  class: T(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5213
- }, [o[25] || (o[25] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + F(t.attachment.filename), 1)], 10, zi)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Mi)),
5214
- e.id === H.value ? (A(), _(f, { key: 5 }, [P.value.length ? (A(!0), _(f, { key: 0 }, M(P.value, (e) => (A(), _(f, { key: e.id }, [e.kind === "work" ? (A(), _("div", {
5221
+ }, [o[25] || (o[25] = v("i", { class: "i-tabler-file size-3.5" }, null, -1)), b(" " + I(t.attachment.filename), 1)], 10, zi)) : h("", !0)], 64))), 128))], 2)) : h("", !0)], 2)], 10, Mi)),
5222
+ e.id === _e.value ? (j(), _(f, { key: 5 }, [F.value.length ? (j(!0), _(f, { key: 0 }, P(F.value, (e) => (j(), _(f, { key: e.id }, [e.kind === "work" ? (j(), _("div", {
5215
5223
  key: 0,
5216
5224
  "data-test": "messaging-tool-activity",
5217
5225
  "data-journal-outcome": e.journal.outcome,
@@ -5219,44 +5227,44 @@ var kr = [
5219
5227
  }, [x(Je, {
5220
5228
  model: e.journal,
5221
5229
  "is-light": K.value
5222
- }, null, 8, ["model", "is-light"])], 8, Bi)) : e.kind === "text" && e.content ? (A(), _("div", {
5230
+ }, null, 8, ["model", "is-light"])], 8, Bi)) : e.kind === "text" && e.content ? (j(), _("div", {
5223
5231
  key: 1,
5224
5232
  "data-test": "messaging-live-text-block",
5225
- class: T(["mb-4 @sm/chat:pr-[1em] @lg/chat:pr-[2em]", K.value ? "text-theme-800" : "text-white/95"])
5233
+ class: T(["mb-4 @lg/chat:px-[1em]", K.value ? "text-theme-800" : "text-white/95"])
5226
5234
  }, [x(ai, {
5227
5235
  text: e.content,
5228
5236
  inverted: !K.value,
5229
- streaming: e.id === ae.value,
5230
- onClick: o[4] || (o[4] = pe(() => {}, ["stop"])),
5237
+ streaming: e.id === ie.value,
5238
+ onClick: o[4] || (o[4] = de(() => {}, ["stop"])),
5231
5239
  onAction: handleCardAction
5232
5240
  }, null, 8, [
5233
5241
  "text",
5234
5242
  "inverted",
5235
5243
  "streaming"
5236
- ])], 2)) : (A(), _("div", Vi, [x(he, { class: T(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : _e.value ? (A(), _("div", {
5244
+ ])], 2)) : (j(), _("div", Vi, [x(pe, { class: T(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : he.value ? (j(), _("div", {
5237
5245
  key: 1,
5238
5246
  "data-test": "messaging-tool-activity",
5239
- "data-journal-outcome": _e.value.outcome,
5247
+ "data-journal-outcome": he.value.outcome,
5240
5248
  class: "mb-4 w-full"
5241
5249
  }, [x(Je, {
5242
- model: _e.value,
5250
+ model: he.value,
5243
5251
  "is-light": K.value
5244
5252
  }, null, 8, ["model", "is-light"])], 8, Hi)) : h("", !0)], 64)) : h("", !0)
5245
5253
  ], 64))), 128)),
5246
- be.value ? (A(), _("div", {
5254
+ be.value ? (j(), _("div", {
5247
5255
  key: 1,
5248
- "data-test": B.value ? "messaging-working-state" : "messaging-thinking-indicator",
5249
- "data-working-description": B.value,
5256
+ "data-test": H.value ? "messaging-working-state" : "messaging-thinking-indicator",
5257
+ "data-working-description": H.value,
5250
5258
  role: "status",
5251
5259
  "aria-live": "polite",
5252
5260
  class: T(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-none", K.value ? "text-theme-500" : "text-white/50"])
5253
- }, [v("span", Wi, [(A(), _(f, null, M(3, (e) => v("span", {
5261
+ }, [v("span", Wi, [(j(), _(f, null, P(3, (e) => v("span", {
5254
5262
  key: e,
5255
5263
  "data-test": "messaging-thinking-dot",
5256
5264
  class: "chat-working-dot size-1.5 rounded-full bg-current",
5257
5265
  style: k({ animationDelay: `${(e - 1) * .18}s` })
5258
- }, null, 4)), 64))]), v("span", Gi, F(be.value), 1)], 10, Ui)) : h("", !0),
5259
- U.value ? (A(), _("div", {
5266
+ }, null, 4)), 64))]), v("span", Gi, I(be.value), 1)], 10, Ui)) : h("", !0),
5267
+ U.value ? (j(), _("div", {
5260
5268
  key: 2,
5261
5269
  "data-test": "messaging-transient-issue",
5262
5270
  "data-issue-code": U.value.code,
@@ -5266,13 +5274,13 @@ var kr = [
5266
5274
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5267
5275
  "aria-hidden": "true"
5268
5276
  }, null, -1)),
5269
- v("span", null, [b(F(U.value.message), 1), U.value.help ? (A(), _(f, { key: 0 }, [b(F(U.value.help), 1)], 64)) : h("", !0)]),
5270
- U.value.actionUrl && U.value.actionLabel ? (A(), _("a", {
5277
+ v("span", null, [b(I(U.value.message), 1), U.value.help ? (j(), _(f, { key: 0 }, [b(I(U.value.help), 1)], 64)) : h("", !0)]),
5278
+ U.value.actionUrl && U.value.actionLabel ? (j(), _("a", {
5271
5279
  key: 0,
5272
5280
  href: U.value.actionUrl,
5273
5281
  class: "shrink-0 underline underline-offset-2",
5274
- onClick: o[5] || (o[5] = pe(() => {}, ["stop"]))
5275
- }, F(U.value.actionLabel), 9, qi)) : h("", !0)
5282
+ onClick: o[5] || (o[5] = de(() => {}, ["stop"]))
5283
+ }, I(U.value.actionLabel), 9, qi)) : h("", !0)
5276
5284
  ], 10, Ki)) : h("", !0)
5277
5285
  ], 2)]),
5278
5286
  _: 3
@@ -5280,30 +5288,30 @@ var kr = [
5280
5288
  v("div", {
5281
5289
  "data-test": "messaging-composer-footer",
5282
5290
  class: T(["left-0 right-0 z-30 px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
5283
- R.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5284
- e.centered && R.value.length > 0 ? "pt-0" : "pt-3",
5291
+ B.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5292
+ e.centered && B.value.length > 0 ? "pt-0" : "pt-3",
5285
5293
  K.value ? e.centered ? "bg-theme-25/50" : "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"
5286
5294
  ]])
5287
5295
  }, [
5288
- Ee.value.length > 0 ? (A(), _("div", {
5296
+ Ee.value.length > 0 ? (j(), _("div", {
5289
5297
  key: 0,
5290
5298
  class: T(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
5291
- }, [(A(!0), _(f, null, M(Ee.value, (e, t) => (A(), _("div", {
5299
+ }, [(j(!0), _(f, null, P(Ee.value, (e, t) => (j(), _("div", {
5292
5300
  key: t,
5293
5301
  class: "relative shrink-0 group"
5294
- }, [e.type === "image" ? (A(), _("img", {
5302
+ }, [e.type === "image" ? (j(), _("img", {
5295
5303
  key: 0,
5296
5304
  src: e.src,
5297
5305
  alt: e.filename,
5298
5306
  class: T(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
5299
- }, null, 10, Ji)) : (A(), _("div", {
5307
+ }, null, 10, Ji)) : (j(), _("div", {
5300
5308
  key: 1,
5301
5309
  class: T(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5302
- }, [o[27] || (o[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Yi, F(e.filename), 1)], 2)), v("button", {
5310
+ }, [o[27] || (o[27] = v("i", { class: "i-tabler-file size-4" }, null, -1)), v("span", Yi, I(e.filename), 1)], 2)), v("button", {
5303
5311
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
5304
5312
  onClick: (e) => removeAttachment(t)
5305
- }, [...o[28] || (o[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Xi)]))), 128)), De.value ? (A(), _("div", Zi, [x(he, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5306
- Ae.value ? (A(), _("input", {
5313
+ }, [...o[28] || (o[28] = [v("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Xi)]))), 128)), De.value ? (j(), _("div", Zi, [x(pe, { class: "size-5" })])) : h("", !0)], 2)) : h("", !0),
5314
+ Ae.value ? (j(), _("input", {
5307
5315
  key: 1,
5308
5316
  ref_key: "fileInput",
5309
5317
  ref: a,
@@ -5317,15 +5325,15 @@ var kr = [
5317
5325
  "data-composer-action": Me.value,
5318
5326
  class: T(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto @lg/chat:pb-5 @lg/chat:pt-5" : "", K.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5319
5327
  onClick: focusComposer
5320
- }, [Be.value ? (A(), _("div", {
5328
+ }, [Be.value ? (j(), _("div", {
5321
5329
  key: 1,
5322
5330
  "data-test": "messaging-recording-state",
5323
5331
  class: T(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5324
5332
  }, [
5325
5333
  o[29] || (o[29] = v("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5326
- v("span", ea, F(Ve.value), 1),
5327
- v("span", { class: T(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, F(He.value), 3)
5328
- ], 2)) : ue((A(), _("textarea", {
5334
+ v("span", ea, I(Ve.value), 1),
5335
+ v("span", { class: T(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, I(He.value), 3)
5336
+ ], 2)) : ce((j(), _("textarea", {
5329
5337
  key: 0,
5330
5338
  ref_key: "textarea",
5331
5339
  ref: i,
@@ -5346,7 +5354,7 @@ var kr = [
5346
5354
  },
5347
5355
  class: T(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", K.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5348
5356
  onKeydown: handleKeydown
5349
- }, null, 42, $i)), [[se, Te.value]]), v("div", ta, [
5357
+ }, null, 42, $i)), [[oe, Te.value]]), v("div", ta, [
5350
5358
  v("button", {
5351
5359
  class: T(["-ml-2 flex size-11 items-center justify-center transition-opacity hover:opacity-70", [
5352
5360
  Ae.value ? "cursor-pointer" : "cursor-default",
@@ -5357,24 +5365,24 @@ var kr = [
5357
5365
  "aria-label": Ae.value ? "Attach file" : "File attachments unavailable",
5358
5366
  title: Ae.value ? "Attach file" : "File attachments unavailable",
5359
5367
  onClick: o[7] || (o[7] = (e) => Ae.value && triggerFileInput())
5360
- }, [De.value ? (A(), _("i", ra)) : (A(), _("i", ia)), v("span", aa, F(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, na),
5368
+ }, [De.value ? (j(), _("i", ra)) : (j(), _("i", ia)), v("span", aa, I(Ae.value ? "Attach file" : "File attachments unavailable"), 1)], 10, na),
5361
5369
  o[33] || (o[33] = v("div", { class: "flex-1" }, null, -1)),
5362
- v("div", oa, [(Re.value || Be.value) && !We.value ? (A(), _("button", {
5370
+ v("div", oa, [(Re.value || Be.value) && !We.value ? (j(), _("button", {
5363
5371
  key: 0,
5364
5372
  "data-test": "messaging-record-audio-btn",
5365
5373
  class: T(["flex size-11 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Be.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5366
5374
  "aria-label": Ue.value,
5367
5375
  title: Ue.value,
5368
- onPointerdown: o[8] || (o[8] = pe((e) => startRecording(), ["prevent"])),
5369
- onPointerup: o[9] || (o[9] = pe((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5370
- onPointercancel: o[10] || (o[10] = pe((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5376
+ onPointerdown: o[8] || (o[8] = de((e) => startRecording(), ["prevent"])),
5377
+ onPointerup: o[9] || (o[9] = de((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5378
+ onPointercancel: o[10] || (o[10] = de((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5371
5379
  onKeydown: [
5372
- o[11] || (o[11] = de(pe((e) => startRecording(), ["prevent"]), ["enter"])),
5373
- o[13] || (o[13] = de(pe((e) => startRecording(), ["prevent"]), ["space"])),
5374
- o[15] || (o[15] = de(pe((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5380
+ o[11] || (o[11] = ue(de((e) => startRecording(), ["prevent"]), ["enter"])),
5381
+ o[13] || (o[13] = ue(de((e) => startRecording(), ["prevent"]), ["space"])),
5382
+ o[15] || (o[15] = ue(de((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5375
5383
  ],
5376
- onKeyup: [o[12] || (o[12] = de(pe((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), o[14] || (o[14] = de(pe((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5377
- }, [v("i", { class: T([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", ca, F(Ue.value), 1)], 42, sa)) : h("", !0), We.value ? (A(), _("button", {
5384
+ onKeyup: [o[12] || (o[12] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), o[14] || (o[14] = ue(de((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5385
+ }, [v("i", { class: T([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), v("span", ca, I(Ue.value), 1)], 42, sa)) : h("", !0), We.value ? (j(), _("button", {
5378
5386
  key: 1,
5379
5387
  "data-test": "messaging-voice-end-btn",
5380
5388
  class: "flex size-11 cursor-pointer items-center justify-center rounded-full bg-red-600 text-white transition-colors duration-150 hover:bg-red-700",
@@ -5384,15 +5392,15 @@ var kr = [
5384
5392
  }, [...o[30] || (o[30] = [v("i", {
5385
5393
  class: "i-tabler-x size-[18px]",
5386
5394
  "aria-hidden": "true"
5387
- }, null, -1), v("span", { class: "sr-only" }, "End voice conversation", -1)])])) : Ke.value ? (A(), _("button", {
5395
+ }, null, -1), v("span", { class: "sr-only" }, "End voice conversation", -1)])])) : qe.value ? (j(), _("button", {
5388
5396
  key: 2,
5389
5397
  "data-test": "messaging-voice-start-btn",
5390
- class: T(["flex size-11 items-center justify-center rounded-full transition-colors duration-150", [K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", qe.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5391
- disabled: qe.value,
5392
- "aria-label": Ye.value,
5393
- title: Ye.value,
5398
+ class: T(["flex size-11 items-center justify-center rounded-full transition-colors duration-150", [K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", Ye.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5399
+ disabled: Ye.value,
5400
+ "aria-label": Xe.value,
5401
+ title: Xe.value,
5394
5402
  onClick: o[17] || (o[17] = (e) => startVoiceConversation())
5395
- }, [v("span", ua, [(A(), _(f, null, M([
5403
+ }, [v("span", ua, [(j(), _(f, null, P([
5396
5404
  7,
5397
5405
  13,
5398
5406
  16,
@@ -5402,7 +5410,7 @@ var kr = [
5402
5410
  key: e,
5403
5411
  class: "w-[2px] rounded-full bg-current",
5404
5412
  style: k({ height: `${e}px` })
5405
- }, null, 4)), 64))]), o[31] || (o[31] = v("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, la)) : Be.value ? h("", !0) : (A(), _(f, { key: 3 }, [Fe.value ? (A(), _("button", {
5413
+ }, null, 4)), 64))]), o[31] || (o[31] = v("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, la)) : Be.value ? h("", !0) : (j(), _(f, { key: 3 }, [Fe.value ? (j(), _("button", {
5406
5414
  key: 0,
5407
5415
  "data-test": "messaging-secondary-stop-btn",
5408
5416
  class: T(["mr-2 flex size-11 cursor-pointer items-center justify-center rounded-full transition-colors duration-150", K.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
@@ -5420,24 +5428,24 @@ var kr = [
5420
5428
  "aria-label": Le.value,
5421
5429
  title: Le.value,
5422
5430
  onClick: o[19] || (o[19] = (e) => handleComposerAction())
5423
- }, [Me.value === "stop" ? (A(), _("i", fa)) : (A(), _("i", pa)), v("span", ma, F(Le.value), 1)], 10, da)], 64))])
5431
+ }, [Me.value === "stop" ? (j(), _("i", fa)) : (j(), _("i", pa)), v("span", ma, I(Le.value), 1)], 10, da)], 64))])
5424
5432
  ])], 10, Qi),
5425
- K.value && e.centered && e.scope === "private" ? (A(), _("div", ha, F(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5426
- !We.value && R.value.length === 0 && e.suggestedPrompts.length > 0 ? (A(), _("div", ga, [v("div", _a, [(A(!0), _(f, null, M(e.suggestedPrompts, (e, t) => (A(), _("button", {
5433
+ K.value && e.centered && e.scope === "private" ? (j(), _("div", ha, I(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : h("", !0),
5434
+ !We.value && B.value.length === 0 && e.suggestedPrompts.length > 0 ? (j(), _("div", ga, [v("div", _a, [(j(!0), _(f, null, P(e.suggestedPrompts, (e, t) => (j(), _("button", {
5427
5435
  key: e.id,
5428
5436
  type: "button",
5429
5437
  disabled: Se.value,
5430
5438
  "data-test": "messaging-suggested-prompt",
5431
- class: T(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Se.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !te.value && t >= 3 ? "max-sm:hidden" : ""]]),
5439
+ class: T(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", [Se.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900", !A.value && t >= 3 ? "max-sm:hidden" : ""]]),
5432
5440
  onClick: (t) => sendSuggestedPrompt(e)
5433
- }, F(e.label), 11, va))), 128)), e.suggestedPrompts.length > 3 ? (A(), _("button", {
5441
+ }, I(e.label), 11, va))), 128)), e.suggestedPrompts.length > 3 ? (j(), _("button", {
5434
5442
  key: 0,
5435
5443
  type: "button",
5436
5444
  "data-test": "messaging-suggested-prompts-more",
5437
- "aria-expanded": te.value,
5445
+ "aria-expanded": A.value,
5438
5446
  class: "flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-2xl px-4 py-3 text-[14px] font-medium text-theme-600 ring-1 ring-theme-200 transition-colors hover:bg-theme-50 hover:text-theme-900 sm:hidden",
5439
- onClick: o[20] || (o[20] = (e) => te.value = !te.value)
5440
- }, [b(F(te.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", te.value ? "rotate-180" : ""]) }, null, 2)], 8, ya)) : h("", !0)])])) : h("", !0)
5447
+ onClick: o[20] || (o[20] = (e) => A.value = !A.value)
5448
+ }, [b(I(A.value ? "See less" : "See more") + " ", 1), v("i", { class: T(["i-tabler-chevron-down size-4 transition-transform", A.value ? "rotate-180" : ""]) }, null, 2)], 8, ya)) : h("", !0)])])) : h("", !0)
5441
5449
  ], 2)
5442
5450
  ], 2));
5443
5451
  }
@@ -5470,7 +5478,7 @@ var kr = [
5470
5478
  let r = a("AgentWrap"), i = e, o = i.sdk || t.getInstance({
5471
5479
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
5472
5480
  ...i.apiBase && { apiBase: i.apiBase }
5473
- }), s = ae(!i.agent), c = ae(i.agent ? new n({ config: i.agent }) : void 0), u = ae();
5481
+ }), s = ie(!i.agent), c = ie(i.agent ? new n({ config: i.agent }) : void 0), u = ie();
5474
5482
  async function loadAgent() {
5475
5483
  if (i.agent) {
5476
5484
  r.debug("Agent provided via props, skipping fetch", {
@@ -5546,15 +5554,15 @@ var kr = [
5546
5554
  });
5547
5555
  }
5548
5556
  }
5549
- return ne(loadAgent), (t, n) => (A(), _("div", xa, [s.value ? (A(), _("div", Sa, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ie(t.$slots, "default", {
5550
- sdk: oe(o),
5557
+ return te(loadAgent), (t, n) => (j(), _("div", xa, [s.value ? (j(), _("div", Sa, [v("div", { class: T(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? re(t.$slots, "default", {
5558
+ sdk: ae(o),
5551
5559
  agent: c.value,
5552
5560
  context: e.clientContext ?? e.context,
5553
5561
  firstMessage: e.firstMessage,
5554
5562
  buttonText: e.buttonText,
5555
5563
  buttonIcon: e.buttonIcon,
5556
5564
  loading: s.value
5557
- }, void 0, void 0, 1) : u.value ? (A(), _("div", Ca, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5565
+ }, void 0, void 0, 1) : u.value ? (j(), _("div", Ca, [n[0] || (n[0] = v("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), v("button", {
5558
5566
  type: "button",
5559
5567
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5560
5568
  "data-test": "agent-unavailable-retry",
@@ -5563,6 +5571,6 @@ var kr = [
5563
5571
  }
5564
5572
  });
5565
5573
  //#endregion
5566
- export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, he as h, ai as i, getAgentAvatarUrl as l, n as m, ba as n, Oe as o, _e as p, _i as r, Ee as s, wa as t, handleImageError as u };
5574
+ export { Pe as a, we as c, parseButtonTemplate as d, AgentChatController as f, pe as h, ai as i, getAgentAvatarUrl as l, n as m, ba as n, Oe as o, he as p, _i as r, Ee as s, wa as t, handleImageError as u };
5567
5575
 
5568
5576
  //# sourceMappingURL=AgentWrap.js.map