@_solaris/messenger-widget 0.5.16 → 0.5.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Pe, withCtx as Ue, Fragment as R, renderList as j, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as P, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as He, markRaw as ke } from "vue";
1
+ import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Ue, withCtx as Pe, Fragment as R, renderList as j, withKeys as ue, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as He, markRaw as ke } from "vue";
2
2
  const qe = [
3
3
  "connected",
4
4
  "message",
@@ -88,7 +88,10 @@ function We(e) {
88
88
  headers: s(),
89
89
  body: JSON.stringify({
90
90
  origin: t.origin,
91
- ...t.token ? { token: t.token } : {}
91
+ ...t.token ? { token: t.token } : {},
92
+ // Déclaration de mode du marchand (validée serveur contre
93
+ // widgets.allow_unauthenticated). Le serveur 400 si mismatch.
94
+ allowUnauthenticated: d.allowUnauthenticated === !0
92
95
  })
93
96
  }
94
97
  );
@@ -131,7 +134,7 @@ function We(e) {
131
134
  console.error("[transport] initial /conversations failed", d);
132
135
  }
133
136
  }
134
- async function b() {
137
+ async function w() {
135
138
  const d = await a("GET", "/customers/me");
136
139
  return (d == null ? void 0 : d.customer) ?? null;
137
140
  }
@@ -175,7 +178,7 @@ function We(e) {
175
178
  `/conversations/${encodeURIComponent(d)}/messages${y}`
176
179
  );
177
180
  }
178
- async function U(d, f) {
181
+ async function P(d, f) {
179
182
  se();
180
183
  const _ = {
181
184
  client_msg_id: f.client_msg_id,
@@ -190,7 +193,7 @@ function We(e) {
190
193
  _
191
194
  );
192
195
  }
193
- async function W(d, f, _) {
196
+ async function G(d, f, _) {
194
197
  return se(), a(
195
198
  "POST",
196
199
  `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
@@ -248,12 +251,12 @@ function We(e) {
248
251
  console.error("[transport] bad SSE payload", d, _);
249
252
  }
250
253
  }
251
- function G() {
254
+ function Y() {
252
255
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
253
256
  }
254
257
  function se() {
255
258
  clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
256
- t.panelOpen || G();
259
+ t.panelOpen || Y();
257
260
  }, Ve));
258
261
  }
259
262
  function ce(d) {
@@ -279,7 +282,7 @@ function We(e) {
279
282
  function m() {
280
283
  if (document.hidden)
281
284
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
282
- t.hiddenGraceTimer = null, document.hidden && (h(), G(), r("paused"));
285
+ t.hiddenGraceTimer = null, document.hidden && (h(), Y(), r("paused"));
283
286
  }, Ke);
284
287
  else {
285
288
  if (t.hiddenGraceTimer) {
@@ -290,7 +293,7 @@ function We(e) {
290
293
  }
291
294
  }
292
295
  function g() {
293
- h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, G(), t.visibilityHandler && (document.removeEventListener(
296
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Y(), t.visibilityHandler && (document.removeEventListener(
294
297
  "visibilitychange",
295
298
  t.visibilityHandler
296
299
  ), t.visibilityHandler = null), t.started = !1;
@@ -301,7 +304,7 @@ function We(e) {
301
304
  stop: g,
302
305
  setPanelOpen: ce,
303
306
  // REST
304
- getCustomer: b,
307
+ getCustomer: w,
305
308
  patchCustomer: T,
306
309
  listConversations: I,
307
310
  createConversation: A,
@@ -309,8 +312,8 @@ function We(e) {
309
312
  patchConversation: M,
310
313
  markConversationRead: F,
311
314
  listMessages: N,
312
- postMessage: U,
313
- postCallback: W,
315
+ postMessage: P,
316
+ postCallback: G,
314
317
  uploadAttachment: Z,
315
318
  signAttachment: ee,
316
319
  // Read-only state
@@ -459,7 +462,7 @@ function Qe(e) {
459
462
  async function p(h) {
460
463
  const m = t.paginationByConv[h];
461
464
  if (!(m != null && m.loaded || m != null && m.loading)) {
462
- b(h, { nextCursor: null, loading: !0, loaded: !1 });
465
+ w(h, { nextCursor: null, loading: !0, loaded: !1 });
463
466
  try {
464
467
  const g = await e.listMessages(h, {
465
468
  limit: l
@@ -469,13 +472,13 @@ function Qe(e) {
469
472
  const y = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
470
473
  t.messagesByConv[h] = [...d, ...y].sort(
471
474
  ce
472
- ), b(h, {
475
+ ), w(h, {
473
476
  nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
474
477
  loading: !1,
475
478
  loaded: !0
476
479
  });
477
480
  } catch (g) {
478
- console.error("[store] openConversation failed", g), b(h, {
481
+ console.error("[store] openConversation failed", g), w(h, {
479
482
  nextCursor: null,
480
483
  loading: !1,
481
484
  loaded: !1
@@ -489,7 +492,7 @@ function Qe(e) {
489
492
  if (!m || m.loading || !m.nextCursor) return;
490
493
  const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
491
494
  if (d) {
492
- b(h, { ...m, loading: !0 });
495
+ w(h, { ...m, loading: !0 });
493
496
  try {
494
497
  const _ = await e.listMessages(h, {
495
498
  before: d,
@@ -498,17 +501,17 @@ function Qe(e) {
498
501
  for (const x of C)
499
502
  (x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
500
503
  const L = y.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
501
- t.messagesByConv[h] = [...L, ...C], b(h, {
504
+ t.messagesByConv[h] = [...L, ...C], w(h, {
502
505
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
503
506
  loading: !1,
504
507
  loaded: !0
505
508
  });
506
509
  } catch (_) {
507
- console.error("[store] loadMore failed", _), b(h, { ...m, loading: !1 });
510
+ console.error("[store] loadMore failed", _), w(h, { ...m, loading: !1 });
508
511
  }
509
512
  }
510
513
  }
511
- function b(h, m) {
514
+ function w(h, m) {
512
515
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
513
516
  }
514
517
  async function T(h, m) {
@@ -582,7 +585,7 @@ function Qe(e) {
582
585
  ...d && typeof d == "object" ? { metadata: d } : {}
583
586
  });
584
587
  } catch (x) {
585
- console.error("[store] send failed", x), G(h, y, {
588
+ console.error("[store] send failed", x), Y(h, y, {
586
589
  _failed: !0,
587
590
  _pending: !1
588
591
  });
@@ -616,7 +619,7 @@ function Qe(e) {
616
619
  }
617
620
  return null;
618
621
  }
619
- async function U(h, { rating: m, comment: g } = {}) {
622
+ async function P(h, { rating: m, comment: g } = {}) {
620
623
  const d = t.conversations.find((y) => y.id === h), _ = {
621
624
  ...(d == null ? void 0 : d.metadata) || {},
622
625
  feedback: {
@@ -627,7 +630,7 @@ function Qe(e) {
627
630
  };
628
631
  await T(h, { metadata: _ });
629
632
  }
630
- function W(h) {
633
+ function G(h) {
631
634
  var g, d;
632
635
  const m = t.messagesByConv[h] || [];
633
636
  for (let f = m.length - 1; f >= 0; f--) {
@@ -702,7 +705,7 @@ function Qe(e) {
702
705
  function ne(h, m) {
703
706
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
704
707
  }
705
- function G(h, m, g) {
708
+ function Y(h, m, g) {
706
709
  const d = t.messagesByConv[h];
707
710
  if (!d) return;
708
711
  const f = d.findIndex((y) => y.id === m);
@@ -753,8 +756,8 @@ function Qe(e) {
753
756
  send: z,
754
757
  clickCallback: M,
755
758
  signAttachment: N,
756
- submitFeedback: U,
757
- getPendingApproval: W,
759
+ submitFeedback: P,
760
+ getPendingApproval: G,
758
761
  getActionInFlight: ee,
759
762
  getLatestSuggestions: te,
760
763
  getLatestForm: Z,
@@ -1149,7 +1152,7 @@ function ae(e) {
1149
1152
  const t = (n = e == null ? void 0 : e.author) == null ? void 0 : n.type;
1150
1153
  return t === "agent_ia" || t === "agent_human";
1151
1154
  }
1152
- function J(e) {
1155
+ function W(e) {
1153
1156
  if (e == null) return null;
1154
1157
  const t = typeof e == "number" ? e : Number(e);
1155
1158
  return Number.isFinite(t) ? t : null;
@@ -1479,7 +1482,7 @@ const ot = {
1479
1482
  ) + r;
1480
1483
  this.nextRevealAt = a;
1481
1484
  const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
1482
- this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1485
+ this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1483
1486
  }, l);
1484
1487
  this.revealTimers.push(k);
1485
1488
  },
@@ -1600,7 +1603,7 @@ const ot = {
1600
1603
  if (!(e != null && e.id) || e._draft || !this.store) return;
1601
1604
  const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n = pt(t);
1602
1605
  if (n == null) return;
1603
- const i = J(e.last_read_message_id), r = J(n);
1606
+ const i = W(e.last_read_message_id), r = W(n);
1604
1607
  r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1605
1608
  const l = this._readMarkerPending;
1606
1609
  this._readMarkerPending = null, this._readMarkerTimer = null, l && this.store && this.store.markConversationRead(
@@ -1614,7 +1617,7 @@ const ot = {
1614
1617
  function pt(e) {
1615
1618
  for (let t = e.length - 1; t >= 0; t--) {
1616
1619
  const n = e[t];
1617
- if (!(!n || n._pending) && J(n.id) != null)
1620
+ if (!(!n || n._pending) && W(n.id) != null)
1618
1621
  return n.id;
1619
1622
  }
1620
1623
  return null;
@@ -1701,8 +1704,8 @@ function Nt(e, t, n, i, r, s) {
1701
1704
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1702
1705
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1703
1706
  }, [
1704
- V(Pe, { name: "wm-peek" }, {
1705
- default: Ue(() => [
1707
+ V(Ue, { name: "wm-peek" }, {
1708
+ default: Pe(() => [
1706
1709
  s.visiblePeeks.length ? (c(), u("div", {
1707
1710
  key: 0,
1708
1711
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
@@ -1721,15 +1724,15 @@ function Nt(e, t, n, i, r, s) {
1721
1724
  }),
1722
1725
  onClick: (k) => e.$emit("open", l.convId),
1723
1726
  onKeydown: [
1724
- ue(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1725
- ue(Y((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1727
+ ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1728
+ ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1726
1729
  ]
1727
1730
  }, [
1728
1731
  o("button", {
1729
1732
  type: "button",
1730
1733
  class: "wm-peek__close",
1731
1734
  "aria-label": s.t("launcher.dismiss"),
1732
- onClick: Y((k) => e.$emit("dismiss", l.convId), ["stop"])
1735
+ onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
1733
1736
  }, [...t[5] || (t[5] = [
1734
1737
  o("svg", {
1735
1738
  width: "9",
@@ -1755,7 +1758,7 @@ function Nt(e, t, n, i, r, s) {
1755
1758
  key: 0,
1756
1759
  class: "wm-peek__avatarBadge",
1757
1760
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1758
- }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : w("", !0)
1761
+ }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : b("", !0)
1759
1762
  ]),
1760
1763
  o("div", Tt, [
1761
1764
  o("div", xt, [
@@ -1767,10 +1770,10 @@ function Nt(e, t, n, i, r, s) {
1767
1770
  o("button", {
1768
1771
  type: "button",
1769
1772
  class: "wm-peek__open",
1770
- onClick: Y((k) => e.$emit("open", l.convId), ["stop"])
1773
+ onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1771
1774
  }, v(s.t("common.open")), 9, Rt)
1772
1775
  ], 44, Ct))), 128))
1773
- ], 2)) : w("", !0)
1776
+ ], 2)) : b("", !0)
1774
1777
  ]),
1775
1778
  _: 1
1776
1779
  }),
@@ -1801,11 +1804,11 @@ function Nt(e, t, n, i, r, s) {
1801
1804
  }) : s.t("launcher.unreadConversationsOne", {
1802
1805
  count: n.unreadCount
1803
1806
  })
1804
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : w("", !0)
1807
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : b("", !0)
1805
1808
  ], 8, Et)
1806
1809
  ], 32);
1807
1810
  }
1808
- const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-9d7efc48"]]), Pt = {
1811
+ const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-9d7efc48"]]), Ut = {
1809
1812
  name: "WmAIAvatar",
1810
1813
  props: {
1811
1814
  size: { type: Number, default: 26 },
@@ -1834,7 +1837,7 @@ const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-9d7efc48
1834
1837
  return ve(this.name);
1835
1838
  }
1836
1839
  }
1837
- }, Ut = {
1840
+ }, Pt = {
1838
1841
  key: 0,
1839
1842
  class: "wm-aiav__pulse"
1840
1843
  }, jt = ["src", "alt"], Dt = ["width", "height"];
@@ -1847,7 +1850,7 @@ function zt(e, t, n, i, r, s) {
1847
1850
  "--wm-avr": n.size * 0.32 + "px"
1848
1851
  })
1849
1852
  }, [
1850
- n.pulse ? (c(), u("div", Ut)) : w("", !0),
1853
+ n.pulse ? (c(), u("div", Pt)) : b("", !0),
1851
1854
  o("div", {
1852
1855
  class: O(["wm-aiav__inner", {
1853
1856
  "wm-aiav__inner--glow": n.pulse,
@@ -1896,7 +1899,7 @@ function zt(e, t, n, i, r, s) {
1896
1899
  ], 6)
1897
1900
  ], 6);
1898
1901
  }
1899
- const le = /* @__PURE__ */ B(Pt, [["render", zt], ["__scopeId", "data-v-6f7f685d"]]), Ht = {
1902
+ const le = /* @__PURE__ */ B(Ut, [["render", zt], ["__scopeId", "data-v-6f7f685d"]]), Ht = {
1900
1903
  name: "WmTeamAvatars",
1901
1904
  props: {
1902
1905
  members: { type: Array, default: () => [] },
@@ -1947,8 +1950,8 @@ function Wt(e, t, n, i, r, s) {
1947
1950
  }, null, 8, $t)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1948
1951
  ], 4))), 128))
1949
1952
  ], 4),
1950
- n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : w("", !0)
1951
- ])) : w("", !0);
1953
+ n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
1954
+ ])) : b("", !0);
1952
1955
  }
1953
1956
  const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1954
1957
  name: "WmHeader",
@@ -2031,11 +2034,11 @@ function on(e, t, n, i, r, s) {
2031
2034
  o("div", en, [
2032
2035
  o("div", tn, v(n.title), 1)
2033
2036
  ]),
2034
- s.hasTeam ? (c(), P(l, {
2037
+ s.hasTeam ? (c(), U(l, {
2035
2038
  key: 0,
2036
2039
  members: s.displayedTeamMembers,
2037
2040
  "response-label": ""
2038
- }, null, 8, ["members"])) : w("", !0)
2041
+ }, null, 8, ["members"])) : b("", !0)
2039
2042
  ], 64)) : (c(), u("div", nn)),
2040
2043
  o("div", sn, [
2041
2044
  n.showMore ? (c(), u("button", {
@@ -2069,7 +2072,7 @@ function on(e, t, n, i, r, s) {
2069
2072
  r: "1.6"
2070
2073
  })
2071
2074
  ], -1)
2072
- ])], 10, rn)) : w("", !0),
2075
+ ])], 10, rn)) : b("", !0),
2073
2076
  n.showClose ? (c(), u("button", {
2074
2077
  key: 1,
2075
2078
  type: "button",
@@ -2091,7 +2094,7 @@ function on(e, t, n, i, r, s) {
2091
2094
  }, [
2092
2095
  o("path", { d: "M18 6L6 18M6 6l12 12" })
2093
2096
  ], -1)
2094
- ])], 8, an)) : w("", !0)
2097
+ ])], 8, an)) : b("", !0)
2095
2098
  ])
2096
2099
  ]);
2097
2100
  }
@@ -2142,22 +2145,22 @@ function un(e) {
2142
2145
  if (!T) break;
2143
2146
  k.push(T[1]), i++;
2144
2147
  }
2145
- const b = k.map((T) => `<li>${re(T)}</li>`).join("");
2148
+ const w = k.map((T) => `<li>${re(T)}</li>`).join("");
2146
2149
  n.push({
2147
2150
  type: "block",
2148
- html: `<ul class="wm-md-ul">${b}</ul>`
2151
+ html: `<ul class="wm-md-ul">${w}</ul>`
2149
2152
  });
2150
2153
  continue;
2151
2154
  }
2152
2155
  const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
2153
2156
  if (l) {
2154
- const k = parseInt(l[1], 10), b = [l[2]];
2157
+ const k = parseInt(l[1], 10), w = [l[2]];
2155
2158
  for (i++; i < t.length; ) {
2156
2159
  const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
2157
2160
  if (!A) break;
2158
- b.push(A[1]), i++;
2161
+ w.push(A[1]), i++;
2159
2162
  }
2160
- const T = b.map((A) => `<li>${re(A)}</li>`).join(""), I = k !== 1 ? ` start="${k}"` : "";
2163
+ const T = w.map((A) => `<li>${re(A)}</li>`).join(""), I = k !== 1 ? ` start="${k}"` : "";
2161
2164
  n.push({
2162
2165
  type: "block",
2163
2166
  html: `<ol class="wm-md-ol"${I}>${T}</ol>`
@@ -2279,7 +2282,7 @@ const Te = {
2279
2282
  }, On = {
2280
2283
  key: 1,
2281
2284
  class: "wm-onb__section"
2282
- }, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, Rn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Pn = { class: "wm-onb__thread-title" }, Un = ["innerHTML"], jn = { class: "wm-onb__thread-meta" }, Dn = {
2285
+ }, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, Rn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Un = { class: "wm-onb__thread-title" }, Pn = ["innerHTML"], jn = { class: "wm-onb__thread-meta" }, Dn = {
2283
2286
  key: 0,
2284
2287
  class: "wm-onb__thread-time"
2285
2288
  }, zn = {
@@ -2378,11 +2381,11 @@ function Hn(e, t, n, i, r, s) {
2378
2381
  ]),
2379
2382
  o("span", Mn, [
2380
2383
  o("span", Tn, v(l.label), 1),
2381
- l.description ? (c(), u("span", xn, v(l.description), 1)) : w("", !0)
2384
+ l.description ? (c(), u("span", xn, v(l.description), 1)) : b("", !0)
2382
2385
  ])
2383
2386
  ], 10, kn))), 128))
2384
2387
  ], 2)
2385
- ])) : w("", !0),
2388
+ ])) : b("", !0),
2386
2389
  n.openThreads.length ? (c(), u("div", On, [
2387
2390
  o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
2388
2391
  o("div", In, [
@@ -2437,17 +2440,17 @@ function Hn(e, t, n, i, r, s) {
2437
2440
  key: 0,
2438
2441
  class: "wm-onb__thread-dot",
2439
2442
  "aria-label": s.t("onboarding.unread")
2440
- }, null, 8, Nn)) : w("", !0)
2443
+ }, null, 8, Nn)) : b("", !0)
2441
2444
  ], 2),
2442
2445
  o("span", Fn, [
2443
- o("span", Pn, v(l.title), 1),
2446
+ o("span", Un, v(l.title), 1),
2444
2447
  o("span", {
2445
2448
  class: "wm-onb__thread-preview",
2446
2449
  innerHTML: s.renderPreview(l.preview)
2447
- }, null, 8, Un)
2450
+ }, null, 8, Pn)
2448
2451
  ]),
2449
2452
  o("span", jn, [
2450
- s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : w("", !0),
2453
+ s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : b("", !0),
2451
2454
  t[6] || (t[6] = o("svg", {
2452
2455
  width: "14",
2453
2456
  height: "14",
@@ -2464,9 +2467,9 @@ function Hn(e, t, n, i, r, s) {
2464
2467
  ], -1))
2465
2468
  ])
2466
2469
  ], 8, Bn))), 128)),
2467
- s.filteredThreads.length ? w("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2470
+ s.filteredThreads.length ? b("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2468
2471
  ])
2469
- ])) : w("", !0)
2472
+ ])) : b("", !0)
2470
2473
  ]);
2471
2474
  }
2472
2475
  const qn = /* @__PURE__ */ B(hn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
@@ -2570,7 +2573,7 @@ function es(e, t, n, i, r, s) {
2570
2573
  "aria-hidden": "true"
2571
2574
  }, " · ", -1)),
2572
2575
  o("span", Zn, v(s.detailText), 1)
2573
- ], 64)) : w("", !0)
2576
+ ], 64)) : b("", !0)
2574
2577
  ])
2575
2578
  ], 2);
2576
2579
  }
@@ -2664,11 +2667,11 @@ function ks(e, t, n, i, r, s) {
2664
2667
  alt: n.data.title || "",
2665
2668
  loading: "lazy"
2666
2669
  }, null, 8, fs)
2667
- ])) : w("", !0),
2670
+ ])) : b("", !0),
2668
2671
  o("div", gs, [
2669
2672
  o("div", _s, [
2670
2673
  o("div", ps, v(n.data.title), 1),
2671
- n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : w("", !0)
2674
+ n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : b("", !0)
2672
2675
  ]),
2673
2676
  n.data.badge && n.data.badge.label ? (c(), u("span", {
2674
2677
  key: 0,
@@ -2676,10 +2679,10 @@ function ks(e, t, n, i, r, s) {
2676
2679
  "wm-art__badge",
2677
2680
  `wm-art__badge--${n.data.badge.tone || "neutral"}`
2678
2681
  ])
2679
- }, v(n.data.badge.label), 3)) : w("", !0)
2682
+ }, v(n.data.badge.label), 3)) : b("", !0)
2680
2683
  ]),
2681
2684
  s.hasBody ? (c(), u("div", ys, [
2682
- n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : w("", !0),
2685
+ n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : b("", !0),
2683
2686
  s.fields.length ? (c(!0), u(R, { key: 1 }, j(s.fields, (a, l) => (c(), u("div", {
2684
2687
  key: l,
2685
2688
  class: "wm-art__field"
@@ -2691,8 +2694,8 @@ function ks(e, t, n, i, r, s) {
2691
2694
  { "wm-art__fieldValue--multi": a.multiline }
2692
2695
  ])
2693
2696
  }, v(a.value), 3)
2694
- ]))), 128)) : w("", !0)
2695
- ])) : w("", !0)
2697
+ ]))), 128)) : b("", !0)
2698
+ ])) : b("", !0)
2696
2699
  ]);
2697
2700
  }
2698
2701
  const Cs = /* @__PURE__ */ B(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
@@ -2778,7 +2781,7 @@ const Ss = {
2778
2781
  key: 1,
2779
2782
  class: "wm-art__footer wm-tk__footer"
2780
2783
  };
2781
- function Ps(e, t, n, i, r, s) {
2784
+ function Us(e, t, n, i, r, s) {
2782
2785
  return c(), u("div", Ms, [
2783
2786
  o("div", Ts, [
2784
2787
  o("div", xs, v(n.data.title), 1),
@@ -2814,7 +2817,7 @@ function Ps(e, t, n, i, r, s) {
2814
2817
  pe(" " + v(n.data.status.label), 1)
2815
2818
  ], 2)
2816
2819
  ]),
2817
- n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : w("", !0)
2820
+ n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : b("", !0)
2818
2821
  ]),
2819
2822
  s.fields.length ? (c(), u("div", Rs, [
2820
2823
  (c(!0), u(R, null, j(s.fields, (a, l) => (c(), u("div", {
@@ -2867,11 +2870,11 @@ function Ps(e, t, n, i, r, s) {
2867
2870
  rx: "2"
2868
2871
  }, null, -1),
2869
2872
  o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2870
- ])])) : w("", !0),
2873
+ ])])) : b("", !0),
2871
2874
  o("span", null, v(a.value), 1)
2872
2875
  ], 2)
2873
2876
  ]))), 128))
2874
- ])) : w("", !0),
2877
+ ])) : b("", !0),
2875
2878
  n.data.created_at ? (c(), u("div", Fs, [
2876
2879
  t[4] || (t[4] = o("svg", {
2877
2880
  width: "11",
@@ -2894,13 +2897,13 @@ function Ps(e, t, n, i, r, s) {
2894
2897
  o("path", { d: "M16 2v4M8 2v4M3 10h18" })
2895
2898
  ], -1)),
2896
2899
  o("span", null, v(s.formattedDate), 1)
2897
- ])) : w("", !0)
2900
+ ])) : b("", !0)
2898
2901
  ]);
2899
2902
  }
2900
- const Us = /* @__PURE__ */ B(Ss, [["render", Ps], ["__scopeId", "data-v-5f30c914"]]), js = {
2903
+ const Ps = /* @__PURE__ */ B(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), js = {
2901
2904
  form_response: ds,
2902
2905
  info_card: Cs,
2903
- ticket: Us
2906
+ ticket: Ps
2904
2907
  }, Ds = {
2905
2908
  name: "WmArtifactRenderer",
2906
2909
  props: {
@@ -2917,10 +2920,10 @@ const Us = /* @__PURE__ */ B(Ss, [["render", Ps], ["__scopeId", "data-v-5f30c914
2917
2920
  }
2918
2921
  };
2919
2922
  function zs(e, t, n, i, r, s) {
2920
- return s.component ? (c(), P(je(s.component), {
2923
+ return s.component ? (c(), U(je(s.component), {
2921
2924
  key: 0,
2922
2925
  data: n.artifact.data
2923
- }, null, 8, ["data"])) : w("", !0);
2926
+ }, null, 8, ["data"])) : b("", !0);
2924
2927
  }
2925
2928
  const Hs = /* @__PURE__ */ B(Ds, [["render", zs]]), qs = {
2926
2929
  name: "WmAttachmentPreview",
@@ -3051,9 +3054,9 @@ function Zs(e, t, n, i, r, s) {
3051
3054
  ], -1)),
3052
3055
  o("span", Ys, [
3053
3056
  o("span", Js, v(s.displayName), 1),
3054
- s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : w("", !0)
3057
+ s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
3055
3058
  ]),
3056
- r.loading ? (c(), u("span", Xs)) : w("", !0)
3059
+ r.loading ? (c(), u("span", Xs)) : b("", !0)
3057
3060
  ], 8, Gs))
3058
3061
  ], 2);
3059
3062
  }
@@ -3172,8 +3175,8 @@ const cr = {
3172
3175
  const l = this.roleOf(a);
3173
3176
  if (l === "system") {
3174
3177
  if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3175
- const b = e[e.length - 1];
3176
- b && b.role === "ai" ? b.messages.push(a) : e.push({
3178
+ const w = e[e.length - 1];
3179
+ w && w.role === "ai" ? w.messages.push(a) : e.push({
3177
3180
  key: `g-${Q(a)}`,
3178
3181
  role: "ai",
3179
3182
  agentName: "",
@@ -3233,7 +3236,7 @@ const cr = {
3233
3236
  if (n.role === "user" || n.role === "system" || !n.items.length) continue;
3234
3237
  const i = n.messages[0];
3235
3238
  if (!i) continue;
3236
- const r = J(i.id);
3239
+ const r = W(i.id);
3237
3240
  if (r != null && !(r <= e) && !(t && i.created_at && i.created_at > t))
3238
3241
  return n.key;
3239
3242
  }
@@ -3492,9 +3495,9 @@ const cr = {
3492
3495
  // doit garder son arrondi.
3493
3496
  cornersFor(e, t) {
3494
3497
  var Z, ee, te;
3495
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = ($, ne, G) => $ != null && T != null ? $ + z >= T : ne === G || ne === "card" && G === "bubble";
3496
- let F = l, N = l, U = l, W = l;
3497
- return a ? (k && (N = p), (b || !s) && (U = p), k && M(I, k, i == null ? void 0 : i.top) && (F = p), b && M(A, b, i == null ? void 0 : i.bottom) && (W = p)) : (k && (F = p), (b || !s) && (W = p), k && M(I, k, i == null ? void 0 : i.top) && (N = p), b && M(A, b, i == null ? void 0 : i.bottom) && (U = p)), { tl: F, tr: N, br: U, bl: W };
3498
+ const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = ($, ne, Y) => $ != null && T != null ? $ + z >= T : ne === Y || ne === "card" && Y === "bubble";
3499
+ let F = l, N = l, P = l, G = l;
3500
+ return a ? (k && (N = p), (w || !s) && (P = p), k && M(I, k, i == null ? void 0 : i.top) && (F = p), w && M(A, w, i == null ? void 0 : i.bottom) && (G = p)) : (k && (F = p), (w || !s) && (G = p), k && M(I, k, i == null ? void 0 : i.top) && (N = p), w && M(A, w, i == null ? void 0 : i.bottom) && (P = p)), { tl: F, tr: N, br: P, bl: G };
3498
3501
  },
3499
3502
  // Inline style emitting the four corner CSS variables. Set on
3500
3503
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3646,7 +3649,7 @@ const cr = {
3646
3649
  class: "wm-list__row wm-list__row--ai fade-up"
3647
3650
  }, Or = { class: "wm-list__avatarSlot" };
3648
3651
  function Lr(e, t, n, i, r, s) {
3649
- const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), k = E("ArtifactRenderer"), b = E("Bubble"), T = E("AttachmentPreview"), I = E("Typing");
3652
+ const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), k = E("ArtifactRenderer"), w = E("Bubble"), T = E("AttachmentPreview"), I = E("Typing");
3650
3653
  return c(), u("div", {
3651
3654
  ref: "scrollEl",
3652
3655
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
@@ -3658,12 +3661,12 @@ function Lr(e, t, n, i, r, s) {
3658
3661
  "aria-hidden": "true"
3659
3662
  }, null, -1)),
3660
3663
  o("span", fr, v(s.t("messageList.loadingHistory")), 1)
3661
- ])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
3664
+ ])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3662
3665
  n.dateLabel ? (c(), u("div", _r, [
3663
3666
  t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
3664
3667
  o("span", pr, v(n.dateLabel), 1),
3665
3668
  t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
3666
- ])) : w("", !0),
3669
+ ])) : b("", !0),
3667
3670
  (c(!0), u(R, null, j(s.groups, (A, z) => (c(), u(R, {
3668
3671
  key: A.key
3669
3672
  }, [
@@ -3671,7 +3674,7 @@ function Lr(e, t, n, i, r, s) {
3671
3674
  t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3672
3675
  o("span", yr, v(s.t("messageList.unread")), 1),
3673
3676
  t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3674
- ])) : w("", !0),
3677
+ ])) : b("", !0),
3675
3678
  A.role === "system" || A.items.length ? (c(), u("div", {
3676
3679
  key: 1,
3677
3680
  class: O(["wm-list__group", "wm-list__group--" + A.role])
@@ -3695,43 +3698,43 @@ function Lr(e, t, n, i, r, s) {
3695
3698
  }, [
3696
3699
  A.role !== "user" ? (c(), u("div", Cr, [
3697
3700
  F === A.items.length - 1 ? (c(), u(R, { key: 0 }, [
3698
- A.role === "ai" ? (c(), P(a, {
3701
+ A.role === "ai" ? (c(), U(a, {
3699
3702
  key: 0,
3700
3703
  size: 26,
3701
3704
  tail: !0,
3702
3705
  name: n.aiAgentName,
3703
3706
  "image-url": n.aiAgentAvatarUrl
3704
- }, null, 8, ["name", "image-url"])) : (c(), P(l, {
3707
+ }, null, 8, ["name", "image-url"])) : (c(), U(l, {
3705
3708
  key: 1,
3706
3709
  name: A.agentName,
3707
3710
  "avatar-url": A.agentAvatarUrl,
3708
3711
  size: 26,
3709
3712
  tail: !0
3710
3713
  }, null, 8, ["name", "avatar-url"]))
3711
- ], 64)) : w("", !0)
3712
- ])) : w("", !0),
3713
- M.renderAs === "action" ? (c(), P(p, {
3714
+ ], 64)) : b("", !0)
3715
+ ])) : b("", !0),
3716
+ M.renderAs === "action" ? (c(), U(p, {
3714
3717
  key: 1,
3715
3718
  state: M.message.payload.state,
3716
3719
  label: s.actionLabel(M.message),
3717
3720
  detail: s.actionDetail(M.message)
3718
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), P(p, {
3721
+ }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(p, {
3719
3722
  key: 2,
3720
3723
  state: "awaiting",
3721
3724
  label: s.t("messageList.approvalRequestSent"),
3722
3725
  detail: M.message.text_md || ""
3723
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), P(k, {
3726
+ }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), U(k, {
3724
3727
  key: 3,
3725
3728
  artifact: s.actionArtifact(M.message)
3726
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), P(k, {
3729
+ }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), U(k, {
3727
3730
  key: 4,
3728
3731
  artifact: s.artifactOf(M.message)
3729
3732
  }, null, 8, ["artifact"])) : (c(), u("div", Ar, [
3730
- M.message.text_md ? (c(), P(b, {
3733
+ M.message.text_md ? (c(), U(w, {
3731
3734
  key: 0,
3732
3735
  role: A.role,
3733
3736
  text: M.message.text_md
3734
- }, null, 8, ["role", "text"])) : w("", !0),
3737
+ }, null, 8, ["role", "text"])) : b("", !0),
3735
3738
  s.attachmentsOf(M.message).length ? (c(), u("div", {
3736
3739
  key: 1,
3737
3740
  class: O(["wm-list__atts", {
@@ -3740,23 +3743,23 @@ function Lr(e, t, n, i, r, s) {
3740
3743
  }, [
3741
3744
  (c(!0), u(R, null, j(s.attachmentsOf(
3742
3745
  M.message
3743
- ), (N, U) => (c(), P(T, {
3744
- key: `${s.messageKey(M.message)}-att-${U}`,
3746
+ ), (N, P) => (c(), U(T, {
3747
+ key: `${s.messageKey(M.message)}-att-${P}`,
3745
3748
  attachment: N
3746
3749
  }, null, 8, ["attachment"]))), 128))
3747
- ], 2)) : w("", !0)
3750
+ ], 2)) : b("", !0)
3748
3751
  ]))
3749
3752
  ], 14, kr))), 128)),
3750
3753
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3751
3754
  key: 0,
3752
3755
  class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3753
3756
  }, [
3754
- A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : w("", !0),
3755
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : w("", !0),
3756
- s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : w("", !0)
3757
- ], 2)) : w("", !0)
3757
+ A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : b("", !0),
3758
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : b("", !0),
3759
+ s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3760
+ ], 2)) : b("", !0)
3758
3761
  ], 64))
3759
- ], 2)) : w("", !0)
3762
+ ], 2)) : b("", !0)
3760
3763
  ], 64))), 128)),
3761
3764
  n.streamingActive ? (c(), u("div", xr, [
3762
3765
  o("div", Or, [
@@ -3768,7 +3771,7 @@ function Lr(e, t, n, i, r, s) {
3768
3771
  }, null, 8, ["name", "image-url"])
3769
3772
  ]),
3770
3773
  V(I)
3771
- ])) : w("", !0)
3774
+ ])) : b("", !0)
3772
3775
  ], 34);
3773
3776
  }
3774
3777
  const Ir = /* @__PURE__ */ B(hr, [["render", Lr], ["__scopeId", "data-v-d769b193"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
@@ -3836,56 +3839,56 @@ async function Nr(e = {}) {
3836
3839
  t = await navigator.mediaDevices.getDisplayMedia(
3837
3840
  Be({ audio: !0 })
3838
3841
  );
3839
- } catch (b) {
3840
- return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
3842
+ } catch (w) {
3843
+ return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
3841
3844
  }
3842
3845
  const n = Rr();
3843
3846
  let i;
3844
3847
  try {
3845
3848
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
3846
- } catch (b) {
3847
- return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
3849
+ } catch (w) {
3850
+ return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
3848
3851
  T.stop();
3849
3852
  }), null;
3850
3853
  }
3851
3854
  const r = [];
3852
3855
  let s = null, a = !1;
3853
- i.addEventListener("dataavailable", (b) => {
3854
- b.data && b.data.size > 0 && r.push(b.data);
3856
+ i.addEventListener("dataavailable", (w) => {
3857
+ w.data && w.data.size > 0 && r.push(w.data);
3855
3858
  }), i.addEventListener("stop", () => {
3856
- var b, T;
3859
+ var w, T;
3857
3860
  if (s && clearInterval(s), t.getTracks().forEach((I) => {
3858
3861
  I.stop();
3859
3862
  }), r.length) {
3860
3863
  const I = i.mimeType || n || "video/webm", A = new Blob(r, { type: I }), z = /mp4/.test(I) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${M}.${z}`, {
3861
3864
  type: I
3862
3865
  });
3863
- (b = e.onfinalize) == null || b.call(e, F);
3866
+ (w = e.onfinalize) == null || w.call(e, F);
3864
3867
  } else
3865
3868
  (T = e.oncancel) == null || T.call(e);
3866
- }), t.getVideoTracks().forEach((b) => {
3867
- b.addEventListener("ended", () => l(), { once: !0 });
3869
+ }), t.getVideoTracks().forEach((w) => {
3870
+ w.addEventListener("ended", () => l(), { once: !0 });
3868
3871
  });
3869
3872
  function l() {
3870
3873
  if (!a && (a = !0, i.state !== "inactive"))
3871
3874
  try {
3872
3875
  i.stop();
3873
- } catch (b) {
3874
- console.error("[media] recorder stop", b);
3876
+ } catch (w) {
3877
+ console.error("[media] recorder stop", w);
3875
3878
  }
3876
3879
  }
3877
3880
  try {
3878
3881
  i.start(1e3);
3879
- } catch (b) {
3880
- return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
3882
+ } catch (w) {
3883
+ return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
3881
3884
  T.stop();
3882
3885
  }), null;
3883
3886
  }
3884
3887
  (k = e.onstart) == null || k.call(e);
3885
3888
  const p = Date.now();
3886
3889
  return s = setInterval(() => {
3887
- var b;
3888
- (b = e.ontick) == null || b.call(e, Date.now() - p);
3890
+ var w;
3891
+ (w = e.ontick) == null || w.call(e, Date.now() - p);
3889
3892
  }, 500), {
3890
3893
  stop: l,
3891
3894
  get state() {
@@ -3909,7 +3912,7 @@ const Fr = [
3909
3912
  labelKey: "composer.recordScreen",
3910
3913
  path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
3911
3914
  }
3912
- ], Pr = {
3915
+ ], Ur = {
3913
3916
  name: "WmComposer",
3914
3917
  inject: {
3915
3918
  // Translator shared by the Messenger shell; French fallback when
@@ -4041,7 +4044,7 @@ const Fr = [
4041
4044
  }
4042
4045
  }
4043
4046
  }
4044
- }, Ur = { class: "wm-compose-wrap" }, jr = {
4047
+ }, Pr = { class: "wm-compose-wrap" }, jr = {
4045
4048
  key: 0,
4046
4049
  class: "wm-rec"
4047
4050
  }, Dr = { class: "wm-rec__lbl" }, zr = {
@@ -4055,7 +4058,7 @@ const Fr = [
4055
4058
  "aria-hidden": "true"
4056
4059
  }, Vr = ["d"], Kr = ["placeholder", "disabled"], Wr = { class: "wm-compose__actions" }, Gr = ["title", "aria-label", "disabled"], Yr = ["disabled", "aria-label"];
4057
4060
  function Jr(e, t, n, i, r, s) {
4058
- return c(), u("div", Ur, [
4061
+ return c(), u("div", Pr, [
4059
4062
  r.recording ? (c(), u("div", jr, [
4060
4063
  t[8] || (t[8] = o("span", {
4061
4064
  class: "wm-rec__dot",
@@ -4067,10 +4070,10 @@ function Jr(e, t, n, i, r, s) {
4067
4070
  class: "wm-rec__stop",
4068
4071
  onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4069
4072
  }, v(s.t("composer.stop")), 1)
4070
- ])) : w("", !0),
4073
+ ])) : b("", !0),
4071
4074
  o("form", {
4072
4075
  class: O(["wm-compose", { "has-attach": r.attachOpen }]),
4073
- onSubmit: t[7] || (t[7] = Y((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4076
+ onSubmit: t[7] || (t[7] = J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4074
4077
  }, [
4075
4078
  o("input", {
4076
4079
  ref: "fileEl",
@@ -4083,7 +4086,7 @@ function Jr(e, t, n, i, r, s) {
4083
4086
  key: 0,
4084
4087
  class: "wm-compose__overlay",
4085
4088
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4086
- })) : w("", !0),
4089
+ })) : b("", !0),
4087
4090
  r.attachOpen ? (c(), u("div", zr, [
4088
4091
  (c(!0), u(R, null, j(s.attachItems, (a) => (c(), u("button", {
4089
4092
  key: a.action,
@@ -4106,7 +4109,7 @@ function Jr(e, t, n, i, r, s) {
4106
4109
  ]),
4107
4110
  o("span", null, v(a.label), 1)
4108
4111
  ], 8, Hr))), 128))
4109
- ])) : w("", !0),
4112
+ ])) : b("", !0),
4110
4113
  K(o("textarea", {
4111
4114
  ref: "inputEl",
4112
4115
  "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
@@ -4166,7 +4169,7 @@ function Jr(e, t, n, i, r, s) {
4166
4169
  ], 34)
4167
4170
  ]);
4168
4171
  }
4169
- const Qr = /* @__PURE__ */ B(Pr, [["render", Jr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
4172
+ const Qr = /* @__PURE__ */ B(Ur, [["render", Jr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
4170
4173
  name: "WmSuggestionChips",
4171
4174
  props: {
4172
4175
  items: { type: Array, default: () => [] },
@@ -4196,7 +4199,7 @@ function ei(e, t, n, i, r, s) {
4196
4199
  style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4197
4200
  onClick: (p) => e.$emit("select", a)
4198
4201
  }, v(a.label), 13, Zr))), 128))
4199
- ])) : w("", !0);
4202
+ ])) : b("", !0);
4200
4203
  }
4201
4204
  const ti = /* @__PURE__ */ B(Xr, [["render", ei], ["__scopeId", "data-v-47ad8085"]]), ni = {
4202
4205
  name: "WmApprovalCard",
@@ -4259,7 +4262,7 @@ function di(e, t, n, i, r, s) {
4259
4262
  ]),
4260
4263
  o("div", ai, [
4261
4264
  o("div", oi, v(n.action), 1),
4262
- n.detail ? (c(), u("div", li, v(n.detail), 1)) : w("", !0)
4265
+ n.detail ? (c(), u("div", li, v(n.detail), 1)) : b("", !0)
4263
4266
  ])
4264
4267
  ]),
4265
4268
  o("div", ci, [
@@ -4268,13 +4271,13 @@ function di(e, t, n, i, r, s) {
4268
4271
  type: "button",
4269
4272
  class: "wm-approval__btn wm-approval__btn--neutral",
4270
4273
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4271
- }, v(s.rejectLabel), 1)) : w("", !0),
4274
+ }, v(s.rejectLabel), 1)) : b("", !0),
4272
4275
  s.approveId ? (c(), u("button", {
4273
4276
  key: 1,
4274
4277
  type: "button",
4275
4278
  class: "wm-approval__btn wm-approval__btn--primary",
4276
4279
  onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
4277
- }, v(s.approveLabel), 1)) : w("", !0)
4280
+ }, v(s.approveLabel), 1)) : b("", !0)
4278
4281
  ])
4279
4282
  ]);
4280
4283
  }
@@ -4398,7 +4401,7 @@ const hi = /* @__PURE__ */ new Set([
4398
4401
  key: 2,
4399
4402
  class: "wm-form__doneLbl"
4400
4403
  };
4401
- function Pi(e, t, n, i, r, s) {
4404
+ function Ui(e, t, n, i, r, s) {
4402
4405
  const a = E("AIAvatar");
4403
4406
  return c(), u("div", fi, [
4404
4407
  o("div", gi, [
@@ -4411,12 +4414,12 @@ function Pi(e, t, n, i, r, s) {
4411
4414
  ]),
4412
4415
  o("div", pi, [
4413
4416
  o("div", vi, v(n.form.title || s.t("form.title")), 1),
4414
- n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : w("", !0)
4417
+ n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : b("", !0)
4415
4418
  ])
4416
4419
  ]),
4417
4420
  o("form", {
4418
4421
  class: "wm-form__body",
4419
- onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4422
+ onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4420
4423
  }, [
4421
4424
  (c(!0), u(R, null, j(s.normalizedFields, (l) => (c(), u("div", {
4422
4425
  key: l.key,
@@ -4427,7 +4430,7 @@ function Pi(e, t, n, i, r, s) {
4427
4430
  class: "wm-form__label"
4428
4431
  }, [
4429
4432
  pe(v(l.label), 1),
4430
- l.required ? (c(), u("span", bi, "*")) : w("", !0)
4433
+ l.required ? (c(), u("span", bi, "*")) : b("", !0)
4431
4434
  ], 8, wi),
4432
4435
  l.type === "text" ? K((c(), u("input", {
4433
4436
  key: 0,
@@ -4520,22 +4523,22 @@ function Pi(e, t, n, i, r, s) {
4520
4523
  }, null, 40, Ri),
4521
4524
  o("span", null, v(p.label), 1)
4522
4525
  ]))), 128))
4523
- ])) : w("", !0)
4526
+ ])) : b("", !0)
4524
4527
  ]))), 128)),
4525
- r.error ? (c(), u("div", Ei, v(r.error), 1)) : w("", !0),
4528
+ r.error ? (c(), u("div", Ei, v(r.error), 1)) : b("", !0),
4526
4529
  n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4527
4530
  key: 1,
4528
4531
  type: "submit",
4529
4532
  class: "wm-form__submit",
4530
4533
  disabled: r.busy
4531
4534
  }, [
4532
- r.busy ? (c(), u("span", Ni)) : w("", !0),
4535
+ r.busy ? (c(), u("span", Ni)) : b("", !0),
4533
4536
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4534
4537
  ], 8, Bi))
4535
4538
  ], 32)
4536
4539
  ]);
4537
4540
  }
4538
- const Ui = /* @__PURE__ */ B(mi, [["render", Pi], ["__scopeId", "data-v-fe65cc56"]]), ji = {
4541
+ const Pi = /* @__PURE__ */ B(mi, [["render", Ui], ["__scopeId", "data-v-fe65cc56"]]), ji = {
4539
4542
  name: "WmFeedback",
4540
4543
  inject: {
4541
4544
  // Translator shared by the Messenger shell; French fallback when
@@ -4700,7 +4703,7 @@ function ha(e, t, n, i, r, s) {
4700
4703
  ])
4701
4704
  ], -1)),
4702
4705
  o("span", sa, v(s.t("moreMenu.editTitle")), 1)
4703
- ])) : w("", !0),
4706
+ ])) : b("", !0),
4704
4707
  n.canExport ? (c(), u("button", {
4705
4708
  key: 1,
4706
4709
  type: "button",
@@ -4724,9 +4727,9 @@ function ha(e, t, n, i, r, s) {
4724
4727
  ], -1)),
4725
4728
  o("span", ra, v(s.t("moreMenu.exportTranscript")), 1),
4726
4729
  t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4727
- ])) : w("", !0)
4728
- ])) : w("", !0),
4729
- n.canRename || n.canExport ? (c(), u("div", ia)) : w("", !0),
4730
+ ])) : b("", !0)
4731
+ ])) : b("", !0),
4732
+ n.canRename || n.canExport ? (c(), u("div", ia)) : b("", !0),
4730
4733
  o("div", aa, [
4731
4734
  o("button", {
4732
4735
  type: "button",
@@ -4808,7 +4811,7 @@ function ha(e, t, n, i, r, s) {
4808
4811
  ])
4809
4812
  ], -1)),
4810
4813
  o("span", da, v(s.t("moreMenu.serviceStatus")), 1)
4811
- ])) : w("", !0),
4814
+ ])) : b("", !0),
4812
4815
  n.helpUrl ? (c(), u("button", {
4813
4816
  key: 1,
4814
4817
  type: "button",
@@ -4831,7 +4834,7 @@ function ha(e, t, n, i, r, s) {
4831
4834
  ])
4832
4835
  ], -1)),
4833
4836
  o("span", ua, v(s.t("moreMenu.helpCenter")), 1)
4834
- ])) : w("", !0)
4837
+ ])) : b("", !0)
4835
4838
  ])
4836
4839
  ])
4837
4840
  ]);
@@ -4922,8 +4925,8 @@ function Aa(e, t, n, i, r, s) {
4922
4925
  placeholder: n.placeholder || s.t("rename.placeholder"),
4923
4926
  maxlength: 120,
4924
4927
  onKeydown: [
4925
- t[3] || (t[3] = ue(Y((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
4926
- t[4] || (t[4] = ue(Y((a) => e.$emit("close"), ["prevent"]), ["esc"]))
4928
+ t[3] || (t[3] = ue(J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
4929
+ t[4] || (t[4] = ue(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
4927
4930
  ]
4928
4931
  }, null, 40, ba), [
4929
4932
  [X, r.value]
@@ -4955,7 +4958,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
4955
4958
  Composer: Qr,
4956
4959
  SuggestionChips: ti,
4957
4960
  ApprovalCard: ui,
4958
- FormCard: Ui,
4961
+ FormCard: Pi,
4959
4962
  Feedback: Xi,
4960
4963
  MoreMenu: ma,
4961
4964
  RenameDialog: Sa
@@ -5068,6 +5071,11 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5068
5071
  // { customer: { name?, email?, ...named variables } }. Push au
5069
5072
  // serveur via PATCH /customers/me au boot.
5070
5073
  parentContext: null,
5074
+ // Déclaration du marchand : `true` = site qui accepte des
5075
+ // visiteurs (lazy boot toujours), `false` = app fermée (eager
5076
+ // boot autorisé si marker cookie valide). Doit matcher
5077
+ // `widgets.allow_unauthenticated` côté serveur.
5078
+ parentAllowUnauthenticated: !1,
5071
5079
  parentInitReceived: !1,
5072
5080
  parentInitDeferred: null
5073
5081
  };
@@ -5136,20 +5144,24 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5136
5144
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = this.revealedAt;
5137
5145
  return this.allConversations.map((i) => {
5138
5146
  var k;
5139
- const r = e[i.id] || [], s = J(i.last_read_message_id);
5147
+ const r = e[i.id] || [], s = W(i.last_read_message_id);
5140
5148
  let a = 0, l = null;
5141
- for (let b = r.length - 1; b >= 0; b--) {
5142
- const T = r[b];
5149
+ for (let w = r.length - 1; w >= 0; w--) {
5150
+ const T = r[w];
5143
5151
  if (!T) continue;
5144
5152
  if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5145
- const I = J(T.id);
5153
+ const I = W(T.id);
5146
5154
  if (I != null) {
5147
5155
  if (s != null && I <= s) break;
5148
5156
  t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5149
5157
  }
5150
5158
  }
5159
+ if (!r.length) {
5160
+ const w = W(i.last_message_id);
5161
+ w != null && (s == null || w > s) && (a = 1);
5162
+ }
5151
5163
  const p = r.filter(
5152
- (b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
5164
+ (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
5153
5165
  );
5154
5166
  return {
5155
5167
  ...i,
@@ -5377,7 +5389,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5377
5389
  const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5378
5390
  if (!t || typeof t != "object") return "";
5379
5391
  const n = Object.entries(t);
5380
- return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
5392
+ return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
5381
5393
  },
5382
5394
  actionInFlight() {
5383
5395
  var e, t;
@@ -5460,7 +5472,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5460
5472
  "currentConv.id": {
5461
5473
  handler(e) {
5462
5474
  var t;
5463
- this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorId = J(
5475
+ this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorId = W(
5464
5476
  (t = this.currentConv) == null ? void 0 : t.last_read_message_id
5465
5477
  ), this.unreadBoundaryTs = e ? (/* @__PURE__ */ new Date()).toISOString() : "");
5466
5478
  },
@@ -5472,7 +5484,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5472
5484
  // render.
5473
5485
  isViewingThread(e, t) {
5474
5486
  var n;
5475
- e && !t ? (this.unreadAnchorId = J(
5487
+ e && !t ? (this.unreadAnchorId = W(
5476
5488
  (n = this.currentConv) == null ? void 0 : n.last_read_message_id
5477
5489
  ), this.unreadBoundaryTs = (/* @__PURE__ */ new Date()).toISOString()) : e || (this.unreadAnchorId = null, this.unreadBoundaryTs = "");
5478
5490
  },
@@ -5561,7 +5573,19 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5561
5573
  onParentMessage(e) {
5562
5574
  var n;
5563
5575
  const t = e == null ? void 0 : e.data;
5564
- !t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve());
5576
+ !t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.hasValidSessionMarker() && this.boot().catch((i) => {
5577
+ console.warn("[messenger] eager boot failed", i);
5578
+ }));
5579
+ },
5580
+ // Cherche le marker cookie `messenger_session_marker` (non-httpOnly,
5581
+ // posé par /session côté serveur pour les linked uniquement). Valeur
5582
+ // = timestamp ms epoch de l'expiration de la session.
5583
+ hasValidSessionMarker() {
5584
+ if (typeof document > "u") return !1;
5585
+ const t = (document.cookie || "").match(/(?:^|; )messenger_session_marker=([^;]+)/);
5586
+ if (!t) return !1;
5587
+ const n = parseInt(t[1], 10);
5588
+ return Number.isFinite(n) ? n > Date.now() : !1;
5565
5589
  },
5566
5590
  async boot() {
5567
5591
  var e, t;
@@ -5579,7 +5603,8 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5579
5603
  const n = ((e = this.parentContext) == null ? void 0 : e.customer) || ((t = this.context) == null ? void 0 : t.customer);
5580
5604
  n && typeof n == "object" && await this.store.applyCustomer(n), await this.store.start({
5581
5605
  origin: this.parentOrigin,
5582
- token: this.parentToken || void 0
5606
+ token: this.parentToken || void 0,
5607
+ allowUnauthenticated: this.parentAllowUnauthenticated
5583
5608
  }), this.setupLiveReveal();
5584
5609
  } catch (n) {
5585
5610
  console.error("[ww-messenger] bootstrap failed", n), this.bootError = (n == null ? void 0 : n.message) || String(n);
@@ -5669,14 +5694,14 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5669
5694
  const t = e.getBoundingClientRect();
5670
5695
  if (!t.width || !t.height) return;
5671
5696
  const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (M = (z = this.$el) == null ? void 0 : z.querySelector) == null ? void 0 : M.call(z, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (N = (F = this.$el) == null ? void 0 : F.querySelectorAll) == null ? void 0 : N.call(F, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
5672
- let b = null;
5697
+ let w = null;
5673
5698
  if (k) {
5674
- const U = k.getBoundingClientRect();
5675
- b = {
5676
- width: Math.ceil(U.width),
5677
- height: Math.ceil(U.height),
5678
- rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
5679
- bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
5699
+ const P = k.getBoundingClientRect();
5700
+ w = {
5701
+ width: Math.ceil(P.width),
5702
+ height: Math.ceil(P.height),
5703
+ rightOffset: Math.max(0, Math.ceil(t.right - P.right)),
5704
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - P.bottom))
5680
5705
  };
5681
5706
  }
5682
5707
  this.notifyParentResize("closed", {
@@ -5685,7 +5710,7 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5685
5710
  launcherWidth: l ? Math.ceil(l.width) : null,
5686
5711
  launcherHeight: l ? Math.ceil(l.height) : null,
5687
5712
  launcherHovered: this.launcherHovered,
5688
- peek: b,
5713
+ peek: w,
5689
5714
  peekHovered: this.launcherHovered && n
5690
5715
  });
5691
5716
  },
@@ -5916,23 +5941,23 @@ const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
5916
5941
  class: "wm-actionWait",
5917
5942
  role: "status",
5918
5943
  "aria-live": "polite"
5919
- }, Fa = { class: "wm-actionWait__lbl" }, Pa = {
5944
+ }, Fa = { class: "wm-actionWait__lbl" }, Ua = {
5920
5945
  key: 2,
5921
5946
  class: "wm-attached"
5922
- }, Ua = ["aria-label", "onClick"];
5947
+ }, Pa = ["aria-label", "onClick"];
5923
5948
  function ja(e, t, n, i, r, s) {
5924
- const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), k = E("MessageList"), b = E("ApprovalCard"), T = E("FormCard"), I = E("Feedback"), A = E("SuggestionChips"), z = E("Composer"), M = E("MoreMenu"), F = E("RenameDialog");
5949
+ const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), k = E("MessageList"), w = E("ApprovalCard"), T = E("FormCard"), I = E("Feedback"), A = E("SuggestionChips"), z = E("Composer"), M = E("MoreMenu"), F = E("RenameDialog");
5925
5950
  return c(), u("div", {
5926
5951
  class: O(["wm-root", `wm-root--${n.displayMode}`])
5927
5952
  }, [
5928
- !r.isOpen && !s.isEmbedded ? (c(), P(a, {
5953
+ !r.isOpen && !s.isEmbedded ? (c(), U(a, {
5929
5954
  key: 0,
5930
5955
  "unread-count": s.unreadCount,
5931
5956
  peeks: s.launcherPeeks,
5932
5957
  onOpen: s.openFromPeek,
5933
5958
  onDismiss: s.dismissPeek,
5934
5959
  onHover: s.onLauncherHover
5935
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : w("", !0),
5960
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
5936
5961
  r.isOpen || s.isEmbedded ? (c(), u("section", {
5937
5962
  key: 1,
5938
5963
  class: O([
@@ -5945,7 +5970,7 @@ function ja(e, t, n, i, r, s) {
5945
5970
  "aria-label": "Messenger"
5946
5971
  }, [
5947
5972
  !s.ready && !s.error ? (c(), u("div", Ta, [
5948
- s.isEmbedded ? w("", !0) : (c(), u("button", {
5973
+ s.isEmbedded ? b("", !0) : (c(), u("button", {
5949
5974
  key: 0,
5950
5975
  type: "button",
5951
5976
  class: "wm-loading__close",
@@ -6024,7 +6049,7 @@ function ja(e, t, n, i, r, s) {
6024
6049
  }, 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"]),
6025
6050
  o("div", Ea, [
6026
6051
  s.floatVisible ? (c(), u("div", Ba, [
6027
- s.approvalReady ? (c(), P(b, {
6052
+ s.approvalReady ? (c(), U(w, {
6028
6053
  key: 0,
6029
6054
  action: s.approvalTitle,
6030
6055
  detail: s.approvalDetail,
@@ -6032,23 +6057,23 @@ function ja(e, t, n, i, r, s) {
6032
6057
  "agent-name": s.agentName,
6033
6058
  "agent-avatar-url": s.agentAvatarUrl,
6034
6059
  onCallback: s.onApprovalCallback
6035
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), P(T, {
6060
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), U(T, {
6036
6061
  key: s.pendingForm.message && s.pendingForm.message.id,
6037
6062
  form: s.pendingForm.form,
6038
6063
  "agent-name": s.agentName,
6039
6064
  "agent-avatar-url": s.agentAvatarUrl,
6040
6065
  onSubmit: s.onFormSubmit
6041
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), P(I, {
6066
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), U(I, {
6042
6067
  key: 2,
6043
6068
  busy: r.feedbackBusy,
6044
6069
  done: r.feedbackDone,
6045
6070
  onSubmit: s.onFeedback
6046
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(A, {
6071
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), U(A, {
6047
6072
  key: 3,
6048
6073
  items: s.suggestions,
6049
6074
  onSelect: s.onSuggestion
6050
6075
  }, null, 8, ["items", "onSelect"]))
6051
- ], 512)) : w("", !0),
6076
+ ], 512)) : b("", !0),
6052
6077
  s.actionInFlight ? (c(), u("div", Na, [
6053
6078
  t[8] || (t[8] = o("span", {
6054
6079
  class: "wm-actionWait__spinner",
@@ -6057,7 +6082,7 @@ function ja(e, t, n, i, r, s) {
6057
6082
  o("span", Fa, v(s.t("action.inProgress", {
6058
6083
  name: s.actionInFlightName
6059
6084
  })), 1)
6060
- ])) : (c(), P(z, {
6085
+ ])) : (c(), U(z, {
6061
6086
  key: 2,
6062
6087
  ref: "composer",
6063
6088
  modelValue: r.draft,
@@ -6069,7 +6094,7 @@ function ja(e, t, n, i, r, s) {
6069
6094
  onAttach: s.onAttach
6070
6095
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "onSend", "onAttach"]))
6071
6096
  ]),
6072
- r.moreOpen ? (c(), P(M, {
6097
+ r.moreOpen ? (c(), U(M, {
6073
6098
  key: 0,
6074
6099
  "can-rename": !!s.currentConv && !s.currentConv._draft,
6075
6100
  "can-export": !!s.currentConv && !s.currentConv._draft,
@@ -6081,17 +6106,17 @@ function ja(e, t, n, i, r, s) {
6081
6106
  onSoundToggle: e.onSoundToggle,
6082
6107
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6083
6108
  onAction: s.onMoreAction
6084
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0),
6085
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(F, {
6109
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
6110
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), U(F, {
6086
6111
  key: 1,
6087
6112
  "initial-value": s.currentConv.name || "",
6088
6113
  title: s.t("rename.dialogTitle"),
6089
6114
  onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
6090
6115
  onSubmit: s.onRenameSubmit
6091
- }, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
6092
- r.pendingAttachments.length ? (c(), u("div", Pa, [
6093
- (c(!0), u(R, null, j(r.pendingAttachments, (N, U) => (c(), u("div", {
6094
- key: U,
6116
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
6117
+ r.pendingAttachments.length ? (c(), u("div", Ua, [
6118
+ (c(!0), u(R, null, j(r.pendingAttachments, (N, P) => (c(), u("div", {
6119
+ key: P,
6095
6120
  class: "wm-attached__chip"
6096
6121
  }, [
6097
6122
  t[10] || (t[10] = o("svg", {
@@ -6111,7 +6136,7 @@ function ja(e, t, n, i, r, s) {
6111
6136
  o("button", {
6112
6137
  type: "button",
6113
6138
  "aria-label": s.t("attachment.remove"),
6114
- onClick: (W) => r.pendingAttachments.splice(U, 1)
6139
+ onClick: (G) => r.pendingAttachments.splice(P, 1)
6115
6140
  }, [...t[9] || (t[9] = [
6116
6141
  o("svg", {
6117
6142
  width: "10",
@@ -6126,10 +6151,10 @@ function ja(e, t, n, i, r, s) {
6126
6151
  }, [
6127
6152
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6128
6153
  ], -1)
6129
- ])], 8, Ua)
6154
+ ])], 8, Pa)
6130
6155
  ]))), 128))
6131
- ])) : w("", !0)
6132
- ], 64)) : (c(), P(p, {
6156
+ ])) : b("", !0)
6157
+ ], 64)) : (c(), U(p, {
6133
6158
  key: 1,
6134
6159
  "welcome-message": s.widgetWelcomeMessage,
6135
6160
  subtitle: s.widgetSubtitle,
@@ -6142,7 +6167,7 @@ function ja(e, t, n, i, r, s) {
6142
6167
  onSelect: s.onQuickLink,
6143
6168
  onResume: s.onDrawerPick
6144
6169
  }, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6145
- r.moreOpen && !s.currentConv ? (c(), P(M, {
6170
+ r.moreOpen && !s.currentConv ? (c(), U(M, {
6146
6171
  key: 3,
6147
6172
  "can-rename": !1,
6148
6173
  "can-export": !1,
@@ -6154,12 +6179,12 @@ function ja(e, t, n, i, r, s) {
6154
6179
  onSoundToggle: e.onSoundToggle,
6155
6180
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6156
6181
  onAction: s.onMoreAction
6157
- }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0)
6182
+ }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0)
6158
6183
  ], 64))
6159
- ], 6)) : w("", !0)
6184
+ ], 6)) : b("", !0)
6160
6185
  ], 2);
6161
6186
  }
6162
- const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-4250eeb2"]]), qa = "0.5.16";
6187
+ const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-ef45d9af"]]), qa = "0.5.18";
6163
6188
  export {
6164
6189
  le as AIAvatar,
6165
6190
  ge as AVATAR_COLORS,
@@ -6168,14 +6193,14 @@ export {
6168
6193
  ds as ArtifactFormResponse,
6169
6194
  Cs as ArtifactInfoCard,
6170
6195
  Hs as ArtifactRenderer,
6171
- Us as ArtifactTicket,
6196
+ Ps as ArtifactTicket,
6172
6197
  er as AttachmentPreview,
6173
6198
  rr as Bubble,
6174
6199
  Qr as Composer,
6175
6200
  Ze as DEFAULT_BASE_URL,
6176
6201
  ie as DEFAULT_LANGUAGE,
6177
6202
  Xi as Feedback,
6178
- Ui as FormCard,
6203
+ Pi as FormCard,
6179
6204
  ln as Header,
6180
6205
  Re as HumanAvatar,
6181
6206
  Ft as Launcher,