@pagelines/sdk 1.0.825 → 1.0.827

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 { n as e } from "./rolldown-runtime.js";
2
2
  import { s as t, t as n } from "./sdkClient.js";
3
3
  import { Agent as r, CHAT_ISSUE_COPY as i, CUSTOMER_AGENT_STATE_LABEL as a, SettingsObject as o, createLogger as s, customerAgentState as c, getDefaultAvatarUrl as u, isAssistantSilenceControl as f, parseChatCardFencePayload as p, parseChatVisualFencePayload as m } from "@pagelines/core";
4
- import { Fragment as h, Transition as _, computed as v, createBlock as te, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as T, defineComponent as k, nextTick as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as ne, onMounted as re, onUnmounted as ie, openBlock as P, ref as F, renderList as I, renderSlot as ae, resolveDynamicComponent as R, shallowRef as B, toDisplayString as H, unref as oe, useTemplateRef as se, vModelText as ce, watch as ue, withCtx as U, withDirectives as de, withKeys as pe, withModifiers as W } from "vue";
4
+ import { Fragment as h, Transition as _, computed as v, createBlock as te, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as T, defineComponent as k, nextTick as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as ne, onMounted as re, onUnmounted as ie, openBlock as P, ref as F, renderList as I, renderSlot as ae, resolveDynamicComponent as R, shallowRef as B, toDisplayString as H, unref as oe, useTemplateRef as se, vModelText as ce, watch as ue, withCtx as de, withDirectives as pe, withKeys as he, withModifiers as U } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
- var he = { class: "spinner max-w-sm" }, G = {
6
+ var _e = { class: "spinner max-w-sm" }, W = {
7
7
  class: "ring-circular h-full w-full origin-center",
8
8
  viewBox: "25 25 50 50"
9
- }, _e = /* @__PURE__ */ k({
9
+ }, ve = /* @__PURE__ */ k({
10
10
  __name: "FSpinner",
11
11
  props: {
12
12
  width: {
@@ -19,7 +19,7 @@ var he = { class: "spinner max-w-sm" }, G = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (P(), x("div", he, [(P(), x("svg", G, [S("circle", {
22
+ return (t, n) => (P(), x("div", _e, [(P(), x("svg", W, [S("circle", {
23
23
  class: j([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
@@ -30,7 +30,7 @@ var he = { class: "spinner max-w-sm" }, G = {
30
30
  "stroke-miterlimit": "30"
31
31
  }, null, 2)]))]));
32
32
  }
33
- }), K = [
33
+ }), G = [
34
34
  {
35
35
  mode: "self",
36
36
  label: "Overview",
@@ -185,7 +185,7 @@ var VoiceRecorderController = class extends o {
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 ve = {
188
+ var ye = {
189
189
  waiting: "Waiting for results",
190
190
  finishing: "Finishing up",
191
191
  completed: "Work complete",
@@ -193,7 +193,7 @@ var ve = {
193
193
  stopped: "Stopped",
194
194
  notifyHint: "Taking longer than usual. You can leave and I’ll notify you when it’s ready.",
195
195
  leaveHint: "Taking longer than usual. You can leave this chat while I work."
196
- }, q = 15e3, ye = 6e4, be = 3;
196
+ }, K = 15e3, be = 6e4, Se = 3;
197
197
  function toMs(e) {
198
198
  if (!e) return;
199
199
  let t = Date.parse(e);
@@ -209,7 +209,7 @@ function milestoneRows(e, t) {
209
209
  let n = e.filter((e) => e.status === "completed" || e.status === "failed" && !!e.note).filter((e) => !t.has(e.activityId)).slice().sort(byEvent), r = [];
210
210
  for (let e of n) {
211
211
  let t = e.status === "completed" ? "done" : "failed", n = r[r.length - 1];
212
- if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= q) {
212
+ if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= K) {
213
213
  n.count += 1, n.lastMs = eventMs(e);
214
214
  continue;
215
215
  }
@@ -230,12 +230,12 @@ function milestoneRows(e, t) {
230
230
  }));
231
231
  }
232
232
  function splitRows(e) {
233
- return e.length <= be ? {
233
+ return e.length <= Se ? {
234
234
  visibleRows: e,
235
235
  hiddenRows: []
236
236
  } : {
237
- visibleRows: e.slice(e.length - be),
238
- hiddenRows: e.slice(0, e.length - be)
237
+ visibleRows: e.slice(e.length - Se),
238
+ hiddenRows: e.slice(0, e.length - Se)
239
239
  };
240
240
  }
241
241
  function buildWorkJournalModel(e) {
@@ -247,7 +247,7 @@ function buildWorkJournalModel(e) {
247
247
  terminal: {
248
248
  id: "work-complete",
249
249
  tone: "completed",
250
- label: ve.completed
250
+ label: ye.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: ve.failed,
264
+ label: ye.failed,
265
265
  ...o && e?.note ? { note: e.note } : {}
266
266
  }
267
267
  };
@@ -275,18 +275,18 @@ function buildWorkJournalModel(e) {
275
275
  terminal: {
276
276
  id: "work-stopped",
277
277
  tone: "stopped",
278
- label: ve.stopped
278
+ label: ye.stopped
279
279
  }
280
280
  };
281
281
  }
282
282
  let { visibleRows: s, hiddenRows: c } = splitRows(milestoneRows(t, /* @__PURE__ */ new Set())), u = t.filter((e) => e.status === "started").sort(byEvent).pop(), f = t.reduce((e, t) => Math.max(e, eventMs(t)), a ?? -Infinity), p = Number.isFinite(f) ? f : r, m = t.reduce((e, t) => {
283
283
  let n = toMs(t.startedAt) ?? toMs(t.endedAt);
284
284
  return n === void 0 ? e : Math.min(e, n);
285
- }, Infinity), h = p + q, _ = (Number.isFinite(m) ? m : p) + ye, v = r >= h, te = u || v ? {
285
+ }, Infinity), h = p + K, _ = (Number.isFinite(m) ? m : p) + be, v = r >= h, te = u || v ? {
286
286
  id: u?.activityId ?? "work-active",
287
287
  tone: "active",
288
- label: v ? u ? ve.waiting : ve.finishing : u.label
289
- } : void 0, b = v && r >= _ ? i ? ve.notifyHint : ve.leaveHint : void 0, x = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
288
+ label: v ? u ? ye.waiting : ye.finishing : u.label
289
+ } : void 0, b = v && r >= _ ? i ? ye.notifyHint : ye.leaveHint : void 0, x = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
290
290
  return {
291
291
  outcome: n,
292
292
  visibleRows: s,
@@ -352,17 +352,17 @@ function buildLiveTurnBlocks(e) {
352
352
  }
353
353
  //#endregion
354
354
  //#region agent/AgentController.ts
355
- var Se = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Ce = /* @__PURE__ */ new Set([
356
- ...Se,
355
+ var Ce = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), we = /* @__PURE__ */ new Set([
356
+ ...Ce,
357
357
  "EMPTY_STREAM",
358
358
  "RATE_LIMIT"
359
- ]), we = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Te = {
359
+ ]), Te = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Ee = {
360
360
  CREDIT_LIMIT: "billing_budget_reached",
361
361
  OVERAGE_CAP: "billing_runaway_cap"
362
362
  };
363
363
  function presentChatStreamError(e) {
364
- if (!(e.bucket !== void 0 || Ce.has(e.code))) return { surface: "hard" };
365
- let t = e.bucket ?? (Se.has(e.code) ? "account" : "error"), n = {
364
+ if (!(e.bucket !== void 0 || we.has(e.code))) return { surface: "hard" };
365
+ let t = e.bucket ?? (Ce.has(e.code) ? "account" : "error"), n = {
366
366
  ...e.actionLabel ? { actionLabel: e.actionLabel } : {},
367
367
  ...e.actionUrl ? { actionUrl: e.actionUrl } : {},
368
368
  ...e.help ? { help: e.help } : {}
@@ -375,7 +375,7 @@ function presentChatStreamError(e) {
375
375
  ...n
376
376
  },
377
377
  sendBlockedReason: "account"
378
- } : we.has(e.code) ? {
378
+ } : Te.has(e.code) ? {
379
379
  surface: "transcript",
380
380
  issue: {
381
381
  code: e.code,
@@ -393,7 +393,7 @@ function presentChatStreamError(e) {
393
393
  };
394
394
  }
395
395
  function transcriptMessageForChatStreamError(e) {
396
- let t = Te[e.code];
396
+ let t = Ee[e.code];
397
397
  return t ? i[t].oneLine : e.error;
398
398
  }
399
399
  var AgentChatController = class extends o {
@@ -826,7 +826,7 @@ Current User:
826
826
  let e = i[i.length - 1];
827
827
  this.sharedMessages.value = e?.id === u ? [...i.slice(0, -1), r] : [...i, r];
828
828
  }
829
- r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && we.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
829
+ r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && Te.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
830
830
  }, onDone = (e) => {
831
831
  if (!isCurrentTurn()) return;
832
832
  if (!p && !m) {
@@ -989,10 +989,10 @@ function parseButtonTemplate(e) {
989
989
  }
990
990
  //#endregion
991
991
  //#region agent/ui/ElAgentButton.vue?vue&type=script&setup=true&lang.ts
992
- var Ee = {
992
+ var De = {
993
993
  key: 0,
994
994
  class: "absolute inset-0 flex items-center justify-center"
995
- }, De = /* @__PURE__ */ k({
995
+ }, Oe = /* @__PURE__ */ k({
996
996
  __name: "ElAgentButton",
997
997
  props: {
998
998
  theme: { default: "primary" },
@@ -1020,7 +1020,7 @@ var Ee = {
1020
1020
  md: "size-4",
1021
1021
  lg: "size-5"
1022
1022
  })[e.size]);
1023
- return (i, a) => (P(), x("button", { class: j(["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 ? (P(), x("div", Ee, [...a[0] || (a[0] = [S("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : b("", !0), S("span", { class: j(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1023
+ return (i, a) => (P(), x("button", { class: j(["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 ? (P(), x("div", De, [...a[0] || (a[0] = [S("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : b("", !0), S("span", { class: j(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1024
1024
  e.icon ? (P(), x("i", {
1025
1025
  key: 0,
1026
1026
  class: j([e.icon, r.value])
@@ -1032,7 +1032,7 @@ var Ee = {
1032
1032
  }, null, 2)) : b("", !0)
1033
1033
  ], 2)], 2));
1034
1034
  }
1035
- }), Oe = ["value"], ke = /* @__PURE__ */ k({
1035
+ }), ke = ["value"], Ae = /* @__PURE__ */ k({
1036
1036
  __name: "AgentInputEmail",
1037
1037
  props: { modelValue: { default: "" } },
1038
1038
  emits: ["update:modelValue"],
@@ -1051,9 +1051,9 @@ var Ee = {
1051
1051
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
1052
1052
  style: { "font-size": "16px" },
1053
1053
  onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
1054
- }, null, 40, Oe));
1054
+ }, null, 40, ke));
1055
1055
  }
1056
- }), Ae = ["placeholder", "value"], je = /* @__PURE__ */ k({
1056
+ }), je = ["placeholder", "value"], Me = /* @__PURE__ */ k({
1057
1057
  __name: "AgentInputOneTimeCode",
1058
1058
  props: {
1059
1059
  modelValue: {},
@@ -1086,12 +1086,12 @@ var Ee = {
1086
1086
  class: "w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
1087
1087
  style: { "font-size": "16px" },
1088
1088
  onInput
1089
- }, null, 40, Ae));
1089
+ }, null, 40, je));
1090
1090
  }
1091
- }), Me = { class: "relative flex-shrink-0" }, Ne = ["src", "alt"], Pe = { class: "absolute top-1 right-1" }, Fe = {
1091
+ }), Ne = { class: "relative flex-shrink-0" }, Pe = ["src", "alt"], Fe = { class: "absolute top-1 right-1" }, Ie = {
1092
1092
  key: 1,
1093
1093
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
1094
- }, Ie = { class: "min-w-0" }, Le = /* @__PURE__ */ k({
1094
+ }, Le = { class: "min-w-0" }, Re = /* @__PURE__ */ k({
1095
1095
  __name: "ElModeHeader",
1096
1096
  props: {
1097
1097
  agent: {},
@@ -1103,17 +1103,17 @@ var Ee = {
1103
1103
  layout: { default: "centered" }
1104
1104
  },
1105
1105
  setup(e) {
1106
- return (t, n) => (P(), x("div", { class: j(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [S("div", Me, [S("div", { class: j(["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"]) }, [S("img", {
1106
+ return (t, n) => (P(), x("div", { class: j(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [S("div", Ne, [S("div", { class: j(["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"]) }, [S("img", {
1107
1107
  src: e.agent.avatarUrl.value,
1108
1108
  alt: e.agent.displayName.value,
1109
1109
  class: "w-full h-full object-cover",
1110
1110
  onError: n[0] || (n[0] = (...e) => oe(handleImageError) && oe(handleImageError)(...e))
1111
- }, null, 40, Ne)], 2), S("div", Pe, [e.isOnline ? (P(), x(h, { key: 0 }, [n[1] || (n[1] = S("div", {
1111
+ }, null, 40, Pe)], 2), S("div", Fe, [e.isOnline ? (P(), x(h, { key: 0 }, [n[1] || (n[1] = S("div", {
1112
1112
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1113
1113
  style: { "animation-duration": "3s" }
1114
- }, null, -1)), n[2] || (n[2] = S("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (P(), x("div", Fe))])]), S("div", Ie, [S("h1", { class: j(["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" : ""]]) }, H(e.agent.displayName.value), 3), S("p", { class: j(["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"]]) }, H(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1114
+ }, null, -1)), n[2] || (n[2] = S("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (P(), x("div", Ie))])]), S("div", Le, [S("h1", { class: j(["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" : ""]]) }, H(e.agent.displayName.value), 3), S("p", { class: j(["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"]]) }, H(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1115
1115
  }
1116
- }), Re = { class: "relative shrink-0 rounded-full" }, ze = ["src", "alt"], Be = ["src", "alt"], Ve = ["aria-label"], He = /* @__PURE__ */ k({
1116
+ }), ze = { class: "relative shrink-0 rounded-full" }, Be = ["src", "alt"], Ve = ["src", "alt"], He = ["aria-label"], Ue = /* @__PURE__ */ k({
1117
1117
  __name: "AgentAvatar",
1118
1118
  props: {
1119
1119
  agent: {},
@@ -1145,25 +1145,25 @@ var Ee = {
1145
1145
  top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
1146
1146
  right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
1147
1147
  }, i = v(() => e.isLight ? "ring-white" : "ring-theme-900");
1148
- return (t, a) => (P(), x("div", Re, [
1148
+ return (t, a) => (P(), x("div", ze, [
1149
1149
  S("img", {
1150
1150
  src: e.agent.avatarUrl.value,
1151
1151
  alt: e.agent.displayName.value,
1152
1152
  class: j(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1153
- }, null, 10, ze),
1153
+ }, null, 10, Be),
1154
1154
  e.showOwnerMark && e.agent.ownerMarkUrl.value ? (P(), x("img", {
1155
1155
  key: 0,
1156
1156
  src: e.agent.ownerMarkUrl.value,
1157
1157
  alt: e.agent.owner.value?.fullName ? `Owned by ${e.agent.owner.value.fullName}` : "Owner",
1158
1158
  class: j(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
1159
- }, null, 10, Be)) : b("", !0),
1159
+ }, null, 10, Ve)) : b("", !0),
1160
1160
  n.value ? (P(), x("span", {
1161
1161
  key: 1,
1162
1162
  role: "status",
1163
1163
  "aria-label": e.agent.state.value.tooltip,
1164
1164
  class: j(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
1165
1165
  style: r
1166
- }, null, 10, Ve)) : b("", !0),
1166
+ }, null, 10, He)) : b("", !0),
1167
1167
  n.value && e.agent.state.value.lifecycle === "running" ? (P(), x("span", {
1168
1168
  key: 2,
1169
1169
  "aria-hidden": "true",
@@ -1172,21 +1172,21 @@ var Ee = {
1172
1172
  }, null, 2)) : b("", !0)
1173
1173
  ]));
1174
1174
  }
1175
- }), Ue = {
1175
+ }), We = {
1176
1176
  key: 0,
1177
1177
  class: "sr-only",
1178
1178
  role: "status",
1179
1179
  "aria-live": "polite"
1180
- }, We = ["aria-expanded", "disabled"], Ge = ["aria-expanded"], Ke = {
1180
+ }, Ge = ["aria-expanded", "disabled"], Ke = ["aria-expanded"], qe = {
1181
1181
  class: "flex w-5 shrink-0 justify-center self-stretch",
1182
1182
  "aria-hidden": "true"
1183
- }, qe = ["data-journal-row"], Je = {
1183
+ }, Je = ["data-journal-row"], Ye = {
1184
1184
  class: "flex w-5 shrink-0 flex-col items-center self-stretch",
1185
1185
  "aria-hidden": "true"
1186
- }, Ye = { class: "flex h-[17px] shrink-0 items-center" }, Xe = {
1186
+ }, Xe = { class: "flex h-[17px] shrink-0 items-center" }, Ze = {
1187
1187
  key: 0,
1188
1188
  class: "sr-only"
1189
- }, Ze = /* @__PURE__ */ k({
1189
+ }, Qe = /* @__PURE__ */ k({
1190
1190
  __name: "AgentToolActivityGroup",
1191
1191
  props: {
1192
1192
  model: {},
@@ -1264,7 +1264,7 @@ var Ee = {
1264
1264
  };
1265
1265
  });
1266
1266
  return (t, u) => (P(), x("div", { class: j(["w-full py-0.5", s.value.muted]) }, [
1267
- a.value ? (P(), x("span", Ue, H(a.value), 1)) : b("", !0),
1267
+ a.value ? (P(), x("span", We, H(a.value), 1)) : b("", !0),
1268
1268
  r.value ? (P(), x("button", {
1269
1269
  key: 1,
1270
1270
  type: "button",
@@ -1286,7 +1286,7 @@ var Ee = {
1286
1286
  class: j(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1287
1287
  "aria-hidden": "true"
1288
1288
  }, null, 2)) : b("", !0)
1289
- ], 10, We)) : i.value ? (P(), x("button", {
1289
+ ], 10, Ge)) : i.value ? (P(), x("button", {
1290
1290
  key: 2,
1291
1291
  type: "button",
1292
1292
  "data-test": "messaging-tool-activity-summary",
@@ -1294,28 +1294,28 @@ var Ee = {
1294
1294
  "aria-expanded": n.value,
1295
1295
  class: j(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
1296
1296
  onClick: toggle
1297
- }, [S("span", Ke, [S("span", {
1297
+ }, [S("span", qe, [S("span", {
1298
1298
  "data-journal-spine": "dashed",
1299
1299
  class: j(["w-0 border-l border-dashed", s.value.dashed])
1300
1300
  }, null, 2)]), S("span", { class: j(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [C(H(i.value) + " earlier updates ", 1), S("i", {
1301
1301
  class: j(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1302
1302
  "aria-hidden": "true"
1303
- }, null, 2)], 2)], 10, Ge)) : b("", !0),
1303
+ }, null, 2)], 2)], 10, Ke)) : b("", !0),
1304
1304
  (P(!0), x(h, null, I(o.value, (e, t) => (P(), x("div", {
1305
1305
  key: e.id,
1306
1306
  "data-test": "messaging-tool-activity-row",
1307
1307
  "data-journal-row": e.tone,
1308
1308
  class: j([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1309
- }, [S("div", Je, [S("span", Ye, [(P(), te(R(c.value[e.tone].station.tag), {
1309
+ }, [S("div", Ye, [S("span", Xe, [(P(), te(R(c.value[e.tone].station.tag), {
1310
1310
  "data-journal-station": e.tone,
1311
1311
  class: j(c.value[e.tone].station.class)
1312
1312
  }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? b("", !0) : (P(), x("span", {
1313
1313
  key: 0,
1314
1314
  class: j(["w-px flex-1", s.value.spine])
1315
- }, null, 2))]), S("div", { class: j(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [S("span", { class: j(["relative block leading-snug", c.value[e.tone].label]) }, [C(H(e.label), 1), c.value[e.tone].statusWord ? (P(), x("span", Xe, ", " + H(c.value[e.tone].statusWord), 1)) : b("", !0)], 2), e.note ? (P(), x("p", {
1315
+ }, null, 2))]), S("div", { class: j(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [S("span", { class: j(["relative block leading-snug", c.value[e.tone].label]) }, [C(H(e.label), 1), c.value[e.tone].statusWord ? (P(), x("span", Ze, ", " + H(c.value[e.tone].statusWord), 1)) : b("", !0)], 2), e.note ? (P(), x("p", {
1316
1316
  key: 0,
1317
1317
  class: j(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1318
- }, H(e.note), 3)) : b("", !0)], 2)], 10, qe))), 128)),
1318
+ }, H(e.note), 3)) : b("", !0)], 2)], 10, Je))), 128)),
1319
1319
  !r.value && e.model.hint ? (P(), x("p", {
1320
1320
  key: 3,
1321
1321
  "data-test": "messaging-tool-activity-hint",
@@ -1365,86 +1365,86 @@ function _unsupportedIterableToArray(e, t) {
1365
1365
  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;
1366
1366
  }
1367
1367
  }
1368
- var Qe = Object.entries, $e = Object.setPrototypeOf, et = Object.isFrozen, J = Object.getPrototypeOf, tt = Object.getOwnPropertyDescriptor, X = Object.freeze, nt = Object.seal, rt = Object.create, it = typeof Reflect < "u" && Reflect, at = it.apply, st = it.construct;
1369
- X || (X = function freeze(e) {
1368
+ var $e = Object.entries, et = Object.setPrototypeOf, tt = Object.isFrozen, q = Object.getPrototypeOf, nt = Object.getOwnPropertyDescriptor, J = Object.freeze, rt = Object.seal, it = Object.create, at = typeof Reflect < "u" && Reflect, st = at.apply, ct = at.construct;
1369
+ J || (J = function freeze(e) {
1370
1370
  return e;
1371
- }), nt || (nt = function seal(e) {
1371
+ }), rt || (rt = function seal(e) {
1372
1372
  return e;
1373
- }), at || (at = function apply(e, t) {
1373
+ }), st || (st = function apply(e, t) {
1374
1374
  var n = [...arguments].slice(2);
1375
1375
  return e.apply(t, n);
1376
- }), st || (st = function construct(e) {
1376
+ }), ct || (ct = function construct(e) {
1377
1377
  return new e(...[...arguments].slice(1));
1378
1378
  });
1379
- var ct = unapply(Array.prototype.forEach), lt = unapply(Array.prototype.lastIndexOf), ut = unapply(Array.prototype.pop), dt = unapply(Array.prototype.push), ft = unapply(Array.prototype.splice), pt = Array.isArray, mt = unapply(String.prototype.toLowerCase), ht = unapply(String.prototype.toString), gt = unapply(String.prototype.match), _t = unapply(String.prototype.replace), vt = unapply(String.prototype.indexOf), yt = unapply(String.prototype.trim), bt = unapply(Number.prototype.toString), xt = unapply(Boolean.prototype.toString), St = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), Ct = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), Z = unapply(Object.prototype.hasOwnProperty), Q = unapply(Object.prototype.toString), wt = unapply(RegExp.prototype.test), Tt = unconstruct(TypeError);
1379
+ var lt = unapply(Array.prototype.forEach), ut = unapply(Array.prototype.lastIndexOf), dt = unapply(Array.prototype.pop), ft = unapply(Array.prototype.push), pt = unapply(Array.prototype.splice), mt = Array.isArray, ht = unapply(String.prototype.toLowerCase), gt = unapply(String.prototype.toString), _t = unapply(String.prototype.match), vt = unapply(String.prototype.replace), yt = unapply(String.prototype.indexOf), bt = unapply(String.prototype.trim), xt = unapply(Number.prototype.toString), St = unapply(Boolean.prototype.toString), Ct = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), wt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), X = unapply(Object.prototype.hasOwnProperty), Z = unapply(Object.prototype.toString), Q = unapply(RegExp.prototype.test), Tt = unconstruct(TypeError);
1380
1380
  function unapply(e) {
1381
1381
  return function(t) {
1382
1382
  t instanceof RegExp && (t.lastIndex = 0);
1383
1383
  var n = [...arguments].slice(1);
1384
- return at(e, t, n);
1384
+ return st(e, t, n);
1385
1385
  };
1386
1386
  }
1387
1387
  function unconstruct(e) {
1388
1388
  return function() {
1389
- return st(e, [...arguments]);
1389
+ return ct(e, [...arguments]);
1390
1390
  };
1391
1391
  }
1392
1392
  function addToSet(e, t) {
1393
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : mt;
1394
- if ($e && $e(e, null), !pt(t)) return e;
1393
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ht;
1394
+ if (et && et(e, null), !mt(t)) return e;
1395
1395
  let r = t.length;
1396
1396
  for (; r--;) {
1397
1397
  let i = t[r];
1398
1398
  if (typeof i == "string") {
1399
1399
  let e = n(i);
1400
- e !== i && (et(t) || (t[r] = e), i = e);
1400
+ e !== i && (tt(t) || (t[r] = e), i = e);
1401
1401
  }
1402
1402
  e[i] = !0;
1403
1403
  }
1404
1404
  return e;
1405
1405
  }
1406
1406
  function cleanArray(e) {
1407
- for (let t = 0; t < e.length; t++) Z(e, t) || (e[t] = null);
1407
+ for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
1408
1408
  return e;
1409
1409
  }
1410
1410
  function clone(e) {
1411
- let t = rt(null);
1412
- for (let r of Qe(e)) {
1411
+ let t = it(null);
1412
+ for (let r of $e(e)) {
1413
1413
  var n = _slicedToArray(r, 2);
1414
1414
  let i = n[0], a = n[1];
1415
- Z(e, i) && (pt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1415
+ X(e, i) && (mt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1416
1416
  }
1417
1417
  return t;
1418
1418
  }
1419
1419
  function stringifyValue(e) {
1420
1420
  switch (typeof e) {
1421
1421
  case "string": return e;
1422
- case "number": return bt(e);
1423
- case "boolean": return xt(e);
1424
- case "bigint": return St ? St(e) : "0";
1425
- case "symbol": return Ct ? Ct(e) : "Symbol()";
1426
- case "undefined": return Q(e);
1422
+ case "number": return xt(e);
1423
+ case "boolean": return St(e);
1424
+ case "bigint": return Ct ? Ct(e) : "0";
1425
+ case "symbol": return wt ? wt(e) : "Symbol()";
1426
+ case "undefined": return Z(e);
1427
1427
  case "function":
1428
1428
  case "object": {
1429
- if (e === null) return Q(e);
1429
+ if (e === null) return Z(e);
1430
1430
  let t = e, n = lookupGetter(t, "toString");
1431
1431
  if (typeof n == "function") {
1432
1432
  let e = n(t);
1433
- return typeof e == "string" ? e : Q(e);
1433
+ return typeof e == "string" ? e : Z(e);
1434
1434
  }
1435
- return Q(e);
1435
+ return Z(e);
1436
1436
  }
1437
- default: return Q(e);
1437
+ default: return Z(e);
1438
1438
  }
1439
1439
  }
1440
1440
  function lookupGetter(e, t) {
1441
1441
  for (; e !== null;) {
1442
- let n = tt(e, t);
1442
+ let n = nt(e, t);
1443
1443
  if (n) {
1444
1444
  if (n.get) return unapply(n.get);
1445
1445
  if (typeof n.value == "function") return unapply(n.value);
1446
1446
  }
1447
- e = J(e);
1447
+ e = q(e);
1448
1448
  }
1449
1449
  function fallbackValue() {
1450
1450
  return null;
@@ -1453,12 +1453,12 @@ function lookupGetter(e, t) {
1453
1453
  }
1454
1454
  function isRegex(e) {
1455
1455
  try {
1456
- return wt(e, ""), !0;
1456
+ return Q(e, ""), !0;
1457
1457
  } catch {
1458
1458
  return !1;
1459
1459
  }
1460
1460
  }
1461
- var Et = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Dt = X(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Ot = X([
1461
+ var Et = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Dt = J(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), Ot = J([
1462
1462
  "feBlend",
1463
1463
  "feColorMatrix",
1464
1464
  "feComponentTransfer",
@@ -1484,7 +1484,7 @@ var Et = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1484
1484
  "feSpotLight",
1485
1485
  "feTile",
1486
1486
  "feTurbulence"
1487
- ]), kt = X([
1487
+ ]), kt = J([
1488
1488
  "animate",
1489
1489
  "color-profile",
1490
1490
  "cursor",
@@ -1507,7 +1507,7 @@ var Et = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1507
1507
  "solidcolor",
1508
1508
  "unknown",
1509
1509
  "use"
1510
- ]), At = X(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), jt = X([
1510
+ ]), At = J(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), jt = J([
1511
1511
  "maction",
1512
1512
  "maligngroup",
1513
1513
  "malignmark",
@@ -1523,13 +1523,13 @@ var Et = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1523
1523
  "annotation-xml",
1524
1524
  "mprescripts",
1525
1525
  "none"
1526
- ]), Mt = X(["#text"]), Nt = X(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Pt = X(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ft = X(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), It = X([
1526
+ ]), Mt = J(["#text"]), Nt = J(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), Pt = J(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), Ft = J(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), It = J([
1527
1527
  "xlink:href",
1528
1528
  "xml:id",
1529
1529
  "xlink:title",
1530
1530
  "xml:space",
1531
1531
  "xmlns:xlink"
1532
- ]), Lt = nt(/{{[\w\W]*|^[\w\W]*}}/g), Rt = nt(/<%[\w\W]*|^[\w\W]*%>/g), zt = nt(/\${[\w\W]*/g), Bt = nt(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vt = nt(/^aria-[\-\w]+$/), Ht = nt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ut = nt(/^(?:\w+script|data):/i), Wt = nt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Gt = nt(/^html$/i), Kt = nt(/^[a-z][.\w]*(-[.\w]+)+$/i), qt = nt(/<[/\w!]/g), Jt = nt(/<[/\w]/g), Yt = nt(/<\/no(script|embed|frames)/i), Xt = nt(/\/>/i), Zt = {
1532
+ ]), Lt = rt(/{{[\w\W]*|^[\w\W]*}}/g), Rt = rt(/<%[\w\W]*|^[\w\W]*%>/g), zt = rt(/\${[\w\W]*/g), Bt = rt(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vt = rt(/^aria-[\-\w]+$/), Ht = rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ut = rt(/^(?:\w+script|data):/i), Wt = rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Gt = rt(/^html$/i), Kt = rt(/^[a-z][.\w]*(-[.\w]+)+$/i), qt = rt(/<[/\w!]/g), Jt = rt(/<[/\w]/g), Yt = rt(/<\/no(script|embed|frames)/i), Xt = rt(/\/>/i), Zt = {
1533
1533
  element: 1,
1534
1534
  attribute: 2,
1535
1535
  text: 3,
@@ -1574,7 +1574,7 @@ var Et = X(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1574
1574
  uponSanitizeShadowNode: []
1575
1575
  };
1576
1576
  }, tn = function _resolveSetOption(e, t, n, r) {
1577
- return Z(e, t) && pt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1577
+ return X(e, t) && mt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1578
1578
  };
1579
1579
  function createDOMPurify() {
1580
1580
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qt(), DOMPurify = (e) => createDOMPurify(e);
@@ -1607,19 +1607,19 @@ function createDOMPurify() {
1607
1607
  }, ie = function _getDefaultTrustedTypesPolicy() {
1608
1608
  return A || (k = $t(u, r), A = !0), k;
1609
1609
  }, P = t, F = P.implementation, I = P.createNodeIterator, ae = P.createDocumentFragment, R = P.getElementsByTagName, B = n.importNode, H = en();
1610
- DOMPurify.isSupported = typeof Qe == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
1611
- let oe = Lt, se = Rt, ce = zt, ue = Bt, U = Vt, de = Ut, pe = Wt, W = Kt, he = Ht, G = null, _e = addToSet({}, [
1610
+ DOMPurify.isSupported = typeof $e == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
1611
+ let oe = Lt, se = Rt, ce = zt, ue = Bt, de = Vt, pe = Ut, he = Wt, U = Kt, _e = Ht, W = null, ve = addToSet({}, [
1612
1612
  ...Et,
1613
1613
  ...Dt,
1614
1614
  ...Ot,
1615
1615
  ...At,
1616
1616
  ...Mt
1617
- ]), K = null, ve = addToSet({}, [
1617
+ ]), G = null, ye = addToSet({}, [
1618
1618
  ...Nt,
1619
1619
  ...Pt,
1620
1620
  ...Ft,
1621
1621
  ...It
1622
- ]), q = Object.seal(rt(null, {
1622
+ ]), K = Object.seal(it(null, {
1623
1623
  tagNameCheck: {
1624
1624
  writable: !0,
1625
1625
  configurable: !1,
@@ -1638,7 +1638,7 @@ function createDOMPurify() {
1638
1638
  enumerable: !0,
1639
1639
  value: !1
1640
1640
  }
1641
- })), ye = null, be = null, Se = Object.seal(rt(null, {
1641
+ })), be = null, Se = null, Ce = Object.seal(it(null, {
1642
1642
  tagCheck: {
1643
1643
  writable: !0,
1644
1644
  configurable: !1,
@@ -1651,14 +1651,14 @@ function createDOMPurify() {
1651
1651
  enumerable: !0,
1652
1652
  value: null
1653
1653
  }
1654
- })), Ce = !0, we = !0, Te = !1, Ee = !0, De = !1, Oe = !0, ke = !1, Ae = !1, je = null, Me = null, Ne = !1, Pe = !1, Fe = !1, Ie = !1, Le = !0, Re = !1, ze = "user-content-", Be = !0, Ve = !1, He = {}, Ue = null, We = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ge = null, Ke = addToSet({}, [
1654
+ })), we = !0, Te = !0, Ee = !1, De = !0, Oe = !1, ke = !0, Ae = !1, je = !1, Me = null, Ne = null, Pe = !1, Fe = !1, Ie = !1, Le = !1, Re = !0, ze = !1, Be = "user-content-", Ve = !0, He = !1, Ue = {}, We = null, Ge = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
1655
1655
  "audio",
1656
1656
  "video",
1657
1657
  "img",
1658
1658
  "source",
1659
1659
  "image",
1660
1660
  "track"
1661
- ]), qe = null, Je = addToSet({}, [
1661
+ ]), Je = null, Ye = addToSet({}, [
1662
1662
  "alt",
1663
1663
  "class",
1664
1664
  "for",
@@ -1673,40 +1673,40 @@ function createDOMPurify() {
1673
1673
  "value",
1674
1674
  "style",
1675
1675
  "xmlns"
1676
- ]), Ye = "http://www.w3.org/1998/Math/MathML", Xe = "http://www.w3.org/2000/svg", Ze = "http://www.w3.org/1999/xhtml", $e = Ze, et = !1, J = null, tt = addToSet({}, [
1677
- Ye,
1676
+ ]), Xe = "http://www.w3.org/1998/Math/MathML", Ze = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml", et = Qe, tt = !1, q = null, nt = addToSet({}, [
1678
1677
  Xe,
1679
- Ze
1680
- ], ht), it = X([
1678
+ Ze,
1679
+ Qe
1680
+ ], gt), at = J([
1681
1681
  "mi",
1682
1682
  "mo",
1683
1683
  "mn",
1684
1684
  "ms",
1685
1685
  "mtext"
1686
- ]), at = addToSet({}, it), st = X(["annotation-xml"]), bt = addToSet({}, st), xt = addToSet({}, [
1686
+ ]), st = addToSet({}, at), ct = J(["annotation-xml"]), xt = addToSet({}, ct), St = addToSet({}, [
1687
1687
  "title",
1688
1688
  "style",
1689
1689
  "font",
1690
1690
  "a",
1691
1691
  "script"
1692
- ]), St = null, Ct = ["application/xhtml+xml", "text/html"], Q = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1692
+ ]), Ct = null, wt = ["application/xhtml+xml", "text/html"], Z = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1693
1693
  return e instanceof RegExp || e instanceof Function;
1694
1694
  }, on = function _parseConfig() {
1695
1695
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1696
1696
  if (nn && nn === e) return;
1697
- (!e || typeof e != "object") && (e = {}), e = clone(e), St = Ct.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = St === "application/xhtml+xml" ? ht : mt, G = tn(e, "ALLOWED_TAGS", _e, { transform: Q }), K = tn(e, "ALLOWED_ATTR", ve, { transform: Q }), J = tn(e, "ALLOWED_NAMESPACES", tt, { transform: ht }), qe = tn(e, "ADD_URI_SAFE_ATTR", Je, {
1698
- transform: Q,
1699
- base: Je
1700
- }), Ge = tn(e, "ADD_DATA_URI_TAGS", Ke, {
1701
- transform: Q,
1702
- base: Ke
1703
- }), Ue = tn(e, "FORBID_CONTENTS", We, { transform: Q }), ye = tn(e, "FORBID_TAGS", clone({}), { transform: Q }), be = tn(e, "FORBID_ATTR", clone({}), { transform: Q }), He = Z(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Ce = e.ALLOW_ARIA_ATTR !== !1, we = e.ALLOW_DATA_ATTR !== !1, Te = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ee = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, De = e.SAFE_FOR_TEMPLATES || !1, Oe = e.SAFE_FOR_XML !== !1, ke = e.WHOLE_DOCUMENT || !1, Pe = e.RETURN_DOM || !1, Fe = e.RETURN_DOM_FRAGMENT || !1, Ie = e.RETURN_TRUSTED_TYPE || !1, Ne = e.FORCE_BODY || !1, Le = e.SANITIZE_DOM !== !1, Re = e.SANITIZE_NAMED_PROPS || !1, Be = e.KEEP_CONTENT !== !1, Ve = e.IN_PLACE || !1, he = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ht, $e = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Ze, at = Z(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, it), bt = Z(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, st);
1704
- let t = Z(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : rt(null);
1705
- if (q = rt(null), Z(t, "tagNameCheck") && an(t.tagNameCheck) && (q.tagNameCheck = t.tagNameCheck), Z(t, "attributeNameCheck") && an(t.attributeNameCheck) && (q.attributeNameCheck = t.attributeNameCheck), Z(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (q.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), nt(q), De && (we = !1), Fe && (Pe = !0), He && (G = addToSet({}, Mt), K = rt(null), He.html === !0 && (addToSet(G, Et), addToSet(K, Nt)), He.svg === !0 && (addToSet(G, Dt), addToSet(K, Pt), addToSet(K, It)), He.svgFilters === !0 && (addToSet(G, Ot), addToSet(K, Pt), addToSet(K, It)), He.mathMl === !0 && (addToSet(G, At), addToSet(K, Ft), addToSet(K, It))), Se.tagCheck = null, Se.attributeCheck = null, Z(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Se.tagCheck = e.ADD_TAGS : pt(e.ADD_TAGS) && (G === _e && (G = clone(G)), addToSet(G, e.ADD_TAGS, Q))), Z(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Se.attributeCheck = e.ADD_ATTR : pt(e.ADD_ATTR) && (K === ve && (K = clone(K)), addToSet(K, e.ADD_ATTR, Q))), Z(e, "ADD_URI_SAFE_ATTR") && pt(e.ADD_URI_SAFE_ATTR) && addToSet(qe, e.ADD_URI_SAFE_ATTR, Q), Z(e, "FORBID_CONTENTS") && pt(e.FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.FORBID_CONTENTS, Q)), Z(e, "ADD_FORBID_CONTENTS") && pt(e.ADD_FORBID_CONTENTS) && (Ue === We && (Ue = clone(Ue)), addToSet(Ue, e.ADD_FORBID_CONTENTS, Q)), Be && (G["#text"] = !0), ke && addToSet(G, [
1697
+ (!e || typeof e != "object") && (e = {}), e = clone(e), Ct = wt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Z = Ct === "application/xhtml+xml" ? gt : ht, W = tn(e, "ALLOWED_TAGS", ve, { transform: Z }), G = tn(e, "ALLOWED_ATTR", ye, { transform: Z }), q = tn(e, "ALLOWED_NAMESPACES", nt, { transform: gt }), Je = tn(e, "ADD_URI_SAFE_ATTR", Ye, {
1698
+ transform: Z,
1699
+ base: Ye
1700
+ }), Ke = tn(e, "ADD_DATA_URI_TAGS", qe, {
1701
+ transform: Z,
1702
+ base: qe
1703
+ }), We = tn(e, "FORBID_CONTENTS", Ge, { transform: Z }), be = tn(e, "FORBID_TAGS", clone({}), { transform: Z }), Se = tn(e, "FORBID_ATTR", clone({}), { transform: Z }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, we = e.ALLOW_ARIA_ATTR !== !1, Te = e.ALLOW_DATA_ATTR !== !1, Ee = e.ALLOW_UNKNOWN_PROTOCOLS || !1, De = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Oe = e.SAFE_FOR_TEMPLATES || !1, ke = e.SAFE_FOR_XML !== !1, Ae = e.WHOLE_DOCUMENT || !1, Fe = e.RETURN_DOM || !1, Ie = e.RETURN_DOM_FRAGMENT || !1, Le = e.RETURN_TRUSTED_TYPE || !1, Pe = e.FORCE_BODY || !1, Re = e.SANITIZE_DOM !== !1, ze = e.SANITIZE_NAMED_PROPS || !1, Ve = e.KEEP_CONTENT !== !1, He = e.IN_PLACE || !1, _e = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ht, et = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Qe, st = 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({}, at), xt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, ct);
1704
+ let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : it(null);
1705
+ if (K = it(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (K.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (K.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), rt(K), Oe && (Te = !1), Ie && (Fe = !0), Ue && (W = addToSet({}, Mt), G = it(null), Ue.html === !0 && (addToSet(W, Et), addToSet(G, Nt)), Ue.svg === !0 && (addToSet(W, Dt), addToSet(G, Pt), addToSet(G, It)), Ue.svgFilters === !0 && (addToSet(W, Ot), addToSet(G, Pt), addToSet(G, It)), Ue.mathMl === !0 && (addToSet(W, At), addToSet(G, Ft), addToSet(G, It))), Ce.tagCheck = null, Ce.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ce.tagCheck = e.ADD_TAGS : mt(e.ADD_TAGS) && (W === ve && (W = clone(W)), addToSet(W, e.ADD_TAGS, Z))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ce.attributeCheck = e.ADD_ATTR : mt(e.ADD_ATTR) && (G === ye && (G = clone(G)), addToSet(G, e.ADD_ATTR, Z))), X(e, "ADD_URI_SAFE_ATTR") && mt(e.ADD_URI_SAFE_ATTR) && addToSet(Je, e.ADD_URI_SAFE_ATTR, Z), X(e, "FORBID_CONTENTS") && mt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Z)), X(e, "ADD_FORBID_CONTENTS") && mt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Z)), Ve && (W["#text"] = !0), Ae && addToSet(W, [
1706
1706
  "html",
1707
1707
  "head",
1708
1708
  "body"
1709
- ]), G.table && (addToSet(G, ["tbody"]), delete ye.tbody), e.TRUSTED_TYPES_POLICY) {
1709
+ ]), W.table && (addToSet(W, ["tbody"]), delete be.tbody), e.TRUSTED_TYPES_POLICY) {
1710
1710
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Tt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1711
1711
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Tt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1712
1712
  let t = C;
@@ -1717,27 +1717,27 @@ function createDOMPurify() {
1717
1717
  throw C = t, e;
1718
1718
  }
1719
1719
  } else e.TRUSTED_TYPES_POLICY === null ? (C = void 0, T = "") : (C === void 0 && (C = ie()), C && typeof T == "string" && (T = ne("")));
1720
- X && X(e), nn = e;
1720
+ J && J(e), nn = e;
1721
1721
  }, sn = addToSet({}, [
1722
1722
  ...Dt,
1723
1723
  ...Ot,
1724
1724
  ...kt
1725
1725
  ]), cn = addToSet({}, [...At, ...jt]), ln = function _checkSvgNamespace(e, t, n) {
1726
- return t.namespaceURI === Ze ? e === "svg" : t.namespaceURI === Ye ? e === "svg" && (n === "annotation-xml" || at[n]) : !!sn[e];
1726
+ return t.namespaceURI === Qe ? e === "svg" : t.namespaceURI === Xe ? e === "svg" && (n === "annotation-xml" || st[n]) : !!sn[e];
1727
1727
  }, un = function _checkMathMlNamespace(e, t, n) {
1728
- return t.namespaceURI === Ze ? e === "math" : t.namespaceURI === Xe ? e === "math" && bt[n] : !!cn[e];
1728
+ return t.namespaceURI === Qe ? e === "math" : t.namespaceURI === Ze ? e === "math" && xt[n] : !!cn[e];
1729
1729
  }, dn = function _checkHtmlNamespace(e, t, n) {
1730
- return t.namespaceURI === Xe && !bt[n] || t.namespaceURI === Ye && !at[n] ? !1 : !cn[e] && (xt[e] || !sn[e]);
1730
+ return t.namespaceURI === Ze && !xt[n] || t.namespaceURI === Xe && !st[n] ? !1 : !cn[e] && (St[e] || !sn[e]);
1731
1731
  }, fn = function _checkValidNamespace(e) {
1732
1732
  let t = v(e);
1733
1733
  (!t || !t.tagName) && (t = {
1734
- namespaceURI: $e,
1734
+ namespaceURI: et,
1735
1735
  tagName: "template"
1736
1736
  });
1737
- let n = mt(e.tagName), r = mt(t.tagName);
1738
- return J[e.namespaceURI] ? e.namespaceURI === Xe ? ln(n, t, r) : e.namespaceURI === Ye ? un(n, t, r) : e.namespaceURI === Ze ? dn(n, t, r) : !!(St === "application/xhtml+xml" && J[e.namespaceURI]) : !1;
1737
+ let n = ht(e.tagName), r = ht(t.tagName);
1738
+ return q[e.namespaceURI] ? e.namespaceURI === Ze ? ln(n, t, r) : e.namespaceURI === Xe ? un(n, t, r) : e.namespaceURI === Qe ? dn(n, t, r) : !!(Ct === "application/xhtml+xml" && q[e.namespaceURI]) : !1;
1739
1739
  }, pn = function _forceRemove(e) {
1740
- dt(DOMPurify.removed, { element: e });
1740
+ ft(DOMPurify.removed, { element: e });
1741
1741
  try {
1742
1742
  v(e).removeChild(e);
1743
1743
  } catch {
@@ -1748,9 +1748,9 @@ function createDOMPurify() {
1748
1748
  let t = _(e);
1749
1749
  if (t) {
1750
1750
  let e = [];
1751
- ct(t, (t) => {
1752
- dt(e, t);
1753
- }), ct(e, (e) => {
1751
+ lt(t, (t) => {
1752
+ ft(e, t);
1753
+ }), lt(e, (e) => {
1754
1754
  try {
1755
1755
  m(e);
1756
1756
  } catch {}
@@ -1765,17 +1765,17 @@ function createDOMPurify() {
1765
1765
  }
1766
1766
  }, hn = function _removeAttribute(e, t) {
1767
1767
  try {
1768
- dt(DOMPurify.removed, {
1768
+ ft(DOMPurify.removed, {
1769
1769
  attribute: t.getAttributeNode(e),
1770
1770
  from: t
1771
1771
  });
1772
1772
  } catch {
1773
- dt(DOMPurify.removed, {
1773
+ ft(DOMPurify.removed, {
1774
1774
  attribute: null,
1775
1775
  from: t
1776
1776
  });
1777
1777
  }
1778
- if (t.removeAttribute(e), e === "is") if (Pe || Fe) try {
1778
+ if (t.removeAttribute(e), e === "is") if (Fe || Ie) try {
1779
1779
  pn(t);
1780
1780
  } catch {}
1781
1781
  else try {
@@ -1785,7 +1785,7 @@ function createDOMPurify() {
1785
1785
  let t = b(e);
1786
1786
  if (t) for (let n = t.length - 1; n >= 0; --n) {
1787
1787
  let r = t[n], i = r && r.name;
1788
- if (!(typeof i != "string" || K[Q(i)])) try {
1788
+ if (!(typeof i != "string" || G[Z(i)])) try {
1789
1789
  e.removeAttribute(i);
1790
1790
  } catch {}
1791
1791
  }
@@ -1798,18 +1798,18 @@ function createDOMPurify() {
1798
1798
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
1799
1799
  }
1800
1800
  }, vn = function _neutralizePatchLinkage(e) {
1801
- if (!Oe) return;
1801
+ if (!ke) return;
1802
1802
  let t = [e];
1803
1803
  for (; t.length > 0;) {
1804
1804
  let e = t.pop(), n = x ? x(e) : e.nodeType;
1805
- if (n === Zt.processingInstruction || n === Zt.comment && wt(Jt, e.data)) {
1805
+ if (n === Zt.processingInstruction || n === Zt.comment && Q(Jt, e.data)) {
1806
1806
  try {
1807
1807
  m(e);
1808
1808
  } catch {}
1809
1809
  continue;
1810
1810
  }
1811
1811
  if (n === Zt.element) {
1812
- let t = e, n = Q(S ? S(e) : e.nodeName);
1812
+ let t = e, n = Z(S ? S(e) : e.nodeName);
1813
1813
  try {
1814
1814
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
1815
1815
  } catch {}
@@ -1819,39 +1819,39 @@ function createDOMPurify() {
1819
1819
  }
1820
1820
  }, yn = function _initDocument(e) {
1821
1821
  let n = null, r = null;
1822
- if (Ne) e = "<remove></remove>" + e;
1822
+ if (Pe) e = "<remove></remove>" + e;
1823
1823
  else {
1824
- let t = gt(e, /^[\r\n\t ]+/);
1824
+ let t = _t(e, /^[\r\n\t ]+/);
1825
1825
  r = t && t[0];
1826
1826
  }
1827
- St === "application/xhtml+xml" && $e === Ze && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1827
+ Ct === "application/xhtml+xml" && et === Qe && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1828
1828
  let i = C ? ne(e) : e;
1829
- if ($e === Ze) try {
1830
- n = new c().parseFromString(i, St);
1829
+ if (et === Qe) try {
1830
+ n = new c().parseFromString(i, Ct);
1831
1831
  } catch {}
1832
1832
  if (!n || !n.documentElement) {
1833
- n = F.createDocument($e, "template", null);
1833
+ n = F.createDocument(et, "template", null);
1834
1834
  try {
1835
- n.documentElement.innerHTML = et ? T : i;
1835
+ n.documentElement.innerHTML = tt ? T : i;
1836
1836
  } catch {}
1837
1837
  }
1838
1838
  let a = n.body || n.documentElement;
1839
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), $e === Ze ? R.call(n, ke ? "html" : "body")[0] : ke ? n.documentElement : a;
1839
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), et === Qe ? R.call(n, Ae ? "html" : "body")[0] : Ae ? n.documentElement : a;
1840
1840
  }, bn = function _createNodeIterator(e) {
1841
1841
  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);
1842
1842
  }, xn = function _stripTemplateExpressions(e) {
1843
- return e = _t(e, oe, " "), e = _t(e, se, " "), e = _t(e, ce, " "), e;
1843
+ return e = vt(e, oe, " "), e = vt(e, se, " "), e = vt(e, ce, " "), e;
1844
1844
  }, Sn = function _scrubTemplateExpressions(e) {
1845
1845
  e.normalize();
1846
1846
  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();
1847
1847
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1848
1848
  let r = e.querySelectorAll?.call(e, "template");
1849
- r && ct(r, (e) => {
1849
+ r && lt(r, (e) => {
1850
1850
  wn(e.content) && Sn(e.content);
1851
1851
  });
1852
1852
  }, Cn = function _isClobbered(e) {
1853
1853
  let t = S ? S(e) : null;
1854
- return typeof t != "string" || Q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== b(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== x(e) || e.childNodes !== _(e);
1854
+ return typeof t != "string" || Z(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== b(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== x(e) || e.childNodes !== _(e);
1855
1855
  }, wn = function _isDocumentFragment(e) {
1856
1856
  if (!x || typeof e != "object" || !e) return !1;
1857
1857
  try {
@@ -1868,20 +1868,20 @@ function createDOMPurify() {
1868
1868
  }
1869
1869
  };
1870
1870
  function _executeHooks(e, t, n) {
1871
- e.length !== 0 && ct(e, (e) => {
1871
+ e.length !== 0 && lt(e, (e) => {
1872
1872
  e.call(DOMPurify, t, n, nn);
1873
1873
  });
1874
1874
  }
1875
1875
  let En = function _isUnsafeNode(e, t) {
1876
- return !!(Oe && e.hasChildNodes() && !Tn(e.firstElementChild) && wt(qt, e.textContent) && wt(qt, e.innerHTML) || Oe && e.namespaceURI === Ze && t === "style" && Tn(e.firstElementChild) || e.nodeType === Zt.processingInstruction || Oe && e.nodeType === Zt.comment && wt(Jt, e.data));
1876
+ return !!(ke && e.hasChildNodes() && !Tn(e.firstElementChild) && Q(qt, e.textContent) && Q(qt, e.innerHTML) || ke && e.namespaceURI === Qe && t === "style" && Tn(e.firstElementChild) || e.nodeType === Zt.processingInstruction || ke && e.nodeType === Zt.comment && Q(Jt, e.data));
1877
1877
  }, Dn = function _sanitizeDisallowedNode(e, t) {
1878
- if (!ye[t] && jn(t) && (q.tagNameCheck instanceof RegExp && wt(q.tagNameCheck, t) || q.tagNameCheck instanceof Function && q.tagNameCheck(t))) return !1;
1879
- if (Be && !Ue[t]) {
1878
+ if (!be[t] && jn(t) && (K.tagNameCheck instanceof RegExp && Q(K.tagNameCheck, t) || K.tagNameCheck instanceof Function && K.tagNameCheck(t))) return !1;
1879
+ if (Ve && !We[t]) {
1880
1880
  let t = v(e), n = _(e);
1881
1881
  if (n && t) {
1882
1882
  let r = n.length;
1883
1883
  for (let i = r - 1; i >= 0; --i) {
1884
- let r = Ve ? n[i] : p(n[i], !0);
1884
+ let r = He ? n[i] : p(n[i], !0);
1885
1885
  t.insertBefore(r, h(e));
1886
1886
  }
1887
1887
  }
@@ -1890,29 +1890,29 @@ function createDOMPurify() {
1890
1890
  }, On = function _sanitizeElements(e, t) {
1891
1891
  if (_executeHooks(H.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1892
1892
  if (Cn(e)) return pn(e), !0;
1893
- let n = Q(S ? S(e) : e.nodeName);
1893
+ let n = Z(S ? S(e) : e.nodeName);
1894
1894
  if (_executeHooks(H.uponSanitizeElement, e, {
1895
1895
  tagName: n,
1896
- allowedTags: G
1896
+ allowedTags: W
1897
1897
  }), e !== t && v(e) === null) return !0;
1898
1898
  if (En(e, n)) return pn(e), !0;
1899
- if (ye[n] || !(Se.tagCheck instanceof Function && Se.tagCheck(n)) && !G[n]) {
1899
+ if (be[n] || !(Ce.tagCheck instanceof Function && Ce.tagCheck(n)) && !W[n]) {
1900
1900
  let t = Dn(e, n);
1901
1901
  return t === !1 && _executeHooks(H.afterSanitizeElements, e, null), t;
1902
1902
  }
1903
- if ((x ? x(e) : e.nodeType) === Zt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && wt(Yt, e.innerHTML)) return pn(e), !0;
1904
- if (De && e.nodeType === Zt.text) {
1903
+ if ((x ? x(e) : e.nodeType) === Zt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Q(Yt, e.innerHTML)) return pn(e), !0;
1904
+ if (Oe && e.nodeType === Zt.text) {
1905
1905
  let t = xn(e.textContent);
1906
- e.textContent !== t && (dt(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1906
+ e.textContent !== t && (ft(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1907
1907
  }
1908
1908
  return _executeHooks(H.afterSanitizeElements, e, null), !1;
1909
1909
  }, kn = function _isValidAttribute(e, n, r) {
1910
- if (be[n] || Oe && n === "patchsrc" || Oe && n === "for" && e !== "label" && e !== "output" || Le && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1911
- let i = K[n] || Se.attributeCheck instanceof Function && Se.attributeCheck(n, e);
1912
- if (!(we && wt(ue, n)) && !(Ce && wt(U, n))) {
1910
+ if (Se[n] || ke && n === "patchsrc" || ke && n === "for" && e !== "label" && e !== "output" || Re && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1911
+ let i = G[n] || Ce.attributeCheck instanceof Function && Ce.attributeCheck(n, e);
1912
+ if (!(Te && Q(ue, n)) && !(we && Q(de, n))) {
1913
1913
  if (!i) {
1914
- if (!(jn(e) && (q.tagNameCheck instanceof RegExp && wt(q.tagNameCheck, e) || q.tagNameCheck instanceof Function && q.tagNameCheck(e)) && (q.attributeNameCheck instanceof RegExp && wt(q.attributeNameCheck, n) || q.attributeNameCheck instanceof Function && q.attributeNameCheck(n, e)) || n === "is" && q.allowCustomizedBuiltInElements && (q.tagNameCheck instanceof RegExp && wt(q.tagNameCheck, r) || q.tagNameCheck instanceof Function && q.tagNameCheck(r)))) return !1;
1915
- } else if (!qe[n] && !wt(he, _t(r, pe, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && vt(r, "data:") === 0 && Ge[e]) && !(Te && !wt(de, _t(r, pe, ""))) && r) return !1;
1914
+ if (!(jn(e) && (K.tagNameCheck instanceof RegExp && Q(K.tagNameCheck, e) || K.tagNameCheck instanceof Function && K.tagNameCheck(e)) && (K.attributeNameCheck instanceof RegExp && Q(K.attributeNameCheck, n) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(n, e)) || n === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && Q(K.tagNameCheck, r) || K.tagNameCheck instanceof Function && K.tagNameCheck(r)))) return !1;
1915
+ } else if (!Je[n] && !Q(_e, vt(r, he, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && yt(r, "data:") === 0 && Ke[e]) && !(Ee && !Q(pe, vt(r, he, ""))) && r) return !1;
1916
1916
  }
1917
1917
  return !0;
1918
1918
  }, An = addToSet({}, [
@@ -1925,7 +1925,7 @@ function createDOMPurify() {
1925
1925
  "font-face-uri",
1926
1926
  "missing-glyph"
1927
1927
  ]), jn = function _isBasicCustomElement(e) {
1928
- return !An[mt(e)] && wt(W, e);
1928
+ return !An[ht(e)] && Q(U, e);
1929
1929
  }, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
1930
1930
  if (C && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1931
1931
  case "TrustedHTML": return ne(r);
@@ -1934,7 +1934,7 @@ function createDOMPurify() {
1934
1934
  return r;
1935
1935
  }, Nn = function _setAttributeValue(e, t, n, r) {
1936
1936
  try {
1937
- n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : ut(DOMPurify.removed);
1937
+ n ? e.setAttributeNS(n, t, r) : e.setAttribute(t, r), Cn(e) ? pn(e) : dt(DOMPurify.removed);
1938
1938
  } catch {
1939
1939
  hn(t, e);
1940
1940
  }
@@ -1946,16 +1946,16 @@ function createDOMPurify() {
1946
1946
  attrName: "",
1947
1947
  attrValue: "",
1948
1948
  keepAttr: !0,
1949
- allowedAttributes: K,
1949
+ allowedAttributes: G,
1950
1950
  forceKeepAttr: void 0
1951
- }, r = t.length, i = Q(e.nodeName);
1951
+ }, r = t.length, i = Z(e.nodeName);
1952
1952
  for (; r--;) {
1953
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : yt(f);
1954
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(H.uponSanitizeAttribute, e, n), p = n.attrValue, Re && (u === "id" || u === "name") && vt(p, ze) !== 0 && (hn(o, e), p = ze + p), Oe && wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1953
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Z(o), f = c, p = o === "value" ? f : bt(f);
1954
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(H.uponSanitizeAttribute, e, n), p = n.attrValue, ze && (u === "id" || u === "name") && yt(p, Be) !== 0 && (hn(o, e), p = Be + p), ke && Q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1955
1955
  hn(o, e);
1956
1956
  continue;
1957
1957
  }
1958
- if (u === "attributename" && gt(p, "href")) {
1958
+ if (u === "attributename" && _t(p, "href")) {
1959
1959
  hn(o, e);
1960
1960
  continue;
1961
1961
  }
@@ -1964,11 +1964,11 @@ function createDOMPurify() {
1964
1964
  hn(o, e);
1965
1965
  continue;
1966
1966
  }
1967
- if (!Ee && wt(Xt, p)) {
1967
+ if (!De && Q(Xt, p)) {
1968
1968
  hn(o, e);
1969
1969
  continue;
1970
1970
  }
1971
- if (De && (p = xn(p)), !kn(i, u, p)) {
1971
+ if (Oe && (p = xn(p)), !kn(i, u, p)) {
1972
1972
  hn(o, e);
1973
1973
  continue;
1974
1974
  }
@@ -2001,7 +2001,7 @@ function createDOMPurify() {
2001
2001
  });
2002
2002
  if (r) {
2003
2003
  let e = S ? S(n) : null;
2004
- if (typeof e == "string" && Q(e) === "template") {
2004
+ if (typeof e == "string" && Z(e) === "template") {
2005
2005
  let e = n.content;
2006
2006
  wn(e) && t.push({
2007
2007
  node: e,
@@ -2023,16 +2023,16 @@ function createDOMPurify() {
2023
2023
  };
2024
2024
  return DOMPurify.sanitize = function(e) {
2025
2025
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
2026
- if (et = !e, et && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Tt("dirty is not a string, aborting");
2026
+ if (tt = !e, tt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Tt("dirty is not a string, aborting");
2027
2027
  if (!DOMPurify.isSupported) return e;
2028
- Ae ? (G = je, K = Me) : on(t), (H.uponSanitizeElement.length > 0 || H.uponSanitizeAttribute.length > 0) && (G = clone(G)), H.uponSanitizeAttribute.length > 0 && (K = clone(K)), DOMPurify.removed = [];
2029
- let s = Ve && typeof e != "string" && Tn(e);
2028
+ je ? (W = Me, G = Ne) : on(t), (H.uponSanitizeElement.length > 0 || H.uponSanitizeAttribute.length > 0) && (W = clone(W)), H.uponSanitizeAttribute.length > 0 && (G = clone(G)), DOMPurify.removed = [];
2029
+ let s = He && typeof e != "string" && Tn(e);
2030
2030
  if (s) {
2031
2031
  vn(e);
2032
2032
  let t = S ? S(e) : e.nodeName;
2033
2033
  if (typeof t == "string") {
2034
- let n = Q(t);
2035
- if (!G[n] || ye[n]) throw mn(e), Tt("root node is forbidden and cannot be sanitized in-place");
2034
+ let n = Z(t);
2035
+ if (!W[n] || be[n]) throw mn(e), Tt("root node is forbidden and cannot be sanitized in-place");
2036
2036
  }
2037
2037
  if (Cn(e)) throw mn(e), Tt("root node is clobbered and cannot be sanitized in-place");
2038
2038
  try {
@@ -2042,49 +2042,49 @@ function createDOMPurify() {
2042
2042
  }
2043
2043
  } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === Zt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2044
2044
  else {
2045
- if (!Pe && !De && !ke && e.indexOf("<") === -1) return C && Ie ? ne(e) : e;
2046
- if (r = yn(e), !r) return Pe ? null : Ie ? T : "";
2045
+ if (!Fe && !Oe && !Ae && e.indexOf("<") === -1) return C && Le ? ne(e) : e;
2046
+ if (r = yn(e), !r) return Fe ? null : Le ? T : "";
2047
2047
  }
2048
- r && Ne && pn(r.firstChild);
2048
+ r && Pe && pn(r.firstChild);
2049
2049
  let c = s ? e : r, u = bn(c);
2050
2050
  try {
2051
2051
  for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
2052
2052
  } catch (t) {
2053
- throw s && (mn(e), ct(DOMPurify.removed, (e) => {
2053
+ throw s && (mn(e), lt(DOMPurify.removed, (e) => {
2054
2054
  e.element && _n(e.element);
2055
2055
  })), t;
2056
2056
  }
2057
- if (s) return ct(DOMPurify.removed, (e) => {
2057
+ if (s) return lt(DOMPurify.removed, (e) => {
2058
2058
  e.element && _n(e.element);
2059
- }), De && Sn(e), e;
2060
- if (Pe) {
2061
- if (De && Sn(r), Fe) for (o = ae.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2059
+ }), Oe && Sn(e), e;
2060
+ if (Fe) {
2061
+ if (Oe && Sn(r), Ie) for (o = ae.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2062
2062
  else o = r;
2063
- return (K.shadowroot || K.shadowrootmode) && (o = B.call(n, o, !0)), o;
2063
+ return (G.shadowroot || G.shadowrootmode) && (o = B.call(n, o, !0)), o;
2064
2064
  }
2065
- let f = ke ? r.outerHTML : r.innerHTML;
2066
- return ke && G["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && wt(Gt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), De && (f = xn(f)), C && Ie ? ne(f) : f;
2065
+ let f = Ae ? r.outerHTML : r.innerHTML;
2066
+ return Ae && W["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Q(Gt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Oe && (f = xn(f)), C && Le ? ne(f) : f;
2067
2067
  }, DOMPurify.setConfig = function() {
2068
2068
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2069
- on(e), Ae = !0, je = G, Me = K;
2069
+ on(e), je = !0, Me = W, Ne = G;
2070
2070
  }, DOMPurify.clearConfig = function() {
2071
- nn = null, Ae = !1, je = null, Me = null, C = k, T = "";
2071
+ nn = null, je = !1, Me = null, Ne = null, C = k, T = "";
2072
2072
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2073
2073
  nn || on({});
2074
- let r = Q(e), i = Q(t);
2074
+ let r = Z(e), i = Z(t);
2075
2075
  return kn(r, i, n);
2076
2076
  }, DOMPurify.addHook = function(e, t) {
2077
- typeof t == "function" && Z(H, e) && dt(H[e], t);
2077
+ typeof t == "function" && X(H, e) && ft(H[e], t);
2078
2078
  }, DOMPurify.removeHook = function(e, t) {
2079
- if (Z(H, e)) {
2079
+ if (X(H, e)) {
2080
2080
  if (t !== void 0) {
2081
- let n = lt(H[e], t);
2082
- return n === -1 ? void 0 : ft(H[e], n, 1)[0];
2081
+ let n = ut(H[e], t);
2082
+ return n === -1 ? void 0 : pt(H[e], n, 1)[0];
2083
2083
  }
2084
- return ut(H[e]);
2084
+ return dt(H[e]);
2085
2085
  }
2086
2086
  }, DOMPurify.removeHooks = function(e) {
2087
- Z(H, e) && (H[e] = []);
2087
+ X(H, e) && (H[e] = []);
2088
2088
  }, DOMPurify.removeAllHooks = function() {
2089
2089
  H = en();
2090
2090
  }, DOMPurify;
@@ -4067,26 +4067,26 @@ var Pr = [
4067
4067
  series: r
4068
4068
  })
4069
4069
  }));
4070
- }), U = v(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), de = [
4070
+ }), de = v(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), pe = [
4071
4071
  "var(--color-theme-900)",
4072
4072
  "var(--color-primary-500)",
4073
4073
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
4074
- ], pe = [
4074
+ ], he = [
4075
4075
  "rgba(255, 255, 255, 0.92)",
4076
4076
  "color-mix(in oklch, white 30%, var(--color-primary-500))",
4077
4077
  "rgba(255, 255, 255, 0.55)"
4078
4078
  ];
4079
4079
  function seriesColor(e) {
4080
- let n = t.inverted ? pe : de;
4080
+ let n = t.inverted ? he : pe;
4081
4081
  return n[e % n.length];
4082
4082
  }
4083
4083
  function diagramNodeFill(e) {
4084
4084
  return t.inverted ? e === "decision" ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.06)" : e === "decision" ? "color-mix(in oklch, var(--color-primary-500) 6%, var(--color-theme-0))" : e === "output" ? "color-mix(in oklch, var(--color-theme-900) 5%, var(--color-theme-0))" : "var(--color-theme-0)";
4085
4085
  }
4086
4086
  function diagramNodeStroke(e) {
4087
- return t.inverted ? "rgba(255, 255, 255, 0.22)" : ve.value;
4087
+ return t.inverted ? "rgba(255, 255, 255, 0.22)" : ye.value;
4088
4088
  }
4089
- let W = v(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), he = v(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), G = v(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), _e = v(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), K = v(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), ve = v(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), q = v(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), ye = v(() => t.inverted ? "transparent" : "var(--color-theme-0)"), be = v(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Se = v(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4089
+ let U = v(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), _e = v(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), W = v(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ve = v(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), G = v(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), ye = v(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), K = v(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), be = v(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Se = v(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Ce = v(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4090
4090
  return (e, r) => o.value ? (P(), x("section", {
4091
4091
  key: 0,
4092
4092
  "data-test": "chat-visual",
@@ -4096,18 +4096,18 @@ var Pr = [
4096
4096
  "data-diagram-type": c.value?.diagramType,
4097
4097
  class: "my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",
4098
4098
  style: M({
4099
- background: ye.value,
4100
- boxShadow: `inset 0 0 0 1px ${q.value}`
4099
+ background: be.value,
4100
+ boxShadow: `inset 0 0 0 1px ${K.value}`
4101
4101
  }),
4102
4102
  "aria-label": o.value.meta.title
4103
4103
  }, [
4104
4104
  S("header", Fr, [S("h4", {
4105
4105
  class: "text-[13px] font-semibold leading-tight",
4106
- style: M({ color: W.value })
4106
+ style: M({ color: U.value })
4107
4107
  }, H(o.value.meta.title), 5), o.value.meta.description ? (P(), x("p", {
4108
4108
  key: 0,
4109
4109
  class: "mt-0.5 text-[12px] leading-snug",
4110
- style: M({ color: he.value })
4110
+ style: M({ color: _e.value })
4111
4111
  }, H(o.value.meta.description), 5)) : b("", !0)]),
4112
4112
  S("div", {
4113
4113
  ref_key: "bodyEl",
@@ -4122,13 +4122,13 @@ var Pr = [
4122
4122
  class: "min-w-0"
4123
4123
  }, [S("div", Rr, [S("span", {
4124
4124
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4125
- style: M({ color: W.value })
4125
+ style: M({ color: U.value })
4126
4126
  }, H(e.label), 5), S("span", {
4127
4127
  class: "shrink-0 font-semibold tabular-nums",
4128
- style: M({ color: W.value })
4128
+ style: M({ color: U.value })
4129
4129
  }, H(e.value), 5)]), S("div", {
4130
4130
  class: "h-2 w-full overflow-hidden rounded-full",
4131
- style: M({ background: Se.value })
4131
+ style: M({ background: Ce.value })
4132
4132
  }, [S("div", {
4133
4133
  class: "h-full rounded-full",
4134
4134
  style: M({
@@ -4151,7 +4151,7 @@ var Pr = [
4151
4151
  y2: yForValue(e),
4152
4152
  "stroke-width": "1",
4153
4153
  "vector-effect": "non-scaling-stroke",
4154
- style: M({ stroke: e === 0 ? K.value : _e.value })
4154
+ style: M({ stroke: e === 0 ? G.value : ve.value })
4155
4155
  }, null, 12, Br))), 128)),
4156
4156
  S("g", null, [(P(!0), x(h, null, I(C.value.ticks, (e) => (P(), x("text", {
4157
4157
  key: `y-${e}`,
@@ -4159,7 +4159,7 @@ var Pr = [
4159
4159
  y: yForValue(e) + 3,
4160
4160
  "text-anchor": "end",
4161
4161
  "font-size": "9.5",
4162
- style: M({ fill: G.value })
4162
+ style: M({ fill: W.value })
4163
4163
  }, H(oe(formatChatVisualTick)({
4164
4164
  value: e,
4165
4165
  shared: T.value
@@ -4221,7 +4221,7 @@ var Pr = [
4221
4221
  "text-anchor": e.anchor,
4222
4222
  "font-size": "9.5",
4223
4223
  transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${A.value.height - A.value.bottom + 12})` : void 0,
4224
- style: M({ fill: G.value })
4224
+ style: M({ fill: W.value })
4225
4225
  }, H(e.label), 13, qr))), 128))
4226
4226
  ], 12, zr)), se.value.length > 1 || f.value.chartType !== "bar" ? (P(), x("div", Jr, [(P(!0), x(h, null, I(se.value, (e) => (P(), x("div", {
4227
4227
  key: e.key,
@@ -4231,41 +4231,41 @@ var Pr = [
4231
4231
  class: "size-2.5 shrink-0 rounded-full",
4232
4232
  style: M({ background: seriesColor(e.seriesIndex) })
4233
4233
  }, null, 4),
4234
- S("span", { style: M({ color: he.value }) }, H(e.label), 5),
4234
+ S("span", { style: M({ color: _e.value }) }, H(e.label), 5),
4235
4235
  S("span", {
4236
4236
  class: "font-semibold tabular-nums",
4237
- style: M({ color: W.value })
4237
+ style: M({ color: U.value })
4238
4238
  }, H(e.value), 5)
4239
4239
  ]))), 128))])) : b("", !0)], 8, Ir)) : m.value ? (P(), x("div", Yr, [(P(!0), x(h, null, I(ue.value, (e, t) => (P(), x("div", { key: e.key }, [S("div", Xr, [S("span", {
4240
4240
  class: "truncate font-medium",
4241
- style: M({ color: W.value })
4241
+ style: M({ color: U.value })
4242
4242
  }, H(e.name), 5), S("span", Zr, [S("span", {
4243
4243
  class: "font-semibold",
4244
- style: M({ color: W.value })
4244
+ style: M({ color: U.value })
4245
4245
  }, H(e.display), 5), S("span", {
4246
4246
  class: "ml-1.5",
4247
- style: M({ color: he.value })
4247
+ style: M({ color: _e.value })
4248
4248
  }, H(Math.round(e.percent * 100)) + "%", 5)])]), S("div", {
4249
4249
  class: "h-1.5 w-full overflow-hidden rounded-full",
4250
- style: M({ background: Se.value })
4250
+ style: M({ background: Ce.value })
4251
4251
  }, [S("div", {
4252
4252
  class: "h-full rounded-full",
4253
4253
  style: M({
4254
4254
  width: `${Math.max(2, e.percent * 100)}%`,
4255
4255
  background: seriesColor(t)
4256
4256
  })
4257
- }, null, 4)], 4)]))), 128))])) : c.value && U.value ? (P(), x("div", Qr, [(P(), x("svg", {
4257
+ }, null, 4)], 4)]))), 128))])) : c.value && de.value ? (P(), x("div", Qr, [(P(), x("svg", {
4258
4258
  "data-test": "chat-visual-diagram-svg",
4259
4259
  class: "block h-auto overflow-visible",
4260
- viewBox: `0 0 ${U.value.width} ${U.value.height}`,
4260
+ viewBox: `0 0 ${de.value.width} ${de.value.height}`,
4261
4261
  style: M({
4262
- width: `${U.value.width}px`,
4263
- aspectRatio: `${U.value.width} / ${U.value.height}`
4262
+ width: `${de.value.width}px`,
4263
+ aspectRatio: `${de.value.width} / ${de.value.height}`
4264
4264
  }),
4265
4265
  role: "img",
4266
4266
  "aria-label": o.value.meta.title
4267
4267
  }, [
4268
- (P(!0), x(h, null, I(U.value.edges, (e) => (P(), x("line", {
4268
+ (P(!0), x(h, null, I(de.value.edges, (e) => (P(), x("line", {
4269
4269
  key: e.key,
4270
4270
  "data-test": "chat-visual-diagram-edge",
4271
4271
  "data-from": e.from,
@@ -4277,16 +4277,16 @@ var Pr = [
4277
4277
  "stroke-width": "1.4",
4278
4278
  "stroke-linecap": "round",
4279
4279
  "vector-effect": "non-scaling-stroke",
4280
- style: M({ stroke: be.value })
4280
+ style: M({ stroke: Se.value })
4281
4281
  }, null, 12, ei))), 128)),
4282
- (P(!0), x(h, null, I(U.value.edges, (e) => (P(), x("circle", {
4282
+ (P(!0), x(h, null, I(de.value.edges, (e) => (P(), x("circle", {
4283
4283
  key: `${e.key}-dot`,
4284
4284
  cx: e.x2,
4285
4285
  cy: e.y2,
4286
4286
  r: "2.4",
4287
- style: M({ fill: be.value })
4287
+ style: M({ fill: Se.value })
4288
4288
  }, null, 12, ti))), 128)),
4289
- (P(!0), x(h, null, I(U.value.edges.filter((e) => e.label), (e) => (P(), x("foreignObject", {
4289
+ (P(!0), x(h, null, I(de.value.edges.filter((e) => e.label), (e) => (P(), x("foreignObject", {
4290
4290
  key: `${e.key}-label`,
4291
4291
  x: e.labelX - 55,
4292
4292
  y: e.labelY - 12,
@@ -4296,11 +4296,11 @@ var Pr = [
4296
4296
  xmlns: "http://www.w3.org/1999/xhtml",
4297
4297
  class: "flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",
4298
4298
  style: M({
4299
- color: he.value,
4299
+ color: _e.value,
4300
4300
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4301
4301
  })
4302
4302
  }, H(e.label), 5)], 8, ni))), 128)),
4303
- (P(!0), x(h, null, I(U.value.nodes, (e) => (P(), x("g", {
4303
+ (P(!0), x(h, null, I(de.value.nodes, (e) => (P(), x("g", {
4304
4304
  key: e.id,
4305
4305
  "data-test": "chat-visual-diagram-node",
4306
4306
  "data-node-id": e.id,
@@ -4333,17 +4333,17 @@ var Pr = [
4333
4333
  height: e.height - 10
4334
4334
  }, [S("div", si, [S("div", {
4335
4335
  class: "line-clamp-2 text-[13px] font-medium leading-snug",
4336
- style: M({ color: W.value })
4336
+ style: M({ color: U.value })
4337
4337
  }, H(e.label), 5), e.detail ? (P(), x("div", {
4338
4338
  key: 0,
4339
4339
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4340
- style: M({ color: he.value })
4340
+ style: M({ color: _e.value })
4341
4341
  }, H(e.detail), 5)) : b("", !0)])], 8, oi))], 8, ri))), 128))
4342
4342
  ], 12, $r))])) : b("", !0)], 512),
4343
4343
  o.value.meta.footer ? (P(), x("footer", {
4344
4344
  key: 0,
4345
4345
  class: "mt-3 text-[11px] leading-snug",
4346
- style: M({ color: G.value })
4346
+ style: M({ color: W.value })
4347
4347
  }, H(o.value.meta.footer), 5)) : b("", !0)
4348
4348
  ], 12, Pr)) : b("", !0);
4349
4349
  }
@@ -4607,31 +4607,140 @@ function voiceErrorMessage(e) {
4607
4607
  return e && mi[e] || hi;
4608
4608
  }
4609
4609
  //#endregion
4610
+ //#region agent/ui/VoiceHistogramController.ts
4611
+ var gi = [
4612
+ 0,
4613
+ 2,
4614
+ 4,
4615
+ 6,
4616
+ 8
4617
+ ], _i = 5, vi = 33, yi = .7, bi = .1, xi = 60, Si = 320, Ci = .55, wi = .1, Ti = .32, Ei = .9, Di = gi.map(() => 0), Oi = gi.map(() => _i), VoiceHistogramController = class {
4618
+ constructor(e = typeof window > "u" ? void 0 : window) {
4619
+ t(this, "browser", void 0), t(this, "heights", B(Oi)), t(this, "targetBars", Di), t(this, "displayBars", Di), t(this, "level", {
4620
+ source: "mic",
4621
+ level: 0
4622
+ }), t(this, "isMuted", !1), t(this, "usesIdleWave", !1), t(this, "frameId", 0), t(this, "lastFrameAt", 0), t(this, "easeFrame", (e) => {
4623
+ let t = this.browser;
4624
+ if (!t) return;
4625
+ this.frameId = 0;
4626
+ let n = Math.min(64, Math.max(0, e - this.lastFrameAt));
4627
+ this.lastFrameAt = e;
4628
+ let r = this.usesIdleWave ? gi.map((t, n) => {
4629
+ let r = e / 1e3 * Ci * 2 * Math.PI - n * Ei;
4630
+ return wi + Ti * (Math.sin(r) + 1) / 2;
4631
+ }) : this.targetBars;
4632
+ this.displayBars = this.displayBars.map((e, t) => {
4633
+ let i = r[t] ?? 0, a = i > e ? xi : Si;
4634
+ return e + (i - e) * (1 - Math.exp(-n / a));
4635
+ }), this.publish();
4636
+ let i = this.displayBars.every((e, t) => Math.abs((r[t] ?? 0) - e) <= 5e-4);
4637
+ (this.usesIdleWave || !i) && (this.frameId = t.requestAnimationFrame(this.easeFrame));
4638
+ }), this.browser = e;
4639
+ }
4640
+ updateLevel(e) {
4641
+ this.level = e, this.updateTargets();
4642
+ }
4643
+ setMuted(e) {
4644
+ this.isMuted = e, this.updateTargets();
4645
+ }
4646
+ setIdleWave(e) {
4647
+ this.usesIdleWave !== e && (this.usesIdleWave = e, this.start());
4648
+ }
4649
+ stop() {
4650
+ this.frameId && this.browser?.cancelAnimationFrame(this.frameId), this.frameId = 0;
4651
+ }
4652
+ updateTargets() {
4653
+ let gate = (e) => Math.max(0, e - bi) / (1 - bi), e = this.isMuted && this.level.source === "mic";
4654
+ this.targetBars = gi.map((t) => e ? 0 : gate(Math.min(1, Math.max(0, this.level.bands?.[t] ?? this.level.level)))), this.start();
4655
+ }
4656
+ start() {
4657
+ if (!this.browser || this.browser.matchMedia("(prefers-reduced-motion: reduce)").matches) {
4658
+ this.displayBars = this.usesIdleWave ? Di : this.targetBars, this.publish();
4659
+ return;
4660
+ }
4661
+ this.frameId || (this.lastFrameAt = this.browser.performance.now(), this.frameId = this.browser.requestAnimationFrame(this.easeFrame));
4662
+ }
4663
+ publish() {
4664
+ this.heights.value = this.displayBars.map((e) => Math.round((_i + Math.min(1, Math.max(0, e)) ** yi * vi) * 10) / 10);
4665
+ }
4666
+ }, ki = {
4667
+ connecting: {
4668
+ label: "Connecting",
4669
+ tone: "bg-amber-500",
4670
+ waits: !0
4671
+ },
4672
+ listening: {
4673
+ label: "Listening",
4674
+ tone: "bg-green-500",
4675
+ waits: !1
4676
+ },
4677
+ thinking: {
4678
+ label: "Thinking",
4679
+ tone: "bg-amber-500",
4680
+ waits: !0
4681
+ },
4682
+ working: {
4683
+ label: "Working",
4684
+ tone: "bg-primary-500",
4685
+ waits: !0
4686
+ },
4687
+ speaking: {
4688
+ label: "Speaking",
4689
+ tone: "bg-primary-500",
4690
+ waits: !1
4691
+ },
4692
+ error: {
4693
+ label: "Connection problem",
4694
+ tone: "bg-red-500",
4695
+ waits: !1,
4696
+ visibleText: "Connection lost"
4697
+ }
4698
+ };
4699
+ function deriveActivity(e) {
4700
+ return e.hadError ? "error" : e.sessionState === "live" ? e.speaking.agent ? "speaking" : e.speaking.user ? "listening" : e.work.active ? "working" : e.providerThinking ? "thinking" : "listening" : "connecting";
4701
+ }
4702
+ function deriveVoiceModePresentation(e) {
4703
+ let t = deriveActivity(e), n = ki[t], r = t === "working" ? e.work.description || "Working on it" : n.label;
4704
+ return {
4705
+ activity: t,
4706
+ label: r,
4707
+ tone: e.isMuted && t === "listening" ? "bg-theme-400" : n.tone,
4708
+ visibleStatus: t === "working" ? r : n.visibleText ?? "",
4709
+ usesIdleWave: n.waits || e.isMuted && t === "listening"
4710
+ };
4711
+ }
4712
+ //#endregion
4610
4713
  //#region agent/ui/VoiceMode.vue?vue&type=script&setup=true&lang.ts
4611
- var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4714
+ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4612
4715
  key: 1,
4613
4716
  "data-test": "voice-background-fallback",
4614
4717
  "aria-hidden": "true",
4615
4718
  class: "pointer-events-none absolute inset-0 bg-[#0A1522]"
4616
- }, yi = { class: "relative z-10 flex flex-1 flex-col items-center justify-center px-8 pb-24" }, bi = { "data-voice-assistant-avatar": "" }, xi = {
4719
+ }, Ni = {
4720
+ "data-test": "voice-stage",
4721
+ class: "relative z-10 flex flex-1 flex-col items-center px-8"
4722
+ }, Pi = { "data-voice-assistant-avatar": "" }, Fi = {
4723
+ "data-test": "voice-lower-stage",
4724
+ class: "flex flex-1 flex-col items-center pt-10"
4725
+ }, Ii = {
4617
4726
  "data-test": "voice-histogram",
4618
4727
  "aria-hidden": "true",
4619
- class: "mt-10 flex h-[38px] items-center gap-[5px]"
4620
- }, Si = {
4728
+ class: "flex h-[38px] items-center gap-[5px]"
4729
+ }, Li = {
4621
4730
  "data-test": "voice-presence-status",
4622
4731
  role: "status",
4623
4732
  "aria-live": "polite",
4624
4733
  class: "sr-only"
4625
- }, Ci = {
4734
+ }, Ri = {
4626
4735
  "data-test": "voice-visible-status",
4627
4736
  "aria-hidden": "true",
4628
4737
  class: "mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"
4629
- }, wi = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, Ti = [
4738
+ }, zi = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, Bi = [
4630
4739
  "disabled",
4631
4740
  "aria-label",
4632
4741
  "aria-pressed",
4633
4742
  "title"
4634
- ], Ei = 5, Di = 33, Oi = .7, ki = .1, Ai = 60, ji = 320, Mi = /*@__PURE__*/ k({
4743
+ ], Vi = /* @__PURE__ */ k({
4635
4744
  __name: "VoiceMode",
4636
4745
  props: {
4637
4746
  agent: {},
@@ -4641,80 +4750,22 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4641
4750
  },
4642
4751
  emits: ["end"],
4643
4752
  setup(e, { expose: t, emit: n }) {
4644
- let r = n, i = F(0), a = F("mic"), o = F("idle"), s = F(!1), c = F(!1), u = F({
4753
+ let r = n, i = B(!1), a = B(!1), o = B({
4645
4754
  user: !1,
4646
4755
  agent: !1
4647
- }), f = F({ active: !1 }), p = B(!1), m = B(!1), _ = B(), te = se("endButton"), b = se("muteButton"), C = !1, k, A = {
4648
- connecting: {
4649
- label: "Connecting",
4650
- tone: "bg-amber-500",
4651
- waits: !0,
4652
- showsText: !1
4653
- },
4654
- listening: {
4655
- label: "Listening",
4656
- tone: "bg-green-500",
4657
- waits: !1,
4658
- showsText: !1
4659
- },
4660
- thinking: {
4661
- label: "Thinking",
4662
- tone: "bg-amber-500",
4663
- waits: !0,
4664
- showsText: !1
4665
- },
4666
- working: {
4667
- label: "Working",
4668
- tone: "bg-primary-500",
4669
- waits: !0,
4670
- showsText: !0
4671
- },
4672
- speaking: {
4673
- label: "Speaking",
4674
- tone: "bg-primary-500",
4675
- waits: !1,
4676
- showsText: !1
4677
- },
4678
- error: {
4679
- label: "Connection problem",
4680
- tone: "bg-red-500",
4681
- waits: !1,
4682
- showsText: !0,
4683
- visibleText: "Connection lost"
4684
- }
4685
- }, ne = v(() => s.value ? "error" : o.value === "live" ? u.value.agent ? "speaking" : u.value.user ? "listening" : f.value.active ? "working" : c.value ? "thinking" : "listening" : "connecting"), ae = v(() => A[ne.value]), R = v(() => ae.value.waits), oe = [
4686
- 0,
4687
- 2,
4688
- 4,
4689
- 6,
4690
- 8
4691
- ], ce = oe.map(() => 0), ue = F(ce), U = F(ce), de = typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia("(prefers-reduced-motion: reduce)") : void 0, W = typeof window < "u" && typeof window.requestAnimationFrame == "function" ? (e) => window.requestAnimationFrame(e) : (e) => setTimeout(() => e(performance.now()), 16), he = 0, G = 0;
4756
+ }), s = B({ active: !1 }), c = B(!1), u = B(), f = v(() => u.value?.state.value ?? "idle"), p = v(() => u.value?.isMuted.value ?? !1), m = new VoiceHistogramController(), _ = m.heights, te = se("endButton"), b = se("muteButton"), C = !1, k, A = v(() => deriveVoiceModePresentation({
4757
+ sessionState: f.value,
4758
+ hadError: i.value,
4759
+ providerThinking: a.value,
4760
+ speaking: o.value,
4761
+ work: s.value,
4762
+ isMuted: p.value
4763
+ }));
4764
+ ue(() => A.value.usesIdleWave, (e) => m.setIdleWave(e), { immediate: !0 }), ue(p, (e) => m.setMuted(e), { immediate: !0 });
4692
4765
  async function end() {
4693
- C = !0, await _.value?.end();
4766
+ C = !0, await u.value?.end();
4694
4767
  }
4695
4768
  t({ end });
4696
- function easeFrame(e) {
4697
- he = 0;
4698
- let t = Math.min(64, Math.max(0, e - G));
4699
- G = e;
4700
- let ease = (e, n) => {
4701
- let r = n > e ? Ai : ji;
4702
- return e + (n - e) * (1 - Math.exp(-t / r));
4703
- };
4704
- U.value = U.value.map((e, t) => ease(e, ue.value[t] ?? 0)), !U.value.every((e, t) => Math.abs((ue.value[t] ?? 0) - e) <= 5e-4) || ue.value.some((e) => e > 0) ? he = W(easeFrame) : U.value = ce;
4705
- }
4706
- function followLevel(e) {
4707
- let gate = (e) => Math.max(0, e - ki) / (1 - ki), t = p.value && a.value === "mic";
4708
- if (ue.value = oe.map((n) => t ? 0 : gate(Math.min(1, Math.max(0, e?.[n] ?? i.value)))), de?.matches) {
4709
- U.value = ue.value;
4710
- return;
4711
- }
4712
- he || (G = performance.now(), he = W(easeFrame));
4713
- }
4714
- let _e = v(() => U.value.map((e) => Math.round((Ei + Math.min(1, Math.max(0, e)) ** Oi * Di) * 10) / 10)), K = v(() => p.value && ne.value === "listening" ? "bg-theme-400" : ae.value.tone), ve = v(() => ne.value === "working" ? f.value.description || "Working on it" : ae.value.label), q = v(() => {
4715
- let e = ae.value;
4716
- return e.showsText ? ne.value === "working" ? ve.value : e.visibleText ?? e.label : "";
4717
- });
4718
4769
  function emitEnd() {
4719
4770
  C || (C = !0, r("end"));
4720
4771
  }
@@ -4722,32 +4773,27 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4722
4773
  e.shiftKey && document.activeElement === te.value ? (e.preventDefault(), b.value?.focus()) : !e.shiftKey && document.activeElement === b.value && (e.preventDefault(), te.value?.focus());
4723
4774
  }
4724
4775
  async function toggleMute() {
4725
- let e = _.value;
4726
- if (!e || m.value) return;
4727
- m.value = !0;
4728
- let t = await e.toggleMuted();
4729
- t !== void 0 && (p.value = t, followLevel(void 0)), m.value = !1;
4776
+ let e = u.value;
4777
+ !e || c.value || (c.value = !0, await e.toggleMuted(), c.value = !1);
4730
4778
  }
4731
4779
  return re(async () => {
4732
4780
  te.value?.focus({ preventScroll: !0 });
4733
4781
  let t = e.chatController?.createVoiceClient({
4734
- onLevel: (e) => {
4735
- a.value = e.source, i.value = e.level, followLevel(e.bands);
4736
- },
4782
+ onLevel: (e) => m.updateLevel(e),
4737
4783
  onStateChange: (e) => {
4738
- o.value = e, e === "ended" && (s.value ? k = setTimeout(emitEnd, 1600) : emitEnd());
4784
+ e === "ended" && (i.value ? k = setTimeout(emitEnd, 1600) : emitEnd());
4739
4785
  },
4740
4786
  onThinkingChange: (e) => {
4741
- c.value = e;
4787
+ a.value = e;
4742
4788
  },
4743
4789
  onSpeakingChange: (e) => {
4744
- u.value = e;
4790
+ o.value = e;
4745
4791
  },
4746
4792
  onWorkChange: (e) => {
4747
- f.value = e;
4793
+ s.value = e;
4748
4794
  },
4749
4795
  onError: (t) => {
4750
- s.value = !0, e.chatController?.notify?.(voiceErrorMessage(t.code)), e.chatController?.logger?.warn("voice.session.failed", {
4796
+ i.value = !0, e.chatController?.notify?.(voiceErrorMessage(t.code)), e.chatController?.logger?.warn("voice.session.failed", {
4751
4797
  code: t.code,
4752
4798
  providerMessage: t.message
4753
4799
  });
@@ -4760,15 +4806,15 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4760
4806
  emitEnd();
4761
4807
  return;
4762
4808
  }
4763
- _.value = t, await t.start();
4809
+ u.value = t, await t.start();
4764
4810
  }), ie(() => {
4765
- C = !0, k && clearTimeout(k), he && typeof window < "u" && typeof window.cancelAnimationFrame == "function" && window.cancelAnimationFrame(he), he = 0, _.value?.end();
4811
+ C = !0, k && clearTimeout(k), m.stop(), u.value?.end();
4766
4812
  }), (t, n) => (P(), x("div", {
4767
4813
  "data-test": "voice-mode",
4768
- "data-voice-state": o.value,
4769
- "data-voice-activity": ne.value,
4814
+ "data-voice-state": f.value,
4815
+ "data-voice-activity": A.value.activity,
4770
4816
  class: "relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[#0A1522] text-white",
4771
- onKeydown: pe(trapFocus, ["tab"])
4817
+ onKeydown: he(trapFocus, ["tab"])
4772
4818
  }, [
4773
4819
  e.backdropSrc ? (P(), x("img", {
4774
4820
  key: 0,
@@ -4778,33 +4824,37 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4778
4824
  "aria-hidden": "true",
4779
4825
  draggable: "false",
4780
4826
  class: "pointer-events-none absolute inset-0 size-full object-cover"
4781
- }, null, 8, _i)) : (P(), x("div", vi)),
4782
- n[1] || (n[1] = S("div", {
4827
+ }, null, 8, ji)) : (P(), x("div", Mi)),
4828
+ n[2] || (n[2] = S("div", {
4783
4829
  "data-test": "voice-background-overlay",
4784
4830
  "aria-hidden": "true",
4785
4831
  class: "pointer-events-none absolute inset-0 bg-gradient-to-b from-[#050F19]/65 via-[#050F19]/75 to-[#050F19]/90"
4786
4832
  }, null, -1)),
4787
- S("div", yi, [
4788
- S("div", bi, [T(He, {
4833
+ S("div", Ni, [
4834
+ n[0] || (n[0] = S("div", {
4835
+ "data-test": "voice-stage-spacer",
4836
+ "aria-hidden": "true",
4837
+ class: "flex-1"
4838
+ }, null, -1)),
4839
+ S("div", Pi, [T(Ue, {
4789
4840
  agent: e.agent,
4790
4841
  "show-status": !1,
4791
4842
  "show-owner-mark": !1,
4792
4843
  "is-light": !1,
4793
4844
  class: "size-32"
4794
4845
  }, null, 8, ["agent"])]),
4795
- S("div", xi, [(P(!0), x(h, null, I(_e.value, (e, t) => (P(), x("span", {
4796
- key: t,
4797
- "data-test": "voice-histogram-bar",
4798
- class: j(["w-[5px] rounded-full transition-colors duration-150", [K.value, R.value ? "pl-voice-bar-wave" : ""]]),
4799
- style: M({
4800
- height: `${e}px`,
4801
- ...R.value ? { animationDelay: `${t * 90}ms` } : {}
4802
- })
4803
- }, null, 6))), 128))]),
4804
- S("div", Si, H(ve.value), 1),
4805
- S("p", Ci, H(q.value), 1)
4846
+ S("div", Fi, [
4847
+ S("div", Ii, [(P(!0), x(h, null, I(oe(_), (e, t) => (P(), x("span", {
4848
+ key: t,
4849
+ "data-test": "voice-histogram-bar",
4850
+ class: j(["w-[5px] rounded-full transition-colors duration-150", A.value.tone]),
4851
+ style: M({ height: `${e}px` })
4852
+ }, null, 6))), 128))]),
4853
+ S("div", Li, H(A.value.label), 1),
4854
+ S("p", Ri, H(A.value.visibleStatus), 1)
4855
+ ])
4806
4856
  ]),
4807
- S("div", wi, [S("button", {
4857
+ S("div", zi, [S("button", {
4808
4858
  ref_key: "endButton",
4809
4859
  ref: te,
4810
4860
  type: "button",
@@ -4813,7 +4863,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4813
4863
  "aria-label": "Hang up",
4814
4864
  title: "Hang up",
4815
4865
  onClick: emitEnd
4816
- }, [...n[0] || (n[0] = [S("i", {
4866
+ }, [...n[1] || (n[1] = [S("i", {
4817
4867
  class: "i-tabler-x size-[25px]",
4818
4868
  "aria-hidden": "true"
4819
4869
  }, null, -1)])], 512), S("button", {
@@ -4821,8 +4871,8 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4821
4871
  ref: b,
4822
4872
  type: "button",
4823
4873
  "data-test": "voice-mute-btn",
4824
- class: j(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70", [p.value ? "bg-white text-[#050F19] ring-white" : "bg-white/10 text-white ring-white/20", o.value === "live" && !m.value ? "cursor-pointer" : "cursor-default opacity-50"]]),
4825
- disabled: o.value !== "live" || m.value,
4874
+ class: j(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70", [p.value ? "bg-white text-[#050F19] ring-white" : "bg-white/10 text-white ring-white/20", f.value === "live" && !c.value ? "cursor-pointer" : "cursor-default opacity-50"]]),
4875
+ disabled: f.value !== "live" || c.value,
4826
4876
  "aria-label": p.value ? "Unmute microphone" : "Mute microphone",
4827
4877
  "aria-pressed": p.value,
4828
4878
  title: p.value ? "Unmute microphone" : "Mute microphone",
@@ -4830,31 +4880,27 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4830
4880
  }, [S("i", {
4831
4881
  class: j([p.value ? "i-tabler-microphone-off" : "i-tabler-microphone", "size-[25px]"]),
4832
4882
  "aria-hidden": "true"
4833
- }, null, 2)], 10, Ti)])
4834
- ], 40, gi));
4883
+ }, null, 2)], 10, Bi)])
4884
+ ], 40, Ai));
4835
4885
  }
4836
- }), Ni = /* @__PURE__ */ e((e, t) => {
4837
- let n = e.__vccOpts || e;
4838
- for (let [e, r] of t) n[e] = r;
4839
- return n;
4840
- }, "default"), Pi = /*#__PURE__*/ Ni(Mi, [["__scopeId", "data-v-d175f3e2"]]), Fi = {
4886
+ }), Hi = {
4841
4887
  key: 0,
4842
4888
  class: "pb-4"
4843
- }, Ii = {
4889
+ }, Ui = {
4844
4890
  key: 1,
4845
4891
  "data-test": "messaging-sdk-header",
4846
4892
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
4847
- }, Li = { class: "min-w-0 flex-1" }, Ri = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, zi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Bi = {
4893
+ }, Wi = { class: "min-w-0 flex-1" }, Gi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Ki = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, qi = {
4848
4894
  key: 0,
4849
4895
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4850
- }, Vi = ["aria-label"], Hi = {
4896
+ }, Ji = ["aria-label"], Yi = {
4851
4897
  key: 0,
4852
4898
  "data-test": "messaging-empty-state",
4853
4899
  class: "flex flex-col items-center justify-center px-4"
4854
- }, Ui = ["title"], Wi = {
4900
+ }, Xi = ["title"], Zi = {
4855
4901
  key: 0,
4856
4902
  class: "flex items-center gap-3 py-3 px-2"
4857
- }, Gi = ["data-journal-outcome"], Ki = [
4903
+ }, Qi = ["data-journal-outcome"], $i = [
4858
4904
  "data-message-id",
4859
4905
  "data-message-sender",
4860
4906
  "data-conversation-id",
@@ -4865,7 +4911,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4865
4911
  "data-issue-action-label",
4866
4912
  "data-issue-action-url",
4867
4913
  "data-streaming"
4868
- ], qi = { class: "max-w-[85%] min-w-0" }, Ji = ["href"], Yi = [
4914
+ ], ea = { class: "max-w-[85%] min-w-0" }, ta = ["href"], na = [
4869
4915
  "data-message-id",
4870
4916
  "data-message-sender",
4871
4917
  "data-conversation-id",
@@ -4874,7 +4920,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4874
4920
  "data-issue-code",
4875
4921
  "data-issue-bucket",
4876
4922
  "data-streaming"
4877
- ], Xi = [
4923
+ ], ra = [
4878
4924
  "data-test",
4879
4925
  "data-message-id",
4880
4926
  "data-message-sender",
@@ -4884,57 +4930,57 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4884
4930
  "data-streaming",
4885
4931
  "data-queued",
4886
4932
  "aria-label"
4887
- ], Zi = ["src", "alt"], Qi = ["src"], $i = ["href"], ea = {
4933
+ ], ia = ["src", "alt"], aa = ["src"], oa = ["href"], sa = {
4888
4934
  key: 0,
4889
4935
  "data-test": "messaging-message-text-part"
4890
- }, ta = [
4936
+ }, ca = [
4891
4937
  "src",
4892
4938
  "alt",
4893
4939
  "data-attachment-placement"
4894
- ], na = ["src", "data-attachment-placement"], ra = ["href", "data-attachment-placement"], ia = ["data-journal-outcome"], aa = {
4940
+ ], la = ["src", "data-attachment-placement"], ua = ["href", "data-attachment-placement"], da = ["data-journal-outcome"], fa = {
4895
4941
  key: 2,
4896
4942
  "data-test": "messaging-tool-activity-tail",
4897
4943
  "aria-label": "Assistant is still working",
4898
4944
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4899
- }, oa = ["data-journal-outcome"], sa = ["data-test", "data-working-description"], ca = {
4945
+ }, pa = ["data-journal-outcome"], ma = ["data-test", "data-working-description"], ha = {
4900
4946
  class: "flex items-center gap-[5px]",
4901
4947
  "aria-hidden": "true"
4902
- }, la = { class: "truncate" }, ua = ["data-issue-code"], da = ["href"], fa = ["inert", "aria-hidden"], pa = ["data-seat-state"], ma = ["src", "alt"], ha = { class: "max-w-20 truncate" }, ga = ["onClick"], _a = {
4948
+ }, ga = { class: "truncate" }, _a = ["data-issue-code"], va = ["href"], ya = ["inert", "aria-hidden"], ba = ["data-seat-state"], xa = ["src", "alt"], Sa = { class: "max-w-20 truncate" }, Ca = ["onClick"], wa = {
4903
4949
  key: 0,
4904
4950
  class: "shrink-0 flex items-center justify-center size-14"
4905
- }, va = ["data-composer-action"], ya = ["placeholder", "disabled"], ba = { class: "font-mono text-sm tabular-nums" }, xa = { class: "mt-2.5 flex items-center" }, Sa = [
4951
+ }, Ta = ["data-composer-action"], Ea = ["placeholder", "disabled"], Da = { class: "font-mono text-sm tabular-nums" }, Oa = { class: "mt-2.5 flex items-center" }, ka = [
4906
4952
  "disabled",
4907
4953
  "aria-label",
4908
4954
  "title"
4909
- ], Ca = {
4955
+ ], Aa = {
4910
4956
  key: 0,
4911
4957
  class: "i-svg-spinners-ring-resize size-5"
4912
- }, wa = {
4958
+ }, ja = {
4913
4959
  key: 1,
4914
4960
  class: "i-tabler-plus size-5"
4915
- }, Ta = { class: "sr-only" }, Ea = { class: "flex items-center gap-2" }, Da = ["aria-label", "title"], Oa = { class: "sr-only" }, ka = [
4961
+ }, Ma = { class: "sr-only" }, Na = { class: "flex items-center gap-2" }, Pa = ["aria-label", "title"], Fa = { class: "sr-only" }, Ia = [
4916
4962
  "disabled",
4917
4963
  "aria-label",
4918
4964
  "title"
4919
- ], Aa = {
4965
+ ], La = {
4920
4966
  class: "flex h-4 items-center gap-[2px]",
4921
4967
  "aria-hidden": "true"
4922
- }, ja = [
4968
+ }, Ra = [
4923
4969
  "data-composer-action",
4924
4970
  "disabled",
4925
4971
  "aria-label",
4926
4972
  "title"
4927
- ], Ma = {
4973
+ ], za = {
4928
4974
  key: 0,
4929
4975
  class: "i-tabler-player-stop-filled size-3.5"
4930
- }, Na = {
4976
+ }, Ba = {
4931
4977
  key: 1,
4932
4978
  class: "i-tabler-arrow-up size-[17px]"
4933
- }, Pa = { class: "sr-only" }, Fa = {
4979
+ }, Va = { class: "sr-only" }, Ha = {
4934
4980
  key: 2,
4935
4981
  "data-test": "messaging-ai-notice",
4936
4982
  class: "mx-auto max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"
4937
- }, Ia = /*#__PURE__*/ Ni(/* @__PURE__ */ k({
4983
+ }, Ua = /*@__PURE__*/ k({
4938
4984
  __name: "ElAgentChat",
4939
4985
  props: {
4940
4986
  chatController: {},
@@ -4979,7 +5025,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4979
5025
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
4980
5026
  }
4981
5027
  function isSystemExplainerMessage(e) {
4982
- return e.sender === "system" && (!!e.issue || e.id === K.value);
5028
+ return e.sender === "system" && (!!e.issue || e.id === G.value);
4983
5029
  }
4984
5030
  function isGroupEnd(e, t) {
4985
5031
  let n = e[t], r = e[t + 1];
@@ -4999,7 +5045,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
4999
5045
  if (!oe.value && !m.value.length) return;
5000
5046
  let e = R.value, t = e[e.length - 1];
5001
5047
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
5002
- }), he = v(() => {
5048
+ }), _e = v(() => {
5003
5049
  let t = {};
5004
5050
  for (let n of R.value) {
5005
5051
  if (n.sender === "user" || !n.toolActivities?.length) continue;
@@ -5013,7 +5059,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5013
5059
  return t;
5014
5060
  });
5015
5061
  function messageWorkJournal(e) {
5016
- return he.value[e.id];
5062
+ return _e.value[e.id];
5017
5063
  }
5018
5064
  function inlineOffset(e, t) {
5019
5065
  return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
@@ -5061,58 +5107,58 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5061
5107
  text: t.slice(i)
5062
5108
  }), r;
5063
5109
  }
5064
- let G = v(() => s.value?.transientIssue), K = v(() => {
5110
+ let W = v(() => s.value?.transientIssue), G = v(() => {
5065
5111
  if (!f.value) return;
5066
5112
  let e = R.value, t = e[e.length - 1];
5067
5113
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
5068
- }), ve = v(() => !f.value || B.value || oe.value || m.value.length ? !1 : K.value === void 0), q = v(() => B.value ?? (ve.value ? "Thinking…" : void 0)), ye = v(() => s.value?.sendBlockedReason), be = v(() => ye.value === "agent_deleted"), Se = v(() => p.value ? "Connecting..." : ye.value === "agent_deleted" ? "This assistant was deleted" : "Send a message"), Ce = v(() => c(e.agent.state.value)), we = v(() => {
5069
- if (Ge.value || !Ce.value || Ce.value === "awake") return;
5114
+ }), ye = v(() => !f.value || B.value || oe.value || m.value.length ? !1 : G.value === void 0), K = v(() => B.value ?? (ye.value ? "Thinking…" : void 0)), be = v(() => s.value?.sendBlockedReason), Se = v(() => be.value === "agent_deleted"), Ce = v(() => p.value ? "Connecting..." : be.value === "agent_deleted" ? "This assistant was deleted" : "Send a message"), we = v(() => c(e.agent.state.value)), Te = v(() => {
5115
+ if (Ke.value || !we.value || we.value === "awake") return;
5070
5116
  let t = e.agent.displayName.value || e.agent.name.value || "Your assistant";
5071
- return Ce.value === "changing" ? `${t} will be right back…` : `${t} is ${a[Ce.value].toLowerCase()}.`;
5072
- }), Te = v(() => e.chatController?.composerState?.value ?? {
5117
+ return we.value === "changing" ? `${t} will be right back…` : `${t} is ${a[we.value].toLowerCase()}.`;
5118
+ }), Ee = v(() => e.chatController?.composerState?.value ?? {
5073
5119
  text: "",
5074
5120
  pendingAttachments: [],
5075
5121
  isUploading: !1
5076
- }), Ee = v({
5077
- get: () => Te.value.text,
5122
+ }), De = v({
5123
+ get: () => Ee.value.text,
5078
5124
  set: (t) => e.chatController?.setComposerText?.({ text: t })
5079
- }), De = v(() => Te.value.pendingAttachments), Oe = v(() => Te.value.isUploading), ke = v(() => e.chatController?.voiceRecorder), Ae = v(() => ke.value?.isBusy.value ?? !1), je = v(() => e.chatController?.canAttachFile?.value ?? !1), Me = v(() => e.chatController?.canRecordAudio?.value ?? !1), Ne = v(() => e.chatController?.composerAction?.value ?? "idle"), Pe = v(() => Ne.value !== "idle"), Fe = v(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), Ie = v(() => e.chatController?.queuedMessageIds?.value);
5125
+ }), Oe = v(() => Ee.value.pendingAttachments), ke = v(() => Ee.value.isUploading), Ae = v(() => e.chatController?.voiceRecorder), je = v(() => Ae.value?.isBusy.value ?? !1), Me = v(() => e.chatController?.canAttachFile?.value ?? !1), Ne = v(() => e.chatController?.canRecordAudio?.value ?? !1), Pe = v(() => e.chatController?.composerAction?.value ?? "idle"), Fe = v(() => Pe.value !== "idle"), Ie = v(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), Le = v(() => e.chatController?.queuedMessageIds?.value);
5080
5126
  function isQueuedMessage(e) {
5081
- return Ie.value?.has(e) ?? !1;
5127
+ return Le.value?.has(e) ?? !1;
5082
5128
  }
5083
- let Re = v(() => Ne.value === "stop" ? "Stop reply" : Fe.value ? "Send — answered after current work" : "Send message"), ze = v(() => Me.value && !Ae.value && !!ke.value?.canUseBrowserRecording), Be = v(() => ke.value?.isActive.value ?? !1), Ve = v(() => ke.value?.elapsedLabel.value ?? "0:00"), Ue = v(() => ke.value?.statusText.value ?? "Release to send"), We = v(() => ke.value?.state.value.phase === "sending" ? "Sending voice message" : Be.value ? "Release to send voice message" : "Hold to record voice message"), Ge = F(!1), Ke = F(), qe = F(), Je = F(), Ye = 0, Xe = v(() => e.chatController?.canStartVoice?.value ?? !1);
5084
- ue([() => e.agent.avatar.value?.src, Xe], ([e, t]) => {
5085
- let n = ++Ye;
5086
- if (Je.value = void 0, !t || !e || typeof Image > "u") return;
5129
+ let ze = v(() => Pe.value === "stop" ? "Stop reply" : Ie.value ? "Send — answered after current work" : "Send message"), Be = v(() => Ne.value && !je.value && !!Ae.value?.canUseBrowserRecording), Ve = v(() => Ae.value?.isActive.value ?? !1), He = v(() => Ae.value?.elapsedLabel.value ?? "0:00"), We = v(() => Ae.value?.statusText.value ?? "Release to send"), Ge = v(() => Ae.value?.state.value.phase === "sending" ? "Sending voice message" : Ve.value ? "Release to send voice message" : "Hold to record voice message"), Ke = F(!1), qe = F(), Je = F(), Ye = F(), Xe = 0, Ze = v(() => e.chatController?.canStartVoice?.value ?? !1);
5130
+ ue([() => e.agent.avatar.value?.src, Ze], ([e, t]) => {
5131
+ let n = ++Xe;
5132
+ if (Ye.value = void 0, !t || !e || typeof Image > "u") return;
5087
5133
  let r = new Image();
5088
5134
  r.onload = () => {
5089
- n === Ye && (Je.value = e);
5135
+ n === Xe && (Ye.value = e);
5090
5136
  }, r.src = e;
5091
5137
  }, { immediate: !0 });
5092
- let Qe = v(() => Xe.value && !Ge.value && !Be.value && Ne.value === "idle"), $e = v(() => !u.value), et = v(() => $e.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
5138
+ let $e = v(() => Ze.value && !Ke.value && !Ve.value && Pe.value === "idle"), et = v(() => !u.value), tt = v(() => et.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
5093
5139
  function startVoiceConversation() {
5094
- !Qe.value || $e.value || (qe.value = Je.value, Ge.value = !0);
5140
+ !$e.value || et.value || (Je.value = Ye.value, Ke.value = !0);
5095
5141
  }
5096
5142
  async function endVoiceConversation() {
5097
- if (!Ge.value) return;
5098
- let t = Ke.value?.end();
5099
- Ge.value = !1, qe.value = void 0, await A(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
5143
+ if (!Ke.value) return;
5144
+ let t = qe.value?.end();
5145
+ Ke.value = !1, Je.value = void 0, await A(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
5100
5146
  }
5101
- let J = v(() => e.variant === "light"), tt = v(() => J.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), X = v(() => J.value ? "text-theme-300" : "text-white/30");
5147
+ let q = v(() => e.variant === "light"), nt = v(() => q.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), J = v(() => q.value ? "text-theme-300" : "text-white/30");
5102
5148
  re(async () => {
5103
5149
  e.chatController && !u.value && await e.chatController.startTextConversation();
5104
5150
  }), ie(() => {
5105
5151
  e.chatController?.voiceRecorder?.teardown();
5106
5152
  });
5107
5153
  async function sendMessage() {
5108
- !e.chatController || Ne.value !== "send" || (i.value && (i.value.style.height = "auto", window.matchMedia("(pointer: coarse)").matches ? i.value.blur() : i.value.focus()), r.value?.pin(), await e.chatController.sendComposerMessage());
5154
+ !e.chatController || Pe.value !== "send" || (i.value && (i.value.style.height = "auto", window.matchMedia("(pointer: coarse)").matches ? i.value.blur() : i.value.focus()), r.value?.pin(), await e.chatController.sendComposerMessage());
5109
5155
  }
5110
5156
  async function handleCardAction(t) {
5111
- !e.chatController || be.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
5157
+ !e.chatController || Se.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
5112
5158
  }
5113
5159
  async function handleComposerAction() {
5114
5160
  if (e.chatController) {
5115
- if (Ne.value === "send") {
5161
+ if (Pe.value === "send") {
5116
5162
  await sendMessage();
5117
5163
  return;
5118
5164
  }
@@ -5123,27 +5169,27 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5123
5169
  e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
5124
5170
  }
5125
5171
  function focusComposer(e) {
5126
- Be.value || be.value || e.target instanceof Element && e.target.closest("button, a, textarea") || i.value?.focus();
5172
+ Ve.value || Se.value || e.target instanceof Element && e.target.closest("button, a, textarea") || i.value?.focus();
5127
5173
  }
5128
5174
  function adjustTextareaHeight() {
5129
5175
  i.value && (i.value.style.height = "auto", i.value.style.height = `${Math.min(i.value.scrollHeight, 150)}px`);
5130
5176
  }
5131
- ue(Ee, () => A(() => adjustTextareaHeight()));
5177
+ ue(De, () => A(() => adjustTextareaHeight()));
5132
5178
  function triggerFileInput() {
5133
5179
  o.value?.click();
5134
5180
  }
5135
5181
  async function handleFileSelect(t) {
5136
5182
  let n = t.target, r = n.files?.[0];
5137
- !r || !e.chatController || Ae.value || (await e.chatController.attachFile({ file: r }), n.value = "");
5183
+ !r || !e.chatController || je.value || (await e.chatController.attachFile({ file: r }), n.value = "");
5138
5184
  }
5139
5185
  function removeAttachment(t) {
5140
5186
  e.chatController?.removeAttachment({ index: t });
5141
5187
  }
5142
5188
  function startRecording() {
5143
- ke.value?.start();
5189
+ Ae.value?.start();
5144
5190
  }
5145
5191
  function finishRecording(e) {
5146
- ke.value?.finish(e);
5192
+ Ae.value?.finish(e);
5147
5193
  }
5148
5194
  function shouldShowTimeDivider(e, t) {
5149
5195
  if (t === 0) {
@@ -5176,33 +5222,33 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5176
5222
  "data-test": "messaging-root",
5177
5223
  class: j(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5178
5224
  }, [
5179
- e.showHeader && !J.value ? (P(), x("div", Fi, [T(Le, {
5225
+ e.showHeader && !q.value ? (P(), x("div", Hi, [T(Re, {
5180
5226
  agent: e.agent,
5181
5227
  "is-online": u.value
5182
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (P(), x("div", Ii, [S("div", { class: j(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5183
- T(He, {
5228
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (P(), x("div", Ui, [S("div", { class: j(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5229
+ T(Ue, {
5184
5230
  agent: e.agent,
5185
- "is-light": J.value,
5231
+ "is-light": q.value,
5186
5232
  class: "size-10"
5187
5233
  }, null, 8, ["agent", "is-light"]),
5188
- S("div", Li, [S("div", Ri, H(e.agent.displayName.value), 1), S("div", zi, H(e.agent.title.value || "Assistant"), 1)]),
5189
- e.headerMeta ? (P(), x("span", Bi, H(e.headerMeta), 1)) : b("", !0)
5234
+ S("div", Wi, [S("div", Gi, H(e.agent.displayName.value), 1), S("div", Ki, H(e.agent.title.value || "Assistant"), 1)]),
5235
+ e.headerMeta ? (P(), x("span", qi, H(e.headerMeta), 1)) : b("", !0)
5190
5236
  ], 2)])) : b("", !0),
5191
5237
  T(_, { name: "voice-call" }, {
5192
- default: U(() => [Ge.value ? (P(), x("div", {
5238
+ default: de(() => [Ke.value ? (P(), x("div", {
5193
5239
  key: 0,
5194
5240
  "data-test": "voice-call-overlay",
5195
5241
  role: "dialog",
5196
5242
  "aria-modal": "true",
5197
5243
  "aria-label": `Voice conversation with ${e.agent.displayName.value}`,
5198
5244
  class: "fixed inset-0 z-[100] flex items-stretch justify-stretch bg-[#050F19] sm:items-center sm:justify-center sm:bg-[#050F19]/45 sm:p-6",
5199
- onKeydown: a[0] || (a[0] = pe((e) => endVoiceConversation(), ["esc"]))
5200
- }, [T(Pi, {
5245
+ onKeydown: a[0] || (a[0] = he((e) => endVoiceConversation(), ["esc"]))
5246
+ }, [T(Vi, {
5201
5247
  ref_key: "voiceMode",
5202
- ref: Ke,
5248
+ ref: qe,
5203
5249
  agent: e.agent,
5204
5250
  "chat-controller": e.chatController,
5205
- "backdrop-src": qe.value,
5251
+ "backdrop-src": Je.value,
5206
5252
  "is-light": !1,
5207
5253
  class: "voice-call-card h-full w-full sm:max-h-[620px] sm:max-w-[420px] sm:flex-none sm:rounded-[32px] sm:shadow-[0_32px_80px_rgba(5,15,25,0.45)]",
5208
5254
  onEnd: endVoiceConversation
@@ -5210,50 +5256,50 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5210
5256
  "agent",
5211
5257
  "chat-controller",
5212
5258
  "backdrop-src"
5213
- ])], 40, Vi)) : b("", !0)]),
5259
+ ])], 40, Ji)) : b("", !0)]),
5214
5260
  _: 1
5215
5261
  }),
5216
5262
  p.value ? (P(), x("div", {
5217
5263
  key: 2,
5218
- class: j(["py-16 flex flex-col items-center justify-center gap-2 text-sm", J.value ? "text-theme-400" : "text-theme-600"])
5219
- }, [T(_e, { class: "size-4" })], 2)) : e.setupHint ? (P(), x("div", {
5264
+ class: j(["py-16 flex flex-col items-center justify-center gap-2 text-sm", q.value ? "text-theme-400" : "text-theme-600"])
5265
+ }, [T(ve, { class: "size-4" })], 2)) : e.setupHint ? (P(), x("div", {
5220
5266
  key: 3,
5221
- class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]", X.value])
5267
+ class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]", J.value])
5222
5268
  }, [a[20] || (a[20] = S("i", { class: "i-tabler-tool size-3" }, null, -1)), S("span", null, H(e.setupHint), 1)], 2)) : b("", !0),
5223
5269
  T(pi, {
5224
5270
  ref_key: "chatScroller",
5225
5271
  ref: r,
5226
- inert: Ge.value,
5227
- "aria-hidden": Ge.value ? "true" : void 0,
5272
+ inert: Ke.value,
5273
+ "aria-hidden": Ke.value ? "true" : void 0,
5228
5274
  class: j(R.value.length === 0 ? "flex-none" : "flex-1")
5229
5275
  }, {
5230
- default: U(() => [S("div", { class: j([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5231
- R.value.length === 0 && !p.value ? (P(), x("div", Hi, [ae(t.$slots, "empty-heading", {
5276
+ default: de(() => [S("div", { class: j([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5277
+ R.value.length === 0 && !p.value ? (P(), x("div", Yi, [ae(t.$slots, "empty-heading", {
5232
5278
  agent: e.agent,
5233
- isLight: J.value
5234
- }, () => [T(He, {
5279
+ isLight: q.value
5280
+ }, () => [T(Ue, {
5235
5281
  agent: e.agent,
5236
- "is-light": J.value,
5282
+ "is-light": q.value,
5237
5283
  class: "mb-4 size-20 @sm/chat:size-24"
5238
- }, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", J.value ? "text-theme-900" : "text-white"]) }, H(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (P(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm", X.value]) }, H(e.emptyStateMessage || "Type your message to get started."), 3), S("div", {
5239
- class: j(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", J.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5284
+ }, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", q.value ? "text-theme-900" : "text-white"]) }, H(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (P(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm", J.value]) }, H(e.emptyStateMessage || "Type your message to get started."), 3), S("div", {
5285
+ class: j(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", q.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5240
5286
  title: n.value.tooltip
5241
- }, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, H(n.value.label), 1)], 10, Ui)], 64))])) : b("", !0),
5287
+ }, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, H(n.value.label), 1)], 10, Xi)], 64))])) : b("", !0),
5242
5288
  (P(!0), x(h, null, I(R.value, (e, t) => (P(), x(h, { key: e.id }, [
5243
- shouldShowTimeDivider(R.value, t) ? (P(), x("div", Wi, [
5244
- S("div", { class: j(["flex-1 h-px", tt.value]) }, null, 2),
5245
- S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", X.value]) }, H(shouldShowTimeDivider(R.value, t)), 3),
5246
- S("div", { class: j(["flex-1 h-px", tt.value]) }, null, 2)
5289
+ shouldShowTimeDivider(R.value, t) ? (P(), x("div", Zi, [
5290
+ S("div", { class: j(["flex-1 h-px", nt.value]) }, null, 2),
5291
+ S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", J.value]) }, H(shouldShowTimeDivider(R.value, t)), 3),
5292
+ S("div", { class: j(["flex-1 h-px", nt.value]) }, null, 2)
5247
5293
  ])) : b("", !0),
5248
5294
  messageWorkJournal(e) ? (P(), x("div", {
5249
5295
  key: 1,
5250
5296
  "data-test": "messaging-message-tool-activity",
5251
5297
  "data-journal-outcome": messageWorkJournal(e)?.outcome,
5252
5298
  class: "mb-4 w-full"
5253
- }, [T(Ze, {
5299
+ }, [T(Qe, {
5254
5300
  model: messageWorkJournal(e),
5255
- "is-light": J.value
5256
- }, null, 8, ["model", "is-light"])], 8, Gi)) : b("", !0),
5301
+ "is-light": q.value
5302
+ }, null, 8, ["model", "is-light"])], 8, Qi)) : b("", !0),
5257
5303
  isSystemExplainerMessage(e) ? (P(), x("div", {
5258
5304
  key: 2,
5259
5305
  "data-test": "messaging-system-msg",
@@ -5266,14 +5312,14 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5266
5312
  "data-issue-bucket": e.issue?.bucket,
5267
5313
  "data-issue-action-label": e.issue?.actionLabel,
5268
5314
  "data-issue-action-url": e.issue?.actionUrl,
5269
- "data-streaming": e.id === K.value ? "true" : void 0,
5315
+ "data-streaming": e.id === G.value ? "true" : void 0,
5270
5316
  class: "flex gap-2 items-end justify-start mb-4"
5271
- }, [S("div", qi, [S("div", { class: j(["mb-1 pl-1 text-[11px] font-medium", J.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), S("div", { class: j(["pl-1", J.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (P(), te(ui, {
5317
+ }, [S("div", ea, [S("div", { class: j(["mb-1 pl-1 text-[11px] font-medium", q.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), S("div", { class: j(["pl-1", q.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (P(), te(ui, {
5272
5318
  key: 0,
5273
5319
  text: e.text,
5274
- inverted: !J.value,
5275
- streaming: e.id === K.value,
5276
- onClick: a[1] || (a[1] = W(() => {}, ["stop"])),
5320
+ inverted: !q.value,
5321
+ streaming: e.id === G.value,
5322
+ onClick: a[1] || (a[1] = U(() => {}, ["stop"])),
5277
5323
  onAction: handleCardAction
5278
5324
  }, null, 8, [
5279
5325
  "text",
@@ -5282,14 +5328,14 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5282
5328
  ])) : e.issue?.help ? (P(), te(ui, {
5283
5329
  key: 1,
5284
5330
  text: e.issue.help,
5285
- inverted: !J.value
5331
+ inverted: !q.value
5286
5332
  }, null, 8, ["text", "inverted"])) : b("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (P(), x("a", {
5287
5333
  key: 2,
5288
5334
  href: e.issue.actionUrl,
5289
5335
  "data-test": "messaging-system-msg-action",
5290
- class: j(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", J.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5291
- onClick: a[2] || (a[2] = W(() => {}, ["stop"]))
5292
- }, [C(H(e.issue.actionLabel) + " ", 1), a[21] || (a[21] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, Ji)) : b("", !0)], 2)])], 8, Ki)) : e.sender === "system" ? (P(), x("div", {
5336
+ class: j(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", q.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5337
+ onClick: a[2] || (a[2] = U(() => {}, ["stop"]))
5338
+ }, [C(H(e.issue.actionLabel) + " ", 1), a[21] || (a[21] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, ta)) : b("", !0)], 2)])], 8, $i)) : e.sender === "system" ? (P(), x("div", {
5293
5339
  key: 3,
5294
5340
  "data-test": "messaging-system-status-msg",
5295
5341
  "data-message-id": e.id,
@@ -5299,16 +5345,16 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5299
5345
  "data-system-kind": e.systemKind,
5300
5346
  "data-issue-code": e.issue?.code,
5301
5347
  "data-issue-bucket": e.issue?.bucket,
5302
- "data-streaming": e.id === K.value ? "true" : void 0,
5303
- class: j(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", J.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5348
+ "data-streaming": e.id === G.value ? "true" : void 0,
5349
+ class: j(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", q.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5304
5350
  }, [a[22] || (a[22] = S("i", {
5305
5351
  class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
5306
5352
  "aria-hidden": "true"
5307
5353
  }, null, -1)), T(ui, {
5308
5354
  text: e.text,
5309
- inverted: !J.value,
5310
- onClick: a[3] || (a[3] = W(() => {}, ["stop"]))
5311
- }, null, 8, ["text", "inverted"])], 10, Yi)) : (P(), x("div", {
5355
+ inverted: !q.value,
5356
+ onClick: a[3] || (a[3] = U(() => {}, ["stop"]))
5357
+ }, null, 8, ["text", "inverted"])], 10, na)) : (P(), x("div", {
5312
5358
  key: 4,
5313
5359
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
5314
5360
  "data-message-id": e.id,
@@ -5316,7 +5362,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5316
5362
  "data-conversation-id": e.conversationId,
5317
5363
  "data-message-sequence": e.sequence,
5318
5364
  "data-system-kind": e.systemKind,
5319
- "data-streaming": e.id === K.value ? "true" : void 0,
5365
+ "data-streaming": e.id === G.value ? "true" : void 0,
5320
5366
  "data-queued": isQueuedMessage(e.id) ? "true" : void 0,
5321
5367
  "aria-label": isQueuedMessage(e.id) ? "Sent — will be answered after the current work finishes" : void 0,
5322
5368
  class: j(["flex gap-2 items-end", {
@@ -5338,30 +5384,30 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5338
5384
  "data-test": "messaging-attachment",
5339
5385
  "data-attachment-placement": "block",
5340
5386
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5341
- }, null, 8, Zi)) : e.type === "audio" ? (P(), x("audio", {
5387
+ }, null, 8, ia)) : e.type === "audio" ? (P(), x("audio", {
5342
5388
  key: 1,
5343
5389
  src: e.src,
5344
5390
  controls: "",
5345
5391
  "data-test": "messaging-attachment",
5346
5392
  "data-attachment-placement": "block",
5347
5393
  class: "max-w-full"
5348
- }, null, 8, Qi)) : (P(), x("a", {
5394
+ }, null, 8, aa)) : (P(), x("a", {
5349
5395
  key: 2,
5350
5396
  href: e.src,
5351
5397
  target: "_blank",
5352
5398
  rel: "noopener",
5353
5399
  "data-test": "messaging-attachment",
5354
5400
  "data-attachment-placement": "block",
5355
- class: j(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5356
- }, [a[23] || (a[23] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(e.filename), 1)], 10, $i))], 64))), 128))], 2)) : b("", !0), messageRenderParts(e).length ? (P(), x("div", {
5401
+ class: j(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", q.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5402
+ }, [a[23] || (a[23] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(e.filename), 1)], 10, oa))], 64))), 128))], 2)) : b("", !0), messageRenderParts(e).length ? (P(), x("div", {
5357
5403
  key: 1,
5358
5404
  "data-test": "messaging-message-content",
5359
- class: j(e.sender === "user" ? J.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : J.value ? "text-theme-800" : "text-white/95")
5360
- }, [(P(!0), x(h, null, I(messageRenderParts(e), (t) => (P(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (P(), x("div", ea, [T(ui, {
5405
+ class: j(e.sender === "user" ? q.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : q.value ? "text-theme-800" : "text-white/95")
5406
+ }, [(P(!0), x(h, null, I(messageRenderParts(e), (t) => (P(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (P(), x("div", sa, [T(ui, {
5361
5407
  text: t.text,
5362
- inverted: e.sender === "user" || !J.value,
5363
- streaming: e.id === K.value,
5364
- onClick: a[4] || (a[4] = W(() => {}, ["stop"])),
5408
+ inverted: e.sender === "user" || !q.value,
5409
+ streaming: e.id === G.value,
5410
+ onClick: a[4] || (a[4] = U(() => {}, ["stop"])),
5365
5411
  onAction: handleCardAction
5366
5412
  }, null, 8, [
5367
5413
  "text",
@@ -5374,85 +5420,85 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5374
5420
  "data-test": "messaging-attachment",
5375
5421
  "data-attachment-placement": t.placement,
5376
5422
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5377
- }, null, 8, ta)) : t.kind === "attachment" && t.attachment.type === "audio" ? (P(), x("audio", {
5423
+ }, null, 8, ca)) : t.kind === "attachment" && t.attachment.type === "audio" ? (P(), x("audio", {
5378
5424
  key: 2,
5379
5425
  src: t.attachment.src,
5380
5426
  controls: "",
5381
5427
  "data-test": "messaging-attachment",
5382
5428
  "data-attachment-placement": t.placement,
5383
5429
  class: "my-2 max-w-full"
5384
- }, null, 8, na)) : t.kind === "attachment" ? (P(), x("a", {
5430
+ }, null, 8, la)) : t.kind === "attachment" ? (P(), x("a", {
5385
5431
  key: 3,
5386
5432
  href: t.attachment.src,
5387
5433
  target: "_blank",
5388
5434
  rel: "noopener",
5389
5435
  "data-test": "messaging-attachment",
5390
5436
  "data-attachment-placement": t.placement,
5391
- class: j(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", J.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5392
- }, [a[24] || (a[24] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(t.attachment.filename), 1)], 10, ra)) : b("", !0)], 64))), 128))], 2)) : b("", !0)], 2)], 10, Xi)),
5437
+ class: j(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", q.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5438
+ }, [a[24] || (a[24] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(t.attachment.filename), 1)], 10, ua)) : b("", !0)], 64))), 128))], 2)) : b("", !0)], 2)], 10, ra)),
5393
5439
  e.id === se.value ? (P(), x(h, { key: 5 }, [m.value.length ? (P(!0), x(h, { key: 0 }, I(m.value, (e) => (P(), x(h, { key: e.id }, [e.kind === "work" ? (P(), x("div", {
5394
5440
  key: 0,
5395
5441
  "data-test": "messaging-tool-activity",
5396
5442
  "data-journal-outcome": e.journal.outcome,
5397
5443
  class: "mb-4 w-full"
5398
- }, [T(Ze, {
5444
+ }, [T(Qe, {
5399
5445
  model: e.journal,
5400
- "is-light": J.value
5401
- }, null, 8, ["model", "is-light"])], 8, ia)) : e.kind === "text" && e.content ? (P(), x("div", {
5446
+ "is-light": q.value
5447
+ }, null, 8, ["model", "is-light"])], 8, da)) : e.kind === "text" && e.content ? (P(), x("div", {
5402
5448
  key: 1,
5403
5449
  "data-test": "messaging-live-text-block",
5404
- class: j(["mb-4", J.value ? "text-theme-800" : "text-white/95"])
5450
+ class: j(["mb-4", q.value ? "text-theme-800" : "text-white/95"])
5405
5451
  }, [T(ui, {
5406
5452
  text: e.content,
5407
- inverted: !J.value,
5453
+ inverted: !q.value,
5408
5454
  streaming: e.id === k.value,
5409
- onClick: a[5] || (a[5] = W(() => {}, ["stop"])),
5455
+ onClick: a[5] || (a[5] = U(() => {}, ["stop"])),
5410
5456
  onAction: handleCardAction
5411
5457
  }, null, 8, [
5412
5458
  "text",
5413
5459
  "inverted",
5414
5460
  "streaming"
5415
- ])], 2)) : (P(), x("div", aa, [T(_e, { class: j(["size-3.5", J.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : oe.value ? (P(), x("div", {
5461
+ ])], 2)) : (P(), x("div", fa, [T(ve, { class: j(["size-3.5", q.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : oe.value ? (P(), x("div", {
5416
5462
  key: 1,
5417
5463
  "data-test": "messaging-tool-activity",
5418
5464
  "data-journal-outcome": oe.value.outcome,
5419
5465
  class: "mb-4 w-full"
5420
- }, [T(Ze, {
5466
+ }, [T(Qe, {
5421
5467
  model: oe.value,
5422
- "is-light": J.value
5423
- }, null, 8, ["model", "is-light"])], 8, oa)) : b("", !0)], 64)) : b("", !0)
5468
+ "is-light": q.value
5469
+ }, null, 8, ["model", "is-light"])], 8, pa)) : b("", !0)], 64)) : b("", !0)
5424
5470
  ], 64))), 128)),
5425
- q.value ? (P(), x("div", {
5471
+ K.value ? (P(), x("div", {
5426
5472
  key: 1,
5427
5473
  "data-test": B.value ? "messaging-working-state" : "messaging-thinking-indicator",
5428
5474
  "data-working-description": B.value,
5429
5475
  role: "status",
5430
5476
  "aria-live": "polite",
5431
- class: j(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", J.value ? "text-theme-500" : "text-white/50"])
5432
- }, [S("span", ca, [(P(), x(h, null, I(3, (e) => S("span", {
5477
+ class: j(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", q.value ? "text-theme-500" : "text-white/50"])
5478
+ }, [S("span", ha, [(P(), x(h, null, I(3, (e) => S("span", {
5433
5479
  key: e,
5434
5480
  "data-test": "messaging-thinking-dot",
5435
5481
  class: "chat-working-dot size-1.5 rounded-full bg-current",
5436
5482
  style: M({ animationDelay: `${(e - 1) * .18}s` })
5437
- }, null, 4)), 64))]), S("span", la, H(q.value), 1)], 10, sa)) : b("", !0),
5438
- G.value ? (P(), x("div", {
5483
+ }, null, 4)), 64))]), S("span", ga, H(K.value), 1)], 10, ma)) : b("", !0),
5484
+ W.value ? (P(), x("div", {
5439
5485
  key: 2,
5440
5486
  "data-test": "messaging-transient-issue",
5441
- "data-issue-code": G.value.code,
5442
- class: j(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", J.value ? "text-theme-600" : "text-white/60"])
5487
+ "data-issue-code": W.value.code,
5488
+ class: j(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", q.value ? "text-theme-600" : "text-white/60"])
5443
5489
  }, [
5444
5490
  a[25] || (a[25] = S("i", {
5445
5491
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5446
5492
  "aria-hidden": "true"
5447
5493
  }, null, -1)),
5448
- S("span", null, [C(H(G.value.message), 1), G.value.help ? (P(), x(h, { key: 0 }, [C(H(G.value.help), 1)], 64)) : b("", !0)]),
5449
- G.value.actionUrl && G.value.actionLabel ? (P(), x("a", {
5494
+ S("span", null, [C(H(W.value.message), 1), W.value.help ? (P(), x(h, { key: 0 }, [C(H(W.value.help), 1)], 64)) : b("", !0)]),
5495
+ W.value.actionUrl && W.value.actionLabel ? (P(), x("a", {
5450
5496
  key: 0,
5451
- href: G.value.actionUrl,
5497
+ href: W.value.actionUrl,
5452
5498
  class: "shrink-0 underline underline-offset-2",
5453
- onClick: a[6] || (a[6] = W(() => {}, ["stop"]))
5454
- }, H(G.value.actionLabel), 9, da)) : b("", !0)
5455
- ], 10, ua)) : b("", !0)
5499
+ onClick: a[6] || (a[6] = U(() => {}, ["stop"]))
5500
+ }, H(W.value.actionLabel), 9, va)) : b("", !0)
5501
+ ], 10, _a)) : b("", !0)
5456
5502
  ], 2)]),
5457
5503
  _: 3
5458
5504
  }, 8, [
@@ -5462,40 +5508,40 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5462
5508
  ]),
5463
5509
  S("div", {
5464
5510
  "data-test": "messaging-composer-footer",
5465
- inert: Ge.value,
5466
- "aria-hidden": Ge.value ? "true" : void 0,
5511
+ inert: Ke.value,
5512
+ "aria-hidden": Ke.value ? "true" : void 0,
5467
5513
  class: j(["left-0 right-0 z-30 px-3 @lg/chat:px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
5468
5514
  R.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5469
5515
  e.centered && R.value.length > 0 ? "pt-0 sm:pb-7" : "pt-3",
5470
- J.value ? e.centered ? "bg-theme-0" : "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"
5516
+ q.value ? e.centered ? "bg-theme-0" : "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"
5471
5517
  ]])
5472
- }, [ae(t.$slots, "composer", {}, () => [we.value ? (P(), x("div", {
5518
+ }, [ae(t.$slots, "composer", {}, () => [Te.value ? (P(), x("div", {
5473
5519
  key: 0,
5474
5520
  "data-test": "messaging-seat",
5475
- "data-seat-state": Ce.value,
5521
+ "data-seat-state": we.value,
5476
5522
  role: "status",
5477
5523
  "aria-live": "polite",
5478
- class: j(["py-3 text-center text-[14px]", J.value ? "text-theme-500" : "text-white/70"])
5479
- }, H(we.value), 11, pa)) : (P(), x(h, { key: 1 }, [
5480
- De.value.length > 0 ? (P(), x("div", {
5524
+ class: j(["py-3 text-center text-[14px]", q.value ? "text-theme-500" : "text-white/70"])
5525
+ }, H(Te.value), 11, ba)) : (P(), x(h, { key: 1 }, [
5526
+ Oe.value.length > 0 ? (P(), x("div", {
5481
5527
  key: 0,
5482
5528
  class: j(["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" : ""])
5483
- }, [(P(!0), x(h, null, I(De.value, (e, t) => (P(), x("div", {
5529
+ }, [(P(!0), x(h, null, I(Oe.value, (e, t) => (P(), x("div", {
5484
5530
  key: t,
5485
5531
  class: "relative shrink-0 group"
5486
5532
  }, [e.type === "image" ? (P(), x("img", {
5487
5533
  key: 0,
5488
5534
  src: e.src,
5489
5535
  alt: e.filename,
5490
- class: j(["size-14 rounded-xl object-cover border", J.value ? "border-black/10" : "border-white/20"])
5491
- }, null, 10, ma)) : (P(), x("div", {
5536
+ class: j(["size-14 rounded-xl object-cover border", q.value ? "border-black/10" : "border-white/20"])
5537
+ }, null, 10, xa)) : (P(), x("div", {
5492
5538
  key: 1,
5493
- class: j(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", J.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5494
- }, [a[26] || (a[26] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span", ha, H(e.filename), 1)], 2)), S("button", {
5539
+ class: j(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", q.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5540
+ }, [a[26] || (a[26] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span", Sa, H(e.filename), 1)], 2)), S("button", {
5495
5541
  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",
5496
5542
  onClick: (e) => removeAttachment(t)
5497
- }, [...a[27] || (a[27] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, ga)]))), 128)), Oe.value ? (P(), x("div", _a, [T(_e, { class: "size-5" })])) : b("", !0)], 2)) : b("", !0),
5498
- je.value ? (P(), x("input", {
5543
+ }, [...a[27] || (a[27] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Ca)]))), 128)), ke.value ? (P(), x("div", wa, [T(ve, { class: "size-5" })])) : b("", !0)], 2)) : b("", !0),
5544
+ Me.value ? (P(), x("input", {
5499
5545
  key: 1,
5500
5546
  ref_key: "fileInput",
5501
5547
  ref: o,
@@ -5506,22 +5552,22 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5506
5552
  }, null, 544)) : b("", !0),
5507
5553
  S("div", {
5508
5554
  "data-test": "messaging-composer",
5509
- "data-composer-action": Ne.value,
5510
- class: j(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? R.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", J.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"]]),
5555
+ "data-composer-action": Pe.value,
5556
+ class: j(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? R.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", q.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"]]),
5511
5557
  onClick: focusComposer
5512
- }, [Be.value ? (P(), x("div", {
5558
+ }, [Ve.value ? (P(), x("div", {
5513
5559
  key: 1,
5514
5560
  "data-test": "messaging-recording-state",
5515
- class: j(["flex min-w-0 items-center gap-2 py-1", J.value ? "text-theme-700" : "text-white/80"])
5561
+ class: j(["flex min-w-0 items-center gap-2 py-1", q.value ? "text-theme-700" : "text-white/80"])
5516
5562
  }, [
5517
5563
  a[28] || (a[28] = S("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5518
- S("span", ba, H(Ve.value), 1),
5519
- S("span", { class: j(["min-w-0 truncate text-sm", J.value ? "text-theme-400" : "text-white/45"]) }, H(Ue.value), 3)
5520
- ], 2)) : de((P(), x("textarea", {
5564
+ S("span", Da, H(He.value), 1),
5565
+ S("span", { class: j(["min-w-0 truncate text-sm", q.value ? "text-theme-400" : "text-white/45"]) }, H(We.value), 3)
5566
+ ], 2)) : pe((P(), x("textarea", {
5521
5567
  key: 0,
5522
5568
  ref_key: "textarea",
5523
5569
  ref: i,
5524
- "onUpdate:modelValue": a[7] || (a[7] = (e) => Ee.value = e),
5570
+ "onUpdate:modelValue": a[7] || (a[7] = (e) => De.value = e),
5525
5571
  "data-test": "messaging-input",
5526
5572
  rows: "1",
5527
5573
  enterkeyhint: "send",
@@ -5530,51 +5576,51 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5530
5576
  autocapitalize: "sentences",
5531
5577
  autocorrect: "on",
5532
5578
  spellcheck: "true",
5533
- placeholder: Se.value,
5534
- disabled: be.value,
5579
+ placeholder: Ce.value,
5580
+ disabled: Se.value,
5535
5581
  style: {
5536
5582
  fontSize: "16px",
5537
5583
  resize: "none"
5538
5584
  },
5539
- class: j(["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", J.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5585
+ class: j(["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", q.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5540
5586
  onKeydown: handleKeydown
5541
- }, null, 42, ya)), [[ce, Ee.value]]), S("div", xa, [
5587
+ }, null, 42, Ea)), [[ce, De.value]]), S("div", Oa, [
5542
5588
  S("button", {
5543
5589
  class: j(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
5544
- je.value ? "cursor-pointer" : "cursor-default",
5545
- J.value ? "text-theme-500" : "text-white/50",
5546
- Oe.value || Ae.value ? "opacity-50 pointer-events-none" : ""
5590
+ Me.value ? "cursor-pointer" : "cursor-default",
5591
+ q.value ? "text-theme-500" : "text-white/50",
5592
+ ke.value || je.value ? "opacity-50 pointer-events-none" : ""
5547
5593
  ]]),
5548
- disabled: be.value || Oe.value || Ae.value || !je.value,
5549
- "aria-label": je.value ? "Attach file" : "File attachments unavailable",
5550
- title: je.value ? "Attach file" : "File attachments unavailable",
5551
- onClick: a[8] || (a[8] = (e) => je.value && triggerFileInput())
5552
- }, [Oe.value ? (P(), x("i", Ca)) : (P(), x("i", wa)), S("span", Ta, H(je.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Sa),
5594
+ disabled: Se.value || ke.value || je.value || !Me.value,
5595
+ "aria-label": Me.value ? "Attach file" : "File attachments unavailable",
5596
+ title: Me.value ? "Attach file" : "File attachments unavailable",
5597
+ onClick: a[8] || (a[8] = (e) => Me.value && triggerFileInput())
5598
+ }, [ke.value ? (P(), x("i", Aa)) : (P(), x("i", ja)), S("span", Ma, H(Me.value ? "Attach file" : "File attachments unavailable"), 1)], 10, ka),
5553
5599
  a[31] || (a[31] = S("div", { class: "flex-1" }, null, -1)),
5554
- S("div", Ea, [(ze.value || Be.value) && !Ge.value ? (P(), x("button", {
5600
+ S("div", Na, [(Be.value || Ve.value) && !Ke.value ? (P(), x("button", {
5555
5601
  key: 0,
5556
5602
  "data-test": "messaging-record-audio-btn",
5557
- class: j(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Be.value ? J.value ? "text-theme-900 scale-110" : "text-white scale-110" : J.value ? "text-theme-500" : "text-white/60"]),
5558
- "aria-label": We.value,
5559
- title: We.value,
5560
- onPointerdown: a[9] || (a[9] = W((e) => startRecording(), ["prevent"])),
5561
- onPointerup: a[10] || (a[10] = W((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5562
- onPointercancel: a[11] || (a[11] = W((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5603
+ class: j(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Ve.value ? q.value ? "text-theme-900 scale-110" : "text-white scale-110" : q.value ? "text-theme-500" : "text-white/60"]),
5604
+ "aria-label": Ge.value,
5605
+ title: Ge.value,
5606
+ onPointerdown: a[9] || (a[9] = U((e) => startRecording(), ["prevent"])),
5607
+ onPointerup: a[10] || (a[10] = U((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5608
+ onPointercancel: a[11] || (a[11] = U((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5563
5609
  onKeydown: [
5564
- a[12] || (a[12] = pe(W((e) => startRecording(), ["prevent"]), ["enter"])),
5565
- a[14] || (a[14] = pe(W((e) => startRecording(), ["prevent"]), ["space"])),
5566
- a[16] || (a[16] = pe(W((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5610
+ a[12] || (a[12] = he(U((e) => startRecording(), ["prevent"]), ["enter"])),
5611
+ a[14] || (a[14] = he(U((e) => startRecording(), ["prevent"]), ["space"])),
5612
+ a[16] || (a[16] = he(U((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5567
5613
  ],
5568
- onKeyup: [a[13] || (a[13] = pe(W((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), a[15] || (a[15] = pe(W((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5569
- }, [S("i", { class: j([Be.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span", Oa, H(We.value), 1)], 42, Da)) : b("", !0), Qe.value ? (P(), x("button", {
5614
+ onKeyup: [a[13] || (a[13] = he(U((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), a[15] || (a[15] = he(U((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5615
+ }, [S("i", { class: j([Ve.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span", Fa, H(Ge.value), 1)], 42, Pa)) : b("", !0), $e.value ? (P(), x("button", {
5570
5616
  key: 1,
5571
5617
  "data-test": "messaging-voice-start-btn",
5572
- class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", $e.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5573
- disabled: $e.value,
5574
- "aria-label": et.value,
5575
- title: et.value,
5618
+ class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [q.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", et.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5619
+ disabled: et.value,
5620
+ "aria-label": tt.value,
5621
+ title: tt.value,
5576
5622
  onClick: a[17] || (a[17] = (e) => startVoiceConversation())
5577
- }, [S("span", Aa, [(P(), x(h, null, I([
5623
+ }, [S("span", La, [(P(), x(h, null, I([
5578
5624
  7,
5579
5625
  13,
5580
5626
  16,
@@ -5584,10 +5630,10 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5584
5630
  key: e,
5585
5631
  class: "w-[2px] rounded-full bg-current",
5586
5632
  style: M({ height: `${e}px` })
5587
- }, null, 4)), 64))]), a[29] || (a[29] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, ka)) : Be.value ? b("", !0) : (P(), x(h, { key: 2 }, [Fe.value ? (P(), x("button", {
5633
+ }, null, 4)), 64))]), a[29] || (a[29] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, Ia)) : Ve.value ? b("", !0) : (P(), x(h, { key: 2 }, [Ie.value ? (P(), x("button", {
5588
5634
  key: 0,
5589
5635
  "data-test": "messaging-secondary-stop-btn",
5590
- class: j(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", J.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
5636
+ class: j(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", q.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
5591
5637
  "aria-label": "Stop work",
5592
5638
  title: "Stop work",
5593
5639
  onClick: a[18] || (a[18] = (t) => e.chatController?.stopChatTurn())
@@ -5596,28 +5642,32 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5596
5642
  "aria-hidden": "true"
5597
5643
  }, null, -1), S("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : b("", !0), S("button", {
5598
5644
  "data-test": "messaging-send-btn",
5599
- "data-composer-action": Ne.value,
5600
- class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Pe.value ? J.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : J.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5601
- disabled: !Pe.value,
5602
- "aria-label": Re.value,
5603
- title: Re.value,
5645
+ "data-composer-action": Pe.value,
5646
+ class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Fe.value ? q.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : q.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5647
+ disabled: !Fe.value,
5648
+ "aria-label": ze.value,
5649
+ title: ze.value,
5604
5650
  onClick: a[19] || (a[19] = (e) => handleComposerAction())
5605
- }, [Ne.value === "stop" ? (P(), x("i", Ma)) : (P(), x("i", Na)), S("span", Pa, H(Re.value), 1)], 10, ja)], 64))])
5606
- ])], 10, va),
5607
- e.centered && R.value.length > 0 ? (P(), x("p", Fa, H(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : b("", !0)
5608
- ], 64))], !0)], 10, fa)
5651
+ }, [Pe.value === "stop" ? (P(), x("i", za)) : (P(), x("i", Ba)), S("span", Va, H(ze.value), 1)], 10, Ra)], 64))])
5652
+ ])], 10, Ta),
5653
+ e.centered && R.value.length > 0 ? (P(), x("p", Ha, H(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : b("", !0)
5654
+ ], 64))], !0)], 10, ya)
5609
5655
  ], 2));
5610
5656
  }
5611
- }), [["__scopeId", "data-v-4b08d62d"]]), La = { class: "agent-wrap" }, Ra = {
5657
+ }), Wa = /* @__PURE__ */ e((e, t) => {
5658
+ let n = e.__vccOpts || e;
5659
+ for (let [e, r] of t) n[e] = r;
5660
+ return n;
5661
+ }, "default"), Ga = /*#__PURE__*/ Wa(Ua, [["__scopeId", "data-v-4b08d62d"]]), Ka = { class: "agent-wrap" }, qa = {
5612
5662
  key: 0,
5613
5663
  class: "flex items-center justify-center h-full"
5614
- }, za = {
5664
+ }, Ja = {
5615
5665
  key: 2,
5616
5666
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5617
5667
  role: "status",
5618
5668
  "aria-live": "polite",
5619
5669
  "data-test": "agent-unavailable"
5620
- }, Ba = /* @__PURE__ */ k({
5670
+ }, Ya = /* @__PURE__ */ k({
5621
5671
  __name: "AgentWrap",
5622
5672
  props: {
5623
5673
  sdk: {},
@@ -5713,7 +5763,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5713
5763
  });
5714
5764
  }
5715
5765
  }
5716
- return re(loadAgent), (t, n) => (P(), x("div", La, [o.value ? (P(), x("div", Ra, [S("div", { class: j(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ae(t.$slots, "default", {
5766
+ return re(loadAgent), (t, n) => (P(), x("div", Ka, [o.value ? (P(), x("div", qa, [S("div", { class: j(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ae(t.$slots, "default", {
5717
5767
  sdk: oe(a),
5718
5768
  agent: c.value,
5719
5769
  context: e.clientContext ?? e.context,
@@ -5721,7 +5771,7 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5721
5771
  buttonText: e.buttonText,
5722
5772
  buttonIcon: e.buttonIcon,
5723
5773
  loading: o.value
5724
- }, void 0, void 0, 1) : u.value ? (P(), x("div", za, [n[0] || (n[0] = S("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), S("button", {
5774
+ }, void 0, void 0, 1) : u.value ? (P(), x("div", Ja, [n[0] || (n[0] = S("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), S("button", {
5725
5775
  type: "button",
5726
5776
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5727
5777
  "data-test": "agent-unavailable-retry",
@@ -5730,6 +5780,6 @@ var gi = ["data-voice-state", "data-voice-activity"], _i = ["src"], vi = {
5730
5780
  }
5731
5781
  });
5732
5782
  //#endregion
5733
- export { ui as a, ke as c, handleImageError as d, parseButtonTemplate as f, _e as g, r as h, Ni as i, De as l, K as m, Ia as n, Le as o, AgentChatController as p, Pi as r, je as s, Ba as t, getAgentAvatarUrl as u };
5783
+ export { ui as a, Ae as c, handleImageError as d, parseButtonTemplate as f, ve as g, r as h, Vi as i, Oe as l, G as m, Ga as n, Re as o, AgentChatController as p, Wa as r, Me as s, Ya as t, getAgentAvatarUrl as u };
5734
5784
 
5735
5785
  //# sourceMappingURL=AgentWrap.js.map