@_solaris/messenger-widget 0.4.5 → 0.4.7

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/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as K, normalizeClass as x, toDisplayString as v, resolveComponent as L, createVNode as q, Transition as je, withCtx as Ue, Fragment as I, renderList as j, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as V, vModelText as ee, createTextVNode as ge, resolveDynamicComponent as Pe, renderSlot as De, vModelCheckbox as $e, vModelSelect as He, markRaw as ye } from "vue";
1
+ import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as z, normalizeClass as x, toDisplayString as v, resolveComponent as L, createVNode as $, Transition as Fe, withCtx as je, Fragment as I, renderList as F, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as K, vModelText as ee, createTextVNode as ge, resolveDynamicComponent as Pe, renderSlot as De, vModelCheckbox as He, vModelSelect as ze, markRaw as we } from "vue";
2
2
  const qe = [
3
3
  "connected",
4
4
  "message",
@@ -6,7 +6,7 @@ const qe = [
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], be = "/client", ze = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
9
+ ], ke = "/client", $e = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
10
10
  function We(e) {
11
11
  const t = {
12
12
  baseUrl: Ge(e.baseUrl || ""),
@@ -55,7 +55,7 @@ function We(e) {
55
55
  };
56
56
  }
57
57
  async function a(d, f, _) {
58
- const y = await fetch(`${t.baseUrl}${be}${f}`, {
58
+ const y = await fetch(`${t.baseUrl}${ke}${f}`, {
59
59
  method: d,
60
60
  headers: { "Content-Type": "application/json", ...s() },
61
61
  body: _ !== void 0 ? JSON.stringify(_) : void 0
@@ -121,7 +121,7 @@ function We(e) {
121
121
  `/conversations/${encodeURIComponent(d)}`
122
122
  )).conversation;
123
123
  }
124
- async function H(d, f) {
124
+ async function q(d, f) {
125
125
  return (await a(
126
126
  "PATCH",
127
127
  `/conversations/${encodeURIComponent(d)}`,
@@ -145,7 +145,7 @@ function We(e) {
145
145
  );
146
146
  }
147
147
  async function N(d, f) {
148
- z();
148
+ V();
149
149
  const _ = {
150
150
  client_msg_id: f.client_msg_id,
151
151
  type: "content",
@@ -159,8 +159,8 @@ function We(e) {
159
159
  _
160
160
  );
161
161
  }
162
- async function $(d, f, _) {
163
- return z(), a(
162
+ async function H(d, f, _) {
163
+ return V(), a(
164
164
  "POST",
165
165
  `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
166
166
  _ ? { inputs: _ } : {}
@@ -203,7 +203,7 @@ function We(e) {
203
203
  userHash: t.userHash,
204
204
  widgetId: t.widgetId
205
205
  }).toString();
206
- return `${t.baseUrl}${be}/stream?${d}`;
206
+ return `${t.baseUrl}${ke}/stream?${d}`;
207
207
  }
208
208
  function G() {
209
209
  if (!t.eventSource && !(typeof document < "u" && document.hidden))
@@ -230,13 +230,13 @@ function We(e) {
230
230
  function Q() {
231
231
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
232
232
  }
233
- function z() {
233
+ function V() {
234
234
  clearTimeout(t.burstTimer), G(), t.panelOpen || (t.burstTimer = setTimeout(() => {
235
235
  t.panelOpen || Q();
236
236
  }, Ve));
237
237
  }
238
238
  function he(d) {
239
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) : z();
239
+ t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) : V();
240
240
  }
241
241
  async function ce() {
242
242
  try {
@@ -244,13 +244,13 @@ function We(e) {
244
244
  const S = w == null ? void 0 : w.last_message_at;
245
245
  return S && (!y || S > y) ? S : y;
246
246
  }, null);
247
- f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), z());
247
+ f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), V());
248
248
  } catch (d) {
249
249
  console.error("[transport] poll failed", d);
250
250
  }
251
251
  }
252
252
  function de() {
253
- se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, ze));
253
+ se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, $e));
254
254
  }
255
255
  function se() {
256
256
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
@@ -305,11 +305,11 @@ function We(e) {
305
305
  listConversations: T,
306
306
  createConversation: E,
307
307
  getConversation: A,
308
- patchConversation: H,
308
+ patchConversation: q,
309
309
  markConversationRead: M,
310
310
  listMessages: P,
311
311
  postMessage: N,
312
- postCallback: $,
312
+ postCallback: H,
313
313
  uploadAttachment: W,
314
314
  signAttachment: te,
315
315
  // Read-only state
@@ -337,7 +337,7 @@ function Qe() {
337
337
  return t.slice(0, 4).join("") + "-" + t.slice(4, 6).join("") + "-" + t.slice(6, 8).join("") + "-" + t.slice(8, 10).join("") + "-" + t.slice(10, 16).join("");
338
338
  }
339
339
  function Xe(e) {
340
- const t = Fe({
340
+ const t = Ue({
341
341
  ready: !1,
342
342
  error: null,
343
343
  config: null,
@@ -493,8 +493,8 @@ function Xe(e) {
493
493
  }), y = (_ == null ? void 0 : _.messages) ?? [], w = t.messagesByConv[m] || [], S = /* @__PURE__ */ new Set();
494
494
  for (const O of w)
495
495
  (O == null ? void 0 : O.id) != null && S.add(`id:${String(O.id)}`), O != null && O.client_msg_id && S.add(`c:${O.client_msg_id}`);
496
- const F = y.filter((O) => !((O == null ? void 0 : O.id) != null && S.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && S.has(`c:${O.client_msg_id}`)));
497
- t.messagesByConv[m] = [...F, ...w], k(m, {
496
+ const U = y.filter((O) => !((O == null ? void 0 : O.id) != null && S.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && S.has(`c:${O.client_msg_id}`)));
497
+ t.messagesByConv[m] = [...U, ...w], k(m, {
498
498
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
499
499
  loading: !1,
500
500
  loaded: !0
@@ -528,8 +528,8 @@ function Xe(e) {
528
528
  (S == null ? void 0 : S.id) != null && _.add(String(S.id)), S != null && S.client_msg_id && y.add(S.client_msg_id);
529
529
  const w = [];
530
530
  for (const S of f) {
531
- const F = (S == null ? void 0 : S.id) != null && _.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
532
- Y(m, S), F || w.push(S);
531
+ const U = (S == null ? void 0 : S.id) != null && _.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
532
+ Y(m, S), U || w.push(S);
533
533
  }
534
534
  return w;
535
535
  } catch (d) {
@@ -548,8 +548,8 @@ function Xe(e) {
548
548
  console.error("[store] markConversationRead failed", g);
549
549
  }
550
550
  }
551
- async function H(m, h, { attachments: g, metadata: d } = {}) {
552
- var F;
551
+ async function q(m, h, { attachments: g, metadata: d } = {}) {
552
+ var U;
553
553
  const f = (h || "").trim(), _ = Array.isArray(g) && g.length > 0;
554
554
  if (!m || !f && !_) return;
555
555
  const y = Qe(), w = se(m), S = {
@@ -560,7 +560,7 @@ function Xe(e) {
560
560
  text_md: f,
561
561
  author: {
562
562
  type: "user",
563
- id: ((F = t.customer) == null ? void 0 : F.external_id) || null
563
+ id: ((U = t.customer) == null ? void 0 : U.external_id) || null
564
564
  },
565
565
  created_at: w,
566
566
  // Local-only flag — UI may render dimmed until the SSE echo lands.
@@ -578,7 +578,7 @@ function Xe(e) {
578
578
  ...d && typeof d == "object" ? { metadata: d } : {}
579
579
  });
580
580
  } catch (O) {
581
- console.error("[store] send failed", O), z(m, y, {
581
+ console.error("[store] send failed", O), V(m, y, {
582
582
  _failed: !0,
583
583
  _pending: !1
584
584
  });
@@ -612,7 +612,7 @@ function Xe(e) {
612
612
  }
613
613
  return null;
614
614
  }
615
- async function $(m, { rating: h, comment: g } = {}) {
615
+ async function H(m, { rating: h, comment: g } = {}) {
616
616
  const d = t.conversations.find((y) => y.id === m), _ = {
617
617
  ...(d == null ? void 0 : d.metadata) || {},
618
618
  feedback: {
@@ -664,15 +664,15 @@ function Xe(e) {
664
664
  return [];
665
665
  if (((f = w == null ? void 0 : w.author) == null ? void 0 : f.type) !== "agent_ia") continue;
666
666
  const S = (_ = w == null ? void 0 : w.metadata) == null ? void 0 : _.suggested_replies;
667
- return Array.isArray(S) && S.length ? S.map((F) => {
668
- if (typeof F == "string") {
669
- const O = F.trim();
667
+ return Array.isArray(S) && S.length ? S.map((U) => {
668
+ if (typeof U == "string") {
669
+ const O = U.trim();
670
670
  return O ? { label: O, kind: null } : null;
671
671
  }
672
- if (F && typeof F == "object" && typeof F.label == "string") {
673
- const O = F.label.trim();
672
+ if (U && typeof U == "object" && typeof U.label == "string") {
673
+ const O = U.label.trim();
674
674
  if (!O) return null;
675
- const Ne = F.kind === "cta" || F.kind === "choice" || F.kind === "followup" ? F.kind : null;
675
+ const Ne = U.kind === "cta" || U.kind === "choice" || U.kind === "followup" ? U.kind : null;
676
676
  return { label: O, kind: Ne };
677
677
  }
678
678
  return null;
@@ -698,7 +698,7 @@ function Xe(e) {
698
698
  function Q(m, h) {
699
699
  return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
700
700
  }
701
- function z(m, h, g) {
701
+ function V(m, h, g) {
702
702
  const d = t.messagesByConv[m];
703
703
  if (!d) return;
704
704
  const f = d.findIndex((y) => y.id === h);
@@ -746,10 +746,10 @@ function Xe(e) {
746
746
  fetchSinceLast: E,
747
747
  patchConversation: T,
748
748
  markConversationRead: A,
749
- send: H,
749
+ send: q,
750
750
  clickCallback: M,
751
751
  signAttachment: N,
752
- submitFeedback: $,
752
+ submitFeedback: H,
753
753
  getPendingApproval: W,
754
754
  getActionInFlight: ne,
755
755
  getLatestSuggestions: G,
@@ -782,10 +782,10 @@ const D = {
782
782
  "#D97706",
783
783
  "#059669"
784
784
  ];
785
- function xe(e = "") {
785
+ function pe(e = "") {
786
786
  return e ? fe[e.charCodeAt(0) % fe.length] : fe[0];
787
787
  }
788
- function Oe(e = "") {
788
+ function ve(e = "") {
789
789
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
790
790
  }
791
791
  function Ie(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
@@ -837,7 +837,7 @@ const Je = `
837
837
  0% { transform: translateX(110%); opacity: 0; }
838
838
  100% { transform: translateX(0); opacity: 1; }
839
839
  }
840
- `, Ze = "https://api.messenger.victorc.fr", ie = "fr", et = ["fr", "en"], we = { fr: "fr-FR", en: "en-US" }, _e = {
840
+ `, Ze = "https://api.messenger.victorc.fr", ie = "fr", et = ["fr", "en"], Ce = { fr: "fr-FR", en: "en-US" }, _e = {
841
841
  fr: {
842
842
  // ── Common ───────────────────────────────────────────────────────
843
843
  "common.newConversation": "Nouvelle conversation",
@@ -1079,16 +1079,16 @@ I reply within seconds.`,
1079
1079
  "export.createdOn": "Created on: {date}"
1080
1080
  }
1081
1081
  };
1082
- function pe(e) {
1082
+ function ye(e) {
1083
1083
  if (typeof e != "string") return ie;
1084
1084
  const t = e.trim().toLowerCase().slice(0, 2);
1085
1085
  return et.includes(t) ? t : ie;
1086
1086
  }
1087
1087
  function oe(e) {
1088
- return we[pe(e)] || we[ie];
1088
+ return Ce[ye(e)] || Ce[ie];
1089
1089
  }
1090
- function U(e) {
1091
- const t = pe(e), n = _e[t] || _e[ie], i = _e[ie];
1090
+ function j(e) {
1091
+ const t = ye(e), n = _e[t] || _e[ie], i = _e[ie];
1092
1092
  return function(s, a) {
1093
1093
  let l = n[s];
1094
1094
  return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
@@ -1097,15 +1097,15 @@ function U(e) {
1097
1097
  )), l);
1098
1098
  };
1099
1099
  }
1100
- function ke(e, t) {
1100
+ function Ae(e, t) {
1101
1101
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1102
1102
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1103
1103
  return (n == null ? void 0 : n.label) || t;
1104
1104
  }
1105
1105
  function Le(e, t, n) {
1106
- return Array.isArray(t) ? t.map((i) => ke(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : ke(e, String(t));
1106
+ return Array.isArray(t) ? t.map((i) => Ae(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ae(e, String(t));
1107
1107
  }
1108
- function tt(e, t, n = U()) {
1108
+ function tt(e, t, n = j()) {
1109
1109
  if (!e || !t) return "";
1110
1110
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1111
1111
  for (const s of i) {
@@ -1120,7 +1120,7 @@ ${l}`);
1120
1120
 
1121
1121
  `);
1122
1122
  }
1123
- function nt(e, t, n = U()) {
1123
+ function nt(e, t, n = j()) {
1124
1124
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1125
1125
  for (const s of r) {
1126
1126
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
@@ -1150,7 +1150,7 @@ function J(e) {
1150
1150
  const t = typeof e == "number" ? e : Number(e);
1151
1151
  return Number.isFinite(t) ? t : null;
1152
1152
  }
1153
- function Ce(e, t) {
1153
+ function Se(e, t) {
1154
1154
  let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1155
1155
  for (const i of t)
1156
1156
  i != null && i.created_at && i.created_at > n && (n = i.created_at);
@@ -1190,7 +1190,7 @@ function it(e, t, n, i) {
1190
1190
  return r.join(`
1191
1191
  `);
1192
1192
  }
1193
- function at(e, t, n = U(), i) {
1193
+ function at(e, t, n = j(), i) {
1194
1194
  if (!e) return;
1195
1195
  const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1196
1196
  try {
@@ -1634,17 +1634,17 @@ const B = (e, t) => {
1634
1634
  },
1635
1635
  computed: {
1636
1636
  bg() {
1637
- return this.avatarUrl ? "transparent" : xe(this.name);
1637
+ return this.avatarUrl ? "transparent" : pe(this.name);
1638
1638
  },
1639
1639
  initials() {
1640
- return Oe(this.name);
1640
+ return ve(this.name);
1641
1641
  }
1642
1642
  }
1643
1643
  }, yt = ["src", "alt"];
1644
1644
  function bt(e, t, n, i, r, s) {
1645
1645
  return c(), u("div", {
1646
1646
  class: x(["wm-huav", { "wm-huav--tail": n.tail }]),
1647
- style: K({
1647
+ style: z({
1648
1648
  width: n.size + "px",
1649
1649
  height: n.size + "px",
1650
1650
  "--wm-avr": Math.round(n.size * 0.32) + "px",
@@ -1657,7 +1657,7 @@ function bt(e, t, n, i, r, s) {
1657
1657
  alt: n.name || ""
1658
1658
  }, null, 8, yt)) : (c(), u("span", {
1659
1659
  key: 1,
1660
- style: K({ fontSize: n.size * 0.36 + "px" })
1660
+ style: z({ fontSize: n.size * 0.36 + "px" })
1661
1661
  }, v(s.initials), 5))
1662
1662
  ], 6);
1663
1663
  }
@@ -1667,7 +1667,7 @@ const Be = /* @__PURE__ */ B(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d
1667
1667
  inject: {
1668
1668
  // Translator shared by the Messenger shell; French fallback when
1669
1669
  // the component is used standalone.
1670
- t: { default: () => U() }
1670
+ t: { default: () => j() }
1671
1671
  },
1672
1672
  props: {
1673
1673
  // Nombre de conversations non lues — pilote la pastille.
@@ -1688,19 +1688,19 @@ const Be = /* @__PURE__ */ B(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d
1688
1688
  }
1689
1689
  }
1690
1690
  }, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, It = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Et = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1691
- function Ft(e, t, n, i, r, s) {
1691
+ function Ut(e, t, n, i, r, s) {
1692
1692
  const a = L("HumanAvatar");
1693
1693
  return c(), u("div", Ct, [
1694
- q(je, { name: "wm-peek" }, {
1695
- default: Ue(() => [
1694
+ $(Fe, { name: "wm-peek" }, {
1695
+ default: je(() => [
1696
1696
  s.visiblePeeks.length ? (c(), u("div", {
1697
1697
  key: 0,
1698
1698
  class: x(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1699
1699
  }, [
1700
- (c(!0), u(I, null, j(s.visiblePeeks, (l, p) => (c(), u("div", {
1700
+ (c(!0), u(I, null, F(s.visiblePeeks, (l, p) => (c(), u("div", {
1701
1701
  key: l.convId,
1702
1702
  class: "wm-peek",
1703
- style: K({
1703
+ style: z({
1704
1704
  "--depth": s.visiblePeeks.length - 1 - p,
1705
1705
  zIndex: p + 1
1706
1706
  }),
@@ -1736,7 +1736,7 @@ function Ft(e, t, n, i, r, s) {
1736
1736
  ], -1)
1737
1737
  ])], 8, St),
1738
1738
  o("div", Mt, [
1739
- q(a, {
1739
+ $(a, {
1740
1740
  name: l.senderName,
1741
1741
  "avatar-url": l.senderAvatarUrl,
1742
1742
  size: 34
@@ -1795,7 +1795,7 @@ function Ft(e, t, n, i, r, s) {
1795
1795
  ], 8, Rt)
1796
1796
  ]);
1797
1797
  }
1798
- const jt = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Ut = {
1798
+ const Ft = /* @__PURE__ */ B(kt, [["render", Ut], ["__scopeId", "data-v-5193a529"]]), jt = {
1799
1799
  name: "WmAIAvatar",
1800
1800
  props: {
1801
1801
  size: { type: Number, default: 26 },
@@ -1806,19 +1806,32 @@ const jt = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529
1806
1806
  // (Header, Onboarding, ApprovalCard, FormCard…) → laissé à false
1807
1807
  // pour garder l'avatar pleinement arrondi.
1808
1808
  tail: { type: Boolean, default: !1 },
1809
+ // Nom de l'agent IA. Quand renseigné (et sans `imageUrl`), rend
1810
+ // les initiales sur fond déterministe à partir du nom — même
1811
+ // logique que `HumanAvatar` pour les agents humains. L'étoile SVG
1812
+ // ne reste que comme fallback si ni `imageUrl` ni `name`.
1813
+ name: { type: String, default: "" },
1809
1814
  // Image distante (avatar de l'agent ou `default_icon_url` du
1810
- // widget). Quand renseignée, remplace l'étoile par l'image dans
1811
- // le même container arrondi.
1815
+ // widget). Quand renseignée, remplace les initiales / l'étoile
1816
+ // par l'image dans le même container arrondi.
1812
1817
  imageUrl: { type: String, default: null }
1818
+ },
1819
+ computed: {
1820
+ initials() {
1821
+ return ve(this.name);
1822
+ },
1823
+ bgColor() {
1824
+ return pe(this.name);
1825
+ }
1813
1826
  }
1814
1827
  }, Pt = {
1815
1828
  key: 0,
1816
1829
  class: "wm-aiav__pulse"
1817
- }, Dt = ["src"], $t = ["width", "height"];
1818
- function Ht(e, t, n, i, r, s) {
1830
+ }, Dt = ["src", "alt"], Ht = ["width", "height"];
1831
+ function zt(e, t, n, i, r, s) {
1819
1832
  return c(), u("div", {
1820
1833
  class: x(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1821
- style: K({
1834
+ style: z({
1822
1835
  width: n.size + "px",
1823
1836
  height: n.size + "px",
1824
1837
  "--wm-avr": n.size * 0.32 + "px"
@@ -1828,15 +1841,22 @@ function Ht(e, t, n, i, r, s) {
1828
1841
  o("div", {
1829
1842
  class: x(["wm-aiav__inner", {
1830
1843
  "wm-aiav__inner--glow": n.pulse,
1831
- "wm-aiav__inner--img": !!n.imageUrl
1832
- }])
1844
+ "wm-aiav__inner--img": !!n.imageUrl,
1845
+ "wm-aiav__inner--initials": !n.imageUrl && !!s.initials
1846
+ }]),
1847
+ style: z(
1848
+ !n.imageUrl && s.initials ? { background: s.bgColor } : null
1849
+ )
1833
1850
  }, [
1834
1851
  n.imageUrl ? (c(), u("img", {
1835
1852
  key: 0,
1836
1853
  src: n.imageUrl,
1837
- alt: ""
1838
- }, null, 8, Dt)) : (c(), u("svg", {
1854
+ alt: n.name || ""
1855
+ }, null, 8, Dt)) : s.initials ? (c(), u("span", {
1839
1856
  key: 1,
1857
+ style: z({ fontSize: n.size * 0.36 + "px" })
1858
+ }, v(s.initials), 5)) : (c(), u("svg", {
1859
+ key: 2,
1840
1860
  width: n.size * 0.5,
1841
1861
  height: n.size * 0.5,
1842
1862
  viewBox: "0 0 24 24",
@@ -1862,11 +1882,11 @@ function Ht(e, t, n, i, r, s) {
1862
1882
  fill: "white",
1863
1883
  opacity: "0.38"
1864
1884
  }, null, -1)
1865
- ])], 8, $t))
1866
- ], 2)
1885
+ ])], 8, Ht))
1886
+ ], 6)
1867
1887
  ], 6);
1868
1888
  }
1869
- const le = /* @__PURE__ */ B(Ut, [["render", Ht], ["__scopeId", "data-v-99d8093a"]]), qt = {
1889
+ const le = /* @__PURE__ */ B(jt, [["render", zt], ["__scopeId", "data-v-a91a2925"]]), qt = {
1870
1890
  name: "WmTeamAvatars",
1871
1891
  props: {
1872
1892
  members: { type: Array, default: () => [] },
@@ -1882,13 +1902,13 @@ const le = /* @__PURE__ */ B(Ut, [["render", Ht], ["__scopeId", "data-v-99d8093a
1882
1902
  },
1883
1903
  methods: {
1884
1904
  colorFor(e) {
1885
- return e.avatar_url ? "transparent" : xe(e.name || "");
1905
+ return e.avatar_url ? "transparent" : pe(e.name || "");
1886
1906
  },
1887
1907
  initialsFor(e) {
1888
- return Oe(e.name || "");
1908
+ return ve(e.name || "");
1889
1909
  }
1890
1910
  }
1891
- }, zt = {
1911
+ }, $t = {
1892
1912
  key: 0,
1893
1913
  class: "wm-team"
1894
1914
  }, Vt = ["src", "alt"], Kt = { key: 1 }, Wt = {
@@ -1896,15 +1916,15 @@ const le = /* @__PURE__ */ B(Ut, [["render", Ht], ["__scopeId", "data-v-99d8093a
1896
1916
  class: "wm-team__label"
1897
1917
  };
1898
1918
  function Gt(e, t, n, i, r, s) {
1899
- return s.visible ? (c(), u("div", zt, [
1919
+ return s.visible ? (c(), u("div", $t, [
1900
1920
  o("div", {
1901
1921
  class: "wm-team__stack",
1902
- style: K({ width: s.stackWidth + "px" })
1922
+ style: z({ width: s.stackWidth + "px" })
1903
1923
  }, [
1904
- (c(!0), u(I, null, j(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1924
+ (c(!0), u(I, null, F(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1905
1925
  key: l,
1906
1926
  class: "wm-team__pill",
1907
- style: K({
1927
+ style: z({
1908
1928
  left: l * 13 + "px",
1909
1929
  zIndex: 3 - l,
1910
1930
  background: s.colorFor(a)
@@ -1926,7 +1946,7 @@ const Yt = /* @__PURE__ */ B(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063
1926
1946
  inject: {
1927
1947
  // Translator shared by the Messenger shell. Falls back to a French
1928
1948
  // translator when the component is used standalone (no provider).
1929
- t: { default: () => U() }
1949
+ t: { default: () => j() }
1930
1950
  },
1931
1951
  props: {
1932
1952
  title: { type: String, default: "Nouvelle conversation" },
@@ -1939,6 +1959,7 @@ const Yt = /* @__PURE__ */ B(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063
1939
1959
  // When false (welcome / no conversation) the avatar + title + status
1940
1960
  // block is hidden so the header stays a minimal action bar.
1941
1961
  showIdentity: { type: Boolean, default: !0 },
1962
+ agentName: { type: String, default: "" },
1942
1963
  agentAvatarUrl: { type: String, default: null }
1943
1964
  },
1944
1965
  emits: ["back", "close", "more"],
@@ -1991,10 +2012,11 @@ function ln(e, t, n, i, r, s) {
1991
2012
  ])], 8, Jt)) : (c(), u("div", Zt)),
1992
2013
  n.showIdentity ? (c(), u(I, { key: 2 }, [
1993
2014
  o("div", en, [
1994
- q(a, {
2015
+ $(a, {
1995
2016
  size: 30,
2017
+ name: n.agentName,
1996
2018
  "image-url": n.agentAvatarUrl
1997
- }, null, 8, ["image-url"])
2019
+ }, null, 8, ["name", "image-url"])
1998
2020
  ]),
1999
2021
  o("div", tn, [
2000
2022
  o("div", nn, v(n.title), 1)
@@ -2063,20 +2085,20 @@ function ln(e, t, n, i, r, s) {
2063
2085
  ])
2064
2086
  ]);
2065
2087
  }
2066
- const cn = /* @__PURE__ */ B(Qt, [["render", ln], ["__scopeId", "data-v-a94f9284"]]);
2088
+ const cn = /* @__PURE__ */ B(Qt, [["render", ln], ["__scopeId", "data-v-925c9e94"]]);
2067
2089
  function Ee(e) {
2068
2090
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2069
2091
  }
2070
2092
  function dn(e) {
2071
2093
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
2072
2094
  }
2073
- const Ae = "";
2095
+ const Me = "";
2074
2096
  function re(e) {
2075
2097
  let t = e;
2076
2098
  const n = [];
2077
2099
  return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
2078
2100
  const s = n.length;
2079
- return n.push(r), `${Ae}CODE${s}${Ae}`;
2101
+ return n.push(r), `${Me}CODE${s}${Me}`;
2080
2102
  }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => dn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
2081
2103
  }
2082
2104
  function un(e) {
@@ -2153,7 +2175,7 @@ function mn(e) {
2153
2175
  }
2154
2176
  return r;
2155
2177
  }
2156
- const Se = {
2178
+ const Te = {
2157
2179
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
2158
2180
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
2159
2181
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2165,7 +2187,7 @@ const Se = {
2165
2187
  inject: {
2166
2188
  // Translator + resolved-language getter shared by the Messenger
2167
2189
  // shell. Fall back to French wording when used standalone.
2168
- t: { default: () => U() },
2190
+ t: { default: () => j() },
2169
2191
  wmLocale: { default: () => () => "fr" }
2170
2192
  },
2171
2193
  props: {
@@ -2203,7 +2225,7 @@ const Se = {
2203
2225
  },
2204
2226
  methods: {
2205
2227
  iconPath(e) {
2206
- return Se[e] || Se.link;
2228
+ return Te[e] || Te.link;
2207
2229
  },
2208
2230
  renderPreview(e) {
2209
2231
  return un(e);
@@ -2247,18 +2269,18 @@ const Se = {
2247
2269
  }, On = {
2248
2270
  key: 1,
2249
2271
  class: "wm-onb__section"
2250
- }, In = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, Bn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Rn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, jn = { class: "wm-onb__thread-title" }, Un = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, Dn = {
2272
+ }, In = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, Bn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Rn = ["onClick"], Nn = ["aria-label"], Un = { class: "wm-onb__thread-body" }, Fn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, Dn = {
2251
2273
  key: 0,
2252
2274
  class: "wm-onb__thread-time"
2253
- }, $n = {
2275
+ }, Hn = {
2254
2276
  key: 0,
2255
2277
  class: "wm-onb__empty"
2256
2278
  };
2257
- function Hn(e, t, n, i, r, s) {
2279
+ function zn(e, t, n, i, r, s) {
2258
2280
  const a = L("AIAvatar");
2259
2281
  return c(), u("div", fn, [
2260
2282
  o("div", _n, [
2261
- q(a, {
2283
+ $(a, {
2262
2284
  size: 56,
2263
2285
  pulse: !0,
2264
2286
  "image-url": n.defaultIconUrl
@@ -2296,7 +2318,7 @@ function Hn(e, t, n, i, r, s) {
2296
2318
  o("div", {
2297
2319
  class: x(s.quickLinksLayout)
2298
2320
  }, [
2299
- (c(!0), u(I, null, j(n.quickLinks, (l, p) => (c(), u("button", {
2321
+ (c(!0), u(I, null, F(n.quickLinks, (l, p) => (c(), u("button", {
2300
2322
  key: p,
2301
2323
  type: "button",
2302
2324
  class: x(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
@@ -2334,7 +2356,7 @@ function Hn(e, t, n, i, r, s) {
2334
2356
  o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2335
2357
  ])
2336
2358
  ], -1)),
2337
- V(o("input", {
2359
+ K(o("input", {
2338
2360
  "onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
2339
2361
  type: "text",
2340
2362
  placeholder: s.t("onboarding.search"),
@@ -2344,7 +2366,7 @@ function Hn(e, t, n, i, r, s) {
2344
2366
  ])
2345
2367
  ]),
2346
2368
  o("div", En, [
2347
- (c(!0), u(I, null, j(s.filteredThreads, (l) => (c(), u("button", {
2369
+ (c(!0), u(I, null, F(s.filteredThreads, (l) => (c(), u("button", {
2348
2370
  key: l.id,
2349
2371
  type: "button",
2350
2372
  class: "wm-onb__thread",
@@ -2372,12 +2394,12 @@ function Hn(e, t, n, i, r, s) {
2372
2394
  "aria-label": s.t("onboarding.unread")
2373
2395
  }, null, 8, Nn)) : b("", !0)
2374
2396
  ], 2),
2375
- o("span", Fn, [
2376
- o("span", jn, v(l.title), 1),
2397
+ o("span", Un, [
2398
+ o("span", Fn, v(l.title), 1),
2377
2399
  o("span", {
2378
2400
  class: "wm-onb__thread-preview",
2379
2401
  innerHTML: s.renderPreview(l.preview)
2380
- }, null, 8, Un)
2402
+ }, null, 8, jn)
2381
2403
  ]),
2382
2404
  o("span", Pn, [
2383
2405
  s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : b("", !0),
@@ -2397,13 +2419,13 @@ function Hn(e, t, n, i, r, s) {
2397
2419
  ], -1))
2398
2420
  ])
2399
2421
  ], 8, Rn))), 128)),
2400
- s.filteredThreads.length ? b("", !0) : (c(), u("div", $n, v(s.t("onboarding.noResults", { query: r.query })), 1))
2422
+ s.filteredThreads.length ? b("", !0) : (c(), u("div", Hn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2401
2423
  ])
2402
2424
  ])) : b("", !0)
2403
2425
  ]);
2404
2426
  }
2405
- const qn = /* @__PURE__ */ B(hn, [["render", Hn], ["__scopeId", "data-v-286413a5"]]);
2406
- function zn(e) {
2427
+ const qn = /* @__PURE__ */ B(hn, [["render", zn], ["__scopeId", "data-v-900e5f91"]]);
2428
+ function $n(e) {
2407
2429
  return typeof e != "string" ? "" : e.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
2408
2430
  }
2409
2431
  const Vn = {
@@ -2416,7 +2438,7 @@ const Vn = {
2416
2438
  },
2417
2439
  computed: {
2418
2440
  detailText() {
2419
- return zn(this.detail);
2441
+ return $n(this.detail);
2420
2442
  }
2421
2443
  }
2422
2444
  }, Kn = {
@@ -2512,7 +2534,7 @@ const ts = /* @__PURE__ */ B(Vn, [["render", es], ["__scopeId", "data-v-7284acd0
2512
2534
  inject: {
2513
2535
  // Translator shared by the Messenger shell; French fallback when
2514
2536
  // the component is used standalone.
2515
- t: { default: () => U() }
2537
+ t: { default: () => j() }
2516
2538
  },
2517
2539
  props: {
2518
2540
  data: { type: Object, required: !0 }
@@ -2546,7 +2568,7 @@ function cs(e, t, n, i, r, s) {
2546
2568
  ])
2547
2569
  ]),
2548
2570
  o("div", os, [
2549
- (c(!0), u(I, null, j(s.fields, (a, l) => (c(), u("div", {
2571
+ (c(!0), u(I, null, F(s.fields, (a, l) => (c(), u("div", {
2550
2572
  key: l,
2551
2573
  class: "wm-art__field"
2552
2574
  }, [
@@ -2613,7 +2635,7 @@ function ks(e, t, n, i, r, s) {
2613
2635
  ]),
2614
2636
  s.hasBody ? (c(), u("div", ys, [
2615
2637
  n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : b("", !0),
2616
- s.fields.length ? (c(!0), u(I, { key: 1 }, j(s.fields, (a, l) => (c(), u("div", {
2638
+ s.fields.length ? (c(!0), u(I, { key: 1 }, F(s.fields, (a, l) => (c(), u("div", {
2617
2639
  key: l,
2618
2640
  class: "wm-art__field"
2619
2641
  }, [
@@ -2648,7 +2670,7 @@ const Ss = {
2648
2670
  inject: {
2649
2671
  // Translator + resolved-language getter shared by the Messenger
2650
2672
  // shell. Fall back to French wording when used standalone.
2651
- t: { default: () => U() },
2673
+ t: { default: () => j() },
2652
2674
  wmLocale: { default: () => () => "fr" }
2653
2675
  },
2654
2676
  props: {
@@ -2707,11 +2729,11 @@ const Ss = {
2707
2729
  "stroke-linecap": "round",
2708
2730
  "stroke-linejoin": "round",
2709
2731
  "aria-hidden": "true"
2710
- }, Fs = {
2732
+ }, Us = {
2711
2733
  key: 1,
2712
2734
  class: "wm-art__footer wm-tk__footer"
2713
2735
  };
2714
- function js(e, t, n, i, r, s) {
2736
+ function Fs(e, t, n, i, r, s) {
2715
2737
  return c(), u("div", Ms, [
2716
2738
  o("div", Ts, [
2717
2739
  o("div", xs, v(n.data.title), 1),
@@ -2750,7 +2772,7 @@ function js(e, t, n, i, r, s) {
2750
2772
  n.data.body ? (c(), u("div", Ls, v(n.data.body), 1)) : b("", !0)
2751
2773
  ]),
2752
2774
  s.fields.length ? (c(), u("div", Bs, [
2753
- (c(!0), u(I, null, j(s.fields, (a, l) => (c(), u("div", {
2775
+ (c(!0), u(I, null, F(s.fields, (a, l) => (c(), u("div", {
2754
2776
  key: l,
2755
2777
  class: "wm-art__field"
2756
2778
  }, [
@@ -2805,7 +2827,7 @@ function js(e, t, n, i, r, s) {
2805
2827
  ], 2)
2806
2828
  ]))), 128))
2807
2829
  ])) : b("", !0),
2808
- n.data.created_at ? (c(), u("div", Fs, [
2830
+ n.data.created_at ? (c(), u("div", Us, [
2809
2831
  t[4] || (t[4] = o("svg", {
2810
2832
  width: "11",
2811
2833
  height: "11",
@@ -2830,10 +2852,10 @@ function js(e, t, n, i, r, s) {
2830
2852
  ])) : b("", !0)
2831
2853
  ]);
2832
2854
  }
2833
- const Us = /* @__PURE__ */ B(Ss, [["render", js], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2855
+ const js = /* @__PURE__ */ B(Ss, [["render", Fs], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2834
2856
  form_response: ds,
2835
2857
  info_card: Cs,
2836
- ticket: Us
2858
+ ticket: js
2837
2859
  }, Ds = {
2838
2860
  name: "WmArtifactRenderer",
2839
2861
  props: {
@@ -2849,19 +2871,19 @@ const Us = /* @__PURE__ */ B(Ss, [["render", js], ["__scopeId", "data-v-5f30c914
2849
2871
  }
2850
2872
  }
2851
2873
  };
2852
- function $s(e, t, n, i, r, s) {
2874
+ function Hs(e, t, n, i, r, s) {
2853
2875
  return s.component ? (c(), R(Pe(s.component), {
2854
2876
  key: 0,
2855
2877
  data: n.artifact.data
2856
2878
  }, null, 8, ["data"])) : b("", !0);
2857
2879
  }
2858
- const Hs = /* @__PURE__ */ B(Ds, [["render", $s]]), qs = {
2880
+ const zs = /* @__PURE__ */ B(Ds, [["render", Hs]]), qs = {
2859
2881
  name: "WmAttachmentPreview",
2860
2882
  inject: {
2861
2883
  signAttachmentFn: { default: null },
2862
2884
  // Translator shared by the Messenger shell; French fallback when
2863
2885
  // the component is used standalone.
2864
- t: { default: () => U() }
2886
+ t: { default: () => j() }
2865
2887
  },
2866
2888
  props: {
2867
2889
  attachment: { type: Object, required: !0 }
@@ -2919,7 +2941,7 @@ const Hs = /* @__PURE__ */ B(Ds, [["render", $s]]), qs = {
2919
2941
  this.url || e.preventDefault();
2920
2942
  }
2921
2943
  }
2922
- }, zs = ["href"], Vs = ["src", "alt"], Ks = ["src"], Ws = ["src"], Gs = ["href", "download"], Ys = { class: "wm-att__main" }, Qs = { class: "wm-att__name" }, Xs = {
2944
+ }, $s = ["href"], Vs = ["src", "alt"], Ks = ["src"], Ws = ["src"], Gs = ["href", "download"], Ys = { class: "wm-att__main" }, Qs = { class: "wm-att__name" }, Xs = {
2923
2945
  key: 0,
2924
2946
  class: "wm-att__meta"
2925
2947
  }, Js = {
@@ -2943,7 +2965,7 @@ function Zs(e, t, n, i, r, s) {
2943
2965
  alt: s.displayName,
2944
2966
  loading: "lazy"
2945
2967
  }, null, 8, Vs)
2946
- ], 8, zs)) : s.kind === "audio" && r.url ? (c(), u("audio", {
2968
+ ], 8, $s)) : s.kind === "audio" && r.url ? (c(), u("audio", {
2947
2969
  key: 1,
2948
2970
  src: r.url,
2949
2971
  controls: "",
@@ -3036,12 +3058,12 @@ const cr = {
3036
3058
  Typing: lr,
3037
3059
  ActionResult: ts,
3038
3060
  AttachmentPreview: er,
3039
- ArtifactRenderer: Hs
3061
+ ArtifactRenderer: zs
3040
3062
  },
3041
3063
  inject: {
3042
3064
  // Translator + resolved-language getter shared by the Messenger
3043
3065
  // shell. Fall back to French wording when used standalone.
3044
- t: { default: () => U() },
3066
+ t: { default: () => j() },
3045
3067
  wmLocale: { default: () => () => "fr" }
3046
3068
  },
3047
3069
  props: {
@@ -3421,9 +3443,9 @@ const cr = {
3421
3443
  // doit garder son arrondi.
3422
3444
  cornersFor(e, t) {
3423
3445
  var te, ne, G;
3424
- const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, p = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (Y, Q, z) => Y != null && T != null ? Y + H >= T : Q === z || Q === "card" && z === "bubble";
3425
- let P = l, N = l, $ = l, W = l;
3426
- return a ? (C && (N = p), (k || !s) && ($ = p), C && M(E, C, i == null ? void 0 : i.top) && (P = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (C && (P = p), (k || !s) && (W = p), C && M(E, C, i == null ? void 0 : i.top) && (N = p), k && M(A, k, i == null ? void 0 : i.bottom) && ($ = p)), { tl: P, tr: N, br: $, bl: W };
3446
+ const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, p = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = (Y, Q, V) => Y != null && T != null ? Y + q >= T : Q === V || Q === "card" && V === "bubble";
3447
+ let P = l, N = l, H = l, W = l;
3448
+ return a ? (C && (N = p), (k || !s) && (H = p), C && M(E, C, i == null ? void 0 : i.top) && (P = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (C && (P = p), (k || !s) && (W = p), C && M(E, C, i == null ? void 0 : i.top) && (N = p), k && M(A, k, i == null ? void 0 : i.bottom) && (H = p)), { tl: P, tr: N, br: H, bl: W };
3427
3449
  },
3428
3450
  // Inline style emitting the four corner CSS variables. Set on
3429
3451
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3593,7 +3615,7 @@ function Ir(e, t, n, i, r, s) {
3593
3615
  o("span", pr, v(n.dateLabel), 1),
3594
3616
  t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
3595
3617
  ])) : b("", !0),
3596
- (c(!0), u(I, null, j(s.groups, (A, H) => (c(), u(I, {
3618
+ (c(!0), u(I, null, F(s.groups, (A, q) => (c(), u(I, {
3597
3619
  key: A.key
3598
3620
  }, [
3599
3621
  A.key === s.unreadGroupKey ? (c(), u("div", vr, [
@@ -3610,7 +3632,7 @@ function Ir(e, t, n, i, r, s) {
3610
3632
  o("span", wr, v(A.systemLabel), 1),
3611
3633
  t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3612
3634
  ])) : (c(), u(I, { key: 1 }, [
3613
- (c(!0), u(I, null, j(A.items, (M, P) => (c(), u("div", {
3635
+ (c(!0), u(I, null, F(A.items, (M, P) => (c(), u("div", {
3614
3636
  key: `${s.messageKey(M.message)}-${M.partKey}`,
3615
3637
  "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
3616
3638
  class: x(["wm-list__row fade-up", [
@@ -3620,7 +3642,7 @@ function Ir(e, t, n, i, r, s) {
3620
3642
  "is-failed": M.message._failed
3621
3643
  }
3622
3644
  ]]),
3623
- style: K(s.cornersStyle(A, P))
3645
+ style: z(s.cornersStyle(A, P))
3624
3646
  }, [
3625
3647
  A.role !== "user" ? (c(), u("div", Cr, [
3626
3648
  P === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
@@ -3628,8 +3650,9 @@ function Ir(e, t, n, i, r, s) {
3628
3650
  key: 0,
3629
3651
  size: 26,
3630
3652
  tail: !0,
3653
+ name: n.aiAgentName,
3631
3654
  "image-url": n.aiAgentAvatarUrl
3632
- }, null, 8, ["image-url"])) : (c(), R(l, {
3655
+ }, null, 8, ["name", "image-url"])) : (c(), R(l, {
3633
3656
  key: 1,
3634
3657
  name: A.agentName,
3635
3658
  "avatar-url": A.agentAvatarUrl,
@@ -3666,10 +3689,10 @@ function Ir(e, t, n, i, r, s) {
3666
3689
  "wm-list__atts--align-end": A.role === "user"
3667
3690
  }])
3668
3691
  }, [
3669
- (c(!0), u(I, null, j(s.attachmentsOf(
3692
+ (c(!0), u(I, null, F(s.attachmentsOf(
3670
3693
  M.message
3671
- ), (N, $) => (c(), R(T, {
3672
- key: `${s.messageKey(M.message)}-att-${$}`,
3694
+ ), (N, H) => (c(), R(T, {
3695
+ key: `${s.messageKey(M.message)}-att-${H}`,
3673
3696
  attachment: N
3674
3697
  }, null, 8, ["attachment"]))), 128))
3675
3698
  ], 2)) : b("", !0)
@@ -3688,19 +3711,20 @@ function Ir(e, t, n, i, r, s) {
3688
3711
  ], 64))), 128)),
3689
3712
  n.streamingActive ? (c(), u("div", xr, [
3690
3713
  o("div", Or, [
3691
- q(a, {
3714
+ $(a, {
3692
3715
  size: 26,
3693
3716
  tail: !0,
3717
+ name: n.aiAgentName,
3694
3718
  "image-url": n.aiAgentAvatarUrl
3695
- }, null, 8, ["image-url"])
3719
+ }, null, 8, ["name", "image-url"])
3696
3720
  ]),
3697
- q(E)
3721
+ $(E)
3698
3722
  ])) : b("", !0)
3699
3723
  ], 34);
3700
3724
  }
3701
- const Lr = /* @__PURE__ */ B(mr, [["render", Ir], ["__scopeId", "data-v-fc7e23b9"]]), me = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ve = typeof window < "u" && typeof window.MediaRecorder < "u";
3725
+ const Lr = /* @__PURE__ */ B(mr, [["render", Ir], ["__scopeId", "data-v-d769b193"]]), me = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3702
3726
  function Br() {
3703
- return ve && [
3727
+ return be && [
3704
3728
  "video/webm;codecs=vp9,opus",
3705
3729
  "video/webm;codecs=vp8,opus",
3706
3730
  "video/webm",
@@ -3719,7 +3743,7 @@ function Re({ audio: e }) {
3719
3743
  systemAudio: e ? "include" : "exclude"
3720
3744
  };
3721
3745
  }
3722
- function $a(e) {
3746
+ function Ha(e) {
3723
3747
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3724
3748
  }
3725
3749
  async function Er() {
@@ -3757,7 +3781,7 @@ async function Rr(e) {
3757
3781
  }
3758
3782
  async function Nr(e = {}) {
3759
3783
  var C;
3760
- if (!me || !ve) return null;
3784
+ if (!me || !be) return null;
3761
3785
  let t;
3762
3786
  try {
3763
3787
  t = await navigator.mediaDevices.getDisplayMedia(
@@ -3784,7 +3808,7 @@ async function Nr(e = {}) {
3784
3808
  if (s && clearInterval(s), t.getTracks().forEach((E) => {
3785
3809
  E.stop();
3786
3810
  }), r.length) {
3787
- const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${M}.${H}`, {
3811
+ const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${M}.${q}`, {
3788
3812
  type: E
3789
3813
  });
3790
3814
  (k = e.onfinalize) == null || k.call(e, P);
@@ -3820,7 +3844,7 @@ async function Nr(e = {}) {
3820
3844
  }
3821
3845
  };
3822
3846
  }
3823
- const Fr = [
3847
+ const Ur = [
3824
3848
  {
3825
3849
  action: "file",
3826
3850
  labelKey: "composer.attachFile",
@@ -3836,12 +3860,12 @@ const Fr = [
3836
3860
  labelKey: "composer.recordScreen",
3837
3861
  path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
3838
3862
  }
3839
- ], jr = {
3863
+ ], Fr = {
3840
3864
  name: "WmComposer",
3841
3865
  inject: {
3842
3866
  // Translator shared by the Messenger shell; French fallback when
3843
3867
  // the component is used standalone.
3844
- t: { default: () => U() }
3868
+ t: { default: () => j() }
3845
3869
  },
3846
3870
  props: {
3847
3871
  modelValue: { type: String, default: "" },
@@ -3864,10 +3888,10 @@ const Fr = [
3864
3888
  return !this.disabled && !!this.local.trim();
3865
3889
  },
3866
3890
  attachItems() {
3867
- return Fr.map((e) => ({
3891
+ return Ur.map((e) => ({
3868
3892
  ...e,
3869
3893
  label: this.t(e.labelKey),
3870
- disabled: e.action === "screenshot" && !me || e.action === "record" && (!me || !ve)
3894
+ disabled: e.action === "screenshot" && !me || e.action === "record" && (!me || !be)
3871
3895
  }));
3872
3896
  },
3873
3897
  recordingElapsedLabel() {
@@ -3968,21 +3992,21 @@ const Fr = [
3968
3992
  }
3969
3993
  }
3970
3994
  }
3971
- }, Ur = { class: "wm-compose-wrap" }, Pr = {
3995
+ }, jr = { class: "wm-compose-wrap" }, Pr = {
3972
3996
  key: 0,
3973
3997
  class: "wm-rec"
3974
- }, Dr = { class: "wm-rec__lbl" }, $r = {
3998
+ }, Dr = { class: "wm-rec__lbl" }, Hr = {
3975
3999
  key: 1,
3976
4000
  class: "wm-compose__menu",
3977
4001
  role: "menu"
3978
- }, Hr = ["disabled", "onClick"], qr = { class: "wm-compose__menuIcon" }, zr = {
4002
+ }, zr = ["disabled", "onClick"], qr = { class: "wm-compose__menuIcon" }, $r = {
3979
4003
  viewBox: "0 0 24 24",
3980
4004
  width: "14",
3981
4005
  height: "14",
3982
4006
  "aria-hidden": "true"
3983
4007
  }, Vr = ["d"], Kr = ["placeholder", "disabled"], Wr = { class: "wm-compose__actions" }, Gr = ["title", "aria-label", "disabled"], Yr = ["disabled", "aria-label"];
3984
4008
  function Qr(e, t, n, i, r, s) {
3985
- return c(), u("div", Ur, [
4009
+ return c(), u("div", jr, [
3986
4010
  r.recording ? (c(), u("div", Pr, [
3987
4011
  t[8] || (t[8] = o("span", {
3988
4012
  class: "wm-rec__dot",
@@ -4011,8 +4035,8 @@ function Qr(e, t, n, i, r, s) {
4011
4035
  class: "wm-compose__overlay",
4012
4036
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4013
4037
  })) : b("", !0),
4014
- r.attachOpen ? (c(), u("div", $r, [
4015
- (c(!0), u(I, null, j(s.attachItems, (a) => (c(), u("button", {
4038
+ r.attachOpen ? (c(), u("div", Hr, [
4039
+ (c(!0), u(I, null, F(s.attachItems, (a) => (c(), u("button", {
4016
4040
  key: a.action,
4017
4041
  type: "button",
4018
4042
  class: "wm-compose__menuItem",
@@ -4020,7 +4044,7 @@ function Qr(e, t, n, i, r, s) {
4020
4044
  onClick: (l) => s.onAttachAction(a.action)
4021
4045
  }, [
4022
4046
  o("span", qr, [
4023
- (c(), u("svg", zr, [
4047
+ (c(), u("svg", $r, [
4024
4048
  o("path", {
4025
4049
  d: a.path,
4026
4050
  stroke: "currentColor",
@@ -4032,9 +4056,9 @@ function Qr(e, t, n, i, r, s) {
4032
4056
  ]))
4033
4057
  ]),
4034
4058
  o("span", null, v(a.label), 1)
4035
- ], 8, Hr))), 128))
4059
+ ], 8, zr))), 128))
4036
4060
  ])) : b("", !0),
4037
- V(o("textarea", {
4061
+ K(o("textarea", {
4038
4062
  ref: "inputEl",
4039
4063
  "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
4040
4064
  class: "wm-compose__input",
@@ -4093,7 +4117,7 @@ function Qr(e, t, n, i, r, s) {
4093
4117
  ], 34)
4094
4118
  ]);
4095
4119
  }
4096
- const Xr = /* @__PURE__ */ B(jr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8"]]), Jr = {
4120
+ const Xr = /* @__PURE__ */ B(Fr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8"]]), Jr = {
4097
4121
  name: "WmSuggestionChips",
4098
4122
  props: {
4099
4123
  items: { type: Array, default: () => [] },
@@ -4116,11 +4140,11 @@ function ei(e, t, n, i, r, s) {
4116
4140
  key: s.batchKey,
4117
4141
  class: "wm-chips"
4118
4142
  }, [
4119
- (c(!0), u(I, null, j(n.items, (a, l) => (c(), u("button", {
4143
+ (c(!0), u(I, null, F(n.items, (a, l) => (c(), u("button", {
4120
4144
  key: l,
4121
4145
  type: "button",
4122
4146
  class: "wm-chip",
4123
- style: K({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4147
+ style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4124
4148
  onClick: (p) => e.$emit("select", a)
4125
4149
  }, v(a.label), 13, Zr))), 128))
4126
4150
  ])) : b("", !0);
@@ -4131,12 +4155,14 @@ const ti = /* @__PURE__ */ B(Jr, [["render", ei], ["__scopeId", "data-v-47ad8085
4131
4155
  inject: {
4132
4156
  // Translator shared by the Messenger shell; French fallback when
4133
4157
  // the component is used standalone.
4134
- t: { default: () => U() }
4158
+ t: { default: () => j() }
4135
4159
  },
4136
4160
  props: {
4137
4161
  action: { type: String, required: !0 },
4138
4162
  detail: { type: String, default: "" },
4139
- callbacks: { type: Array, default: () => [] }
4163
+ callbacks: { type: Array, default: () => [] },
4164
+ agentName: { type: String, default: "" },
4165
+ agentAvatarUrl: { type: String, default: null }
4140
4166
  },
4141
4167
  emits: ["callback"],
4142
4168
  computed: {
@@ -4176,7 +4202,11 @@ function di(e, t, n, i, r, s) {
4176
4202
  return c(), u("div", si, [
4177
4203
  o("div", ri, [
4178
4204
  o("div", ii, [
4179
- q(a, { size: 24 })
4205
+ $(a, {
4206
+ size: 24,
4207
+ name: n.agentName,
4208
+ "image-url": n.agentAvatarUrl
4209
+ }, null, 8, ["name", "image-url"])
4180
4210
  ]),
4181
4211
  o("div", ai, [
4182
4212
  o("div", oi, v(n.action), 1),
@@ -4199,8 +4229,8 @@ function di(e, t, n, i, r, s) {
4199
4229
  ])
4200
4230
  ]);
4201
4231
  }
4202
- const ui = /* @__PURE__ */ B(ni, [["render", di], ["__scopeId", "data-v-53ddf2b2"]]);
4203
- let Me = 0;
4232
+ const ui = /* @__PURE__ */ B(ni, [["render", di], ["__scopeId", "data-v-a2bed37e"]]);
4233
+ let xe = 0;
4204
4234
  const mi = /* @__PURE__ */ new Set([
4205
4235
  "text",
4206
4236
  "textarea",
@@ -4215,17 +4245,19 @@ const mi = /* @__PURE__ */ new Set([
4215
4245
  inject: {
4216
4246
  // Translator shared by the Messenger shell; French fallback when
4217
4247
  // the component is used standalone.
4218
- t: { default: () => U() }
4248
+ t: { default: () => j() }
4219
4249
  },
4220
4250
  props: {
4221
4251
  form: { type: Object, required: !0 },
4222
4252
  readOnly: { type: Boolean, default: !1 },
4223
- initialValues: { type: Object, default: null }
4253
+ initialValues: { type: Object, default: null },
4254
+ agentName: { type: String, default: "" },
4255
+ agentAvatarUrl: { type: String, default: null }
4224
4256
  },
4225
4257
  emits: ["submit"],
4226
4258
  data() {
4227
- return Me += 1, {
4228
- _uid: Me,
4259
+ return xe += 1, {
4260
+ _uid: xe,
4229
4261
  values: {},
4230
4262
  busy: !1,
4231
4263
  error: ""
@@ -4313,16 +4345,20 @@ const mi = /* @__PURE__ */ new Set([
4313
4345
  key: 0,
4314
4346
  class: "wm-form__spinner",
4315
4347
  "aria-hidden": "true"
4316
- }, Fi = {
4348
+ }, Ui = {
4317
4349
  key: 2,
4318
4350
  class: "wm-form__doneLbl"
4319
4351
  };
4320
- function ji(e, t, n, i, r, s) {
4352
+ function Fi(e, t, n, i, r, s) {
4321
4353
  const a = L("AIAvatar");
4322
4354
  return c(), u("div", fi, [
4323
4355
  o("div", _i, [
4324
4356
  o("div", gi, [
4325
- q(a, { size: 24 })
4357
+ $(a, {
4358
+ size: 24,
4359
+ name: n.agentName,
4360
+ "image-url": n.agentAvatarUrl
4361
+ }, null, 8, ["name", "image-url"])
4326
4362
  ]),
4327
4363
  o("div", pi, [
4328
4364
  o("div", vi, v(n.form.title || s.t("form.title")), 1),
@@ -4333,7 +4369,7 @@ function ji(e, t, n, i, r, s) {
4333
4369
  class: "wm-form__body",
4334
4370
  onSubmit: t[0] || (t[0] = X((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4335
4371
  }, [
4336
- (c(!0), u(I, null, j(s.normalizedFields, (l) => (c(), u("div", {
4372
+ (c(!0), u(I, null, F(s.normalizedFields, (l) => (c(), u("div", {
4337
4373
  key: l.key,
4338
4374
  class: "wm-form__field"
4339
4375
  }, [
@@ -4344,7 +4380,7 @@ function ji(e, t, n, i, r, s) {
4344
4380
  ge(v(l.label), 1),
4345
4381
  l.required ? (c(), u("span", wi, "*")) : b("", !0)
4346
4382
  ], 8, bi),
4347
- l.type === "text" ? V((c(), u("input", {
4383
+ l.type === "text" ? K((c(), u("input", {
4348
4384
  key: 0,
4349
4385
  id: `wm-f-${r._uid}-${l.key}`,
4350
4386
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4355,7 +4391,7 @@ function ji(e, t, n, i, r, s) {
4355
4391
  disabled: n.readOnly || r.busy
4356
4392
  }, null, 8, ki)), [
4357
4393
  [ee, r.values[l.key]]
4358
- ]) : l.type === "textarea" ? V((c(), u("textarea", {
4394
+ ]) : l.type === "textarea" ? K((c(), u("textarea", {
4359
4395
  key: 1,
4360
4396
  id: `wm-f-${r._uid}-${l.key}`,
4361
4397
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4366,7 +4402,7 @@ function ji(e, t, n, i, r, s) {
4366
4402
  disabled: n.readOnly || r.busy
4367
4403
  }, null, 8, Ci)), [
4368
4404
  [ee, r.values[l.key]]
4369
- ]) : l.type === "number" ? V((c(), u("input", {
4405
+ ]) : l.type === "number" ? K((c(), u("input", {
4370
4406
  key: 2,
4371
4407
  id: `wm-f-${r._uid}-${l.key}`,
4372
4408
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4382,7 +4418,7 @@ function ji(e, t, n, i, r, s) {
4382
4418
  void 0,
4383
4419
  { number: !0 }
4384
4420
  ]
4385
- ]) : l.type === "date" ? V((c(), u("input", {
4421
+ ]) : l.type === "date" ? K((c(), u("input", {
4386
4422
  key: 3,
4387
4423
  id: `wm-f-${r._uid}-${l.key}`,
4388
4424
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4393,16 +4429,16 @@ function ji(e, t, n, i, r, s) {
4393
4429
  }, null, 8, Si)), [
4394
4430
  [ee, r.values[l.key]]
4395
4431
  ]) : l.type === "boolean" ? (c(), u("label", Mi, [
4396
- V(o("input", {
4432
+ K(o("input", {
4397
4433
  id: `wm-f-${r._uid}-${l.key}`,
4398
4434
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
4399
4435
  type: "checkbox",
4400
4436
  disabled: n.readOnly || r.busy
4401
4437
  }, null, 8, Ti), [
4402
- [$e, r.values[l.key]]
4438
+ [He, r.values[l.key]]
4403
4439
  ]),
4404
4440
  o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4405
- ])) : l.type === "select" ? V((c(), u("select", {
4441
+ ])) : l.type === "select" ? K((c(), u("select", {
4406
4442
  key: 5,
4407
4443
  id: `wm-f-${r._uid}-${l.key}`,
4408
4444
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4411,14 +4447,14 @@ function ji(e, t, n, i, r, s) {
4411
4447
  disabled: n.readOnly || r.busy
4412
4448
  }, [
4413
4449
  o("option", Oi, v(l.placeholder || s.t("form.choose")), 1),
4414
- (c(!0), u(I, null, j(l.options, (p) => (c(), u("option", {
4450
+ (c(!0), u(I, null, F(l.options, (p) => (c(), u("option", {
4415
4451
  key: p.value,
4416
4452
  value: p.value
4417
4453
  }, v(p.label), 9, Ii))), 128))
4418
4454
  ], 8, xi)), [
4419
- [He, r.values[l.key]]
4455
+ [ze, r.values[l.key]]
4420
4456
  ]) : l.type === "multiselect" ? (c(), u("div", Li, [
4421
- (c(!0), u(I, null, j(l.options, (p) => (c(), u("label", {
4457
+ (c(!0), u(I, null, F(l.options, (p) => (c(), u("label", {
4422
4458
  key: p.value,
4423
4459
  class: "wm-form__multiItem"
4424
4460
  }, [
@@ -4438,7 +4474,7 @@ function ji(e, t, n, i, r, s) {
4438
4474
  ])) : b("", !0)
4439
4475
  ]))), 128)),
4440
4476
  r.error ? (c(), u("div", Ei, v(r.error), 1)) : b("", !0),
4441
- n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4477
+ n.readOnly ? (c(), u("div", Ui, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4442
4478
  key: 1,
4443
4479
  type: "submit",
4444
4480
  class: "wm-form__submit",
@@ -4450,12 +4486,12 @@ function ji(e, t, n, i, r, s) {
4450
4486
  ], 32)
4451
4487
  ]);
4452
4488
  }
4453
- const Ui = /* @__PURE__ */ B(hi, [["render", ji], ["__scopeId", "data-v-75332dad"]]), Pi = {
4489
+ const ji = /* @__PURE__ */ B(hi, [["render", Fi], ["__scopeId", "data-v-fe65cc56"]]), Pi = {
4454
4490
  name: "WmFeedback",
4455
4491
  inject: {
4456
4492
  // Translator shared by the Messenger shell; French fallback when
4457
4493
  // the component is used standalone.
4458
- t: { default: () => U() }
4494
+ t: { default: () => j() }
4459
4495
  },
4460
4496
  props: {
4461
4497
  busy: { type: Boolean, default: !1 },
@@ -4484,7 +4520,7 @@ const Ui = /* @__PURE__ */ B(hi, [["render", ji], ["__scopeId", "data-v-75332dad
4484
4520
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4485
4521
  }
4486
4522
  }
4487
- }, Di = { class: "wm-fb" }, $i = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, qi = { class: "wm-fb__row" }, zi = ["onClick"], Vi = { class: "wm-fb__emoji" }, Ki = { class: "wm-fb__label" }, Wi = ["disabled"], Gi = {
4523
+ }, Di = { class: "wm-fb" }, Hi = { class: "wm-fb__title" }, zi = { class: "wm-fb__sub" }, qi = { class: "wm-fb__row" }, $i = ["onClick"], Vi = { class: "wm-fb__emoji" }, Ki = { class: "wm-fb__label" }, Wi = ["disabled"], Gi = {
4488
4524
  key: 1,
4489
4525
  class: "wm-fb__done"
4490
4526
  }, Yi = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
@@ -4509,10 +4545,10 @@ function Xi(e, t, n, i, r, s) {
4509
4545
  o("div", Yi, v(s.t("feedback.doneTitle")), 1),
4510
4546
  o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
4511
4547
  ])) : (c(), u(I, { key: 0 }, [
4512
- o("div", $i, v(s.t("feedback.question")), 1),
4513
- o("div", Hi, v(s.t("feedback.subtitle")), 1),
4548
+ o("div", Hi, v(s.t("feedback.question")), 1),
4549
+ o("div", zi, v(s.t("feedback.subtitle")), 1),
4514
4550
  o("div", qi, [
4515
- (c(!0), u(I, null, j(s.options, (a) => (c(), u("button", {
4551
+ (c(!0), u(I, null, F(s.options, (a) => (c(), u("button", {
4516
4552
  key: a.v,
4517
4553
  type: "button",
4518
4554
  class: x(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
@@ -4520,7 +4556,7 @@ function Xi(e, t, n, i, r, s) {
4520
4556
  }, [
4521
4557
  o("span", Vi, v(a.e), 1),
4522
4558
  o("span", Ki, v(a.l), 1)
4523
- ], 10, zi))), 128))
4559
+ ], 10, $i))), 128))
4524
4560
  ]),
4525
4561
  o("button", {
4526
4562
  type: "button",
@@ -4536,7 +4572,7 @@ const Ji = /* @__PURE__ */ B(Pi, [["render", Xi], ["__scopeId", "data-v-9b630564
4536
4572
  inject: {
4537
4573
  // Translator shared by the Messenger shell; French fallback when
4538
4574
  // the component is used standalone.
4539
- t: { default: () => U() }
4575
+ t: { default: () => j() }
4540
4576
  },
4541
4577
  props: {
4542
4578
  canRename: { type: Boolean, default: !0 },
@@ -4756,7 +4792,7 @@ const ha = /* @__PURE__ */ B(Zi, [["render", ma], ["__scopeId", "data-v-76281e95
4756
4792
  inject: {
4757
4793
  // Translator shared by the Messenger shell; French fallback when
4758
4794
  // the component is used standalone.
4759
- t: { default: () => U() }
4795
+ t: { default: () => j() }
4760
4796
  },
4761
4797
  props: {
4762
4798
  // Empty defaults: the resolved fallback comes from the translator
@@ -4829,7 +4865,7 @@ function Aa(e, t, n, i, r, s) {
4829
4865
  ])], 8, ya)
4830
4866
  ]),
4831
4867
  o("div", ba, [
4832
- V(o("input", {
4868
+ K(o("input", {
4833
4869
  ref: "input",
4834
4870
  "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
4835
4871
  type: "text",
@@ -4860,17 +4896,17 @@ function Aa(e, t, n, i, r, s) {
4860
4896
  ])
4861
4897
  ]);
4862
4898
  }
4863
- const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8"]]), Te = "ww-messenger-tokens", Ma = {
4899
+ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ma = {
4864
4900
  name: "Messenger",
4865
4901
  components: {
4866
- Launcher: jt,
4902
+ Launcher: Ft,
4867
4903
  Header: cn,
4868
4904
  Onboarding: qn,
4869
4905
  MessageList: Lr,
4870
4906
  Composer: Xr,
4871
4907
  SuggestionChips: ti,
4872
4908
  ApprovalCard: ui,
4873
- FormCard: Ui,
4909
+ FormCard: ji,
4874
4910
  Feedback: Ji,
4875
4911
  MoreMenu: ha,
4876
4912
  RenameDialog: Sa
@@ -4994,7 +5030,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
4994
5030
  // 4. French.
4995
5031
  locale() {
4996
5032
  var e;
4997
- return pe(
5033
+ return ye(
4998
5034
  this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
4999
5035
  );
5000
5036
  },
@@ -5002,7 +5038,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5002
5038
  // `locale` changes. `t()` below (and the provided closure) delegate
5003
5039
  // to it so every string resolves against the current language.
5004
5040
  translator() {
5005
- return U(this.locale);
5041
+ return j(this.locale);
5006
5042
  },
5007
5043
  error() {
5008
5044
  var e;
@@ -5074,7 +5110,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5074
5110
  title: n.name || this.t("common.newConversation"),
5075
5111
  preview: n._preview || this.t("onboarding.newMessage"),
5076
5112
  unread: !!n._unread,
5077
- _ts: Ce(n, e[n.id] || [])
5113
+ _ts: Se(n, e[n.id] || [])
5078
5114
  })).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
5079
5115
  },
5080
5116
  // Unread threads (one entry per conv with unseen agent/human
@@ -5086,7 +5122,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5086
5122
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5087
5123
  for (const i of this.drawerConversations) {
5088
5124
  if (!i._unread) continue;
5089
- const r = Ce(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5125
+ const r = Se(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5090
5126
  t.push({
5091
5127
  convId: i.id,
5092
5128
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5423,9 +5459,9 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5423
5459
  }
5424
5460
  },
5425
5461
  async mounted() {
5426
- if (typeof document < "u" && !document.getElementById(Te)) {
5462
+ if (typeof document < "u" && !document.getElementById(Oe)) {
5427
5463
  const e = document.createElement("style");
5428
- e.id = Te, e.textContent = Je, document.head.appendChild(e);
5464
+ e.id = Oe, e.textContent = Je, document.head.appendChild(e);
5429
5465
  }
5430
5466
  await this.boot(), this.isEmbedded && this.store && await this.open();
5431
5467
  },
@@ -5447,14 +5483,14 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5447
5483
  return;
5448
5484
  }
5449
5485
  try {
5450
- this.transport = ye(
5486
+ this.transport = we(
5451
5487
  We({
5452
5488
  baseUrl: this.baseUrl,
5453
5489
  widgetId: this.widgetId,
5454
5490
  userId: this.userId,
5455
5491
  userHash: this.userHash
5456
5492
  })
5457
- ), this.store = ye(Xe(this.transport)), this.hydrateNotifPref(), await this.store.start(), this.setupLiveReveal();
5493
+ ), this.store = we(Xe(this.transport)), this.hydrateNotifPref(), await this.store.start(), this.setupLiveReveal();
5458
5494
  const t = (e = this.context) == null ? void 0 : e.customer;
5459
5495
  t && typeof t == "object" && await this.store.applyCustomer(t);
5460
5496
  } catch (t) {
@@ -5731,12 +5767,12 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5731
5767
  class: "wm-actionWait",
5732
5768
  role: "status",
5733
5769
  "aria-live": "polite"
5734
- }, Fa = { class: "wm-actionWait__lbl" }, ja = {
5770
+ }, Ua = { class: "wm-actionWait__lbl" }, Fa = {
5735
5771
  key: 2,
5736
5772
  class: "wm-attached"
5737
- }, Ua = ["aria-label", "onClick"];
5773
+ }, ja = ["aria-label", "onClick"];
5738
5774
  function Pa(e, t, n, i, r, s) {
5739
- const a = L("Launcher"), l = L("Header"), p = L("Onboarding"), C = L("MessageList"), k = L("ApprovalCard"), T = L("FormCard"), E = L("Feedback"), A = L("SuggestionChips"), H = L("Composer"), M = L("MoreMenu"), P = L("RenameDialog");
5775
+ const a = L("Launcher"), l = L("Header"), p = L("Onboarding"), C = L("MessageList"), k = L("ApprovalCard"), T = L("FormCard"), E = L("Feedback"), A = L("SuggestionChips"), q = L("Composer"), M = L("MoreMenu"), P = L("RenameDialog");
5740
5776
  return c(), u("div", {
5741
5777
  class: x(["wm-root", `wm-root--${n.displayMode}`])
5742
5778
  }, [
@@ -5750,7 +5786,7 @@ function Pa(e, t, n, i, r, s) {
5750
5786
  r.isOpen || s.isEmbedded ? (c(), u("section", {
5751
5787
  key: 1,
5752
5788
  class: x(["wm-panel", `wm-panel--${n.displayMode}`]),
5753
- style: K(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5789
+ style: z(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5754
5790
  role: "dialog",
5755
5791
  "aria-label": "Messenger"
5756
5792
  }, [
@@ -5781,7 +5817,7 @@ function Pa(e, t, n, i, r, s) {
5781
5817
  "aria-hidden": "true"
5782
5818
  }, null, -1))
5783
5819
  ])) : (c(), u(I, { key: 1 }, [
5784
- q(l, {
5820
+ $(l, {
5785
5821
  title: s.headerTitle,
5786
5822
  "team-members": s.teamMembers,
5787
5823
  "response-label": s.responseLabel,
@@ -5789,11 +5825,12 @@ function Pa(e, t, n, i, r, s) {
5789
5825
  "show-back": s.canBack,
5790
5826
  "show-close": !s.isEmbedded,
5791
5827
  "more-active": r.moreOpen,
5828
+ "agent-name": s.agentName,
5792
5829
  "agent-avatar-url": s.agentAvatarUrl,
5793
5830
  onBack: s.goHome,
5794
5831
  onMore: s.toggleMore,
5795
5832
  onClose: s.close
5796
- }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-avatar-url", "onBack", "onMore", "onClose"]),
5833
+ }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
5797
5834
  s.error ? (c(), u("div", Oa, [
5798
5835
  o("div", Ia, [
5799
5836
  t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
@@ -5817,7 +5854,7 @@ function Pa(e, t, n, i, r, s) {
5817
5854
  ])
5818
5855
  ])
5819
5856
  ])) : s.currentConv ? (c(), u(I, { key: 2 }, [
5820
- q(C, {
5857
+ $(C, {
5821
5858
  ref: "messageList",
5822
5859
  messages: s.displayedMessages,
5823
5860
  "streaming-active": s.streamingActive,
@@ -5838,12 +5875,16 @@ function Pa(e, t, n, i, r, s) {
5838
5875
  action: s.approvalTitle,
5839
5876
  detail: s.approvalDetail,
5840
5877
  callbacks: s.pendingApproval.callbacks,
5878
+ "agent-name": s.agentName,
5879
+ "agent-avatar-url": s.agentAvatarUrl,
5841
5880
  onCallback: s.onApprovalCallback
5842
- }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (c(), R(T, {
5881
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), R(T, {
5843
5882
  key: s.pendingForm.message && s.pendingForm.message.id,
5844
5883
  form: s.pendingForm.form,
5884
+ "agent-name": s.agentName,
5885
+ "agent-avatar-url": s.agentAvatarUrl,
5845
5886
  onSubmit: s.onFormSubmit
5846
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (c(), R(E, {
5887
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), R(E, {
5847
5888
  key: 2,
5848
5889
  busy: r.feedbackBusy,
5849
5890
  done: r.feedbackDone,
@@ -5859,10 +5900,10 @@ function Pa(e, t, n, i, r, s) {
5859
5900
  class: "wm-actionWait__spinner",
5860
5901
  "aria-hidden": "true"
5861
5902
  }, null, -1)),
5862
- o("span", Fa, v(s.t("action.inProgress", {
5903
+ o("span", Ua, v(s.t("action.inProgress", {
5863
5904
  name: s.actionInFlightName
5864
5905
  })), 1)
5865
- ])) : (c(), R(H, {
5906
+ ])) : (c(), R(q, {
5866
5907
  key: 2,
5867
5908
  ref: "composer",
5868
5909
  modelValue: r.draft,
@@ -5894,9 +5935,9 @@ function Pa(e, t, n, i, r, s) {
5894
5935
  onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
5895
5936
  onSubmit: s.onRenameSubmit
5896
5937
  }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
5897
- r.pendingAttachments.length ? (c(), u("div", ja, [
5898
- (c(!0), u(I, null, j(r.pendingAttachments, (N, $) => (c(), u("div", {
5899
- key: $,
5938
+ r.pendingAttachments.length ? (c(), u("div", Fa, [
5939
+ (c(!0), u(I, null, F(r.pendingAttachments, (N, H) => (c(), u("div", {
5940
+ key: H,
5900
5941
  class: "wm-attached__chip"
5901
5942
  }, [
5902
5943
  t[10] || (t[10] = o("svg", {
@@ -5916,7 +5957,7 @@ function Pa(e, t, n, i, r, s) {
5916
5957
  o("button", {
5917
5958
  type: "button",
5918
5959
  "aria-label": s.t("attachment.remove"),
5919
- onClick: (W) => r.pendingAttachments.splice($, 1)
5960
+ onClick: (W) => r.pendingAttachments.splice(H, 1)
5920
5961
  }, [...t[9] || (t[9] = [
5921
5962
  o("svg", {
5922
5963
  width: "10",
@@ -5931,7 +5972,7 @@ function Pa(e, t, n, i, r, s) {
5931
5972
  }, [
5932
5973
  o("path", { d: "M18 6L6 18M6 6l12 12" })
5933
5974
  ], -1)
5934
- ])], 8, Ua)
5975
+ ])], 8, ja)
5935
5976
  ]))), 128))
5936
5977
  ])) : b("", !0)
5937
5978
  ], 64)) : (c(), R(p, {
@@ -5964,7 +6005,7 @@ function Pa(e, t, n, i, r, s) {
5964
6005
  ], 6)) : b("", !0)
5965
6006
  ], 2);
5966
6007
  }
5967
- const Ha = /* @__PURE__ */ B(Ma, [["render", Pa], ["__scopeId", "data-v-7abab363"]]), qa = "0.4.5";
6008
+ const za = /* @__PURE__ */ B(Ma, [["render", Pa], ["__scopeId", "data-v-0bf94dbd"]]), qa = "0.4.7";
5968
6009
  export {
5969
6010
  le as AIAvatar,
5970
6011
  fe as AVATAR_COLORS,
@@ -5972,21 +6013,21 @@ export {
5972
6013
  ui as ApprovalCard,
5973
6014
  ds as ArtifactFormResponse,
5974
6015
  Cs as ArtifactInfoCard,
5975
- Hs as ArtifactRenderer,
5976
- Us as ArtifactTicket,
6016
+ zs as ArtifactRenderer,
6017
+ js as ArtifactTicket,
5977
6018
  er as AttachmentPreview,
5978
6019
  rr as Bubble,
5979
6020
  Xr as Composer,
5980
6021
  Ze as DEFAULT_BASE_URL,
5981
6022
  ie as DEFAULT_LANGUAGE,
5982
6023
  Ji as Feedback,
5983
- Ui as FormCard,
6024
+ ji as FormCard,
5984
6025
  cn as Header,
5985
6026
  Be as HumanAvatar,
5986
- jt as Launcher,
5987
- ve as MEDIA_RECORDER_SUPPORTED,
6027
+ Ft as Launcher,
6028
+ be as MEDIA_RECORDER_SUPPORTED,
5988
6029
  Lr as MessageList,
5989
- Ha as Messenger,
6030
+ za as Messenger,
5990
6031
  ha as MoreMenu,
5991
6032
  qn as Onboarding,
5992
6033
  me as SCREEN_CAPTURE_SUPPORTED,
@@ -5995,21 +6036,21 @@ export {
5995
6036
  Yt as TeamAvatars,
5996
6037
  lr as Typing,
5997
6038
  qa as VERSION,
5998
- xe as avatarColor,
5999
- Oe as avatarInitials,
6039
+ pe as avatarColor,
6040
+ ve as avatarInitials,
6000
6041
  Er as captureScreenshotFile,
6001
6042
  D as colors,
6002
6043
  Xe as createStore,
6003
- U as createTranslator,
6044
+ j as createTranslator,
6004
6045
  We as createTransport,
6005
6046
  oe as dateLocale,
6006
- Ha as default,
6047
+ za as default,
6007
6048
  Ie as formatTime,
6008
- $a as guessAttachmentKind,
6049
+ Ha as guessAttachmentKind,
6009
6050
  Br as pickRecorderMime,
6010
6051
  un as renderInlineMarkdown,
6011
6052
  mn as renderMarkdown,
6012
- pe as resolveLanguage,
6053
+ ye as resolveLanguage,
6013
6054
  Nr as startScreenRecording,
6014
6055
  Je as tokensCss,
6015
6056
  Qe as uuid,