@_solaris/messenger-widget 0.5.77 → 0.5.79

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 Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as De, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as l, createCommentVNode as k, createBlock as P, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
1
+ import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as Ue, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as D, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -38,7 +38,7 @@ function Ze(e) {
38
38
  function s(u, g) {
39
39
  return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(g), () => t.listeners.get(u).delete(g);
40
40
  }
41
- function r(u, g) {
41
+ function i(u, g) {
42
42
  const p = t.listeners.get(u);
43
43
  p && p.forEach((S) => {
44
44
  try {
@@ -48,8 +48,8 @@ function Ze(e) {
48
48
  }
49
49
  });
50
50
  }
51
- function i(u) {
52
- t.connection !== u && (t.connection = u, r("connection", u));
51
+ function a(u) {
52
+ t.connection !== u && (t.connection = u, i("connection", u));
53
53
  }
54
54
  function n() {
55
55
  return {
@@ -64,7 +64,7 @@ function Ze(e) {
64
64
  ...t.origin ? { "X-Parent-Origin": t.origin } : {}
65
65
  };
66
66
  }
67
- async function a(u, g, p) {
67
+ async function r(u, g, p) {
68
68
  const S = await fetch(`${t.baseUrl}${we}${g}`, {
69
69
  method: u,
70
70
  credentials: "include",
@@ -72,14 +72,14 @@ function Ze(e) {
72
72
  body: p !== void 0 ? JSON.stringify(p) : void 0
73
73
  });
74
74
  if (!S.ok) {
75
- const O = await o(S), x = new Error(
75
+ const O = await l(S), x = new Error(
76
76
  `HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
77
77
  );
78
78
  throw x.status = S.status, x.body = O, x;
79
79
  }
80
80
  return S.status === 204 ? null : S.json();
81
81
  }
82
- async function o(u) {
82
+ async function l(u) {
83
83
  try {
84
84
  return await u.json();
85
85
  } catch {
@@ -112,7 +112,7 @@ function Ze(e) {
112
112
  }
113
113
  );
114
114
  if (!g.ok) {
115
- const V = await o(g), Z = new Error(
115
+ const V = await l(g), Z = new Error(
116
116
  `Session bootstrap failed: HTTP ${g.status} :: ${(V == null ? void 0 : V.error) || g.statusText}`
117
117
  );
118
118
  throw Z.status = g.status, Z.body = V, Z;
@@ -125,21 +125,21 @@ function Ze(e) {
125
125
  { credentials: "include" }
126
126
  ).then(async (V) => {
127
127
  if (!V.ok) {
128
- const Z = await o(V);
128
+ const Z = await l(V);
129
129
  throw new Error(
130
130
  `HTTP ${V.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || V.statusText}`
131
131
  );
132
132
  }
133
133
  return V.json();
134
134
  }),
135
- a("GET", "/customers/me")
135
+ r("GET", "/customers/me")
136
136
  ]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
137
- return t.lastBootstrap = x, await b(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
137
+ return t.lastBootstrap = x, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
138
138
  "visibilitychange",
139
139
  t.visibilityHandler
140
140
  )), fe(), x;
141
141
  }
142
- async function b() {
142
+ async function k() {
143
143
  try {
144
144
  const u = await E();
145
145
  t.lastActivityAt = u.reduce((g, p) => {
@@ -151,45 +151,45 @@ function Ze(e) {
151
151
  }
152
152
  }
153
153
  async function y() {
154
- const u = await a("GET", "/customers/me");
154
+ const u = await r("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
157
157
  async function M(u) {
158
- const g = await a("PATCH", "/customers/me", u);
158
+ const g = await r("PATCH", "/customers/me", u);
159
159
  return (g == null ? void 0 : g.customer) ?? null;
160
160
  }
161
161
  async function E() {
162
- const u = await a("GET", "/conversations");
162
+ const u = await r("GET", "/conversations");
163
163
  return (u == null ? void 0 : u.conversations) ?? [];
164
164
  }
165
165
  async function A(u = {}) {
166
- return (await a("POST", "/conversations", u)).conversation;
166
+ return (await r("POST", "/conversations", u)).conversation;
167
167
  }
168
168
  async function q(u) {
169
- return (await a(
169
+ return (await r(
170
170
  "GET",
171
171
  `/conversations/${encodeURIComponent(u)}`
172
172
  )).conversation;
173
173
  }
174
174
  async function T(u, g) {
175
- return (await a(
175
+ return (await r(
176
176
  "PATCH",
177
177
  `/conversations/${encodeURIComponent(u)}`,
178
178
  g
179
179
  )).conversation;
180
180
  }
181
- async function U(u, g) {
182
- return a(
181
+ async function N(u, g) {
182
+ return r(
183
183
  "PATCH",
184
184
  `/conversations/${encodeURIComponent(u)}/read`,
185
185
  { message_id: g }
186
186
  );
187
187
  }
188
- async function D(u, g = {}) {
188
+ async function U(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
190
  g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
191
  const S = p.toString() ? `?${p.toString()}` : "";
192
- return a(
192
+ return r(
193
193
  "GET",
194
194
  `/conversations/${encodeURIComponent(u)}/messages${S}`
195
195
  );
@@ -203,21 +203,21 @@ function Ze(e) {
203
203
  author: { id: t.userId, type: "user" },
204
204
  created_at: g.created_at || (/* @__PURE__ */ new Date()).toISOString()
205
205
  };
206
- return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), a(
206
+ return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), r(
207
207
  "POST",
208
208
  `/conversations/${encodeURIComponent(u)}/messages`,
209
209
  p
210
210
  );
211
211
  }
212
212
  async function W(u, g, p) {
213
- return ae(), a(
213
+ return ae(), r(
214
214
  "POST",
215
215
  `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
216
216
  p ? { inputs: p } : {}
217
217
  );
218
218
  }
219
219
  async function Q(u) {
220
- const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await a("POST", "/attachments", {
220
+ const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await r("POST", "/attachments", {
221
221
  mime_type: p,
222
222
  size_bytes: S,
223
223
  name: g
@@ -236,7 +236,7 @@ function Ze(e) {
236
236
  };
237
237
  }
238
238
  async function se(u) {
239
- return a(
239
+ return r(
240
240
  "GET",
241
241
  `/attachments/sign?path=${encodeURIComponent(u)}`
242
242
  );
@@ -253,22 +253,22 @@ function Ze(e) {
253
253
  u.addEventListener(g, (p) => ie(g, p.data));
254
254
  u.addEventListener(
255
255
  "error",
256
- () => r("error", new Error("SSE error"))
257
- ), t.eventSource = u, i("open");
256
+ () => i("error", new Error("SSE error"))
257
+ ), t.eventSource = u, a("open");
258
258
  } catch (u) {
259
- console.error("[transport] SSE open failed", u), r("error", u);
259
+ console.error("[transport] SSE open failed", u), i("error", u);
260
260
  }
261
261
  }
262
262
  function ie(u, g) {
263
263
  try {
264
264
  const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
265
- r(u, S);
265
+ i(u, S);
266
266
  } catch (p) {
267
267
  console.error("[transport] bad SSE payload", u, p);
268
268
  }
269
269
  }
270
270
  function X() {
271
- t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && i("idle");
271
+ t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && a("idle");
272
272
  }
273
273
  function ae() {
274
274
  clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
@@ -284,7 +284,7 @@ function Ze(e) {
284
284
  const x = O == null ? void 0 : O.last_message_at;
285
285
  return x && (!S || x > S) ? x : S;
286
286
  }, null);
287
- g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
287
+ g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, i("activity", { conversations: u, latestAt: g }), ae());
288
288
  } catch (u) {
289
289
  console.error("[transport] poll failed", u);
290
290
  }
@@ -298,14 +298,14 @@ function Ze(e) {
298
298
  function m() {
299
299
  if (document.hidden)
300
300
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
301
- t.hiddenGraceTimer = null, document.hidden && (h(), X(), i("paused"));
301
+ t.hiddenGraceTimer = null, document.hidden && (h(), X(), a("paused"));
302
302
  }, Qe);
303
303
  else {
304
304
  if (t.hiddenGraceTimer) {
305
305
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
306
306
  return;
307
307
  }
308
- i("idle"), fe(), t.panelOpen && $();
308
+ a("idle"), fe(), t.panelOpen && $();
309
309
  }
310
310
  }
311
311
  function _() {
@@ -315,7 +315,7 @@ function Ze(e) {
315
315
  ), t.visibilityHandler = null), t.started = !1;
316
316
  }
317
317
  async function w(u) {
318
- return !u || typeof u != "object" ? null : a("POST", "/update", u);
318
+ return !u || typeof u != "object" ? null : r("POST", "/update", u);
319
319
  }
320
320
  function C(u) {
321
321
  if (!(!u || typeof u != "object"))
@@ -341,8 +341,8 @@ function Ze(e) {
341
341
  createConversation: A,
342
342
  getConversation: q,
343
343
  patchConversation: T,
344
- markConversationRead: U,
345
- listMessages: D,
344
+ markConversationRead: N,
345
+ listMessages: U,
346
346
  postMessage: L,
347
347
  postCallback: W,
348
348
  uploadAttachment: Q,
@@ -443,7 +443,7 @@ function st(e) {
443
443
  Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
444
444
  })
445
445
  );
446
- async function r(h) {
446
+ async function i(h) {
447
447
  try {
448
448
  const m = new Promise(
449
449
  (w, C) => setTimeout(
@@ -466,7 +466,7 @@ function st(e) {
466
466
  console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
467
467
  }
468
468
  }
469
- function i() {
469
+ function a() {
470
470
  for (const h of s)
471
471
  try {
472
472
  h();
@@ -485,18 +485,18 @@ function st(e) {
485
485
  }
486
486
  return t.customer;
487
487
  }
488
- async function a(h = {}) {
488
+ async function r(h = {}) {
489
489
  const m = await e.createConversation(h), _ = t.conversations.findIndex((w) => w.id === m.id);
490
490
  return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
491
491
  }
492
- const o = 50;
492
+ const l = 50;
493
493
  async function f(h) {
494
494
  const m = t.paginationByConv[h];
495
495
  if (!(m != null && m.loaded || m != null && m.loading)) {
496
496
  y(h, { nextCursor: null, loading: !0, loaded: !1 });
497
497
  try {
498
498
  const _ = await e.listMessages(h, {
499
- limit: o
499
+ limit: l
500
500
  }), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], u = /* @__PURE__ */ new Set();
501
501
  for (const p of w)
502
502
  (p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
@@ -517,7 +517,7 @@ function st(e) {
517
517
  }
518
518
  }
519
519
  }
520
- async function b(h) {
520
+ async function k(h) {
521
521
  var C;
522
522
  const m = t.paginationByConv[h];
523
523
  if (!m || m.loading || !m.nextCursor) return;
@@ -527,7 +527,7 @@ function st(e) {
527
527
  try {
528
528
  const u = await e.listMessages(h, {
529
529
  before: w,
530
- limit: o
530
+ limit: l
531
531
  }), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
532
532
  for (const x of p)
533
533
  (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}`);
@@ -630,10 +630,10 @@ function st(e) {
630
630
  console.error("[store] callback failed", w), h != null && delete t.awaitingCallback[h];
631
631
  }
632
632
  }
633
- const U = /* @__PURE__ */ new Map();
634
- async function D(h) {
633
+ const N = /* @__PURE__ */ new Map();
634
+ async function U(h) {
635
635
  if (!h) return null;
636
- const m = U.get(h);
636
+ const m = N.get(h);
637
637
  if (m != null && m.url) {
638
638
  const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
639
639
  if (!_ || _ - Date.now() > 6e4) return m.url;
@@ -641,7 +641,7 @@ function st(e) {
641
641
  try {
642
642
  const _ = await e.signAttachment(h);
643
643
  if (_ != null && _.signed_url)
644
- return U.set(h, {
644
+ return N.set(h, {
645
645
  url: _.signed_url,
646
646
  expires_at: _.expires_at
647
647
  }), _.signed_url;
@@ -775,18 +775,18 @@ function st(e) {
775
775
  }
776
776
  return {
777
777
  state: t,
778
- start: r,
779
- destroy: i,
778
+ start: i,
779
+ destroy: a,
780
780
  applyCustomer: n,
781
- createConversation: a,
781
+ createConversation: r,
782
782
  openConversation: f,
783
- loadMore: b,
783
+ loadMore: k,
784
784
  fetchSinceLast: E,
785
785
  patchConversation: M,
786
786
  markConversationRead: A,
787
787
  send: q,
788
788
  clickCallback: T,
789
- signAttachment: D,
789
+ signAttachment: U,
790
790
  submitFeedback: L,
791
791
  getPendingApproval: W,
792
792
  getActionInFlight: se,
@@ -820,10 +820,10 @@ const H = {
820
820
  "#D97706",
821
821
  "#059669"
822
822
  ];
823
- function Me(e = "") {
823
+ function Te(e = "") {
824
824
  return e ? be[e.charCodeAt(0) % be.length] : be[0];
825
825
  }
826
- function Te(e = "") {
826
+ function Me(e = "") {
827
827
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
828
828
  }
829
829
  function Ce(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
@@ -953,6 +953,8 @@ Je réponds en quelques secondes.`,
953
953
  "composer.recording": "Enregistrement · {time}",
954
954
  "composer.stop": "Arrêter",
955
955
  "composer.conversationEnded": "Cette conversation est terminée.",
956
+ "composer.conversationClosed": "Cette conversation a été fermée.",
957
+ "composer.reopen": "Rouvrir la conversation",
956
958
  "composer.newConversation": "Nouvelle conversation",
957
959
  // ── Message list ─────────────────────────────────────────────────
958
960
  "messageList.loadingHistory": "Chargement de l'historique…",
@@ -1159,55 +1161,55 @@ function ne(e) {
1159
1161
  return Le[xe(e)] || Le[ue];
1160
1162
  }
1161
1163
  function F(e) {
1162
- const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
1163
- return function(n, a) {
1164
- let o = s[n];
1165
- return o == null && (o = r[n]), o == null ? n : (a && (o = o.replace(
1164
+ const t = xe(e), s = ke[t] || ke[ue], i = ke[ue];
1165
+ return function(n, r) {
1166
+ let l = s[n];
1167
+ return l == null && (l = i[n]), l == null ? n : (r && (l = l.replace(
1166
1168
  /\{(\w+)\}/g,
1167
- (f, b) => a[b] != null ? String(a[b]) : f
1168
- )), o);
1169
+ (f, k) => r[k] != null ? String(r[k]) : f
1170
+ )), l);
1169
1171
  };
1170
1172
  }
1171
1173
  function Ie(e, t) {
1172
1174
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1173
- const s = e.options.find((r) => (r == null ? void 0 : r.value) === t);
1175
+ const s = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1174
1176
  return (s == null ? void 0 : s.label) || t;
1175
1177
  }
1176
1178
  function He(e, t, s) {
1177
- return Array.isArray(t) ? t.map((r) => Ie(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
1179
+ return Array.isArray(t) ? t.map((i) => Ie(e, String(i))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
1178
1180
  }
1179
1181
  function ht(e, t, s = F()) {
1180
1182
  if (!e || !t) return "";
1181
- const r = Array.isArray(e.fields) ? e.fields : [], i = [];
1182
- for (const n of r) {
1183
+ const i = Array.isArray(e.fields) ? e.fields : [], a = [];
1184
+ for (const n of i) {
1183
1185
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1184
- const a = t[n.key];
1185
- if (a == null || a === "") continue;
1186
- const o = He(n, a, s);
1187
- o && i.push(`${n.label} :
1188
- ${o}`);
1186
+ const r = t[n.key];
1187
+ if (r == null || r === "") continue;
1188
+ const l = He(n, r, s);
1189
+ l && a.push(`${n.label} :
1190
+ ${l}`);
1189
1191
  }
1190
- return i.join(`
1192
+ return a.join(`
1191
1193
 
1192
1194
  `);
1193
1195
  }
1194
1196
  function mt(e, t, s = F()) {
1195
- const r = [], i = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1196
- for (const n of i) {
1197
+ const i = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1198
+ for (const n of a) {
1197
1199
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1198
- const a = t == null ? void 0 : t[n.key];
1199
- if (a == null || a === "") continue;
1200
- const o = He(n, a, s);
1201
- if (!o) continue;
1202
- const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
1200
+ const r = t == null ? void 0 : t[n.key];
1201
+ if (r == null || r === "") continue;
1202
+ const l = He(n, r, s);
1203
+ if (!l) continue;
1204
+ const f = n.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1203
1205
  `));
1204
- r.push({ label: n.label, value: o, multiline: f });
1206
+ i.push({ label: n.label, value: l, multiline: f });
1205
1207
  }
1206
1208
  return {
1207
1209
  kind: "form_response",
1208
1210
  data: {
1209
1211
  title: (e == null ? void 0 : e.title) || s("form.title"),
1210
- fields: r
1212
+ fields: i
1211
1213
  }
1212
1214
  };
1213
1215
  }
@@ -1221,10 +1223,10 @@ const Ee = "";
1221
1223
  function de(e) {
1222
1224
  let t = e;
1223
1225
  const s = [];
1224
- return t = t.replace(/`([^`\n]+)`/g, (r, i) => {
1226
+ return t = t.replace(/`([^`\n]+)`/g, (i, a) => {
1225
1227
  const n = s.length;
1226
- return s.push(i), `${Ee}CODE${n}${Ee}`;
1227
- }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
1228
+ return s.push(a), `${Ee}CODE${n}${Ee}`;
1229
+ }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, a, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${a}</a>` : a), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, a) => `<code class="wm-md-code">${s[+a]}</code>`), t;
1228
1230
  }
1229
1231
  function qe(e) {
1230
1232
  if (!e) return "";
@@ -1235,44 +1237,44 @@ function ft(e) {
1235
1237
  if (!e) return "";
1236
1238
  const t = ze(e).split(`
1237
1239
  `), s = [];
1238
- let r = 0;
1239
- for (; r < t.length; ) {
1240
- const n = t[r];
1240
+ let i = 0;
1241
+ for (; i < t.length; ) {
1242
+ const n = t[i];
1241
1243
  if (/^\s*```([\w-]*)\s*$/.exec(n)) {
1242
- r++;
1243
- const b = [];
1244
- for (; r < t.length && !/^\s*```\s*$/.test(t[r]); )
1245
- b.push(t[r]), r++;
1246
- r < t.length && r++, s.push({
1244
+ i++;
1245
+ const k = [];
1246
+ for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
1247
+ k.push(t[i]), i++;
1248
+ i < t.length && i++, s.push({
1247
1249
  type: "block",
1248
- html: `<pre class="wm-md-pre"><code>${b.join(`
1250
+ html: `<pre class="wm-md-pre"><code>${k.join(`
1249
1251
  `)}</code></pre>`
1250
1252
  });
1251
1253
  continue;
1252
1254
  }
1253
1255
  if (/^\s*[-*]\s+/.test(n)) {
1254
- const b = [];
1255
- for (; r < t.length; ) {
1256
- const M = /^\s*[-*]\s+(.*)$/.exec(t[r]);
1256
+ const k = [];
1257
+ for (; i < t.length; ) {
1258
+ const M = /^\s*[-*]\s+(.*)$/.exec(t[i]);
1257
1259
  if (!M) break;
1258
- b.push(M[1]), r++;
1260
+ k.push(M[1]), i++;
1259
1261
  }
1260
- const y = b.map((M) => `<li>${de(M)}</li>`).join("");
1262
+ const y = k.map((M) => `<li>${de(M)}</li>`).join("");
1261
1263
  s.push({
1262
1264
  type: "block",
1263
1265
  html: `<ul class="wm-md-ul">${y}</ul>`
1264
1266
  });
1265
1267
  continue;
1266
1268
  }
1267
- const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1268
- if (o) {
1269
- const b = parseInt(o[1], 10), y = [o[2]];
1270
- for (r++; r < t.length; ) {
1271
- const A = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1269
+ const l = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1270
+ if (l) {
1271
+ const k = parseInt(l[1], 10), y = [l[2]];
1272
+ for (i++; i < t.length; ) {
1273
+ const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
1272
1274
  if (!A) break;
1273
- y.push(A[1]), r++;
1275
+ y.push(A[1]), i++;
1274
1276
  }
1275
- const M = y.map((A) => `<li>${de(A)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
1277
+ const M = y.map((A) => `<li>${de(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1276
1278
  s.push({
1277
1279
  type: "block",
1278
1280
  html: `<ol class="wm-md-ol"${E}>${M}</ol>`
@@ -1281,24 +1283,24 @@ function ft(e) {
1281
1283
  }
1282
1284
  const f = /^(#{1,6})\s+(.*)$/.exec(n);
1283
1285
  if (f) {
1284
- const b = f[1].length;
1286
+ const k = f[1].length;
1285
1287
  s.push({
1286
1288
  type: "block",
1287
- html: `<h${b} class="wm-md-h wm-md-h${b}">${de(f[2])}</h${b}>`
1288
- }), r++;
1289
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${de(f[2])}</h${k}>`
1290
+ }), i++;
1289
1291
  continue;
1290
1292
  }
1291
- s.push({ type: "text", html: de(n) }), r++;
1293
+ s.push({ type: "text", html: de(n) }), i++;
1292
1294
  }
1293
- let i = "";
1295
+ let a = "";
1294
1296
  for (let n = 0; n < s.length; n++) {
1295
- const a = s[n];
1296
- i += a.html;
1297
- const o = s[n + 1];
1298
- o && a.type !== "block" && o.type !== "block" && (i += `
1297
+ const r = s[n];
1298
+ a += r.html;
1299
+ const l = s[n + 1];
1300
+ l && r.type !== "block" && l.type !== "block" && (a += `
1299
1301
  `);
1300
1302
  }
1301
- return i;
1303
+ return a;
1302
1304
  }
1303
1305
  function he(e) {
1304
1306
  var s;
@@ -1312,52 +1314,52 @@ function Y(e) {
1312
1314
  }
1313
1315
  function Be(e, t) {
1314
1316
  let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1315
- for (const r of t)
1316
- r != null && r.created_at && r.created_at > s && (s = r.created_at);
1317
+ for (const i of t)
1318
+ i != null && i.created_at && i.created_at > s && (s = i.created_at);
1317
1319
  return s;
1318
1320
  }
1319
1321
  function _t(e, t) {
1320
- var s, r, i;
1322
+ var s, i, a;
1321
1323
  for (let n = t.length - 1; n >= 0; n--) {
1322
- const a = t[n];
1323
- if (!a) continue;
1324
- const o = typeof a.text_md == "string" ? a.text_md.trim() : "";
1325
- if (o)
1326
- return (((s = a.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + o.replace(/\s+/g, " ");
1327
- const f = (r = a.payload) == null ? void 0 : r.attachments;
1324
+ const r = t[n];
1325
+ if (!r) continue;
1326
+ const l = typeof r.text_md == "string" ? r.text_md.trim() : "";
1327
+ if (l)
1328
+ return (((s = r.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1329
+ const f = (i = r.payload) == null ? void 0 : i.attachments;
1328
1330
  if (Array.isArray(f) && f.length) return "📎 Pièce jointe";
1329
1331
  }
1330
- return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
1332
+ return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
1331
1333
  }
1332
1334
  function gt(e, t) {
1333
1335
  return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
1334
1336
  }
1335
- function pt(e, t, s, r) {
1336
- const i = [
1337
+ function pt(e, t, s, i) {
1338
+ const a = [
1337
1339
  `# ${e.name || s("common.conversation")}`,
1338
1340
  e.created_at ? s("export.createdOn", {
1339
- date: new Date(e.created_at).toLocaleString(r)
1341
+ date: new Date(e.created_at).toLocaleString(i)
1340
1342
  }) : "",
1341
1343
  ""
1342
1344
  ];
1343
1345
  for (const n of t) {
1344
1346
  if (!n) continue;
1345
- const a = (n.text_md || "").trim();
1346
- if (!a) continue;
1347
- const o = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1348
- i.push(`[${f}] ${o} :`), i.push(a), i.push("");
1347
+ const r = (n.text_md || "").trim();
1348
+ if (!r) continue;
1349
+ const l = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(i) : "";
1350
+ a.push(`[${f}] ${l} :`), a.push(r), a.push("");
1349
1351
  }
1350
- return i.join(`
1352
+ return a.join(`
1351
1353
  `);
1352
1354
  }
1353
- function vt(e, t, s = F(), r) {
1355
+ function vt(e, t, s = F(), i) {
1354
1356
  if (!e) return;
1355
- const i = pt(e, t || [], s, ne(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1357
+ const a = pt(e, t || [], s, ne(i)), n = new Blob([a], { type: "text/plain;charset=utf-8" });
1356
1358
  try {
1357
- const a = URL.createObjectURL(n), o = document.createElement("a");
1358
- o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
1359
- } catch (a) {
1360
- console.error("[ww-messenger] export failed", a);
1359
+ const r = URL.createObjectURL(n), l = document.createElement("a");
1360
+ l.href = r, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(r), 1e3);
1361
+ } catch (r) {
1362
+ console.error("[ww-messenger] export failed", r);
1361
1363
  }
1362
1364
  }
1363
1365
  const yt = {
@@ -1470,10 +1472,10 @@ const yt = {
1470
1472
  // at message-arrival time because the user may have closed the
1471
1473
  // panel or switched threads during the typing dwell.
1472
1474
  onMessageRevealed(e, t) {
1473
- var i;
1475
+ var a;
1474
1476
  if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !he(e)) return;
1475
1477
  const s = typeof document < "u" && document.hidden;
1476
- this.isOpen && !s && ((i = this.currentConv) == null ? void 0 : i.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1478
+ this.isOpen && !s && ((a = this.currentConv) == null ? void 0 : a.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1477
1479
  },
1478
1480
  playNotificationSound() {
1479
1481
  if (typeof window > "u") return;
@@ -1487,17 +1489,17 @@ const yt = {
1487
1489
  t.resume();
1488
1490
  } catch {
1489
1491
  }
1490
- const s = t.currentTime, r = t.createOscillator(), i = t.createGain();
1491
- r.connect(i), i.connect(t.destination), r.type = "sine", r.frequency.setValueAtTime(880, s), r.frequency.exponentialRampToValueAtTime(1320, s + 0.08), i.gain.setValueAtTime(0, s), i.gain.linearRampToValueAtTime(0.12, s + 0.02), i.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), r.start(s), r.stop(s + 0.32);
1492
+ const s = t.currentTime, i = t.createOscillator(), a = t.createGain();
1493
+ i.connect(a), a.connect(t.destination), i.type = "sine", i.frequency.setValueAtTime(880, s), i.frequency.exponentialRampToValueAtTime(1320, s + 0.08), a.gain.setValueAtTime(0, s), a.gain.linearRampToValueAtTime(0.12, s + 0.02), a.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), i.start(s), i.stop(s + 0.32);
1492
1494
  } catch {
1493
1495
  }
1494
1496
  },
1495
1497
  showBrowserNotification(e, t) {
1496
1498
  if (typeof Notification > "u" || Notification.permission !== "granted") return;
1497
- const s = t == null ? void 0 : t.author, r = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", o = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
1499
+ const s = t == null ? void 0 : t.author, i = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), r = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = r ? r.slice(0, 140) : this.t("notification.youHaveNewMessage");
1498
1500
  try {
1499
1501
  const f = new Notification(n, {
1500
- body: o,
1502
+ body: l,
1501
1503
  tag: `wm-${e}`,
1502
1504
  renotify: !1,
1503
1505
  silent: !0
@@ -1596,26 +1598,26 @@ const yt = {
1596
1598
  // the activity isn't replayed via SSE, so we fetch it explicitly and
1597
1599
  // run it through pacing.
1598
1600
  setupLiveReveal() {
1599
- var s, r;
1601
+ var s, i;
1600
1602
  if (!this.transport) return;
1601
1603
  this.teardownLiveReveal();
1602
- const e = this.transport.on("message", (i) => {
1603
- const n = i == null ? void 0 : i.conversation_id, a = i == null ? void 0 : i.message;
1604
- n && a && this.paceLiveMessage(a, n);
1604
+ const e = this.transport.on("message", (a) => {
1605
+ const n = a == null ? void 0 : a.conversation_id, r = a == null ? void 0 : a.message;
1606
+ n && r && this.paceLiveMessage(r, n);
1605
1607
  });
1606
1608
  this._liveRevealConvSnapshot = new Map(
1607
- (((s = this.s) == null ? void 0 : s.conversations) || []).map((i) => [
1608
- i.id,
1609
- (i == null ? void 0 : i.last_message_at) || ""
1609
+ (((s = this.s) == null ? void 0 : s.conversations) || []).map((a) => [
1610
+ a.id,
1611
+ (a == null ? void 0 : a.last_message_at) || ""
1610
1612
  ])
1611
1613
  ), this._liveHwm = Object.fromEntries(
1612
- (((r = this.s) == null ? void 0 : r.conversations) || []).map((i) => [
1613
- i.id,
1614
- (i == null ? void 0 : i.last_message_at) || ""
1614
+ (((i = this.s) == null ? void 0 : i.conversations) || []).map((a) => [
1615
+ a.id,
1616
+ (a == null ? void 0 : a.last_message_at) || ""
1615
1617
  ])
1616
1618
  );
1617
- const t = this.transport.on("activity", (i) => {
1618
- this.handleLiveActivity(i);
1619
+ const t = this.transport.on("activity", (a) => {
1620
+ this.handleLiveActivity(a);
1619
1621
  });
1620
1622
  this._liveRevealOff = () => {
1621
1623
  try {
@@ -1645,29 +1647,29 @@ const yt = {
1645
1647
  // on background convs when SSE wasn't open at the moment they
1646
1648
  // arrived.
1647
1649
  async handleLiveActivity(e) {
1648
- var i, n;
1650
+ var a, n;
1649
1651
  const t = e == null ? void 0 : e.conversations;
1650
1652
  if (!Array.isArray(t) || !this.store) return;
1651
- const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), r = [];
1652
- for (const a of t) {
1653
- if (!(a != null && a.id)) continue;
1654
- const o = a.last_message_at || "";
1655
- if (!o) continue;
1656
- const f = s.get(a.id) || "";
1657
- o > f && r.push(a.id);
1653
+ const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
1654
+ for (const r of t) {
1655
+ if (!(r != null && r.id)) continue;
1656
+ const l = r.last_message_at || "";
1657
+ if (!l) continue;
1658
+ const f = s.get(r.id) || "";
1659
+ l > f && i.push(r.id);
1658
1660
  }
1659
1661
  this._liveRevealConvSnapshot = new Map(
1660
- t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
1662
+ t.map((r) => [r.id, (r == null ? void 0 : r.last_message_at) || ""])
1661
1663
  );
1662
- for (const a of r)
1664
+ for (const r of i)
1663
1665
  try {
1664
- const o = await ((n = (i = this.store).fetchSinceLast) == null ? void 0 : n.call(i, a));
1665
- if (!Array.isArray(o)) continue;
1666
- for (const f of o) this.paceLiveMessage(f, a);
1667
- } catch (o) {
1666
+ const l = await ((n = (a = this.store).fetchSinceLast) == null ? void 0 : n.call(a, r));
1667
+ if (!Array.isArray(l)) continue;
1668
+ for (const f of l) this.paceLiveMessage(f, r);
1669
+ } catch (l) {
1668
1670
  console.error(
1669
1671
  "[ww-messenger] activity delta fetch failed",
1670
- o
1672
+ l
1671
1673
  );
1672
1674
  }
1673
1675
  },
@@ -1677,16 +1679,16 @@ const yt = {
1677
1679
  // - inter-bubble gap scales with message length (reading time),
1678
1680
  // bounded by MIN/MAX_TYPING_MS.
1679
1681
  scheduleReveal(e, t) {
1680
- const s = this.revealPacing, r = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
1682
+ const s = this.revealPacing, i = Date.now(), a = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
1681
1683
  s.maxTypingMs,
1682
- Math.max(s.minTypingMs, i * s.msPerChar)
1683
- ), o = Math.max(
1684
- r + s.firstRevealDelayMs,
1684
+ Math.max(s.minTypingMs, a * s.msPerChar)
1685
+ ), l = Math.max(
1686
+ i + s.firstRevealDelayMs,
1685
1687
  this.nextRevealAt + s.pauseBetweenMs
1686
1688
  ) + n;
1687
- this.nextRevealAt = o;
1688
- const f = Math.max(0, o - r), b = e.id, y = setTimeout(() => {
1689
- this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1689
+ this.nextRevealAt = l;
1690
+ const f = Math.max(0, l - i), k = e.id, y = setTimeout(() => {
1691
+ this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1690
1692
  }, f);
1691
1693
  this.revealTimers.push(y);
1692
1694
  },
@@ -1696,28 +1698,28 @@ const yt = {
1696
1698
  // history (instant) and any live message that the transport
1697
1699
  // subscription already paced (idempotent on msg.id).
1698
1700
  paceMessages(e, t) {
1699
- var i;
1701
+ var a;
1700
1702
  if (!Array.isArray(e) || !e.length) return;
1701
- const s = Date.now(), r = { ...this.revealedAt };
1703
+ const s = Date.now(), i = { ...this.revealedAt };
1702
1704
  for (const n of e) {
1703
- if ((n == null ? void 0 : n.id) == null || r[n.id] !== void 0) continue;
1705
+ if ((n == null ? void 0 : n.id) == null || i[n.id] !== void 0) continue;
1704
1706
  if (!he(n)) {
1705
- r[n.id] = s;
1707
+ i[n.id] = s;
1706
1708
  continue;
1707
1709
  }
1708
- const a = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
1709
- if (!Number.isFinite(a) || a < this.convOpenedAt) {
1710
- r[n.id] = s;
1710
+ const r = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
1711
+ if (!Number.isFinite(r) || r < this.convOpenedAt) {
1712
+ i[n.id] = s;
1711
1713
  continue;
1712
1714
  }
1713
- const o = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((i = n == null ? void 0 : n.payload) == null ? void 0 : i.attachments) && n.payload.attachments.length > 0;
1714
- if (!o && !f) {
1715
- r[n.id] = s;
1715
+ const l = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((a = n == null ? void 0 : n.payload) == null ? void 0 : a.attachments) && n.payload.attachments.length > 0;
1716
+ if (!l && !f) {
1717
+ i[n.id] = s;
1716
1718
  continue;
1717
1719
  }
1718
- r[n.id] = 0, this.scheduleReveal(n, t);
1720
+ i[n.id] = 0, this.scheduleReveal(n, t);
1719
1721
  }
1720
- this.revealedAt = r;
1722
+ this.revealedAt = i;
1721
1723
  },
1722
1724
  // Pace a single live message from any conversation. Called from the
1723
1725
  // transport 'message' subscription (live SSE arrival) and from the
@@ -1735,19 +1737,19 @@ const yt = {
1735
1737
  // silently. Both sides of the comparison are server timestamps, so
1736
1738
  // this is immune to client clock skew.
1737
1739
  paceLiveMessage(e, t) {
1738
- var o;
1740
+ var l;
1739
1741
  if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
1740
1742
  if (!he(e)) {
1741
1743
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1742
1744
  return;
1743
1745
  }
1744
- const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, r = Array.isArray((o = e == null ? void 0 : e.payload) == null ? void 0 : o.attachments) && e.payload.attachments.length > 0;
1745
- if (!s && !r) {
1746
+ const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, i = Array.isArray((l = e == null ? void 0 : e.payload) == null ? void 0 : l.attachments) && e.payload.attachments.length > 0;
1747
+ if (!s && !i) {
1746
1748
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1747
1749
  return;
1748
1750
  }
1749
- const i = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
1750
- if (n && (i === void 0 || n > i) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(i !== void 0 && n && n > i)) {
1751
+ const a = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
1752
+ if (n && (a === void 0 || n > a) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(a !== void 0 && n && n > a)) {
1751
1753
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1752
1754
  return;
1753
1755
  }
@@ -1813,16 +1815,16 @@ const yt = {
1813
1815
  // messages, or when the pointer is already at/ahead of the
1814
1816
  // candidate id.
1815
1817
  markConvRead(e) {
1816
- var n, a;
1818
+ var n, r;
1817
1819
  if (!(e != null && e.id) || e._draft || !this.store) return;
1818
- const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = At(t);
1820
+ const t = ((r = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : r[e.id]) || [], s = At(t);
1819
1821
  if (s == null) return;
1820
- const r = Y(e.last_read_message_id), i = Y(s);
1821
- i != null && (r != null && i <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1822
- const o = this._readMarkerPending;
1823
- this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
1824
- o.convId,
1825
- o.messageId
1822
+ const i = Y(e.last_read_message_id), a = Y(s);
1823
+ a != null && (i != null && a <= i || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1824
+ const l = this._readMarkerPending;
1825
+ this._readMarkerPending = null, this._readMarkerTimer = null, l && this.store && this.store.markConversationRead(
1826
+ l.convId,
1827
+ l.messageId
1826
1828
  );
1827
1829
  }, kt))));
1828
1830
  }
@@ -1836,10 +1838,10 @@ function At(e) {
1836
1838
  }
1837
1839
  return null;
1838
1840
  }
1839
- const N = (e, t) => {
1841
+ const P = (e, t) => {
1840
1842
  const s = e.__vccOpts || e;
1841
- for (const [r, i] of t)
1842
- s[r] = i;
1843
+ for (const [i, a] of t)
1844
+ s[i] = a;
1843
1845
  return s;
1844
1846
  }, St = {
1845
1847
  name: "WmHumanAvatar",
@@ -1855,14 +1857,14 @@ const N = (e, t) => {
1855
1857
  },
1856
1858
  computed: {
1857
1859
  bg() {
1858
- return this.avatarUrl ? "transparent" : Me(this.name);
1860
+ return this.avatarUrl ? "transparent" : Te(this.name);
1859
1861
  },
1860
1862
  initials() {
1861
- return Te(this.name);
1863
+ return Me(this.name);
1862
1864
  }
1863
1865
  }
1864
- }, Mt = ["src", "alt"];
1865
- function Tt(e, t, s, r, i, n) {
1866
+ }, Tt = ["src", "alt"];
1867
+ function Mt(e, t, s, i, a, n) {
1866
1868
  return c(), d("div", {
1867
1869
  class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
1868
1870
  style: z({
@@ -1876,13 +1878,13 @@ function Tt(e, t, s, r, i, n) {
1876
1878
  key: 0,
1877
1879
  src: s.avatarUrl,
1878
1880
  alt: s.name || ""
1879
- }, null, 8, Mt)) : (c(), d("span", {
1881
+ }, null, 8, Tt)) : (c(), d("span", {
1880
1882
  key: 1,
1881
1883
  style: z({ fontSize: s.size * 0.36 + "px" })
1882
1884
  }, v(n.initials), 5))
1883
1885
  ], 6);
1884
1886
  }
1885
- const ve = /* @__PURE__ */ N(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1887
+ const ve = /* @__PURE__ */ P(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1886
1888
  name: "WmLauncher",
1887
1889
  components: { HumanAvatar: ve },
1888
1890
  inject: {
@@ -1908,24 +1910,24 @@ const ve = /* @__PURE__ */ N(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
1908
1910
  return this.peeks.slice(0, xt).reverse();
1909
1911
  }
1910
1912
  }
1911
- }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Nt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Dt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1912
- function zt(e, t, s, r, i, n) {
1913
- const a = B("HumanAvatar");
1913
+ }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Nt = { class: "wm-peek__action" }, Ut = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1914
+ function zt(e, t, s, i, a, n) {
1915
+ const r = B("HumanAvatar");
1914
1916
  return c(), d("div", {
1915
1917
  class: "wm-launcherWrap",
1916
- onMouseenter: t[1] || (t[1] = (o) => e.$emit("hover", !0)),
1917
- onMouseleave: t[2] || (t[2] = (o) => e.$emit("hover", !1)),
1918
- onFocusin: t[3] || (t[3] = (o) => e.$emit("hover", !0)),
1919
- onFocusout: t[4] || (t[4] = (o) => e.$emit("hover", !1))
1918
+ onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
1919
+ onMouseleave: t[2] || (t[2] = (l) => e.$emit("hover", !1)),
1920
+ onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1921
+ onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1920
1922
  }, [
1921
- K(De, { name: "wm-peek" }, {
1923
+ K(Ue, { name: "wm-peek" }, {
1922
1924
  default: je(() => [
1923
1925
  n.visiblePeeks.length ? (c(), d("div", {
1924
1926
  key: 0,
1925
1927
  class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1926
1928
  }, [
1927
- (c(!0), d(I, null, j(n.visiblePeeks, (o, f) => (c(), d("div", {
1928
- key: o.convId,
1929
+ (c(!0), d(I, null, j(n.visiblePeeks, (l, f) => (c(), d("div", {
1930
+ key: l.convId,
1929
1931
  class: "wm-peek",
1930
1932
  style: z({
1931
1933
  "--depth": n.visiblePeeks.length - 1 - f,
@@ -1934,21 +1936,21 @@ function zt(e, t, s, r, i, n) {
1934
1936
  role: "button",
1935
1937
  tabindex: "0",
1936
1938
  "aria-label": n.t("launcher.openConversationWith", {
1937
- name: o.senderName || n.t("launcher.theAgent")
1939
+ name: l.senderName || n.t("launcher.theAgent")
1938
1940
  }),
1939
- onClick: (b) => e.$emit("open", o.convId),
1941
+ onClick: (k) => e.$emit("open", l.convId),
1940
1942
  onKeydown: [
1941
- ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
1942
- ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
1943
+ ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1944
+ ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1943
1945
  ]
1944
1946
  }, [
1945
- l("button", {
1947
+ o("button", {
1946
1948
  type: "button",
1947
1949
  class: "wm-peek__close",
1948
1950
  "aria-label": n.t("launcher.dismiss"),
1949
- onClick: J((b) => e.$emit("dismiss", o.convId), ["stop"])
1951
+ onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
1950
1952
  }, [...t[5] || (t[5] = [
1951
- l("svg", {
1953
+ o("svg", {
1952
1954
  width: "9",
1953
1955
  height: "9",
1954
1956
  viewBox: "0 0 24 24",
@@ -1959,45 +1961,45 @@ function zt(e, t, s, r, i, n) {
1959
1961
  "stroke-linejoin": "round",
1960
1962
  "aria-hidden": "true"
1961
1963
  }, [
1962
- l("path", { d: "M18 6L6 18M6 6l12 12" })
1964
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
1963
1965
  ], -1)
1964
1966
  ])], 8, Lt),
1965
- l("div", It, [
1966
- K(a, {
1967
- name: o.senderName,
1968
- "avatar-url": o.senderAvatarUrl,
1967
+ o("div", It, [
1968
+ K(r, {
1969
+ name: l.senderName,
1970
+ "avatar-url": l.senderAvatarUrl,
1969
1971
  size: 34
1970
1972
  }, null, 8, ["name", "avatar-url"]),
1971
- o.count > 1 ? (c(), d("span", {
1973
+ l.count > 1 ? (c(), d("span", {
1972
1974
  key: 0,
1973
1975
  class: "wm-peek__avatarBadge",
1974
- "aria-label": n.t("launcher.unreadMessages", { count: o.count })
1975
- }, v(o.count > 9 ? "9+" : o.count), 9, Et)) : k("", !0)
1976
+ "aria-label": n.t("launcher.unreadMessages", { count: l.count })
1977
+ }, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
1976
1978
  ]),
1977
- l("div", Bt, [
1978
- l("div", Pt, [
1979
- l("span", Nt, v(o.senderName || n.t("common.agent")), 1),
1980
- l("span", Ut, v(n.t("launcher.repliedToYou")), 1)
1979
+ o("div", Bt, [
1980
+ o("div", Pt, [
1981
+ o("span", Dt, v(l.senderName || n.t("common.agent")), 1),
1982
+ o("span", Nt, v(n.t("launcher.repliedToYou")), 1)
1981
1983
  ]),
1982
- l("p", Dt, v(o.preview), 1)
1984
+ o("p", Ut, v(l.preview), 1)
1983
1985
  ]),
1984
- l("button", {
1986
+ o("button", {
1985
1987
  type: "button",
1986
1988
  class: "wm-peek__open",
1987
- onClick: J((b) => e.$emit("open", o.convId), ["stop"])
1989
+ onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1988
1990
  }, v(n.t("common.open")), 9, jt)
1989
1991
  ], 44, Rt))), 128))
1990
- ], 2)) : k("", !0)
1992
+ ], 2)) : b("", !0)
1991
1993
  ]),
1992
1994
  _: 1
1993
1995
  }),
1994
- l("button", {
1996
+ o("button", {
1995
1997
  type: "button",
1996
1998
  class: "wm-launcher",
1997
1999
  "aria-label": n.t("launcher.open"),
1998
- onClick: t[0] || (t[0] = (o) => e.$emit("open"))
2000
+ onClick: t[0] || (t[0] = (l) => e.$emit("open"))
1999
2001
  }, [
2000
- t[6] || (t[6] = l("svg", {
2002
+ t[6] || (t[6] = o("svg", {
2001
2003
  width: "20",
2002
2004
  height: "20",
2003
2005
  viewBox: "0 0 24 24",
@@ -2008,7 +2010,7 @@ function zt(e, t, s, r, i, n) {
2008
2010
  "stroke-linejoin": "round",
2009
2011
  "aria-hidden": "true"
2010
2012
  }, [
2011
- l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2013
+ o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2012
2014
  ], -1)),
2013
2015
  s.unreadCount > 0 ? (c(), d("span", {
2014
2016
  key: 0,
@@ -2018,11 +2020,11 @@ function zt(e, t, s, r, i, n) {
2018
2020
  }) : n.t("launcher.unreadConversationsOne", {
2019
2021
  count: s.unreadCount
2020
2022
  })
2021
- }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : k("", !0)
2023
+ }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : b("", !0)
2022
2024
  ], 8, Ft)
2023
2025
  ], 32);
2024
2026
  }
2025
- const qt = /* @__PURE__ */ N(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2027
+ const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2026
2028
  name: "WmAIAvatar",
2027
2029
  props: {
2028
2030
  size: { type: Number, default: 26 },
@@ -2045,17 +2047,17 @@ const qt = /* @__PURE__ */ N(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
2045
2047
  },
2046
2048
  computed: {
2047
2049
  initials() {
2048
- return Te(this.name);
2050
+ return Me(this.name);
2049
2051
  },
2050
2052
  bgColor() {
2051
- return Me(this.name);
2053
+ return Te(this.name);
2052
2054
  }
2053
2055
  }
2054
2056
  }, Kt = {
2055
2057
  key: 0,
2056
2058
  class: "wm-aiav__pulse"
2057
2059
  }, Wt = ["src", "alt"], $t = ["width", "height"];
2058
- function Gt(e, t, s, r, i, n) {
2060
+ function Gt(e, t, s, i, a, n) {
2059
2061
  return c(), d("div", {
2060
2062
  class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2061
2063
  style: z({
@@ -2064,8 +2066,8 @@ function Gt(e, t, s, r, i, n) {
2064
2066
  "--wm-avr": s.size * 0.32 + "px"
2065
2067
  })
2066
2068
  }, [
2067
- s.pulse ? (c(), d("div", Kt)) : k("", !0),
2068
- l("div", {
2069
+ s.pulse ? (c(), d("div", Kt)) : b("", !0),
2070
+ o("div", {
2069
2071
  class: R(["wm-aiav__inner", {
2070
2072
  "wm-aiav__inner--glow": s.pulse,
2071
2073
  "wm-aiav__inner--img": !!s.imageUrl,
@@ -2090,19 +2092,19 @@ function Gt(e, t, s, r, i, n) {
2090
2092
  fill: "none",
2091
2093
  "aria-hidden": "true"
2092
2094
  }, [...t[0] || (t[0] = [
2093
- l("path", {
2095
+ o("path", {
2094
2096
  d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
2095
2097
  fill: "white",
2096
2098
  opacity: "0.92"
2097
2099
  }, null, -1),
2098
- l("circle", {
2100
+ o("circle", {
2099
2101
  cx: "19",
2100
2102
  cy: "5",
2101
2103
  r: "1.5",
2102
2104
  fill: "white",
2103
2105
  opacity: "0.55"
2104
2106
  }, null, -1),
2105
- l("circle", {
2107
+ o("circle", {
2106
2108
  cx: "5",
2107
2109
  cy: "18",
2108
2110
  r: "1",
@@ -2113,7 +2115,7 @@ function Gt(e, t, s, r, i, n) {
2113
2115
  ], 6)
2114
2116
  ], 6);
2115
2117
  }
2116
- const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2118
+ const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2117
2119
  name: "WmTeamAvatars",
2118
2120
  props: {
2119
2121
  members: { type: Array, default: () => [] },
@@ -2129,10 +2131,10 @@ const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
2129
2131
  },
2130
2132
  methods: {
2131
2133
  colorFor(e) {
2132
- return e.avatar_url ? "transparent" : Me(e.name || "");
2134
+ return e.avatar_url ? "transparent" : Te(e.name || "");
2133
2135
  },
2134
2136
  initialsFor(e) {
2135
- return Te(e.name || "");
2137
+ return Me(e.name || "");
2136
2138
  }
2137
2139
  }
2138
2140
  }, Jt = {
@@ -2142,32 +2144,32 @@ const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
2142
2144
  key: 0,
2143
2145
  class: "wm-team__label"
2144
2146
  };
2145
- function en(e, t, s, r, i, n) {
2147
+ function en(e, t, s, i, a, n) {
2146
2148
  return n.visible ? (c(), d("div", Jt, [
2147
- l("div", {
2149
+ o("div", {
2148
2150
  class: "wm-team__stack",
2149
2151
  style: z({ width: n.stackWidth + "px" })
2150
2152
  }, [
2151
- (c(!0), d(I, null, j(s.members.slice(0, 3), (a, o) => (c(), d("div", {
2152
- key: o,
2153
+ (c(!0), d(I, null, j(s.members.slice(0, 3), (r, l) => (c(), d("div", {
2154
+ key: l,
2153
2155
  class: "wm-team__pill",
2154
2156
  style: z({
2155
- left: o * 13 + "px",
2156
- zIndex: 3 - o,
2157
- background: n.colorFor(a)
2157
+ left: l * 13 + "px",
2158
+ zIndex: 3 - l,
2159
+ background: n.colorFor(r)
2158
2160
  })
2159
2161
  }, [
2160
- a.avatar_url ? (c(), d("img", {
2162
+ r.avatar_url ? (c(), d("img", {
2161
2163
  key: 0,
2162
- src: a.avatar_url,
2163
- alt: a.name || ""
2164
- }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(a)), 1))
2164
+ src: r.avatar_url,
2165
+ alt: r.name || ""
2166
+ }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(r)), 1))
2165
2167
  ], 4))), 128))
2166
2168
  ], 4),
2167
- s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : k("", !0)
2168
- ])) : k("", !0);
2169
+ s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : b("", !0)
2170
+ ])) : b("", !0);
2169
2171
  }
2170
- const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2172
+ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2171
2173
  name: "WmHeader",
2172
2174
  components: { AIAvatar: oe, TeamAvatars: tn },
2173
2175
  inject: {
@@ -2201,8 +2203,8 @@ const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2201
2203
  const e = Array.isArray(this.teamMembers) ? this.teamMembers : [];
2202
2204
  if (e.length <= 3) return e;
2203
2205
  const t = (/* @__PURE__ */ new Date()).getHours() % e.length, s = [];
2204
- for (let r = 0; r < 3; r++)
2205
- s.push(e[(t + r) % e.length]);
2206
+ for (let i = 0; i < 3; i++)
2207
+ s.push(e[(t + i) % e.length]);
2206
2208
  return s;
2207
2209
  }
2208
2210
  }
@@ -2213,8 +2215,8 @@ const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2213
2215
  key: 3,
2214
2216
  class: "wm-header__fill"
2215
2217
  }, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
2216
- function fn(e, t, s, r, i, n) {
2217
- const a = B("AIAvatar"), o = B("TeamAvatars");
2218
+ function fn(e, t, s, i, a, n) {
2219
+ const r = B("AIAvatar"), l = B("TeamAvatars");
2218
2220
  return c(), d("div", sn, [
2219
2221
  s.showBack ? (c(), d("button", {
2220
2222
  key: 0,
@@ -2223,7 +2225,7 @@ function fn(e, t, s, r, i, n) {
2223
2225
  "aria-label": n.t("header.backToHome"),
2224
2226
  onClick: t[0] || (t[0] = (f) => e.$emit("back"))
2225
2227
  }, [...t[3] || (t[3] = [
2226
- l("svg", {
2228
+ o("svg", {
2227
2229
  width: "13",
2228
2230
  height: "13",
2229
2231
  viewBox: "0 0 24 24",
@@ -2234,27 +2236,27 @@ function fn(e, t, s, r, i, n) {
2234
2236
  "stroke-linejoin": "round",
2235
2237
  "aria-hidden": "true"
2236
2238
  }, [
2237
- l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2239
+ o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2238
2240
  ], -1)
2239
2241
  ])], 8, rn)) : (c(), d("div", an)),
2240
2242
  s.showIdentity ? (c(), d(I, { key: 2 }, [
2241
- l("div", on, [
2242
- K(a, {
2243
+ o("div", on, [
2244
+ K(r, {
2243
2245
  size: 30,
2244
2246
  name: s.agentName,
2245
2247
  "image-url": s.agentAvatarUrl
2246
2248
  }, null, 8, ["name", "image-url"])
2247
2249
  ]),
2248
- l("div", ln, [
2249
- l("div", cn, v(s.title), 1)
2250
+ o("div", ln, [
2251
+ o("div", cn, v(s.title), 1)
2250
2252
  ]),
2251
- n.hasTeam ? (c(), P(o, {
2253
+ n.hasTeam ? (c(), D(l, {
2252
2254
  key: 0,
2253
2255
  members: n.displayedTeamMembers,
2254
2256
  "response-label": ""
2255
- }, null, 8, ["members"])) : k("", !0)
2257
+ }, null, 8, ["members"])) : b("", !0)
2256
2258
  ], 64)) : (c(), d("div", dn)),
2257
- l("div", un, [
2259
+ o("div", un, [
2258
2260
  s.showMore ? (c(), d("button", {
2259
2261
  key: 0,
2260
2262
  type: "button",
@@ -2263,30 +2265,30 @@ function fn(e, t, s, r, i, n) {
2263
2265
  title: n.t("header.moreOptions"),
2264
2266
  onClick: t[1] || (t[1] = (f) => e.$emit("more"))
2265
2267
  }, [...t[4] || (t[4] = [
2266
- l("svg", {
2268
+ o("svg", {
2267
2269
  width: "13",
2268
2270
  height: "13",
2269
2271
  viewBox: "0 0 24 24",
2270
2272
  fill: "currentColor",
2271
2273
  "aria-hidden": "true"
2272
2274
  }, [
2273
- l("circle", {
2275
+ o("circle", {
2274
2276
  cx: "12",
2275
2277
  cy: "5",
2276
2278
  r: "1.6"
2277
2279
  }),
2278
- l("circle", {
2280
+ o("circle", {
2279
2281
  cx: "12",
2280
2282
  cy: "12",
2281
2283
  r: "1.6"
2282
2284
  }),
2283
- l("circle", {
2285
+ o("circle", {
2284
2286
  cx: "12",
2285
2287
  cy: "19",
2286
2288
  r: "1.6"
2287
2289
  })
2288
2290
  ], -1)
2289
- ])], 10, hn)) : k("", !0),
2291
+ ])], 10, hn)) : b("", !0),
2290
2292
  s.showClose ? (c(), d("button", {
2291
2293
  key: 1,
2292
2294
  type: "button",
@@ -2295,7 +2297,7 @@ function fn(e, t, s, r, i, n) {
2295
2297
  title: n.t("header.closeWidget"),
2296
2298
  onClick: t[2] || (t[2] = (f) => e.$emit("close"))
2297
2299
  }, [...t[5] || (t[5] = [
2298
- l("svg", {
2300
+ o("svg", {
2299
2301
  width: "13",
2300
2302
  height: "13",
2301
2303
  viewBox: "0 0 24 24",
@@ -2306,13 +2308,13 @@ function fn(e, t, s, r, i, n) {
2306
2308
  "stroke-linejoin": "round",
2307
2309
  "aria-hidden": "true"
2308
2310
  }, [
2309
- l("path", { d: "M18 6L6 18M6 6l12 12" })
2311
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
2310
2312
  ], -1)
2311
- ])], 8, mn)) : k("", !0)
2313
+ ])], 8, mn)) : b("", !0)
2312
2314
  ])
2313
2315
  ]);
2314
2316
  }
2315
- const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2317
+ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2316
2318
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
2317
2319
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
2318
2320
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2418,15 +2420,15 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2418
2420
  if (!e) return "";
2419
2421
  const t = new Date(e);
2420
2422
  if (Number.isNaN(t.getTime())) return "";
2421
- const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2422
- if (t.toDateString() === r.toDateString())
2423
+ const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2424
+ if (t.toDateString() === i.toDateString())
2423
2425
  return t.toLocaleTimeString(s, {
2424
2426
  hour: "2-digit",
2425
2427
  minute: "2-digit"
2426
2428
  });
2427
- if (r.getTime() - t.getTime() < 7 * 864e5) {
2428
- const a = t.toLocaleDateString(s, { weekday: "short" });
2429
- return a.charAt(0).toUpperCase() + a.slice(1);
2429
+ if (i.getTime() - t.getTime() < 7 * 864e5) {
2430
+ const r = t.toLocaleDateString(s, { weekday: "short" });
2431
+ return r.charAt(0).toUpperCase() + r.slice(1);
2430
2432
  }
2431
2433
  return t.toLocaleDateString(s, {
2432
2434
  day: "2-digit",
@@ -2440,13 +2442,13 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2440
2442
  }, Cn = ["onClick"], An = {
2441
2443
  key: 0,
2442
2444
  class: "wm-onb__defaultAvatar"
2443
- }, Sn = ["aria-label"], Mn = { class: "wm-onb__alert-body" }, Tn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
2445
+ }, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
2444
2446
  key: 0,
2445
2447
  class: "wm-onb__alert-sender"
2446
2448
  }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
2447
2449
  key: 0,
2448
2450
  class: "wm-onb__alert-time"
2449
- }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Nn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Dn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2451
+ }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Nn = ["onClick"], Un = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2450
2452
  key: 1,
2451
2453
  width: "18",
2452
2454
  height: "18",
@@ -2480,11 +2482,11 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2480
2482
  "stroke-linejoin": "round",
2481
2483
  "aria-hidden": "true"
2482
2484
  }, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
2483
- function Yn(e, t, s, r, i, n) {
2484
- const a = B("AIAvatar");
2485
+ function Yn(e, t, s, i, a, n) {
2486
+ const r = B("AIAvatar");
2485
2487
  return c(), d("div", pn, [
2486
- l("div", vn, [
2487
- t[2] || (t[2] = l("svg", {
2488
+ o("div", vn, [
2489
+ t[2] || (t[2] = o("svg", {
2488
2490
  class: "wm-onb__hero-deco",
2489
2491
  width: "180",
2490
2492
  height: "180",
@@ -2492,7 +2494,7 @@ function Yn(e, t, s, r, i, n) {
2492
2494
  fill: "none",
2493
2495
  "aria-hidden": "true"
2494
2496
  }, [
2495
- l("circle", {
2497
+ o("circle", {
2496
2498
  cx: "170",
2497
2499
  cy: "10",
2498
2500
  r: "105",
@@ -2501,7 +2503,7 @@ function Yn(e, t, s, r, i, n) {
2501
2503
  "stroke-dasharray": "1 5",
2502
2504
  opacity: "0.35"
2503
2505
  }),
2504
- l("circle", {
2506
+ o("circle", {
2505
2507
  cx: "170",
2506
2508
  cy: "10",
2507
2509
  r: "72",
@@ -2510,7 +2512,7 @@ function Yn(e, t, s, r, i, n) {
2510
2512
  "stroke-dasharray": "1 5",
2511
2513
  opacity: "0.5"
2512
2514
  }),
2513
- l("circle", {
2515
+ o("circle", {
2514
2516
  cx: "152",
2515
2517
  cy: "34",
2516
2518
  r: "2.5",
@@ -2518,27 +2520,27 @@ function Yn(e, t, s, r, i, n) {
2518
2520
  opacity: "0.65"
2519
2521
  })
2520
2522
  ], -1)),
2521
- K(a, {
2523
+ K(r, {
2522
2524
  size: 52,
2523
2525
  "image-url": s.defaultIconUrl
2524
2526
  }, null, 8, ["image-url"]),
2525
- l("div", yn, [
2526
- l("div", wn, v(n.heroTitle), 1),
2527
- l("div", bn, v(n.heroSub), 1)
2527
+ o("div", yn, [
2528
+ o("div", wn, v(n.heroTitle), 1),
2529
+ o("div", bn, v(n.heroSub), 1)
2528
2530
  ])
2529
2531
  ]),
2530
2532
  n.unreadThreads.length ? (c(), d("div", kn, [
2531
- (c(!0), d(I, null, j(n.unreadThreads, (o) => (c(), d("button", {
2532
- key: o.id,
2533
+ (c(!0), d(I, null, j(n.unreadThreads, (l) => (c(), d("button", {
2534
+ key: l.id,
2533
2535
  type: "button",
2534
2536
  class: "wm-onb__alert",
2535
- onClick: (f) => e.$emit("resume", o)
2537
+ onClick: (f) => e.$emit("resume", l)
2536
2538
  }, [
2537
- l("span", {
2538
- class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2539
+ o("span", {
2540
+ class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(l)])
2539
2541
  }, [
2540
- n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
2541
- l("svg", {
2542
+ n.isDefaultAvatar(l) ? (c(), d("span", An, [...t[3] || (t[3] = [
2543
+ o("svg", {
2542
2544
  width: "20",
2543
2545
  height: "20",
2544
2546
  viewBox: "0 0 24 24",
@@ -2549,41 +2551,41 @@ function Yn(e, t, s, r, i, n) {
2549
2551
  "stroke-linejoin": "round",
2550
2552
  "aria-hidden": "true"
2551
2553
  }, [
2552
- l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2554
+ o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2553
2555
  ], -1)
2554
- ])])) : (c(), P(Ae(n.avatarComponent(o)), Fe({
2556
+ ])])) : (c(), D(Ae(n.avatarComponent(l)), Fe({
2555
2557
  key: 1,
2556
2558
  ref_for: !0
2557
- }, n.avatarProps(o)), null, 16)),
2558
- l("span", {
2559
+ }, n.avatarProps(l)), null, 16)),
2560
+ o("span", {
2559
2561
  class: "wm-onb__alert-dot",
2560
2562
  "aria-label": n.t("onboarding.unread")
2561
2563
  }, null, 8, Sn)
2562
2564
  ], 2),
2563
- l("span", Mn, [
2564
- l("span", Tn, v(o.title), 1),
2565
- l("span", xn, [
2566
- n.senderLabel(o) ? (c(), d("span", On, v(n.senderLabel(o)) + " · ", 1)) : k("", !0),
2567
- l("span", {
2568
- innerHTML: n.renderPreview(o.preview)
2565
+ o("span", Tn, [
2566
+ o("span", Mn, v(l.title), 1),
2567
+ o("span", xn, [
2568
+ n.senderLabel(l) ? (c(), d("span", On, v(n.senderLabel(l)) + " · ", 1)) : b("", !0),
2569
+ o("span", {
2570
+ innerHTML: n.renderPreview(l.preview)
2569
2571
  }, null, 8, Rn)
2570
2572
  ])
2571
2573
  ]),
2572
- l("span", Ln, [
2573
- n.formatTs(o._ts) ? (c(), d("span", In, v(n.formatTs(o._ts)), 1)) : k("", !0),
2574
- l("span", En, v(n.t("onboarding.resume")), 1)
2574
+ o("span", Ln, [
2575
+ n.formatTs(l._ts) ? (c(), d("span", In, v(n.formatTs(l._ts)), 1)) : b("", !0),
2576
+ o("span", En, v(n.t("onboarding.resume")), 1)
2575
2577
  ])
2576
2578
  ], 8, Cn))), 128))
2577
- ])) : k("", !0),
2578
- l("div", Bn, [
2579
- l("button", {
2579
+ ])) : b("", !0),
2580
+ o("div", Bn, [
2581
+ o("button", {
2580
2582
  type: "button",
2581
2583
  class: "wm-onb__btn wm-onb__btn--start",
2582
2584
  disabled: s.busy,
2583
- onClick: t[0] || (t[0] = (o) => e.$emit("start"))
2585
+ onClick: t[0] || (t[0] = (l) => e.$emit("start"))
2584
2586
  }, [
2585
- t[4] || (t[4] = l("span", { class: "wm-onb__btn-icon" }, [
2586
- l("svg", {
2587
+ t[4] || (t[4] = o("span", { class: "wm-onb__btn-icon" }, [
2588
+ o("svg", {
2587
2589
  width: "18",
2588
2590
  height: "18",
2589
2591
  viewBox: "0 0 24 24",
@@ -2594,51 +2596,51 @@ function Yn(e, t, s, r, i, n) {
2594
2596
  "stroke-linejoin": "round",
2595
2597
  "aria-hidden": "true"
2596
2598
  }, [
2597
- l("path", { d: "M12 5v14M5 12h14" })
2599
+ o("path", { d: "M12 5v14M5 12h14" })
2598
2600
  ])
2599
2601
  ], -1)),
2600
- l("span", Nn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
2602
+ o("span", Dn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
2601
2603
  ], 8, Pn),
2602
- (c(!0), d(I, null, j(s.quickLinks, (o, f) => (c(), d("button", {
2604
+ (c(!0), d(I, null, j(s.quickLinks, (l, f) => (c(), d("button", {
2603
2605
  key: "ql-" + f,
2604
2606
  type: "button",
2605
2607
  class: "wm-onb__btn",
2606
- onClick: (b) => e.$emit("select", o)
2608
+ onClick: (k) => e.$emit("select", l)
2607
2609
  }, [
2608
- l("span", Dn, [
2609
- n.safeIconUrl(o) ? (c(), d("span", {
2610
+ o("span", Un, [
2611
+ n.safeIconUrl(l) ? (c(), d("span", {
2610
2612
  key: 0,
2611
2613
  class: "wm-onb__btn-iconImg",
2612
- style: z(n.iconUrlStyle(o)),
2614
+ style: z(n.iconUrlStyle(l)),
2613
2615
  role: "img",
2614
- "aria-label": o.label || ""
2616
+ "aria-label": l.label || ""
2615
2617
  }, null, 12, jn)) : (c(), d("svg", Fn, [
2616
- l("path", {
2617
- d: n.iconPath(o.icon)
2618
+ o("path", {
2619
+ d: n.iconPath(l.icon)
2618
2620
  }, null, 8, Hn)
2619
2621
  ]))
2620
2622
  ]),
2621
- l("span", zn, v(o.label), 1),
2622
- n.isExternalLink(o) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2623
- l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2624
- ])])) : k("", !0)
2625
- ], 8, Un))), 128)),
2623
+ o("span", zn, v(l.label), 1),
2624
+ n.isExternalLink(l) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2625
+ o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2626
+ ])])) : b("", !0)
2627
+ ], 8, Nn))), 128)),
2626
2628
  s.openThreads.length ? (c(), d("button", {
2627
2629
  key: 0,
2628
2630
  type: "button",
2629
2631
  class: "wm-onb__btn",
2630
- onClick: t[1] || (t[1] = (o) => e.$emit("view-history"))
2632
+ onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
2631
2633
  }, [
2632
- l("span", Vn, [
2634
+ o("span", Vn, [
2633
2635
  (c(), d("svg", Kn, [
2634
- l("path", {
2636
+ o("path", {
2635
2637
  d: n.iconPath("chat")
2636
2638
  }, null, 8, Wn)
2637
2639
  ]))
2638
2640
  ]),
2639
- l("span", $n, v(n.t("onboarding.allConversations")), 1),
2640
- l("span", Gn, v(s.openThreads.length), 1),
2641
- t[6] || (t[6] = l("svg", {
2641
+ o("span", $n, v(n.t("onboarding.allConversations")), 1),
2642
+ o("span", Gn, v(s.openThreads.length), 1),
2643
+ t[6] || (t[6] = o("svg", {
2642
2644
  class: "wm-onb__btn-trail",
2643
2645
  width: "13",
2644
2646
  height: "13",
@@ -2650,13 +2652,13 @@ function Yn(e, t, s, r, i, n) {
2650
2652
  "stroke-linejoin": "round",
2651
2653
  "aria-hidden": "true"
2652
2654
  }, [
2653
- l("path", { d: "M9 18l6-6-6-6" })
2655
+ o("path", { d: "M9 18l6-6-6-6" })
2654
2656
  ], -1))
2655
- ])) : k("", !0)
2657
+ ])) : b("", !0)
2656
2658
  ])
2657
2659
  ]);
2658
2660
  }
2659
- const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2661
+ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2660
2662
  name: "WmHistory",
2661
2663
  components: { AIAvatar: oe, HumanAvatar: ve },
2662
2664
  inject: {
@@ -2709,15 +2711,15 @@ const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2709
2711
  if (!e) return "";
2710
2712
  const t = new Date(e);
2711
2713
  if (Number.isNaN(t.getTime())) return "";
2712
- const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2713
- if (t.toDateString() === r.toDateString())
2714
+ const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2715
+ if (t.toDateString() === i.toDateString())
2714
2716
  return t.toLocaleTimeString(s, {
2715
2717
  hour: "2-digit",
2716
2718
  minute: "2-digit"
2717
2719
  });
2718
- if (r.getTime() - t.getTime() < 7 * 864e5) {
2719
- const a = t.toLocaleDateString(s, { weekday: "short" });
2720
- return a.charAt(0).toUpperCase() + a.slice(1);
2720
+ if (i.getTime() - t.getTime() < 7 * 864e5) {
2721
+ const r = t.toLocaleDateString(s, { weekday: "short" });
2722
+ return r.charAt(0).toUpperCase() + r.slice(1);
2721
2723
  }
2722
2724
  return t.toLocaleDateString(s, {
2723
2725
  day: "2-digit",
@@ -2735,11 +2737,11 @@ const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2735
2737
  key: 0,
2736
2738
  class: "wm-hist__empty"
2737
2739
  };
2738
- function us(e, t, s, r, i, n) {
2740
+ function us(e, t, s, i, a, n) {
2739
2741
  return c(), d("div", Qn, [
2740
- l("div", Zn, [
2741
- t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
2742
- l("svg", {
2742
+ o("div", Zn, [
2743
+ t[1] || (t[1] = o("span", { class: "wm-hist__searchIcon" }, [
2744
+ o("svg", {
2743
2745
  width: "13",
2744
2746
  height: "13",
2745
2747
  viewBox: "0 0 24 24",
@@ -2750,30 +2752,30 @@ function us(e, t, s, r, i, n) {
2750
2752
  "stroke-linejoin": "round",
2751
2753
  "aria-hidden": "true"
2752
2754
  }, [
2753
- l("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2755
+ o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2754
2756
  ])
2755
2757
  ], -1)),
2756
- G(l("input", {
2757
- "onUpdate:modelValue": t[0] || (t[0] = (a) => i.query = a),
2758
+ G(o("input", {
2759
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => a.query = r),
2758
2760
  type: "text",
2759
2761
  placeholder: n.t("onboarding.search"),
2760
2762
  "aria-label": n.t("onboarding.search")
2761
2763
  }, null, 8, es), [
2762
- [te, i.query]
2764
+ [te, a.query]
2763
2765
  ])
2764
2766
  ]),
2765
- l("div", ts, [
2766
- (c(!0), d(I, null, j(n.filteredThreads, (a) => (c(), d("button", {
2767
- key: a.id,
2767
+ o("div", ts, [
2768
+ (c(!0), d(I, null, j(n.filteredThreads, (r) => (c(), d("button", {
2769
+ key: r.id,
2768
2770
  type: "button",
2769
- class: R(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2770
- onClick: (o) => e.$emit("resume", a)
2771
+ class: R(["wm-hist__thread", { "wm-hist__thread--unread": r.unread }]),
2772
+ onClick: (l) => e.$emit("resume", r)
2771
2773
  }, [
2772
- l("span", {
2773
- class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2774
+ o("span", {
2775
+ class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(r)])
2774
2776
  }, [
2775
- n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2776
- l("svg", {
2777
+ n.isDefaultAvatar(r) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2778
+ o("svg", {
2777
2779
  width: "18",
2778
2780
  height: "18",
2779
2781
  viewBox: "0 0 24 24",
@@ -2784,28 +2786,28 @@ function us(e, t, s, r, i, n) {
2784
2786
  "stroke-linejoin": "round",
2785
2787
  "aria-hidden": "true"
2786
2788
  }, [
2787
- l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2789
+ o("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2788
2790
  ], -1)
2789
- ])])) : (c(), P(Ae(n.avatarComponent(a)), Fe({
2791
+ ])])) : (c(), D(Ae(n.avatarComponent(r)), Fe({
2790
2792
  key: 1,
2791
2793
  ref_for: !0
2792
- }, n.avatarProps(a)), null, 16)),
2793
- a.unread ? (c(), d("span", {
2794
+ }, n.avatarProps(r)), null, 16)),
2795
+ r.unread ? (c(), d("span", {
2794
2796
  key: 2,
2795
2797
  class: "wm-hist__thread-dot",
2796
2798
  "aria-label": n.t("onboarding.unread")
2797
- }, null, 8, rs)) : k("", !0)
2799
+ }, null, 8, rs)) : b("", !0)
2798
2800
  ], 2),
2799
- l("span", is, [
2800
- l("span", as, v(a.title), 1),
2801
- l("span", {
2801
+ o("span", is, [
2802
+ o("span", as, v(r.title), 1),
2803
+ o("span", {
2802
2804
  class: "wm-hist__thread-preview",
2803
- innerHTML: n.renderPreview(a.preview)
2805
+ innerHTML: n.renderPreview(r.preview)
2804
2806
  }, null, 8, os)
2805
2807
  ]),
2806
- l("span", ls, [
2807
- n.formatTs(a._ts) ? (c(), d("span", cs, v(n.formatTs(a._ts)), 1)) : k("", !0),
2808
- t[3] || (t[3] = l("svg", {
2808
+ o("span", ls, [
2809
+ n.formatTs(r._ts) ? (c(), d("span", cs, v(n.formatTs(r._ts)), 1)) : b("", !0),
2810
+ t[3] || (t[3] = o("svg", {
2809
2811
  width: "14",
2810
2812
  height: "14",
2811
2813
  viewBox: "0 0 24 24",
@@ -2817,15 +2819,15 @@ function us(e, t, s, r, i, n) {
2817
2819
  class: "wm-hist__thread-chev",
2818
2820
  "aria-hidden": "true"
2819
2821
  }, [
2820
- l("path", { d: "M5 12h14M13 5l7 7-7 7" })
2822
+ o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2821
2823
  ], -1))
2822
2824
  ])
2823
2825
  ], 10, ns))), 128)),
2824
- n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2826
+ n.filteredThreads.length ? b("", !0) : (c(), d("div", ds, v(a.query ? n.t("onboarding.noResults", { query: a.query }) : n.t("onboarding.noConversations")), 1))
2825
2827
  ])
2826
2828
  ]);
2827
2829
  }
2828
- const hs = /* @__PURE__ */ N(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2830
+ const hs = /* @__PURE__ */ P(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2829
2831
  function ms(e) {
2830
2832
  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();
2831
2833
  }
@@ -2886,31 +2888,31 @@ const fs = {
2886
2888
  "stroke-linecap": "round",
2887
2889
  "stroke-linejoin": "round"
2888
2890
  }, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
2889
- function Cs(e, t, s, r, i, n) {
2891
+ function Cs(e, t, s, i, a, n) {
2890
2892
  return c(), d("div", {
2891
2893
  class: R(["wm-result", `wm-result--${s.state}`])
2892
2894
  }, [
2893
- l("span", _s, [
2895
+ o("span", _s, [
2894
2896
  s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
2895
- l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2897
+ o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2896
2898
  ])])) : s.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
2897
- l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2899
+ o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2898
2900
  ])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
2899
- l("circle", {
2901
+ o("circle", {
2900
2902
  cx: "12",
2901
2903
  cy: "12",
2902
2904
  r: "10"
2903
2905
  }, null, -1),
2904
- l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2906
+ o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2905
2907
  ])])) : (c(), d("svg", ys, [...t[3] || (t[3] = [
2906
- l("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2907
- l("line", {
2908
+ o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2909
+ o("line", {
2908
2910
  x1: "12",
2909
2911
  y1: "9",
2910
2912
  x2: "12",
2911
2913
  y2: "13"
2912
2914
  }, null, -1),
2913
- l("line", {
2915
+ o("line", {
2914
2916
  x1: "12",
2915
2917
  y1: "17",
2916
2918
  x2: "12.01",
@@ -2918,19 +2920,19 @@ function Cs(e, t, s, r, i, n) {
2918
2920
  }, null, -1)
2919
2921
  ])]))
2920
2922
  ]),
2921
- l("span", ws, [
2922
- l("span", bs, v(s.label), 1),
2923
+ o("span", ws, [
2924
+ o("span", bs, v(s.label), 1),
2923
2925
  n.detailText ? (c(), d(I, { key: 0 }, [
2924
- t[4] || (t[4] = l("span", {
2926
+ t[4] || (t[4] = o("span", {
2925
2927
  class: "wm-result__sep",
2926
2928
  "aria-hidden": "true"
2927
2929
  }, " · ", -1)),
2928
- l("span", ks, v(n.detailText), 1)
2929
- ], 64)) : k("", !0)
2930
+ o("span", ks, v(n.detailText), 1)
2931
+ ], 64)) : b("", !0)
2930
2932
  ])
2931
2933
  ], 2);
2932
2934
  }
2933
- const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2935
+ const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2934
2936
  name: "WmArtifactFormResponse",
2935
2937
  inject: {
2936
2938
  // Translator shared by the Messenger shell; French fallback when
@@ -2946,13 +2948,13 @@ const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
2946
2948
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2947
2949
  }
2948
2950
  }
2949
- }, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
2950
- function Is(e, t, s, r, i, n) {
2951
- return c(), d("div", Ms, [
2952
- l("div", Ts, [
2953
- l("div", xs, v(s.data.title || n.t("form.title")), 1),
2954
- l("span", Os, [
2955
- t[0] || (t[0] = l("svg", {
2951
+ }, Ts = { class: "wm-art wm-art--formResponse" }, Ms = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
2952
+ function Is(e, t, s, i, a, n) {
2953
+ return c(), d("div", Ts, [
2954
+ o("div", Ms, [
2955
+ o("div", xs, v(s.data.title || n.t("form.title")), 1),
2956
+ o("span", Os, [
2957
+ t[0] || (t[0] = o("svg", {
2956
2958
  width: "11",
2957
2959
  height: "11",
2958
2960
  viewBox: "0 0 24 24",
@@ -2963,28 +2965,28 @@ function Is(e, t, s, r, i, n) {
2963
2965
  "stroke-linejoin": "round",
2964
2966
  "aria-hidden": "true"
2965
2967
  }, [
2966
- l("polyline", { points: "20 6 9 17 4 12" })
2968
+ o("polyline", { points: "20 6 9 17 4 12" })
2967
2969
  ], -1)),
2968
2970
  Se(" " + v(n.t("form.sent")), 1)
2969
2971
  ])
2970
2972
  ]),
2971
- l("div", Rs, [
2972
- (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
2973
- key: o,
2973
+ o("div", Rs, [
2974
+ (c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
2975
+ key: l,
2974
2976
  class: "wm-art__field"
2975
2977
  }, [
2976
- l("div", Ls, v(a.label), 1),
2977
- l("div", {
2978
+ o("div", Ls, v(r.label), 1),
2979
+ o("div", {
2978
2980
  class: R([
2979
2981
  "wm-art__fieldValue",
2980
- { "wm-art__fieldValue--multi": a.multiline }
2982
+ { "wm-art__fieldValue--multi": r.multiline }
2981
2983
  ])
2982
- }, v(a.value), 3)
2984
+ }, v(r.value), 3)
2983
2985
  ]))), 128))
2984
2986
  ])
2985
2987
  ]);
2986
2988
  }
2987
- const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
2989
+ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
2988
2990
  name: "WmArtifactInfoCard",
2989
2991
  props: {
2990
2992
  data: { type: Object, required: !0 }
@@ -2999,10 +3001,10 @@ const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
2999
3001
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
3000
3002
  }
3001
3003
  }
3002
- }, Ps = { class: "wm-art wm-art--infoCard" }, Ns = {
3004
+ }, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
3003
3005
  key: 0,
3004
3006
  class: "wm-art__image"
3005
- }, Us = ["src", "alt"], Ds = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
3007
+ }, Ns = ["src", "alt"], Us = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
3006
3008
  key: 0,
3007
3009
  class: "wm-art__subtitle"
3008
3010
  }, zs = {
@@ -3012,19 +3014,19 @@ const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
3012
3014
  key: 0,
3013
3015
  class: "wm-art__text"
3014
3016
  }, Vs = { class: "wm-art__fieldLabel" };
3015
- function Ks(e, t, s, r, i, n) {
3017
+ function Ks(e, t, s, i, a, n) {
3016
3018
  return c(), d("div", Ps, [
3017
- s.data.image_url ? (c(), d("figure", Ns, [
3018
- l("img", {
3019
+ s.data.image_url ? (c(), d("figure", Ds, [
3020
+ o("img", {
3019
3021
  src: s.data.image_url,
3020
3022
  alt: s.data.title || "",
3021
3023
  loading: "lazy"
3022
- }, null, 8, Us)
3023
- ])) : k("", !0),
3024
- l("div", Ds, [
3025
- l("div", js, [
3026
- l("div", Fs, v(s.data.title), 1),
3027
- s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : k("", !0)
3024
+ }, null, 8, Ns)
3025
+ ])) : b("", !0),
3026
+ o("div", Us, [
3027
+ o("div", js, [
3028
+ o("div", Fs, v(s.data.title), 1),
3029
+ s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : b("", !0)
3028
3030
  ]),
3029
3031
  s.data.badge && s.data.badge.label ? (c(), d("span", {
3030
3032
  key: 0,
@@ -3032,39 +3034,39 @@ function Ks(e, t, s, r, i, n) {
3032
3034
  "wm-art__badge",
3033
3035
  `wm-art__badge--${s.data.badge.tone || "neutral"}`
3034
3036
  ])
3035
- }, v(s.data.badge.label), 3)) : k("", !0)
3037
+ }, v(s.data.badge.label), 3)) : b("", !0)
3036
3038
  ]),
3037
3039
  n.hasBody ? (c(), d("div", zs, [
3038
- s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : k("", !0),
3039
- n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (a, o) => (c(), d("div", {
3040
- key: o,
3040
+ s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : b("", !0),
3041
+ n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (r, l) => (c(), d("div", {
3042
+ key: l,
3041
3043
  class: "wm-art__field"
3042
3044
  }, [
3043
- l("div", Vs, v(a.label), 1),
3044
- l("div", {
3045
+ o("div", Vs, v(r.label), 1),
3046
+ o("div", {
3045
3047
  class: R([
3046
3048
  "wm-art__fieldValue",
3047
- { "wm-art__fieldValue--multi": a.multiline }
3049
+ { "wm-art__fieldValue--multi": r.multiline }
3048
3050
  ])
3049
- }, v(a.value), 3)
3050
- ]))), 128)) : k("", !0)
3051
- ])) : k("", !0)
3051
+ }, v(r.value), 3)
3052
+ ]))), 128)) : b("", !0)
3053
+ ])) : b("", !0)
3052
3054
  ]);
3053
3055
  }
3054
- const Ws = /* @__PURE__ */ N(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3056
+ const Ws = /* @__PURE__ */ P(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3055
3057
  function $s(e, t, s) {
3056
3058
  if (!e) return "";
3057
- const r = new Date(e);
3058
- if (Number.isNaN(r.getTime())) return e;
3059
- const i = r.toLocaleDateString(t, {
3059
+ const i = new Date(e);
3060
+ if (Number.isNaN(i.getTime())) return e;
3061
+ const a = i.toLocaleDateString(t, {
3060
3062
  day: "numeric",
3061
3063
  month: "long",
3062
3064
  year: "numeric"
3063
- }), n = r.toLocaleTimeString(t, {
3065
+ }), n = i.toLocaleTimeString(t, {
3064
3066
  hour: "2-digit",
3065
3067
  minute: "2-digit"
3066
3068
  });
3067
- return `${i}${s}${n}`;
3069
+ return `${a}${s}${n}`;
3068
3070
  }
3069
3071
  const Gs = {
3070
3072
  name: "WmArtifactTicket",
@@ -3134,13 +3136,13 @@ const Gs = {
3134
3136
  key: 1,
3135
3137
  class: "wm-art__footer wm-tk__footer"
3136
3138
  };
3137
- function ar(e, t, s, r, i, n) {
3139
+ function ar(e, t, s, i, a, n) {
3138
3140
  return c(), d("div", Ys, [
3139
- l("div", Js, [
3140
- l("div", Xs, v(s.data.title), 1),
3141
- l("div", Qs, [
3142
- l("div", Zs, [
3143
- t[0] || (t[0] = l("svg", {
3141
+ o("div", Js, [
3142
+ o("div", Xs, v(s.data.title), 1),
3143
+ o("div", Qs, [
3144
+ o("div", Zs, [
3145
+ t[0] || (t[0] = o("svg", {
3144
3146
  width: "11",
3145
3147
  height: "11",
3146
3148
  viewBox: "0 0 24 24",
@@ -3151,85 +3153,85 @@ function ar(e, t, s, r, i, n) {
3151
3153
  "stroke-linejoin": "round",
3152
3154
  "aria-hidden": "true"
3153
3155
  }, [
3154
- l("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3155
- l("path", { d: "M13 5v2M13 17v2M13 11v2" })
3156
+ o("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3157
+ o("path", { d: "M13 5v2M13 17v2M13 11v2" })
3156
3158
  ], -1)),
3157
- l("span", null, v(s.data.reference), 1)
3159
+ o("span", null, v(s.data.reference), 1)
3158
3160
  ]),
3159
- l("span", {
3161
+ o("span", {
3160
3162
  class: R([
3161
3163
  "wm-art__badge",
3162
3164
  "wm-tk__badge",
3163
3165
  `wm-art__badge--${s.data.status.tone || "neutral"}`
3164
3166
  ])
3165
3167
  }, [
3166
- t[1] || (t[1] = l("span", {
3168
+ t[1] || (t[1] = o("span", {
3167
3169
  class: "wm-tk__dot",
3168
3170
  "aria-hidden": "true"
3169
3171
  }, null, -1)),
3170
3172
  Se(" " + v(s.data.status.label), 1)
3171
3173
  ], 2)
3172
3174
  ]),
3173
- s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : k("", !0)
3175
+ s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : b("", !0)
3174
3176
  ]),
3175
3177
  n.fields.length ? (c(), d("div", tr, [
3176
- (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
3177
- key: o,
3178
+ (c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
3179
+ key: l,
3178
3180
  class: "wm-art__field"
3179
3181
  }, [
3180
- l("div", nr, v(a.label), 1),
3181
- l("div", {
3182
+ o("div", nr, v(r.label), 1),
3183
+ o("div", {
3182
3184
  class: R([
3183
3185
  "wm-art__fieldValue",
3184
- { "wm-art__fieldValue--multi": a.multiline }
3186
+ { "wm-art__fieldValue--multi": r.multiline }
3185
3187
  ])
3186
3188
  }, [
3187
- n.isPriority(a.label) ? (c(), d("svg", {
3189
+ n.isPriority(r.label) ? (c(), d("svg", {
3188
3190
  key: 0,
3189
3191
  class: "wm-tk__prio",
3190
- "data-level": n.priorityLevel(a.value),
3192
+ "data-level": n.priorityLevel(r.value),
3191
3193
  width: "12",
3192
3194
  height: "12",
3193
3195
  viewBox: "0 0 12 12",
3194
3196
  "aria-hidden": "true"
3195
3197
  }, [...t[2] || (t[2] = [
3196
- l("rect", {
3198
+ o("rect", {
3197
3199
  x: "1",
3198
3200
  y: "8",
3199
3201
  width: "2",
3200
3202
  height: "3",
3201
3203
  rx: "0.5"
3202
3204
  }, null, -1),
3203
- l("rect", {
3205
+ o("rect", {
3204
3206
  x: "5",
3205
3207
  y: "5",
3206
3208
  width: "2",
3207
3209
  height: "6",
3208
3210
  rx: "0.5"
3209
3211
  }, null, -1),
3210
- l("rect", {
3212
+ o("rect", {
3211
3213
  x: "9",
3212
3214
  y: "2",
3213
3215
  width: "2",
3214
3216
  height: "9",
3215
3217
  rx: "0.5"
3216
3218
  }, null, -1)
3217
- ])], 8, sr)) : n.isDate(a.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3218
- l("rect", {
3219
+ ])], 8, sr)) : n.isDate(r.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3220
+ o("rect", {
3219
3221
  x: "3",
3220
3222
  y: "4",
3221
3223
  width: "18",
3222
3224
  height: "18",
3223
3225
  rx: "2"
3224
3226
  }, null, -1),
3225
- l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3226
- ])])) : k("", !0),
3227
- l("span", null, v(a.value), 1)
3227
+ o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3228
+ ])])) : b("", !0),
3229
+ o("span", null, v(r.value), 1)
3228
3230
  ], 2)
3229
3231
  ]))), 128))
3230
- ])) : k("", !0),
3232
+ ])) : b("", !0),
3231
3233
  s.data.created_at ? (c(), d("div", ir, [
3232
- t[4] || (t[4] = l("svg", {
3234
+ t[4] || (t[4] = o("svg", {
3233
3235
  width: "11",
3234
3236
  height: "11",
3235
3237
  viewBox: "0 0 24 24",
@@ -3240,20 +3242,20 @@ function ar(e, t, s, r, i, n) {
3240
3242
  "stroke-linejoin": "round",
3241
3243
  "aria-hidden": "true"
3242
3244
  }, [
3243
- l("rect", {
3245
+ o("rect", {
3244
3246
  x: "3",
3245
3247
  y: "4",
3246
3248
  width: "18",
3247
3249
  height: "18",
3248
3250
  rx: "2"
3249
3251
  }),
3250
- l("path", { d: "M16 2v4M8 2v4M3 10h18" })
3252
+ o("path", { d: "M16 2v4M8 2v4M3 10h18" })
3251
3253
  ], -1)),
3252
- l("span", null, v(n.formattedDate), 1)
3253
- ])) : k("", !0)
3254
+ o("span", null, v(n.formattedDate), 1)
3255
+ ])) : b("", !0)
3254
3256
  ]);
3255
3257
  }
3256
- const or = /* @__PURE__ */ N(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3258
+ const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3257
3259
  form_response: Es,
3258
3260
  info_card: Ws,
3259
3261
  ticket: or
@@ -3272,13 +3274,13 @@ const or = /* @__PURE__ */ N(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
3272
3274
  }
3273
3275
  }
3274
3276
  };
3275
- function dr(e, t, s, r, i, n) {
3276
- return n.component ? (c(), P(Ae(n.component), {
3277
+ function dr(e, t, s, i, a, n) {
3278
+ return n.component ? (c(), D(Ae(n.component), {
3277
3279
  key: 0,
3278
3280
  data: s.artifact.data
3279
- }, null, 8, ["data"])) : k("", !0);
3281
+ }, null, 8, ["data"])) : b("", !0);
3280
3282
  }
3281
- const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
3283
+ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3282
3284
  name: "WmAttachmentPreview",
3283
3285
  inject: {
3284
3286
  signAttachmentFn: { default: null },
@@ -3294,10 +3296,10 @@ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
3294
3296
  },
3295
3297
  computed: {
3296
3298
  kind() {
3297
- var s, r;
3299
+ var s, i;
3298
3300
  const e = (s = this.attachment) == null ? void 0 : s.type;
3299
3301
  if (e) return e;
3300
- const t = (((r = this.attachment) == null ? void 0 : r.mime_type) || "").toLowerCase();
3302
+ const t = (((i = this.attachment) == null ? void 0 : i.mime_type) || "").toLowerCase();
3301
3303
  return t.startsWith("image/") ? "image" : t.startsWith("audio/") ? "audio" : t.startsWith("video/") ? "video" : "file";
3302
3304
  },
3303
3305
  displayName() {
@@ -3354,30 +3356,30 @@ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
3354
3356
  class: "wm-att__spin",
3355
3357
  "aria-hidden": "true"
3356
3358
  };
3357
- function kr(e, t, s, r, i, n) {
3359
+ function kr(e, t, s, i, a, n) {
3358
3360
  return c(), d("div", {
3359
3361
  class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
3360
3362
  }, [
3361
- n.kind === "image" && i.url ? (c(), d("a", {
3363
+ n.kind === "image" && a.url ? (c(), d("a", {
3362
3364
  key: 0,
3363
3365
  href: n.safeHref,
3364
3366
  target: "_blank",
3365
3367
  rel: "noopener",
3366
3368
  class: "wm-att__imgWrap"
3367
3369
  }, [
3368
- l("img", {
3369
- src: i.url,
3370
+ o("img", {
3371
+ src: a.url,
3370
3372
  alt: n.displayName,
3371
3373
  loading: "lazy"
3372
3374
  }, null, 8, fr)
3373
- ], 8, mr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
3375
+ ], 8, mr)) : n.kind === "audio" && a.url ? (c(), d("audio", {
3374
3376
  key: 1,
3375
- src: i.url,
3377
+ src: a.url,
3376
3378
  controls: "",
3377
3379
  preload: "metadata"
3378
- }, null, 8, _r)) : n.kind === "video" && i.url ? (c(), d("video", {
3380
+ }, null, 8, _r)) : n.kind === "video" && a.url ? (c(), d("video", {
3379
3381
  key: 2,
3380
- src: i.url,
3382
+ src: a.url,
3381
3383
  controls: "",
3382
3384
  playsinline: "",
3383
3385
  preload: "auto"
@@ -3388,10 +3390,10 @@ function kr(e, t, s, r, i, n) {
3388
3390
  download: n.displayName,
3389
3391
  target: "_blank",
3390
3392
  rel: "noopener",
3391
- onClick: t[0] || (t[0] = (...a) => n.onFileClick && n.onFileClick(...a))
3393
+ onClick: t[0] || (t[0] = (...r) => n.onFileClick && n.onFileClick(...r))
3392
3394
  }, [
3393
- t[1] || (t[1] = l("span", { class: "wm-att__icon" }, [
3394
- l("svg", {
3395
+ t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
3396
+ o("svg", {
3395
3397
  width: "14",
3396
3398
  height: "14",
3397
3399
  viewBox: "0 0 24 24",
@@ -3402,19 +3404,19 @@ function kr(e, t, s, r, i, n) {
3402
3404
  "stroke-linejoin": "round",
3403
3405
  "aria-hidden": "true"
3404
3406
  }, [
3405
- l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3406
- l("path", { d: "M14 2v6h6" })
3407
+ o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3408
+ o("path", { d: "M14 2v6h6" })
3407
3409
  ])
3408
3410
  ], -1)),
3409
- l("span", vr, [
3410
- l("span", yr, v(n.displayName), 1),
3411
- n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : k("", !0)
3411
+ o("span", vr, [
3412
+ o("span", yr, v(n.displayName), 1),
3413
+ n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : b("", !0)
3412
3414
  ]),
3413
- i.loading ? (c(), d("span", br)) : k("", !0)
3415
+ a.loading ? (c(), d("span", br)) : b("", !0)
3414
3416
  ], 8, pr))
3415
3417
  ], 2);
3416
3418
  }
3417
- const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3419
+ const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3418
3420
  name: "WmBubble",
3419
3421
  props: {
3420
3422
  role: { type: String, default: "ai" },
@@ -3427,24 +3429,24 @@ const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd
3427
3429
  }
3428
3430
  }
3429
3431
  }, Sr = ["innerHTML"];
3430
- function Mr(e, t, s, r, i, n) {
3432
+ function Tr(e, t, s, i, a, n) {
3431
3433
  return c(), d("div", {
3432
3434
  class: R(["wm-bubble", "wm-bubble--" + s.role])
3433
3435
  }, [
3434
3436
  We(e.$slots, "default", {}, () => [
3435
- l("span", { innerHTML: n.rendered }, null, 8, Sr)
3437
+ o("span", { innerHTML: n.rendered }, null, 8, Sr)
3436
3438
  ], !0)
3437
3439
  ], 2);
3438
3440
  }
3439
- const Tr = /* @__PURE__ */ N(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3440
- function Rr(e, t, s, r, i, n) {
3441
+ const Mr = /* @__PURE__ */ P(Ar, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3442
+ function Rr(e, t, s, i, a, n) {
3441
3443
  return c(), d("div", Or, [...t[0] || (t[0] = [
3442
- l("span", { style: { "animation-delay": "0s" } }, null, -1),
3443
- l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3444
- l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3444
+ o("span", { style: { "animation-delay": "0s" } }, null, -1),
3445
+ o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3446
+ o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3445
3447
  ])]);
3446
3448
  }
3447
- const Lr = /* @__PURE__ */ N(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3449
+ const Lr = /* @__PURE__ */ P(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3448
3450
  function ee(e) {
3449
3451
  return e ? e.client_msg_id || e.id : "";
3450
3452
  }
@@ -3461,7 +3463,7 @@ const Ir = {
3461
3463
  components: {
3462
3464
  AIAvatar: oe,
3463
3465
  HumanAvatar: ve,
3464
- Bubble: Tr,
3466
+ Bubble: Mr,
3465
3467
  Typing: Lr,
3466
3468
  ActionResult: As,
3467
3469
  AttachmentPreview: Cr,
@@ -3534,62 +3536,61 @@ const Ir = {
3534
3536
  return !this.hasMore && !this.loadingMore && this.messages.length >= 20;
3535
3537
  },
3536
3538
  groups() {
3537
- var s, r, i, n, a;
3539
+ var s, i, a, n;
3538
3540
  const e = [];
3539
- for (const o of this.messages) {
3540
- if ((s = o == null ? void 0 : o.metadata) != null && s.resolution_request) continue;
3541
- const f = this.roleOf(o);
3542
- if (f === "system") {
3543
- if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
3544
- const M = e[e.length - 1];
3545
- M && M.role === "ai" ? M.messages.push(o) : e.push({
3546
- key: `g-${ee(o)}`,
3541
+ for (const r of this.messages) {
3542
+ const l = this.roleOf(r);
3543
+ if (l === "system") {
3544
+ if (((s = r == null ? void 0 : r.payload) == null ? void 0 : s.event) === "action_admin_pending") {
3545
+ const y = e[e.length - 1];
3546
+ y && y.role === "ai" ? y.messages.push(r) : e.push({
3547
+ key: `g-${ee(r)}`,
3547
3548
  role: "ai",
3548
3549
  agentName: "",
3549
3550
  agentAvatarUrl: null,
3550
- messages: [o],
3551
+ messages: [r],
3551
3552
  items: []
3552
3553
  });
3553
3554
  continue;
3554
3555
  }
3555
3556
  e.push({
3556
- key: `sys-${ee(o)}`,
3557
- role: f,
3558
- messages: [o],
3557
+ key: `sys-${ee(r)}`,
3558
+ role: l,
3559
+ messages: [r],
3559
3560
  items: [],
3560
- systemLabel: this.systemLabel(o)
3561
+ systemLabel: this.systemLabel(r)
3561
3562
  });
3562
3563
  continue;
3563
3564
  }
3564
- const b = e[e.length - 1];
3565
- b && b.role === f && (f === "ai" || b.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? b.messages.push(o) : e.push({
3566
- key: `g-${ee(o)}`,
3567
- role: f,
3568
- agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
3569
- agentAvatarUrl: ((a = o == null ? void 0 : o.author) == null ? void 0 : a.avatar_url) || null,
3570
- messages: [o],
3565
+ const f = e[e.length - 1];
3566
+ f && f.role === l && (l === "ai" || f.agentName === (((i = r == null ? void 0 : r.author) == null ? void 0 : i.name) || "")) ? f.messages.push(r) : e.push({
3567
+ key: `g-${ee(r)}`,
3568
+ role: l,
3569
+ agentName: ((a = r == null ? void 0 : r.author) == null ? void 0 : a.name) || "",
3570
+ agentAvatarUrl: ((n = r == null ? void 0 : r.author) == null ? void 0 : n.avatar_url) || null,
3571
+ messages: [r],
3571
3572
  items: []
3572
3573
  });
3573
3574
  }
3574
- for (const o of e) {
3575
- if (o.role === "system") continue;
3576
- const f = [];
3577
- for (const b of o.messages)
3578
- for (const y of this.itemsOf(b)) f.push(y);
3579
- o.items = f;
3575
+ for (const r of e) {
3576
+ if (r.role === "system") continue;
3577
+ const l = [];
3578
+ for (const f of r.messages)
3579
+ for (const k of this.itemsOf(f)) l.push(k);
3580
+ r.items = l;
3580
3581
  }
3581
3582
  const t = [];
3582
- for (const o of e) {
3583
- if (o.role !== "system" && !o.items.length) continue;
3584
- const f = t[t.length - 1];
3585
- if (f && f.role !== "system" && f.role === o.role && (o.role === "ai" || f.agentName === o.agentName)) {
3586
- f.messages.push(...o.messages), f.items.push(...o.items);
3583
+ for (const r of e) {
3584
+ if (r.role !== "system" && !r.items.length) continue;
3585
+ const l = t[t.length - 1];
3586
+ if (l && l.role !== "system" && l.role === r.role && (r.role === "ai" || l.agentName === r.agentName)) {
3587
+ l.messages.push(...r.messages), l.items.push(...r.items);
3587
3588
  continue;
3588
3589
  }
3589
- t.push(o);
3590
+ t.push(r);
3590
3591
  }
3591
- for (const o of t)
3592
- o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
3592
+ for (const r of t)
3593
+ r.role !== "system" && (r.key = this.stableGroupKey(r.messages));
3593
3594
  return t;
3594
3595
  },
3595
3596
  // Key of the first non-user group that starts after the unread
@@ -3600,10 +3601,10 @@ const Ir = {
3600
3601
  const e = this.unreadAnchorId, t = this.unreadBoundaryTs;
3601
3602
  for (const s of this.groups) {
3602
3603
  if (s.role === "user" || s.role === "system" || !s.items.length) continue;
3603
- const r = s.messages[0];
3604
- if (!r) continue;
3605
- const i = Y(r.id);
3606
- if (i != null && !(i <= e) && !(t && r.created_at && r.created_at > t))
3604
+ const i = s.messages[0];
3605
+ if (!i) continue;
3606
+ const a = Y(i.id);
3607
+ if (a != null && !(a <= e) && !(t && i.created_at && i.created_at > t))
3607
3608
  return s.key;
3608
3609
  }
3609
3610
  return null;
@@ -3641,17 +3642,17 @@ const Ir = {
3641
3642
  this._groupIdByMsgKey || (this._groupIdByMsgKey = /* @__PURE__ */ new Map(), this._groupIdCounter = 0);
3642
3643
  const t = this._groupIdByMsgKey;
3643
3644
  let s = null;
3644
- for (const r of e) {
3645
- const i = ee(r);
3646
- if (i && t.has(i)) {
3647
- s = t.get(i);
3645
+ for (const i of e) {
3646
+ const a = ee(i);
3647
+ if (a && t.has(a)) {
3648
+ s = t.get(a);
3648
3649
  break;
3649
3650
  }
3650
3651
  }
3651
3652
  s == null && (s = ++this._groupIdCounter);
3652
- for (const r of e) {
3653
- const i = ee(r);
3654
- i && t.set(i, s);
3653
+ for (const i of e) {
3654
+ const a = ee(i);
3655
+ a && t.set(a, s);
3655
3656
  }
3656
3657
  return `g-${s}`;
3657
3658
  },
@@ -3689,32 +3690,32 @@ const Ir = {
3689
3690
  const t = this._lastSeenConvId !== this.conversationId;
3690
3691
  this._lastSeenConvId = this.conversationId;
3691
3692
  const s = this.isAtBottom(e);
3692
- let r = null;
3693
+ let i = null;
3693
3694
  if (!t && !s) {
3694
3695
  const n = this.pickAnchor(e);
3695
3696
  if (n != null && n.rowKey) {
3696
- const a = this.findRowByKey(e, n.rowKey);
3697
- if (a) {
3698
- const o = e.getBoundingClientRect().top;
3699
- r = {
3697
+ const r = this.findRowByKey(e, n.rowKey);
3698
+ if (r) {
3699
+ const l = e.getBoundingClientRect().top;
3700
+ i = {
3700
3701
  rowKey: n.rowKey,
3701
- relY: a.getBoundingClientRect().top - o
3702
+ relY: r.getBoundingClientRect().top - l
3702
3703
  };
3703
3704
  }
3704
3705
  }
3705
3706
  }
3706
- const i = { forceBottom: t, wasPinned: s, anchor: r };
3707
- this._scrollSnap = i, this.$nextTick(() => {
3708
- if (this._scrollSnap = null, i.forceBottom || i.wasPinned) {
3707
+ const a = { forceBottom: t, wasPinned: s, anchor: i };
3708
+ this._scrollSnap = a, this.$nextTick(() => {
3709
+ if (this._scrollSnap = null, a.forceBottom || a.wasPinned) {
3709
3710
  e.scrollTop = e.scrollHeight;
3710
3711
  return;
3711
3712
  }
3712
- if (!i.anchor) return;
3713
+ if (!a.anchor) return;
3713
3714
  const n = () => {
3714
- const a = i.anchor, o = this.findRowByKey(e, a.rowKey);
3715
- if (!o) return;
3716
- const b = o.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3717
- Math.abs(b) > 0.5 && (e.scrollTop += b);
3715
+ const r = a.anchor, l = this.findRowByKey(e, r.rowKey);
3716
+ if (!l) return;
3717
+ const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - r.relY;
3718
+ Math.abs(k) > 0.5 && (e.scrollTop += k);
3718
3719
  };
3719
3720
  n(), requestAnimationFrame(() => {
3720
3721
  n(), requestAnimationFrame(n);
@@ -3745,11 +3746,11 @@ const Ir = {
3745
3746
  // very-top-of-scroll edge case the same way the old logic did.
3746
3747
  pickAnchor(e) {
3747
3748
  const t = e.getBoundingClientRect().top, s = e.querySelectorAll(".wm-list__row[data-row-key]");
3748
- let r = null;
3749
- for (const i of s)
3750
- if (r || (r = i), i.getBoundingClientRect().bottom >= t)
3751
- return { rowKey: i.dataset.rowKey };
3752
- return r ? { rowKey: r.dataset.rowKey } : null;
3749
+ let i = null;
3750
+ for (const a of s)
3751
+ if (i || (i = a), a.getBoundingClientRect().bottom >= t)
3752
+ return { rowKey: a.dataset.rowKey };
3753
+ return i ? { rowKey: i.dataset.rowKey } : null;
3753
3754
  },
3754
3755
  findRowByKey(e, t) {
3755
3756
  if (!t) return null;
@@ -3759,10 +3760,10 @@ const Ir = {
3759
3760
  );
3760
3761
  },
3761
3762
  roleOf(e) {
3762
- var s, r;
3763
+ var s, i;
3763
3764
  if ((e == null ? void 0 : e.type) === "system" || ((s = e == null ? void 0 : e.payload) == null ? void 0 : s.type) === "system")
3764
3765
  return "system";
3765
- const t = (r = e == null ? void 0 : e.author) == null ? void 0 : r.type;
3766
+ const t = (i = e == null ? void 0 : e.author) == null ? void 0 : i.type;
3766
3767
  return t === "user" ? "user" : t === "agent_human" ? "human" : "ai";
3767
3768
  },
3768
3769
  roleLabel(e) {
@@ -3861,9 +3862,9 @@ const Ir = {
3861
3862
  // doit garder son arrondi.
3862
3863
  cornersFor(e, t) {
3863
3864
  var Q, se, re;
3864
- const s = e.items, r = (Q = s[t]) == null ? void 0 : Q.kind, i = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, T = ($, ie, X) => $ != null && M != null ? $ + q >= M : ie === X || ie === "card" && X === "bubble";
3865
- let U = o, D = o, L = o, W = o;
3866
- return a ? (b && (D = f), (y || !n) && (L = f), b && T(E, b, r == null ? void 0 : r.top) && (U = f), y && T(A, y, r == null ? void 0 : r.bottom) && (W = f)) : (b && (U = f), (y || !n) && (W = f), b && T(E, b, r == null ? void 0 : r.top) && (D = f), y && T(A, y, r == null ? void 0 : r.bottom) && (L = f)), { tl: U, tr: D, br: L, bl: W };
3865
+ const s = e.items, i = (Q = s[t]) == null ? void 0 : Q.kind, a = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, f = 4, k = a == null ? void 0 : a.bottom, y = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, T = ($, ie, X) => $ != null && M != null ? $ + q >= M : ie === X || ie === "card" && X === "bubble";
3866
+ let N = l, U = l, L = l, W = l;
3867
+ return r ? (k && (U = f), (y || !n) && (L = f), k && T(E, k, i == null ? void 0 : i.top) && (N = f), y && T(A, y, i == null ? void 0 : i.bottom) && (W = f)) : (k && (N = f), (y || !n) && (W = f), k && T(E, k, i == null ? void 0 : i.top) && (U = f), y && T(A, y, i == null ? void 0 : i.bottom) && (L = f)), { tl: N, tr: U, br: L, bl: W };
3867
3868
  },
3868
3869
  // Inline column-count for the mosaic grid, capped at 4. Single
3869
3870
  // attachment falls back to the vertical-list layout (null). Two
@@ -3886,8 +3887,8 @@ const Ir = {
3886
3887
  // corners of every top-row cell flatten too.
3887
3888
  mosaicCornerStyle(e, t, s) {
3888
3889
  if (!t || t < 2) return null;
3889
- const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, y = "4px", M = {};
3890
- return (a || f) && (M["--wm-r-tl"] = y), (o || f) && (M["--wm-r-tr"] = y), (a || b) && (M["--wm-r-bl"] = y), (o || b) && (M["--wm-r-br"] = y), s && (M["--wm-r-tl"] = y, M["--wm-r-tr"] = y), Object.keys(M).length ? M : null;
3890
+ const i = Math.min(t, 4), a = Math.floor(e / i), n = e % i, r = n > 0, l = n < i - 1 && e + 1 < t, f = a > 0, k = e + i < t, y = "4px", M = {};
3891
+ return (r || f) && (M["--wm-r-tl"] = y), (l || f) && (M["--wm-r-tr"] = y), (r || k) && (M["--wm-r-bl"] = y), (l || k) && (M["--wm-r-br"] = y), s && (M["--wm-r-tl"] = y, M["--wm-r-tr"] = y), Object.keys(M).length ? M : null;
3891
3892
  },
3892
3893
  // Inline style emitting the four corner CSS variables. Set on
3893
3894
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3906,8 +3907,8 @@ const Ir = {
3906
3907
  // Clé unique par item de cluster, alignée avec `:key` /
3907
3908
  // `data-row-key` du template. Sert d'index dans `widthByKey`.
3908
3909
  rowKeyOf(e, t) {
3909
- var r;
3910
- const s = (r = e == null ? void 0 : e.items) == null ? void 0 : r[t];
3910
+ var i;
3911
+ const s = (i = e == null ? void 0 : e.items) == null ? void 0 : i[t];
3911
3912
  return s ? `${ee(s.message)}-${s.partKey}` : "";
3912
3913
  },
3913
3914
  // rAF-debouncé : `updated()` peut être appelé en rafale (stream,
@@ -3928,20 +3929,20 @@ const Ir = {
3928
3929
  for (const n of e.querySelectorAll(
3929
3930
  ".wm-list__row[data-row-key]"
3930
3931
  )) {
3931
- const a = n.dataset.rowKey;
3932
- if (!a) continue;
3933
- const o = n.querySelector(
3932
+ const r = n.dataset.rowKey;
3933
+ if (!r) continue;
3934
+ const l = n.querySelector(
3934
3935
  ".wm-bubble, .wm-result, .wm-art, .wm-list__body"
3935
3936
  );
3936
- if (!o) continue;
3937
- const f = o.getBoundingClientRect().width;
3938
- f > 0 && (t[a] = f);
3937
+ if (!l) continue;
3938
+ const f = l.getBoundingClientRect().width;
3939
+ f > 0 && (t[r] = f);
3939
3940
  }
3940
- const s = this.widthByKey, r = Object.keys(s), i = Object.keys(t);
3941
- if (r.length === i.length) {
3941
+ const s = this.widthByKey, i = Object.keys(s), a = Object.keys(t);
3942
+ if (i.length === a.length) {
3942
3943
  let n = !0;
3943
- for (const a of i)
3944
- if (Math.abs((s[a] ?? 0) - t[a]) > 0.5) {
3944
+ for (const r of a)
3945
+ if (Math.abs((s[r] ?? 0) - t[r]) > 0.5) {
3945
3946
  n = !1;
3946
3947
  break;
3947
3948
  }
@@ -4011,27 +4012,27 @@ const Ir = {
4011
4012
  return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
4012
4013
  },
4013
4014
  actionDetail(e) {
4014
- var s, r, i, n, a, o, f, b;
4015
+ var s, i, a, n, r, l, f, k;
4015
4016
  const t = e == null ? void 0 : e.payload;
4016
4017
  if (!t) return "";
4017
4018
  if (t.state === "success")
4018
- return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
4019
+ return ((s = t.success) == null ? void 0 : s.summary) || ((a = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : a.description) || "";
4019
4020
  if (t.state === "rejected") {
4020
4021
  if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
4021
- const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, M = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4022
+ const y = (l = (r = t.rejected) == null ? void 0 : r.metadata) == null ? void 0 : l.resolution, M = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4022
4023
  return this.t(M);
4023
4024
  }
4024
- return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
4025
+ return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((k = t.failure) == null ? void 0 : k.error)) || "";
4025
4026
  },
4026
4027
  actionArtifact(e) {
4027
- var s, r;
4028
- const t = (r = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : r.artifact;
4028
+ var s, i;
4029
+ const t = (i = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : i.artifact;
4029
4030
  return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
4030
4031
  },
4031
4032
  systemLabel(e) {
4032
- var i, n, a;
4033
- const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s = Ir[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
4034
- return s ? this.t(s, { name: r }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
4033
+ var a, n, r;
4034
+ const t = (a = e == null ? void 0 : e.payload) == null ? void 0 : a.event, s = Ir[t], i = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((r = e == null ? void 0 : e.author) == null ? void 0 : r.name) || this.t("messageList.anAgent");
4035
+ return s ? this.t(s, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
4035
4036
  },
4036
4037
  scrollToBottom() {
4037
4038
  const e = this.$refs.scrollEl;
@@ -4045,12 +4046,12 @@ const Ir = {
4045
4046
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
4046
4047
  }
4047
4048
  }
4048
- }, Nr = { class: "wm-list__wrap" }, Ur = {
4049
+ }, Dr = { class: "wm-list__wrap" }, Nr = {
4049
4050
  key: 0,
4050
4051
  class: "wm-list__loadMore",
4051
4052
  role: "status",
4052
4053
  "aria-live": "polite"
4053
- }, Dr = { class: "wm-list__loadMore-lbl" }, jr = {
4054
+ }, Ur = { class: "wm-list__loadMore-lbl" }, jr = {
4054
4055
  key: 1,
4055
4056
  class: "wm-list__historyEnd"
4056
4057
  }, Fr = {
@@ -4075,47 +4076,47 @@ const Ir = {
4075
4076
  key: 3,
4076
4077
  class: "wm-list__row wm-list__row--ai fade-up"
4077
4078
  }, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
4078
- function si(e, t, s, r, i, n) {
4079
- const a = B("AIAvatar"), o = B("HumanAvatar"), f = B("ActionResult"), b = B("ArtifactRenderer"), y = B("Bubble"), M = B("AttachmentPreview"), E = B("Typing");
4080
- return c(), d("div", Nr, [
4081
- l("div", {
4079
+ function si(e, t, s, i, a, n) {
4080
+ const r = B("AIAvatar"), l = B("HumanAvatar"), f = B("ActionResult"), k = B("ArtifactRenderer"), y = B("Bubble"), M = B("AttachmentPreview"), E = B("Typing");
4081
+ return c(), d("div", Dr, [
4082
+ o("div", {
4082
4083
  ref: "scrollEl",
4083
- class: R(["wm-list", { "wm-list--silent": i.silentFades }]),
4084
+ class: R(["wm-list", { "wm-list--silent": a.silentFades }]),
4084
4085
  onScrollPassive: t[4] || (t[4] = (...A) => n.onScroll && n.onScroll(...A))
4085
4086
  }, [
4086
- s.loadingMore ? (c(), d("div", Ur, [
4087
- t[6] || (t[6] = l("span", {
4087
+ s.loadingMore ? (c(), d("div", Nr, [
4088
+ t[6] || (t[6] = o("span", {
4088
4089
  class: "wm-list__loadMore-spinner",
4089
4090
  "aria-hidden": "true"
4090
4091
  }, null, -1)),
4091
- l("span", Dr, v(n.t("messageList.loadingHistory")), 1)
4092
- ])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : k("", !0),
4092
+ o("span", Ur, v(n.t("messageList.loadingHistory")), 1)
4093
+ ])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : b("", !0),
4093
4094
  s.dateLabel ? (c(), d("div", Fr, [
4094
- t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
4095
- l("span", Hr, v(s.dateLabel), 1),
4096
- t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
4097
- ])) : k("", !0),
4095
+ t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
4096
+ o("span", Hr, v(s.dateLabel), 1),
4097
+ t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
4098
+ ])) : b("", !0),
4098
4099
  (c(!0), d(I, null, j(n.groups, (A, q) => (c(), d(I, {
4099
4100
  key: A.key
4100
4101
  }, [
4101
4102
  A.key === n.unreadGroupKey ? (c(), d("div", zr, [
4102
- t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4103
- l("span", qr, v(n.t("messageList.unread")), 1),
4104
- t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4105
- ])) : k("", !0),
4103
+ t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4104
+ o("span", qr, v(n.t("messageList.unread")), 1),
4105
+ t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4106
+ ])) : b("", !0),
4106
4107
  A.role === "system" || A.items.length ? (c(), d("div", {
4107
4108
  key: 1,
4108
4109
  class: R(["wm-list__group", "wm-list__group--" + A.role])
4109
4110
  }, [
4110
4111
  A.role === "system" ? (c(), d("div", Vr, [
4111
- t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4112
- l("span", Kr, v(A.systemLabel), 1),
4113
- t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4112
+ t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4113
+ o("span", Kr, v(A.systemLabel), 1),
4114
+ t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4114
4115
  ])) : (c(), d(I, { key: 1 }, [
4115
- (c(!0), d(I, null, j(A.items, (T, U) => (c(), d(I, {
4116
+ (c(!0), d(I, null, j(A.items, (T, N) => (c(), d(I, {
4116
4117
  key: `${n.messageKey(T.message)}-${T.partKey}`
4117
4118
  }, [
4118
- l("div", {
4119
+ o("div", {
4119
4120
  "data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
4120
4121
  class: R(["wm-list__row fade-up", [
4121
4122
  "wm-list__row--" + A.role,
@@ -4124,45 +4125,45 @@ function si(e, t, s, r, i, n) {
4124
4125
  "is-failed": T.message._failed
4125
4126
  }
4126
4127
  ]]),
4127
- style: z(n.cornersStyle(A, U)),
4128
- onPointerdown: (D) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4129
- onPointerup: t[0] || (t[0] = (D) => n.onPressEnd()),
4130
- onPointercancel: t[1] || (t[1] = (D) => n.onPressEnd()),
4131
- onPointerleave: t[2] || (t[2] = (D) => n.onPressEnd()),
4128
+ style: z(n.cornersStyle(A, N)),
4129
+ onPointerdown: (U) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4130
+ onPointerup: t[0] || (t[0] = (U) => n.onPressEnd()),
4131
+ onPointercancel: t[1] || (t[1] = (U) => n.onPressEnd()),
4132
+ onPointerleave: t[2] || (t[2] = (U) => n.onPressEnd()),
4132
4133
  onContextmenu: t[3] || (t[3] = J(() => {
4133
4134
  }, ["prevent"]))
4134
4135
  }, [
4135
4136
  A.role !== "user" ? (c(), d("div", $r, [
4136
- U === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4137
- A.role === "ai" ? (c(), P(a, {
4137
+ N === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4138
+ A.role === "ai" ? (c(), D(r, {
4138
4139
  key: 0,
4139
4140
  size: 26,
4140
4141
  tail: !0,
4141
4142
  name: s.aiAgentName,
4142
4143
  "image-url": s.aiAgentAvatarUrl
4143
- }, null, 8, ["name", "image-url"])) : (c(), P(o, {
4144
+ }, null, 8, ["name", "image-url"])) : (c(), D(l, {
4144
4145
  key: 1,
4145
4146
  name: A.agentName,
4146
4147
  "avatar-url": A.agentAvatarUrl,
4147
4148
  size: 26,
4148
4149
  tail: !0
4149
4150
  }, null, 8, ["name", "avatar-url"]))
4150
- ], 64)) : k("", !0)
4151
- ])) : k("", !0),
4152
- T.renderAs === "action" ? (c(), P(f, {
4151
+ ], 64)) : b("", !0)
4152
+ ])) : b("", !0),
4153
+ T.renderAs === "action" ? (c(), D(f, {
4153
4154
  key: 1,
4154
4155
  state: T.message.payload.state,
4155
4156
  label: n.actionLabel(T.message),
4156
4157
  detail: n.actionDetail(T.message)
4157
- }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), P(f, {
4158
+ }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), D(f, {
4158
4159
  key: 2,
4159
4160
  state: "awaiting",
4160
4161
  label: n.t("messageList.approvalRequestSent"),
4161
4162
  detail: T.message.text_md || ""
4162
- }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), P(b, {
4163
+ }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), D(k, {
4163
4164
  key: 3,
4164
4165
  artifact: n.actionArtifact(T.message)
4165
- }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), P(b, {
4166
+ }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), D(k, {
4166
4167
  key: 4,
4167
4168
  artifact: n.artifactOf(T.message)
4168
4169
  }, null, 8, ["artifact"])) : (c(), d("div", {
@@ -4171,11 +4172,11 @@ function si(e, t, s, r, i, n) {
4171
4172
  "wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
4172
4173
  }])
4173
4174
  }, [
4174
- T.message.text_md ? (c(), P(y, {
4175
+ T.message.text_md ? (c(), D(y, {
4175
4176
  key: 0,
4176
4177
  role: A.role,
4177
4178
  text: T.message.text_md
4178
- }, null, 8, ["role", "text"])) : k("", !0),
4179
+ }, null, 8, ["role", "text"])) : b("", !0),
4179
4180
  n.attachmentsOf(T.message).length ? (c(), d("div", {
4180
4181
  key: 1,
4181
4182
  class: R(["wm-list__atts", {
@@ -4190,9 +4191,9 @@ function si(e, t, s, r, i, n) {
4190
4191
  }, [
4191
4192
  (c(!0), d(I, null, j(n.attachmentsOf(
4192
4193
  T.message
4193
- ), (D, L) => (c(), P(M, {
4194
+ ), (U, L) => (c(), D(M, {
4194
4195
  key: `${n.messageKey(T.message)}-att-${L}`,
4195
- attachment: D,
4196
+ attachment: U,
4196
4197
  style: z(
4197
4198
  n.mosaicCornerStyle(
4198
4199
  L,
@@ -4201,32 +4202,32 @@ function si(e, t, s, r, i, n) {
4201
4202
  )
4202
4203
  )
4203
4204
  }, null, 8, ["attachment", "style"]))), 128))
4204
- ], 6)) : k("", !0)
4205
+ ], 6)) : b("", !0)
4205
4206
  ], 2))
4206
4207
  ], 46, Wr),
4207
- U < A.items.length - 1 && i.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4208
+ N < A.items.length - 1 && a.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4208
4209
  key: 0,
4209
4210
  class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4210
4211
  }, [
4211
- A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : k("", !0),
4212
- A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : k("", !0),
4213
- n.timeOf(T.message) ? (c(), d("span", Jr, v(n.timeOf(T.message)), 1)) : k("", !0)
4214
- ], 2)) : k("", !0)
4212
+ A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : b("", !0),
4213
+ A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : b("", !0),
4214
+ n.timeOf(T.message) ? (c(), d("span", Jr, v(n.timeOf(T.message)), 1)) : b("", !0)
4215
+ ], 2)) : b("", !0)
4215
4216
  ], 64))), 128)),
4216
4217
  (A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
4217
4218
  key: 0,
4218
4219
  class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4219
4220
  }, [
4220
- A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : k("", !0),
4221
- A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : k("", !0),
4222
- n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : k("", !0)
4223
- ], 2)) : k("", !0)
4221
+ A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : b("", !0),
4222
+ A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : b("", !0),
4223
+ n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : b("", !0)
4224
+ ], 2)) : b("", !0)
4224
4225
  ], 64))
4225
- ], 2)) : k("", !0)
4226
+ ], 2)) : b("", !0)
4226
4227
  ], 64))), 128)),
4227
4228
  s.streamingActive ? (c(), d("div", ei, [
4228
- l("div", ti, [
4229
- K(a, {
4229
+ o("div", ti, [
4230
+ K(r, {
4230
4231
  size: 26,
4231
4232
  tail: !0,
4232
4233
  name: s.aiAgentName,
@@ -4234,11 +4235,11 @@ function si(e, t, s, r, i, n) {
4234
4235
  }, null, 8, ["name", "image-url"])
4235
4236
  ]),
4236
4237
  K(E)
4237
- ])) : k("", !0)
4238
+ ])) : b("", !0)
4238
4239
  ], 34),
4239
- K(De, { name: "wm-scrollDown" }, {
4240
+ K(Ue, { name: "wm-scrollDown" }, {
4240
4241
  default: je(() => [
4241
- i.showScrollDown ? (c(), d("button", {
4242
+ a.showScrollDown ? (c(), d("button", {
4242
4243
  key: 0,
4243
4244
  type: "button",
4244
4245
  class: "wm-list__scrollDown",
@@ -4246,7 +4247,7 @@ function si(e, t, s, r, i, n) {
4246
4247
  title: n.t("messageList.scrollToBottom"),
4247
4248
  onClick: t[5] || (t[5] = (...A) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...A))
4248
4249
  }, [...t[13] || (t[13] = [
4249
- l("svg", {
4250
+ o("svg", {
4250
4251
  width: "14",
4251
4252
  height: "14",
4252
4253
  viewBox: "0 0 24 24",
@@ -4257,15 +4258,15 @@ function si(e, t, s, r, i, n) {
4257
4258
  "stroke-linejoin": "round",
4258
4259
  "aria-hidden": "true"
4259
4260
  }, [
4260
- l("path", { d: "M6 9l6 6 6-6" })
4261
+ o("path", { d: "M6 9l6 6 6-6" })
4261
4262
  ], -1)
4262
- ])], 8, ni)) : k("", !0)
4263
+ ])], 8, ni)) : b("", !0)
4263
4264
  ]),
4264
4265
  _: 1
4265
4266
  })
4266
4267
  ]);
4267
4268
  }
4268
- const ri = /* @__PURE__ */ N(Pr, [["render", si], ["__scopeId", "data-v-fd42a48c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4269
+ const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-cc2c18ec"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4269
4270
  function ii() {
4270
4271
  return Oe && [
4271
4272
  "video/webm;codecs=vp9,opus",
@@ -4273,8 +4274,8 @@ function ii() {
4273
4274
  "video/webm",
4274
4275
  "video/mp4"
4275
4276
  ].find((t) => {
4276
- var s, r;
4277
- return (r = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : r.call(s, t);
4277
+ var s, i;
4278
+ return (i = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(s, t);
4278
4279
  }) || "";
4279
4280
  }
4280
4281
  function Ve({ audio: e }) {
@@ -4311,19 +4312,19 @@ async function ai() {
4311
4312
  }
4312
4313
  async function oi(e) {
4313
4314
  const t = document.createElement("video");
4314
- t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
4315
- const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
4316
- i.width = s, i.height = r, i.getContext("2d").drawImage(t, 0, 0, s, r);
4317
- const n = await new Promise((o, f) => {
4318
- i.toBlob(
4319
- (b) => b ? o(b) : f(new Error("toBlob failed")),
4315
+ t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4316
+ const s = t.videoWidth || 1280, i = t.videoHeight || 720, a = document.createElement("canvas");
4317
+ a.width = s, a.height = i, a.getContext("2d").drawImage(t, 0, 0, s, i);
4318
+ const n = await new Promise((l, f) => {
4319
+ a.toBlob(
4320
+ (k) => k ? l(k) : f(new Error("toBlob failed")),
4320
4321
  "image/png"
4321
4322
  );
4322
- }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4323
- return new File([n], `capture-${a}.png`, { type: "image/png" });
4323
+ }), r = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4324
+ return new File([n], `capture-${r}.png`, { type: "image/png" });
4324
4325
  }
4325
4326
  async function li(e = {}) {
4326
- var b;
4327
+ var k;
4327
4328
  if (!pe || !Oe) return null;
4328
4329
  let t;
4329
4330
  try {
@@ -4334,56 +4335,56 @@ async function li(e = {}) {
4334
4335
  return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
4335
4336
  }
4336
4337
  const s = ii();
4337
- let r;
4338
+ let i;
4338
4339
  try {
4339
- r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4340
+ i = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4340
4341
  } catch (y) {
4341
4342
  return console.error("[media] recorder init", y), t.getTracks().forEach((M) => {
4342
4343
  M.stop();
4343
4344
  }), null;
4344
4345
  }
4345
- const i = [];
4346
- let n = null, a = !1;
4347
- r.addEventListener("dataavailable", (y) => {
4348
- y.data && y.data.size > 0 && i.push(y.data);
4349
- }), r.addEventListener("stop", () => {
4346
+ const a = [];
4347
+ let n = null, r = !1;
4348
+ i.addEventListener("dataavailable", (y) => {
4349
+ y.data && y.data.size > 0 && a.push(y.data);
4350
+ }), i.addEventListener("stop", () => {
4350
4351
  var y, M;
4351
4352
  if (n && clearInterval(n), t.getTracks().forEach((E) => {
4352
4353
  E.stop();
4353
- }), i.length) {
4354
- const E = r.mimeType || s || "video/webm", A = new Blob(i, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${T}.${q}`, {
4354
+ }), a.length) {
4355
+ const E = i.mimeType || s || "video/webm", A = new Blob(a, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${T}.${q}`, {
4355
4356
  type: E
4356
4357
  });
4357
- (y = e.onfinalize) == null || y.call(e, U);
4358
+ (y = e.onfinalize) == null || y.call(e, N);
4358
4359
  } else
4359
4360
  (M = e.oncancel) == null || M.call(e);
4360
4361
  }), t.getVideoTracks().forEach((y) => {
4361
- y.addEventListener("ended", () => o(), { once: !0 });
4362
+ y.addEventListener("ended", () => l(), { once: !0 });
4362
4363
  });
4363
- function o() {
4364
- if (!a && (a = !0, r.state !== "inactive"))
4364
+ function l() {
4365
+ if (!r && (r = !0, i.state !== "inactive"))
4365
4366
  try {
4366
- r.stop();
4367
+ i.stop();
4367
4368
  } catch (y) {
4368
4369
  console.error("[media] recorder stop", y);
4369
4370
  }
4370
4371
  }
4371
4372
  try {
4372
- r.start(1e3);
4373
+ i.start(1e3);
4373
4374
  } catch (y) {
4374
4375
  return console.error("[media] recorder start", y), t.getTracks().forEach((M) => {
4375
4376
  M.stop();
4376
4377
  }), null;
4377
4378
  }
4378
- (b = e.onstart) == null || b.call(e);
4379
+ (k = e.onstart) == null || k.call(e);
4379
4380
  const f = Date.now();
4380
4381
  return n = setInterval(() => {
4381
4382
  var y;
4382
4383
  (y = e.ontick) == null || y.call(e, Date.now() - f);
4383
4384
  }, 500), {
4384
- stop: o,
4385
+ stop: l,
4385
4386
  get state() {
4386
- return r.state;
4387
+ return i.state;
4387
4388
  }
4388
4389
  };
4389
4390
  }
@@ -4572,51 +4573,51 @@ const ci = [
4572
4573
  height: "14",
4573
4574
  "aria-hidden": "true"
4574
4575
  }, pi = ["d"], vi = ["placeholder", "disabled"], yi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
4575
- function ki(e, t, s, r, i, n) {
4576
+ function ki(e, t, s, i, a, n) {
4576
4577
  return c(), d("div", {
4577
4578
  class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4578
- style: z(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4579
+ style: z(a.kbOffset ? { transform: `translateY(-${a.kbOffset}px)` } : null)
4579
4580
  }, [
4580
- i.recording ? (c(), d("div", ui, [
4581
- t[8] || (t[8] = l("span", {
4581
+ a.recording ? (c(), d("div", ui, [
4582
+ t[8] || (t[8] = o("span", {
4582
4583
  class: "wm-rec__dot",
4583
4584
  "aria-hidden": "true"
4584
4585
  }, null, -1)),
4585
- l("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4586
- l("button", {
4586
+ o("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4587
+ o("button", {
4587
4588
  type: "button",
4588
4589
  class: "wm-rec__stop",
4589
- onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
4590
+ onClick: t[0] || (t[0] = (...r) => n.stopRecording && n.stopRecording(...r))
4590
4591
  }, v(n.t("composer.stop")), 1)
4591
- ])) : k("", !0),
4592
- l("form", {
4593
- class: R(["wm-compose", { "has-attach": i.attachOpen }]),
4594
- onSubmit: t[7] || (t[7] = J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4592
+ ])) : b("", !0),
4593
+ o("form", {
4594
+ class: R(["wm-compose", { "has-attach": a.attachOpen }]),
4595
+ onSubmit: t[7] || (t[7] = J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]))
4595
4596
  }, [
4596
- l("input", {
4597
+ o("input", {
4597
4598
  ref: "fileEl",
4598
4599
  type: "file",
4599
4600
  hidden: "",
4600
4601
  multiple: "",
4601
- onChange: t[1] || (t[1] = (...a) => n.onFile && n.onFile(...a))
4602
+ onChange: t[1] || (t[1] = (...r) => n.onFile && n.onFile(...r))
4602
4603
  }, null, 544),
4603
- i.attachOpen ? (c(), d("div", {
4604
+ a.attachOpen ? (c(), d("div", {
4604
4605
  key: 0,
4605
4606
  class: "wm-compose__overlay",
4606
- onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
4607
- })) : k("", !0),
4608
- i.attachOpen ? (c(), d("div", mi, [
4609
- (c(!0), d(I, null, j(n.attachItems, (a) => (c(), d("button", {
4610
- key: a.action,
4607
+ onClick: t[2] || (t[2] = (r) => a.attachOpen = !1)
4608
+ })) : b("", !0),
4609
+ a.attachOpen ? (c(), d("div", mi, [
4610
+ (c(!0), d(I, null, j(n.attachItems, (r) => (c(), d("button", {
4611
+ key: r.action,
4611
4612
  type: "button",
4612
4613
  class: "wm-compose__menuItem",
4613
- disabled: a.disabled,
4614
- onClick: (o) => n.onAttachAction(a.action)
4614
+ disabled: r.disabled,
4615
+ onClick: (l) => n.onAttachAction(r.action)
4615
4616
  }, [
4616
- l("span", _i, [
4617
+ o("span", _i, [
4617
4618
  (c(), d("svg", gi, [
4618
- l("path", {
4619
- d: a.path,
4619
+ o("path", {
4620
+ d: r.path,
4620
4621
  stroke: "currentColor",
4621
4622
  "stroke-width": "1.8",
4622
4623
  "stroke-linecap": "round",
@@ -4625,31 +4626,31 @@ function ki(e, t, s, r, i, n) {
4625
4626
  }, null, 8, pi)
4626
4627
  ]))
4627
4628
  ]),
4628
- l("span", null, v(a.label), 1)
4629
+ o("span", null, v(r.label), 1)
4629
4630
  ], 8, fi))), 128))
4630
- ])) : k("", !0),
4631
- G(l("textarea", {
4631
+ ])) : b("", !0),
4632
+ G(o("textarea", {
4632
4633
  ref: "inputEl",
4633
- "onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
4634
+ "onUpdate:modelValue": t[3] || (t[3] = (r) => a.local = r),
4634
4635
  class: "wm-compose__input",
4635
4636
  rows: "3",
4636
4637
  placeholder: s.placeholder,
4637
4638
  disabled: s.disabled,
4638
- onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
4639
- onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
4639
+ onKeydown: t[4] || (t[4] = (...r) => n.onKeydown && n.onKeydown(...r)),
4640
+ onInput: t[5] || (t[5] = (...r) => n.autosize && n.autosize(...r))
4640
4641
  }, null, 40, vi), [
4641
- [te, i.local]
4642
+ [te, a.local]
4642
4643
  ]),
4643
- l("div", yi, [
4644
- l("button", {
4644
+ o("div", yi, [
4645
+ o("button", {
4645
4646
  type: "button",
4646
- class: R(["wm-compose__icon", { "is-open": i.attachOpen }]),
4647
+ class: R(["wm-compose__icon", { "is-open": a.attachOpen }]),
4647
4648
  title: s.attachLabel,
4648
4649
  "aria-label": s.attachLabel,
4649
- disabled: i.recording,
4650
- onClick: t[6] || (t[6] = (a) => i.attachOpen = !i.attachOpen)
4650
+ disabled: a.recording,
4651
+ onClick: t[6] || (t[6] = (r) => a.attachOpen = !a.attachOpen)
4651
4652
  }, [...t[9] || (t[9] = [
4652
- l("svg", {
4653
+ o("svg", {
4653
4654
  width: "13",
4654
4655
  height: "13",
4655
4656
  viewBox: "0 0 24 24",
@@ -4660,16 +4661,16 @@ function ki(e, t, s, r, i, n) {
4660
4661
  "stroke-linejoin": "round",
4661
4662
  "aria-hidden": "true"
4662
4663
  }, [
4663
- l("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4664
+ o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4664
4665
  ], -1)
4665
4666
  ])], 10, wi),
4666
- l("button", {
4667
+ o("button", {
4667
4668
  type: "submit",
4668
4669
  class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
4669
4670
  disabled: !n.canSend,
4670
4671
  "aria-label": n.t("composer.send")
4671
4672
  }, [...t[10] || (t[10] = [
4672
- l("svg", {
4673
+ o("svg", {
4673
4674
  width: "13",
4674
4675
  height: "13",
4675
4676
  viewBox: "0 0 24 24",
@@ -4680,14 +4681,14 @@ function ki(e, t, s, r, i, n) {
4680
4681
  "stroke-linejoin": "round",
4681
4682
  "aria-hidden": "true"
4682
4683
  }, [
4683
- l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4684
+ o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4684
4685
  ], -1)
4685
4686
  ])], 10, bi)
4686
4687
  ])
4687
4688
  ], 34)
4688
4689
  ], 6);
4689
4690
  }
4690
- const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4691
+ const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4691
4692
  name: "WmSuggestionChips",
4692
4693
  props: {
4693
4694
  items: { type: Array, default: () => [] },
@@ -4705,21 +4706,21 @@ const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
4705
4706
  }
4706
4707
  }
4707
4708
  }, Si = ["onClick"];
4708
- function Mi(e, t, s, r, i, n) {
4709
+ function Ti(e, t, s, i, a, n) {
4709
4710
  return s.items.length ? (c(), d("div", {
4710
4711
  key: n.batchKey,
4711
4712
  class: "wm-chips"
4712
4713
  }, [
4713
- (c(!0), d(I, null, j(s.items, (a, o) => (c(), d("button", {
4714
- key: o,
4714
+ (c(!0), d(I, null, j(s.items, (r, l) => (c(), d("button", {
4715
+ key: l,
4715
4716
  type: "button",
4716
4717
  class: "wm-chip",
4717
- style: z({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
4718
- onClick: (f) => e.$emit("select", a)
4719
- }, v(a.label), 13, Si))), 128))
4720
- ])) : k("", !0);
4718
+ style: z({ animationDelay: s.baseDelay + l * s.stepDelay + "ms" }),
4719
+ onClick: (f) => e.$emit("select", r)
4720
+ }, v(r.label), 13, Si))), 128))
4721
+ ])) : b("", !0);
4721
4722
  }
4722
- const Ti = /* @__PURE__ */ N(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), xi = {
4723
+ const Mi = /* @__PURE__ */ P(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085"]]), xi = {
4723
4724
  name: "WmApprovalCard",
4724
4725
  components: { AIAvatar: oe },
4725
4726
  inject: {
@@ -4767,41 +4768,41 @@ const Ti = /* @__PURE__ */ N(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085
4767
4768
  key: 0,
4768
4769
  class: "wm-approval__detail"
4769
4770
  }, Pi = { class: "wm-approval__actions" };
4770
- function Ni(e, t, s, r, i, n) {
4771
- const a = B("AIAvatar");
4771
+ function Di(e, t, s, i, a, n) {
4772
+ const r = B("AIAvatar");
4772
4773
  return c(), d("div", Oi, [
4773
- l("div", Ri, [
4774
- l("div", Li, [
4775
- K(a, {
4774
+ o("div", Ri, [
4775
+ o("div", Li, [
4776
+ K(r, {
4776
4777
  size: 24,
4777
4778
  name: s.agentName,
4778
4779
  "image-url": s.agentAvatarUrl
4779
4780
  }, null, 8, ["name", "image-url"])
4780
4781
  ]),
4781
- l("div", Ii, [
4782
- l("div", Ei, v(s.action), 1),
4783
- s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : k("", !0)
4782
+ o("div", Ii, [
4783
+ o("div", Ei, v(s.action), 1),
4784
+ s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : b("", !0)
4784
4785
  ])
4785
4786
  ]),
4786
- l("div", Pi, [
4787
+ o("div", Pi, [
4787
4788
  n.rejectId ? (c(), d("button", {
4788
4789
  key: 0,
4789
4790
  type: "button",
4790
4791
  class: "wm-approval__btn wm-approval__btn--neutral",
4791
- onClick: t[0] || (t[0] = (o) => e.$emit("callback", n.rejectId))
4792
- }, v(n.rejectLabel), 1)) : k("", !0),
4792
+ onClick: t[0] || (t[0] = (l) => e.$emit("callback", n.rejectId))
4793
+ }, v(n.rejectLabel), 1)) : b("", !0),
4793
4794
  n.approveId ? (c(), d("button", {
4794
4795
  key: 1,
4795
4796
  type: "button",
4796
4797
  class: "wm-approval__btn wm-approval__btn--primary",
4797
- onClick: t[1] || (t[1] = (o) => e.$emit("callback", n.approveId))
4798
- }, v(n.approveLabel), 1)) : k("", !0)
4798
+ onClick: t[1] || (t[1] = (l) => e.$emit("callback", n.approveId))
4799
+ }, v(n.approveLabel), 1)) : b("", !0)
4799
4800
  ])
4800
4801
  ]);
4801
4802
  }
4802
- const Ui = /* @__PURE__ */ N(xi, [["render", Ni], ["__scopeId", "data-v-a2bed37e"]]);
4803
- let Ne = 0;
4804
- const Di = /* @__PURE__ */ new Set([
4803
+ const Ni = /* @__PURE__ */ P(xi, [["render", Di], ["__scopeId", "data-v-a2bed37e"]]);
4804
+ let De = 0;
4805
+ const Ui = /* @__PURE__ */ new Set([
4805
4806
  "text",
4806
4807
  "textarea",
4807
4808
  "number",
@@ -4826,8 +4827,8 @@ const Di = /* @__PURE__ */ new Set([
4826
4827
  },
4827
4828
  emits: ["submit"],
4828
4829
  data() {
4829
- return Ne += 1, {
4830
- _uid: Ne,
4830
+ return De += 1, {
4831
+ _uid: De,
4831
4832
  values: {},
4832
4833
  busy: !1,
4833
4834
  error: ""
@@ -4839,7 +4840,7 @@ const Di = /* @__PURE__ */ new Set([
4839
4840
  // douteux.
4840
4841
  normalizedFields() {
4841
4842
  var t;
4842
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Di.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4843
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Ui.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4843
4844
  }
4844
4845
  },
4845
4846
  created() {
@@ -4858,8 +4859,8 @@ const Di = /* @__PURE__ */ new Set([
4858
4859
  this.values = t, this.error = "";
4859
4860
  },
4860
4861
  toggleMulti(e, t, s) {
4861
- const r = Array.isArray(this.values[e]) ? this.values[e].slice() : [], i = r.indexOf(t);
4862
- s && i === -1 ? r.push(t) : !s && i !== -1 && r.splice(i, 1), this.values = { ...this.values, [e]: r };
4862
+ const i = Array.isArray(this.values[e]) ? this.values[e].slice() : [], a = i.indexOf(t);
4863
+ s && a === -1 ? i.push(t) : !s && a !== -1 && i.splice(a, 1), this.values = { ...this.values, [e]: i };
4863
4864
  },
4864
4865
  validate() {
4865
4866
  for (const e of this.normalizedFields) {
@@ -4919,144 +4920,144 @@ const Di = /* @__PURE__ */ new Set([
4919
4920
  key: 2,
4920
4921
  class: "wm-form__doneLbl"
4921
4922
  };
4922
- function ca(e, t, s, r, i, n) {
4923
- const a = B("AIAvatar");
4923
+ function ca(e, t, s, i, a, n) {
4924
+ const r = B("AIAvatar");
4924
4925
  return c(), d("div", Fi, [
4925
- l("div", Hi, [
4926
- l("div", zi, [
4927
- K(a, {
4926
+ o("div", Hi, [
4927
+ o("div", zi, [
4928
+ K(r, {
4928
4929
  size: 24,
4929
4930
  name: s.agentName,
4930
4931
  "image-url": s.agentAvatarUrl
4931
4932
  }, null, 8, ["name", "image-url"])
4932
4933
  ]),
4933
- l("div", qi, [
4934
- l("div", Vi, v(s.form.title || n.t("form.title")), 1),
4935
- s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : k("", !0)
4934
+ o("div", qi, [
4935
+ o("div", Vi, v(s.form.title || n.t("form.title")), 1),
4936
+ s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : b("", !0)
4936
4937
  ])
4937
4938
  ]),
4938
- l("form", {
4939
+ o("form", {
4939
4940
  class: "wm-form__body",
4940
- onSubmit: t[0] || (t[0] = J((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
4941
+ onSubmit: t[0] || (t[0] = J((...l) => n.onSubmit && n.onSubmit(...l), ["prevent"]))
4941
4942
  }, [
4942
- (c(!0), d(I, null, j(n.normalizedFields, (o) => (c(), d("div", {
4943
- key: o.key,
4943
+ (c(!0), d(I, null, j(n.normalizedFields, (l) => (c(), d("div", {
4944
+ key: l.key,
4944
4945
  class: "wm-form__field"
4945
4946
  }, [
4946
- l("label", {
4947
- for: `wm-f-${i._uid}-${o.key}`,
4947
+ o("label", {
4948
+ for: `wm-f-${a._uid}-${l.key}`,
4948
4949
  class: "wm-form__label"
4949
4950
  }, [
4950
- Se(v(o.label), 1),
4951
- o.required ? (c(), d("span", $i, "*")) : k("", !0)
4951
+ Se(v(l.label), 1),
4952
+ l.required ? (c(), d("span", $i, "*")) : b("", !0)
4952
4953
  ], 8, Wi),
4953
- o.type === "text" ? G((c(), d("input", {
4954
+ l.type === "text" ? G((c(), d("input", {
4954
4955
  key: 0,
4955
- id: `wm-f-${i._uid}-${o.key}`,
4956
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4956
+ id: `wm-f-${a._uid}-${l.key}`,
4957
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4957
4958
  type: "text",
4958
4959
  class: "wm-form__input",
4959
- placeholder: o.placeholder || "",
4960
- required: o.required,
4961
- disabled: s.readOnly || i.busy
4960
+ placeholder: l.placeholder || "",
4961
+ required: l.required,
4962
+ disabled: s.readOnly || a.busy
4962
4963
  }, null, 8, Gi)), [
4963
- [te, i.values[o.key]]
4964
- ]) : o.type === "textarea" ? G((c(), d("textarea", {
4964
+ [te, a.values[l.key]]
4965
+ ]) : l.type === "textarea" ? G((c(), d("textarea", {
4965
4966
  key: 1,
4966
- id: `wm-f-${i._uid}-${o.key}`,
4967
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4967
+ id: `wm-f-${a._uid}-${l.key}`,
4968
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4968
4969
  class: "wm-form__textarea",
4969
4970
  rows: "3",
4970
- placeholder: o.placeholder || "",
4971
- required: o.required,
4972
- disabled: s.readOnly || i.busy
4971
+ placeholder: l.placeholder || "",
4972
+ required: l.required,
4973
+ disabled: s.readOnly || a.busy
4973
4974
  }, null, 8, Yi)), [
4974
- [te, i.values[o.key]]
4975
- ]) : o.type === "number" ? G((c(), d("input", {
4975
+ [te, a.values[l.key]]
4976
+ ]) : l.type === "number" ? G((c(), d("input", {
4976
4977
  key: 2,
4977
- id: `wm-f-${i._uid}-${o.key}`,
4978
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4978
+ id: `wm-f-${a._uid}-${l.key}`,
4979
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4979
4980
  type: "number",
4980
4981
  class: "wm-form__input",
4981
- placeholder: o.placeholder || "",
4982
- required: o.required,
4983
- disabled: s.readOnly || i.busy
4982
+ placeholder: l.placeholder || "",
4983
+ required: l.required,
4984
+ disabled: s.readOnly || a.busy
4984
4985
  }, null, 8, Ji)), [
4985
4986
  [
4986
4987
  te,
4987
- i.values[o.key],
4988
+ a.values[l.key],
4988
4989
  void 0,
4989
4990
  { number: !0 }
4990
4991
  ]
4991
- ]) : o.type === "date" ? G((c(), d("input", {
4992
+ ]) : l.type === "date" ? G((c(), d("input", {
4992
4993
  key: 3,
4993
- id: `wm-f-${i._uid}-${o.key}`,
4994
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4994
+ id: `wm-f-${a._uid}-${l.key}`,
4995
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4995
4996
  type: "date",
4996
4997
  class: "wm-form__input",
4997
- required: o.required,
4998
- disabled: s.readOnly || i.busy
4998
+ required: l.required,
4999
+ disabled: s.readOnly || a.busy
4999
5000
  }, null, 8, Xi)), [
5000
- [te, i.values[o.key]]
5001
- ]) : o.type === "boolean" ? (c(), d("label", Qi, [
5002
- G(l("input", {
5003
- id: `wm-f-${i._uid}-${o.key}`,
5004
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
5001
+ [te, a.values[l.key]]
5002
+ ]) : l.type === "boolean" ? (c(), d("label", Qi, [
5003
+ G(o("input", {
5004
+ id: `wm-f-${a._uid}-${l.key}`,
5005
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
5005
5006
  type: "checkbox",
5006
- disabled: s.readOnly || i.busy
5007
+ disabled: s.readOnly || a.busy
5007
5008
  }, null, 8, Zi), [
5008
- [$e, i.values[o.key]]
5009
+ [$e, a.values[l.key]]
5009
5010
  ]),
5010
- l("span", null, v(o.placeholder || n.t("common.yes")), 1)
5011
- ])) : o.type === "select" ? G((c(), d("select", {
5011
+ o("span", null, v(l.placeholder || n.t("common.yes")), 1)
5012
+ ])) : l.type === "select" ? G((c(), d("select", {
5012
5013
  key: 5,
5013
- id: `wm-f-${i._uid}-${o.key}`,
5014
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
5014
+ id: `wm-f-${a._uid}-${l.key}`,
5015
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
5015
5016
  class: "wm-form__select",
5016
- required: o.required,
5017
- disabled: s.readOnly || i.busy
5017
+ required: l.required,
5018
+ disabled: s.readOnly || a.busy
5018
5019
  }, [
5019
- l("option", ta, v(o.placeholder || n.t("form.choose")), 1),
5020
- (c(!0), d(I, null, j(o.options, (f) => (c(), d("option", {
5020
+ o("option", ta, v(l.placeholder || n.t("form.choose")), 1),
5021
+ (c(!0), d(I, null, j(l.options, (f) => (c(), d("option", {
5021
5022
  key: f.value,
5022
5023
  value: f.value
5023
5024
  }, v(f.label), 9, na))), 128))
5024
5025
  ], 8, ea)), [
5025
- [Ge, i.values[o.key]]
5026
- ]) : o.type === "multiselect" ? (c(), d("div", sa, [
5027
- (c(!0), d(I, null, j(o.options, (f) => (c(), d("label", {
5026
+ [Ge, a.values[l.key]]
5027
+ ]) : l.type === "multiselect" ? (c(), d("div", sa, [
5028
+ (c(!0), d(I, null, j(l.options, (f) => (c(), d("label", {
5028
5029
  key: f.value,
5029
5030
  class: "wm-form__multiItem"
5030
5031
  }, [
5031
- l("input", {
5032
+ o("input", {
5032
5033
  type: "checkbox",
5033
5034
  value: f.value,
5034
- checked: Array.isArray(i.values[o.key]) && i.values[o.key].includes(f.value),
5035
- disabled: s.readOnly || i.busy,
5036
- onChange: (b) => n.toggleMulti(
5037
- o.key,
5035
+ checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(f.value),
5036
+ disabled: s.readOnly || a.busy,
5037
+ onChange: (k) => n.toggleMulti(
5038
+ l.key,
5038
5039
  f.value,
5039
- b.target.checked
5040
+ k.target.checked
5040
5041
  )
5041
5042
  }, null, 40, ra),
5042
- l("span", null, v(f.label), 1)
5043
+ o("span", null, v(f.label), 1)
5043
5044
  ]))), 128))
5044
- ])) : k("", !0)
5045
+ ])) : b("", !0)
5045
5046
  ]))), 128)),
5046
- i.error ? (c(), d("div", ia, v(i.error), 1)) : k("", !0),
5047
+ a.error ? (c(), d("div", ia, v(a.error), 1)) : b("", !0),
5047
5048
  s.readOnly ? (c(), d("div", la, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
5048
5049
  key: 1,
5049
5050
  type: "submit",
5050
5051
  class: "wm-form__submit",
5051
- disabled: i.busy
5052
+ disabled: a.busy
5052
5053
  }, [
5053
- i.busy ? (c(), d("span", oa)) : k("", !0),
5054
- l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5054
+ a.busy ? (c(), d("span", oa)) : b("", !0),
5055
+ o("span", null, v(a.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5055
5056
  ], 8, aa))
5056
5057
  ], 32)
5057
5058
  ]);
5058
5059
  }
5059
- const da = /* @__PURE__ */ N(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
5060
+ const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
5060
5061
  name: "WmFeedback",
5061
5062
  inject: {
5062
5063
  // Translator shared by the Messenger shell; French fallback when
@@ -5094,11 +5095,11 @@ const da = /* @__PURE__ */ N(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56
5094
5095
  key: 1,
5095
5096
  class: "wm-fb__done"
5096
5097
  }, ba = { class: "wm-fb__doneTitle" }, ka = { class: "wm-fb__doneSub" };
5097
- function Ca(e, t, s, r, i, n) {
5098
+ function Ca(e, t, s, i, a, n) {
5098
5099
  return c(), d("div", ha, [
5099
5100
  s.done ? (c(), d("div", wa, [
5100
- t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
5101
- l("svg", {
5101
+ t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
5102
+ o("svg", {
5102
5103
  width: "16",
5103
5104
  height: "16",
5104
5105
  viewBox: "0 0 24 24",
@@ -5109,35 +5110,35 @@ function Ca(e, t, s, r, i, n) {
5109
5110
  "stroke-linejoin": "round",
5110
5111
  "aria-hidden": "true"
5111
5112
  }, [
5112
- l("path", { d: "M20 6L9 17l-5-5" })
5113
+ o("path", { d: "M20 6L9 17l-5-5" })
5113
5114
  ])
5114
5115
  ], -1)),
5115
- l("div", ba, v(n.t("feedback.doneTitle")), 1),
5116
- l("div", ka, v(n.t("feedback.doneSubtitle")), 1)
5116
+ o("div", ba, v(n.t("feedback.doneTitle")), 1),
5117
+ o("div", ka, v(n.t("feedback.doneSubtitle")), 1)
5117
5118
  ])) : (c(), d(I, { key: 0 }, [
5118
- l("div", ma, v(n.t("feedback.question")), 1),
5119
- l("div", fa, v(n.t("feedback.subtitle")), 1),
5120
- l("div", _a, [
5121
- (c(!0), d(I, null, j(n.options, (a) => (c(), d("button", {
5122
- key: a.v,
5119
+ o("div", ma, v(n.t("feedback.question")), 1),
5120
+ o("div", fa, v(n.t("feedback.subtitle")), 1),
5121
+ o("div", _a, [
5122
+ (c(!0), d(I, null, j(n.options, (r) => (c(), d("button", {
5123
+ key: r.v,
5123
5124
  type: "button",
5124
- class: R(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5125
- onClick: (o) => i.sel = a.v
5125
+ class: R(["wm-fb__opt", { "is-selected": a.sel === r.v }]),
5126
+ onClick: (l) => a.sel = r.v
5126
5127
  }, [
5127
- l("span", pa, v(a.e), 1),
5128
- l("span", va, v(a.l), 1)
5128
+ o("span", pa, v(r.e), 1),
5129
+ o("span", va, v(r.l), 1)
5129
5130
  ], 10, ga))), 128))
5130
5131
  ]),
5131
- l("button", {
5132
+ o("button", {
5132
5133
  type: "button",
5133
5134
  class: "wm-fb__send",
5134
- disabled: !i.sel || s.busy,
5135
- onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
5135
+ disabled: !a.sel || s.busy,
5136
+ onClick: t[0] || (t[0] = (...r) => n.onSend && n.onSend(...r))
5136
5137
  }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ya)
5137
5138
  ], 64))
5138
5139
  ]);
5139
5140
  }
5140
- const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
5141
+ const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
5141
5142
  name: "WmMoreMenu",
5142
5143
  inject: {
5143
5144
  // Translator shared by the Messenger shell; French fallback when
@@ -5172,7 +5173,7 @@ const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
5172
5173
  this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
5173
5174
  }
5174
5175
  }
5175
- }, Ma = { class: "wm-mm" }, Ta = {
5176
+ }, Ta = { class: "wm-mm" }, Ma = {
5176
5177
  class: "wm-mm__pop",
5177
5178
  role: "menu"
5178
5179
  }, xa = {
@@ -5181,23 +5182,23 @@ const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
5181
5182
  }, Oa = { class: "wm-mm__label" }, Ra = { class: "wm-mm__label" }, La = {
5182
5183
  key: 1,
5183
5184
  class: "wm-mm__sep"
5184
- }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Na = { class: "wm-mm__label" };
5185
- function Ua(e, t, s, r, i, n) {
5186
- return c(), d("div", Ma, [
5187
- l("div", {
5185
+ }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Da = { class: "wm-mm__label" };
5186
+ function Na(e, t, s, i, a, n) {
5187
+ return c(), d("div", Ta, [
5188
+ o("div", {
5188
5189
  class: "wm-mm__scrim",
5189
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5190
+ onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5190
5191
  }),
5191
- l("div", Ta, [
5192
+ o("div", Ma, [
5192
5193
  s.canRename || s.canExport ? (c(), d("div", xa, [
5193
5194
  s.canRename ? (c(), d("button", {
5194
5195
  key: 0,
5195
5196
  type: "button",
5196
5197
  class: "wm-mm__item",
5197
- onClick: t[1] || (t[1] = (a) => n.emit("rename"))
5198
+ onClick: t[1] || (t[1] = (r) => n.emit("rename"))
5198
5199
  }, [
5199
- t[6] || (t[6] = l("span", { class: "wm-mm__icon" }, [
5200
- l("svg", {
5200
+ t[6] || (t[6] = o("span", { class: "wm-mm__icon" }, [
5201
+ o("svg", {
5201
5202
  width: "12",
5202
5203
  height: "12",
5203
5204
  viewBox: "0 0 24 24",
@@ -5208,20 +5209,20 @@ function Ua(e, t, s, r, i, n) {
5208
5209
  "stroke-linejoin": "round",
5209
5210
  "aria-hidden": "true"
5210
5211
  }, [
5211
- l("path", { d: "M12 20h9" }),
5212
- l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5212
+ o("path", { d: "M12 20h9" }),
5213
+ o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5213
5214
  ])
5214
5215
  ], -1)),
5215
- l("span", Oa, v(n.t("moreMenu.editTitle")), 1)
5216
- ])) : k("", !0),
5216
+ o("span", Oa, v(n.t("moreMenu.editTitle")), 1)
5217
+ ])) : b("", !0),
5217
5218
  s.canExport ? (c(), d("button", {
5218
5219
  key: 1,
5219
5220
  type: "button",
5220
5221
  class: "wm-mm__item",
5221
- onClick: t[2] || (t[2] = (a) => n.emit("export"))
5222
+ onClick: t[2] || (t[2] = (r) => n.emit("export"))
5222
5223
  }, [
5223
- t[7] || (t[7] = l("span", { class: "wm-mm__icon" }, [
5224
- l("svg", {
5224
+ t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
5225
+ o("svg", {
5225
5226
  width: "12",
5226
5227
  height: "12",
5227
5228
  viewBox: "0 0 24 24",
@@ -5232,22 +5233,22 @@ function Ua(e, t, s, r, i, n) {
5232
5233
  "stroke-linejoin": "round",
5233
5234
  "aria-hidden": "true"
5234
5235
  }, [
5235
- l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5236
+ o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5236
5237
  ])
5237
5238
  ], -1)),
5238
- l("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
5239
- t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
5240
- ])) : k("", !0)
5241
- ])) : k("", !0),
5242
- s.canRename || s.canExport ? (c(), d("div", La)) : k("", !0),
5243
- l("div", Ia, [
5244
- l("button", {
5239
+ o("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
5240
+ t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
5241
+ ])) : b("", !0)
5242
+ ])) : b("", !0),
5243
+ s.canRename || s.canExport ? (c(), d("div", La)) : b("", !0),
5244
+ o("div", Ia, [
5245
+ o("button", {
5245
5246
  type: "button",
5246
5247
  class: "wm-mm__item",
5247
- onClick: t[3] || (t[3] = (...a) => n.toggleSound && n.toggleSound(...a))
5248
+ onClick: t[3] || (t[3] = (...r) => n.toggleSound && n.toggleSound(...r))
5248
5249
  }, [
5249
- t[10] || (t[10] = l("span", { class: "wm-mm__icon" }, [
5250
- l("svg", {
5250
+ t[10] || (t[10] = o("span", { class: "wm-mm__icon" }, [
5251
+ o("svg", {
5251
5252
  width: "12",
5252
5253
  height: "12",
5253
5254
  viewBox: "0 0 24 24",
@@ -5258,28 +5259,28 @@ function Ua(e, t, s, r, i, n) {
5258
5259
  "stroke-linejoin": "round",
5259
5260
  "aria-hidden": "true"
5260
5261
  }, [
5261
- l("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5262
- l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5262
+ o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5263
+ o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5263
5264
  ])
5264
5265
  ], -1)),
5265
- l("span", Ea, v(n.t("moreMenu.sound")), 1),
5266
- l("span", {
5267
- class: R(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5266
+ o("span", Ea, v(n.t("moreMenu.sound")), 1),
5267
+ o("span", {
5268
+ class: R(["wm-mm__toggle", { "wm-mm__toggle--on": a.soundOn }])
5268
5269
  }, [...t[9] || (t[9] = [
5269
- l("span", { class: "wm-mm__knob" }, null, -1)
5270
+ o("span", { class: "wm-mm__knob" }, null, -1)
5270
5271
  ])], 2)
5271
5272
  ])
5272
5273
  ]),
5273
- t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
5274
- l("div", Ba, [
5274
+ t[13] || (t[13] = o("div", { class: "wm-mm__sep" }, null, -1)),
5275
+ o("div", Ba, [
5275
5276
  s.statusUrl ? (c(), d("button", {
5276
5277
  key: 0,
5277
5278
  type: "button",
5278
5279
  class: "wm-mm__item",
5279
- onClick: t[4] || (t[4] = (a) => n.emit("status"))
5280
+ onClick: t[4] || (t[4] = (r) => n.emit("status"))
5280
5281
  }, [
5281
- t[11] || (t[11] = l("span", { class: "wm-mm__icon" }, [
5282
- l("svg", {
5282
+ t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
5283
+ o("svg", {
5283
5284
  width: "12",
5284
5285
  height: "12",
5285
5286
  viewBox: "0 0 24 24",
@@ -5290,19 +5291,19 @@ function Ua(e, t, s, r, i, n) {
5290
5291
  "stroke-linejoin": "round",
5291
5292
  "aria-hidden": "true"
5292
5293
  }, [
5293
- l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5294
+ o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5294
5295
  ])
5295
5296
  ], -1)),
5296
- l("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
5297
- ])) : k("", !0),
5297
+ o("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
5298
+ ])) : b("", !0),
5298
5299
  s.helpUrl ? (c(), d("button", {
5299
5300
  key: 1,
5300
5301
  type: "button",
5301
5302
  class: "wm-mm__item",
5302
- onClick: t[5] || (t[5] = (a) => n.emit("help"))
5303
+ onClick: t[5] || (t[5] = (r) => n.emit("help"))
5303
5304
  }, [
5304
- t[12] || (t[12] = l("span", { class: "wm-mm__icon" }, [
5305
- l("svg", {
5305
+ t[12] || (t[12] = o("span", { class: "wm-mm__icon" }, [
5306
+ o("svg", {
5306
5307
  width: "12",
5307
5308
  height: "12",
5308
5309
  viewBox: "0 0 24 24",
@@ -5313,16 +5314,16 @@ function Ua(e, t, s, r, i, n) {
5313
5314
  "stroke-linejoin": "round",
5314
5315
  "aria-hidden": "true"
5315
5316
  }, [
5316
- l("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5317
+ o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5317
5318
  ])
5318
5319
  ], -1)),
5319
- l("span", Na, v(n.t("moreMenu.helpCenter")), 1)
5320
- ])) : k("", !0)
5320
+ o("span", Da, v(n.t("moreMenu.helpCenter")), 1)
5321
+ ])) : b("", !0)
5321
5322
  ])
5322
5323
  ])
5323
5324
  ]);
5324
5325
  }
5325
- const Da = /* @__PURE__ */ N(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5326
+ const Ua = /* @__PURE__ */ P(Sa, [["render", Na], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5326
5327
  name: "WmRenameDialog",
5327
5328
  inject: {
5328
5329
  // Translator shared by the Messenger shell; French fallback when
@@ -5369,22 +5370,22 @@ const Da = /* @__PURE__ */ N(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578
5369
5370
  role: "dialog",
5370
5371
  "aria-modal": "true"
5371
5372
  }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], Ka = { class: "wm-dialog__body" }, Wa = ["placeholder"], $a = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5372
- function Ya(e, t, s, r, i, n) {
5373
+ function Ya(e, t, s, i, a, n) {
5373
5374
  return c(), d("div", Fa, [
5374
- l("div", {
5375
+ o("div", {
5375
5376
  class: "wm-dialog__scrim",
5376
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5377
+ onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5377
5378
  }),
5378
- l("div", Ha, [
5379
- l("div", za, [
5380
- l("div", qa, v(s.title || n.t("rename.title")), 1),
5381
- l("button", {
5379
+ o("div", Ha, [
5380
+ o("div", za, [
5381
+ o("div", qa, v(s.title || n.t("rename.title")), 1),
5382
+ o("button", {
5382
5383
  type: "button",
5383
5384
  class: "wm-dialog__close",
5384
5385
  "aria-label": n.t("common.close"),
5385
- onClick: t[1] || (t[1] = (a) => e.$emit("close"))
5386
+ onClick: t[1] || (t[1] = (r) => e.$emit("close"))
5386
5387
  }, [...t[7] || (t[7] = [
5387
- l("svg", {
5388
+ o("svg", {
5388
5389
  width: "12",
5389
5390
  height: "12",
5390
5391
  viewBox: "0 0 24 24",
@@ -5395,43 +5396,43 @@ function Ya(e, t, s, r, i, n) {
5395
5396
  "stroke-linejoin": "round",
5396
5397
  "aria-hidden": "true"
5397
5398
  }, [
5398
- l("path", { d: "M18 6L6 18M6 6l12 12" })
5399
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
5399
5400
  ], -1)
5400
5401
  ])], 8, Va)
5401
5402
  ]),
5402
- l("div", Ka, [
5403
- G(l("input", {
5403
+ o("div", Ka, [
5404
+ G(o("input", {
5404
5405
  ref: "input",
5405
- "onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
5406
+ "onUpdate:modelValue": t[2] || (t[2] = (r) => a.value = r),
5406
5407
  type: "text",
5407
5408
  class: "wm-dialog__input",
5408
5409
  placeholder: s.placeholder || n.t("rename.placeholder"),
5409
5410
  maxlength: 120,
5410
5411
  onKeydown: [
5411
- t[3] || (t[3] = ge(J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
5412
- t[4] || (t[4] = ge(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5412
+ t[3] || (t[3] = ge(J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]), ["enter"])),
5413
+ t[4] || (t[4] = ge(J((r) => e.$emit("close"), ["prevent"]), ["esc"]))
5413
5414
  ]
5414
5415
  }, null, 40, Wa), [
5415
- [te, i.value]
5416
+ [te, a.value]
5416
5417
  ])
5417
5418
  ]),
5418
- l("div", $a, [
5419
- l("button", {
5419
+ o("div", $a, [
5420
+ o("button", {
5420
5421
  type: "button",
5421
5422
  class: "wm-dialog__btn",
5422
- onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5423
+ onClick: t[5] || (t[5] = (r) => e.$emit("close"))
5423
5424
  }, v(n.t("common.cancel")), 1),
5424
- l("button", {
5425
+ o("button", {
5425
5426
  type: "button",
5426
5427
  class: "wm-dialog__btn wm-dialog__btn--primary",
5427
5428
  disabled: !n.canSubmit,
5428
- onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
5429
+ onClick: t[6] || (t[6] = (...r) => n.onSubmit && n.onSubmit(...r))
5429
5430
  }, v(n.t("common.save")), 9, Ga)
5430
5431
  ])
5431
5432
  ])
5432
5433
  ]);
5433
5434
  }
5434
- const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", Xa = {
5435
+ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", Xa = {
5435
5436
  name: "Messenger",
5436
5437
  components: {
5437
5438
  Launcher: qt,
@@ -5440,11 +5441,11 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5440
5441
  History: hs,
5441
5442
  MessageList: ri,
5442
5443
  Composer: Ci,
5443
- SuggestionChips: Ti,
5444
- ApprovalCard: Ui,
5444
+ SuggestionChips: Mi,
5445
+ ApprovalCard: Ni,
5445
5446
  FormCard: da,
5446
5447
  Feedback: Aa,
5447
- MoreMenu: Da,
5448
+ MoreMenu: Ua,
5448
5449
  RenameDialog: Ja
5449
5450
  },
5450
5451
  mixins: [
@@ -5523,6 +5524,10 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5523
5524
  // PJ, formulaire, quick-link sans URL). Évite de polluer la liste
5524
5525
  // côté serveur avec des fils vides abandonnés.
5525
5526
  draftConv: null,
5527
+ // convId → true quand l'utilisateur a cliqué "Rouvrir" sur une conv
5528
+ // fermée : débloque le composer localement le temps qu'un message la
5529
+ // réactive côté serveur. Reset au reload (non persisté, volontaire).
5530
+ reopenedLocally: {},
5526
5531
  // When set, takes precedence over the latest-conversation
5527
5532
  // selection so the user can browse another thread from the
5528
5533
  // onboarding list without losing live updates on the others.
@@ -5603,9 +5608,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5603
5608
  // so the choice applies immediately, before the boot round-trip
5604
5609
  // that materializes `state.customer` has completed.
5605
5610
  customerLanguage() {
5606
- var s, r, i, n;
5607
- const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((r = e.values) == null ? void 0 : r.language));
5608
- return t || ((n = (i = this.context) == null ? void 0 : i.customer) == null ? void 0 : n.language) || "";
5611
+ var s, i, a, n;
5612
+ const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((i = e.values) == null ? void 0 : i.language));
5613
+ return t || ((n = (a = this.context) == null ? void 0 : a.customer) == null ? void 0 : n.language) || "";
5609
5614
  },
5610
5615
  // Resolved UI language, by priority:
5611
5616
  // 1. explicit `language` prop (consumer override)
@@ -5652,33 +5657,33 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5652
5657
  drawerConversations() {
5653
5658
  var s;
5654
5659
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
5655
- return this.allConversations.map((r) => {
5656
- var b;
5657
- const i = e[r.id] || [], n = Y(r.last_read_message_id);
5658
- let a = 0, o = null;
5659
- for (let y = i.length - 1; y >= 0; y--) {
5660
- const M = i[y];
5660
+ return this.allConversations.map((i) => {
5661
+ var k;
5662
+ const a = e[i.id] || [], n = Y(i.last_read_message_id);
5663
+ let r = 0, l = null;
5664
+ for (let y = a.length - 1; y >= 0; y--) {
5665
+ const M = a[y];
5661
5666
  if (!M) continue;
5662
- if (((b = M.author) == null ? void 0 : b.type) === "user") break;
5667
+ if (((k = M.author) == null ? void 0 : k.type) === "user") break;
5663
5668
  const E = Y(M.id);
5664
5669
  if (E != null) {
5665
5670
  if (n != null && E <= n) break;
5666
- t[M.id] !== 0 && (!o && M.author && (o = M.author), a++);
5671
+ t[M.id] !== 0 && (!l && M.author && (l = M.author), r++);
5667
5672
  }
5668
5673
  }
5669
- if (!i.length) {
5670
- const y = Y(r.last_message_id);
5671
- y != null && (n == null || y > n) && (a = 1, o = r.last_message_author || null);
5674
+ if (!a.length) {
5675
+ const y = Y(i.last_message_id);
5676
+ y != null && (n == null || y > n) && (r = 1, l = i.last_message_author || null);
5672
5677
  }
5673
- const f = i.filter(
5678
+ const f = a.filter(
5674
5679
  (y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
5675
5680
  );
5676
5681
  return {
5677
- ...r,
5678
- _preview: _t(r, f),
5679
- _unread: a > 0,
5680
- _unreadCount: a,
5681
- _lastAuthor: o
5682
+ ...i,
5683
+ _preview: _t(i, f),
5684
+ _unread: r > 0,
5685
+ _unreadCount: r,
5686
+ _lastAuthor: l
5682
5687
  };
5683
5688
  });
5684
5689
  },
@@ -5700,7 +5705,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5700
5705
  unread: !!s._unread,
5701
5706
  author: s._lastAuthor || null,
5702
5707
  _ts: Be(s, e[s.id] || [])
5703
- })).sort((s, r) => s._ts < r._ts ? 1 : s._ts > r._ts ? -1 : 0);
5708
+ })).sort((s, i) => s._ts < i._ts ? 1 : s._ts > i._ts ? -1 : 0);
5704
5709
  },
5705
5710
  // Unread threads (one entry per conv with unseen agent/human
5706
5711
  // activity), freshest first. Each entry carries everything the
@@ -5709,19 +5714,19 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5709
5714
  latestUnreads() {
5710
5715
  var s;
5711
5716
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
5712
- for (const r of this.drawerConversations) {
5713
- if (!r._unread) continue;
5714
- const i = Be(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
5717
+ for (const i of this.drawerConversations) {
5718
+ if (!i._unread) continue;
5719
+ const a = Be(i, e[i.id] || []), n = i._lastAuthor, r = !n || n.type === "agent_ia", l = (n == null ? void 0 : n.name) || (r ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (r ? this.agentAvatarUrl : null);
5715
5720
  t.push({
5716
- convId: r.id,
5717
- preview: r._preview || this.t("notification.youHaveNewMessage"),
5718
- ts: i,
5719
- count: r._unreadCount || 1,
5720
- senderName: o,
5721
+ convId: i.id,
5722
+ preview: i._preview || this.t("notification.youHaveNewMessage"),
5723
+ ts: a,
5724
+ count: i._unreadCount || 1,
5725
+ senderName: l,
5721
5726
  senderAvatarUrl: f
5722
5727
  });
5723
5728
  }
5724
- return t.sort((r, i) => r.ts < i.ts ? 1 : r.ts > i.ts ? -1 : 0), t;
5729
+ return t.sort((i, a) => i.ts < a.ts ? 1 : i.ts > a.ts ? -1 : 0), t;
5725
5730
  },
5726
5731
  // Notification cards shown in the closed-launcher stack: the unread
5727
5732
  // threads above, minus any the user has dismissed (×) for their
@@ -5757,7 +5762,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5757
5762
  var s;
5758
5763
  const e = (s = this.widget) == null ? void 0 : s.quick_links;
5759
5764
  if (!Array.isArray(e)) return "";
5760
- const t = e.find((r) => r.icon === "status" && r.url);
5765
+ const t = e.find((i) => i.icon === "status" && i.url);
5761
5766
  return (t == null ? void 0 : t.url) || "";
5762
5767
  },
5763
5768
  helpUrl() {
@@ -5765,7 +5770,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5765
5770
  const e = (s = this.widget) == null ? void 0 : s.quick_links;
5766
5771
  if (!Array.isArray(e)) return "";
5767
5772
  const t = e.find(
5768
- (r) => (r.icon === "chat" || r.icon === "help") && r.url
5773
+ (i) => (i.icon === "chat" || i.icon === "help") && i.url
5769
5774
  );
5770
5775
  return (t == null ? void 0 : t.url) || "";
5771
5776
  },
@@ -5832,12 +5837,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5832
5837
  // Last message from a human agent in the current conversation —
5833
5838
  // used to surface the human agent's name + avatar in the header.
5834
5839
  humanMessageAuthor() {
5835
- var t, s, r;
5840
+ var t, s, i;
5836
5841
  if (!this.currentConv) return null;
5837
5842
  const e = ((t = this.s.messagesByConv) == null ? void 0 : t[this.currentConv.id]) || [];
5838
- for (let i = e.length - 1; i >= 0; i--)
5839
- if (((r = (s = e[i]) == null ? void 0 : s.author) == null ? void 0 : r.type) === "agent_human")
5840
- return e[i].author;
5843
+ for (let a = e.length - 1; a >= 0; a--)
5844
+ if (((i = (s = e[a]) == null ? void 0 : s.author) == null ? void 0 : i.type) === "agent_human")
5845
+ return e[a].author;
5841
5846
  return null;
5842
5847
  },
5843
5848
  humanAgentName() {
@@ -5863,6 +5868,18 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5863
5868
  const e = (t = this.currentConv) == null ? void 0 : t.status;
5864
5869
  return e === "resolved" || e === "closed";
5865
5870
  },
5871
+ isClosed() {
5872
+ var e;
5873
+ return ((e = this.currentConv) == null ? void 0 : e.status) === "closed";
5874
+ },
5875
+ // Bloc "conversation terminée" (remplace le composer) : visible sur tout
5876
+ // statut terminal, SAUF si l'utilisateur a cliqué "Rouvrir" sur une conv
5877
+ // fermée — on rouvre alors le composer pour qu'un message la réactive
5878
+ // (règle serveur universelle : message client sur conv terminée → reopen).
5879
+ endedBlockVisible() {
5880
+ var e;
5881
+ return !(!this.isTerminal || this.isClosed && this.reopenedLocally[(e = this.currentConv) == null ? void 0 : e.id]);
5882
+ },
5866
5883
  headerTitle() {
5867
5884
  var e, t;
5868
5885
  return ((e = this.currentConv) == null ? void 0 : e.name) || ((t = this.widget) == null ? void 0 : t.name) || this.t("common.newConversation");
@@ -5873,37 +5890,37 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5873
5890
  }) : this.isWaitingHuman ? this.t("composer.agentTakingOver") : this.t("composer.placeholder");
5874
5891
  },
5875
5892
  displayedMessages() {
5876
- var i, n;
5893
+ var a, n;
5877
5894
  const e = this.currentConv;
5878
5895
  if (!e) return [];
5879
5896
  const t = this.welcomeRevealedAt[e.id] > 0 ? this.buildWelcomePrefix(e) : [];
5880
5897
  if (!e._draft) {
5881
- const a = (n = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : n[e.id];
5882
- if (!(a != null && a.loaded)) return t;
5898
+ const r = (n = (a = this.s) == null ? void 0 : a.paginationByConv) == null ? void 0 : n[e.id];
5899
+ if (!(r != null && r.loaded)) return t;
5883
5900
  }
5884
- const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
5885
- var o, f, b, y, M;
5886
- return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (M = a == null ? void 0 : a.metadata) != null && M.form ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5901
+ const s = this.revealedAt, i = (this.s.messagesByConv[e.id] || []).filter((r) => {
5902
+ var l, f, k, y, M;
5903
+ return (r == null ? void 0 : r.type) === "action" && ((l = r == null ? void 0 : r.payload) == null ? void 0 : l.state) === "pending" || he(r) && !(s[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((f = r == null ? void 0 : r.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = r == null ? void 0 : r.payload) == null ? void 0 : k.attachments) && r.payload.attachments.length || (y = r == null ? void 0 : r.metadata) != null && y.artifact || (M = r == null ? void 0 : r.metadata) != null && M.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5887
5904
  });
5888
- return t.length ? [...t, ...r] : r;
5905
+ return t.length ? [...t, ...i] : i;
5889
5906
  },
5890
5907
  // True whenever we should show the "typing" indicator at the bottom
5891
5908
  // of the list: either the LLM is actively streaming tokens, or one
5892
5909
  // or more agent messages are queued and waiting for their reveal
5893
5910
  // slot to fire.
5894
5911
  streamingActive() {
5895
- var s, r, i;
5912
+ var s, i, a;
5896
5913
  const e = this.currentConv;
5897
- return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((i = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : i[e.id]) || []).some(
5914
+ return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((a = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : a[e.id]) || []).some(
5898
5915
  (n) => he(n) && !(this.revealedAt[n.id] > 0)
5899
5916
  ) : !1;
5900
5917
  },
5901
5918
  // Internal: the raw persisted list for the current conversation. We
5902
5919
  // watch this to detect new agent messages that need to be paced.
5903
5920
  currentConvMessages() {
5904
- var t, s, r;
5921
+ var t, s, i;
5905
5922
  const e = (t = this.currentConv) == null ? void 0 : t.id;
5906
- return e ? ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e]) || [] : [];
5923
+ return e ? ((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e]) || [] : [];
5907
5924
  },
5908
5925
  pendingApproval() {
5909
5926
  return !this.currentConv || !this.store || this.actionInFlight ? null : this.store.getPendingApproval(this.currentConv.id);
@@ -5912,13 +5929,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5912
5929
  // `metadata.resolution_request` dont les callbacks ne sont pas encore
5913
5930
  // consommés (le serveur les clear au clic) et sans clic optimiste en vol.
5914
5931
  pendingResolution() {
5915
- var t, s, r, i, n;
5932
+ var t, s, i, a, n;
5916
5933
  if (!this.currentConv || !this.store || this.actionInFlight || this.pendingApproval) return null;
5917
5934
  const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
5918
- for (let a = e.length - 1; a >= 0; a--) {
5919
- const o = e[a];
5920
- if ((r = o == null ? void 0 : o.metadata) != null && r.resolution_request)
5921
- return !Array.isArray(o.callbacks) || !o.callbacks.length || (n = (i = this.s) == null ? void 0 : i.awaitingCallback) != null && n[o.id] ? null : o;
5935
+ for (let r = e.length - 1; r >= 0; r--) {
5936
+ const l = e[r];
5937
+ if ((i = l == null ? void 0 : l.metadata) != null && i.resolution_request)
5938
+ return !Array.isArray(l.callbacks) || !l.callbacks.length || (n = (a = this.s) == null ? void 0 : a.awaitingCallback) != null && n[l.id] ? null : l;
5922
5939
  }
5923
5940
  return null;
5924
5941
  },
@@ -5934,14 +5951,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5934
5951
  return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((s = this.pendingApproval) == null ? void 0 : s.text_md) || this.t("action.title");
5935
5952
  },
5936
5953
  approvalDetail() {
5937
- var r, i, n, a, o, f;
5938
- const e = (n = (i = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : i.pending) == null ? void 0 : n.user_explanation;
5954
+ var i, a, n, r, l, f;
5955
+ const e = (n = (a = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : a.pending) == null ? void 0 : n.user_explanation;
5939
5956
  if (typeof e == "string" && e.trim())
5940
5957
  return e.trim();
5941
- const t = (f = (o = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : o.pending) == null ? void 0 : f.prepared_params;
5958
+ const t = (f = (l = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : l.pending) == null ? void 0 : f.prepared_params;
5942
5959
  if (!t || typeof t != "object") return "";
5943
5960
  const s = Object.entries(t);
5944
- return s.length ? s.slice(0, 2).map(([b, y]) => `${b}: ${y}`).join(" · ") : "";
5961
+ return s.length ? s.slice(0, 2).map(([k, y]) => `${k}: ${y}`).join(" · ") : "";
5945
5962
  },
5946
5963
  actionInFlight() {
5947
5964
  var e, t;
@@ -5953,7 +5970,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5953
5970
  return e ? ((t = e.payload) == null ? void 0 : t.name) || e.text_md || this.t("common.action") : "";
5954
5971
  },
5955
5972
  suggestions() {
5956
- return this.currentConv ? this.streamingActive ? [] : this.pendingForm ? [] : this.conversationIsEmpty ? this.starterPrompts : this.store ? this.store.getLatestSuggestions(this.currentConv.id) : [] : [];
5973
+ return this.currentConv ? this.isTerminal ? [] : this.streamingActive ? [] : this.pendingForm ? [] : this.conversationIsEmpty ? this.starterPrompts : this.store ? this.store.getLatestSuggestions(this.currentConv.id) : [] : [];
5957
5974
  },
5958
5975
  // True for drafts and for real conversations that the server
5959
5976
  // still holds no message for — i.e. the user hasn't sent
@@ -5961,9 +5978,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5961
5978
  // welcome bubble is client-side only and intentionally not
5962
5979
  // counted here.
5963
5980
  conversationIsEmpty() {
5964
- var s, r;
5981
+ var s, i;
5965
5982
  const e = this.currentConv;
5966
- return e ? e._draft ? !0 : (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).length === 0 : !1;
5983
+ return e ? e._draft ? !0 : (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).length === 0 : !1;
5967
5984
  },
5968
5985
  // Maps `widget.starter_prompts` ({ title, message }) into the
5969
5986
  // SuggestionChips shape so they render alongside / in place of
@@ -5976,14 +5993,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5976
5993
  const e = (s = this.widget) == null ? void 0 : s.starter_prompts;
5977
5994
  if (!Array.isArray(e)) return [];
5978
5995
  const t = [];
5979
- for (const r of e) {
5980
- if (!r || typeof r != "object") continue;
5981
- const i = typeof r.title == "string" ? r.title.trim() : "";
5982
- if (!i) continue;
5983
- const n = typeof r.message == "string" ? r.message.trim() : "";
5996
+ for (const i of e) {
5997
+ if (!i || typeof i != "object") continue;
5998
+ const a = typeof i.title == "string" ? i.title.trim() : "";
5999
+ if (!a) continue;
6000
+ const n = typeof i.message == "string" ? i.message.trim() : "";
5984
6001
  t.push({
5985
- label: i,
5986
- text: n || i,
6002
+ label: a,
6003
+ text: n || a,
5987
6004
  kind: "starter"
5988
6005
  });
5989
6006
  }
@@ -6004,17 +6021,17 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6004
6021
  return e ? this.feedbackDone ? !0 : e.status !== "resolved" ? !1 : !((t = e.metadata) != null && t.feedback) : !1;
6005
6022
  },
6006
6023
  floatVisible() {
6007
- return this.approvalReady || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
6024
+ return this.approvalReady || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
6008
6025
  },
6009
6026
  dateLabel() {
6010
- var s, r, i;
6027
+ var s, i, a;
6011
6028
  const e = this.currentConv;
6012
6029
  let t = /* @__PURE__ */ new Date();
6013
6030
  if (e) {
6014
- const a = ((i = (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).find((o) => o == null ? void 0 : o.created_at)) == null ? void 0 : i.created_at) || e.created_at;
6015
- if (a) {
6016
- const o = new Date(a);
6017
- Number.isNaN(o.getTime()) || (t = o);
6031
+ const r = ((a = (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : a.created_at) || e.created_at;
6032
+ if (r) {
6033
+ const l = new Date(r);
6034
+ Number.isNaN(l.getTime()) || (t = l);
6018
6035
  }
6019
6036
  }
6020
6037
  return this.t("messageList.today", {
@@ -6026,8 +6043,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6026
6043
  // history available, nothing loading) so the loader stays inert
6027
6044
  // until `openConversation` has populated the entry.
6028
6045
  paginationState() {
6029
- var s, r, i;
6030
- const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (i = (r = this.s) == null ? void 0 : r.paginationByConv) == null ? void 0 : i[e] : null;
6046
+ var s, i, a;
6047
+ const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (a = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : a[e] : null;
6031
6048
  return {
6032
6049
  loading: !!(t != null && t.loading),
6033
6050
  hasMore: !!(t != null && t.nextCursor)
@@ -6042,13 +6059,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6042
6059
  // ts comparison in `launcherPeeks`.
6043
6060
  latestUnreads: {
6044
6061
  handler(e) {
6045
- const t = new Set(e.map((a) => a.convId)), s = this.dismissedPeeks || {}, r = Object.keys(s);
6046
- if (!r.length) return;
6047
- const i = {};
6062
+ const t = new Set(e.map((r) => r.convId)), s = this.dismissedPeeks || {}, i = Object.keys(s);
6063
+ if (!i.length) return;
6064
+ const a = {};
6048
6065
  let n = !1;
6049
- for (const a of r)
6050
- t.has(a) ? i[a] = s[a] : n = !0;
6051
- n && (this.dismissedPeeks = i);
6066
+ for (const r of i)
6067
+ t.has(r) ? a[r] = s[r] : n = !0;
6068
+ n && (this.dismissedPeeks = a);
6052
6069
  },
6053
6070
  deep: !0
6054
6071
  },
@@ -6123,9 +6140,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6123
6140
  }
6124
6141
  },
6125
6142
  async mounted() {
6126
- if (typeof document < "u" && !document.getElementById(Ue)) {
6143
+ if (typeof document < "u" && !document.getElementById(Ne)) {
6127
6144
  const e = document.createElement("style");
6128
- e.id = Ue, e.textContent = rt, document.head.appendChild(e);
6145
+ e.id = Ne, e.textContent = rt, document.head.appendChild(e);
6129
6146
  }
6130
6147
  this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
6131
6148
  },
@@ -6161,8 +6178,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6161
6178
  const t = e == null ? void 0 : e.data;
6162
6179
  if (!(!t || typeof t != "object")) {
6163
6180
  if (t.type === "UPDATE") {
6164
- this.transport && t.payload && this.transport.update(t.payload).catch((r) => {
6165
- console.warn("[messenger] update failed", r);
6181
+ this.transport && t.payload && this.transport.update(t.payload).catch((i) => {
6182
+ console.warn("[messenger] update failed", i);
6166
6183
  });
6167
6184
  return;
6168
6185
  }
@@ -6170,8 +6187,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6170
6187
  this.transport && t.payload && this.transport.context(t.payload);
6171
6188
  return;
6172
6189
  }
6173
- t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((r) => {
6174
- console.warn("[messenger] eager boot failed", r);
6190
+ t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((i) => {
6191
+ console.warn("[messenger] eager boot failed", i);
6175
6192
  }));
6176
6193
  }
6177
6194
  },
@@ -6205,8 +6222,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6205
6222
  variables: e && typeof e == "object" ? e : void 0
6206
6223
  }), e && typeof e == "object") {
6207
6224
  const t = {};
6208
- for (const [s, r] of Object.entries(e))
6209
- s !== "customer" && r && typeof r == "object" && !Array.isArray(r) && (t[s] = r);
6225
+ for (const [s, i] of Object.entries(e))
6226
+ s !== "customer" && i && typeof i == "object" && !Array.isArray(i) && (t[s] = i);
6210
6227
  Object.keys(t).length > 0 && this.transport.context(t);
6211
6228
  }
6212
6229
  this.setupLiveReveal();
@@ -6232,12 +6249,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6232
6249
  return;
6233
6250
  }
6234
6251
  this.floatRO = new ResizeObserver((s) => {
6235
- const r = s[0];
6236
- if (!r) return;
6237
- const i = Math.ceil(r.contentRect.height + 8);
6238
- i !== this.floatHeight && (this.floatHeight = i, this.$nextTick(() => {
6239
- var n, a;
6240
- (a = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || a.call(n);
6252
+ const i = s[0];
6253
+ if (!i) return;
6254
+ const a = Math.ceil(i.contentRect.height + 8);
6255
+ a !== this.floatHeight && (this.floatHeight = a, this.$nextTick(() => {
6256
+ var n, r;
6257
+ (r = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || r.call(n);
6241
6258
  }));
6242
6259
  }), this.floatRO.observe(t);
6243
6260
  }
@@ -6291,37 +6308,37 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6291
6308
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6292
6309
  },
6293
6310
  sendCurrentLauncherSize() {
6294
- var y, M, E, A, q, T, U;
6311
+ var y, M, E, A, q, T, N;
6295
6312
  if (this.isOpen) return;
6296
6313
  const e = (M = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : M.call(y, ".wm-launcherWrap");
6297
6314
  if (!e) return;
6298
6315
  const t = e.getBoundingClientRect();
6299
6316
  if (!t.width || !t.height) return;
6300
- const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), o = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6301
- let b = null;
6317
+ const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, i = 16, a = Math.ceil(t.width), n = Math.ceil(t.height), r = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (N = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : N.call(T, ".wm-peek"), f = l && l.length ? l[l.length - 1] : null;
6318
+ let k = null;
6302
6319
  if (f) {
6303
- const D = f.getBoundingClientRect();
6304
- b = {
6305
- width: Math.ceil(D.width),
6306
- height: Math.ceil(D.height),
6307
- rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
6308
- bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
6320
+ const U = f.getBoundingClientRect();
6321
+ k = {
6322
+ width: Math.ceil(U.width),
6323
+ height: Math.ceil(U.height),
6324
+ rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
6325
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
6309
6326
  };
6310
6327
  }
6311
6328
  this.notifyParentResize("closed", {
6312
- width: i + r,
6313
- height: n + r,
6314
- launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
6315
- launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
6329
+ width: a + i,
6330
+ height: n + i,
6331
+ launcherWidth: (r == null ? void 0 : r.offsetWidth) || null,
6332
+ launcherHeight: (r == null ? void 0 : r.offsetHeight) || null,
6316
6333
  launcherHovered: this.launcherHovered,
6317
- peek: b,
6334
+ peek: k,
6318
6335
  peekHovered: this.launcherHovered && s
6319
6336
  });
6320
6337
  },
6321
6338
  observeLauncherSize() {
6322
- var s, r;
6339
+ var s, i;
6323
6340
  if (typeof ResizeObserver > "u") return;
6324
- const e = (r = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : r.call(s, ".wm-launcherWrap");
6341
+ const e = (i = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : i.call(s, ".wm-launcherWrap");
6325
6342
  if (!e) return;
6326
6343
  this._launcherRo && this._launcherRo.disconnect();
6327
6344
  const t = new ResizeObserver(() => {
@@ -6332,9 +6349,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6332
6349
  // Opening straight from a notification card: land on that card's
6333
6350
  // thread rather than whatever was last active.
6334
6351
  async openFromPeek(e) {
6335
- var s, r;
6352
+ var s, i;
6336
6353
  const t = e || ((s = this.latestUnreads[0]) == null ? void 0 : s.convId);
6337
- t && t !== ((r = this.currentConv) == null ? void 0 : r.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
6354
+ t && t !== ((i = this.currentConv) == null ? void 0 : i.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
6338
6355
  },
6339
6356
  // Stamp the dismissed batch ts for a single conv so its card
6340
6357
  // disappears from the stack until a fresher message arrives.
@@ -6355,6 +6372,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6355
6372
  created_at: (/* @__PURE__ */ new Date()).toISOString()
6356
6373
  }, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, this.focusComposer();
6357
6374
  },
6375
+ // "Rouvrir" sur une conv fermée : débloque le composer localement. Le
6376
+ // prochain message envoyé rouvre la conv côté serveur (règle universelle
6377
+ // message-sur-conv-terminée → reopen). Pas d'appel réseau ici.
6378
+ onReopen() {
6379
+ var t;
6380
+ const e = (t = this.currentConv) == null ? void 0 : t.id;
6381
+ e && (this.reopenedLocally = { ...this.reopenedLocally, [e]: !0 }, this.focusComposer());
6382
+ },
6358
6383
  // Materialize the draft into a real server-side conversation. Returns
6359
6384
  // the freshly-created conv (so callers can `send` against its id) or
6360
6385
  // `null` if the creation failed.
@@ -6434,17 +6459,17 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6434
6459
  ...this.welcomeRevealedAt,
6435
6460
  [e]: 0
6436
6461
  };
6437
- const i = this.revealPacing, n = t.trim().length, a = Math.min(
6438
- i.maxTypingMs,
6439
- Math.max(i.minTypingMs, n * i.msPerChar)
6440
- ), o = i.firstRevealDelayMs + a, f = setTimeout(() => {
6462
+ const a = this.revealPacing, n = t.trim().length, r = Math.min(
6463
+ a.maxTypingMs,
6464
+ Math.max(a.minTypingMs, n * a.msPerChar)
6465
+ ), l = a.firstRevealDelayMs + r, f = setTimeout(() => {
6441
6466
  this.welcomeRevealedAt = {
6442
6467
  ...this.welcomeRevealedAt,
6443
6468
  [e]: Date.now()
6444
6469
  };
6445
- const b = { ...this.welcomeRevealTimers };
6446
- delete b[e], this.welcomeRevealTimers = b;
6447
- }, o);
6470
+ const k = { ...this.welcomeRevealTimers };
6471
+ delete k[e], this.welcomeRevealTimers = k;
6472
+ }, l);
6448
6473
  this.welcomeRevealTimers = {
6449
6474
  ...this.welcomeRevealTimers,
6450
6475
  [e]: f
@@ -6474,10 +6499,10 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6474
6499
  this.draftConv = null, this.activeConvId = e.id, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = t;
6475
6500
  try {
6476
6501
  await this.store.openConversation(e.id);
6477
- } catch (r) {
6478
- console.error("[ww-messenger] open conv failed", r);
6502
+ } catch (i) {
6503
+ console.error("[ww-messenger] open conv failed", i);
6479
6504
  }
6480
- const s = this.allConversations.find((r) => r.id === e.id);
6505
+ const s = this.allConversations.find((i) => i.id === e.id);
6481
6506
  s && this.markConvRead(s);
6482
6507
  },
6483
6508
  async onMoreAction(e) {
@@ -6521,8 +6546,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6521
6546
  if (!(!s || s === t.name))
6522
6547
  try {
6523
6548
  await this.store.patchConversation(t.id, { name: s });
6524
- } catch (r) {
6525
- console.error("[ww-messenger] rename failed", r);
6549
+ } catch (i) {
6550
+ console.error("[ww-messenger] rename failed", i);
6526
6551
  }
6527
6552
  },
6528
6553
  // ── Send / suggestion / form / attach / feedback ────────────────
@@ -6530,14 +6555,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6530
6555
  let t = this.currentConv;
6531
6556
  if (!t && (this.startConv(), t = this.currentConv, !t) || t._draft && (t = await this.ensureRealConv(), !t))
6532
6557
  return;
6533
- const s = t.id, r = this.pendingAttachments.slice();
6558
+ const s = t.id, i = this.pendingAttachments.slice();
6534
6559
  this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
6535
- const i = r.map((n) => {
6536
- const { previewUrl: a, ...o } = n;
6537
- return o;
6560
+ const a = i.map((n) => {
6561
+ const { previewUrl: r, ...l } = n;
6562
+ return l;
6538
6563
  });
6539
6564
  await this.store.send(s, e, {
6540
- attachments: i.length ? i : void 0
6565
+ attachments: a.length ? a : void 0
6541
6566
  });
6542
6567
  },
6543
6568
  async onSuggestion(e) {
@@ -6562,8 +6587,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6562
6587
  if (!(t != null && t.form)) return;
6563
6588
  const s = ht(t.form, e, this.translator);
6564
6589
  if (!s) return;
6565
- let r = this.currentConv;
6566
- r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
6590
+ let i = this.currentConv;
6591
+ i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, s, {
6567
6592
  metadata: {
6568
6593
  artifact: mt(
6569
6594
  t.form,
@@ -6591,23 +6616,23 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6591
6616
  var t, s;
6592
6617
  if (!(!e || !this.transport))
6593
6618
  try {
6594
- const r = await this.transport.uploadAttachment(e), i = (r == null ? void 0 : r.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((r == null ? void 0 : r.mime_type) || "").toLowerCase().startsWith("image/");
6619
+ const i = await this.transport.uploadAttachment(e), a = (i == null ? void 0 : i.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((i == null ? void 0 : i.mime_type) || "").toLowerCase().startsWith("image/");
6595
6620
  let n = null;
6596
- if (i)
6621
+ if (a)
6597
6622
  try {
6598
- n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, r.path)) || null;
6623
+ n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, i.path)) || null;
6599
6624
  } catch {
6600
6625
  }
6601
6626
  this.pendingAttachments.push({
6602
- type: r.type || "file",
6603
- path: r.path,
6627
+ type: i.type || "file",
6628
+ path: i.path,
6604
6629
  name: e.name || this.t("attachment.fileFallbackName"),
6605
6630
  mime_type: e.type,
6606
6631
  size_bytes: e.size,
6607
6632
  previewUrl: n
6608
6633
  });
6609
- } catch (r) {
6610
- console.error("[ww-messenger] attachment upload failed", r);
6634
+ } catch (i) {
6635
+ console.error("[ww-messenger] attachment upload failed", i);
6611
6636
  }
6612
6637
  },
6613
6638
  // Délégation des clics sur les liens `<a href="#...">` rendus dans le
@@ -6702,41 +6727,41 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6702
6727
  role: "status",
6703
6728
  "aria-live": "polite"
6704
6729
  }, po = { class: "wm-ended__lbl" };
6705
- function vo(e, t, s, r, i, n) {
6706
- const a = B("Launcher"), o = B("Header"), f = B("History"), b = B("Onboarding"), y = B("MessageList"), M = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), T = B("Composer"), U = B("MoreMenu"), D = B("RenameDialog");
6730
+ function vo(e, t, s, i, a, n) {
6731
+ const r = B("Launcher"), l = B("Header"), f = B("History"), k = B("Onboarding"), y = B("MessageList"), M = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), T = B("Composer"), N = B("MoreMenu"), U = B("RenameDialog");
6707
6732
  return c(), d("div", {
6708
6733
  class: R(["wm-root", `wm-root--${s.displayMode}`]),
6709
6734
  style: z(n.rootStyle)
6710
6735
  }, [
6711
- !i.isOpen && !n.isEmbedded ? (c(), P(a, {
6736
+ !a.isOpen && !n.isEmbedded ? (c(), D(r, {
6712
6737
  key: 0,
6713
6738
  "unread-count": n.unreadCount,
6714
6739
  peeks: n.launcherPeeks,
6715
6740
  onOpen: n.openFromPeek,
6716
6741
  onDismiss: n.dismissPeek,
6717
6742
  onHover: n.onLauncherHover
6718
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
6719
- i.isOpen || n.isEmbedded ? (c(), d("section", {
6743
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6744
+ a.isOpen || n.isEmbedded ? (c(), d("section", {
6720
6745
  key: 1,
6721
6746
  class: R([
6722
6747
  "wm-panel",
6723
6748
  `wm-panel--${s.displayMode}`,
6724
6749
  { "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
6725
6750
  ]),
6726
- style: z(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6751
+ style: z(a.floatHeight ? { "--wm-float-h": a.floatHeight + "px" } : null),
6727
6752
  role: "dialog",
6728
6753
  "aria-label": "Messenger",
6729
6754
  onClick: t[7] || (t[7] = (...L) => n.onPanelClick && n.onPanelClick(...L))
6730
6755
  }, [
6731
6756
  !n.ready && !n.error ? (c(), d("div", Qa, [
6732
- n.isEmbedded ? k("", !0) : (c(), d("button", {
6757
+ n.isEmbedded ? b("", !0) : (c(), d("button", {
6733
6758
  key: 0,
6734
6759
  type: "button",
6735
6760
  class: "wm-loading__close",
6736
6761
  "aria-label": n.t("loading.minimize"),
6737
6762
  onClick: t[0] || (t[0] = (...L) => n.close && n.close(...L))
6738
6763
  }, [...t[8] || (t[8] = [
6739
- l("svg", {
6764
+ o("svg", {
6740
6765
  width: "13",
6741
6766
  height: "13",
6742
6767
  viewBox: "0 0 24 24",
@@ -6747,22 +6772,22 @@ function vo(e, t, s, r, i, n) {
6747
6772
  "stroke-linejoin": "round",
6748
6773
  "aria-hidden": "true"
6749
6774
  }, [
6750
- l("path", { d: "M18 6L6 18M6 6l12 12" })
6775
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
6751
6776
  ], -1)
6752
6777
  ])], 8, Za)),
6753
- t[9] || (t[9] = l("div", {
6778
+ t[9] || (t[9] = o("div", {
6754
6779
  class: "wm-loading__spinner",
6755
6780
  "aria-hidden": "true"
6756
6781
  }, null, -1))
6757
6782
  ])) : (c(), d(I, { key: 1 }, [
6758
- K(o, {
6783
+ K(l, {
6759
6784
  title: n.headerTitle,
6760
6785
  "team-members": n.teamMembers,
6761
6786
  "response-label": n.responseLabel,
6762
6787
  "show-identity": !!n.currentConv,
6763
6788
  "show-back": n.canBack,
6764
6789
  "show-close": !n.isEmbedded,
6765
- "more-active": i.moreOpen,
6790
+ "more-active": a.moreOpen,
6766
6791
  "agent-name": n.agentName,
6767
6792
  "agent-avatar-url": n.agentAvatarUrl,
6768
6793
  onBack: n.goHome,
@@ -6770,9 +6795,9 @@ function vo(e, t, s, r, i, n) {
6770
6795
  onClose: n.close
6771
6796
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6772
6797
  n.error ? (c(), d("div", eo, [
6773
- l("div", to, [
6774
- t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
6775
- l("svg", {
6798
+ o("div", to, [
6799
+ t[10] || (t[10] = o("div", { class: "wm-state__errIcon" }, [
6800
+ o("svg", {
6776
6801
  width: "14",
6777
6802
  height: "14",
6778
6803
  viewBox: "0 0 24 24",
@@ -6783,15 +6808,15 @@ function vo(e, t, s, r, i, n) {
6783
6808
  "stroke-linejoin": "round",
6784
6809
  "aria-hidden": "true"
6785
6810
  }, [
6786
- l("path", { d: "M18 6L6 18M6 6l12 12" })
6811
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
6787
6812
  ])
6788
6813
  ], -1)),
6789
- l("div", null, [
6790
- l("div", no, v(n.t("error.connectionFailed")), 1),
6791
- l("div", so, v(n.error), 1)
6814
+ o("div", null, [
6815
+ o("div", no, v(n.t("error.connectionFailed")), 1),
6816
+ o("div", so, v(n.error), 1)
6792
6817
  ])
6793
6818
  ])
6794
- ])) : !n.currentConv && i.showHistory ? (c(), P(f, {
6819
+ ])) : !n.currentConv && a.showHistory ? (c(), D(f, {
6795
6820
  key: 1,
6796
6821
  threads: n.openThreads,
6797
6822
  onResume: n.onDrawerPick
@@ -6810,9 +6835,9 @@ function vo(e, t, s, r, i, n) {
6810
6835
  "ai-agent-avatar-url": n.agentAvatarUrl,
6811
6836
  onLoadMore: n.onLoadMore
6812
6837
  }, 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"]),
6813
- l("div", ro, [
6838
+ o("div", ro, [
6814
6839
  n.floatVisible ? (c(), d("div", io, [
6815
- n.approvalReady ? (c(), P(M, {
6840
+ n.approvalReady ? (c(), D(M, {
6816
6841
  key: 0,
6817
6842
  action: n.approvalTitle,
6818
6843
  detail: n.approvalDetail,
@@ -6820,41 +6845,34 @@ function vo(e, t, s, r, i, n) {
6820
6845
  "agent-name": n.agentName,
6821
6846
  "agent-avatar-url": n.agentAvatarUrl,
6822
6847
  onCallback: n.onApprovalCallback
6823
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingResolution ? (c(), P(M, {
6824
- key: 1,
6825
- action: n.pendingResolution.text_md,
6826
- callbacks: n.pendingResolution.callbacks,
6827
- "agent-name": n.agentName,
6828
- "agent-avatar-url": n.agentAvatarUrl,
6829
- onCallback: n.onResolutionCallback
6830
- }, null, 8, ["action", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), P(E, {
6848
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), D(E, {
6831
6849
  key: n.pendingForm.message && n.pendingForm.message.id,
6832
6850
  form: n.pendingForm.form,
6833
6851
  "agent-name": n.agentName,
6834
6852
  "agent-avatar-url": n.agentAvatarUrl,
6835
6853
  onSubmit: n.onFormSubmit
6836
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), P(A, {
6837
- key: 3,
6838
- busy: i.feedbackBusy,
6839
- done: i.feedbackDone,
6854
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), D(A, {
6855
+ key: 2,
6856
+ busy: a.feedbackBusy,
6857
+ done: a.feedbackDone,
6840
6858
  onSubmit: n.onFeedback
6841
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(q, {
6842
- key: 4,
6859
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), D(q, {
6860
+ key: 3,
6843
6861
  items: n.suggestions,
6844
6862
  onSelect: n.onSuggestion
6845
6863
  }, null, 8, ["items", "onSelect"]))
6846
- ], 512)) : k("", !0),
6864
+ ], 512)) : b("", !0),
6847
6865
  n.actionInFlight ? (c(), d("div", ao, [
6848
- t[11] || (t[11] = l("span", {
6866
+ t[11] || (t[11] = o("span", {
6849
6867
  class: "wm-actionWait__spinner",
6850
6868
  "aria-hidden": "true"
6851
6869
  }, null, -1)),
6852
- l("span", oo, v(n.t("action.inProgress", {
6870
+ o("span", oo, v(n.t("action.inProgress", {
6853
6871
  name: n.actionInFlightName
6854
6872
  })), 1)
6855
- ])) : k("", !0),
6856
- i.pendingAttachments.length ? (c(), d("div", lo, [
6857
- (c(!0), d(I, null, j(i.pendingAttachments, (L, W) => (c(), d("div", {
6873
+ ])) : b("", !0),
6874
+ a.pendingAttachments.length ? (c(), d("div", lo, [
6875
+ (c(!0), d(I, null, j(a.pendingAttachments, (L, W) => (c(), d("div", {
6858
6876
  key: L.path || W,
6859
6877
  class: "wm-attached__item"
6860
6878
  }, [
@@ -6864,8 +6882,8 @@ function vo(e, t, s, r, i, n) {
6864
6882
  src: L.previewUrl,
6865
6883
  alt: L.name
6866
6884
  }, null, 8, co)) : (c(), d("div", uo, [
6867
- t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
6868
- l("svg", {
6885
+ t[12] || (t[12] = o("span", { class: "wm-attached__fileIcon" }, [
6886
+ o("svg", {
6869
6887
  width: "16",
6870
6888
  height: "16",
6871
6889
  viewBox: "0 0 24 24",
@@ -6876,24 +6894,24 @@ function vo(e, t, s, r, i, n) {
6876
6894
  "stroke-linejoin": "round",
6877
6895
  "aria-hidden": "true"
6878
6896
  }, [
6879
- l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
6880
- l("path", { d: "M14 2v6h6" })
6897
+ o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
6898
+ o("path", { d: "M14 2v6h6" })
6881
6899
  ])
6882
6900
  ], -1)),
6883
- l("span", ho, [
6884
- l("span", mo, v(L.name), 1),
6901
+ o("span", ho, [
6902
+ o("span", mo, v(L.name), 1),
6885
6903
  n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", fo, v(n.formatAttachmentSize(
6886
6904
  L.size_bytes
6887
- )), 1)) : k("", !0)
6905
+ )), 1)) : b("", !0)
6888
6906
  ])
6889
6907
  ])),
6890
- l("button", {
6908
+ o("button", {
6891
6909
  type: "button",
6892
6910
  class: "wm-attached__remove",
6893
6911
  "aria-label": n.t("attachment.remove"),
6894
6912
  onClick: (Q) => n.removePendingAttachment(W)
6895
6913
  }, [...t[13] || (t[13] = [
6896
- l("svg", {
6914
+ o("svg", {
6897
6915
  width: "10",
6898
6916
  height: "10",
6899
6917
  viewBox: "0 0 24 24",
@@ -6904,23 +6922,23 @@ function vo(e, t, s, r, i, n) {
6904
6922
  "stroke-linejoin": "round",
6905
6923
  "aria-hidden": "true"
6906
6924
  }, [
6907
- l("path", { d: "M18 6L6 18M6 6l12 12" })
6925
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
6908
6926
  ], -1)
6909
6927
  ])], 8, _o)
6910
6928
  ]))), 128))
6911
- ])) : k("", !0),
6912
- n.isTerminal ? (c(), d("div", go, [
6913
- l("span", po, v(n.t("composer.conversationEnded")), 1),
6914
- l("button", {
6929
+ ])) : b("", !0),
6930
+ n.endedBlockVisible ? (c(), d("div", go, [
6931
+ o("span", po, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6932
+ o("button", {
6915
6933
  type: "button",
6916
6934
  class: "wm-ended__btn",
6917
- onClick: t[2] || (t[2] = (...L) => n.startConv && n.startConv(...L))
6918
- }, v(n.t("composer.newConversation")), 1)
6919
- ])) : n.actionInFlight ? k("", !0) : (c(), P(T, {
6935
+ onClick: t[2] || (t[2] = (L) => n.isClosed ? n.onReopen() : n.startConv())
6936
+ }, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
6937
+ ])) : n.actionInFlight ? b("", !0) : (c(), D(T, {
6920
6938
  key: 4,
6921
6939
  ref: "composer",
6922
- modelValue: i.draft,
6923
- "onUpdate:modelValue": t[3] || (t[3] = (L) => i.draft = L),
6940
+ modelValue: a.draft,
6941
+ "onUpdate:modelValue": t[3] || (t[3] = (L) => a.draft = L),
6924
6942
  placeholder: n.composerPlaceholder,
6925
6943
  disabled: !!n.pendingApproval,
6926
6944
  "attach-label": n.t("composer.attachFile"),
@@ -6929,25 +6947,25 @@ function vo(e, t, s, r, i, n) {
6929
6947
  onAttach: n.onAttach
6930
6948
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6931
6949
  ]),
6932
- i.moreOpen ? (c(), P(U, {
6950
+ a.moreOpen ? (c(), D(N, {
6933
6951
  key: 0,
6934
6952
  "can-rename": !!n.currentConv && !n.currentConv._draft,
6935
6953
  "can-export": !!n.currentConv && !n.currentConv._draft,
6936
6954
  "sound-enabled": e.soundEnabled,
6937
6955
  "status-url": n.statusUrl,
6938
6956
  "help-url": n.helpUrl,
6939
- onClose: t[4] || (t[4] = (L) => i.moreOpen = !1),
6957
+ onClose: t[4] || (t[4] = (L) => a.moreOpen = !1),
6940
6958
  onSoundToggle: e.onSoundToggle,
6941
6959
  onAction: n.onMoreAction
6942
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
6943
- i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), P(D, {
6960
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
6961
+ a.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), D(U, {
6944
6962
  key: 1,
6945
6963
  "initial-value": n.currentConv.name || "",
6946
6964
  title: n.t("rename.dialogTitle"),
6947
- onClose: t[5] || (t[5] = (L) => i.renameDialogOpen = !1),
6965
+ onClose: t[5] || (t[5] = (L) => a.renameDialogOpen = !1),
6948
6966
  onSubmit: n.onRenameSubmit
6949
- }, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
6950
- ], 64)) : (c(), P(b, {
6967
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
6968
+ ], 64)) : (c(), D(k, {
6951
6969
  key: 2,
6952
6970
  title: n.widgetTitle,
6953
6971
  subtitle: n.widgetSubtitle,
@@ -6955,39 +6973,39 @@ function vo(e, t, s, r, i, n) {
6955
6973
  "default-icon-url": n.defaultIconUrl,
6956
6974
  "quick-links": n.quickLinks,
6957
6975
  "open-threads": n.openThreads,
6958
- busy: i.busy,
6976
+ busy: a.busy,
6959
6977
  onStart: n.startConv,
6960
6978
  onSelect: n.onQuickLink,
6961
6979
  onResume: n.onDrawerPick,
6962
- onViewHistory: t[1] || (t[1] = (L) => i.showHistory = !0)
6980
+ onViewHistory: t[1] || (t[1] = (L) => a.showHistory = !0)
6963
6981
  }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6964
- i.moreOpen && !n.currentConv ? (c(), P(U, {
6982
+ a.moreOpen && !n.currentConv ? (c(), D(N, {
6965
6983
  key: 4,
6966
6984
  "can-rename": !1,
6967
6985
  "can-export": !1,
6968
6986
  "sound-enabled": e.soundEnabled,
6969
6987
  "status-url": n.statusUrl,
6970
6988
  "help-url": n.helpUrl,
6971
- onClose: t[6] || (t[6] = (L) => i.moreOpen = !1),
6989
+ onClose: t[6] || (t[6] = (L) => a.moreOpen = !1),
6972
6990
  onSoundToggle: e.onSoundToggle,
6973
6991
  onAction: n.onMoreAction
6974
- }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
6992
+ }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
6975
6993
  ], 64))
6976
- ], 6)) : k("", !0)
6994
+ ], 6)) : b("", !0)
6977
6995
  ], 6);
6978
6996
  }
6979
- const bo = /* @__PURE__ */ N(Xa, [["render", vo], ["__scopeId", "data-v-b2c24313"]]), ko = "0.5.77";
6997
+ const bo = /* @__PURE__ */ P(Xa, [["render", vo], ["__scopeId", "data-v-87556b84"]]), ko = "0.5.79";
6980
6998
  export {
6981
6999
  oe as AIAvatar,
6982
7000
  be as AVATAR_COLORS,
6983
7001
  As as ActionResult,
6984
- Ui as ApprovalCard,
7002
+ Ni as ApprovalCard,
6985
7003
  Es as ArtifactFormResponse,
6986
7004
  Ws as ArtifactInfoCard,
6987
7005
  ur as ArtifactRenderer,
6988
7006
  or as ArtifactTicket,
6989
7007
  Cr as AttachmentPreview,
6990
- Tr as Bubble,
7008
+ Mr as Bubble,
6991
7009
  Ci as Composer,
6992
7010
  it as DEFAULT_BASE_URL,
6993
7011
  ue as DEFAULT_LANGUAGE,
@@ -6999,16 +7017,16 @@ export {
6999
7017
  Oe as MEDIA_RECORDER_SUPPORTED,
7000
7018
  ri as MessageList,
7001
7019
  bo as Messenger,
7002
- Da as MoreMenu,
7020
+ Ua as MoreMenu,
7003
7021
  Jn as Onboarding,
7004
7022
  pe as SCREEN_CAPTURE_SUPPORTED,
7005
7023
  ut as SUPPORTED_LANGUAGES,
7006
- Ti as SuggestionChips,
7024
+ Mi as SuggestionChips,
7007
7025
  tn as TeamAvatars,
7008
7026
  Lr as Typing,
7009
7027
  ko as VERSION,
7010
- Me as avatarColor,
7011
- Te as avatarInitials,
7028
+ Te as avatarColor,
7029
+ Me as avatarInitials,
7012
7030
  ai as captureScreenshotFile,
7013
7031
  H as colors,
7014
7032
  st as createStore,