@_solaris/messenger-widget 0.5.39 → 0.5.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,12 +1,12 @@
1
- import { reactive as je, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as K, Transition as Re, withCtx as Ne, Fragment as E, renderList as F, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as P, resolveDynamicComponent as pe, mergeProps as Se, withDirectives as $, vModelText as X, createTextVNode as ye, renderSlot as He, vModelCheckbox as ze, vModelSelect as qe, markRaw as Me } from "vue";
2
- const Ke = [
1
+ import { reactive as je, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as V, Transition as Re, withCtx as Ne, Fragment as E, renderList as F, withKeys as ue, withModifiers as G, createElementVNode as a, createCommentVNode as y, createBlock as P, resolveDynamicComponent as pe, mergeProps as Se, withDirectives as $, vModelText as X, createTextVNode as ye, renderSlot as He, vModelCheckbox as ze, vModelSelect as qe, markRaw as Me } from "vue";
2
+ const Ve = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], fe = "/client", Ve = 5 * 60 * 1e3, $e = 10 * 60 * 1e3, We = 5 * 60 * 1e3;
9
+ ], fe = "/client", Ke = 5 * 60 * 1e3, $e = 10 * 60 * 1e3, We = 5 * 60 * 1e3;
10
10
  function Ge(e) {
11
11
  const t = {
12
12
  baseUrl: Ye(e.baseUrl || ""),
@@ -31,21 +31,21 @@ function Ge(e) {
31
31
  };
32
32
  if (!t.baseUrl || !t.widgetId)
33
33
  throw new Error("[transport] baseUrl and widgetId are required");
34
- function n(d, f) {
35
- return t.listeners.has(d) || t.listeners.set(d, /* @__PURE__ */ new Set()), t.listeners.get(d).add(f), () => t.listeners.get(d).delete(f);
34
+ function n(u, f) {
35
+ return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(f), () => t.listeners.get(u).delete(f);
36
36
  }
37
- function i(d, f) {
38
- const g = t.listeners.get(d);
37
+ function i(u, f) {
38
+ const g = t.listeners.get(u);
39
39
  g && g.forEach((b) => {
40
40
  try {
41
41
  b(f);
42
42
  } catch (C) {
43
- console.error("[transport] listener", d, C);
43
+ console.error("[transport] listener", u, C);
44
44
  }
45
45
  });
46
46
  }
47
- function r(d) {
48
- t.connection !== d && (t.connection = d, i("connection", d));
47
+ function r(u) {
48
+ t.connection !== u && (t.connection = u, i("connection", u));
49
49
  }
50
50
  function s() {
51
51
  return {
@@ -60,33 +60,33 @@ function Ge(e) {
60
60
  ...t.origin ? { "X-Parent-Origin": t.origin } : {}
61
61
  };
62
62
  }
63
- async function a(d, f, g) {
63
+ async function o(u, f, g) {
64
64
  const b = await fetch(`${t.baseUrl}${fe}${f}`, {
65
- method: d,
65
+ method: u,
66
66
  credentials: "include",
67
67
  headers: s(),
68
68
  body: g !== void 0 ? JSON.stringify(g) : void 0
69
69
  });
70
70
  if (!b.ok) {
71
71
  const C = await l(b), M = new Error(
72
- `HTTP ${b.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || b.statusText}`
72
+ `HTTP ${b.status} ${u} ${f} :: ${(C == null ? void 0 : C.error) || b.statusText}`
73
73
  );
74
74
  throw M.status = b.status, M.body = C, M;
75
75
  }
76
76
  return b.status === 204 ? null : b.json();
77
77
  }
78
- async function l(d) {
78
+ async function l(u) {
79
79
  try {
80
- return await d.json();
80
+ return await u.json();
81
81
  } catch {
82
82
  return null;
83
83
  }
84
84
  }
85
- async function p(d) {
85
+ async function p(u) {
86
86
  if (t.started) return t.lastBootstrap;
87
- if (!(d != null && d.origin))
87
+ if (!(u != null && u.origin))
88
88
  throw new Error("[transport] start requires origin");
89
- t.started = !0, t.origin = d.origin, t.token = d.token || "";
89
+ t.started = !0, t.origin = u.origin, t.token = u.token || "";
90
90
  const f = await fetch(
91
91
  `${t.baseUrl}${fe}/session`,
92
92
  {
@@ -98,13 +98,13 @@ function Ge(e) {
98
98
  ...t.token ? { token: t.token } : {},
99
99
  // Déclaration de mode du marchand (validée serveur contre
100
100
  // widgets.allow_unauthenticated). Le serveur 400 si mismatch.
101
- allowUnauthenticated: d.allowUnauthenticated === !0,
101
+ allowUnauthenticated: u.allowUnauthenticated === !0,
102
102
  // Data customer du marchand (`context.customer`). Stockée
103
103
  // sur la session en `pending_customer` jusqu'à création
104
104
  // du row au premier message. Permet aux templates
105
105
  // `{{customer.*}}` du widget config d'être résolus dès
106
106
  // le premier render.
107
- ...d.customer && typeof d.customer == "object" ? { customer: d.customer } : {}
107
+ ...u.customer && typeof u.customer == "object" ? { customer: u.customer } : {}
108
108
  })
109
109
  }
110
110
  );
@@ -129,69 +129,69 @@ function Ge(e) {
129
129
  }
130
130
  return L.json();
131
131
  }),
132
- a("GET", "/customers/me")
132
+ o("GET", "/customers/me")
133
133
  ]), M = { config: b, customer: (C == null ? void 0 : C.customer) ?? null };
134
- return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = h, document.addEventListener(
134
+ return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
135
135
  "visibilitychange",
136
136
  t.visibilityHandler
137
137
  )), de(), M;
138
138
  }
139
139
  async function k() {
140
140
  try {
141
- const d = await B();
142
- t.lastActivityAt = d.reduce((f, g) => {
141
+ const u = await B();
142
+ t.lastActivityAt = u.reduce((f, g) => {
143
143
  const b = g == null ? void 0 : g.last_message_at;
144
144
  return b && (!f || b > f) ? b : f;
145
145
  }, null);
146
- } catch (d) {
147
- console.error("[transport] initial /conversations failed", d);
146
+ } catch (u) {
147
+ console.error("[transport] initial /conversations failed", u);
148
148
  }
149
149
  }
150
150
  async function w() {
151
- const d = await a("GET", "/customers/me");
152
- return (d == null ? void 0 : d.customer) ?? null;
151
+ const u = await o("GET", "/customers/me");
152
+ return (u == null ? void 0 : u.customer) ?? null;
153
153
  }
154
- async function T(d) {
155
- const f = await a("PATCH", "/customers/me", d);
154
+ async function T(u) {
155
+ const f = await o("PATCH", "/customers/me", u);
156
156
  return (f == null ? void 0 : f.customer) ?? null;
157
157
  }
158
158
  async function B() {
159
- const d = await a("GET", "/conversations");
160
- return (d == null ? void 0 : d.conversations) ?? [];
159
+ const u = await o("GET", "/conversations");
160
+ return (u == null ? void 0 : u.conversations) ?? [];
161
161
  }
162
- async function A(d = {}) {
163
- return (await a("POST", "/conversations", d)).conversation;
162
+ async function A(u = {}) {
163
+ return (await o("POST", "/conversations", u)).conversation;
164
164
  }
165
- async function H(d) {
166
- return (await a(
165
+ async function H(u) {
166
+ return (await o(
167
167
  "GET",
168
- `/conversations/${encodeURIComponent(d)}`
168
+ `/conversations/${encodeURIComponent(u)}`
169
169
  )).conversation;
170
170
  }
171
- async function S(d, f) {
172
- return (await a(
171
+ async function S(u, f) {
172
+ return (await o(
173
173
  "PATCH",
174
- `/conversations/${encodeURIComponent(d)}`,
174
+ `/conversations/${encodeURIComponent(u)}`,
175
175
  f
176
176
  )).conversation;
177
177
  }
178
- async function U(d, f) {
179
- return a(
178
+ async function U(u, f) {
179
+ return o(
180
180
  "PATCH",
181
- `/conversations/${encodeURIComponent(d)}/read`,
181
+ `/conversations/${encodeURIComponent(u)}/read`,
182
182
  { message_id: f }
183
183
  );
184
184
  }
185
- async function I(d, f = {}) {
185
+ async function I(u, f = {}) {
186
186
  const g = new URLSearchParams();
187
187
  f.before && g.set("before", f.before), f.since && g.set("since", f.since), f.limit && g.set("limit", String(f.limit));
188
188
  const b = g.toString() ? `?${g.toString()}` : "";
189
- return a(
189
+ return o(
190
190
  "GET",
191
- `/conversations/${encodeURIComponent(d)}/messages${b}`
191
+ `/conversations/${encodeURIComponent(u)}/messages${b}`
192
192
  );
193
193
  }
194
- async function z(d, f) {
194
+ async function q(u, f) {
195
195
  se();
196
196
  const g = {
197
197
  client_msg_id: f.client_msg_id,
@@ -200,28 +200,28 @@ function Ge(e) {
200
200
  author: { id: t.userId, type: "user" },
201
201
  created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
202
202
  };
203
- return Array.isArray(f.attachments) && f.attachments.length && (g.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (g.metadata = f.metadata), a(
203
+ return Array.isArray(f.attachments) && f.attachments.length && (g.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (g.metadata = f.metadata), o(
204
204
  "POST",
205
- `/conversations/${encodeURIComponent(d)}/messages`,
205
+ `/conversations/${encodeURIComponent(u)}/messages`,
206
206
  g
207
207
  );
208
208
  }
209
- async function Y(d, f, g) {
210
- return se(), a(
209
+ async function Y(u, f, g) {
210
+ return se(), o(
211
211
  "POST",
212
- `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
212
+ `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(f)}`,
213
213
  g ? { inputs: g } : {}
214
214
  );
215
215
  }
216
- async function Z(d) {
217
- const f = d.name || "attachment", g = d.type || "application/octet-stream", b = d.size || 0, C = await a("POST", "/attachments", {
216
+ async function Z(u) {
217
+ const f = u.name || "attachment", g = u.type || "application/octet-stream", b = u.size || 0, C = await o("POST", "/attachments", {
218
218
  mime_type: g,
219
219
  size_bytes: b,
220
220
  name: f
221
221
  }), M = await fetch(C.upload_url, {
222
222
  method: "PUT",
223
223
  headers: { "Content-Type": g },
224
- body: d
224
+ body: u
225
225
  });
226
226
  if (!M.ok)
227
227
  throw new Error(`HTTP ${M.status} PUT signed upload`);
@@ -232,81 +232,81 @@ function Ge(e) {
232
232
  size_bytes: b
233
233
  };
234
234
  }
235
- async function ee(d) {
236
- return a(
235
+ async function ee(u) {
236
+ return o(
237
237
  "GET",
238
- `/attachments/sign?path=${encodeURIComponent(d)}`
238
+ `/attachments/sign?path=${encodeURIComponent(u)}`
239
239
  );
240
240
  }
241
241
  function te() {
242
- const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
243
- return `${t.baseUrl}${fe}/stream?${d}`;
242
+ const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
243
+ return `${t.baseUrl}${fe}/stream?${u}`;
244
244
  }
245
- function V() {
245
+ function K() {
246
246
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
247
247
  try {
248
- const d = new EventSource(te(), { withCredentials: !0 });
249
- for (const f of Ke)
250
- d.addEventListener(f, (g) => ne(f, g.data));
251
- d.addEventListener(
248
+ const u = new EventSource(te(), { withCredentials: !0 });
249
+ for (const f of Ve)
250
+ u.addEventListener(f, (g) => ne(f, g.data));
251
+ u.addEventListener(
252
252
  "error",
253
253
  () => i("error", new Error("SSE error"))
254
- ), t.eventSource = d, r("open");
255
- } catch (d) {
256
- console.error("[transport] SSE open failed", d), i("error", d);
254
+ ), t.eventSource = u, r("open");
255
+ } catch (u) {
256
+ console.error("[transport] SSE open failed", u), i("error", u);
257
257
  }
258
258
  }
259
- function ne(d, f) {
259
+ function ne(u, f) {
260
260
  try {
261
261
  const g = JSON.parse(f), b = g && typeof g == "object" && "data" in g ? g.data : g;
262
- i(d, b);
262
+ i(u, b);
263
263
  } catch (g) {
264
- console.error("[transport] bad SSE payload", d, g);
264
+ console.error("[transport] bad SSE payload", u, g);
265
265
  }
266
266
  }
267
267
  function J() {
268
268
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
269
269
  }
270
270
  function se() {
271
- clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
271
+ clearTimeout(t.burstTimer), K(), t.panelOpen || (t.burstTimer = setTimeout(() => {
272
272
  t.panelOpen || J();
273
273
  }, $e));
274
274
  }
275
- function ce(d) {
276
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
275
+ function ce(u) {
276
+ t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), K()) : se();
277
277
  }
278
- async function he() {
278
+ async function me() {
279
279
  try {
280
- const d = await B(), f = d.reduce((b, C) => {
280
+ const u = await B(), f = u.reduce((b, C) => {
281
281
  const M = C == null ? void 0 : C.last_message_at;
282
282
  return M && (!b || M > b) ? M : b;
283
283
  }, null);
284
- f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
285
- } catch (d) {
286
- console.error("[transport] poll failed", d);
284
+ f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: u, latestAt: f }), se());
285
+ } catch (u) {
286
+ console.error("[transport] poll failed", u);
287
287
  }
288
288
  }
289
289
  function de() {
290
- m(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(he, Ve));
290
+ h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me, Ke));
291
291
  }
292
- function m() {
292
+ function h() {
293
293
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
294
294
  }
295
- function h() {
295
+ function m() {
296
296
  if (document.hidden)
297
297
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
298
- t.hiddenGraceTimer = null, document.hidden && (m(), J(), r("paused"));
298
+ t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
299
299
  }, We);
300
300
  else {
301
301
  if (t.hiddenGraceTimer) {
302
302
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
303
303
  return;
304
304
  }
305
- r("idle"), de(), t.panelOpen && V();
305
+ r("idle"), de(), t.panelOpen && K();
306
306
  }
307
307
  }
308
308
  function _() {
309
- m(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
309
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
310
310
  "visibilitychange",
311
311
  t.visibilityHandler
312
312
  ), t.visibilityHandler = null), t.started = !1;
@@ -325,7 +325,7 @@ function Ge(e) {
325
325
  patchConversation: S,
326
326
  markConversationRead: U,
327
327
  listMessages: I,
328
- postMessage: z,
328
+ postMessage: q,
329
329
  postCallback: Y,
330
330
  uploadAttachment: Z,
331
331
  signAttachment: ee,
@@ -386,49 +386,49 @@ function Xe(e) {
386
386
  connection: "idle"
387
387
  }), n = [];
388
388
  n.push(
389
- e.on("connection", (m) => {
390
- t.connection = m;
389
+ e.on("connection", (h) => {
390
+ t.connection = h;
391
391
  })
392
392
  ), n.push(
393
- e.on("message", (m) => {
394
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.message;
395
- !h || !(_ != null && _.id) || (V(h, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(h, _.created_at));
393
+ e.on("message", (h) => {
394
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
395
+ !m || !(_ != null && _.id) || (K(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(m, _.created_at));
396
396
  })
397
397
  ), n.push(
398
- e.on("message_stream", (m) => {
399
- const h = m == null ? void 0 : m.message_id, _ = m == null ? void 0 : m.token;
400
- !h || typeof _ != "string" || (t.streamingByMsgId[h] = (t.streamingByMsgId[h] || "") + _);
398
+ e.on("message_stream", (h) => {
399
+ const m = h == null ? void 0 : h.message_id, _ = h == null ? void 0 : h.token;
400
+ !m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
401
401
  })
402
402
  ), n.push(
403
- e.on("conversation_updated", (m) => {
404
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.changes;
405
- if (!h || !_) return;
406
- const d = t.conversations.findIndex((f) => f.id === h);
407
- d !== -1 && (t.conversations[d] = {
408
- ...t.conversations[d],
403
+ e.on("conversation_updated", (h) => {
404
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
405
+ if (!m || !_) return;
406
+ const u = t.conversations.findIndex((f) => f.id === m);
407
+ u !== -1 && (t.conversations[u] = {
408
+ ...t.conversations[u],
409
409
  ..._
410
410
  });
411
411
  })
412
412
  ), n.push(
413
- e.on("config_updated", (m) => {
414
- m != null && m.config && (t.config = m.config);
413
+ e.on("config_updated", (h) => {
414
+ h != null && h.config && (t.config = h.config);
415
415
  })
416
416
  ), n.push(
417
- e.on("action_status", (m) => {
418
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.action_id, d = m == null ? void 0 : m.action_name;
419
- if (!h || !_) return;
420
- const f = t.runningActionsByConv[h] || {};
421
- m.state === "running" ? (f[_] = d || _, t.runningActionsByConv[h] = { ...f }) : m.state === "done" && (delete f[_], t.runningActionsByConv[h] = { ...f });
417
+ e.on("action_status", (h) => {
418
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, u = h == null ? void 0 : h.action_name;
419
+ if (!m || !_) return;
420
+ const f = t.runningActionsByConv[m] || {};
421
+ h.state === "running" ? (f[_] = u || _, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[_], t.runningActionsByConv[m] = { ...f });
422
422
  })
423
423
  ), n.push(
424
- e.on("activity", (m) => {
425
- Array.isArray(m == null ? void 0 : m.conversations) && (t.conversations = m.conversations);
424
+ e.on("activity", (h) => {
425
+ Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
426
426
  })
427
427
  );
428
- async function i(m) {
428
+ async function i(h) {
429
429
  try {
430
- const h = new Promise(
431
- (d, f) => setTimeout(
430
+ const m = new Promise(
431
+ (u, f) => setTimeout(
432
432
  () => f(
433
433
  new Error(
434
434
  "bootstrap timeout (15s) — check baseUrl, CORS, and network"
@@ -437,61 +437,61 @@ function Xe(e) {
437
437
  15e3
438
438
  )
439
439
  ), _ = await Promise.race([
440
- e.start(m),
441
- h
440
+ e.start(h),
441
+ m
442
442
  ]);
443
443
  t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
444
444
  e.listConversations(),
445
- h
445
+ m
446
446
  ]), t.ready = !0;
447
- } catch (h) {
448
- console.error("[store] start failed", h), t.error = (h == null ? void 0 : h.message) || String(h);
447
+ } catch (m) {
448
+ console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
449
449
  }
450
450
  }
451
451
  function r() {
452
- for (const m of n)
452
+ for (const h of n)
453
453
  try {
454
- m();
454
+ h();
455
455
  } catch {
456
456
  }
457
457
  e.stop();
458
458
  }
459
- async function s(m) {
460
- const h = he(m);
461
- if (!h) return t.customer;
459
+ async function s(h) {
460
+ const m = me(h);
461
+ if (!m) return t.customer;
462
462
  try {
463
- const _ = await e.patchCustomer(h);
463
+ const _ = await e.patchCustomer(m);
464
464
  _ && (t.customer = _);
465
465
  } catch (_) {
466
466
  console.error("[store] applyCustomer failed", _);
467
467
  }
468
468
  return t.customer;
469
469
  }
470
- async function a(m = {}) {
471
- const h = await e.createConversation(m), _ = t.conversations.findIndex((d) => d.id === h.id);
472
- return _ === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[_] = h, h;
470
+ async function o(h = {}) {
471
+ const m = await e.createConversation(h), _ = t.conversations.findIndex((u) => u.id === m.id);
472
+ return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
473
473
  }
474
474
  const l = 50;
475
- async function p(m) {
476
- const h = t.paginationByConv[m];
477
- if (!(h != null && h.loaded || h != null && h.loading)) {
478
- w(m, { nextCursor: null, loading: !0, loaded: !1 });
475
+ async function p(h) {
476
+ const m = t.paginationByConv[h];
477
+ if (!(m != null && m.loaded || m != null && m.loading)) {
478
+ w(h, { nextCursor: null, loading: !0, loaded: !1 });
479
479
  try {
480
- const _ = await e.listMessages(m, {
480
+ const _ = await e.listMessages(h, {
481
481
  limit: l
482
- }), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[m] || [], g = /* @__PURE__ */ new Set();
483
- for (const C of d)
482
+ }), u = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[h] || [], g = /* @__PURE__ */ new Set();
483
+ for (const C of u)
484
484
  (C == null ? void 0 : C.id) != null && g.add(`id:${String(C.id)}`), C != null && C.client_msg_id && g.add(`c:${C.client_msg_id}`);
485
485
  const b = f.filter((C) => !((C == null ? void 0 : C.id) != null && g.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && g.has(`c:${C.client_msg_id}`)));
486
- t.messagesByConv[m] = [...d, ...b].sort(
486
+ t.messagesByConv[h] = [...u, ...b].sort(
487
487
  ce
488
- ), w(m, {
488
+ ), w(h, {
489
489
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
490
490
  loading: !1,
491
491
  loaded: !0
492
492
  });
493
493
  } catch (_) {
494
- console.error("[store] openConversation failed", _), w(m, {
494
+ console.error("[store] openConversation failed", _), w(h, {
495
495
  nextCursor: null,
496
496
  loading: !1,
497
497
  loaded: !1
@@ -499,83 +499,83 @@ function Xe(e) {
499
499
  }
500
500
  }
501
501
  }
502
- async function k(m) {
502
+ async function k(h) {
503
503
  var f;
504
- const h = t.paginationByConv[m];
505
- if (!h || h.loading || !h.nextCursor) return;
506
- const d = (f = (t.messagesByConv[m] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
507
- if (d) {
508
- w(m, { ...h, loading: !0 });
504
+ const m = t.paginationByConv[h];
505
+ if (!m || m.loading || !m.nextCursor) return;
506
+ const u = (f = (t.messagesByConv[h] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
507
+ if (u) {
508
+ w(h, { ...m, loading: !0 });
509
509
  try {
510
- const g = await e.listMessages(m, {
511
- before: d,
510
+ const g = await e.listMessages(h, {
511
+ before: u,
512
512
  limit: l
513
- }), b = (g == null ? void 0 : g.messages) ?? [], C = t.messagesByConv[m] || [], M = /* @__PURE__ */ new Set();
513
+ }), b = (g == null ? void 0 : g.messages) ?? [], C = t.messagesByConv[h] || [], M = /* @__PURE__ */ new Set();
514
514
  for (const x of C)
515
515
  (x == null ? void 0 : x.id) != null && M.add(`id:${String(x.id)}`), x != null && x.client_msg_id && M.add(`c:${x.client_msg_id}`);
516
516
  const L = b.filter((x) => !((x == null ? void 0 : x.id) != null && M.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && M.has(`c:${x.client_msg_id}`)));
517
- t.messagesByConv[m] = [...L, ...C], w(m, {
517
+ t.messagesByConv[h] = [...L, ...C], w(h, {
518
518
  nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
519
519
  loading: !1,
520
520
  loaded: !0
521
521
  });
522
522
  } catch (g) {
523
- console.error("[store] loadMore failed", g), w(m, { ...h, loading: !1 });
523
+ console.error("[store] loadMore failed", g), w(h, { ...m, loading: !1 });
524
524
  }
525
525
  }
526
526
  }
527
- function w(m, h) {
528
- t.paginationByConv = { ...t.paginationByConv, [m]: h };
527
+ function w(h, m) {
528
+ t.paginationByConv = { ...t.paginationByConv, [h]: m };
529
529
  }
530
- async function T(m, h) {
531
- const _ = await e.patchConversation(m, h), d = t.conversations.findIndex((f) => f.id === m);
532
- d !== -1 && (t.conversations[d] = _);
530
+ async function T(h, m) {
531
+ const _ = await e.patchConversation(h, m), u = t.conversations.findIndex((f) => f.id === h);
532
+ u !== -1 && (t.conversations[u] = _);
533
533
  }
534
- async function B(m) {
535
- if (!m) return [];
536
- const h = t.messagesByConv[m] || [];
534
+ async function B(h) {
535
+ if (!h) return [];
536
+ const m = t.messagesByConv[h] || [];
537
537
  let _ = "";
538
- for (const d of h)
539
- d != null && d.created_at && d.created_at > _ && (_ = d.created_at);
538
+ for (const u of m)
539
+ u != null && u.created_at && u.created_at > _ && (_ = u.created_at);
540
540
  try {
541
- const d = await e.listMessages(
542
- m,
541
+ const u = await e.listMessages(
542
+ h,
543
543
  _ ? { since: _ } : {}
544
- ), f = (d == null ? void 0 : d.messages) || [];
544
+ ), f = (u == null ? void 0 : u.messages) || [];
545
545
  if (!f.length) return [];
546
546
  const g = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
547
- for (const M of h)
547
+ for (const M of m)
548
548
  (M == null ? void 0 : M.id) != null && g.add(String(M.id)), M != null && M.client_msg_id && b.add(M.client_msg_id);
549
549
  const C = [];
550
550
  for (const M of f) {
551
551
  const L = (M == null ? void 0 : M.id) != null && g.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && b.has(M.client_msg_id);
552
- V(m, M), L || C.push(M);
552
+ K(h, M), L || C.push(M);
553
553
  }
554
554
  return C;
555
- } catch (d) {
556
- return console.error("[store] fetchSinceLast failed", d), [];
555
+ } catch (u) {
556
+ return console.error("[store] fetchSinceLast failed", u), [];
557
557
  }
558
558
  }
559
- async function A(m, h) {
560
- if (!(!m || h == null))
559
+ async function A(h, m) {
560
+ if (!(!h || m == null))
561
561
  try {
562
- const _ = await e.markConversationRead(m, h), d = (_ == null ? void 0 : _.last_read_message_id) ?? h, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === m);
562
+ const _ = await e.markConversationRead(h, m), u = (_ == null ? void 0 : _.last_read_message_id) ?? m, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === h);
563
563
  f !== -1 && (t.conversations[f] = {
564
564
  ...t.conversations[f],
565
- last_read_message_id: d
565
+ last_read_message_id: u
566
566
  });
567
567
  } catch (_) {
568
568
  console.error("[store] markConversationRead failed", _);
569
569
  }
570
570
  }
571
- async function H(m, h, { attachments: _, metadata: d } = {}) {
571
+ async function H(h, m, { attachments: _, metadata: u } = {}) {
572
572
  var L;
573
- const f = (h || "").trim(), g = Array.isArray(_) && _.length > 0;
574
- if (!m || !f && !g) return;
575
- const b = Qe(), C = de(m), M = {
573
+ const f = (m || "").trim(), g = Array.isArray(_) && _.length > 0;
574
+ if (!h || !f && !g) return;
575
+ const b = Qe(), C = de(h), M = {
576
576
  id: b,
577
577
  client_msg_id: b,
578
- conversation_id: m,
578
+ conversation_id: h,
579
579
  type: "content",
580
580
  text_md: f,
581
581
  author: {
@@ -586,44 +586,44 @@ function Xe(e) {
586
586
  // Local-only flag — UI may render dimmed until the SSE echo lands.
587
587
  _pending: !0,
588
588
  ...g ? { payload: { type: "content", attachments: _ } } : {},
589
- ...d && typeof d == "object" ? { metadata: d } : {}
589
+ ...u && typeof u == "object" ? { metadata: u } : {}
590
590
  };
591
- V(m, M);
591
+ K(h, M);
592
592
  try {
593
- await e.postMessage(m, {
593
+ await e.postMessage(h, {
594
594
  client_msg_id: b,
595
595
  text_md: f,
596
596
  created_at: C,
597
597
  ...g ? { attachments: _ } : {},
598
- ...d && typeof d == "object" ? { metadata: d } : {}
598
+ ...u && typeof u == "object" ? { metadata: u } : {}
599
599
  });
600
600
  } catch (x) {
601
- console.error("[store] send failed", x), J(m, b, {
601
+ console.error("[store] send failed", x), J(h, b, {
602
602
  _failed: !0,
603
603
  _pending: !1
604
604
  });
605
605
  }
606
606
  }
607
- async function S(m, h, _) {
608
- m != null && (t.awaitingCallback[m] = !0);
607
+ async function S(h, m, _) {
608
+ h != null && (t.awaitingCallback[h] = !0);
609
609
  try {
610
- await e.postCallback(m, h, _);
611
- } catch (d) {
612
- console.error("[store] callback failed", d), m != null && delete t.awaitingCallback[m];
610
+ await e.postCallback(h, m, _);
611
+ } catch (u) {
612
+ console.error("[store] callback failed", u), h != null && delete t.awaitingCallback[h];
613
613
  }
614
614
  }
615
615
  const U = /* @__PURE__ */ new Map();
616
- async function I(m) {
617
- if (!m) return null;
618
- const h = U.get(m);
619
- if (h != null && h.url) {
620
- const _ = h.expires_at ? Date.parse(h.expires_at) : 0;
621
- if (!_ || _ - Date.now() > 6e4) return h.url;
616
+ async function I(h) {
617
+ if (!h) return null;
618
+ const m = U.get(h);
619
+ if (m != null && m.url) {
620
+ const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
621
+ if (!_ || _ - Date.now() > 6e4) return m.url;
622
622
  }
623
623
  try {
624
- const _ = await e.signAttachment(m);
624
+ const _ = await e.signAttachment(h);
625
625
  if (_ != null && _.signed_url)
626
- return U.set(m, {
626
+ return U.set(h, {
627
627
  url: _.signed_url,
628
628
  expires_at: _.expires_at
629
629
  }), _.signed_url;
@@ -632,33 +632,33 @@ function Xe(e) {
632
632
  }
633
633
  return null;
634
634
  }
635
- async function z(m, { rating: h, comment: _ } = {}) {
636
- const d = t.conversations.find((b) => b.id === m), g = {
637
- ...(d == null ? void 0 : d.metadata) || {},
635
+ async function q(h, { rating: m, comment: _ } = {}) {
636
+ const u = t.conversations.find((b) => b.id === h), g = {
637
+ ...(u == null ? void 0 : u.metadata) || {},
638
638
  feedback: {
639
- rating: h,
639
+ rating: m,
640
640
  comment: _ || null,
641
641
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
642
642
  }
643
643
  };
644
- await T(m, { metadata: g });
644
+ await T(h, { metadata: g });
645
645
  }
646
- function Y(m) {
647
- var _, d;
648
- const h = t.messagesByConv[m] || [];
649
- for (let f = h.length - 1; f >= 0; f--) {
650
- const g = h[f];
651
- if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((d = g == null ? void 0 : g.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
646
+ function Y(h) {
647
+ var _, u;
648
+ const m = t.messagesByConv[h] || [];
649
+ for (let f = m.length - 1; f >= 0; f--) {
650
+ const g = m[f];
651
+ if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((u = g == null ? void 0 : g.payload) == null ? void 0 : u.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
652
652
  return g;
653
653
  }
654
654
  return null;
655
655
  }
656
- function Z(m) {
657
- var _, d, f;
658
- const h = t.messagesByConv[m] || [];
659
- for (let g = h.length - 1; g >= 0; g--) {
660
- const b = h[g];
661
- if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user" || (b == null ? void 0 : b.type) === "action" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
656
+ function Z(h) {
657
+ var _, u, f;
658
+ const m = t.messagesByConv[h] || [];
659
+ for (let g = m.length - 1; g >= 0; g--) {
660
+ const b = m[g];
661
+ if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user" || (b == null ? void 0 : b.type) === "action" && ((u = b == null ? void 0 : b.payload) == null ? void 0 : u.state) === "pending")
662
662
  return null;
663
663
  const C = (f = b == null ? void 0 : b.metadata) == null ? void 0 : f.form;
664
664
  if (C && Array.isArray(C.fields) && C.fields.length > 0)
@@ -666,21 +666,21 @@ function Xe(e) {
666
666
  }
667
667
  return null;
668
668
  }
669
- function ee(m) {
670
- const h = t.runningActionsByConv[m];
671
- if (!h) return null;
672
- const _ = Object.keys(h);
669
+ function ee(h) {
670
+ const m = t.runningActionsByConv[h];
671
+ if (!m) return null;
672
+ const _ = Object.keys(m);
673
673
  if (_.length === 0) return null;
674
- const d = _[0];
675
- return { id: d, payload: { name: h[d] } };
674
+ const u = _[0];
675
+ return { id: u, payload: { name: m[u] } };
676
676
  }
677
- function te(m) {
678
- var _, d, f, g;
679
- const h = t.messagesByConv[m] || [];
680
- for (let b = h.length - 1; b >= 0; b--) {
681
- const C = h[b];
677
+ function te(h) {
678
+ var _, u, f, g;
679
+ const m = t.messagesByConv[h] || [];
680
+ for (let b = m.length - 1; b >= 0; b--) {
681
+ const C = m[b];
682
682
  if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user") return [];
683
- if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
683
+ if ((C == null ? void 0 : C.type) === "action" && ((u = C == null ? void 0 : C.payload) == null ? void 0 : u.state) === "pending")
684
684
  return [];
685
685
  if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
686
686
  const M = (g = C == null ? void 0 : C.metadata) == null ? void 0 : g.suggested_replies;
@@ -700,67 +700,67 @@ function Xe(e) {
700
700
  }
701
701
  return [];
702
702
  }
703
- function V(m, h) {
703
+ function K(h, m) {
704
704
  var g;
705
- const _ = t.messagesByConv[m] || [];
706
- let d = -1;
707
- h != null && h.client_msg_id && (d = _.findIndex(
708
- (b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === h.client_msg_id
709
- )), d === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (d = _.findIndex((b) => ne(b == null ? void 0 : b.id, h.id)));
705
+ const _ = t.messagesByConv[h] || [];
706
+ let u = -1;
707
+ m != null && m.client_msg_id && (u = _.findIndex(
708
+ (b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === m.client_msg_id
709
+ )), u === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (u = _.findIndex((b) => ne(b == null ? void 0 : b.id, m.id)));
710
710
  let f;
711
- d === -1 ? f = [..._, h].sort(ce) : (f = _.slice(), f[d] = {
712
- ..._[d],
713
- ...h,
711
+ u === -1 ? f = [..._, m].sort(ce) : (f = _.slice(), f[u] = {
712
+ ..._[u],
713
+ ...m,
714
714
  _pending: !1,
715
715
  _failed: !1
716
- }), t.messagesByConv[m] = f, (h == null ? void 0 : h.type) === "action" && ((g = h == null ? void 0 : h.payload) != null && g.state) && h.payload.state !== "pending" && (h == null ? void 0 : h.id) != null && t.awaitingCallback[h.id] && delete t.awaitingCallback[h.id];
716
+ }), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((g = m == null ? void 0 : m.payload) != null && g.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
717
717
  }
718
- function ne(m, h) {
719
- return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
718
+ function ne(h, m) {
719
+ return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
720
720
  }
721
- function J(m, h, _) {
722
- const d = t.messagesByConv[m];
723
- if (!d) return;
724
- const f = d.findIndex((b) => b.id === h);
721
+ function J(h, m, _) {
722
+ const u = t.messagesByConv[h];
723
+ if (!u) return;
724
+ const f = u.findIndex((b) => b.id === m);
725
725
  if (f === -1) return;
726
- const g = d.slice();
727
- g[f] = { ...d[f], ..._ }, t.messagesByConv[m] = g;
726
+ const g = u.slice();
727
+ g[f] = { ...u[f], ..._ }, t.messagesByConv[h] = g;
728
728
  }
729
- function se(m, h) {
730
- const _ = t.conversations.findIndex((f) => f.id === m);
729
+ function se(h, m) {
730
+ const _ = t.conversations.findIndex((f) => f.id === h);
731
731
  if (_ === -1) return;
732
- const d = t.conversations[_];
733
- if (h && (!d.last_message_at || h > d.last_message_at)) {
732
+ const u = t.conversations[_];
733
+ if (m && (!u.last_message_at || m > u.last_message_at)) {
734
734
  const f = t.conversations.slice();
735
- f[_] = { ...d, last_message_at: h }, f.sort(
735
+ f[_] = { ...u, last_message_at: m }, f.sort(
736
736
  (g, b) => (b.last_message_at || "").localeCompare(g.last_message_at || "")
737
737
  ), t.conversations = f;
738
738
  }
739
739
  }
740
- function ce(m, h) {
741
- return (m.created_at || "").localeCompare(h.created_at || "");
740
+ function ce(h, m) {
741
+ return (h.created_at || "").localeCompare(m.created_at || "");
742
742
  }
743
- function he(m) {
744
- if (!m || typeof m != "object") return null;
745
- const h = {}, _ = {};
746
- for (const [d, f] of Object.entries(m))
747
- f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (h[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
748
- return Object.keys(_).length && (h.values = _), Object.keys(h).length ? h : null;
743
+ function me(h) {
744
+ if (!h || typeof h != "object") return null;
745
+ const m = {}, _ = {};
746
+ for (const [u, f] of Object.entries(h))
747
+ f !== void 0 && (u === "name" || u === "email" || u === "language" ? f != null && String(f).trim() !== "" && (m[u] = f) : (u === "values" || u === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[u] = f);
748
+ return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
749
749
  }
750
- function de(m) {
751
- const h = t.messagesByConv[m] || [];
750
+ function de(h) {
751
+ const m = t.messagesByConv[h] || [];
752
752
  let _ = "";
753
- for (const g of h)
753
+ for (const g of m)
754
754
  g != null && g.created_at && g.created_at > _ && (_ = g.created_at);
755
- const d = (/* @__PURE__ */ new Date()).toISOString();
756
- return !_ || d > _ ? d : new Date(Date.parse(_) + 1).toISOString();
755
+ const u = (/* @__PURE__ */ new Date()).toISOString();
756
+ return !_ || u > _ ? u : new Date(Date.parse(_) + 1).toISOString();
757
757
  }
758
758
  return {
759
759
  state: t,
760
760
  start: i,
761
761
  destroy: r,
762
762
  applyCustomer: s,
763
- createConversation: a,
763
+ createConversation: o,
764
764
  openConversation: p,
765
765
  loadMore: k,
766
766
  fetchSinceLast: B,
@@ -769,7 +769,7 @@ function Xe(e) {
769
769
  send: H,
770
770
  clickCallback: S,
771
771
  signAttachment: I,
772
- submitFeedback: z,
772
+ submitFeedback: q,
773
773
  getPendingApproval: Y,
774
774
  getActionInFlight: ee,
775
775
  getLatestSuggestions: te,
@@ -1117,11 +1117,11 @@ function re(e) {
1117
1117
  }
1118
1118
  function D(e) {
1119
1119
  const t = ke(e), n = ge[t] || ge[ae], i = ge[ae];
1120
- return function(s, a) {
1120
+ return function(s, o) {
1121
1121
  let l = n[s];
1122
- return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
1122
+ return l == null && (l = i[s]), l == null ? s : (o && (l = l.replace(
1123
1123
  /\{(\w+)\}/g,
1124
- (p, k) => a[k] != null ? String(a[k]) : p
1124
+ (p, k) => o[k] != null ? String(o[k]) : p
1125
1125
  )), l);
1126
1126
  };
1127
1127
  }
@@ -1138,9 +1138,9 @@ function nt(e, t, n = D()) {
1138
1138
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1139
1139
  for (const s of i) {
1140
1140
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1141
- const a = t[s.key];
1142
- if (a == null || a === "") continue;
1143
- const l = Pe(s, a, n);
1141
+ const o = t[s.key];
1142
+ if (o == null || o === "") continue;
1143
+ const l = Pe(s, o, n);
1144
1144
  l && r.push(`${s.label} :
1145
1145
  ${l}`);
1146
1146
  }
@@ -1152,9 +1152,9 @@ function st(e, t, n = D()) {
1152
1152
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1153
1153
  for (const s of r) {
1154
1154
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1155
- const a = t == null ? void 0 : t[s.key];
1156
- if (a == null || a === "") continue;
1157
- const l = Pe(s, a, n);
1155
+ const o = t == null ? void 0 : t[s.key];
1156
+ if (o == null || o === "") continue;
1157
+ const l = Pe(s, o, n);
1158
1158
  if (!l) continue;
1159
1159
  const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1160
1160
  `));
@@ -1187,12 +1187,12 @@ function Oe(e, t) {
1187
1187
  function rt(e, t) {
1188
1188
  var n, i, r;
1189
1189
  for (let s = t.length - 1; s >= 0; s--) {
1190
- const a = t[s];
1191
- if (!a) continue;
1192
- const l = typeof a.text_md == "string" ? a.text_md.trim() : "";
1190
+ const o = t[s];
1191
+ if (!o) continue;
1192
+ const l = typeof o.text_md == "string" ? o.text_md.trim() : "";
1193
1193
  if (l)
1194
- return (((n = a.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1195
- const p = (i = a.payload) == null ? void 0 : i.attachments;
1194
+ return (((n = o.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1195
+ const p = (i = o.payload) == null ? void 0 : i.attachments;
1196
1196
  if (Array.isArray(p) && p.length) return "📎 Pièce jointe";
1197
1197
  }
1198
1198
  return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((r = e == null ? void 0 : e.metadata) == null ? void 0 : r.last_preview) || "";
@@ -1210,10 +1210,10 @@ function at(e, t, n, i) {
1210
1210
  ];
1211
1211
  for (const s of t) {
1212
1212
  if (!s) continue;
1213
- const a = (s.text_md || "").trim();
1214
- if (!a) continue;
1213
+ const o = (s.text_md || "").trim();
1214
+ if (!o) continue;
1215
1215
  const l = it(s.author, n), p = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
1216
- r.push(`[${p}] ${l} :`), r.push(a), r.push("");
1216
+ r.push(`[${p}] ${l} :`), r.push(o), r.push("");
1217
1217
  }
1218
1218
  return r.join(`
1219
1219
  `);
@@ -1222,10 +1222,10 @@ function ot(e, t, n = D(), i) {
1222
1222
  if (!e) return;
1223
1223
  const r = at(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1224
1224
  try {
1225
- const a = URL.createObjectURL(s), l = document.createElement("a");
1226
- l.href = a, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(a), 1e3);
1227
- } catch (a) {
1228
- console.error("[ww-messenger] export failed", a);
1225
+ const o = URL.createObjectURL(s), l = document.createElement("a");
1226
+ l.href = o, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(o), 1e3);
1227
+ } catch (o) {
1228
+ console.error("[ww-messenger] export failed", o);
1229
1229
  }
1230
1230
  }
1231
1231
  const lt = {
@@ -1362,7 +1362,7 @@ const lt = {
1362
1362
  },
1363
1363
  showBrowserNotification(e, t) {
1364
1364
  if (typeof Notification > "u" || Notification.permission !== "granted") return;
1365
- const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
1365
+ const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), o = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = o ? o.slice(0, 140) : this.t("notification.youHaveNewMessage");
1366
1366
  try {
1367
1367
  const p = new Notification(s, {
1368
1368
  body: l,
@@ -1386,7 +1386,7 @@ const lt = {
1386
1386
  }
1387
1387
  }
1388
1388
  }
1389
- }, ct = 450, dt = 50, ut = 900, mt = 12e3, ht = 300, ft = {
1389
+ }, ct = 450, dt = 50, ut = 900, ht = 12e3, mt = 300, ft = {
1390
1390
  data() {
1391
1391
  return {
1392
1392
  // Map: messageId → ms timestamp once shown.
@@ -1466,21 +1466,21 @@ const lt = {
1466
1466
  const t = e == null ? void 0 : e.conversations;
1467
1467
  if (!Array.isArray(t) || !this.store) return;
1468
1468
  const n = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
1469
- for (const a of t) {
1470
- if (!(a != null && a.id)) continue;
1471
- const l = a.last_message_at || "";
1469
+ for (const o of t) {
1470
+ if (!(o != null && o.id)) continue;
1471
+ const l = o.last_message_at || "";
1472
1472
  if (!l) continue;
1473
- const p = n.get(a.id) || "";
1474
- l > p && i.push(a.id);
1473
+ const p = n.get(o.id) || "";
1474
+ l > p && i.push(o.id);
1475
1475
  }
1476
1476
  this._liveRevealConvSnapshot = new Map(
1477
- t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
1477
+ t.map((o) => [o.id, (o == null ? void 0 : o.last_message_at) || ""])
1478
1478
  );
1479
- for (const a of i)
1479
+ for (const o of i)
1480
1480
  try {
1481
- const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r, a));
1481
+ const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r, o));
1482
1482
  if (!Array.isArray(l)) continue;
1483
- for (const p of l) this.paceLiveMessage(p, a);
1483
+ for (const p of l) this.paceLiveMessage(p, o);
1484
1484
  } catch (l) {
1485
1485
  console.error(
1486
1486
  "[ww-messenger] activity delta fetch failed",
@@ -1495,14 +1495,14 @@ const lt = {
1495
1495
  // bounded by MIN/MAX_TYPING_MS.
1496
1496
  scheduleReveal(e, t) {
1497
1497
  const n = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, r = Math.min(
1498
- mt,
1498
+ ht,
1499
1499
  Math.max(ut, i * dt)
1500
- ), a = Math.max(
1500
+ ), o = Math.max(
1501
1501
  n + ct,
1502
- this.nextRevealAt + ht
1502
+ this.nextRevealAt + mt
1503
1503
  ) + r;
1504
- this.nextRevealAt = a;
1505
- const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
1504
+ this.nextRevealAt = o;
1505
+ const l = Math.max(0, o - n), p = e.id, k = setTimeout(() => {
1506
1506
  this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1507
1507
  }, l);
1508
1508
  this.revealTimers.push(k);
@@ -1522,8 +1522,8 @@ const lt = {
1522
1522
  i[s.id] = n;
1523
1523
  continue;
1524
1524
  }
1525
- const a = s != null && s.created_at ? Date.parse(s.created_at) : NaN;
1526
- if (!Number.isFinite(a) || a < this.convOpenedAt) {
1525
+ const o = s != null && s.created_at ? Date.parse(s.created_at) : NaN;
1526
+ if (!Number.isFinite(o) || o < this.convOpenedAt) {
1527
1527
  i[s.id] = n;
1528
1528
  continue;
1529
1529
  }
@@ -1620,9 +1620,9 @@ const lt = {
1620
1620
  // messages, or when the pointer is already at/ahead of the
1621
1621
  // candidate id.
1622
1622
  markConvRead(e) {
1623
- var s, a;
1623
+ var s, o;
1624
1624
  if (!(e != null && e.id) || e._draft || !this.store) return;
1625
- const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n = vt(t);
1625
+ const t = ((o = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : o[e.id]) || [], n = vt(t);
1626
1626
  if (n == null) return;
1627
1627
  const i = W(e.last_read_message_id), r = W(n);
1628
1628
  r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
@@ -1670,22 +1670,22 @@ const N = (e, t) => {
1670
1670
  }
1671
1671
  }, wt = ["src", "alt"];
1672
1672
  function bt(e, t, n, i, r, s) {
1673
- return c(), u("div", {
1673
+ return c(), d("div", {
1674
1674
  class: O(["wm-huav", { "wm-huav--tail": n.tail }]),
1675
- style: q({
1675
+ style: z({
1676
1676
  width: n.size + "px",
1677
1677
  height: n.size + "px",
1678
1678
  "--wm-avr": Math.round(n.size * 0.32) + "px",
1679
1679
  background: s.bg
1680
1680
  })
1681
1681
  }, [
1682
- n.avatarUrl ? (c(), u("img", {
1682
+ n.avatarUrl ? (c(), d("img", {
1683
1683
  key: 0,
1684
1684
  src: n.avatarUrl,
1685
1685
  alt: n.name || ""
1686
- }, null, 8, wt)) : (c(), u("span", {
1686
+ }, null, 8, wt)) : (c(), d("span", {
1687
1687
  key: 1,
1688
- style: q({ fontSize: n.size * 0.36 + "px" })
1688
+ style: z({ fontSize: n.size * 0.36 + "px" })
1689
1689
  }, v(s.initials), 5))
1690
1690
  ], 6);
1691
1691
  }
@@ -1717,24 +1717,24 @@ const Ce = /* @__PURE__ */ N(yt, [["render", bt], ["__scopeId", "data-v-14e10c0d
1717
1717
  }
1718
1718
  }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, It = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, Bt = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1719
1719
  function Pt(e, t, n, i, r, s) {
1720
- const a = R("HumanAvatar");
1721
- return c(), u("div", {
1720
+ const o = R("HumanAvatar");
1721
+ return c(), d("div", {
1722
1722
  class: "wm-launcherWrap",
1723
1723
  onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
1724
1724
  onMouseleave: t[2] || (t[2] = (l) => e.$emit("hover", !1)),
1725
1725
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1726
1726
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1727
1727
  }, [
1728
- K(Re, { name: "wm-peek" }, {
1728
+ V(Re, { name: "wm-peek" }, {
1729
1729
  default: Ne(() => [
1730
- s.visiblePeeks.length ? (c(), u("div", {
1730
+ s.visiblePeeks.length ? (c(), d("div", {
1731
1731
  key: 0,
1732
1732
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1733
1733
  }, [
1734
- (c(!0), u(E, null, F(s.visiblePeeks, (l, p) => (c(), u("div", {
1734
+ (c(!0), d(E, null, F(s.visiblePeeks, (l, p) => (c(), d("div", {
1735
1735
  key: l.convId,
1736
1736
  class: "wm-peek",
1737
- style: q({
1737
+ style: z({
1738
1738
  "--depth": s.visiblePeeks.length - 1 - p,
1739
1739
  zIndex: p + 1
1740
1740
  }),
@@ -1749,13 +1749,13 @@ function Pt(e, t, n, i, r, s) {
1749
1749
  ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1750
1750
  ]
1751
1751
  }, [
1752
- o("button", {
1752
+ a("button", {
1753
1753
  type: "button",
1754
1754
  class: "wm-peek__close",
1755
1755
  "aria-label": s.t("launcher.dismiss"),
1756
1756
  onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
1757
1757
  }, [...t[5] || (t[5] = [
1758
- o("svg", {
1758
+ a("svg", {
1759
1759
  width: "9",
1760
1760
  height: "9",
1761
1761
  viewBox: "0 0 24 24",
@@ -1766,29 +1766,29 @@ function Pt(e, t, n, i, r, s) {
1766
1766
  "stroke-linejoin": "round",
1767
1767
  "aria-hidden": "true"
1768
1768
  }, [
1769
- o("path", { d: "M18 6L6 18M6 6l12 12" })
1769
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
1770
1770
  ], -1)
1771
1771
  ])], 8, St),
1772
- o("div", Mt, [
1773
- K(a, {
1772
+ a("div", Mt, [
1773
+ V(o, {
1774
1774
  name: l.senderName,
1775
1775
  "avatar-url": l.senderAvatarUrl,
1776
1776
  size: 34
1777
1777
  }, null, 8, ["name", "avatar-url"]),
1778
- l.count > 1 ? (c(), u("span", {
1778
+ l.count > 1 ? (c(), d("span", {
1779
1779
  key: 0,
1780
1780
  class: "wm-peek__avatarBadge",
1781
1781
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1782
1782
  }, v(l.count > 9 ? "9+" : l.count), 9, Tt)) : y("", !0)
1783
1783
  ]),
1784
- o("div", xt, [
1785
- o("div", Ot, [
1786
- o("span", It, v(l.senderName || s.t("common.agent")), 1),
1787
- o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1784
+ a("div", xt, [
1785
+ a("div", Ot, [
1786
+ a("span", It, v(l.senderName || s.t("common.agent")), 1),
1787
+ a("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1788
1788
  ]),
1789
- o("p", Et, v(l.preview), 1)
1789
+ a("p", Et, v(l.preview), 1)
1790
1790
  ]),
1791
- o("button", {
1791
+ a("button", {
1792
1792
  type: "button",
1793
1793
  class: "wm-peek__open",
1794
1794
  onClick: G((k) => e.$emit("open", l.convId), ["stop"])
@@ -1798,13 +1798,13 @@ function Pt(e, t, n, i, r, s) {
1798
1798
  ]),
1799
1799
  _: 1
1800
1800
  }),
1801
- o("button", {
1801
+ a("button", {
1802
1802
  type: "button",
1803
1803
  class: "wm-launcher",
1804
1804
  "aria-label": s.t("launcher.open"),
1805
1805
  onClick: t[0] || (t[0] = (l) => e.$emit("open"))
1806
1806
  }, [
1807
- t[6] || (t[6] = o("svg", {
1807
+ t[6] || (t[6] = a("svg", {
1808
1808
  width: "20",
1809
1809
  height: "20",
1810
1810
  viewBox: "0 0 24 24",
@@ -1815,9 +1815,9 @@ function Pt(e, t, n, i, r, s) {
1815
1815
  "stroke-linejoin": "round",
1816
1816
  "aria-hidden": "true"
1817
1817
  }, [
1818
- 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" })
1818
+ a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
1819
1819
  ], -1)),
1820
- n.unreadCount > 0 ? (c(), u("span", {
1820
+ n.unreadCount > 0 ? (c(), d("span", {
1821
1821
  key: 0,
1822
1822
  class: "wm-launcher__badge",
1823
1823
  "aria-label": n.unreadCount > 1 ? s.t("launcher.unreadConversationsMany", {
@@ -1863,33 +1863,33 @@ const Ut = /* @__PURE__ */ N(Ct, [["render", Pt], ["__scopeId", "data-v-44ddf1a1
1863
1863
  class: "wm-aiav__pulse"
1864
1864
  }, jt = ["src", "alt"], Ht = ["width", "height"];
1865
1865
  function zt(e, t, n, i, r, s) {
1866
- return c(), u("div", {
1866
+ return c(), d("div", {
1867
1867
  class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1868
- style: q({
1868
+ style: z({
1869
1869
  width: n.size + "px",
1870
1870
  height: n.size + "px",
1871
1871
  "--wm-avr": n.size * 0.32 + "px"
1872
1872
  })
1873
1873
  }, [
1874
- n.pulse ? (c(), u("div", Dt)) : y("", !0),
1875
- o("div", {
1874
+ n.pulse ? (c(), d("div", Dt)) : y("", !0),
1875
+ a("div", {
1876
1876
  class: O(["wm-aiav__inner", {
1877
1877
  "wm-aiav__inner--glow": n.pulse,
1878
1878
  "wm-aiav__inner--img": !!n.imageUrl,
1879
1879
  "wm-aiav__inner--initials": !n.imageUrl && !!s.initials
1880
1880
  }]),
1881
- style: q(
1881
+ style: z(
1882
1882
  !n.imageUrl && s.initials ? { background: s.bgColor } : null
1883
1883
  )
1884
1884
  }, [
1885
- n.imageUrl ? (c(), u("img", {
1885
+ n.imageUrl ? (c(), d("img", {
1886
1886
  key: 0,
1887
1887
  src: n.imageUrl,
1888
1888
  alt: n.name || ""
1889
- }, null, 8, jt)) : s.initials ? (c(), u("span", {
1889
+ }, null, 8, jt)) : s.initials ? (c(), d("span", {
1890
1890
  key: 1,
1891
- style: q({ fontSize: n.size * 0.36 + "px" })
1892
- }, v(s.initials), 5)) : (c(), u("svg", {
1891
+ style: z({ fontSize: n.size * 0.36 + "px" })
1892
+ }, v(s.initials), 5)) : (c(), d("svg", {
1893
1893
  key: 2,
1894
1894
  width: n.size * 0.5,
1895
1895
  height: n.size * 0.5,
@@ -1897,19 +1897,19 @@ function zt(e, t, n, i, r, s) {
1897
1897
  fill: "none",
1898
1898
  "aria-hidden": "true"
1899
1899
  }, [...t[0] || (t[0] = [
1900
- o("path", {
1900
+ a("path", {
1901
1901
  d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
1902
1902
  fill: "white",
1903
1903
  opacity: "0.92"
1904
1904
  }, null, -1),
1905
- o("circle", {
1905
+ a("circle", {
1906
1906
  cx: "19",
1907
1907
  cy: "5",
1908
1908
  r: "1.5",
1909
1909
  fill: "white",
1910
1910
  opacity: "0.55"
1911
1911
  }, null, -1),
1912
- o("circle", {
1912
+ a("circle", {
1913
1913
  cx: "5",
1914
1914
  cy: "18",
1915
1915
  r: "1",
@@ -1942,36 +1942,36 @@ const le = /* @__PURE__ */ N(Ft, [["render", zt], ["__scopeId", "data-v-6f7f685d
1942
1942
  return be(e.name || "");
1943
1943
  }
1944
1944
  }
1945
- }, Kt = {
1945
+ }, Vt = {
1946
1946
  key: 0,
1947
1947
  class: "wm-team"
1948
- }, Vt = ["src", "alt"], $t = { key: 1 }, Wt = {
1948
+ }, Kt = ["src", "alt"], $t = { key: 1 }, Wt = {
1949
1949
  key: 0,
1950
1950
  class: "wm-team__label"
1951
1951
  };
1952
1952
  function Gt(e, t, n, i, r, s) {
1953
- return s.visible ? (c(), u("div", Kt, [
1954
- o("div", {
1953
+ return s.visible ? (c(), d("div", Vt, [
1954
+ a("div", {
1955
1955
  class: "wm-team__stack",
1956
- style: q({ width: s.stackWidth + "px" })
1956
+ style: z({ width: s.stackWidth + "px" })
1957
1957
  }, [
1958
- (c(!0), u(E, null, F(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1958
+ (c(!0), d(E, null, F(n.members.slice(0, 3), (o, l) => (c(), d("div", {
1959
1959
  key: l,
1960
1960
  class: "wm-team__pill",
1961
- style: q({
1961
+ style: z({
1962
1962
  left: l * 13 + "px",
1963
1963
  zIndex: 3 - l,
1964
- background: s.colorFor(a)
1964
+ background: s.colorFor(o)
1965
1965
  })
1966
1966
  }, [
1967
- a.avatar_url ? (c(), u("img", {
1967
+ o.avatar_url ? (c(), d("img", {
1968
1968
  key: 0,
1969
- src: a.avatar_url,
1970
- alt: a.name || ""
1971
- }, null, 8, Vt)) : (c(), u("span", $t, v(s.initialsFor(a)), 1))
1969
+ src: o.avatar_url,
1970
+ alt: o.name || ""
1971
+ }, null, 8, Kt)) : (c(), d("span", $t, v(s.initialsFor(o)), 1))
1972
1972
  ], 4))), 128))
1973
1973
  ], 4),
1974
- n.responseLabel ? (c(), u("span", Wt, v(n.responseLabel), 1)) : y("", !0)
1974
+ n.responseLabel ? (c(), d("span", Wt, v(n.responseLabel), 1)) : y("", !0)
1975
1975
  ])) : y("", !0);
1976
1976
  }
1977
1977
  const Yt = /* @__PURE__ */ N(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063"]]), Jt = {
@@ -2021,16 +2021,16 @@ const Yt = /* @__PURE__ */ N(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063
2021
2021
  class: "wm-header__fill"
2022
2022
  }, rn = { class: "wm-header__actions" }, an = ["aria-label", "title"], on = ["aria-label", "title"];
2023
2023
  function ln(e, t, n, i, r, s) {
2024
- const a = R("AIAvatar"), l = R("TeamAvatars");
2025
- return c(), u("div", Qt, [
2026
- n.showBack ? (c(), u("button", {
2024
+ const o = R("AIAvatar"), l = R("TeamAvatars");
2025
+ return c(), d("div", Qt, [
2026
+ n.showBack ? (c(), d("button", {
2027
2027
  key: 0,
2028
2028
  type: "button",
2029
2029
  class: "wm-header__icon",
2030
2030
  "aria-label": s.t("header.backToHome"),
2031
2031
  onClick: t[0] || (t[0] = (p) => e.$emit("back"))
2032
2032
  }, [...t[3] || (t[3] = [
2033
- o("svg", {
2033
+ a("svg", {
2034
2034
  width: "13",
2035
2035
  height: "13",
2036
2036
  viewBox: "0 0 24 24",
@@ -2041,28 +2041,28 @@ function ln(e, t, n, i, r, s) {
2041
2041
  "stroke-linejoin": "round",
2042
2042
  "aria-hidden": "true"
2043
2043
  }, [
2044
- o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2044
+ a("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2045
2045
  ], -1)
2046
- ])], 8, Xt)) : (c(), u("div", Zt)),
2047
- n.showIdentity ? (c(), u(E, { key: 2 }, [
2048
- o("div", en, [
2049
- K(a, {
2046
+ ])], 8, Xt)) : (c(), d("div", Zt)),
2047
+ n.showIdentity ? (c(), d(E, { key: 2 }, [
2048
+ a("div", en, [
2049
+ V(o, {
2050
2050
  size: 30,
2051
2051
  name: n.agentName,
2052
2052
  "image-url": n.agentAvatarUrl
2053
2053
  }, null, 8, ["name", "image-url"])
2054
2054
  ]),
2055
- o("div", tn, [
2056
- o("div", nn, v(n.title), 1)
2055
+ a("div", tn, [
2056
+ a("div", nn, v(n.title), 1)
2057
2057
  ]),
2058
2058
  s.hasTeam ? (c(), P(l, {
2059
2059
  key: 0,
2060
2060
  members: s.displayedTeamMembers,
2061
2061
  "response-label": ""
2062
2062
  }, null, 8, ["members"])) : y("", !0)
2063
- ], 64)) : (c(), u("div", sn)),
2064
- o("div", rn, [
2065
- n.showMore ? (c(), u("button", {
2063
+ ], 64)) : (c(), d("div", sn)),
2064
+ a("div", rn, [
2065
+ n.showMore ? (c(), d("button", {
2066
2066
  key: 0,
2067
2067
  type: "button",
2068
2068
  class: O(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
@@ -2070,31 +2070,31 @@ function ln(e, t, n, i, r, s) {
2070
2070
  title: s.t("header.moreOptions"),
2071
2071
  onClick: t[1] || (t[1] = (p) => e.$emit("more"))
2072
2072
  }, [...t[4] || (t[4] = [
2073
- o("svg", {
2073
+ a("svg", {
2074
2074
  width: "13",
2075
2075
  height: "13",
2076
2076
  viewBox: "0 0 24 24",
2077
2077
  fill: "currentColor",
2078
2078
  "aria-hidden": "true"
2079
2079
  }, [
2080
- o("circle", {
2080
+ a("circle", {
2081
2081
  cx: "12",
2082
2082
  cy: "5",
2083
2083
  r: "1.6"
2084
2084
  }),
2085
- o("circle", {
2085
+ a("circle", {
2086
2086
  cx: "12",
2087
2087
  cy: "12",
2088
2088
  r: "1.6"
2089
2089
  }),
2090
- o("circle", {
2090
+ a("circle", {
2091
2091
  cx: "12",
2092
2092
  cy: "19",
2093
2093
  r: "1.6"
2094
2094
  })
2095
2095
  ], -1)
2096
2096
  ])], 10, an)) : y("", !0),
2097
- n.showClose ? (c(), u("button", {
2097
+ n.showClose ? (c(), d("button", {
2098
2098
  key: 1,
2099
2099
  type: "button",
2100
2100
  class: "wm-header__icon",
@@ -2102,7 +2102,7 @@ function ln(e, t, n, i, r, s) {
2102
2102
  title: s.t("header.closeWidget"),
2103
2103
  onClick: t[2] || (t[2] = (p) => e.$emit("close"))
2104
2104
  }, [...t[5] || (t[5] = [
2105
- o("svg", {
2105
+ a("svg", {
2106
2106
  width: "13",
2107
2107
  height: "13",
2108
2108
  viewBox: "0 0 24 24",
@@ -2113,13 +2113,13 @@ function ln(e, t, n, i, r, s) {
2113
2113
  "stroke-linejoin": "round",
2114
2114
  "aria-hidden": "true"
2115
2115
  }, [
2116
- o("path", { d: "M18 6L6 18M6 6l12 12" })
2116
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
2117
2117
  ], -1)
2118
2118
  ])], 8, on)) : y("", !0)
2119
2119
  ])
2120
2120
  ]);
2121
2121
  }
2122
- const cn = /* @__PURE__ */ N(Jt, [["render", ln], ["__scopeId", "data-v-0da6fbcd"]]);
2122
+ const cn = /* @__PURE__ */ N(Jt, [["render", ln], ["__scopeId", "data-v-7af4c118"]]);
2123
2123
  function Ue(e) {
2124
2124
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2125
2125
  }
@@ -2140,7 +2140,7 @@ function un(e) {
2140
2140
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2141
2141
  return ie(Ue(t));
2142
2142
  }
2143
- function mn(e) {
2143
+ function hn(e) {
2144
2144
  if (!e) return "";
2145
2145
  const t = Ue(e).split(`
2146
2146
  `), n = [];
@@ -2201,10 +2201,10 @@ function mn(e) {
2201
2201
  }
2202
2202
  let r = "";
2203
2203
  for (let s = 0; s < n.length; s++) {
2204
- const a = n[s];
2205
- r += a.html;
2204
+ const o = n[s];
2205
+ r += o.html;
2206
2206
  const l = n[s + 1];
2207
- l && a.type !== "block" && l.type !== "block" && (r += `
2207
+ l && o.type !== "block" && l.type !== "block" && (r += `
2208
2208
  `);
2209
2209
  }
2210
2210
  return r;
@@ -2215,7 +2215,7 @@ const Le = {
2215
2215
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
2216
2216
  chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
2217
2217
  link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
2218
- }, hn = {
2218
+ }, mn = {
2219
2219
  name: "WmOnboarding",
2220
2220
  components: { AIAvatar: le, HumanAvatar: Ce },
2221
2221
  inject: {
@@ -2282,14 +2282,10 @@ const Le = {
2282
2282
  size: 40,
2283
2283
  name: t.name || "",
2284
2284
  avatarUrl: t.avatar_url || null
2285
- } : t != null && t.avatar_url || t != null && t.name ? {
2286
- size: 40,
2287
- name: t.name || "",
2288
- imageUrl: t.avatar_url || null
2289
2285
  } : {
2290
2286
  size: 40,
2291
- name: "",
2292
- imageUrl: this.defaultIconUrl
2287
+ name: (t == null ? void 0 : t.name) || "",
2288
+ imageUrl: (t == null ? void 0 : t.avatar_url) || null
2293
2289
  };
2294
2290
  },
2295
2291
  // True when neither avatar_url nor name is known for the last
@@ -2316,8 +2312,8 @@ const Le = {
2316
2312
  minute: "2-digit"
2317
2313
  });
2318
2314
  if (i.getTime() - t.getTime() < 7 * 864e5) {
2319
- const a = t.toLocaleDateString(n, { weekday: "short" });
2320
- return a.charAt(0).toUpperCase() + a.slice(1);
2315
+ const o = t.toLocaleDateString(n, { weekday: "short" });
2316
+ return o.charAt(0).toUpperCase() + o.slice(1);
2321
2317
  }
2322
2318
  return t.toLocaleDateString(n, {
2323
2319
  day: "2-digit",
@@ -2325,10 +2321,11 @@ const Le = {
2325
2321
  });
2326
2322
  }
2327
2323
  }
2328
- }, fn = { class: "wm-onb" }, _n = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, pn = { class: "wm-onb__title" }, vn = { class: "wm-onb__sub" }, yn = { class: "wm-onb__cta" }, wn = ["disabled"], bn = {
2324
+ }, fn = { class: "wm-onb" }, _n = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, pn = { class: "wm-onb__title" }, vn = { class: "wm-onb__sub" }, yn = { class: "wm-onb__cta" }, wn = ["disabled"], bn = { class: "wm-onb__startLabel" }, kn = {
2329
2325
  key: 0,
2330
2326
  class: "wm-onb__section wm-onb__section--card"
2331
- }, kn = { class: "wm-onb__section-title" }, Cn = ["onClick"], An = { class: "wm-onb__card-icon" }, Sn = {
2327
+ }, Cn = { class: "wm-onb__section-title" }, An = ["onClick"], Sn = { class: "wm-onb__card-icon" }, Mn = ["src", "alt"], Tn = {
2328
+ key: 1,
2332
2329
  width: "16",
2333
2330
  height: "16",
2334
2331
  viewBox: "0 0 24 24",
@@ -2338,30 +2335,36 @@ const Le = {
2338
2335
  "stroke-linecap": "round",
2339
2336
  "stroke-linejoin": "round",
2340
2337
  "aria-hidden": "true"
2341
- }, Mn = ["d"], Tn = { class: "wm-onb__card-body" }, xn = { class: "wm-onb__card-title" }, On = {
2338
+ }, xn = ["d"], On = { class: "wm-onb__card-body" }, In = { class: "wm-onb__card-title" }, Ln = {
2342
2339
  key: 0,
2343
2340
  class: "wm-onb__card-sub"
2344
- }, In = {
2341
+ }, En = {
2345
2342
  key: 1,
2346
2343
  class: "wm-onb__section wm-onb__section--card"
2347
- }, Ln = { class: "wm-onb__section-title" }, En = { class: "wm-onb__alertList" }, Bn = ["onClick"], Rn = ["aria-label"], Nn = { class: "wm-onb__alert-body" }, Pn = { class: "wm-onb__alert-title" }, Un = ["innerHTML"], Fn = { class: "wm-onb__alert-meta" }, Dn = {
2344
+ }, Bn = { class: "wm-onb__section-title" }, Rn = { class: "wm-onb__alertList" }, Nn = ["onClick"], Pn = {
2345
+ key: 0,
2346
+ class: "wm-onb__defaultAvatar"
2347
+ }, Un = ["aria-label"], Fn = { class: "wm-onb__alert-body" }, Dn = { class: "wm-onb__alert-title" }, jn = ["innerHTML"], Hn = { class: "wm-onb__alert-meta" }, zn = {
2348
2348
  key: 0,
2349
2349
  class: "wm-onb__alert-time"
2350
- }, jn = { class: "wm-onb__alert-resume" }, Hn = {
2350
+ }, qn = { class: "wm-onb__alert-resume" }, Vn = {
2351
2351
  key: 2,
2352
2352
  class: "wm-onb__section wm-onb__section--card"
2353
- }, zn = { class: "wm-onb__section-title" }, qn = { class: "wm-onb__search" }, Kn = ["placeholder", "aria-label"], Vn = { class: "wm-onb__list" }, $n = ["onClick"], Wn = ["aria-label"], Gn = { class: "wm-onb__thread-body" }, Yn = { class: "wm-onb__thread-title" }, Jn = ["innerHTML"], Qn = { class: "wm-onb__thread-meta" }, Xn = {
2353
+ }, Kn = { class: "wm-onb__section-title" }, $n = { class: "wm-onb__search" }, Wn = ["placeholder", "aria-label"], Gn = { class: "wm-onb__list" }, Yn = ["onClick"], Jn = {
2354
+ key: 0,
2355
+ class: "wm-onb__defaultAvatar"
2356
+ }, Qn = ["aria-label"], Xn = { class: "wm-onb__thread-body" }, Zn = { class: "wm-onb__thread-title" }, es = ["innerHTML"], ts = { class: "wm-onb__thread-meta" }, ns = {
2354
2357
  key: 0,
2355
2358
  class: "wm-onb__thread-time"
2356
- }, Zn = {
2359
+ }, ss = {
2357
2360
  key: 0,
2358
2361
  class: "wm-onb__empty"
2359
2362
  };
2360
- function es(e, t, n, i, r, s) {
2361
- const a = R("AIAvatar");
2362
- return c(), u("div", fn, [
2363
- o("div", _n, [
2364
- t[2] || (t[2] = o("svg", {
2363
+ function rs(e, t, n, i, r, s) {
2364
+ const o = R("AIAvatar");
2365
+ return c(), d("div", fn, [
2366
+ a("div", _n, [
2367
+ t[2] || (t[2] = a("svg", {
2365
2368
  class: "wm-onb__hero-deco",
2366
2369
  width: "180",
2367
2370
  height: "180",
@@ -2369,7 +2372,7 @@ function es(e, t, n, i, r, s) {
2369
2372
  fill: "none",
2370
2373
  "aria-hidden": "true"
2371
2374
  }, [
2372
- o("circle", {
2375
+ a("circle", {
2373
2376
  cx: "170",
2374
2377
  cy: "10",
2375
2378
  r: "105",
@@ -2378,7 +2381,7 @@ function es(e, t, n, i, r, s) {
2378
2381
  "stroke-dasharray": "1 5",
2379
2382
  opacity: "0.35"
2380
2383
  }),
2381
- o("circle", {
2384
+ a("circle", {
2382
2385
  cx: "170",
2383
2386
  cy: "10",
2384
2387
  r: "72",
@@ -2387,7 +2390,7 @@ function es(e, t, n, i, r, s) {
2387
2390
  "stroke-dasharray": "1 5",
2388
2391
  opacity: "0.5"
2389
2392
  }),
2390
- o("circle", {
2393
+ a("circle", {
2391
2394
  cx: "152",
2392
2395
  cy: "34",
2393
2396
  r: "2.5",
@@ -2395,102 +2398,139 @@ function es(e, t, n, i, r, s) {
2395
2398
  opacity: "0.65"
2396
2399
  })
2397
2400
  ], -1)),
2398
- K(a, {
2401
+ V(o, {
2399
2402
  size: 52,
2400
2403
  "image-url": n.defaultIconUrl
2401
2404
  }, null, 8, ["image-url"]),
2402
- o("div", gn, [
2403
- o("div", pn, v(s.heroTitle), 1),
2404
- o("div", vn, v(s.heroSub), 1)
2405
+ a("div", gn, [
2406
+ a("div", pn, v(s.heroTitle), 1),
2407
+ a("div", vn, v(s.heroSub), 1)
2405
2408
  ])
2406
2409
  ]),
2407
- o("div", yn, [
2408
- o("button", {
2410
+ a("div", yn, [
2411
+ a("button", {
2409
2412
  type: "button",
2410
2413
  class: "wm-onb__startBtn",
2411
2414
  disabled: n.busy,
2412
2415
  onClick: t[0] || (t[0] = (l) => e.$emit("start"))
2413
2416
  }, [
2414
- t[3] || (t[3] = o("span", { class: "wm-onb__startIcon" }, [
2415
- o("svg", {
2416
- width: "12",
2417
- height: "12",
2417
+ t[3] || (t[3] = a("span", { class: "wm-onb__startIcon" }, [
2418
+ a("svg", {
2419
+ width: "14",
2420
+ height: "14",
2418
2421
  viewBox: "0 0 24 24",
2419
2422
  fill: "none",
2420
2423
  stroke: "currentColor",
2421
- "stroke-width": "2.2",
2424
+ "stroke-width": "2.4",
2422
2425
  "stroke-linecap": "round",
2423
2426
  "stroke-linejoin": "round",
2424
2427
  "aria-hidden": "true"
2425
2428
  }, [
2426
- o("path", { d: "M12 5v14M5 12h14" })
2429
+ a("path", { d: "M12 5v14M5 12h14" })
2427
2430
  ])
2428
2431
  ], -1)),
2429
- o("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2432
+ a("span", bn, v(n.busy ? "…" : s.t("onboarding.start")), 1),
2433
+ t[4] || (t[4] = a("svg", {
2434
+ class: "wm-onb__startArrow",
2435
+ width: "14",
2436
+ height: "14",
2437
+ viewBox: "0 0 24 24",
2438
+ fill: "none",
2439
+ stroke: "currentColor",
2440
+ "stroke-width": "2",
2441
+ "stroke-linecap": "round",
2442
+ "stroke-linejoin": "round",
2443
+ "aria-hidden": "true"
2444
+ }, [
2445
+ a("path", { d: "M5 12h14M13 5l7 7-7 7" })
2446
+ ], -1))
2430
2447
  ], 8, wn)
2431
2448
  ]),
2432
- n.quickLinks.length ? (c(), u("div", bn, [
2433
- o("div", kn, v(s.t("onboarding.quickAccess")), 1),
2434
- o("div", {
2449
+ n.quickLinks.length ? (c(), d("div", kn, [
2450
+ a("div", Cn, v(s.t("onboarding.quickAccess")), 1),
2451
+ a("div", {
2435
2452
  class: O(s.quickLinksLayout)
2436
2453
  }, [
2437
- (c(!0), u(E, null, F(n.quickLinks, (l, p) => (c(), u("button", {
2454
+ (c(!0), d(E, null, F(n.quickLinks, (l, p) => (c(), d("button", {
2438
2455
  key: p,
2439
2456
  type: "button",
2440
2457
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
2458
+ style: z(l.color ? { "--card-color": l.color } : null),
2441
2459
  onClick: (k) => e.$emit("select", l)
2442
2460
  }, [
2443
- o("span", An, [
2444
- (c(), u("svg", Sn, [
2445
- o("path", {
2461
+ a("span", Sn, [
2462
+ l.icon_url ? (c(), d("img", {
2463
+ key: 0,
2464
+ src: l.icon_url,
2465
+ alt: l.label || "",
2466
+ class: "wm-onb__card-iconImg"
2467
+ }, null, 8, Mn)) : (c(), d("svg", Tn, [
2468
+ a("path", {
2446
2469
  d: s.iconPath(l.icon)
2447
- }, null, 8, Mn)
2470
+ }, null, 8, xn)
2448
2471
  ]))
2449
2472
  ]),
2450
- o("span", Tn, [
2451
- o("span", xn, v(l.label), 1),
2452
- l.description ? (c(), u("span", On, v(l.description), 1)) : y("", !0)
2473
+ a("span", On, [
2474
+ a("span", In, v(l.label), 1),
2475
+ l.subtitle ? (c(), d("span", Ln, v(l.subtitle), 1)) : y("", !0)
2453
2476
  ])
2454
- ], 10, Cn))), 128))
2477
+ ], 14, An))), 128))
2455
2478
  ], 2)
2456
2479
  ])) : y("", !0),
2457
- s.unreadThreads.length ? (c(), u("div", In, [
2458
- o("div", Ln, v(s.t("onboarding.unreadConversations")), 1),
2459
- o("div", En, [
2460
- (c(!0), u(E, null, F(s.unreadThreads, (l) => (c(), u("button", {
2480
+ s.unreadThreads.length ? (c(), d("div", En, [
2481
+ a("div", Bn, v(s.t("onboarding.unreadConversations")), 1),
2482
+ a("div", Rn, [
2483
+ (c(!0), d(E, null, F(s.unreadThreads, (l) => (c(), d("button", {
2461
2484
  key: l.id,
2462
2485
  type: "button",
2463
2486
  class: "wm-onb__alert",
2464
2487
  onClick: (p) => e.$emit("resume", l)
2465
2488
  }, [
2466
- o("span", {
2489
+ a("span", {
2467
2490
  class: O(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
2468
2491
  }, [
2469
- (c(), P(pe(s.avatarComponent(l)), Se({ ref_for: !0 }, s.avatarProps(l)), null, 16)),
2470
- o("span", {
2492
+ s.isDefaultAvatar(l) ? (c(), d("span", Pn, [...t[5] || (t[5] = [
2493
+ a("svg", {
2494
+ width: "20",
2495
+ height: "20",
2496
+ viewBox: "0 0 24 24",
2497
+ fill: "none",
2498
+ stroke: "currentColor",
2499
+ "stroke-width": "1.7",
2500
+ "stroke-linecap": "round",
2501
+ "stroke-linejoin": "round",
2502
+ "aria-hidden": "true"
2503
+ }, [
2504
+ a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2505
+ ], -1)
2506
+ ])])) : (c(), P(pe(s.avatarComponent(l)), Se({
2507
+ key: 1,
2508
+ ref_for: !0
2509
+ }, s.avatarProps(l)), null, 16)),
2510
+ a("span", {
2471
2511
  class: "wm-onb__alert-dot",
2472
2512
  "aria-label": s.t("onboarding.unread")
2473
- }, null, 8, Rn)
2513
+ }, null, 8, Un)
2474
2514
  ], 2),
2475
- o("span", Nn, [
2476
- o("span", Pn, v(l.title), 1),
2477
- o("span", {
2515
+ a("span", Fn, [
2516
+ a("span", Dn, v(l.title), 1),
2517
+ a("span", {
2478
2518
  class: "wm-onb__alert-preview",
2479
2519
  innerHTML: s.renderPreview(l.preview)
2480
- }, null, 8, Un)
2520
+ }, null, 8, jn)
2481
2521
  ]),
2482
- o("span", Fn, [
2483
- s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2484
- o("span", jn, v(s.t("onboarding.resume")), 1)
2522
+ a("span", Hn, [
2523
+ s.formatTs(l._ts) ? (c(), d("span", zn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2524
+ a("span", qn, v(s.t("onboarding.resume")), 1)
2485
2525
  ])
2486
- ], 8, Bn))), 128))
2526
+ ], 8, Nn))), 128))
2487
2527
  ])
2488
2528
  ])) : y("", !0),
2489
- n.openThreads.length ? (c(), u("div", Hn, [
2490
- o("div", zn, v(s.t("onboarding.recentConversations")), 1),
2491
- o("div", qn, [
2492
- t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
2493
- o("svg", {
2529
+ n.openThreads.length ? (c(), d("div", Vn, [
2530
+ a("div", Kn, v(s.t("onboarding.recentConversations")), 1),
2531
+ a("div", $n, [
2532
+ t[6] || (t[6] = a("span", { class: "wm-onb__searchIcon" }, [
2533
+ a("svg", {
2494
2534
  width: "12",
2495
2535
  height: "12",
2496
2536
  viewBox: "0 0 24 24",
@@ -2501,45 +2541,62 @@ function es(e, t, n, i, r, s) {
2501
2541
  "stroke-linejoin": "round",
2502
2542
  "aria-hidden": "true"
2503
2543
  }, [
2504
- o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2544
+ a("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2505
2545
  ])
2506
2546
  ], -1)),
2507
- $(o("input", {
2547
+ $(a("input", {
2508
2548
  "onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
2509
2549
  type: "text",
2510
2550
  placeholder: s.t("onboarding.search"),
2511
2551
  "aria-label": s.t("onboarding.search")
2512
- }, null, 8, Kn), [
2552
+ }, null, 8, Wn), [
2513
2553
  [X, r.query]
2514
2554
  ])
2515
2555
  ]),
2516
- o("div", Vn, [
2517
- (c(!0), u(E, null, F(s.filteredThreads, (l) => (c(), u("button", {
2556
+ a("div", Gn, [
2557
+ (c(!0), d(E, null, F(s.filteredThreads, (l) => (c(), d("button", {
2518
2558
  key: l.id,
2519
2559
  type: "button",
2520
2560
  class: O(["wm-onb__thread", { "wm-onb__thread--unread": l.unread }]),
2521
2561
  onClick: (p) => e.$emit("resume", l)
2522
2562
  }, [
2523
- o("span", {
2563
+ a("span", {
2524
2564
  class: O(["wm-onb__thread-avatar", s.avatarWrapperClass(l)])
2525
2565
  }, [
2526
- (c(), P(pe(s.avatarComponent(l)), Se({ ref_for: !0 }, s.avatarProps(l)), null, 16)),
2527
- l.unread ? (c(), u("span", {
2528
- key: 0,
2566
+ s.isDefaultAvatar(l) ? (c(), d("span", Jn, [...t[7] || (t[7] = [
2567
+ a("svg", {
2568
+ width: "20",
2569
+ height: "20",
2570
+ viewBox: "0 0 24 24",
2571
+ fill: "none",
2572
+ stroke: "currentColor",
2573
+ "stroke-width": "1.7",
2574
+ "stroke-linecap": "round",
2575
+ "stroke-linejoin": "round",
2576
+ "aria-hidden": "true"
2577
+ }, [
2578
+ a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2579
+ ], -1)
2580
+ ])])) : (c(), P(pe(s.avatarComponent(l)), Se({
2581
+ key: 1,
2582
+ ref_for: !0
2583
+ }, s.avatarProps(l)), null, 16)),
2584
+ l.unread ? (c(), d("span", {
2585
+ key: 2,
2529
2586
  class: "wm-onb__thread-dot",
2530
2587
  "aria-label": s.t("onboarding.unread")
2531
- }, null, 8, Wn)) : y("", !0)
2588
+ }, null, 8, Qn)) : y("", !0)
2532
2589
  ], 2),
2533
- o("span", Gn, [
2534
- o("span", Yn, v(l.title), 1),
2535
- o("span", {
2590
+ a("span", Xn, [
2591
+ a("span", Zn, v(l.title), 1),
2592
+ a("span", {
2536
2593
  class: "wm-onb__thread-preview",
2537
2594
  innerHTML: s.renderPreview(l.preview)
2538
- }, null, 8, Jn)
2595
+ }, null, 8, es)
2539
2596
  ]),
2540
- o("span", Qn, [
2541
- s.formatTs(l._ts) ? (c(), u("span", Xn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2542
- t[5] || (t[5] = o("svg", {
2597
+ a("span", ts, [
2598
+ s.formatTs(l._ts) ? (c(), d("span", ns, v(s.formatTs(l._ts)), 1)) : y("", !0),
2599
+ t[8] || (t[8] = a("svg", {
2543
2600
  width: "14",
2544
2601
  height: "14",
2545
2602
  viewBox: "0 0 24 24",
@@ -2551,20 +2608,20 @@ function es(e, t, n, i, r, s) {
2551
2608
  class: "wm-onb__thread-chev",
2552
2609
  "aria-hidden": "true"
2553
2610
  }, [
2554
- o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2611
+ a("path", { d: "M5 12h14M13 5l7 7-7 7" })
2555
2612
  ], -1))
2556
2613
  ])
2557
- ], 10, $n))), 128)),
2558
- s.filteredThreads.length ? y("", !0) : (c(), u("div", Zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2614
+ ], 10, Yn))), 128)),
2615
+ s.filteredThreads.length ? y("", !0) : (c(), d("div", ss, v(s.t("onboarding.noResults", { query: r.query })), 1))
2559
2616
  ])
2560
2617
  ])) : y("", !0)
2561
2618
  ]);
2562
2619
  }
2563
- const ts = /* @__PURE__ */ N(hn, [["render", es], ["__scopeId", "data-v-ee89cb1d"]]);
2564
- function ns(e) {
2620
+ const is = /* @__PURE__ */ N(mn, [["render", rs], ["__scopeId", "data-v-75c21bb3"]]);
2621
+ function as(e) {
2565
2622
  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();
2566
2623
  }
2567
- const ss = {
2624
+ const os = {
2568
2625
  name: "WmActionResult",
2569
2626
  props: {
2570
2627
  state: { type: String, default: "success" },
@@ -2574,13 +2631,13 @@ const ss = {
2574
2631
  },
2575
2632
  computed: {
2576
2633
  detailText() {
2577
- return ns(this.detail);
2634
+ return as(this.detail);
2578
2635
  }
2579
2636
  }
2580
- }, rs = {
2637
+ }, ls = {
2581
2638
  class: "wm-result__icon",
2582
2639
  "aria-hidden": "true"
2583
- }, is = {
2640
+ }, cs = {
2584
2641
  key: 0,
2585
2642
  width: "11",
2586
2643
  height: "11",
@@ -2590,7 +2647,7 @@ const ss = {
2590
2647
  "stroke-width": "2.8",
2591
2648
  "stroke-linecap": "round",
2592
2649
  "stroke-linejoin": "round"
2593
- }, as = {
2650
+ }, ds = {
2594
2651
  key: 1,
2595
2652
  width: "11",
2596
2653
  height: "11",
@@ -2600,7 +2657,7 @@ const ss = {
2600
2657
  "stroke-width": "2.6",
2601
2658
  "stroke-linecap": "round",
2602
2659
  "stroke-linejoin": "round"
2603
- }, os = {
2660
+ }, us = {
2604
2661
  key: 2,
2605
2662
  width: "11",
2606
2663
  height: "11",
@@ -2610,7 +2667,7 @@ const ss = {
2610
2667
  "stroke-width": "2.4",
2611
2668
  "stroke-linecap": "round",
2612
2669
  "stroke-linejoin": "round"
2613
- }, ls = {
2670
+ }, hs = {
2614
2671
  key: 3,
2615
2672
  width: "12",
2616
2673
  height: "12",
@@ -2620,32 +2677,32 @@ const ss = {
2620
2677
  "stroke-width": "2.2",
2621
2678
  "stroke-linecap": "round",
2622
2679
  "stroke-linejoin": "round"
2623
- }, cs = { class: "wm-result__body" }, ds = { class: "wm-result__label" }, us = { class: "wm-result__detail" };
2624
- function ms(e, t, n, i, r, s) {
2625
- return c(), u("div", {
2680
+ }, ms = { class: "wm-result__body" }, fs = { class: "wm-result__label" }, _s = { class: "wm-result__detail" };
2681
+ function gs(e, t, n, i, r, s) {
2682
+ return c(), d("div", {
2626
2683
  class: O(["wm-result", `wm-result--${n.state}`])
2627
2684
  }, [
2628
- o("span", rs, [
2629
- n.state === "success" ? (c(), u("svg", is, [...t[0] || (t[0] = [
2630
- o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2631
- ])])) : n.state === "rejected" ? (c(), u("svg", as, [...t[1] || (t[1] = [
2632
- o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2633
- ])])) : n.state === "awaiting" ? (c(), u("svg", os, [...t[2] || (t[2] = [
2634
- o("circle", {
2685
+ a("span", ls, [
2686
+ n.state === "success" ? (c(), d("svg", cs, [...t[0] || (t[0] = [
2687
+ a("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2688
+ ])])) : n.state === "rejected" ? (c(), d("svg", ds, [...t[1] || (t[1] = [
2689
+ a("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2690
+ ])])) : n.state === "awaiting" ? (c(), d("svg", us, [...t[2] || (t[2] = [
2691
+ a("circle", {
2635
2692
  cx: "12",
2636
2693
  cy: "12",
2637
2694
  r: "10"
2638
2695
  }, null, -1),
2639
- o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2640
- ])])) : (c(), u("svg", ls, [...t[3] || (t[3] = [
2641
- 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),
2642
- o("line", {
2696
+ a("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2697
+ ])])) : (c(), d("svg", hs, [...t[3] || (t[3] = [
2698
+ a("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),
2699
+ a("line", {
2643
2700
  x1: "12",
2644
2701
  y1: "9",
2645
2702
  x2: "12",
2646
2703
  y2: "13"
2647
2704
  }, null, -1),
2648
- o("line", {
2705
+ a("line", {
2649
2706
  x1: "12",
2650
2707
  y1: "17",
2651
2708
  x2: "12.01",
@@ -2653,19 +2710,19 @@ function ms(e, t, n, i, r, s) {
2653
2710
  }, null, -1)
2654
2711
  ])]))
2655
2712
  ]),
2656
- o("span", cs, [
2657
- o("span", ds, v(n.label), 1),
2658
- s.detailText ? (c(), u(E, { key: 0 }, [
2659
- t[4] || (t[4] = o("span", {
2713
+ a("span", ms, [
2714
+ a("span", fs, v(n.label), 1),
2715
+ s.detailText ? (c(), d(E, { key: 0 }, [
2716
+ t[4] || (t[4] = a("span", {
2660
2717
  class: "wm-result__sep",
2661
2718
  "aria-hidden": "true"
2662
2719
  }, " · ", -1)),
2663
- o("span", us, v(s.detailText), 1)
2720
+ a("span", _s, v(s.detailText), 1)
2664
2721
  ], 64)) : y("", !0)
2665
2722
  ])
2666
2723
  ], 2);
2667
2724
  }
2668
- const hs = /* @__PURE__ */ N(ss, [["render", ms], ["__scopeId", "data-v-7284acd0"]]), fs = {
2725
+ const ps = /* @__PURE__ */ N(os, [["render", gs], ["__scopeId", "data-v-7284acd0"]]), vs = {
2669
2726
  name: "WmArtifactFormResponse",
2670
2727
  inject: {
2671
2728
  // Translator shared by the Messenger shell; French fallback when
@@ -2681,13 +2738,13 @@ const hs = /* @__PURE__ */ N(ss, [["render", ms], ["__scopeId", "data-v-7284acd0
2681
2738
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2682
2739
  }
2683
2740
  }
2684
- }, _s = { class: "wm-art wm-art--formResponse" }, gs = { class: "wm-art__head" }, ps = { class: "wm-art__title" }, vs = { class: "wm-art__badge wm-art__badge--success" }, ys = { class: "wm-art__body" }, ws = { class: "wm-art__fieldLabel" };
2685
- function bs(e, t, n, i, r, s) {
2686
- return c(), u("div", _s, [
2687
- o("div", gs, [
2688
- o("div", ps, v(n.data.title || s.t("form.title")), 1),
2689
- o("span", vs, [
2690
- t[0] || (t[0] = o("svg", {
2741
+ }, ys = { class: "wm-art wm-art--formResponse" }, ws = { class: "wm-art__head" }, bs = { class: "wm-art__title" }, ks = { class: "wm-art__badge wm-art__badge--success" }, Cs = { class: "wm-art__body" }, As = { class: "wm-art__fieldLabel" };
2742
+ function Ss(e, t, n, i, r, s) {
2743
+ return c(), d("div", ys, [
2744
+ a("div", ws, [
2745
+ a("div", bs, v(n.data.title || s.t("form.title")), 1),
2746
+ a("span", ks, [
2747
+ t[0] || (t[0] = a("svg", {
2691
2748
  width: "11",
2692
2749
  height: "11",
2693
2750
  viewBox: "0 0 24 24",
@@ -2698,28 +2755,28 @@ function bs(e, t, n, i, r, s) {
2698
2755
  "stroke-linejoin": "round",
2699
2756
  "aria-hidden": "true"
2700
2757
  }, [
2701
- o("polyline", { points: "20 6 9 17 4 12" })
2758
+ a("polyline", { points: "20 6 9 17 4 12" })
2702
2759
  ], -1)),
2703
2760
  ye(" " + v(s.t("form.sent")), 1)
2704
2761
  ])
2705
2762
  ]),
2706
- o("div", ys, [
2707
- (c(!0), u(E, null, F(s.fields, (a, l) => (c(), u("div", {
2763
+ a("div", Cs, [
2764
+ (c(!0), d(E, null, F(s.fields, (o, l) => (c(), d("div", {
2708
2765
  key: l,
2709
2766
  class: "wm-art__field"
2710
2767
  }, [
2711
- o("div", ws, v(a.label), 1),
2712
- o("div", {
2768
+ a("div", As, v(o.label), 1),
2769
+ a("div", {
2713
2770
  class: O([
2714
2771
  "wm-art__fieldValue",
2715
- { "wm-art__fieldValue--multi": a.multiline }
2772
+ { "wm-art__fieldValue--multi": o.multiline }
2716
2773
  ])
2717
- }, v(a.value), 3)
2774
+ }, v(o.value), 3)
2718
2775
  ]))), 128))
2719
2776
  ])
2720
2777
  ]);
2721
2778
  }
2722
- const ks = /* @__PURE__ */ N(fs, [["render", bs], ["__scopeId", "data-v-713aecf1"]]), Cs = {
2779
+ const Ms = /* @__PURE__ */ N(vs, [["render", Ss], ["__scopeId", "data-v-713aecf1"]]), Ts = {
2723
2780
  name: "WmArtifactInfoCard",
2724
2781
  props: {
2725
2782
  data: { type: Object, required: !0 }
@@ -2734,34 +2791,34 @@ const ks = /* @__PURE__ */ N(fs, [["render", bs], ["__scopeId", "data-v-713aecf1
2734
2791
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2735
2792
  }
2736
2793
  }
2737
- }, As = { class: "wm-art wm-art--infoCard" }, Ss = {
2794
+ }, xs = { class: "wm-art wm-art--infoCard" }, Os = {
2738
2795
  key: 0,
2739
2796
  class: "wm-art__image"
2740
- }, Ms = ["src", "alt"], Ts = { class: "wm-art__head" }, xs = { class: "wm-art__headMain" }, Os = { class: "wm-art__title" }, Is = {
2797
+ }, Is = ["src", "alt"], Ls = { class: "wm-art__head" }, Es = { class: "wm-art__headMain" }, Bs = { class: "wm-art__title" }, Rs = {
2741
2798
  key: 0,
2742
2799
  class: "wm-art__subtitle"
2743
- }, Ls = {
2800
+ }, Ns = {
2744
2801
  key: 1,
2745
2802
  class: "wm-art__body"
2746
- }, Es = {
2803
+ }, Ps = {
2747
2804
  key: 0,
2748
2805
  class: "wm-art__text"
2749
- }, Bs = { class: "wm-art__fieldLabel" };
2750
- function Rs(e, t, n, i, r, s) {
2751
- return c(), u("div", As, [
2752
- n.data.image_url ? (c(), u("figure", Ss, [
2753
- o("img", {
2806
+ }, Us = { class: "wm-art__fieldLabel" };
2807
+ function Fs(e, t, n, i, r, s) {
2808
+ return c(), d("div", xs, [
2809
+ n.data.image_url ? (c(), d("figure", Os, [
2810
+ a("img", {
2754
2811
  src: n.data.image_url,
2755
2812
  alt: n.data.title || "",
2756
2813
  loading: "lazy"
2757
- }, null, 8, Ms)
2814
+ }, null, 8, Is)
2758
2815
  ])) : y("", !0),
2759
- o("div", Ts, [
2760
- o("div", xs, [
2761
- o("div", Os, v(n.data.title), 1),
2762
- n.data.subtitle ? (c(), u("div", Is, v(n.data.subtitle), 1)) : y("", !0)
2816
+ a("div", Ls, [
2817
+ a("div", Es, [
2818
+ a("div", Bs, v(n.data.title), 1),
2819
+ n.data.subtitle ? (c(), d("div", Rs, v(n.data.subtitle), 1)) : y("", !0)
2763
2820
  ]),
2764
- n.data.badge && n.data.badge.label ? (c(), u("span", {
2821
+ n.data.badge && n.data.badge.label ? (c(), d("span", {
2765
2822
  key: 0,
2766
2823
  class: O([
2767
2824
  "wm-art__badge",
@@ -2769,25 +2826,25 @@ function Rs(e, t, n, i, r, s) {
2769
2826
  ])
2770
2827
  }, v(n.data.badge.label), 3)) : y("", !0)
2771
2828
  ]),
2772
- s.hasBody ? (c(), u("div", Ls, [
2773
- n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0),
2774
- s.fields.length ? (c(!0), u(E, { key: 1 }, F(s.fields, (a, l) => (c(), u("div", {
2829
+ s.hasBody ? (c(), d("div", Ns, [
2830
+ n.data.body ? (c(), d("div", Ps, v(n.data.body), 1)) : y("", !0),
2831
+ s.fields.length ? (c(!0), d(E, { key: 1 }, F(s.fields, (o, l) => (c(), d("div", {
2775
2832
  key: l,
2776
2833
  class: "wm-art__field"
2777
2834
  }, [
2778
- o("div", Bs, v(a.label), 1),
2779
- o("div", {
2835
+ a("div", Us, v(o.label), 1),
2836
+ a("div", {
2780
2837
  class: O([
2781
2838
  "wm-art__fieldValue",
2782
- { "wm-art__fieldValue--multi": a.multiline }
2839
+ { "wm-art__fieldValue--multi": o.multiline }
2783
2840
  ])
2784
- }, v(a.value), 3)
2841
+ }, v(o.value), 3)
2785
2842
  ]))), 128)) : y("", !0)
2786
2843
  ])) : y("", !0)
2787
2844
  ]);
2788
2845
  }
2789
- const Ns = /* @__PURE__ */ N(Cs, [["render", Rs], ["__scopeId", "data-v-7eae0e4a"]]);
2790
- function Ps(e, t, n) {
2846
+ const Ds = /* @__PURE__ */ N(Ts, [["render", Fs], ["__scopeId", "data-v-7eae0e4a"]]);
2847
+ function js(e, t, n) {
2791
2848
  if (!e) return "";
2792
2849
  const i = new Date(e);
2793
2850
  if (Number.isNaN(i.getTime())) return e;
@@ -2801,7 +2858,7 @@ function Ps(e, t, n) {
2801
2858
  });
2802
2859
  return `${r}${n}${s}`;
2803
2860
  }
2804
- const Us = {
2861
+ const Hs = {
2805
2862
  name: "WmArtifactTicket",
2806
2863
  inject: {
2807
2864
  // Translator + resolved-language getter shared by the Messenger
@@ -2819,7 +2876,7 @@ const Us = {
2819
2876
  },
2820
2877
  formattedDate() {
2821
2878
  var e;
2822
- return Ps(
2879
+ return js(
2823
2880
  (e = this.data) == null ? void 0 : e.created_at,
2824
2881
  re(this.wmLocale()),
2825
2882
  this.t("ticket.dateAt")
@@ -2847,13 +2904,13 @@ const Us = {
2847
2904
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2848
2905
  }
2849
2906
  }
2850
- }, Fs = { class: "wm-art wm-art--ticket" }, Ds = { class: "wm-art__head wm-tk__head" }, js = { class: "wm-art__title wm-tk__title" }, Hs = { class: "wm-tk__sub" }, zs = { class: "wm-tk__ref" }, qs = {
2907
+ }, zs = { class: "wm-art wm-art--ticket" }, qs = { class: "wm-art__head wm-tk__head" }, Vs = { class: "wm-art__title wm-tk__title" }, Ks = { class: "wm-tk__sub" }, $s = { class: "wm-tk__ref" }, Ws = {
2851
2908
  key: 0,
2852
2909
  class: "wm-tk__text"
2853
- }, Ks = {
2910
+ }, Gs = {
2854
2911
  key: 0,
2855
2912
  class: "wm-art__body"
2856
- }, Vs = { class: "wm-art__fieldLabel" }, $s = ["data-level"], Ws = {
2913
+ }, Ys = { class: "wm-art__fieldLabel" }, Js = ["data-level"], Qs = {
2857
2914
  key: 1,
2858
2915
  class: "wm-tk__date",
2859
2916
  width: "12",
@@ -2865,17 +2922,17 @@ const Us = {
2865
2922
  "stroke-linecap": "round",
2866
2923
  "stroke-linejoin": "round",
2867
2924
  "aria-hidden": "true"
2868
- }, Gs = {
2925
+ }, Xs = {
2869
2926
  key: 1,
2870
2927
  class: "wm-art__footer wm-tk__footer"
2871
2928
  };
2872
- function Ys(e, t, n, i, r, s) {
2873
- return c(), u("div", Fs, [
2874
- o("div", Ds, [
2875
- o("div", js, v(n.data.title), 1),
2876
- o("div", Hs, [
2877
- o("div", zs, [
2878
- t[0] || (t[0] = o("svg", {
2929
+ function Zs(e, t, n, i, r, s) {
2930
+ return c(), d("div", zs, [
2931
+ a("div", qs, [
2932
+ a("div", Vs, v(n.data.title), 1),
2933
+ a("div", Ks, [
2934
+ a("div", $s, [
2935
+ t[0] || (t[0] = a("svg", {
2879
2936
  width: "11",
2880
2937
  height: "11",
2881
2938
  viewBox: "0 0 24 24",
@@ -2886,85 +2943,85 @@ function Ys(e, t, n, i, r, s) {
2886
2943
  "stroke-linejoin": "round",
2887
2944
  "aria-hidden": "true"
2888
2945
  }, [
2889
- 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" }),
2890
- o("path", { d: "M13 5v2M13 17v2M13 11v2" })
2946
+ a("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" }),
2947
+ a("path", { d: "M13 5v2M13 17v2M13 11v2" })
2891
2948
  ], -1)),
2892
- o("span", null, v(n.data.reference), 1)
2949
+ a("span", null, v(n.data.reference), 1)
2893
2950
  ]),
2894
- o("span", {
2951
+ a("span", {
2895
2952
  class: O([
2896
2953
  "wm-art__badge",
2897
2954
  "wm-tk__badge",
2898
2955
  `wm-art__badge--${n.data.status.tone || "neutral"}`
2899
2956
  ])
2900
2957
  }, [
2901
- t[1] || (t[1] = o("span", {
2958
+ t[1] || (t[1] = a("span", {
2902
2959
  class: "wm-tk__dot",
2903
2960
  "aria-hidden": "true"
2904
2961
  }, null, -1)),
2905
2962
  ye(" " + v(n.data.status.label), 1)
2906
2963
  ], 2)
2907
2964
  ]),
2908
- n.data.body ? (c(), u("div", qs, v(n.data.body), 1)) : y("", !0)
2965
+ n.data.body ? (c(), d("div", Ws, v(n.data.body), 1)) : y("", !0)
2909
2966
  ]),
2910
- s.fields.length ? (c(), u("div", Ks, [
2911
- (c(!0), u(E, null, F(s.fields, (a, l) => (c(), u("div", {
2967
+ s.fields.length ? (c(), d("div", Gs, [
2968
+ (c(!0), d(E, null, F(s.fields, (o, l) => (c(), d("div", {
2912
2969
  key: l,
2913
2970
  class: "wm-art__field"
2914
2971
  }, [
2915
- o("div", Vs, v(a.label), 1),
2916
- o("div", {
2972
+ a("div", Ys, v(o.label), 1),
2973
+ a("div", {
2917
2974
  class: O([
2918
2975
  "wm-art__fieldValue",
2919
- { "wm-art__fieldValue--multi": a.multiline }
2976
+ { "wm-art__fieldValue--multi": o.multiline }
2920
2977
  ])
2921
2978
  }, [
2922
- s.isPriority(a.label) ? (c(), u("svg", {
2979
+ s.isPriority(o.label) ? (c(), d("svg", {
2923
2980
  key: 0,
2924
2981
  class: "wm-tk__prio",
2925
- "data-level": s.priorityLevel(a.value),
2982
+ "data-level": s.priorityLevel(o.value),
2926
2983
  width: "12",
2927
2984
  height: "12",
2928
2985
  viewBox: "0 0 12 12",
2929
2986
  "aria-hidden": "true"
2930
2987
  }, [...t[2] || (t[2] = [
2931
- o("rect", {
2988
+ a("rect", {
2932
2989
  x: "1",
2933
2990
  y: "8",
2934
2991
  width: "2",
2935
2992
  height: "3",
2936
2993
  rx: "0.5"
2937
2994
  }, null, -1),
2938
- o("rect", {
2995
+ a("rect", {
2939
2996
  x: "5",
2940
2997
  y: "5",
2941
2998
  width: "2",
2942
2999
  height: "6",
2943
3000
  rx: "0.5"
2944
3001
  }, null, -1),
2945
- o("rect", {
3002
+ a("rect", {
2946
3003
  x: "9",
2947
3004
  y: "2",
2948
3005
  width: "2",
2949
3006
  height: "9",
2950
3007
  rx: "0.5"
2951
3008
  }, null, -1)
2952
- ])], 8, $s)) : s.isDate(a.label) ? (c(), u("svg", Ws, [...t[3] || (t[3] = [
2953
- o("rect", {
3009
+ ])], 8, Js)) : s.isDate(o.label) ? (c(), d("svg", Qs, [...t[3] || (t[3] = [
3010
+ a("rect", {
2954
3011
  x: "3",
2955
3012
  y: "4",
2956
3013
  width: "18",
2957
3014
  height: "18",
2958
3015
  rx: "2"
2959
3016
  }, null, -1),
2960
- o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3017
+ a("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2961
3018
  ])])) : y("", !0),
2962
- o("span", null, v(a.value), 1)
3019
+ a("span", null, v(o.value), 1)
2963
3020
  ], 2)
2964
3021
  ]))), 128))
2965
3022
  ])) : y("", !0),
2966
- n.data.created_at ? (c(), u("div", Gs, [
2967
- t[4] || (t[4] = o("svg", {
3023
+ n.data.created_at ? (c(), d("div", Xs, [
3024
+ t[4] || (t[4] = a("svg", {
2968
3025
  width: "11",
2969
3026
  height: "11",
2970
3027
  viewBox: "0 0 24 24",
@@ -2975,24 +3032,24 @@ function Ys(e, t, n, i, r, s) {
2975
3032
  "stroke-linejoin": "round",
2976
3033
  "aria-hidden": "true"
2977
3034
  }, [
2978
- o("rect", {
3035
+ a("rect", {
2979
3036
  x: "3",
2980
3037
  y: "4",
2981
3038
  width: "18",
2982
3039
  height: "18",
2983
3040
  rx: "2"
2984
3041
  }),
2985
- o("path", { d: "M16 2v4M8 2v4M3 10h18" })
3042
+ a("path", { d: "M16 2v4M8 2v4M3 10h18" })
2986
3043
  ], -1)),
2987
- o("span", null, v(s.formattedDate), 1)
3044
+ a("span", null, v(s.formattedDate), 1)
2988
3045
  ])) : y("", !0)
2989
3046
  ]);
2990
3047
  }
2991
- const Js = /* @__PURE__ */ N(Us, [["render", Ys], ["__scopeId", "data-v-5f30c914"]]), Qs = {
2992
- form_response: ks,
2993
- info_card: Ns,
2994
- ticket: Js
2995
- }, Xs = {
3048
+ const er = /* @__PURE__ */ N(Hs, [["render", Zs], ["__scopeId", "data-v-5f30c914"]]), tr = {
3049
+ form_response: Ms,
3050
+ info_card: Ds,
3051
+ ticket: er
3052
+ }, nr = {
2996
3053
  name: "WmArtifactRenderer",
2997
3054
  props: {
2998
3055
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -3003,17 +3060,17 @@ const Js = /* @__PURE__ */ N(Us, [["render", Ys], ["__scopeId", "data-v-5f30c914
3003
3060
  component() {
3004
3061
  var t;
3005
3062
  const e = (t = this.artifact) == null ? void 0 : t.kind;
3006
- return e && Qs[e] || null;
3063
+ return e && tr[e] || null;
3007
3064
  }
3008
3065
  }
3009
3066
  };
3010
- function Zs(e, t, n, i, r, s) {
3067
+ function sr(e, t, n, i, r, s) {
3011
3068
  return s.component ? (c(), P(pe(s.component), {
3012
3069
  key: 0,
3013
3070
  data: n.artifact.data
3014
3071
  }, null, 8, ["data"])) : y("", !0);
3015
3072
  }
3016
- const er = /* @__PURE__ */ N(Xs, [["render", Zs]]), tr = {
3073
+ const rr = /* @__PURE__ */ N(nr, [["render", sr]]), ir = {
3017
3074
  name: "WmAttachmentPreview",
3018
3075
  inject: {
3019
3076
  signAttachmentFn: { default: null },
@@ -3081,51 +3138,51 @@ const er = /* @__PURE__ */ N(Xs, [["render", Zs]]), tr = {
3081
3138
  this.safeHref === "#" && e.preventDefault();
3082
3139
  }
3083
3140
  }
3084
- }, nr = ["href"], sr = ["src", "alt"], rr = ["src"], ir = ["src"], ar = ["href", "download"], or = { class: "wm-att__main" }, lr = { class: "wm-att__name" }, cr = {
3141
+ }, ar = ["href"], or = ["src", "alt"], lr = ["src"], cr = ["src"], dr = ["href", "download"], ur = { class: "wm-att__main" }, hr = { class: "wm-att__name" }, mr = {
3085
3142
  key: 0,
3086
3143
  class: "wm-att__meta"
3087
- }, dr = {
3144
+ }, fr = {
3088
3145
  key: 0,
3089
3146
  class: "wm-att__spin",
3090
3147
  "aria-hidden": "true"
3091
3148
  };
3092
- function ur(e, t, n, i, r, s) {
3093
- return c(), u("div", {
3149
+ function _r(e, t, n, i, r, s) {
3150
+ return c(), d("div", {
3094
3151
  class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
3095
3152
  }, [
3096
- s.kind === "image" && r.url ? (c(), u("a", {
3153
+ s.kind === "image" && r.url ? (c(), d("a", {
3097
3154
  key: 0,
3098
3155
  href: s.safeHref,
3099
3156
  target: "_blank",
3100
3157
  rel: "noopener",
3101
3158
  class: "wm-att__imgWrap"
3102
3159
  }, [
3103
- o("img", {
3160
+ a("img", {
3104
3161
  src: r.url,
3105
3162
  alt: s.displayName,
3106
3163
  loading: "lazy"
3107
- }, null, 8, sr)
3108
- ], 8, nr)) : s.kind === "audio" && r.url ? (c(), u("audio", {
3164
+ }, null, 8, or)
3165
+ ], 8, ar)) : s.kind === "audio" && r.url ? (c(), d("audio", {
3109
3166
  key: 1,
3110
3167
  src: r.url,
3111
3168
  controls: "",
3112
3169
  preload: "metadata"
3113
- }, null, 8, rr)) : s.kind === "video" && r.url ? (c(), u("video", {
3170
+ }, null, 8, lr)) : s.kind === "video" && r.url ? (c(), d("video", {
3114
3171
  key: 2,
3115
3172
  src: r.url,
3116
3173
  controls: "",
3117
3174
  preload: "metadata"
3118
- }, null, 8, ir)) : (c(), u("a", {
3175
+ }, null, 8, cr)) : (c(), d("a", {
3119
3176
  key: 3,
3120
3177
  class: "wm-att__file",
3121
3178
  href: s.safeHref,
3122
3179
  download: s.displayName,
3123
3180
  target: "_blank",
3124
3181
  rel: "noopener",
3125
- onClick: t[0] || (t[0] = (...a) => s.onFileClick && s.onFileClick(...a))
3182
+ onClick: t[0] || (t[0] = (...o) => s.onFileClick && s.onFileClick(...o))
3126
3183
  }, [
3127
- t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
3128
- o("svg", {
3184
+ t[1] || (t[1] = a("span", { class: "wm-att__icon" }, [
3185
+ a("svg", {
3129
3186
  width: "14",
3130
3187
  height: "14",
3131
3188
  viewBox: "0 0 24 24",
@@ -3136,19 +3193,19 @@ function ur(e, t, n, i, r, s) {
3136
3193
  "stroke-linejoin": "round",
3137
3194
  "aria-hidden": "true"
3138
3195
  }, [
3139
- o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3140
- o("path", { d: "M14 2v6h6" })
3196
+ a("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3197
+ a("path", { d: "M14 2v6h6" })
3141
3198
  ])
3142
3199
  ], -1)),
3143
- o("span", or, [
3144
- o("span", lr, v(s.displayName), 1),
3145
- s.sizeLabel ? (c(), u("span", cr, v(s.sizeLabel), 1)) : y("", !0)
3200
+ a("span", ur, [
3201
+ a("span", hr, v(s.displayName), 1),
3202
+ s.sizeLabel ? (c(), d("span", mr, v(s.sizeLabel), 1)) : y("", !0)
3146
3203
  ]),
3147
- r.loading ? (c(), u("span", dr)) : y("", !0)
3148
- ], 8, ar))
3204
+ r.loading ? (c(), d("span", fr)) : y("", !0)
3205
+ ], 8, dr))
3149
3206
  ], 2);
3150
3207
  }
3151
- const mr = /* @__PURE__ */ N(tr, [["render", ur], ["__scopeId", "data-v-0c877a62"]]), hr = {
3208
+ const gr = /* @__PURE__ */ N(ir, [["render", _r], ["__scopeId", "data-v-0c877a62"]]), pr = {
3152
3209
  name: "WmBubble",
3153
3210
  props: {
3154
3211
  role: { type: String, default: "ai" },
@@ -3157,48 +3214,48 @@ const mr = /* @__PURE__ */ N(tr, [["render", ur], ["__scopeId", "data-v-0c877a62
3157
3214
  },
3158
3215
  computed: {
3159
3216
  rendered() {
3160
- return mn(this.text);
3217
+ return hn(this.text);
3161
3218
  }
3162
3219
  }
3163
- }, fr = ["innerHTML"];
3164
- function _r(e, t, n, i, r, s) {
3165
- return c(), u("div", {
3220
+ }, vr = ["innerHTML"];
3221
+ function yr(e, t, n, i, r, s) {
3222
+ return c(), d("div", {
3166
3223
  class: O(["wm-bubble", "wm-bubble--" + n.role])
3167
3224
  }, [
3168
3225
  He(e.$slots, "default", {}, () => [
3169
- o("span", { innerHTML: s.rendered }, null, 8, fr)
3226
+ a("span", { innerHTML: s.rendered }, null, 8, vr)
3170
3227
  ], !0)
3171
3228
  ], 2);
3172
3229
  }
3173
- const gr = /* @__PURE__ */ N(hr, [["render", _r], ["__scopeId", "data-v-7ab13147"]]), pr = { name: "WmTyping" }, vr = { class: "wm-typing" };
3174
- function yr(e, t, n, i, r, s) {
3175
- return c(), u("div", vr, [...t[0] || (t[0] = [
3176
- o("span", { style: { "animation-delay": "0s" } }, null, -1),
3177
- o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3178
- o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3230
+ const wr = /* @__PURE__ */ N(pr, [["render", yr], ["__scopeId", "data-v-7ab13147"]]), br = { name: "WmTyping" }, kr = { class: "wm-typing" };
3231
+ function Cr(e, t, n, i, r, s) {
3232
+ return c(), d("div", kr, [...t[0] || (t[0] = [
3233
+ a("span", { style: { "animation-delay": "0s" } }, null, -1),
3234
+ a("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3235
+ a("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3179
3236
  ])]);
3180
3237
  }
3181
- const wr = /* @__PURE__ */ N(pr, [["render", yr], ["__scopeId", "data-v-df2447fd"]]);
3238
+ const Ar = /* @__PURE__ */ N(br, [["render", Cr], ["__scopeId", "data-v-df2447fd"]]);
3182
3239
  function Q(e) {
3183
3240
  return e ? e.client_msg_id || e.id : "";
3184
3241
  }
3185
- const br = {
3242
+ const Sr = {
3186
3243
  transferred_to_human: "system.transferredToHuman",
3187
3244
  assigned: "system.assigned",
3188
3245
  unassigned: "system.unassigned",
3189
3246
  resolved: "system.resolved",
3190
3247
  reopened: "system.reopened",
3191
3248
  idle: "system.idle"
3192
- }, kr = 80, Cr = 200, Ar = {
3249
+ }, Mr = 80, Tr = 200, xr = {
3193
3250
  name: "WmMessageList",
3194
3251
  components: {
3195
3252
  AIAvatar: le,
3196
3253
  HumanAvatar: Ce,
3197
- Bubble: gr,
3198
- Typing: wr,
3199
- ActionResult: hs,
3200
- AttachmentPreview: mr,
3201
- ArtifactRenderer: er
3254
+ Bubble: wr,
3255
+ Typing: Ar,
3256
+ ActionResult: ps,
3257
+ AttachmentPreview: gr,
3258
+ ArtifactRenderer: rr
3202
3259
  },
3203
3260
  inject: {
3204
3261
  // Translator + resolved-language getter shared by the Messenger
@@ -3269,59 +3326,59 @@ const br = {
3269
3326
  groups() {
3270
3327
  var n, i, r, s;
3271
3328
  const e = [];
3272
- for (const a of this.messages) {
3273
- const l = this.roleOf(a);
3329
+ for (const o of this.messages) {
3330
+ const l = this.roleOf(o);
3274
3331
  if (l === "system") {
3275
- if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3332
+ if (((n = o == null ? void 0 : o.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3276
3333
  const w = e[e.length - 1];
3277
- w && w.role === "ai" ? w.messages.push(a) : e.push({
3278
- key: `g-${Q(a)}`,
3334
+ w && w.role === "ai" ? w.messages.push(o) : e.push({
3335
+ key: `g-${Q(o)}`,
3279
3336
  role: "ai",
3280
3337
  agentName: "",
3281
3338
  agentAvatarUrl: null,
3282
- messages: [a],
3339
+ messages: [o],
3283
3340
  items: []
3284
3341
  });
3285
3342
  continue;
3286
3343
  }
3287
3344
  e.push({
3288
- key: `sys-${Q(a)}`,
3345
+ key: `sys-${Q(o)}`,
3289
3346
  role: l,
3290
- messages: [a],
3347
+ messages: [o],
3291
3348
  items: [],
3292
- systemLabel: this.systemLabel(a)
3349
+ systemLabel: this.systemLabel(o)
3293
3350
  });
3294
3351
  continue;
3295
3352
  }
3296
3353
  const p = e[e.length - 1];
3297
- p && p.role === l && (l === "ai" || p.agentName === (((i = a == null ? void 0 : a.author) == null ? void 0 : i.name) || "")) ? p.messages.push(a) : e.push({
3298
- key: `g-${Q(a)}`,
3354
+ p && p.role === l && (l === "ai" || p.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? p.messages.push(o) : e.push({
3355
+ key: `g-${Q(o)}`,
3299
3356
  role: l,
3300
- agentName: ((r = a == null ? void 0 : a.author) == null ? void 0 : r.name) || "",
3301
- agentAvatarUrl: ((s = a == null ? void 0 : a.author) == null ? void 0 : s.avatar_url) || null,
3302
- messages: [a],
3357
+ agentName: ((r = o == null ? void 0 : o.author) == null ? void 0 : r.name) || "",
3358
+ agentAvatarUrl: ((s = o == null ? void 0 : o.author) == null ? void 0 : s.avatar_url) || null,
3359
+ messages: [o],
3303
3360
  items: []
3304
3361
  });
3305
3362
  }
3306
- for (const a of e) {
3307
- if (a.role === "system") continue;
3363
+ for (const o of e) {
3364
+ if (o.role === "system") continue;
3308
3365
  const l = [];
3309
- for (const p of a.messages)
3366
+ for (const p of o.messages)
3310
3367
  for (const k of this.itemsOf(p)) l.push(k);
3311
- a.items = l;
3368
+ o.items = l;
3312
3369
  }
3313
3370
  const t = [];
3314
- for (const a of e) {
3315
- if (a.role !== "system" && !a.items.length) continue;
3371
+ for (const o of e) {
3372
+ if (o.role !== "system" && !o.items.length) continue;
3316
3373
  const l = t[t.length - 1];
3317
- if (l && l.role !== "system" && l.role === a.role && (a.role === "ai" || l.agentName === a.agentName)) {
3318
- l.messages.push(...a.messages), l.items.push(...a.items);
3374
+ if (l && l.role !== "system" && l.role === o.role && (o.role === "ai" || l.agentName === o.agentName)) {
3375
+ l.messages.push(...o.messages), l.items.push(...o.items);
3319
3376
  continue;
3320
3377
  }
3321
- t.push(a);
3378
+ t.push(o);
3322
3379
  }
3323
- for (const a of t)
3324
- a.role !== "system" && (a.key = this.stableGroupKey(a.messages));
3380
+ for (const o of t)
3381
+ o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
3325
3382
  return t;
3326
3383
  },
3327
3384
  // Key of the first non-user group that starts after the unread
@@ -3388,11 +3445,11 @@ const br = {
3388
3445
  return `g-${n}`;
3389
3446
  },
3390
3447
  isAtBottom(e) {
3391
- return e.scrollHeight - e.scrollTop - e.clientHeight <= kr;
3448
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= Mr;
3392
3449
  },
3393
3450
  onScroll() {
3394
3451
  const e = this.$refs.scrollEl;
3395
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Cr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3452
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Tr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3396
3453
  },
3397
3454
  // Capture pre-patch scroll state and restore it on the next tick.
3398
3455
  //
@@ -3425,12 +3482,12 @@ const br = {
3425
3482
  if (!t && !n) {
3426
3483
  const s = this.pickAnchor(e);
3427
3484
  if (s != null && s.rowKey) {
3428
- const a = this.findRowByKey(e, s.rowKey);
3429
- if (a) {
3485
+ const o = this.findRowByKey(e, s.rowKey);
3486
+ if (o) {
3430
3487
  const l = e.getBoundingClientRect().top;
3431
3488
  i = {
3432
3489
  rowKey: s.rowKey,
3433
- relY: a.getBoundingClientRect().top - l
3490
+ relY: o.getBoundingClientRect().top - l
3434
3491
  };
3435
3492
  }
3436
3493
  }
@@ -3443,9 +3500,9 @@ const br = {
3443
3500
  }
3444
3501
  if (!r.anchor) return;
3445
3502
  const s = () => {
3446
- const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
3503
+ const o = r.anchor, l = this.findRowByKey(e, o.rowKey);
3447
3504
  if (!l) return;
3448
- const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3505
+ const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - o.relY;
3449
3506
  Math.abs(k) > 0.5 && (e.scrollTop += k);
3450
3507
  };
3451
3508
  s(), requestAnimationFrame(() => {
@@ -3593,9 +3650,9 @@ const br = {
3593
3650
  // doit garder son arrondi.
3594
3651
  cornersFor(e, t) {
3595
3652
  var Z, ee, te;
3596
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (V, ne, J) => V != null && T != null ? V + H >= T : ne === J || ne === "card" && J === "bubble";
3597
- let U = l, I = l, z = l, Y = l;
3598
- return a ? (k && (I = p), (w || !s) && (z = p), k && S(B, k, i == null ? void 0 : i.top) && (U = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (U = p), (w || !s) && (Y = p), k && S(B, k, i == null ? void 0 : i.top) && (I = p), w && S(A, w, i == null ? void 0 : i.bottom) && (z = p)), { tl: U, tr: I, br: z, bl: Y };
3653
+ const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, o = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (K, ne, J) => K != null && T != null ? K + H >= T : ne === J || ne === "card" && J === "bubble";
3654
+ let U = l, I = l, q = l, Y = l;
3655
+ return o ? (k && (I = p), (w || !s) && (q = p), k && S(B, k, i == null ? void 0 : i.top) && (U = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (U = p), (w || !s) && (Y = p), k && S(B, k, i == null ? void 0 : i.top) && (I = p), w && S(A, w, i == null ? void 0 : i.bottom) && (q = p)), { tl: U, tr: I, br: q, bl: Y };
3599
3656
  },
3600
3657
  // Inline style emitting the four corner CSS variables. Set on
3601
3658
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3636,20 +3693,20 @@ const br = {
3636
3693
  for (const s of e.querySelectorAll(
3637
3694
  ".wm-list__row[data-row-key]"
3638
3695
  )) {
3639
- const a = s.dataset.rowKey;
3640
- if (!a) continue;
3696
+ const o = s.dataset.rowKey;
3697
+ if (!o) continue;
3641
3698
  const l = s.querySelector(
3642
3699
  ".wm-bubble, .wm-result, .wm-art, .wm-list__body"
3643
3700
  );
3644
3701
  if (!l) continue;
3645
3702
  const p = l.getBoundingClientRect().width;
3646
- p > 0 && (t[a] = p);
3703
+ p > 0 && (t[o] = p);
3647
3704
  }
3648
3705
  const n = this.widthByKey, i = Object.keys(n), r = Object.keys(t);
3649
3706
  if (i.length === r.length) {
3650
3707
  let s = !0;
3651
- for (const a of r)
3652
- if (Math.abs((n[a] ?? 0) - t[a]) > 0.5) {
3708
+ for (const o of r)
3709
+ if (Math.abs((n[o] ?? 0) - t[o]) > 0.5) {
3653
3710
  s = !1;
3654
3711
  break;
3655
3712
  }
@@ -3719,9 +3776,9 @@ const br = {
3719
3776
  return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
3720
3777
  },
3721
3778
  actionDetail(e) {
3722
- var n, i, r, s, a, l;
3779
+ var n, i, r, s, o, l;
3723
3780
  const t = e == null ? void 0 : e.payload;
3724
- return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((a = t.failure) == null ? void 0 : a.summary) || ((l = t.failure) == null ? void 0 : l.error)) || "" : "";
3781
+ return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((o = t.failure) == null ? void 0 : o.summary) || ((l = t.failure) == null ? void 0 : l.error)) || "" : "";
3725
3782
  },
3726
3783
  actionArtifact(e) {
3727
3784
  var n, i;
@@ -3729,8 +3786,8 @@ const br = {
3729
3786
  return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
3730
3787
  },
3731
3788
  systemLabel(e) {
3732
- var r, s, a;
3733
- const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = br[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
3789
+ var r, s, o;
3790
+ const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = Sr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((o = e == null ? void 0 : e.author) == null ? void 0 : o.name) || this.t("messageList.anAgent");
3734
3791
  return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
3735
3792
  },
3736
3793
  scrollToBottom() {
@@ -3745,80 +3802,80 @@ const br = {
3745
3802
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
3746
3803
  }
3747
3804
  }
3748
- }, Sr = { class: "wm-list__wrap" }, Mr = {
3805
+ }, Or = { class: "wm-list__wrap" }, Ir = {
3749
3806
  key: 0,
3750
3807
  class: "wm-list__loadMore",
3751
3808
  role: "status",
3752
3809
  "aria-live": "polite"
3753
- }, Tr = { class: "wm-list__loadMore-lbl" }, xr = {
3810
+ }, Lr = { class: "wm-list__loadMore-lbl" }, Er = {
3754
3811
  key: 1,
3755
3812
  class: "wm-list__historyEnd"
3756
- }, Or = {
3813
+ }, Br = {
3757
3814
  key: 2,
3758
3815
  class: "wm-list__sep"
3759
- }, Ir = { class: "wm-list__sep-label" }, Lr = {
3816
+ }, Rr = { class: "wm-list__sep-label" }, Nr = {
3760
3817
  key: 0,
3761
3818
  class: "wm-list__sep wm-list__sep--unread"
3762
- }, Er = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Br = {
3819
+ }, Pr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Ur = {
3763
3820
  key: 0,
3764
3821
  class: "wm-list__sysep"
3765
- }, Rr = { class: "wm-list__sysep-label" }, Nr = ["data-row-key", "onPointerdown"], Pr = {
3822
+ }, Fr = { class: "wm-list__sysep-label" }, Dr = ["data-row-key", "onPointerdown"], jr = {
3766
3823
  key: 0,
3767
3824
  class: "wm-list__avatarSlot"
3768
- }, Ur = {
3825
+ }, Hr = {
3769
3826
  key: 5,
3770
3827
  class: "wm-list__body"
3771
- }, Fr = { key: 0 }, Dr = {
3828
+ }, zr = { key: 0 }, qr = {
3772
3829
  key: 1,
3773
3830
  "aria-hidden": "true"
3774
- }, jr = { key: 2 }, Hr = { key: 0 }, zr = {
3831
+ }, Vr = { key: 2 }, Kr = { key: 0 }, $r = {
3775
3832
  key: 1,
3776
3833
  "aria-hidden": "true"
3777
- }, qr = { key: 2 }, Kr = {
3834
+ }, Wr = { key: 2 }, Gr = {
3778
3835
  key: 3,
3779
3836
  class: "wm-list__row wm-list__row--ai fade-up"
3780
- }, Vr = { class: "wm-list__avatarSlot" }, $r = ["aria-label", "title"];
3781
- function Wr(e, t, n, i, r, s) {
3782
- const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), B = R("Typing");
3783
- return c(), u("div", Sr, [
3784
- o("div", {
3837
+ }, Yr = { class: "wm-list__avatarSlot" }, Jr = ["aria-label", "title"];
3838
+ function Qr(e, t, n, i, r, s) {
3839
+ const o = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), B = R("Typing");
3840
+ return c(), d("div", Or, [
3841
+ a("div", {
3785
3842
  ref: "scrollEl",
3786
3843
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
3787
3844
  onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
3788
3845
  }, [
3789
- n.loadingMore ? (c(), u("div", Mr, [
3790
- t[6] || (t[6] = o("span", {
3846
+ n.loadingMore ? (c(), d("div", Ir, [
3847
+ t[6] || (t[6] = a("span", {
3791
3848
  class: "wm-list__loadMore-spinner",
3792
3849
  "aria-hidden": "true"
3793
3850
  }, null, -1)),
3794
- o("span", Tr, v(s.t("messageList.loadingHistory")), 1)
3795
- ])) : s.historyExhausted ? (c(), u("div", xr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3796
- n.dateLabel ? (c(), u("div", Or, [
3797
- t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
3798
- o("span", Ir, v(n.dateLabel), 1),
3799
- t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
3851
+ a("span", Lr, v(s.t("messageList.loadingHistory")), 1)
3852
+ ])) : s.historyExhausted ? (c(), d("div", Er, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3853
+ n.dateLabel ? (c(), d("div", Br, [
3854
+ t[7] || (t[7] = a("div", { class: "wm-list__line" }, null, -1)),
3855
+ a("span", Rr, v(n.dateLabel), 1),
3856
+ t[8] || (t[8] = a("div", { class: "wm-list__line" }, null, -1))
3800
3857
  ])) : y("", !0),
3801
- (c(!0), u(E, null, F(s.groups, (A, H) => (c(), u(E, {
3858
+ (c(!0), d(E, null, F(s.groups, (A, H) => (c(), d(E, {
3802
3859
  key: A.key
3803
3860
  }, [
3804
- A.key === s.unreadGroupKey ? (c(), u("div", Lr, [
3805
- t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3806
- o("span", Er, v(s.t("messageList.unread")), 1),
3807
- t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3861
+ A.key === s.unreadGroupKey ? (c(), d("div", Nr, [
3862
+ t[9] || (t[9] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3863
+ a("span", Pr, v(s.t("messageList.unread")), 1),
3864
+ t[10] || (t[10] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3808
3865
  ])) : y("", !0),
3809
- A.role === "system" || A.items.length ? (c(), u("div", {
3866
+ A.role === "system" || A.items.length ? (c(), d("div", {
3810
3867
  key: 1,
3811
3868
  class: O(["wm-list__group", "wm-list__group--" + A.role])
3812
3869
  }, [
3813
- A.role === "system" ? (c(), u("div", Br, [
3814
- t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3815
- o("span", Rr, v(A.systemLabel), 1),
3816
- t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3817
- ])) : (c(), u(E, { key: 1 }, [
3818
- (c(!0), u(E, null, F(A.items, (S, U) => (c(), u(E, {
3870
+ A.role === "system" ? (c(), d("div", Ur, [
3871
+ t[11] || (t[11] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3872
+ a("span", Fr, v(A.systemLabel), 1),
3873
+ t[12] || (t[12] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3874
+ ])) : (c(), d(E, { key: 1 }, [
3875
+ (c(!0), d(E, null, F(A.items, (S, U) => (c(), d(E, {
3819
3876
  key: `${s.messageKey(S.message)}-${S.partKey}`
3820
3877
  }, [
3821
- o("div", {
3878
+ a("div", {
3822
3879
  "data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
3823
3880
  class: O(["wm-list__row fade-up", [
3824
3881
  "wm-list__row--" + A.role,
@@ -3827,7 +3884,7 @@ function Wr(e, t, n, i, r, s) {
3827
3884
  "is-failed": S.message._failed
3828
3885
  }
3829
3886
  ]]),
3830
- style: q(s.cornersStyle(A, U)),
3887
+ style: z(s.cornersStyle(A, U)),
3831
3888
  onPointerdown: (I) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
3832
3889
  onPointerup: t[0] || (t[0] = (I) => s.onPressEnd()),
3833
3890
  onPointercancel: t[1] || (t[1] = (I) => s.onPressEnd()),
@@ -3835,9 +3892,9 @@ function Wr(e, t, n, i, r, s) {
3835
3892
  onContextmenu: t[3] || (t[3] = G(() => {
3836
3893
  }, ["prevent"]))
3837
3894
  }, [
3838
- A.role !== "user" ? (c(), u("div", Pr, [
3839
- U === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
3840
- A.role === "ai" ? (c(), P(a, {
3895
+ A.role !== "user" ? (c(), d("div", jr, [
3896
+ U === A.items.length - 1 ? (c(), d(E, { key: 0 }, [
3897
+ A.role === "ai" ? (c(), P(o, {
3841
3898
  key: 0,
3842
3899
  size: 26,
3843
3900
  tail: !0,
@@ -3868,62 +3925,62 @@ function Wr(e, t, n, i, r, s) {
3868
3925
  }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), P(k, {
3869
3926
  key: 4,
3870
3927
  artifact: s.artifactOf(S.message)
3871
- }, null, 8, ["artifact"])) : (c(), u("div", Ur, [
3928
+ }, null, 8, ["artifact"])) : (c(), d("div", Hr, [
3872
3929
  S.message.text_md ? (c(), P(w, {
3873
3930
  key: 0,
3874
3931
  role: A.role,
3875
3932
  text: S.message.text_md
3876
3933
  }, null, 8, ["role", "text"])) : y("", !0),
3877
- s.attachmentsOf(S.message).length ? (c(), u("div", {
3934
+ s.attachmentsOf(S.message).length ? (c(), d("div", {
3878
3935
  key: 1,
3879
3936
  class: O(["wm-list__atts", {
3880
3937
  "wm-list__atts--align-end": A.role === "user"
3881
3938
  }])
3882
3939
  }, [
3883
- (c(!0), u(E, null, F(s.attachmentsOf(
3940
+ (c(!0), d(E, null, F(s.attachmentsOf(
3884
3941
  S.message
3885
- ), (I, z) => (c(), P(T, {
3886
- key: `${s.messageKey(S.message)}-att-${z}`,
3942
+ ), (I, q) => (c(), P(T, {
3943
+ key: `${s.messageKey(S.message)}-att-${q}`,
3887
3944
  attachment: I
3888
3945
  }, null, 8, ["attachment"]))), 128))
3889
3946
  ], 2)) : y("", !0)
3890
3947
  ]))
3891
- ], 46, Nr),
3892
- U < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
3948
+ ], 46, Dr),
3949
+ U < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), d("div", {
3893
3950
  key: 0,
3894
3951
  class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
3895
3952
  }, [
3896
- A.role !== "user" ? (c(), u("span", Fr, v(s.roleLabel(A)), 1)) : y("", !0),
3897
- A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", Dr, "·")) : y("", !0),
3898
- s.timeOf(S.message) ? (c(), u("span", jr, v(s.timeOf(S.message)), 1)) : y("", !0)
3953
+ A.role !== "user" ? (c(), d("span", zr, v(s.roleLabel(A)), 1)) : y("", !0),
3954
+ A.role !== "user" && s.timeOf(S.message) ? (c(), d("span", qr, "·")) : y("", !0),
3955
+ s.timeOf(S.message) ? (c(), d("span", Vr, v(s.timeOf(S.message)), 1)) : y("", !0)
3899
3956
  ], 2)) : y("", !0)
3900
3957
  ], 64))), 128)),
3901
- (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3958
+ (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), d("div", {
3902
3959
  key: 0,
3903
3960
  class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3904
3961
  }, [
3905
- A.role !== "user" ? (c(), u("span", Hr, v(s.roleLabel(A)), 1)) : y("", !0),
3906
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", zr, "·")) : y("", !0),
3907
- s.lastTimeOf(A) ? (c(), u("span", qr, v(s.lastTimeOf(A)), 1)) : y("", !0)
3962
+ A.role !== "user" ? (c(), d("span", Kr, v(s.roleLabel(A)), 1)) : y("", !0),
3963
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", $r, "·")) : y("", !0),
3964
+ s.lastTimeOf(A) ? (c(), d("span", Wr, v(s.lastTimeOf(A)), 1)) : y("", !0)
3908
3965
  ], 2)) : y("", !0)
3909
3966
  ], 64))
3910
3967
  ], 2)) : y("", !0)
3911
3968
  ], 64))), 128)),
3912
- n.streamingActive ? (c(), u("div", Kr, [
3913
- o("div", Vr, [
3914
- K(a, {
3969
+ n.streamingActive ? (c(), d("div", Gr, [
3970
+ a("div", Yr, [
3971
+ V(o, {
3915
3972
  size: 26,
3916
3973
  tail: !0,
3917
3974
  name: n.aiAgentName,
3918
3975
  "image-url": n.aiAgentAvatarUrl
3919
3976
  }, null, 8, ["name", "image-url"])
3920
3977
  ]),
3921
- K(B)
3978
+ V(B)
3922
3979
  ])) : y("", !0)
3923
3980
  ], 34),
3924
- K(Re, { name: "wm-scrollDown" }, {
3981
+ V(Re, { name: "wm-scrollDown" }, {
3925
3982
  default: Ne(() => [
3926
- r.showScrollDown ? (c(), u("button", {
3983
+ r.showScrollDown ? (c(), d("button", {
3927
3984
  key: 0,
3928
3985
  type: "button",
3929
3986
  class: "wm-list__scrollDown",
@@ -3931,7 +3988,7 @@ function Wr(e, t, n, i, r, s) {
3931
3988
  title: s.t("messageList.scrollToBottom"),
3932
3989
  onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3933
3990
  }, [...t[13] || (t[13] = [
3934
- o("svg", {
3991
+ a("svg", {
3935
3992
  width: "14",
3936
3993
  height: "14",
3937
3994
  viewBox: "0 0 24 24",
@@ -3942,16 +3999,16 @@ function Wr(e, t, n, i, r, s) {
3942
3999
  "stroke-linejoin": "round",
3943
4000
  "aria-hidden": "true"
3944
4001
  }, [
3945
- o("path", { d: "M6 9l6 6 6-6" })
4002
+ a("path", { d: "M6 9l6 6 6-6" })
3946
4003
  ], -1)
3947
- ])], 8, $r)) : y("", !0)
4004
+ ])], 8, Jr)) : y("", !0)
3948
4005
  ]),
3949
4006
  _: 1
3950
4007
  })
3951
4008
  ]);
3952
4009
  }
3953
- const Gr = /* @__PURE__ */ N(Ar, [["render", Wr], ["__scopeId", "data-v-9ddbd0e3"]]), me = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Ae = typeof window < "u" && typeof window.MediaRecorder < "u";
3954
- function Yr() {
4010
+ const Xr = /* @__PURE__ */ N(xr, [["render", Qr], ["__scopeId", "data-v-9ddbd0e3"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Ae = typeof window < "u" && typeof window.MediaRecorder < "u";
4011
+ function Zr() {
3955
4012
  return Ae && [
3956
4013
  "video/webm;codecs=vp9,opus",
3957
4014
  "video/webm;codecs=vp8,opus",
@@ -3971,11 +4028,11 @@ function Fe({ audio: e }) {
3971
4028
  systemAudio: e ? "include" : "exclude"
3972
4029
  };
3973
4030
  }
3974
- function so(e) {
4031
+ function oo(e) {
3975
4032
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3976
4033
  }
3977
- async function Jr() {
3978
- if (!me) return null;
4034
+ async function ei() {
4035
+ if (!he) return null;
3979
4036
  let e;
3980
4037
  try {
3981
4038
  e = await navigator.mediaDevices.getDisplayMedia(
@@ -3985,7 +4042,7 @@ async function Jr() {
3985
4042
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3986
4043
  }
3987
4044
  try {
3988
- return await Qr(e);
4045
+ return await ti(e);
3989
4046
  } catch (t) {
3990
4047
  return console.error("[media] screenshot capture", t), null;
3991
4048
  } finally {
@@ -3994,7 +4051,7 @@ async function Jr() {
3994
4051
  });
3995
4052
  }
3996
4053
  }
3997
- async function Qr(e) {
4054
+ async function ti(e) {
3998
4055
  const t = document.createElement("video");
3999
4056
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4000
4057
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -4004,12 +4061,12 @@ async function Qr(e) {
4004
4061
  (k) => k ? l(k) : p(new Error("toBlob failed")),
4005
4062
  "image/png"
4006
4063
  );
4007
- }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4008
- return new File([s], `capture-${a}.png`, { type: "image/png" });
4064
+ }), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4065
+ return new File([s], `capture-${o}.png`, { type: "image/png" });
4009
4066
  }
4010
- async function Xr(e = {}) {
4067
+ async function ni(e = {}) {
4011
4068
  var k;
4012
- if (!me || !Ae) return null;
4069
+ if (!he || !Ae) return null;
4013
4070
  let t;
4014
4071
  try {
4015
4072
  t = await navigator.mediaDevices.getDisplayMedia(
@@ -4018,7 +4075,7 @@ async function Xr(e = {}) {
4018
4075
  } catch (w) {
4019
4076
  return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
4020
4077
  }
4021
- const n = Yr();
4078
+ const n = Zr();
4022
4079
  let i;
4023
4080
  try {
4024
4081
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
@@ -4028,7 +4085,7 @@ async function Xr(e = {}) {
4028
4085
  }), null;
4029
4086
  }
4030
4087
  const r = [];
4031
- let s = null, a = !1;
4088
+ let s = null, o = !1;
4032
4089
  i.addEventListener("dataavailable", (w) => {
4033
4090
  w.data && w.data.size > 0 && r.push(w.data);
4034
4091
  }), i.addEventListener("stop", () => {
@@ -4046,7 +4103,7 @@ async function Xr(e = {}) {
4046
4103
  w.addEventListener("ended", () => l(), { once: !0 });
4047
4104
  });
4048
4105
  function l() {
4049
- if (!a && (a = !0, i.state !== "inactive"))
4106
+ if (!o && (o = !0, i.state !== "inactive"))
4050
4107
  try {
4051
4108
  i.stop();
4052
4109
  } catch (w) {
@@ -4072,7 +4129,7 @@ async function Xr(e = {}) {
4072
4129
  }
4073
4130
  };
4074
4131
  }
4075
- const Zr = [
4132
+ const si = [
4076
4133
  {
4077
4134
  action: "file",
4078
4135
  labelKey: "composer.attachFile",
@@ -4088,7 +4145,7 @@ const Zr = [
4088
4145
  labelKey: "composer.recordScreen",
4089
4146
  path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
4090
4147
  }
4091
- ], ei = {
4148
+ ], ri = {
4092
4149
  name: "WmComposer",
4093
4150
  inject: {
4094
4151
  // Translator shared by the Messenger shell; French fallback when
@@ -4122,10 +4179,10 @@ const Zr = [
4122
4179
  return !this.disabled && !!this.local.trim();
4123
4180
  },
4124
4181
  attachItems() {
4125
- return Zr.map((e) => ({
4182
+ return si.map((e) => ({
4126
4183
  ...e,
4127
4184
  label: this.t(e.labelKey),
4128
- disabled: e.action === "screenshot" && !me || e.action === "record" && (!me || !Ae)
4185
+ disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !Ae)
4129
4186
  }));
4130
4187
  },
4131
4188
  recordingElapsedLabel() {
@@ -4196,13 +4253,13 @@ const Zr = [
4196
4253
  },
4197
4254
  async captureScreenshot() {
4198
4255
  if (this.disabled) return;
4199
- const e = await Jr();
4256
+ const e = await ei();
4200
4257
  e && this.$emit("attach", e);
4201
4258
  },
4202
4259
  async startRecording() {
4203
4260
  if (this.recording || this.disabled) return;
4204
4261
  this.recordingElapsed = 0;
4205
- const e = await Xr({
4262
+ const e = await ni({
4206
4263
  onstart: () => {
4207
4264
  this.recording = !0;
4208
4265
  },
@@ -4244,97 +4301,97 @@ const Zr = [
4244
4301
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4245
4302
  }
4246
4303
  }
4247
- }, ti = {
4304
+ }, ii = {
4248
4305
  key: 0,
4249
4306
  class: "wm-rec"
4250
- }, ni = { class: "wm-rec__lbl" }, si = {
4307
+ }, ai = { class: "wm-rec__lbl" }, oi = {
4251
4308
  key: 1,
4252
4309
  class: "wm-compose__menu",
4253
4310
  role: "menu"
4254
- }, ri = ["disabled", "onClick"], ii = { class: "wm-compose__menuIcon" }, ai = {
4311
+ }, li = ["disabled", "onClick"], ci = { class: "wm-compose__menuIcon" }, di = {
4255
4312
  viewBox: "0 0 24 24",
4256
4313
  width: "14",
4257
4314
  height: "14",
4258
4315
  "aria-hidden": "true"
4259
- }, oi = ["d"], li = ["placeholder", "disabled"], ci = { class: "wm-compose__actions" }, di = ["title", "aria-label", "disabled"], ui = ["disabled", "aria-label"];
4260
- function mi(e, t, n, i, r, s) {
4261
- return c(), u("div", {
4316
+ }, ui = ["d"], hi = ["placeholder", "disabled"], mi = { class: "wm-compose__actions" }, fi = ["title", "aria-label", "disabled"], _i = ["disabled", "aria-label"];
4317
+ function gi(e, t, n, i, r, s) {
4318
+ return c(), d("div", {
4262
4319
  class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4263
- style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4320
+ style: z(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4264
4321
  }, [
4265
- r.recording ? (c(), u("div", ti, [
4266
- t[8] || (t[8] = o("span", {
4322
+ r.recording ? (c(), d("div", ii, [
4323
+ t[8] || (t[8] = a("span", {
4267
4324
  class: "wm-rec__dot",
4268
4325
  "aria-hidden": "true"
4269
4326
  }, null, -1)),
4270
- o("span", ni, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4271
- o("button", {
4327
+ a("span", ai, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4328
+ a("button", {
4272
4329
  type: "button",
4273
4330
  class: "wm-rec__stop",
4274
- onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4331
+ onClick: t[0] || (t[0] = (...o) => s.stopRecording && s.stopRecording(...o))
4275
4332
  }, v(s.t("composer.stop")), 1)
4276
4333
  ])) : y("", !0),
4277
- o("form", {
4334
+ a("form", {
4278
4335
  class: O(["wm-compose", { "has-attach": r.attachOpen }]),
4279
- onSubmit: t[7] || (t[7] = G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4336
+ onSubmit: t[7] || (t[7] = G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
4280
4337
  }, [
4281
- o("input", {
4338
+ a("input", {
4282
4339
  ref: "fileEl",
4283
4340
  type: "file",
4284
4341
  hidden: "",
4285
4342
  multiple: "",
4286
- onChange: t[1] || (t[1] = (...a) => s.onFile && s.onFile(...a))
4343
+ onChange: t[1] || (t[1] = (...o) => s.onFile && s.onFile(...o))
4287
4344
  }, null, 544),
4288
- r.attachOpen ? (c(), u("div", {
4345
+ r.attachOpen ? (c(), d("div", {
4289
4346
  key: 0,
4290
4347
  class: "wm-compose__overlay",
4291
- onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4348
+ onClick: t[2] || (t[2] = (o) => r.attachOpen = !1)
4292
4349
  })) : y("", !0),
4293
- r.attachOpen ? (c(), u("div", si, [
4294
- (c(!0), u(E, null, F(s.attachItems, (a) => (c(), u("button", {
4295
- key: a.action,
4350
+ r.attachOpen ? (c(), d("div", oi, [
4351
+ (c(!0), d(E, null, F(s.attachItems, (o) => (c(), d("button", {
4352
+ key: o.action,
4296
4353
  type: "button",
4297
4354
  class: "wm-compose__menuItem",
4298
- disabled: a.disabled,
4299
- onClick: (l) => s.onAttachAction(a.action)
4355
+ disabled: o.disabled,
4356
+ onClick: (l) => s.onAttachAction(o.action)
4300
4357
  }, [
4301
- o("span", ii, [
4302
- (c(), u("svg", ai, [
4303
- o("path", {
4304
- d: a.path,
4358
+ a("span", ci, [
4359
+ (c(), d("svg", di, [
4360
+ a("path", {
4361
+ d: o.path,
4305
4362
  stroke: "currentColor",
4306
4363
  "stroke-width": "1.8",
4307
4364
  "stroke-linecap": "round",
4308
4365
  "stroke-linejoin": "round",
4309
4366
  fill: "none"
4310
- }, null, 8, oi)
4367
+ }, null, 8, ui)
4311
4368
  ]))
4312
4369
  ]),
4313
- o("span", null, v(a.label), 1)
4314
- ], 8, ri))), 128))
4370
+ a("span", null, v(o.label), 1)
4371
+ ], 8, li))), 128))
4315
4372
  ])) : y("", !0),
4316
- $(o("textarea", {
4373
+ $(a("textarea", {
4317
4374
  ref: "inputEl",
4318
- "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
4375
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => r.local = o),
4319
4376
  class: "wm-compose__input",
4320
4377
  rows: "3",
4321
4378
  placeholder: n.placeholder,
4322
4379
  disabled: n.disabled,
4323
- onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
4324
- onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
4325
- }, null, 40, li), [
4380
+ onKeydown: t[4] || (t[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
4381
+ onInput: t[5] || (t[5] = (...o) => s.autosize && s.autosize(...o))
4382
+ }, null, 40, hi), [
4326
4383
  [X, r.local]
4327
4384
  ]),
4328
- o("div", ci, [
4329
- o("button", {
4385
+ a("div", mi, [
4386
+ a("button", {
4330
4387
  type: "button",
4331
4388
  class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
4332
4389
  title: n.attachLabel,
4333
4390
  "aria-label": n.attachLabel,
4334
4391
  disabled: r.recording,
4335
- onClick: t[6] || (t[6] = (a) => r.attachOpen = !r.attachOpen)
4392
+ onClick: t[6] || (t[6] = (o) => r.attachOpen = !r.attachOpen)
4336
4393
  }, [...t[9] || (t[9] = [
4337
- o("svg", {
4394
+ a("svg", {
4338
4395
  width: "13",
4339
4396
  height: "13",
4340
4397
  viewBox: "0 0 24 24",
@@ -4345,16 +4402,16 @@ function mi(e, t, n, i, r, s) {
4345
4402
  "stroke-linejoin": "round",
4346
4403
  "aria-hidden": "true"
4347
4404
  }, [
4348
- 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" })
4405
+ a("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" })
4349
4406
  ], -1)
4350
- ])], 10, di),
4351
- o("button", {
4407
+ ])], 10, fi),
4408
+ a("button", {
4352
4409
  type: "submit",
4353
4410
  class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
4354
4411
  disabled: !s.canSend,
4355
4412
  "aria-label": s.t("composer.send")
4356
4413
  }, [...t[10] || (t[10] = [
4357
- o("svg", {
4414
+ a("svg", {
4358
4415
  width: "13",
4359
4416
  height: "13",
4360
4417
  viewBox: "0 0 24 24",
@@ -4365,14 +4422,14 @@ function mi(e, t, n, i, r, s) {
4365
4422
  "stroke-linejoin": "round",
4366
4423
  "aria-hidden": "true"
4367
4424
  }, [
4368
- o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4425
+ a("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4369
4426
  ], -1)
4370
- ])], 10, ui)
4427
+ ])], 10, _i)
4371
4428
  ])
4372
4429
  ], 34)
4373
4430
  ], 6);
4374
4431
  }
4375
- const hi = /* @__PURE__ */ N(ei, [["render", mi], ["__scopeId", "data-v-01e81a27"]]), fi = {
4432
+ const pi = /* @__PURE__ */ N(ri, [["render", gi], ["__scopeId", "data-v-01e81a27"]]), vi = {
4376
4433
  name: "WmSuggestionChips",
4377
4434
  props: {
4378
4435
  items: { type: Array, default: () => [] },
@@ -4389,22 +4446,22 @@ const hi = /* @__PURE__ */ N(ei, [["render", mi], ["__scopeId", "data-v-01e81a27
4389
4446
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4390
4447
  }
4391
4448
  }
4392
- }, _i = ["onClick"];
4393
- function gi(e, t, n, i, r, s) {
4394
- return n.items.length ? (c(), u("div", {
4449
+ }, yi = ["onClick"];
4450
+ function wi(e, t, n, i, r, s) {
4451
+ return n.items.length ? (c(), d("div", {
4395
4452
  key: s.batchKey,
4396
4453
  class: "wm-chips"
4397
4454
  }, [
4398
- (c(!0), u(E, null, F(n.items, (a, l) => (c(), u("button", {
4455
+ (c(!0), d(E, null, F(n.items, (o, l) => (c(), d("button", {
4399
4456
  key: l,
4400
4457
  type: "button",
4401
4458
  class: "wm-chip",
4402
- style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4403
- onClick: (p) => e.$emit("select", a)
4404
- }, v(a.label), 13, _i))), 128))
4459
+ style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4460
+ onClick: (p) => e.$emit("select", o)
4461
+ }, v(o.label), 13, yi))), 128))
4405
4462
  ])) : y("", !0);
4406
4463
  }
4407
- const pi = /* @__PURE__ */ N(fi, [["render", gi], ["__scopeId", "data-v-47ad8085"]]), vi = {
4464
+ const bi = /* @__PURE__ */ N(vi, [["render", wi], ["__scopeId", "data-v-47ad8085"]]), ki = {
4408
4465
  name: "WmApprovalCard",
4409
4466
  components: { AIAvatar: le },
4410
4467
  inject: {
@@ -4448,34 +4505,34 @@ const pi = /* @__PURE__ */ N(fi, [["render", gi], ["__scopeId", "data-v-47ad8085
4448
4505
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4449
4506
  }
4450
4507
  }
4451
- }, yi = { class: "wm-approval" }, wi = { class: "wm-approval__head" }, bi = { class: "wm-approval__icon" }, ki = { class: "wm-approval__main" }, Ci = { class: "wm-approval__title" }, Ai = {
4508
+ }, Ci = { class: "wm-approval" }, Ai = { class: "wm-approval__head" }, Si = { class: "wm-approval__icon" }, Mi = { class: "wm-approval__main" }, Ti = { class: "wm-approval__title" }, xi = {
4452
4509
  key: 0,
4453
4510
  class: "wm-approval__detail"
4454
- }, Si = { class: "wm-approval__actions" };
4455
- function Mi(e, t, n, i, r, s) {
4456
- const a = R("AIAvatar");
4457
- return c(), u("div", yi, [
4458
- o("div", wi, [
4459
- o("div", bi, [
4460
- K(a, {
4511
+ }, Oi = { class: "wm-approval__actions" };
4512
+ function Ii(e, t, n, i, r, s) {
4513
+ const o = R("AIAvatar");
4514
+ return c(), d("div", Ci, [
4515
+ a("div", Ai, [
4516
+ a("div", Si, [
4517
+ V(o, {
4461
4518
  size: 24,
4462
4519
  name: n.agentName,
4463
4520
  "image-url": n.agentAvatarUrl
4464
4521
  }, null, 8, ["name", "image-url"])
4465
4522
  ]),
4466
- o("div", ki, [
4467
- o("div", Ci, v(n.action), 1),
4468
- n.detail ? (c(), u("div", Ai, v(n.detail), 1)) : y("", !0)
4523
+ a("div", Mi, [
4524
+ a("div", Ti, v(n.action), 1),
4525
+ n.detail ? (c(), d("div", xi, v(n.detail), 1)) : y("", !0)
4469
4526
  ])
4470
4527
  ]),
4471
- o("div", Si, [
4472
- s.rejectId ? (c(), u("button", {
4528
+ a("div", Oi, [
4529
+ s.rejectId ? (c(), d("button", {
4473
4530
  key: 0,
4474
4531
  type: "button",
4475
4532
  class: "wm-approval__btn wm-approval__btn--neutral",
4476
4533
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4477
4534
  }, v(s.rejectLabel), 1)) : y("", !0),
4478
- s.approveId ? (c(), u("button", {
4535
+ s.approveId ? (c(), d("button", {
4479
4536
  key: 1,
4480
4537
  type: "button",
4481
4538
  class: "wm-approval__btn wm-approval__btn--primary",
@@ -4484,9 +4541,9 @@ function Mi(e, t, n, i, r, s) {
4484
4541
  ])
4485
4542
  ]);
4486
4543
  }
4487
- const Ti = /* @__PURE__ */ N(vi, [["render", Mi], ["__scopeId", "data-v-a2bed37e"]]);
4544
+ const Li = /* @__PURE__ */ N(ki, [["render", Ii], ["__scopeId", "data-v-a2bed37e"]]);
4488
4545
  let Ee = 0;
4489
- const xi = /* @__PURE__ */ new Set([
4546
+ const Ei = /* @__PURE__ */ new Set([
4490
4547
  "text",
4491
4548
  "textarea",
4492
4549
  "number",
@@ -4494,7 +4551,7 @@ const xi = /* @__PURE__ */ new Set([
4494
4551
  "select",
4495
4552
  "multiselect",
4496
4553
  "date"
4497
- ]), Oi = {
4554
+ ]), Bi = {
4498
4555
  name: "WmFormCard",
4499
4556
  components: { AIAvatar: le },
4500
4557
  inject: {
@@ -4524,7 +4581,7 @@ const xi = /* @__PURE__ */ new Set([
4524
4581
  // douteux.
4525
4582
  normalizedFields() {
4526
4583
  var t;
4527
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !xi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4584
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Ei.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4528
4585
  }
4529
4586
  },
4530
4587
  created() {
@@ -4577,65 +4634,65 @@ const xi = /* @__PURE__ */ new Set([
4577
4634
  }
4578
4635
  }
4579
4636
  }
4580
- }, Ii = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ei = { class: "wm-form__icon" }, Bi = { class: "wm-form__main" }, Ri = { class: "wm-form__title" }, Ni = {
4637
+ }, Ri = { class: "wm-form" }, Ni = { class: "wm-form__head" }, Pi = { class: "wm-form__icon" }, Ui = { class: "wm-form__main" }, Fi = { class: "wm-form__title" }, Di = {
4581
4638
  key: 0,
4582
4639
  class: "wm-form__detail"
4583
- }, Pi = ["for"], Ui = {
4640
+ }, ji = ["for"], Hi = {
4584
4641
  key: 0,
4585
4642
  class: "wm-form__req",
4586
4643
  "aria-hidden": "true"
4587
- }, Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Di = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Hi = ["id", "onUpdate:modelValue", "required", "disabled"], zi = {
4644
+ }, zi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Vi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ki = ["id", "onUpdate:modelValue", "required", "disabled"], $i = {
4588
4645
  key: 4,
4589
4646
  class: "wm-form__bool"
4590
- }, qi = ["id", "onUpdate:modelValue", "disabled"], Ki = ["id", "onUpdate:modelValue", "required", "disabled"], Vi = {
4647
+ }, Wi = ["id", "onUpdate:modelValue", "disabled"], Gi = ["id", "onUpdate:modelValue", "required", "disabled"], Yi = {
4591
4648
  value: "",
4592
4649
  disabled: ""
4593
- }, $i = ["value"], Wi = {
4650
+ }, Ji = ["value"], Qi = {
4594
4651
  key: 6,
4595
4652
  class: "wm-form__multi"
4596
- }, Gi = ["value", "checked", "disabled", "onChange"], Yi = {
4653
+ }, Xi = ["value", "checked", "disabled", "onChange"], Zi = {
4597
4654
  key: 0,
4598
4655
  class: "wm-form__err"
4599
- }, Ji = ["disabled"], Qi = {
4656
+ }, ea = ["disabled"], ta = {
4600
4657
  key: 0,
4601
4658
  class: "wm-form__spinner",
4602
4659
  "aria-hidden": "true"
4603
- }, Xi = {
4660
+ }, na = {
4604
4661
  key: 2,
4605
4662
  class: "wm-form__doneLbl"
4606
4663
  };
4607
- function Zi(e, t, n, i, r, s) {
4608
- const a = R("AIAvatar");
4609
- return c(), u("div", Ii, [
4610
- o("div", Li, [
4611
- o("div", Ei, [
4612
- K(a, {
4664
+ function sa(e, t, n, i, r, s) {
4665
+ const o = R("AIAvatar");
4666
+ return c(), d("div", Ri, [
4667
+ a("div", Ni, [
4668
+ a("div", Pi, [
4669
+ V(o, {
4613
4670
  size: 24,
4614
4671
  name: n.agentName,
4615
4672
  "image-url": n.agentAvatarUrl
4616
4673
  }, null, 8, ["name", "image-url"])
4617
4674
  ]),
4618
- o("div", Bi, [
4619
- o("div", Ri, v(n.form.title || s.t("form.title")), 1),
4620
- n.form.description ? (c(), u("div", Ni, v(n.form.description), 1)) : y("", !0)
4675
+ a("div", Ui, [
4676
+ a("div", Fi, v(n.form.title || s.t("form.title")), 1),
4677
+ n.form.description ? (c(), d("div", Di, v(n.form.description), 1)) : y("", !0)
4621
4678
  ])
4622
4679
  ]),
4623
- o("form", {
4680
+ a("form", {
4624
4681
  class: "wm-form__body",
4625
4682
  onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4626
4683
  }, [
4627
- (c(!0), u(E, null, F(s.normalizedFields, (l) => (c(), u("div", {
4684
+ (c(!0), d(E, null, F(s.normalizedFields, (l) => (c(), d("div", {
4628
4685
  key: l.key,
4629
4686
  class: "wm-form__field"
4630
4687
  }, [
4631
- o("label", {
4688
+ a("label", {
4632
4689
  for: `wm-f-${r._uid}-${l.key}`,
4633
4690
  class: "wm-form__label"
4634
4691
  }, [
4635
4692
  ye(v(l.label), 1),
4636
- l.required ? (c(), u("span", Ui, "*")) : y("", !0)
4637
- ], 8, Pi),
4638
- l.type === "text" ? $((c(), u("input", {
4693
+ l.required ? (c(), d("span", Hi, "*")) : y("", !0)
4694
+ ], 8, ji),
4695
+ l.type === "text" ? $((c(), d("input", {
4639
4696
  key: 0,
4640
4697
  id: `wm-f-${r._uid}-${l.key}`,
4641
4698
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4644,9 +4701,9 @@ function Zi(e, t, n, i, r, s) {
4644
4701
  placeholder: l.placeholder || "",
4645
4702
  required: l.required,
4646
4703
  disabled: n.readOnly || r.busy
4647
- }, null, 8, Fi)), [
4704
+ }, null, 8, zi)), [
4648
4705
  [X, r.values[l.key]]
4649
- ]) : l.type === "textarea" ? $((c(), u("textarea", {
4706
+ ]) : l.type === "textarea" ? $((c(), d("textarea", {
4650
4707
  key: 1,
4651
4708
  id: `wm-f-${r._uid}-${l.key}`,
4652
4709
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4655,9 +4712,9 @@ function Zi(e, t, n, i, r, s) {
4655
4712
  placeholder: l.placeholder || "",
4656
4713
  required: l.required,
4657
4714
  disabled: n.readOnly || r.busy
4658
- }, null, 8, Di)), [
4715
+ }, null, 8, qi)), [
4659
4716
  [X, r.values[l.key]]
4660
- ]) : l.type === "number" ? $((c(), u("input", {
4717
+ ]) : l.type === "number" ? $((c(), d("input", {
4661
4718
  key: 2,
4662
4719
  id: `wm-f-${r._uid}-${l.key}`,
4663
4720
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4666,14 +4723,14 @@ function Zi(e, t, n, i, r, s) {
4666
4723
  placeholder: l.placeholder || "",
4667
4724
  required: l.required,
4668
4725
  disabled: n.readOnly || r.busy
4669
- }, null, 8, ji)), [
4726
+ }, null, 8, Vi)), [
4670
4727
  [
4671
4728
  X,
4672
4729
  r.values[l.key],
4673
4730
  void 0,
4674
4731
  { number: !0 }
4675
4732
  ]
4676
- ]) : l.type === "date" ? $((c(), u("input", {
4733
+ ]) : l.type === "date" ? $((c(), d("input", {
4677
4734
  key: 3,
4678
4735
  id: `wm-f-${r._uid}-${l.key}`,
4679
4736
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4681,19 +4738,19 @@ function Zi(e, t, n, i, r, s) {
4681
4738
  class: "wm-form__input",
4682
4739
  required: l.required,
4683
4740
  disabled: n.readOnly || r.busy
4684
- }, null, 8, Hi)), [
4741
+ }, null, 8, Ki)), [
4685
4742
  [X, r.values[l.key]]
4686
- ]) : l.type === "boolean" ? (c(), u("label", zi, [
4687
- $(o("input", {
4743
+ ]) : l.type === "boolean" ? (c(), d("label", $i, [
4744
+ $(a("input", {
4688
4745
  id: `wm-f-${r._uid}-${l.key}`,
4689
4746
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
4690
4747
  type: "checkbox",
4691
4748
  disabled: n.readOnly || r.busy
4692
- }, null, 8, qi), [
4749
+ }, null, 8, Wi), [
4693
4750
  [ze, r.values[l.key]]
4694
4751
  ]),
4695
- o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4696
- ])) : l.type === "select" ? $((c(), u("select", {
4752
+ a("span", null, v(l.placeholder || s.t("common.yes")), 1)
4753
+ ])) : l.type === "select" ? $((c(), d("select", {
4697
4754
  key: 5,
4698
4755
  id: `wm-f-${r._uid}-${l.key}`,
4699
4756
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4701,19 +4758,19 @@ function Zi(e, t, n, i, r, s) {
4701
4758
  required: l.required,
4702
4759
  disabled: n.readOnly || r.busy
4703
4760
  }, [
4704
- o("option", Vi, v(l.placeholder || s.t("form.choose")), 1),
4705
- (c(!0), u(E, null, F(l.options, (p) => (c(), u("option", {
4761
+ a("option", Yi, v(l.placeholder || s.t("form.choose")), 1),
4762
+ (c(!0), d(E, null, F(l.options, (p) => (c(), d("option", {
4706
4763
  key: p.value,
4707
4764
  value: p.value
4708
- }, v(p.label), 9, $i))), 128))
4709
- ], 8, Ki)), [
4765
+ }, v(p.label), 9, Ji))), 128))
4766
+ ], 8, Gi)), [
4710
4767
  [qe, r.values[l.key]]
4711
- ]) : l.type === "multiselect" ? (c(), u("div", Wi, [
4712
- (c(!0), u(E, null, F(l.options, (p) => (c(), u("label", {
4768
+ ]) : l.type === "multiselect" ? (c(), d("div", Qi, [
4769
+ (c(!0), d(E, null, F(l.options, (p) => (c(), d("label", {
4713
4770
  key: p.value,
4714
4771
  class: "wm-form__multiItem"
4715
4772
  }, [
4716
- o("input", {
4773
+ a("input", {
4717
4774
  type: "checkbox",
4718
4775
  value: p.value,
4719
4776
  checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
@@ -4723,25 +4780,25 @@ function Zi(e, t, n, i, r, s) {
4723
4780
  p.value,
4724
4781
  k.target.checked
4725
4782
  )
4726
- }, null, 40, Gi),
4727
- o("span", null, v(p.label), 1)
4783
+ }, null, 40, Xi),
4784
+ a("span", null, v(p.label), 1)
4728
4785
  ]))), 128))
4729
4786
  ])) : y("", !0)
4730
4787
  ]))), 128)),
4731
- r.error ? (c(), u("div", Yi, v(r.error), 1)) : y("", !0),
4732
- n.readOnly ? (c(), u("div", Xi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4788
+ r.error ? (c(), d("div", Zi, v(r.error), 1)) : y("", !0),
4789
+ n.readOnly ? (c(), d("div", na, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
4733
4790
  key: 1,
4734
4791
  type: "submit",
4735
4792
  class: "wm-form__submit",
4736
4793
  disabled: r.busy
4737
4794
  }, [
4738
- r.busy ? (c(), u("span", Qi)) : y("", !0),
4739
- o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4740
- ], 8, Ji))
4795
+ r.busy ? (c(), d("span", ta)) : y("", !0),
4796
+ a("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4797
+ ], 8, ea))
4741
4798
  ], 32)
4742
4799
  ]);
4743
4800
  }
4744
- const ea = /* @__PURE__ */ N(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56"]]), ta = {
4801
+ const ra = /* @__PURE__ */ N(Bi, [["render", sa], ["__scopeId", "data-v-fe65cc56"]]), ia = {
4745
4802
  name: "WmFeedback",
4746
4803
  inject: {
4747
4804
  // Translator shared by the Messenger shell; French fallback when
@@ -4775,15 +4832,15 @@ const ea = /* @__PURE__ */ N(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56
4775
4832
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4776
4833
  }
4777
4834
  }
4778
- }, na = { class: "wm-fb" }, sa = { class: "wm-fb__title" }, ra = { class: "wm-fb__sub" }, ia = { class: "wm-fb__row" }, aa = ["onClick"], oa = { class: "wm-fb__emoji" }, la = { class: "wm-fb__label" }, ca = ["disabled"], da = {
4835
+ }, aa = { class: "wm-fb" }, oa = { class: "wm-fb__title" }, la = { class: "wm-fb__sub" }, ca = { class: "wm-fb__row" }, da = ["onClick"], ua = { class: "wm-fb__emoji" }, ha = { class: "wm-fb__label" }, ma = ["disabled"], fa = {
4779
4836
  key: 1,
4780
4837
  class: "wm-fb__done"
4781
- }, ua = { class: "wm-fb__doneTitle" }, ma = { class: "wm-fb__doneSub" };
4782
- function ha(e, t, n, i, r, s) {
4783
- return c(), u("div", na, [
4784
- n.done ? (c(), u("div", da, [
4785
- t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4786
- o("svg", {
4838
+ }, _a = { class: "wm-fb__doneTitle" }, ga = { class: "wm-fb__doneSub" };
4839
+ function pa(e, t, n, i, r, s) {
4840
+ return c(), d("div", aa, [
4841
+ n.done ? (c(), d("div", fa, [
4842
+ t[1] || (t[1] = a("div", { class: "wm-fb__check" }, [
4843
+ a("svg", {
4787
4844
  width: "16",
4788
4845
  height: "16",
4789
4846
  viewBox: "0 0 24 24",
@@ -4794,35 +4851,35 @@ function ha(e, t, n, i, r, s) {
4794
4851
  "stroke-linejoin": "round",
4795
4852
  "aria-hidden": "true"
4796
4853
  }, [
4797
- o("path", { d: "M20 6L9 17l-5-5" })
4854
+ a("path", { d: "M20 6L9 17l-5-5" })
4798
4855
  ])
4799
4856
  ], -1)),
4800
- o("div", ua, v(s.t("feedback.doneTitle")), 1),
4801
- o("div", ma, v(s.t("feedback.doneSubtitle")), 1)
4802
- ])) : (c(), u(E, { key: 0 }, [
4803
- o("div", sa, v(s.t("feedback.question")), 1),
4804
- o("div", ra, v(s.t("feedback.subtitle")), 1),
4805
- o("div", ia, [
4806
- (c(!0), u(E, null, F(s.options, (a) => (c(), u("button", {
4807
- key: a.v,
4857
+ a("div", _a, v(s.t("feedback.doneTitle")), 1),
4858
+ a("div", ga, v(s.t("feedback.doneSubtitle")), 1)
4859
+ ])) : (c(), d(E, { key: 0 }, [
4860
+ a("div", oa, v(s.t("feedback.question")), 1),
4861
+ a("div", la, v(s.t("feedback.subtitle")), 1),
4862
+ a("div", ca, [
4863
+ (c(!0), d(E, null, F(s.options, (o) => (c(), d("button", {
4864
+ key: o.v,
4808
4865
  type: "button",
4809
- class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4810
- onClick: (l) => r.sel = a.v
4866
+ class: O(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
4867
+ onClick: (l) => r.sel = o.v
4811
4868
  }, [
4812
- o("span", oa, v(a.e), 1),
4813
- o("span", la, v(a.l), 1)
4814
- ], 10, aa))), 128))
4869
+ a("span", ua, v(o.e), 1),
4870
+ a("span", ha, v(o.l), 1)
4871
+ ], 10, da))), 128))
4815
4872
  ]),
4816
- o("button", {
4873
+ a("button", {
4817
4874
  type: "button",
4818
4875
  class: "wm-fb__send",
4819
4876
  disabled: !r.sel || n.busy,
4820
- onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
4821
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, ca)
4877
+ onClick: t[0] || (t[0] = (...o) => s.onSend && s.onSend(...o))
4878
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, ma)
4822
4879
  ], 64))
4823
4880
  ]);
4824
4881
  }
4825
- const fa = /* @__PURE__ */ N(ta, [["render", ha], ["__scopeId", "data-v-9b630564"]]), _a = {
4882
+ const va = /* @__PURE__ */ N(ia, [["render", pa], ["__scopeId", "data-v-9b630564"]]), ya = {
4826
4883
  name: "WmMoreMenu",
4827
4884
  inject: {
4828
4885
  // Translator shared by the Messenger shell; French fallback when
@@ -4865,32 +4922,32 @@ const fa = /* @__PURE__ */ N(ta, [["render", ha], ["__scopeId", "data-v-9b630564
4865
4922
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4866
4923
  }
4867
4924
  }
4868
- }, ga = { class: "wm-mm" }, pa = {
4925
+ }, wa = { class: "wm-mm" }, ba = {
4869
4926
  class: "wm-mm__pop",
4870
4927
  role: "menu"
4871
- }, va = {
4928
+ }, ka = {
4872
4929
  key: 0,
4873
4930
  class: "wm-mm__section"
4874
- }, ya = { class: "wm-mm__label" }, wa = { class: "wm-mm__label" }, ba = {
4931
+ }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__label" }, Sa = {
4875
4932
  key: 1,
4876
4933
  class: "wm-mm__sep"
4877
- }, ka = { class: "wm-mm__section" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__label" }, Sa = { class: "wm-mm__section" }, Ma = { class: "wm-mm__label" }, Ta = { class: "wm-mm__label" };
4878
- function xa(e, t, n, i, r, s) {
4879
- return c(), u("div", ga, [
4880
- o("div", {
4934
+ }, Ma = { class: "wm-mm__section" }, Ta = { class: "wm-mm__label" }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__section" }, Ia = { class: "wm-mm__label" }, La = { class: "wm-mm__label" };
4935
+ function Ea(e, t, n, i, r, s) {
4936
+ return c(), d("div", wa, [
4937
+ a("div", {
4881
4938
  class: "wm-mm__scrim",
4882
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4939
+ onClick: t[0] || (t[0] = (o) => e.$emit("close"))
4883
4940
  }),
4884
- o("div", pa, [
4885
- n.canRename || n.canExport ? (c(), u("div", va, [
4886
- n.canRename ? (c(), u("button", {
4941
+ a("div", ba, [
4942
+ n.canRename || n.canExport ? (c(), d("div", ka, [
4943
+ n.canRename ? (c(), d("button", {
4887
4944
  key: 0,
4888
4945
  type: "button",
4889
4946
  class: "wm-mm__item",
4890
- onClick: t[1] || (t[1] = (a) => s.emit("rename"))
4947
+ onClick: t[1] || (t[1] = (o) => s.emit("rename"))
4891
4948
  }, [
4892
- t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
4893
- o("svg", {
4949
+ t[7] || (t[7] = a("span", { class: "wm-mm__icon" }, [
4950
+ a("svg", {
4894
4951
  width: "12",
4895
4952
  height: "12",
4896
4953
  viewBox: "0 0 24 24",
@@ -4901,20 +4958,20 @@ function xa(e, t, n, i, r, s) {
4901
4958
  "stroke-linejoin": "round",
4902
4959
  "aria-hidden": "true"
4903
4960
  }, [
4904
- o("path", { d: "M12 20h9" }),
4905
- o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4961
+ a("path", { d: "M12 20h9" }),
4962
+ a("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4906
4963
  ])
4907
4964
  ], -1)),
4908
- o("span", ya, v(s.t("moreMenu.editTitle")), 1)
4965
+ a("span", Ca, v(s.t("moreMenu.editTitle")), 1)
4909
4966
  ])) : y("", !0),
4910
- n.canExport ? (c(), u("button", {
4967
+ n.canExport ? (c(), d("button", {
4911
4968
  key: 1,
4912
4969
  type: "button",
4913
4970
  class: "wm-mm__item",
4914
- onClick: t[2] || (t[2] = (a) => s.emit("export"))
4971
+ onClick: t[2] || (t[2] = (o) => s.emit("export"))
4915
4972
  }, [
4916
- t[8] || (t[8] = o("span", { class: "wm-mm__icon" }, [
4917
- o("svg", {
4973
+ t[8] || (t[8] = a("span", { class: "wm-mm__icon" }, [
4974
+ a("svg", {
4918
4975
  width: "12",
4919
4976
  height: "12",
4920
4977
  viewBox: "0 0 24 24",
@@ -4925,22 +4982,22 @@ function xa(e, t, n, i, r, s) {
4925
4982
  "stroke-linejoin": "round",
4926
4983
  "aria-hidden": "true"
4927
4984
  }, [
4928
- o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4985
+ a("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4929
4986
  ])
4930
4987
  ], -1)),
4931
- o("span", wa, v(s.t("moreMenu.exportTranscript")), 1),
4932
- t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4988
+ a("span", Aa, v(s.t("moreMenu.exportTranscript")), 1),
4989
+ t[9] || (t[9] = a("span", { class: "wm-mm__hint" }, ".txt", -1))
4933
4990
  ])) : y("", !0)
4934
4991
  ])) : y("", !0),
4935
- n.canRename || n.canExport ? (c(), u("div", ba)) : y("", !0),
4936
- o("div", ka, [
4937
- o("button", {
4992
+ n.canRename || n.canExport ? (c(), d("div", Sa)) : y("", !0),
4993
+ a("div", Ma, [
4994
+ a("button", {
4938
4995
  type: "button",
4939
4996
  class: "wm-mm__item",
4940
- onClick: t[3] || (t[3] = (...a) => s.toggleSound && s.toggleSound(...a))
4997
+ onClick: t[3] || (t[3] = (...o) => s.toggleSound && s.toggleSound(...o))
4941
4998
  }, [
4942
- t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
4943
- o("svg", {
4999
+ t[11] || (t[11] = a("span", { class: "wm-mm__icon" }, [
5000
+ a("svg", {
4944
5001
  width: "12",
4945
5002
  height: "12",
4946
5003
  viewBox: "0 0 24 24",
@@ -4951,24 +5008,24 @@ function xa(e, t, n, i, r, s) {
4951
5008
  "stroke-linejoin": "round",
4952
5009
  "aria-hidden": "true"
4953
5010
  }, [
4954
- o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
4955
- o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5011
+ a("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5012
+ a("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4956
5013
  ])
4957
5014
  ], -1)),
4958
- o("span", Ca, v(s.t("moreMenu.sound")), 1),
4959
- o("span", {
5015
+ a("span", Ta, v(s.t("moreMenu.sound")), 1),
5016
+ a("span", {
4960
5017
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
4961
5018
  }, [...t[10] || (t[10] = [
4962
- o("span", { class: "wm-mm__knob" }, null, -1)
5019
+ a("span", { class: "wm-mm__knob" }, null, -1)
4963
5020
  ])], 2)
4964
5021
  ]),
4965
- o("button", {
5022
+ a("button", {
4966
5023
  type: "button",
4967
5024
  class: "wm-mm__item",
4968
- onClick: t[4] || (t[4] = (...a) => s.toggleBrowserNotif && s.toggleBrowserNotif(...a))
5025
+ onClick: t[4] || (t[4] = (...o) => s.toggleBrowserNotif && s.toggleBrowserNotif(...o))
4969
5026
  }, [
4970
- t[13] || (t[13] = o("span", { class: "wm-mm__icon" }, [
4971
- o("svg", {
5027
+ t[13] || (t[13] = a("span", { class: "wm-mm__icon" }, [
5028
+ a("svg", {
4972
5029
  width: "12",
4973
5030
  height: "12",
4974
5031
  viewBox: "0 0 24 24",
@@ -4979,27 +5036,27 @@ function xa(e, t, n, i, r, s) {
4979
5036
  "stroke-linejoin": "round",
4980
5037
  "aria-hidden": "true"
4981
5038
  }, [
4982
- o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
5039
+ a("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
4983
5040
  ])
4984
5041
  ], -1)),
4985
- o("span", Aa, v(s.t("moreMenu.browserNotifications")), 1),
4986
- o("span", {
5042
+ a("span", xa, v(s.t("moreMenu.browserNotifications")), 1),
5043
+ a("span", {
4987
5044
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
4988
5045
  }, [...t[12] || (t[12] = [
4989
- o("span", { class: "wm-mm__knob" }, null, -1)
5046
+ a("span", { class: "wm-mm__knob" }, null, -1)
4990
5047
  ])], 2)
4991
5048
  ])
4992
5049
  ]),
4993
- t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
4994
- o("div", Sa, [
4995
- n.statusUrl ? (c(), u("button", {
5050
+ t[16] || (t[16] = a("div", { class: "wm-mm__sep" }, null, -1)),
5051
+ a("div", Oa, [
5052
+ n.statusUrl ? (c(), d("button", {
4996
5053
  key: 0,
4997
5054
  type: "button",
4998
5055
  class: "wm-mm__item",
4999
- onClick: t[5] || (t[5] = (a) => s.emit("status"))
5056
+ onClick: t[5] || (t[5] = (o) => s.emit("status"))
5000
5057
  }, [
5001
- t[14] || (t[14] = o("span", { class: "wm-mm__icon" }, [
5002
- o("svg", {
5058
+ t[14] || (t[14] = a("span", { class: "wm-mm__icon" }, [
5059
+ a("svg", {
5003
5060
  width: "12",
5004
5061
  height: "12",
5005
5062
  viewBox: "0 0 24 24",
@@ -5010,19 +5067,19 @@ function xa(e, t, n, i, r, s) {
5010
5067
  "stroke-linejoin": "round",
5011
5068
  "aria-hidden": "true"
5012
5069
  }, [
5013
- o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5070
+ a("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5014
5071
  ])
5015
5072
  ], -1)),
5016
- o("span", Ma, v(s.t("moreMenu.serviceStatus")), 1)
5073
+ a("span", Ia, v(s.t("moreMenu.serviceStatus")), 1)
5017
5074
  ])) : y("", !0),
5018
- n.helpUrl ? (c(), u("button", {
5075
+ n.helpUrl ? (c(), d("button", {
5019
5076
  key: 1,
5020
5077
  type: "button",
5021
5078
  class: "wm-mm__item",
5022
- onClick: t[6] || (t[6] = (a) => s.emit("help"))
5079
+ onClick: t[6] || (t[6] = (o) => s.emit("help"))
5023
5080
  }, [
5024
- t[15] || (t[15] = o("span", { class: "wm-mm__icon" }, [
5025
- o("svg", {
5081
+ t[15] || (t[15] = a("span", { class: "wm-mm__icon" }, [
5082
+ a("svg", {
5026
5083
  width: "12",
5027
5084
  height: "12",
5028
5085
  viewBox: "0 0 24 24",
@@ -5033,16 +5090,16 @@ function xa(e, t, n, i, r, s) {
5033
5090
  "stroke-linejoin": "round",
5034
5091
  "aria-hidden": "true"
5035
5092
  }, [
5036
- 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" })
5093
+ a("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" })
5037
5094
  ])
5038
5095
  ], -1)),
5039
- o("span", Ta, v(s.t("moreMenu.helpCenter")), 1)
5096
+ a("span", La, v(s.t("moreMenu.helpCenter")), 1)
5040
5097
  ])) : y("", !0)
5041
5098
  ])
5042
5099
  ])
5043
5100
  ]);
5044
5101
  }
5045
- const Oa = /* @__PURE__ */ N(_a, [["render", xa], ["__scopeId", "data-v-76281e95"]]), Ia = {
5102
+ const Ba = /* @__PURE__ */ N(ya, [["render", Ea], ["__scopeId", "data-v-76281e95"]]), Ra = {
5046
5103
  name: "WmRenameDialog",
5047
5104
  inject: {
5048
5105
  // Translator shared by the Messenger shell; French fallback when
@@ -5084,27 +5141,27 @@ const Oa = /* @__PURE__ */ N(_a, [["render", xa], ["__scopeId", "data-v-76281e95
5084
5141
  this.canSubmit && this.$emit("submit", this.value.trim());
5085
5142
  }
5086
5143
  }
5087
- }, La = { class: "wm-dialog" }, Ea = {
5144
+ }, Na = { class: "wm-dialog" }, Pa = {
5088
5145
  class: "wm-dialog__card",
5089
5146
  role: "dialog",
5090
5147
  "aria-modal": "true"
5091
- }, Ba = { class: "wm-dialog__head" }, Ra = { class: "wm-dialog__title" }, Na = ["aria-label"], Pa = { class: "wm-dialog__body" }, Ua = ["placeholder"], Fa = { class: "wm-dialog__actions" }, Da = ["disabled"];
5092
- function ja(e, t, n, i, r, s) {
5093
- return c(), u("div", La, [
5094
- o("div", {
5148
+ }, Ua = { class: "wm-dialog__head" }, Fa = { class: "wm-dialog__title" }, Da = ["aria-label"], ja = { class: "wm-dialog__body" }, Ha = ["placeholder"], za = { class: "wm-dialog__actions" }, qa = ["disabled"];
5149
+ function Va(e, t, n, i, r, s) {
5150
+ return c(), d("div", Na, [
5151
+ a("div", {
5095
5152
  class: "wm-dialog__scrim",
5096
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5153
+ onClick: t[0] || (t[0] = (o) => e.$emit("close"))
5097
5154
  }),
5098
- o("div", Ea, [
5099
- o("div", Ba, [
5100
- o("div", Ra, v(n.title || s.t("rename.title")), 1),
5101
- o("button", {
5155
+ a("div", Pa, [
5156
+ a("div", Ua, [
5157
+ a("div", Fa, v(n.title || s.t("rename.title")), 1),
5158
+ a("button", {
5102
5159
  type: "button",
5103
5160
  class: "wm-dialog__close",
5104
5161
  "aria-label": s.t("common.close"),
5105
- onClick: t[1] || (t[1] = (a) => e.$emit("close"))
5162
+ onClick: t[1] || (t[1] = (o) => e.$emit("close"))
5106
5163
  }, [...t[7] || (t[7] = [
5107
- o("svg", {
5164
+ a("svg", {
5108
5165
  width: "12",
5109
5166
  height: "12",
5110
5167
  viewBox: "0 0 24 24",
@@ -5115,56 +5172,56 @@ function ja(e, t, n, i, r, s) {
5115
5172
  "stroke-linejoin": "round",
5116
5173
  "aria-hidden": "true"
5117
5174
  }, [
5118
- o("path", { d: "M18 6L6 18M6 6l12 12" })
5175
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
5119
5176
  ], -1)
5120
- ])], 8, Na)
5177
+ ])], 8, Da)
5121
5178
  ]),
5122
- o("div", Pa, [
5123
- $(o("input", {
5179
+ a("div", ja, [
5180
+ $(a("input", {
5124
5181
  ref: "input",
5125
- "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
5182
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
5126
5183
  type: "text",
5127
5184
  class: "wm-dialog__input",
5128
5185
  placeholder: n.placeholder || s.t("rename.placeholder"),
5129
5186
  maxlength: 120,
5130
5187
  onKeydown: [
5131
- t[3] || (t[3] = ue(G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5132
- t[4] || (t[4] = ue(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5188
+ t[3] || (t[3] = ue(G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]), ["enter"])),
5189
+ t[4] || (t[4] = ue(G((o) => e.$emit("close"), ["prevent"]), ["esc"]))
5133
5190
  ]
5134
- }, null, 40, Ua), [
5191
+ }, null, 40, Ha), [
5135
5192
  [X, r.value]
5136
5193
  ])
5137
5194
  ]),
5138
- o("div", Fa, [
5139
- o("button", {
5195
+ a("div", za, [
5196
+ a("button", {
5140
5197
  type: "button",
5141
5198
  class: "wm-dialog__btn",
5142
- onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5199
+ onClick: t[5] || (t[5] = (o) => e.$emit("close"))
5143
5200
  }, v(s.t("common.cancel")), 1),
5144
- o("button", {
5201
+ a("button", {
5145
5202
  type: "button",
5146
5203
  class: "wm-dialog__btn wm-dialog__btn--primary",
5147
5204
  disabled: !s.canSubmit,
5148
- onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
5149
- }, v(s.t("common.save")), 9, Da)
5205
+ onClick: t[6] || (t[6] = (...o) => s.onSubmit && s.onSubmit(...o))
5206
+ }, v(s.t("common.save")), 9, qa)
5150
5207
  ])
5151
5208
  ])
5152
5209
  ]);
5153
5210
  }
5154
- const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8"]]), Be = "ww-messenger-tokens", za = {
5211
+ const Ka = /* @__PURE__ */ N(Ra, [["render", Va], ["__scopeId", "data-v-6d5f94a8"]]), Be = "ww-messenger-tokens", $a = {
5155
5212
  name: "Messenger",
5156
5213
  components: {
5157
5214
  Launcher: Ut,
5158
5215
  Header: cn,
5159
- Onboarding: ts,
5160
- MessageList: Gr,
5161
- Composer: hi,
5162
- SuggestionChips: pi,
5163
- ApprovalCard: Ti,
5164
- FormCard: ea,
5165
- Feedback: fa,
5166
- MoreMenu: Oa,
5167
- RenameDialog: Ha
5216
+ Onboarding: is,
5217
+ MessageList: Xr,
5218
+ Composer: pi,
5219
+ SuggestionChips: bi,
5220
+ ApprovalCard: Li,
5221
+ FormCard: ra,
5222
+ Feedback: va,
5223
+ MoreMenu: Ba,
5224
+ RenameDialog: Ka
5168
5225
  },
5169
5226
  mixins: [
5170
5227
  lt,
@@ -5348,7 +5405,7 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5348
5405
  return this.allConversations.map((i) => {
5349
5406
  var k;
5350
5407
  const r = e[i.id] || [], s = W(i.last_read_message_id);
5351
- let a = 0, l = null;
5408
+ let o = 0, l = null;
5352
5409
  for (let w = r.length - 1; w >= 0; w--) {
5353
5410
  const T = r[w];
5354
5411
  if (!T) continue;
@@ -5356,12 +5413,12 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5356
5413
  const B = W(T.id);
5357
5414
  if (B != null) {
5358
5415
  if (s != null && B <= s) break;
5359
- t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5416
+ t[T.id] !== 0 && (!l && T.author && (l = T.author), o++);
5360
5417
  }
5361
5418
  }
5362
5419
  if (!r.length) {
5363
5420
  const w = W(i.last_message_id);
5364
- w != null && (s == null || w > s) && (a = 1, l = i.last_message_author || null);
5421
+ w != null && (s == null || w > s) && (o = 1, l = i.last_message_author || null);
5365
5422
  }
5366
5423
  const p = r.filter(
5367
5424
  (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
@@ -5369,8 +5426,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5369
5426
  return {
5370
5427
  ...i,
5371
5428
  _preview: rt(i, p),
5372
- _unread: a > 0,
5373
- _unreadCount: a,
5429
+ _unread: o > 0,
5430
+ _unreadCount: o,
5374
5431
  _lastAuthor: l
5375
5432
  };
5376
5433
  });
@@ -5404,7 +5461,7 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5404
5461
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5405
5462
  for (const i of this.drawerConversations) {
5406
5463
  if (!i._unread) continue;
5407
- const r = Oe(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5464
+ const r = Oe(i, e[i.id] || []), s = i._lastAuthor, o = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (o ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (o ? this.agentAvatarUrl : null);
5408
5465
  t.push({
5409
5466
  convId: i.id,
5410
5467
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5549,8 +5606,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5549
5606
  }
5550
5607
  const t = this.revealedAt;
5551
5608
  return (this.s.messagesByConv[e.id] || []).filter((r) => {
5552
- var s, a, l, p, k;
5553
- return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5609
+ var s, o, l, p, k;
5610
+ return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((o = r == null ? void 0 : r.payload) == null ? void 0 : o.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5554
5611
  });
5555
5612
  },
5556
5613
  // True whenever we should show the "typing" indicator at the bottom
@@ -5586,11 +5643,11 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5586
5643
  return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || this.t("action.title");
5587
5644
  },
5588
5645
  approvalDetail() {
5589
- var i, r, s, a, l, p;
5646
+ var i, r, s, o, l, p;
5590
5647
  const e = (s = (r = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
5591
5648
  if (typeof e == "string" && e.trim())
5592
5649
  return e.trim();
5593
- const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5650
+ const t = (p = (l = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5594
5651
  if (!t || typeof t != "object") return "";
5595
5652
  const n = Object.entries(t);
5596
5653
  return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
@@ -5629,9 +5686,9 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5629
5686
  const e = this.currentConv;
5630
5687
  let t = /* @__PURE__ */ new Date();
5631
5688
  if (e) {
5632
- const a = ((r = (((i = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : r.created_at) || e.created_at;
5633
- if (a) {
5634
- const l = new Date(a);
5689
+ const o = ((r = (((i = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : r.created_at) || e.created_at;
5690
+ if (o) {
5691
+ const l = new Date(o);
5635
5692
  Number.isNaN(l.getTime()) || (t = l);
5636
5693
  }
5637
5694
  }
@@ -5660,12 +5717,12 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5660
5717
  // ts comparison in `launcherPeeks`.
5661
5718
  latestUnreads: {
5662
5719
  handler(e) {
5663
- const t = new Set(e.map((a) => a.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
5720
+ const t = new Set(e.map((o) => o.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
5664
5721
  if (!i.length) return;
5665
5722
  const r = {};
5666
5723
  let s = !1;
5667
- for (const a of i)
5668
- t.has(a) ? r[a] = n[a] : s = !0;
5724
+ for (const o of i)
5725
+ t.has(o) ? r[o] = n[o] : s = !0;
5669
5726
  s && (this.dismissedPeeks = r);
5670
5727
  },
5671
5728
  deep: !0
@@ -5837,8 +5894,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5837
5894
  if (!i) return;
5838
5895
  const r = Math.ceil(i.contentRect.height + 8);
5839
5896
  r !== this.floatHeight && (this.floatHeight = r, this.$nextTick(() => {
5840
- var s, a;
5841
- (a = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || a.call(s);
5897
+ var s, o;
5898
+ (o = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || o.call(s);
5842
5899
  }));
5843
5900
  }), this.floatRO.observe(t);
5844
5901
  }
@@ -5898,7 +5955,7 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5898
5955
  if (!e) return;
5899
5956
  const t = e.getBoundingClientRect();
5900
5957
  if (!t.width || !t.height) return;
5901
- const n = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (H = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : H.call(A, ".wm-launcher"), l = (U = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : U.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
5958
+ const n = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), o = (H = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : H.call(A, ".wm-launcher"), l = (U = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : U.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
5902
5959
  let k = null;
5903
5960
  if (p) {
5904
5961
  const I = p.getBoundingClientRect();
@@ -5912,8 +5969,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5912
5969
  this.notifyParentResize("closed", {
5913
5970
  width: r + i,
5914
5971
  height: s + i,
5915
- launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
5916
- launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
5972
+ launcherWidth: (o == null ? void 0 : o.offsetWidth) || null,
5973
+ launcherHeight: (o == null ? void 0 : o.offsetHeight) || null,
5917
5974
  launcherHovered: this.launcherHovered,
5918
5975
  peek: k,
5919
5976
  peekHovered: this.launcherHovered && n
@@ -6154,33 +6211,33 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
6154
6211
  }
6155
6212
  }
6156
6213
  }
6157
- }, qa = {
6214
+ }, Wa = {
6158
6215
  key: 0,
6159
6216
  class: "wm-loading",
6160
6217
  "aria-busy": "true",
6161
6218
  "aria-live": "polite"
6162
- }, Ka = ["aria-label"], Va = {
6219
+ }, Ga = ["aria-label"], Ya = {
6163
6220
  key: 0,
6164
6221
  class: "wm-state"
6165
- }, $a = { class: "wm-state__err" }, Wa = { class: "wm-state__errTitle" }, Ga = { class: "wm-state__errSub" }, Ya = { class: "wm-bottom" }, Ja = {
6222
+ }, Ja = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Xa = { class: "wm-state__errSub" }, Za = { class: "wm-bottom" }, eo = {
6166
6223
  key: 0,
6167
6224
  ref: "floatEl",
6168
6225
  class: "wm-float"
6169
- }, Qa = {
6226
+ }, to = {
6170
6227
  key: 1,
6171
6228
  class: "wm-actionWait",
6172
6229
  role: "status",
6173
6230
  "aria-live": "polite"
6174
- }, Xa = { class: "wm-actionWait__lbl" }, Za = {
6231
+ }, no = { class: "wm-actionWait__lbl" }, so = {
6175
6232
  key: 2,
6176
6233
  class: "wm-attached"
6177
- }, eo = ["aria-label", "onClick"];
6178
- function to(e, t, n, i, r, s) {
6179
- const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), B = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), U = R("RenameDialog");
6180
- return c(), u("div", {
6234
+ }, ro = ["aria-label", "onClick"];
6235
+ function io(e, t, n, i, r, s) {
6236
+ const o = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), B = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), U = R("RenameDialog");
6237
+ return c(), d("div", {
6181
6238
  class: O(["wm-root", `wm-root--${n.displayMode}`])
6182
6239
  }, [
6183
- !r.isOpen && !s.isEmbedded ? (c(), P(a, {
6240
+ !r.isOpen && !s.isEmbedded ? (c(), P(o, {
6184
6241
  key: 0,
6185
6242
  "unread-count": s.unreadCount,
6186
6243
  peeks: s.launcherPeeks,
@@ -6188,27 +6245,27 @@ function to(e, t, n, i, r, s) {
6188
6245
  onDismiss: s.dismissPeek,
6189
6246
  onHover: s.onLauncherHover
6190
6247
  }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : y("", !0),
6191
- r.isOpen || s.isEmbedded ? (c(), u("section", {
6248
+ r.isOpen || s.isEmbedded ? (c(), d("section", {
6192
6249
  key: 1,
6193
6250
  class: O([
6194
6251
  "wm-panel",
6195
6252
  `wm-panel--${n.displayMode}`,
6196
6253
  { "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
6197
6254
  ]),
6198
- style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
6255
+ style: z(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
6199
6256
  role: "dialog",
6200
6257
  "aria-label": "Messenger",
6201
6258
  onClick: t[5] || (t[5] = (...I) => s.onPanelClick && s.onPanelClick(...I))
6202
6259
  }, [
6203
- !s.ready && !s.error ? (c(), u("div", qa, [
6204
- s.isEmbedded ? y("", !0) : (c(), u("button", {
6260
+ !s.ready && !s.error ? (c(), d("div", Wa, [
6261
+ s.isEmbedded ? y("", !0) : (c(), d("button", {
6205
6262
  key: 0,
6206
6263
  type: "button",
6207
6264
  class: "wm-loading__close",
6208
6265
  "aria-label": s.t("loading.minimize"),
6209
6266
  onClick: t[0] || (t[0] = (...I) => s.close && s.close(...I))
6210
6267
  }, [...t[6] || (t[6] = [
6211
- o("svg", {
6268
+ a("svg", {
6212
6269
  width: "13",
6213
6270
  height: "13",
6214
6271
  viewBox: "0 0 24 24",
@@ -6219,15 +6276,15 @@ function to(e, t, n, i, r, s) {
6219
6276
  "stroke-linejoin": "round",
6220
6277
  "aria-hidden": "true"
6221
6278
  }, [
6222
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6279
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6223
6280
  ], -1)
6224
- ])], 8, Ka)),
6225
- t[7] || (t[7] = o("div", {
6281
+ ])], 8, Ga)),
6282
+ t[7] || (t[7] = a("div", {
6226
6283
  class: "wm-loading__spinner",
6227
6284
  "aria-hidden": "true"
6228
6285
  }, null, -1))
6229
- ])) : (c(), u(E, { key: 1 }, [
6230
- K(l, {
6286
+ ])) : (c(), d(E, { key: 1 }, [
6287
+ V(l, {
6231
6288
  title: s.headerTitle,
6232
6289
  "team-members": s.teamMembers,
6233
6290
  "response-label": s.responseLabel,
@@ -6241,10 +6298,10 @@ function to(e, t, n, i, r, s) {
6241
6298
  onMore: s.toggleMore,
6242
6299
  onClose: s.close
6243
6300
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6244
- s.error ? (c(), u("div", Va, [
6245
- o("div", $a, [
6246
- t[8] || (t[8] = o("div", { class: "wm-state__errIcon" }, [
6247
- o("svg", {
6301
+ s.error ? (c(), d("div", Ya, [
6302
+ a("div", Ja, [
6303
+ t[8] || (t[8] = a("div", { class: "wm-state__errIcon" }, [
6304
+ a("svg", {
6248
6305
  width: "14",
6249
6306
  height: "14",
6250
6307
  viewBox: "0 0 24 24",
@@ -6255,16 +6312,16 @@ function to(e, t, n, i, r, s) {
6255
6312
  "stroke-linejoin": "round",
6256
6313
  "aria-hidden": "true"
6257
6314
  }, [
6258
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6315
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6259
6316
  ])
6260
6317
  ], -1)),
6261
- o("div", null, [
6262
- o("div", Wa, v(s.t("error.connectionFailed")), 1),
6263
- o("div", Ga, v(s.error), 1)
6318
+ a("div", null, [
6319
+ a("div", Qa, v(s.t("error.connectionFailed")), 1),
6320
+ a("div", Xa, v(s.error), 1)
6264
6321
  ])
6265
6322
  ])
6266
- ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
6267
- K(k, {
6323
+ ])) : s.currentConv ? (c(), d(E, { key: 2 }, [
6324
+ V(k, {
6268
6325
  ref: "messageList",
6269
6326
  messages: s.displayedMessages,
6270
6327
  "streaming-active": s.streamingActive,
@@ -6278,8 +6335,8 @@ function to(e, t, n, i, r, s) {
6278
6335
  "ai-agent-avatar-url": s.agentAvatarUrl,
6279
6336
  onLoadMore: s.onLoadMore
6280
6337
  }, 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"]),
6281
- o("div", Ya, [
6282
- s.floatVisible ? (c(), u("div", Ja, [
6338
+ a("div", Za, [
6339
+ s.floatVisible ? (c(), d("div", eo, [
6283
6340
  s.approvalReady ? (c(), P(w, {
6284
6341
  key: 0,
6285
6342
  action: s.approvalTitle,
@@ -6305,12 +6362,12 @@ function to(e, t, n, i, r, s) {
6305
6362
  onSelect: s.onSuggestion
6306
6363
  }, null, 8, ["items", "onSelect"]))
6307
6364
  ], 512)) : y("", !0),
6308
- s.actionInFlight ? (c(), u("div", Qa, [
6309
- t[9] || (t[9] = o("span", {
6365
+ s.actionInFlight ? (c(), d("div", to, [
6366
+ t[9] || (t[9] = a("span", {
6310
6367
  class: "wm-actionWait__spinner",
6311
6368
  "aria-hidden": "true"
6312
6369
  }, null, -1)),
6313
- o("span", Xa, v(s.t("action.inProgress", {
6370
+ a("span", no, v(s.t("action.inProgress", {
6314
6371
  name: s.actionInFlightName
6315
6372
  })), 1)
6316
6373
  ])) : (c(), P(H, {
@@ -6346,12 +6403,12 @@ function to(e, t, n, i, r, s) {
6346
6403
  onClose: t[3] || (t[3] = (I) => r.renameDialogOpen = !1),
6347
6404
  onSubmit: s.onRenameSubmit
6348
6405
  }, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
6349
- r.pendingAttachments.length ? (c(), u("div", Za, [
6350
- (c(!0), u(E, null, F(r.pendingAttachments, (I, z) => (c(), u("div", {
6351
- key: z,
6406
+ r.pendingAttachments.length ? (c(), d("div", so, [
6407
+ (c(!0), d(E, null, F(r.pendingAttachments, (I, q) => (c(), d("div", {
6408
+ key: q,
6352
6409
  class: "wm-attached__chip"
6353
6410
  }, [
6354
- t[11] || (t[11] = o("svg", {
6411
+ t[11] || (t[11] = a("svg", {
6355
6412
  width: "11",
6356
6413
  height: "11",
6357
6414
  viewBox: "0 0 24 24",
@@ -6362,15 +6419,15 @@ function to(e, t, n, i, r, s) {
6362
6419
  "stroke-linejoin": "round",
6363
6420
  "aria-hidden": "true"
6364
6421
  }, [
6365
- 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" })
6422
+ a("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" })
6366
6423
  ], -1)),
6367
- o("span", null, v(I.name), 1),
6368
- o("button", {
6424
+ a("span", null, v(I.name), 1),
6425
+ a("button", {
6369
6426
  type: "button",
6370
6427
  "aria-label": s.t("attachment.remove"),
6371
- onClick: (Y) => r.pendingAttachments.splice(z, 1)
6428
+ onClick: (Y) => r.pendingAttachments.splice(q, 1)
6372
6429
  }, [...t[10] || (t[10] = [
6373
- o("svg", {
6430
+ a("svg", {
6374
6431
  width: "10",
6375
6432
  height: "10",
6376
6433
  viewBox: "0 0 24 24",
@@ -6381,9 +6438,9 @@ function to(e, t, n, i, r, s) {
6381
6438
  "stroke-linejoin": "round",
6382
6439
  "aria-hidden": "true"
6383
6440
  }, [
6384
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6441
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6385
6442
  ], -1)
6386
- ])], 8, eo)
6443
+ ])], 8, ro)
6387
6444
  ]))), 128))
6388
6445
  ])) : y("", !0)
6389
6446
  ], 64)) : (c(), P(p, {
@@ -6416,53 +6473,53 @@ function to(e, t, n, i, r, s) {
6416
6473
  ], 6)) : y("", !0)
6417
6474
  ], 2);
6418
6475
  }
6419
- const ro = /* @__PURE__ */ N(za, [["render", to], ["__scopeId", "data-v-9e47cfb4"]]), io = "0.5.39";
6476
+ const lo = /* @__PURE__ */ N($a, [["render", io], ["__scopeId", "data-v-9e47cfb4"]]), co = "0.5.40";
6420
6477
  export {
6421
6478
  le as AIAvatar,
6422
6479
  _e as AVATAR_COLORS,
6423
- hs as ActionResult,
6424
- Ti as ApprovalCard,
6425
- ks as ArtifactFormResponse,
6426
- Ns as ArtifactInfoCard,
6427
- er as ArtifactRenderer,
6428
- Js as ArtifactTicket,
6429
- mr as AttachmentPreview,
6430
- gr as Bubble,
6431
- hi as Composer,
6480
+ ps as ActionResult,
6481
+ Li as ApprovalCard,
6482
+ Ms as ArtifactFormResponse,
6483
+ Ds as ArtifactInfoCard,
6484
+ rr as ArtifactRenderer,
6485
+ er as ArtifactTicket,
6486
+ gr as AttachmentPreview,
6487
+ wr as Bubble,
6488
+ pi as Composer,
6432
6489
  et as DEFAULT_BASE_URL,
6433
6490
  ae as DEFAULT_LANGUAGE,
6434
- fa as Feedback,
6435
- ea as FormCard,
6491
+ va as Feedback,
6492
+ ra as FormCard,
6436
6493
  cn as Header,
6437
6494
  Ce as HumanAvatar,
6438
6495
  Ut as Launcher,
6439
6496
  Ae as MEDIA_RECORDER_SUPPORTED,
6440
- Gr as MessageList,
6441
- ro as Messenger,
6442
- Oa as MoreMenu,
6443
- ts as Onboarding,
6444
- me as SCREEN_CAPTURE_SUPPORTED,
6497
+ Xr as MessageList,
6498
+ lo as Messenger,
6499
+ Ba as MoreMenu,
6500
+ is as Onboarding,
6501
+ he as SCREEN_CAPTURE_SUPPORTED,
6445
6502
  tt as SUPPORTED_LANGUAGES,
6446
- pi as SuggestionChips,
6503
+ bi as SuggestionChips,
6447
6504
  Yt as TeamAvatars,
6448
- wr as Typing,
6449
- io as VERSION,
6505
+ Ar as Typing,
6506
+ co as VERSION,
6450
6507
  we as avatarColor,
6451
6508
  be as avatarInitials,
6452
- Jr as captureScreenshotFile,
6509
+ ei as captureScreenshotFile,
6453
6510
  j as colors,
6454
6511
  Xe as createStore,
6455
6512
  D as createTranslator,
6456
6513
  Ge as createTransport,
6457
6514
  re as dateLocale,
6458
- ro as default,
6515
+ lo as default,
6459
6516
  ve as formatTime,
6460
- so as guessAttachmentKind,
6461
- Yr as pickRecorderMime,
6517
+ oo as guessAttachmentKind,
6518
+ Zr as pickRecorderMime,
6462
6519
  un as renderInlineMarkdown,
6463
- mn as renderMarkdown,
6520
+ hn as renderMarkdown,
6464
6521
  ke as resolveLanguage,
6465
- Xr as startScreenRecording,
6522
+ ni as startScreenRecording,
6466
6523
  Ze as tokensCss,
6467
6524
  Qe as uuid,
6468
6525
  Qe as v4