@_solaris/messenger-widget 0.5.34 → 0.5.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as $, Transition as Ie, withCtx as Ee, Fragment as B, renderList as D, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as F, withDirectives as V, vModelText as X, createTextVNode as ve, resolveDynamicComponent as De, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as Ce } from "vue";
1
+ import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as K, Transition as Ie, withCtx as Ee, Fragment as E, renderList as U, withKeys as ue, withModifiers as G, createElementVNode as a, createCommentVNode as y, createBlock as P, withDirectives as $, vModelText as X, createTextVNode as ve, resolveDynamicComponent as De, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as Ce } from "vue";
2
2
  const qe = [
3
3
  "connected",
4
4
  "message",
@@ -6,7 +6,7 @@ const qe = [
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], fe = "/client", $e = 5 * 60 * 1e3, Ke = 10 * 60 * 1e3, Ve = 5 * 60 * 1e3;
9
+ ], fe = "/client", Ke = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, $e = 5 * 60 * 1e3;
10
10
  function We(e) {
11
11
  const t = {
12
12
  baseUrl: Ge(e.baseUrl || ""),
@@ -35,10 +35,10 @@ function We(e) {
35
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);
36
36
  }
37
37
  function i(d, f) {
38
- const _ = t.listeners.get(d);
39
- _ && _.forEach((w) => {
38
+ const g = t.listeners.get(d);
39
+ g && g.forEach((b) => {
40
40
  try {
41
- w(f);
41
+ b(f);
42
42
  } catch (C) {
43
43
  console.error("[transport] listener", d, C);
44
44
  }
@@ -60,20 +60,20 @@ function We(e) {
60
60
  ...t.origin ? { "X-Parent-Origin": t.origin } : {}
61
61
  };
62
62
  }
63
- async function a(d, f, _) {
64
- const w = await fetch(`${t.baseUrl}${fe}${f}`, {
63
+ async function o(d, f, g) {
64
+ const b = await fetch(`${t.baseUrl}${fe}${f}`, {
65
65
  method: d,
66
66
  credentials: "include",
67
67
  headers: s(),
68
- body: _ !== void 0 ? JSON.stringify(_) : void 0
68
+ body: g !== void 0 ? JSON.stringify(g) : void 0
69
69
  });
70
- if (!w.ok) {
71
- const C = await l(w), M = new Error(
72
- `HTTP ${w.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || w.statusText}`
70
+ if (!b.ok) {
71
+ const C = await l(b), M = new Error(
72
+ `HTTP ${b.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || b.statusText}`
73
73
  );
74
- throw M.status = w.status, M.body = C, M;
74
+ throw M.status = b.status, M.body = C, M;
75
75
  }
76
- return w.status === 204 ? null : w.json();
76
+ return b.status === 204 ? null : b.json();
77
77
  }
78
78
  async function l(d) {
79
79
  try {
@@ -109,28 +109,28 @@ function We(e) {
109
109
  }
110
110
  );
111
111
  if (!f.ok) {
112
- const L = await l(f), x = new Error(
113
- `Session bootstrap failed: HTTP ${f.status} :: ${(L == null ? void 0 : L.error) || f.statusText}`
112
+ const I = await l(f), x = new Error(
113
+ `Session bootstrap failed: HTTP ${f.status} :: ${(I == null ? void 0 : I.error) || f.statusText}`
114
114
  );
115
- throw x.status = f.status, x.body = L, x;
115
+ throw x.status = f.status, x.body = I, x;
116
116
  }
117
- const _ = await f.json();
118
- t.userId = _.external_id;
119
- const [w, C] = await Promise.all([
117
+ const g = await f.json();
118
+ t.userId = g.external_id;
119
+ const [b, C] = await Promise.all([
120
120
  fetch(
121
121
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
122
122
  { credentials: "include" }
123
- ).then(async (L) => {
124
- if (!L.ok) {
125
- const x = await l(L);
123
+ ).then(async (I) => {
124
+ if (!I.ok) {
125
+ const x = await l(I);
126
126
  throw new Error(
127
- `HTTP ${L.status} GET /widgets/:id/config :: ${(x == null ? void 0 : x.error) || L.statusText}`
127
+ `HTTP ${I.status} GET /widgets/:id/config :: ${(x == null ? void 0 : x.error) || I.statusText}`
128
128
  );
129
129
  }
130
- return L.json();
130
+ return I.json();
131
131
  }),
132
- a("GET", "/customers/me")
133
- ]), M = { config: w, customer: (C == null ? void 0 : C.customer) ?? null };
132
+ o("GET", "/customers/me")
133
+ ]), M = { config: b, customer: (C == null ? void 0 : C.customer) ?? null };
134
134
  return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
135
135
  "visibilitychange",
136
136
  t.visibilityHandler
@@ -138,102 +138,102 @@ function We(e) {
138
138
  }
139
139
  async function k() {
140
140
  try {
141
- const d = await E();
142
- t.lastActivityAt = d.reduce((f, _) => {
143
- const w = _ == null ? void 0 : _.last_message_at;
144
- return w && (!f || w > f) ? w : f;
141
+ const d = await B();
142
+ t.lastActivityAt = d.reduce((f, g) => {
143
+ const b = g == null ? void 0 : g.last_message_at;
144
+ return b && (!f || b > f) ? b : f;
145
145
  }, null);
146
146
  } catch (d) {
147
147
  console.error("[transport] initial /conversations failed", d);
148
148
  }
149
149
  }
150
- async function b() {
151
- const d = await a("GET", "/customers/me");
150
+ async function w() {
151
+ const d = await o("GET", "/customers/me");
152
152
  return (d == null ? void 0 : d.customer) ?? null;
153
153
  }
154
154
  async function T(d) {
155
- const f = await a("PATCH", "/customers/me", d);
155
+ const f = await o("PATCH", "/customers/me", d);
156
156
  return (f == null ? void 0 : f.customer) ?? null;
157
157
  }
158
- async function E() {
159
- const d = await a("GET", "/conversations");
158
+ async function B() {
159
+ const d = await o("GET", "/conversations");
160
160
  return (d == null ? void 0 : d.conversations) ?? [];
161
161
  }
162
162
  async function A(d = {}) {
163
- return (await a("POST", "/conversations", d)).conversation;
163
+ return (await o("POST", "/conversations", d)).conversation;
164
164
  }
165
165
  async function H(d) {
166
- return (await a(
166
+ return (await o(
167
167
  "GET",
168
168
  `/conversations/${encodeURIComponent(d)}`
169
169
  )).conversation;
170
170
  }
171
171
  async function S(d, f) {
172
- return (await a(
172
+ return (await o(
173
173
  "PATCH",
174
174
  `/conversations/${encodeURIComponent(d)}`,
175
175
  f
176
176
  )).conversation;
177
177
  }
178
- async function P(d, f) {
179
- return a(
178
+ async function F(d, f) {
179
+ return o(
180
180
  "PATCH",
181
181
  `/conversations/${encodeURIComponent(d)}/read`,
182
182
  { message_id: f }
183
183
  );
184
184
  }
185
- async function I(d, f = {}) {
186
- const _ = new URLSearchParams();
187
- f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
188
- const w = _.toString() ? `?${_.toString()}` : "";
189
- return a(
185
+ async function L(d, f = {}) {
186
+ const g = new URLSearchParams();
187
+ f.before && g.set("before", f.before), f.since && g.set("since", f.since), f.limit && g.set("limit", String(f.limit));
188
+ const b = g.toString() ? `?${g.toString()}` : "";
189
+ return o(
190
190
  "GET",
191
- `/conversations/${encodeURIComponent(d)}/messages${w}`
191
+ `/conversations/${encodeURIComponent(d)}/messages${b}`
192
192
  );
193
193
  }
194
- async function U(d, f) {
194
+ async function z(d, f) {
195
195
  se();
196
- const _ = {
196
+ const g = {
197
197
  client_msg_id: f.client_msg_id,
198
198
  type: "content",
199
199
  text_md: f.text_md,
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 && (_.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (_.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
205
  `/conversations/${encodeURIComponent(d)}/messages`,
206
- _
206
+ g
207
207
  );
208
208
  }
209
- async function Y(d, f, _) {
210
- return se(), a(
209
+ async function Y(d, f, g) {
210
+ return se(), o(
211
211
  "POST",
212
212
  `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
213
- _ ? { inputs: _ } : {}
213
+ g ? { inputs: g } : {}
214
214
  );
215
215
  }
216
216
  async function Z(d) {
217
- const f = d.name || "attachment", _ = d.type || "application/octet-stream", w = d.size || 0, C = await a("POST", "/attachments", {
218
- mime_type: _,
219
- size_bytes: w,
217
+ const f = d.name || "attachment", g = d.type || "application/octet-stream", b = d.size || 0, C = await o("POST", "/attachments", {
218
+ mime_type: g,
219
+ size_bytes: b,
220
220
  name: f
221
221
  }), M = await fetch(C.upload_url, {
222
222
  method: "PUT",
223
- headers: { "Content-Type": _ },
223
+ headers: { "Content-Type": g },
224
224
  body: d
225
225
  });
226
226
  if (!M.ok)
227
227
  throw new Error(`HTTP ${M.status} PUT signed upload`);
228
228
  return {
229
- type: Ye(_),
229
+ type: Ye(g),
230
230
  path: C.path,
231
- mime_type: _,
232
- size_bytes: w
231
+ mime_type: g,
232
+ size_bytes: b
233
233
  };
234
234
  }
235
235
  async function ee(d) {
236
- return a(
236
+ return o(
237
237
  "GET",
238
238
  `/attachments/sign?path=${encodeURIComponent(d)}`
239
239
  );
@@ -242,12 +242,12 @@ function We(e) {
242
242
  const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
243
243
  return `${t.baseUrl}${fe}/stream?${d}`;
244
244
  }
245
- function K() {
245
+ function V() {
246
246
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
247
247
  try {
248
248
  const d = new EventSource(te(), { withCredentials: !0 });
249
249
  for (const f of qe)
250
- d.addEventListener(f, (_) => ne(f, _.data));
250
+ d.addEventListener(f, (g) => ne(f, g.data));
251
251
  d.addEventListener(
252
252
  "error",
253
253
  () => i("error", new Error("SSE error"))
@@ -258,28 +258,28 @@ function We(e) {
258
258
  }
259
259
  function ne(d, f) {
260
260
  try {
261
- const _ = JSON.parse(f), w = _ && typeof _ == "object" && "data" in _ ? _.data : _;
262
- i(d, w);
263
- } catch (_) {
264
- console.error("[transport] bad SSE payload", d, _);
261
+ const g = JSON.parse(f), b = g && typeof g == "object" && "data" in g ? g.data : g;
262
+ i(d, b);
263
+ } catch (g) {
264
+ console.error("[transport] bad SSE payload", d, 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), K(), t.panelOpen || (t.burstTimer = setTimeout(() => {
271
+ clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
272
272
  t.panelOpen || J();
273
- }, Ke));
273
+ }, Ve));
274
274
  }
275
275
  function ce(d) {
276
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), K()) : se();
276
+ t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
277
277
  }
278
278
  async function me() {
279
279
  try {
280
- const d = await E(), f = d.reduce((w, C) => {
280
+ const d = await B(), f = d.reduce((b, C) => {
281
281
  const M = C == null ? void 0 : C.last_message_at;
282
- return M && (!w || M > w) ? M : w;
282
+ return M && (!b || M > b) ? M : b;
283
283
  }, null);
284
284
  f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
285
285
  } catch (d) {
@@ -287,7 +287,7 @@ function We(e) {
287
287
  }
288
288
  }
289
289
  function de() {
290
- h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me, $e));
290
+ h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me, Ke));
291
291
  }
292
292
  function h() {
293
293
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
@@ -296,16 +296,16 @@ function We(e) {
296
296
  if (document.hidden)
297
297
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
298
298
  t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
299
- }, Ve);
299
+ }, $e);
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 && K();
305
+ r("idle"), de(), t.panelOpen && V();
306
306
  }
307
307
  }
308
- function g() {
308
+ function _() {
309
309
  h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
310
310
  "visibilitychange",
311
311
  t.visibilityHandler
@@ -314,18 +314,18 @@ function We(e) {
314
314
  return {
315
315
  on: n,
316
316
  start: p,
317
- stop: g,
317
+ stop: _,
318
318
  setPanelOpen: ce,
319
319
  // REST
320
- getCustomer: b,
320
+ getCustomer: w,
321
321
  patchCustomer: T,
322
- listConversations: E,
322
+ listConversations: B,
323
323
  createConversation: A,
324
324
  getConversation: H,
325
325
  patchConversation: S,
326
- markConversationRead: P,
327
- listMessages: I,
328
- postMessage: U,
326
+ markConversationRead: F,
327
+ listMessages: L,
328
+ postMessage: z,
329
329
  postCallback: Y,
330
330
  uploadAttachment: Z,
331
331
  signAttachment: ee,
@@ -391,22 +391,22 @@ function Qe(e) {
391
391
  })
392
392
  ), n.push(
393
393
  e.on("message", (h) => {
394
- const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.message;
395
- !m || !(g != null && g.id) || (K(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
394
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
395
+ !m || !(_ != null && _.id) || (V(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(m, _.created_at));
396
396
  })
397
397
  ), n.push(
398
398
  e.on("message_stream", (h) => {
399
- const m = h == null ? void 0 : h.message_id, g = h == null ? void 0 : h.token;
400
- !m || typeof g != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + g);
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
403
  e.on("conversation_updated", (h) => {
404
- const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.changes;
405
- if (!m || !g) return;
404
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
405
+ if (!m || !_) return;
406
406
  const d = t.conversations.findIndex((f) => f.id === m);
407
407
  d !== -1 && (t.conversations[d] = {
408
408
  ...t.conversations[d],
409
- ...g
409
+ ..._
410
410
  });
411
411
  })
412
412
  ), n.push(
@@ -415,10 +415,10 @@ function Qe(e) {
415
415
  })
416
416
  ), n.push(
417
417
  e.on("action_status", (h) => {
418
- const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.action_id, d = h == null ? void 0 : h.action_name;
419
- if (!m || !g) return;
418
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, d = h == null ? void 0 : h.action_name;
419
+ if (!m || !_) return;
420
420
  const f = t.runningActionsByConv[m] || {};
421
- h.state === "running" ? (f[g] = d || g, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[g], t.runningActionsByConv[m] = { ...f });
421
+ h.state === "running" ? (f[_] = d || _, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[_], t.runningActionsByConv[m] = { ...f });
422
422
  })
423
423
  ), n.push(
424
424
  e.on("activity", (h) => {
@@ -436,11 +436,11 @@ function Qe(e) {
436
436
  ),
437
437
  15e3
438
438
  )
439
- ), g = await Promise.race([
439
+ ), _ = await Promise.race([
440
440
  e.start(h),
441
441
  m
442
442
  ]);
443
- t.config = g.config, t.customer = g.customer, t.conversations = await Promise.race([
443
+ t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
444
444
  e.listConversations(),
445
445
  m
446
446
  ]), t.ready = !0;
@@ -460,38 +460,38 @@ function Qe(e) {
460
460
  const m = me(h);
461
461
  if (!m) return t.customer;
462
462
  try {
463
- const g = await e.patchCustomer(m);
464
- g && (t.customer = g);
465
- } catch (g) {
466
- console.error("[store] applyCustomer failed", g);
463
+ const _ = await e.patchCustomer(m);
464
+ _ && (t.customer = _);
465
+ } catch (_) {
466
+ console.error("[store] applyCustomer failed", _);
467
467
  }
468
468
  return t.customer;
469
469
  }
470
- async function a(h = {}) {
471
- const m = await e.createConversation(h), g = t.conversations.findIndex((d) => d.id === m.id);
472
- return g === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[g] = m, m;
470
+ async function o(h = {}) {
471
+ const m = await e.createConversation(h), _ = t.conversations.findIndex((d) => d.id === m.id);
472
+ return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
473
473
  }
474
474
  const l = 50;
475
475
  async function p(h) {
476
476
  const m = t.paginationByConv[h];
477
477
  if (!(m != null && m.loaded || m != null && m.loading)) {
478
- b(h, { nextCursor: null, loading: !0, loaded: !1 });
478
+ w(h, { nextCursor: null, loading: !0, loaded: !1 });
479
479
  try {
480
- const g = await e.listMessages(h, {
480
+ const _ = await e.listMessages(h, {
481
481
  limit: l
482
- }), d = (g == null ? void 0 : g.messages) ?? [], f = t.messagesByConv[h] || [], _ = /* @__PURE__ */ new Set();
482
+ }), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[h] || [], g = /* @__PURE__ */ new Set();
483
483
  for (const C of d)
484
- (C == null ? void 0 : C.id) != null && _.add(`id:${String(C.id)}`), C != null && C.client_msg_id && _.add(`c:${C.client_msg_id}`);
485
- const w = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
486
- t.messagesByConv[h] = [...d, ...w].sort(
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
+ 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[h] = [...d, ...b].sort(
487
487
  ce
488
- ), b(h, {
489
- nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
488
+ ), w(h, {
489
+ nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
490
490
  loading: !1,
491
491
  loaded: !0
492
492
  });
493
- } catch (g) {
494
- console.error("[store] openConversation failed", g), b(h, {
493
+ } catch (_) {
494
+ console.error("[store] openConversation failed", _), w(h, {
495
495
  nextCursor: null,
496
496
  loading: !1,
497
497
  loaded: !1
@@ -503,53 +503,53 @@ function Qe(e) {
503
503
  var f;
504
504
  const m = t.paginationByConv[h];
505
505
  if (!m || m.loading || !m.nextCursor) return;
506
- const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
506
+ const d = (f = (t.messagesByConv[h] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
507
507
  if (d) {
508
- b(h, { ...m, loading: !0 });
508
+ w(h, { ...m, loading: !0 });
509
509
  try {
510
- const _ = await e.listMessages(h, {
510
+ const g = await e.listMessages(h, {
511
511
  before: d,
512
512
  limit: l
513
- }), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], 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
- const L = w.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[h] = [...L, ...C], b(h, {
518
- nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
516
+ const I = 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[h] = [...I, ...C], w(h, {
518
+ nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
519
519
  loading: !1,
520
520
  loaded: !0
521
521
  });
522
- } catch (_) {
523
- console.error("[store] loadMore failed", _), b(h, { ...m, loading: !1 });
522
+ } catch (g) {
523
+ console.error("[store] loadMore failed", g), w(h, { ...m, loading: !1 });
524
524
  }
525
525
  }
526
526
  }
527
- function b(h, m) {
527
+ function w(h, m) {
528
528
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
529
529
  }
530
530
  async function T(h, m) {
531
- const g = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
532
- d !== -1 && (t.conversations[d] = g);
531
+ const _ = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
532
+ d !== -1 && (t.conversations[d] = _);
533
533
  }
534
- async function E(h) {
534
+ async function B(h) {
535
535
  if (!h) return [];
536
536
  const m = t.messagesByConv[h] || [];
537
- let g = "";
537
+ let _ = "";
538
538
  for (const d of m)
539
- d != null && d.created_at && d.created_at > g && (g = d.created_at);
539
+ d != null && d.created_at && d.created_at > _ && (_ = d.created_at);
540
540
  try {
541
541
  const d = await e.listMessages(
542
542
  h,
543
- g ? { since: g } : {}
543
+ _ ? { since: _ } : {}
544
544
  ), f = (d == null ? void 0 : d.messages) || [];
545
545
  if (!f.length) return [];
546
- const _ = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set();
546
+ const g = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
547
547
  for (const M of m)
548
- (M == null ? void 0 : M.id) != null && _.add(String(M.id)), M != null && M.client_msg_id && w.add(M.client_msg_id);
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
- const L = (M == null ? void 0 : M.id) != null && _.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && w.has(M.client_msg_id);
552
- K(h, M), L || C.push(M);
551
+ const I = (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(h, M), I || C.push(M);
553
553
  }
554
554
  return C;
555
555
  } catch (d) {
@@ -559,140 +559,140 @@ function Qe(e) {
559
559
  async function A(h, m) {
560
560
  if (!(!h || m == null))
561
561
  try {
562
- const g = await e.markConversationRead(h, m), d = (g == null ? void 0 : g.last_read_message_id) ?? m, f = t.conversations.findIndex((_) => (_ == null ? void 0 : _.id) === h);
562
+ const _ = await e.markConversationRead(h, m), d = (_ == 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
565
  last_read_message_id: d
566
566
  });
567
- } catch (g) {
568
- console.error("[store] markConversationRead failed", g);
567
+ } catch (_) {
568
+ console.error("[store] markConversationRead failed", _);
569
569
  }
570
570
  }
571
- async function H(h, m, { attachments: g, metadata: d } = {}) {
572
- var L;
573
- const f = (m || "").trim(), _ = Array.isArray(g) && g.length > 0;
574
- if (!h || !f && !_) return;
575
- const w = Je(), C = de(h), M = {
576
- id: w,
577
- client_msg_id: w,
571
+ async function H(h, m, { attachments: _, metadata: d } = {}) {
572
+ var I;
573
+ const f = (m || "").trim(), g = Array.isArray(_) && _.length > 0;
574
+ if (!h || !f && !g) return;
575
+ const b = Je(), C = de(h), M = {
576
+ id: b,
577
+ client_msg_id: b,
578
578
  conversation_id: h,
579
579
  type: "content",
580
580
  text_md: f,
581
581
  author: {
582
582
  type: "user",
583
- id: ((L = t.customer) == null ? void 0 : L.external_id) || null
583
+ id: ((I = t.customer) == null ? void 0 : I.external_id) || null
584
584
  },
585
585
  created_at: C,
586
586
  // Local-only flag — UI may render dimmed until the SSE echo lands.
587
587
  _pending: !0,
588
- ..._ ? { payload: { type: "content", attachments: g } } : {},
588
+ ...g ? { payload: { type: "content", attachments: _ } } : {},
589
589
  ...d && typeof d == "object" ? { metadata: d } : {}
590
590
  };
591
- K(h, M);
591
+ V(h, M);
592
592
  try {
593
593
  await e.postMessage(h, {
594
- client_msg_id: w,
594
+ client_msg_id: b,
595
595
  text_md: f,
596
596
  created_at: C,
597
- ..._ ? { attachments: g } : {},
597
+ ...g ? { attachments: _ } : {},
598
598
  ...d && typeof d == "object" ? { metadata: d } : {}
599
599
  });
600
600
  } catch (x) {
601
- console.error("[store] send failed", x), J(h, w, {
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(h, m, g) {
607
+ async function S(h, m, _) {
608
608
  h != null && (t.awaitingCallback[h] = !0);
609
609
  try {
610
- await e.postCallback(h, m, g);
610
+ await e.postCallback(h, m, _);
611
611
  } catch (d) {
612
612
  console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
613
613
  }
614
614
  }
615
- const P = /* @__PURE__ */ new Map();
616
- async function I(h) {
615
+ const F = /* @__PURE__ */ new Map();
616
+ async function L(h) {
617
617
  if (!h) return null;
618
- const m = P.get(h);
618
+ const m = F.get(h);
619
619
  if (m != null && m.url) {
620
- const g = m.expires_at ? Date.parse(m.expires_at) : 0;
621
- if (!g || g - Date.now() > 6e4) return 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 g = await e.signAttachment(h);
625
- if (g != null && g.signed_url)
626
- return P.set(h, {
627
- url: g.signed_url,
628
- expires_at: g.expires_at
629
- }), g.signed_url;
630
- } catch (g) {
631
- console.error("[store] sign attachment failed", g);
624
+ const _ = await e.signAttachment(h);
625
+ if (_ != null && _.signed_url)
626
+ return F.set(h, {
627
+ url: _.signed_url,
628
+ expires_at: _.expires_at
629
+ }), _.signed_url;
630
+ } catch (_) {
631
+ console.error("[store] sign attachment failed", _);
632
632
  }
633
633
  return null;
634
634
  }
635
- async function U(h, { rating: m, comment: g } = {}) {
636
- const d = t.conversations.find((w) => w.id === h), _ = {
635
+ async function z(h, { rating: m, comment: _ } = {}) {
636
+ const d = t.conversations.find((b) => b.id === h), g = {
637
637
  ...(d == null ? void 0 : d.metadata) || {},
638
638
  feedback: {
639
639
  rating: m,
640
- comment: g || null,
640
+ comment: _ || null,
641
641
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
642
642
  }
643
643
  };
644
- await T(h, { metadata: _ });
644
+ await T(h, { metadata: g });
645
645
  }
646
646
  function Y(h) {
647
- var g, d;
647
+ var _, d;
648
648
  const m = t.messagesByConv[h] || [];
649
649
  for (let f = m.length - 1; f >= 0; f--) {
650
- const _ = m[f];
651
- if ((_ == null ? void 0 : _.type) === "action" && ((g = _ == null ? void 0 : _.payload) == null ? void 0 : g.type) === "action" && ((d = _ == null ? void 0 : _.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(_ == null ? void 0 : _.callbacks) && _.callbacks.length > 0 && !t.awaitingCallback[_.id])
652
- return _;
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" && ((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])
652
+ return g;
653
653
  }
654
654
  return null;
655
655
  }
656
656
  function Z(h) {
657
- var g, d, f;
657
+ var _, d, f;
658
658
  const m = t.messagesByConv[h] || [];
659
- for (let _ = m.length - 1; _ >= 0; _--) {
660
- const w = m[_];
661
- if (((g = w == null ? void 0 : w.author) == null ? void 0 : g.type) === "user" || (w == null ? void 0 : w.type) === "action" && ((d = w == null ? void 0 : w.payload) == null ? void 0 : d.state) === "pending")
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" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
662
662
  return null;
663
- const C = (f = w == null ? void 0 : w.metadata) == null ? void 0 : f.form;
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)
665
- return { message: w, form: C };
665
+ return { message: b, form: C };
666
666
  }
667
667
  return null;
668
668
  }
669
669
  function ee(h) {
670
670
  const m = t.runningActionsByConv[h];
671
671
  if (!m) return null;
672
- const g = Object.keys(m);
673
- if (g.length === 0) return null;
674
- const d = g[0];
672
+ const _ = Object.keys(m);
673
+ if (_.length === 0) return null;
674
+ const d = _[0];
675
675
  return { id: d, payload: { name: m[d] } };
676
676
  }
677
677
  function te(h) {
678
- var g, d, f, _;
678
+ var _, d, f, g;
679
679
  const m = t.messagesByConv[h] || [];
680
- for (let w = m.length - 1; w >= 0; w--) {
681
- const C = m[w];
682
- if (((g = C == null ? void 0 : C.author) == null ? void 0 : g.type) === "user") return [];
680
+ for (let b = m.length - 1; b >= 0; b--) {
681
+ const C = m[b];
682
+ if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user") return [];
683
683
  if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
684
684
  return [];
685
685
  if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
686
- const M = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
687
- return Array.isArray(M) && M.length ? M.map((L) => {
688
- if (typeof L == "string") {
689
- const x = L.trim();
686
+ const M = (g = C == null ? void 0 : C.metadata) == null ? void 0 : g.suggested_replies;
687
+ return Array.isArray(M) && M.length ? M.map((I) => {
688
+ if (typeof I == "string") {
689
+ const x = I.trim();
690
690
  return x ? { label: x, kind: null } : null;
691
691
  }
692
- if (L && typeof L == "object" && typeof L.label == "string") {
693
- const x = L.label.trim();
692
+ if (I && typeof I == "object" && typeof I.label == "string") {
693
+ const x = I.label.trim();
694
694
  if (!x) return null;
695
- const Fe = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
695
+ const Fe = I.kind === "cta" || I.kind === "choice" || I.kind === "followup" ? I.kind : null;
696
696
  return { label: x, kind: Fe };
697
697
  }
698
698
  return null;
@@ -700,40 +700,40 @@ function Qe(e) {
700
700
  }
701
701
  return [];
702
702
  }
703
- function K(h, m) {
704
- var _;
705
- const g = t.messagesByConv[h] || [];
703
+ function V(h, m) {
704
+ var g;
705
+ const _ = t.messagesByConv[h] || [];
706
706
  let d = -1;
707
- m != null && m.client_msg_id && (d = g.findIndex(
708
- (w) => (w == null ? void 0 : w.client_msg_id) && w.client_msg_id === m.client_msg_id
709
- )), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((w) => ne(w == null ? void 0 : w.id, m.id)));
707
+ m != null && m.client_msg_id && (d = _.findIndex(
708
+ (b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === m.client_msg_id
709
+ )), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = _.findIndex((b) => ne(b == null ? void 0 : b.id, m.id)));
710
710
  let f;
711
- d === -1 ? f = [...g, m].sort(ce) : (f = g.slice(), f[d] = {
712
- ...g[d],
711
+ d === -1 ? f = [..._, m].sort(ce) : (f = _.slice(), f[d] = {
712
+ ..._[d],
713
713
  ...m,
714
714
  _pending: !1,
715
715
  _failed: !1
716
- }), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((_ = m == null ? void 0 : m.payload) != null && _.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.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
718
  function ne(h, m) {
719
719
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
720
720
  }
721
- function J(h, m, g) {
721
+ function J(h, m, _) {
722
722
  const d = t.messagesByConv[h];
723
723
  if (!d) return;
724
- const f = d.findIndex((w) => w.id === m);
724
+ const f = d.findIndex((b) => b.id === m);
725
725
  if (f === -1) return;
726
- const _ = d.slice();
727
- _[f] = { ...d[f], ...g }, t.messagesByConv[h] = _;
726
+ const g = d.slice();
727
+ g[f] = { ...d[f], ..._ }, t.messagesByConv[h] = g;
728
728
  }
729
729
  function se(h, m) {
730
- const g = t.conversations.findIndex((f) => f.id === h);
731
- if (g === -1) return;
732
- const d = t.conversations[g];
730
+ const _ = t.conversations.findIndex((f) => f.id === h);
731
+ if (_ === -1) return;
732
+ const d = t.conversations[_];
733
733
  if (m && (!d.last_message_at || m > d.last_message_at)) {
734
734
  const f = t.conversations.slice();
735
- f[g] = { ...d, last_message_at: m }, f.sort(
736
- (_, w) => (w.last_message_at || "").localeCompare(_.last_message_at || "")
735
+ f[_] = { ...d, last_message_at: m }, f.sort(
736
+ (g, b) => (b.last_message_at || "").localeCompare(g.last_message_at || "")
737
737
  ), t.conversations = f;
738
738
  }
739
739
  }
@@ -742,34 +742,34 @@ function Qe(e) {
742
742
  }
743
743
  function me(h) {
744
744
  if (!h || typeof h != "object") return null;
745
- const m = {}, g = {};
745
+ const m = {}, _ = {};
746
746
  for (const [d, f] of Object.entries(h))
747
- f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(g, f) : g[d] = f);
748
- return Object.keys(g).length && (m.values = g), Object.keys(m).length ? m : null;
747
+ f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
748
+ return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
749
749
  }
750
750
  function de(h) {
751
751
  const m = t.messagesByConv[h] || [];
752
- let g = "";
753
- for (const _ of m)
754
- _ != null && _.created_at && _.created_at > g && (g = _.created_at);
752
+ let _ = "";
753
+ for (const g of m)
754
+ g != null && g.created_at && g.created_at > _ && (_ = g.created_at);
755
755
  const d = (/* @__PURE__ */ new Date()).toISOString();
756
- return !g || d > g ? d : new Date(Date.parse(g) + 1).toISOString();
756
+ return !_ || d > _ ? d : 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
- fetchSinceLast: E,
766
+ fetchSinceLast: B,
767
767
  patchConversation: T,
768
768
  markConversationRead: A,
769
769
  send: H,
770
770
  clickCallback: S,
771
- signAttachment: I,
772
- submitFeedback: U,
771
+ signAttachment: L,
772
+ submitFeedback: z,
773
773
  getPendingApproval: Y,
774
774
  getActionInFlight: ee,
775
775
  getLatestSuggestions: te,
@@ -778,7 +778,7 @@ function Qe(e) {
778
778
  setPanelOpen: e.setPanelOpen
779
779
  };
780
780
  }
781
- const z = {
781
+ const j = {
782
782
  w: "#ffffff",
783
783
  g50: "#F9F9F7",
784
784
  g100: "#F2F1EE",
@@ -794,7 +794,7 @@ const z = {
794
794
  green: "#22C55E",
795
795
  red: "#B91C1C",
796
796
  redBg: "#FDECEC"
797
- }, ge = [
797
+ }, _e = [
798
798
  "#5B5FEF",
799
799
  "#7C3AED",
800
800
  "#DB2777",
@@ -803,7 +803,7 @@ const z = {
803
803
  "#059669"
804
804
  ];
805
805
  function ye(e = "") {
806
- return e ? ge[e.charCodeAt(0) % ge.length] : ge[0];
806
+ return e ? _e[e.charCodeAt(0) % _e.length] : _e[0];
807
807
  }
808
808
  function we(e = "") {
809
809
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
@@ -817,21 +817,21 @@ const Xe = `
817
817
  .wm-root {
818
818
  --wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
819
819
  --wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
820
- --wm-w: ${z.w};
821
- --wm-g50: ${z.g50};
822
- --wm-g100: ${z.g100};
823
- --wm-g150: ${z.g150};
824
- --wm-g200: ${z.g200};
825
- --wm-g300: ${z.g300};
826
- --wm-g400: ${z.g400};
827
- --wm-g500: ${z.g500};
828
- --wm-g700: ${z.g700};
829
- --wm-g900: ${z.g900};
830
- --wm-a: ${z.accent};
831
- --wm-al: ${z.accentLight};
832
- --wm-green: ${z.green};
833
- --wm-red: ${z.red};
834
- --wm-redBg: ${z.redBg};
820
+ --wm-w: ${j.w};
821
+ --wm-g50: ${j.g50};
822
+ --wm-g100: ${j.g100};
823
+ --wm-g150: ${j.g150};
824
+ --wm-g200: ${j.g200};
825
+ --wm-g300: ${j.g300};
826
+ --wm-g400: ${j.g400};
827
+ --wm-g500: ${j.g500};
828
+ --wm-g700: ${j.g700};
829
+ --wm-g900: ${j.g900};
830
+ --wm-a: ${j.accent};
831
+ --wm-al: ${j.accentLight};
832
+ --wm-green: ${j.green};
833
+ --wm-red: ${j.red};
834
+ --wm-redBg: ${j.redBg};
835
835
  --wm-sh1: 0 1px 3px rgba(0,0,0,.06);
836
836
  --wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
837
837
  --wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
@@ -857,7 +857,7 @@ const Xe = `
857
857
  0% { transform: translateX(110%); opacity: 0; }
858
858
  100% { transform: translateX(0); opacity: 1; }
859
859
  }
860
- `, Ze = "https://api.messenger.victorc.fr", ae = "fr", et = ["fr", "en"], Ae = { fr: "fr-FR", en: "en-US" }, _e = {
860
+ `, Ze = "https://api.messenger.victorc.fr", ae = "fr", et = ["fr", "en"], Ae = { fr: "fr-FR", en: "en-US" }, ge = {
861
861
  fr: {
862
862
  // ── Common ───────────────────────────────────────────────────────
863
863
  "common.newConversation": "Nouvelle conversation",
@@ -905,6 +905,7 @@ Je réponds en quelques secondes.`,
905
905
  "onboarding.newMessage": "Nouveau message",
906
906
  "onboarding.statusInProgress": "En cours",
907
907
  "onboarding.resume": "Reprendre",
908
+ "onboarding.unreadConversations": "Conversations non lues",
908
909
  // ── Composer ─────────────────────────────────────────────────────
909
910
  "composer.placeholder": "Écrivez votre message…",
910
911
  "composer.replyTo": "Répondre à {name}…",
@@ -1028,6 +1029,7 @@ I reply within seconds.`,
1028
1029
  "onboarding.newMessage": "New message",
1029
1030
  "onboarding.statusInProgress": "In progress",
1030
1031
  "onboarding.resume": "Resume",
1032
+ "onboarding.unreadConversations": "Unread conversations",
1031
1033
  // ── Composer ─────────────────────────────────────────────────────
1032
1034
  "composer.placeholder": "Type your message…",
1033
1035
  "composer.replyTo": "Reply to {name}…",
@@ -1113,13 +1115,13 @@ function be(e) {
1113
1115
  function re(e) {
1114
1116
  return Ae[be(e)] || Ae[ae];
1115
1117
  }
1116
- function j(e) {
1117
- const t = be(e), n = _e[t] || _e[ae], i = _e[ae];
1118
- return function(s, a) {
1118
+ function D(e) {
1119
+ const t = be(e), n = ge[t] || ge[ae], i = ge[ae];
1120
+ return function(s, o) {
1119
1121
  let l = n[s];
1120
- 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(
1121
1123
  /\{(\w+)\}/g,
1122
- (p, k) => a[k] != null ? String(a[k]) : p
1124
+ (p, k) => o[k] != null ? String(o[k]) : p
1123
1125
  )), l);
1124
1126
  };
1125
1127
  }
@@ -1131,14 +1133,14 @@ function Se(e, t) {
1131
1133
  function Be(e, t, n) {
1132
1134
  return Array.isArray(t) ? t.map((i) => Se(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Se(e, String(t));
1133
1135
  }
1134
- function tt(e, t, n = j()) {
1136
+ function tt(e, t, n = D()) {
1135
1137
  if (!e || !t) return "";
1136
1138
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1137
1139
  for (const s of i) {
1138
1140
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1139
- const a = t[s.key];
1140
- if (a == null || a === "") continue;
1141
- const l = Be(s, a, n);
1141
+ const o = t[s.key];
1142
+ if (o == null || o === "") continue;
1143
+ const l = Be(s, o, n);
1142
1144
  l && r.push(`${s.label} :
1143
1145
  ${l}`);
1144
1146
  }
@@ -1146,13 +1148,13 @@ ${l}`);
1146
1148
 
1147
1149
  `);
1148
1150
  }
1149
- function nt(e, t, n = j()) {
1151
+ function nt(e, t, n = D()) {
1150
1152
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1151
1153
  for (const s of r) {
1152
1154
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1153
- const a = t == null ? void 0 : t[s.key];
1154
- if (a == null || a === "") continue;
1155
- const l = Be(s, a, n);
1155
+ const o = t == null ? void 0 : t[s.key];
1156
+ if (o == null || o === "") continue;
1157
+ const l = Be(s, o, n);
1156
1158
  if (!l) continue;
1157
1159
  const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1158
1160
  `));
@@ -1185,12 +1187,12 @@ function Me(e, t) {
1185
1187
  function st(e, t) {
1186
1188
  var n, i, r;
1187
1189
  for (let s = t.length - 1; s >= 0; s--) {
1188
- const a = t[s];
1189
- if (!a) continue;
1190
- 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() : "";
1191
1193
  if (l)
1192
- return (((n = a.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1193
- 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;
1194
1196
  if (Array.isArray(p) && p.length) return "📎 Pièce jointe";
1195
1197
  }
1196
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) || "";
@@ -1208,22 +1210,22 @@ function it(e, t, n, i) {
1208
1210
  ];
1209
1211
  for (const s of t) {
1210
1212
  if (!s) continue;
1211
- const a = (s.text_md || "").trim();
1212
- if (!a) continue;
1213
+ const o = (s.text_md || "").trim();
1214
+ if (!o) continue;
1213
1215
  const l = rt(s.author, n), p = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
1214
- r.push(`[${p}] ${l} :`), r.push(a), r.push("");
1216
+ r.push(`[${p}] ${l} :`), r.push(o), r.push("");
1215
1217
  }
1216
1218
  return r.join(`
1217
1219
  `);
1218
1220
  }
1219
- function at(e, t, n = j(), i) {
1221
+ function at(e, t, n = D(), i) {
1220
1222
  if (!e) return;
1221
1223
  const r = it(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1222
1224
  try {
1223
- const a = URL.createObjectURL(s), l = document.createElement("a");
1224
- 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);
1225
- } catch (a) {
1226
- 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);
1227
1229
  }
1228
1230
  }
1229
1231
  const ot = {
@@ -1360,7 +1362,7 @@ const ot = {
1360
1362
  },
1361
1363
  showBrowserNotification(e, t) {
1362
1364
  if (typeof Notification > "u" || Notification.permission !== "granted") return;
1363
- 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");
1364
1366
  try {
1365
1367
  const p = new Notification(s, {
1366
1368
  body: l,
@@ -1464,21 +1466,21 @@ const ot = {
1464
1466
  const t = e == null ? void 0 : e.conversations;
1465
1467
  if (!Array.isArray(t) || !this.store) return;
1466
1468
  const n = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
1467
- for (const a of t) {
1468
- if (!(a != null && a.id)) continue;
1469
- 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 || "";
1470
1472
  if (!l) continue;
1471
- const p = n.get(a.id) || "";
1472
- l > p && i.push(a.id);
1473
+ const p = n.get(o.id) || "";
1474
+ l > p && i.push(o.id);
1473
1475
  }
1474
1476
  this._liveRevealConvSnapshot = new Map(
1475
- 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) || ""])
1476
1478
  );
1477
- for (const a of i)
1479
+ for (const o of i)
1478
1480
  try {
1479
- 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));
1480
1482
  if (!Array.isArray(l)) continue;
1481
- for (const p of l) this.paceLiveMessage(p, a);
1483
+ for (const p of l) this.paceLiveMessage(p, o);
1482
1484
  } catch (l) {
1483
1485
  console.error(
1484
1486
  "[ww-messenger] activity delta fetch failed",
@@ -1495,13 +1497,13 @@ const ot = {
1495
1497
  const n = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, r = Math.min(
1496
1498
  ut,
1497
1499
  Math.max(dt, i * ct)
1498
- ), a = Math.max(
1500
+ ), o = Math.max(
1499
1501
  n + lt,
1500
1502
  this.nextRevealAt + ht
1501
1503
  ) + r;
1502
- this.nextRevealAt = a;
1503
- const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
1504
- this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1504
+ this.nextRevealAt = o;
1505
+ const l = Math.max(0, o - n), p = e.id, k = setTimeout(() => {
1506
+ this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1505
1507
  }, l);
1506
1508
  this.revealTimers.push(k);
1507
1509
  },
@@ -1520,8 +1522,8 @@ const ot = {
1520
1522
  i[s.id] = n;
1521
1523
  continue;
1522
1524
  }
1523
- const a = s != null && s.created_at ? Date.parse(s.created_at) : NaN;
1524
- 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) {
1525
1527
  i[s.id] = n;
1526
1528
  continue;
1527
1529
  }
@@ -1589,7 +1591,7 @@ const ot = {
1589
1591
  }, e);
1590
1592
  }
1591
1593
  }
1592
- }, gt = 300, _t = {
1594
+ }, _t = 300, gt = {
1593
1595
  data() {
1594
1596
  return {
1595
1597
  // Numeric message id snapshot frozen the moment the user
@@ -1618,9 +1620,9 @@ const ot = {
1618
1620
  // messages, or when the pointer is already at/ahead of the
1619
1621
  // candidate id.
1620
1622
  markConvRead(e) {
1621
- var s, a;
1623
+ var s, o;
1622
1624
  if (!(e != null && e.id) || e._draft || !this.store) return;
1623
- const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n = pt(t);
1625
+ const t = ((o = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : o[e.id]) || [], n = pt(t);
1624
1626
  if (n == null) return;
1625
1627
  const i = W(e.last_read_message_id), r = W(n);
1626
1628
  r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
@@ -1629,7 +1631,7 @@ const ot = {
1629
1631
  l.convId,
1630
1632
  l.messageId
1631
1633
  );
1632
- }, gt))));
1634
+ }, _t))));
1633
1635
  }
1634
1636
  }
1635
1637
  };
@@ -1693,7 +1695,7 @@ const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
1693
1695
  inject: {
1694
1696
  // Translator shared by the Messenger shell; French fallback when
1695
1697
  // the component is used standalone.
1696
- t: { default: () => j() }
1698
+ t: { default: () => D() }
1697
1699
  },
1698
1700
  props: {
1699
1701
  // Nombre de conversations non lues — pilote la pastille.
@@ -1715,7 +1717,7 @@ const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
1715
1717
  }
1716
1718
  }, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, It = { class: "wm-peek__text" }, Et = ["onClick"], Bt = ["aria-label"], Rt = ["aria-label"];
1717
1719
  function Nt(e, t, n, i, r, s) {
1718
- const a = R("HumanAvatar");
1720
+ const o = R("HumanAvatar");
1719
1721
  return c(), u("div", {
1720
1722
  class: "wm-launcherWrap",
1721
1723
  onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
@@ -1723,13 +1725,13 @@ function Nt(e, t, n, i, r, s) {
1723
1725
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1724
1726
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1725
1727
  }, [
1726
- $(Ie, { name: "wm-peek" }, {
1728
+ K(Ie, { name: "wm-peek" }, {
1727
1729
  default: Ee(() => [
1728
1730
  s.visiblePeeks.length ? (c(), u("div", {
1729
1731
  key: 0,
1730
1732
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1731
1733
  }, [
1732
- (c(!0), u(B, null, D(s.visiblePeeks, (l, p) => (c(), u("div", {
1734
+ (c(!0), u(E, null, U(s.visiblePeeks, (l, p) => (c(), u("div", {
1733
1735
  key: l.convId,
1734
1736
  class: "wm-peek",
1735
1737
  style: q({
@@ -1747,13 +1749,13 @@ function Nt(e, t, n, i, r, s) {
1747
1749
  ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1748
1750
  ]
1749
1751
  }, [
1750
- o("button", {
1752
+ a("button", {
1751
1753
  type: "button",
1752
1754
  class: "wm-peek__close",
1753
1755
  "aria-label": s.t("launcher.dismiss"),
1754
1756
  onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
1755
1757
  }, [...t[5] || (t[5] = [
1756
- o("svg", {
1758
+ a("svg", {
1757
1759
  width: "9",
1758
1760
  height: "9",
1759
1761
  viewBox: "0 0 24 24",
@@ -1764,11 +1766,11 @@ function Nt(e, t, n, i, r, s) {
1764
1766
  "stroke-linejoin": "round",
1765
1767
  "aria-hidden": "true"
1766
1768
  }, [
1767
- o("path", { d: "M18 6L6 18M6 6l12 12" })
1769
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
1768
1770
  ], -1)
1769
1771
  ])], 8, At),
1770
- o("div", St, [
1771
- $(a, {
1772
+ a("div", St, [
1773
+ K(o, {
1772
1774
  name: l.senderName,
1773
1775
  "avatar-url": l.senderAvatarUrl,
1774
1776
  size: 34
@@ -1779,14 +1781,14 @@ function Nt(e, t, n, i, r, s) {
1779
1781
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1780
1782
  }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : y("", !0)
1781
1783
  ]),
1782
- o("div", Tt, [
1783
- o("div", xt, [
1784
- o("span", Ot, v(l.senderName || s.t("common.agent")), 1),
1785
- o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1784
+ a("div", Tt, [
1785
+ a("div", xt, [
1786
+ a("span", Ot, v(l.senderName || s.t("common.agent")), 1),
1787
+ a("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1786
1788
  ]),
1787
- o("p", It, v(l.preview), 1)
1789
+ a("p", It, v(l.preview), 1)
1788
1790
  ]),
1789
- o("button", {
1791
+ a("button", {
1790
1792
  type: "button",
1791
1793
  class: "wm-peek__open",
1792
1794
  onClick: G((k) => e.$emit("open", l.convId), ["stop"])
@@ -1796,13 +1798,13 @@ function Nt(e, t, n, i, r, s) {
1796
1798
  ]),
1797
1799
  _: 1
1798
1800
  }),
1799
- o("button", {
1801
+ a("button", {
1800
1802
  type: "button",
1801
1803
  class: "wm-launcher",
1802
1804
  "aria-label": s.t("launcher.open"),
1803
1805
  onClick: t[0] || (t[0] = (l) => e.$emit("open"))
1804
1806
  }, [
1805
- t[6] || (t[6] = o("svg", {
1807
+ t[6] || (t[6] = a("svg", {
1806
1808
  width: "20",
1807
1809
  height: "20",
1808
1810
  viewBox: "0 0 24 24",
@@ -1813,7 +1815,7 @@ function Nt(e, t, n, i, r, s) {
1813
1815
  "stroke-linejoin": "round",
1814
1816
  "aria-hidden": "true"
1815
1817
  }, [
1816
- 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" })
1817
1819
  ], -1)),
1818
1820
  n.unreadCount > 0 ? (c(), u("span", {
1819
1821
  key: 0,
@@ -1870,7 +1872,7 @@ function Ht(e, t, n, i, r, s) {
1870
1872
  })
1871
1873
  }, [
1872
1874
  n.pulse ? (c(), u("div", Ut)) : y("", !0),
1873
- o("div", {
1875
+ a("div", {
1874
1876
  class: O(["wm-aiav__inner", {
1875
1877
  "wm-aiav__inner--glow": n.pulse,
1876
1878
  "wm-aiav__inner--img": !!n.imageUrl,
@@ -1895,19 +1897,19 @@ function Ht(e, t, n, i, r, s) {
1895
1897
  fill: "none",
1896
1898
  "aria-hidden": "true"
1897
1899
  }, [...t[0] || (t[0] = [
1898
- o("path", {
1900
+ a("path", {
1899
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",
1900
1902
  fill: "white",
1901
1903
  opacity: "0.92"
1902
1904
  }, null, -1),
1903
- o("circle", {
1905
+ a("circle", {
1904
1906
  cx: "19",
1905
1907
  cy: "5",
1906
1908
  r: "1.5",
1907
1909
  fill: "white",
1908
1910
  opacity: "0.55"
1909
1911
  }, null, -1),
1910
- o("circle", {
1912
+ a("circle", {
1911
1913
  cx: "5",
1912
1914
  cy: "18",
1913
1915
  r: "1",
@@ -1943,33 +1945,33 @@ const le = /* @__PURE__ */ N(Ft, [["render", Ht], ["__scopeId", "data-v-6f7f685d
1943
1945
  }, qt = {
1944
1946
  key: 0,
1945
1947
  class: "wm-team"
1946
- }, $t = ["src", "alt"], Kt = { key: 1 }, Vt = {
1948
+ }, Kt = ["src", "alt"], Vt = { key: 1 }, $t = {
1947
1949
  key: 0,
1948
1950
  class: "wm-team__label"
1949
1951
  };
1950
1952
  function Wt(e, t, n, i, r, s) {
1951
1953
  return s.visible ? (c(), u("div", qt, [
1952
- o("div", {
1954
+ a("div", {
1953
1955
  class: "wm-team__stack",
1954
1956
  style: q({ width: s.stackWidth + "px" })
1955
1957
  }, [
1956
- (c(!0), u(B, null, D(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1958
+ (c(!0), u(E, null, U(n.members.slice(0, 3), (o, l) => (c(), u("div", {
1957
1959
  key: l,
1958
1960
  class: "wm-team__pill",
1959
1961
  style: q({
1960
1962
  left: l * 13 + "px",
1961
1963
  zIndex: 3 - l,
1962
- background: s.colorFor(a)
1964
+ background: s.colorFor(o)
1963
1965
  })
1964
1966
  }, [
1965
- a.avatar_url ? (c(), u("img", {
1967
+ o.avatar_url ? (c(), u("img", {
1966
1968
  key: 0,
1967
- src: a.avatar_url,
1968
- alt: a.name || ""
1969
- }, null, 8, $t)) : (c(), u("span", Kt, v(s.initialsFor(a)), 1))
1969
+ src: o.avatar_url,
1970
+ alt: o.name || ""
1971
+ }, null, 8, Kt)) : (c(), u("span", Vt, v(s.initialsFor(o)), 1))
1970
1972
  ], 4))), 128))
1971
1973
  ], 4),
1972
- n.responseLabel ? (c(), u("span", Vt, v(n.responseLabel), 1)) : y("", !0)
1974
+ n.responseLabel ? (c(), u("span", $t, v(n.responseLabel), 1)) : y("", !0)
1973
1975
  ])) : y("", !0);
1974
1976
  }
1975
1977
  const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
@@ -1978,7 +1980,7 @@ const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
1978
1980
  inject: {
1979
1981
  // Translator shared by the Messenger shell. Falls back to a French
1980
1982
  // translator when the component is used standalone (no provider).
1981
- t: { default: () => j() }
1983
+ t: { default: () => D() }
1982
1984
  },
1983
1985
  props: {
1984
1986
  title: { type: String, default: "Nouvelle conversation" },
@@ -2019,7 +2021,7 @@ const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
2019
2021
  class: "wm-header__fill"
2020
2022
  }, sn = { class: "wm-header__actions" }, rn = ["aria-label", "title"], an = ["aria-label", "title"];
2021
2023
  function on(e, t, n, i, r, s) {
2022
- const a = R("AIAvatar"), l = R("TeamAvatars");
2024
+ const o = R("AIAvatar"), l = R("TeamAvatars");
2023
2025
  return c(), u("div", Jt, [
2024
2026
  n.showBack ? (c(), u("button", {
2025
2027
  key: 0,
@@ -2028,7 +2030,7 @@ function on(e, t, n, i, r, s) {
2028
2030
  "aria-label": s.t("header.backToHome"),
2029
2031
  onClick: t[0] || (t[0] = (p) => e.$emit("back"))
2030
2032
  }, [...t[3] || (t[3] = [
2031
- o("svg", {
2033
+ a("svg", {
2032
2034
  width: "13",
2033
2035
  height: "13",
2034
2036
  viewBox: "0 0 24 24",
@@ -2039,27 +2041,27 @@ function on(e, t, n, i, r, s) {
2039
2041
  "stroke-linejoin": "round",
2040
2042
  "aria-hidden": "true"
2041
2043
  }, [
2042
- o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2044
+ a("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2043
2045
  ], -1)
2044
2046
  ])], 8, Qt)) : (c(), u("div", Xt)),
2045
- n.showIdentity ? (c(), u(B, { key: 2 }, [
2046
- o("div", Zt, [
2047
- $(a, {
2047
+ n.showIdentity ? (c(), u(E, { key: 2 }, [
2048
+ a("div", Zt, [
2049
+ K(o, {
2048
2050
  size: 30,
2049
2051
  name: n.agentName,
2050
2052
  "image-url": n.agentAvatarUrl
2051
2053
  }, null, 8, ["name", "image-url"])
2052
2054
  ]),
2053
- o("div", en, [
2054
- o("div", tn, v(n.title), 1)
2055
+ a("div", en, [
2056
+ a("div", tn, v(n.title), 1)
2055
2057
  ]),
2056
- s.hasTeam ? (c(), F(l, {
2058
+ s.hasTeam ? (c(), P(l, {
2057
2059
  key: 0,
2058
2060
  members: s.displayedTeamMembers,
2059
2061
  "response-label": ""
2060
2062
  }, null, 8, ["members"])) : y("", !0)
2061
2063
  ], 64)) : (c(), u("div", nn)),
2062
- o("div", sn, [
2064
+ a("div", sn, [
2063
2065
  n.showMore ? (c(), u("button", {
2064
2066
  key: 0,
2065
2067
  type: "button",
@@ -2068,24 +2070,24 @@ function on(e, t, n, i, r, s) {
2068
2070
  title: s.t("header.moreOptions"),
2069
2071
  onClick: t[1] || (t[1] = (p) => e.$emit("more"))
2070
2072
  }, [...t[4] || (t[4] = [
2071
- o("svg", {
2073
+ a("svg", {
2072
2074
  width: "13",
2073
2075
  height: "13",
2074
2076
  viewBox: "0 0 24 24",
2075
2077
  fill: "currentColor",
2076
2078
  "aria-hidden": "true"
2077
2079
  }, [
2078
- o("circle", {
2080
+ a("circle", {
2079
2081
  cx: "12",
2080
2082
  cy: "5",
2081
2083
  r: "1.6"
2082
2084
  }),
2083
- o("circle", {
2085
+ a("circle", {
2084
2086
  cx: "12",
2085
2087
  cy: "12",
2086
2088
  r: "1.6"
2087
2089
  }),
2088
- o("circle", {
2090
+ a("circle", {
2089
2091
  cx: "12",
2090
2092
  cy: "19",
2091
2093
  r: "1.6"
@@ -2100,7 +2102,7 @@ function on(e, t, n, i, r, s) {
2100
2102
  title: s.t("header.closeWidget"),
2101
2103
  onClick: t[2] || (t[2] = (p) => e.$emit("close"))
2102
2104
  }, [...t[5] || (t[5] = [
2103
- o("svg", {
2105
+ a("svg", {
2104
2106
  width: "13",
2105
2107
  height: "13",
2106
2108
  viewBox: "0 0 24 24",
@@ -2111,7 +2113,7 @@ function on(e, t, n, i, r, s) {
2111
2113
  "stroke-linejoin": "round",
2112
2114
  "aria-hidden": "true"
2113
2115
  }, [
2114
- o("path", { d: "M18 6L6 18M6 6l12 12" })
2116
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
2115
2117
  ], -1)
2116
2118
  ])], 8, an)) : y("", !0)
2117
2119
  ])
@@ -2164,25 +2166,25 @@ function un(e) {
2164
2166
  if (!T) break;
2165
2167
  k.push(T[1]), i++;
2166
2168
  }
2167
- const b = k.map((T) => `<li>${ie(T)}</li>`).join("");
2169
+ const w = k.map((T) => `<li>${ie(T)}</li>`).join("");
2168
2170
  n.push({
2169
2171
  type: "block",
2170
- html: `<ul class="wm-md-ul">${b}</ul>`
2172
+ html: `<ul class="wm-md-ul">${w}</ul>`
2171
2173
  });
2172
2174
  continue;
2173
2175
  }
2174
2176
  const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
2175
2177
  if (l) {
2176
- const k = parseInt(l[1], 10), b = [l[2]];
2178
+ const k = parseInt(l[1], 10), w = [l[2]];
2177
2179
  for (i++; i < t.length; ) {
2178
2180
  const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
2179
2181
  if (!A) break;
2180
- b.push(A[1]), i++;
2182
+ w.push(A[1]), i++;
2181
2183
  }
2182
- const T = b.map((A) => `<li>${ie(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
2184
+ const T = w.map((A) => `<li>${ie(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
2183
2185
  n.push({
2184
2186
  type: "block",
2185
- html: `<ol class="wm-md-ol"${E}>${T}</ol>`
2187
+ html: `<ol class="wm-md-ol"${B}>${T}</ol>`
2186
2188
  });
2187
2189
  continue;
2188
2190
  }
@@ -2199,10 +2201,10 @@ function un(e) {
2199
2201
  }
2200
2202
  let r = "";
2201
2203
  for (let s = 0; s < n.length; s++) {
2202
- const a = n[s];
2203
- r += a.html;
2204
+ const o = n[s];
2205
+ r += o.html;
2204
2206
  const l = n[s + 1];
2205
- l && a.type !== "block" && l.type !== "block" && (r += `
2207
+ l && o.type !== "block" && l.type !== "block" && (r += `
2206
2208
  `);
2207
2209
  }
2208
2210
  return r;
@@ -2219,7 +2221,7 @@ const xe = {
2219
2221
  inject: {
2220
2222
  // Translator + resolved-language getter shared by the Messenger
2221
2223
  // shell. Fall back to French wording when used standalone.
2222
- t: { default: () => j() },
2224
+ t: { default: () => D() },
2223
2225
  wmLocale: { default: () => () => "fr" }
2224
2226
  },
2225
2227
  props: {
@@ -2253,6 +2255,9 @@ const xe = {
2253
2255
  return e ? this.openThreads.filter(
2254
2256
  (t) => (t.title || "").toLowerCase().includes(e) || (t.preview || "").toLowerCase().includes(e)
2255
2257
  ) : this.openThreads;
2258
+ },
2259
+ unreadThreads() {
2260
+ return this.openThreads.filter((e) => e.unread);
2256
2261
  }
2257
2262
  },
2258
2263
  methods: {
@@ -2273,8 +2278,8 @@ const xe = {
2273
2278
  minute: "2-digit"
2274
2279
  });
2275
2280
  if (i.getTime() - t.getTime() < 7 * 864e5) {
2276
- const a = t.toLocaleDateString(n, { weekday: "short" });
2277
- return a.charAt(0).toUpperCase() + a.slice(1);
2281
+ const o = t.toLocaleDateString(n, { weekday: "short" });
2282
+ return o.charAt(0).toUpperCase() + o.slice(1);
2278
2283
  }
2279
2284
  return t.toLocaleDateString(n, {
2280
2285
  day: "2-digit",
@@ -2282,7 +2287,7 @@ const xe = {
2282
2287
  });
2283
2288
  }
2284
2289
  }
2285
- }, mn = { class: "wm-onb" }, fn = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, _n = { class: "wm-onb__title" }, pn = { class: "wm-onb__sub" }, vn = { class: "wm-onb__cta" }, yn = ["disabled"], wn = {
2290
+ }, mn = { class: "wm-onb" }, fn = { class: "wm-onb__hero" }, _n = { class: "wm-onb__hero-text" }, gn = { class: "wm-onb__title" }, pn = { class: "wm-onb__sub" }, vn = { class: "wm-onb__cta" }, yn = ["disabled"], wn = {
2286
2291
  key: 0,
2287
2292
  class: "wm-onb__section wm-onb__section--card"
2288
2293
  }, bn = { class: "wm-onb__section-title" }, kn = ["onClick"], Cn = { class: "wm-onb__card-icon" }, An = {
@@ -2301,21 +2306,27 @@ const xe = {
2301
2306
  }, On = {
2302
2307
  key: 1,
2303
2308
  class: "wm-onb__section wm-onb__section--card"
2304
- }, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, Rn = { class: "wm-onb__thread-body" }, Nn = { class: "wm-onb__thread-status" }, Pn = { class: "wm-onb__thread-statusLabel" }, Fn = {
2309
+ }, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__alertList" }, En = { class: "wm-onb__alert-body" }, Bn = { class: "wm-onb__alert-status" }, Rn = { class: "wm-onb__alert-statusLabel" }, Nn = {
2305
2310
  key: 0,
2306
- class: "wm-onb__thread-statusSep"
2307
- }, Un = {
2311
+ class: "wm-onb__alert-statusSep"
2312
+ }, Pn = {
2308
2313
  key: 1,
2314
+ class: "wm-onb__alert-time"
2315
+ }, Fn = { class: "wm-onb__alert-title" }, Un = ["innerHTML"], Dn = ["onClick"], jn = {
2316
+ key: 2,
2317
+ class: "wm-onb__section wm-onb__section--card"
2318
+ }, Hn = { class: "wm-onb__section-title" }, zn = { class: "wm-onb__search" }, qn = ["placeholder", "aria-label"], Kn = { class: "wm-onb__list" }, Vn = ["onClick"], $n = ["aria-label"], Wn = { class: "wm-onb__thread-body" }, Gn = { class: "wm-onb__thread-title" }, Yn = ["innerHTML"], Jn = { class: "wm-onb__thread-meta" }, Qn = {
2319
+ key: 0,
2309
2320
  class: "wm-onb__thread-time"
2310
- }, Dn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Hn = ["onClick"], zn = {
2321
+ }, Xn = {
2311
2322
  key: 0,
2312
2323
  class: "wm-onb__empty"
2313
2324
  };
2314
- function qn(e, t, n, i, r, s) {
2315
- const a = R("AIAvatar");
2325
+ function Zn(e, t, n, i, r, s) {
2326
+ const o = R("AIAvatar");
2316
2327
  return c(), u("div", mn, [
2317
- o("div", fn, [
2318
- t[2] || (t[2] = o("svg", {
2328
+ a("div", fn, [
2329
+ t[2] || (t[2] = a("svg", {
2319
2330
  class: "wm-onb__hero-deco",
2320
2331
  width: "180",
2321
2332
  height: "180",
@@ -2323,7 +2334,7 @@ function qn(e, t, n, i, r, s) {
2323
2334
  fill: "none",
2324
2335
  "aria-hidden": "true"
2325
2336
  }, [
2326
- o("circle", {
2337
+ a("circle", {
2327
2338
  cx: "170",
2328
2339
  cy: "10",
2329
2340
  r: "105",
@@ -2332,7 +2343,7 @@ function qn(e, t, n, i, r, s) {
2332
2343
  "stroke-dasharray": "1 5",
2333
2344
  opacity: "0.35"
2334
2345
  }),
2335
- o("circle", {
2346
+ a("circle", {
2336
2347
  cx: "170",
2337
2348
  cy: "10",
2338
2349
  r: "72",
@@ -2341,7 +2352,7 @@ function qn(e, t, n, i, r, s) {
2341
2352
  "stroke-dasharray": "1 5",
2342
2353
  opacity: "0.5"
2343
2354
  }),
2344
- o("circle", {
2355
+ a("circle", {
2345
2356
  cx: "152",
2346
2357
  cy: "34",
2347
2358
  r: "2.5",
@@ -2349,24 +2360,24 @@ function qn(e, t, n, i, r, s) {
2349
2360
  opacity: "0.65"
2350
2361
  })
2351
2362
  ], -1)),
2352
- $(a, {
2363
+ K(o, {
2353
2364
  size: 52,
2354
2365
  "image-url": n.defaultIconUrl
2355
2366
  }, null, 8, ["image-url"]),
2356
- o("div", gn, [
2357
- o("div", _n, v(s.heroTitle), 1),
2358
- o("div", pn, v(s.heroSub), 1)
2367
+ a("div", _n, [
2368
+ a("div", gn, v(s.heroTitle), 1),
2369
+ a("div", pn, v(s.heroSub), 1)
2359
2370
  ])
2360
2371
  ]),
2361
- o("div", vn, [
2362
- o("button", {
2372
+ a("div", vn, [
2373
+ a("button", {
2363
2374
  type: "button",
2364
2375
  class: "wm-onb__startBtn",
2365
2376
  disabled: n.busy,
2366
2377
  onClick: t[0] || (t[0] = (l) => e.$emit("start"))
2367
2378
  }, [
2368
- t[3] || (t[3] = o("span", { class: "wm-onb__startIcon" }, [
2369
- o("svg", {
2379
+ t[3] || (t[3] = a("span", { class: "wm-onb__startIcon" }, [
2380
+ a("svg", {
2370
2381
  width: "12",
2371
2382
  height: "12",
2372
2383
  viewBox: "0 0 24 24",
@@ -2377,42 +2388,84 @@ function qn(e, t, n, i, r, s) {
2377
2388
  "stroke-linejoin": "round",
2378
2389
  "aria-hidden": "true"
2379
2390
  }, [
2380
- o("path", { d: "M12 5v14M5 12h14" })
2391
+ a("path", { d: "M12 5v14M5 12h14" })
2381
2392
  ])
2382
2393
  ], -1)),
2383
- o("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2394
+ a("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2384
2395
  ], 8, yn)
2385
2396
  ]),
2386
2397
  n.quickLinks.length ? (c(), u("div", wn, [
2387
- o("div", bn, v(s.t("onboarding.quickAccess")), 1),
2388
- o("div", {
2398
+ a("div", bn, v(s.t("onboarding.quickAccess")), 1),
2399
+ a("div", {
2389
2400
  class: O(s.quickLinksLayout)
2390
2401
  }, [
2391
- (c(!0), u(B, null, D(n.quickLinks, (l, p) => (c(), u("button", {
2402
+ (c(!0), u(E, null, U(n.quickLinks, (l, p) => (c(), u("button", {
2392
2403
  key: p,
2393
2404
  type: "button",
2394
2405
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
2395
2406
  onClick: (k) => e.$emit("select", l)
2396
2407
  }, [
2397
- o("span", Cn, [
2408
+ a("span", Cn, [
2398
2409
  (c(), u("svg", An, [
2399
- o("path", {
2410
+ a("path", {
2400
2411
  d: s.iconPath(l.icon)
2401
2412
  }, null, 8, Sn)
2402
2413
  ]))
2403
2414
  ]),
2404
- o("span", Mn, [
2405
- o("span", Tn, v(l.label), 1),
2415
+ a("span", Mn, [
2416
+ a("span", Tn, v(l.label), 1),
2406
2417
  l.description ? (c(), u("span", xn, v(l.description), 1)) : y("", !0)
2407
2418
  ])
2408
2419
  ], 10, kn))), 128))
2409
2420
  ], 2)
2410
2421
  ])) : y("", !0),
2411
- n.openThreads.length ? (c(), u("div", On, [
2412
- o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
2413
- o("div", In, [
2414
- t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
2415
- o("svg", {
2422
+ s.unreadThreads.length ? (c(), u("div", On, [
2423
+ a("div", Ln, v(s.t("onboarding.unreadConversations")), 1),
2424
+ a("div", In, [
2425
+ (c(!0), u(E, null, U(s.unreadThreads, (l) => (c(), u("div", {
2426
+ key: l.id,
2427
+ class: "wm-onb__alert"
2428
+ }, [
2429
+ t[4] || (t[4] = a("span", { class: "wm-onb__alert-icon" }, [
2430
+ a("svg", {
2431
+ width: "18",
2432
+ height: "18",
2433
+ viewBox: "0 0 24 24",
2434
+ fill: "none",
2435
+ "aria-hidden": "true"
2436
+ }, [
2437
+ a("path", {
2438
+ d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
2439
+ fill: "currentColor",
2440
+ opacity: "0.92"
2441
+ })
2442
+ ])
2443
+ ], -1)),
2444
+ a("span", En, [
2445
+ a("span", Bn, [
2446
+ a("span", Rn, v(s.t("onboarding.statusInProgress")), 1),
2447
+ s.formatTs(l._ts) ? (c(), u("span", Nn, "·")) : y("", !0),
2448
+ s.formatTs(l._ts) ? (c(), u("span", Pn, v(s.formatTs(l._ts)), 1)) : y("", !0)
2449
+ ]),
2450
+ a("span", Fn, v(l.title), 1),
2451
+ a("span", {
2452
+ class: "wm-onb__alert-preview",
2453
+ innerHTML: s.renderPreview(l.preview)
2454
+ }, null, 8, Un)
2455
+ ]),
2456
+ a("button", {
2457
+ type: "button",
2458
+ class: "wm-onb__alert-resume",
2459
+ onClick: (p) => e.$emit("resume", l)
2460
+ }, v(s.t("onboarding.resume")), 9, Dn)
2461
+ ]))), 128))
2462
+ ])
2463
+ ])) : y("", !0),
2464
+ n.openThreads.length ? (c(), u("div", jn, [
2465
+ a("div", Hn, v(s.t("onboarding.recentConversations")), 1),
2466
+ a("div", zn, [
2467
+ t[5] || (t[5] = a("span", { class: "wm-onb__searchIcon" }, [
2468
+ a("svg", {
2416
2469
  width: "12",
2417
2470
  height: "12",
2418
2471
  viewBox: "0 0 24 24",
@@ -2423,66 +2476,82 @@ function qn(e, t, n, i, r, s) {
2423
2476
  "stroke-linejoin": "round",
2424
2477
  "aria-hidden": "true"
2425
2478
  }, [
2426
- o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2479
+ a("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2427
2480
  ])
2428
2481
  ], -1)),
2429
- V(o("input", {
2482
+ $(a("input", {
2430
2483
  "onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
2431
2484
  type: "text",
2432
2485
  placeholder: s.t("onboarding.search"),
2433
2486
  "aria-label": s.t("onboarding.search")
2434
- }, null, 8, En), [
2487
+ }, null, 8, qn), [
2435
2488
  [X, r.query]
2436
2489
  ])
2437
2490
  ]),
2438
- o("div", Bn, [
2439
- (c(!0), u(B, null, D(s.filteredThreads, (l) => (c(), u("div", {
2491
+ a("div", Kn, [
2492
+ (c(!0), u(E, null, U(s.filteredThreads, (l) => (c(), u("button", {
2440
2493
  key: l.id,
2441
- class: "wm-onb__thread"
2494
+ type: "button",
2495
+ class: "wm-onb__thread",
2496
+ onClick: (p) => e.$emit("resume", l)
2442
2497
  }, [
2443
- t[5] || (t[5] = o("span", { class: "wm-onb__thread-icon" }, [
2444
- o("svg", {
2498
+ a("span", {
2499
+ class: O(["wm-onb__thread-icon", { "wm-onb__thread-icon--inverted": !l.unread }])
2500
+ }, [
2501
+ t[6] || (t[6] = a("svg", {
2445
2502
  width: "18",
2446
2503
  height: "18",
2447
2504
  viewBox: "0 0 24 24",
2448
2505
  fill: "none",
2449
2506
  "aria-hidden": "true"
2450
2507
  }, [
2451
- o("path", {
2508
+ a("path", {
2452
2509
  d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
2453
2510
  fill: "currentColor",
2454
2511
  opacity: "0.92"
2455
2512
  })
2456
- ])
2457
- ], -1)),
2458
- o("span", Rn, [
2459
- o("span", Nn, [
2460
- o("span", Pn, v(s.t("onboarding.statusInProgress")), 1),
2461
- s.formatTs(l._ts) ? (c(), u("span", Fn, "·")) : y("", !0),
2462
- s.formatTs(l._ts) ? (c(), u("span", Un, v(s.formatTs(l._ts)), 1)) : y("", !0)
2463
- ]),
2464
- o("span", Dn, v(l.title), 1),
2465
- o("span", {
2513
+ ], -1)),
2514
+ l.unread ? (c(), u("span", {
2515
+ key: 0,
2516
+ class: "wm-onb__thread-dot",
2517
+ "aria-label": s.t("onboarding.unread")
2518
+ }, null, 8, $n)) : y("", !0)
2519
+ ], 2),
2520
+ a("span", Wn, [
2521
+ a("span", Gn, v(l.title), 1),
2522
+ a("span", {
2466
2523
  class: "wm-onb__thread-preview",
2467
2524
  innerHTML: s.renderPreview(l.preview)
2468
- }, null, 8, jn)
2525
+ }, null, 8, Yn)
2469
2526
  ]),
2470
- o("button", {
2471
- type: "button",
2472
- class: "wm-onb__thread-resume",
2473
- onClick: (p) => e.$emit("resume", l)
2474
- }, v(s.t("onboarding.resume")), 9, Hn)
2475
- ]))), 128)),
2476
- s.filteredThreads.length ? y("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2527
+ a("span", Jn, [
2528
+ s.formatTs(l._ts) ? (c(), u("span", Qn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2529
+ t[7] || (t[7] = a("svg", {
2530
+ width: "14",
2531
+ height: "14",
2532
+ viewBox: "0 0 24 24",
2533
+ fill: "none",
2534
+ stroke: "currentColor",
2535
+ "stroke-width": "1.8",
2536
+ "stroke-linecap": "round",
2537
+ "stroke-linejoin": "round",
2538
+ class: "wm-onb__thread-chev",
2539
+ "aria-hidden": "true"
2540
+ }, [
2541
+ a("path", { d: "M5 12h14M13 5l7 7-7 7" })
2542
+ ], -1))
2543
+ ])
2544
+ ], 8, Vn))), 128)),
2545
+ s.filteredThreads.length ? y("", !0) : (c(), u("div", Xn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2477
2546
  ])
2478
2547
  ])) : y("", !0)
2479
2548
  ]);
2480
2549
  }
2481
- const $n = /* @__PURE__ */ N(hn, [["render", qn], ["__scopeId", "data-v-a3b35a29"]]);
2482
- function Kn(e) {
2550
+ const es = /* @__PURE__ */ N(hn, [["render", Zn], ["__scopeId", "data-v-667f38cc"]]);
2551
+ function ts(e) {
2483
2552
  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();
2484
2553
  }
2485
- const Vn = {
2554
+ const ns = {
2486
2555
  name: "WmActionResult",
2487
2556
  props: {
2488
2557
  state: { type: String, default: "success" },
@@ -2492,13 +2561,13 @@ const Vn = {
2492
2561
  },
2493
2562
  computed: {
2494
2563
  detailText() {
2495
- return Kn(this.detail);
2564
+ return ts(this.detail);
2496
2565
  }
2497
2566
  }
2498
- }, Wn = {
2567
+ }, ss = {
2499
2568
  class: "wm-result__icon",
2500
2569
  "aria-hidden": "true"
2501
- }, Gn = {
2570
+ }, rs = {
2502
2571
  key: 0,
2503
2572
  width: "11",
2504
2573
  height: "11",
@@ -2508,7 +2577,7 @@ const Vn = {
2508
2577
  "stroke-width": "2.8",
2509
2578
  "stroke-linecap": "round",
2510
2579
  "stroke-linejoin": "round"
2511
- }, Yn = {
2580
+ }, is = {
2512
2581
  key: 1,
2513
2582
  width: "11",
2514
2583
  height: "11",
@@ -2518,7 +2587,7 @@ const Vn = {
2518
2587
  "stroke-width": "2.6",
2519
2588
  "stroke-linecap": "round",
2520
2589
  "stroke-linejoin": "round"
2521
- }, Jn = {
2590
+ }, as = {
2522
2591
  key: 2,
2523
2592
  width: "11",
2524
2593
  height: "11",
@@ -2528,7 +2597,7 @@ const Vn = {
2528
2597
  "stroke-width": "2.4",
2529
2598
  "stroke-linecap": "round",
2530
2599
  "stroke-linejoin": "round"
2531
- }, Qn = {
2600
+ }, os = {
2532
2601
  key: 3,
2533
2602
  width: "12",
2534
2603
  height: "12",
@@ -2538,32 +2607,32 @@ const Vn = {
2538
2607
  "stroke-width": "2.2",
2539
2608
  "stroke-linecap": "round",
2540
2609
  "stroke-linejoin": "round"
2541
- }, Xn = { class: "wm-result__body" }, Zn = { class: "wm-result__label" }, es = { class: "wm-result__detail" };
2542
- function ts(e, t, n, i, r, s) {
2610
+ }, ls = { class: "wm-result__body" }, cs = { class: "wm-result__label" }, ds = { class: "wm-result__detail" };
2611
+ function us(e, t, n, i, r, s) {
2543
2612
  return c(), u("div", {
2544
2613
  class: O(["wm-result", `wm-result--${n.state}`])
2545
2614
  }, [
2546
- o("span", Wn, [
2547
- n.state === "success" ? (c(), u("svg", Gn, [...t[0] || (t[0] = [
2548
- o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2549
- ])])) : n.state === "rejected" ? (c(), u("svg", Yn, [...t[1] || (t[1] = [
2550
- o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2551
- ])])) : n.state === "awaiting" ? (c(), u("svg", Jn, [...t[2] || (t[2] = [
2552
- o("circle", {
2615
+ a("span", ss, [
2616
+ n.state === "success" ? (c(), u("svg", rs, [...t[0] || (t[0] = [
2617
+ a("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2618
+ ])])) : n.state === "rejected" ? (c(), u("svg", is, [...t[1] || (t[1] = [
2619
+ a("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2620
+ ])])) : n.state === "awaiting" ? (c(), u("svg", as, [...t[2] || (t[2] = [
2621
+ a("circle", {
2553
2622
  cx: "12",
2554
2623
  cy: "12",
2555
2624
  r: "10"
2556
2625
  }, null, -1),
2557
- o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2558
- ])])) : (c(), u("svg", Qn, [...t[3] || (t[3] = [
2559
- 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),
2560
- o("line", {
2626
+ a("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2627
+ ])])) : (c(), u("svg", os, [...t[3] || (t[3] = [
2628
+ 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),
2629
+ a("line", {
2561
2630
  x1: "12",
2562
2631
  y1: "9",
2563
2632
  x2: "12",
2564
2633
  y2: "13"
2565
2634
  }, null, -1),
2566
- o("line", {
2635
+ a("line", {
2567
2636
  x1: "12",
2568
2637
  y1: "17",
2569
2638
  x2: "12.01",
@@ -2571,24 +2640,24 @@ function ts(e, t, n, i, r, s) {
2571
2640
  }, null, -1)
2572
2641
  ])]))
2573
2642
  ]),
2574
- o("span", Xn, [
2575
- o("span", Zn, v(n.label), 1),
2576
- s.detailText ? (c(), u(B, { key: 0 }, [
2577
- t[4] || (t[4] = o("span", {
2643
+ a("span", ls, [
2644
+ a("span", cs, v(n.label), 1),
2645
+ s.detailText ? (c(), u(E, { key: 0 }, [
2646
+ t[4] || (t[4] = a("span", {
2578
2647
  class: "wm-result__sep",
2579
2648
  "aria-hidden": "true"
2580
2649
  }, " · ", -1)),
2581
- o("span", es, v(s.detailText), 1)
2650
+ a("span", ds, v(s.detailText), 1)
2582
2651
  ], 64)) : y("", !0)
2583
2652
  ])
2584
2653
  ], 2);
2585
2654
  }
2586
- const ns = /* @__PURE__ */ N(Vn, [["render", ts], ["__scopeId", "data-v-7284acd0"]]), ss = {
2655
+ const hs = /* @__PURE__ */ N(ns, [["render", us], ["__scopeId", "data-v-7284acd0"]]), ms = {
2587
2656
  name: "WmArtifactFormResponse",
2588
2657
  inject: {
2589
2658
  // Translator shared by the Messenger shell; French fallback when
2590
2659
  // the component is used standalone.
2591
- t: { default: () => j() }
2660
+ t: { default: () => D() }
2592
2661
  },
2593
2662
  props: {
2594
2663
  data: { type: Object, required: !0 }
@@ -2599,13 +2668,13 @@ const ns = /* @__PURE__ */ N(Vn, [["render", ts], ["__scopeId", "data-v-7284acd0
2599
2668
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2600
2669
  }
2601
2670
  }
2602
- }, rs = { class: "wm-art wm-art--formResponse" }, is = { class: "wm-art__head" }, as = { class: "wm-art__title" }, os = { class: "wm-art__badge wm-art__badge--success" }, ls = { class: "wm-art__body" }, cs = { class: "wm-art__fieldLabel" };
2603
- function ds(e, t, n, i, r, s) {
2604
- return c(), u("div", rs, [
2605
- o("div", is, [
2606
- o("div", as, v(n.data.title || s.t("form.title")), 1),
2607
- o("span", os, [
2608
- t[0] || (t[0] = o("svg", {
2671
+ }, fs = { class: "wm-art wm-art--formResponse" }, _s = { class: "wm-art__head" }, gs = { class: "wm-art__title" }, ps = { class: "wm-art__badge wm-art__badge--success" }, vs = { class: "wm-art__body" }, ys = { class: "wm-art__fieldLabel" };
2672
+ function ws(e, t, n, i, r, s) {
2673
+ return c(), u("div", fs, [
2674
+ a("div", _s, [
2675
+ a("div", gs, v(n.data.title || s.t("form.title")), 1),
2676
+ a("span", ps, [
2677
+ t[0] || (t[0] = a("svg", {
2609
2678
  width: "11",
2610
2679
  height: "11",
2611
2680
  viewBox: "0 0 24 24",
@@ -2616,28 +2685,28 @@ function ds(e, t, n, i, r, s) {
2616
2685
  "stroke-linejoin": "round",
2617
2686
  "aria-hidden": "true"
2618
2687
  }, [
2619
- o("polyline", { points: "20 6 9 17 4 12" })
2688
+ a("polyline", { points: "20 6 9 17 4 12" })
2620
2689
  ], -1)),
2621
2690
  ve(" " + v(s.t("form.sent")), 1)
2622
2691
  ])
2623
2692
  ]),
2624
- o("div", ls, [
2625
- (c(!0), u(B, null, D(s.fields, (a, l) => (c(), u("div", {
2693
+ a("div", vs, [
2694
+ (c(!0), u(E, null, U(s.fields, (o, l) => (c(), u("div", {
2626
2695
  key: l,
2627
2696
  class: "wm-art__field"
2628
2697
  }, [
2629
- o("div", cs, v(a.label), 1),
2630
- o("div", {
2698
+ a("div", ys, v(o.label), 1),
2699
+ a("div", {
2631
2700
  class: O([
2632
2701
  "wm-art__fieldValue",
2633
- { "wm-art__fieldValue--multi": a.multiline }
2702
+ { "wm-art__fieldValue--multi": o.multiline }
2634
2703
  ])
2635
- }, v(a.value), 3)
2704
+ }, v(o.value), 3)
2636
2705
  ]))), 128))
2637
2706
  ])
2638
2707
  ]);
2639
2708
  }
2640
- const us = /* @__PURE__ */ N(ss, [["render", ds], ["__scopeId", "data-v-713aecf1"]]), hs = {
2709
+ const bs = /* @__PURE__ */ N(ms, [["render", ws], ["__scopeId", "data-v-713aecf1"]]), ks = {
2641
2710
  name: "WmArtifactInfoCard",
2642
2711
  props: {
2643
2712
  data: { type: Object, required: !0 }
@@ -2652,32 +2721,32 @@ const us = /* @__PURE__ */ N(ss, [["render", ds], ["__scopeId", "data-v-713aecf1
2652
2721
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2653
2722
  }
2654
2723
  }
2655
- }, ms = { class: "wm-art wm-art--infoCard" }, fs = {
2724
+ }, Cs = { class: "wm-art wm-art--infoCard" }, As = {
2656
2725
  key: 0,
2657
2726
  class: "wm-art__image"
2658
- }, gs = ["src", "alt"], _s = { class: "wm-art__head" }, ps = { class: "wm-art__headMain" }, vs = { class: "wm-art__title" }, ys = {
2727
+ }, Ss = ["src", "alt"], Ms = { class: "wm-art__head" }, Ts = { class: "wm-art__headMain" }, xs = { class: "wm-art__title" }, Os = {
2659
2728
  key: 0,
2660
2729
  class: "wm-art__subtitle"
2661
- }, ws = {
2730
+ }, Ls = {
2662
2731
  key: 1,
2663
2732
  class: "wm-art__body"
2664
- }, bs = {
2733
+ }, Is = {
2665
2734
  key: 0,
2666
2735
  class: "wm-art__text"
2667
- }, ks = { class: "wm-art__fieldLabel" };
2668
- function Cs(e, t, n, i, r, s) {
2669
- return c(), u("div", ms, [
2670
- n.data.image_url ? (c(), u("figure", fs, [
2671
- o("img", {
2736
+ }, Es = { class: "wm-art__fieldLabel" };
2737
+ function Bs(e, t, n, i, r, s) {
2738
+ return c(), u("div", Cs, [
2739
+ n.data.image_url ? (c(), u("figure", As, [
2740
+ a("img", {
2672
2741
  src: n.data.image_url,
2673
2742
  alt: n.data.title || "",
2674
2743
  loading: "lazy"
2675
- }, null, 8, gs)
2744
+ }, null, 8, Ss)
2676
2745
  ])) : y("", !0),
2677
- o("div", _s, [
2678
- o("div", ps, [
2679
- o("div", vs, v(n.data.title), 1),
2680
- n.data.subtitle ? (c(), u("div", ys, v(n.data.subtitle), 1)) : y("", !0)
2746
+ a("div", Ms, [
2747
+ a("div", Ts, [
2748
+ a("div", xs, v(n.data.title), 1),
2749
+ n.data.subtitle ? (c(), u("div", Os, v(n.data.subtitle), 1)) : y("", !0)
2681
2750
  ]),
2682
2751
  n.data.badge && n.data.badge.label ? (c(), u("span", {
2683
2752
  key: 0,
@@ -2687,25 +2756,25 @@ function Cs(e, t, n, i, r, s) {
2687
2756
  ])
2688
2757
  }, v(n.data.badge.label), 3)) : y("", !0)
2689
2758
  ]),
2690
- s.hasBody ? (c(), u("div", ws, [
2691
- n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : y("", !0),
2692
- s.fields.length ? (c(!0), u(B, { key: 1 }, D(s.fields, (a, l) => (c(), u("div", {
2759
+ s.hasBody ? (c(), u("div", Ls, [
2760
+ n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : y("", !0),
2761
+ s.fields.length ? (c(!0), u(E, { key: 1 }, U(s.fields, (o, l) => (c(), u("div", {
2693
2762
  key: l,
2694
2763
  class: "wm-art__field"
2695
2764
  }, [
2696
- o("div", ks, v(a.label), 1),
2697
- o("div", {
2765
+ a("div", Es, v(o.label), 1),
2766
+ a("div", {
2698
2767
  class: O([
2699
2768
  "wm-art__fieldValue",
2700
- { "wm-art__fieldValue--multi": a.multiline }
2769
+ { "wm-art__fieldValue--multi": o.multiline }
2701
2770
  ])
2702
- }, v(a.value), 3)
2771
+ }, v(o.value), 3)
2703
2772
  ]))), 128)) : y("", !0)
2704
2773
  ])) : y("", !0)
2705
2774
  ]);
2706
2775
  }
2707
- const As = /* @__PURE__ */ N(hs, [["render", Cs], ["__scopeId", "data-v-7eae0e4a"]]);
2708
- function Ss(e, t, n) {
2776
+ const Rs = /* @__PURE__ */ N(ks, [["render", Bs], ["__scopeId", "data-v-7eae0e4a"]]);
2777
+ function Ns(e, t, n) {
2709
2778
  if (!e) return "";
2710
2779
  const i = new Date(e);
2711
2780
  if (Number.isNaN(i.getTime())) return e;
@@ -2719,12 +2788,12 @@ function Ss(e, t, n) {
2719
2788
  });
2720
2789
  return `${r}${n}${s}`;
2721
2790
  }
2722
- const Ms = {
2791
+ const Ps = {
2723
2792
  name: "WmArtifactTicket",
2724
2793
  inject: {
2725
2794
  // Translator + resolved-language getter shared by the Messenger
2726
2795
  // shell. Fall back to French wording when used standalone.
2727
- t: { default: () => j() },
2796
+ t: { default: () => D() },
2728
2797
  wmLocale: { default: () => () => "fr" }
2729
2798
  },
2730
2799
  props: {
@@ -2737,7 +2806,7 @@ const Ms = {
2737
2806
  },
2738
2807
  formattedDate() {
2739
2808
  var e;
2740
- return Ss(
2809
+ return Ns(
2741
2810
  (e = this.data) == null ? void 0 : e.created_at,
2742
2811
  re(this.wmLocale()),
2743
2812
  this.t("ticket.dateAt")
@@ -2765,13 +2834,13 @@ const Ms = {
2765
2834
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2766
2835
  }
2767
2836
  }
2768
- }, Ts = { class: "wm-art wm-art--ticket" }, xs = { class: "wm-art__head wm-tk__head" }, Os = { class: "wm-art__title wm-tk__title" }, Ls = { class: "wm-tk__sub" }, Is = { class: "wm-tk__ref" }, Es = {
2837
+ }, Fs = { class: "wm-art wm-art--ticket" }, Us = { class: "wm-art__head wm-tk__head" }, Ds = { class: "wm-art__title wm-tk__title" }, js = { class: "wm-tk__sub" }, Hs = { class: "wm-tk__ref" }, zs = {
2769
2838
  key: 0,
2770
2839
  class: "wm-tk__text"
2771
- }, Bs = {
2840
+ }, qs = {
2772
2841
  key: 0,
2773
2842
  class: "wm-art__body"
2774
- }, Rs = { class: "wm-art__fieldLabel" }, Ns = ["data-level"], Ps = {
2843
+ }, Ks = { class: "wm-art__fieldLabel" }, Vs = ["data-level"], $s = {
2775
2844
  key: 1,
2776
2845
  class: "wm-tk__date",
2777
2846
  width: "12",
@@ -2783,17 +2852,17 @@ const Ms = {
2783
2852
  "stroke-linecap": "round",
2784
2853
  "stroke-linejoin": "round",
2785
2854
  "aria-hidden": "true"
2786
- }, Fs = {
2855
+ }, Ws = {
2787
2856
  key: 1,
2788
2857
  class: "wm-art__footer wm-tk__footer"
2789
2858
  };
2790
- function Us(e, t, n, i, r, s) {
2791
- return c(), u("div", Ts, [
2792
- o("div", xs, [
2793
- o("div", Os, v(n.data.title), 1),
2794
- o("div", Ls, [
2795
- o("div", Is, [
2796
- t[0] || (t[0] = o("svg", {
2859
+ function Gs(e, t, n, i, r, s) {
2860
+ return c(), u("div", Fs, [
2861
+ a("div", Us, [
2862
+ a("div", Ds, v(n.data.title), 1),
2863
+ a("div", js, [
2864
+ a("div", Hs, [
2865
+ t[0] || (t[0] = a("svg", {
2797
2866
  width: "11",
2798
2867
  height: "11",
2799
2868
  viewBox: "0 0 24 24",
@@ -2804,85 +2873,85 @@ function Us(e, t, n, i, r, s) {
2804
2873
  "stroke-linejoin": "round",
2805
2874
  "aria-hidden": "true"
2806
2875
  }, [
2807
- 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" }),
2808
- o("path", { d: "M13 5v2M13 17v2M13 11v2" })
2876
+ 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" }),
2877
+ a("path", { d: "M13 5v2M13 17v2M13 11v2" })
2809
2878
  ], -1)),
2810
- o("span", null, v(n.data.reference), 1)
2879
+ a("span", null, v(n.data.reference), 1)
2811
2880
  ]),
2812
- o("span", {
2881
+ a("span", {
2813
2882
  class: O([
2814
2883
  "wm-art__badge",
2815
2884
  "wm-tk__badge",
2816
2885
  `wm-art__badge--${n.data.status.tone || "neutral"}`
2817
2886
  ])
2818
2887
  }, [
2819
- t[1] || (t[1] = o("span", {
2888
+ t[1] || (t[1] = a("span", {
2820
2889
  class: "wm-tk__dot",
2821
2890
  "aria-hidden": "true"
2822
2891
  }, null, -1)),
2823
2892
  ve(" " + v(n.data.status.label), 1)
2824
2893
  ], 2)
2825
2894
  ]),
2826
- n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0)
2895
+ n.data.body ? (c(), u("div", zs, v(n.data.body), 1)) : y("", !0)
2827
2896
  ]),
2828
- s.fields.length ? (c(), u("div", Bs, [
2829
- (c(!0), u(B, null, D(s.fields, (a, l) => (c(), u("div", {
2897
+ s.fields.length ? (c(), u("div", qs, [
2898
+ (c(!0), u(E, null, U(s.fields, (o, l) => (c(), u("div", {
2830
2899
  key: l,
2831
2900
  class: "wm-art__field"
2832
2901
  }, [
2833
- o("div", Rs, v(a.label), 1),
2834
- o("div", {
2902
+ a("div", Ks, v(o.label), 1),
2903
+ a("div", {
2835
2904
  class: O([
2836
2905
  "wm-art__fieldValue",
2837
- { "wm-art__fieldValue--multi": a.multiline }
2906
+ { "wm-art__fieldValue--multi": o.multiline }
2838
2907
  ])
2839
2908
  }, [
2840
- s.isPriority(a.label) ? (c(), u("svg", {
2909
+ s.isPriority(o.label) ? (c(), u("svg", {
2841
2910
  key: 0,
2842
2911
  class: "wm-tk__prio",
2843
- "data-level": s.priorityLevel(a.value),
2912
+ "data-level": s.priorityLevel(o.value),
2844
2913
  width: "12",
2845
2914
  height: "12",
2846
2915
  viewBox: "0 0 12 12",
2847
2916
  "aria-hidden": "true"
2848
2917
  }, [...t[2] || (t[2] = [
2849
- o("rect", {
2918
+ a("rect", {
2850
2919
  x: "1",
2851
2920
  y: "8",
2852
2921
  width: "2",
2853
2922
  height: "3",
2854
2923
  rx: "0.5"
2855
2924
  }, null, -1),
2856
- o("rect", {
2925
+ a("rect", {
2857
2926
  x: "5",
2858
2927
  y: "5",
2859
2928
  width: "2",
2860
2929
  height: "6",
2861
2930
  rx: "0.5"
2862
2931
  }, null, -1),
2863
- o("rect", {
2932
+ a("rect", {
2864
2933
  x: "9",
2865
2934
  y: "2",
2866
2935
  width: "2",
2867
2936
  height: "9",
2868
2937
  rx: "0.5"
2869
2938
  }, null, -1)
2870
- ])], 8, Ns)) : s.isDate(a.label) ? (c(), u("svg", Ps, [...t[3] || (t[3] = [
2871
- o("rect", {
2939
+ ])], 8, Vs)) : s.isDate(o.label) ? (c(), u("svg", $s, [...t[3] || (t[3] = [
2940
+ a("rect", {
2872
2941
  x: "3",
2873
2942
  y: "4",
2874
2943
  width: "18",
2875
2944
  height: "18",
2876
2945
  rx: "2"
2877
2946
  }, null, -1),
2878
- o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2947
+ a("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2879
2948
  ])])) : y("", !0),
2880
- o("span", null, v(a.value), 1)
2949
+ a("span", null, v(o.value), 1)
2881
2950
  ], 2)
2882
2951
  ]))), 128))
2883
2952
  ])) : y("", !0),
2884
- n.data.created_at ? (c(), u("div", Fs, [
2885
- t[4] || (t[4] = o("svg", {
2953
+ n.data.created_at ? (c(), u("div", Ws, [
2954
+ t[4] || (t[4] = a("svg", {
2886
2955
  width: "11",
2887
2956
  height: "11",
2888
2957
  viewBox: "0 0 24 24",
@@ -2893,24 +2962,24 @@ function Us(e, t, n, i, r, s) {
2893
2962
  "stroke-linejoin": "round",
2894
2963
  "aria-hidden": "true"
2895
2964
  }, [
2896
- o("rect", {
2965
+ a("rect", {
2897
2966
  x: "3",
2898
2967
  y: "4",
2899
2968
  width: "18",
2900
2969
  height: "18",
2901
2970
  rx: "2"
2902
2971
  }),
2903
- o("path", { d: "M16 2v4M8 2v4M3 10h18" })
2972
+ a("path", { d: "M16 2v4M8 2v4M3 10h18" })
2904
2973
  ], -1)),
2905
- o("span", null, v(s.formattedDate), 1)
2974
+ a("span", null, v(s.formattedDate), 1)
2906
2975
  ])) : y("", !0)
2907
2976
  ]);
2908
2977
  }
2909
- const Ds = /* @__PURE__ */ N(Ms, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), js = {
2910
- form_response: us,
2911
- info_card: As,
2912
- ticket: Ds
2913
- }, Hs = {
2978
+ const Ys = /* @__PURE__ */ N(Ps, [["render", Gs], ["__scopeId", "data-v-5f30c914"]]), Js = {
2979
+ form_response: bs,
2980
+ info_card: Rs,
2981
+ ticket: Ys
2982
+ }, Qs = {
2914
2983
  name: "WmArtifactRenderer",
2915
2984
  props: {
2916
2985
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -2921,23 +2990,23 @@ const Ds = /* @__PURE__ */ N(Ms, [["render", Us], ["__scopeId", "data-v-5f30c914
2921
2990
  component() {
2922
2991
  var t;
2923
2992
  const e = (t = this.artifact) == null ? void 0 : t.kind;
2924
- return e && js[e] || null;
2993
+ return e && Js[e] || null;
2925
2994
  }
2926
2995
  }
2927
2996
  };
2928
- function zs(e, t, n, i, r, s) {
2929
- return s.component ? (c(), F(De(s.component), {
2997
+ function Xs(e, t, n, i, r, s) {
2998
+ return s.component ? (c(), P(De(s.component), {
2930
2999
  key: 0,
2931
3000
  data: n.artifact.data
2932
3001
  }, null, 8, ["data"])) : y("", !0);
2933
3002
  }
2934
- const qs = /* @__PURE__ */ N(Hs, [["render", zs]]), $s = {
3003
+ const Zs = /* @__PURE__ */ N(Qs, [["render", Xs]]), er = {
2935
3004
  name: "WmAttachmentPreview",
2936
3005
  inject: {
2937
3006
  signAttachmentFn: { default: null },
2938
3007
  // Translator shared by the Messenger shell; French fallback when
2939
3008
  // the component is used standalone.
2940
- t: { default: () => j() }
3009
+ t: { default: () => D() }
2941
3010
  },
2942
3011
  props: {
2943
3012
  attachment: { type: Object, required: !0 }
@@ -2999,15 +3068,15 @@ const qs = /* @__PURE__ */ N(Hs, [["render", zs]]), $s = {
2999
3068
  this.safeHref === "#" && e.preventDefault();
3000
3069
  }
3001
3070
  }
3002
- }, Ks = ["href"], Vs = ["src", "alt"], Ws = ["src"], Gs = ["src"], Ys = ["href", "download"], Js = { class: "wm-att__main" }, Qs = { class: "wm-att__name" }, Xs = {
3071
+ }, tr = ["href"], nr = ["src", "alt"], sr = ["src"], rr = ["src"], ir = ["href", "download"], ar = { class: "wm-att__main" }, or = { class: "wm-att__name" }, lr = {
3003
3072
  key: 0,
3004
3073
  class: "wm-att__meta"
3005
- }, Zs = {
3074
+ }, cr = {
3006
3075
  key: 0,
3007
3076
  class: "wm-att__spin",
3008
3077
  "aria-hidden": "true"
3009
3078
  };
3010
- function er(e, t, n, i, r, s) {
3079
+ function dr(e, t, n, i, r, s) {
3011
3080
  return c(), u("div", {
3012
3081
  class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
3013
3082
  }, [
@@ -3018,32 +3087,32 @@ function er(e, t, n, i, r, s) {
3018
3087
  rel: "noopener",
3019
3088
  class: "wm-att__imgWrap"
3020
3089
  }, [
3021
- o("img", {
3090
+ a("img", {
3022
3091
  src: r.url,
3023
3092
  alt: s.displayName,
3024
3093
  loading: "lazy"
3025
- }, null, 8, Vs)
3026
- ], 8, Ks)) : s.kind === "audio" && r.url ? (c(), u("audio", {
3094
+ }, null, 8, nr)
3095
+ ], 8, tr)) : s.kind === "audio" && r.url ? (c(), u("audio", {
3027
3096
  key: 1,
3028
3097
  src: r.url,
3029
3098
  controls: "",
3030
3099
  preload: "metadata"
3031
- }, null, 8, Ws)) : s.kind === "video" && r.url ? (c(), u("video", {
3100
+ }, null, 8, sr)) : s.kind === "video" && r.url ? (c(), u("video", {
3032
3101
  key: 2,
3033
3102
  src: r.url,
3034
3103
  controls: "",
3035
3104
  preload: "metadata"
3036
- }, null, 8, Gs)) : (c(), u("a", {
3105
+ }, null, 8, rr)) : (c(), u("a", {
3037
3106
  key: 3,
3038
3107
  class: "wm-att__file",
3039
3108
  href: s.safeHref,
3040
3109
  download: s.displayName,
3041
3110
  target: "_blank",
3042
3111
  rel: "noopener",
3043
- onClick: t[0] || (t[0] = (...a) => s.onFileClick && s.onFileClick(...a))
3112
+ onClick: t[0] || (t[0] = (...o) => s.onFileClick && s.onFileClick(...o))
3044
3113
  }, [
3045
- t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
3046
- o("svg", {
3114
+ t[1] || (t[1] = a("span", { class: "wm-att__icon" }, [
3115
+ a("svg", {
3047
3116
  width: "14",
3048
3117
  height: "14",
3049
3118
  viewBox: "0 0 24 24",
@@ -3054,19 +3123,19 @@ function er(e, t, n, i, r, s) {
3054
3123
  "stroke-linejoin": "round",
3055
3124
  "aria-hidden": "true"
3056
3125
  }, [
3057
- o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3058
- o("path", { d: "M14 2v6h6" })
3126
+ a("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3127
+ a("path", { d: "M14 2v6h6" })
3059
3128
  ])
3060
3129
  ], -1)),
3061
- o("span", Js, [
3062
- o("span", Qs, v(s.displayName), 1),
3063
- s.sizeLabel ? (c(), u("span", Xs, v(s.sizeLabel), 1)) : y("", !0)
3130
+ a("span", ar, [
3131
+ a("span", or, v(s.displayName), 1),
3132
+ s.sizeLabel ? (c(), u("span", lr, v(s.sizeLabel), 1)) : y("", !0)
3064
3133
  ]),
3065
- r.loading ? (c(), u("span", Zs)) : y("", !0)
3066
- ], 8, Ys))
3134
+ r.loading ? (c(), u("span", cr)) : y("", !0)
3135
+ ], 8, ir))
3067
3136
  ], 2);
3068
3137
  }
3069
- const tr = /* @__PURE__ */ N($s, [["render", er], ["__scopeId", "data-v-0c877a62"]]), nr = {
3138
+ const ur = /* @__PURE__ */ N(er, [["render", dr], ["__scopeId", "data-v-0c877a62"]]), hr = {
3070
3139
  name: "WmBubble",
3071
3140
  props: {
3072
3141
  role: { type: String, default: "ai" },
@@ -3078,50 +3147,50 @@ const tr = /* @__PURE__ */ N($s, [["render", er], ["__scopeId", "data-v-0c877a62
3078
3147
  return un(this.text);
3079
3148
  }
3080
3149
  }
3081
- }, sr = ["innerHTML"];
3082
- function rr(e, t, n, i, r, s) {
3150
+ }, mr = ["innerHTML"];
3151
+ function fr(e, t, n, i, r, s) {
3083
3152
  return c(), u("div", {
3084
3153
  class: O(["wm-bubble", "wm-bubble--" + n.role])
3085
3154
  }, [
3086
3155
  je(e.$slots, "default", {}, () => [
3087
- o("span", { innerHTML: s.rendered }, null, 8, sr)
3156
+ a("span", { innerHTML: s.rendered }, null, 8, mr)
3088
3157
  ], !0)
3089
3158
  ], 2);
3090
3159
  }
3091
- const ir = /* @__PURE__ */ N(nr, [["render", rr], ["__scopeId", "data-v-7ab13147"]]), ar = { name: "WmTyping" }, or = { class: "wm-typing" };
3092
- function lr(e, t, n, i, r, s) {
3093
- return c(), u("div", or, [...t[0] || (t[0] = [
3094
- o("span", { style: { "animation-delay": "0s" } }, null, -1),
3095
- o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3096
- o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3160
+ const _r = /* @__PURE__ */ N(hr, [["render", fr], ["__scopeId", "data-v-7ab13147"]]), gr = { name: "WmTyping" }, pr = { class: "wm-typing" };
3161
+ function vr(e, t, n, i, r, s) {
3162
+ return c(), u("div", pr, [...t[0] || (t[0] = [
3163
+ a("span", { style: { "animation-delay": "0s" } }, null, -1),
3164
+ a("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3165
+ a("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3097
3166
  ])]);
3098
3167
  }
3099
- const cr = /* @__PURE__ */ N(ar, [["render", lr], ["__scopeId", "data-v-df2447fd"]]);
3168
+ const yr = /* @__PURE__ */ N(gr, [["render", vr], ["__scopeId", "data-v-df2447fd"]]);
3100
3169
  function Q(e) {
3101
3170
  return e ? e.client_msg_id || e.id : "";
3102
3171
  }
3103
- const dr = {
3172
+ const wr = {
3104
3173
  transferred_to_human: "system.transferredToHuman",
3105
3174
  assigned: "system.assigned",
3106
3175
  unassigned: "system.unassigned",
3107
3176
  resolved: "system.resolved",
3108
3177
  reopened: "system.reopened",
3109
3178
  idle: "system.idle"
3110
- }, ur = 80, hr = 200, mr = {
3179
+ }, br = 80, kr = 200, Cr = {
3111
3180
  name: "WmMessageList",
3112
3181
  components: {
3113
3182
  AIAvatar: le,
3114
3183
  HumanAvatar: Re,
3115
- Bubble: ir,
3116
- Typing: cr,
3117
- ActionResult: ns,
3118
- AttachmentPreview: tr,
3119
- ArtifactRenderer: qs
3184
+ Bubble: _r,
3185
+ Typing: yr,
3186
+ ActionResult: hs,
3187
+ AttachmentPreview: ur,
3188
+ ArtifactRenderer: Zs
3120
3189
  },
3121
3190
  inject: {
3122
3191
  // Translator + resolved-language getter shared by the Messenger
3123
3192
  // shell. Fall back to French wording when used standalone.
3124
- t: { default: () => j() },
3193
+ t: { default: () => D() },
3125
3194
  wmLocale: { default: () => () => "fr" }
3126
3195
  },
3127
3196
  props: {
@@ -3187,59 +3256,59 @@ const dr = {
3187
3256
  groups() {
3188
3257
  var n, i, r, s;
3189
3258
  const e = [];
3190
- for (const a of this.messages) {
3191
- const l = this.roleOf(a);
3259
+ for (const o of this.messages) {
3260
+ const l = this.roleOf(o);
3192
3261
  if (l === "system") {
3193
- if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3194
- const b = e[e.length - 1];
3195
- b && b.role === "ai" ? b.messages.push(a) : e.push({
3196
- key: `g-${Q(a)}`,
3262
+ if (((n = o == null ? void 0 : o.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3263
+ const w = e[e.length - 1];
3264
+ w && w.role === "ai" ? w.messages.push(o) : e.push({
3265
+ key: `g-${Q(o)}`,
3197
3266
  role: "ai",
3198
3267
  agentName: "",
3199
3268
  agentAvatarUrl: null,
3200
- messages: [a],
3269
+ messages: [o],
3201
3270
  items: []
3202
3271
  });
3203
3272
  continue;
3204
3273
  }
3205
3274
  e.push({
3206
- key: `sys-${Q(a)}`,
3275
+ key: `sys-${Q(o)}`,
3207
3276
  role: l,
3208
- messages: [a],
3277
+ messages: [o],
3209
3278
  items: [],
3210
- systemLabel: this.systemLabel(a)
3279
+ systemLabel: this.systemLabel(o)
3211
3280
  });
3212
3281
  continue;
3213
3282
  }
3214
3283
  const p = e[e.length - 1];
3215
- 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({
3216
- key: `g-${Q(a)}`,
3284
+ 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({
3285
+ key: `g-${Q(o)}`,
3217
3286
  role: l,
3218
- agentName: ((r = a == null ? void 0 : a.author) == null ? void 0 : r.name) || "",
3219
- agentAvatarUrl: ((s = a == null ? void 0 : a.author) == null ? void 0 : s.avatar_url) || null,
3220
- messages: [a],
3287
+ agentName: ((r = o == null ? void 0 : o.author) == null ? void 0 : r.name) || "",
3288
+ agentAvatarUrl: ((s = o == null ? void 0 : o.author) == null ? void 0 : s.avatar_url) || null,
3289
+ messages: [o],
3221
3290
  items: []
3222
3291
  });
3223
3292
  }
3224
- for (const a of e) {
3225
- if (a.role === "system") continue;
3293
+ for (const o of e) {
3294
+ if (o.role === "system") continue;
3226
3295
  const l = [];
3227
- for (const p of a.messages)
3296
+ for (const p of o.messages)
3228
3297
  for (const k of this.itemsOf(p)) l.push(k);
3229
- a.items = l;
3298
+ o.items = l;
3230
3299
  }
3231
3300
  const t = [];
3232
- for (const a of e) {
3233
- if (a.role !== "system" && !a.items.length) continue;
3301
+ for (const o of e) {
3302
+ if (o.role !== "system" && !o.items.length) continue;
3234
3303
  const l = t[t.length - 1];
3235
- if (l && l.role !== "system" && l.role === a.role && (a.role === "ai" || l.agentName === a.agentName)) {
3236
- l.messages.push(...a.messages), l.items.push(...a.items);
3304
+ if (l && l.role !== "system" && l.role === o.role && (o.role === "ai" || l.agentName === o.agentName)) {
3305
+ l.messages.push(...o.messages), l.items.push(...o.items);
3237
3306
  continue;
3238
3307
  }
3239
- t.push(a);
3308
+ t.push(o);
3240
3309
  }
3241
- for (const a of t)
3242
- a.role !== "system" && (a.key = this.stableGroupKey(a.messages));
3310
+ for (const o of t)
3311
+ o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
3243
3312
  return t;
3244
3313
  },
3245
3314
  // Key of the first non-user group that starts after the unread
@@ -3306,11 +3375,11 @@ const dr = {
3306
3375
  return `g-${n}`;
3307
3376
  },
3308
3377
  isAtBottom(e) {
3309
- return e.scrollHeight - e.scrollTop - e.clientHeight <= ur;
3378
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= br;
3310
3379
  },
3311
3380
  onScroll() {
3312
3381
  const e = this.$refs.scrollEl;
3313
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= hr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3382
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= kr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3314
3383
  },
3315
3384
  // Capture pre-patch scroll state and restore it on the next tick.
3316
3385
  //
@@ -3343,12 +3412,12 @@ const dr = {
3343
3412
  if (!t && !n) {
3344
3413
  const s = this.pickAnchor(e);
3345
3414
  if (s != null && s.rowKey) {
3346
- const a = this.findRowByKey(e, s.rowKey);
3347
- if (a) {
3415
+ const o = this.findRowByKey(e, s.rowKey);
3416
+ if (o) {
3348
3417
  const l = e.getBoundingClientRect().top;
3349
3418
  i = {
3350
3419
  rowKey: s.rowKey,
3351
- relY: a.getBoundingClientRect().top - l
3420
+ relY: o.getBoundingClientRect().top - l
3352
3421
  };
3353
3422
  }
3354
3423
  }
@@ -3361,9 +3430,9 @@ const dr = {
3361
3430
  }
3362
3431
  if (!r.anchor) return;
3363
3432
  const s = () => {
3364
- const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
3433
+ const o = r.anchor, l = this.findRowByKey(e, o.rowKey);
3365
3434
  if (!l) return;
3366
- const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3435
+ const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - o.relY;
3367
3436
  Math.abs(k) > 0.5 && (e.scrollTop += k);
3368
3437
  };
3369
3438
  s(), requestAnimationFrame(() => {
@@ -3511,9 +3580,9 @@ const dr = {
3511
3580
  // doit garder son arrondi.
3512
3581
  cornersFor(e, t) {
3513
3582
  var Z, ee, te;
3514
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = 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";
3515
- let P = l, I = l, U = l, Y = l;
3516
- return a ? (k && (I = p), (b || !s) && (U = p), k && S(E, k, i == null ? void 0 : i.top) && (P = p), b && S(A, b, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (P = p), (b || !s) && (Y = p), k && S(E, k, i == null ? void 0 : i.top) && (I = p), b && S(A, b, i == null ? void 0 : i.bottom) && (U = p)), { tl: P, tr: I, br: U, bl: Y };
3583
+ 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 = (V, ne, J) => V != null && T != null ? V + H >= T : ne === J || ne === "card" && J === "bubble";
3584
+ let F = l, L = l, z = l, Y = l;
3585
+ return o ? (k && (L = p), (w || !s) && (z = p), k && S(B, k, i == null ? void 0 : i.top) && (F = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (F = p), (w || !s) && (Y = p), k && S(B, k, i == null ? void 0 : i.top) && (L = p), w && S(A, w, i == null ? void 0 : i.bottom) && (z = p)), { tl: F, tr: L, br: z, bl: Y };
3517
3586
  },
3518
3587
  // Inline style emitting the four corner CSS variables. Set on
3519
3588
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3554,20 +3623,20 @@ const dr = {
3554
3623
  for (const s of e.querySelectorAll(
3555
3624
  ".wm-list__row[data-row-key]"
3556
3625
  )) {
3557
- const a = s.dataset.rowKey;
3558
- if (!a) continue;
3626
+ const o = s.dataset.rowKey;
3627
+ if (!o) continue;
3559
3628
  const l = s.querySelector(
3560
3629
  ".wm-bubble, .wm-result, .wm-art, .wm-list__body"
3561
3630
  );
3562
3631
  if (!l) continue;
3563
3632
  const p = l.getBoundingClientRect().width;
3564
- p > 0 && (t[a] = p);
3633
+ p > 0 && (t[o] = p);
3565
3634
  }
3566
3635
  const n = this.widthByKey, i = Object.keys(n), r = Object.keys(t);
3567
3636
  if (i.length === r.length) {
3568
3637
  let s = !0;
3569
- for (const a of r)
3570
- if (Math.abs((n[a] ?? 0) - t[a]) > 0.5) {
3638
+ for (const o of r)
3639
+ if (Math.abs((n[o] ?? 0) - t[o]) > 0.5) {
3571
3640
  s = !1;
3572
3641
  break;
3573
3642
  }
@@ -3637,9 +3706,9 @@ const dr = {
3637
3706
  return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
3638
3707
  },
3639
3708
  actionDetail(e) {
3640
- var n, i, r, s, a, l;
3709
+ var n, i, r, s, o, l;
3641
3710
  const t = e == null ? void 0 : e.payload;
3642
- 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)) || "" : "";
3711
+ 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)) || "" : "";
3643
3712
  },
3644
3713
  actionArtifact(e) {
3645
3714
  var n, i;
@@ -3647,8 +3716,8 @@ const dr = {
3647
3716
  return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
3648
3717
  },
3649
3718
  systemLabel(e) {
3650
- var r, s, a;
3651
- const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = dr[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");
3719
+ var r, s, o;
3720
+ const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = wr[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");
3652
3721
  return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
3653
3722
  },
3654
3723
  scrollToBottom() {
@@ -3663,80 +3732,80 @@ const dr = {
3663
3732
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
3664
3733
  }
3665
3734
  }
3666
- }, fr = { class: "wm-list__wrap" }, gr = {
3735
+ }, Ar = { class: "wm-list__wrap" }, Sr = {
3667
3736
  key: 0,
3668
3737
  class: "wm-list__loadMore",
3669
3738
  role: "status",
3670
3739
  "aria-live": "polite"
3671
- }, _r = { class: "wm-list__loadMore-lbl" }, pr = {
3740
+ }, Mr = { class: "wm-list__loadMore-lbl" }, Tr = {
3672
3741
  key: 1,
3673
3742
  class: "wm-list__historyEnd"
3674
- }, vr = {
3743
+ }, xr = {
3675
3744
  key: 2,
3676
3745
  class: "wm-list__sep"
3677
- }, yr = { class: "wm-list__sep-label" }, wr = {
3746
+ }, Or = { class: "wm-list__sep-label" }, Lr = {
3678
3747
  key: 0,
3679
3748
  class: "wm-list__sep wm-list__sep--unread"
3680
- }, br = { class: "wm-list__sep-label wm-list__sep-label--unread" }, kr = {
3749
+ }, Ir = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Er = {
3681
3750
  key: 0,
3682
3751
  class: "wm-list__sysep"
3683
- }, Cr = { class: "wm-list__sysep-label" }, Ar = ["data-row-key", "onPointerdown"], Sr = {
3752
+ }, Br = { class: "wm-list__sysep-label" }, Rr = ["data-row-key", "onPointerdown"], Nr = {
3684
3753
  key: 0,
3685
3754
  class: "wm-list__avatarSlot"
3686
- }, Mr = {
3755
+ }, Pr = {
3687
3756
  key: 5,
3688
3757
  class: "wm-list__body"
3689
- }, Tr = { key: 0 }, xr = {
3758
+ }, Fr = { key: 0 }, Ur = {
3690
3759
  key: 1,
3691
3760
  "aria-hidden": "true"
3692
- }, Or = { key: 2 }, Lr = { key: 0 }, Ir = {
3761
+ }, Dr = { key: 2 }, jr = { key: 0 }, Hr = {
3693
3762
  key: 1,
3694
3763
  "aria-hidden": "true"
3695
- }, Er = { key: 2 }, Br = {
3764
+ }, zr = { key: 2 }, qr = {
3696
3765
  key: 3,
3697
3766
  class: "wm-list__row wm-list__row--ai fade-up"
3698
- }, Rr = { class: "wm-list__avatarSlot" }, Nr = ["aria-label", "title"];
3699
- function Pr(e, t, n, i, r, s) {
3700
- const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), b = R("Bubble"), T = R("AttachmentPreview"), E = R("Typing");
3701
- return c(), u("div", fr, [
3702
- o("div", {
3767
+ }, Kr = { class: "wm-list__avatarSlot" }, Vr = ["aria-label", "title"];
3768
+ function $r(e, t, n, i, r, s) {
3769
+ const o = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), B = R("Typing");
3770
+ return c(), u("div", Ar, [
3771
+ a("div", {
3703
3772
  ref: "scrollEl",
3704
3773
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
3705
3774
  onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
3706
3775
  }, [
3707
- n.loadingMore ? (c(), u("div", gr, [
3708
- t[6] || (t[6] = o("span", {
3776
+ n.loadingMore ? (c(), u("div", Sr, [
3777
+ t[6] || (t[6] = a("span", {
3709
3778
  class: "wm-list__loadMore-spinner",
3710
3779
  "aria-hidden": "true"
3711
3780
  }, null, -1)),
3712
- o("span", _r, v(s.t("messageList.loadingHistory")), 1)
3713
- ])) : s.historyExhausted ? (c(), u("div", pr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3714
- n.dateLabel ? (c(), u("div", vr, [
3715
- t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
3716
- o("span", yr, v(n.dateLabel), 1),
3717
- t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
3781
+ a("span", Mr, v(s.t("messageList.loadingHistory")), 1)
3782
+ ])) : s.historyExhausted ? (c(), u("div", Tr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3783
+ n.dateLabel ? (c(), u("div", xr, [
3784
+ t[7] || (t[7] = a("div", { class: "wm-list__line" }, null, -1)),
3785
+ a("span", Or, v(n.dateLabel), 1),
3786
+ t[8] || (t[8] = a("div", { class: "wm-list__line" }, null, -1))
3718
3787
  ])) : y("", !0),
3719
- (c(!0), u(B, null, D(s.groups, (A, H) => (c(), u(B, {
3788
+ (c(!0), u(E, null, U(s.groups, (A, H) => (c(), u(E, {
3720
3789
  key: A.key
3721
3790
  }, [
3722
- A.key === s.unreadGroupKey ? (c(), u("div", wr, [
3723
- t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3724
- o("span", br, v(s.t("messageList.unread")), 1),
3725
- t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3791
+ A.key === s.unreadGroupKey ? (c(), u("div", Lr, [
3792
+ t[9] || (t[9] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3793
+ a("span", Ir, v(s.t("messageList.unread")), 1),
3794
+ t[10] || (t[10] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3726
3795
  ])) : y("", !0),
3727
3796
  A.role === "system" || A.items.length ? (c(), u("div", {
3728
3797
  key: 1,
3729
3798
  class: O(["wm-list__group", "wm-list__group--" + A.role])
3730
3799
  }, [
3731
- A.role === "system" ? (c(), u("div", kr, [
3732
- t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3733
- o("span", Cr, v(A.systemLabel), 1),
3734
- t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3735
- ])) : (c(), u(B, { key: 1 }, [
3736
- (c(!0), u(B, null, D(A.items, (S, P) => (c(), u(B, {
3800
+ A.role === "system" ? (c(), u("div", Er, [
3801
+ t[11] || (t[11] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3802
+ a("span", Br, v(A.systemLabel), 1),
3803
+ t[12] || (t[12] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3804
+ ])) : (c(), u(E, { key: 1 }, [
3805
+ (c(!0), u(E, null, U(A.items, (S, F) => (c(), u(E, {
3737
3806
  key: `${s.messageKey(S.message)}-${S.partKey}`
3738
3807
  }, [
3739
- o("div", {
3808
+ a("div", {
3740
3809
  "data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
3741
3810
  class: O(["wm-list__row fade-up", [
3742
3811
  "wm-list__row--" + A.role,
@@ -3745,23 +3814,23 @@ function Pr(e, t, n, i, r, s) {
3745
3814
  "is-failed": S.message._failed
3746
3815
  }
3747
3816
  ]]),
3748
- style: q(s.cornersStyle(A, P)),
3749
- onPointerdown: (I) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
3750
- onPointerup: t[0] || (t[0] = (I) => s.onPressEnd()),
3751
- onPointercancel: t[1] || (t[1] = (I) => s.onPressEnd()),
3752
- onPointerleave: t[2] || (t[2] = (I) => s.onPressEnd()),
3817
+ style: q(s.cornersStyle(A, F)),
3818
+ onPointerdown: (L) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
3819
+ onPointerup: t[0] || (t[0] = (L) => s.onPressEnd()),
3820
+ onPointercancel: t[1] || (t[1] = (L) => s.onPressEnd()),
3821
+ onPointerleave: t[2] || (t[2] = (L) => s.onPressEnd()),
3753
3822
  onContextmenu: t[3] || (t[3] = G(() => {
3754
3823
  }, ["prevent"]))
3755
3824
  }, [
3756
- A.role !== "user" ? (c(), u("div", Sr, [
3757
- P === A.items.length - 1 ? (c(), u(B, { key: 0 }, [
3758
- A.role === "ai" ? (c(), F(a, {
3825
+ A.role !== "user" ? (c(), u("div", Nr, [
3826
+ F === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
3827
+ A.role === "ai" ? (c(), P(o, {
3759
3828
  key: 0,
3760
3829
  size: 26,
3761
3830
  tail: !0,
3762
3831
  name: n.aiAgentName,
3763
3832
  "image-url": n.aiAgentAvatarUrl
3764
- }, null, 8, ["name", "image-url"])) : (c(), F(l, {
3833
+ }, null, 8, ["name", "image-url"])) : (c(), P(l, {
3765
3834
  key: 1,
3766
3835
  name: A.agentName,
3767
3836
  "avatar-url": A.agentAvatarUrl,
@@ -3770,24 +3839,24 @@ function Pr(e, t, n, i, r, s) {
3770
3839
  }, null, 8, ["name", "avatar-url"]))
3771
3840
  ], 64)) : y("", !0)
3772
3841
  ])) : y("", !0),
3773
- S.renderAs === "action" ? (c(), F(p, {
3842
+ S.renderAs === "action" ? (c(), P(p, {
3774
3843
  key: 1,
3775
3844
  state: S.message.payload.state,
3776
3845
  label: s.actionLabel(S.message),
3777
3846
  detail: s.actionDetail(S.message)
3778
- }, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (c(), F(p, {
3847
+ }, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (c(), P(p, {
3779
3848
  key: 2,
3780
3849
  state: "awaiting",
3781
3850
  label: s.t("messageList.approvalRequestSent"),
3782
3851
  detail: S.message.text_md || ""
3783
- }, null, 8, ["label", "detail"])) : S.renderAs === "artifact-of-action" ? (c(), F(k, {
3852
+ }, null, 8, ["label", "detail"])) : S.renderAs === "artifact-of-action" ? (c(), P(k, {
3784
3853
  key: 3,
3785
3854
  artifact: s.actionArtifact(S.message)
3786
- }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), F(k, {
3855
+ }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), P(k, {
3787
3856
  key: 4,
3788
3857
  artifact: s.artifactOf(S.message)
3789
- }, null, 8, ["artifact"])) : (c(), u("div", Mr, [
3790
- S.message.text_md ? (c(), F(b, {
3858
+ }, null, 8, ["artifact"])) : (c(), u("div", Pr, [
3859
+ S.message.text_md ? (c(), P(w, {
3791
3860
  key: 0,
3792
3861
  role: A.role,
3793
3862
  text: S.message.text_md
@@ -3798,48 +3867,48 @@ function Pr(e, t, n, i, r, s) {
3798
3867
  "wm-list__atts--align-end": A.role === "user"
3799
3868
  }])
3800
3869
  }, [
3801
- (c(!0), u(B, null, D(s.attachmentsOf(
3870
+ (c(!0), u(E, null, U(s.attachmentsOf(
3802
3871
  S.message
3803
- ), (I, U) => (c(), F(T, {
3804
- key: `${s.messageKey(S.message)}-att-${U}`,
3805
- attachment: I
3872
+ ), (L, z) => (c(), P(T, {
3873
+ key: `${s.messageKey(S.message)}-att-${z}`,
3874
+ attachment: L
3806
3875
  }, null, 8, ["attachment"]))), 128))
3807
3876
  ], 2)) : y("", !0)
3808
3877
  ]))
3809
- ], 46, Ar),
3810
- P < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
3878
+ ], 46, Rr),
3879
+ F < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
3811
3880
  key: 0,
3812
3881
  class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
3813
3882
  }, [
3814
- A.role !== "user" ? (c(), u("span", Tr, v(s.roleLabel(A)), 1)) : y("", !0),
3815
- A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", xr, "·")) : y("", !0),
3816
- s.timeOf(S.message) ? (c(), u("span", Or, v(s.timeOf(S.message)), 1)) : y("", !0)
3883
+ A.role !== "user" ? (c(), u("span", Fr, v(s.roleLabel(A)), 1)) : y("", !0),
3884
+ A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", Ur, "·")) : y("", !0),
3885
+ s.timeOf(S.message) ? (c(), u("span", Dr, v(s.timeOf(S.message)), 1)) : y("", !0)
3817
3886
  ], 2)) : y("", !0)
3818
3887
  ], 64))), 128)),
3819
3888
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3820
3889
  key: 0,
3821
3890
  class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3822
3891
  }, [
3823
- A.role !== "user" ? (c(), u("span", Lr, v(s.roleLabel(A)), 1)) : y("", !0),
3824
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Ir, "·")) : y("", !0),
3825
- s.lastTimeOf(A) ? (c(), u("span", Er, v(s.lastTimeOf(A)), 1)) : y("", !0)
3892
+ A.role !== "user" ? (c(), u("span", jr, v(s.roleLabel(A)), 1)) : y("", !0),
3893
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Hr, "·")) : y("", !0),
3894
+ s.lastTimeOf(A) ? (c(), u("span", zr, v(s.lastTimeOf(A)), 1)) : y("", !0)
3826
3895
  ], 2)) : y("", !0)
3827
3896
  ], 64))
3828
3897
  ], 2)) : y("", !0)
3829
3898
  ], 64))), 128)),
3830
- n.streamingActive ? (c(), u("div", Br, [
3831
- o("div", Rr, [
3832
- $(a, {
3899
+ n.streamingActive ? (c(), u("div", qr, [
3900
+ a("div", Kr, [
3901
+ K(o, {
3833
3902
  size: 26,
3834
3903
  tail: !0,
3835
3904
  name: n.aiAgentName,
3836
3905
  "image-url": n.aiAgentAvatarUrl
3837
3906
  }, null, 8, ["name", "image-url"])
3838
3907
  ]),
3839
- $(E)
3908
+ K(B)
3840
3909
  ])) : y("", !0)
3841
3910
  ], 34),
3842
- $(Ie, { name: "wm-scrollDown" }, {
3911
+ K(Ie, { name: "wm-scrollDown" }, {
3843
3912
  default: Ee(() => [
3844
3913
  r.showScrollDown ? (c(), u("button", {
3845
3914
  key: 0,
@@ -3849,7 +3918,7 @@ function Pr(e, t, n, i, r, s) {
3849
3918
  title: s.t("messageList.scrollToBottom"),
3850
3919
  onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3851
3920
  }, [...t[13] || (t[13] = [
3852
- o("svg", {
3921
+ a("svg", {
3853
3922
  width: "14",
3854
3923
  height: "14",
3855
3924
  viewBox: "0 0 24 24",
@@ -3860,16 +3929,16 @@ function Pr(e, t, n, i, r, s) {
3860
3929
  "stroke-linejoin": "round",
3861
3930
  "aria-hidden": "true"
3862
3931
  }, [
3863
- o("path", { d: "M6 9l6 6 6-6" })
3932
+ a("path", { d: "M6 9l6 6 6-6" })
3864
3933
  ], -1)
3865
- ])], 8, Nr)) : y("", !0)
3934
+ ])], 8, Vr)) : y("", !0)
3866
3935
  ]),
3867
3936
  _: 1
3868
3937
  })
3869
3938
  ]);
3870
3939
  }
3871
- const Fr = /* @__PURE__ */ N(mr, [["render", Pr], ["__scopeId", "data-v-9ddbd0e3"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ke = typeof window < "u" && typeof window.MediaRecorder < "u";
3872
- function Ur() {
3940
+ const Wr = /* @__PURE__ */ N(Cr, [["render", $r], ["__scopeId", "data-v-9ddbd0e3"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ke = typeof window < "u" && typeof window.MediaRecorder < "u";
3941
+ function Gr() {
3873
3942
  return ke && [
3874
3943
  "video/webm;codecs=vp9,opus",
3875
3944
  "video/webm;codecs=vp8,opus",
@@ -3889,10 +3958,10 @@ function Pe({ audio: e }) {
3889
3958
  systemAudio: e ? "include" : "exclude"
3890
3959
  };
3891
3960
  }
3892
- function Va(e) {
3961
+ function no(e) {
3893
3962
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3894
3963
  }
3895
- async function Dr() {
3964
+ async function Yr() {
3896
3965
  if (!he) return null;
3897
3966
  let e;
3898
3967
  try {
@@ -3903,7 +3972,7 @@ async function Dr() {
3903
3972
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3904
3973
  }
3905
3974
  try {
3906
- return await jr(e);
3975
+ return await Jr(e);
3907
3976
  } catch (t) {
3908
3977
  return console.error("[media] screenshot capture", t), null;
3909
3978
  } finally {
@@ -3912,7 +3981,7 @@ async function Dr() {
3912
3981
  });
3913
3982
  }
3914
3983
  }
3915
- async function jr(e) {
3984
+ async function Jr(e) {
3916
3985
  const t = document.createElement("video");
3917
3986
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
3918
3987
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -3922,10 +3991,10 @@ async function jr(e) {
3922
3991
  (k) => k ? l(k) : p(new Error("toBlob failed")),
3923
3992
  "image/png"
3924
3993
  );
3925
- }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3926
- return new File([s], `capture-${a}.png`, { type: "image/png" });
3994
+ }), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3995
+ return new File([s], `capture-${o}.png`, { type: "image/png" });
3927
3996
  }
3928
- async function Hr(e = {}) {
3997
+ async function Qr(e = {}) {
3929
3998
  var k;
3930
3999
  if (!he || !ke) return null;
3931
4000
  let t;
@@ -3933,56 +4002,56 @@ async function Hr(e = {}) {
3933
4002
  t = await navigator.mediaDevices.getDisplayMedia(
3934
4003
  Pe({ audio: !0 })
3935
4004
  );
3936
- } catch (b) {
3937
- return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
4005
+ } catch (w) {
4006
+ return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
3938
4007
  }
3939
- const n = Ur();
4008
+ const n = Gr();
3940
4009
  let i;
3941
4010
  try {
3942
4011
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
3943
- } catch (b) {
3944
- return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
4012
+ } catch (w) {
4013
+ return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
3945
4014
  T.stop();
3946
4015
  }), null;
3947
4016
  }
3948
4017
  const r = [];
3949
- let s = null, a = !1;
3950
- i.addEventListener("dataavailable", (b) => {
3951
- b.data && b.data.size > 0 && r.push(b.data);
4018
+ let s = null, o = !1;
4019
+ i.addEventListener("dataavailable", (w) => {
4020
+ w.data && w.data.size > 0 && r.push(w.data);
3952
4021
  }), i.addEventListener("stop", () => {
3953
- var b, T;
3954
- if (s && clearInterval(s), t.getTracks().forEach((E) => {
3955
- E.stop();
4022
+ var w, T;
4023
+ if (s && clearInterval(s), t.getTracks().forEach((B) => {
4024
+ B.stop();
3956
4025
  }), r.length) {
3957
- const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${S}.${H}`, {
3958
- type: E
4026
+ const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${S}.${H}`, {
4027
+ type: B
3959
4028
  });
3960
- (b = e.onfinalize) == null || b.call(e, P);
4029
+ (w = e.onfinalize) == null || w.call(e, F);
3961
4030
  } else
3962
4031
  (T = e.oncancel) == null || T.call(e);
3963
- }), t.getVideoTracks().forEach((b) => {
3964
- b.addEventListener("ended", () => l(), { once: !0 });
4032
+ }), t.getVideoTracks().forEach((w) => {
4033
+ w.addEventListener("ended", () => l(), { once: !0 });
3965
4034
  });
3966
4035
  function l() {
3967
- if (!a && (a = !0, i.state !== "inactive"))
4036
+ if (!o && (o = !0, i.state !== "inactive"))
3968
4037
  try {
3969
4038
  i.stop();
3970
- } catch (b) {
3971
- console.error("[media] recorder stop", b);
4039
+ } catch (w) {
4040
+ console.error("[media] recorder stop", w);
3972
4041
  }
3973
4042
  }
3974
4043
  try {
3975
4044
  i.start(1e3);
3976
- } catch (b) {
3977
- return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
4045
+ } catch (w) {
4046
+ return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
3978
4047
  T.stop();
3979
4048
  }), null;
3980
4049
  }
3981
4050
  (k = e.onstart) == null || k.call(e);
3982
4051
  const p = Date.now();
3983
4052
  return s = setInterval(() => {
3984
- var b;
3985
- (b = e.ontick) == null || b.call(e, Date.now() - p);
4053
+ var w;
4054
+ (w = e.ontick) == null || w.call(e, Date.now() - p);
3986
4055
  }, 500), {
3987
4056
  stop: l,
3988
4057
  get state() {
@@ -3990,7 +4059,7 @@ async function Hr(e = {}) {
3990
4059
  }
3991
4060
  };
3992
4061
  }
3993
- const zr = [
4062
+ const Xr = [
3994
4063
  {
3995
4064
  action: "file",
3996
4065
  labelKey: "composer.attachFile",
@@ -4006,12 +4075,12 @@ const zr = [
4006
4075
  labelKey: "composer.recordScreen",
4007
4076
  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"
4008
4077
  }
4009
- ], qr = {
4078
+ ], Zr = {
4010
4079
  name: "WmComposer",
4011
4080
  inject: {
4012
4081
  // Translator shared by the Messenger shell; French fallback when
4013
4082
  // the component is used standalone.
4014
- t: { default: () => j() }
4083
+ t: { default: () => D() }
4015
4084
  },
4016
4085
  props: {
4017
4086
  modelValue: { type: String, default: "" },
@@ -4040,7 +4109,7 @@ const zr = [
4040
4109
  return !this.disabled && !!this.local.trim();
4041
4110
  },
4042
4111
  attachItems() {
4043
- return zr.map((e) => ({
4112
+ return Xr.map((e) => ({
4044
4113
  ...e,
4045
4114
  label: this.t(e.labelKey),
4046
4115
  disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !ke)
@@ -4114,13 +4183,13 @@ const zr = [
4114
4183
  },
4115
4184
  async captureScreenshot() {
4116
4185
  if (this.disabled) return;
4117
- const e = await Dr();
4186
+ const e = await Yr();
4118
4187
  e && this.$emit("attach", e);
4119
4188
  },
4120
4189
  async startRecording() {
4121
4190
  if (this.recording || this.disabled) return;
4122
4191
  this.recordingElapsed = 0;
4123
- const e = await Hr({
4192
+ const e = await Qr({
4124
4193
  onstart: () => {
4125
4194
  this.recording = !0;
4126
4195
  },
@@ -4162,97 +4231,97 @@ const zr = [
4162
4231
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4163
4232
  }
4164
4233
  }
4165
- }, $r = {
4234
+ }, ei = {
4166
4235
  key: 0,
4167
4236
  class: "wm-rec"
4168
- }, Kr = { class: "wm-rec__lbl" }, Vr = {
4237
+ }, ti = { class: "wm-rec__lbl" }, ni = {
4169
4238
  key: 1,
4170
4239
  class: "wm-compose__menu",
4171
4240
  role: "menu"
4172
- }, Wr = ["disabled", "onClick"], Gr = { class: "wm-compose__menuIcon" }, Yr = {
4241
+ }, si = ["disabled", "onClick"], ri = { class: "wm-compose__menuIcon" }, ii = {
4173
4242
  viewBox: "0 0 24 24",
4174
4243
  width: "14",
4175
4244
  height: "14",
4176
4245
  "aria-hidden": "true"
4177
- }, Jr = ["d"], Qr = ["placeholder", "disabled"], Xr = { class: "wm-compose__actions" }, Zr = ["title", "aria-label", "disabled"], ei = ["disabled", "aria-label"];
4178
- function ti(e, t, n, i, r, s) {
4246
+ }, ai = ["d"], oi = ["placeholder", "disabled"], li = { class: "wm-compose__actions" }, ci = ["title", "aria-label", "disabled"], di = ["disabled", "aria-label"];
4247
+ function ui(e, t, n, i, r, s) {
4179
4248
  return c(), u("div", {
4180
4249
  class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4181
4250
  style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4182
4251
  }, [
4183
- r.recording ? (c(), u("div", $r, [
4184
- t[8] || (t[8] = o("span", {
4252
+ r.recording ? (c(), u("div", ei, [
4253
+ t[8] || (t[8] = a("span", {
4185
4254
  class: "wm-rec__dot",
4186
4255
  "aria-hidden": "true"
4187
4256
  }, null, -1)),
4188
- o("span", Kr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4189
- o("button", {
4257
+ a("span", ti, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4258
+ a("button", {
4190
4259
  type: "button",
4191
4260
  class: "wm-rec__stop",
4192
- onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4261
+ onClick: t[0] || (t[0] = (...o) => s.stopRecording && s.stopRecording(...o))
4193
4262
  }, v(s.t("composer.stop")), 1)
4194
4263
  ])) : y("", !0),
4195
- o("form", {
4264
+ a("form", {
4196
4265
  class: O(["wm-compose", { "has-attach": r.attachOpen }]),
4197
- onSubmit: t[7] || (t[7] = G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4266
+ onSubmit: t[7] || (t[7] = G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
4198
4267
  }, [
4199
- o("input", {
4268
+ a("input", {
4200
4269
  ref: "fileEl",
4201
4270
  type: "file",
4202
4271
  hidden: "",
4203
4272
  multiple: "",
4204
- onChange: t[1] || (t[1] = (...a) => s.onFile && s.onFile(...a))
4273
+ onChange: t[1] || (t[1] = (...o) => s.onFile && s.onFile(...o))
4205
4274
  }, null, 544),
4206
4275
  r.attachOpen ? (c(), u("div", {
4207
4276
  key: 0,
4208
4277
  class: "wm-compose__overlay",
4209
- onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4278
+ onClick: t[2] || (t[2] = (o) => r.attachOpen = !1)
4210
4279
  })) : y("", !0),
4211
- r.attachOpen ? (c(), u("div", Vr, [
4212
- (c(!0), u(B, null, D(s.attachItems, (a) => (c(), u("button", {
4213
- key: a.action,
4280
+ r.attachOpen ? (c(), u("div", ni, [
4281
+ (c(!0), u(E, null, U(s.attachItems, (o) => (c(), u("button", {
4282
+ key: o.action,
4214
4283
  type: "button",
4215
4284
  class: "wm-compose__menuItem",
4216
- disabled: a.disabled,
4217
- onClick: (l) => s.onAttachAction(a.action)
4285
+ disabled: o.disabled,
4286
+ onClick: (l) => s.onAttachAction(o.action)
4218
4287
  }, [
4219
- o("span", Gr, [
4220
- (c(), u("svg", Yr, [
4221
- o("path", {
4222
- d: a.path,
4288
+ a("span", ri, [
4289
+ (c(), u("svg", ii, [
4290
+ a("path", {
4291
+ d: o.path,
4223
4292
  stroke: "currentColor",
4224
4293
  "stroke-width": "1.8",
4225
4294
  "stroke-linecap": "round",
4226
4295
  "stroke-linejoin": "round",
4227
4296
  fill: "none"
4228
- }, null, 8, Jr)
4297
+ }, null, 8, ai)
4229
4298
  ]))
4230
4299
  ]),
4231
- o("span", null, v(a.label), 1)
4232
- ], 8, Wr))), 128))
4300
+ a("span", null, v(o.label), 1)
4301
+ ], 8, si))), 128))
4233
4302
  ])) : y("", !0),
4234
- V(o("textarea", {
4303
+ $(a("textarea", {
4235
4304
  ref: "inputEl",
4236
- "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
4305
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => r.local = o),
4237
4306
  class: "wm-compose__input",
4238
4307
  rows: "3",
4239
4308
  placeholder: n.placeholder,
4240
4309
  disabled: n.disabled,
4241
- onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
4242
- onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
4243
- }, null, 40, Qr), [
4310
+ onKeydown: t[4] || (t[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
4311
+ onInput: t[5] || (t[5] = (...o) => s.autosize && s.autosize(...o))
4312
+ }, null, 40, oi), [
4244
4313
  [X, r.local]
4245
4314
  ]),
4246
- o("div", Xr, [
4247
- o("button", {
4315
+ a("div", li, [
4316
+ a("button", {
4248
4317
  type: "button",
4249
4318
  class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
4250
4319
  title: n.attachLabel,
4251
4320
  "aria-label": n.attachLabel,
4252
4321
  disabled: r.recording,
4253
- onClick: t[6] || (t[6] = (a) => r.attachOpen = !r.attachOpen)
4322
+ onClick: t[6] || (t[6] = (o) => r.attachOpen = !r.attachOpen)
4254
4323
  }, [...t[9] || (t[9] = [
4255
- o("svg", {
4324
+ a("svg", {
4256
4325
  width: "13",
4257
4326
  height: "13",
4258
4327
  viewBox: "0 0 24 24",
@@ -4263,16 +4332,16 @@ function ti(e, t, n, i, r, s) {
4263
4332
  "stroke-linejoin": "round",
4264
4333
  "aria-hidden": "true"
4265
4334
  }, [
4266
- 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" })
4335
+ 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" })
4267
4336
  ], -1)
4268
- ])], 10, Zr),
4269
- o("button", {
4337
+ ])], 10, ci),
4338
+ a("button", {
4270
4339
  type: "submit",
4271
4340
  class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
4272
4341
  disabled: !s.canSend,
4273
4342
  "aria-label": s.t("composer.send")
4274
4343
  }, [...t[10] || (t[10] = [
4275
- o("svg", {
4344
+ a("svg", {
4276
4345
  width: "13",
4277
4346
  height: "13",
4278
4347
  viewBox: "0 0 24 24",
@@ -4283,14 +4352,14 @@ function ti(e, t, n, i, r, s) {
4283
4352
  "stroke-linejoin": "round",
4284
4353
  "aria-hidden": "true"
4285
4354
  }, [
4286
- o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4355
+ a("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4287
4356
  ], -1)
4288
- ])], 10, ei)
4357
+ ])], 10, di)
4289
4358
  ])
4290
4359
  ], 34)
4291
4360
  ], 6);
4292
4361
  }
4293
- const ni = /* @__PURE__ */ N(qr, [["render", ti], ["__scopeId", "data-v-01e81a27"]]), si = {
4362
+ const hi = /* @__PURE__ */ N(Zr, [["render", ui], ["__scopeId", "data-v-01e81a27"]]), mi = {
4294
4363
  name: "WmSuggestionChips",
4295
4364
  props: {
4296
4365
  items: { type: Array, default: () => [] },
@@ -4307,28 +4376,28 @@ const ni = /* @__PURE__ */ N(qr, [["render", ti], ["__scopeId", "data-v-01e81a27
4307
4376
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4308
4377
  }
4309
4378
  }
4310
- }, ri = ["onClick"];
4311
- function ii(e, t, n, i, r, s) {
4379
+ }, fi = ["onClick"];
4380
+ function _i(e, t, n, i, r, s) {
4312
4381
  return n.items.length ? (c(), u("div", {
4313
4382
  key: s.batchKey,
4314
4383
  class: "wm-chips"
4315
4384
  }, [
4316
- (c(!0), u(B, null, D(n.items, (a, l) => (c(), u("button", {
4385
+ (c(!0), u(E, null, U(n.items, (o, l) => (c(), u("button", {
4317
4386
  key: l,
4318
4387
  type: "button",
4319
4388
  class: "wm-chip",
4320
4389
  style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4321
- onClick: (p) => e.$emit("select", a)
4322
- }, v(a.label), 13, ri))), 128))
4390
+ onClick: (p) => e.$emit("select", o)
4391
+ }, v(o.label), 13, fi))), 128))
4323
4392
  ])) : y("", !0);
4324
4393
  }
4325
- const ai = /* @__PURE__ */ N(si, [["render", ii], ["__scopeId", "data-v-47ad8085"]]), oi = {
4394
+ const gi = /* @__PURE__ */ N(mi, [["render", _i], ["__scopeId", "data-v-47ad8085"]]), pi = {
4326
4395
  name: "WmApprovalCard",
4327
4396
  components: { AIAvatar: le },
4328
4397
  inject: {
4329
4398
  // Translator shared by the Messenger shell; French fallback when
4330
4399
  // the component is used standalone.
4331
- t: { default: () => j() }
4400
+ t: { default: () => D() }
4332
4401
  },
4333
4402
  props: {
4334
4403
  action: { type: String, required: !0 },
@@ -4366,27 +4435,27 @@ const ai = /* @__PURE__ */ N(si, [["render", ii], ["__scopeId", "data-v-47ad8085
4366
4435
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4367
4436
  }
4368
4437
  }
4369
- }, li = { class: "wm-approval" }, ci = { class: "wm-approval__head" }, di = { class: "wm-approval__icon" }, ui = { class: "wm-approval__main" }, hi = { class: "wm-approval__title" }, mi = {
4438
+ }, vi = { class: "wm-approval" }, yi = { class: "wm-approval__head" }, wi = { class: "wm-approval__icon" }, bi = { class: "wm-approval__main" }, ki = { class: "wm-approval__title" }, Ci = {
4370
4439
  key: 0,
4371
4440
  class: "wm-approval__detail"
4372
- }, fi = { class: "wm-approval__actions" };
4373
- function gi(e, t, n, i, r, s) {
4374
- const a = R("AIAvatar");
4375
- return c(), u("div", li, [
4376
- o("div", ci, [
4377
- o("div", di, [
4378
- $(a, {
4441
+ }, Ai = { class: "wm-approval__actions" };
4442
+ function Si(e, t, n, i, r, s) {
4443
+ const o = R("AIAvatar");
4444
+ return c(), u("div", vi, [
4445
+ a("div", yi, [
4446
+ a("div", wi, [
4447
+ K(o, {
4379
4448
  size: 24,
4380
4449
  name: n.agentName,
4381
4450
  "image-url": n.agentAvatarUrl
4382
4451
  }, null, 8, ["name", "image-url"])
4383
4452
  ]),
4384
- o("div", ui, [
4385
- o("div", hi, v(n.action), 1),
4386
- n.detail ? (c(), u("div", mi, v(n.detail), 1)) : y("", !0)
4453
+ a("div", bi, [
4454
+ a("div", ki, v(n.action), 1),
4455
+ n.detail ? (c(), u("div", Ci, v(n.detail), 1)) : y("", !0)
4387
4456
  ])
4388
4457
  ]),
4389
- o("div", fi, [
4458
+ a("div", Ai, [
4390
4459
  s.rejectId ? (c(), u("button", {
4391
4460
  key: 0,
4392
4461
  type: "button",
@@ -4402,9 +4471,9 @@ function gi(e, t, n, i, r, s) {
4402
4471
  ])
4403
4472
  ]);
4404
4473
  }
4405
- const _i = /* @__PURE__ */ N(oi, [["render", gi], ["__scopeId", "data-v-a2bed37e"]]);
4474
+ const Mi = /* @__PURE__ */ N(pi, [["render", Si], ["__scopeId", "data-v-a2bed37e"]]);
4406
4475
  let Oe = 0;
4407
- const pi = /* @__PURE__ */ new Set([
4476
+ const Ti = /* @__PURE__ */ new Set([
4408
4477
  "text",
4409
4478
  "textarea",
4410
4479
  "number",
@@ -4412,13 +4481,13 @@ const pi = /* @__PURE__ */ new Set([
4412
4481
  "select",
4413
4482
  "multiselect",
4414
4483
  "date"
4415
- ]), vi = {
4484
+ ]), xi = {
4416
4485
  name: "WmFormCard",
4417
4486
  components: { AIAvatar: le },
4418
4487
  inject: {
4419
4488
  // Translator shared by the Messenger shell; French fallback when
4420
4489
  // the component is used standalone.
4421
- t: { default: () => j() }
4490
+ t: { default: () => D() }
4422
4491
  },
4423
4492
  props: {
4424
4493
  form: { type: Object, required: !0 },
@@ -4442,7 +4511,7 @@ const pi = /* @__PURE__ */ new Set([
4442
4511
  // douteux.
4443
4512
  normalizedFields() {
4444
4513
  var t;
4445
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !pi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4514
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Ti.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4446
4515
  }
4447
4516
  },
4448
4517
  created() {
@@ -4495,65 +4564,65 @@ const pi = /* @__PURE__ */ new Set([
4495
4564
  }
4496
4565
  }
4497
4566
  }
4498
- }, yi = { class: "wm-form" }, wi = { class: "wm-form__head" }, bi = { class: "wm-form__icon" }, ki = { class: "wm-form__main" }, Ci = { class: "wm-form__title" }, Ai = {
4567
+ }, Oi = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ii = { class: "wm-form__icon" }, Ei = { class: "wm-form__main" }, Bi = { class: "wm-form__title" }, Ri = {
4499
4568
  key: 0,
4500
4569
  class: "wm-form__detail"
4501
- }, Si = ["for"], Mi = {
4570
+ }, Ni = ["for"], Pi = {
4502
4571
  key: 0,
4503
4572
  class: "wm-form__req",
4504
4573
  "aria-hidden": "true"
4505
- }, Ti = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Oi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Li = ["id", "onUpdate:modelValue", "required", "disabled"], Ii = {
4574
+ }, Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ui = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Di = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "required", "disabled"], Hi = {
4506
4575
  key: 4,
4507
4576
  class: "wm-form__bool"
4508
- }, Ei = ["id", "onUpdate:modelValue", "disabled"], Bi = ["id", "onUpdate:modelValue", "required", "disabled"], Ri = {
4577
+ }, zi = ["id", "onUpdate:modelValue", "disabled"], qi = ["id", "onUpdate:modelValue", "required", "disabled"], Ki = {
4509
4578
  value: "",
4510
4579
  disabled: ""
4511
- }, Ni = ["value"], Pi = {
4580
+ }, Vi = ["value"], $i = {
4512
4581
  key: 6,
4513
4582
  class: "wm-form__multi"
4514
- }, Fi = ["value", "checked", "disabled", "onChange"], Ui = {
4583
+ }, Wi = ["value", "checked", "disabled", "onChange"], Gi = {
4515
4584
  key: 0,
4516
4585
  class: "wm-form__err"
4517
- }, Di = ["disabled"], ji = {
4586
+ }, Yi = ["disabled"], Ji = {
4518
4587
  key: 0,
4519
4588
  class: "wm-form__spinner",
4520
4589
  "aria-hidden": "true"
4521
- }, Hi = {
4590
+ }, Qi = {
4522
4591
  key: 2,
4523
4592
  class: "wm-form__doneLbl"
4524
4593
  };
4525
- function zi(e, t, n, i, r, s) {
4526
- const a = R("AIAvatar");
4527
- return c(), u("div", yi, [
4528
- o("div", wi, [
4529
- o("div", bi, [
4530
- $(a, {
4594
+ function Xi(e, t, n, i, r, s) {
4595
+ const o = R("AIAvatar");
4596
+ return c(), u("div", Oi, [
4597
+ a("div", Li, [
4598
+ a("div", Ii, [
4599
+ K(o, {
4531
4600
  size: 24,
4532
4601
  name: n.agentName,
4533
4602
  "image-url": n.agentAvatarUrl
4534
4603
  }, null, 8, ["name", "image-url"])
4535
4604
  ]),
4536
- o("div", ki, [
4537
- o("div", Ci, v(n.form.title || s.t("form.title")), 1),
4538
- n.form.description ? (c(), u("div", Ai, v(n.form.description), 1)) : y("", !0)
4605
+ a("div", Ei, [
4606
+ a("div", Bi, v(n.form.title || s.t("form.title")), 1),
4607
+ n.form.description ? (c(), u("div", Ri, v(n.form.description), 1)) : y("", !0)
4539
4608
  ])
4540
4609
  ]),
4541
- o("form", {
4610
+ a("form", {
4542
4611
  class: "wm-form__body",
4543
4612
  onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4544
4613
  }, [
4545
- (c(!0), u(B, null, D(s.normalizedFields, (l) => (c(), u("div", {
4614
+ (c(!0), u(E, null, U(s.normalizedFields, (l) => (c(), u("div", {
4546
4615
  key: l.key,
4547
4616
  class: "wm-form__field"
4548
4617
  }, [
4549
- o("label", {
4618
+ a("label", {
4550
4619
  for: `wm-f-${r._uid}-${l.key}`,
4551
4620
  class: "wm-form__label"
4552
4621
  }, [
4553
4622
  ve(v(l.label), 1),
4554
- l.required ? (c(), u("span", Mi, "*")) : y("", !0)
4555
- ], 8, Si),
4556
- l.type === "text" ? V((c(), u("input", {
4623
+ l.required ? (c(), u("span", Pi, "*")) : y("", !0)
4624
+ ], 8, Ni),
4625
+ l.type === "text" ? $((c(), u("input", {
4557
4626
  key: 0,
4558
4627
  id: `wm-f-${r._uid}-${l.key}`,
4559
4628
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4562,9 +4631,9 @@ function zi(e, t, n, i, r, s) {
4562
4631
  placeholder: l.placeholder || "",
4563
4632
  required: l.required,
4564
4633
  disabled: n.readOnly || r.busy
4565
- }, null, 8, Ti)), [
4634
+ }, null, 8, Fi)), [
4566
4635
  [X, r.values[l.key]]
4567
- ]) : l.type === "textarea" ? V((c(), u("textarea", {
4636
+ ]) : l.type === "textarea" ? $((c(), u("textarea", {
4568
4637
  key: 1,
4569
4638
  id: `wm-f-${r._uid}-${l.key}`,
4570
4639
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4573,9 +4642,9 @@ function zi(e, t, n, i, r, s) {
4573
4642
  placeholder: l.placeholder || "",
4574
4643
  required: l.required,
4575
4644
  disabled: n.readOnly || r.busy
4576
- }, null, 8, xi)), [
4645
+ }, null, 8, Ui)), [
4577
4646
  [X, r.values[l.key]]
4578
- ]) : l.type === "number" ? V((c(), u("input", {
4647
+ ]) : l.type === "number" ? $((c(), u("input", {
4579
4648
  key: 2,
4580
4649
  id: `wm-f-${r._uid}-${l.key}`,
4581
4650
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4584,14 +4653,14 @@ function zi(e, t, n, i, r, s) {
4584
4653
  placeholder: l.placeholder || "",
4585
4654
  required: l.required,
4586
4655
  disabled: n.readOnly || r.busy
4587
- }, null, 8, Oi)), [
4656
+ }, null, 8, Di)), [
4588
4657
  [
4589
4658
  X,
4590
4659
  r.values[l.key],
4591
4660
  void 0,
4592
4661
  { number: !0 }
4593
4662
  ]
4594
- ]) : l.type === "date" ? V((c(), u("input", {
4663
+ ]) : l.type === "date" ? $((c(), u("input", {
4595
4664
  key: 3,
4596
4665
  id: `wm-f-${r._uid}-${l.key}`,
4597
4666
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4599,19 +4668,19 @@ function zi(e, t, n, i, r, s) {
4599
4668
  class: "wm-form__input",
4600
4669
  required: l.required,
4601
4670
  disabled: n.readOnly || r.busy
4602
- }, null, 8, Li)), [
4671
+ }, null, 8, ji)), [
4603
4672
  [X, r.values[l.key]]
4604
- ]) : l.type === "boolean" ? (c(), u("label", Ii, [
4605
- V(o("input", {
4673
+ ]) : l.type === "boolean" ? (c(), u("label", Hi, [
4674
+ $(a("input", {
4606
4675
  id: `wm-f-${r._uid}-${l.key}`,
4607
4676
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
4608
4677
  type: "checkbox",
4609
4678
  disabled: n.readOnly || r.busy
4610
- }, null, 8, Ei), [
4679
+ }, null, 8, zi), [
4611
4680
  [He, r.values[l.key]]
4612
4681
  ]),
4613
- o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4614
- ])) : l.type === "select" ? V((c(), u("select", {
4682
+ a("span", null, v(l.placeholder || s.t("common.yes")), 1)
4683
+ ])) : l.type === "select" ? $((c(), u("select", {
4615
4684
  key: 5,
4616
4685
  id: `wm-f-${r._uid}-${l.key}`,
4617
4686
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4619,19 +4688,19 @@ function zi(e, t, n, i, r, s) {
4619
4688
  required: l.required,
4620
4689
  disabled: n.readOnly || r.busy
4621
4690
  }, [
4622
- o("option", Ri, v(l.placeholder || s.t("form.choose")), 1),
4623
- (c(!0), u(B, null, D(l.options, (p) => (c(), u("option", {
4691
+ a("option", Ki, v(l.placeholder || s.t("form.choose")), 1),
4692
+ (c(!0), u(E, null, U(l.options, (p) => (c(), u("option", {
4624
4693
  key: p.value,
4625
4694
  value: p.value
4626
- }, v(p.label), 9, Ni))), 128))
4627
- ], 8, Bi)), [
4695
+ }, v(p.label), 9, Vi))), 128))
4696
+ ], 8, qi)), [
4628
4697
  [ze, r.values[l.key]]
4629
- ]) : l.type === "multiselect" ? (c(), u("div", Pi, [
4630
- (c(!0), u(B, null, D(l.options, (p) => (c(), u("label", {
4698
+ ]) : l.type === "multiselect" ? (c(), u("div", $i, [
4699
+ (c(!0), u(E, null, U(l.options, (p) => (c(), u("label", {
4631
4700
  key: p.value,
4632
4701
  class: "wm-form__multiItem"
4633
4702
  }, [
4634
- o("input", {
4703
+ a("input", {
4635
4704
  type: "checkbox",
4636
4705
  value: p.value,
4637
4706
  checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
@@ -4641,30 +4710,30 @@ function zi(e, t, n, i, r, s) {
4641
4710
  p.value,
4642
4711
  k.target.checked
4643
4712
  )
4644
- }, null, 40, Fi),
4645
- o("span", null, v(p.label), 1)
4713
+ }, null, 40, Wi),
4714
+ a("span", null, v(p.label), 1)
4646
4715
  ]))), 128))
4647
4716
  ])) : y("", !0)
4648
4717
  ]))), 128)),
4649
- r.error ? (c(), u("div", Ui, v(r.error), 1)) : y("", !0),
4650
- n.readOnly ? (c(), u("div", Hi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4718
+ r.error ? (c(), u("div", Gi, v(r.error), 1)) : y("", !0),
4719
+ n.readOnly ? (c(), u("div", Qi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4651
4720
  key: 1,
4652
4721
  type: "submit",
4653
4722
  class: "wm-form__submit",
4654
4723
  disabled: r.busy
4655
4724
  }, [
4656
- r.busy ? (c(), u("span", ji)) : y("", !0),
4657
- o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4658
- ], 8, Di))
4725
+ r.busy ? (c(), u("span", Ji)) : y("", !0),
4726
+ a("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4727
+ ], 8, Yi))
4659
4728
  ], 32)
4660
4729
  ]);
4661
4730
  }
4662
- const qi = /* @__PURE__ */ N(vi, [["render", zi], ["__scopeId", "data-v-fe65cc56"]]), $i = {
4731
+ const Zi = /* @__PURE__ */ N(xi, [["render", Xi], ["__scopeId", "data-v-fe65cc56"]]), ea = {
4663
4732
  name: "WmFeedback",
4664
4733
  inject: {
4665
4734
  // Translator shared by the Messenger shell; French fallback when
4666
4735
  // the component is used standalone.
4667
- t: { default: () => j() }
4736
+ t: { default: () => D() }
4668
4737
  },
4669
4738
  props: {
4670
4739
  busy: { type: Boolean, default: !1 },
@@ -4693,15 +4762,15 @@ const qi = /* @__PURE__ */ N(vi, [["render", zi], ["__scopeId", "data-v-fe65cc56
4693
4762
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4694
4763
  }
4695
4764
  }
4696
- }, Ki = { class: "wm-fb" }, Vi = { class: "wm-fb__title" }, Wi = { class: "wm-fb__sub" }, Gi = { class: "wm-fb__row" }, Yi = ["onClick"], Ji = { class: "wm-fb__emoji" }, Qi = { class: "wm-fb__label" }, Xi = ["disabled"], Zi = {
4765
+ }, ta = { class: "wm-fb" }, na = { class: "wm-fb__title" }, sa = { class: "wm-fb__sub" }, ra = { class: "wm-fb__row" }, ia = ["onClick"], aa = { class: "wm-fb__emoji" }, oa = { class: "wm-fb__label" }, la = ["disabled"], ca = {
4697
4766
  key: 1,
4698
4767
  class: "wm-fb__done"
4699
- }, ea = { class: "wm-fb__doneTitle" }, ta = { class: "wm-fb__doneSub" };
4700
- function na(e, t, n, i, r, s) {
4701
- return c(), u("div", Ki, [
4702
- n.done ? (c(), u("div", Zi, [
4703
- t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4704
- o("svg", {
4768
+ }, da = { class: "wm-fb__doneTitle" }, ua = { class: "wm-fb__doneSub" };
4769
+ function ha(e, t, n, i, r, s) {
4770
+ return c(), u("div", ta, [
4771
+ n.done ? (c(), u("div", ca, [
4772
+ t[1] || (t[1] = a("div", { class: "wm-fb__check" }, [
4773
+ a("svg", {
4705
4774
  width: "16",
4706
4775
  height: "16",
4707
4776
  viewBox: "0 0 24 24",
@@ -4712,40 +4781,40 @@ function na(e, t, n, i, r, s) {
4712
4781
  "stroke-linejoin": "round",
4713
4782
  "aria-hidden": "true"
4714
4783
  }, [
4715
- o("path", { d: "M20 6L9 17l-5-5" })
4784
+ a("path", { d: "M20 6L9 17l-5-5" })
4716
4785
  ])
4717
4786
  ], -1)),
4718
- o("div", ea, v(s.t("feedback.doneTitle")), 1),
4719
- o("div", ta, v(s.t("feedback.doneSubtitle")), 1)
4720
- ])) : (c(), u(B, { key: 0 }, [
4721
- o("div", Vi, v(s.t("feedback.question")), 1),
4722
- o("div", Wi, v(s.t("feedback.subtitle")), 1),
4723
- o("div", Gi, [
4724
- (c(!0), u(B, null, D(s.options, (a) => (c(), u("button", {
4725
- key: a.v,
4787
+ a("div", da, v(s.t("feedback.doneTitle")), 1),
4788
+ a("div", ua, v(s.t("feedback.doneSubtitle")), 1)
4789
+ ])) : (c(), u(E, { key: 0 }, [
4790
+ a("div", na, v(s.t("feedback.question")), 1),
4791
+ a("div", sa, v(s.t("feedback.subtitle")), 1),
4792
+ a("div", ra, [
4793
+ (c(!0), u(E, null, U(s.options, (o) => (c(), u("button", {
4794
+ key: o.v,
4726
4795
  type: "button",
4727
- class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4728
- onClick: (l) => r.sel = a.v
4796
+ class: O(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
4797
+ onClick: (l) => r.sel = o.v
4729
4798
  }, [
4730
- o("span", Ji, v(a.e), 1),
4731
- o("span", Qi, v(a.l), 1)
4732
- ], 10, Yi))), 128))
4799
+ a("span", aa, v(o.e), 1),
4800
+ a("span", oa, v(o.l), 1)
4801
+ ], 10, ia))), 128))
4733
4802
  ]),
4734
- o("button", {
4803
+ a("button", {
4735
4804
  type: "button",
4736
4805
  class: "wm-fb__send",
4737
4806
  disabled: !r.sel || n.busy,
4738
- onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
4739
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Xi)
4807
+ onClick: t[0] || (t[0] = (...o) => s.onSend && s.onSend(...o))
4808
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, la)
4740
4809
  ], 64))
4741
4810
  ]);
4742
4811
  }
4743
- const sa = /* @__PURE__ */ N($i, [["render", na], ["__scopeId", "data-v-9b630564"]]), ra = {
4812
+ const ma = /* @__PURE__ */ N(ea, [["render", ha], ["__scopeId", "data-v-9b630564"]]), fa = {
4744
4813
  name: "WmMoreMenu",
4745
4814
  inject: {
4746
4815
  // Translator shared by the Messenger shell; French fallback when
4747
4816
  // the component is used standalone.
4748
- t: { default: () => j() }
4817
+ t: { default: () => D() }
4749
4818
  },
4750
4819
  props: {
4751
4820
  canRename: { type: Boolean, default: !0 },
@@ -4783,32 +4852,32 @@ const sa = /* @__PURE__ */ N($i, [["render", na], ["__scopeId", "data-v-9b630564
4783
4852
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4784
4853
  }
4785
4854
  }
4786
- }, ia = { class: "wm-mm" }, aa = {
4855
+ }, _a = { class: "wm-mm" }, ga = {
4787
4856
  class: "wm-mm__pop",
4788
4857
  role: "menu"
4789
- }, oa = {
4858
+ }, pa = {
4790
4859
  key: 0,
4791
4860
  class: "wm-mm__section"
4792
- }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = {
4861
+ }, va = { class: "wm-mm__label" }, ya = { class: "wm-mm__label" }, wa = {
4793
4862
  key: 1,
4794
4863
  class: "wm-mm__sep"
4795
- }, ua = { class: "wm-mm__section" }, ha = { class: "wm-mm__label" }, ma = { class: "wm-mm__label" }, fa = { class: "wm-mm__section" }, ga = { class: "wm-mm__label" }, _a = { class: "wm-mm__label" };
4796
- function pa(e, t, n, i, r, s) {
4797
- return c(), u("div", ia, [
4798
- o("div", {
4864
+ }, ba = { class: "wm-mm__section" }, ka = { class: "wm-mm__label" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__section" }, Sa = { class: "wm-mm__label" }, Ma = { class: "wm-mm__label" };
4865
+ function Ta(e, t, n, i, r, s) {
4866
+ return c(), u("div", _a, [
4867
+ a("div", {
4799
4868
  class: "wm-mm__scrim",
4800
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4869
+ onClick: t[0] || (t[0] = (o) => e.$emit("close"))
4801
4870
  }),
4802
- o("div", aa, [
4803
- n.canRename || n.canExport ? (c(), u("div", oa, [
4871
+ a("div", ga, [
4872
+ n.canRename || n.canExport ? (c(), u("div", pa, [
4804
4873
  n.canRename ? (c(), u("button", {
4805
4874
  key: 0,
4806
4875
  type: "button",
4807
4876
  class: "wm-mm__item",
4808
- onClick: t[1] || (t[1] = (a) => s.emit("rename"))
4877
+ onClick: t[1] || (t[1] = (o) => s.emit("rename"))
4809
4878
  }, [
4810
- t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
4811
- o("svg", {
4879
+ t[7] || (t[7] = a("span", { class: "wm-mm__icon" }, [
4880
+ a("svg", {
4812
4881
  width: "12",
4813
4882
  height: "12",
4814
4883
  viewBox: "0 0 24 24",
@@ -4819,20 +4888,20 @@ function pa(e, t, n, i, r, s) {
4819
4888
  "stroke-linejoin": "round",
4820
4889
  "aria-hidden": "true"
4821
4890
  }, [
4822
- o("path", { d: "M12 20h9" }),
4823
- o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4891
+ a("path", { d: "M12 20h9" }),
4892
+ a("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4824
4893
  ])
4825
4894
  ], -1)),
4826
- o("span", la, v(s.t("moreMenu.editTitle")), 1)
4895
+ a("span", va, v(s.t("moreMenu.editTitle")), 1)
4827
4896
  ])) : y("", !0),
4828
4897
  n.canExport ? (c(), u("button", {
4829
4898
  key: 1,
4830
4899
  type: "button",
4831
4900
  class: "wm-mm__item",
4832
- onClick: t[2] || (t[2] = (a) => s.emit("export"))
4901
+ onClick: t[2] || (t[2] = (o) => s.emit("export"))
4833
4902
  }, [
4834
- t[8] || (t[8] = o("span", { class: "wm-mm__icon" }, [
4835
- o("svg", {
4903
+ t[8] || (t[8] = a("span", { class: "wm-mm__icon" }, [
4904
+ a("svg", {
4836
4905
  width: "12",
4837
4906
  height: "12",
4838
4907
  viewBox: "0 0 24 24",
@@ -4843,22 +4912,22 @@ function pa(e, t, n, i, r, s) {
4843
4912
  "stroke-linejoin": "round",
4844
4913
  "aria-hidden": "true"
4845
4914
  }, [
4846
- o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4915
+ a("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4847
4916
  ])
4848
4917
  ], -1)),
4849
- o("span", ca, v(s.t("moreMenu.exportTranscript")), 1),
4850
- t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4918
+ a("span", ya, v(s.t("moreMenu.exportTranscript")), 1),
4919
+ t[9] || (t[9] = a("span", { class: "wm-mm__hint" }, ".txt", -1))
4851
4920
  ])) : y("", !0)
4852
4921
  ])) : y("", !0),
4853
- n.canRename || n.canExport ? (c(), u("div", da)) : y("", !0),
4854
- o("div", ua, [
4855
- o("button", {
4922
+ n.canRename || n.canExport ? (c(), u("div", wa)) : y("", !0),
4923
+ a("div", ba, [
4924
+ a("button", {
4856
4925
  type: "button",
4857
4926
  class: "wm-mm__item",
4858
- onClick: t[3] || (t[3] = (...a) => s.toggleSound && s.toggleSound(...a))
4927
+ onClick: t[3] || (t[3] = (...o) => s.toggleSound && s.toggleSound(...o))
4859
4928
  }, [
4860
- t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
4861
- o("svg", {
4929
+ t[11] || (t[11] = a("span", { class: "wm-mm__icon" }, [
4930
+ a("svg", {
4862
4931
  width: "12",
4863
4932
  height: "12",
4864
4933
  viewBox: "0 0 24 24",
@@ -4869,24 +4938,24 @@ function pa(e, t, n, i, r, s) {
4869
4938
  "stroke-linejoin": "round",
4870
4939
  "aria-hidden": "true"
4871
4940
  }, [
4872
- o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
4873
- o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4941
+ a("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
4942
+ a("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4874
4943
  ])
4875
4944
  ], -1)),
4876
- o("span", ha, v(s.t("moreMenu.sound")), 1),
4877
- o("span", {
4945
+ a("span", ka, v(s.t("moreMenu.sound")), 1),
4946
+ a("span", {
4878
4947
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
4879
4948
  }, [...t[10] || (t[10] = [
4880
- o("span", { class: "wm-mm__knob" }, null, -1)
4949
+ a("span", { class: "wm-mm__knob" }, null, -1)
4881
4950
  ])], 2)
4882
4951
  ]),
4883
- o("button", {
4952
+ a("button", {
4884
4953
  type: "button",
4885
4954
  class: "wm-mm__item",
4886
- onClick: t[4] || (t[4] = (...a) => s.toggleBrowserNotif && s.toggleBrowserNotif(...a))
4955
+ onClick: t[4] || (t[4] = (...o) => s.toggleBrowserNotif && s.toggleBrowserNotif(...o))
4887
4956
  }, [
4888
- t[13] || (t[13] = o("span", { class: "wm-mm__icon" }, [
4889
- o("svg", {
4957
+ t[13] || (t[13] = a("span", { class: "wm-mm__icon" }, [
4958
+ a("svg", {
4890
4959
  width: "12",
4891
4960
  height: "12",
4892
4961
  viewBox: "0 0 24 24",
@@ -4897,27 +4966,27 @@ function pa(e, t, n, i, r, s) {
4897
4966
  "stroke-linejoin": "round",
4898
4967
  "aria-hidden": "true"
4899
4968
  }, [
4900
- 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" })
4969
+ 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" })
4901
4970
  ])
4902
4971
  ], -1)),
4903
- o("span", ma, v(s.t("moreMenu.browserNotifications")), 1),
4904
- o("span", {
4972
+ a("span", Ca, v(s.t("moreMenu.browserNotifications")), 1),
4973
+ a("span", {
4905
4974
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
4906
4975
  }, [...t[12] || (t[12] = [
4907
- o("span", { class: "wm-mm__knob" }, null, -1)
4976
+ a("span", { class: "wm-mm__knob" }, null, -1)
4908
4977
  ])], 2)
4909
4978
  ])
4910
4979
  ]),
4911
- t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
4912
- o("div", fa, [
4980
+ t[16] || (t[16] = a("div", { class: "wm-mm__sep" }, null, -1)),
4981
+ a("div", Aa, [
4913
4982
  n.statusUrl ? (c(), u("button", {
4914
4983
  key: 0,
4915
4984
  type: "button",
4916
4985
  class: "wm-mm__item",
4917
- onClick: t[5] || (t[5] = (a) => s.emit("status"))
4986
+ onClick: t[5] || (t[5] = (o) => s.emit("status"))
4918
4987
  }, [
4919
- t[14] || (t[14] = o("span", { class: "wm-mm__icon" }, [
4920
- o("svg", {
4988
+ t[14] || (t[14] = a("span", { class: "wm-mm__icon" }, [
4989
+ a("svg", {
4921
4990
  width: "12",
4922
4991
  height: "12",
4923
4992
  viewBox: "0 0 24 24",
@@ -4928,19 +4997,19 @@ function pa(e, t, n, i, r, s) {
4928
4997
  "stroke-linejoin": "round",
4929
4998
  "aria-hidden": "true"
4930
4999
  }, [
4931
- o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5000
+ a("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
4932
5001
  ])
4933
5002
  ], -1)),
4934
- o("span", ga, v(s.t("moreMenu.serviceStatus")), 1)
5003
+ a("span", Sa, v(s.t("moreMenu.serviceStatus")), 1)
4935
5004
  ])) : y("", !0),
4936
5005
  n.helpUrl ? (c(), u("button", {
4937
5006
  key: 1,
4938
5007
  type: "button",
4939
5008
  class: "wm-mm__item",
4940
- onClick: t[6] || (t[6] = (a) => s.emit("help"))
5009
+ onClick: t[6] || (t[6] = (o) => s.emit("help"))
4941
5010
  }, [
4942
- t[15] || (t[15] = o("span", { class: "wm-mm__icon" }, [
4943
- o("svg", {
5011
+ t[15] || (t[15] = a("span", { class: "wm-mm__icon" }, [
5012
+ a("svg", {
4944
5013
  width: "12",
4945
5014
  height: "12",
4946
5015
  viewBox: "0 0 24 24",
@@ -4951,21 +5020,21 @@ function pa(e, t, n, i, r, s) {
4951
5020
  "stroke-linejoin": "round",
4952
5021
  "aria-hidden": "true"
4953
5022
  }, [
4954
- 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" })
5023
+ 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" })
4955
5024
  ])
4956
5025
  ], -1)),
4957
- o("span", _a, v(s.t("moreMenu.helpCenter")), 1)
5026
+ a("span", Ma, v(s.t("moreMenu.helpCenter")), 1)
4958
5027
  ])) : y("", !0)
4959
5028
  ])
4960
5029
  ])
4961
5030
  ]);
4962
5031
  }
4963
- const va = /* @__PURE__ */ N(ra, [["render", pa], ["__scopeId", "data-v-76281e95"]]), ya = {
5032
+ const xa = /* @__PURE__ */ N(fa, [["render", Ta], ["__scopeId", "data-v-76281e95"]]), Oa = {
4964
5033
  name: "WmRenameDialog",
4965
5034
  inject: {
4966
5035
  // Translator shared by the Messenger shell; French fallback when
4967
5036
  // the component is used standalone.
4968
- t: { default: () => j() }
5037
+ t: { default: () => D() }
4969
5038
  },
4970
5039
  props: {
4971
5040
  // Empty defaults: the resolved fallback comes from the translator
@@ -5002,27 +5071,27 @@ const va = /* @__PURE__ */ N(ra, [["render", pa], ["__scopeId", "data-v-76281e95
5002
5071
  this.canSubmit && this.$emit("submit", this.value.trim());
5003
5072
  }
5004
5073
  }
5005
- }, wa = { class: "wm-dialog" }, ba = {
5074
+ }, La = { class: "wm-dialog" }, Ia = {
5006
5075
  class: "wm-dialog__card",
5007
5076
  role: "dialog",
5008
5077
  "aria-modal": "true"
5009
- }, ka = { class: "wm-dialog__head" }, Ca = { class: "wm-dialog__title" }, Aa = ["aria-label"], Sa = { class: "wm-dialog__body" }, Ma = ["placeholder"], Ta = { class: "wm-dialog__actions" }, xa = ["disabled"];
5010
- function Oa(e, t, n, i, r, s) {
5011
- return c(), u("div", wa, [
5012
- o("div", {
5078
+ }, Ea = { class: "wm-dialog__head" }, Ba = { class: "wm-dialog__title" }, Ra = ["aria-label"], Na = { class: "wm-dialog__body" }, Pa = ["placeholder"], Fa = { class: "wm-dialog__actions" }, Ua = ["disabled"];
5079
+ function Da(e, t, n, i, r, s) {
5080
+ return c(), u("div", La, [
5081
+ a("div", {
5013
5082
  class: "wm-dialog__scrim",
5014
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5083
+ onClick: t[0] || (t[0] = (o) => e.$emit("close"))
5015
5084
  }),
5016
- o("div", ba, [
5017
- o("div", ka, [
5018
- o("div", Ca, v(n.title || s.t("rename.title")), 1),
5019
- o("button", {
5085
+ a("div", Ia, [
5086
+ a("div", Ea, [
5087
+ a("div", Ba, v(n.title || s.t("rename.title")), 1),
5088
+ a("button", {
5020
5089
  type: "button",
5021
5090
  class: "wm-dialog__close",
5022
5091
  "aria-label": s.t("common.close"),
5023
- onClick: t[1] || (t[1] = (a) => e.$emit("close"))
5092
+ onClick: t[1] || (t[1] = (o) => e.$emit("close"))
5024
5093
  }, [...t[7] || (t[7] = [
5025
- o("svg", {
5094
+ a("svg", {
5026
5095
  width: "12",
5027
5096
  height: "12",
5028
5097
  viewBox: "0 0 24 24",
@@ -5033,62 +5102,62 @@ function Oa(e, t, n, i, r, s) {
5033
5102
  "stroke-linejoin": "round",
5034
5103
  "aria-hidden": "true"
5035
5104
  }, [
5036
- o("path", { d: "M18 6L6 18M6 6l12 12" })
5105
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
5037
5106
  ], -1)
5038
- ])], 8, Aa)
5107
+ ])], 8, Ra)
5039
5108
  ]),
5040
- o("div", Sa, [
5041
- V(o("input", {
5109
+ a("div", Na, [
5110
+ $(a("input", {
5042
5111
  ref: "input",
5043
- "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
5112
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
5044
5113
  type: "text",
5045
5114
  class: "wm-dialog__input",
5046
5115
  placeholder: n.placeholder || s.t("rename.placeholder"),
5047
5116
  maxlength: 120,
5048
5117
  onKeydown: [
5049
- t[3] || (t[3] = ue(G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5050
- t[4] || (t[4] = ue(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5118
+ t[3] || (t[3] = ue(G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]), ["enter"])),
5119
+ t[4] || (t[4] = ue(G((o) => e.$emit("close"), ["prevent"]), ["esc"]))
5051
5120
  ]
5052
- }, null, 40, Ma), [
5121
+ }, null, 40, Pa), [
5053
5122
  [X, r.value]
5054
5123
  ])
5055
5124
  ]),
5056
- o("div", Ta, [
5057
- o("button", {
5125
+ a("div", Fa, [
5126
+ a("button", {
5058
5127
  type: "button",
5059
5128
  class: "wm-dialog__btn",
5060
- onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5129
+ onClick: t[5] || (t[5] = (o) => e.$emit("close"))
5061
5130
  }, v(s.t("common.cancel")), 1),
5062
- o("button", {
5131
+ a("button", {
5063
5132
  type: "button",
5064
5133
  class: "wm-dialog__btn wm-dialog__btn--primary",
5065
5134
  disabled: !s.canSubmit,
5066
- onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
5067
- }, v(s.t("common.save")), 9, xa)
5135
+ onClick: t[6] || (t[6] = (...o) => s.onSubmit && s.onSubmit(...o))
5136
+ }, v(s.t("common.save")), 9, Ua)
5068
5137
  ])
5069
5138
  ])
5070
5139
  ]);
5071
5140
  }
5072
- const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8"]]), Le = "ww-messenger-tokens", Ia = {
5141
+ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8"]]), Le = "ww-messenger-tokens", Ha = {
5073
5142
  name: "Messenger",
5074
5143
  components: {
5075
5144
  Launcher: Pt,
5076
5145
  Header: ln,
5077
- Onboarding: $n,
5078
- MessageList: Fr,
5079
- Composer: ni,
5080
- SuggestionChips: ai,
5081
- ApprovalCard: _i,
5082
- FormCard: qi,
5083
- Feedback: sa,
5084
- MoreMenu: va,
5085
- RenameDialog: La
5146
+ Onboarding: es,
5147
+ MessageList: Wr,
5148
+ Composer: hi,
5149
+ SuggestionChips: gi,
5150
+ ApprovalCard: Mi,
5151
+ FormCard: Zi,
5152
+ Feedback: ma,
5153
+ MoreMenu: xa,
5154
+ RenameDialog: ja
5086
5155
  },
5087
5156
  mixins: [
5088
5157
  ot,
5089
5158
  mt,
5090
5159
  ft,
5091
- _t
5160
+ gt
5092
5161
  ],
5093
5162
  // Make signAttachment available to deep children (AttachmentPreview)
5094
5163
  // without prop drilling. The store may not exist yet at provide-time
@@ -5233,7 +5302,7 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5233
5302
  // `locale` changes. `t()` below (and the provided closure) delegate
5234
5303
  // to it so every string resolves against the current language.
5235
5304
  translator() {
5236
- return j(this.locale);
5305
+ return D(this.locale);
5237
5306
  },
5238
5307
  error() {
5239
5308
  var e;
@@ -5266,29 +5335,29 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5266
5335
  return this.allConversations.map((i) => {
5267
5336
  var k;
5268
5337
  const r = e[i.id] || [], s = W(i.last_read_message_id);
5269
- let a = 0, l = null;
5270
- for (let b = r.length - 1; b >= 0; b--) {
5271
- const T = r[b];
5338
+ let o = 0, l = null;
5339
+ for (let w = r.length - 1; w >= 0; w--) {
5340
+ const T = r[w];
5272
5341
  if (!T) continue;
5273
5342
  if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5274
- const E = W(T.id);
5275
- if (E != null) {
5276
- if (s != null && E <= s) break;
5277
- t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5343
+ const B = W(T.id);
5344
+ if (B != null) {
5345
+ if (s != null && B <= s) break;
5346
+ t[T.id] !== 0 && (!l && T.author && (l = T.author), o++);
5278
5347
  }
5279
5348
  }
5280
5349
  if (!r.length) {
5281
- const b = W(i.last_message_id);
5282
- b != null && (s == null || b > s) && (a = 1, l = i.last_message_author || null);
5350
+ const w = W(i.last_message_id);
5351
+ w != null && (s == null || w > s) && (o = 1, l = i.last_message_author || null);
5283
5352
  }
5284
5353
  const p = r.filter(
5285
- (b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
5354
+ (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
5286
5355
  );
5287
5356
  return {
5288
5357
  ...i,
5289
5358
  _preview: st(i, p),
5290
- _unread: a > 0,
5291
- _unreadCount: a,
5359
+ _unread: o > 0,
5360
+ _unreadCount: o,
5292
5361
  _lastAuthor: l
5293
5362
  };
5294
5363
  });
@@ -5321,7 +5390,7 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5321
5390
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5322
5391
  for (const i of this.drawerConversations) {
5323
5392
  if (!i._unread) continue;
5324
- const r = Me(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);
5393
+ const r = Me(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);
5325
5394
  t.push({
5326
5395
  convId: i.id,
5327
5396
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5466,8 +5535,8 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5466
5535
  }
5467
5536
  const t = this.revealedAt;
5468
5537
  return (this.s.messagesByConv[e.id] || []).filter((r) => {
5469
- var s, a, l, p, k;
5470
- 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;
5538
+ var s, o, l, p, k;
5539
+ 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;
5471
5540
  });
5472
5541
  },
5473
5542
  // True whenever we should show the "typing" indicator at the bottom
@@ -5503,14 +5572,14 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5503
5572
  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");
5504
5573
  },
5505
5574
  approvalDetail() {
5506
- var i, r, s, a, l, p;
5575
+ var i, r, s, o, l, p;
5507
5576
  const e = (s = (r = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
5508
5577
  if (typeof e == "string" && e.trim())
5509
5578
  return e.trim();
5510
- const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5579
+ const t = (p = (l = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5511
5580
  if (!t || typeof t != "object") return "";
5512
5581
  const n = Object.entries(t);
5513
- return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
5582
+ return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
5514
5583
  },
5515
5584
  actionInFlight() {
5516
5585
  var e, t;
@@ -5546,9 +5615,9 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5546
5615
  const e = this.currentConv;
5547
5616
  let t = /* @__PURE__ */ new Date();
5548
5617
  if (e) {
5549
- 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;
5550
- if (a) {
5551
- const l = new Date(a);
5618
+ 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;
5619
+ if (o) {
5620
+ const l = new Date(o);
5552
5621
  Number.isNaN(l.getTime()) || (t = l);
5553
5622
  }
5554
5623
  }
@@ -5577,12 +5646,12 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5577
5646
  // ts comparison in `launcherPeeks`.
5578
5647
  latestUnreads: {
5579
5648
  handler(e) {
5580
- const t = new Set(e.map((a) => a.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
5649
+ const t = new Set(e.map((o) => o.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
5581
5650
  if (!i.length) return;
5582
5651
  const r = {};
5583
5652
  let s = !1;
5584
- for (const a of i)
5585
- t.has(a) ? r[a] = n[a] : s = !0;
5653
+ for (const o of i)
5654
+ t.has(o) ? r[o] = n[o] : s = !0;
5586
5655
  s && (this.dismissedPeeks = r);
5587
5656
  },
5588
5657
  deep: !0
@@ -5754,8 +5823,8 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5754
5823
  if (!i) return;
5755
5824
  const r = Math.ceil(i.contentRect.height + 8);
5756
5825
  r !== this.floatHeight && (this.floatHeight = r, this.$nextTick(() => {
5757
- var s, a;
5758
- (a = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || a.call(s);
5826
+ var s, o;
5827
+ (o = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || o.call(s);
5759
5828
  }));
5760
5829
  }), this.floatRO.observe(t);
5761
5830
  }
@@ -5809,30 +5878,30 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
5809
5878
  this.launcherHovered = e, this.sendCurrentLauncherSize();
5810
5879
  },
5811
5880
  sendCurrentLauncherSize() {
5812
- var T, E, A, H, S, P, I;
5881
+ var w, T, B, A, H, S, F;
5813
5882
  if (this.isOpen) return;
5814
- const e = (E = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : E.call(T, ".wm-launcherWrap");
5883
+ const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
5815
5884
  if (!e) return;
5816
5885
  const t = e.getBoundingClientRect();
5817
5886
  if (!t.width || !t.height) return;
5818
- const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (S = (H = this.$el) == null ? void 0 : H.querySelector) == null ? void 0 : S.call(H, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (I = (P = this.$el) == null ? void 0 : P.querySelectorAll) == null ? void 0 : I.call(P, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
5819
- let b = null;
5820
- if (k) {
5821
- const U = k.getBoundingClientRect();
5822
- b = {
5823
- width: Math.ceil(U.width),
5824
- height: Math.ceil(U.height),
5825
- rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
5826
- bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
5887
+ 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 = (F = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : F.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
5888
+ let k = null;
5889
+ if (p) {
5890
+ const L = p.getBoundingClientRect();
5891
+ k = {
5892
+ width: Math.ceil(L.width),
5893
+ height: Math.ceil(L.height),
5894
+ rightOffset: Math.max(0, Math.ceil(t.right - L.right)),
5895
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - L.bottom))
5827
5896
  };
5828
5897
  }
5829
5898
  this.notifyParentResize("closed", {
5830
5899
  width: r + i,
5831
5900
  height: s + i,
5832
- launcherWidth: l ? Math.ceil(l.width) : null,
5833
- launcherHeight: l ? Math.ceil(l.height) : null,
5901
+ launcherWidth: (o == null ? void 0 : o.offsetWidth) || null,
5902
+ launcherHeight: (o == null ? void 0 : o.offsetHeight) || null,
5834
5903
  launcherHovered: this.launcherHovered,
5835
- peek: b,
5904
+ peek: k,
5836
5905
  peekHovered: this.launcherHovered && n
5837
5906
  });
5838
5907
  },
@@ -6071,33 +6140,33 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
6071
6140
  }
6072
6141
  }
6073
6142
  }
6074
- }, Ea = {
6143
+ }, za = {
6075
6144
  key: 0,
6076
6145
  class: "wm-loading",
6077
6146
  "aria-busy": "true",
6078
6147
  "aria-live": "polite"
6079
- }, Ba = ["aria-label"], Ra = {
6148
+ }, qa = ["aria-label"], Ka = {
6080
6149
  key: 0,
6081
6150
  class: "wm-state"
6082
- }, Na = { class: "wm-state__err" }, Pa = { class: "wm-state__errTitle" }, Fa = { class: "wm-state__errSub" }, Ua = { class: "wm-bottom" }, Da = {
6151
+ }, Va = { class: "wm-state__err" }, $a = { class: "wm-state__errTitle" }, Wa = { class: "wm-state__errSub" }, Ga = { class: "wm-bottom" }, Ya = {
6083
6152
  key: 0,
6084
6153
  ref: "floatEl",
6085
6154
  class: "wm-float"
6086
- }, ja = {
6155
+ }, Ja = {
6087
6156
  key: 1,
6088
6157
  class: "wm-actionWait",
6089
6158
  role: "status",
6090
6159
  "aria-live": "polite"
6091
- }, Ha = { class: "wm-actionWait__lbl" }, za = {
6160
+ }, Qa = { class: "wm-actionWait__lbl" }, Xa = {
6092
6161
  key: 2,
6093
6162
  class: "wm-attached"
6094
- }, qa = ["aria-label", "onClick"];
6095
- function $a(e, t, n, i, r, s) {
6096
- const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), b = R("ApprovalCard"), T = R("FormCard"), E = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), P = R("RenameDialog");
6163
+ }, Za = ["aria-label", "onClick"];
6164
+ function eo(e, t, n, i, r, s) {
6165
+ 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"), F = R("RenameDialog");
6097
6166
  return c(), u("div", {
6098
6167
  class: O(["wm-root", `wm-root--${n.displayMode}`])
6099
6168
  }, [
6100
- !r.isOpen && !s.isEmbedded ? (c(), F(a, {
6169
+ !r.isOpen && !s.isEmbedded ? (c(), P(o, {
6101
6170
  key: 0,
6102
6171
  "unread-count": s.unreadCount,
6103
6172
  peeks: s.launcherPeeks,
@@ -6115,17 +6184,17 @@ function $a(e, t, n, i, r, s) {
6115
6184
  style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
6116
6185
  role: "dialog",
6117
6186
  "aria-label": "Messenger",
6118
- onClick: t[5] || (t[5] = (...I) => s.onPanelClick && s.onPanelClick(...I))
6187
+ onClick: t[5] || (t[5] = (...L) => s.onPanelClick && s.onPanelClick(...L))
6119
6188
  }, [
6120
- !s.ready && !s.error ? (c(), u("div", Ea, [
6189
+ !s.ready && !s.error ? (c(), u("div", za, [
6121
6190
  s.isEmbedded ? y("", !0) : (c(), u("button", {
6122
6191
  key: 0,
6123
6192
  type: "button",
6124
6193
  class: "wm-loading__close",
6125
6194
  "aria-label": s.t("loading.minimize"),
6126
- onClick: t[0] || (t[0] = (...I) => s.close && s.close(...I))
6195
+ onClick: t[0] || (t[0] = (...L) => s.close && s.close(...L))
6127
6196
  }, [...t[6] || (t[6] = [
6128
- o("svg", {
6197
+ a("svg", {
6129
6198
  width: "13",
6130
6199
  height: "13",
6131
6200
  viewBox: "0 0 24 24",
@@ -6136,15 +6205,15 @@ function $a(e, t, n, i, r, s) {
6136
6205
  "stroke-linejoin": "round",
6137
6206
  "aria-hidden": "true"
6138
6207
  }, [
6139
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6208
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6140
6209
  ], -1)
6141
- ])], 8, Ba)),
6142
- t[7] || (t[7] = o("div", {
6210
+ ])], 8, qa)),
6211
+ t[7] || (t[7] = a("div", {
6143
6212
  class: "wm-loading__spinner",
6144
6213
  "aria-hidden": "true"
6145
6214
  }, null, -1))
6146
- ])) : (c(), u(B, { key: 1 }, [
6147
- $(l, {
6215
+ ])) : (c(), u(E, { key: 1 }, [
6216
+ K(l, {
6148
6217
  title: s.headerTitle,
6149
6218
  "team-members": s.teamMembers,
6150
6219
  "response-label": s.responseLabel,
@@ -6158,10 +6227,10 @@ function $a(e, t, n, i, r, s) {
6158
6227
  onMore: s.toggleMore,
6159
6228
  onClose: s.close
6160
6229
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6161
- s.error ? (c(), u("div", Ra, [
6162
- o("div", Na, [
6163
- t[8] || (t[8] = o("div", { class: "wm-state__errIcon" }, [
6164
- o("svg", {
6230
+ s.error ? (c(), u("div", Ka, [
6231
+ a("div", Va, [
6232
+ t[8] || (t[8] = a("div", { class: "wm-state__errIcon" }, [
6233
+ a("svg", {
6165
6234
  width: "14",
6166
6235
  height: "14",
6167
6236
  viewBox: "0 0 24 24",
@@ -6172,16 +6241,16 @@ function $a(e, t, n, i, r, s) {
6172
6241
  "stroke-linejoin": "round",
6173
6242
  "aria-hidden": "true"
6174
6243
  }, [
6175
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6244
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6176
6245
  ])
6177
6246
  ], -1)),
6178
- o("div", null, [
6179
- o("div", Pa, v(s.t("error.connectionFailed")), 1),
6180
- o("div", Fa, v(s.error), 1)
6247
+ a("div", null, [
6248
+ a("div", $a, v(s.t("error.connectionFailed")), 1),
6249
+ a("div", Wa, v(s.error), 1)
6181
6250
  ])
6182
6251
  ])
6183
- ])) : s.currentConv ? (c(), u(B, { key: 2 }, [
6184
- $(k, {
6252
+ ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
6253
+ K(k, {
6185
6254
  ref: "messageList",
6186
6255
  messages: s.displayedMessages,
6187
6256
  "streaming-active": s.streamingActive,
@@ -6195,9 +6264,9 @@ function $a(e, t, n, i, r, s) {
6195
6264
  "ai-agent-avatar-url": s.agentAvatarUrl,
6196
6265
  onLoadMore: s.onLoadMore
6197
6266
  }, 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"]),
6198
- o("div", Ua, [
6199
- s.floatVisible ? (c(), u("div", Da, [
6200
- s.approvalReady ? (c(), F(b, {
6267
+ a("div", Ga, [
6268
+ s.floatVisible ? (c(), u("div", Ya, [
6269
+ s.approvalReady ? (c(), P(w, {
6201
6270
  key: 0,
6202
6271
  action: s.approvalTitle,
6203
6272
  detail: s.approvalDetail,
@@ -6205,36 +6274,36 @@ function $a(e, t, n, i, r, s) {
6205
6274
  "agent-name": s.agentName,
6206
6275
  "agent-avatar-url": s.agentAvatarUrl,
6207
6276
  onCallback: s.onApprovalCallback
6208
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), F(T, {
6277
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), P(T, {
6209
6278
  key: s.pendingForm.message && s.pendingForm.message.id,
6210
6279
  form: s.pendingForm.form,
6211
6280
  "agent-name": s.agentName,
6212
6281
  "agent-avatar-url": s.agentAvatarUrl,
6213
6282
  onSubmit: s.onFormSubmit
6214
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), F(E, {
6283
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), P(B, {
6215
6284
  key: 2,
6216
6285
  busy: r.feedbackBusy,
6217
6286
  done: r.feedbackDone,
6218
6287
  onSubmit: s.onFeedback
6219
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), F(A, {
6288
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(A, {
6220
6289
  key: 3,
6221
6290
  items: s.suggestions,
6222
6291
  onSelect: s.onSuggestion
6223
6292
  }, null, 8, ["items", "onSelect"]))
6224
6293
  ], 512)) : y("", !0),
6225
- s.actionInFlight ? (c(), u("div", ja, [
6226
- t[9] || (t[9] = o("span", {
6294
+ s.actionInFlight ? (c(), u("div", Ja, [
6295
+ t[9] || (t[9] = a("span", {
6227
6296
  class: "wm-actionWait__spinner",
6228
6297
  "aria-hidden": "true"
6229
6298
  }, null, -1)),
6230
- o("span", Ha, v(s.t("action.inProgress", {
6299
+ a("span", Qa, v(s.t("action.inProgress", {
6231
6300
  name: s.actionInFlightName
6232
6301
  })), 1)
6233
- ])) : (c(), F(H, {
6302
+ ])) : (c(), P(H, {
6234
6303
  key: 2,
6235
6304
  ref: "composer",
6236
6305
  modelValue: r.draft,
6237
- "onUpdate:modelValue": t[1] || (t[1] = (I) => r.draft = I),
6306
+ "onUpdate:modelValue": t[1] || (t[1] = (L) => r.draft = L),
6238
6307
  placeholder: s.composerPlaceholder,
6239
6308
  disabled: !!s.pendingApproval,
6240
6309
  "attach-label": s.t("composer.attachFile"),
@@ -6243,7 +6312,7 @@ function $a(e, t, n, i, r, s) {
6243
6312
  onAttach: s.onAttach
6244
6313
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6245
6314
  ]),
6246
- r.moreOpen ? (c(), F(S, {
6315
+ r.moreOpen ? (c(), P(S, {
6247
6316
  key: 0,
6248
6317
  "can-rename": !!s.currentConv && !s.currentConv._draft,
6249
6318
  "can-export": !!s.currentConv && !s.currentConv._draft,
@@ -6251,24 +6320,24 @@ function $a(e, t, n, i, r, s) {
6251
6320
  "browser-notif-enabled": e.browserNotifEnabled,
6252
6321
  "status-url": s.statusUrl,
6253
6322
  "help-url": s.helpUrl,
6254
- onClose: t[2] || (t[2] = (I) => r.moreOpen = !1),
6323
+ onClose: t[2] || (t[2] = (L) => r.moreOpen = !1),
6255
6324
  onSoundToggle: e.onSoundToggle,
6256
6325
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6257
6326
  onAction: s.onMoreAction
6258
6327
  }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0),
6259
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), F(P, {
6328
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(F, {
6260
6329
  key: 1,
6261
6330
  "initial-value": s.currentConv.name || "",
6262
6331
  title: s.t("rename.dialogTitle"),
6263
- onClose: t[3] || (t[3] = (I) => r.renameDialogOpen = !1),
6332
+ onClose: t[3] || (t[3] = (L) => r.renameDialogOpen = !1),
6264
6333
  onSubmit: s.onRenameSubmit
6265
6334
  }, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
6266
- r.pendingAttachments.length ? (c(), u("div", za, [
6267
- (c(!0), u(B, null, D(r.pendingAttachments, (I, U) => (c(), u("div", {
6268
- key: U,
6335
+ r.pendingAttachments.length ? (c(), u("div", Xa, [
6336
+ (c(!0), u(E, null, U(r.pendingAttachments, (L, z) => (c(), u("div", {
6337
+ key: z,
6269
6338
  class: "wm-attached__chip"
6270
6339
  }, [
6271
- t[11] || (t[11] = o("svg", {
6340
+ t[11] || (t[11] = a("svg", {
6272
6341
  width: "11",
6273
6342
  height: "11",
6274
6343
  viewBox: "0 0 24 24",
@@ -6279,15 +6348,15 @@ function $a(e, t, n, i, r, s) {
6279
6348
  "stroke-linejoin": "round",
6280
6349
  "aria-hidden": "true"
6281
6350
  }, [
6282
- 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" })
6351
+ 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" })
6283
6352
  ], -1)),
6284
- o("span", null, v(I.name), 1),
6285
- o("button", {
6353
+ a("span", null, v(L.name), 1),
6354
+ a("button", {
6286
6355
  type: "button",
6287
6356
  "aria-label": s.t("attachment.remove"),
6288
- onClick: (Y) => r.pendingAttachments.splice(U, 1)
6357
+ onClick: (Y) => r.pendingAttachments.splice(z, 1)
6289
6358
  }, [...t[10] || (t[10] = [
6290
- o("svg", {
6359
+ a("svg", {
6291
6360
  width: "10",
6292
6361
  height: "10",
6293
6362
  viewBox: "0 0 24 24",
@@ -6298,12 +6367,12 @@ function $a(e, t, n, i, r, s) {
6298
6367
  "stroke-linejoin": "round",
6299
6368
  "aria-hidden": "true"
6300
6369
  }, [
6301
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6370
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6302
6371
  ], -1)
6303
- ])], 8, qa)
6372
+ ])], 8, Za)
6304
6373
  ]))), 128))
6305
6374
  ])) : y("", !0)
6306
- ], 64)) : (c(), F(p, {
6375
+ ], 64)) : (c(), P(p, {
6307
6376
  key: 1,
6308
6377
  "welcome-message": s.widgetWelcomeMessage,
6309
6378
  subtitle: s.widgetSubtitle,
@@ -6316,7 +6385,7 @@ function $a(e, t, n, i, r, s) {
6316
6385
  onSelect: s.onQuickLink,
6317
6386
  onResume: s.onDrawerPick
6318
6387
  }, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6319
- r.moreOpen && !s.currentConv ? (c(), F(S, {
6388
+ r.moreOpen && !s.currentConv ? (c(), P(S, {
6320
6389
  key: 3,
6321
6390
  "can-rename": !1,
6322
6391
  "can-export": !1,
@@ -6324,7 +6393,7 @@ function $a(e, t, n, i, r, s) {
6324
6393
  "browser-notif-enabled": e.browserNotifEnabled,
6325
6394
  "status-url": s.statusUrl,
6326
6395
  "help-url": s.helpUrl,
6327
- onClose: t[4] || (t[4] = (I) => r.moreOpen = !1),
6396
+ onClose: t[4] || (t[4] = (L) => r.moreOpen = !1),
6328
6397
  onSoundToggle: e.onSoundToggle,
6329
6398
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6330
6399
  onAction: s.onMoreAction
@@ -6333,53 +6402,53 @@ function $a(e, t, n, i, r, s) {
6333
6402
  ], 6)) : y("", !0)
6334
6403
  ], 2);
6335
6404
  }
6336
- const Wa = /* @__PURE__ */ N(Ia, [["render", $a], ["__scopeId", "data-v-7f3d28ad"]]), Ga = "0.5.34";
6405
+ const so = /* @__PURE__ */ N(Ha, [["render", eo], ["__scopeId", "data-v-3c8435c2"]]), ro = "0.5.36";
6337
6406
  export {
6338
6407
  le as AIAvatar,
6339
- ge as AVATAR_COLORS,
6340
- ns as ActionResult,
6341
- _i as ApprovalCard,
6342
- us as ArtifactFormResponse,
6343
- As as ArtifactInfoCard,
6344
- qs as ArtifactRenderer,
6345
- Ds as ArtifactTicket,
6346
- tr as AttachmentPreview,
6347
- ir as Bubble,
6348
- ni as Composer,
6408
+ _e as AVATAR_COLORS,
6409
+ hs as ActionResult,
6410
+ Mi as ApprovalCard,
6411
+ bs as ArtifactFormResponse,
6412
+ Rs as ArtifactInfoCard,
6413
+ Zs as ArtifactRenderer,
6414
+ Ys as ArtifactTicket,
6415
+ ur as AttachmentPreview,
6416
+ _r as Bubble,
6417
+ hi as Composer,
6349
6418
  Ze as DEFAULT_BASE_URL,
6350
6419
  ae as DEFAULT_LANGUAGE,
6351
- sa as Feedback,
6352
- qi as FormCard,
6420
+ ma as Feedback,
6421
+ Zi as FormCard,
6353
6422
  ln as Header,
6354
6423
  Re as HumanAvatar,
6355
6424
  Pt as Launcher,
6356
6425
  ke as MEDIA_RECORDER_SUPPORTED,
6357
- Fr as MessageList,
6358
- Wa as Messenger,
6359
- va as MoreMenu,
6360
- $n as Onboarding,
6426
+ Wr as MessageList,
6427
+ so as Messenger,
6428
+ xa as MoreMenu,
6429
+ es as Onboarding,
6361
6430
  he as SCREEN_CAPTURE_SUPPORTED,
6362
6431
  et as SUPPORTED_LANGUAGES,
6363
- ai as SuggestionChips,
6432
+ gi as SuggestionChips,
6364
6433
  Gt as TeamAvatars,
6365
- cr as Typing,
6366
- Ga as VERSION,
6434
+ yr as Typing,
6435
+ ro as VERSION,
6367
6436
  ye as avatarColor,
6368
6437
  we as avatarInitials,
6369
- Dr as captureScreenshotFile,
6370
- z as colors,
6438
+ Yr as captureScreenshotFile,
6439
+ j as colors,
6371
6440
  Qe as createStore,
6372
- j as createTranslator,
6441
+ D as createTranslator,
6373
6442
  We as createTransport,
6374
6443
  re as dateLocale,
6375
- Wa as default,
6444
+ so as default,
6376
6445
  pe as formatTime,
6377
- Va as guessAttachmentKind,
6378
- Ur as pickRecorderMime,
6446
+ no as guessAttachmentKind,
6447
+ Gr as pickRecorderMime,
6379
6448
  dn as renderInlineMarkdown,
6380
6449
  un as renderMarkdown,
6381
6450
  be as resolveLanguage,
6382
- Hr as startScreenRecording,
6451
+ Qr as startScreenRecording,
6383
6452
  Xe as tokensCss,
6384
6453
  Je as uuid,
6385
6454
  Je as v4