@_solaris/messenger-widget 0.6.12 → 0.6.14

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 We, openBlock as c, createElementBlock as d, normalizeStyle as N, normalizeClass as x, toDisplayString as v, resolveComponent as P, createVNode as K, Transition as Ae, withCtx as Se, Fragment as I, renderList as F, withKeys as _e, withModifiers as G, createElementVNode as l, createCommentVNode as b, createBlock as B, resolveDynamicComponent as Te, mergeProps as je, withDirectives as $, vModelText as ee, createTextVNode as Me, renderSlot as $e, vModelCheckbox as Ge, vModelSelect as Ye, markRaw as Ee } from "vue";
1
+ import { reactive as We, openBlock as c, createElementBlock as d, normalizeStyle as N, normalizeClass as R, toDisplayString as y, resolveComponent as P, createVNode as K, Transition as Ae, withCtx as Se, Fragment as I, renderList as F, withKeys as _e, withModifiers as G, createElementVNode as l, createCommentVNode as b, createBlock as B, resolveDynamicComponent as Te, mergeProps as je, withDirectives as $, vModelText as ee, createTextVNode as Me, renderSlot as $e, vModelCheckbox as Ge, vModelSelect as Ye, markRaw as Ee } from "vue";
2
2
  const Je = [
3
3
  "connected",
4
4
  "message",
@@ -43,8 +43,8 @@ function tt(e) {
43
43
  p && p.forEach((L) => {
44
44
  try {
45
45
  L(g);
46
- } catch (R) {
47
- console.error("[transport] listener", u, R);
46
+ } catch (O) {
47
+ console.error("[transport] listener", u, O);
48
48
  }
49
49
  });
50
50
  }
@@ -72,10 +72,10 @@ function tt(e) {
72
72
  body: p !== void 0 ? JSON.stringify(p) : void 0
73
73
  });
74
74
  if (!L.ok) {
75
- const R = await o(L), V = new Error(
76
- `HTTP ${L.status} ${u} ${g} :: ${(R == null ? void 0 : R.error) || L.statusText}`
75
+ const O = await o(L), V = new Error(
76
+ `HTTP ${L.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || L.statusText}`
77
77
  );
78
- throw V.status = L.status, V.body = R, V;
78
+ throw V.status = L.status, V.body = O, V;
79
79
  }
80
80
  return L.status === 204 ? null : L.json();
81
81
  }
@@ -119,7 +119,7 @@ function tt(e) {
119
119
  }
120
120
  const p = await g.json();
121
121
  t.userId = p.external_id;
122
- const [L, R] = await Promise.all([
122
+ const [L, O] = await Promise.all([
123
123
  fetch(
124
124
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
125
125
  { credentials: "include" }
@@ -133,7 +133,7 @@ function tt(e) {
133
133
  return W.json();
134
134
  }),
135
135
  a("GET", "/customers/me")
136
- ]), V = { config: L, customer: (R == null ? void 0 : R.customer) ?? null };
136
+ ]), V = { config: L, customer: (O == null ? void 0 : O.customer) ?? null };
137
137
  return t.lastBootstrap = V, await k(), typeof document < "u" && (t.visibilityHandler = _, document.addEventListener(
138
138
  "visibilitychange",
139
139
  t.visibilityHandler
@@ -150,7 +150,7 @@ function tt(e) {
150
150
  console.error("[transport] initial /conversations failed", u);
151
151
  }
152
152
  }
153
- async function y() {
153
+ async function v() {
154
154
  const u = await a("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
@@ -185,7 +185,7 @@ function tt(e) {
185
185
  { message_id: g }
186
186
  );
187
187
  }
188
- async function O(u, g = {}) {
188
+ async function x(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
190
  g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
191
  const L = p.toString() ? `?${p.toString()}` : "";
@@ -217,11 +217,11 @@ function tt(e) {
217
217
  );
218
218
  }
219
219
  async function ie(u) {
220
- const g = u.name || "attachment", p = u.type || "application/octet-stream", L = u.size || 0, R = await a("POST", "/attachments", {
220
+ const g = u.name || "attachment", p = u.type || "application/octet-stream", L = u.size || 0, O = await a("POST", "/attachments", {
221
221
  mime_type: p,
222
222
  size_bytes: L,
223
223
  name: g
224
- }), V = await fetch(R.upload_url, {
224
+ }), V = await fetch(O.upload_url, {
225
225
  method: "PUT",
226
226
  headers: { "Content-Type": p },
227
227
  body: u
@@ -230,7 +230,7 @@ function tt(e) {
230
230
  throw new Error(`HTTP ${V.status} PUT signed upload`);
231
231
  return {
232
232
  type: st(p),
233
- path: R.path,
233
+ path: O.path,
234
234
  mime_type: p,
235
235
  size_bytes: L
236
236
  };
@@ -275,14 +275,14 @@ function tt(e) {
275
275
  t.panelOpen || Z();
276
276
  }, Ze));
277
277
  }
278
- function ye(u) {
278
+ function ve(u) {
279
279
  const g = t.panelOpen;
280
280
  t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), Q()) : te(), g !== t.panelOpen && h();
281
281
  }
282
282
  async function pe() {
283
283
  try {
284
- const u = await E(), g = u.reduce((L, R) => {
285
- const V = R == null ? void 0 : R.last_message_at;
284
+ const u = await E(), g = u.reduce((L, O) => {
285
+ const V = O == null ? void 0 : O.last_message_at;
286
286
  return V && (!L || V > L) ? V : L;
287
287
  }, null);
288
288
  g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), te());
@@ -334,18 +334,18 @@ function tt(e) {
334
334
  on: s,
335
335
  start: f,
336
336
  stop: w,
337
- setPanelOpen: ye,
337
+ setPanelOpen: ve,
338
338
  update: A,
339
339
  context: C,
340
340
  // REST
341
- getCustomer: y,
341
+ getCustomer: v,
342
342
  patchCustomer: T,
343
343
  listConversations: E,
344
344
  createConversation: S,
345
345
  getConversation: z,
346
346
  patchConversation: M,
347
347
  markConversationRead: D,
348
- listMessages: O,
348
+ listMessages: x,
349
349
  postMessage: q,
350
350
  postCallback: J,
351
351
  uploadAttachment: ie,
@@ -478,7 +478,7 @@ function it(e) {
478
478
  e.stop();
479
479
  }
480
480
  async function n(h) {
481
- const m = ye(h);
481
+ const m = ve(h);
482
482
  if (!m) return t.customer;
483
483
  try {
484
484
  const _ = await e.patchCustomer(m);
@@ -496,7 +496,7 @@ function it(e) {
496
496
  async function f(h) {
497
497
  const m = t.paginationByConv[h];
498
498
  if (!(m != null && m.loaded || m != null && m.loading)) {
499
- y(h, { nextCursor: null, loading: !0, loaded: !1 });
499
+ v(h, { nextCursor: null, loading: !0, loaded: !1 });
500
500
  try {
501
501
  const _ = await e.listMessages(h, {
502
502
  limit: o
@@ -506,13 +506,13 @@ function it(e) {
506
506
  const u = A.filter((g) => !((g == null ? void 0 : g.id) != null && C.has(`id:${String(g.id)}`) || g != null && g.client_msg_id && C.has(`c:${g.client_msg_id}`)));
507
507
  t.messagesByConv[h] = [...w, ...u].sort(
508
508
  te
509
- ), y(h, {
509
+ ), v(h, {
510
510
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
511
511
  loading: !1,
512
512
  loaded: !0
513
513
  });
514
514
  } catch (_) {
515
- console.error("[store] openConversation failed", _), y(h, {
515
+ console.error("[store] openConversation failed", _), v(h, {
516
516
  nextCursor: null,
517
517
  loading: !1,
518
518
  loaded: !1
@@ -526,26 +526,26 @@ function it(e) {
526
526
  if (!m || m.loading || !m.nextCursor) return;
527
527
  const w = (A = (t.messagesByConv[h] || []).find((C) => C == null ? void 0 : C.created_at)) == null ? void 0 : A.created_at;
528
528
  if (w) {
529
- y(h, { ...m, loading: !0 });
529
+ v(h, { ...m, loading: !0 });
530
530
  try {
531
531
  const C = await e.listMessages(h, {
532
532
  before: w,
533
533
  limit: o
534
534
  }), u = (C == null ? void 0 : C.messages) ?? [], g = t.messagesByConv[h] || [], p = /* @__PURE__ */ new Set();
535
- for (const R of g)
536
- (R == null ? void 0 : R.id) != null && p.add(`id:${String(R.id)}`), R != null && R.client_msg_id && p.add(`c:${R.client_msg_id}`);
537
- const L = u.filter((R) => !((R == null ? void 0 : R.id) != null && p.has(`id:${String(R.id)}`) || R != null && R.client_msg_id && p.has(`c:${R.client_msg_id}`)));
538
- t.messagesByConv[h] = [...L, ...g], y(h, {
535
+ for (const O of g)
536
+ (O == null ? void 0 : O.id) != null && p.add(`id:${String(O.id)}`), O != null && O.client_msg_id && p.add(`c:${O.client_msg_id}`);
537
+ const L = u.filter((O) => !((O == null ? void 0 : O.id) != null && p.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && p.has(`c:${O.client_msg_id}`)));
538
+ t.messagesByConv[h] = [...L, ...g], v(h, {
539
539
  nextCursor: (C == null ? void 0 : C.next_cursor) ?? null,
540
540
  loading: !1,
541
541
  loaded: !0
542
542
  });
543
543
  } catch (C) {
544
- console.error("[store] loadMore failed", C), y(h, { ...m, loading: !1 });
544
+ console.error("[store] loadMore failed", C), v(h, { ...m, loading: !1 });
545
545
  }
546
546
  }
547
547
  }
548
- function y(h, m) {
548
+ function v(h, m) {
549
549
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
550
550
  }
551
551
  async function T(h, m) {
@@ -618,8 +618,8 @@ function it(e) {
618
618
  ...C ? { attachments: _ } : {},
619
619
  ...w && typeof w == "object" ? { metadata: w } : {}
620
620
  });
621
- } catch (R) {
622
- console.error("[store] send failed", R), oe(h, u, {
621
+ } catch (O) {
622
+ console.error("[store] send failed", O), oe(h, u, {
623
623
  _failed: !0,
624
624
  _pending: !1
625
625
  });
@@ -634,7 +634,7 @@ function it(e) {
634
634
  }
635
635
  }
636
636
  const D = /* @__PURE__ */ new Map();
637
- async function O(h) {
637
+ async function x(h) {
638
638
  if (!h) return null;
639
639
  const m = D.get(h);
640
640
  if (m != null && m.url) {
@@ -751,7 +751,7 @@ function it(e) {
751
751
  function te(h, m) {
752
752
  return (h.created_at || "").localeCompare(m.created_at || "");
753
753
  }
754
- function ye(h) {
754
+ function ve(h) {
755
755
  if (!h || typeof h != "object") return null;
756
756
  const m = {}, _ = {};
757
757
  for (const [w, A] of Object.entries(h))
@@ -779,7 +779,7 @@ function it(e) {
779
779
  markConversationRead: S,
780
780
  send: z,
781
781
  clickCallback: M,
782
- signAttachment: O,
782
+ signAttachment: x,
783
783
  submitFeedback: q,
784
784
  getActionInFlight: ie,
785
785
  getLatestSuggestions: ae,
@@ -1263,22 +1263,22 @@ function _t(e) {
1263
1263
  if (!T) break;
1264
1264
  k.push(T[1]), r++;
1265
1265
  }
1266
- const y = k.map((T) => `<li>${de(T)}</li>`).join("");
1266
+ const v = k.map((T) => `<li>${de(T)}</li>`).join("");
1267
1267
  s.push({
1268
1268
  type: "block",
1269
- html: `<ul class="wm-md-ul">${y}</ul>`
1269
+ html: `<ul class="wm-md-ul">${v}</ul>`
1270
1270
  });
1271
1271
  continue;
1272
1272
  }
1273
1273
  const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1274
1274
  if (o) {
1275
- const k = parseInt(o[1], 10), y = [o[2]];
1275
+ const k = parseInt(o[1], 10), v = [o[2]];
1276
1276
  for (r++; r < t.length; ) {
1277
1277
  const S = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1278
1278
  if (!S) break;
1279
- y.push(S[1]), r++;
1279
+ v.push(S[1]), r++;
1280
1280
  }
1281
- const T = y.map((S) => `<li>${de(S)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1281
+ const T = v.map((S) => `<li>${de(S)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1282
1282
  s.push({
1283
1283
  type: "block",
1284
1284
  html: `<ol class="wm-md-ol"${E}>${T}</ol>`
@@ -1335,10 +1335,10 @@ function gt(e, t) {
1335
1335
  }
1336
1336
  return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
1337
1337
  }
1338
- function vt(e, t) {
1338
+ function yt(e, t) {
1339
1339
  return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
1340
1340
  }
1341
- function yt(e, t, s, r) {
1341
+ function vt(e, t, s, r) {
1342
1342
  const i = [
1343
1343
  `# ${e.name || s("common.conversation")}`,
1344
1344
  e.created_at ? s("export.createdOn", {
@@ -1350,7 +1350,7 @@ function yt(e, t, s, r) {
1350
1350
  if (!n) continue;
1351
1351
  const a = (n.text_md || "").trim();
1352
1352
  if (!a) continue;
1353
- const o = vt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1353
+ const o = yt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1354
1354
  i.push(`[${f}] ${o} :`), i.push(a), i.push("");
1355
1355
  }
1356
1356
  return i.join(`
@@ -1358,7 +1358,7 @@ function yt(e, t, s, r) {
1358
1358
  }
1359
1359
  function pt(e, t, s = H(), r) {
1360
1360
  if (!e) return;
1361
- const i = yt(e, t || [], s, re(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1361
+ const i = vt(e, t || [], s, re(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1362
1362
  try {
1363
1363
  const a = URL.createObjectURL(n), o = document.createElement("a");
1364
1364
  o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
@@ -1691,10 +1691,10 @@ const wt = {
1691
1691
  this.nextRevealAt + s.pauseBetweenMs
1692
1692
  ) + n;
1693
1693
  this.nextRevealAt = o;
1694
- const f = Math.max(0, o - r), k = e.id, y = setTimeout(() => {
1695
- this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1694
+ const f = Math.max(0, o - r), k = e.id, v = setTimeout(() => {
1695
+ this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== v), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1696
1696
  }, f);
1697
- this.revealTimers.push(y);
1697
+ this.revealTimers.push(v);
1698
1698
  },
1699
1699
  // Walk the message list and queue / instantly-reveal every new
1700
1700
  // entry according to its origin. Used by the `currentConvMessages`
@@ -1840,7 +1840,7 @@ const U = (e, t) => {
1840
1840
  }, Tt = ["src", "alt"];
1841
1841
  function Mt(e, t, s, r, i, n) {
1842
1842
  return c(), d("div", {
1843
- class: x(["wm-huav", { "wm-huav--tail": s.tail }]),
1843
+ class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
1844
1844
  style: N({
1845
1845
  width: s.size + "px",
1846
1846
  height: s.size + "px",
@@ -1855,12 +1855,12 @@ function Mt(e, t, s, r, i, n) {
1855
1855
  }, null, 8, Tt)) : (c(), d("span", {
1856
1856
  key: 1,
1857
1857
  style: N({ fontSize: s.size * 0.36 + "px" })
1858
- }, v(n.initials), 5))
1858
+ }, y(n.initials), 5))
1859
1859
  ], 6);
1860
1860
  }
1861
- const ve = /* @__PURE__ */ U(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1861
+ const ye = /* @__PURE__ */ U(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1862
1862
  name: "WmLauncher",
1863
- components: { HumanAvatar: ve },
1863
+ components: { HumanAvatar: ye },
1864
1864
  inject: {
1865
1865
  // Translator shared by the Messenger shell; French fallback when
1866
1866
  // the component is used standalone.
@@ -1898,7 +1898,7 @@ function zt(e, t, s, r, i, n) {
1898
1898
  default: Se(() => [
1899
1899
  n.visiblePeeks.length ? (c(), d("div", {
1900
1900
  key: 0,
1901
- class: x(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1901
+ class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1902
1902
  }, [
1903
1903
  (c(!0), d(I, null, F(n.visiblePeeks, (o, f) => (c(), d("div", {
1904
1904
  key: o.convId,
@@ -1948,20 +1948,20 @@ function zt(e, t, s, r, i, n) {
1948
1948
  key: 0,
1949
1949
  class: "wm-peek__avatarBadge",
1950
1950
  "aria-label": n.t("launcher.unreadMessages", { count: o.count })
1951
- }, v(o.count > 9 ? "9+" : o.count), 9, It)) : b("", !0)
1951
+ }, y(o.count > 9 ? "9+" : o.count), 9, It)) : b("", !0)
1952
1952
  ]),
1953
1953
  l("div", Bt, [
1954
1954
  l("div", Pt, [
1955
- l("span", Ut, v(o.senderName || n.t("common.agent")), 1),
1956
- l("span", Dt, v(n.t("launcher.repliedToYou")), 1)
1955
+ l("span", Ut, y(o.senderName || n.t("common.agent")), 1),
1956
+ l("span", Dt, y(n.t("launcher.repliedToYou")), 1)
1957
1957
  ]),
1958
- l("p", Ft, v(o.preview), 1)
1958
+ l("p", Ft, y(o.preview), 1)
1959
1959
  ]),
1960
1960
  l("button", {
1961
1961
  type: "button",
1962
1962
  class: "wm-peek__open",
1963
1963
  onClick: G((k) => e.$emit("open", o.convId), ["stop"])
1964
- }, v(n.t("common.open")), 9, Nt)
1964
+ }, y(n.t("common.open")), 9, Nt)
1965
1965
  ], 44, Rt))), 128))
1966
1966
  ], 2)) : b("", !0)
1967
1967
  ]),
@@ -1994,7 +1994,7 @@ function zt(e, t, s, r, i, n) {
1994
1994
  }) : n.t("launcher.unreadConversationsOne", {
1995
1995
  count: s.unreadCount
1996
1996
  })
1997
- }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, jt)) : b("", !0)
1997
+ }, y(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, jt)) : b("", !0)
1998
1998
  ], 8, Ht)
1999
1999
  ], 32);
2000
2000
  }
@@ -2033,7 +2033,7 @@ const qt = /* @__PURE__ */ U(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
2033
2033
  }, Wt = ["src", "alt"], $t = ["width", "height"];
2034
2034
  function Gt(e, t, s, r, i, n) {
2035
2035
  return c(), d("div", {
2036
- class: x(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2036
+ class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2037
2037
  style: N({
2038
2038
  width: s.size + "px",
2039
2039
  height: s.size + "px",
@@ -2042,7 +2042,7 @@ function Gt(e, t, s, r, i, n) {
2042
2042
  }, [
2043
2043
  s.pulse ? (c(), d("div", Kt)) : b("", !0),
2044
2044
  l("div", {
2045
- class: x(["wm-aiav__inner", {
2045
+ class: R(["wm-aiav__inner", {
2046
2046
  "wm-aiav__inner--glow": s.pulse,
2047
2047
  "wm-aiav__inner--img": !!s.imageUrl,
2048
2048
  "wm-aiav__inner--initials": !s.imageUrl && !!n.initials
@@ -2058,7 +2058,7 @@ function Gt(e, t, s, r, i, n) {
2058
2058
  }, null, 8, Wt)) : n.initials ? (c(), d("span", {
2059
2059
  key: 1,
2060
2060
  style: N({ fontSize: s.size * 0.36 + "px" })
2061
- }, v(n.initials), 5)) : (c(), d("svg", {
2061
+ }, y(n.initials), 5)) : (c(), d("svg", {
2062
2062
  key: 2,
2063
2063
  width: s.size * 0.5,
2064
2064
  height: s.size * 0.5,
@@ -2137,10 +2137,10 @@ function en(e, t, s, r, i, n) {
2137
2137
  key: 0,
2138
2138
  src: a.avatar_url,
2139
2139
  alt: a.name || ""
2140
- }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(a)), 1))
2140
+ }, null, 8, Xt)) : (c(), d("span", Qt, y(n.initialsFor(a)), 1))
2141
2141
  ], 4))), 128))
2142
2142
  ], 4),
2143
- s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : b("", !0)
2143
+ s.responseLabel ? (c(), d("span", Zt, y(s.responseLabel), 1)) : b("", !0)
2144
2144
  ])) : b("", !0);
2145
2145
  }
2146
2146
  const tn = /* @__PURE__ */ U(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
@@ -2195,7 +2195,7 @@ function fn(e, t, s, r, i, n) {
2195
2195
  s.showBack ? (c(), d("button", {
2196
2196
  key: 0,
2197
2197
  type: "button",
2198
- class: "wm-header__icon",
2198
+ class: "wm-header__icon wm-header__back",
2199
2199
  "aria-label": n.t("header.backToHome"),
2200
2200
  onClick: t[0] || (t[0] = (f) => e.$emit("back"))
2201
2201
  }, [...t[3] || (t[3] = [
@@ -2222,7 +2222,7 @@ function fn(e, t, s, r, i, n) {
2222
2222
  }, null, 8, ["name", "image-url"])
2223
2223
  ]),
2224
2224
  l("div", ln, [
2225
- l("div", cn, v(s.title), 1)
2225
+ l("div", cn, y(s.title), 1)
2226
2226
  ]),
2227
2227
  n.hasTeam ? (c(), B(o, {
2228
2228
  key: 0,
@@ -2234,7 +2234,7 @@ function fn(e, t, s, r, i, n) {
2234
2234
  s.showMore ? (c(), d("button", {
2235
2235
  key: 0,
2236
2236
  type: "button",
2237
- class: x(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2237
+ class: R(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2238
2238
  "aria-label": n.t("header.moreOptions"),
2239
2239
  title: n.t("header.moreOptions"),
2240
2240
  onClick: t[1] || (t[1] = (f) => e.$emit("more"))
@@ -2288,7 +2288,7 @@ function fn(e, t, s, r, i, n) {
2288
2288
  ])
2289
2289
  ]);
2290
2290
  }
2291
- const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Fe = {
2291
+ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-27232009"]]), Fe = {
2292
2292
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
2293
2293
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
2294
2294
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2296,7 +2296,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2296
2296
  link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
2297
2297
  }, gn = {
2298
2298
  name: "WmOnboarding",
2299
- components: { AIAvatar: me, HumanAvatar: ve },
2299
+ components: { AIAvatar: me, HumanAvatar: ye },
2300
2300
  inject: {
2301
2301
  // Translator + resolved-language getter shared by the Messenger
2302
2302
  // shell. The language getter feeds `formatTs` (relative date
@@ -2375,6 +2375,12 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2375
2375
  submitStarter() {
2376
2376
  this.canStart && this.$emit("start", this.starterText.trim());
2377
2377
  },
2378
+ // Enter sends (mirrors the chat composer) ; Shift+Enter inserts a
2379
+ // newline. The element is a textarea so the placeholder/text sits at
2380
+ // the top of the pill, matching the composer.
2381
+ onStarterKeydown(e) {
2382
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), this.submitStarter());
2383
+ },
2378
2384
  // Launch choreography, in two beats:
2379
2385
  // 1. 'fade' — hero, alerts and quick-link buttons fade out,
2380
2386
  // leaving a white panel with just the input pill.
@@ -2390,15 +2396,15 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2390
2396
  this.launchPhase = "fade", await this.wait(t ? 120 : 0), this.finishLaunch();
2391
2397
  return;
2392
2398
  }
2393
- this.launchPhase = "fade", await this.wait(230);
2399
+ this.launchPhase = "fade", await this.wait(320);
2394
2400
  const s = e.getBoundingClientRect();
2395
2401
  this.launchPhase = "slide", await this.$nextTick();
2396
2402
  const r = e.getBoundingClientRect(), i = s.left - r.left, n = s.top - r.top;
2397
- e.style.transition = "none", e.style.transform = `translate(${i}px, ${n}px)`, e.offsetWidth, e.style.transition = "transform 0.34s cubic-bezier(0.32, 0.72, 0, 1)", e.style.transform = "translate(0, 0)";
2403
+ e.style.transition = "none", e.style.transform = `translate(${i}px, ${n}px)`, e.offsetWidth, e.style.transition = "transform 0.44s cubic-bezier(0.32, 0.72, 0, 1)", e.style.transform = "translate(0, 0)";
2398
2404
  const a = () => {
2399
2405
  e.removeEventListener("transitionend", a), this.finishLaunch();
2400
2406
  };
2401
- e.addEventListener("transitionend", a), this.wait(420).then(() => this.finishLaunch());
2407
+ e.addEventListener("transitionend", a), this.wait(520).then(() => this.finishLaunch());
2402
2408
  },
2403
2409
  // Emit `launched` exactly once, however we got here (transitionend,
2404
2410
  // safety timeout, or the reduced-motion shortcut).
@@ -2491,7 +2497,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2491
2497
  });
2492
2498
  }
2493
2499
  }
2494
- }, vn = ["aria-label"], yn = {
2500
+ }, yn = ["aria-label"], vn = {
2495
2501
  key: 1,
2496
2502
  class: "wm-onb__hero-deco",
2497
2503
  width: "180",
@@ -2563,13 +2569,13 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2563
2569
  function Xn(e, t, s, r, i, n) {
2564
2570
  const a = P("AIAvatar");
2565
2571
  return c(), d("div", {
2566
- class: x(["wm-onb", {
2572
+ class: R(["wm-onb", {
2567
2573
  "wm-onb--launching": i.launchPhase !== "idle",
2568
2574
  "wm-onb--sliding": i.launchPhase === "slide"
2569
2575
  }])
2570
2576
  }, [
2571
2577
  l("div", {
2572
- class: x(["wm-onb__hero", { "wm-onb__hero--cover": n.hasCover }])
2578
+ class: R(["wm-onb__hero", { "wm-onb__hero--cover": n.hasCover }])
2573
2579
  }, [
2574
2580
  n.hasCover ? (c(), d("div", {
2575
2581
  key: 0,
@@ -2577,8 +2583,8 @@ function Xn(e, t, s, r, i, n) {
2577
2583
  style: N(n.coverStyle),
2578
2584
  role: "img",
2579
2585
  "aria-label": n.heroTitle
2580
- }, null, 12, vn)) : b("", !0),
2581
- n.hasCover ? b("", !0) : (c(), d("svg", yn, [...t[3] || (t[3] = [
2586
+ }, null, 12, yn)) : b("", !0),
2587
+ n.hasCover ? b("", !0) : (c(), d("svg", vn, [...t[4] || (t[4] = [
2582
2588
  l("circle", {
2583
2589
  cx: "170",
2584
2590
  cy: "10",
@@ -2610,8 +2616,8 @@ function Xn(e, t, s, r, i, n) {
2610
2616
  "image-url": s.defaultIconUrl
2611
2617
  }, null, 8, ["image-url"]),
2612
2618
  l("div", pn, [
2613
- l("div", wn, v(n.heroTitle), 1),
2614
- l("div", bn, v(n.heroSub), 1)
2619
+ l("div", wn, y(n.heroTitle), 1),
2620
+ l("div", bn, y(n.heroSub), 1)
2615
2621
  ])
2616
2622
  ], 2),
2617
2623
  n.unreadThreads.length ? (c(), d("div", kn, [
@@ -2622,9 +2628,9 @@ function Xn(e, t, s, r, i, n) {
2622
2628
  onClick: (f) => e.$emit("resume", o)
2623
2629
  }, [
2624
2630
  l("span", {
2625
- class: x(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2631
+ class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2626
2632
  }, [
2627
- n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[4] || (t[4] = [
2633
+ n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[5] || (t[5] = [
2628
2634
  l("svg", {
2629
2635
  width: "20",
2630
2636
  height: "20",
@@ -2648,48 +2654,49 @@ function Xn(e, t, s, r, i, n) {
2648
2654
  }, null, 8, Sn)
2649
2655
  ], 2),
2650
2656
  l("span", Tn, [
2651
- l("span", Mn, v(o.title), 1),
2657
+ l("span", Mn, y(o.title), 1),
2652
2658
  l("span", xn, [
2653
- n.senderLabel(o) ? (c(), d("span", On, v(n.senderLabel(o)) + " · ", 1)) : b("", !0),
2659
+ n.senderLabel(o) ? (c(), d("span", On, y(n.senderLabel(o)) + " · ", 1)) : b("", !0),
2654
2660
  l("span", {
2655
2661
  innerHTML: n.renderPreview(o.preview)
2656
2662
  }, null, 8, Rn)
2657
2663
  ])
2658
2664
  ]),
2659
2665
  l("span", Ln, [
2660
- n.formatTs(o._ts) ? (c(), d("span", En, v(n.formatTs(o._ts)), 1)) : b("", !0),
2661
- l("span", In, v(n.t("onboarding.resume")), 1)
2666
+ n.formatTs(o._ts) ? (c(), d("span", En, y(n.formatTs(o._ts)), 1)) : b("", !0),
2667
+ l("span", In, y(n.t("onboarding.resume")), 1)
2662
2668
  ])
2663
2669
  ], 8, Cn))), 128))
2664
2670
  ])) : b("", !0),
2665
2671
  l("div", Bn, [
2666
2672
  l("form", {
2667
2673
  ref: "starterForm",
2668
- class: x(["wm-onb__starter", {
2674
+ class: R(["wm-onb__starter", {
2669
2675
  "is-active": !!i.starterText.trim(),
2670
2676
  "wm-onb__starter--toBottom": i.launchPhase === "slide"
2671
2677
  }]),
2672
- onSubmit: t[1] || (t[1] = G((...o) => n.submitStarter && n.submitStarter(...o), ["prevent"]))
2678
+ onSubmit: t[2] || (t[2] = G((...o) => n.submitStarter && n.submitStarter(...o), ["prevent"]))
2673
2679
  }, [
2674
- $(l("input", {
2680
+ $(l("textarea", {
2675
2681
  ref: "starterInput",
2676
2682
  "onUpdate:modelValue": t[0] || (t[0] = (o) => i.starterText = o),
2677
- type: "text",
2678
2683
  class: "wm-onb__starter-input",
2684
+ rows: "1",
2679
2685
  placeholder: n.t("onboarding.starterPlaceholder"),
2680
2686
  disabled: s.busy,
2681
2687
  "aria-label": n.t("onboarding.start"),
2682
- enterkeyhint: "send"
2683
- }, null, 8, Pn), [
2688
+ enterkeyhint: "send",
2689
+ onKeydown: t[1] || (t[1] = (...o) => n.onStarterKeydown && n.onStarterKeydown(...o))
2690
+ }, null, 40, Pn), [
2684
2691
  [ee, i.starterText]
2685
2692
  ]),
2686
2693
  l("button", {
2687
2694
  type: "submit",
2688
- class: x(["wm-onb__starter-send", { "is-empty": !n.canStart }]),
2695
+ class: R(["wm-onb__starter-send", { "is-empty": !n.canStart }]),
2689
2696
  disabled: s.busy || !n.canStart,
2690
2697
  "aria-label": n.t("composer.send")
2691
2698
  }, [
2692
- s.busy ? (c(), d("span", Fn)) : (c(), d("svg", Dn, [...t[5] || (t[5] = [
2699
+ s.busy ? (c(), d("span", Fn)) : (c(), d("svg", Dn, [...t[6] || (t[6] = [
2693
2700
  l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" }, null, -1)
2694
2701
  ])]))
2695
2702
  ], 10, Un)
@@ -2713,8 +2720,8 @@ function Xn(e, t, s, r, i, n) {
2713
2720
  }, null, 8, qn)
2714
2721
  ]))
2715
2722
  ]),
2716
- l("span", Vn, v(o.label), 1),
2717
- n.isExternalLink(o) ? (c(), d("svg", Kn, [...t[6] || (t[6] = [
2723
+ l("span", Vn, y(o.label), 1),
2724
+ n.isExternalLink(o) ? (c(), d("svg", Kn, [...t[7] || (t[7] = [
2718
2725
  l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2719
2726
  ])])) : b("", !0)
2720
2727
  ], 8, Nn))), 128)),
@@ -2722,7 +2729,7 @@ function Xn(e, t, s, r, i, n) {
2722
2729
  key: 0,
2723
2730
  type: "button",
2724
2731
  class: "wm-onb__btn",
2725
- onClick: t[2] || (t[2] = (o) => e.$emit("view-history"))
2732
+ onClick: t[3] || (t[3] = (o) => e.$emit("view-history"))
2726
2733
  }, [
2727
2734
  l("span", Wn, [
2728
2735
  (c(), d("svg", $n, [
@@ -2731,9 +2738,9 @@ function Xn(e, t, s, r, i, n) {
2731
2738
  }, null, 8, Gn)
2732
2739
  ]))
2733
2740
  ]),
2734
- l("span", Yn, v(n.t("onboarding.allConversations")), 1),
2735
- l("span", Jn, v(s.openThreads.length), 1),
2736
- t[7] || (t[7] = l("svg", {
2741
+ l("span", Yn, y(n.t("onboarding.allConversations")), 1),
2742
+ l("span", Jn, y(s.openThreads.length), 1),
2743
+ t[8] || (t[8] = l("svg", {
2737
2744
  class: "wm-onb__btn-trail",
2738
2745
  width: "13",
2739
2746
  height: "13",
@@ -2751,9 +2758,9 @@ function Xn(e, t, s, r, i, n) {
2751
2758
  ])
2752
2759
  ], 2);
2753
2760
  }
2754
- const Qn = /* @__PURE__ */ U(gn, [["render", Xn], ["__scopeId", "data-v-aafac3f0"]]), Zn = {
2761
+ const Qn = /* @__PURE__ */ U(gn, [["render", Xn], ["__scopeId", "data-v-ca5a71a9"]]), Zn = {
2755
2762
  name: "WmHistory",
2756
- components: { AIAvatar: me, HumanAvatar: ve },
2763
+ components: { AIAvatar: me, HumanAvatar: ye },
2757
2764
  inject: {
2758
2765
  t: { default: () => H() },
2759
2766
  wmLocale: { default: () => () => "fr" }
@@ -2861,11 +2868,11 @@ function ms(e, t, s, r, i, n) {
2861
2868
  (c(!0), d(I, null, F(n.filteredThreads, (a) => (c(), d("button", {
2862
2869
  key: a.id,
2863
2870
  type: "button",
2864
- class: x(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2871
+ class: R(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2865
2872
  onClick: (o) => e.$emit("resume", a)
2866
2873
  }, [
2867
2874
  l("span", {
2868
- class: x(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2875
+ class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2869
2876
  }, [
2870
2877
  n.isDefaultAvatar(a) ? (c(), d("span", is, [...t[2] || (t[2] = [
2871
2878
  l("svg", {
@@ -2892,14 +2899,14 @@ function ms(e, t, s, r, i, n) {
2892
2899
  }, null, 8, as)) : b("", !0)
2893
2900
  ], 2),
2894
2901
  l("span", os, [
2895
- l("span", ls, v(a.title), 1),
2902
+ l("span", ls, y(a.title), 1),
2896
2903
  l("span", {
2897
2904
  class: "wm-hist__thread-preview",
2898
2905
  innerHTML: n.renderPreview(a.preview)
2899
2906
  }, null, 8, cs)
2900
2907
  ]),
2901
2908
  l("span", ds, [
2902
- n.formatTs(a._ts) ? (c(), d("span", us, v(n.formatTs(a._ts)), 1)) : b("", !0),
2909
+ n.formatTs(a._ts) ? (c(), d("span", us, y(n.formatTs(a._ts)), 1)) : b("", !0),
2903
2910
  t[3] || (t[3] = l("svg", {
2904
2911
  width: "14",
2905
2912
  height: "14",
@@ -2916,7 +2923,7 @@ function ms(e, t, s, r, i, n) {
2916
2923
  ], -1))
2917
2924
  ])
2918
2925
  ], 10, rs))), 128)),
2919
- n.filteredThreads.length ? b("", !0) : (c(), d("div", hs, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2926
+ n.filteredThreads.length ? b("", !0) : (c(), d("div", hs, y(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2920
2927
  ])
2921
2928
  ]);
2922
2929
  }
@@ -2937,10 +2944,10 @@ const gs = {
2937
2944
  return _s(this.detail);
2938
2945
  }
2939
2946
  }
2940
- }, vs = {
2947
+ }, ys = {
2941
2948
  class: "wm-result__icon",
2942
2949
  "aria-hidden": "true"
2943
- }, ys = {
2950
+ }, vs = {
2944
2951
  key: 0,
2945
2952
  width: "11",
2946
2953
  height: "11",
@@ -2983,10 +2990,10 @@ const gs = {
2983
2990
  }, ks = { class: "wm-result__body" }, Cs = { class: "wm-result__label" }, As = { class: "wm-result__detail" };
2984
2991
  function Ss(e, t, s, r, i, n) {
2985
2992
  return c(), d("div", {
2986
- class: x(["wm-result", `wm-result--${s.state}`])
2993
+ class: R(["wm-result", `wm-result--${s.state}`])
2987
2994
  }, [
2988
- l("span", vs, [
2989
- s.state === "success" ? (c(), d("svg", ys, [...t[0] || (t[0] = [
2995
+ l("span", ys, [
2996
+ s.state === "success" ? (c(), d("svg", vs, [...t[0] || (t[0] = [
2990
2997
  l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2991
2998
  ])])) : s.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
2992
2999
  l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
@@ -3014,13 +3021,13 @@ function Ss(e, t, s, r, i, n) {
3014
3021
  ])]))
3015
3022
  ]),
3016
3023
  l("span", ks, [
3017
- l("span", Cs, v(s.label), 1),
3024
+ l("span", Cs, y(s.label), 1),
3018
3025
  n.detailText ? (c(), d(I, { key: 0 }, [
3019
3026
  t[4] || (t[4] = l("span", {
3020
3027
  class: "wm-result__sep",
3021
3028
  "aria-hidden": "true"
3022
3029
  }, " · ", -1)),
3023
- l("span", As, v(n.detailText), 1)
3030
+ l("span", As, y(n.detailText), 1)
3024
3031
  ], 64)) : b("", !0)
3025
3032
  ])
3026
3033
  ], 2);
@@ -3045,7 +3052,7 @@ const Ts = /* @__PURE__ */ U(gs, [["render", Ss], ["__scopeId", "data-v-7284acd0
3045
3052
  function Bs(e, t, s, r, i, n) {
3046
3053
  return c(), d("div", xs, [
3047
3054
  l("div", Os, [
3048
- l("div", Rs, v(s.data.title || n.t("form.title")), 1),
3055
+ l("div", Rs, y(s.data.title || n.t("form.title")), 1),
3049
3056
  l("span", Ls, [
3050
3057
  t[0] || (t[0] = l("svg", {
3051
3058
  width: "11",
@@ -3060,7 +3067,7 @@ function Bs(e, t, s, r, i, n) {
3060
3067
  }, [
3061
3068
  l("polyline", { points: "20 6 9 17 4 12" })
3062
3069
  ], -1)),
3063
- Me(" " + v(n.t("form.sent")), 1)
3070
+ Me(" " + y(n.t("form.sent")), 1)
3064
3071
  ])
3065
3072
  ]),
3066
3073
  l("div", Es, [
@@ -3068,13 +3075,13 @@ function Bs(e, t, s, r, i, n) {
3068
3075
  key: o,
3069
3076
  class: "wm-art__field"
3070
3077
  }, [
3071
- l("div", Is, v(a.label), 1),
3078
+ l("div", Is, y(a.label), 1),
3072
3079
  l("div", {
3073
- class: x([
3080
+ class: R([
3074
3081
  "wm-art__fieldValue",
3075
3082
  { "wm-art__fieldValue--multi": a.multiline }
3076
3083
  ])
3077
- }, v(a.value), 3)
3084
+ }, y(a.value), 3)
3078
3085
  ]))), 128))
3079
3086
  ])
3080
3087
  ]);
@@ -3118,30 +3125,30 @@ function $s(e, t, s, r, i, n) {
3118
3125
  ])) : b("", !0),
3119
3126
  l("div", Hs, [
3120
3127
  l("div", js, [
3121
- l("div", zs, v(s.data.title), 1),
3122
- s.data.subtitle ? (c(), d("div", qs, v(s.data.subtitle), 1)) : b("", !0)
3128
+ l("div", zs, y(s.data.title), 1),
3129
+ s.data.subtitle ? (c(), d("div", qs, y(s.data.subtitle), 1)) : b("", !0)
3123
3130
  ]),
3124
3131
  s.data.badge && s.data.badge.label ? (c(), d("span", {
3125
3132
  key: 0,
3126
- class: x([
3133
+ class: R([
3127
3134
  "wm-art__badge",
3128
3135
  `wm-art__badge--${s.data.badge.tone || "neutral"}`
3129
3136
  ])
3130
- }, v(s.data.badge.label), 3)) : b("", !0)
3137
+ }, y(s.data.badge.label), 3)) : b("", !0)
3131
3138
  ]),
3132
3139
  n.hasBody ? (c(), d("div", Vs, [
3133
- s.data.body ? (c(), d("div", Ks, v(s.data.body), 1)) : b("", !0),
3140
+ s.data.body ? (c(), d("div", Ks, y(s.data.body), 1)) : b("", !0),
3134
3141
  n.fields.length ? (c(!0), d(I, { key: 1 }, F(n.fields, (a, o) => (c(), d("div", {
3135
3142
  key: o,
3136
3143
  class: "wm-art__field"
3137
3144
  }, [
3138
- l("div", Ws, v(a.label), 1),
3145
+ l("div", Ws, y(a.label), 1),
3139
3146
  l("div", {
3140
- class: x([
3147
+ class: R([
3141
3148
  "wm-art__fieldValue",
3142
3149
  { "wm-art__fieldValue--multi": a.multiline }
3143
3150
  ])
3144
- }, v(a.value), 3)
3151
+ }, y(a.value), 3)
3145
3152
  ]))), 128)) : b("", !0)
3146
3153
  ])) : b("", !0)
3147
3154
  ]);
@@ -3232,7 +3239,7 @@ const Js = {
3232
3239
  function lr(e, t, s, r, i, n) {
3233
3240
  return c(), d("div", Xs, [
3234
3241
  l("div", Qs, [
3235
- l("div", Zs, v(s.data.title), 1),
3242
+ l("div", Zs, y(s.data.title), 1),
3236
3243
  l("div", er, [
3237
3244
  l("div", tr, [
3238
3245
  t[0] || (t[0] = l("svg", {
@@ -3249,10 +3256,10 @@ function lr(e, t, s, r, i, n) {
3249
3256
  l("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3250
3257
  l("path", { d: "M13 5v2M13 17v2M13 11v2" })
3251
3258
  ], -1)),
3252
- l("span", null, v(s.data.reference), 1)
3259
+ l("span", null, y(s.data.reference), 1)
3253
3260
  ]),
3254
3261
  l("span", {
3255
- class: x([
3262
+ class: R([
3256
3263
  "wm-art__badge",
3257
3264
  "wm-tk__badge",
3258
3265
  `wm-art__badge--${s.data.status.tone || "neutral"}`
@@ -3262,19 +3269,19 @@ function lr(e, t, s, r, i, n) {
3262
3269
  class: "wm-tk__dot",
3263
3270
  "aria-hidden": "true"
3264
3271
  }, null, -1)),
3265
- Me(" " + v(s.data.status.label), 1)
3272
+ Me(" " + y(s.data.status.label), 1)
3266
3273
  ], 2)
3267
3274
  ]),
3268
- s.data.body ? (c(), d("div", nr, v(s.data.body), 1)) : b("", !0)
3275
+ s.data.body ? (c(), d("div", nr, y(s.data.body), 1)) : b("", !0)
3269
3276
  ]),
3270
3277
  n.fields.length ? (c(), d("div", sr, [
3271
3278
  (c(!0), d(I, null, F(n.fields, (a, o) => (c(), d("div", {
3272
3279
  key: o,
3273
3280
  class: "wm-art__field"
3274
3281
  }, [
3275
- l("div", rr, v(a.label), 1),
3282
+ l("div", rr, y(a.label), 1),
3276
3283
  l("div", {
3277
- class: x([
3284
+ class: R([
3278
3285
  "wm-art__fieldValue",
3279
3286
  { "wm-art__fieldValue--multi": a.multiline }
3280
3287
  ])
@@ -3319,7 +3326,7 @@ function lr(e, t, s, r, i, n) {
3319
3326
  }, null, -1),
3320
3327
  l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3321
3328
  ])])) : b("", !0),
3322
- l("span", null, v(a.value), 1)
3329
+ l("span", null, y(a.value), 1)
3323
3330
  ], 2)
3324
3331
  ]))), 128))
3325
3332
  ])) : b("", !0),
@@ -3344,7 +3351,7 @@ function lr(e, t, s, r, i, n) {
3344
3351
  }),
3345
3352
  l("path", { d: "M16 2v4M8 2v4M3 10h18" })
3346
3353
  ], -1)),
3347
- l("span", null, v(n.formattedDate), 1)
3354
+ l("span", null, y(n.formattedDate), 1)
3348
3355
  ])) : b("", !0)
3349
3356
  ]);
3350
3357
  }
@@ -3441,7 +3448,7 @@ const mr = /* @__PURE__ */ U(ur, [["render", hr]]), fr = {
3441
3448
  this.safeHref === "#" && e.preventDefault();
3442
3449
  }
3443
3450
  }
3444
- }, _r = ["href"], gr = ["src", "alt"], vr = ["src"], yr = ["src"], pr = ["href", "download"], wr = { class: "wm-att__main" }, br = { class: "wm-att__name" }, kr = {
3451
+ }, _r = ["href"], gr = ["src", "alt"], yr = ["src"], vr = ["src"], pr = ["href", "download"], wr = { class: "wm-att__main" }, br = { class: "wm-att__name" }, kr = {
3445
3452
  key: 0,
3446
3453
  class: "wm-att__meta"
3447
3454
  }, Cr = {
@@ -3451,7 +3458,7 @@ const mr = /* @__PURE__ */ U(ur, [["render", hr]]), fr = {
3451
3458
  };
3452
3459
  function Ar(e, t, s, r, i, n) {
3453
3460
  return c(), d("div", {
3454
- class: x(["wm-att", ["wm-att--" + (n.kind || "file")]])
3461
+ class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
3455
3462
  }, [
3456
3463
  n.kind === "image" && i.url ? (c(), d("a", {
3457
3464
  key: 0,
@@ -3470,13 +3477,13 @@ function Ar(e, t, s, r, i, n) {
3470
3477
  src: i.url,
3471
3478
  controls: "",
3472
3479
  preload: "metadata"
3473
- }, null, 8, vr)) : n.kind === "video" && i.url ? (c(), d("video", {
3480
+ }, null, 8, yr)) : n.kind === "video" && i.url ? (c(), d("video", {
3474
3481
  key: 2,
3475
3482
  src: i.url,
3476
3483
  controls: "",
3477
3484
  playsinline: "",
3478
3485
  preload: "auto"
3479
- }, null, 8, yr)) : (c(), d("a", {
3486
+ }, null, 8, vr)) : (c(), d("a", {
3480
3487
  key: 3,
3481
3488
  class: "wm-att__file",
3482
3489
  href: n.safeHref,
@@ -3502,8 +3509,8 @@ function Ar(e, t, s, r, i, n) {
3502
3509
  ])
3503
3510
  ], -1)),
3504
3511
  l("span", wr, [
3505
- l("span", br, v(n.displayName), 1),
3506
- n.sizeLabel ? (c(), d("span", kr, v(n.sizeLabel), 1)) : b("", !0)
3512
+ l("span", br, y(n.displayName), 1),
3513
+ n.sizeLabel ? (c(), d("span", kr, y(n.sizeLabel), 1)) : b("", !0)
3507
3514
  ]),
3508
3515
  i.loading ? (c(), d("span", Cr)) : b("", !0)
3509
3516
  ], 8, pr))
@@ -3524,7 +3531,7 @@ const Sr = /* @__PURE__ */ U(fr, [["render", Ar], ["__scopeId", "data-v-b207a8bd
3524
3531
  }, Mr = ["innerHTML"];
3525
3532
  function xr(e, t, s, r, i, n) {
3526
3533
  return c(), d("div", {
3527
- class: x(["wm-bubble", "wm-bubble--" + s.role])
3534
+ class: R(["wm-bubble", "wm-bubble--" + s.role])
3528
3535
  }, [
3529
3536
  $e(e.$slots, "default", {}, () => [
3530
3537
  l("span", { innerHTML: n.rendered }, null, 8, Mr)
@@ -3555,7 +3562,7 @@ const Br = {
3555
3562
  name: "WmMessageList",
3556
3563
  components: {
3557
3564
  AIAvatar: me,
3558
- HumanAvatar: ve,
3565
+ HumanAvatar: ye,
3559
3566
  Bubble: Or,
3560
3567
  Typing: Ir,
3561
3568
  ActionResult: Ts,
@@ -3670,7 +3677,7 @@ const Br = {
3670
3677
  if (o.role === "system") continue;
3671
3678
  const f = [];
3672
3679
  for (const k of o.messages)
3673
- for (const y of this.itemsOf(k)) f.push(y);
3680
+ for (const v of this.itemsOf(k)) f.push(v);
3674
3681
  o.items = f;
3675
3682
  }
3676
3683
  const t = [];
@@ -3956,9 +3963,9 @@ const Br = {
3956
3963
  // doit garder son arrondi.
3957
3964
  cornersFor(e, t) {
3958
3965
  var ie, ae, X;
3959
- const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, k = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = (Q, oe, Z) => Q != null && T != null ? Q + z >= T : oe === Z || oe === "card" && Z === "bubble";
3960
- let D = o, O = o, q = o, J = o;
3961
- return a ? (k && (O = f), (y || !n) && (q = f), k && M(E, k, r == null ? void 0 : r.top) && (D = f), y && M(S, y, r == null ? void 0 : r.bottom) && (J = f)) : (k && (D = f), (y || !n) && (J = f), k && M(E, k, r == null ? void 0 : r.top) && (O = f), y && M(S, y, r == null ? void 0 : r.bottom) && (q = f)), { tl: D, tr: O, br: q, bl: J };
3966
+ const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, k = i == null ? void 0 : i.bottom, v = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = (Q, oe, Z) => Q != null && T != null ? Q + z >= T : oe === Z || oe === "card" && Z === "bubble";
3967
+ let D = o, x = o, q = o, J = o;
3968
+ return a ? (k && (x = f), (v || !n) && (q = f), k && M(E, k, r == null ? void 0 : r.top) && (D = f), v && M(S, v, r == null ? void 0 : r.bottom) && (J = f)) : (k && (D = f), (v || !n) && (J = f), k && M(E, k, r == null ? void 0 : r.top) && (x = f), v && M(S, v, r == null ? void 0 : r.bottom) && (q = f)), { tl: D, tr: x, br: q, bl: J };
3962
3969
  },
3963
3970
  // Inline column-count for the mosaic grid, capped at 4. Single
3964
3971
  // attachment falls back to the vertical-list layout (null). Two
@@ -3981,8 +3988,8 @@ const Br = {
3981
3988
  // corners of every top-row cell flatten too.
3982
3989
  mosaicCornerStyle(e, t, s) {
3983
3990
  if (!t || t < 2) return null;
3984
- const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, k = e + r < t, y = "4px", T = {};
3985
- return (a || f) && (T["--wm-r-tl"] = y), (o || f) && (T["--wm-r-tr"] = y), (a || k) && (T["--wm-r-bl"] = y), (o || k) && (T["--wm-r-br"] = y), s && (T["--wm-r-tl"] = y, T["--wm-r-tr"] = y), Object.keys(T).length ? T : null;
3991
+ const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, k = e + r < t, v = "4px", T = {};
3992
+ return (a || f) && (T["--wm-r-tl"] = v), (o || f) && (T["--wm-r-tr"] = v), (a || k) && (T["--wm-r-bl"] = v), (o || k) && (T["--wm-r-br"] = v), s && (T["--wm-r-tl"] = v, T["--wm-r-tr"] = v), Object.keys(T).length ? T : null;
3986
3993
  },
3987
3994
  // Inline style emitting the four corner CSS variables. Set on
3988
3995
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -4113,7 +4120,7 @@ const Br = {
4113
4120
  return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
4114
4121
  if (t.state === "rejected") {
4115
4122
  if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
4116
- const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, T = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4123
+ const v = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, T = typeof v == "string" && v.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4117
4124
  return this.t(T);
4118
4125
  }
4119
4126
  return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((k = t.failure) == null ? void 0 : k.error)) || "";
@@ -4188,11 +4195,11 @@ const Br = {
4188
4195
  class: "wm-list__row wm-list__row--ai fade-up"
4189
4196
  }, si = { class: "wm-list__avatarSlot" }, ri = ["aria-label", "title"];
4190
4197
  function ii(e, t, s, r, i, n) {
4191
- const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), k = P("ArtifactRenderer"), y = P("Bubble"), T = P("AttachmentPreview"), E = P("Typing");
4198
+ const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), k = P("ArtifactRenderer"), v = P("Bubble"), T = P("AttachmentPreview"), E = P("Typing");
4192
4199
  return c(), d("div", Fr, [
4193
4200
  l("div", {
4194
4201
  ref: "scrollEl",
4195
- class: x(["wm-list", { "wm-list--silent": i.silentFades }]),
4202
+ class: R(["wm-list", { "wm-list--silent": i.silentFades }]),
4196
4203
  onScrollPassive: t[4] || (t[4] = (...S) => n.onScroll && n.onScroll(...S))
4197
4204
  }, [
4198
4205
  s.loadingMore ? (c(), d("div", Nr, [
@@ -4200,11 +4207,11 @@ function ii(e, t, s, r, i, n) {
4200
4207
  class: "wm-list__loadMore-spinner",
4201
4208
  "aria-hidden": "true"
4202
4209
  }, null, -1)),
4203
- l("span", Hr, v(n.t("messageList.loadingHistory")), 1)
4204
- ])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : b("", !0),
4210
+ l("span", Hr, y(n.t("messageList.loadingHistory")), 1)
4211
+ ])) : n.historyExhausted ? (c(), d("div", jr, y(n.t("messageList.conversationStart")), 1)) : b("", !0),
4205
4212
  s.dateLabel ? (c(), d("div", zr, [
4206
4213
  t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
4207
- l("span", qr, v(s.dateLabel), 1),
4214
+ l("span", qr, y(s.dateLabel), 1),
4208
4215
  t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
4209
4216
  ])) : b("", !0),
4210
4217
  (c(!0), d(I, null, F(n.groups, (S, z) => (c(), d(I, {
@@ -4212,16 +4219,16 @@ function ii(e, t, s, r, i, n) {
4212
4219
  }, [
4213
4220
  S.key === n.unreadGroupKey ? (c(), d("div", Vr, [
4214
4221
  t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4215
- l("span", Kr, v(n.t("messageList.unread")), 1),
4222
+ l("span", Kr, y(n.t("messageList.unread")), 1),
4216
4223
  t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4217
4224
  ])) : b("", !0),
4218
4225
  S.role === "system" || S.items.length ? (c(), d("div", {
4219
4226
  key: 1,
4220
- class: x(["wm-list__group", "wm-list__group--" + S.role])
4227
+ class: R(["wm-list__group", "wm-list__group--" + S.role])
4221
4228
  }, [
4222
4229
  S.role === "system" ? (c(), d("div", Wr, [
4223
4230
  t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4224
- l("span", $r, v(S.systemLabel), 1),
4231
+ l("span", $r, y(S.systemLabel), 1),
4225
4232
  t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4226
4233
  ])) : (c(), d(I, { key: 1 }, [
4227
4234
  (c(!0), d(I, null, F(S.items, (M, D) => (c(), d(I, {
@@ -4229,7 +4236,7 @@ function ii(e, t, s, r, i, n) {
4229
4236
  }, [
4230
4237
  l("div", {
4231
4238
  "data-row-key": `${n.messageKey(M.message)}-${M.partKey}`,
4232
- class: x(["wm-list__row fade-up", [
4239
+ class: R(["wm-list__row fade-up", [
4233
4240
  "wm-list__row--" + S.role,
4234
4241
  {
4235
4242
  "is-pending": M.message._pending,
@@ -4237,10 +4244,10 @@ function ii(e, t, s, r, i, n) {
4237
4244
  }
4238
4245
  ]]),
4239
4246
  style: N(n.cornersStyle(S, D)),
4240
- onPointerdown: (O) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
4241
- onPointerup: t[0] || (t[0] = (O) => n.onPressEnd()),
4242
- onPointercancel: t[1] || (t[1] = (O) => n.onPressEnd()),
4243
- onPointerleave: t[2] || (t[2] = (O) => n.onPressEnd()),
4247
+ onPointerdown: (x) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
4248
+ onPointerup: t[0] || (t[0] = (x) => n.onPressEnd()),
4249
+ onPointercancel: t[1] || (t[1] = (x) => n.onPressEnd()),
4250
+ onPointerleave: t[2] || (t[2] = (x) => n.onPressEnd()),
4244
4251
  onContextmenu: t[3] || (t[3] = G(() => {
4245
4252
  }, ["prevent"]))
4246
4253
  }, [
@@ -4279,18 +4286,18 @@ function ii(e, t, s, r, i, n) {
4279
4286
  artifact: n.artifactOf(M.message)
4280
4287
  }, null, 8, ["artifact"])) : (c(), d("div", {
4281
4288
  key: 5,
4282
- class: x(["wm-list__body", {
4289
+ class: R(["wm-list__body", {
4283
4290
  "wm-list__body--mixed": !!M.message.text_md && n.attachmentsOf(M.message).length > 0
4284
4291
  }])
4285
4292
  }, [
4286
- M.message.text_md ? (c(), B(y, {
4293
+ M.message.text_md ? (c(), B(v, {
4287
4294
  key: 0,
4288
4295
  role: S.role,
4289
4296
  text: M.message.text_md
4290
4297
  }, null, 8, ["role", "text"])) : b("", !0),
4291
4298
  n.attachmentsOf(M.message).length ? (c(), d("div", {
4292
4299
  key: 1,
4293
- class: x(["wm-list__atts", {
4300
+ class: R(["wm-list__atts", {
4294
4301
  "wm-list__atts--align-end": S.role === "user",
4295
4302
  "wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
4296
4303
  }]),
@@ -4302,9 +4309,9 @@ function ii(e, t, s, r, i, n) {
4302
4309
  }, [
4303
4310
  (c(!0), d(I, null, F(n.attachmentsOf(
4304
4311
  M.message
4305
- ), (O, q) => (c(), B(T, {
4312
+ ), (x, q) => (c(), B(T, {
4306
4313
  key: `${n.messageKey(M.message)}-att-${q}`,
4307
- attachment: O,
4314
+ attachment: x,
4308
4315
  style: N(
4309
4316
  n.mosaicCornerStyle(
4310
4317
  q,
@@ -4318,20 +4325,20 @@ function ii(e, t, s, r, i, n) {
4318
4325
  ], 46, Gr),
4319
4326
  D < S.items.length - 1 && i.pressedItemKey === `${n.messageKey(M.message)}-${M.partKey}` && (S.role !== "user" || n.timeOf(M.message)) ? (c(), d("div", {
4320
4327
  key: 0,
4321
- class: x(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
4328
+ class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
4322
4329
  }, [
4323
- S.role !== "user" ? (c(), d("span", Jr, v(n.roleLabel(S)), 1)) : b("", !0),
4330
+ S.role !== "user" ? (c(), d("span", Jr, y(n.roleLabel(S)), 1)) : b("", !0),
4324
4331
  S.role !== "user" && n.timeOf(M.message) ? (c(), d("span", Xr, "•")) : b("", !0),
4325
- n.timeOf(M.message) ? (c(), d("span", Qr, v(n.timeOf(M.message)), 1)) : b("", !0)
4332
+ n.timeOf(M.message) ? (c(), d("span", Qr, y(n.timeOf(M.message)), 1)) : b("", !0)
4326
4333
  ], 2)) : b("", !0)
4327
4334
  ], 64))), 128)),
4328
4335
  (S.role !== "user" || n.lastTimeOf(S)) && !n.hasTrailingOverlay(S) ? (c(), d("div", {
4329
4336
  key: 0,
4330
- class: x(["wm-list__meta", { "wm-list__meta--right": S.role === "user" }])
4337
+ class: R(["wm-list__meta", { "wm-list__meta--right": S.role === "user" }])
4331
4338
  }, [
4332
- S.role !== "user" ? (c(), d("span", Zr, v(n.roleLabel(S)), 1)) : b("", !0),
4339
+ S.role !== "user" ? (c(), d("span", Zr, y(n.roleLabel(S)), 1)) : b("", !0),
4333
4340
  S.role !== "user" && n.lastTimeOf(S) ? (c(), d("span", ei, "•")) : b("", !0),
4334
- n.lastTimeOf(S) ? (c(), d("span", ti, v(n.lastTimeOf(S)), 1)) : b("", !0)
4341
+ n.lastTimeOf(S) ? (c(), d("span", ti, y(n.lastTimeOf(S)), 1)) : b("", !0)
4335
4342
  ], 2)) : b("", !0)
4336
4343
  ], 64))
4337
4344
  ], 2)) : b("", !0)
@@ -4398,7 +4405,7 @@ function Ke({ audio: e }) {
4398
4405
  systemAudio: e ? "include" : "exclude"
4399
4406
  };
4400
4407
  }
4401
- function go(e) {
4408
+ function yo(e) {
4402
4409
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
4403
4410
  }
4404
4411
  async function li() {
@@ -4442,56 +4449,56 @@ async function di(e = {}) {
4442
4449
  t = await navigator.mediaDevices.getDisplayMedia(
4443
4450
  Ke({ audio: !0 })
4444
4451
  );
4445
- } catch (y) {
4446
- return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
4452
+ } catch (v) {
4453
+ return (v == null ? void 0 : v.name) !== "NotAllowedError" && console.error("[media] record picker", v), null;
4447
4454
  }
4448
4455
  const s = oi();
4449
4456
  let r;
4450
4457
  try {
4451
4458
  r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4452
- } catch (y) {
4453
- return console.error("[media] recorder init", y), t.getTracks().forEach((T) => {
4459
+ } catch (v) {
4460
+ return console.error("[media] recorder init", v), t.getTracks().forEach((T) => {
4454
4461
  T.stop();
4455
4462
  }), null;
4456
4463
  }
4457
4464
  const i = [];
4458
4465
  let n = null, a = !1;
4459
- r.addEventListener("dataavailable", (y) => {
4460
- y.data && y.data.size > 0 && i.push(y.data);
4466
+ r.addEventListener("dataavailable", (v) => {
4467
+ v.data && v.data.size > 0 && i.push(v.data);
4461
4468
  }), r.addEventListener("stop", () => {
4462
- var y, T;
4469
+ var v, T;
4463
4470
  if (n && clearInterval(n), t.getTracks().forEach((E) => {
4464
4471
  E.stop();
4465
4472
  }), i.length) {
4466
4473
  const E = r.mimeType || s || "video/webm", S = new Blob(i, { type: E }), z = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([S], `ecran-${M}.${z}`, {
4467
4474
  type: E
4468
4475
  });
4469
- (y = e.onfinalize) == null || y.call(e, D);
4476
+ (v = e.onfinalize) == null || v.call(e, D);
4470
4477
  } else
4471
4478
  (T = e.oncancel) == null || T.call(e);
4472
- }), t.getVideoTracks().forEach((y) => {
4473
- y.addEventListener("ended", () => o(), { once: !0 });
4479
+ }), t.getVideoTracks().forEach((v) => {
4480
+ v.addEventListener("ended", () => o(), { once: !0 });
4474
4481
  });
4475
4482
  function o() {
4476
4483
  if (!a && (a = !0, r.state !== "inactive"))
4477
4484
  try {
4478
4485
  r.stop();
4479
- } catch (y) {
4480
- console.error("[media] recorder stop", y);
4486
+ } catch (v) {
4487
+ console.error("[media] recorder stop", v);
4481
4488
  }
4482
4489
  }
4483
4490
  try {
4484
4491
  r.start(1e3);
4485
- } catch (y) {
4486
- return console.error("[media] recorder start", y), t.getTracks().forEach((T) => {
4492
+ } catch (v) {
4493
+ return console.error("[media] recorder start", v), t.getTracks().forEach((T) => {
4487
4494
  T.stop();
4488
4495
  }), null;
4489
4496
  }
4490
4497
  (k = e.onstart) == null || k.call(e);
4491
4498
  const f = Date.now();
4492
4499
  return n = setInterval(() => {
4493
- var y;
4494
- (y = e.ontick) == null || y.call(e, Date.now() - f);
4500
+ var v;
4501
+ (v = e.ontick) == null || v.call(e, Date.now() - f);
4495
4502
  }, 500), {
4496
4503
  stop: o,
4497
4504
  get state() {
@@ -4678,7 +4685,7 @@ const ui = [
4678
4685
  key: 1,
4679
4686
  class: "wm-compose__menu",
4680
4687
  role: "menu"
4681
- }, gi = ["disabled", "onClick"], vi = { class: "wm-compose__menuIcon" }, yi = {
4688
+ }, gi = ["disabled", "onClick"], yi = { class: "wm-compose__menuIcon" }, vi = {
4682
4689
  viewBox: "0 0 24 24",
4683
4690
  width: "14",
4684
4691
  height: "14",
@@ -4686,7 +4693,7 @@ const ui = [
4686
4693
  }, pi = ["d"], wi = ["placeholder", "disabled"], bi = { class: "wm-compose__actions" }, ki = ["title", "aria-label", "disabled"], Ci = ["disabled", "aria-label"];
4687
4694
  function Ai(e, t, s, r, i, n) {
4688
4695
  return c(), d("div", {
4689
- class: x(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4696
+ class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4690
4697
  style: N(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4691
4698
  }, [
4692
4699
  i.recording ? (c(), d("div", mi, [
@@ -4694,15 +4701,15 @@ function Ai(e, t, s, r, i, n) {
4694
4701
  class: "wm-rec__dot",
4695
4702
  "aria-hidden": "true"
4696
4703
  }, null, -1)),
4697
- l("span", fi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4704
+ l("span", fi, y(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4698
4705
  l("button", {
4699
4706
  type: "button",
4700
4707
  class: "wm-rec__stop",
4701
4708
  onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
4702
- }, v(n.t("composer.stop")), 1)
4709
+ }, y(n.t("composer.stop")), 1)
4703
4710
  ])) : b("", !0),
4704
4711
  l("form", {
4705
- class: x(["wm-compose", { "has-attach": i.attachOpen }]),
4712
+ class: R(["wm-compose", { "has-attach": i.attachOpen }]),
4706
4713
  onSubmit: t[7] || (t[7] = G((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4707
4714
  }, [
4708
4715
  l("input", {
@@ -4725,8 +4732,8 @@ function Ai(e, t, s, r, i, n) {
4725
4732
  disabled: a.disabled,
4726
4733
  onClick: (o) => n.onAttachAction(a.action)
4727
4734
  }, [
4728
- l("span", vi, [
4729
- (c(), d("svg", yi, [
4735
+ l("span", yi, [
4736
+ (c(), d("svg", vi, [
4730
4737
  l("path", {
4731
4738
  d: a.path,
4732
4739
  stroke: "currentColor",
@@ -4737,7 +4744,7 @@ function Ai(e, t, s, r, i, n) {
4737
4744
  }, null, 8, pi)
4738
4745
  ]))
4739
4746
  ]),
4740
- l("span", null, v(a.label), 1)
4747
+ l("span", null, y(a.label), 1)
4741
4748
  ], 8, gi))), 128))
4742
4749
  ])) : b("", !0),
4743
4750
  $(l("textarea", {
@@ -4755,7 +4762,7 @@ function Ai(e, t, s, r, i, n) {
4755
4762
  l("div", bi, [
4756
4763
  l("button", {
4757
4764
  type: "button",
4758
- class: x(["wm-compose__icon", { "is-open": i.attachOpen }]),
4765
+ class: R(["wm-compose__icon", { "is-open": i.attachOpen }]),
4759
4766
  title: s.attachLabel,
4760
4767
  "aria-label": s.attachLabel,
4761
4768
  disabled: i.recording,
@@ -4777,7 +4784,7 @@ function Ai(e, t, s, r, i, n) {
4777
4784
  ])], 10, ki),
4778
4785
  l("button", {
4779
4786
  type: "submit",
4780
- class: x(["wm-compose__send", { "is-empty": !n.canSend }]),
4787
+ class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
4781
4788
  disabled: !n.canSend,
4782
4789
  "aria-label": n.t("composer.send")
4783
4790
  }, [...t[10] || (t[10] = [
@@ -4799,7 +4806,7 @@ function Ai(e, t, s, r, i, n) {
4799
4806
  ], 34)
4800
4807
  ], 6);
4801
4808
  }
4802
- const Si = /* @__PURE__ */ U(hi, [["render", Ai], ["__scopeId", "data-v-a7f822e9"]]), Ti = {
4809
+ const Si = /* @__PURE__ */ U(hi, [["render", Ai], ["__scopeId", "data-v-2e0e17a9"]]), Ti = {
4803
4810
  name: "WmInlineCallbacks",
4804
4811
  props: {
4805
4812
  // Array d'items `{ id?, label, style?, ... }`. Pour les suggestions,
@@ -4844,7 +4851,7 @@ const Si = /* @__PURE__ */ U(hi, [["render", Ai], ["__scopeId", "data-v-a7f822e9
4844
4851
  function Li(e, t, s, r, i, n) {
4845
4852
  return s.items.length ? (c(), d("div", {
4846
4853
  key: n.batchKey,
4847
- class: x(["wm-icb", `wm-icb--${s.variant}`])
4854
+ class: R(["wm-icb", `wm-icb--${s.variant}`])
4848
4855
  }, [
4849
4856
  s.variant === "chips" ? (c(!0), d(I, { key: 0 }, F(s.items, (a, o) => (c(), d("button", {
4850
4857
  key: a.id != null ? a.id : o,
@@ -4852,15 +4859,15 @@ function Li(e, t, s, r, i, n) {
4852
4859
  class: "wm-icb__btn wm-icb__btn--chip",
4853
4860
  style: N({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
4854
4861
  onClick: (f) => e.$emit("select", a)
4855
- }, v(a.label), 13, Mi))), 128)) : (c(), d(I, { key: 1 }, [
4856
- n.headerTitle ? (c(), d("div", xi, v(n.headerTitle), 1)) : b("", !0),
4862
+ }, y(a.label), 13, Mi))), 128)) : (c(), d(I, { key: 1 }, [
4863
+ n.headerTitle ? (c(), d("div", xi, y(n.headerTitle), 1)) : b("", !0),
4857
4864
  l("div", Oi, [
4858
4865
  (c(!0), d(I, null, F(s.items, (a, o) => (c(), d("button", {
4859
4866
  key: a.id != null ? a.id : o,
4860
4867
  type: "button",
4861
- class: x(["wm-icb__btn", n.btnClass(a)]),
4868
+ class: R(["wm-icb__btn", n.btnClass(a)]),
4862
4869
  onClick: (f) => e.$emit("select", a)
4863
- }, v(a.label), 11, Ri))), 128))
4870
+ }, y(a.label), 11, Ri))), 128))
4864
4871
  ])
4865
4872
  ], 64))
4866
4873
  ], 2)) : b("", !0);
@@ -4997,8 +5004,8 @@ function ra(e, t, s, r, i, n) {
4997
5004
  }, null, 8, ["name", "image-url"])
4998
5005
  ]),
4999
5006
  l("div", Fi, [
5000
- l("div", Ni, v(s.form.title || n.t("form.title")), 1),
5001
- s.form.description ? (c(), d("div", Hi, v(s.form.description), 1)) : b("", !0)
5007
+ l("div", Ni, y(s.form.title || n.t("form.title")), 1),
5008
+ s.form.description ? (c(), d("div", Hi, y(s.form.description), 1)) : b("", !0)
5002
5009
  ])
5003
5010
  ]),
5004
5011
  l("form", {
@@ -5013,7 +5020,7 @@ function ra(e, t, s, r, i, n) {
5013
5020
  for: `wm-f-${i._uid}-${o.key}`,
5014
5021
  class: "wm-form__label"
5015
5022
  }, [
5016
- Me(v(o.label), 1),
5023
+ Me(y(o.label), 1),
5017
5024
  o.required ? (c(), d("span", zi, "*")) : b("", !0)
5018
5025
  ], 8, ji),
5019
5026
  o.type === "text" ? $((c(), d("input", {
@@ -5073,7 +5080,7 @@ function ra(e, t, s, r, i, n) {
5073
5080
  }, null, 8, Gi), [
5074
5081
  [Ge, i.values[o.key]]
5075
5082
  ]),
5076
- l("span", null, v(o.placeholder || n.t("common.yes")), 1)
5083
+ l("span", null, y(o.placeholder || n.t("common.yes")), 1)
5077
5084
  ])) : o.type === "select" ? $((c(), d("select", {
5078
5085
  key: 5,
5079
5086
  id: `wm-f-${i._uid}-${o.key}`,
@@ -5082,11 +5089,11 @@ function ra(e, t, s, r, i, n) {
5082
5089
  required: o.required,
5083
5090
  disabled: s.readOnly || i.busy
5084
5091
  }, [
5085
- l("option", Ji, v(o.placeholder || n.t("form.choose")), 1),
5092
+ l("option", Ji, y(o.placeholder || n.t("form.choose")), 1),
5086
5093
  (c(!0), d(I, null, F(o.options, (f) => (c(), d("option", {
5087
5094
  key: f.value,
5088
5095
  value: f.value
5089
- }, v(f.label), 9, Xi))), 128))
5096
+ }, y(f.label), 9, Xi))), 128))
5090
5097
  ], 8, Yi)), [
5091
5098
  [Ye, i.values[o.key]]
5092
5099
  ]) : o.type === "multiselect" ? (c(), d("div", Qi, [
@@ -5105,19 +5112,19 @@ function ra(e, t, s, r, i, n) {
5105
5112
  k.target.checked
5106
5113
  )
5107
5114
  }, null, 40, Zi),
5108
- l("span", null, v(f.label), 1)
5115
+ l("span", null, y(f.label), 1)
5109
5116
  ]))), 128))
5110
5117
  ])) : b("", !0)
5111
5118
  ]))), 128)),
5112
- i.error ? (c(), d("div", ea, v(i.error), 1)) : b("", !0),
5113
- s.readOnly ? (c(), d("div", sa, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
5119
+ i.error ? (c(), d("div", ea, y(i.error), 1)) : b("", !0),
5120
+ s.readOnly ? (c(), d("div", sa, y(n.t("form.responseSent")), 1)) : (c(), d("button", {
5114
5121
  key: 1,
5115
5122
  type: "submit",
5116
5123
  class: "wm-form__submit",
5117
5124
  disabled: i.busy
5118
5125
  }, [
5119
5126
  i.busy ? (c(), d("span", na)) : b("", !0),
5120
- l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5127
+ l("span", null, y(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5121
5128
  ], 8, ta))
5122
5129
  ], 32)
5123
5130
  ]);
@@ -5159,8 +5166,8 @@ const ia = /* @__PURE__ */ U(Bi, [["render", ra], ["__scopeId", "data-v-fe65cc56
5159
5166
  }, oa = { class: "wm-fb" }, la = { class: "wm-fb__title" }, ca = { class: "wm-fb__sub" }, da = { class: "wm-fb__row" }, ua = ["onClick"], ha = { class: "wm-fb__emoji" }, ma = { class: "wm-fb__label" }, fa = ["disabled"], _a = {
5160
5167
  key: 1,
5161
5168
  class: "wm-fb__done"
5162
- }, ga = { class: "wm-fb__doneTitle" }, va = { class: "wm-fb__doneSub" };
5163
- function ya(e, t, s, r, i, n) {
5169
+ }, ga = { class: "wm-fb__doneTitle" }, ya = { class: "wm-fb__doneSub" };
5170
+ function va(e, t, s, r, i, n) {
5164
5171
  return c(), d("div", oa, [
5165
5172
  s.done ? (c(), d("div", _a, [
5166
5173
  t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
@@ -5178,20 +5185,20 @@ function ya(e, t, s, r, i, n) {
5178
5185
  l("path", { d: "M20 6L9 17l-5-5" })
5179
5186
  ])
5180
5187
  ], -1)),
5181
- l("div", ga, v(n.t("feedback.doneTitle")), 1),
5182
- l("div", va, v(n.t("feedback.doneSubtitle")), 1)
5188
+ l("div", ga, y(n.t("feedback.doneTitle")), 1),
5189
+ l("div", ya, y(n.t("feedback.doneSubtitle")), 1)
5183
5190
  ])) : (c(), d(I, { key: 0 }, [
5184
- l("div", la, v(n.t("feedback.question")), 1),
5185
- l("div", ca, v(n.t("feedback.subtitle")), 1),
5191
+ l("div", la, y(n.t("feedback.question")), 1),
5192
+ l("div", ca, y(n.t("feedback.subtitle")), 1),
5186
5193
  l("div", da, [
5187
5194
  (c(!0), d(I, null, F(n.options, (a) => (c(), d("button", {
5188
5195
  key: a.v,
5189
5196
  type: "button",
5190
- class: x(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5197
+ class: R(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5191
5198
  onClick: (o) => i.sel = a.v
5192
5199
  }, [
5193
- l("span", ha, v(a.e), 1),
5194
- l("span", ma, v(a.l), 1)
5200
+ l("span", ha, y(a.e), 1),
5201
+ l("span", ma, y(a.l), 1)
5195
5202
  ], 10, ua))), 128))
5196
5203
  ]),
5197
5204
  l("button", {
@@ -5199,11 +5206,11 @@ function ya(e, t, s, r, i, n) {
5199
5206
  class: "wm-fb__send",
5200
5207
  disabled: !i.sel || s.busy,
5201
5208
  onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
5202
- }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, fa)
5209
+ }, y(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, fa)
5203
5210
  ], 64))
5204
5211
  ]);
5205
5212
  }
5206
- const pa = /* @__PURE__ */ U(aa, [["render", ya], ["__scopeId", "data-v-9b630564"]]), wa = {
5213
+ const pa = /* @__PURE__ */ U(aa, [["render", va], ["__scopeId", "data-v-9b630564"]]), wa = {
5207
5214
  name: "WmMoreMenu",
5208
5215
  inject: {
5209
5216
  // Translator shared by the Messenger shell; French fallback when
@@ -5278,7 +5285,7 @@ function Ea(e, t, s, r, i, n) {
5278
5285
  l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5279
5286
  ])
5280
5287
  ], -1)),
5281
- l("span", Aa, v(n.t("moreMenu.editTitle")), 1)
5288
+ l("span", Aa, y(n.t("moreMenu.editTitle")), 1)
5282
5289
  ])) : b("", !0),
5283
5290
  s.canExport ? (c(), d("button", {
5284
5291
  key: 1,
@@ -5301,7 +5308,7 @@ function Ea(e, t, s, r, i, n) {
5301
5308
  l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5302
5309
  ])
5303
5310
  ], -1)),
5304
- l("span", Sa, v(n.t("moreMenu.exportTranscript")), 1),
5311
+ l("span", Sa, y(n.t("moreMenu.exportTranscript")), 1),
5305
5312
  t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
5306
5313
  ])) : b("", !0)
5307
5314
  ])) : b("", !0),
@@ -5328,9 +5335,9 @@ function Ea(e, t, s, r, i, n) {
5328
5335
  l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5329
5336
  ])
5330
5337
  ], -1)),
5331
- l("span", xa, v(n.t("moreMenu.sound")), 1),
5338
+ l("span", xa, y(n.t("moreMenu.sound")), 1),
5332
5339
  l("span", {
5333
- class: x(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5340
+ class: R(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5334
5341
  }, [...t[9] || (t[9] = [
5335
5342
  l("span", { class: "wm-mm__knob" }, null, -1)
5336
5343
  ])], 2)
@@ -5359,7 +5366,7 @@ function Ea(e, t, s, r, i, n) {
5359
5366
  l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5360
5367
  ])
5361
5368
  ], -1)),
5362
- l("span", Ra, v(n.t("moreMenu.serviceStatus")), 1)
5369
+ l("span", Ra, y(n.t("moreMenu.serviceStatus")), 1)
5363
5370
  ])) : b("", !0),
5364
5371
  s.helpUrl ? (c(), d("button", {
5365
5372
  key: 1,
@@ -5382,7 +5389,7 @@ function Ea(e, t, s, r, i, n) {
5382
5389
  l("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" })
5383
5390
  ])
5384
5391
  ], -1)),
5385
- l("span", La, v(n.t("moreMenu.helpCenter")), 1)
5392
+ l("span", La, y(n.t("moreMenu.helpCenter")), 1)
5386
5393
  ])) : b("", !0)
5387
5394
  ])
5388
5395
  ])
@@ -5443,7 +5450,7 @@ function Va(e, t, s, r, i, n) {
5443
5450
  }),
5444
5451
  l("div", Ua, [
5445
5452
  l("div", Da, [
5446
- l("div", Fa, v(s.title || n.t("rename.title")), 1),
5453
+ l("div", Fa, y(s.title || n.t("rename.title")), 1),
5447
5454
  l("button", {
5448
5455
  type: "button",
5449
5456
  class: "wm-dialog__close",
@@ -5486,13 +5493,13 @@ function Va(e, t, s, r, i, n) {
5486
5493
  type: "button",
5487
5494
  class: "wm-dialog__btn",
5488
5495
  onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5489
- }, v(n.t("common.cancel")), 1),
5496
+ }, y(n.t("common.cancel")), 1),
5490
5497
  l("button", {
5491
5498
  type: "button",
5492
5499
  class: "wm-dialog__btn wm-dialog__btn--primary",
5493
5500
  disabled: !n.canSubmit,
5494
5501
  onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
5495
- }, v(n.t("common.save")), 9, qa)
5502
+ }, y(n.t("common.save")), 9, qa)
5496
5503
  ])
5497
5504
  ])
5498
5505
  ]);
@@ -5588,14 +5595,19 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5588
5595
  // PJ, formulaire, quick-link sans URL). Évite de polluer la liste
5589
5596
  // côté serveur avec des fils vides abandonnés.
5590
5597
  draftConv: null,
5591
- // Drives the one-off "launch" animation played ONLY when the
5592
- // user starts a conversation by typing in the home input (not
5593
- // when opening an existing thread). While true, the home fades
5594
- // everything but its input, slides that input down to the
5595
- // composer slot, then the chat fades in. See `onOnboardingStart`
5596
- // / `onHomeLaunched` / `screenTransition` / Onboarding's
5597
- // `launching` prop.
5598
+ // Drives the one-off, staged "launch" animation played ONLY when
5599
+ // the user starts a conversation by typing in the home input (not
5600
+ // when opening an existing thread). See `onOnboardingStart` /
5601
+ // `onHomeLaunched` and the `wm-launch-*` CSS.
5598
5602
  launching: !1,
5603
+ // Current beat of the launch timeline (only meaningful while
5604
+ // `launching`):
5605
+ // 'whiteslide' — home fades to white + input slides down (in
5606
+ // the Onboarding component)
5607
+ // 'header' — chat mounted; topbar drops in from the top,
5608
+ // messages still hidden
5609
+ // 'messages' — messages fade in
5610
+ launchStage: "idle",
5599
5611
  // First message captured from the home input, sent once the
5600
5612
  // launch animation has handed off to the real conversation.
5601
5613
  pendingLaunchText: "",
@@ -5736,8 +5748,8 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5736
5748
  var k;
5737
5749
  const i = e[r.id] || [], n = Y(r.last_read_message_id);
5738
5750
  let a = 0, o = null;
5739
- for (let y = i.length - 1; y >= 0; y--) {
5740
- const T = i[y];
5751
+ for (let v = i.length - 1; v >= 0; v--) {
5752
+ const T = i[v];
5741
5753
  if (!T) continue;
5742
5754
  if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5743
5755
  const E = Y(T.id);
@@ -5747,11 +5759,11 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5747
5759
  }
5748
5760
  }
5749
5761
  if (!i.length) {
5750
- const y = Y(r.last_message_id);
5751
- y != null && (n == null || y > n) && (a = 1, o = r.last_message_author || null);
5762
+ const v = Y(r.last_message_id);
5763
+ v != null && (n == null || v > n) && (a = 1, o = r.last_message_author || null);
5752
5764
  }
5753
5765
  const f = i.filter(
5754
- (y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
5766
+ (v) => !((v == null ? void 0 : v.id) != null && t[v.id] === 0)
5755
5767
  );
5756
5768
  return {
5757
5769
  ...r,
@@ -5977,8 +5989,8 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
5977
5989
  if (!(a != null && a.loaded)) return t;
5978
5990
  }
5979
5991
  const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
5980
- var o, f, k, y, T;
5981
- return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = a == null ? void 0 : a.payload) == null ? void 0 : k.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((E) => (E == null ? void 0 : E.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5992
+ var o, f, k, v, T;
5993
+ return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = a == null ? void 0 : a.payload) == null ? void 0 : k.attachments) && a.payload.attachments.length || (v = a == null ? void 0 : a.metadata) != null && v.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((E) => (E == null ? void 0 : E.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5982
5994
  });
5983
5995
  return t.length ? [...t, ...r] : r;
5984
5996
  },
@@ -6394,21 +6406,21 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6394
6406
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6395
6407
  },
6396
6408
  sendCurrentLauncherSize() {
6397
- var y, T, E, S, z, M, D;
6409
+ var v, T, E, S, z, M, D;
6398
6410
  if (this.isOpen) return;
6399
- const e = (T = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : T.call(y, ".wm-launcherWrap");
6411
+ const e = (T = (v = this.$el) == null ? void 0 : v.querySelector) == null ? void 0 : T.call(v, ".wm-launcherWrap");
6400
6412
  if (!e) return;
6401
6413
  const t = e.getBoundingClientRect();
6402
6414
  if (!t.width || !t.height) return;
6403
6415
  const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6404
6416
  let k = null;
6405
6417
  if (f) {
6406
- const O = f.getBoundingClientRect();
6418
+ const x = f.getBoundingClientRect();
6407
6419
  k = {
6408
- width: Math.ceil(O.width),
6409
- height: Math.ceil(O.height),
6410
- rightOffset: Math.max(0, Math.ceil(t.right - O.right)),
6411
- bottomOffset: Math.max(0, Math.ceil(t.bottom - O.bottom))
6420
+ width: Math.ceil(x.width),
6421
+ height: Math.ceil(x.height),
6422
+ rightOffset: Math.max(0, Math.ceil(t.right - x.right)),
6423
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - x.bottom))
6412
6424
  };
6413
6425
  }
6414
6426
  this.notifyParentResize("closed", {
@@ -6450,26 +6462,26 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6450
6462
  // lazily on the first outbound action (text / attachment / form /
6451
6463
  // quick-link without URL), so users who open the chat and walk away
6452
6464
  // don't leave empty threads behind.
6453
- // Home-screen starter input kick off the launch animation. We do
6454
- // NOT switch to the chat yet: the Onboarding component first fades
6455
- // out everything but its input and slides that input down to the
6456
- // composer slot, then emits `launched` (→ `onHomeLaunched`). The
6457
- // text is stashed until then. An empty submit just opens the chat.
6465
+ // Launch, beat 1 — home input submitted. We don't switch to the chat
6466
+ // yet: the Onboarding component fades everything but its input to
6467
+ // white, then slides that input down to the composer slot, then
6468
+ // emits `launched` (→ `onHomeLaunched`). The text is stashed until
6469
+ // then. Stage 'whiteslide' also hides the header (page goes white).
6458
6470
  onOnboardingStart(e) {
6459
- const t = (e || "").trim();
6460
- this.pendingLaunchText = t, this.launching = !0;
6461
- },
6462
- // Second half of the launch: the home input has reached the
6463
- // composer slot, so materialize the conversation. The swap is
6464
- // instant the composer is iso with the home input and lands in
6465
- // the same spot, so the input simply becomes the composer — while
6466
- // the message area animates in (`wm-screen--launching`). `onSend`
6467
- // posts the stashed text.
6471
+ this.pendingLaunchText = (e || "").trim(), this.launching = !0, this.launchStage = "whiteslide";
6472
+ },
6473
+ // Launch, beats 2-3 — the input has reached the composer slot, so we
6474
+ // materialize the conversation (the iso composer lands exactly where
6475
+ // the input stopped). Then the timeline plays out: the topbar drops
6476
+ // in from the top (messages still hidden), and only once it has
6477
+ // landed do the messages fade in. `onSend` posts the stashed text.
6468
6478
  onHomeLaunched() {
6469
6479
  const e = this.pendingLaunchText;
6470
- this.pendingLaunchText = "", this.startConv(), e && this.$nextTick(() => this.onSend(e)), window.setTimeout(() => {
6471
- this.launching = !1;
6472
- }, 650);
6480
+ this.pendingLaunchText = "", this.startConv(), e && this.$nextTick(() => this.onSend(e)), this.launchStage = "header", window.setTimeout(() => {
6481
+ this.launching && (this.launchStage = "messages");
6482
+ }, 520), window.setTimeout(() => {
6483
+ this.launching = !1, this.launchStage = "idle";
6484
+ }, 1160);
6473
6485
  },
6474
6486
  startConv() {
6475
6487
  this.draftConv = {
@@ -6820,34 +6832,37 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
6820
6832
  }, Ga = ["aria-label"], Ya = { class: "wm-screens" }, Ja = {
6821
6833
  key: "error",
6822
6834
  class: "wm-screen wm-state"
6823
- }, Xa = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Za = { class: "wm-state__errSub" }, eo = { class: "wm-bottom" }, to = {
6835
+ }, Xa = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Za = { class: "wm-state__errSub" }, eo = {
6836
+ key: "chat",
6837
+ class: "wm-screen wm-screen--chat"
6838
+ }, to = { class: "wm-bottom" }, no = {
6824
6839
  key: 0,
6825
6840
  ref: "floatEl",
6826
6841
  class: "wm-float"
6827
- }, no = {
6842
+ }, so = {
6828
6843
  key: 1,
6829
6844
  class: "wm-actionWait",
6830
6845
  role: "status",
6831
6846
  "aria-live": "polite"
6832
- }, so = { class: "wm-actionWait__lbl" }, ro = {
6847
+ }, ro = { class: "wm-actionWait__lbl" }, io = {
6833
6848
  key: 2,
6834
6849
  class: "wm-attached"
6835
- }, io = ["src", "alt"], ao = {
6850
+ }, ao = ["src", "alt"], oo = {
6836
6851
  key: 1,
6837
6852
  class: "wm-attached__file"
6838
- }, oo = { class: "wm-attached__fileMeta" }, lo = { class: "wm-attached__fileName" }, co = {
6853
+ }, lo = { class: "wm-attached__fileMeta" }, co = { class: "wm-attached__fileName" }, uo = {
6839
6854
  key: 0,
6840
6855
  class: "wm-attached__fileSize"
6841
- }, uo = ["aria-label", "onClick"], ho = {
6856
+ }, ho = ["aria-label", "onClick"], mo = {
6842
6857
  key: 3,
6843
6858
  class: "wm-ended",
6844
6859
  role: "status",
6845
6860
  "aria-live": "polite"
6846
- }, mo = { class: "wm-ended__lbl" };
6847
- function fo(e, t, s, r, i, n) {
6848
- const a = P("Launcher"), o = P("Header"), f = P("History"), k = P("Onboarding"), y = P("MessageList"), T = P("InlineCallbacks"), E = P("FormCard"), S = P("Feedback"), z = P("Composer"), M = P("MoreMenu"), D = P("RenameDialog");
6861
+ }, fo = { class: "wm-ended__lbl" };
6862
+ function _o(e, t, s, r, i, n) {
6863
+ const a = P("Launcher"), o = P("Header"), f = P("History"), k = P("Onboarding"), v = P("MessageList"), T = P("InlineCallbacks"), E = P("FormCard"), S = P("Feedback"), z = P("Composer"), M = P("MoreMenu"), D = P("RenameDialog");
6849
6864
  return c(), d("div", {
6850
- class: x(["wm-root", `wm-root--${s.displayMode}`]),
6865
+ class: R(["wm-root", `wm-root--${s.displayMode}`]),
6851
6866
  style: N(n.rootStyle)
6852
6867
  }, [
6853
6868
  !i.isOpen && !n.isEmbedded ? (c(), B(a, {
@@ -6860,15 +6875,16 @@ function fo(e, t, s, r, i, n) {
6860
6875
  }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6861
6876
  i.isOpen || n.isEmbedded ? (c(), d("section", {
6862
6877
  key: 1,
6863
- class: x([
6878
+ class: R([
6864
6879
  "wm-panel",
6865
6880
  `wm-panel--${s.displayMode}`,
6866
- { "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
6881
+ { "wm-panel--welcome": n.ready && !n.error && !n.currentConv },
6882
+ i.launching ? `wm-launch-${i.launchStage}` : ""
6867
6883
  ]),
6868
6884
  style: N(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6869
6885
  role: "dialog",
6870
6886
  "aria-label": "Messenger",
6871
- onClick: t[7] || (t[7] = (...O) => n.onPanelClick && n.onPanelClick(...O))
6887
+ onClick: t[7] || (t[7] = (...x) => n.onPanelClick && n.onPanelClick(...x))
6872
6888
  }, [
6873
6889
  !n.ready && !n.error ? (c(), d("div", $a, [
6874
6890
  n.isEmbedded ? b("", !0) : (c(), d("button", {
@@ -6876,7 +6892,7 @@ function fo(e, t, s, r, i, n) {
6876
6892
  type: "button",
6877
6893
  class: "wm-loading__close",
6878
6894
  "aria-label": n.t("loading.minimize"),
6879
- onClick: t[0] || (t[0] = (...O) => n.close && n.close(...O))
6895
+ onClick: t[0] || (t[0] = (...x) => n.close && n.close(...x))
6880
6896
  }, [...t[8] || (t[8] = [
6881
6897
  l("svg", {
6882
6898
  width: "13",
@@ -6932,8 +6948,8 @@ function fo(e, t, s, r, i, n) {
6932
6948
  ])
6933
6949
  ], -1)),
6934
6950
  l("div", null, [
6935
- l("div", Qa, v(n.t("error.connectionFailed")), 1),
6936
- l("div", Za, v(n.error), 1)
6951
+ l("div", Qa, y(n.t("error.connectionFailed")), 1),
6952
+ l("div", Za, y(n.error), 1)
6937
6953
  ])
6938
6954
  ])
6939
6955
  ])) : !n.currentConv && i.showHistory ? (c(), B(f, {
@@ -6941,11 +6957,8 @@ function fo(e, t, s, r, i, n) {
6941
6957
  class: "wm-screen",
6942
6958
  threads: n.openThreads,
6943
6959
  onResume: n.onDrawerPick
6944
- }, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d("div", {
6945
- key: "chat",
6946
- class: x(["wm-screen wm-screen--chat", { "wm-screen--launching": i.launching }])
6947
- }, [
6948
- K(y, {
6960
+ }, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d("div", eo, [
6961
+ K(v, {
6949
6962
  ref: "messageList",
6950
6963
  messages: n.displayedMessages,
6951
6964
  "streaming-active": n.streamingActive,
@@ -6959,8 +6972,8 @@ function fo(e, t, s, r, i, n) {
6959
6972
  "ai-agent-avatar-url": n.agentAvatarUrl,
6960
6973
  onLoadMore: n.onLoadMore
6961
6974
  }, 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"]),
6962
- l("div", eo, [
6963
- n.floatVisible ? (c(), d("div", to, [
6975
+ l("div", to, [
6976
+ n.floatVisible ? (c(), d("div", no, [
6964
6977
  n.pendingApproval ? (c(), B(T, {
6965
6978
  key: `appr-${n.pendingApproval.id}`,
6966
6979
  variant: "buttons",
@@ -6988,26 +7001,26 @@ function fo(e, t, s, r, i, n) {
6988
7001
  onSelect: n.onSuggestion
6989
7002
  }, null, 8, ["items", "onSelect"]))
6990
7003
  ], 512)) : b("", !0),
6991
- n.actionInFlight ? (c(), d("div", no, [
7004
+ n.actionInFlight ? (c(), d("div", so, [
6992
7005
  t[11] || (t[11] = l("span", {
6993
7006
  class: "wm-actionWait__spinner",
6994
7007
  "aria-hidden": "true"
6995
7008
  }, null, -1)),
6996
- l("span", so, v(n.t("action.inProgress", {
7009
+ l("span", ro, y(n.t("action.inProgress", {
6997
7010
  name: n.actionInFlightName
6998
7011
  })), 1)
6999
7012
  ])) : b("", !0),
7000
- i.pendingAttachments.length ? (c(), d("div", ro, [
7001
- (c(!0), d(I, null, F(i.pendingAttachments, (O, q) => (c(), d("div", {
7002
- key: O.path || q,
7013
+ i.pendingAttachments.length ? (c(), d("div", io, [
7014
+ (c(!0), d(I, null, F(i.pendingAttachments, (x, q) => (c(), d("div", {
7015
+ key: x.path || q,
7003
7016
  class: "wm-attached__item"
7004
7017
  }, [
7005
- O.previewUrl ? (c(), d("img", {
7018
+ x.previewUrl ? (c(), d("img", {
7006
7019
  key: 0,
7007
7020
  class: "wm-attached__thumb",
7008
- src: O.previewUrl,
7009
- alt: O.name
7010
- }, null, 8, io)) : (c(), d("div", ao, [
7021
+ src: x.previewUrl,
7022
+ alt: x.name
7023
+ }, null, 8, ao)) : (c(), d("div", oo, [
7011
7024
  t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
7012
7025
  l("svg", {
7013
7026
  width: "16",
@@ -7024,10 +7037,10 @@ function fo(e, t, s, r, i, n) {
7024
7037
  l("path", { d: "M14 2v6h6" })
7025
7038
  ])
7026
7039
  ], -1)),
7027
- l("span", oo, [
7028
- l("span", lo, v(O.name), 1),
7029
- n.formatAttachmentSize(O.size_bytes) ? (c(), d("span", co, v(n.formatAttachmentSize(
7030
- O.size_bytes
7040
+ l("span", lo, [
7041
+ l("span", co, y(x.name), 1),
7042
+ n.formatAttachmentSize(x.size_bytes) ? (c(), d("span", uo, y(n.formatAttachmentSize(
7043
+ x.size_bytes
7031
7044
  )), 1)) : b("", !0)
7032
7045
  ])
7033
7046
  ])),
@@ -7050,21 +7063,21 @@ function fo(e, t, s, r, i, n) {
7050
7063
  }, [
7051
7064
  l("path", { d: "M18 6L6 18M6 6l12 12" })
7052
7065
  ], -1)
7053
- ])], 8, uo)
7066
+ ])], 8, ho)
7054
7067
  ]))), 128))
7055
7068
  ])) : b("", !0),
7056
- n.endedBlockVisible ? (c(), d("div", ho, [
7057
- l("span", mo, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
7069
+ n.endedBlockVisible ? (c(), d("div", mo, [
7070
+ l("span", fo, y(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
7058
7071
  l("button", {
7059
7072
  type: "button",
7060
7073
  class: "wm-ended__btn",
7061
- onClick: t[2] || (t[2] = (O) => n.isClosed ? n.onReopen() : n.startConv())
7062
- }, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
7074
+ onClick: t[2] || (t[2] = (x) => n.isClosed ? n.onReopen() : n.startConv())
7075
+ }, y(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
7063
7076
  ])) : n.actionInFlight ? b("", !0) : (c(), B(z, {
7064
7077
  key: 4,
7065
7078
  ref: "composer",
7066
7079
  modelValue: i.draft,
7067
- "onUpdate:modelValue": t[3] || (t[3] = (O) => i.draft = O),
7080
+ "onUpdate:modelValue": t[3] || (t[3] = (x) => i.draft = x),
7068
7081
  placeholder: n.composerPlaceholder,
7069
7082
  "attach-label": n.t("composer.attachFile"),
7070
7083
  "display-mode": s.displayMode,
@@ -7079,7 +7092,7 @@ function fo(e, t, s, r, i, n) {
7079
7092
  "sound-enabled": e.soundEnabled,
7080
7093
  "status-url": n.statusUrl,
7081
7094
  "help-url": n.helpUrl,
7082
- onClose: t[4] || (t[4] = (O) => i.moreOpen = !1),
7095
+ onClose: t[4] || (t[4] = (x) => i.moreOpen = !1),
7083
7096
  onSoundToggle: e.onSoundToggle,
7084
7097
  onAction: n.onMoreAction
7085
7098
  }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
@@ -7087,10 +7100,10 @@ function fo(e, t, s, r, i, n) {
7087
7100
  key: 1,
7088
7101
  "initial-value": n.currentConv.name || "",
7089
7102
  title: n.t("rename.dialogTitle"),
7090
- onClose: t[5] || (t[5] = (O) => i.renameDialogOpen = !1),
7103
+ onClose: t[5] || (t[5] = (x) => i.renameDialogOpen = !1),
7091
7104
  onSubmit: n.onRenameSubmit
7092
7105
  }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
7093
- ], 2)) : (c(), B(k, {
7106
+ ])) : (c(), B(k, {
7094
7107
  key: "home",
7095
7108
  class: "wm-screen",
7096
7109
  title: n.widgetTitle,
@@ -7106,7 +7119,7 @@ function fo(e, t, s, r, i, n) {
7106
7119
  onLaunched: n.onHomeLaunched,
7107
7120
  onSelect: n.onQuickLink,
7108
7121
  onResume: n.onDrawerPick,
7109
- onViewHistory: t[1] || (t[1] = (O) => i.showHistory = !0)
7122
+ onViewHistory: t[1] || (t[1] = (x) => i.showHistory = !0)
7110
7123
  }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "cover-image-url", "quick-links", "open-threads", "busy", "launching", "onStart", "onLaunched", "onSelect", "onResume"]))
7111
7124
  ]),
7112
7125
  _: 1
@@ -7119,7 +7132,7 @@ function fo(e, t, s, r, i, n) {
7119
7132
  "sound-enabled": e.soundEnabled,
7120
7133
  "status-url": n.statusUrl,
7121
7134
  "help-url": n.helpUrl,
7122
- onClose: t[6] || (t[6] = (O) => i.moreOpen = !1),
7135
+ onClose: t[6] || (t[6] = (x) => i.moreOpen = !1),
7123
7136
  onSoundToggle: e.onSoundToggle,
7124
7137
  onAction: n.onMoreAction
7125
7138
  }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
@@ -7127,7 +7140,7 @@ function fo(e, t, s, r, i, n) {
7127
7140
  ], 6)) : b("", !0)
7128
7141
  ], 6);
7129
7142
  }
7130
- const vo = /* @__PURE__ */ U(Wa, [["render", fo], ["__scopeId", "data-v-20b36fa2"]]), yo = "0.6.12";
7143
+ const vo = /* @__PURE__ */ U(Wa, [["render", _o], ["__scopeId", "data-v-9601fbb5"]]), po = "0.6.14";
7131
7144
  export {
7132
7145
  me as AIAvatar,
7133
7146
  be as AVATAR_COLORS,
@@ -7144,7 +7157,7 @@ export {
7144
7157
  pa as Feedback,
7145
7158
  ia as FormCard,
7146
7159
  _n as Header,
7147
- ve as HumanAvatar,
7160
+ ye as HumanAvatar,
7148
7161
  Ei as InlineCallbacks,
7149
7162
  qt as Launcher,
7150
7163
  Le as MEDIA_RECORDER_SUPPORTED,
@@ -7156,7 +7169,7 @@ export {
7156
7169
  ht as SUPPORTED_LANGUAGES,
7157
7170
  tn as TeamAvatars,
7158
7171
  Ir as Typing,
7159
- yo as VERSION,
7172
+ po as VERSION,
7160
7173
  xe as avatarColor,
7161
7174
  Oe as avatarInitials,
7162
7175
  li as captureScreenshotFile,
@@ -7167,7 +7180,7 @@ export {
7167
7180
  re as dateLocale,
7168
7181
  vo as default,
7169
7182
  Ce as formatTime,
7170
- go as guessAttachmentKind,
7183
+ yo as guessAttachmentKind,
7171
7184
  oi as pickRecorderMime,
7172
7185
  Ve as renderInlineMarkdown,
7173
7186
  _t as renderMarkdown,