@_solaris/messenger-widget 0.4.3 → 0.4.4

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,12 +1,12 @@
1
- import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as K, normalizeClass as x, toDisplayString as v, resolveComponent as I, createVNode as z, Transition as je, withCtx as Pe, Fragment as L, renderList as j, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as V, vModelText as ee, createTextVNode as pe, resolveDynamicComponent as De, renderSlot as Ue, vModelCheckbox as $e, vModelSelect as He, markRaw as ye } from "vue";
2
- const ze = [
1
+ import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as K, normalizeClass as x, toDisplayString as v, resolveComponent as I, createVNode as q, Transition as je, withCtx as Pe, Fragment as L, renderList as j, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as V, vModelText as ee, createTextVNode as pe, resolveDynamicComponent as De, renderSlot as Ue, vModelCheckbox as $e, vModelSelect as He, markRaw as ye } from "vue";
2
+ const qe = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], be = "/client", qe = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
9
+ ], be = "/client", ze = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
10
10
  function We(e) {
11
11
  const t = {
12
12
  baseUrl: Ge(e.baseUrl || ""),
@@ -112,7 +112,7 @@ function We(e) {
112
112
  const d = await a("GET", "/conversations");
113
113
  return (d == null ? void 0 : d.conversations) ?? [];
114
114
  }
115
- async function B(d = {}) {
115
+ async function E(d = {}) {
116
116
  return (await a("POST", "/conversations", d)).conversation;
117
117
  }
118
118
  async function A(d) {
@@ -145,7 +145,7 @@ function We(e) {
145
145
  );
146
146
  }
147
147
  async function N(d, f) {
148
- q();
148
+ z();
149
149
  const _ = {
150
150
  client_msg_id: f.client_msg_id,
151
151
  type: "content",
@@ -160,7 +160,7 @@ function We(e) {
160
160
  );
161
161
  }
162
162
  async function $(d, f, _) {
163
- return q(), a(
163
+ return z(), a(
164
164
  "POST",
165
165
  `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
166
166
  _ ? { inputs: _ } : {}
@@ -209,7 +209,7 @@ function We(e) {
209
209
  if (!t.eventSource && !(typeof document < "u" && document.hidden))
210
210
  try {
211
211
  const d = new EventSource(ne());
212
- for (const f of ze)
212
+ for (const f of qe)
213
213
  d.addEventListener(f, (_) => Y(f, _.data));
214
214
  d.addEventListener(
215
215
  "error",
@@ -230,13 +230,13 @@ function We(e) {
230
230
  function Q() {
231
231
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
232
232
  }
233
- function q() {
233
+ function z() {
234
234
  clearTimeout(t.burstTimer), G(), t.panelOpen || (t.burstTimer = setTimeout(() => {
235
235
  t.panelOpen || Q();
236
236
  }, Ve));
237
237
  }
238
238
  function me(d) {
239
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) : q();
239
+ t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) : z();
240
240
  }
241
241
  async function ce() {
242
242
  try {
@@ -244,13 +244,13 @@ function We(e) {
244
244
  const S = w == null ? void 0 : w.last_message_at;
245
245
  return S && (!y || S > y) ? S : y;
246
246
  }, null);
247
- f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), q());
247
+ f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), z());
248
248
  } catch (d) {
249
249
  console.error("[transport] poll failed", d);
250
250
  }
251
251
  }
252
252
  function de() {
253
- se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, qe));
253
+ se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, ze));
254
254
  }
255
255
  function se() {
256
256
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
@@ -303,7 +303,7 @@ function We(e) {
303
303
  getCustomer: C,
304
304
  patchCustomer: k,
305
305
  listConversations: T,
306
- createConversation: B,
306
+ createConversation: E,
307
307
  getConversation: A,
308
308
  patchConversation: H,
309
309
  markConversationRead: M,
@@ -511,7 +511,7 @@ function Xe(e) {
511
511
  const p = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
512
512
  d !== -1 && (t.conversations[d] = p);
513
513
  }
514
- async function B(h) {
514
+ async function E(h) {
515
515
  if (!h) return [];
516
516
  const m = t.messagesByConv[h] || [];
517
517
  let p = "";
@@ -578,7 +578,7 @@ function Xe(e) {
578
578
  ...d && typeof d == "object" ? { metadata: d } : {}
579
579
  });
580
580
  } catch (O) {
581
- console.error("[store] send failed", O), q(h, y, {
581
+ console.error("[store] send failed", O), z(h, y, {
582
582
  _failed: !0,
583
583
  _pending: !1
584
584
  });
@@ -698,7 +698,7 @@ function Xe(e) {
698
698
  function Q(h, m) {
699
699
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
700
700
  }
701
- function q(h, m, p) {
701
+ function z(h, m, p) {
702
702
  const d = t.messagesByConv[h];
703
703
  if (!d) return;
704
704
  const f = d.findIndex((y) => y.id === m);
@@ -743,7 +743,7 @@ function Xe(e) {
743
743
  createConversation: a,
744
744
  openConversation: g,
745
745
  loadMore: C,
746
- fetchSinceLast: B,
746
+ fetchSinceLast: E,
747
747
  patchConversation: T,
748
748
  markConversationRead: A,
749
749
  send: H,
@@ -1615,7 +1615,7 @@ function gt(e) {
1615
1615
  }
1616
1616
  return null;
1617
1617
  }
1618
- const E = (e, t) => {
1618
+ const B = (e, t) => {
1619
1619
  const n = e.__vccOpts || e;
1620
1620
  for (const [i, r] of t)
1621
1621
  n[i] = r;
@@ -1661,9 +1661,9 @@ function bt(e, t, n, i, r, s) {
1661
1661
  }, v(s.initials), 5))
1662
1662
  ], 6);
1663
1663
  }
1664
- const Ee = /* @__PURE__ */ E(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d"]]), wt = 3, kt = {
1664
+ const Be = /* @__PURE__ */ B(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d"]]), wt = 3, kt = {
1665
1665
  name: "WmLauncher",
1666
- components: { HumanAvatar: Ee },
1666
+ components: { HumanAvatar: Be },
1667
1667
  inject: {
1668
1668
  // Translator shared by the Messenger shell; French fallback when
1669
1669
  // the component is used standalone.
@@ -1687,11 +1687,11 @@ const Ee = /* @__PURE__ */ E(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d
1687
1687
  return this.peeks.slice(0, wt).reverse();
1688
1688
  }
1689
1689
  }
1690
- }, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, Lt = { class: "wm-peek__name" }, It = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, Bt = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1690
+ }, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, Lt = { class: "wm-peek__name" }, It = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Et = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1691
1691
  function Ft(e, t, n, i, r, s) {
1692
1692
  const a = I("HumanAvatar");
1693
1693
  return c(), u("div", Ct, [
1694
- z(je, { name: "wm-peek" }, {
1694
+ q(je, { name: "wm-peek" }, {
1695
1695
  default: Pe(() => [
1696
1696
  s.visiblePeeks.length ? (c(), u("div", {
1697
1697
  key: 0,
@@ -1736,7 +1736,7 @@ function Ft(e, t, n, i, r, s) {
1736
1736
  ], -1)
1737
1737
  ])], 8, St),
1738
1738
  o("div", Mt, [
1739
- z(a, {
1739
+ q(a, {
1740
1740
  name: l.senderName,
1741
1741
  "avatar-url": l.senderAvatarUrl,
1742
1742
  size: 34
@@ -1752,13 +1752,13 @@ function Ft(e, t, n, i, r, s) {
1752
1752
  o("span", Lt, v(l.senderName || s.t("common.agent")), 1),
1753
1753
  o("span", It, v(s.t("launcher.repliedToYou")), 1)
1754
1754
  ]),
1755
- o("p", Et, v(l.preview), 1)
1755
+ o("p", Bt, v(l.preview), 1)
1756
1756
  ]),
1757
1757
  o("button", {
1758
1758
  type: "button",
1759
1759
  class: "wm-peek__open",
1760
1760
  onClick: X((C) => e.$emit("open", l.convId), ["stop"])
1761
- }, v(s.t("common.open")), 9, Bt)
1761
+ }, v(s.t("common.open")), 9, Et)
1762
1762
  ], 44, At))), 128))
1763
1763
  ], 2)) : b("", !0)
1764
1764
  ]),
@@ -1795,7 +1795,7 @@ function Ft(e, t, n, i, r, s) {
1795
1795
  ], 8, Rt)
1796
1796
  ]);
1797
1797
  }
1798
- const jt = /* @__PURE__ */ E(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Pt = {
1798
+ const jt = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Pt = {
1799
1799
  name: "WmAIAvatar",
1800
1800
  props: {
1801
1801
  size: { type: Number, default: 26 },
@@ -1854,7 +1854,7 @@ function $t(e, t, n, i, r, s) {
1854
1854
  ], 2)
1855
1855
  ], 6);
1856
1856
  }
1857
- const le = /* @__PURE__ */ E(Pt, [["render", $t], ["__scopeId", "data-v-d621a129"]]), Ht = {
1857
+ const le = /* @__PURE__ */ B(Pt, [["render", $t], ["__scopeId", "data-v-d621a129"]]), Ht = {
1858
1858
  name: "WmTeamAvatars",
1859
1859
  props: {
1860
1860
  members: { type: Array, default: () => [] },
@@ -1876,15 +1876,15 @@ const le = /* @__PURE__ */ E(Pt, [["render", $t], ["__scopeId", "data-v-d621a129
1876
1876
  return Oe(e.name || "");
1877
1877
  }
1878
1878
  }
1879
- }, zt = {
1879
+ }, qt = {
1880
1880
  key: 0,
1881
1881
  class: "wm-team"
1882
- }, qt = ["src", "alt"], Vt = { key: 1 }, Kt = {
1882
+ }, zt = ["src", "alt"], Vt = { key: 1 }, Kt = {
1883
1883
  key: 0,
1884
1884
  class: "wm-team__label"
1885
1885
  };
1886
1886
  function Wt(e, t, n, i, r, s) {
1887
- return s.visible ? (c(), u("div", zt, [
1887
+ return s.visible ? (c(), u("div", qt, [
1888
1888
  o("div", {
1889
1889
  class: "wm-team__stack",
1890
1890
  style: K({ width: s.stackWidth + "px" })
@@ -1902,13 +1902,13 @@ function Wt(e, t, n, i, r, s) {
1902
1902
  key: 0,
1903
1903
  src: a.avatar_url,
1904
1904
  alt: a.name || ""
1905
- }, null, 8, qt)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1905
+ }, null, 8, zt)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1906
1906
  ], 4))), 128))
1907
1907
  ], 4),
1908
1908
  n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
1909
1909
  ])) : b("", !0);
1910
1910
  }
1911
- const Gt = /* @__PURE__ */ E(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1911
+ const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1912
1912
  name: "WmHeader",
1913
1913
  components: { AIAvatar: le, TeamAvatars: Gt },
1914
1914
  inject: {
@@ -1978,7 +1978,7 @@ function on(e, t, n, i, r, s) {
1978
1978
  ])], 8, Xt)) : (c(), u("div", Jt)),
1979
1979
  n.showIdentity ? (c(), u(L, { key: 2 }, [
1980
1980
  o("div", Zt, [
1981
- z(a, { size: 30 })
1981
+ q(a, { size: 30 })
1982
1982
  ]),
1983
1983
  o("div", en, [
1984
1984
  o("div", tn, v(n.title), 1)
@@ -2047,8 +2047,8 @@ function on(e, t, n, i, r, s) {
2047
2047
  ])
2048
2048
  ]);
2049
2049
  }
2050
- const ln = /* @__PURE__ */ E(Yt, [["render", on], ["__scopeId", "data-v-e5ed4931"]]);
2051
- function Be(e) {
2050
+ const ln = /* @__PURE__ */ B(Yt, [["render", on], ["__scopeId", "data-v-e5ed4931"]]);
2051
+ function Ee(e) {
2052
2052
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2053
2053
  }
2054
2054
  function cn(e) {
@@ -2066,11 +2066,11 @@ function re(e) {
2066
2066
  function dn(e) {
2067
2067
  if (!e) return "";
2068
2068
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2069
- return re(Be(t));
2069
+ return re(Ee(t));
2070
2070
  }
2071
2071
  function un(e) {
2072
2072
  if (!e) return "";
2073
- const t = Be(e).split(`
2073
+ const t = Ee(e).split(`
2074
2074
  `), n = [];
2075
2075
  let i = 0;
2076
2076
  for (; i < t.length; ) {
@@ -2109,10 +2109,10 @@ function un(e) {
2109
2109
  if (!A) break;
2110
2110
  k.push(A[1]), i++;
2111
2111
  }
2112
- const T = k.map((A) => `<li>${re(A)}</li>`).join(""), B = C !== 1 ? ` start="${C}"` : "";
2112
+ const T = k.map((A) => `<li>${re(A)}</li>`).join(""), E = C !== 1 ? ` start="${C}"` : "";
2113
2113
  n.push({
2114
2114
  type: "block",
2115
- html: `<ol class="wm-md-ol"${B}>${T}</ol>`
2115
+ html: `<ol class="wm-md-ol"${E}>${T}</ol>`
2116
2116
  });
2117
2117
  continue;
2118
2118
  }
@@ -2229,7 +2229,7 @@ const Se = {
2229
2229
  }, xn = {
2230
2230
  key: 1,
2231
2231
  class: "wm-onb__section"
2232
- }, On = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, In = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Bn = ["onClick"], Rn = ["aria-label"], Nn = { class: "wm-onb__thread-body" }, Fn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, Dn = {
2232
+ }, On = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, In = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, En = ["onClick"], Rn = ["aria-label"], Nn = { class: "wm-onb__thread-body" }, Fn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, Dn = {
2233
2233
  key: 0,
2234
2234
  class: "wm-onb__thread-time"
2235
2235
  }, Un = {
@@ -2240,7 +2240,7 @@ function $n(e, t, n, i, r, s) {
2240
2240
  const a = I("AIAvatar");
2241
2241
  return c(), u("div", mn, [
2242
2242
  o("div", fn, [
2243
- z(a, {
2243
+ q(a, {
2244
2244
  size: 56,
2245
2245
  pulse: !0
2246
2246
  }),
@@ -2324,7 +2324,7 @@ function $n(e, t, n, i, r, s) {
2324
2324
  [ee, r.query]
2325
2325
  ])
2326
2326
  ]),
2327
- o("div", En, [
2327
+ o("div", Bn, [
2328
2328
  (c(!0), u(L, null, j(s.filteredThreads, (l) => (c(), u("button", {
2329
2329
  key: l.id,
2330
2330
  type: "button",
@@ -2377,17 +2377,17 @@ function $n(e, t, n, i, r, s) {
2377
2377
  o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2378
2378
  ], -1))
2379
2379
  ])
2380
- ], 8, Bn))), 128)),
2380
+ ], 8, En))), 128)),
2381
2381
  s.filteredThreads.length ? b("", !0) : (c(), u("div", Un, v(s.t("onboarding.noResults", { query: r.query })), 1))
2382
2382
  ])
2383
2383
  ])) : b("", !0)
2384
2384
  ]);
2385
2385
  }
2386
- const Hn = /* @__PURE__ */ E(hn, [["render", $n], ["__scopeId", "data-v-d0d5f5b1"]]);
2387
- function zn(e) {
2386
+ const Hn = /* @__PURE__ */ B(hn, [["render", $n], ["__scopeId", "data-v-d0d5f5b1"]]);
2387
+ function qn(e) {
2388
2388
  return typeof e != "string" ? "" : e.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
2389
2389
  }
2390
- const qn = {
2390
+ const zn = {
2391
2391
  name: "WmActionResult",
2392
2392
  props: {
2393
2393
  state: { type: String, default: "success" },
@@ -2397,7 +2397,7 @@ const qn = {
2397
2397
  },
2398
2398
  computed: {
2399
2399
  detailText() {
2400
- return zn(this.detail);
2400
+ return qn(this.detail);
2401
2401
  }
2402
2402
  }
2403
2403
  }, Vn = {
@@ -2488,7 +2488,7 @@ function Zn(e, t, n, i, r, s) {
2488
2488
  ])
2489
2489
  ], 2);
2490
2490
  }
2491
- const es = /* @__PURE__ */ E(qn, [["render", Zn], ["__scopeId", "data-v-7284acd0"]]), ts = {
2491
+ const es = /* @__PURE__ */ B(zn, [["render", Zn], ["__scopeId", "data-v-7284acd0"]]), ts = {
2492
2492
  name: "WmArtifactFormResponse",
2493
2493
  inject: {
2494
2494
  // Translator shared by the Messenger shell; French fallback when
@@ -2542,7 +2542,7 @@ function ls(e, t, n, i, r, s) {
2542
2542
  ])
2543
2543
  ]);
2544
2544
  }
2545
- const cs = /* @__PURE__ */ E(ts, [["render", ls], ["__scopeId", "data-v-713aecf1"]]), ds = {
2545
+ const cs = /* @__PURE__ */ B(ts, [["render", ls], ["__scopeId", "data-v-713aecf1"]]), ds = {
2546
2546
  name: "WmArtifactInfoCard",
2547
2547
  props: {
2548
2548
  data: { type: Object, required: !0 }
@@ -2609,7 +2609,7 @@ function ws(e, t, n, i, r, s) {
2609
2609
  ])) : b("", !0)
2610
2610
  ]);
2611
2611
  }
2612
- const ks = /* @__PURE__ */ E(ds, [["render", ws], ["__scopeId", "data-v-7eae0e4a"]]);
2612
+ const ks = /* @__PURE__ */ B(ds, [["render", ws], ["__scopeId", "data-v-7eae0e4a"]]);
2613
2613
  function Cs(e, t, n) {
2614
2614
  if (!e) return "";
2615
2615
  const i = new Date(e);
@@ -2676,7 +2676,7 @@ const As = {
2676
2676
  }, Is = {
2677
2677
  key: 0,
2678
2678
  class: "wm-art__body"
2679
- }, Es = { class: "wm-art__fieldLabel" }, Bs = ["data-level"], Rs = {
2679
+ }, Bs = { class: "wm-art__fieldLabel" }, Es = ["data-level"], Rs = {
2680
2680
  key: 1,
2681
2681
  class: "wm-tk__date",
2682
2682
  width: "12",
@@ -2735,7 +2735,7 @@ function Fs(e, t, n, i, r, s) {
2735
2735
  key: l,
2736
2736
  class: "wm-art__field"
2737
2737
  }, [
2738
- o("div", Es, v(a.label), 1),
2738
+ o("div", Bs, v(a.label), 1),
2739
2739
  o("div", {
2740
2740
  class: x([
2741
2741
  "wm-art__fieldValue",
@@ -2772,7 +2772,7 @@ function Fs(e, t, n, i, r, s) {
2772
2772
  height: "9",
2773
2773
  rx: "0.5"
2774
2774
  }, null, -1)
2775
- ])], 8, Bs)) : s.isDate(a.label) ? (c(), u("svg", Rs, [...t[3] || (t[3] = [
2775
+ ])], 8, Es)) : s.isDate(a.label) ? (c(), u("svg", Rs, [...t[3] || (t[3] = [
2776
2776
  o("rect", {
2777
2777
  x: "3",
2778
2778
  y: "4",
@@ -2811,7 +2811,7 @@ function Fs(e, t, n, i, r, s) {
2811
2811
  ])) : b("", !0)
2812
2812
  ]);
2813
2813
  }
2814
- const js = /* @__PURE__ */ E(As, [["render", Fs], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2814
+ const js = /* @__PURE__ */ B(As, [["render", Fs], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2815
2815
  form_response: cs,
2816
2816
  info_card: ks,
2817
2817
  ticket: js
@@ -2836,7 +2836,7 @@ function Us(e, t, n, i, r, s) {
2836
2836
  data: n.artifact.data
2837
2837
  }, null, 8, ["data"])) : b("", !0);
2838
2838
  }
2839
- const $s = /* @__PURE__ */ E(Ds, [["render", Us]]), Hs = {
2839
+ const $s = /* @__PURE__ */ B(Ds, [["render", Us]]), Hs = {
2840
2840
  name: "WmAttachmentPreview",
2841
2841
  inject: {
2842
2842
  signAttachmentFn: { default: null },
@@ -2900,7 +2900,7 @@ const $s = /* @__PURE__ */ E(Ds, [["render", Us]]), Hs = {
2900
2900
  this.url || e.preventDefault();
2901
2901
  }
2902
2902
  }
2903
- }, zs = ["href"], qs = ["src", "alt"], Vs = ["src"], Ks = ["src"], Ws = ["href", "download"], Gs = { class: "wm-att__main" }, Ys = { class: "wm-att__name" }, Qs = {
2903
+ }, qs = ["href"], zs = ["src", "alt"], Vs = ["src"], Ks = ["src"], Ws = ["href", "download"], Gs = { class: "wm-att__main" }, Ys = { class: "wm-att__name" }, Qs = {
2904
2904
  key: 0,
2905
2905
  class: "wm-att__meta"
2906
2906
  }, Xs = {
@@ -2923,8 +2923,8 @@ function Js(e, t, n, i, r, s) {
2923
2923
  src: r.url,
2924
2924
  alt: s.displayName,
2925
2925
  loading: "lazy"
2926
- }, null, 8, qs)
2927
- ], 8, zs)) : s.kind === "audio" && r.url ? (c(), u("audio", {
2926
+ }, null, 8, zs)
2927
+ ], 8, qs)) : s.kind === "audio" && r.url ? (c(), u("audio", {
2928
2928
  key: 1,
2929
2929
  src: r.url,
2930
2930
  controls: "",
@@ -2967,7 +2967,7 @@ function Js(e, t, n, i, r, s) {
2967
2967
  ], 8, Ws))
2968
2968
  ], 2);
2969
2969
  }
2970
- const Zs = /* @__PURE__ */ E(Hs, [["render", Js], ["__scopeId", "data-v-afc7b0d3"]]), er = {
2970
+ const Zs = /* @__PURE__ */ B(Hs, [["render", Js], ["__scopeId", "data-v-afc7b0d3"]]), er = {
2971
2971
  name: "WmBubble",
2972
2972
  props: {
2973
2973
  role: { type: String, default: "ai" },
@@ -2989,7 +2989,7 @@ function nr(e, t, n, i, r, s) {
2989
2989
  ], !0)
2990
2990
  ], 2);
2991
2991
  }
2992
- const sr = /* @__PURE__ */ E(er, [["render", nr], ["__scopeId", "data-v-7ab13147"]]), rr = { name: "WmTyping" }, ir = { class: "wm-typing" };
2992
+ const sr = /* @__PURE__ */ B(er, [["render", nr], ["__scopeId", "data-v-7ab13147"]]), rr = { name: "WmTyping" }, ir = { class: "wm-typing" };
2993
2993
  function ar(e, t, n, i, r, s) {
2994
2994
  return c(), u("div", ir, [...t[0] || (t[0] = [
2995
2995
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
@@ -2997,7 +2997,7 @@ function ar(e, t, n, i, r, s) {
2997
2997
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
2998
2998
  ])]);
2999
2999
  }
3000
- const or = /* @__PURE__ */ E(rr, [["render", ar], ["__scopeId", "data-v-df2447fd"]]);
3000
+ const or = /* @__PURE__ */ B(rr, [["render", ar], ["__scopeId", "data-v-df2447fd"]]);
3001
3001
  function Z(e) {
3002
3002
  return e ? e.client_msg_id || e.id : "";
3003
3003
  }
@@ -3012,7 +3012,7 @@ const lr = {
3012
3012
  name: "WmMessageList",
3013
3013
  components: {
3014
3014
  AIAvatar: le,
3015
- HumanAvatar: Ee,
3015
+ HumanAvatar: Be,
3016
3016
  Bubble: sr,
3017
3017
  Typing: or,
3018
3018
  ActionResult: es,
@@ -3148,12 +3148,10 @@ const lr = {
3148
3148
  watch: {
3149
3149
  messages: { handler: "snapshotAndRestore", deep: !0 },
3150
3150
  conversationId(e, t) {
3151
- e !== t && (this._groupIdByMsgKey = null);
3151
+ e !== t && (this._groupIdByMsgKey = null, this.silentFades = !1);
3152
3152
  },
3153
3153
  loadingMore(e) {
3154
- e || (this._pendingLoadMore = !1), this.silentFades = !0, clearTimeout(this._silenceTimer), e || (this._silenceTimer = setTimeout(() => {
3155
- this.silentFades = !1;
3156
- }, 250)), this.snapshotAndRestore();
3154
+ e || (this._pendingLoadMore = !1), e && (this.silentFades = !0), this.snapshotAndRestore();
3157
3155
  },
3158
3156
  streamingActive: "snapshotAndRestore"
3159
3157
  },
@@ -3162,7 +3160,7 @@ const lr = {
3162
3160
  },
3163
3161
  beforeUnmount() {
3164
3162
  var e;
3165
- (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame), clearTimeout(this._silenceTimer);
3163
+ (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame);
3166
3164
  },
3167
3165
  updated() {
3168
3166
  this.scheduleMeasure();
@@ -3230,12 +3228,15 @@ const lr = {
3230
3228
  let i = null;
3231
3229
  if (!t && !n) {
3232
3230
  const s = this.pickAnchor(e);
3233
- if (s != null && s.el) {
3234
- const a = e.getBoundingClientRect().top;
3235
- i = {
3236
- el: s.el,
3237
- relY: s.el.getBoundingClientRect().top - a
3238
- };
3231
+ if (s != null && s.rowKey) {
3232
+ const a = this.findRowByKey(e, s.rowKey);
3233
+ if (a) {
3234
+ const l = e.getBoundingClientRect().top;
3235
+ i = {
3236
+ rowKey: s.rowKey,
3237
+ relY: a.getBoundingClientRect().top - l
3238
+ };
3239
+ }
3239
3240
  }
3240
3241
  }
3241
3242
  const r = { forceBottom: t, wasPinned: n, anchor: i };
@@ -3246,42 +3247,52 @@ const lr = {
3246
3247
  }
3247
3248
  if (!r.anchor) return;
3248
3249
  const s = () => {
3249
- var C;
3250
- const a = r.anchor;
3251
- if (!((C = a.el) != null && C.isConnected)) return;
3252
- const g = a.el.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3253
- Math.abs(g) > 0.5 && (e.scrollTop += g);
3250
+ const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
3251
+ if (!l) return;
3252
+ const C = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3253
+ Math.abs(C) > 0.5 && (e.scrollTop += C);
3254
3254
  };
3255
3255
  s(), requestAnimationFrame(() => {
3256
3256
  s(), requestAnimationFrame(s);
3257
3257
  });
3258
3258
  });
3259
3259
  },
3260
- // Pick a *stable* DOM element to use as a scroll anchor — one
3261
- // that will still be mounted after the upcoming patch and whose
3262
- // `offsetTop` moves in lockstep with content being prepended.
3260
+ // Pick a stable identifier for the topmost partially-visible row
3261
+ // to use as a scroll anchor.
3262
+ //
3263
+ // Why ROW level, not group level: when a load-more lands and the
3264
+ // prepended messages share the role of the current top group,
3265
+ // they merge INTO that group. The group's own `offsetTop` is
3266
+ // still 0 (it's still the first child of the scroller), so a
3267
+ // group-level anchor measures a zero delta and skips the
3268
+ // correction — the user, who was at the very top reading the
3269
+ // first message, suddenly sees the prepended history in its
3270
+ // place. A row-level anchor (every `.wm-list__row` carries a
3271
+ // stable `data-row-key` derived from `client_msg_id || id`)
3272
+ // captures the row's actual displacement within the new
3273
+ // content, regardless of whether a new group sits above it or
3274
+ // the existing group simply grew at the top.
3263
3275
  //
3264
- // We must skip:
3265
- // - the loader (`wm-list__loadMore`): unmounts when loading
3266
- // ends, leaving `anchor.el.isConnected === false`;
3267
- // - the history-end marker (`wm-list__historyEnd`): same story;
3268
- // - the date sep (`wm-list__sep`): it stays glued to the very
3269
- // top of the scroller regardless of prepends, so its
3270
- // `offsetTop` delta is always 0 → preservation does nothing
3271
- // and the user stays pinned to the top, which is exactly the
3272
- // bug we're trying to avoid.
3276
+ // We still skip the loader / history-end / date-sep nodes
3277
+ // implicitly because they are not `.wm-list__row`.
3273
3278
  //
3274
- // Falling back to the *first* message group (rather than the
3275
- // first one past `scrollTop`) when the user is at the very top
3276
- // is intentional: it's the most reliable anchor and its
3277
- // `offsetTop` grows by the full prepended height.
3279
+ // Falling back to the *first* row (rather than only rows past
3280
+ // `scrollTop`) when nothing matches handles the
3281
+ // very-top-of-scroll edge case the same way the old logic did.
3278
3282
  pickAnchor(e) {
3279
- const t = e.scrollTop;
3280
- let n = null;
3281
- for (const i of e.children)
3282
- if (i.classList.contains("wm-list__group") && (n || (n = i), i.offsetTop + i.offsetHeight >= t))
3283
- return { el: i, offsetTop: i.offsetTop };
3284
- return n ? { el: n, offsetTop: n.offsetTop } : null;
3283
+ const t = e.getBoundingClientRect().top, n = e.querySelectorAll(".wm-list__row[data-row-key]");
3284
+ let i = null;
3285
+ for (const r of n)
3286
+ if (i || (i = r), r.getBoundingClientRect().bottom >= t)
3287
+ return { rowKey: r.dataset.rowKey };
3288
+ return i ? { rowKey: i.dataset.rowKey } : null;
3289
+ },
3290
+ findRowByKey(e, t) {
3291
+ if (!t) return null;
3292
+ const n = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/["\\]/g, "\\$&");
3293
+ return e.querySelector(
3294
+ `.wm-list__row[data-row-key="${n}"]`
3295
+ );
3285
3296
  },
3286
3297
  roleOf(e) {
3287
3298
  var n, i;
@@ -3383,9 +3394,9 @@ const lr = {
3383
3394
  // doit garder son arrondi.
3384
3395
  cornersFor(e, t) {
3385
3396
  var te, ne, G;
3386
- const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, g = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (Y, Q, q) => Y != null && T != null ? Y + H >= T : Q === q || Q === "card" && q === "bubble";
3397
+ const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, g = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (Y, Q, z) => Y != null && T != null ? Y + H >= T : Q === z || Q === "card" && z === "bubble";
3387
3398
  let D = l, N = l, $ = l, W = l;
3388
- return a ? (C && (N = g), (k || !s) && ($ = g), C && M(B, C, i == null ? void 0 : i.top) && (D = g), k && M(A, k, i == null ? void 0 : i.bottom) && (W = g)) : (C && (D = g), (k || !s) && (W = g), C && M(B, C, i == null ? void 0 : i.top) && (N = g), k && M(A, k, i == null ? void 0 : i.bottom) && ($ = g)), { tl: D, tr: N, br: $, bl: W };
3399
+ return a ? (C && (N = g), (k || !s) && ($ = g), C && M(E, C, i == null ? void 0 : i.top) && (D = g), k && M(A, k, i == null ? void 0 : i.bottom) && (W = g)) : (C && (D = g), (k || !s) && (W = g), C && M(E, C, i == null ? void 0 : i.top) && (N = g), k && M(A, k, i == null ? void 0 : i.bottom) && ($ = g)), { tl: D, tr: N, br: $, bl: W };
3389
3400
  },
3390
3401
  // Inline style emitting the four corner CSS variables. Set on
3391
3402
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3537,7 +3548,7 @@ const lr = {
3537
3548
  class: "wm-list__row wm-list__row--ai fade-up"
3538
3549
  }, xr = { class: "wm-list__avatarSlot" };
3539
3550
  function Or(e, t, n, i, r, s) {
3540
- const a = I("AIAvatar"), l = I("HumanAvatar"), g = I("ActionResult"), C = I("ArtifactRenderer"), k = I("Bubble"), T = I("AttachmentPreview"), B = I("Typing");
3551
+ const a = I("AIAvatar"), l = I("HumanAvatar"), g = I("ActionResult"), C = I("ArtifactRenderer"), k = I("Bubble"), T = I("AttachmentPreview"), E = I("Typing");
3541
3552
  return c(), u("div", {
3542
3553
  ref: "scrollEl",
3543
3554
  class: x(["wm-list", { "wm-list--silent": r.silentFades }]),
@@ -3649,16 +3660,16 @@ function Or(e, t, n, i, r, s) {
3649
3660
  ], 64))), 128)),
3650
3661
  n.streamingActive ? (c(), u("div", Tr, [
3651
3662
  o("div", xr, [
3652
- z(a, {
3663
+ q(a, {
3653
3664
  size: 26,
3654
3665
  tail: !0
3655
3666
  })
3656
3667
  ]),
3657
- z(B)
3668
+ q(E)
3658
3669
  ])) : b("", !0)
3659
3670
  ], 34);
3660
3671
  }
3661
- const Lr = /* @__PURE__ */ E(ur, [["render", Or], ["__scopeId", "data-v-499ea569"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ve = typeof window < "u" && typeof window.MediaRecorder < "u";
3672
+ const Lr = /* @__PURE__ */ B(ur, [["render", Or], ["__scopeId", "data-v-8b3763d3"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ve = typeof window < "u" && typeof window.MediaRecorder < "u";
3662
3673
  function Ir() {
3663
3674
  return ve && [
3664
3675
  "video/webm;codecs=vp9,opus",
@@ -3682,7 +3693,7 @@ function Re({ audio: e }) {
3682
3693
  function Ua(e) {
3683
3694
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3684
3695
  }
3685
- async function Er() {
3696
+ async function Br() {
3686
3697
  if (!he) return null;
3687
3698
  let e;
3688
3699
  try {
@@ -3693,7 +3704,7 @@ async function Er() {
3693
3704
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3694
3705
  }
3695
3706
  try {
3696
- return await Br(e);
3707
+ return await Er(e);
3697
3708
  } catch (t) {
3698
3709
  return console.error("[media] screenshot capture", t), null;
3699
3710
  } finally {
@@ -3702,7 +3713,7 @@ async function Er() {
3702
3713
  });
3703
3714
  }
3704
3715
  }
3705
- async function Br(e) {
3716
+ async function Er(e) {
3706
3717
  const t = document.createElement("video");
3707
3718
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
3708
3719
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -3741,11 +3752,11 @@ async function Rr(e = {}) {
3741
3752
  k.data && k.data.size > 0 && r.push(k.data);
3742
3753
  }), i.addEventListener("stop", () => {
3743
3754
  var k, T;
3744
- if (s && clearInterval(s), t.getTracks().forEach((B) => {
3745
- B.stop();
3755
+ if (s && clearInterval(s), t.getTracks().forEach((E) => {
3756
+ E.stop();
3746
3757
  }), r.length) {
3747
- const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${H}`, {
3748
- type: B
3758
+ const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${H}`, {
3759
+ type: E
3749
3760
  });
3750
3761
  (k = e.onfinalize) == null || k.call(e, D);
3751
3762
  } else
@@ -3897,7 +3908,7 @@ const Nr = [
3897
3908
  },
3898
3909
  async captureScreenshot() {
3899
3910
  if (this.disabled) return;
3900
- const e = await Er();
3911
+ const e = await Br();
3901
3912
  e && this.$emit("attach", e);
3902
3913
  },
3903
3914
  async startRecording() {
@@ -3935,12 +3946,12 @@ const Nr = [
3935
3946
  key: 1,
3936
3947
  class: "wm-compose__menu",
3937
3948
  role: "menu"
3938
- }, $r = ["disabled", "onClick"], Hr = { class: "wm-compose__menuIcon" }, zr = {
3949
+ }, $r = ["disabled", "onClick"], Hr = { class: "wm-compose__menuIcon" }, qr = {
3939
3950
  viewBox: "0 0 24 24",
3940
3951
  width: "14",
3941
3952
  height: "14",
3942
3953
  "aria-hidden": "true"
3943
- }, qr = ["d"], Vr = ["placeholder", "disabled"], Kr = { class: "wm-compose__actions" }, Wr = ["title", "aria-label", "disabled"], Gr = ["disabled", "aria-label"];
3954
+ }, zr = ["d"], Vr = ["placeholder", "disabled"], Kr = { class: "wm-compose__actions" }, Wr = ["title", "aria-label", "disabled"], Gr = ["disabled", "aria-label"];
3944
3955
  function Yr(e, t, n, i, r, s) {
3945
3956
  return c(), u("div", jr, [
3946
3957
  r.recording ? (c(), u("div", Pr, [
@@ -3980,7 +3991,7 @@ function Yr(e, t, n, i, r, s) {
3980
3991
  onClick: (l) => s.onAttachAction(a.action)
3981
3992
  }, [
3982
3993
  o("span", Hr, [
3983
- (c(), u("svg", zr, [
3994
+ (c(), u("svg", qr, [
3984
3995
  o("path", {
3985
3996
  d: a.path,
3986
3997
  stroke: "currentColor",
@@ -3988,7 +3999,7 @@ function Yr(e, t, n, i, r, s) {
3988
3999
  "stroke-linecap": "round",
3989
4000
  "stroke-linejoin": "round",
3990
4001
  fill: "none"
3991
- }, null, 8, qr)
4002
+ }, null, 8, zr)
3992
4003
  ]))
3993
4004
  ]),
3994
4005
  o("span", null, v(a.label), 1)
@@ -4053,7 +4064,7 @@ function Yr(e, t, n, i, r, s) {
4053
4064
  ], 34)
4054
4065
  ]);
4055
4066
  }
4056
- const Qr = /* @__PURE__ */ E(Fr, [["render", Yr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
4067
+ const Qr = /* @__PURE__ */ B(Fr, [["render", Yr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
4057
4068
  name: "WmSuggestionChips",
4058
4069
  props: {
4059
4070
  items: { type: Array, default: () => [] },
@@ -4085,7 +4096,7 @@ function Zr(e, t, n, i, r, s) {
4085
4096
  }, v(a.label), 13, Jr))), 128))
4086
4097
  ])) : b("", !0);
4087
4098
  }
4088
- const ei = /* @__PURE__ */ E(Xr, [["render", Zr], ["__scopeId", "data-v-47ad8085"]]), ti = {
4099
+ const ei = /* @__PURE__ */ B(Xr, [["render", Zr], ["__scopeId", "data-v-47ad8085"]]), ti = {
4089
4100
  name: "WmApprovalCard",
4090
4101
  components: { AIAvatar: le },
4091
4102
  inject: {
@@ -4136,7 +4147,7 @@ function ci(e, t, n, i, r, s) {
4136
4147
  return c(), u("div", ni, [
4137
4148
  o("div", si, [
4138
4149
  o("div", ri, [
4139
- z(a, { size: 24 })
4150
+ q(a, { size: 24 })
4140
4151
  ]),
4141
4152
  o("div", ii, [
4142
4153
  o("div", ai, v(n.action), 1),
@@ -4159,7 +4170,7 @@ function ci(e, t, n, i, r, s) {
4159
4170
  ])
4160
4171
  ]);
4161
4172
  }
4162
- const di = /* @__PURE__ */ E(ti, [["render", ci], ["__scopeId", "data-v-53ddf2b2"]]);
4173
+ const di = /* @__PURE__ */ B(ti, [["render", ci], ["__scopeId", "data-v-53ddf2b2"]]);
4163
4174
  let Me = 0;
4164
4175
  const ui = /* @__PURE__ */ new Set([
4165
4176
  "text",
@@ -4266,10 +4277,10 @@ const ui = /* @__PURE__ */ new Set([
4266
4277
  }, Oi = ["value"], Li = {
4267
4278
  key: 6,
4268
4279
  class: "wm-form__multi"
4269
- }, Ii = ["value", "checked", "disabled", "onChange"], Ei = {
4280
+ }, Ii = ["value", "checked", "disabled", "onChange"], Bi = {
4270
4281
  key: 0,
4271
4282
  class: "wm-form__err"
4272
- }, Bi = ["disabled"], Ri = {
4283
+ }, Ei = ["disabled"], Ri = {
4273
4284
  key: 0,
4274
4285
  class: "wm-form__spinner",
4275
4286
  "aria-hidden": "true"
@@ -4282,7 +4293,7 @@ function Fi(e, t, n, i, r, s) {
4282
4293
  return c(), u("div", mi, [
4283
4294
  o("div", fi, [
4284
4295
  o("div", _i, [
4285
- z(a, { size: 24 })
4296
+ q(a, { size: 24 })
4286
4297
  ]),
4287
4298
  o("div", pi, [
4288
4299
  o("div", gi, v(n.form.title || s.t("form.title")), 1),
@@ -4397,7 +4408,7 @@ function Fi(e, t, n, i, r, s) {
4397
4408
  ]))), 128))
4398
4409
  ])) : b("", !0)
4399
4410
  ]))), 128)),
4400
- r.error ? (c(), u("div", Ei, v(r.error), 1)) : b("", !0),
4411
+ r.error ? (c(), u("div", Bi, v(r.error), 1)) : b("", !0),
4401
4412
  n.readOnly ? (c(), u("div", Ni, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4402
4413
  key: 1,
4403
4414
  type: "submit",
@@ -4406,11 +4417,11 @@ function Fi(e, t, n, i, r, s) {
4406
4417
  }, [
4407
4418
  r.busy ? (c(), u("span", Ri)) : b("", !0),
4408
4419
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4409
- ], 8, Bi))
4420
+ ], 8, Ei))
4410
4421
  ], 32)
4411
4422
  ]);
4412
4423
  }
4413
- const ji = /* @__PURE__ */ E(hi, [["render", Fi], ["__scopeId", "data-v-75332dad"]]), Pi = {
4424
+ const ji = /* @__PURE__ */ B(hi, [["render", Fi], ["__scopeId", "data-v-75332dad"]]), Pi = {
4414
4425
  name: "WmFeedback",
4415
4426
  inject: {
4416
4427
  // Translator shared by the Messenger shell; French fallback when
@@ -4444,7 +4455,7 @@ const ji = /* @__PURE__ */ E(hi, [["render", Fi], ["__scopeId", "data-v-75332dad
4444
4455
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4445
4456
  }
4446
4457
  }
4447
- }, Di = { class: "wm-fb" }, Ui = { class: "wm-fb__title" }, $i = { class: "wm-fb__sub" }, Hi = { class: "wm-fb__row" }, zi = ["onClick"], qi = { class: "wm-fb__emoji" }, Vi = { class: "wm-fb__label" }, Ki = ["disabled"], Wi = {
4458
+ }, Di = { class: "wm-fb" }, Ui = { class: "wm-fb__title" }, $i = { class: "wm-fb__sub" }, Hi = { class: "wm-fb__row" }, qi = ["onClick"], zi = { class: "wm-fb__emoji" }, Vi = { class: "wm-fb__label" }, Ki = ["disabled"], Wi = {
4448
4459
  key: 1,
4449
4460
  class: "wm-fb__done"
4450
4461
  }, Gi = { class: "wm-fb__doneTitle" }, Yi = { class: "wm-fb__doneSub" };
@@ -4478,9 +4489,9 @@ function Qi(e, t, n, i, r, s) {
4478
4489
  class: x(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4479
4490
  onClick: (l) => r.sel = a.v
4480
4491
  }, [
4481
- o("span", qi, v(a.e), 1),
4492
+ o("span", zi, v(a.e), 1),
4482
4493
  o("span", Vi, v(a.l), 1)
4483
- ], 10, zi))), 128))
4494
+ ], 10, qi))), 128))
4484
4495
  ]),
4485
4496
  o("button", {
4486
4497
  type: "button",
@@ -4491,7 +4502,7 @@ function Qi(e, t, n, i, r, s) {
4491
4502
  ], 64))
4492
4503
  ]);
4493
4504
  }
4494
- const Xi = /* @__PURE__ */ E(Pi, [["render", Qi], ["__scopeId", "data-v-9b630564"]]), Ji = {
4505
+ const Xi = /* @__PURE__ */ B(Pi, [["render", Qi], ["__scopeId", "data-v-9b630564"]]), Ji = {
4495
4506
  name: "WmMoreMenu",
4496
4507
  inject: {
4497
4508
  // Translator shared by the Messenger shell; French fallback when
@@ -4711,7 +4722,7 @@ function ua(e, t, n, i, r, s) {
4711
4722
  ])
4712
4723
  ]);
4713
4724
  }
4714
- const ha = /* @__PURE__ */ E(Ji, [["render", ua], ["__scopeId", "data-v-76281e95"]]), ma = {
4725
+ const ha = /* @__PURE__ */ B(Ji, [["render", ua], ["__scopeId", "data-v-76281e95"]]), ma = {
4715
4726
  name: "WmRenameDialog",
4716
4727
  inject: {
4717
4728
  // Translator shared by the Messenger shell; French fallback when
@@ -4820,7 +4831,7 @@ function Ca(e, t, n, i, r, s) {
4820
4831
  ])
4821
4832
  ]);
4822
4833
  }
4823
- const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8"]]), Te = "ww-messenger-tokens", Sa = {
4834
+ const Aa = /* @__PURE__ */ B(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8"]]), Te = "ww-messenger-tokens", Sa = {
4824
4835
  name: "Messenger",
4825
4836
  components: {
4826
4837
  Launcher: jt,
@@ -5000,9 +5011,9 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5000
5011
  const T = r[k];
5001
5012
  if (!T) continue;
5002
5013
  if (((C = T.author) == null ? void 0 : C.type) === "user") break;
5003
- const B = J(T.id);
5004
- if (B != null) {
5005
- if (s != null && B <= s) break;
5014
+ const E = J(T.id);
5015
+ if (E != null) {
5016
+ if (s != null && E <= s) break;
5006
5017
  t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5007
5018
  }
5008
5019
  }
@@ -5674,7 +5685,7 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5674
5685
  }, Ta = ["aria-label"], xa = {
5675
5686
  key: 0,
5676
5687
  class: "wm-state"
5677
- }, Oa = { class: "wm-state__err" }, La = { class: "wm-state__errTitle" }, Ia = { class: "wm-state__errSub" }, Ea = { class: "wm-bottom" }, Ba = {
5688
+ }, Oa = { class: "wm-state__err" }, La = { class: "wm-state__errTitle" }, Ia = { class: "wm-state__errSub" }, Ba = { class: "wm-bottom" }, Ea = {
5678
5689
  key: 0,
5679
5690
  ref: "floatEl",
5680
5691
  class: "wm-float"
@@ -5688,7 +5699,7 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
5688
5699
  class: "wm-attached"
5689
5700
  }, ja = ["aria-label", "onClick"];
5690
5701
  function Pa(e, t, n, i, r, s) {
5691
- const a = I("Launcher"), l = I("Header"), g = I("Onboarding"), C = I("MessageList"), k = I("ApprovalCard"), T = I("FormCard"), B = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), D = I("RenameDialog");
5702
+ const a = I("Launcher"), l = I("Header"), g = I("Onboarding"), C = I("MessageList"), k = I("ApprovalCard"), T = I("FormCard"), E = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), D = I("RenameDialog");
5692
5703
  return c(), u("div", {
5693
5704
  class: x(["wm-root", `wm-root--${n.displayMode}`])
5694
5705
  }, [
@@ -5733,7 +5744,7 @@ function Pa(e, t, n, i, r, s) {
5733
5744
  "aria-hidden": "true"
5734
5745
  }, null, -1))
5735
5746
  ])) : (c(), u(L, { key: 1 }, [
5736
- z(l, {
5747
+ q(l, {
5737
5748
  title: s.headerTitle,
5738
5749
  "team-members": s.teamMembers,
5739
5750
  "response-label": s.responseLabel,
@@ -5768,7 +5779,7 @@ function Pa(e, t, n, i, r, s) {
5768
5779
  ])
5769
5780
  ])
5770
5781
  ])) : s.currentConv ? (c(), u(L, { key: 2 }, [
5771
- z(C, {
5782
+ q(C, {
5772
5783
  ref: "messageList",
5773
5784
  messages: s.displayedMessages,
5774
5785
  "streaming-active": s.streamingActive,
@@ -5780,8 +5791,8 @@ function Pa(e, t, n, i, r, s) {
5780
5791
  "unread-boundary-ts": e.unreadBoundaryTs,
5781
5792
  onLoadMore: s.onLoadMore
5782
5793
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "onLoadMore"]),
5783
- o("div", Ea, [
5784
- s.floatVisible ? (c(), u("div", Ba, [
5794
+ o("div", Ba, [
5795
+ s.floatVisible ? (c(), u("div", Ea, [
5785
5796
  s.approvalReady ? (c(), R(k, {
5786
5797
  key: 0,
5787
5798
  action: s.approvalTitle,
@@ -5792,7 +5803,7 @@ function Pa(e, t, n, i, r, s) {
5792
5803
  key: s.pendingForm.message && s.pendingForm.message.id,
5793
5804
  form: s.pendingForm.form,
5794
5805
  onSubmit: s.onFormSubmit
5795
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (c(), R(B, {
5806
+ }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (c(), R(E, {
5796
5807
  key: 2,
5797
5808
  busy: r.feedbackBusy,
5798
5809
  done: r.feedbackDone,
@@ -5911,7 +5922,7 @@ function Pa(e, t, n, i, r, s) {
5911
5922
  ], 6)) : b("", !0)
5912
5923
  ], 2);
5913
5924
  }
5914
- const $a = /* @__PURE__ */ E(Sa, [["render", Pa], ["__scopeId", "data-v-d9dce1ad"]]), Ha = "0.4.3";
5925
+ const $a = /* @__PURE__ */ B(Sa, [["render", Pa], ["__scopeId", "data-v-d9dce1ad"]]), Ha = "0.4.4";
5915
5926
  export {
5916
5927
  le as AIAvatar,
5917
5928
  fe as AVATAR_COLORS,
@@ -5929,7 +5940,7 @@ export {
5929
5940
  Xi as Feedback,
5930
5941
  ji as FormCard,
5931
5942
  ln as Header,
5932
- Ee as HumanAvatar,
5943
+ Be as HumanAvatar,
5933
5944
  jt as Launcher,
5934
5945
  ve as MEDIA_RECORDER_SUPPORTED,
5935
5946
  Lr as MessageList,
@@ -5944,7 +5955,7 @@ export {
5944
5955
  Ha as VERSION,
5945
5956
  xe as avatarColor,
5946
5957
  Oe as avatarInitials,
5947
- Er as captureScreenshotFile,
5958
+ Br as captureScreenshotFile,
5948
5959
  U as colors,
5949
5960
  Xe as createStore,
5950
5961
  P as createTranslator,