@_solaris/messenger-widget 0.5.14 → 0.5.16

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 H, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Pe, withCtx as Ue, Fragment as I, renderList as P, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as b, createBlock as N, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as He, markRaw as ke } from "vue";
1
+ import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Pe, withCtx as Ue, Fragment as R, renderList as j, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as P, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as He, markRaw as ke } from "vue";
2
2
  const qe = [
3
3
  "connected",
4
4
  "message",
@@ -93,10 +93,10 @@ function We(e) {
93
93
  }
94
94
  );
95
95
  if (!f.ok) {
96
- const L = await l(f), T = new Error(
96
+ const L = await l(f), x = new Error(
97
97
  `Session bootstrap failed: HTTP ${f.status} :: ${(L == null ? void 0 : L.error) || f.statusText}`
98
98
  );
99
- throw T.status = f.status, T.body = L, T;
99
+ throw x.status = f.status, x.body = L, x;
100
100
  }
101
101
  const _ = await f.json();
102
102
  t.userId = _.external_id;
@@ -106,23 +106,23 @@ function We(e) {
106
106
  { credentials: "include" }
107
107
  ).then(async (L) => {
108
108
  if (!L.ok) {
109
- const T = await l(L);
109
+ const x = await l(L);
110
110
  throw new Error(
111
- `HTTP ${L.status} GET /widgets/:id/config :: ${(T == null ? void 0 : T.error) || L.statusText}`
111
+ `HTTP ${L.status} GET /widgets/:id/config :: ${(x == null ? void 0 : x.error) || L.statusText}`
112
112
  );
113
113
  }
114
114
  return L.json();
115
115
  }),
116
116
  a("GET", "/customers/me")
117
117
  ]), S = { config: y, customer: (C == null ? void 0 : C.customer) ?? null };
118
- return t.lastBootstrap = S, await w(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
118
+ return t.lastBootstrap = S, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
119
119
  "visibilitychange",
120
120
  t.visibilityHandler
121
121
  )), de(), S;
122
122
  }
123
- async function w() {
123
+ async function k() {
124
124
  try {
125
- const d = await R();
125
+ const d = await I();
126
126
  t.lastActivityAt = d.reduce((f, _) => {
127
127
  const y = _ == null ? void 0 : _.last_message_at;
128
128
  return y && (!f || y > f) ? y : f;
@@ -131,22 +131,22 @@ function We(e) {
131
131
  console.error("[transport] initial /conversations failed", d);
132
132
  }
133
133
  }
134
- async function k() {
134
+ async function b() {
135
135
  const d = await a("GET", "/customers/me");
136
136
  return (d == null ? void 0 : d.customer) ?? null;
137
137
  }
138
- async function x(d) {
138
+ async function T(d) {
139
139
  const f = await a("PATCH", "/customers/me", d);
140
140
  return (f == null ? void 0 : f.customer) ?? null;
141
141
  }
142
- async function R() {
142
+ async function I() {
143
143
  const d = await a("GET", "/conversations");
144
144
  return (d == null ? void 0 : d.conversations) ?? [];
145
145
  }
146
146
  async function A(d = {}) {
147
147
  return (await a("POST", "/conversations", d)).conversation;
148
148
  }
149
- async function q(d) {
149
+ async function z(d) {
150
150
  return (await a(
151
151
  "GET",
152
152
  `/conversations/${encodeURIComponent(d)}`
@@ -159,14 +159,14 @@ function We(e) {
159
159
  f
160
160
  )).conversation;
161
161
  }
162
- async function j(d, f) {
162
+ async function F(d, f) {
163
163
  return a(
164
164
  "PATCH",
165
165
  `/conversations/${encodeURIComponent(d)}/read`,
166
166
  { message_id: f }
167
167
  );
168
168
  }
169
- async function F(d, f = {}) {
169
+ async function N(d, f = {}) {
170
170
  const _ = new URLSearchParams();
171
171
  f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
172
172
  const y = _.toString() ? `?${_.toString()}` : "";
@@ -175,7 +175,7 @@ function We(e) {
175
175
  `/conversations/${encodeURIComponent(d)}/messages${y}`
176
176
  );
177
177
  }
178
- async function z(d, f) {
178
+ async function U(d, f) {
179
179
  se();
180
180
  const _ = {
181
181
  client_msg_id: f.client_msg_id,
@@ -261,7 +261,7 @@ function We(e) {
261
261
  }
262
262
  async function me() {
263
263
  try {
264
- const d = await R(), f = d.reduce((y, C) => {
264
+ const d = await I(), f = d.reduce((y, C) => {
265
265
  const S = C == null ? void 0 : C.last_message_at;
266
266
  return S && (!y || S > y) ? S : y;
267
267
  }, null);
@@ -301,15 +301,15 @@ function We(e) {
301
301
  stop: g,
302
302
  setPanelOpen: ce,
303
303
  // REST
304
- getCustomer: k,
305
- patchCustomer: x,
306
- listConversations: R,
304
+ getCustomer: b,
305
+ patchCustomer: T,
306
+ listConversations: I,
307
307
  createConversation: A,
308
- getConversation: q,
308
+ getConversation: z,
309
309
  patchConversation: M,
310
- markConversationRead: j,
311
- listMessages: F,
312
- postMessage: z,
310
+ markConversationRead: F,
311
+ listMessages: N,
312
+ postMessage: U,
313
313
  postCallback: W,
314
314
  uploadAttachment: Z,
315
315
  signAttachment: ee,
@@ -459,7 +459,7 @@ function Qe(e) {
459
459
  async function p(h) {
460
460
  const m = t.paginationByConv[h];
461
461
  if (!(m != null && m.loaded || m != null && m.loading)) {
462
- k(h, { nextCursor: null, loading: !0, loaded: !1 });
462
+ b(h, { nextCursor: null, loading: !0, loaded: !1 });
463
463
  try {
464
464
  const g = await e.listMessages(h, {
465
465
  limit: l
@@ -469,13 +469,13 @@ function Qe(e) {
469
469
  const y = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
470
470
  t.messagesByConv[h] = [...d, ...y].sort(
471
471
  ce
472
- ), k(h, {
472
+ ), b(h, {
473
473
  nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
474
474
  loading: !1,
475
475
  loaded: !0
476
476
  });
477
477
  } catch (g) {
478
- console.error("[store] openConversation failed", g), k(h, {
478
+ console.error("[store] openConversation failed", g), b(h, {
479
479
  nextCursor: null,
480
480
  loading: !1,
481
481
  loaded: !1
@@ -483,39 +483,39 @@ function Qe(e) {
483
483
  }
484
484
  }
485
485
  }
486
- async function w(h) {
486
+ async function k(h) {
487
487
  var f;
488
488
  const m = t.paginationByConv[h];
489
489
  if (!m || m.loading || !m.nextCursor) return;
490
490
  const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
491
491
  if (d) {
492
- k(h, { ...m, loading: !0 });
492
+ b(h, { ...m, loading: !0 });
493
493
  try {
494
494
  const _ = await e.listMessages(h, {
495
495
  before: d,
496
496
  limit: l
497
497
  }), y = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
498
- for (const T of C)
499
- (T == null ? void 0 : T.id) != null && S.add(`id:${String(T.id)}`), T != null && T.client_msg_id && S.add(`c:${T.client_msg_id}`);
500
- const L = y.filter((T) => !((T == null ? void 0 : T.id) != null && S.has(`id:${String(T.id)}`) || T != null && T.client_msg_id && S.has(`c:${T.client_msg_id}`)));
501
- t.messagesByConv[h] = [...L, ...C], k(h, {
498
+ for (const x of C)
499
+ (x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
500
+ const L = y.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
501
+ t.messagesByConv[h] = [...L, ...C], b(h, {
502
502
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
503
503
  loading: !1,
504
504
  loaded: !0
505
505
  });
506
506
  } catch (_) {
507
- console.error("[store] loadMore failed", _), k(h, { ...m, loading: !1 });
507
+ console.error("[store] loadMore failed", _), b(h, { ...m, loading: !1 });
508
508
  }
509
509
  }
510
510
  }
511
- function k(h, m) {
511
+ function b(h, m) {
512
512
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
513
513
  }
514
- async function x(h, m) {
514
+ async function T(h, m) {
515
515
  const g = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
516
516
  d !== -1 && (t.conversations[d] = g);
517
517
  }
518
- async function R(h) {
518
+ async function I(h) {
519
519
  if (!h) return [];
520
520
  const m = t.messagesByConv[h] || [];
521
521
  let g = "";
@@ -552,7 +552,7 @@ function Qe(e) {
552
552
  console.error("[store] markConversationRead failed", g);
553
553
  }
554
554
  }
555
- async function q(h, m, { attachments: g, metadata: d } = {}) {
555
+ async function z(h, m, { attachments: g, metadata: d } = {}) {
556
556
  var L;
557
557
  const f = (m || "").trim(), _ = Array.isArray(g) && g.length > 0;
558
558
  if (!h || !f && !_) return;
@@ -581,8 +581,8 @@ function Qe(e) {
581
581
  ..._ ? { attachments: g } : {},
582
582
  ...d && typeof d == "object" ? { metadata: d } : {}
583
583
  });
584
- } catch (T) {
585
- console.error("[store] send failed", T), G(h, y, {
584
+ } catch (x) {
585
+ console.error("[store] send failed", x), G(h, y, {
586
586
  _failed: !0,
587
587
  _pending: !1
588
588
  });
@@ -596,10 +596,10 @@ function Qe(e) {
596
596
  console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
597
597
  }
598
598
  }
599
- const j = /* @__PURE__ */ new Map();
600
- async function F(h) {
599
+ const F = /* @__PURE__ */ new Map();
600
+ async function N(h) {
601
601
  if (!h) return null;
602
- const m = j.get(h);
602
+ const m = F.get(h);
603
603
  if (m != null && m.url) {
604
604
  const g = m.expires_at ? Date.parse(m.expires_at) : 0;
605
605
  if (!g || g - Date.now() > 6e4) return m.url;
@@ -607,7 +607,7 @@ function Qe(e) {
607
607
  try {
608
608
  const g = await e.signAttachment(h);
609
609
  if (g != null && g.signed_url)
610
- return j.set(h, {
610
+ return F.set(h, {
611
611
  url: g.signed_url,
612
612
  expires_at: g.expires_at
613
613
  }), g.signed_url;
@@ -616,7 +616,7 @@ function Qe(e) {
616
616
  }
617
617
  return null;
618
618
  }
619
- async function z(h, { rating: m, comment: g } = {}) {
619
+ async function U(h, { rating: m, comment: g } = {}) {
620
620
  const d = t.conversations.find((y) => y.id === h), _ = {
621
621
  ...(d == null ? void 0 : d.metadata) || {},
622
622
  feedback: {
@@ -625,7 +625,7 @@ function Qe(e) {
625
625
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
626
626
  }
627
627
  };
628
- await x(h, { metadata: _ });
628
+ await T(h, { metadata: _ });
629
629
  }
630
630
  function W(h) {
631
631
  var g, d;
@@ -670,14 +670,14 @@ function Qe(e) {
670
670
  const S = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
671
671
  return Array.isArray(S) && S.length ? S.map((L) => {
672
672
  if (typeof L == "string") {
673
- const T = L.trim();
674
- return T ? { label: T, kind: null } : null;
673
+ const x = L.trim();
674
+ return x ? { label: x, kind: null } : null;
675
675
  }
676
676
  if (L && typeof L == "object" && typeof L.label == "string") {
677
- const T = L.label.trim();
678
- if (!T) return null;
677
+ const x = L.label.trim();
678
+ if (!x) return null;
679
679
  const Ne = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
680
- return { label: T, kind: Ne };
680
+ return { label: x, kind: Ne };
681
681
  }
682
682
  return null;
683
683
  }).filter(Boolean).slice(0, 4) : [];
@@ -746,14 +746,14 @@ function Qe(e) {
746
746
  applyCustomer: s,
747
747
  createConversation: a,
748
748
  openConversation: p,
749
- loadMore: w,
750
- fetchSinceLast: R,
751
- patchConversation: x,
749
+ loadMore: k,
750
+ fetchSinceLast: I,
751
+ patchConversation: T,
752
752
  markConversationRead: A,
753
- send: q,
753
+ send: z,
754
754
  clickCallback: M,
755
- signAttachment: F,
756
- submitFeedback: z,
755
+ signAttachment: N,
756
+ submitFeedback: U,
757
757
  getPendingApproval: W,
758
758
  getActionInFlight: ee,
759
759
  getLatestSuggestions: te,
@@ -762,7 +762,7 @@ function Qe(e) {
762
762
  setPanelOpen: e.setPanelOpen
763
763
  };
764
764
  }
765
- const D = {
765
+ const H = {
766
766
  w: "#ffffff",
767
767
  g50: "#F9F9F7",
768
768
  g100: "#F2F1EE",
@@ -801,21 +801,21 @@ const Xe = `
801
801
  .wm-root {
802
802
  --wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
803
803
  --wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
804
- --wm-w: ${D.w};
805
- --wm-g50: ${D.g50};
806
- --wm-g100: ${D.g100};
807
- --wm-g150: ${D.g150};
808
- --wm-g200: ${D.g200};
809
- --wm-g300: ${D.g300};
810
- --wm-g400: ${D.g400};
811
- --wm-g500: ${D.g500};
812
- --wm-g700: ${D.g700};
813
- --wm-g900: ${D.g900};
814
- --wm-a: ${D.accent};
815
- --wm-al: ${D.accentLight};
816
- --wm-green: ${D.green};
817
- --wm-red: ${D.red};
818
- --wm-redBg: ${D.redBg};
804
+ --wm-w: ${H.w};
805
+ --wm-g50: ${H.g50};
806
+ --wm-g100: ${H.g100};
807
+ --wm-g150: ${H.g150};
808
+ --wm-g200: ${H.g200};
809
+ --wm-g300: ${H.g300};
810
+ --wm-g400: ${H.g400};
811
+ --wm-g500: ${H.g500};
812
+ --wm-g700: ${H.g700};
813
+ --wm-g900: ${H.g900};
814
+ --wm-a: ${H.accent};
815
+ --wm-al: ${H.accentLight};
816
+ --wm-green: ${H.green};
817
+ --wm-red: ${H.red};
818
+ --wm-redBg: ${H.redBg};
819
819
  --wm-sh1: 0 1px 3px rgba(0,0,0,.06);
820
820
  --wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
821
821
  --wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
@@ -1091,13 +1091,13 @@ function we(e) {
1091
1091
  function oe(e) {
1092
1092
  return Ce[we(e)] || Ce[ie];
1093
1093
  }
1094
- function U(e) {
1094
+ function D(e) {
1095
1095
  const t = we(e), n = _e[t] || _e[ie], i = _e[ie];
1096
1096
  return function(s, a) {
1097
1097
  let l = n[s];
1098
1098
  return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
1099
1099
  /\{(\w+)\}/g,
1100
- (p, w) => a[w] != null ? String(a[w]) : p
1100
+ (p, k) => a[k] != null ? String(a[k]) : p
1101
1101
  )), l);
1102
1102
  };
1103
1103
  }
@@ -1109,7 +1109,7 @@ function Ae(e, t) {
1109
1109
  function Ie(e, t, n) {
1110
1110
  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));
1111
1111
  }
1112
- function tt(e, t, n = U()) {
1112
+ function tt(e, t, n = D()) {
1113
1113
  if (!e || !t) return "";
1114
1114
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1115
1115
  for (const s of i) {
@@ -1124,7 +1124,7 @@ ${l}`);
1124
1124
 
1125
1125
  `);
1126
1126
  }
1127
- function nt(e, t, n = U()) {
1127
+ function nt(e, t, n = D()) {
1128
1128
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1129
1129
  for (const s of r) {
1130
1130
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
@@ -1194,7 +1194,7 @@ function it(e, t, n, i) {
1194
1194
  return r.join(`
1195
1195
  `);
1196
1196
  }
1197
- function at(e, t, n = U(), i) {
1197
+ function at(e, t, n = D(), i) {
1198
1198
  if (!e) return;
1199
1199
  const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1200
1200
  try {
@@ -1478,10 +1478,10 @@ const ot = {
1478
1478
  this.nextRevealAt + ht
1479
1479
  ) + r;
1480
1480
  this.nextRevealAt = a;
1481
- const l = Math.max(0, a - n), p = e.id, w = setTimeout(() => {
1482
- this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((k) => k !== w), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1481
+ const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
1482
+ this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1483
1483
  }, l);
1484
- this.revealTimers.push(w);
1484
+ this.revealTimers.push(k);
1485
1485
  },
1486
1486
  // Walk the message list and queue / instantly-reveal every new
1487
1487
  // entry according to its origin. Used by the `currentConvMessages`
@@ -1648,7 +1648,7 @@ const B = (e, t) => {
1648
1648
  function wt(e, t, n, i, r, s) {
1649
1649
  return c(), u("div", {
1650
1650
  class: O(["wm-huav", { "wm-huav--tail": n.tail }]),
1651
- style: H({
1651
+ style: q({
1652
1652
  width: n.size + "px",
1653
1653
  height: n.size + "px",
1654
1654
  "--wm-avr": Math.round(n.size * 0.32) + "px",
@@ -1661,17 +1661,17 @@ function wt(e, t, n, i, r, s) {
1661
1661
  alt: n.name || ""
1662
1662
  }, null, 8, yt)) : (c(), u("span", {
1663
1663
  key: 1,
1664
- style: H({ fontSize: n.size * 0.36 + "px" })
1664
+ style: q({ fontSize: n.size * 0.36 + "px" })
1665
1665
  }, v(s.initials), 5))
1666
1666
  ], 6);
1667
1667
  }
1668
- const Ee = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1668
+ const Re = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1669
1669
  name: "WmLauncher",
1670
- components: { HumanAvatar: Ee },
1670
+ components: { HumanAvatar: Re },
1671
1671
  inject: {
1672
1672
  // Translator shared by the Messenger shell; French fallback when
1673
1673
  // the component is used standalone.
1674
- t: { default: () => U() }
1674
+ t: { default: () => D() }
1675
1675
  },
1676
1676
  props: {
1677
1677
  // Nombre de conversations non lues — pilote la pastille.
@@ -1691,7 +1691,7 @@ const Ee = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
1691
1691
  return this.peeks.slice(0, bt).reverse();
1692
1692
  }
1693
1693
  }
1694
- }, 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" }, It = { class: "wm-peek__text" }, Et = ["onClick"], Rt = ["aria-label"], Bt = ["aria-label"];
1694
+ }, 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" }, It = { class: "wm-peek__text" }, Rt = ["onClick"], Et = ["aria-label"], Bt = ["aria-label"];
1695
1695
  function Nt(e, t, n, i, r, s) {
1696
1696
  const a = E("HumanAvatar");
1697
1697
  return c(), u("div", {
@@ -1707,10 +1707,10 @@ function Nt(e, t, n, i, r, s) {
1707
1707
  key: 0,
1708
1708
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1709
1709
  }, [
1710
- (c(!0), u(I, null, P(s.visiblePeeks, (l, p) => (c(), u("div", {
1710
+ (c(!0), u(R, null, j(s.visiblePeeks, (l, p) => (c(), u("div", {
1711
1711
  key: l.convId,
1712
1712
  class: "wm-peek",
1713
- style: H({
1713
+ style: q({
1714
1714
  "--depth": s.visiblePeeks.length - 1 - p,
1715
1715
  zIndex: p + 1
1716
1716
  }),
@@ -1719,17 +1719,17 @@ function Nt(e, t, n, i, r, s) {
1719
1719
  "aria-label": s.t("launcher.openConversationWith", {
1720
1720
  name: l.senderName || s.t("launcher.theAgent")
1721
1721
  }),
1722
- onClick: (w) => e.$emit("open", l.convId),
1722
+ onClick: (k) => e.$emit("open", l.convId),
1723
1723
  onKeydown: [
1724
- ue(Y((w) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1725
- ue(Y((w) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1724
+ ue(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1725
+ ue(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1726
1726
  ]
1727
1727
  }, [
1728
1728
  o("button", {
1729
1729
  type: "button",
1730
1730
  class: "wm-peek__close",
1731
1731
  "aria-label": s.t("launcher.dismiss"),
1732
- onClick: Y((w) => e.$emit("dismiss", l.convId), ["stop"])
1732
+ onClick: Y((k) => e.$emit("dismiss", l.convId), ["stop"])
1733
1733
  }, [...t[5] || (t[5] = [
1734
1734
  o("svg", {
1735
1735
  width: "9",
@@ -1755,7 +1755,7 @@ function Nt(e, t, n, i, r, s) {
1755
1755
  key: 0,
1756
1756
  class: "wm-peek__avatarBadge",
1757
1757
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1758
- }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : b("", !0)
1758
+ }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : w("", !0)
1759
1759
  ]),
1760
1760
  o("div", Tt, [
1761
1761
  o("div", xt, [
@@ -1767,10 +1767,10 @@ function Nt(e, t, n, i, r, s) {
1767
1767
  o("button", {
1768
1768
  type: "button",
1769
1769
  class: "wm-peek__open",
1770
- onClick: Y((w) => e.$emit("open", l.convId), ["stop"])
1771
- }, v(s.t("common.open")), 9, Et)
1770
+ onClick: Y((k) => e.$emit("open", l.convId), ["stop"])
1771
+ }, v(s.t("common.open")), 9, Rt)
1772
1772
  ], 44, Ct))), 128))
1773
- ], 2)) : b("", !0)
1773
+ ], 2)) : w("", !0)
1774
1774
  ]),
1775
1775
  _: 1
1776
1776
  }),
@@ -1801,11 +1801,11 @@ function Nt(e, t, n, i, r, s) {
1801
1801
  }) : s.t("launcher.unreadConversationsOne", {
1802
1802
  count: n.unreadCount
1803
1803
  })
1804
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : b("", !0)
1805
- ], 8, Rt)
1804
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : w("", !0)
1805
+ ], 8, Et)
1806
1806
  ], 32);
1807
1807
  }
1808
- const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-1fda084c"]]), Pt = {
1808
+ const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-9d7efc48"]]), Pt = {
1809
1809
  name: "WmAIAvatar",
1810
1810
  props: {
1811
1811
  size: { type: Number, default: 26 },
@@ -1841,20 +1841,20 @@ const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-1fda084c
1841
1841
  function zt(e, t, n, i, r, s) {
1842
1842
  return c(), u("div", {
1843
1843
  class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1844
- style: H({
1844
+ style: q({
1845
1845
  width: n.size + "px",
1846
1846
  height: n.size + "px",
1847
1847
  "--wm-avr": n.size * 0.32 + "px"
1848
1848
  })
1849
1849
  }, [
1850
- n.pulse ? (c(), u("div", Ut)) : b("", !0),
1850
+ n.pulse ? (c(), u("div", Ut)) : w("", !0),
1851
1851
  o("div", {
1852
1852
  class: O(["wm-aiav__inner", {
1853
1853
  "wm-aiav__inner--glow": n.pulse,
1854
1854
  "wm-aiav__inner--img": !!n.imageUrl,
1855
1855
  "wm-aiav__inner--initials": !n.imageUrl && !!s.initials
1856
1856
  }]),
1857
- style: H(
1857
+ style: q(
1858
1858
  !n.imageUrl && s.initials ? { background: s.bgColor } : null
1859
1859
  )
1860
1860
  }, [
@@ -1864,7 +1864,7 @@ function zt(e, t, n, i, r, s) {
1864
1864
  alt: n.name || ""
1865
1865
  }, null, 8, jt)) : s.initials ? (c(), u("span", {
1866
1866
  key: 1,
1867
- style: H({ fontSize: n.size * 0.36 + "px" })
1867
+ style: q({ fontSize: n.size * 0.36 + "px" })
1868
1868
  }, v(s.initials), 5)) : (c(), u("svg", {
1869
1869
  key: 2,
1870
1870
  width: n.size * 0.5,
@@ -1929,12 +1929,12 @@ function Wt(e, t, n, i, r, s) {
1929
1929
  return s.visible ? (c(), u("div", qt, [
1930
1930
  o("div", {
1931
1931
  class: "wm-team__stack",
1932
- style: H({ width: s.stackWidth + "px" })
1932
+ style: q({ width: s.stackWidth + "px" })
1933
1933
  }, [
1934
- (c(!0), u(I, null, P(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1934
+ (c(!0), u(R, null, j(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1935
1935
  key: l,
1936
1936
  class: "wm-team__pill",
1937
- style: H({
1937
+ style: q({
1938
1938
  left: l * 13 + "px",
1939
1939
  zIndex: 3 - l,
1940
1940
  background: s.colorFor(a)
@@ -1947,8 +1947,8 @@ function Wt(e, t, n, i, r, s) {
1947
1947
  }, null, 8, $t)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1948
1948
  ], 4))), 128))
1949
1949
  ], 4),
1950
- n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
1951
- ])) : b("", !0);
1950
+ n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : w("", !0)
1951
+ ])) : w("", !0);
1952
1952
  }
1953
1953
  const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1954
1954
  name: "WmHeader",
@@ -1956,7 +1956,7 @@ const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063
1956
1956
  inject: {
1957
1957
  // Translator shared by the Messenger shell. Falls back to a French
1958
1958
  // translator when the component is used standalone (no provider).
1959
- t: { default: () => U() }
1959
+ t: { default: () => D() }
1960
1960
  },
1961
1961
  props: {
1962
1962
  title: { type: String, default: "Nouvelle conversation" },
@@ -2020,7 +2020,7 @@ function on(e, t, n, i, r, s) {
2020
2020
  o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2021
2021
  ], -1)
2022
2022
  ])], 8, Qt)) : (c(), u("div", Xt)),
2023
- n.showIdentity ? (c(), u(I, { key: 2 }, [
2023
+ n.showIdentity ? (c(), u(R, { key: 2 }, [
2024
2024
  o("div", Zt, [
2025
2025
  V(a, {
2026
2026
  size: 30,
@@ -2031,11 +2031,11 @@ function on(e, t, n, i, r, s) {
2031
2031
  o("div", en, [
2032
2032
  o("div", tn, v(n.title), 1)
2033
2033
  ]),
2034
- s.hasTeam ? (c(), N(l, {
2034
+ s.hasTeam ? (c(), P(l, {
2035
2035
  key: 0,
2036
2036
  members: s.displayedTeamMembers,
2037
2037
  "response-label": ""
2038
- }, null, 8, ["members"])) : b("", !0)
2038
+ }, null, 8, ["members"])) : w("", !0)
2039
2039
  ], 64)) : (c(), u("div", nn)),
2040
2040
  o("div", sn, [
2041
2041
  n.showMore ? (c(), u("button", {
@@ -2069,7 +2069,7 @@ function on(e, t, n, i, r, s) {
2069
2069
  r: "1.6"
2070
2070
  })
2071
2071
  ], -1)
2072
- ])], 10, rn)) : b("", !0),
2072
+ ])], 10, rn)) : w("", !0),
2073
2073
  n.showClose ? (c(), u("button", {
2074
2074
  key: 1,
2075
2075
  type: "button",
@@ -2091,12 +2091,12 @@ function on(e, t, n, i, r, s) {
2091
2091
  }, [
2092
2092
  o("path", { d: "M18 6L6 18M6 6l12 12" })
2093
2093
  ], -1)
2094
- ])], 8, an)) : b("", !0)
2094
+ ])], 8, an)) : w("", !0)
2095
2095
  ])
2096
2096
  ]);
2097
2097
  }
2098
2098
  const ln = /* @__PURE__ */ B(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
2099
- function Re(e) {
2099
+ function Ee(e) {
2100
2100
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2101
2101
  }
2102
2102
  function cn(e) {
@@ -2114,62 +2114,62 @@ function re(e) {
2114
2114
  function dn(e) {
2115
2115
  if (!e) return "";
2116
2116
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2117
- return re(Re(t));
2117
+ return re(Ee(t));
2118
2118
  }
2119
2119
  function un(e) {
2120
2120
  if (!e) return "";
2121
- const t = Re(e).split(`
2121
+ const t = Ee(e).split(`
2122
2122
  `), n = [];
2123
2123
  let i = 0;
2124
2124
  for (; i < t.length; ) {
2125
2125
  const s = t[i];
2126
2126
  if (/^\s*```([\w-]*)\s*$/.exec(s)) {
2127
2127
  i++;
2128
- const w = [];
2128
+ const k = [];
2129
2129
  for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
2130
- w.push(t[i]), i++;
2130
+ k.push(t[i]), i++;
2131
2131
  i < t.length && i++, n.push({
2132
2132
  type: "block",
2133
- html: `<pre class="wm-md-pre"><code>${w.join(`
2133
+ html: `<pre class="wm-md-pre"><code>${k.join(`
2134
2134
  `)}</code></pre>`
2135
2135
  });
2136
2136
  continue;
2137
2137
  }
2138
2138
  if (/^\s*[-*]\s+/.test(s)) {
2139
- const w = [];
2139
+ const k = [];
2140
2140
  for (; i < t.length; ) {
2141
- const x = /^\s*[-*]\s+(.*)$/.exec(t[i]);
2142
- if (!x) break;
2143
- w.push(x[1]), i++;
2141
+ const T = /^\s*[-*]\s+(.*)$/.exec(t[i]);
2142
+ if (!T) break;
2143
+ k.push(T[1]), i++;
2144
2144
  }
2145
- const k = w.map((x) => `<li>${re(x)}</li>`).join("");
2145
+ const b = k.map((T) => `<li>${re(T)}</li>`).join("");
2146
2146
  n.push({
2147
2147
  type: "block",
2148
- html: `<ul class="wm-md-ul">${k}</ul>`
2148
+ html: `<ul class="wm-md-ul">${b}</ul>`
2149
2149
  });
2150
2150
  continue;
2151
2151
  }
2152
2152
  const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
2153
2153
  if (l) {
2154
- const w = parseInt(l[1], 10), k = [l[2]];
2154
+ const k = parseInt(l[1], 10), b = [l[2]];
2155
2155
  for (i++; i < t.length; ) {
2156
2156
  const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
2157
2157
  if (!A) break;
2158
- k.push(A[1]), i++;
2158
+ b.push(A[1]), i++;
2159
2159
  }
2160
- const x = k.map((A) => `<li>${re(A)}</li>`).join(""), R = w !== 1 ? ` start="${w}"` : "";
2160
+ const T = b.map((A) => `<li>${re(A)}</li>`).join(""), I = k !== 1 ? ` start="${k}"` : "";
2161
2161
  n.push({
2162
2162
  type: "block",
2163
- html: `<ol class="wm-md-ol"${R}>${x}</ol>`
2163
+ html: `<ol class="wm-md-ol"${I}>${T}</ol>`
2164
2164
  });
2165
2165
  continue;
2166
2166
  }
2167
2167
  const p = /^(#{1,6})\s+(.*)$/.exec(s);
2168
2168
  if (p) {
2169
- const w = p[1].length;
2169
+ const k = p[1].length;
2170
2170
  n.push({
2171
2171
  type: "block",
2172
- html: `<h${w} class="wm-md-h wm-md-h${w}">${re(p[2])}</h${w}>`
2172
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${re(p[2])}</h${k}>`
2173
2173
  }), i++;
2174
2174
  continue;
2175
2175
  }
@@ -2197,7 +2197,7 @@ const Te = {
2197
2197
  inject: {
2198
2198
  // Translator + resolved-language getter shared by the Messenger
2199
2199
  // shell. Fall back to French wording when used standalone.
2200
- t: { default: () => U() },
2200
+ t: { default: () => D() },
2201
2201
  wmLocale: { default: () => () => "fr" }
2202
2202
  },
2203
2203
  props: {
@@ -2279,7 +2279,7 @@ const Te = {
2279
2279
  }, On = {
2280
2280
  key: 1,
2281
2281
  class: "wm-onb__section"
2282
- }, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], Rn = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Pn = { class: "wm-onb__thread-title" }, Un = ["innerHTML"], jn = { class: "wm-onb__thread-meta" }, Dn = {
2282
+ }, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, Rn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Pn = { class: "wm-onb__thread-title" }, Un = ["innerHTML"], jn = { class: "wm-onb__thread-meta" }, Dn = {
2283
2283
  key: 0,
2284
2284
  class: "wm-onb__thread-time"
2285
2285
  }, zn = {
@@ -2363,11 +2363,11 @@ function Hn(e, t, n, i, r, s) {
2363
2363
  o("div", {
2364
2364
  class: O(s.quickLinksLayout)
2365
2365
  }, [
2366
- (c(!0), u(I, null, P(n.quickLinks, (l, p) => (c(), u("button", {
2366
+ (c(!0), u(R, null, j(n.quickLinks, (l, p) => (c(), u("button", {
2367
2367
  key: p,
2368
2368
  type: "button",
2369
2369
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
2370
- onClick: (w) => e.$emit("select", l)
2370
+ onClick: (k) => e.$emit("select", l)
2371
2371
  }, [
2372
2372
  o("span", Cn, [
2373
2373
  (c(), u("svg", An, [
@@ -2378,11 +2378,11 @@ function Hn(e, t, n, i, r, s) {
2378
2378
  ]),
2379
2379
  o("span", Mn, [
2380
2380
  o("span", Tn, v(l.label), 1),
2381
- l.description ? (c(), u("span", xn, v(l.description), 1)) : b("", !0)
2381
+ l.description ? (c(), u("span", xn, v(l.description), 1)) : w("", !0)
2382
2382
  ])
2383
2383
  ], 10, kn))), 128))
2384
2384
  ], 2)
2385
- ])) : b("", !0),
2385
+ ])) : w("", !0),
2386
2386
  n.openThreads.length ? (c(), u("div", On, [
2387
2387
  o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
2388
2388
  o("div", In, [
@@ -2406,12 +2406,12 @@ function Hn(e, t, n, i, r, s) {
2406
2406
  type: "text",
2407
2407
  placeholder: s.t("onboarding.search"),
2408
2408
  "aria-label": s.t("onboarding.search")
2409
- }, null, 8, En), [
2409
+ }, null, 8, Rn), [
2410
2410
  [X, r.query]
2411
2411
  ])
2412
2412
  ]),
2413
- o("div", Rn, [
2414
- (c(!0), u(I, null, P(s.filteredThreads, (l) => (c(), u("button", {
2413
+ o("div", En, [
2414
+ (c(!0), u(R, null, j(s.filteredThreads, (l) => (c(), u("button", {
2415
2415
  key: l.id,
2416
2416
  type: "button",
2417
2417
  class: "wm-onb__thread",
@@ -2437,7 +2437,7 @@ function Hn(e, t, n, i, r, s) {
2437
2437
  key: 0,
2438
2438
  class: "wm-onb__thread-dot",
2439
2439
  "aria-label": s.t("onboarding.unread")
2440
- }, null, 8, Nn)) : b("", !0)
2440
+ }, null, 8, Nn)) : w("", !0)
2441
2441
  ], 2),
2442
2442
  o("span", Fn, [
2443
2443
  o("span", Pn, v(l.title), 1),
@@ -2447,7 +2447,7 @@ function Hn(e, t, n, i, r, s) {
2447
2447
  }, null, 8, Un)
2448
2448
  ]),
2449
2449
  o("span", jn, [
2450
- s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : b("", !0),
2450
+ s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : w("", !0),
2451
2451
  t[6] || (t[6] = o("svg", {
2452
2452
  width: "14",
2453
2453
  height: "14",
@@ -2464,9 +2464,9 @@ function Hn(e, t, n, i, r, s) {
2464
2464
  ], -1))
2465
2465
  ])
2466
2466
  ], 8, Bn))), 128)),
2467
- s.filteredThreads.length ? b("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2467
+ s.filteredThreads.length ? w("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2468
2468
  ])
2469
- ])) : b("", !0)
2469
+ ])) : w("", !0)
2470
2470
  ]);
2471
2471
  }
2472
2472
  const qn = /* @__PURE__ */ B(hn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
@@ -2564,13 +2564,13 @@ function es(e, t, n, i, r, s) {
2564
2564
  ]),
2565
2565
  o("span", Qn, [
2566
2566
  o("span", Xn, v(n.label), 1),
2567
- s.detailText ? (c(), u(I, { key: 0 }, [
2567
+ s.detailText ? (c(), u(R, { key: 0 }, [
2568
2568
  t[4] || (t[4] = o("span", {
2569
2569
  class: "wm-result__sep",
2570
2570
  "aria-hidden": "true"
2571
2571
  }, " · ", -1)),
2572
2572
  o("span", Zn, v(s.detailText), 1)
2573
- ], 64)) : b("", !0)
2573
+ ], 64)) : w("", !0)
2574
2574
  ])
2575
2575
  ], 2);
2576
2576
  }
@@ -2579,7 +2579,7 @@ const ts = /* @__PURE__ */ B(Vn, [["render", es], ["__scopeId", "data-v-7284acd0
2579
2579
  inject: {
2580
2580
  // Translator shared by the Messenger shell; French fallback when
2581
2581
  // the component is used standalone.
2582
- t: { default: () => U() }
2582
+ t: { default: () => D() }
2583
2583
  },
2584
2584
  props: {
2585
2585
  data: { type: Object, required: !0 }
@@ -2613,7 +2613,7 @@ function cs(e, t, n, i, r, s) {
2613
2613
  ])
2614
2614
  ]),
2615
2615
  o("div", os, [
2616
- (c(!0), u(I, null, P(s.fields, (a, l) => (c(), u("div", {
2616
+ (c(!0), u(R, null, j(s.fields, (a, l) => (c(), u("div", {
2617
2617
  key: l,
2618
2618
  class: "wm-art__field"
2619
2619
  }, [
@@ -2664,11 +2664,11 @@ function ks(e, t, n, i, r, s) {
2664
2664
  alt: n.data.title || "",
2665
2665
  loading: "lazy"
2666
2666
  }, null, 8, fs)
2667
- ])) : b("", !0),
2667
+ ])) : w("", !0),
2668
2668
  o("div", gs, [
2669
2669
  o("div", _s, [
2670
2670
  o("div", ps, v(n.data.title), 1),
2671
- n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : b("", !0)
2671
+ n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : w("", !0)
2672
2672
  ]),
2673
2673
  n.data.badge && n.data.badge.label ? (c(), u("span", {
2674
2674
  key: 0,
@@ -2676,11 +2676,11 @@ function ks(e, t, n, i, r, s) {
2676
2676
  "wm-art__badge",
2677
2677
  `wm-art__badge--${n.data.badge.tone || "neutral"}`
2678
2678
  ])
2679
- }, v(n.data.badge.label), 3)) : b("", !0)
2679
+ }, v(n.data.badge.label), 3)) : w("", !0)
2680
2680
  ]),
2681
2681
  s.hasBody ? (c(), u("div", ys, [
2682
- n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : b("", !0),
2683
- s.fields.length ? (c(!0), u(I, { key: 1 }, P(s.fields, (a, l) => (c(), u("div", {
2682
+ n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : w("", !0),
2683
+ s.fields.length ? (c(!0), u(R, { key: 1 }, j(s.fields, (a, l) => (c(), u("div", {
2684
2684
  key: l,
2685
2685
  class: "wm-art__field"
2686
2686
  }, [
@@ -2691,8 +2691,8 @@ function ks(e, t, n, i, r, s) {
2691
2691
  { "wm-art__fieldValue--multi": a.multiline }
2692
2692
  ])
2693
2693
  }, v(a.value), 3)
2694
- ]))), 128)) : b("", !0)
2695
- ])) : b("", !0)
2694
+ ]))), 128)) : w("", !0)
2695
+ ])) : w("", !0)
2696
2696
  ]);
2697
2697
  }
2698
2698
  const Cs = /* @__PURE__ */ B(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
@@ -2715,7 +2715,7 @@ const Ss = {
2715
2715
  inject: {
2716
2716
  // Translator + resolved-language getter shared by the Messenger
2717
2717
  // shell. Fall back to French wording when used standalone.
2718
- t: { default: () => U() },
2718
+ t: { default: () => D() },
2719
2719
  wmLocale: { default: () => () => "fr" }
2720
2720
  },
2721
2721
  props: {
@@ -2759,10 +2759,10 @@ const Ss = {
2759
2759
  }, 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" }, Is = {
2760
2760
  key: 0,
2761
2761
  class: "wm-tk__text"
2762
- }, Es = {
2762
+ }, Rs = {
2763
2763
  key: 0,
2764
2764
  class: "wm-art__body"
2765
- }, Rs = { class: "wm-art__fieldLabel" }, Bs = ["data-level"], Ns = {
2765
+ }, Es = { class: "wm-art__fieldLabel" }, Bs = ["data-level"], Ns = {
2766
2766
  key: 1,
2767
2767
  class: "wm-tk__date",
2768
2768
  width: "12",
@@ -2814,14 +2814,14 @@ function Ps(e, t, n, i, r, s) {
2814
2814
  pe(" " + v(n.data.status.label), 1)
2815
2815
  ], 2)
2816
2816
  ]),
2817
- n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : b("", !0)
2817
+ n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : w("", !0)
2818
2818
  ]),
2819
- s.fields.length ? (c(), u("div", Es, [
2820
- (c(!0), u(I, null, P(s.fields, (a, l) => (c(), u("div", {
2819
+ s.fields.length ? (c(), u("div", Rs, [
2820
+ (c(!0), u(R, null, j(s.fields, (a, l) => (c(), u("div", {
2821
2821
  key: l,
2822
2822
  class: "wm-art__field"
2823
2823
  }, [
2824
- o("div", Rs, v(a.label), 1),
2824
+ o("div", Es, v(a.label), 1),
2825
2825
  o("div", {
2826
2826
  class: O([
2827
2827
  "wm-art__fieldValue",
@@ -2867,11 +2867,11 @@ function Ps(e, t, n, i, r, s) {
2867
2867
  rx: "2"
2868
2868
  }, null, -1),
2869
2869
  o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2870
- ])])) : b("", !0),
2870
+ ])])) : w("", !0),
2871
2871
  o("span", null, v(a.value), 1)
2872
2872
  ], 2)
2873
2873
  ]))), 128))
2874
- ])) : b("", !0),
2874
+ ])) : w("", !0),
2875
2875
  n.data.created_at ? (c(), u("div", Fs, [
2876
2876
  t[4] || (t[4] = o("svg", {
2877
2877
  width: "11",
@@ -2894,7 +2894,7 @@ function Ps(e, t, n, i, r, s) {
2894
2894
  o("path", { d: "M16 2v4M8 2v4M3 10h18" })
2895
2895
  ], -1)),
2896
2896
  o("span", null, v(s.formattedDate), 1)
2897
- ])) : b("", !0)
2897
+ ])) : w("", !0)
2898
2898
  ]);
2899
2899
  }
2900
2900
  const Us = /* @__PURE__ */ B(Ss, [["render", Ps], ["__scopeId", "data-v-5f30c914"]]), js = {
@@ -2917,10 +2917,10 @@ const Us = /* @__PURE__ */ B(Ss, [["render", Ps], ["__scopeId", "data-v-5f30c914
2917
2917
  }
2918
2918
  };
2919
2919
  function zs(e, t, n, i, r, s) {
2920
- return s.component ? (c(), N(je(s.component), {
2920
+ return s.component ? (c(), P(je(s.component), {
2921
2921
  key: 0,
2922
2922
  data: n.artifact.data
2923
- }, null, 8, ["data"])) : b("", !0);
2923
+ }, null, 8, ["data"])) : w("", !0);
2924
2924
  }
2925
2925
  const Hs = /* @__PURE__ */ B(Ds, [["render", zs]]), qs = {
2926
2926
  name: "WmAttachmentPreview",
@@ -2928,7 +2928,7 @@ const Hs = /* @__PURE__ */ B(Ds, [["render", zs]]), qs = {
2928
2928
  signAttachmentFn: { default: null },
2929
2929
  // Translator shared by the Messenger shell; French fallback when
2930
2930
  // the component is used standalone.
2931
- t: { default: () => U() }
2931
+ t: { default: () => D() }
2932
2932
  },
2933
2933
  props: {
2934
2934
  attachment: { type: Object, required: !0 }
@@ -3051,9 +3051,9 @@ function Zs(e, t, n, i, r, s) {
3051
3051
  ], -1)),
3052
3052
  o("span", Ys, [
3053
3053
  o("span", Js, v(s.displayName), 1),
3054
- s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
3054
+ s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : w("", !0)
3055
3055
  ]),
3056
- r.loading ? (c(), u("span", Xs)) : b("", !0)
3056
+ r.loading ? (c(), u("span", Xs)) : w("", !0)
3057
3057
  ], 8, Gs))
3058
3058
  ], 2);
3059
3059
  }
@@ -3102,7 +3102,7 @@ const cr = {
3102
3102
  name: "WmMessageList",
3103
3103
  components: {
3104
3104
  AIAvatar: le,
3105
- HumanAvatar: Ee,
3105
+ HumanAvatar: Re,
3106
3106
  Bubble: rr,
3107
3107
  Typing: lr,
3108
3108
  ActionResult: ts,
@@ -3112,7 +3112,7 @@ const cr = {
3112
3112
  inject: {
3113
3113
  // Translator + resolved-language getter shared by the Messenger
3114
3114
  // shell. Fall back to French wording when used standalone.
3115
- t: { default: () => U() },
3115
+ t: { default: () => D() },
3116
3116
  wmLocale: { default: () => () => "fr" }
3117
3117
  },
3118
3118
  props: {
@@ -3172,8 +3172,8 @@ const cr = {
3172
3172
  const l = this.roleOf(a);
3173
3173
  if (l === "system") {
3174
3174
  if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3175
- const k = e[e.length - 1];
3176
- k && k.role === "ai" ? k.messages.push(a) : e.push({
3175
+ const b = e[e.length - 1];
3176
+ b && b.role === "ai" ? b.messages.push(a) : e.push({
3177
3177
  key: `g-${Q(a)}`,
3178
3178
  role: "ai",
3179
3179
  agentName: "",
@@ -3206,7 +3206,7 @@ const cr = {
3206
3206
  if (a.role === "system") continue;
3207
3207
  const l = [];
3208
3208
  for (const p of a.messages)
3209
- for (const w of this.itemsOf(p)) l.push(w);
3209
+ for (const k of this.itemsOf(p)) l.push(k);
3210
3210
  a.items = l;
3211
3211
  }
3212
3212
  const t = [];
@@ -3344,8 +3344,8 @@ const cr = {
3344
3344
  const s = () => {
3345
3345
  const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
3346
3346
  if (!l) return;
3347
- const w = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3348
- Math.abs(w) > 0.5 && (e.scrollTop += w);
3347
+ const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3348
+ Math.abs(k) > 0.5 && (e.scrollTop += k);
3349
3349
  };
3350
3350
  s(), requestAnimationFrame(() => {
3351
3351
  s(), requestAnimationFrame(s);
@@ -3492,9 +3492,9 @@ const cr = {
3492
3492
  // doit garder son arrondi.
3493
3493
  cornersFor(e, t) {
3494
3494
  var Z, ee, te;
3495
- 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, w = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], R = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = ($, ne, G) => $ != null && x != null ? $ + q >= x : ne === G || ne === "card" && G === "bubble";
3496
- let j = l, F = l, z = l, W = l;
3497
- return a ? (w && (F = p), (k || !s) && (z = p), w && M(R, w, i == null ? void 0 : i.top) && (j = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (w && (j = p), (k || !s) && (W = p), w && M(R, w, i == null ? void 0 : i.top) && (F = p), k && M(A, k, i == null ? void 0 : i.bottom) && (z = p)), { tl: j, tr: F, br: z, bl: W };
3495
+ 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, b = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = ($, ne, G) => $ != null && T != null ? $ + z >= T : ne === G || ne === "card" && G === "bubble";
3496
+ let F = l, N = l, U = l, W = l;
3497
+ return a ? (k && (N = p), (b || !s) && (U = p), k && M(I, k, i == null ? void 0 : i.top) && (F = p), b && M(A, b, i == null ? void 0 : i.bottom) && (W = p)) : (k && (F = p), (b || !s) && (W = p), k && M(I, k, i == null ? void 0 : i.top) && (N = p), b && M(A, b, i == null ? void 0 : i.bottom) && (U = p)), { tl: F, tr: N, br: U, bl: W };
3498
3498
  },
3499
3499
  // Inline style emitting the four corner CSS variables. Set on
3500
3500
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3646,7 +3646,7 @@ const cr = {
3646
3646
  class: "wm-list__row wm-list__row--ai fade-up"
3647
3647
  }, Or = { class: "wm-list__avatarSlot" };
3648
3648
  function Lr(e, t, n, i, r, s) {
3649
- const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), w = E("ArtifactRenderer"), k = E("Bubble"), x = E("AttachmentPreview"), R = E("Typing");
3649
+ const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), k = E("ArtifactRenderer"), b = E("Bubble"), T = E("AttachmentPreview"), I = E("Typing");
3650
3650
  return c(), u("div", {
3651
3651
  ref: "scrollEl",
3652
3652
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
@@ -3658,20 +3658,20 @@ function Lr(e, t, n, i, r, s) {
3658
3658
  "aria-hidden": "true"
3659
3659
  }, null, -1)),
3660
3660
  o("span", fr, v(s.t("messageList.loadingHistory")), 1)
3661
- ])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3661
+ ])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
3662
3662
  n.dateLabel ? (c(), u("div", _r, [
3663
3663
  t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
3664
3664
  o("span", pr, v(n.dateLabel), 1),
3665
3665
  t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
3666
- ])) : b("", !0),
3667
- (c(!0), u(I, null, P(s.groups, (A, q) => (c(), u(I, {
3666
+ ])) : w("", !0),
3667
+ (c(!0), u(R, null, j(s.groups, (A, z) => (c(), u(R, {
3668
3668
  key: A.key
3669
3669
  }, [
3670
3670
  A.key === s.unreadGroupKey ? (c(), u("div", vr, [
3671
3671
  t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3672
3672
  o("span", yr, v(s.t("messageList.unread")), 1),
3673
3673
  t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3674
- ])) : b("", !0),
3674
+ ])) : w("", !0),
3675
3675
  A.role === "system" || A.items.length ? (c(), u("div", {
3676
3676
  key: 1,
3677
3677
  class: O(["wm-list__group", "wm-list__group--" + A.role])
@@ -3680,8 +3680,8 @@ function Lr(e, t, n, i, r, s) {
3680
3680
  t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3681
3681
  o("span", br, v(A.systemLabel), 1),
3682
3682
  t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3683
- ])) : (c(), u(I, { key: 1 }, [
3684
- (c(!0), u(I, null, P(A.items, (M, j) => (c(), u("div", {
3683
+ ])) : (c(), u(R, { key: 1 }, [
3684
+ (c(!0), u(R, null, j(A.items, (M, F) => (c(), u("div", {
3685
3685
  key: `${s.messageKey(M.message)}-${M.partKey}`,
3686
3686
  "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
3687
3687
  class: O(["wm-list__row fade-up", [
@@ -3691,72 +3691,72 @@ function Lr(e, t, n, i, r, s) {
3691
3691
  "is-failed": M.message._failed
3692
3692
  }
3693
3693
  ]]),
3694
- style: H(s.cornersStyle(A, j))
3694
+ style: q(s.cornersStyle(A, F))
3695
3695
  }, [
3696
3696
  A.role !== "user" ? (c(), u("div", Cr, [
3697
- j === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
3698
- A.role === "ai" ? (c(), N(a, {
3697
+ F === A.items.length - 1 ? (c(), u(R, { key: 0 }, [
3698
+ A.role === "ai" ? (c(), P(a, {
3699
3699
  key: 0,
3700
3700
  size: 26,
3701
3701
  tail: !0,
3702
3702
  name: n.aiAgentName,
3703
3703
  "image-url": n.aiAgentAvatarUrl
3704
- }, null, 8, ["name", "image-url"])) : (c(), N(l, {
3704
+ }, null, 8, ["name", "image-url"])) : (c(), P(l, {
3705
3705
  key: 1,
3706
3706
  name: A.agentName,
3707
3707
  "avatar-url": A.agentAvatarUrl,
3708
3708
  size: 26,
3709
3709
  tail: !0
3710
3710
  }, null, 8, ["name", "avatar-url"]))
3711
- ], 64)) : b("", !0)
3712
- ])) : b("", !0),
3713
- M.renderAs === "action" ? (c(), N(p, {
3711
+ ], 64)) : w("", !0)
3712
+ ])) : w("", !0),
3713
+ M.renderAs === "action" ? (c(), P(p, {
3714
3714
  key: 1,
3715
3715
  state: M.message.payload.state,
3716
3716
  label: s.actionLabel(M.message),
3717
3717
  detail: s.actionDetail(M.message)
3718
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), N(p, {
3718
+ }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), P(p, {
3719
3719
  key: 2,
3720
3720
  state: "awaiting",
3721
3721
  label: s.t("messageList.approvalRequestSent"),
3722
3722
  detail: M.message.text_md || ""
3723
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), N(w, {
3723
+ }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), P(k, {
3724
3724
  key: 3,
3725
3725
  artifact: s.actionArtifact(M.message)
3726
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), N(w, {
3726
+ }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), P(k, {
3727
3727
  key: 4,
3728
3728
  artifact: s.artifactOf(M.message)
3729
3729
  }, null, 8, ["artifact"])) : (c(), u("div", Ar, [
3730
- M.message.text_md ? (c(), N(k, {
3730
+ M.message.text_md ? (c(), P(b, {
3731
3731
  key: 0,
3732
3732
  role: A.role,
3733
3733
  text: M.message.text_md
3734
- }, null, 8, ["role", "text"])) : b("", !0),
3734
+ }, null, 8, ["role", "text"])) : w("", !0),
3735
3735
  s.attachmentsOf(M.message).length ? (c(), u("div", {
3736
3736
  key: 1,
3737
3737
  class: O(["wm-list__atts", {
3738
3738
  "wm-list__atts--align-end": A.role === "user"
3739
3739
  }])
3740
3740
  }, [
3741
- (c(!0), u(I, null, P(s.attachmentsOf(
3741
+ (c(!0), u(R, null, j(s.attachmentsOf(
3742
3742
  M.message
3743
- ), (F, z) => (c(), N(x, {
3744
- key: `${s.messageKey(M.message)}-att-${z}`,
3745
- attachment: F
3743
+ ), (N, U) => (c(), P(T, {
3744
+ key: `${s.messageKey(M.message)}-att-${U}`,
3745
+ attachment: N
3746
3746
  }, null, 8, ["attachment"]))), 128))
3747
- ], 2)) : b("", !0)
3747
+ ], 2)) : w("", !0)
3748
3748
  ]))
3749
3749
  ], 14, kr))), 128)),
3750
3750
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3751
3751
  key: 0,
3752
3752
  class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3753
3753
  }, [
3754
- A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : b("", !0),
3755
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : b("", !0),
3756
- s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3757
- ], 2)) : b("", !0)
3754
+ A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : w("", !0),
3755
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : w("", !0),
3756
+ s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : w("", !0)
3757
+ ], 2)) : w("", !0)
3758
3758
  ], 64))
3759
- ], 2)) : b("", !0)
3759
+ ], 2)) : w("", !0)
3760
3760
  ], 64))), 128)),
3761
3761
  n.streamingActive ? (c(), u("div", xr, [
3762
3762
  o("div", Or, [
@@ -3767,12 +3767,12 @@ function Lr(e, t, n, i, r, s) {
3767
3767
  "image-url": n.aiAgentAvatarUrl
3768
3768
  }, null, 8, ["name", "image-url"])
3769
3769
  ]),
3770
- V(R)
3771
- ])) : b("", !0)
3770
+ V(I)
3771
+ ])) : w("", !0)
3772
3772
  ], 34);
3773
3773
  }
3774
3774
  const Ir = /* @__PURE__ */ B(hr, [["render", Lr], ["__scopeId", "data-v-d769b193"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3775
- function Er() {
3775
+ function Rr() {
3776
3776
  return be && [
3777
3777
  "video/webm;codecs=vp9,opus",
3778
3778
  "video/webm;codecs=vp8,opus",
@@ -3795,7 +3795,7 @@ function Be({ audio: e }) {
3795
3795
  function za(e) {
3796
3796
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3797
3797
  }
3798
- async function Rr() {
3798
+ async function Er() {
3799
3799
  if (!he) return null;
3800
3800
  let e;
3801
3801
  try {
@@ -3822,70 +3822,70 @@ async function Br(e) {
3822
3822
  r.width = n, r.height = i, r.getContext("2d").drawImage(t, 0, 0, n, i);
3823
3823
  const s = await new Promise((l, p) => {
3824
3824
  r.toBlob(
3825
- (w) => w ? l(w) : p(new Error("toBlob failed")),
3825
+ (k) => k ? l(k) : p(new Error("toBlob failed")),
3826
3826
  "image/png"
3827
3827
  );
3828
3828
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3829
3829
  return new File([s], `capture-${a}.png`, { type: "image/png" });
3830
3830
  }
3831
3831
  async function Nr(e = {}) {
3832
- var w;
3832
+ var k;
3833
3833
  if (!he || !be) return null;
3834
3834
  let t;
3835
3835
  try {
3836
3836
  t = await navigator.mediaDevices.getDisplayMedia(
3837
3837
  Be({ audio: !0 })
3838
3838
  );
3839
- } catch (k) {
3840
- return (k == null ? void 0 : k.name) !== "NotAllowedError" && console.error("[media] record picker", k), null;
3839
+ } catch (b) {
3840
+ return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
3841
3841
  }
3842
- const n = Er();
3842
+ const n = Rr();
3843
3843
  let i;
3844
3844
  try {
3845
3845
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
3846
- } catch (k) {
3847
- return console.error("[media] recorder init", k), t.getTracks().forEach((x) => {
3848
- x.stop();
3846
+ } catch (b) {
3847
+ return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
3848
+ T.stop();
3849
3849
  }), null;
3850
3850
  }
3851
3851
  const r = [];
3852
3852
  let s = null, a = !1;
3853
- i.addEventListener("dataavailable", (k) => {
3854
- k.data && k.data.size > 0 && r.push(k.data);
3853
+ i.addEventListener("dataavailable", (b) => {
3854
+ b.data && b.data.size > 0 && r.push(b.data);
3855
3855
  }), i.addEventListener("stop", () => {
3856
- var k, x;
3857
- if (s && clearInterval(s), t.getTracks().forEach((R) => {
3858
- R.stop();
3856
+ var b, T;
3857
+ if (s && clearInterval(s), t.getTracks().forEach((I) => {
3858
+ I.stop();
3859
3859
  }), r.length) {
3860
- const R = i.mimeType || n || "video/webm", A = new Blob(r, { type: R }), q = /mp4/.test(R) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${M}.${q}`, {
3861
- type: R
3860
+ const I = i.mimeType || n || "video/webm", A = new Blob(r, { type: I }), z = /mp4/.test(I) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${M}.${z}`, {
3861
+ type: I
3862
3862
  });
3863
- (k = e.onfinalize) == null || k.call(e, j);
3863
+ (b = e.onfinalize) == null || b.call(e, F);
3864
3864
  } else
3865
- (x = e.oncancel) == null || x.call(e);
3866
- }), t.getVideoTracks().forEach((k) => {
3867
- k.addEventListener("ended", () => l(), { once: !0 });
3865
+ (T = e.oncancel) == null || T.call(e);
3866
+ }), t.getVideoTracks().forEach((b) => {
3867
+ b.addEventListener("ended", () => l(), { once: !0 });
3868
3868
  });
3869
3869
  function l() {
3870
3870
  if (!a && (a = !0, i.state !== "inactive"))
3871
3871
  try {
3872
3872
  i.stop();
3873
- } catch (k) {
3874
- console.error("[media] recorder stop", k);
3873
+ } catch (b) {
3874
+ console.error("[media] recorder stop", b);
3875
3875
  }
3876
3876
  }
3877
3877
  try {
3878
3878
  i.start(1e3);
3879
- } catch (k) {
3880
- return console.error("[media] recorder start", k), t.getTracks().forEach((x) => {
3881
- x.stop();
3879
+ } catch (b) {
3880
+ return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
3881
+ T.stop();
3882
3882
  }), null;
3883
3883
  }
3884
- (w = e.onstart) == null || w.call(e);
3884
+ (k = e.onstart) == null || k.call(e);
3885
3885
  const p = Date.now();
3886
3886
  return s = setInterval(() => {
3887
- var k;
3888
- (k = e.ontick) == null || k.call(e, Date.now() - p);
3887
+ var b;
3888
+ (b = e.ontick) == null || b.call(e, Date.now() - p);
3889
3889
  }, 500), {
3890
3890
  stop: l,
3891
3891
  get state() {
@@ -3914,7 +3914,7 @@ const Fr = [
3914
3914
  inject: {
3915
3915
  // Translator shared by the Messenger shell; French fallback when
3916
3916
  // the component is used standalone.
3917
- t: { default: () => U() }
3917
+ t: { default: () => D() }
3918
3918
  },
3919
3919
  props: {
3920
3920
  modelValue: { type: String, default: "" },
@@ -4010,7 +4010,7 @@ const Fr = [
4010
4010
  },
4011
4011
  async captureScreenshot() {
4012
4012
  if (this.disabled) return;
4013
- const e = await Rr();
4013
+ const e = await Er();
4014
4014
  e && this.$emit("attach", e);
4015
4015
  },
4016
4016
  async startRecording() {
@@ -4067,7 +4067,7 @@ function Jr(e, t, n, i, r, s) {
4067
4067
  class: "wm-rec__stop",
4068
4068
  onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4069
4069
  }, v(s.t("composer.stop")), 1)
4070
- ])) : b("", !0),
4070
+ ])) : w("", !0),
4071
4071
  o("form", {
4072
4072
  class: O(["wm-compose", { "has-attach": r.attachOpen }]),
4073
4073
  onSubmit: t[7] || (t[7] = Y((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
@@ -4083,9 +4083,9 @@ function Jr(e, t, n, i, r, s) {
4083
4083
  key: 0,
4084
4084
  class: "wm-compose__overlay",
4085
4085
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4086
- })) : b("", !0),
4086
+ })) : w("", !0),
4087
4087
  r.attachOpen ? (c(), u("div", zr, [
4088
- (c(!0), u(I, null, P(s.attachItems, (a) => (c(), u("button", {
4088
+ (c(!0), u(R, null, j(s.attachItems, (a) => (c(), u("button", {
4089
4089
  key: a.action,
4090
4090
  type: "button",
4091
4091
  class: "wm-compose__menuItem",
@@ -4106,7 +4106,7 @@ function Jr(e, t, n, i, r, s) {
4106
4106
  ]),
4107
4107
  o("span", null, v(a.label), 1)
4108
4108
  ], 8, Hr))), 128))
4109
- ])) : b("", !0),
4109
+ ])) : w("", !0),
4110
4110
  K(o("textarea", {
4111
4111
  ref: "inputEl",
4112
4112
  "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
@@ -4189,14 +4189,14 @@ function ei(e, t, n, i, r, s) {
4189
4189
  key: s.batchKey,
4190
4190
  class: "wm-chips"
4191
4191
  }, [
4192
- (c(!0), u(I, null, P(n.items, (a, l) => (c(), u("button", {
4192
+ (c(!0), u(R, null, j(n.items, (a, l) => (c(), u("button", {
4193
4193
  key: l,
4194
4194
  type: "button",
4195
4195
  class: "wm-chip",
4196
- style: H({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4196
+ style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4197
4197
  onClick: (p) => e.$emit("select", a)
4198
4198
  }, v(a.label), 13, Zr))), 128))
4199
- ])) : b("", !0);
4199
+ ])) : w("", !0);
4200
4200
  }
4201
4201
  const ti = /* @__PURE__ */ B(Xr, [["render", ei], ["__scopeId", "data-v-47ad8085"]]), ni = {
4202
4202
  name: "WmApprovalCard",
@@ -4204,7 +4204,7 @@ const ti = /* @__PURE__ */ B(Xr, [["render", ei], ["__scopeId", "data-v-47ad8085
4204
4204
  inject: {
4205
4205
  // Translator shared by the Messenger shell; French fallback when
4206
4206
  // the component is used standalone.
4207
- t: { default: () => U() }
4207
+ t: { default: () => D() }
4208
4208
  },
4209
4209
  props: {
4210
4210
  action: { type: String, required: !0 },
@@ -4259,7 +4259,7 @@ function di(e, t, n, i, r, s) {
4259
4259
  ]),
4260
4260
  o("div", ai, [
4261
4261
  o("div", oi, v(n.action), 1),
4262
- n.detail ? (c(), u("div", li, v(n.detail), 1)) : b("", !0)
4262
+ n.detail ? (c(), u("div", li, v(n.detail), 1)) : w("", !0)
4263
4263
  ])
4264
4264
  ]),
4265
4265
  o("div", ci, [
@@ -4268,13 +4268,13 @@ function di(e, t, n, i, r, s) {
4268
4268
  type: "button",
4269
4269
  class: "wm-approval__btn wm-approval__btn--neutral",
4270
4270
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4271
- }, v(s.rejectLabel), 1)) : b("", !0),
4271
+ }, v(s.rejectLabel), 1)) : w("", !0),
4272
4272
  s.approveId ? (c(), u("button", {
4273
4273
  key: 1,
4274
4274
  type: "button",
4275
4275
  class: "wm-approval__btn wm-approval__btn--primary",
4276
4276
  onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
4277
- }, v(s.approveLabel), 1)) : b("", !0)
4277
+ }, v(s.approveLabel), 1)) : w("", !0)
4278
4278
  ])
4279
4279
  ]);
4280
4280
  }
@@ -4294,7 +4294,7 @@ const hi = /* @__PURE__ */ new Set([
4294
4294
  inject: {
4295
4295
  // Translator shared by the Messenger shell; French fallback when
4296
4296
  // the component is used standalone.
4297
- t: { default: () => U() }
4297
+ t: { default: () => D() }
4298
4298
  },
4299
4299
  props: {
4300
4300
  form: { type: Object, required: !0 },
@@ -4387,7 +4387,7 @@ const hi = /* @__PURE__ */ new Set([
4387
4387
  }, Li = ["value"], Ii = {
4388
4388
  key: 6,
4389
4389
  class: "wm-form__multi"
4390
- }, Ei = ["value", "checked", "disabled", "onChange"], Ri = {
4390
+ }, Ri = ["value", "checked", "disabled", "onChange"], Ei = {
4391
4391
  key: 0,
4392
4392
  class: "wm-form__err"
4393
4393
  }, Bi = ["disabled"], Ni = {
@@ -4411,14 +4411,14 @@ function Pi(e, t, n, i, r, s) {
4411
4411
  ]),
4412
4412
  o("div", pi, [
4413
4413
  o("div", vi, v(n.form.title || s.t("form.title")), 1),
4414
- n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : b("", !0)
4414
+ n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : w("", !0)
4415
4415
  ])
4416
4416
  ]),
4417
4417
  o("form", {
4418
4418
  class: "wm-form__body",
4419
4419
  onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4420
4420
  }, [
4421
- (c(!0), u(I, null, P(s.normalizedFields, (l) => (c(), u("div", {
4421
+ (c(!0), u(R, null, j(s.normalizedFields, (l) => (c(), u("div", {
4422
4422
  key: l.key,
4423
4423
  class: "wm-form__field"
4424
4424
  }, [
@@ -4427,7 +4427,7 @@ function Pi(e, t, n, i, r, s) {
4427
4427
  class: "wm-form__label"
4428
4428
  }, [
4429
4429
  pe(v(l.label), 1),
4430
- l.required ? (c(), u("span", bi, "*")) : b("", !0)
4430
+ l.required ? (c(), u("span", bi, "*")) : w("", !0)
4431
4431
  ], 8, wi),
4432
4432
  l.type === "text" ? K((c(), u("input", {
4433
4433
  key: 0,
@@ -4496,14 +4496,14 @@ function Pi(e, t, n, i, r, s) {
4496
4496
  disabled: n.readOnly || r.busy
4497
4497
  }, [
4498
4498
  o("option", Oi, v(l.placeholder || s.t("form.choose")), 1),
4499
- (c(!0), u(I, null, P(l.options, (p) => (c(), u("option", {
4499
+ (c(!0), u(R, null, j(l.options, (p) => (c(), u("option", {
4500
4500
  key: p.value,
4501
4501
  value: p.value
4502
4502
  }, v(p.label), 9, Li))), 128))
4503
4503
  ], 8, xi)), [
4504
4504
  [He, r.values[l.key]]
4505
4505
  ]) : l.type === "multiselect" ? (c(), u("div", Ii, [
4506
- (c(!0), u(I, null, P(l.options, (p) => (c(), u("label", {
4506
+ (c(!0), u(R, null, j(l.options, (p) => (c(), u("label", {
4507
4507
  key: p.value,
4508
4508
  class: "wm-form__multiItem"
4509
4509
  }, [
@@ -4512,24 +4512,24 @@ function Pi(e, t, n, i, r, s) {
4512
4512
  value: p.value,
4513
4513
  checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
4514
4514
  disabled: n.readOnly || r.busy,
4515
- onChange: (w) => s.toggleMulti(
4515
+ onChange: (k) => s.toggleMulti(
4516
4516
  l.key,
4517
4517
  p.value,
4518
- w.target.checked
4518
+ k.target.checked
4519
4519
  )
4520
- }, null, 40, Ei),
4520
+ }, null, 40, Ri),
4521
4521
  o("span", null, v(p.label), 1)
4522
4522
  ]))), 128))
4523
- ])) : b("", !0)
4523
+ ])) : w("", !0)
4524
4524
  ]))), 128)),
4525
- r.error ? (c(), u("div", Ri, v(r.error), 1)) : b("", !0),
4525
+ r.error ? (c(), u("div", Ei, v(r.error), 1)) : w("", !0),
4526
4526
  n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4527
4527
  key: 1,
4528
4528
  type: "submit",
4529
4529
  class: "wm-form__submit",
4530
4530
  disabled: r.busy
4531
4531
  }, [
4532
- r.busy ? (c(), u("span", Ni)) : b("", !0),
4532
+ r.busy ? (c(), u("span", Ni)) : w("", !0),
4533
4533
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4534
4534
  ], 8, Bi))
4535
4535
  ], 32)
@@ -4540,7 +4540,7 @@ const Ui = /* @__PURE__ */ B(mi, [["render", Pi], ["__scopeId", "data-v-fe65cc56
4540
4540
  inject: {
4541
4541
  // Translator shared by the Messenger shell; French fallback when
4542
4542
  // the component is used standalone.
4543
- t: { default: () => U() }
4543
+ t: { default: () => D() }
4544
4544
  },
4545
4545
  props: {
4546
4546
  busy: { type: Boolean, default: !1 },
@@ -4593,11 +4593,11 @@ function Qi(e, t, n, i, r, s) {
4593
4593
  ], -1)),
4594
4594
  o("div", Yi, v(s.t("feedback.doneTitle")), 1),
4595
4595
  o("div", Ji, v(s.t("feedback.doneSubtitle")), 1)
4596
- ])) : (c(), u(I, { key: 0 }, [
4596
+ ])) : (c(), u(R, { key: 0 }, [
4597
4597
  o("div", zi, v(s.t("feedback.question")), 1),
4598
4598
  o("div", Hi, v(s.t("feedback.subtitle")), 1),
4599
4599
  o("div", qi, [
4600
- (c(!0), u(I, null, P(s.options, (a) => (c(), u("button", {
4600
+ (c(!0), u(R, null, j(s.options, (a) => (c(), u("button", {
4601
4601
  key: a.v,
4602
4602
  type: "button",
4603
4603
  class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
@@ -4621,7 +4621,7 @@ const Xi = /* @__PURE__ */ B(ji, [["render", Qi], ["__scopeId", "data-v-9b630564
4621
4621
  inject: {
4622
4622
  // Translator shared by the Messenger shell; French fallback when
4623
4623
  // the component is used standalone.
4624
- t: { default: () => U() }
4624
+ t: { default: () => D() }
4625
4625
  },
4626
4626
  props: {
4627
4627
  canRename: { type: Boolean, default: !0 },
@@ -4700,7 +4700,7 @@ function ha(e, t, n, i, r, s) {
4700
4700
  ])
4701
4701
  ], -1)),
4702
4702
  o("span", sa, v(s.t("moreMenu.editTitle")), 1)
4703
- ])) : b("", !0),
4703
+ ])) : w("", !0),
4704
4704
  n.canExport ? (c(), u("button", {
4705
4705
  key: 1,
4706
4706
  type: "button",
@@ -4724,9 +4724,9 @@ function ha(e, t, n, i, r, s) {
4724
4724
  ], -1)),
4725
4725
  o("span", ra, v(s.t("moreMenu.exportTranscript")), 1),
4726
4726
  t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4727
- ])) : b("", !0)
4728
- ])) : b("", !0),
4729
- n.canRename || n.canExport ? (c(), u("div", ia)) : b("", !0),
4727
+ ])) : w("", !0)
4728
+ ])) : w("", !0),
4729
+ n.canRename || n.canExport ? (c(), u("div", ia)) : w("", !0),
4730
4730
  o("div", aa, [
4731
4731
  o("button", {
4732
4732
  type: "button",
@@ -4808,7 +4808,7 @@ function ha(e, t, n, i, r, s) {
4808
4808
  ])
4809
4809
  ], -1)),
4810
4810
  o("span", da, v(s.t("moreMenu.serviceStatus")), 1)
4811
- ])) : b("", !0),
4811
+ ])) : w("", !0),
4812
4812
  n.helpUrl ? (c(), u("button", {
4813
4813
  key: 1,
4814
4814
  type: "button",
@@ -4831,7 +4831,7 @@ function ha(e, t, n, i, r, s) {
4831
4831
  ])
4832
4832
  ], -1)),
4833
4833
  o("span", ua, v(s.t("moreMenu.helpCenter")), 1)
4834
- ])) : b("", !0)
4834
+ ])) : w("", !0)
4835
4835
  ])
4836
4836
  ])
4837
4837
  ]);
@@ -4841,7 +4841,7 @@ const ma = /* @__PURE__ */ B(Zi, [["render", ha], ["__scopeId", "data-v-76281e95
4841
4841
  inject: {
4842
4842
  // Translator shared by the Messenger shell; French fallback when
4843
4843
  // the component is used standalone.
4844
- t: { default: () => U() }
4844
+ t: { default: () => D() }
4845
4845
  },
4846
4846
  props: {
4847
4847
  // Empty defaults: the resolved fallback comes from the translator
@@ -5104,7 +5104,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5104
5104
  // `locale` changes. `t()` below (and the provided closure) delegate
5105
5105
  // to it so every string resolves against the current language.
5106
5106
  translator() {
5107
- return U(this.locale);
5107
+ return D(this.locale);
5108
5108
  },
5109
5109
  error() {
5110
5110
  var e;
@@ -5135,21 +5135,21 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5135
5135
  var n;
5136
5136
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = this.revealedAt;
5137
5137
  return this.allConversations.map((i) => {
5138
- var w;
5138
+ var k;
5139
5139
  const r = e[i.id] || [], s = J(i.last_read_message_id);
5140
5140
  let a = 0, l = null;
5141
- for (let k = r.length - 1; k >= 0; k--) {
5142
- const x = r[k];
5143
- if (!x) continue;
5144
- if (((w = x.author) == null ? void 0 : w.type) === "user") break;
5145
- const R = J(x.id);
5146
- if (R != null) {
5147
- if (s != null && R <= s) break;
5148
- t[x.id] !== 0 && (!l && x.author && (l = x.author), a++);
5141
+ for (let b = r.length - 1; b >= 0; b--) {
5142
+ const T = r[b];
5143
+ if (!T) continue;
5144
+ if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5145
+ const I = J(T.id);
5146
+ if (I != null) {
5147
+ if (s != null && I <= s) break;
5148
+ t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5149
5149
  }
5150
5150
  }
5151
5151
  const p = r.filter(
5152
- (k) => !((k == null ? void 0 : k.id) != null && t[k.id] === 0)
5152
+ (b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
5153
5153
  );
5154
5154
  return {
5155
5155
  ...i,
@@ -5333,8 +5333,8 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5333
5333
  }
5334
5334
  const t = this.revealedAt;
5335
5335
  return (this.s.messagesByConv[e.id] || []).filter((r) => {
5336
- var s, a, l, p, w;
5337
- return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (w = r == null ? void 0 : r.metadata) != null && w.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5336
+ var s, a, l, p, k;
5337
+ return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5338
5338
  });
5339
5339
  },
5340
5340
  // True whenever we should show the "typing" indicator at the bottom
@@ -5377,7 +5377,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5377
5377
  const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5378
5378
  if (!t || typeof t != "object") return "";
5379
5379
  const n = Object.entries(t);
5380
- return n.length ? n.slice(0, 2).map(([w, k]) => `${w}: ${k}`).join(" · ") : "";
5380
+ return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
5381
5381
  },
5382
5382
  actionInFlight() {
5383
5383
  var e, t;
@@ -5662,19 +5662,31 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5662
5662
  this.launcherHovered = e, this.sendCurrentLauncherSize();
5663
5663
  },
5664
5664
  sendCurrentLauncherSize() {
5665
- var a, l, p, w, k;
5665
+ var T, I, A, z, M, F, N;
5666
5666
  if (this.isOpen) return;
5667
- const e = (l = (a = this.$el) == null ? void 0 : a.querySelector) == null ? void 0 : l.call(a, ".wm-launcherWrap");
5667
+ const e = (I = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : I.call(T, ".wm-launcherWrap");
5668
5668
  if (!e) return;
5669
5669
  const t = e.getBoundingClientRect();
5670
5670
  if (!t.width || !t.height) return;
5671
- const i = (((p = this.launcherPeeks) == null ? void 0 : p.length) ?? 0) > 0 ? 16 : 4, r = (k = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : k.call(w, ".wm-launcher"), s = r == null ? void 0 : r.getBoundingClientRect();
5671
+ 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 = (z = this.$el) == null ? void 0 : z.querySelector) == null ? void 0 : M.call(z, ".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;
5672
+ let b = null;
5673
+ if (k) {
5674
+ const U = k.getBoundingClientRect();
5675
+ b = {
5676
+ width: Math.ceil(U.width),
5677
+ height: Math.ceil(U.height),
5678
+ rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
5679
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
5680
+ };
5681
+ }
5672
5682
  this.notifyParentResize("closed", {
5673
- width: Math.ceil(t.width) + i,
5674
- height: Math.ceil(t.height) + i,
5675
- launcherWidth: s ? Math.ceil(s.width) : null,
5676
- launcherHeight: s ? Math.ceil(s.height) : null,
5677
- launcherHovered: this.launcherHovered
5683
+ width: r + i,
5684
+ height: s + i,
5685
+ launcherWidth: l ? Math.ceil(l.width) : null,
5686
+ launcherHeight: l ? Math.ceil(l.height) : null,
5687
+ launcherHovered: this.launcherHovered,
5688
+ peek: b,
5689
+ peekHovered: this.launcherHovered && n
5678
5690
  });
5679
5691
  },
5680
5692
  observeLauncherSize() {
@@ -5895,7 +5907,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5895
5907
  }, xa = ["aria-label"], Oa = {
5896
5908
  key: 0,
5897
5909
  class: "wm-state"
5898
- }, La = { class: "wm-state__err" }, Ia = { class: "wm-state__errTitle" }, Ea = { class: "wm-state__errSub" }, Ra = { class: "wm-bottom" }, Ba = {
5910
+ }, La = { class: "wm-state__err" }, Ia = { class: "wm-state__errTitle" }, Ra = { class: "wm-state__errSub" }, Ea = { class: "wm-bottom" }, Ba = {
5899
5911
  key: 0,
5900
5912
  ref: "floatEl",
5901
5913
  class: "wm-float"
@@ -5909,18 +5921,18 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5909
5921
  class: "wm-attached"
5910
5922
  }, Ua = ["aria-label", "onClick"];
5911
5923
  function ja(e, t, n, i, r, s) {
5912
- const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), w = E("MessageList"), k = E("ApprovalCard"), x = E("FormCard"), R = E("Feedback"), A = E("SuggestionChips"), q = E("Composer"), M = E("MoreMenu"), j = E("RenameDialog");
5924
+ const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), k = E("MessageList"), b = E("ApprovalCard"), T = E("FormCard"), I = E("Feedback"), A = E("SuggestionChips"), z = E("Composer"), M = E("MoreMenu"), F = E("RenameDialog");
5913
5925
  return c(), u("div", {
5914
5926
  class: O(["wm-root", `wm-root--${n.displayMode}`])
5915
5927
  }, [
5916
- !r.isOpen && !s.isEmbedded ? (c(), N(a, {
5928
+ !r.isOpen && !s.isEmbedded ? (c(), P(a, {
5917
5929
  key: 0,
5918
5930
  "unread-count": s.unreadCount,
5919
5931
  peeks: s.launcherPeeks,
5920
5932
  onOpen: s.openFromPeek,
5921
5933
  onDismiss: s.dismissPeek,
5922
5934
  onHover: s.onLauncherHover
5923
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
5935
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : w("", !0),
5924
5936
  r.isOpen || s.isEmbedded ? (c(), u("section", {
5925
5937
  key: 1,
5926
5938
  class: O([
@@ -5928,17 +5940,17 @@ function ja(e, t, n, i, r, s) {
5928
5940
  `wm-panel--${n.displayMode}`,
5929
5941
  { "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
5930
5942
  ]),
5931
- style: H(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5943
+ style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5932
5944
  role: "dialog",
5933
5945
  "aria-label": "Messenger"
5934
5946
  }, [
5935
5947
  !s.ready && !s.error ? (c(), u("div", Ta, [
5936
- s.isEmbedded ? b("", !0) : (c(), u("button", {
5948
+ s.isEmbedded ? w("", !0) : (c(), u("button", {
5937
5949
  key: 0,
5938
5950
  type: "button",
5939
5951
  class: "wm-loading__close",
5940
5952
  "aria-label": s.t("loading.minimize"),
5941
- onClick: t[0] || (t[0] = (...F) => s.close && s.close(...F))
5953
+ onClick: t[0] || (t[0] = (...N) => s.close && s.close(...N))
5942
5954
  }, [...t[5] || (t[5] = [
5943
5955
  o("svg", {
5944
5956
  width: "13",
@@ -5958,7 +5970,7 @@ function ja(e, t, n, i, r, s) {
5958
5970
  class: "wm-loading__spinner",
5959
5971
  "aria-hidden": "true"
5960
5972
  }, null, -1))
5961
- ])) : (c(), u(I, { key: 1 }, [
5973
+ ])) : (c(), u(R, { key: 1 }, [
5962
5974
  V(l, {
5963
5975
  title: s.headerTitle,
5964
5976
  "team-members": s.teamMembers,
@@ -5992,11 +6004,11 @@ function ja(e, t, n, i, r, s) {
5992
6004
  ], -1)),
5993
6005
  o("div", null, [
5994
6006
  o("div", Ia, v(s.t("error.connectionFailed")), 1),
5995
- o("div", Ea, v(s.error), 1)
6007
+ o("div", Ra, v(s.error), 1)
5996
6008
  ])
5997
6009
  ])
5998
- ])) : s.currentConv ? (c(), u(I, { key: 2 }, [
5999
- V(w, {
6010
+ ])) : s.currentConv ? (c(), u(R, { key: 2 }, [
6011
+ V(k, {
6000
6012
  ref: "messageList",
6001
6013
  messages: s.displayedMessages,
6002
6014
  "streaming-active": s.streamingActive,
@@ -6010,9 +6022,9 @@ function ja(e, t, n, i, r, s) {
6010
6022
  "ai-agent-avatar-url": s.agentAvatarUrl,
6011
6023
  onLoadMore: s.onLoadMore
6012
6024
  }, 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"]),
6013
- o("div", Ra, [
6025
+ o("div", Ea, [
6014
6026
  s.floatVisible ? (c(), u("div", Ba, [
6015
- s.approvalReady ? (c(), N(k, {
6027
+ s.approvalReady ? (c(), P(b, {
6016
6028
  key: 0,
6017
6029
  action: s.approvalTitle,
6018
6030
  detail: s.approvalDetail,
@@ -6020,23 +6032,23 @@ function ja(e, t, n, i, r, s) {
6020
6032
  "agent-name": s.agentName,
6021
6033
  "agent-avatar-url": s.agentAvatarUrl,
6022
6034
  onCallback: s.onApprovalCallback
6023
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), N(x, {
6035
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), P(T, {
6024
6036
  key: s.pendingForm.message && s.pendingForm.message.id,
6025
6037
  form: s.pendingForm.form,
6026
6038
  "agent-name": s.agentName,
6027
6039
  "agent-avatar-url": s.agentAvatarUrl,
6028
6040
  onSubmit: s.onFormSubmit
6029
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), N(R, {
6041
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), P(I, {
6030
6042
  key: 2,
6031
6043
  busy: r.feedbackBusy,
6032
6044
  done: r.feedbackDone,
6033
6045
  onSubmit: s.onFeedback
6034
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), N(A, {
6046
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(A, {
6035
6047
  key: 3,
6036
6048
  items: s.suggestions,
6037
6049
  onSelect: s.onSuggestion
6038
6050
  }, null, 8, ["items", "onSelect"]))
6039
- ], 512)) : b("", !0),
6051
+ ], 512)) : w("", !0),
6040
6052
  s.actionInFlight ? (c(), u("div", Na, [
6041
6053
  t[8] || (t[8] = o("span", {
6042
6054
  class: "wm-actionWait__spinner",
@@ -6045,11 +6057,11 @@ function ja(e, t, n, i, r, s) {
6045
6057
  o("span", Fa, v(s.t("action.inProgress", {
6046
6058
  name: s.actionInFlightName
6047
6059
  })), 1)
6048
- ])) : (c(), N(q, {
6060
+ ])) : (c(), P(z, {
6049
6061
  key: 2,
6050
6062
  ref: "composer",
6051
6063
  modelValue: r.draft,
6052
- "onUpdate:modelValue": t[1] || (t[1] = (F) => r.draft = F),
6064
+ "onUpdate:modelValue": t[1] || (t[1] = (N) => r.draft = N),
6053
6065
  placeholder: s.composerPlaceholder,
6054
6066
  disabled: !!s.pendingApproval,
6055
6067
  "attach-label": s.t("composer.attachFile"),
@@ -6057,7 +6069,7 @@ function ja(e, t, n, i, r, s) {
6057
6069
  onAttach: s.onAttach
6058
6070
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "onSend", "onAttach"]))
6059
6071
  ]),
6060
- r.moreOpen ? (c(), N(M, {
6072
+ r.moreOpen ? (c(), P(M, {
6061
6073
  key: 0,
6062
6074
  "can-rename": !!s.currentConv && !s.currentConv._draft,
6063
6075
  "can-export": !!s.currentConv && !s.currentConv._draft,
@@ -6065,21 +6077,21 @@ function ja(e, t, n, i, r, s) {
6065
6077
  "browser-notif-enabled": e.browserNotifEnabled,
6066
6078
  "status-url": s.statusUrl,
6067
6079
  "help-url": s.helpUrl,
6068
- onClose: t[2] || (t[2] = (F) => r.moreOpen = !1),
6080
+ onClose: t[2] || (t[2] = (N) => r.moreOpen = !1),
6069
6081
  onSoundToggle: e.onSoundToggle,
6070
6082
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6071
6083
  onAction: s.onMoreAction
6072
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
6073
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(j, {
6084
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0),
6085
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(F, {
6074
6086
  key: 1,
6075
6087
  "initial-value": s.currentConv.name || "",
6076
6088
  title: s.t("rename.dialogTitle"),
6077
- onClose: t[3] || (t[3] = (F) => r.renameDialogOpen = !1),
6089
+ onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
6078
6090
  onSubmit: s.onRenameSubmit
6079
- }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
6091
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
6080
6092
  r.pendingAttachments.length ? (c(), u("div", Pa, [
6081
- (c(!0), u(I, null, P(r.pendingAttachments, (F, z) => (c(), u("div", {
6082
- key: z,
6093
+ (c(!0), u(R, null, j(r.pendingAttachments, (N, U) => (c(), u("div", {
6094
+ key: U,
6083
6095
  class: "wm-attached__chip"
6084
6096
  }, [
6085
6097
  t[10] || (t[10] = o("svg", {
@@ -6095,11 +6107,11 @@ function ja(e, t, n, i, r, s) {
6095
6107
  }, [
6096
6108
  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" })
6097
6109
  ], -1)),
6098
- o("span", null, v(F.name), 1),
6110
+ o("span", null, v(N.name), 1),
6099
6111
  o("button", {
6100
6112
  type: "button",
6101
6113
  "aria-label": s.t("attachment.remove"),
6102
- onClick: (W) => r.pendingAttachments.splice(z, 1)
6114
+ onClick: (W) => r.pendingAttachments.splice(U, 1)
6103
6115
  }, [...t[9] || (t[9] = [
6104
6116
  o("svg", {
6105
6117
  width: "10",
@@ -6116,8 +6128,8 @@ function ja(e, t, n, i, r, s) {
6116
6128
  ], -1)
6117
6129
  ])], 8, Ua)
6118
6130
  ]))), 128))
6119
- ])) : b("", !0)
6120
- ], 64)) : (c(), N(p, {
6131
+ ])) : w("", !0)
6132
+ ], 64)) : (c(), P(p, {
6121
6133
  key: 1,
6122
6134
  "welcome-message": s.widgetWelcomeMessage,
6123
6135
  subtitle: s.widgetSubtitle,
@@ -6130,7 +6142,7 @@ function ja(e, t, n, i, r, s) {
6130
6142
  onSelect: s.onQuickLink,
6131
6143
  onResume: s.onDrawerPick
6132
6144
  }, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6133
- r.moreOpen && !s.currentConv ? (c(), N(M, {
6145
+ r.moreOpen && !s.currentConv ? (c(), P(M, {
6134
6146
  key: 3,
6135
6147
  "can-rename": !1,
6136
6148
  "can-export": !1,
@@ -6138,16 +6150,16 @@ function ja(e, t, n, i, r, s) {
6138
6150
  "browser-notif-enabled": e.browserNotifEnabled,
6139
6151
  "status-url": s.statusUrl,
6140
6152
  "help-url": s.helpUrl,
6141
- onClose: t[4] || (t[4] = (F) => r.moreOpen = !1),
6153
+ onClose: t[4] || (t[4] = (N) => r.moreOpen = !1),
6142
6154
  onSoundToggle: e.onSoundToggle,
6143
6155
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6144
6156
  onAction: s.onMoreAction
6145
- }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0)
6157
+ }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0)
6146
6158
  ], 64))
6147
- ], 6)) : b("", !0)
6159
+ ], 6)) : w("", !0)
6148
6160
  ], 2);
6149
6161
  }
6150
- const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-263d2e23"]]), qa = "0.5.14";
6162
+ const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-4250eeb2"]]), qa = "0.5.16";
6151
6163
  export {
6152
6164
  le as AIAvatar,
6153
6165
  ge as AVATAR_COLORS,
@@ -6165,7 +6177,7 @@ export {
6165
6177
  Xi as Feedback,
6166
6178
  Ui as FormCard,
6167
6179
  ln as Header,
6168
- Ee as HumanAvatar,
6180
+ Re as HumanAvatar,
6169
6181
  Ft as Launcher,
6170
6182
  be as MEDIA_RECORDER_SUPPORTED,
6171
6183
  Ir as MessageList,
@@ -6180,16 +6192,16 @@ export {
6180
6192
  qa as VERSION,
6181
6193
  ve as avatarColor,
6182
6194
  ye as avatarInitials,
6183
- Rr as captureScreenshotFile,
6184
- D as colors,
6195
+ Er as captureScreenshotFile,
6196
+ H as colors,
6185
6197
  Qe as createStore,
6186
- U as createTranslator,
6198
+ D as createTranslator,
6187
6199
  We as createTransport,
6188
6200
  oe as dateLocale,
6189
6201
  Ha as default,
6190
6202
  Le as formatTime,
6191
6203
  za as guessAttachmentKind,
6192
- Er as pickRecorderMime,
6204
+ Rr as pickRecorderMime,
6193
6205
  dn as renderInlineMarkdown,
6194
6206
  un as renderMarkdown,
6195
6207
  we as resolveLanguage,