@_solaris/messenger-widget 0.5.26 → 0.5.28

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 q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as V, Transition as Ue, withCtx as Pe, Fragment as I, renderList as j, withKeys as ue, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as He, vModelSelect as ze, markRaw as ke } from "vue";
1
+ import { reactive as De, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as I, createVNode as $, Transition as Le, withCtx as Be, Fragment as E, renderList as P, withKeys as ue, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as Pe, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as ke } from "vue";
2
2
  const qe = [
3
3
  "connected",
4
4
  "message",
@@ -98,7 +98,13 @@ function We(e) {
98
98
  ...t.token ? { token: t.token } : {},
99
99
  // Déclaration de mode du marchand (validée serveur contre
100
100
  // widgets.allow_unauthenticated). Le serveur 400 si mismatch.
101
- allowUnauthenticated: d.allowUnauthenticated === !0
101
+ allowUnauthenticated: d.allowUnauthenticated === !0,
102
+ // Data customer du marchand (`context.customer`). Stockée
103
+ // sur la session en `pending_customer` jusqu'à création
104
+ // du row au premier message. Permet aux templates
105
+ // `{{customer.*}}` du widget config d'être résolus dès
106
+ // le premier render.
107
+ ...d.customer && typeof d.customer == "object" ? { customer: d.customer } : {}
102
108
  })
103
109
  }
104
110
  );
@@ -132,7 +138,7 @@ function We(e) {
132
138
  }
133
139
  async function k() {
134
140
  try {
135
- const d = await E();
141
+ const d = await B();
136
142
  t.lastActivityAt = d.reduce((f, _) => {
137
143
  const y = _ == null ? void 0 : _.last_message_at;
138
144
  return y && (!f || y > f) ? y : f;
@@ -149,7 +155,7 @@ function We(e) {
149
155
  const f = await a("PATCH", "/customers/me", d);
150
156
  return (f == null ? void 0 : f.customer) ?? null;
151
157
  }
152
- async function E() {
158
+ async function B() {
153
159
  const d = await a("GET", "/conversations");
154
160
  return (d == null ? void 0 : d.conversations) ?? [];
155
161
  }
@@ -185,7 +191,7 @@ function We(e) {
185
191
  `/conversations/${encodeURIComponent(d)}/messages${y}`
186
192
  );
187
193
  }
188
- async function P(d, f) {
194
+ async function D(d, f) {
189
195
  se();
190
196
  const _ = {
191
197
  client_msg_id: f.client_msg_id,
@@ -236,7 +242,7 @@ function We(e) {
236
242
  const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
237
243
  return `${t.baseUrl}${fe}/stream?${d}`;
238
244
  }
239
- function $() {
245
+ function V() {
240
246
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
241
247
  try {
242
248
  const d = new EventSource(te(), { withCredentials: !0 });
@@ -262,16 +268,16 @@ function We(e) {
262
268
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
263
269
  }
264
270
  function se() {
265
- clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
271
+ clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
266
272
  t.panelOpen || Y();
267
273
  }, Ve));
268
274
  }
269
275
  function ce(d) {
270
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), $()) : se();
276
+ t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
271
277
  }
272
278
  async function me() {
273
279
  try {
274
- const d = await E(), f = d.reduce((y, C) => {
280
+ const d = await B(), f = d.reduce((y, C) => {
275
281
  const S = C == null ? void 0 : C.last_message_at;
276
282
  return S && (!y || S > y) ? S : y;
277
283
  }, null);
@@ -296,7 +302,7 @@ function We(e) {
296
302
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
297
303
  return;
298
304
  }
299
- r("idle"), de(), t.panelOpen && $();
305
+ r("idle"), de(), t.panelOpen && V();
300
306
  }
301
307
  }
302
308
  function g() {
@@ -313,13 +319,13 @@ function We(e) {
313
319
  // REST
314
320
  getCustomer: w,
315
321
  patchCustomer: T,
316
- listConversations: E,
322
+ listConversations: B,
317
323
  createConversation: A,
318
324
  getConversation: H,
319
325
  patchConversation: M,
320
326
  markConversationRead: F,
321
327
  listMessages: N,
322
- postMessage: P,
328
+ postMessage: D,
323
329
  postCallback: G,
324
330
  uploadAttachment: Z,
325
331
  signAttachment: ee,
@@ -348,7 +354,7 @@ function Je() {
348
354
  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("");
349
355
  }
350
356
  function Qe(e) {
351
- const t = Fe({
357
+ const t = De({
352
358
  ready: !1,
353
359
  error: null,
354
360
  config: null,
@@ -386,7 +392,7 @@ function Qe(e) {
386
392
  ), n.push(
387
393
  e.on("message", (h) => {
388
394
  const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.message;
389
- !m || !(g != null && g.id) || ($(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
395
+ !m || !(g != null && g.id) || (V(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
390
396
  })
391
397
  ), n.push(
392
398
  e.on("message_stream", (h) => {
@@ -525,7 +531,7 @@ function Qe(e) {
525
531
  const g = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
526
532
  d !== -1 && (t.conversations[d] = g);
527
533
  }
528
- async function E(h) {
534
+ async function B(h) {
529
535
  if (!h) return [];
530
536
  const m = t.messagesByConv[h] || [];
531
537
  let g = "";
@@ -543,7 +549,7 @@ function Qe(e) {
543
549
  const C = [];
544
550
  for (const S of f) {
545
551
  const L = (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);
546
- $(h, S), L || C.push(S);
552
+ V(h, S), L || C.push(S);
547
553
  }
548
554
  return C;
549
555
  } catch (d) {
@@ -582,7 +588,7 @@ function Qe(e) {
582
588
  ..._ ? { payload: { type: "content", attachments: g } } : {},
583
589
  ...d && typeof d == "object" ? { metadata: d } : {}
584
590
  };
585
- $(h, S);
591
+ V(h, S);
586
592
  try {
587
593
  await e.postMessage(h, {
588
594
  client_msg_id: y,
@@ -626,7 +632,7 @@ function Qe(e) {
626
632
  }
627
633
  return null;
628
634
  }
629
- async function P(h, { rating: m, comment: g } = {}) {
635
+ async function D(h, { rating: m, comment: g } = {}) {
630
636
  const d = t.conversations.find((y) => y.id === h), _ = {
631
637
  ...(d == null ? void 0 : d.metadata) || {},
632
638
  feedback: {
@@ -686,15 +692,15 @@ function Qe(e) {
686
692
  if (L && typeof L == "object" && typeof L.label == "string") {
687
693
  const x = L.label.trim();
688
694
  if (!x) return null;
689
- const Ne = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
690
- return { label: x, kind: Ne };
695
+ const Ue = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
696
+ return { label: x, kind: Ue };
691
697
  }
692
698
  return null;
693
699
  }).filter(Boolean).slice(0, 4) : [];
694
700
  }
695
701
  return [];
696
702
  }
697
- function $(h, m) {
703
+ function V(h, m) {
698
704
  var _;
699
705
  const g = t.messagesByConv[h] || [];
700
706
  let d = -1;
@@ -757,13 +763,13 @@ function Qe(e) {
757
763
  createConversation: a,
758
764
  openConversation: p,
759
765
  loadMore: k,
760
- fetchSinceLast: E,
766
+ fetchSinceLast: B,
761
767
  patchConversation: T,
762
768
  markConversationRead: A,
763
769
  send: H,
764
770
  clickCallback: M,
765
771
  signAttachment: N,
766
- submitFeedback: P,
772
+ submitFeedback: D,
767
773
  getPendingApproval: G,
768
774
  getActionInFlight: ee,
769
775
  getLatestSuggestions: te,
@@ -802,7 +808,7 @@ function ve(e = "") {
802
808
  function ye(e = "") {
803
809
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
804
810
  }
805
- function Le(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
811
+ function Ee(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
806
812
  return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
807
813
  }
808
814
  const Xe = `
@@ -916,6 +922,7 @@ Je réponds en quelques secondes.`,
916
922
  "messageList.approvalRequestSent": "Demande d'approbation envoyée",
917
923
  "messageList.conversationUpdate": "Mise à jour de la conversation",
918
924
  "messageList.anAgent": "Un agent",
925
+ "messageList.scrollToBottom": "Aller en bas",
919
926
  // ── System events ────────────────────────────────────────────────
920
927
  "system.transferredToHuman": "Conversation transférée à un humain",
921
928
  "system.assigned": "{name} a rejoint la conversation",
@@ -1036,6 +1043,7 @@ I reply within seconds.`,
1036
1043
  "messageList.approvalRequestSent": "Approval request sent",
1037
1044
  "messageList.conversationUpdate": "Conversation update",
1038
1045
  "messageList.anAgent": "An agent",
1046
+ "messageList.scrollToBottom": "Scroll to bottom",
1039
1047
  // ── System events ────────────────────────────────────────────────
1040
1048
  "system.transferredToHuman": "Conversation transferred to a human",
1041
1049
  "system.assigned": "{name} joined the conversation",
@@ -1101,7 +1109,7 @@ function we(e) {
1101
1109
  function oe(e) {
1102
1110
  return Ce[we(e)] || Ce[ie];
1103
1111
  }
1104
- function D(e) {
1112
+ function j(e) {
1105
1113
  const t = we(e), n = _e[t] || _e[ie], i = _e[ie];
1106
1114
  return function(s, a) {
1107
1115
  let l = n[s];
@@ -1116,17 +1124,17 @@ function Ae(e, t) {
1116
1124
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1117
1125
  return (n == null ? void 0 : n.label) || t;
1118
1126
  }
1119
- function Ee(e, t, n) {
1127
+ function Ie(e, t, n) {
1120
1128
  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));
1121
1129
  }
1122
- function tt(e, t, n = D()) {
1130
+ function tt(e, t, n = j()) {
1123
1131
  if (!e || !t) return "";
1124
1132
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1125
1133
  for (const s of i) {
1126
1134
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1127
1135
  const a = t[s.key];
1128
1136
  if (a == null || a === "") continue;
1129
- const l = Ee(s, a, n);
1137
+ const l = Ie(s, a, n);
1130
1138
  l && r.push(`${s.label} :
1131
1139
  ${l}`);
1132
1140
  }
@@ -1134,13 +1142,13 @@ ${l}`);
1134
1142
 
1135
1143
  `);
1136
1144
  }
1137
- function nt(e, t, n = D()) {
1145
+ function nt(e, t, n = j()) {
1138
1146
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1139
1147
  for (const s of r) {
1140
1148
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1141
1149
  const a = t == null ? void 0 : t[s.key];
1142
1150
  if (a == null || a === "") continue;
1143
- const l = Ee(s, a, n);
1151
+ const l = Ie(s, a, n);
1144
1152
  if (!l) continue;
1145
1153
  const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1146
1154
  `));
@@ -1204,7 +1212,7 @@ function it(e, t, n, i) {
1204
1212
  return r.join(`
1205
1213
  `);
1206
1214
  }
1207
- function at(e, t, n = D(), i) {
1215
+ function at(e, t, n = j(), i) {
1208
1216
  if (!e) return;
1209
1217
  const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1210
1218
  try {
@@ -1629,7 +1637,7 @@ function pt(e) {
1629
1637
  }
1630
1638
  return null;
1631
1639
  }
1632
- const B = (e, t) => {
1640
+ const R = (e, t) => {
1633
1641
  const n = e.__vccOpts || e;
1634
1642
  for (const [i, r] of t)
1635
1643
  n[i] = r;
@@ -1675,13 +1683,13 @@ function wt(e, t, n, i, r, s) {
1675
1683
  }, v(s.initials), 5))
1676
1684
  ], 6);
1677
1685
  }
1678
- const Ie = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1686
+ const Re = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1679
1687
  name: "WmLauncher",
1680
- components: { HumanAvatar: Ie },
1688
+ components: { HumanAvatar: Re },
1681
1689
  inject: {
1682
1690
  // Translator shared by the Messenger shell; French fallback when
1683
1691
  // the component is used standalone.
1684
- t: { default: () => D() }
1692
+ t: { default: () => j() }
1685
1693
  },
1686
1694
  props: {
1687
1695
  // Nombre de conversations non lues — pilote la pastille.
@@ -1701,9 +1709,9 @@ const Ie = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
1701
1709
  return this.peeks.slice(0, bt).reverse();
1702
1710
  }
1703
1711
  }
1704
- }, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, It = ["onClick"], Rt = ["aria-label"], Bt = ["aria-label"];
1712
+ }, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Et = ["onClick"], It = ["aria-label"], Rt = ["aria-label"];
1705
1713
  function Nt(e, t, n, i, r, s) {
1706
- const a = R("HumanAvatar");
1714
+ const a = I("HumanAvatar");
1707
1715
  return c(), u("div", {
1708
1716
  class: "wm-launcherWrap",
1709
1717
  onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
@@ -1711,13 +1719,13 @@ function Nt(e, t, n, i, r, s) {
1711
1719
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1712
1720
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1713
1721
  }, [
1714
- V(Ue, { name: "wm-peek" }, {
1715
- default: Pe(() => [
1722
+ $(Le, { name: "wm-peek" }, {
1723
+ default: Be(() => [
1716
1724
  s.visiblePeeks.length ? (c(), u("div", {
1717
1725
  key: 0,
1718
1726
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1719
1727
  }, [
1720
- (c(!0), u(I, null, j(s.visiblePeeks, (l, p) => (c(), u("div", {
1728
+ (c(!0), u(E, null, P(s.visiblePeeks, (l, p) => (c(), u("div", {
1721
1729
  key: l.convId,
1722
1730
  class: "wm-peek",
1723
1731
  style: q({
@@ -1756,7 +1764,7 @@ function Nt(e, t, n, i, r, s) {
1756
1764
  ], -1)
1757
1765
  ])], 8, At),
1758
1766
  o("div", St, [
1759
- V(a, {
1767
+ $(a, {
1760
1768
  name: l.senderName,
1761
1769
  "avatar-url": l.senderAvatarUrl,
1762
1770
  size: 34
@@ -1772,13 +1780,13 @@ function Nt(e, t, n, i, r, s) {
1772
1780
  o("span", Ot, v(l.senderName || s.t("common.agent")), 1),
1773
1781
  o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1774
1782
  ]),
1775
- o("p", Et, v(l.preview), 1)
1783
+ o("p", Bt, v(l.preview), 1)
1776
1784
  ]),
1777
1785
  o("button", {
1778
1786
  type: "button",
1779
1787
  class: "wm-peek__open",
1780
1788
  onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1781
- }, v(s.t("common.open")), 9, It)
1789
+ }, v(s.t("common.open")), 9, Et)
1782
1790
  ], 44, Ct))), 128))
1783
1791
  ], 2)) : b("", !0)
1784
1792
  ]),
@@ -1811,11 +1819,11 @@ function Nt(e, t, n, i, r, s) {
1811
1819
  }) : s.t("launcher.unreadConversationsOne", {
1812
1820
  count: n.unreadCount
1813
1821
  })
1814
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : b("", !0)
1815
- ], 8, Rt)
1822
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Rt)) : b("", !0)
1823
+ ], 8, It)
1816
1824
  ], 32);
1817
1825
  }
1818
- const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1"]]), Ut = {
1826
+ const Ft = /* @__PURE__ */ R(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1"]]), Ut = {
1819
1827
  name: "WmAIAvatar",
1820
1828
  props: {
1821
1829
  size: { type: Number, default: 26 },
@@ -1844,10 +1852,10 @@ const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1
1844
1852
  return ve(this.name);
1845
1853
  }
1846
1854
  }
1847
- }, Pt = {
1855
+ }, Dt = {
1848
1856
  key: 0,
1849
1857
  class: "wm-aiav__pulse"
1850
- }, jt = ["src", "alt"], Dt = ["width", "height"];
1858
+ }, Pt = ["src", "alt"], jt = ["width", "height"];
1851
1859
  function Ht(e, t, n, i, r, s) {
1852
1860
  return c(), u("div", {
1853
1861
  class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
@@ -1857,7 +1865,7 @@ function Ht(e, t, n, i, r, s) {
1857
1865
  "--wm-avr": n.size * 0.32 + "px"
1858
1866
  })
1859
1867
  }, [
1860
- n.pulse ? (c(), u("div", Pt)) : b("", !0),
1868
+ n.pulse ? (c(), u("div", Dt)) : b("", !0),
1861
1869
  o("div", {
1862
1870
  class: O(["wm-aiav__inner", {
1863
1871
  "wm-aiav__inner--glow": n.pulse,
@@ -1872,7 +1880,7 @@ function Ht(e, t, n, i, r, s) {
1872
1880
  key: 0,
1873
1881
  src: n.imageUrl,
1874
1882
  alt: n.name || ""
1875
- }, null, 8, jt)) : s.initials ? (c(), u("span", {
1883
+ }, null, 8, Pt)) : s.initials ? (c(), u("span", {
1876
1884
  key: 1,
1877
1885
  style: q({ fontSize: n.size * 0.36 + "px" })
1878
1886
  }, v(s.initials), 5)) : (c(), u("svg", {
@@ -1902,11 +1910,11 @@ function Ht(e, t, n, i, r, s) {
1902
1910
  fill: "white",
1903
1911
  opacity: "0.38"
1904
1912
  }, null, -1)
1905
- ])], 8, Dt))
1913
+ ])], 8, jt))
1906
1914
  ], 6)
1907
1915
  ], 6);
1908
1916
  }
1909
- const le = /* @__PURE__ */ B(Ut, [["render", Ht], ["__scopeId", "data-v-6f7f685d"]]), zt = {
1917
+ const le = /* @__PURE__ */ R(Ut, [["render", Ht], ["__scopeId", "data-v-6f7f685d"]]), zt = {
1910
1918
  name: "WmTeamAvatars",
1911
1919
  props: {
1912
1920
  members: { type: Array, default: () => [] },
@@ -1941,7 +1949,7 @@ function Wt(e, t, n, i, r, s) {
1941
1949
  class: "wm-team__stack",
1942
1950
  style: q({ width: s.stackWidth + "px" })
1943
1951
  }, [
1944
- (c(!0), u(I, null, j(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1952
+ (c(!0), u(E, null, P(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1945
1953
  key: l,
1946
1954
  class: "wm-team__pill",
1947
1955
  style: q({
@@ -1960,13 +1968,13 @@ function Wt(e, t, n, i, r, s) {
1960
1968
  n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
1961
1969
  ])) : b("", !0);
1962
1970
  }
1963
- const Gt = /* @__PURE__ */ B(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1971
+ const Gt = /* @__PURE__ */ R(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1964
1972
  name: "WmHeader",
1965
1973
  components: { AIAvatar: le, TeamAvatars: Gt },
1966
1974
  inject: {
1967
1975
  // Translator shared by the Messenger shell. Falls back to a French
1968
1976
  // translator when the component is used standalone (no provider).
1969
- t: { default: () => D() }
1977
+ t: { default: () => j() }
1970
1978
  },
1971
1979
  props: {
1972
1980
  title: { type: String, default: "Nouvelle conversation" },
@@ -2007,7 +2015,7 @@ const Gt = /* @__PURE__ */ B(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
2007
2015
  class: "wm-header__fill"
2008
2016
  }, sn = { class: "wm-header__actions" }, rn = ["aria-label", "title"], an = ["aria-label", "title"];
2009
2017
  function on(e, t, n, i, r, s) {
2010
- const a = R("AIAvatar"), l = R("TeamAvatars");
2018
+ const a = I("AIAvatar"), l = I("TeamAvatars");
2011
2019
  return c(), u("div", Jt, [
2012
2020
  n.showBack ? (c(), u("button", {
2013
2021
  key: 0,
@@ -2030,9 +2038,9 @@ function on(e, t, n, i, r, s) {
2030
2038
  o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2031
2039
  ], -1)
2032
2040
  ])], 8, Qt)) : (c(), u("div", Xt)),
2033
- n.showIdentity ? (c(), u(I, { key: 2 }, [
2041
+ n.showIdentity ? (c(), u(E, { key: 2 }, [
2034
2042
  o("div", Zt, [
2035
- V(a, {
2043
+ $(a, {
2036
2044
  size: 30,
2037
2045
  name: n.agentName,
2038
2046
  "image-url": n.agentAvatarUrl
@@ -2105,8 +2113,8 @@ function on(e, t, n, i, r, s) {
2105
2113
  ])
2106
2114
  ]);
2107
2115
  }
2108
- const ln = /* @__PURE__ */ B(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
2109
- function Re(e) {
2116
+ const ln = /* @__PURE__ */ R(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
2117
+ function Ne(e) {
2110
2118
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2111
2119
  }
2112
2120
  function cn(e) {
@@ -2124,11 +2132,11 @@ function re(e) {
2124
2132
  function dn(e) {
2125
2133
  if (!e) return "";
2126
2134
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2127
- return re(Re(t));
2135
+ return re(Ne(t));
2128
2136
  }
2129
2137
  function un(e) {
2130
2138
  if (!e) return "";
2131
- const t = Re(e).split(`
2139
+ const t = Ne(e).split(`
2132
2140
  `), n = [];
2133
2141
  let i = 0;
2134
2142
  for (; i < t.length; ) {
@@ -2167,10 +2175,10 @@ function un(e) {
2167
2175
  if (!A) break;
2168
2176
  w.push(A[1]), i++;
2169
2177
  }
2170
- const T = w.map((A) => `<li>${re(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
2178
+ const T = w.map((A) => `<li>${re(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
2171
2179
  n.push({
2172
2180
  type: "block",
2173
- html: `<ol class="wm-md-ol"${E}>${T}</ol>`
2181
+ html: `<ol class="wm-md-ol"${B}>${T}</ol>`
2174
2182
  });
2175
2183
  continue;
2176
2184
  }
@@ -2207,7 +2215,7 @@ const Te = {
2207
2215
  inject: {
2208
2216
  // Translator + resolved-language getter shared by the Messenger
2209
2217
  // shell. Fall back to French wording when used standalone.
2210
- t: { default: () => D() },
2218
+ t: { default: () => j() },
2211
2219
  wmLocale: { default: () => () => "fr" }
2212
2220
  },
2213
2221
  props: {
@@ -2289,7 +2297,7 @@ const Te = {
2289
2297
  }, On = {
2290
2298
  key: 1,
2291
2299
  class: "wm-onb__section"
2292
- }, Ln = { class: "wm-onb__section-title" }, En = { class: "wm-onb__search" }, In = ["placeholder", "aria-label"], Rn = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Un = { class: "wm-onb__thread-title" }, Pn = ["innerHTML"], jn = { class: "wm-onb__thread-meta" }, Dn = {
2300
+ }, Ln = { class: "wm-onb__section-title" }, Bn = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], In = { class: "wm-onb__list" }, Rn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Un = { class: "wm-onb__thread-title" }, Dn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, jn = {
2293
2301
  key: 0,
2294
2302
  class: "wm-onb__thread-time"
2295
2303
  }, Hn = {
@@ -2297,7 +2305,7 @@ const Te = {
2297
2305
  class: "wm-onb__empty"
2298
2306
  };
2299
2307
  function zn(e, t, n, i, r, s) {
2300
- const a = R("AIAvatar");
2308
+ const a = I("AIAvatar");
2301
2309
  return c(), u("div", mn, [
2302
2310
  o("div", fn, [
2303
2311
  t[2] || (t[2] = o("svg", {
@@ -2334,7 +2342,7 @@ function zn(e, t, n, i, r, s) {
2334
2342
  opacity: "0.65"
2335
2343
  })
2336
2344
  ], -1)),
2337
- V(a, {
2345
+ $(a, {
2338
2346
  size: 52,
2339
2347
  "image-url": n.defaultIconUrl
2340
2348
  }, null, 8, ["image-url"]),
@@ -2373,7 +2381,7 @@ function zn(e, t, n, i, r, s) {
2373
2381
  o("div", {
2374
2382
  class: O(s.quickLinksLayout)
2375
2383
  }, [
2376
- (c(!0), u(I, null, j(n.quickLinks, (l, p) => (c(), u("button", {
2384
+ (c(!0), u(E, null, P(n.quickLinks, (l, p) => (c(), u("button", {
2377
2385
  key: p,
2378
2386
  type: "button",
2379
2387
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
@@ -2395,7 +2403,7 @@ function zn(e, t, n, i, r, s) {
2395
2403
  ])) : b("", !0),
2396
2404
  n.openThreads.length ? (c(), u("div", On, [
2397
2405
  o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
2398
- o("div", En, [
2406
+ o("div", Bn, [
2399
2407
  t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
2400
2408
  o("svg", {
2401
2409
  width: "12",
@@ -2416,12 +2424,12 @@ function zn(e, t, n, i, r, s) {
2416
2424
  type: "text",
2417
2425
  placeholder: s.t("onboarding.search"),
2418
2426
  "aria-label": s.t("onboarding.search")
2419
- }, null, 8, In), [
2427
+ }, null, 8, En), [
2420
2428
  [X, r.query]
2421
2429
  ])
2422
2430
  ]),
2423
- o("div", Rn, [
2424
- (c(!0), u(I, null, j(s.filteredThreads, (l) => (c(), u("button", {
2431
+ o("div", In, [
2432
+ (c(!0), u(E, null, P(s.filteredThreads, (l) => (c(), u("button", {
2425
2433
  key: l.id,
2426
2434
  type: "button",
2427
2435
  class: "wm-onb__thread",
@@ -2454,10 +2462,10 @@ function zn(e, t, n, i, r, s) {
2454
2462
  o("span", {
2455
2463
  class: "wm-onb__thread-preview",
2456
2464
  innerHTML: s.renderPreview(l.preview)
2457
- }, null, 8, Pn)
2465
+ }, null, 8, Dn)
2458
2466
  ]),
2459
- o("span", jn, [
2460
- s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : b("", !0),
2467
+ o("span", Pn, [
2468
+ s.formatTs(l._ts) ? (c(), u("span", jn, v(s.formatTs(l._ts)), 1)) : b("", !0),
2461
2469
  t[6] || (t[6] = o("svg", {
2462
2470
  width: "14",
2463
2471
  height: "14",
@@ -2473,13 +2481,13 @@ function zn(e, t, n, i, r, s) {
2473
2481
  o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2474
2482
  ], -1))
2475
2483
  ])
2476
- ], 8, Bn))), 128)),
2484
+ ], 8, Rn))), 128)),
2477
2485
  s.filteredThreads.length ? b("", !0) : (c(), u("div", Hn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2478
2486
  ])
2479
2487
  ])) : b("", !0)
2480
2488
  ]);
2481
2489
  }
2482
- const qn = /* @__PURE__ */ B(hn, [["render", zn], ["__scopeId", "data-v-28c0780b"]]);
2490
+ const qn = /* @__PURE__ */ R(hn, [["render", zn], ["__scopeId", "data-v-a85aae63"]]);
2483
2491
  function $n(e) {
2484
2492
  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();
2485
2493
  }
@@ -2574,7 +2582,7 @@ function es(e, t, n, i, r, s) {
2574
2582
  ]),
2575
2583
  o("span", Qn, [
2576
2584
  o("span", Xn, v(n.label), 1),
2577
- s.detailText ? (c(), u(I, { key: 0 }, [
2585
+ s.detailText ? (c(), u(E, { key: 0 }, [
2578
2586
  t[4] || (t[4] = o("span", {
2579
2587
  class: "wm-result__sep",
2580
2588
  "aria-hidden": "true"
@@ -2584,12 +2592,12 @@ function es(e, t, n, i, r, s) {
2584
2592
  ])
2585
2593
  ], 2);
2586
2594
  }
2587
- const ts = /* @__PURE__ */ B(Vn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
2595
+ const ts = /* @__PURE__ */ R(Vn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
2588
2596
  name: "WmArtifactFormResponse",
2589
2597
  inject: {
2590
2598
  // Translator shared by the Messenger shell; French fallback when
2591
2599
  // the component is used standalone.
2592
- t: { default: () => D() }
2600
+ t: { default: () => j() }
2593
2601
  },
2594
2602
  props: {
2595
2603
  data: { type: Object, required: !0 }
@@ -2623,7 +2631,7 @@ function cs(e, t, n, i, r, s) {
2623
2631
  ])
2624
2632
  ]),
2625
2633
  o("div", os, [
2626
- (c(!0), u(I, null, j(s.fields, (a, l) => (c(), u("div", {
2634
+ (c(!0), u(E, null, P(s.fields, (a, l) => (c(), u("div", {
2627
2635
  key: l,
2628
2636
  class: "wm-art__field"
2629
2637
  }, [
@@ -2638,7 +2646,7 @@ function cs(e, t, n, i, r, s) {
2638
2646
  ])
2639
2647
  ]);
2640
2648
  }
2641
- const ds = /* @__PURE__ */ B(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
2649
+ const ds = /* @__PURE__ */ R(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
2642
2650
  name: "WmArtifactInfoCard",
2643
2651
  props: {
2644
2652
  data: { type: Object, required: !0 }
@@ -2690,7 +2698,7 @@ function ks(e, t, n, i, r, s) {
2690
2698
  ]),
2691
2699
  s.hasBody ? (c(), u("div", ys, [
2692
2700
  n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : b("", !0),
2693
- s.fields.length ? (c(!0), u(I, { key: 1 }, j(s.fields, (a, l) => (c(), u("div", {
2701
+ s.fields.length ? (c(!0), u(E, { key: 1 }, P(s.fields, (a, l) => (c(), u("div", {
2694
2702
  key: l,
2695
2703
  class: "wm-art__field"
2696
2704
  }, [
@@ -2705,7 +2713,7 @@ function ks(e, t, n, i, r, s) {
2705
2713
  ])) : b("", !0)
2706
2714
  ]);
2707
2715
  }
2708
- const Cs = /* @__PURE__ */ B(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
2716
+ const Cs = /* @__PURE__ */ R(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
2709
2717
  function As(e, t, n) {
2710
2718
  if (!e) return "";
2711
2719
  const i = new Date(e);
@@ -2725,7 +2733,7 @@ const Ss = {
2725
2733
  inject: {
2726
2734
  // Translator + resolved-language getter shared by the Messenger
2727
2735
  // shell. Fall back to French wording when used standalone.
2728
- t: { default: () => D() },
2736
+ t: { default: () => j() },
2729
2737
  wmLocale: { default: () => () => "fr" }
2730
2738
  },
2731
2739
  props: {
@@ -2766,13 +2774,13 @@ const Ss = {
2766
2774
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2767
2775
  }
2768
2776
  }
2769
- }, Ms = { class: "wm-art wm-art--ticket" }, Ts = { class: "wm-art__head wm-tk__head" }, xs = { class: "wm-art__title wm-tk__title" }, Os = { class: "wm-tk__sub" }, Ls = { class: "wm-tk__ref" }, Es = {
2777
+ }, Ms = { class: "wm-art wm-art--ticket" }, Ts = { class: "wm-art__head wm-tk__head" }, xs = { class: "wm-art__title wm-tk__title" }, Os = { class: "wm-tk__sub" }, Ls = { class: "wm-tk__ref" }, Bs = {
2770
2778
  key: 0,
2771
2779
  class: "wm-tk__text"
2772
- }, Is = {
2780
+ }, Es = {
2773
2781
  key: 0,
2774
2782
  class: "wm-art__body"
2775
- }, Rs = { class: "wm-art__fieldLabel" }, Bs = ["data-level"], Ns = {
2783
+ }, Is = { class: "wm-art__fieldLabel" }, Rs = ["data-level"], Ns = {
2776
2784
  key: 1,
2777
2785
  class: "wm-tk__date",
2778
2786
  width: "12",
@@ -2824,14 +2832,14 @@ function Us(e, t, n, i, r, s) {
2824
2832
  pe(" " + v(n.data.status.label), 1)
2825
2833
  ], 2)
2826
2834
  ]),
2827
- n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : b("", !0)
2835
+ n.data.body ? (c(), u("div", Bs, v(n.data.body), 1)) : b("", !0)
2828
2836
  ]),
2829
- s.fields.length ? (c(), u("div", Is, [
2830
- (c(!0), u(I, null, j(s.fields, (a, l) => (c(), u("div", {
2837
+ s.fields.length ? (c(), u("div", Es, [
2838
+ (c(!0), u(E, null, P(s.fields, (a, l) => (c(), u("div", {
2831
2839
  key: l,
2832
2840
  class: "wm-art__field"
2833
2841
  }, [
2834
- o("div", Rs, v(a.label), 1),
2842
+ o("div", Is, v(a.label), 1),
2835
2843
  o("div", {
2836
2844
  class: O([
2837
2845
  "wm-art__fieldValue",
@@ -2868,7 +2876,7 @@ function Us(e, t, n, i, r, s) {
2868
2876
  height: "9",
2869
2877
  rx: "0.5"
2870
2878
  }, null, -1)
2871
- ])], 8, Bs)) : s.isDate(a.label) ? (c(), u("svg", Ns, [...t[3] || (t[3] = [
2879
+ ])], 8, Rs)) : s.isDate(a.label) ? (c(), u("svg", Ns, [...t[3] || (t[3] = [
2872
2880
  o("rect", {
2873
2881
  x: "3",
2874
2882
  y: "4",
@@ -2907,11 +2915,11 @@ function Us(e, t, n, i, r, s) {
2907
2915
  ])) : b("", !0)
2908
2916
  ]);
2909
2917
  }
2910
- const Ps = /* @__PURE__ */ B(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), js = {
2918
+ const Ds = /* @__PURE__ */ R(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2911
2919
  form_response: ds,
2912
2920
  info_card: Cs,
2913
- ticket: Ps
2914
- }, Ds = {
2921
+ ticket: Ds
2922
+ }, js = {
2915
2923
  name: "WmArtifactRenderer",
2916
2924
  props: {
2917
2925
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -2922,23 +2930,23 @@ const Ps = /* @__PURE__ */ B(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914
2922
2930
  component() {
2923
2931
  var t;
2924
2932
  const e = (t = this.artifact) == null ? void 0 : t.kind;
2925
- return e && js[e] || null;
2933
+ return e && Ps[e] || null;
2926
2934
  }
2927
2935
  }
2928
2936
  };
2929
2937
  function Hs(e, t, n, i, r, s) {
2930
- return s.component ? (c(), U(je(s.component), {
2938
+ return s.component ? (c(), U(Pe(s.component), {
2931
2939
  key: 0,
2932
2940
  data: n.artifact.data
2933
2941
  }, null, 8, ["data"])) : b("", !0);
2934
2942
  }
2935
- const zs = /* @__PURE__ */ B(Ds, [["render", Hs]]), qs = {
2943
+ const zs = /* @__PURE__ */ R(js, [["render", Hs]]), qs = {
2936
2944
  name: "WmAttachmentPreview",
2937
2945
  inject: {
2938
2946
  signAttachmentFn: { default: null },
2939
2947
  // Translator shared by the Messenger shell; French fallback when
2940
2948
  // the component is used standalone.
2941
- t: { default: () => D() }
2949
+ t: { default: () => j() }
2942
2950
  },
2943
2951
  props: {
2944
2952
  attachment: { type: Object, required: !0 }
@@ -3067,7 +3075,7 @@ function Zs(e, t, n, i, r, s) {
3067
3075
  ], 8, Gs))
3068
3076
  ], 2);
3069
3077
  }
3070
- const er = /* @__PURE__ */ B(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62"]]), tr = {
3078
+ const er = /* @__PURE__ */ R(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62"]]), tr = {
3071
3079
  name: "WmBubble",
3072
3080
  props: {
3073
3081
  role: { type: String, default: "ai" },
@@ -3084,12 +3092,12 @@ function sr(e, t, n, i, r, s) {
3084
3092
  return c(), u("div", {
3085
3093
  class: O(["wm-bubble", "wm-bubble--" + n.role])
3086
3094
  }, [
3087
- De(e.$slots, "default", {}, () => [
3095
+ je(e.$slots, "default", {}, () => [
3088
3096
  o("span", { innerHTML: s.rendered }, null, 8, nr)
3089
3097
  ], !0)
3090
3098
  ], 2);
3091
3099
  }
3092
- const rr = /* @__PURE__ */ B(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
3100
+ const rr = /* @__PURE__ */ R(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
3093
3101
  function or(e, t, n, i, r, s) {
3094
3102
  return c(), u("div", ar, [...t[0] || (t[0] = [
3095
3103
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
@@ -3097,7 +3105,7 @@ function or(e, t, n, i, r, s) {
3097
3105
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3098
3106
  ])]);
3099
3107
  }
3100
- const lr = /* @__PURE__ */ B(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
3108
+ const lr = /* @__PURE__ */ R(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
3101
3109
  function Q(e) {
3102
3110
  return e ? e.client_msg_id || e.id : "";
3103
3111
  }
@@ -3112,7 +3120,7 @@ const cr = {
3112
3120
  name: "WmMessageList",
3113
3121
  components: {
3114
3122
  AIAvatar: le,
3115
- HumanAvatar: Ie,
3123
+ HumanAvatar: Re,
3116
3124
  Bubble: rr,
3117
3125
  Typing: lr,
3118
3126
  ActionResult: ts,
@@ -3122,7 +3130,7 @@ const cr = {
3122
3130
  inject: {
3123
3131
  // Translator + resolved-language getter shared by the Messenger
3124
3132
  // shell. Fall back to French wording when used standalone.
3125
- t: { default: () => D() },
3133
+ t: { default: () => j() },
3126
3134
  wmLocale: { default: () => () => "fr" }
3127
3135
  },
3128
3136
  props: {
@@ -3168,7 +3176,12 @@ const cr = {
3168
3176
  // par `cornersFor()` pour décider du rétractement des coins
3169
3177
  // intérieurs. Avant la première mesure, `cornersFor` retombe
3170
3178
  // sur la convention kind-based (`card` > `bubble`).
3171
- widthByKey: Object.freeze({})
3179
+ widthByKey: Object.freeze({}),
3180
+ // True dès que l'utilisateur a remonté l'historique au-delà du
3181
+ // seuil "pinned" — affiche un bouton flottant pour revenir en
3182
+ // bas. Recalculé sur chaque `onScroll` et après chaque restore
3183
+ // de position.
3184
+ showScrollDown: !1
3172
3185
  };
3173
3186
  },
3174
3187
  computed: {
@@ -3301,7 +3314,7 @@ const cr = {
3301
3314
  },
3302
3315
  onScroll() {
3303
3316
  const e = this.$refs.scrollEl;
3304
- e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <= ur && (this._pendingLoadMore = !0, this.$emit("load-more")));
3317
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= ur && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3305
3318
  },
3306
3319
  // Capture pre-patch scroll state and restore it on the next tick.
3307
3320
  //
@@ -3502,9 +3515,9 @@ const cr = {
3502
3515
  // doit garder son arrondi.
3503
3516
  cornersFor(e, t) {
3504
3517
  var Z, ee, te;
3505
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = 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 = ($, ne, Y) => $ != null && T != null ? $ + H >= T : ne === Y || ne === "card" && Y === "bubble";
3506
- let F = l, N = l, P = l, G = l;
3507
- return a ? (k && (N = p), (w || !s) && (P = p), k && M(E, k, i == null ? void 0 : i.top) && (F = p), w && M(A, w, i == null ? void 0 : i.bottom) && (G = p)) : (k && (F = p), (w || !s) && (G = p), k && M(E, k, i == null ? void 0 : i.top) && (N = p), w && M(A, w, i == null ? void 0 : i.bottom) && (P = p)), { tl: F, tr: N, br: P, bl: G };
3518
+ const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (V, ne, Y) => V != null && T != null ? V + H >= T : ne === Y || ne === "card" && Y === "bubble";
3519
+ let F = l, N = l, D = l, G = l;
3520
+ return a ? (k && (N = p), (w || !s) && (D = p), k && M(B, k, i == null ? void 0 : i.top) && (F = p), w && M(A, w, i == null ? void 0 : i.bottom) && (G = p)) : (k && (F = p), (w || !s) && (G = p), k && M(B, k, i == null ? void 0 : i.top) && (N = p), w && M(A, w, i == null ? void 0 : i.bottom) && (D = p)), { tl: F, tr: N, br: D, bl: G };
3508
3521
  },
3509
3522
  // Inline style emitting the four corner CSS variables. Set on
3510
3523
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3570,7 +3583,7 @@ const cr = {
3570
3583
  const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
3571
3584
  if (!(n != null && n.created_at)) return "";
3572
3585
  try {
3573
- return Le(
3586
+ return Ee(
3574
3587
  new Date(n.created_at),
3575
3588
  oe(this.wmLocale())
3576
3589
  );
@@ -3622,167 +3635,203 @@ const cr = {
3622
3635
  },
3623
3636
  scrollToBottom() {
3624
3637
  const e = this.$refs.scrollEl;
3625
- e && (e.scrollTop = e.scrollHeight);
3638
+ e && (e.scrollTop = e.scrollHeight), this.showScrollDown = !1;
3639
+ },
3640
+ // Variante "user-initiated" du bouton flottant : scroll fluide pour
3641
+ // que le geste se voit, contrairement aux restores automatiques qui
3642
+ // doivent être instantanés.
3643
+ scrollToBottomSmooth() {
3644
+ const e = this.$refs.scrollEl;
3645
+ e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
3626
3646
  }
3627
3647
  }
3628
- }, mr = {
3648
+ }, mr = { class: "wm-list__wrap" }, fr = {
3629
3649
  key: 0,
3630
3650
  class: "wm-list__loadMore",
3631
3651
  role: "status",
3632
3652
  "aria-live": "polite"
3633
- }, fr = { class: "wm-list__loadMore-lbl" }, gr = {
3653
+ }, gr = { class: "wm-list__loadMore-lbl" }, _r = {
3634
3654
  key: 1,
3635
3655
  class: "wm-list__historyEnd"
3636
- }, _r = {
3656
+ }, pr = {
3637
3657
  key: 2,
3638
3658
  class: "wm-list__sep"
3639
- }, pr = { class: "wm-list__sep-label" }, vr = {
3659
+ }, vr = { class: "wm-list__sep-label" }, yr = {
3640
3660
  key: 0,
3641
3661
  class: "wm-list__sep wm-list__sep--unread"
3642
- }, yr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, wr = {
3662
+ }, wr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, br = {
3643
3663
  key: 0,
3644
3664
  class: "wm-list__sysep"
3645
- }, br = { class: "wm-list__sysep-label" }, kr = ["data-row-key"], Cr = {
3665
+ }, kr = { class: "wm-list__sysep-label" }, Cr = ["data-row-key"], Ar = {
3646
3666
  key: 0,
3647
3667
  class: "wm-list__avatarSlot"
3648
- }, Ar = {
3668
+ }, Sr = {
3649
3669
  key: 5,
3650
3670
  class: "wm-list__body"
3651
- }, Sr = { key: 0 }, Mr = {
3671
+ }, Mr = { key: 0 }, Tr = {
3652
3672
  key: 1,
3653
3673
  "aria-hidden": "true"
3654
- }, Tr = { key: 2 }, xr = {
3674
+ }, xr = { key: 2 }, Or = {
3655
3675
  key: 3,
3656
3676
  class: "wm-list__row wm-list__row--ai fade-up"
3657
- }, Or = { class: "wm-list__avatarSlot" };
3658
- function Lr(e, t, n, i, r, s) {
3659
- const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), E = R("Typing");
3660
- return c(), u("div", {
3661
- ref: "scrollEl",
3662
- class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
3663
- onScrollPassive: t[0] || (t[0] = (...A) => s.onScroll && s.onScroll(...A))
3664
- }, [
3665
- n.loadingMore ? (c(), u("div", mr, [
3666
- t[1] || (t[1] = o("span", {
3667
- class: "wm-list__loadMore-spinner",
3668
- "aria-hidden": "true"
3669
- }, null, -1)),
3670
- o("span", fr, v(s.t("messageList.loadingHistory")), 1)
3671
- ])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3672
- n.dateLabel ? (c(), u("div", _r, [
3673
- t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
3674
- o("span", pr, v(n.dateLabel), 1),
3675
- t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
3676
- ])) : b("", !0),
3677
- (c(!0), u(I, null, j(s.groups, (A, H) => (c(), u(I, {
3678
- key: A.key
3677
+ }, Lr = { class: "wm-list__avatarSlot" }, Br = ["aria-label", "title"];
3678
+ function Er(e, t, n, i, r, s) {
3679
+ const a = I("AIAvatar"), l = I("HumanAvatar"), p = I("ActionResult"), k = I("ArtifactRenderer"), w = I("Bubble"), T = I("AttachmentPreview"), B = I("Typing");
3680
+ return c(), u("div", mr, [
3681
+ o("div", {
3682
+ ref: "scrollEl",
3683
+ class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
3684
+ onScrollPassive: t[0] || (t[0] = (...A) => s.onScroll && s.onScroll(...A))
3679
3685
  }, [
3680
- A.key === s.unreadGroupKey ? (c(), u("div", vr, [
3681
- t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3682
- o("span", yr, v(s.t("messageList.unread")), 1),
3683
- t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3686
+ n.loadingMore ? (c(), u("div", fr, [
3687
+ t[2] || (t[2] = o("span", {
3688
+ class: "wm-list__loadMore-spinner",
3689
+ "aria-hidden": "true"
3690
+ }, null, -1)),
3691
+ o("span", gr, v(s.t("messageList.loadingHistory")), 1)
3692
+ ])) : s.historyExhausted ? (c(), u("div", _r, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3693
+ n.dateLabel ? (c(), u("div", pr, [
3694
+ t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1)),
3695
+ o("span", vr, v(n.dateLabel), 1),
3696
+ t[4] || (t[4] = o("div", { class: "wm-list__line" }, null, -1))
3684
3697
  ])) : b("", !0),
3685
- A.role === "system" || A.items.length ? (c(), u("div", {
3686
- key: 1,
3687
- class: O(["wm-list__group", "wm-list__group--" + A.role])
3698
+ (c(!0), u(E, null, P(s.groups, (A, H) => (c(), u(E, {
3699
+ key: A.key
3688
3700
  }, [
3689
- A.role === "system" ? (c(), u("div", wr, [
3690
- t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3691
- o("span", br, v(A.systemLabel), 1),
3692
- t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3693
- ])) : (c(), u(I, { key: 1 }, [
3694
- (c(!0), u(I, null, j(A.items, (M, F) => (c(), u("div", {
3695
- key: `${s.messageKey(M.message)}-${M.partKey}`,
3696
- "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
3697
- class: O(["wm-list__row fade-up", [
3698
- "wm-list__row--" + A.role,
3699
- {
3700
- "is-pending": M.message._pending,
3701
- "is-failed": M.message._failed
3702
- }
3703
- ]]),
3704
- style: q(s.cornersStyle(A, F))
3705
- }, [
3706
- A.role !== "user" ? (c(), u("div", Cr, [
3707
- F === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
3708
- A.role === "ai" ? (c(), U(a, {
3701
+ A.key === s.unreadGroupKey ? (c(), u("div", yr, [
3702
+ t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3703
+ o("span", wr, v(s.t("messageList.unread")), 1),
3704
+ t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3705
+ ])) : b("", !0),
3706
+ A.role === "system" || A.items.length ? (c(), u("div", {
3707
+ key: 1,
3708
+ class: O(["wm-list__group", "wm-list__group--" + A.role])
3709
+ }, [
3710
+ A.role === "system" ? (c(), u("div", br, [
3711
+ t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3712
+ o("span", kr, v(A.systemLabel), 1),
3713
+ t[8] || (t[8] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3714
+ ])) : (c(), u(E, { key: 1 }, [
3715
+ (c(!0), u(E, null, P(A.items, (M, F) => (c(), u("div", {
3716
+ key: `${s.messageKey(M.message)}-${M.partKey}`,
3717
+ "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
3718
+ class: O(["wm-list__row fade-up", [
3719
+ "wm-list__row--" + A.role,
3720
+ {
3721
+ "is-pending": M.message._pending,
3722
+ "is-failed": M.message._failed
3723
+ }
3724
+ ]]),
3725
+ style: q(s.cornersStyle(A, F))
3726
+ }, [
3727
+ A.role !== "user" ? (c(), u("div", Ar, [
3728
+ F === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
3729
+ A.role === "ai" ? (c(), U(a, {
3730
+ key: 0,
3731
+ size: 26,
3732
+ tail: !0,
3733
+ name: n.aiAgentName,
3734
+ "image-url": n.aiAgentAvatarUrl
3735
+ }, null, 8, ["name", "image-url"])) : (c(), U(l, {
3736
+ key: 1,
3737
+ name: A.agentName,
3738
+ "avatar-url": A.agentAvatarUrl,
3739
+ size: 26,
3740
+ tail: !0
3741
+ }, null, 8, ["name", "avatar-url"]))
3742
+ ], 64)) : b("", !0)
3743
+ ])) : b("", !0),
3744
+ M.renderAs === "action" ? (c(), U(p, {
3745
+ key: 1,
3746
+ state: M.message.payload.state,
3747
+ label: s.actionLabel(M.message),
3748
+ detail: s.actionDetail(M.message)
3749
+ }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(p, {
3750
+ key: 2,
3751
+ state: "awaiting",
3752
+ label: s.t("messageList.approvalRequestSent"),
3753
+ detail: M.message.text_md || ""
3754
+ }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), U(k, {
3755
+ key: 3,
3756
+ artifact: s.actionArtifact(M.message)
3757
+ }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), U(k, {
3758
+ key: 4,
3759
+ artifact: s.artifactOf(M.message)
3760
+ }, null, 8, ["artifact"])) : (c(), u("div", Sr, [
3761
+ M.message.text_md ? (c(), U(w, {
3709
3762
  key: 0,
3710
- size: 26,
3711
- tail: !0,
3712
- name: n.aiAgentName,
3713
- "image-url": n.aiAgentAvatarUrl
3714
- }, null, 8, ["name", "image-url"])) : (c(), U(l, {
3763
+ role: A.role,
3764
+ text: M.message.text_md
3765
+ }, null, 8, ["role", "text"])) : b("", !0),
3766
+ s.attachmentsOf(M.message).length ? (c(), u("div", {
3715
3767
  key: 1,
3716
- name: A.agentName,
3717
- "avatar-url": A.agentAvatarUrl,
3718
- size: 26,
3719
- tail: !0
3720
- }, null, 8, ["name", "avatar-url"]))
3721
- ], 64)) : b("", !0)
3722
- ])) : b("", !0),
3723
- M.renderAs === "action" ? (c(), U(p, {
3724
- key: 1,
3725
- state: M.message.payload.state,
3726
- label: s.actionLabel(M.message),
3727
- detail: s.actionDetail(M.message)
3728
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(p, {
3729
- key: 2,
3730
- state: "awaiting",
3731
- label: s.t("messageList.approvalRequestSent"),
3732
- detail: M.message.text_md || ""
3733
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), U(k, {
3734
- key: 3,
3735
- artifact: s.actionArtifact(M.message)
3736
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), U(k, {
3737
- key: 4,
3738
- artifact: s.artifactOf(M.message)
3739
- }, null, 8, ["artifact"])) : (c(), u("div", Ar, [
3740
- M.message.text_md ? (c(), U(w, {
3741
- key: 0,
3742
- role: A.role,
3743
- text: M.message.text_md
3744
- }, null, 8, ["role", "text"])) : b("", !0),
3745
- s.attachmentsOf(M.message).length ? (c(), u("div", {
3746
- key: 1,
3747
- class: O(["wm-list__atts", {
3748
- "wm-list__atts--align-end": A.role === "user"
3749
- }])
3750
- }, [
3751
- (c(!0), u(I, null, j(s.attachmentsOf(
3752
- M.message
3753
- ), (N, P) => (c(), U(T, {
3754
- key: `${s.messageKey(M.message)}-att-${P}`,
3755
- attachment: N
3756
- }, null, 8, ["attachment"]))), 128))
3757
- ], 2)) : b("", !0)
3758
- ]))
3759
- ], 14, kr))), 128)),
3760
- (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3761
- key: 0,
3762
- class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3768
+ class: O(["wm-list__atts", {
3769
+ "wm-list__atts--align-end": A.role === "user"
3770
+ }])
3771
+ }, [
3772
+ (c(!0), u(E, null, P(s.attachmentsOf(
3773
+ M.message
3774
+ ), (N, D) => (c(), U(T, {
3775
+ key: `${s.messageKey(M.message)}-att-${D}`,
3776
+ attachment: N
3777
+ }, null, 8, ["attachment"]))), 128))
3778
+ ], 2)) : b("", !0)
3779
+ ]))
3780
+ ], 14, Cr))), 128)),
3781
+ (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3782
+ key: 0,
3783
+ class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3784
+ }, [
3785
+ A.role !== "user" ? (c(), u("span", Mr, v(s.roleLabel(A)), 1)) : b("", !0),
3786
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Tr, "•")) : b("", !0),
3787
+ s.lastTimeOf(A) ? (c(), u("span", xr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3788
+ ], 2)) : b("", !0)
3789
+ ], 64))
3790
+ ], 2)) : b("", !0)
3791
+ ], 64))), 128)),
3792
+ n.streamingActive ? (c(), u("div", Or, [
3793
+ o("div", Lr, [
3794
+ $(a, {
3795
+ size: 26,
3796
+ tail: !0,
3797
+ name: n.aiAgentName,
3798
+ "image-url": n.aiAgentAvatarUrl
3799
+ }, null, 8, ["name", "image-url"])
3800
+ ]),
3801
+ $(B)
3802
+ ])) : b("", !0)
3803
+ ], 34),
3804
+ $(Le, { name: "wm-scrollDown" }, {
3805
+ default: Be(() => [
3806
+ r.showScrollDown ? (c(), u("button", {
3807
+ key: 0,
3808
+ type: "button",
3809
+ class: "wm-list__scrollDown",
3810
+ "aria-label": s.t("messageList.scrollToBottom"),
3811
+ title: s.t("messageList.scrollToBottom"),
3812
+ onClick: t[1] || (t[1] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3813
+ }, [...t[9] || (t[9] = [
3814
+ o("svg", {
3815
+ width: "14",
3816
+ height: "14",
3817
+ viewBox: "0 0 24 24",
3818
+ fill: "none",
3819
+ stroke: "currentColor",
3820
+ "stroke-width": "2.2",
3821
+ "stroke-linecap": "round",
3822
+ "stroke-linejoin": "round",
3823
+ "aria-hidden": "true"
3763
3824
  }, [
3764
- A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : b("", !0),
3765
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "•")) : b("", !0),
3766
- s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3767
- ], 2)) : b("", !0)
3768
- ], 64))
3769
- ], 2)) : b("", !0)
3770
- ], 64))), 128)),
3771
- n.streamingActive ? (c(), u("div", xr, [
3772
- o("div", Or, [
3773
- V(a, {
3774
- size: 26,
3775
- tail: !0,
3776
- name: n.aiAgentName,
3777
- "image-url": n.aiAgentAvatarUrl
3778
- }, null, 8, ["name", "image-url"])
3825
+ o("path", { d: "M6 9l6 6 6-6" })
3826
+ ], -1)
3827
+ ])], 8, Br)) : b("", !0)
3779
3828
  ]),
3780
- V(E)
3781
- ])) : b("", !0)
3782
- ], 34);
3829
+ _: 1
3830
+ })
3831
+ ]);
3783
3832
  }
3784
- const Er = /* @__PURE__ */ B(hr, [["render", Lr], ["__scopeId", "data-v-6d5eab41"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3785
- function Ir() {
3833
+ const Ir = /* @__PURE__ */ R(hr, [["render", Er], ["__scopeId", "data-v-9590b3b2"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3834
+ function Rr() {
3786
3835
  return be && [
3787
3836
  "video/webm;codecs=vp9,opus",
3788
3837
  "video/webm;codecs=vp8,opus",
@@ -3793,7 +3842,7 @@ function Ir() {
3793
3842
  return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
3794
3843
  }) || "";
3795
3844
  }
3796
- function Be({ audio: e }) {
3845
+ function Fe({ audio: e }) {
3797
3846
  return {
3798
3847
  video: !0,
3799
3848
  audio: !!e,
@@ -3802,21 +3851,21 @@ function Be({ audio: e }) {
3802
3851
  systemAudio: e ? "include" : "exclude"
3803
3852
  };
3804
3853
  }
3805
- function Da(e) {
3854
+ function za(e) {
3806
3855
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3807
3856
  }
3808
- async function Rr() {
3857
+ async function Nr() {
3809
3858
  if (!he) return null;
3810
3859
  let e;
3811
3860
  try {
3812
3861
  e = await navigator.mediaDevices.getDisplayMedia(
3813
- Be({ audio: !1 })
3862
+ Fe({ audio: !1 })
3814
3863
  );
3815
3864
  } catch (t) {
3816
3865
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3817
3866
  }
3818
3867
  try {
3819
- return await Br(e);
3868
+ return await Fr(e);
3820
3869
  } catch (t) {
3821
3870
  return console.error("[media] screenshot capture", t), null;
3822
3871
  } finally {
@@ -3825,7 +3874,7 @@ async function Rr() {
3825
3874
  });
3826
3875
  }
3827
3876
  }
3828
- async function Br(e) {
3877
+ async function Fr(e) {
3829
3878
  const t = document.createElement("video");
3830
3879
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
3831
3880
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -3838,18 +3887,18 @@ async function Br(e) {
3838
3887
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3839
3888
  return new File([s], `capture-${a}.png`, { type: "image/png" });
3840
3889
  }
3841
- async function Nr(e = {}) {
3890
+ async function Ur(e = {}) {
3842
3891
  var k;
3843
3892
  if (!he || !be) return null;
3844
3893
  let t;
3845
3894
  try {
3846
3895
  t = await navigator.mediaDevices.getDisplayMedia(
3847
- Be({ audio: !0 })
3896
+ Fe({ audio: !0 })
3848
3897
  );
3849
3898
  } catch (w) {
3850
3899
  return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
3851
3900
  }
3852
- const n = Ir();
3901
+ const n = Rr();
3853
3902
  let i;
3854
3903
  try {
3855
3904
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
@@ -3864,11 +3913,11 @@ async function Nr(e = {}) {
3864
3913
  w.data && w.data.size > 0 && r.push(w.data);
3865
3914
  }), i.addEventListener("stop", () => {
3866
3915
  var w, T;
3867
- if (s && clearInterval(s), t.getTracks().forEach((E) => {
3868
- E.stop();
3916
+ if (s && clearInterval(s), t.getTracks().forEach((B) => {
3917
+ B.stop();
3869
3918
  }), r.length) {
3870
- 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), F = new File([A], `ecran-${M}.${H}`, {
3871
- type: E
3919
+ const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${M}.${H}`, {
3920
+ type: B
3872
3921
  });
3873
3922
  (w = e.onfinalize) == null || w.call(e, F);
3874
3923
  } else
@@ -3903,7 +3952,7 @@ async function Nr(e = {}) {
3903
3952
  }
3904
3953
  };
3905
3954
  }
3906
- const Fr = [
3955
+ const Dr = [
3907
3956
  {
3908
3957
  action: "file",
3909
3958
  labelKey: "composer.attachFile",
@@ -3919,12 +3968,12 @@ const Fr = [
3919
3968
  labelKey: "composer.recordScreen",
3920
3969
  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"
3921
3970
  }
3922
- ], Ur = {
3971
+ ], Pr = {
3923
3972
  name: "WmComposer",
3924
3973
  inject: {
3925
3974
  // Translator shared by the Messenger shell; French fallback when
3926
3975
  // the component is used standalone.
3927
- t: { default: () => D() }
3976
+ t: { default: () => j() }
3928
3977
  },
3929
3978
  props: {
3930
3979
  modelValue: { type: String, default: "" },
@@ -3953,7 +4002,7 @@ const Fr = [
3953
4002
  return !this.disabled && !!this.local.trim();
3954
4003
  },
3955
4004
  attachItems() {
3956
- return Fr.map((e) => ({
4005
+ return Dr.map((e) => ({
3957
4006
  ...e,
3958
4007
  label: this.t(e.labelKey),
3959
4008
  disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !be)
@@ -4027,13 +4076,13 @@ const Fr = [
4027
4076
  },
4028
4077
  async captureScreenshot() {
4029
4078
  if (this.disabled) return;
4030
- const e = await Rr();
4079
+ const e = await Nr();
4031
4080
  e && this.$emit("attach", e);
4032
4081
  },
4033
4082
  async startRecording() {
4034
4083
  if (this.recording || this.disabled) return;
4035
4084
  this.recordingElapsed = 0;
4036
- const e = await Nr({
4085
+ const e = await Ur({
4037
4086
  onstart: () => {
4038
4087
  this.recording = !0;
4039
4088
  },
@@ -4075,30 +4124,30 @@ const Fr = [
4075
4124
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4076
4125
  }
4077
4126
  }
4078
- }, Pr = {
4127
+ }, jr = {
4079
4128
  key: 0,
4080
4129
  class: "wm-rec"
4081
- }, jr = { class: "wm-rec__lbl" }, Dr = {
4130
+ }, Hr = { class: "wm-rec__lbl" }, zr = {
4082
4131
  key: 1,
4083
4132
  class: "wm-compose__menu",
4084
4133
  role: "menu"
4085
- }, Hr = ["disabled", "onClick"], zr = { class: "wm-compose__menuIcon" }, qr = {
4134
+ }, qr = ["disabled", "onClick"], $r = { class: "wm-compose__menuIcon" }, Vr = {
4086
4135
  viewBox: "0 0 24 24",
4087
4136
  width: "14",
4088
4137
  height: "14",
4089
4138
  "aria-hidden": "true"
4090
- }, $r = ["d"], Vr = ["placeholder", "disabled"], Kr = { class: "wm-compose__actions" }, Wr = ["title", "aria-label", "disabled"], Gr = ["disabled", "aria-label"];
4091
- function Yr(e, t, n, i, r, s) {
4139
+ }, Kr = ["d"], Wr = ["placeholder", "disabled"], Gr = { class: "wm-compose__actions" }, Yr = ["title", "aria-label", "disabled"], Jr = ["disabled", "aria-label"];
4140
+ function Qr(e, t, n, i, r, s) {
4092
4141
  return c(), u("div", {
4093
4142
  class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4094
4143
  style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4095
4144
  }, [
4096
- r.recording ? (c(), u("div", Pr, [
4145
+ r.recording ? (c(), u("div", jr, [
4097
4146
  t[8] || (t[8] = o("span", {
4098
4147
  class: "wm-rec__dot",
4099
4148
  "aria-hidden": "true"
4100
4149
  }, null, -1)),
4101
- o("span", jr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4150
+ o("span", Hr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4102
4151
  o("button", {
4103
4152
  type: "button",
4104
4153
  class: "wm-rec__stop",
@@ -4121,16 +4170,16 @@ function Yr(e, t, n, i, r, s) {
4121
4170
  class: "wm-compose__overlay",
4122
4171
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4123
4172
  })) : b("", !0),
4124
- r.attachOpen ? (c(), u("div", Dr, [
4125
- (c(!0), u(I, null, j(s.attachItems, (a) => (c(), u("button", {
4173
+ r.attachOpen ? (c(), u("div", zr, [
4174
+ (c(!0), u(E, null, P(s.attachItems, (a) => (c(), u("button", {
4126
4175
  key: a.action,
4127
4176
  type: "button",
4128
4177
  class: "wm-compose__menuItem",
4129
4178
  disabled: a.disabled,
4130
4179
  onClick: (l) => s.onAttachAction(a.action)
4131
4180
  }, [
4132
- o("span", zr, [
4133
- (c(), u("svg", qr, [
4181
+ o("span", $r, [
4182
+ (c(), u("svg", Vr, [
4134
4183
  o("path", {
4135
4184
  d: a.path,
4136
4185
  stroke: "currentColor",
@@ -4138,11 +4187,11 @@ function Yr(e, t, n, i, r, s) {
4138
4187
  "stroke-linecap": "round",
4139
4188
  "stroke-linejoin": "round",
4140
4189
  fill: "none"
4141
- }, null, 8, $r)
4190
+ }, null, 8, Kr)
4142
4191
  ]))
4143
4192
  ]),
4144
4193
  o("span", null, v(a.label), 1)
4145
- ], 8, Hr))), 128))
4194
+ ], 8, qr))), 128))
4146
4195
  ])) : b("", !0),
4147
4196
  K(o("textarea", {
4148
4197
  ref: "inputEl",
@@ -4153,10 +4202,10 @@ function Yr(e, t, n, i, r, s) {
4153
4202
  disabled: n.disabled,
4154
4203
  onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
4155
4204
  onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
4156
- }, null, 40, Vr), [
4205
+ }, null, 40, Wr), [
4157
4206
  [X, r.local]
4158
4207
  ]),
4159
- o("div", Kr, [
4208
+ o("div", Gr, [
4160
4209
  o("button", {
4161
4210
  type: "button",
4162
4211
  class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
@@ -4178,7 +4227,7 @@ function Yr(e, t, n, i, r, s) {
4178
4227
  }, [
4179
4228
  o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4180
4229
  ], -1)
4181
- ])], 10, Wr),
4230
+ ])], 10, Yr),
4182
4231
  o("button", {
4183
4232
  type: "submit",
4184
4233
  class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
@@ -4198,12 +4247,12 @@ function Yr(e, t, n, i, r, s) {
4198
4247
  }, [
4199
4248
  o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4200
4249
  ], -1)
4201
- ])], 10, Gr)
4250
+ ])], 10, Jr)
4202
4251
  ])
4203
4252
  ], 34)
4204
4253
  ], 6);
4205
4254
  }
4206
- const Jr = /* @__PURE__ */ B(Ur, [["render", Yr], ["__scopeId", "data-v-d6c1e5e7"]]), Qr = {
4255
+ const Xr = /* @__PURE__ */ R(Pr, [["render", Qr], ["__scopeId", "data-v-01e81a27"]]), Zr = {
4207
4256
  name: "WmSuggestionChips",
4208
4257
  props: {
4209
4258
  items: { type: Array, default: () => [] },
@@ -4220,28 +4269,28 @@ const Jr = /* @__PURE__ */ B(Ur, [["render", Yr], ["__scopeId", "data-v-d6c1e5e7
4220
4269
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4221
4270
  }
4222
4271
  }
4223
- }, Xr = ["onClick"];
4224
- function Zr(e, t, n, i, r, s) {
4272
+ }, ei = ["onClick"];
4273
+ function ti(e, t, n, i, r, s) {
4225
4274
  return n.items.length ? (c(), u("div", {
4226
4275
  key: s.batchKey,
4227
4276
  class: "wm-chips"
4228
4277
  }, [
4229
- (c(!0), u(I, null, j(n.items, (a, l) => (c(), u("button", {
4278
+ (c(!0), u(E, null, P(n.items, (a, l) => (c(), u("button", {
4230
4279
  key: l,
4231
4280
  type: "button",
4232
4281
  class: "wm-chip",
4233
4282
  style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4234
4283
  onClick: (p) => e.$emit("select", a)
4235
- }, v(a.label), 13, Xr))), 128))
4284
+ }, v(a.label), 13, ei))), 128))
4236
4285
  ])) : b("", !0);
4237
4286
  }
4238
- const ei = /* @__PURE__ */ B(Qr, [["render", Zr], ["__scopeId", "data-v-47ad8085"]]), ti = {
4287
+ const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085"]]), si = {
4239
4288
  name: "WmApprovalCard",
4240
4289
  components: { AIAvatar: le },
4241
4290
  inject: {
4242
4291
  // Translator shared by the Messenger shell; French fallback when
4243
4292
  // the component is used standalone.
4244
- t: { default: () => D() }
4293
+ t: { default: () => j() }
4245
4294
  },
4246
4295
  props: {
4247
4296
  action: { type: String, required: !0 },
@@ -4279,27 +4328,27 @@ const ei = /* @__PURE__ */ B(Qr, [["render", Zr], ["__scopeId", "data-v-47ad8085
4279
4328
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4280
4329
  }
4281
4330
  }
4282
- }, ni = { class: "wm-approval" }, si = { class: "wm-approval__head" }, ri = { class: "wm-approval__icon" }, ii = { class: "wm-approval__main" }, ai = { class: "wm-approval__title" }, oi = {
4331
+ }, ri = { class: "wm-approval" }, ii = { class: "wm-approval__head" }, ai = { class: "wm-approval__icon" }, oi = { class: "wm-approval__main" }, li = { class: "wm-approval__title" }, ci = {
4283
4332
  key: 0,
4284
4333
  class: "wm-approval__detail"
4285
- }, li = { class: "wm-approval__actions" };
4286
- function ci(e, t, n, i, r, s) {
4287
- const a = R("AIAvatar");
4288
- return c(), u("div", ni, [
4289
- o("div", si, [
4290
- o("div", ri, [
4291
- V(a, {
4334
+ }, di = { class: "wm-approval__actions" };
4335
+ function ui(e, t, n, i, r, s) {
4336
+ const a = I("AIAvatar");
4337
+ return c(), u("div", ri, [
4338
+ o("div", ii, [
4339
+ o("div", ai, [
4340
+ $(a, {
4292
4341
  size: 24,
4293
4342
  name: n.agentName,
4294
4343
  "image-url": n.agentAvatarUrl
4295
4344
  }, null, 8, ["name", "image-url"])
4296
4345
  ]),
4297
- o("div", ii, [
4298
- o("div", ai, v(n.action), 1),
4299
- n.detail ? (c(), u("div", oi, v(n.detail), 1)) : b("", !0)
4346
+ o("div", oi, [
4347
+ o("div", li, v(n.action), 1),
4348
+ n.detail ? (c(), u("div", ci, v(n.detail), 1)) : b("", !0)
4300
4349
  ])
4301
4350
  ]),
4302
- o("div", li, [
4351
+ o("div", di, [
4303
4352
  s.rejectId ? (c(), u("button", {
4304
4353
  key: 0,
4305
4354
  type: "button",
@@ -4315,9 +4364,9 @@ function ci(e, t, n, i, r, s) {
4315
4364
  ])
4316
4365
  ]);
4317
4366
  }
4318
- const di = /* @__PURE__ */ B(ti, [["render", ci], ["__scopeId", "data-v-a2bed37e"]]);
4367
+ const hi = /* @__PURE__ */ R(si, [["render", ui], ["__scopeId", "data-v-a2bed37e"]]);
4319
4368
  let xe = 0;
4320
- const ui = /* @__PURE__ */ new Set([
4369
+ const mi = /* @__PURE__ */ new Set([
4321
4370
  "text",
4322
4371
  "textarea",
4323
4372
  "number",
@@ -4325,13 +4374,13 @@ const ui = /* @__PURE__ */ new Set([
4325
4374
  "select",
4326
4375
  "multiselect",
4327
4376
  "date"
4328
- ]), hi = {
4377
+ ]), fi = {
4329
4378
  name: "WmFormCard",
4330
4379
  components: { AIAvatar: le },
4331
4380
  inject: {
4332
4381
  // Translator shared by the Messenger shell; French fallback when
4333
4382
  // the component is used standalone.
4334
- t: { default: () => D() }
4383
+ t: { default: () => j() }
4335
4384
  },
4336
4385
  props: {
4337
4386
  form: { type: Object, required: !0 },
@@ -4355,7 +4404,7 @@ const ui = /* @__PURE__ */ new Set([
4355
4404
  // douteux.
4356
4405
  normalizedFields() {
4357
4406
  var t;
4358
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !ui.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4407
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !mi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4359
4408
  }
4360
4409
  },
4361
4410
  created() {
@@ -4408,54 +4457,54 @@ const ui = /* @__PURE__ */ new Set([
4408
4457
  }
4409
4458
  }
4410
4459
  }
4411
- }, mi = { class: "wm-form" }, fi = { class: "wm-form__head" }, gi = { class: "wm-form__icon" }, _i = { class: "wm-form__main" }, pi = { class: "wm-form__title" }, vi = {
4460
+ }, gi = { class: "wm-form" }, _i = { class: "wm-form__head" }, pi = { class: "wm-form__icon" }, vi = { class: "wm-form__main" }, yi = { class: "wm-form__title" }, wi = {
4412
4461
  key: 0,
4413
4462
  class: "wm-form__detail"
4414
- }, yi = ["for"], wi = {
4463
+ }, bi = ["for"], ki = {
4415
4464
  key: 0,
4416
4465
  class: "wm-form__req",
4417
4466
  "aria-hidden": "true"
4418
- }, bi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "required", "disabled"], Si = {
4467
+ }, Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Si = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Mi = ["id", "onUpdate:modelValue", "required", "disabled"], Ti = {
4419
4468
  key: 4,
4420
4469
  class: "wm-form__bool"
4421
- }, Mi = ["id", "onUpdate:modelValue", "disabled"], Ti = ["id", "onUpdate:modelValue", "required", "disabled"], xi = {
4470
+ }, xi = ["id", "onUpdate:modelValue", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"], Li = {
4422
4471
  value: "",
4423
4472
  disabled: ""
4424
- }, Oi = ["value"], Li = {
4473
+ }, Bi = ["value"], Ei = {
4425
4474
  key: 6,
4426
4475
  class: "wm-form__multi"
4427
- }, Ei = ["value", "checked", "disabled", "onChange"], Ii = {
4476
+ }, Ii = ["value", "checked", "disabled", "onChange"], Ri = {
4428
4477
  key: 0,
4429
4478
  class: "wm-form__err"
4430
- }, Ri = ["disabled"], Bi = {
4479
+ }, Ni = ["disabled"], Fi = {
4431
4480
  key: 0,
4432
4481
  class: "wm-form__spinner",
4433
4482
  "aria-hidden": "true"
4434
- }, Ni = {
4483
+ }, Ui = {
4435
4484
  key: 2,
4436
4485
  class: "wm-form__doneLbl"
4437
4486
  };
4438
- function Fi(e, t, n, i, r, s) {
4439
- const a = R("AIAvatar");
4440
- return c(), u("div", mi, [
4441
- o("div", fi, [
4442
- o("div", gi, [
4443
- V(a, {
4487
+ function Di(e, t, n, i, r, s) {
4488
+ const a = I("AIAvatar");
4489
+ return c(), u("div", gi, [
4490
+ o("div", _i, [
4491
+ o("div", pi, [
4492
+ $(a, {
4444
4493
  size: 24,
4445
4494
  name: n.agentName,
4446
4495
  "image-url": n.agentAvatarUrl
4447
4496
  }, null, 8, ["name", "image-url"])
4448
4497
  ]),
4449
- o("div", _i, [
4450
- o("div", pi, v(n.form.title || s.t("form.title")), 1),
4451
- n.form.description ? (c(), u("div", vi, v(n.form.description), 1)) : b("", !0)
4498
+ o("div", vi, [
4499
+ o("div", yi, v(n.form.title || s.t("form.title")), 1),
4500
+ n.form.description ? (c(), u("div", wi, v(n.form.description), 1)) : b("", !0)
4452
4501
  ])
4453
4502
  ]),
4454
4503
  o("form", {
4455
4504
  class: "wm-form__body",
4456
4505
  onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4457
4506
  }, [
4458
- (c(!0), u(I, null, j(s.normalizedFields, (l) => (c(), u("div", {
4507
+ (c(!0), u(E, null, P(s.normalizedFields, (l) => (c(), u("div", {
4459
4508
  key: l.key,
4460
4509
  class: "wm-form__field"
4461
4510
  }, [
@@ -4464,8 +4513,8 @@ function Fi(e, t, n, i, r, s) {
4464
4513
  class: "wm-form__label"
4465
4514
  }, [
4466
4515
  pe(v(l.label), 1),
4467
- l.required ? (c(), u("span", wi, "*")) : b("", !0)
4468
- ], 8, yi),
4516
+ l.required ? (c(), u("span", ki, "*")) : b("", !0)
4517
+ ], 8, bi),
4469
4518
  l.type === "text" ? K((c(), u("input", {
4470
4519
  key: 0,
4471
4520
  id: `wm-f-${r._uid}-${l.key}`,
@@ -4475,7 +4524,7 @@ function Fi(e, t, n, i, r, s) {
4475
4524
  placeholder: l.placeholder || "",
4476
4525
  required: l.required,
4477
4526
  disabled: n.readOnly || r.busy
4478
- }, null, 8, bi)), [
4527
+ }, null, 8, Ci)), [
4479
4528
  [X, r.values[l.key]]
4480
4529
  ]) : l.type === "textarea" ? K((c(), u("textarea", {
4481
4530
  key: 1,
@@ -4486,7 +4535,7 @@ function Fi(e, t, n, i, r, s) {
4486
4535
  placeholder: l.placeholder || "",
4487
4536
  required: l.required,
4488
4537
  disabled: n.readOnly || r.busy
4489
- }, null, 8, ki)), [
4538
+ }, null, 8, Ai)), [
4490
4539
  [X, r.values[l.key]]
4491
4540
  ]) : l.type === "number" ? K((c(), u("input", {
4492
4541
  key: 2,
@@ -4497,7 +4546,7 @@ function Fi(e, t, n, i, r, s) {
4497
4546
  placeholder: l.placeholder || "",
4498
4547
  required: l.required,
4499
4548
  disabled: n.readOnly || r.busy
4500
- }, null, 8, Ci)), [
4549
+ }, null, 8, Si)), [
4501
4550
  [
4502
4551
  X,
4503
4552
  r.values[l.key],
@@ -4512,15 +4561,15 @@ function Fi(e, t, n, i, r, s) {
4512
4561
  class: "wm-form__input",
4513
4562
  required: l.required,
4514
4563
  disabled: n.readOnly || r.busy
4515
- }, null, 8, Ai)), [
4564
+ }, null, 8, Mi)), [
4516
4565
  [X, r.values[l.key]]
4517
- ]) : l.type === "boolean" ? (c(), u("label", Si, [
4566
+ ]) : l.type === "boolean" ? (c(), u("label", Ti, [
4518
4567
  K(o("input", {
4519
4568
  id: `wm-f-${r._uid}-${l.key}`,
4520
4569
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
4521
4570
  type: "checkbox",
4522
4571
  disabled: n.readOnly || r.busy
4523
- }, null, 8, Mi), [
4572
+ }, null, 8, xi), [
4524
4573
  [He, r.values[l.key]]
4525
4574
  ]),
4526
4575
  o("span", null, v(l.placeholder || s.t("common.yes")), 1)
@@ -4532,15 +4581,15 @@ function Fi(e, t, n, i, r, s) {
4532
4581
  required: l.required,
4533
4582
  disabled: n.readOnly || r.busy
4534
4583
  }, [
4535
- o("option", xi, v(l.placeholder || s.t("form.choose")), 1),
4536
- (c(!0), u(I, null, j(l.options, (p) => (c(), u("option", {
4584
+ o("option", Li, v(l.placeholder || s.t("form.choose")), 1),
4585
+ (c(!0), u(E, null, P(l.options, (p) => (c(), u("option", {
4537
4586
  key: p.value,
4538
4587
  value: p.value
4539
- }, v(p.label), 9, Oi))), 128))
4540
- ], 8, Ti)), [
4588
+ }, v(p.label), 9, Bi))), 128))
4589
+ ], 8, Oi)), [
4541
4590
  [ze, r.values[l.key]]
4542
- ]) : l.type === "multiselect" ? (c(), u("div", Li, [
4543
- (c(!0), u(I, null, j(l.options, (p) => (c(), u("label", {
4591
+ ]) : l.type === "multiselect" ? (c(), u("div", Ei, [
4592
+ (c(!0), u(E, null, P(l.options, (p) => (c(), u("label", {
4544
4593
  key: p.value,
4545
4594
  class: "wm-form__multiItem"
4546
4595
  }, [
@@ -4554,30 +4603,30 @@ function Fi(e, t, n, i, r, s) {
4554
4603
  p.value,
4555
4604
  k.target.checked
4556
4605
  )
4557
- }, null, 40, Ei),
4606
+ }, null, 40, Ii),
4558
4607
  o("span", null, v(p.label), 1)
4559
4608
  ]))), 128))
4560
4609
  ])) : b("", !0)
4561
4610
  ]))), 128)),
4562
- r.error ? (c(), u("div", Ii, v(r.error), 1)) : b("", !0),
4563
- n.readOnly ? (c(), u("div", Ni, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4611
+ r.error ? (c(), u("div", Ri, v(r.error), 1)) : b("", !0),
4612
+ n.readOnly ? (c(), u("div", Ui, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4564
4613
  key: 1,
4565
4614
  type: "submit",
4566
4615
  class: "wm-form__submit",
4567
4616
  disabled: r.busy
4568
4617
  }, [
4569
- r.busy ? (c(), u("span", Bi)) : b("", !0),
4618
+ r.busy ? (c(), u("span", Fi)) : b("", !0),
4570
4619
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4571
- ], 8, Ri))
4620
+ ], 8, Ni))
4572
4621
  ], 32)
4573
4622
  ]);
4574
4623
  }
4575
- const Ui = /* @__PURE__ */ B(hi, [["render", Fi], ["__scopeId", "data-v-fe65cc56"]]), Pi = {
4624
+ const Pi = /* @__PURE__ */ R(fi, [["render", Di], ["__scopeId", "data-v-fe65cc56"]]), ji = {
4576
4625
  name: "WmFeedback",
4577
4626
  inject: {
4578
4627
  // Translator shared by the Messenger shell; French fallback when
4579
4628
  // the component is used standalone.
4580
- t: { default: () => D() }
4629
+ t: { default: () => j() }
4581
4630
  },
4582
4631
  props: {
4583
4632
  busy: { type: Boolean, default: !1 },
@@ -4606,13 +4655,13 @@ const Ui = /* @__PURE__ */ B(hi, [["render", Fi], ["__scopeId", "data-v-fe65cc56
4606
4655
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4607
4656
  }
4608
4657
  }
4609
- }, ji = { class: "wm-fb" }, Di = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, zi = { class: "wm-fb__row" }, qi = ["onClick"], $i = { class: "wm-fb__emoji" }, Vi = { class: "wm-fb__label" }, Ki = ["disabled"], Wi = {
4658
+ }, Hi = { class: "wm-fb" }, zi = { class: "wm-fb__title" }, qi = { class: "wm-fb__sub" }, $i = { class: "wm-fb__row" }, Vi = ["onClick"], Ki = { class: "wm-fb__emoji" }, Wi = { class: "wm-fb__label" }, Gi = ["disabled"], Yi = {
4610
4659
  key: 1,
4611
4660
  class: "wm-fb__done"
4612
- }, Gi = { class: "wm-fb__doneTitle" }, Yi = { class: "wm-fb__doneSub" };
4613
- function Ji(e, t, n, i, r, s) {
4614
- return c(), u("div", ji, [
4615
- n.done ? (c(), u("div", Wi, [
4661
+ }, Ji = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
4662
+ function Xi(e, t, n, i, r, s) {
4663
+ return c(), u("div", Hi, [
4664
+ n.done ? (c(), u("div", Yi, [
4616
4665
  t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4617
4666
  o("svg", {
4618
4667
  width: "16",
@@ -4628,37 +4677,37 @@ function Ji(e, t, n, i, r, s) {
4628
4677
  o("path", { d: "M20 6L9 17l-5-5" })
4629
4678
  ])
4630
4679
  ], -1)),
4631
- o("div", Gi, v(s.t("feedback.doneTitle")), 1),
4632
- o("div", Yi, v(s.t("feedback.doneSubtitle")), 1)
4633
- ])) : (c(), u(I, { key: 0 }, [
4634
- o("div", Di, v(s.t("feedback.question")), 1),
4635
- o("div", Hi, v(s.t("feedback.subtitle")), 1),
4636
- o("div", zi, [
4637
- (c(!0), u(I, null, j(s.options, (a) => (c(), u("button", {
4680
+ o("div", Ji, v(s.t("feedback.doneTitle")), 1),
4681
+ o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
4682
+ ])) : (c(), u(E, { key: 0 }, [
4683
+ o("div", zi, v(s.t("feedback.question")), 1),
4684
+ o("div", qi, v(s.t("feedback.subtitle")), 1),
4685
+ o("div", $i, [
4686
+ (c(!0), u(E, null, P(s.options, (a) => (c(), u("button", {
4638
4687
  key: a.v,
4639
4688
  type: "button",
4640
4689
  class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4641
4690
  onClick: (l) => r.sel = a.v
4642
4691
  }, [
4643
- o("span", $i, v(a.e), 1),
4644
- o("span", Vi, v(a.l), 1)
4645
- ], 10, qi))), 128))
4692
+ o("span", Ki, v(a.e), 1),
4693
+ o("span", Wi, v(a.l), 1)
4694
+ ], 10, Vi))), 128))
4646
4695
  ]),
4647
4696
  o("button", {
4648
4697
  type: "button",
4649
4698
  class: "wm-fb__send",
4650
4699
  disabled: !r.sel || n.busy,
4651
4700
  onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
4652
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Ki)
4701
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Gi)
4653
4702
  ], 64))
4654
4703
  ]);
4655
4704
  }
4656
- const Qi = /* @__PURE__ */ B(Pi, [["render", Ji], ["__scopeId", "data-v-9b630564"]]), Xi = {
4705
+ const Zi = /* @__PURE__ */ R(ji, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), ea = {
4657
4706
  name: "WmMoreMenu",
4658
4707
  inject: {
4659
4708
  // Translator shared by the Messenger shell; French fallback when
4660
4709
  // the component is used standalone.
4661
- t: { default: () => D() }
4710
+ t: { default: () => j() }
4662
4711
  },
4663
4712
  props: {
4664
4713
  canRename: { type: Boolean, default: !0 },
@@ -4696,24 +4745,24 @@ const Qi = /* @__PURE__ */ B(Pi, [["render", Ji], ["__scopeId", "data-v-9b630564
4696
4745
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4697
4746
  }
4698
4747
  }
4699
- }, Zi = { class: "wm-mm" }, ea = {
4748
+ }, ta = { class: "wm-mm" }, na = {
4700
4749
  class: "wm-mm__pop",
4701
4750
  role: "menu"
4702
- }, ta = {
4751
+ }, sa = {
4703
4752
  key: 0,
4704
4753
  class: "wm-mm__section"
4705
- }, na = { class: "wm-mm__label" }, sa = { class: "wm-mm__label" }, ra = {
4754
+ }, ra = { class: "wm-mm__label" }, ia = { class: "wm-mm__label" }, aa = {
4706
4755
  key: 1,
4707
4756
  class: "wm-mm__sep"
4708
- }, ia = { class: "wm-mm__section" }, aa = { class: "wm-mm__label" }, oa = { class: "wm-mm__label" }, la = { class: "wm-mm__section" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__label" };
4709
- function ua(e, t, n, i, r, s) {
4710
- return c(), u("div", Zi, [
4757
+ }, oa = { class: "wm-mm__section" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__section" }, ua = { class: "wm-mm__label" }, ha = { class: "wm-mm__label" };
4758
+ function ma(e, t, n, i, r, s) {
4759
+ return c(), u("div", ta, [
4711
4760
  o("div", {
4712
4761
  class: "wm-mm__scrim",
4713
4762
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4714
4763
  }),
4715
- o("div", ea, [
4716
- n.canRename || n.canExport ? (c(), u("div", ta, [
4764
+ o("div", na, [
4765
+ n.canRename || n.canExport ? (c(), u("div", sa, [
4717
4766
  n.canRename ? (c(), u("button", {
4718
4767
  key: 0,
4719
4768
  type: "button",
@@ -4736,7 +4785,7 @@ function ua(e, t, n, i, r, s) {
4736
4785
  o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4737
4786
  ])
4738
4787
  ], -1)),
4739
- o("span", na, v(s.t("moreMenu.editTitle")), 1)
4788
+ o("span", ra, v(s.t("moreMenu.editTitle")), 1)
4740
4789
  ])) : b("", !0),
4741
4790
  n.canExport ? (c(), u("button", {
4742
4791
  key: 1,
@@ -4759,12 +4808,12 @@ function ua(e, t, n, i, r, s) {
4759
4808
  o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4760
4809
  ])
4761
4810
  ], -1)),
4762
- o("span", sa, v(s.t("moreMenu.exportTranscript")), 1),
4811
+ o("span", ia, v(s.t("moreMenu.exportTranscript")), 1),
4763
4812
  t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4764
4813
  ])) : b("", !0)
4765
4814
  ])) : b("", !0),
4766
- n.canRename || n.canExport ? (c(), u("div", ra)) : b("", !0),
4767
- o("div", ia, [
4815
+ n.canRename || n.canExport ? (c(), u("div", aa)) : b("", !0),
4816
+ o("div", oa, [
4768
4817
  o("button", {
4769
4818
  type: "button",
4770
4819
  class: "wm-mm__item",
@@ -4786,7 +4835,7 @@ function ua(e, t, n, i, r, s) {
4786
4835
  o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4787
4836
  ])
4788
4837
  ], -1)),
4789
- o("span", aa, v(s.t("moreMenu.sound")), 1),
4838
+ o("span", la, v(s.t("moreMenu.sound")), 1),
4790
4839
  o("span", {
4791
4840
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
4792
4841
  }, [...t[10] || (t[10] = [
@@ -4813,7 +4862,7 @@ function ua(e, t, n, i, r, s) {
4813
4862
  o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
4814
4863
  ])
4815
4864
  ], -1)),
4816
- o("span", oa, v(s.t("moreMenu.browserNotifications")), 1),
4865
+ o("span", ca, v(s.t("moreMenu.browserNotifications")), 1),
4817
4866
  o("span", {
4818
4867
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
4819
4868
  }, [...t[12] || (t[12] = [
@@ -4822,7 +4871,7 @@ function ua(e, t, n, i, r, s) {
4822
4871
  ])
4823
4872
  ]),
4824
4873
  t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
4825
- o("div", la, [
4874
+ o("div", da, [
4826
4875
  n.statusUrl ? (c(), u("button", {
4827
4876
  key: 0,
4828
4877
  type: "button",
@@ -4844,7 +4893,7 @@ function ua(e, t, n, i, r, s) {
4844
4893
  o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
4845
4894
  ])
4846
4895
  ], -1)),
4847
- o("span", ca, v(s.t("moreMenu.serviceStatus")), 1)
4896
+ o("span", ua, v(s.t("moreMenu.serviceStatus")), 1)
4848
4897
  ])) : b("", !0),
4849
4898
  n.helpUrl ? (c(), u("button", {
4850
4899
  key: 1,
@@ -4867,18 +4916,18 @@ function ua(e, t, n, i, r, s) {
4867
4916
  o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
4868
4917
  ])
4869
4918
  ], -1)),
4870
- o("span", da, v(s.t("moreMenu.helpCenter")), 1)
4919
+ o("span", ha, v(s.t("moreMenu.helpCenter")), 1)
4871
4920
  ])) : b("", !0)
4872
4921
  ])
4873
4922
  ])
4874
4923
  ]);
4875
4924
  }
4876
- const ha = /* @__PURE__ */ B(Xi, [["render", ua], ["__scopeId", "data-v-76281e95"]]), ma = {
4925
+ const fa = /* @__PURE__ */ R(ea, [["render", ma], ["__scopeId", "data-v-76281e95"]]), ga = {
4877
4926
  name: "WmRenameDialog",
4878
4927
  inject: {
4879
4928
  // Translator shared by the Messenger shell; French fallback when
4880
4929
  // the component is used standalone.
4881
- t: { default: () => D() }
4930
+ t: { default: () => j() }
4882
4931
  },
4883
4932
  props: {
4884
4933
  // Empty defaults: the resolved fallback comes from the translator
@@ -4915,20 +4964,20 @@ const ha = /* @__PURE__ */ B(Xi, [["render", ua], ["__scopeId", "data-v-76281e95
4915
4964
  this.canSubmit && this.$emit("submit", this.value.trim());
4916
4965
  }
4917
4966
  }
4918
- }, fa = { class: "wm-dialog" }, ga = {
4967
+ }, _a = { class: "wm-dialog" }, pa = {
4919
4968
  class: "wm-dialog__card",
4920
4969
  role: "dialog",
4921
4970
  "aria-modal": "true"
4922
- }, _a = { class: "wm-dialog__head" }, pa = { class: "wm-dialog__title" }, va = ["aria-label"], ya = { class: "wm-dialog__body" }, wa = ["placeholder"], ba = { class: "wm-dialog__actions" }, ka = ["disabled"];
4923
- function Ca(e, t, n, i, r, s) {
4924
- return c(), u("div", fa, [
4971
+ }, va = { class: "wm-dialog__head" }, ya = { class: "wm-dialog__title" }, wa = ["aria-label"], ba = { class: "wm-dialog__body" }, ka = ["placeholder"], Ca = { class: "wm-dialog__actions" }, Aa = ["disabled"];
4972
+ function Sa(e, t, n, i, r, s) {
4973
+ return c(), u("div", _a, [
4925
4974
  o("div", {
4926
4975
  class: "wm-dialog__scrim",
4927
4976
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4928
4977
  }),
4929
- o("div", ga, [
4930
- o("div", _a, [
4931
- o("div", pa, v(n.title || s.t("rename.title")), 1),
4978
+ o("div", pa, [
4979
+ o("div", va, [
4980
+ o("div", ya, v(n.title || s.t("rename.title")), 1),
4932
4981
  o("button", {
4933
4982
  type: "button",
4934
4983
  class: "wm-dialog__close",
@@ -4948,9 +4997,9 @@ function Ca(e, t, n, i, r, s) {
4948
4997
  }, [
4949
4998
  o("path", { d: "M18 6L6 18M6 6l12 12" })
4950
4999
  ], -1)
4951
- ])], 8, va)
5000
+ ])], 8, wa)
4952
5001
  ]),
4953
- o("div", ya, [
5002
+ o("div", ba, [
4954
5003
  K(o("input", {
4955
5004
  ref: "input",
4956
5005
  "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
@@ -4962,11 +5011,11 @@ function Ca(e, t, n, i, r, s) {
4962
5011
  t[3] || (t[3] = ue(J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
4963
5012
  t[4] || (t[4] = ue(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
4964
5013
  ]
4965
- }, null, 40, wa), [
5014
+ }, null, 40, ka), [
4966
5015
  [X, r.value]
4967
5016
  ])
4968
5017
  ]),
4969
- o("div", ba, [
5018
+ o("div", Ca, [
4970
5019
  o("button", {
4971
5020
  type: "button",
4972
5021
  class: "wm-dialog__btn",
@@ -4977,25 +5026,25 @@ function Ca(e, t, n, i, r, s) {
4977
5026
  class: "wm-dialog__btn wm-dialog__btn--primary",
4978
5027
  disabled: !s.canSubmit,
4979
5028
  onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
4980
- }, v(s.t("common.save")), 9, ka)
5029
+ }, v(s.t("common.save")), 9, Aa)
4981
5030
  ])
4982
5031
  ])
4983
5032
  ]);
4984
5033
  }
4985
- const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Sa = {
5034
+ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ta = {
4986
5035
  name: "Messenger",
4987
5036
  components: {
4988
5037
  Launcher: Ft,
4989
5038
  Header: ln,
4990
5039
  Onboarding: qn,
4991
- MessageList: Er,
4992
- Composer: Jr,
4993
- SuggestionChips: ei,
4994
- ApprovalCard: di,
4995
- FormCard: Ui,
4996
- Feedback: Qi,
4997
- MoreMenu: ha,
4998
- RenameDialog: Aa
5040
+ MessageList: Ir,
5041
+ Composer: Xr,
5042
+ SuggestionChips: ni,
5043
+ ApprovalCard: hi,
5044
+ FormCard: Pi,
5045
+ Feedback: Zi,
5046
+ MoreMenu: fa,
5047
+ RenameDialog: Ma
4999
5048
  },
5000
5049
  mixins: [
5001
5050
  ot,
@@ -5146,7 +5195,7 @@ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5146
5195
  // `locale` changes. `t()` below (and the provided closure) delegate
5147
5196
  // to it so every string resolves against the current language.
5148
5197
  translator() {
5149
- return D(this.locale);
5198
+ return j(this.locale);
5150
5199
  },
5151
5200
  error() {
5152
5201
  var e;
@@ -5184,9 +5233,9 @@ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5184
5233
  const T = r[w];
5185
5234
  if (!T) continue;
5186
5235
  if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5187
- const E = W(T.id);
5188
- if (E != null) {
5189
- if (s != null && E <= s) break;
5236
+ const B = W(T.id);
5237
+ if (B != null) {
5238
+ if (s != null && B <= s) break;
5190
5239
  t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5191
5240
  }
5192
5241
  }
@@ -5466,7 +5515,7 @@ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5466
5515
  }
5467
5516
  }
5468
5517
  return this.t("messageList.today", {
5469
- time: Le(t, oe(this.locale))
5518
+ time: Ee(t, oe(this.locale))
5470
5519
  });
5471
5520
  },
5472
5521
  // Pagination state for the active conversation. Drives the
@@ -5635,10 +5684,11 @@ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5635
5684
  })
5636
5685
  ), this.store = ke(Qe(this.transport)), this.hydrateNotifPref();
5637
5686
  const n = ((e = this.parentContext) == null ? void 0 : e.customer) || ((t = this.context) == null ? void 0 : t.customer);
5638
- n && typeof n == "object" && await this.store.applyCustomer(n), await this.store.start({
5687
+ await this.store.start({
5639
5688
  origin: this.parentOrigin,
5640
5689
  token: this.parentToken || void 0,
5641
- allowUnauthenticated: this.parentAllowUnauthenticated
5690
+ allowUnauthenticated: this.parentAllowUnauthenticated,
5691
+ customer: n && typeof n == "object" ? n : void 0
5642
5692
  }), this.setupLiveReveal();
5643
5693
  } catch (n) {
5644
5694
  console.error("[ww-messenger] bootstrap failed", n), this.bootError = (n == null ? void 0 : n.message) || String(n);
@@ -5721,21 +5771,21 @@ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5721
5771
  this.launcherHovered = e, this.sendCurrentLauncherSize();
5722
5772
  },
5723
5773
  sendCurrentLauncherSize() {
5724
- var T, E, A, H, M, F, N;
5774
+ var T, B, A, H, M, F, N;
5725
5775
  if (this.isOpen) return;
5726
- const e = (E = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : E.call(T, ".wm-launcherWrap");
5776
+ const e = (B = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : B.call(T, ".wm-launcherWrap");
5727
5777
  if (!e) return;
5728
5778
  const t = e.getBoundingClientRect();
5729
5779
  if (!t.width || !t.height) return;
5730
5780
  const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (M = (H = this.$el) == null ? void 0 : H.querySelector) == null ? void 0 : M.call(H, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (N = (F = this.$el) == null ? void 0 : F.querySelectorAll) == null ? void 0 : N.call(F, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
5731
5781
  let w = null;
5732
5782
  if (k) {
5733
- const P = k.getBoundingClientRect();
5783
+ const D = k.getBoundingClientRect();
5734
5784
  w = {
5735
- width: Math.ceil(P.width),
5736
- height: Math.ceil(P.height),
5737
- rightOffset: Math.max(0, Math.ceil(t.right - P.right)),
5738
- bottomOffset: Math.max(0, Math.ceil(t.bottom - P.bottom))
5785
+ width: Math.ceil(D.width),
5786
+ height: Math.ceil(D.height),
5787
+ rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
5788
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
5739
5789
  };
5740
5790
  }
5741
5791
  this.notifyParentResize("closed", {
@@ -5958,29 +6008,29 @@ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5958
6008
  }
5959
6009
  }
5960
6010
  }
5961
- }, Ma = {
6011
+ }, xa = {
5962
6012
  key: 0,
5963
6013
  class: "wm-loading",
5964
6014
  "aria-busy": "true",
5965
6015
  "aria-live": "polite"
5966
- }, Ta = ["aria-label"], xa = {
6016
+ }, Oa = ["aria-label"], La = {
5967
6017
  key: 0,
5968
6018
  class: "wm-state"
5969
- }, Oa = { class: "wm-state__err" }, La = { class: "wm-state__errTitle" }, Ea = { class: "wm-state__errSub" }, Ia = { class: "wm-bottom" }, Ra = {
6019
+ }, Ba = { class: "wm-state__err" }, Ea = { class: "wm-state__errTitle" }, Ia = { class: "wm-state__errSub" }, Ra = { class: "wm-bottom" }, Na = {
5970
6020
  key: 0,
5971
6021
  ref: "floatEl",
5972
6022
  class: "wm-float"
5973
- }, Ba = {
6023
+ }, Fa = {
5974
6024
  key: 1,
5975
6025
  class: "wm-actionWait",
5976
6026
  role: "status",
5977
6027
  "aria-live": "polite"
5978
- }, Na = { class: "wm-actionWait__lbl" }, Fa = {
6028
+ }, Ua = { class: "wm-actionWait__lbl" }, Da = {
5979
6029
  key: 2,
5980
6030
  class: "wm-attached"
5981
- }, Ua = ["aria-label", "onClick"];
5982
- function Pa(e, t, n, i, r, s) {
5983
- const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), E = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), M = R("MoreMenu"), F = R("RenameDialog");
6031
+ }, Pa = ["aria-label", "onClick"];
6032
+ function ja(e, t, n, i, r, s) {
6033
+ const a = I("Launcher"), l = I("Header"), p = I("Onboarding"), k = I("MessageList"), w = I("ApprovalCard"), T = I("FormCard"), B = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), F = I("RenameDialog");
5984
6034
  return c(), u("div", {
5985
6035
  class: O(["wm-root", `wm-root--${n.displayMode}`])
5986
6036
  }, [
@@ -6003,7 +6053,7 @@ function Pa(e, t, n, i, r, s) {
6003
6053
  role: "dialog",
6004
6054
  "aria-label": "Messenger"
6005
6055
  }, [
6006
- !s.ready && !s.error ? (c(), u("div", Ma, [
6056
+ !s.ready && !s.error ? (c(), u("div", xa, [
6007
6057
  s.isEmbedded ? b("", !0) : (c(), u("button", {
6008
6058
  key: 0,
6009
6059
  type: "button",
@@ -6024,13 +6074,13 @@ function Pa(e, t, n, i, r, s) {
6024
6074
  }, [
6025
6075
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6026
6076
  ], -1)
6027
- ])], 8, Ta)),
6077
+ ])], 8, Oa)),
6028
6078
  t[6] || (t[6] = o("div", {
6029
6079
  class: "wm-loading__spinner",
6030
6080
  "aria-hidden": "true"
6031
6081
  }, null, -1))
6032
- ])) : (c(), u(I, { key: 1 }, [
6033
- V(l, {
6082
+ ])) : (c(), u(E, { key: 1 }, [
6083
+ $(l, {
6034
6084
  title: s.headerTitle,
6035
6085
  "team-members": s.teamMembers,
6036
6086
  "response-label": s.responseLabel,
@@ -6044,8 +6094,8 @@ function Pa(e, t, n, i, r, s) {
6044
6094
  onMore: s.toggleMore,
6045
6095
  onClose: s.close
6046
6096
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6047
- s.error ? (c(), u("div", xa, [
6048
- o("div", Oa, [
6097
+ s.error ? (c(), u("div", La, [
6098
+ o("div", Ba, [
6049
6099
  t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
6050
6100
  o("svg", {
6051
6101
  width: "14",
@@ -6062,12 +6112,12 @@ function Pa(e, t, n, i, r, s) {
6062
6112
  ])
6063
6113
  ], -1)),
6064
6114
  o("div", null, [
6065
- o("div", La, v(s.t("error.connectionFailed")), 1),
6066
- o("div", Ea, v(s.error), 1)
6115
+ o("div", Ea, v(s.t("error.connectionFailed")), 1),
6116
+ o("div", Ia, v(s.error), 1)
6067
6117
  ])
6068
6118
  ])
6069
- ])) : s.currentConv ? (c(), u(I, { key: 2 }, [
6070
- V(k, {
6119
+ ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
6120
+ $(k, {
6071
6121
  ref: "messageList",
6072
6122
  messages: s.displayedMessages,
6073
6123
  "streaming-active": s.streamingActive,
@@ -6081,8 +6131,8 @@ function Pa(e, t, n, i, r, s) {
6081
6131
  "ai-agent-avatar-url": s.agentAvatarUrl,
6082
6132
  onLoadMore: s.onLoadMore
6083
6133
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
6084
- o("div", Ia, [
6085
- s.floatVisible ? (c(), u("div", Ra, [
6134
+ o("div", Ra, [
6135
+ s.floatVisible ? (c(), u("div", Na, [
6086
6136
  s.approvalReady ? (c(), U(w, {
6087
6137
  key: 0,
6088
6138
  action: s.approvalTitle,
@@ -6097,7 +6147,7 @@ function Pa(e, t, n, i, r, s) {
6097
6147
  "agent-name": s.agentName,
6098
6148
  "agent-avatar-url": s.agentAvatarUrl,
6099
6149
  onSubmit: s.onFormSubmit
6100
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), U(E, {
6150
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), U(B, {
6101
6151
  key: 2,
6102
6152
  busy: r.feedbackBusy,
6103
6153
  done: r.feedbackDone,
@@ -6108,12 +6158,12 @@ function Pa(e, t, n, i, r, s) {
6108
6158
  onSelect: s.onSuggestion
6109
6159
  }, null, 8, ["items", "onSelect"]))
6110
6160
  ], 512)) : b("", !0),
6111
- s.actionInFlight ? (c(), u("div", Ba, [
6161
+ s.actionInFlight ? (c(), u("div", Fa, [
6112
6162
  t[8] || (t[8] = o("span", {
6113
6163
  class: "wm-actionWait__spinner",
6114
6164
  "aria-hidden": "true"
6115
6165
  }, null, -1)),
6116
- o("span", Na, v(s.t("action.inProgress", {
6166
+ o("span", Ua, v(s.t("action.inProgress", {
6117
6167
  name: s.actionInFlightName
6118
6168
  })), 1)
6119
6169
  ])) : (c(), U(H, {
@@ -6149,9 +6199,9 @@ function Pa(e, t, n, i, r, s) {
6149
6199
  onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
6150
6200
  onSubmit: s.onRenameSubmit
6151
6201
  }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
6152
- r.pendingAttachments.length ? (c(), u("div", Fa, [
6153
- (c(!0), u(I, null, j(r.pendingAttachments, (N, P) => (c(), u("div", {
6154
- key: P,
6202
+ r.pendingAttachments.length ? (c(), u("div", Da, [
6203
+ (c(!0), u(E, null, P(r.pendingAttachments, (N, D) => (c(), u("div", {
6204
+ key: D,
6155
6205
  class: "wm-attached__chip"
6156
6206
  }, [
6157
6207
  t[10] || (t[10] = o("svg", {
@@ -6171,7 +6221,7 @@ function Pa(e, t, n, i, r, s) {
6171
6221
  o("button", {
6172
6222
  type: "button",
6173
6223
  "aria-label": s.t("attachment.remove"),
6174
- onClick: (G) => r.pendingAttachments.splice(P, 1)
6224
+ onClick: (G) => r.pendingAttachments.splice(D, 1)
6175
6225
  }, [...t[9] || (t[9] = [
6176
6226
  o("svg", {
6177
6227
  width: "10",
@@ -6186,7 +6236,7 @@ function Pa(e, t, n, i, r, s) {
6186
6236
  }, [
6187
6237
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6188
6238
  ], -1)
6189
- ])], 8, Ua)
6239
+ ])], 8, Pa)
6190
6240
  ]))), 128))
6191
6241
  ])) : b("", !0)
6192
6242
  ], 64)) : (c(), U(p, {
@@ -6219,53 +6269,53 @@ function Pa(e, t, n, i, r, s) {
6219
6269
  ], 6)) : b("", !0)
6220
6270
  ], 2);
6221
6271
  }
6222
- const Ha = /* @__PURE__ */ B(Sa, [["render", Pa], ["__scopeId", "data-v-f55cad6a"]]), za = "0.5.26";
6272
+ const qa = /* @__PURE__ */ R(Ta, [["render", ja], ["__scopeId", "data-v-010fdbd1"]]), $a = "0.5.28";
6223
6273
  export {
6224
6274
  le as AIAvatar,
6225
6275
  ge as AVATAR_COLORS,
6226
6276
  ts as ActionResult,
6227
- di as ApprovalCard,
6277
+ hi as ApprovalCard,
6228
6278
  ds as ArtifactFormResponse,
6229
6279
  Cs as ArtifactInfoCard,
6230
6280
  zs as ArtifactRenderer,
6231
- Ps as ArtifactTicket,
6281
+ Ds as ArtifactTicket,
6232
6282
  er as AttachmentPreview,
6233
6283
  rr as Bubble,
6234
- Jr as Composer,
6284
+ Xr as Composer,
6235
6285
  Ze as DEFAULT_BASE_URL,
6236
6286
  ie as DEFAULT_LANGUAGE,
6237
- Qi as Feedback,
6238
- Ui as FormCard,
6287
+ Zi as Feedback,
6288
+ Pi as FormCard,
6239
6289
  ln as Header,
6240
- Ie as HumanAvatar,
6290
+ Re as HumanAvatar,
6241
6291
  Ft as Launcher,
6242
6292
  be as MEDIA_RECORDER_SUPPORTED,
6243
- Er as MessageList,
6244
- Ha as Messenger,
6245
- ha as MoreMenu,
6293
+ Ir as MessageList,
6294
+ qa as Messenger,
6295
+ fa as MoreMenu,
6246
6296
  qn as Onboarding,
6247
6297
  he as SCREEN_CAPTURE_SUPPORTED,
6248
6298
  et as SUPPORTED_LANGUAGES,
6249
- ei as SuggestionChips,
6299
+ ni as SuggestionChips,
6250
6300
  Gt as TeamAvatars,
6251
6301
  lr as Typing,
6252
- za as VERSION,
6302
+ $a as VERSION,
6253
6303
  ve as avatarColor,
6254
6304
  ye as avatarInitials,
6255
- Rr as captureScreenshotFile,
6305
+ Nr as captureScreenshotFile,
6256
6306
  z as colors,
6257
6307
  Qe as createStore,
6258
- D as createTranslator,
6308
+ j as createTranslator,
6259
6309
  We as createTransport,
6260
6310
  oe as dateLocale,
6261
- Ha as default,
6262
- Le as formatTime,
6263
- Da as guessAttachmentKind,
6264
- Ir as pickRecorderMime,
6311
+ qa as default,
6312
+ Ee as formatTime,
6313
+ za as guessAttachmentKind,
6314
+ Rr as pickRecorderMime,
6265
6315
  dn as renderInlineMarkdown,
6266
6316
  un as renderMarkdown,
6267
6317
  we as resolveLanguage,
6268
- Nr as startScreenRecording,
6318
+ Ur as startScreenRecording,
6269
6319
  Xe as tokensCss,
6270
6320
  Je as uuid,
6271
6321
  Je as v4