@_solaris/messenger-widget 0.5.82 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as Ue, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as l, createCommentVNode as k, createBlock as P, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
1
+ import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as j, normalizeClass as L, toDisplayString as y, resolveComponent as P, createVNode as W, Transition as Ne, withCtx as Fe, Fragment as B, renderList as N, withKeys as _e, withModifiers as Y, createElementVNode as l, createCommentVNode as k, createBlock as I, resolveDynamicComponent as Ae, mergeProps as He, withDirectives as $, vModelText as se, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -40,9 +40,9 @@ function et(e) {
40
40
  }
41
41
  function r(u, g) {
42
42
  const p = t.listeners.get(u);
43
- p && p.forEach((S) => {
43
+ p && p.forEach((R) => {
44
44
  try {
45
- S(g);
45
+ R(g);
46
46
  } catch (O) {
47
47
  console.error("[transport] listener", u, O);
48
48
  }
@@ -65,19 +65,19 @@ function et(e) {
65
65
  };
66
66
  }
67
67
  async function a(u, g, p) {
68
- const S = await fetch(`${t.baseUrl}${we}${g}`, {
68
+ const R = await fetch(`${t.baseUrl}${we}${g}`, {
69
69
  method: u,
70
70
  credentials: "include",
71
71
  headers: n(),
72
72
  body: p !== void 0 ? JSON.stringify(p) : void 0
73
73
  });
74
- if (!S.ok) {
75
- const O = await o(S), x = new Error(
76
- `HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
74
+ if (!R.ok) {
75
+ const O = await o(R), V = new Error(
76
+ `HTTP ${R.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || R.statusText}`
77
77
  );
78
- throw x.status = S.status, x.body = O, x;
78
+ throw V.status = R.status, V.body = O, V;
79
79
  }
80
- return S.status === 204 ? null : S.json();
80
+ return R.status === 204 ? null : R.json();
81
81
  }
82
82
  async function o(u) {
83
83
  try {
@@ -112,49 +112,49 @@ function et(e) {
112
112
  }
113
113
  );
114
114
  if (!g.ok) {
115
- const V = await o(g), Z = new Error(
116
- `Session bootstrap failed: HTTP ${g.status} :: ${(V == null ? void 0 : V.error) || g.statusText}`
115
+ const K = await o(g), te = new Error(
116
+ `Session bootstrap failed: HTTP ${g.status} :: ${(K == null ? void 0 : K.error) || g.statusText}`
117
117
  );
118
- throw Z.status = g.status, Z.body = V, Z;
118
+ throw te.status = g.status, te.body = K, te;
119
119
  }
120
120
  const p = await g.json();
121
121
  t.userId = p.external_id;
122
- const [S, O] = await Promise.all([
122
+ const [R, O] = await Promise.all([
123
123
  fetch(
124
124
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
125
125
  { credentials: "include" }
126
- ).then(async (V) => {
127
- if (!V.ok) {
128
- const Z = await o(V);
126
+ ).then(async (K) => {
127
+ if (!K.ok) {
128
+ const te = await o(K);
129
129
  throw new Error(
130
- `HTTP ${V.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || V.statusText}`
130
+ `HTTP ${K.status} GET /widgets/:id/config :: ${(te == null ? void 0 : te.error) || K.statusText}`
131
131
  );
132
132
  }
133
- return V.json();
133
+ return K.json();
134
134
  }),
135
135
  a("GET", "/customers/me")
136
- ]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
137
- return t.lastBootstrap = x, await b(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
136
+ ]), V = { config: R, customer: (O == null ? void 0 : O.customer) ?? null };
137
+ return t.lastBootstrap = V, await b(), typeof document < "u" && (t.visibilityHandler = _, document.addEventListener(
138
138
  "visibilitychange",
139
139
  t.visibilityHandler
140
- )), le(), x;
140
+ )), m(), V;
141
141
  }
142
142
  async function b() {
143
143
  try {
144
144
  const u = await E();
145
145
  t.lastActivityAt = u.reduce((g, p) => {
146
- const S = p == null ? void 0 : p.last_message_at;
147
- return S && (!g || S > g) ? S : g;
146
+ const R = p == null ? void 0 : p.last_message_at;
147
+ return R && (!g || R > g) ? R : g;
148
148
  }, null);
149
149
  } catch (u) {
150
150
  console.error("[transport] initial /conversations failed", u);
151
151
  }
152
152
  }
153
- async function y() {
153
+ async function v() {
154
154
  const u = await a("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
157
- async function T(u) {
157
+ async function M(u) {
158
158
  const g = await a("PATCH", "/customers/me", u);
159
159
  return (g == null ? void 0 : g.customer) ?? null;
160
160
  }
@@ -162,40 +162,40 @@ function et(e) {
162
162
  const u = await a("GET", "/conversations");
163
163
  return (u == null ? void 0 : u.conversations) ?? [];
164
164
  }
165
- async function A(u = {}) {
165
+ async function S(u = {}) {
166
166
  return (await a("POST", "/conversations", u)).conversation;
167
167
  }
168
- async function q(u) {
168
+ async function z(u) {
169
169
  return (await a(
170
170
  "GET",
171
171
  `/conversations/${encodeURIComponent(u)}`
172
172
  )).conversation;
173
173
  }
174
- async function M(u, g) {
174
+ async function T(u, g) {
175
175
  return (await a(
176
176
  "PATCH",
177
177
  `/conversations/${encodeURIComponent(u)}`,
178
178
  g
179
179
  )).conversation;
180
180
  }
181
- async function D(u, g) {
181
+ async function U(u, g) {
182
182
  return a(
183
183
  "PATCH",
184
184
  `/conversations/${encodeURIComponent(u)}/read`,
185
185
  { message_id: g }
186
186
  );
187
187
  }
188
- async function U(u, g = {}) {
188
+ async function x(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
190
  g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
- const S = p.toString() ? `?${p.toString()}` : "";
191
+ const R = p.toString() ? `?${p.toString()}` : "";
192
192
  return a(
193
193
  "GET",
194
- `/conversations/${encodeURIComponent(u)}/messages${S}`
194
+ `/conversations/${encodeURIComponent(u)}/messages${R}`
195
195
  );
196
196
  }
197
- async function L(u, g) {
198
- ae();
197
+ async function q(u, g) {
198
+ ee();
199
199
  const p = {
200
200
  client_msg_id: g.client_msg_id,
201
201
  type: "content",
@@ -209,48 +209,48 @@ function et(e) {
209
209
  p
210
210
  );
211
211
  }
212
- async function W(u, g, p) {
213
- return ae(), a(
212
+ async function J(u, g, p) {
213
+ return ee(), a(
214
214
  "POST",
215
215
  `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
216
216
  p ? { inputs: p } : {}
217
217
  );
218
218
  }
219
- async function Q(u) {
220
- const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await a("POST", "/attachments", {
219
+ async function ie(u) {
220
+ const g = u.name || "attachment", p = u.type || "application/octet-stream", R = u.size || 0, O = await a("POST", "/attachments", {
221
221
  mime_type: p,
222
- size_bytes: S,
222
+ size_bytes: R,
223
223
  name: g
224
- }), x = await fetch(O.upload_url, {
224
+ }), V = await fetch(O.upload_url, {
225
225
  method: "PUT",
226
226
  headers: { "Content-Type": p },
227
227
  body: u
228
228
  });
229
- if (!x.ok)
230
- throw new Error(`HTTP ${x.status} PUT signed upload`);
229
+ if (!V.ok)
230
+ throw new Error(`HTTP ${V.status} PUT signed upload`);
231
231
  return {
232
232
  type: nt(p),
233
233
  path: O.path,
234
234
  mime_type: p,
235
- size_bytes: S
235
+ size_bytes: R
236
236
  };
237
237
  }
238
- async function se(u) {
238
+ async function ae(u) {
239
239
  return a(
240
240
  "GET",
241
241
  `/attachments/sign?path=${encodeURIComponent(u)}`
242
242
  );
243
243
  }
244
- function re() {
244
+ function X() {
245
245
  const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
246
246
  return `${t.baseUrl}${we}/stream?${u}`;
247
247
  }
248
- function $() {
248
+ function Q() {
249
249
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
250
250
  try {
251
- const u = new EventSource(re(), { withCredentials: !0 });
251
+ const u = new EventSource(X(), { withCredentials: !0 });
252
252
  for (const g of Ye)
253
- u.addEventListener(g, (p) => ie(g, p.data));
253
+ u.addEventListener(g, (p) => oe(g, p.data));
254
254
  u.addEventListener(
255
255
  "error",
256
256
  () => r("error", new Error("SSE error"))
@@ -259,65 +259,65 @@ function et(e) {
259
259
  console.error("[transport] SSE open failed", u), r("error", u);
260
260
  }
261
261
  }
262
- function ie(u, g) {
262
+ function oe(u, g) {
263
263
  try {
264
- const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
265
- r(u, S);
264
+ const p = JSON.parse(g), R = p && typeof p == "object" && "data" in p ? p.data : p;
265
+ r(u, R);
266
266
  } catch (p) {
267
267
  console.error("[transport] bad SSE payload", u, p);
268
268
  }
269
269
  }
270
- function X() {
270
+ function Z() {
271
271
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && i("idle");
272
272
  }
273
- function ae() {
274
- clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
275
- t.panelOpen || X();
273
+ function ee() {
274
+ clearTimeout(t.burstTimer), Q(), t.panelOpen || (t.burstTimer = setTimeout(() => {
275
+ t.panelOpen || Z();
276
276
  }, Qe));
277
277
  }
278
- function fe(u) {
278
+ function ve(u) {
279
279
  const g = t.panelOpen;
280
- t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), $()) : ae(), g !== t.panelOpen && le();
280
+ t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), Q()) : ee(), g !== t.panelOpen && m();
281
281
  }
282
- async function ye() {
282
+ async function pe() {
283
283
  try {
284
- const u = await E(), g = u.reduce((S, O) => {
285
- const x = O == null ? void 0 : O.last_message_at;
286
- return x && (!S || x > S) ? x : S;
284
+ const u = await E(), g = u.reduce((R, O) => {
285
+ const V = O == null ? void 0 : O.last_message_at;
286
+ return V && (!R || V > R) ? V : R;
287
287
  }, null);
288
- g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
288
+ g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ee());
289
289
  } catch (u) {
290
290
  console.error("[transport] poll failed", u);
291
291
  }
292
292
  }
293
- function le() {
293
+ function m() {
294
294
  if (h(), typeof document < "u" && document.hidden) return;
295
295
  const u = t.panelOpen ? Xe : Je;
296
- t.pollTimer = setInterval(ye, u);
296
+ t.pollTimer = setInterval(pe, u);
297
297
  }
298
298
  function h() {
299
299
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
300
300
  }
301
- function m() {
301
+ function _() {
302
302
  if (document.hidden)
303
303
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
304
- t.hiddenGraceTimer = null, document.hidden && (h(), X(), i("paused"));
304
+ t.hiddenGraceTimer = null, document.hidden && (h(), Z(), i("paused"));
305
305
  }, Ze);
306
306
  else {
307
307
  if (t.hiddenGraceTimer) {
308
308
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
309
309
  return;
310
310
  }
311
- i("idle"), le(), t.panelOpen && $();
311
+ i("idle"), m(), t.panelOpen && Q();
312
312
  }
313
313
  }
314
- function _() {
315
- h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, X(), t.visibilityHandler && (document.removeEventListener(
314
+ function w() {
315
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Z(), t.visibilityHandler && (document.removeEventListener(
316
316
  "visibilitychange",
317
317
  t.visibilityHandler
318
318
  ), t.visibilityHandler = null), t.started = !1;
319
319
  }
320
- async function w(u) {
320
+ async function A(u) {
321
321
  return !u || typeof u != "object" ? null : a("POST", "/update", u);
322
322
  }
323
323
  function C(u) {
@@ -333,23 +333,23 @@ function et(e) {
333
333
  return {
334
334
  on: s,
335
335
  start: f,
336
- stop: _,
337
- setPanelOpen: fe,
338
- update: w,
336
+ stop: w,
337
+ setPanelOpen: ve,
338
+ update: A,
339
339
  context: C,
340
340
  // REST
341
- getCustomer: y,
342
- patchCustomer: T,
341
+ getCustomer: v,
342
+ patchCustomer: M,
343
343
  listConversations: E,
344
- createConversation: A,
345
- getConversation: q,
346
- patchConversation: M,
347
- markConversationRead: D,
348
- listMessages: U,
349
- postMessage: L,
350
- postCallback: W,
351
- uploadAttachment: Q,
352
- signAttachment: se,
344
+ createConversation: S,
345
+ getConversation: z,
346
+ patchConversation: T,
347
+ markConversationRead: U,
348
+ listMessages: x,
349
+ postMessage: q,
350
+ postCallback: J,
351
+ uploadAttachment: ie,
352
+ signAttachment: ae,
353
353
  // Read-only state
354
354
  get connection() {
355
355
  return t.connection;
@@ -407,50 +407,50 @@ function rt(e) {
407
407
  connection: "idle"
408
408
  }), s = [];
409
409
  s.push(
410
- e.on("connection", (h) => {
411
- t.connection = h;
410
+ e.on("connection", (m) => {
411
+ t.connection = m;
412
412
  })
413
413
  ), s.push(
414
- e.on("message", (h) => {
415
- const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
416
- !m || !(_ != null && _.id) || ($(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], ae(m, _.created_at));
414
+ e.on("message", (m) => {
415
+ const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.message;
416
+ !h || !(_ != null && _.id) || (X(h, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], Z(h, _.created_at));
417
417
  })
418
418
  ), s.push(
419
- e.on("message_stream", (h) => {
420
- const m = h == null ? void 0 : h.message_id, _ = h == null ? void 0 : h.token;
421
- !m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
419
+ e.on("message_stream", (m) => {
420
+ const h = m == null ? void 0 : m.message_id, _ = m == null ? void 0 : m.token;
421
+ !h || typeof _ != "string" || (t.streamingByMsgId[h] = (t.streamingByMsgId[h] || "") + _);
422
422
  })
423
423
  ), s.push(
424
- e.on("conversation_updated", (h) => {
425
- const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
426
- if (!m || !_) return;
427
- const w = t.conversations.findIndex((C) => C.id === m);
424
+ e.on("conversation_updated", (m) => {
425
+ const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.changes;
426
+ if (!h || !_) return;
427
+ const w = t.conversations.findIndex((A) => A.id === h);
428
428
  w !== -1 && (t.conversations[w] = {
429
429
  ...t.conversations[w],
430
430
  ..._
431
431
  });
432
432
  })
433
433
  ), s.push(
434
- e.on("config_updated", (h) => {
435
- h != null && h.config && (t.config = h.config);
434
+ e.on("config_updated", (m) => {
435
+ m != null && m.config && (t.config = m.config);
436
436
  })
437
437
  ), s.push(
438
- e.on("action_status", (h) => {
439
- const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, w = h == null ? void 0 : h.action_name;
440
- if (!m || !_) return;
441
- const C = t.runningActionsByConv[m] || {};
442
- h.state === "running" ? (C[_] = w || _, t.runningActionsByConv[m] = { ...C }) : h.state === "done" && (delete C[_], t.runningActionsByConv[m] = { ...C });
438
+ e.on("action_status", (m) => {
439
+ const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.action_id, w = m == null ? void 0 : m.action_name;
440
+ if (!h || !_) return;
441
+ const A = t.runningActionsByConv[h] || {};
442
+ m.state === "running" ? (A[_] = w || _, t.runningActionsByConv[h] = { ...A }) : m.state === "done" && (delete A[_], t.runningActionsByConv[h] = { ...A });
443
443
  })
444
444
  ), s.push(
445
- e.on("activity", (h) => {
446
- Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
445
+ e.on("activity", (m) => {
446
+ Array.isArray(m == null ? void 0 : m.conversations) && (t.conversations = m.conversations);
447
447
  })
448
448
  );
449
- async function r(h) {
449
+ async function r(m) {
450
450
  try {
451
- const m = new Promise(
452
- (w, C) => setTimeout(
453
- () => C(
451
+ const h = new Promise(
452
+ (w, A) => setTimeout(
453
+ () => A(
454
454
  new Error(
455
455
  "bootstrap timeout (15s) — check baseUrl, CORS, and network"
456
456
  )
@@ -458,61 +458,61 @@ function rt(e) {
458
458
  15e3
459
459
  )
460
460
  ), _ = await Promise.race([
461
- e.start(h),
462
- m
461
+ e.start(m),
462
+ h
463
463
  ]);
464
464
  t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
465
465
  e.listConversations(),
466
- m
466
+ h
467
467
  ]), t.ready = !0;
468
- } catch (m) {
469
- console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
468
+ } catch (h) {
469
+ console.error("[store] start failed", h), t.error = (h == null ? void 0 : h.message) || String(h);
470
470
  }
471
471
  }
472
472
  function i() {
473
- for (const h of s)
473
+ for (const m of s)
474
474
  try {
475
- h();
475
+ m();
476
476
  } catch {
477
477
  }
478
478
  e.stop();
479
479
  }
480
- async function n(h) {
481
- const m = ye(h);
482
- if (!m) return t.customer;
480
+ async function n(m) {
481
+ const h = ve(m);
482
+ if (!h) return t.customer;
483
483
  try {
484
- const _ = await e.patchCustomer(m);
484
+ const _ = await e.patchCustomer(h);
485
485
  _ && (t.customer = _);
486
486
  } catch (_) {
487
487
  console.error("[store] applyCustomer failed", _);
488
488
  }
489
489
  return t.customer;
490
490
  }
491
- async function a(h = {}) {
492
- const m = await e.createConversation(h), _ = t.conversations.findIndex((w) => w.id === m.id);
493
- return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
491
+ async function a(m = {}) {
492
+ const h = await e.createConversation(m), _ = t.conversations.findIndex((w) => w.id === h.id);
493
+ return _ === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[_] = h, h;
494
494
  }
495
495
  const o = 50;
496
- async function f(h) {
497
- const m = t.paginationByConv[h];
498
- if (!(m != null && m.loaded || m != null && m.loading)) {
499
- y(h, { nextCursor: null, loading: !0, loaded: !1 });
496
+ async function f(m) {
497
+ const h = t.paginationByConv[m];
498
+ if (!(h != null && h.loaded || h != null && h.loading)) {
499
+ v(m, { nextCursor: null, loading: !0, loaded: !1 });
500
500
  try {
501
- const _ = await e.listMessages(h, {
501
+ const _ = await e.listMessages(m, {
502
502
  limit: o
503
- }), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], u = /* @__PURE__ */ new Set();
504
- for (const p of w)
505
- (p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
506
- const g = C.filter((p) => !((p == null ? void 0 : p.id) != null && u.has(`id:${String(p.id)}`) || p != null && p.client_msg_id && u.has(`c:${p.client_msg_id}`)));
507
- t.messagesByConv[h] = [...w, ...g].sort(
508
- fe
509
- ), y(h, {
503
+ }), w = (_ == null ? void 0 : _.messages) ?? [], A = t.messagesByConv[m] || [], C = /* @__PURE__ */ new Set();
504
+ for (const g of w)
505
+ (g == null ? void 0 : g.id) != null && C.add(`id:${String(g.id)}`), g != null && g.client_msg_id && C.add(`c:${g.client_msg_id}`);
506
+ const u = A.filter((g) => !((g == null ? void 0 : g.id) != null && C.has(`id:${String(g.id)}`) || g != null && g.client_msg_id && C.has(`c:${g.client_msg_id}`)));
507
+ t.messagesByConv[m] = [...w, ...u].sort(
508
+ ee
509
+ ), v(m, {
510
510
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
511
511
  loading: !1,
512
512
  loaded: !0
513
513
  });
514
514
  } catch (_) {
515
- console.error("[store] openConversation failed", _), y(h, {
515
+ console.error("[store] openConversation failed", _), v(m, {
516
516
  nextCursor: null,
517
517
  loading: !1,
518
518
  loaded: !1
@@ -520,131 +520,131 @@ function rt(e) {
520
520
  }
521
521
  }
522
522
  }
523
- async function b(h) {
524
- var C;
525
- const m = t.paginationByConv[h];
526
- if (!m || m.loading || !m.nextCursor) return;
527
- const w = (C = (t.messagesByConv[h] || []).find((u) => u == null ? void 0 : u.created_at)) == null ? void 0 : C.created_at;
523
+ async function b(m) {
524
+ var A;
525
+ const h = t.paginationByConv[m];
526
+ if (!h || h.loading || !h.nextCursor) return;
527
+ const w = (A = (t.messagesByConv[m] || []).find((C) => C == null ? void 0 : C.created_at)) == null ? void 0 : A.created_at;
528
528
  if (w) {
529
- y(h, { ...m, loading: !0 });
529
+ v(m, { ...h, loading: !0 });
530
530
  try {
531
- const u = await e.listMessages(h, {
531
+ const C = await e.listMessages(m, {
532
532
  before: w,
533
533
  limit: o
534
- }), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
535
- for (const x of p)
536
- (x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
537
- const O = g.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
538
- t.messagesByConv[h] = [...O, ...p], y(h, {
539
- nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
534
+ }), u = (C == null ? void 0 : C.messages) ?? [], g = t.messagesByConv[m] || [], p = /* @__PURE__ */ new Set();
535
+ for (const O of g)
536
+ (O == null ? void 0 : O.id) != null && p.add(`id:${String(O.id)}`), O != null && O.client_msg_id && p.add(`c:${O.client_msg_id}`);
537
+ const R = u.filter((O) => !((O == null ? void 0 : O.id) != null && p.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && p.has(`c:${O.client_msg_id}`)));
538
+ t.messagesByConv[m] = [...R, ...g], v(m, {
539
+ nextCursor: (C == null ? void 0 : C.next_cursor) ?? null,
540
540
  loading: !1,
541
541
  loaded: !0
542
542
  });
543
- } catch (u) {
544
- console.error("[store] loadMore failed", u), y(h, { ...m, loading: !1 });
543
+ } catch (C) {
544
+ console.error("[store] loadMore failed", C), v(m, { ...h, loading: !1 });
545
545
  }
546
546
  }
547
547
  }
548
- function y(h, m) {
549
- t.paginationByConv = { ...t.paginationByConv, [h]: m };
548
+ function v(m, h) {
549
+ t.paginationByConv = { ...t.paginationByConv, [m]: h };
550
550
  }
551
- async function T(h, m) {
552
- const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((C) => C.id === h);
551
+ async function M(m, h) {
552
+ const _ = await e.patchConversation(m, h), w = t.conversations.findIndex((A) => A.id === m);
553
553
  w !== -1 && (t.conversations[w] = _);
554
554
  }
555
- async function E(h) {
556
- if (!h) return [];
557
- const m = t.messagesByConv[h] || [];
555
+ async function E(m) {
556
+ if (!m) return [];
557
+ const h = t.messagesByConv[m] || [];
558
558
  let _ = "";
559
- for (const w of m)
559
+ for (const w of h)
560
560
  w != null && w.created_at && w.created_at > _ && (_ = w.created_at);
561
561
  try {
562
562
  const w = await e.listMessages(
563
- h,
563
+ m,
564
564
  _ ? { since: _ } : {}
565
- ), C = (w == null ? void 0 : w.messages) || [];
566
- if (!C.length) return [];
567
- const u = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
568
- for (const S of m)
569
- (S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id && g.add(S.client_msg_id);
570
- const p = [];
571
- for (const S of C) {
572
- const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
573
- $(h, S), O || p.push(S);
565
+ ), A = (w == null ? void 0 : w.messages) || [];
566
+ if (!A.length) return [];
567
+ const C = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
568
+ for (const p of h)
569
+ (p == null ? void 0 : p.id) != null && C.add(String(p.id)), p != null && p.client_msg_id && u.add(p.client_msg_id);
570
+ const g = [];
571
+ for (const p of A) {
572
+ const R = (p == null ? void 0 : p.id) != null && C.has(String(p.id)) || (p == null ? void 0 : p.client_msg_id) && u.has(p.client_msg_id);
573
+ X(m, p), R || g.push(p);
574
574
  }
575
- return p;
575
+ return g;
576
576
  } catch (w) {
577
577
  return console.error("[store] fetchSinceLast failed", w), [];
578
578
  }
579
579
  }
580
- async function A(h, m) {
581
- if (!(!h || m == null))
580
+ async function S(m, h) {
581
+ if (!(!m || h == null))
582
582
  try {
583
- const _ = await e.markConversationRead(h, m), w = (_ == null ? void 0 : _.last_read_message_id) ?? m, C = t.conversations.findIndex((u) => (u == null ? void 0 : u.id) === h);
584
- C !== -1 && (t.conversations[C] = {
585
- ...t.conversations[C],
583
+ const _ = await e.markConversationRead(m, h), w = (_ == null ? void 0 : _.last_read_message_id) ?? h, A = t.conversations.findIndex((C) => (C == null ? void 0 : C.id) === m);
584
+ A !== -1 && (t.conversations[A] = {
585
+ ...t.conversations[A],
586
586
  last_read_message_id: w
587
587
  });
588
588
  } catch (_) {
589
589
  console.error("[store] markConversationRead failed", _);
590
590
  }
591
591
  }
592
- async function q(h, m, { attachments: _, metadata: w } = {}) {
593
- var O;
594
- const C = (m || "").trim(), u = Array.isArray(_) && _.length > 0;
595
- if (!h || !C && !u) return;
596
- const g = st(), p = le(h), S = {
597
- id: g,
598
- client_msg_id: g,
599
- conversation_id: h,
592
+ async function z(m, h, { attachments: _, metadata: w } = {}) {
593
+ var R;
594
+ const A = (h || "").trim(), C = Array.isArray(_) && _.length > 0;
595
+ if (!m || !A && !C) return;
596
+ const u = st(), g = pe(m), p = {
597
+ id: u,
598
+ client_msg_id: u,
599
+ conversation_id: m,
600
600
  type: "content",
601
- text_md: C,
601
+ text_md: A,
602
602
  author: {
603
603
  type: "user",
604
- id: ((O = t.customer) == null ? void 0 : O.external_id) || null
604
+ id: ((R = t.customer) == null ? void 0 : R.external_id) || null
605
605
  },
606
- created_at: p,
606
+ created_at: g,
607
607
  // Local-only flag — UI may render dimmed until the SSE echo lands.
608
608
  _pending: !0,
609
- ...u ? { payload: { type: "content", attachments: _ } } : {},
609
+ ...C ? { payload: { type: "content", attachments: _ } } : {},
610
610
  ...w && typeof w == "object" ? { metadata: w } : {}
611
611
  };
612
- $(h, S);
612
+ X(m, p);
613
613
  try {
614
- await e.postMessage(h, {
615
- client_msg_id: g,
616
- text_md: C,
617
- created_at: p,
618
- ...u ? { attachments: _ } : {},
614
+ await e.postMessage(m, {
615
+ client_msg_id: u,
616
+ text_md: A,
617
+ created_at: g,
618
+ ...C ? { attachments: _ } : {},
619
619
  ...w && typeof w == "object" ? { metadata: w } : {}
620
620
  });
621
- } catch (x) {
622
- console.error("[store] send failed", x), X(h, g, {
621
+ } catch (O) {
622
+ console.error("[store] send failed", O), oe(m, u, {
623
623
  _failed: !0,
624
624
  _pending: !1
625
625
  });
626
626
  }
627
627
  }
628
- async function M(h, m, _) {
629
- h != null && (t.awaitingCallback[h] = !0);
628
+ async function T(m, h, _) {
629
+ m != null && (t.awaitingCallback[m] = !0);
630
630
  try {
631
- await e.postCallback(h, m, _);
631
+ await e.postCallback(m, h, _);
632
632
  } catch (w) {
633
- console.error("[store] callback failed", w), h != null && delete t.awaitingCallback[h];
633
+ console.error("[store] callback failed", w), m != null && delete t.awaitingCallback[m];
634
634
  }
635
635
  }
636
- const D = /* @__PURE__ */ new Map();
637
- async function U(h) {
638
- if (!h) return null;
639
- const m = D.get(h);
640
- if (m != null && m.url) {
641
- const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
642
- if (!_ || _ - Date.now() > 6e4) return m.url;
636
+ const U = /* @__PURE__ */ new Map();
637
+ async function x(m) {
638
+ if (!m) return null;
639
+ const h = U.get(m);
640
+ if (h != null && h.url) {
641
+ const _ = h.expires_at ? Date.parse(h.expires_at) : 0;
642
+ if (!_ || _ - Date.now() > 6e4) return h.url;
643
643
  }
644
644
  try {
645
- const _ = await e.signAttachment(h);
645
+ const _ = await e.signAttachment(m);
646
646
  if (_ != null && _.signed_url)
647
- return D.set(h, {
647
+ return U.set(m, {
648
648
  url: _.signed_url,
649
649
  expires_at: _.expires_at
650
650
  }), _.signed_url;
@@ -653,126 +653,116 @@ function rt(e) {
653
653
  }
654
654
  return null;
655
655
  }
656
- async function L(h, { rating: m, comment: _ } = {}) {
657
- const w = t.conversations.find((g) => g.id === h), u = {
656
+ async function q(m, { rating: h, comment: _ } = {}) {
657
+ const w = t.conversations.find((u) => u.id === m), C = {
658
658
  ...(w == null ? void 0 : w.metadata) || {},
659
659
  feedback: {
660
- rating: m,
660
+ rating: h,
661
661
  comment: _ || null,
662
662
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
663
663
  }
664
664
  };
665
- await T(h, { metadata: u });
665
+ await M(m, { metadata: C });
666
666
  }
667
- function W(h) {
667
+ function J(m) {
668
668
  var _, w;
669
- const m = t.messagesByConv[h] || [];
670
- for (let C = m.length - 1; C >= 0; C--) {
671
- const u = m[C];
672
- if ((u == null ? void 0 : u.type) === "action" && ((_ = u == null ? void 0 : u.payload) == null ? void 0 : _.type) === "action" && ((w = u == null ? void 0 : u.payload) == null ? void 0 : w.state) === "pending" && Array.isArray(u == null ? void 0 : u.callbacks) && u.callbacks.length > 0 && !t.awaitingCallback[u.id])
673
- return u;
674
- }
675
- return null;
676
- }
677
- function Q(h) {
678
- var _, w, C;
679
- const m = t.messagesByConv[h] || [];
680
- for (let u = m.length - 1; u >= 0; u--) {
681
- const g = m[u];
682
- if (((_ = g == null ? void 0 : g.author) == null ? void 0 : _.type) === "user" || (g == null ? void 0 : g.type) === "action" && ((w = g == null ? void 0 : g.payload) == null ? void 0 : w.state) === "pending")
669
+ const h = t.messagesByConv[m] || [];
670
+ for (let A = h.length - 1; A >= 0; A--) {
671
+ const C = h[A];
672
+ if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user" || (C == null ? void 0 : C.type) === "action" && ((w = C == null ? void 0 : C.payload) == null ? void 0 : w.state) === "pending")
683
673
  return null;
684
- const p = (C = g == null ? void 0 : g.metadata) == null ? void 0 : C.form;
685
- if (p && Array.isArray(p.fields) && p.fields.length > 0)
686
- return { message: g, form: p };
674
+ const u = Array.isArray(C == null ? void 0 : C.callbacks) ? C.callbacks.find((g) => (g == null ? void 0 : g.intent) === "submit_form") : null;
675
+ if (u && Array.isArray(u.inputs) && u.inputs.length > 0)
676
+ return {
677
+ message: C,
678
+ form: {
679
+ title: u.title || "",
680
+ description: u.description || null,
681
+ submit_label: u.label || null,
682
+ fields: u.inputs
683
+ }
684
+ };
687
685
  }
688
686
  return null;
689
687
  }
690
- function se(h) {
691
- const m = t.runningActionsByConv[h];
692
- if (!m) return null;
693
- const _ = Object.keys(m);
688
+ function ie(m) {
689
+ const h = t.runningActionsByConv[m];
690
+ if (!h) return null;
691
+ const _ = Object.keys(h);
694
692
  if (_.length === 0) return null;
695
693
  const w = _[0];
696
- return { id: w, payload: { name: m[w] } };
694
+ return { id: w, payload: { name: h[w] } };
697
695
  }
698
- function re(h) {
699
- var _, w, C, u;
700
- const m = t.messagesByConv[h] || [];
701
- for (let g = m.length - 1; g >= 0; g--) {
702
- const p = m[g];
703
- if (((_ = p == null ? void 0 : p.author) == null ? void 0 : _.type) === "user") return [];
704
- if ((p == null ? void 0 : p.type) === "action" && ((w = p == null ? void 0 : p.payload) == null ? void 0 : w.state) === "pending")
696
+ function ae(m) {
697
+ var _, w, A;
698
+ const h = t.messagesByConv[m] || [];
699
+ for (let C = h.length - 1; C >= 0; C--) {
700
+ const u = h[C];
701
+ if (((_ = u == null ? void 0 : u.author) == null ? void 0 : _.type) === "user") return [];
702
+ if ((u == null ? void 0 : u.type) === "action" && ((w = u == null ? void 0 : u.payload) == null ? void 0 : w.state) === "pending")
705
703
  return [];
706
- if (((C = p == null ? void 0 : p.author) == null ? void 0 : C.type) !== "agent_ia") continue;
707
- const S = (u = p == null ? void 0 : p.metadata) == null ? void 0 : u.suggested_replies;
708
- return Array.isArray(S) && S.length ? S.map((O) => {
709
- if (typeof O == "string") {
710
- const x = O.trim();
711
- return x ? { label: x, kind: null } : null;
712
- }
713
- if (O && typeof O == "object" && typeof O.label == "string") {
714
- const x = O.label.trim();
715
- if (!x) return null;
716
- const V = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
717
- return { label: x, kind: V };
718
- }
719
- return null;
720
- }).filter(Boolean).slice(0, 4) : [];
704
+ if (((A = u == null ? void 0 : u.author) == null ? void 0 : A.type) !== "agent_ia") continue;
705
+ const g = Array.isArray(u == null ? void 0 : u.callbacks) ? u.callbacks.filter(
706
+ (p) => (p == null ? void 0 : p.intent) === "send_message" && (p.render ?? "inline") === "inline"
707
+ ) : [];
708
+ return g.length ? g.map(
709
+ (p) => typeof p.label == "string" && p.label.trim() ? { label: p.label.trim(), kind: null } : null
710
+ ).filter(Boolean).slice(0, 4) : [];
721
711
  }
722
712
  return [];
723
713
  }
724
- function $(h, m) {
725
- var u;
726
- const _ = t.messagesByConv[h] || [];
714
+ function X(m, h) {
715
+ var C;
716
+ const _ = t.messagesByConv[m] || [];
727
717
  let w = -1;
728
- m != null && m.client_msg_id && (w = _.findIndex(
729
- (g) => (g == null ? void 0 : g.client_msg_id) && g.client_msg_id === m.client_msg_id
730
- )), w === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (w = _.findIndex((g) => ie(g == null ? void 0 : g.id, m.id)));
731
- let C;
732
- w === -1 ? C = [..._, m].sort(fe) : (C = _.slice(), C[w] = {
718
+ h != null && h.client_msg_id && (w = _.findIndex(
719
+ (u) => (u == null ? void 0 : u.client_msg_id) && u.client_msg_id === h.client_msg_id
720
+ )), w === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (w = _.findIndex((u) => Q(u == null ? void 0 : u.id, h.id)));
721
+ let A;
722
+ w === -1 ? A = [..._, h].sort(ee) : (A = _.slice(), A[w] = {
733
723
  ..._[w],
734
- ...m,
724
+ ...h,
735
725
  _pending: !1,
736
726
  _failed: !1
737
- }), t.messagesByConv[h] = C, (m == null ? void 0 : m.type) === "action" && ((u = m == null ? void 0 : m.payload) != null && u.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
727
+ }), t.messagesByConv[m] = A, (h == null ? void 0 : h.type) === "action" && ((C = h == null ? void 0 : h.payload) != null && C.state) && h.payload.state !== "pending" && (h == null ? void 0 : h.id) != null && t.awaitingCallback[h.id] && delete t.awaitingCallback[h.id];
738
728
  }
739
- function ie(h, m) {
740
- return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
729
+ function Q(m, h) {
730
+ return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
741
731
  }
742
- function X(h, m, _) {
743
- const w = t.messagesByConv[h];
732
+ function oe(m, h, _) {
733
+ const w = t.messagesByConv[m];
744
734
  if (!w) return;
745
- const C = w.findIndex((g) => g.id === m);
746
- if (C === -1) return;
747
- const u = w.slice();
748
- u[C] = { ...w[C], ..._ }, t.messagesByConv[h] = u;
735
+ const A = w.findIndex((u) => u.id === h);
736
+ if (A === -1) return;
737
+ const C = w.slice();
738
+ C[A] = { ...w[A], ..._ }, t.messagesByConv[m] = C;
749
739
  }
750
- function ae(h, m) {
751
- const _ = t.conversations.findIndex((C) => C.id === h);
740
+ function Z(m, h) {
741
+ const _ = t.conversations.findIndex((A) => A.id === m);
752
742
  if (_ === -1) return;
753
743
  const w = t.conversations[_];
754
- if (m && (!w.last_message_at || m > w.last_message_at)) {
755
- const C = t.conversations.slice();
756
- C[_] = { ...w, last_message_at: m }, C.sort(
757
- (u, g) => (g.last_message_at || "").localeCompare(u.last_message_at || "")
758
- ), t.conversations = C;
744
+ if (h && (!w.last_message_at || h > w.last_message_at)) {
745
+ const A = t.conversations.slice();
746
+ A[_] = { ...w, last_message_at: h }, A.sort(
747
+ (C, u) => (u.last_message_at || "").localeCompare(C.last_message_at || "")
748
+ ), t.conversations = A;
759
749
  }
760
750
  }
761
- function fe(h, m) {
762
- return (h.created_at || "").localeCompare(m.created_at || "");
751
+ function ee(m, h) {
752
+ return (m.created_at || "").localeCompare(h.created_at || "");
763
753
  }
764
- function ye(h) {
765
- if (!h || typeof h != "object") return null;
766
- const m = {}, _ = {};
767
- for (const [w, C] of Object.entries(h))
768
- C !== void 0 && (w === "name" || w === "email" || w === "language" ? C != null && String(C).trim() !== "" && (m[w] = C) : (w === "values" || w === "metadata") && C && typeof C == "object" ? Object.assign(_, C) : _[w] = C);
769
- return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
754
+ function ve(m) {
755
+ if (!m || typeof m != "object") return null;
756
+ const h = {}, _ = {};
757
+ for (const [w, A] of Object.entries(m))
758
+ A !== void 0 && (w === "name" || w === "email" || w === "language" ? A != null && String(A).trim() !== "" && (h[w] = A) : (w === "values" || w === "metadata") && A && typeof A == "object" ? Object.assign(_, A) : _[w] = A);
759
+ return Object.keys(_).length && (h.values = _), Object.keys(h).length ? h : null;
770
760
  }
771
- function le(h) {
772
- const m = t.messagesByConv[h] || [];
761
+ function pe(m) {
762
+ const h = t.messagesByConv[m] || [];
773
763
  let _ = "";
774
- for (const u of m)
775
- u != null && u.created_at && u.created_at > _ && (_ = u.created_at);
764
+ for (const C of h)
765
+ C != null && C.created_at && C.created_at > _ && (_ = C.created_at);
776
766
  const w = (/* @__PURE__ */ new Date()).toISOString();
777
767
  return !_ || w > _ ? w : new Date(Date.parse(_) + 1).toISOString();
778
768
  }
@@ -785,16 +775,15 @@ function rt(e) {
785
775
  openConversation: f,
786
776
  loadMore: b,
787
777
  fetchSinceLast: E,
788
- patchConversation: T,
789
- markConversationRead: A,
790
- send: q,
791
- clickCallback: M,
792
- signAttachment: U,
793
- submitFeedback: L,
794
- getPendingApproval: W,
795
- getActionInFlight: se,
796
- getLatestSuggestions: re,
797
- getLatestForm: Q,
778
+ patchConversation: M,
779
+ markConversationRead: S,
780
+ send: z,
781
+ clickCallback: T,
782
+ signAttachment: x,
783
+ submitFeedback: q,
784
+ getActionInFlight: ie,
785
+ getLatestSuggestions: ae,
786
+ getLatestForm: J,
798
787
  // Pass-through for panel open/close (controls SSE burst).
799
788
  setPanelOpen: e.setPanelOpen
800
789
  };
@@ -823,10 +812,10 @@ const H = {
823
812
  "#D97706",
824
813
  "#059669"
825
814
  ];
826
- function Te(e = "") {
815
+ function Me(e = "") {
827
816
  return e ? be[e.charCodeAt(0) % be.length] : be[0];
828
817
  }
829
- function Me(e = "") {
818
+ function Te(e = "") {
830
819
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
831
820
  }
832
821
  function Ce(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
@@ -893,7 +882,7 @@ function ut(e) {
893
882
  }
894
883
  return t.protocol === "https:" || t.protocol === "http:" || t.protocol === "data:" && /^data:image\//i.test(e) ? e : null;
895
884
  }
896
- const he = "fr", ht = ["fr", "en"], Le = { fr: "fr-FR", en: "en-US" }, ke = {
885
+ const ue = "fr", mt = ["fr", "en"], Le = { fr: "fr-FR", en: "en-US" }, ke = {
897
886
  fr: {
898
887
  // ── Common ───────────────────────────────────────────────────────
899
888
  "common.newConversation": "Nouvelle conversation",
@@ -959,6 +948,10 @@ Je réponds en quelques secondes.`,
959
948
  "composer.conversationClosed": "Cette conversation a été fermée.",
960
949
  "composer.reopen": "Rouvrir la conversation",
961
950
  "composer.newConversation": "Nouvelle conversation",
951
+ // ── Résolution (carte propose_resolution) ────────────────────────
952
+ "resolution.title": "Souhaites-tu clôturer cette conversation ?",
953
+ "resolution.confirm": "Oui, clôturer",
954
+ "resolution.decline": "Pas encore",
962
955
  // ── Message list ─────────────────────────────────────────────────
963
956
  "messageList.loadingHistory": "Chargement de l'historique…",
964
957
  "messageList.conversationStart": "Début de la conversation",
@@ -1087,7 +1080,13 @@ I reply within seconds.`,
1087
1080
  "composer.recording": "Recording · {time}",
1088
1081
  "composer.stop": "Stop",
1089
1082
  "composer.conversationEnded": "This conversation has ended.",
1083
+ "composer.conversationClosed": "This conversation has been closed.",
1084
+ "composer.reopen": "Reopen conversation",
1090
1085
  "composer.newConversation": "New conversation",
1086
+ // ── Resolution (propose_resolution card) ─────────────────────────
1087
+ "resolution.title": "Shall we close this conversation?",
1088
+ "resolution.confirm": "Yes, close",
1089
+ "resolution.decline": "Not yet",
1091
1090
  // ── Message list ─────────────────────────────────────────────────
1092
1091
  "messageList.loadingHistory": "Loading history…",
1093
1092
  "messageList.conversationStart": "Start of the conversation",
@@ -1156,15 +1155,15 @@ I reply within seconds.`,
1156
1155
  }
1157
1156
  };
1158
1157
  function xe(e) {
1159
- if (typeof e != "string") return he;
1158
+ if (typeof e != "string") return ue;
1160
1159
  const t = e.trim().toLowerCase().slice(0, 2);
1161
- return ht.includes(t) ? t : he;
1160
+ return mt.includes(t) ? t : ue;
1162
1161
  }
1163
- function ne(e) {
1164
- return Le[xe(e)] || Le[he];
1162
+ function re(e) {
1163
+ return Le[xe(e)] || Le[ue];
1165
1164
  }
1166
1165
  function F(e) {
1167
- const t = xe(e), s = ke[t] || ke[he], r = ke[he];
1166
+ const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
1168
1167
  return function(n, a) {
1169
1168
  let o = s[n];
1170
1169
  return o == null && (o = r[n]), o == null ? n : (a && (o = o.replace(
@@ -1173,22 +1172,22 @@ function F(e) {
1173
1172
  )), o);
1174
1173
  };
1175
1174
  }
1176
- function Ie(e, t) {
1175
+ function Ee(e, t) {
1177
1176
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1178
1177
  const s = e.options.find((r) => (r == null ? void 0 : r.value) === t);
1179
1178
  return (s == null ? void 0 : s.label) || t;
1180
1179
  }
1181
- function He(e, t, s) {
1182
- return Array.isArray(t) ? t.map((r) => Ie(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
1180
+ function je(e, t, s) {
1181
+ return Array.isArray(t) ? t.map((r) => Ee(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ee(e, String(t));
1183
1182
  }
1184
- function mt(e, t, s = F()) {
1183
+ function ht(e, t, s = F()) {
1185
1184
  if (!e || !t) return "";
1186
1185
  const r = Array.isArray(e.fields) ? e.fields : [], i = [];
1187
1186
  for (const n of r) {
1188
1187
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1189
1188
  const a = t[n.key];
1190
1189
  if (a == null || a === "") continue;
1191
- const o = He(n, a, s);
1190
+ const o = je(n, a, s);
1192
1191
  o && i.push(`${n.label} :
1193
1192
  ${o}`);
1194
1193
  }
@@ -1202,7 +1201,7 @@ function ft(e, t, s = F()) {
1202
1201
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1203
1202
  const a = t == null ? void 0 : t[n.key];
1204
1203
  if (a == null || a === "") continue;
1205
- const o = He(n, a, s);
1204
+ const o = je(n, a, s);
1206
1205
  if (!o) continue;
1207
1206
  const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
1208
1207
  `));
@@ -1219,22 +1218,22 @@ function ft(e, t, s = F()) {
1219
1218
  function ze(e) {
1220
1219
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1221
1220
  }
1222
- function _e(e) {
1221
+ function fe(e) {
1223
1222
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
1224
1223
  }
1225
- const Ee = "";
1226
- function ue(e) {
1224
+ const Be = "";
1225
+ function de(e) {
1227
1226
  let t = e;
1228
1227
  const s = [];
1229
1228
  return t = t.replace(/`([^`\n]+)`/g, (r, i) => {
1230
1229
  const n = s.length;
1231
- return s.push(i), `${Ee}CODE${n}${Ee}`;
1232
- }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
1230
+ return s.push(i), `${Be}CODE${n}${Be}`;
1231
+ }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => fe(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
1233
1232
  }
1234
1233
  function qe(e) {
1235
1234
  if (!e) return "";
1236
1235
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
1237
- return ue(ze(t));
1236
+ return de(ze(t));
1238
1237
  }
1239
1238
  function _t(e) {
1240
1239
  if (!e) return "";
@@ -1258,29 +1257,29 @@ function _t(e) {
1258
1257
  if (/^\s*[-*]\s+/.test(n)) {
1259
1258
  const b = [];
1260
1259
  for (; r < t.length; ) {
1261
- const T = /^\s*[-*]\s+(.*)$/.exec(t[r]);
1262
- if (!T) break;
1263
- b.push(T[1]), r++;
1260
+ const M = /^\s*[-*]\s+(.*)$/.exec(t[r]);
1261
+ if (!M) break;
1262
+ b.push(M[1]), r++;
1264
1263
  }
1265
- const y = b.map((T) => `<li>${ue(T)}</li>`).join("");
1264
+ const v = b.map((M) => `<li>${de(M)}</li>`).join("");
1266
1265
  s.push({
1267
1266
  type: "block",
1268
- html: `<ul class="wm-md-ul">${y}</ul>`
1267
+ html: `<ul class="wm-md-ul">${v}</ul>`
1269
1268
  });
1270
1269
  continue;
1271
1270
  }
1272
1271
  const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1273
1272
  if (o) {
1274
- const b = parseInt(o[1], 10), y = [o[2]];
1273
+ const b = parseInt(o[1], 10), v = [o[2]];
1275
1274
  for (r++; r < t.length; ) {
1276
- const A = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1277
- if (!A) break;
1278
- y.push(A[1]), r++;
1275
+ const S = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1276
+ if (!S) break;
1277
+ v.push(S[1]), r++;
1279
1278
  }
1280
- const T = y.map((A) => `<li>${ue(A)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
1279
+ const M = v.map((S) => `<li>${de(S)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
1281
1280
  s.push({
1282
1281
  type: "block",
1283
- html: `<ol class="wm-md-ol"${E}>${T}</ol>`
1282
+ html: `<ol class="wm-md-ol"${E}>${M}</ol>`
1284
1283
  });
1285
1284
  continue;
1286
1285
  }
@@ -1289,11 +1288,11 @@ function _t(e) {
1289
1288
  const b = f[1].length;
1290
1289
  s.push({
1291
1290
  type: "block",
1292
- html: `<h${b} class="wm-md-h wm-md-h${b}">${ue(f[2])}</h${b}>`
1291
+ html: `<h${b} class="wm-md-h wm-md-h${b}">${de(f[2])}</h${b}>`
1293
1292
  }), r++;
1294
1293
  continue;
1295
1294
  }
1296
- s.push({ type: "text", html: ue(n) }), r++;
1295
+ s.push({ type: "text", html: de(n) }), r++;
1297
1296
  }
1298
1297
  let i = "";
1299
1298
  for (let n = 0; n < s.length; n++) {
@@ -1310,12 +1309,12 @@ function me(e) {
1310
1309
  const t = (s = e == null ? void 0 : e.author) == null ? void 0 : s.type;
1311
1310
  return t === "agent_ia" || t === "agent_human";
1312
1311
  }
1313
- function Y(e) {
1312
+ function G(e) {
1314
1313
  if (e == null) return null;
1315
1314
  const t = typeof e == "number" ? e : Number(e);
1316
1315
  return Number.isFinite(t) ? t : null;
1317
1316
  }
1318
- function Be(e, t) {
1317
+ function Ie(e, t) {
1319
1318
  let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1320
1319
  for (const r of t)
1321
1320
  r != null && r.created_at && r.created_at > s && (s = r.created_at);
@@ -1334,7 +1333,7 @@ function gt(e, t) {
1334
1333
  }
1335
1334
  return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
1336
1335
  }
1337
- function pt(e, t) {
1336
+ function yt(e, t) {
1338
1337
  return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
1339
1338
  }
1340
1339
  function vt(e, t, s, r) {
@@ -1349,15 +1348,15 @@ function vt(e, t, s, r) {
1349
1348
  if (!n) continue;
1350
1349
  const a = (n.text_md || "").trim();
1351
1350
  if (!a) continue;
1352
- const o = pt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1351
+ const o = yt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1353
1352
  i.push(`[${f}] ${o} :`), i.push(a), i.push("");
1354
1353
  }
1355
1354
  return i.join(`
1356
1355
  `);
1357
1356
  }
1358
- function yt(e, t, s = F(), r) {
1357
+ function pt(e, t, s = F(), r) {
1359
1358
  if (!e) return;
1360
- const i = vt(e, t || [], s, ne(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1359
+ const i = vt(e, t || [], s, re(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1361
1360
  try {
1362
1361
  const a = URL.createObjectURL(n), o = document.createElement("a");
1363
1362
  o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
@@ -1523,13 +1522,13 @@ const wt = {
1523
1522
  }
1524
1523
  }
1525
1524
  }
1526
- }, ce = Object.freeze({
1525
+ }, le = Object.freeze({
1527
1526
  firstRevealDelayMs: 450,
1528
1527
  msPerChar: 50,
1529
1528
  minTypingMs: 900,
1530
1529
  maxTypingMs: 12e3,
1531
1530
  pauseBetweenMs: 300
1532
- }), de = (e, t) => Number.isFinite(e) ? e : t, bt = {
1531
+ }), ce = (e, t) => Number.isFinite(e) ? e : t, bt = {
1533
1532
  computed: {
1534
1533
  // Resolved pacing values for the current widget. Reads each key
1535
1534
  // from `widget.reveal_pacing` (server-side single source of truth)
@@ -1542,22 +1541,22 @@ const wt = {
1542
1541
  var t;
1543
1542
  const e = ((t = this.widget) == null ? void 0 : t.reveal_pacing) || {};
1544
1543
  return {
1545
- firstRevealDelayMs: de(
1544
+ firstRevealDelayMs: ce(
1546
1545
  e.first_reveal_delay_ms,
1547
- ce.firstRevealDelayMs
1546
+ le.firstRevealDelayMs
1548
1547
  ),
1549
- msPerChar: de(e.ms_per_char, ce.msPerChar),
1550
- minTypingMs: de(
1548
+ msPerChar: ce(e.ms_per_char, le.msPerChar),
1549
+ minTypingMs: ce(
1551
1550
  e.min_typing_ms,
1552
- ce.minTypingMs
1551
+ le.minTypingMs
1553
1552
  ),
1554
- maxTypingMs: de(
1553
+ maxTypingMs: ce(
1555
1554
  e.max_typing_ms,
1556
- ce.maxTypingMs
1555
+ le.maxTypingMs
1557
1556
  ),
1558
- pauseBetweenMs: de(
1557
+ pauseBetweenMs: ce(
1559
1558
  e.pause_between_ms,
1560
- ce.pauseBetweenMs
1559
+ le.pauseBetweenMs
1561
1560
  )
1562
1561
  };
1563
1562
  }
@@ -1690,10 +1689,10 @@ const wt = {
1690
1689
  this.nextRevealAt + s.pauseBetweenMs
1691
1690
  ) + n;
1692
1691
  this.nextRevealAt = o;
1693
- const f = Math.max(0, o - r), b = e.id, y = setTimeout(() => {
1694
- this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1692
+ const f = Math.max(0, o - r), b = e.id, v = setTimeout(() => {
1693
+ this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== v), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1695
1694
  }, f);
1696
- this.revealTimers.push(y);
1695
+ this.revealTimers.push(v);
1697
1696
  },
1698
1697
  // Walk the message list and queue / instantly-reveal every new
1699
1698
  // entry according to its origin. Used by the `currentConvMessages`
@@ -1759,37 +1758,7 @@ const wt = {
1759
1758
  this.revealedAt = { ...this.revealedAt, [e.id]: 0 }, this.scheduleReveal(e, t);
1760
1759
  }
1761
1760
  }
1762
- }, kt = {
1763
- data() {
1764
- return {
1765
- approvalSettled: !0,
1766
- approvalSettleTimer: null,
1767
- // message id of the pending action the card is currently locked
1768
- // open for. Cleared whenever the approval clears / conv switches.
1769
- approvalLatchId: null
1770
- };
1771
- },
1772
- methods: {
1773
- // Clears any in-flight settle timer and returns the approval pacing
1774
- // to its idle state (settled = true so an already-pending historical
1775
- // approval can render immediately on mount/restore). Called on conv
1776
- // switch, on `pendingApproval` cleared (approve/reject/expire), and
1777
- // on unmount.
1778
- resetApprovalPacing() {
1779
- this.approvalSettleTimer && (clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = null), this.approvalSettled = !0, this.approvalLatchId = null;
1780
- },
1781
- // Pause the approval card for one settle period. A follow-on bubble
1782
- // from the same SSE burst should land (and start streaming, which
1783
- // re-bumps us) before it expires. `ms` defaults to a short beat for
1784
- // streaming-driven re-bumps; the fresh-approval path passes a longer
1785
- // grace to bridge the gap until the explaining bubble's SSE arrives.
1786
- bumpApprovalSettle(e = 800) {
1787
- this.approvalSettled = !1, this.approvalSettleTimer && clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = setTimeout(() => {
1788
- this.approvalSettled = !0, this.approvalSettleTimer = null;
1789
- }, e);
1790
- }
1791
- }
1792
- }, Ct = 300, At = {
1761
+ }, kt = 300, Ct = {
1793
1762
  data() {
1794
1763
  return {
1795
1764
  // Numeric message id snapshot frozen the moment the user
@@ -1820,33 +1789,33 @@ const wt = {
1820
1789
  markConvRead(e) {
1821
1790
  var n, a;
1822
1791
  if (!(e != null && e.id) || e._draft || !this.store) return;
1823
- const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = St(t);
1792
+ const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = At(t);
1824
1793
  if (s == null) return;
1825
- const r = Y(e.last_read_message_id), i = Y(s);
1794
+ const r = G(e.last_read_message_id), i = G(s);
1826
1795
  i != null && (r != null && i <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1827
1796
  const o = this._readMarkerPending;
1828
1797
  this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
1829
1798
  o.convId,
1830
1799
  o.messageId
1831
1800
  );
1832
- }, Ct))));
1801
+ }, kt))));
1833
1802
  }
1834
1803
  }
1835
1804
  };
1836
- function St(e) {
1805
+ function At(e) {
1837
1806
  for (let t = e.length - 1; t >= 0; t--) {
1838
1807
  const s = e[t];
1839
- if (!(!s || s._pending) && Y(s.id) != null)
1808
+ if (!(!s || s._pending) && G(s.id) != null)
1840
1809
  return s.id;
1841
1810
  }
1842
1811
  return null;
1843
1812
  }
1844
- const N = (e, t) => {
1813
+ const D = (e, t) => {
1845
1814
  const s = e.__vccOpts || e;
1846
1815
  for (const [r, i] of t)
1847
1816
  s[r] = i;
1848
1817
  return s;
1849
- }, Tt = {
1818
+ }, St = {
1850
1819
  name: "WmHumanAvatar",
1851
1820
  props: {
1852
1821
  name: { type: String, default: "" },
@@ -1860,17 +1829,17 @@ const N = (e, t) => {
1860
1829
  },
1861
1830
  computed: {
1862
1831
  bg() {
1863
- return this.avatarUrl ? "transparent" : Te(this.name);
1832
+ return this.avatarUrl ? "transparent" : Me(this.name);
1864
1833
  },
1865
1834
  initials() {
1866
- return Me(this.name);
1835
+ return Te(this.name);
1867
1836
  }
1868
1837
  }
1869
1838
  }, Mt = ["src", "alt"];
1870
- function xt(e, t, s, r, i, n) {
1839
+ function Tt(e, t, s, r, i, n) {
1871
1840
  return c(), d("div", {
1872
- class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
1873
- style: z({
1841
+ class: L(["wm-huav", { "wm-huav--tail": s.tail }]),
1842
+ style: j({
1874
1843
  width: s.size + "px",
1875
1844
  height: s.size + "px",
1876
1845
  "--wm-avr": Math.round(s.size * 0.32) + "px",
@@ -1883,13 +1852,13 @@ function xt(e, t, s, r, i, n) {
1883
1852
  alt: s.name || ""
1884
1853
  }, null, 8, Mt)) : (c(), d("span", {
1885
1854
  key: 1,
1886
- style: z({ fontSize: s.size * 0.36 + "px" })
1887
- }, v(n.initials), 5))
1855
+ style: j({ fontSize: s.size * 0.36 + "px" })
1856
+ }, y(n.initials), 5))
1888
1857
  ], 6);
1889
1858
  }
1890
- const ve = /* @__PURE__ */ N(Tt, [["render", xt], ["__scopeId", "data-v-14e10c0d"]]), Ot = 3, Rt = {
1859
+ const ye = /* @__PURE__ */ D(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1891
1860
  name: "WmLauncher",
1892
- components: { HumanAvatar: ve },
1861
+ components: { HumanAvatar: ye },
1893
1862
  inject: {
1894
1863
  // Translator shared by the Messenger shell; French fallback when
1895
1864
  // the component is used standalone.
@@ -1910,12 +1879,12 @@ const ve = /* @__PURE__ */ N(Tt, [["render", xt], ["__scopeId", "data-v-14e10c0d
1910
1879
  // élément en ordre DOM avec un flex column normal). Les plus
1911
1880
  // anciens remontent dans la pile.
1912
1881
  visiblePeeks() {
1913
- return this.peeks.slice(0, Ot).reverse();
1882
+ return this.peeks.slice(0, xt).reverse();
1914
1883
  }
1915
1884
  }
1916
- }, Lt = ["aria-label", "onClick", "onKeydown"], It = ["aria-label", "onClick"], Et = { class: "wm-peek__avatar" }, Bt = ["aria-label"], Pt = { class: "wm-peek__body" }, Nt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, jt = { class: "wm-peek__text" }, Ft = ["onClick"], Ht = ["aria-label"], zt = ["aria-label"];
1917
- function qt(e, t, s, r, i, n) {
1918
- const a = B("HumanAvatar");
1885
+ }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], Et = { class: "wm-peek__avatar" }, Bt = ["aria-label"], It = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, Ft = ["onClick"], Ht = ["aria-label"], jt = ["aria-label"];
1886
+ function zt(e, t, s, r, i, n) {
1887
+ const a = P("HumanAvatar");
1919
1888
  return c(), d("div", {
1920
1889
  class: "wm-launcherWrap",
1921
1890
  onMouseenter: t[1] || (t[1] = (o) => e.$emit("hover", !0)),
@@ -1923,16 +1892,16 @@ function qt(e, t, s, r, i, n) {
1923
1892
  onFocusin: t[3] || (t[3] = (o) => e.$emit("hover", !0)),
1924
1893
  onFocusout: t[4] || (t[4] = (o) => e.$emit("hover", !1))
1925
1894
  }, [
1926
- K(Ue, { name: "wm-peek" }, {
1927
- default: je(() => [
1895
+ W(Ne, { name: "wm-peek" }, {
1896
+ default: Fe(() => [
1928
1897
  n.visiblePeeks.length ? (c(), d("div", {
1929
1898
  key: 0,
1930
- class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1899
+ class: L(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1931
1900
  }, [
1932
- (c(!0), d(I, null, j(n.visiblePeeks, (o, f) => (c(), d("div", {
1901
+ (c(!0), d(B, null, N(n.visiblePeeks, (o, f) => (c(), d("div", {
1933
1902
  key: o.convId,
1934
1903
  class: "wm-peek",
1935
- style: z({
1904
+ style: j({
1936
1905
  "--depth": n.visiblePeeks.length - 1 - f,
1937
1906
  zIndex: f + 1
1938
1907
  }),
@@ -1943,15 +1912,15 @@ function qt(e, t, s, r, i, n) {
1943
1912
  }),
1944
1913
  onClick: (b) => e.$emit("open", o.convId),
1945
1914
  onKeydown: [
1946
- ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
1947
- ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
1915
+ _e(Y((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
1916
+ _e(Y((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
1948
1917
  ]
1949
1918
  }, [
1950
1919
  l("button", {
1951
1920
  type: "button",
1952
1921
  class: "wm-peek__close",
1953
1922
  "aria-label": n.t("launcher.dismiss"),
1954
- onClick: J((b) => e.$emit("dismiss", o.convId), ["stop"])
1923
+ onClick: Y((b) => e.$emit("dismiss", o.convId), ["stop"])
1955
1924
  }, [...t[5] || (t[5] = [
1956
1925
  l("svg", {
1957
1926
  width: "9",
@@ -1966,9 +1935,9 @@ function qt(e, t, s, r, i, n) {
1966
1935
  }, [
1967
1936
  l("path", { d: "M18 6L6 18M6 6l12 12" })
1968
1937
  ], -1)
1969
- ])], 8, It),
1938
+ ])], 8, Lt),
1970
1939
  l("div", Et, [
1971
- K(a, {
1940
+ W(a, {
1972
1941
  name: o.senderName,
1973
1942
  "avatar-url": o.senderAvatarUrl,
1974
1943
  size: 34
@@ -1977,21 +1946,21 @@ function qt(e, t, s, r, i, n) {
1977
1946
  key: 0,
1978
1947
  class: "wm-peek__avatarBadge",
1979
1948
  "aria-label": n.t("launcher.unreadMessages", { count: o.count })
1980
- }, v(o.count > 9 ? "9+" : o.count), 9, Bt)) : k("", !0)
1949
+ }, y(o.count > 9 ? "9+" : o.count), 9, Bt)) : k("", !0)
1981
1950
  ]),
1982
- l("div", Pt, [
1983
- l("div", Nt, [
1984
- l("span", Dt, v(o.senderName || n.t("common.agent")), 1),
1985
- l("span", Ut, v(n.t("launcher.repliedToYou")), 1)
1951
+ l("div", It, [
1952
+ l("div", Pt, [
1953
+ l("span", Dt, y(o.senderName || n.t("common.agent")), 1),
1954
+ l("span", Ut, y(n.t("launcher.repliedToYou")), 1)
1986
1955
  ]),
1987
- l("p", jt, v(o.preview), 1)
1956
+ l("p", Nt, y(o.preview), 1)
1988
1957
  ]),
1989
1958
  l("button", {
1990
1959
  type: "button",
1991
1960
  class: "wm-peek__open",
1992
- onClick: J((b) => e.$emit("open", o.convId), ["stop"])
1993
- }, v(n.t("common.open")), 9, Ft)
1994
- ], 44, Lt))), 128))
1961
+ onClick: Y((b) => e.$emit("open", o.convId), ["stop"])
1962
+ }, y(n.t("common.open")), 9, Ft)
1963
+ ], 44, Rt))), 128))
1995
1964
  ], 2)) : k("", !0)
1996
1965
  ]),
1997
1966
  _: 1
@@ -2023,11 +1992,11 @@ function qt(e, t, s, r, i, n) {
2023
1992
  }) : n.t("launcher.unreadConversationsOne", {
2024
1993
  count: s.unreadCount
2025
1994
  })
2026
- }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, zt)) : k("", !0)
1995
+ }, y(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, jt)) : k("", !0)
2027
1996
  ], 8, Ht)
2028
1997
  ], 32);
2029
1998
  }
2030
- const Vt = /* @__PURE__ */ N(Rt, [["render", qt], ["__scopeId", "data-v-d81459bc"]]), Kt = {
1999
+ const qt = /* @__PURE__ */ D(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2031
2000
  name: "WmAIAvatar",
2032
2001
  props: {
2033
2002
  size: { type: Number, default: 26 },
@@ -2050,33 +2019,33 @@ const Vt = /* @__PURE__ */ N(Rt, [["render", qt], ["__scopeId", "data-v-d81459bc
2050
2019
  },
2051
2020
  computed: {
2052
2021
  initials() {
2053
- return Me(this.name);
2022
+ return Te(this.name);
2054
2023
  },
2055
2024
  bgColor() {
2056
- return Te(this.name);
2025
+ return Me(this.name);
2057
2026
  }
2058
2027
  }
2059
- }, Wt = {
2028
+ }, Kt = {
2060
2029
  key: 0,
2061
2030
  class: "wm-aiav__pulse"
2062
- }, $t = ["src", "alt"], Gt = ["width", "height"];
2063
- function Yt(e, t, s, r, i, n) {
2031
+ }, Wt = ["src", "alt"], $t = ["width", "height"];
2032
+ function Gt(e, t, s, r, i, n) {
2064
2033
  return c(), d("div", {
2065
- class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2066
- style: z({
2034
+ class: L(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2035
+ style: j({
2067
2036
  width: s.size + "px",
2068
2037
  height: s.size + "px",
2069
2038
  "--wm-avr": s.size * 0.32 + "px"
2070
2039
  })
2071
2040
  }, [
2072
- s.pulse ? (c(), d("div", Wt)) : k("", !0),
2041
+ s.pulse ? (c(), d("div", Kt)) : k("", !0),
2073
2042
  l("div", {
2074
- class: R(["wm-aiav__inner", {
2043
+ class: L(["wm-aiav__inner", {
2075
2044
  "wm-aiav__inner--glow": s.pulse,
2076
2045
  "wm-aiav__inner--img": !!s.imageUrl,
2077
2046
  "wm-aiav__inner--initials": !s.imageUrl && !!n.initials
2078
2047
  }]),
2079
- style: z(
2048
+ style: j(
2080
2049
  !s.imageUrl && n.initials ? { background: n.bgColor } : null
2081
2050
  )
2082
2051
  }, [
@@ -2084,10 +2053,10 @@ function Yt(e, t, s, r, i, n) {
2084
2053
  key: 0,
2085
2054
  src: s.imageUrl,
2086
2055
  alt: s.name || ""
2087
- }, null, 8, $t)) : n.initials ? (c(), d("span", {
2056
+ }, null, 8, Wt)) : n.initials ? (c(), d("span", {
2088
2057
  key: 1,
2089
- style: z({ fontSize: s.size * 0.36 + "px" })
2090
- }, v(n.initials), 5)) : (c(), d("svg", {
2058
+ style: j({ fontSize: s.size * 0.36 + "px" })
2059
+ }, y(n.initials), 5)) : (c(), d("svg", {
2091
2060
  key: 2,
2092
2061
  width: s.size * 0.5,
2093
2062
  height: s.size * 0.5,
@@ -2114,11 +2083,11 @@ function Yt(e, t, s, r, i, n) {
2114
2083
  fill: "white",
2115
2084
  opacity: "0.38"
2116
2085
  }, null, -1)
2117
- ])], 8, Gt))
2086
+ ])], 8, $t))
2118
2087
  ], 6)
2119
2088
  ], 6);
2120
2089
  }
2121
- const oe = /* @__PURE__ */ N(Kt, [["render", Yt], ["__scopeId", "data-v-6f7f685d"]]), Jt = {
2090
+ const he = /* @__PURE__ */ D(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2122
2091
  name: "WmTeamAvatars",
2123
2092
  props: {
2124
2093
  members: { type: Array, default: () => [] },
@@ -2134,29 +2103,29 @@ const oe = /* @__PURE__ */ N(Kt, [["render", Yt], ["__scopeId", "data-v-6f7f685d
2134
2103
  },
2135
2104
  methods: {
2136
2105
  colorFor(e) {
2137
- return e.avatar_url ? "transparent" : Te(e.name || "");
2106
+ return e.avatar_url ? "transparent" : Me(e.name || "");
2138
2107
  },
2139
2108
  initialsFor(e) {
2140
- return Me(e.name || "");
2109
+ return Te(e.name || "");
2141
2110
  }
2142
2111
  }
2143
- }, Xt = {
2112
+ }, Jt = {
2144
2113
  key: 0,
2145
2114
  class: "wm-team"
2146
- }, Qt = ["src", "alt"], Zt = { key: 1 }, en = {
2115
+ }, Xt = ["src", "alt"], Qt = { key: 1 }, Zt = {
2147
2116
  key: 0,
2148
2117
  class: "wm-team__label"
2149
2118
  };
2150
- function tn(e, t, s, r, i, n) {
2151
- return n.visible ? (c(), d("div", Xt, [
2119
+ function en(e, t, s, r, i, n) {
2120
+ return n.visible ? (c(), d("div", Jt, [
2152
2121
  l("div", {
2153
2122
  class: "wm-team__stack",
2154
- style: z({ width: n.stackWidth + "px" })
2123
+ style: j({ width: n.stackWidth + "px" })
2155
2124
  }, [
2156
- (c(!0), d(I, null, j(s.members.slice(0, 3), (a, o) => (c(), d("div", {
2125
+ (c(!0), d(B, null, N(s.members.slice(0, 3), (a, o) => (c(), d("div", {
2157
2126
  key: o,
2158
2127
  class: "wm-team__pill",
2159
- style: z({
2128
+ style: j({
2160
2129
  left: o * 13 + "px",
2161
2130
  zIndex: 3 - o,
2162
2131
  background: n.colorFor(a)
@@ -2166,15 +2135,15 @@ function tn(e, t, s, r, i, n) {
2166
2135
  key: 0,
2167
2136
  src: a.avatar_url,
2168
2137
  alt: a.name || ""
2169
- }, null, 8, Qt)) : (c(), d("span", Zt, v(n.initialsFor(a)), 1))
2138
+ }, null, 8, Xt)) : (c(), d("span", Qt, y(n.initialsFor(a)), 1))
2170
2139
  ], 4))), 128))
2171
2140
  ], 4),
2172
- s.responseLabel ? (c(), d("span", en, v(s.responseLabel), 1)) : k("", !0)
2141
+ s.responseLabel ? (c(), d("span", Zt, y(s.responseLabel), 1)) : k("", !0)
2173
2142
  ])) : k("", !0);
2174
2143
  }
2175
- const nn = /* @__PURE__ */ N(Jt, [["render", tn], ["__scopeId", "data-v-e49a9063"]]), sn = {
2144
+ const tn = /* @__PURE__ */ D(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2176
2145
  name: "WmHeader",
2177
- components: { AIAvatar: oe, TeamAvatars: nn },
2146
+ components: { AIAvatar: he, TeamAvatars: tn },
2178
2147
  inject: {
2179
2148
  // Translator shared by the Messenger shell. Falls back to a French
2180
2149
  // translator when the component is used standalone (no provider).
@@ -2211,16 +2180,16 @@ const nn = /* @__PURE__ */ N(Jt, [["render", tn], ["__scopeId", "data-v-e49a9063
2211
2180
  return s;
2212
2181
  }
2213
2182
  }
2214
- }, rn = { class: "wm-header" }, an = ["aria-label"], on = {
2183
+ }, sn = { class: "wm-header" }, rn = ["aria-label"], an = {
2215
2184
  key: 1,
2216
2185
  style: { width: "30px", height: "30px", "flex-shrink": "0" }
2217
- }, ln = { class: "wm-header__avatar" }, cn = { class: "wm-header__main" }, dn = { class: "wm-header__title" }, un = {
2186
+ }, on = { class: "wm-header__avatar" }, ln = { class: "wm-header__main" }, cn = { class: "wm-header__title" }, dn = {
2218
2187
  key: 3,
2219
2188
  class: "wm-header__fill"
2220
- }, hn = { class: "wm-header__actions" }, mn = ["aria-label", "title"], fn = ["aria-label", "title"];
2221
- function _n(e, t, s, r, i, n) {
2222
- const a = B("AIAvatar"), o = B("TeamAvatars");
2223
- return c(), d("div", rn, [
2189
+ }, un = { class: "wm-header__actions" }, mn = ["aria-label", "title"], hn = ["aria-label", "title"];
2190
+ function fn(e, t, s, r, i, n) {
2191
+ const a = P("AIAvatar"), o = P("TeamAvatars");
2192
+ return c(), d("div", sn, [
2224
2193
  s.showBack ? (c(), d("button", {
2225
2194
  key: 0,
2226
2195
  type: "button",
@@ -2241,29 +2210,29 @@ function _n(e, t, s, r, i, n) {
2241
2210
  }, [
2242
2211
  l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2243
2212
  ], -1)
2244
- ])], 8, an)) : (c(), d("div", on)),
2245
- s.showIdentity ? (c(), d(I, { key: 2 }, [
2246
- l("div", ln, [
2247
- K(a, {
2213
+ ])], 8, rn)) : (c(), d("div", an)),
2214
+ s.showIdentity ? (c(), d(B, { key: 2 }, [
2215
+ l("div", on, [
2216
+ W(a, {
2248
2217
  size: 30,
2249
2218
  name: s.agentName,
2250
2219
  "image-url": s.agentAvatarUrl
2251
2220
  }, null, 8, ["name", "image-url"])
2252
2221
  ]),
2253
- l("div", cn, [
2254
- l("div", dn, v(s.title), 1)
2222
+ l("div", ln, [
2223
+ l("div", cn, y(s.title), 1)
2255
2224
  ]),
2256
- n.hasTeam ? (c(), P(o, {
2225
+ n.hasTeam ? (c(), I(o, {
2257
2226
  key: 0,
2258
2227
  members: n.displayedTeamMembers,
2259
2228
  "response-label": ""
2260
2229
  }, null, 8, ["members"])) : k("", !0)
2261
- ], 64)) : (c(), d("div", un)),
2262
- l("div", hn, [
2230
+ ], 64)) : (c(), d("div", dn)),
2231
+ l("div", un, [
2263
2232
  s.showMore ? (c(), d("button", {
2264
2233
  key: 0,
2265
2234
  type: "button",
2266
- class: R(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2235
+ class: L(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2267
2236
  "aria-label": n.t("header.moreOptions"),
2268
2237
  title: n.t("header.moreOptions"),
2269
2238
  onClick: t[1] || (t[1] = (f) => e.$emit("more"))
@@ -2313,19 +2282,19 @@ function _n(e, t, s, r, i, n) {
2313
2282
  }, [
2314
2283
  l("path", { d: "M18 6L6 18M6 6l12 12" })
2315
2284
  ], -1)
2316
- ])], 8, fn)) : k("", !0)
2285
+ ])], 8, hn)) : k("", !0)
2317
2286
  ])
2318
2287
  ]);
2319
2288
  }
2320
- const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2289
+ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2321
2290
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
2322
2291
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
2323
2292
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
2324
2293
  chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
2325
2294
  link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
2326
- }, pn = {
2295
+ }, gn = {
2327
2296
  name: "WmOnboarding",
2328
- components: { AIAvatar: oe, HumanAvatar: ve },
2297
+ components: { AIAvatar: he, HumanAvatar: ye },
2329
2298
  inject: {
2330
2299
  // Translator + resolved-language getter shared by the Messenger
2331
2300
  // shell. The language getter feeds `formatTs` (relative date
@@ -2423,7 +2392,7 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
2423
2392
  if (!e) return "";
2424
2393
  const t = new Date(e);
2425
2394
  if (Number.isNaN(t.getTime())) return "";
2426
- const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2395
+ const s = re(this.wmLocale()), r = /* @__PURE__ */ new Date();
2427
2396
  if (t.toDateString() === r.toDateString())
2428
2397
  return t.toLocaleTimeString(s, {
2429
2398
  hour: "2-digit",
@@ -2439,19 +2408,19 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
2439
2408
  });
2440
2409
  }
2441
2410
  }
2442
- }, vn = { class: "wm-onb" }, yn = { class: "wm-onb__hero" }, wn = { class: "wm-onb__hero-text" }, bn = { class: "wm-onb__title" }, kn = { class: "wm-onb__sub" }, Cn = {
2411
+ }, yn = { class: "wm-onb" }, vn = { class: "wm-onb__hero" }, pn = { class: "wm-onb__hero-text" }, wn = { class: "wm-onb__title" }, bn = { class: "wm-onb__sub" }, kn = {
2443
2412
  key: 0,
2444
2413
  class: "wm-onb__alertList"
2445
- }, An = ["onClick"], Sn = {
2414
+ }, Cn = ["onClick"], An = {
2446
2415
  key: 0,
2447
2416
  class: "wm-onb__defaultAvatar"
2448
- }, Tn = ["aria-label"], Mn = { class: "wm-onb__alert-body" }, xn = { class: "wm-onb__alert-title" }, On = { class: "wm-onb__alert-preview" }, Rn = {
2417
+ }, Sn = ["aria-label"], Mn = { class: "wm-onb__alert-body" }, Tn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
2449
2418
  key: 0,
2450
2419
  class: "wm-onb__alert-sender"
2451
- }, Ln = ["innerHTML"], In = { class: "wm-onb__alert-meta" }, En = {
2420
+ }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, En = {
2452
2421
  key: 0,
2453
2422
  class: "wm-onb__alert-time"
2454
- }, Bn = { class: "wm-onb__alert-resume" }, Pn = { class: "wm-onb__actions" }, Nn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Un = ["onClick"], jn = { class: "wm-onb__btn-icon" }, Fn = ["aria-label"], Hn = {
2423
+ }, Bn = { class: "wm-onb__alert-resume" }, In = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, Fn = ["aria-label"], Hn = {
2455
2424
  key: 1,
2456
2425
  width: "18",
2457
2426
  height: "18",
@@ -2462,7 +2431,7 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
2462
2431
  "stroke-linecap": "round",
2463
2432
  "stroke-linejoin": "round",
2464
2433
  "aria-hidden": "true"
2465
- }, zn = ["d"], qn = { class: "wm-onb__btn-label" }, Vn = {
2434
+ }, jn = ["d"], zn = { class: "wm-onb__btn-label" }, qn = {
2466
2435
  key: 0,
2467
2436
  class: "wm-onb__btn-trail",
2468
2437
  width: "13",
@@ -2474,7 +2443,7 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
2474
2443
  "stroke-linecap": "round",
2475
2444
  "stroke-linejoin": "round",
2476
2445
  "aria-hidden": "true"
2477
- }, Kn = { class: "wm-onb__btn-icon" }, Wn = {
2446
+ }, Vn = { class: "wm-onb__btn-icon" }, Kn = {
2478
2447
  width: "18",
2479
2448
  height: "18",
2480
2449
  viewBox: "0 0 24 24",
@@ -2484,11 +2453,11 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
2484
2453
  "stroke-linecap": "round",
2485
2454
  "stroke-linejoin": "round",
2486
2455
  "aria-hidden": "true"
2487
- }, $n = ["d"], Gn = { class: "wm-onb__btn-label" }, Yn = { class: "wm-onb__btn-count" };
2488
- function Jn(e, t, s, r, i, n) {
2489
- const a = B("AIAvatar");
2490
- return c(), d("div", vn, [
2491
- l("div", yn, [
2456
+ }, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
2457
+ function Yn(e, t, s, r, i, n) {
2458
+ const a = P("AIAvatar");
2459
+ return c(), d("div", yn, [
2460
+ l("div", vn, [
2492
2461
  t[2] || (t[2] = l("svg", {
2493
2462
  class: "wm-onb__hero-deco",
2494
2463
  width: "180",
@@ -2523,26 +2492,26 @@ function Jn(e, t, s, r, i, n) {
2523
2492
  opacity: "0.65"
2524
2493
  })
2525
2494
  ], -1)),
2526
- K(a, {
2495
+ W(a, {
2527
2496
  size: 52,
2528
2497
  "image-url": s.defaultIconUrl
2529
2498
  }, null, 8, ["image-url"]),
2530
- l("div", wn, [
2531
- l("div", bn, v(n.heroTitle), 1),
2532
- l("div", kn, v(n.heroSub), 1)
2499
+ l("div", pn, [
2500
+ l("div", wn, y(n.heroTitle), 1),
2501
+ l("div", bn, y(n.heroSub), 1)
2533
2502
  ])
2534
2503
  ]),
2535
- n.unreadThreads.length ? (c(), d("div", Cn, [
2536
- (c(!0), d(I, null, j(n.unreadThreads, (o) => (c(), d("button", {
2504
+ n.unreadThreads.length ? (c(), d("div", kn, [
2505
+ (c(!0), d(B, null, N(n.unreadThreads, (o) => (c(), d("button", {
2537
2506
  key: o.id,
2538
2507
  type: "button",
2539
2508
  class: "wm-onb__alert",
2540
2509
  onClick: (f) => e.$emit("resume", o)
2541
2510
  }, [
2542
2511
  l("span", {
2543
- class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2512
+ class: L(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2544
2513
  }, [
2545
- n.isDefaultAvatar(o) ? (c(), d("span", Sn, [...t[3] || (t[3] = [
2514
+ n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
2546
2515
  l("svg", {
2547
2516
  width: "20",
2548
2517
  height: "20",
@@ -2556,31 +2525,31 @@ function Jn(e, t, s, r, i, n) {
2556
2525
  }, [
2557
2526
  l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2558
2527
  ], -1)
2559
- ])])) : (c(), P(Ae(n.avatarComponent(o)), Fe({
2528
+ ])])) : (c(), I(Ae(n.avatarComponent(o)), He({
2560
2529
  key: 1,
2561
2530
  ref_for: !0
2562
2531
  }, n.avatarProps(o)), null, 16)),
2563
2532
  l("span", {
2564
2533
  class: "wm-onb__alert-dot",
2565
2534
  "aria-label": n.t("onboarding.unread")
2566
- }, null, 8, Tn)
2535
+ }, null, 8, Sn)
2567
2536
  ], 2),
2568
2537
  l("span", Mn, [
2569
- l("span", xn, v(o.title), 1),
2570
- l("span", On, [
2571
- n.senderLabel(o) ? (c(), d("span", Rn, v(n.senderLabel(o)) + " · ", 1)) : k("", !0),
2538
+ l("span", Tn, y(o.title), 1),
2539
+ l("span", xn, [
2540
+ n.senderLabel(o) ? (c(), d("span", On, y(n.senderLabel(o)) + " · ", 1)) : k("", !0),
2572
2541
  l("span", {
2573
2542
  innerHTML: n.renderPreview(o.preview)
2574
- }, null, 8, Ln)
2543
+ }, null, 8, Rn)
2575
2544
  ])
2576
2545
  ]),
2577
- l("span", In, [
2578
- n.formatTs(o._ts) ? (c(), d("span", En, v(n.formatTs(o._ts)), 1)) : k("", !0),
2579
- l("span", Bn, v(n.t("onboarding.resume")), 1)
2546
+ l("span", Ln, [
2547
+ n.formatTs(o._ts) ? (c(), d("span", En, y(n.formatTs(o._ts)), 1)) : k("", !0),
2548
+ l("span", Bn, y(n.t("onboarding.resume")), 1)
2580
2549
  ])
2581
- ], 8, An))), 128))
2550
+ ], 8, Cn))), 128))
2582
2551
  ])) : k("", !0),
2583
- l("div", Pn, [
2552
+ l("div", In, [
2584
2553
  l("button", {
2585
2554
  type: "button",
2586
2555
  class: "wm-onb__btn wm-onb__btn--start",
@@ -2602,29 +2571,29 @@ function Jn(e, t, s, r, i, n) {
2602
2571
  l("path", { d: "M12 5v14M5 12h14" })
2603
2572
  ])
2604
2573
  ], -1)),
2605
- l("span", Dn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
2606
- ], 8, Nn),
2607
- (c(!0), d(I, null, j(s.quickLinks, (o, f) => (c(), d("button", {
2574
+ l("span", Dn, y(s.busy ? "…" : n.t("onboarding.start")), 1)
2575
+ ], 8, Pn),
2576
+ (c(!0), d(B, null, N(s.quickLinks, (o, f) => (c(), d("button", {
2608
2577
  key: "ql-" + f,
2609
2578
  type: "button",
2610
2579
  class: "wm-onb__btn",
2611
2580
  onClick: (b) => e.$emit("select", o)
2612
2581
  }, [
2613
- l("span", jn, [
2582
+ l("span", Nn, [
2614
2583
  n.safeIconUrl(o) ? (c(), d("span", {
2615
2584
  key: 0,
2616
2585
  class: "wm-onb__btn-iconImg",
2617
- style: z(n.iconUrlStyle(o)),
2586
+ style: j(n.iconUrlStyle(o)),
2618
2587
  role: "img",
2619
2588
  "aria-label": o.label || ""
2620
2589
  }, null, 12, Fn)) : (c(), d("svg", Hn, [
2621
2590
  l("path", {
2622
2591
  d: n.iconPath(o.icon)
2623
- }, null, 8, zn)
2592
+ }, null, 8, jn)
2624
2593
  ]))
2625
2594
  ]),
2626
- l("span", qn, v(o.label), 1),
2627
- n.isExternalLink(o) ? (c(), d("svg", Vn, [...t[5] || (t[5] = [
2595
+ l("span", zn, y(o.label), 1),
2596
+ n.isExternalLink(o) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2628
2597
  l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2629
2598
  ])])) : k("", !0)
2630
2599
  ], 8, Un))), 128)),
@@ -2634,15 +2603,15 @@ function Jn(e, t, s, r, i, n) {
2634
2603
  class: "wm-onb__btn",
2635
2604
  onClick: t[1] || (t[1] = (o) => e.$emit("view-history"))
2636
2605
  }, [
2637
- l("span", Kn, [
2638
- (c(), d("svg", Wn, [
2606
+ l("span", Vn, [
2607
+ (c(), d("svg", Kn, [
2639
2608
  l("path", {
2640
2609
  d: n.iconPath("chat")
2641
- }, null, 8, $n)
2610
+ }, null, 8, Wn)
2642
2611
  ]))
2643
2612
  ]),
2644
- l("span", Gn, v(n.t("onboarding.allConversations")), 1),
2645
- l("span", Yn, v(s.openThreads.length), 1),
2613
+ l("span", $n, y(n.t("onboarding.allConversations")), 1),
2614
+ l("span", Gn, y(s.openThreads.length), 1),
2646
2615
  t[6] || (t[6] = l("svg", {
2647
2616
  class: "wm-onb__btn-trail",
2648
2617
  width: "13",
@@ -2661,9 +2630,9 @@ function Jn(e, t, s, r, i, n) {
2661
2630
  ])
2662
2631
  ]);
2663
2632
  }
2664
- const Xn = /* @__PURE__ */ N(pn, [["render", Jn], ["__scopeId", "data-v-136c3afe"]]), Qn = {
2633
+ const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2665
2634
  name: "WmHistory",
2666
- components: { AIAvatar: oe, HumanAvatar: ve },
2635
+ components: { AIAvatar: he, HumanAvatar: ye },
2667
2636
  inject: {
2668
2637
  t: { default: () => F() },
2669
2638
  wmLocale: { default: () => () => "fr" }
@@ -2714,7 +2683,7 @@ const Xn = /* @__PURE__ */ N(pn, [["render", Jn], ["__scopeId", "data-v-136c3afe
2714
2683
  if (!e) return "";
2715
2684
  const t = new Date(e);
2716
2685
  if (Number.isNaN(t.getTime())) return "";
2717
- const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2686
+ const s = re(this.wmLocale()), r = /* @__PURE__ */ new Date();
2718
2687
  if (t.toDateString() === r.toDateString())
2719
2688
  return t.toLocaleTimeString(s, {
2720
2689
  hour: "2-digit",
@@ -2730,19 +2699,19 @@ const Xn = /* @__PURE__ */ N(pn, [["render", Jn], ["__scopeId", "data-v-136c3afe
2730
2699
  });
2731
2700
  }
2732
2701
  }
2733
- }, Zn = { class: "wm-hist" }, es = { class: "wm-hist__search" }, ts = ["placeholder", "aria-label"], ns = { class: "wm-hist__list" }, ss = ["onClick"], rs = {
2702
+ }, Qn = { class: "wm-hist" }, Zn = { class: "wm-hist__search" }, es = ["placeholder", "aria-label"], ts = { class: "wm-hist__list" }, ns = ["onClick"], ss = {
2734
2703
  key: 0,
2735
2704
  class: "wm-hist__defaultAvatar"
2736
- }, is = ["aria-label"], as = { class: "wm-hist__thread-body" }, os = { class: "wm-hist__thread-title" }, ls = ["innerHTML"], cs = { class: "wm-hist__thread-meta" }, ds = {
2705
+ }, rs = ["aria-label"], is = { class: "wm-hist__thread-body" }, as = { class: "wm-hist__thread-title" }, os = ["innerHTML"], ls = { class: "wm-hist__thread-meta" }, cs = {
2737
2706
  key: 0,
2738
2707
  class: "wm-hist__thread-time"
2739
- }, us = {
2708
+ }, ds = {
2740
2709
  key: 0,
2741
2710
  class: "wm-hist__empty"
2742
2711
  };
2743
- function hs(e, t, s, r, i, n) {
2744
- return c(), d("div", Zn, [
2745
- l("div", es, [
2712
+ function us(e, t, s, r, i, n) {
2713
+ return c(), d("div", Qn, [
2714
+ l("div", Zn, [
2746
2715
  t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
2747
2716
  l("svg", {
2748
2717
  width: "13",
@@ -2758,26 +2727,26 @@ function hs(e, t, s, r, i, n) {
2758
2727
  l("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2759
2728
  ])
2760
2729
  ], -1)),
2761
- G(l("input", {
2730
+ $(l("input", {
2762
2731
  "onUpdate:modelValue": t[0] || (t[0] = (a) => i.query = a),
2763
2732
  type: "text",
2764
2733
  placeholder: n.t("onboarding.search"),
2765
2734
  "aria-label": n.t("onboarding.search")
2766
- }, null, 8, ts), [
2767
- [te, i.query]
2735
+ }, null, 8, es), [
2736
+ [se, i.query]
2768
2737
  ])
2769
2738
  ]),
2770
- l("div", ns, [
2771
- (c(!0), d(I, null, j(n.filteredThreads, (a) => (c(), d("button", {
2739
+ l("div", ts, [
2740
+ (c(!0), d(B, null, N(n.filteredThreads, (a) => (c(), d("button", {
2772
2741
  key: a.id,
2773
2742
  type: "button",
2774
- class: R(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2743
+ class: L(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2775
2744
  onClick: (o) => e.$emit("resume", a)
2776
2745
  }, [
2777
2746
  l("span", {
2778
- class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2747
+ class: L(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2779
2748
  }, [
2780
- n.isDefaultAvatar(a) ? (c(), d("span", rs, [...t[2] || (t[2] = [
2749
+ n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2781
2750
  l("svg", {
2782
2751
  width: "18",
2783
2752
  height: "18",
@@ -2791,7 +2760,7 @@ function hs(e, t, s, r, i, n) {
2791
2760
  }, [
2792
2761
  l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2793
2762
  ], -1)
2794
- ])])) : (c(), P(Ae(n.avatarComponent(a)), Fe({
2763
+ ])])) : (c(), I(Ae(n.avatarComponent(a)), He({
2795
2764
  key: 1,
2796
2765
  ref_for: !0
2797
2766
  }, n.avatarProps(a)), null, 16)),
@@ -2799,17 +2768,17 @@ function hs(e, t, s, r, i, n) {
2799
2768
  key: 2,
2800
2769
  class: "wm-hist__thread-dot",
2801
2770
  "aria-label": n.t("onboarding.unread")
2802
- }, null, 8, is)) : k("", !0)
2771
+ }, null, 8, rs)) : k("", !0)
2803
2772
  ], 2),
2804
- l("span", as, [
2805
- l("span", os, v(a.title), 1),
2773
+ l("span", is, [
2774
+ l("span", as, y(a.title), 1),
2806
2775
  l("span", {
2807
2776
  class: "wm-hist__thread-preview",
2808
2777
  innerHTML: n.renderPreview(a.preview)
2809
- }, null, 8, ls)
2778
+ }, null, 8, os)
2810
2779
  ]),
2811
- l("span", cs, [
2812
- n.formatTs(a._ts) ? (c(), d("span", ds, v(n.formatTs(a._ts)), 1)) : k("", !0),
2780
+ l("span", ls, [
2781
+ n.formatTs(a._ts) ? (c(), d("span", cs, y(n.formatTs(a._ts)), 1)) : k("", !0),
2813
2782
  t[3] || (t[3] = l("svg", {
2814
2783
  width: "14",
2815
2784
  height: "14",
@@ -2825,16 +2794,16 @@ function hs(e, t, s, r, i, n) {
2825
2794
  l("path", { d: "M5 12h14M13 5l7 7-7 7" })
2826
2795
  ], -1))
2827
2796
  ])
2828
- ], 10, ss))), 128)),
2829
- n.filteredThreads.length ? k("", !0) : (c(), d("div", us, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2797
+ ], 10, ns))), 128)),
2798
+ n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, y(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2830
2799
  ])
2831
2800
  ]);
2832
2801
  }
2833
- const ms = /* @__PURE__ */ N(Qn, [["render", hs], ["__scopeId", "data-v-6bf35ef1"]]);
2834
- function fs(e) {
2802
+ const ms = /* @__PURE__ */ D(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2803
+ function hs(e) {
2835
2804
  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();
2836
2805
  }
2837
- const _s = {
2806
+ const fs = {
2838
2807
  name: "WmActionResult",
2839
2808
  props: {
2840
2809
  state: { type: String, default: "success" },
@@ -2844,13 +2813,13 @@ const _s = {
2844
2813
  },
2845
2814
  computed: {
2846
2815
  detailText() {
2847
- return fs(this.detail);
2816
+ return hs(this.detail);
2848
2817
  }
2849
2818
  }
2850
- }, gs = {
2819
+ }, _s = {
2851
2820
  class: "wm-result__icon",
2852
2821
  "aria-hidden": "true"
2853
- }, ps = {
2822
+ }, gs = {
2854
2823
  key: 0,
2855
2824
  width: "11",
2856
2825
  height: "11",
@@ -2860,7 +2829,7 @@ const _s = {
2860
2829
  "stroke-width": "2.8",
2861
2830
  "stroke-linecap": "round",
2862
2831
  "stroke-linejoin": "round"
2863
- }, vs = {
2832
+ }, ys = {
2864
2833
  key: 1,
2865
2834
  width: "11",
2866
2835
  height: "11",
@@ -2870,7 +2839,7 @@ const _s = {
2870
2839
  "stroke-width": "2.6",
2871
2840
  "stroke-linecap": "round",
2872
2841
  "stroke-linejoin": "round"
2873
- }, ys = {
2842
+ }, vs = {
2874
2843
  key: 2,
2875
2844
  width: "11",
2876
2845
  height: "11",
@@ -2880,7 +2849,7 @@ const _s = {
2880
2849
  "stroke-width": "2.4",
2881
2850
  "stroke-linecap": "round",
2882
2851
  "stroke-linejoin": "round"
2883
- }, ws = {
2852
+ }, ps = {
2884
2853
  key: 3,
2885
2854
  width: "12",
2886
2855
  height: "12",
@@ -2890,24 +2859,24 @@ const _s = {
2890
2859
  "stroke-width": "2.2",
2891
2860
  "stroke-linecap": "round",
2892
2861
  "stroke-linejoin": "round"
2893
- }, bs = { class: "wm-result__body" }, ks = { class: "wm-result__label" }, Cs = { class: "wm-result__detail" };
2894
- function As(e, t, s, r, i, n) {
2862
+ }, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
2863
+ function Cs(e, t, s, r, i, n) {
2895
2864
  return c(), d("div", {
2896
- class: R(["wm-result", `wm-result--${s.state}`])
2865
+ class: L(["wm-result", `wm-result--${s.state}`])
2897
2866
  }, [
2898
- l("span", gs, [
2899
- s.state === "success" ? (c(), d("svg", ps, [...t[0] || (t[0] = [
2867
+ l("span", _s, [
2868
+ s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
2900
2869
  l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2901
- ])])) : s.state === "rejected" ? (c(), d("svg", vs, [...t[1] || (t[1] = [
2870
+ ])])) : s.state === "rejected" ? (c(), d("svg", ys, [...t[1] || (t[1] = [
2902
2871
  l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2903
- ])])) : s.state === "awaiting" ? (c(), d("svg", ys, [...t[2] || (t[2] = [
2872
+ ])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
2904
2873
  l("circle", {
2905
2874
  cx: "12",
2906
2875
  cy: "12",
2907
2876
  r: "10"
2908
2877
  }, null, -1),
2909
2878
  l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2910
- ])])) : (c(), d("svg", ws, [...t[3] || (t[3] = [
2879
+ ])])) : (c(), d("svg", ps, [...t[3] || (t[3] = [
2911
2880
  l("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2912
2881
  l("line", {
2913
2882
  x1: "12",
@@ -2923,19 +2892,19 @@ function As(e, t, s, r, i, n) {
2923
2892
  }, null, -1)
2924
2893
  ])]))
2925
2894
  ]),
2926
- l("span", bs, [
2927
- l("span", ks, v(s.label), 1),
2928
- n.detailText ? (c(), d(I, { key: 0 }, [
2895
+ l("span", ws, [
2896
+ l("span", bs, y(s.label), 1),
2897
+ n.detailText ? (c(), d(B, { key: 0 }, [
2929
2898
  t[4] || (t[4] = l("span", {
2930
2899
  class: "wm-result__sep",
2931
2900
  "aria-hidden": "true"
2932
2901
  }, " · ", -1)),
2933
- l("span", Cs, v(n.detailText), 1)
2902
+ l("span", ks, y(n.detailText), 1)
2934
2903
  ], 64)) : k("", !0)
2935
2904
  ])
2936
2905
  ], 2);
2937
2906
  }
2938
- const Ss = /* @__PURE__ */ N(_s, [["render", As], ["__scopeId", "data-v-7284acd0"]]), Ts = {
2907
+ const As = /* @__PURE__ */ D(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2939
2908
  name: "WmArtifactFormResponse",
2940
2909
  inject: {
2941
2910
  // Translator shared by the Messenger shell; French fallback when
@@ -2951,12 +2920,12 @@ const Ss = /* @__PURE__ */ N(_s, [["render", As], ["__scopeId", "data-v-7284acd0
2951
2920
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2952
2921
  }
2953
2922
  }
2954
- }, Ms = { class: "wm-art wm-art--formResponse" }, xs = { class: "wm-art__head" }, Os = { class: "wm-art__title" }, Rs = { class: "wm-art__badge wm-art__badge--success" }, Ls = { class: "wm-art__body" }, Is = { class: "wm-art__fieldLabel" };
2923
+ }, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
2955
2924
  function Es(e, t, s, r, i, n) {
2956
2925
  return c(), d("div", Ms, [
2957
- l("div", xs, [
2958
- l("div", Os, v(s.data.title || n.t("form.title")), 1),
2959
- l("span", Rs, [
2926
+ l("div", Ts, [
2927
+ l("div", xs, y(s.data.title || n.t("form.title")), 1),
2928
+ l("span", Os, [
2960
2929
  t[0] || (t[0] = l("svg", {
2961
2930
  width: "11",
2962
2931
  height: "11",
@@ -2970,26 +2939,26 @@ function Es(e, t, s, r, i, n) {
2970
2939
  }, [
2971
2940
  l("polyline", { points: "20 6 9 17 4 12" })
2972
2941
  ], -1)),
2973
- Se(" " + v(n.t("form.sent")), 1)
2942
+ Se(" " + y(n.t("form.sent")), 1)
2974
2943
  ])
2975
2944
  ]),
2976
- l("div", Ls, [
2977
- (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
2945
+ l("div", Rs, [
2946
+ (c(!0), d(B, null, N(n.fields, (a, o) => (c(), d("div", {
2978
2947
  key: o,
2979
2948
  class: "wm-art__field"
2980
2949
  }, [
2981
- l("div", Is, v(a.label), 1),
2950
+ l("div", Ls, y(a.label), 1),
2982
2951
  l("div", {
2983
- class: R([
2952
+ class: L([
2984
2953
  "wm-art__fieldValue",
2985
2954
  { "wm-art__fieldValue--multi": a.multiline }
2986
2955
  ])
2987
- }, v(a.value), 3)
2956
+ }, y(a.value), 3)
2988
2957
  ]))), 128))
2989
2958
  ])
2990
2959
  ]);
2991
2960
  }
2992
- const Bs = /* @__PURE__ */ N(Ts, [["render", Es], ["__scopeId", "data-v-713aecf1"]]), Ps = {
2961
+ const Bs = /* @__PURE__ */ D(Ss, [["render", Es], ["__scopeId", "data-v-713aecf1"]]), Is = {
2993
2962
  name: "WmArtifactInfoCard",
2994
2963
  props: {
2995
2964
  data: { type: Object, required: !0 }
@@ -3004,21 +2973,21 @@ const Bs = /* @__PURE__ */ N(Ts, [["render", Es], ["__scopeId", "data-v-713aecf1
3004
2973
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
3005
2974
  }
3006
2975
  }
3007
- }, Ns = { class: "wm-art wm-art--infoCard" }, Ds = {
2976
+ }, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
3008
2977
  key: 0,
3009
2978
  class: "wm-art__image"
3010
- }, Us = ["src", "alt"], js = { class: "wm-art__head" }, Fs = { class: "wm-art__headMain" }, Hs = { class: "wm-art__title" }, zs = {
2979
+ }, Us = ["src", "alt"], Ns = { class: "wm-art__head" }, Fs = { class: "wm-art__headMain" }, Hs = { class: "wm-art__title" }, js = {
3011
2980
  key: 0,
3012
2981
  class: "wm-art__subtitle"
3013
- }, qs = {
2982
+ }, zs = {
3014
2983
  key: 1,
3015
2984
  class: "wm-art__body"
3016
- }, Vs = {
2985
+ }, qs = {
3017
2986
  key: 0,
3018
2987
  class: "wm-art__text"
3019
- }, Ks = { class: "wm-art__fieldLabel" };
3020
- function Ws(e, t, s, r, i, n) {
3021
- return c(), d("div", Ns, [
2988
+ }, Vs = { class: "wm-art__fieldLabel" };
2989
+ function Ks(e, t, s, r, i, n) {
2990
+ return c(), d("div", Ps, [
3022
2991
  s.data.image_url ? (c(), d("figure", Ds, [
3023
2992
  l("img", {
3024
2993
  src: s.data.image_url,
@@ -3026,38 +2995,38 @@ function Ws(e, t, s, r, i, n) {
3026
2995
  loading: "lazy"
3027
2996
  }, null, 8, Us)
3028
2997
  ])) : k("", !0),
3029
- l("div", js, [
2998
+ l("div", Ns, [
3030
2999
  l("div", Fs, [
3031
- l("div", Hs, v(s.data.title), 1),
3032
- s.data.subtitle ? (c(), d("div", zs, v(s.data.subtitle), 1)) : k("", !0)
3000
+ l("div", Hs, y(s.data.title), 1),
3001
+ s.data.subtitle ? (c(), d("div", js, y(s.data.subtitle), 1)) : k("", !0)
3033
3002
  ]),
3034
3003
  s.data.badge && s.data.badge.label ? (c(), d("span", {
3035
3004
  key: 0,
3036
- class: R([
3005
+ class: L([
3037
3006
  "wm-art__badge",
3038
3007
  `wm-art__badge--${s.data.badge.tone || "neutral"}`
3039
3008
  ])
3040
- }, v(s.data.badge.label), 3)) : k("", !0)
3009
+ }, y(s.data.badge.label), 3)) : k("", !0)
3041
3010
  ]),
3042
- n.hasBody ? (c(), d("div", qs, [
3043
- s.data.body ? (c(), d("div", Vs, v(s.data.body), 1)) : k("", !0),
3044
- n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (a, o) => (c(), d("div", {
3011
+ n.hasBody ? (c(), d("div", zs, [
3012
+ s.data.body ? (c(), d("div", qs, y(s.data.body), 1)) : k("", !0),
3013
+ n.fields.length ? (c(!0), d(B, { key: 1 }, N(n.fields, (a, o) => (c(), d("div", {
3045
3014
  key: o,
3046
3015
  class: "wm-art__field"
3047
3016
  }, [
3048
- l("div", Ks, v(a.label), 1),
3017
+ l("div", Vs, y(a.label), 1),
3049
3018
  l("div", {
3050
- class: R([
3019
+ class: L([
3051
3020
  "wm-art__fieldValue",
3052
3021
  { "wm-art__fieldValue--multi": a.multiline }
3053
3022
  ])
3054
- }, v(a.value), 3)
3023
+ }, y(a.value), 3)
3055
3024
  ]))), 128)) : k("", !0)
3056
3025
  ])) : k("", !0)
3057
3026
  ]);
3058
3027
  }
3059
- const $s = /* @__PURE__ */ N(Ps, [["render", Ws], ["__scopeId", "data-v-7eae0e4a"]]);
3060
- function Gs(e, t, s) {
3028
+ const Ws = /* @__PURE__ */ D(Is, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3029
+ function $s(e, t, s) {
3061
3030
  if (!e) return "";
3062
3031
  const r = new Date(e);
3063
3032
  if (Number.isNaN(r.getTime())) return e;
@@ -3071,7 +3040,7 @@ function Gs(e, t, s) {
3071
3040
  });
3072
3041
  return `${i}${s}${n}`;
3073
3042
  }
3074
- const Ys = {
3043
+ const Gs = {
3075
3044
  name: "WmArtifactTicket",
3076
3045
  inject: {
3077
3046
  // Translator + resolved-language getter shared by the Messenger
@@ -3089,9 +3058,9 @@ const Ys = {
3089
3058
  },
3090
3059
  formattedDate() {
3091
3060
  var e;
3092
- return Gs(
3061
+ return $s(
3093
3062
  (e = this.data) == null ? void 0 : e.created_at,
3094
- ne(this.wmLocale()),
3063
+ re(this.wmLocale()),
3095
3064
  this.t("ticket.dateAt")
3096
3065
  );
3097
3066
  }
@@ -3117,13 +3086,13 @@ const Ys = {
3117
3086
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
3118
3087
  }
3119
3088
  }
3120
- }, Js = { class: "wm-art wm-art--ticket" }, Xs = { class: "wm-art__head wm-tk__head" }, Qs = { class: "wm-art__title wm-tk__title" }, Zs = { class: "wm-tk__sub" }, er = { class: "wm-tk__ref" }, tr = {
3089
+ }, Ys = { class: "wm-art wm-art--ticket" }, Js = { class: "wm-art__head wm-tk__head" }, Xs = { class: "wm-art__title wm-tk__title" }, Qs = { class: "wm-tk__sub" }, Zs = { class: "wm-tk__ref" }, er = {
3121
3090
  key: 0,
3122
3091
  class: "wm-tk__text"
3123
- }, nr = {
3092
+ }, tr = {
3124
3093
  key: 0,
3125
3094
  class: "wm-art__body"
3126
- }, sr = { class: "wm-art__fieldLabel" }, rr = ["data-level"], ir = {
3095
+ }, nr = { class: "wm-art__fieldLabel" }, sr = ["data-level"], rr = {
3127
3096
  key: 1,
3128
3097
  class: "wm-tk__date",
3129
3098
  width: "12",
@@ -3135,16 +3104,16 @@ const Ys = {
3135
3104
  "stroke-linecap": "round",
3136
3105
  "stroke-linejoin": "round",
3137
3106
  "aria-hidden": "true"
3138
- }, ar = {
3107
+ }, ir = {
3139
3108
  key: 1,
3140
3109
  class: "wm-art__footer wm-tk__footer"
3141
3110
  };
3142
- function or(e, t, s, r, i, n) {
3143
- return c(), d("div", Js, [
3144
- l("div", Xs, [
3145
- l("div", Qs, v(s.data.title), 1),
3146
- l("div", Zs, [
3147
- l("div", er, [
3111
+ function ar(e, t, s, r, i, n) {
3112
+ return c(), d("div", Ys, [
3113
+ l("div", Js, [
3114
+ l("div", Xs, y(s.data.title), 1),
3115
+ l("div", Qs, [
3116
+ l("div", Zs, [
3148
3117
  t[0] || (t[0] = l("svg", {
3149
3118
  width: "11",
3150
3119
  height: "11",
@@ -3159,10 +3128,10 @@ function or(e, t, s, r, i, n) {
3159
3128
  l("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3160
3129
  l("path", { d: "M13 5v2M13 17v2M13 11v2" })
3161
3130
  ], -1)),
3162
- l("span", null, v(s.data.reference), 1)
3131
+ l("span", null, y(s.data.reference), 1)
3163
3132
  ]),
3164
3133
  l("span", {
3165
- class: R([
3134
+ class: L([
3166
3135
  "wm-art__badge",
3167
3136
  "wm-tk__badge",
3168
3137
  `wm-art__badge--${s.data.status.tone || "neutral"}`
@@ -3172,19 +3141,19 @@ function or(e, t, s, r, i, n) {
3172
3141
  class: "wm-tk__dot",
3173
3142
  "aria-hidden": "true"
3174
3143
  }, null, -1)),
3175
- Se(" " + v(s.data.status.label), 1)
3144
+ Se(" " + y(s.data.status.label), 1)
3176
3145
  ], 2)
3177
3146
  ]),
3178
- s.data.body ? (c(), d("div", tr, v(s.data.body), 1)) : k("", !0)
3147
+ s.data.body ? (c(), d("div", er, y(s.data.body), 1)) : k("", !0)
3179
3148
  ]),
3180
- n.fields.length ? (c(), d("div", nr, [
3181
- (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
3149
+ n.fields.length ? (c(), d("div", tr, [
3150
+ (c(!0), d(B, null, N(n.fields, (a, o) => (c(), d("div", {
3182
3151
  key: o,
3183
3152
  class: "wm-art__field"
3184
3153
  }, [
3185
- l("div", sr, v(a.label), 1),
3154
+ l("div", nr, y(a.label), 1),
3186
3155
  l("div", {
3187
- class: R([
3156
+ class: L([
3188
3157
  "wm-art__fieldValue",
3189
3158
  { "wm-art__fieldValue--multi": a.multiline }
3190
3159
  ])
@@ -3219,7 +3188,7 @@ function or(e, t, s, r, i, n) {
3219
3188
  height: "9",
3220
3189
  rx: "0.5"
3221
3190
  }, null, -1)
3222
- ])], 8, rr)) : n.isDate(a.label) ? (c(), d("svg", ir, [...t[3] || (t[3] = [
3191
+ ])], 8, sr)) : n.isDate(a.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3223
3192
  l("rect", {
3224
3193
  x: "3",
3225
3194
  y: "4",
@@ -3229,11 +3198,11 @@ function or(e, t, s, r, i, n) {
3229
3198
  }, null, -1),
3230
3199
  l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3231
3200
  ])])) : k("", !0),
3232
- l("span", null, v(a.value), 1)
3201
+ l("span", null, y(a.value), 1)
3233
3202
  ], 2)
3234
3203
  ]))), 128))
3235
3204
  ])) : k("", !0),
3236
- s.data.created_at ? (c(), d("div", ar, [
3205
+ s.data.created_at ? (c(), d("div", ir, [
3237
3206
  t[4] || (t[4] = l("svg", {
3238
3207
  width: "11",
3239
3208
  height: "11",
@@ -3254,15 +3223,15 @@ function or(e, t, s, r, i, n) {
3254
3223
  }),
3255
3224
  l("path", { d: "M16 2v4M8 2v4M3 10h18" })
3256
3225
  ], -1)),
3257
- l("span", null, v(n.formattedDate), 1)
3226
+ l("span", null, y(n.formattedDate), 1)
3258
3227
  ])) : k("", !0)
3259
3228
  ]);
3260
3229
  }
3261
- const lr = /* @__PURE__ */ N(Ys, [["render", or], ["__scopeId", "data-v-5f30c914"]]), cr = {
3230
+ const or = /* @__PURE__ */ D(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3262
3231
  form_response: Bs,
3263
- info_card: $s,
3264
- ticket: lr
3265
- }, dr = {
3232
+ info_card: Ws,
3233
+ ticket: or
3234
+ }, cr = {
3266
3235
  name: "WmArtifactRenderer",
3267
3236
  props: {
3268
3237
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -3273,17 +3242,17 @@ const lr = /* @__PURE__ */ N(Ys, [["render", or], ["__scopeId", "data-v-5f30c914
3273
3242
  component() {
3274
3243
  var t;
3275
3244
  const e = (t = this.artifact) == null ? void 0 : t.kind;
3276
- return e && cr[e] || null;
3245
+ return e && lr[e] || null;
3277
3246
  }
3278
3247
  }
3279
3248
  };
3280
- function ur(e, t, s, r, i, n) {
3281
- return n.component ? (c(), P(Ae(n.component), {
3249
+ function dr(e, t, s, r, i, n) {
3250
+ return n.component ? (c(), I(Ae(n.component), {
3282
3251
  key: 0,
3283
3252
  data: s.artifact.data
3284
3253
  }, null, 8, ["data"])) : k("", !0);
3285
3254
  }
3286
- const hr = /* @__PURE__ */ N(dr, [["render", ur]]), mr = {
3255
+ const ur = /* @__PURE__ */ D(cr, [["render", dr]]), mr = {
3287
3256
  name: "WmAttachmentPreview",
3288
3257
  inject: {
3289
3258
  signAttachmentFn: { default: null },
@@ -3351,17 +3320,17 @@ const hr = /* @__PURE__ */ N(dr, [["render", ur]]), mr = {
3351
3320
  this.safeHref === "#" && e.preventDefault();
3352
3321
  }
3353
3322
  }
3354
- }, fr = ["href"], _r = ["src", "alt"], gr = ["src"], pr = ["src"], vr = ["href", "download"], yr = { class: "wm-att__main" }, wr = { class: "wm-att__name" }, br = {
3323
+ }, hr = ["href"], fr = ["src", "alt"], _r = ["src"], gr = ["src"], yr = ["href", "download"], vr = { class: "wm-att__main" }, pr = { class: "wm-att__name" }, wr = {
3355
3324
  key: 0,
3356
3325
  class: "wm-att__meta"
3357
- }, kr = {
3326
+ }, br = {
3358
3327
  key: 0,
3359
3328
  class: "wm-att__spin",
3360
3329
  "aria-hidden": "true"
3361
3330
  };
3362
- function Cr(e, t, s, r, i, n) {
3331
+ function kr(e, t, s, r, i, n) {
3363
3332
  return c(), d("div", {
3364
- class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
3333
+ class: L(["wm-att", ["wm-att--" + (n.kind || "file")]])
3365
3334
  }, [
3366
3335
  n.kind === "image" && i.url ? (c(), d("a", {
3367
3336
  key: 0,
@@ -3374,19 +3343,19 @@ function Cr(e, t, s, r, i, n) {
3374
3343
  src: i.url,
3375
3344
  alt: n.displayName,
3376
3345
  loading: "lazy"
3377
- }, null, 8, _r)
3378
- ], 8, fr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
3346
+ }, null, 8, fr)
3347
+ ], 8, hr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
3379
3348
  key: 1,
3380
3349
  src: i.url,
3381
3350
  controls: "",
3382
3351
  preload: "metadata"
3383
- }, null, 8, gr)) : n.kind === "video" && i.url ? (c(), d("video", {
3352
+ }, null, 8, _r)) : n.kind === "video" && i.url ? (c(), d("video", {
3384
3353
  key: 2,
3385
3354
  src: i.url,
3386
3355
  controls: "",
3387
3356
  playsinline: "",
3388
3357
  preload: "auto"
3389
- }, null, 8, pr)) : (c(), d("a", {
3358
+ }, null, 8, gr)) : (c(), d("a", {
3390
3359
  key: 3,
3391
3360
  class: "wm-att__file",
3392
3361
  href: n.safeHref,
@@ -3411,15 +3380,15 @@ function Cr(e, t, s, r, i, n) {
3411
3380
  l("path", { d: "M14 2v6h6" })
3412
3381
  ])
3413
3382
  ], -1)),
3414
- l("span", yr, [
3415
- l("span", wr, v(n.displayName), 1),
3416
- n.sizeLabel ? (c(), d("span", br, v(n.sizeLabel), 1)) : k("", !0)
3383
+ l("span", vr, [
3384
+ l("span", pr, y(n.displayName), 1),
3385
+ n.sizeLabel ? (c(), d("span", wr, y(n.sizeLabel), 1)) : k("", !0)
3417
3386
  ]),
3418
- i.loading ? (c(), d("span", kr)) : k("", !0)
3419
- ], 8, vr))
3387
+ i.loading ? (c(), d("span", br)) : k("", !0)
3388
+ ], 8, yr))
3420
3389
  ], 2);
3421
3390
  }
3422
- const Ar = /* @__PURE__ */ N(mr, [["render", Cr], ["__scopeId", "data-v-b207a8bd"]]), Sr = {
3391
+ const Cr = /* @__PURE__ */ D(mr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3423
3392
  name: "WmBubble",
3424
3393
  props: {
3425
3394
  role: { type: String, default: "ai" },
@@ -3431,26 +3400,26 @@ const Ar = /* @__PURE__ */ N(mr, [["render", Cr], ["__scopeId", "data-v-b207a8bd
3431
3400
  return _t(this.text);
3432
3401
  }
3433
3402
  }
3434
- }, Tr = ["innerHTML"];
3403
+ }, Sr = ["innerHTML"];
3435
3404
  function Mr(e, t, s, r, i, n) {
3436
3405
  return c(), d("div", {
3437
- class: R(["wm-bubble", "wm-bubble--" + s.role])
3406
+ class: L(["wm-bubble", "wm-bubble--" + s.role])
3438
3407
  }, [
3439
3408
  We(e.$slots, "default", {}, () => [
3440
- l("span", { innerHTML: n.rendered }, null, 8, Tr)
3409
+ l("span", { innerHTML: n.rendered }, null, 8, Sr)
3441
3410
  ], !0)
3442
3411
  ], 2);
3443
3412
  }
3444
- const xr = /* @__PURE__ */ N(Sr, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), Or = { name: "WmTyping" }, Rr = { class: "wm-typing" };
3445
- function Lr(e, t, s, r, i, n) {
3446
- return c(), d("div", Rr, [...t[0] || (t[0] = [
3413
+ const Tr = /* @__PURE__ */ D(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3414
+ function Rr(e, t, s, r, i, n) {
3415
+ return c(), d("div", Or, [...t[0] || (t[0] = [
3447
3416
  l("span", { style: { "animation-delay": "0s" } }, null, -1),
3448
3417
  l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3449
3418
  l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3450
3419
  ])]);
3451
3420
  }
3452
- const Ir = /* @__PURE__ */ N(Or, [["render", Lr], ["__scopeId", "data-v-df2447fd"]]);
3453
- function ee(e) {
3421
+ const Lr = /* @__PURE__ */ D(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3422
+ function ne(e) {
3454
3423
  return e ? e.client_msg_id || e.id : "";
3455
3424
  }
3456
3425
  const Er = {
@@ -3461,16 +3430,16 @@ const Er = {
3461
3430
  closed: "system.closed",
3462
3431
  reopened: "system.reopened",
3463
3432
  idle: "system.idle"
3464
- }, Br = 80, Pr = 200, Nr = {
3433
+ }, Br = 80, Ir = 200, Pr = {
3465
3434
  name: "WmMessageList",
3466
3435
  components: {
3467
- AIAvatar: oe,
3468
- HumanAvatar: ve,
3469
- Bubble: xr,
3470
- Typing: Ir,
3471
- ActionResult: Ss,
3472
- AttachmentPreview: Ar,
3473
- ArtifactRenderer: hr
3436
+ AIAvatar: he,
3437
+ HumanAvatar: ye,
3438
+ Bubble: Tr,
3439
+ Typing: Lr,
3440
+ ActionResult: As,
3441
+ AttachmentPreview: Cr,
3442
+ ArtifactRenderer: ur
3474
3443
  },
3475
3444
  inject: {
3476
3445
  // Translator + resolved-language getter shared by the Messenger
@@ -3546,9 +3515,9 @@ const Er = {
3546
3515
  const f = this.roleOf(o);
3547
3516
  if (f === "system") {
3548
3517
  if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
3549
- const T = e[e.length - 1];
3550
- T && T.role === "ai" ? T.messages.push(o) : e.push({
3551
- key: `g-${ee(o)}`,
3518
+ const M = e[e.length - 1];
3519
+ M && M.role === "ai" ? M.messages.push(o) : e.push({
3520
+ key: `g-${ne(o)}`,
3552
3521
  role: "ai",
3553
3522
  agentName: "",
3554
3523
  agentAvatarUrl: null,
@@ -3558,7 +3527,7 @@ const Er = {
3558
3527
  continue;
3559
3528
  }
3560
3529
  e.push({
3561
- key: `sys-${ee(o)}`,
3530
+ key: `sys-${ne(o)}`,
3562
3531
  role: f,
3563
3532
  messages: [o],
3564
3533
  items: [],
@@ -3568,7 +3537,7 @@ const Er = {
3568
3537
  }
3569
3538
  const b = e[e.length - 1];
3570
3539
  b && b.role === f && (f === "ai" || b.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? b.messages.push(o) : e.push({
3571
- key: `g-${ee(o)}`,
3540
+ key: `g-${ne(o)}`,
3572
3541
  role: f,
3573
3542
  agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
3574
3543
  agentAvatarUrl: ((a = o == null ? void 0 : o.author) == null ? void 0 : a.avatar_url) || null,
@@ -3580,7 +3549,7 @@ const Er = {
3580
3549
  if (o.role === "system") continue;
3581
3550
  const f = [];
3582
3551
  for (const b of o.messages)
3583
- for (const y of this.itemsOf(b)) f.push(y);
3552
+ for (const v of this.itemsOf(b)) f.push(v);
3584
3553
  o.items = f;
3585
3554
  }
3586
3555
  const t = [];
@@ -3607,7 +3576,7 @@ const Er = {
3607
3576
  if (s.role === "user" || s.role === "system" || !s.items.length) continue;
3608
3577
  const r = s.messages[0];
3609
3578
  if (!r) continue;
3610
- const i = Y(r.id);
3579
+ const i = G(r.id);
3611
3580
  if (i != null && !(i <= e) && !(t && r.created_at && r.created_at > t))
3612
3581
  return s.key;
3613
3582
  }
@@ -3635,7 +3604,7 @@ const Er = {
3635
3604
  this.scheduleMeasure();
3636
3605
  },
3637
3606
  methods: {
3638
- messageKey: ee,
3607
+ messageKey: ne,
3639
3608
  // Resolve a stable Vue :key for a non-system group by checking if
3640
3609
  // any of its messages were previously part of a group we'd already
3641
3610
  // assigned an id to; if so, reuse that id, otherwise mint a new
@@ -3647,7 +3616,7 @@ const Er = {
3647
3616
  const t = this._groupIdByMsgKey;
3648
3617
  let s = null;
3649
3618
  for (const r of e) {
3650
- const i = ee(r);
3619
+ const i = ne(r);
3651
3620
  if (i && t.has(i)) {
3652
3621
  s = t.get(i);
3653
3622
  break;
@@ -3655,7 +3624,7 @@ const Er = {
3655
3624
  }
3656
3625
  s == null && (s = ++this._groupIdCounter);
3657
3626
  for (const r of e) {
3658
- const i = ee(r);
3627
+ const i = ne(r);
3659
3628
  i && t.set(i, s);
3660
3629
  }
3661
3630
  return `g-${s}`;
@@ -3665,7 +3634,7 @@ const Er = {
3665
3634
  },
3666
3635
  onScroll() {
3667
3636
  const e = this.$refs.scrollEl;
3668
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Pr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3637
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Ir && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3669
3638
  },
3670
3639
  // Capture pre-patch scroll state and restore it on the next tick.
3671
3640
  //
@@ -3865,10 +3834,10 @@ const Er = {
3865
3834
  // adjacent à une `bubble`) : mon coin déborde le voisin et
3866
3835
  // doit garder son arrondi.
3867
3836
  cornersFor(e, t) {
3868
- var Q, se, re;
3869
- const s = e.items, r = (Q = s[t]) == null ? void 0 : Q.kind, i = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = ($, ie, X) => $ != null && T != null ? $ + q >= T : ie === X || ie === "card" && X === "bubble";
3870
- let D = o, U = o, L = o, W = o;
3871
- return a ? (b && (U = f), (y || !n) && (L = f), b && M(E, b, r == null ? void 0 : r.top) && (D = f), y && M(A, y, r == null ? void 0 : r.bottom) && (W = f)) : (b && (D = f), (y || !n) && (W = f), b && M(E, b, r == null ? void 0 : r.top) && (U = f), y && M(A, y, r == null ? void 0 : r.bottom) && (L = f)), { tl: D, tr: U, br: L, bl: W };
3837
+ var ie, ae, X;
3838
+ const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, v = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, T = (Q, oe, Z) => Q != null && M != null ? Q + z >= M : oe === Z || oe === "card" && Z === "bubble";
3839
+ let U = o, x = o, q = o, J = o;
3840
+ return a ? (b && (x = f), (v || !n) && (q = f), b && T(E, b, r == null ? void 0 : r.top) && (U = f), v && T(S, v, r == null ? void 0 : r.bottom) && (J = f)) : (b && (U = f), (v || !n) && (J = f), b && T(E, b, r == null ? void 0 : r.top) && (x = f), v && T(S, v, r == null ? void 0 : r.bottom) && (q = f)), { tl: U, tr: x, br: q, bl: J };
3872
3841
  },
3873
3842
  // Inline column-count for the mosaic grid, capped at 4. Single
3874
3843
  // attachment falls back to the vertical-list layout (null). Two
@@ -3891,8 +3860,8 @@ const Er = {
3891
3860
  // corners of every top-row cell flatten too.
3892
3861
  mosaicCornerStyle(e, t, s) {
3893
3862
  if (!t || t < 2) return null;
3894
- const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, y = "4px", T = {};
3895
- return (a || f) && (T["--wm-r-tl"] = y), (o || f) && (T["--wm-r-tr"] = y), (a || b) && (T["--wm-r-bl"] = y), (o || b) && (T["--wm-r-br"] = y), s && (T["--wm-r-tl"] = y, T["--wm-r-tr"] = y), Object.keys(T).length ? T : null;
3863
+ const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, v = "4px", M = {};
3864
+ return (a || f) && (M["--wm-r-tl"] = v), (o || f) && (M["--wm-r-tr"] = v), (a || b) && (M["--wm-r-bl"] = v), (o || b) && (M["--wm-r-br"] = v), s && (M["--wm-r-tl"] = v, M["--wm-r-tr"] = v), Object.keys(M).length ? M : null;
3896
3865
  },
3897
3866
  // Inline style emitting the four corner CSS variables. Set on
3898
3867
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3913,7 +3882,7 @@ const Er = {
3913
3882
  rowKeyOf(e, t) {
3914
3883
  var r;
3915
3884
  const s = (r = e == null ? void 0 : e.items) == null ? void 0 : r[t];
3916
- return s ? `${ee(s.message)}-${s.partKey}` : "";
3885
+ return s ? `${ne(s.message)}-${s.partKey}` : "";
3917
3886
  },
3918
3887
  // rAF-debouncé : `updated()` peut être appelé en rafale (stream,
3919
3888
  // typing, scroll), un seul flush layout par frame suffit.
@@ -3970,7 +3939,7 @@ const Er = {
3970
3939
  try {
3971
3940
  return Ce(
3972
3941
  new Date(e.created_at),
3973
- ne(this.wmLocale())
3942
+ re(this.wmLocale())
3974
3943
  );
3975
3944
  } catch {
3976
3945
  return "";
@@ -3982,7 +3951,7 @@ const Er = {
3982
3951
  try {
3983
3952
  return Ce(
3984
3953
  new Date(s.created_at),
3985
- ne(this.wmLocale())
3954
+ re(this.wmLocale())
3986
3955
  );
3987
3956
  } catch {
3988
3957
  return "";
@@ -4023,8 +3992,8 @@ const Er = {
4023
3992
  return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
4024
3993
  if (t.state === "rejected") {
4025
3994
  if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
4026
- const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, T = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4027
- return this.t(T);
3995
+ const v = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, M = typeof v == "string" && v.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
3996
+ return this.t(M);
4028
3997
  }
4029
3998
  return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
4030
3999
  },
@@ -4055,201 +4024,201 @@ const Er = {
4055
4024
  class: "wm-list__loadMore",
4056
4025
  role: "status",
4057
4026
  "aria-live": "polite"
4058
- }, jr = { class: "wm-list__loadMore-lbl" }, Fr = {
4027
+ }, Nr = { class: "wm-list__loadMore-lbl" }, Fr = {
4059
4028
  key: 1,
4060
4029
  class: "wm-list__historyEnd"
4061
4030
  }, Hr = {
4062
4031
  key: 2,
4063
4032
  class: "wm-list__sep"
4064
- }, zr = { class: "wm-list__sep-label" }, qr = {
4033
+ }, jr = { class: "wm-list__sep-label" }, zr = {
4065
4034
  key: 0,
4066
4035
  class: "wm-list__sep wm-list__sep--unread"
4067
- }, Vr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Kr = {
4036
+ }, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Vr = {
4068
4037
  key: 0,
4069
4038
  class: "wm-list__sysep"
4070
- }, Wr = { class: "wm-list__sysep-label" }, $r = ["data-row-key", "onPointerdown"], Gr = {
4039
+ }, Kr = { class: "wm-list__sysep-label" }, Wr = ["data-row-key", "onPointerdown"], $r = {
4071
4040
  key: 0,
4072
4041
  class: "wm-list__avatarSlot"
4073
- }, Yr = { key: 0 }, Jr = {
4042
+ }, Gr = { key: 0 }, Yr = {
4074
4043
  key: 1,
4075
4044
  "aria-hidden": "true"
4076
- }, Xr = { key: 2 }, Qr = { key: 0 }, Zr = {
4045
+ }, Jr = { key: 2 }, Xr = { key: 0 }, Qr = {
4077
4046
  key: 1,
4078
4047
  "aria-hidden": "true"
4079
- }, ei = { key: 2 }, ti = {
4048
+ }, Zr = { key: 2 }, ei = {
4080
4049
  key: 3,
4081
4050
  class: "wm-list__row wm-list__row--ai fade-up"
4082
- }, ni = { class: "wm-list__avatarSlot" }, si = ["aria-label", "title"];
4083
- function ri(e, t, s, r, i, n) {
4084
- const a = B("AIAvatar"), o = B("HumanAvatar"), f = B("ActionResult"), b = B("ArtifactRenderer"), y = B("Bubble"), T = B("AttachmentPreview"), E = B("Typing");
4051
+ }, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
4052
+ function si(e, t, s, r, i, n) {
4053
+ const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), b = P("ArtifactRenderer"), v = P("Bubble"), M = P("AttachmentPreview"), E = P("Typing");
4085
4054
  return c(), d("div", Dr, [
4086
4055
  l("div", {
4087
4056
  ref: "scrollEl",
4088
- class: R(["wm-list", { "wm-list--silent": i.silentFades }]),
4089
- onScrollPassive: t[4] || (t[4] = (...A) => n.onScroll && n.onScroll(...A))
4057
+ class: L(["wm-list", { "wm-list--silent": i.silentFades }]),
4058
+ onScrollPassive: t[4] || (t[4] = (...S) => n.onScroll && n.onScroll(...S))
4090
4059
  }, [
4091
4060
  s.loadingMore ? (c(), d("div", Ur, [
4092
4061
  t[6] || (t[6] = l("span", {
4093
4062
  class: "wm-list__loadMore-spinner",
4094
4063
  "aria-hidden": "true"
4095
4064
  }, null, -1)),
4096
- l("span", jr, v(n.t("messageList.loadingHistory")), 1)
4097
- ])) : n.historyExhausted ? (c(), d("div", Fr, v(n.t("messageList.conversationStart")), 1)) : k("", !0),
4065
+ l("span", Nr, y(n.t("messageList.loadingHistory")), 1)
4066
+ ])) : n.historyExhausted ? (c(), d("div", Fr, y(n.t("messageList.conversationStart")), 1)) : k("", !0),
4098
4067
  s.dateLabel ? (c(), d("div", Hr, [
4099
4068
  t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
4100
- l("span", zr, v(s.dateLabel), 1),
4069
+ l("span", jr, y(s.dateLabel), 1),
4101
4070
  t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
4102
4071
  ])) : k("", !0),
4103
- (c(!0), d(I, null, j(n.groups, (A, q) => (c(), d(I, {
4104
- key: A.key
4072
+ (c(!0), d(B, null, N(n.groups, (S, z) => (c(), d(B, {
4073
+ key: S.key
4105
4074
  }, [
4106
- A.key === n.unreadGroupKey ? (c(), d("div", qr, [
4075
+ S.key === n.unreadGroupKey ? (c(), d("div", zr, [
4107
4076
  t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4108
- l("span", Vr, v(n.t("messageList.unread")), 1),
4077
+ l("span", qr, y(n.t("messageList.unread")), 1),
4109
4078
  t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4110
4079
  ])) : k("", !0),
4111
- A.role === "system" || A.items.length ? (c(), d("div", {
4080
+ S.role === "system" || S.items.length ? (c(), d("div", {
4112
4081
  key: 1,
4113
- class: R(["wm-list__group", "wm-list__group--" + A.role])
4082
+ class: L(["wm-list__group", "wm-list__group--" + S.role])
4114
4083
  }, [
4115
- A.role === "system" ? (c(), d("div", Kr, [
4084
+ S.role === "system" ? (c(), d("div", Vr, [
4116
4085
  t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4117
- l("span", Wr, v(A.systemLabel), 1),
4086
+ l("span", Kr, y(S.systemLabel), 1),
4118
4087
  t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4119
- ])) : (c(), d(I, { key: 1 }, [
4120
- (c(!0), d(I, null, j(A.items, (M, D) => (c(), d(I, {
4121
- key: `${n.messageKey(M.message)}-${M.partKey}`
4088
+ ])) : (c(), d(B, { key: 1 }, [
4089
+ (c(!0), d(B, null, N(S.items, (T, U) => (c(), d(B, {
4090
+ key: `${n.messageKey(T.message)}-${T.partKey}`
4122
4091
  }, [
4123
4092
  l("div", {
4124
- "data-row-key": `${n.messageKey(M.message)}-${M.partKey}`,
4125
- class: R(["wm-list__row fade-up", [
4126
- "wm-list__row--" + A.role,
4093
+ "data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
4094
+ class: L(["wm-list__row fade-up", [
4095
+ "wm-list__row--" + S.role,
4127
4096
  {
4128
- "is-pending": M.message._pending,
4129
- "is-failed": M.message._failed
4097
+ "is-pending": T.message._pending,
4098
+ "is-failed": T.message._failed
4130
4099
  }
4131
4100
  ]]),
4132
- style: z(n.cornersStyle(A, D)),
4133
- onPointerdown: (U) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
4134
- onPointerup: t[0] || (t[0] = (U) => n.onPressEnd()),
4135
- onPointercancel: t[1] || (t[1] = (U) => n.onPressEnd()),
4136
- onPointerleave: t[2] || (t[2] = (U) => n.onPressEnd()),
4137
- onContextmenu: t[3] || (t[3] = J(() => {
4101
+ style: j(n.cornersStyle(S, U)),
4102
+ onPointerdown: (x) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4103
+ onPointerup: t[0] || (t[0] = (x) => n.onPressEnd()),
4104
+ onPointercancel: t[1] || (t[1] = (x) => n.onPressEnd()),
4105
+ onPointerleave: t[2] || (t[2] = (x) => n.onPressEnd()),
4106
+ onContextmenu: t[3] || (t[3] = Y(() => {
4138
4107
  }, ["prevent"]))
4139
4108
  }, [
4140
- A.role !== "user" ? (c(), d("div", Gr, [
4141
- D === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4142
- A.role === "ai" ? (c(), P(a, {
4109
+ S.role !== "user" ? (c(), d("div", $r, [
4110
+ U === S.items.length - 1 ? (c(), d(B, { key: 0 }, [
4111
+ S.role === "ai" ? (c(), I(a, {
4143
4112
  key: 0,
4144
4113
  size: 26,
4145
4114
  tail: !0,
4146
4115
  name: s.aiAgentName,
4147
4116
  "image-url": s.aiAgentAvatarUrl
4148
- }, null, 8, ["name", "image-url"])) : (c(), P(o, {
4117
+ }, null, 8, ["name", "image-url"])) : (c(), I(o, {
4149
4118
  key: 1,
4150
- name: A.agentName,
4151
- "avatar-url": A.agentAvatarUrl,
4119
+ name: S.agentName,
4120
+ "avatar-url": S.agentAvatarUrl,
4152
4121
  size: 26,
4153
4122
  tail: !0
4154
4123
  }, null, 8, ["name", "avatar-url"]))
4155
4124
  ], 64)) : k("", !0)
4156
4125
  ])) : k("", !0),
4157
- M.renderAs === "action" ? (c(), P(f, {
4126
+ T.renderAs === "action" ? (c(), I(f, {
4158
4127
  key: 1,
4159
- state: M.message.payload.state,
4160
- label: n.actionLabel(M.message),
4161
- detail: n.actionDetail(M.message)
4162
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), P(f, {
4128
+ state: T.message.payload.state,
4129
+ label: n.actionLabel(T.message),
4130
+ detail: n.actionDetail(T.message)
4131
+ }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), I(f, {
4163
4132
  key: 2,
4164
4133
  state: "awaiting",
4165
4134
  label: n.t("messageList.approvalRequestSent"),
4166
- detail: M.message.text_md || ""
4167
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), P(b, {
4135
+ detail: T.message.text_md || ""
4136
+ }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), I(b, {
4168
4137
  key: 3,
4169
- artifact: n.actionArtifact(M.message)
4170
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), P(b, {
4138
+ artifact: n.actionArtifact(T.message)
4139
+ }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), I(b, {
4171
4140
  key: 4,
4172
- artifact: n.artifactOf(M.message)
4141
+ artifact: n.artifactOf(T.message)
4173
4142
  }, null, 8, ["artifact"])) : (c(), d("div", {
4174
4143
  key: 5,
4175
- class: R(["wm-list__body", {
4176
- "wm-list__body--mixed": !!M.message.text_md && n.attachmentsOf(M.message).length > 0
4144
+ class: L(["wm-list__body", {
4145
+ "wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
4177
4146
  }])
4178
4147
  }, [
4179
- M.message.text_md ? (c(), P(y, {
4148
+ T.message.text_md ? (c(), I(v, {
4180
4149
  key: 0,
4181
- role: A.role,
4182
- text: M.message.text_md
4150
+ role: S.role,
4151
+ text: T.message.text_md
4183
4152
  }, null, 8, ["role", "text"])) : k("", !0),
4184
- n.attachmentsOf(M.message).length ? (c(), d("div", {
4153
+ n.attachmentsOf(T.message).length ? (c(), d("div", {
4185
4154
  key: 1,
4186
- class: R(["wm-list__atts", {
4187
- "wm-list__atts--align-end": A.role === "user",
4188
- "wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
4155
+ class: L(["wm-list__atts", {
4156
+ "wm-list__atts--align-end": S.role === "user",
4157
+ "wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
4189
4158
  }]),
4190
- style: z(
4159
+ style: j(
4191
4160
  n.mosaicGridStyle(
4192
- n.attachmentsOf(M.message).length
4161
+ n.attachmentsOf(T.message).length
4193
4162
  )
4194
4163
  )
4195
4164
  }, [
4196
- (c(!0), d(I, null, j(n.attachmentsOf(
4197
- M.message
4198
- ), (U, L) => (c(), P(T, {
4199
- key: `${n.messageKey(M.message)}-att-${L}`,
4200
- attachment: U,
4201
- style: z(
4165
+ (c(!0), d(B, null, N(n.attachmentsOf(
4166
+ T.message
4167
+ ), (x, q) => (c(), I(M, {
4168
+ key: `${n.messageKey(T.message)}-att-${q}`,
4169
+ attachment: x,
4170
+ style: j(
4202
4171
  n.mosaicCornerStyle(
4203
- L,
4204
- n.attachmentsOf(M.message).length,
4205
- !!M.message.text_md
4172
+ q,
4173
+ n.attachmentsOf(T.message).length,
4174
+ !!T.message.text_md
4206
4175
  )
4207
4176
  )
4208
4177
  }, null, 8, ["attachment", "style"]))), 128))
4209
4178
  ], 6)) : k("", !0)
4210
4179
  ], 2))
4211
- ], 46, $r),
4212
- D < A.items.length - 1 && i.pressedItemKey === `${n.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || n.timeOf(M.message)) ? (c(), d("div", {
4180
+ ], 46, Wr),
4181
+ U < S.items.length - 1 && i.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (S.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4213
4182
  key: 0,
4214
- class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4183
+ class: L(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
4215
4184
  }, [
4216
- A.role !== "user" ? (c(), d("span", Yr, v(n.roleLabel(A)), 1)) : k("", !0),
4217
- A.role !== "user" && n.timeOf(M.message) ? (c(), d("span", Jr, "•")) : k("", !0),
4218
- n.timeOf(M.message) ? (c(), d("span", Xr, v(n.timeOf(M.message)), 1)) : k("", !0)
4185
+ S.role !== "user" ? (c(), d("span", Gr, y(n.roleLabel(S)), 1)) : k("", !0),
4186
+ S.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : k("", !0),
4187
+ n.timeOf(T.message) ? (c(), d("span", Jr, y(n.timeOf(T.message)), 1)) : k("", !0)
4219
4188
  ], 2)) : k("", !0)
4220
4189
  ], 64))), 128)),
4221
- (A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
4190
+ (S.role !== "user" || n.lastTimeOf(S)) && !n.hasTrailingOverlay(S) ? (c(), d("div", {
4222
4191
  key: 0,
4223
- class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4192
+ class: L(["wm-list__meta", { "wm-list__meta--right": S.role === "user" }])
4224
4193
  }, [
4225
- A.role !== "user" ? (c(), d("span", Qr, v(n.roleLabel(A)), 1)) : k("", !0),
4226
- A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Zr, "•")) : k("", !0),
4227
- n.lastTimeOf(A) ? (c(), d("span", ei, v(n.lastTimeOf(A)), 1)) : k("", !0)
4194
+ S.role !== "user" ? (c(), d("span", Xr, y(n.roleLabel(S)), 1)) : k("", !0),
4195
+ S.role !== "user" && n.lastTimeOf(S) ? (c(), d("span", Qr, "•")) : k("", !0),
4196
+ n.lastTimeOf(S) ? (c(), d("span", Zr, y(n.lastTimeOf(S)), 1)) : k("", !0)
4228
4197
  ], 2)) : k("", !0)
4229
4198
  ], 64))
4230
4199
  ], 2)) : k("", !0)
4231
4200
  ], 64))), 128)),
4232
- s.streamingActive ? (c(), d("div", ti, [
4233
- l("div", ni, [
4234
- K(a, {
4201
+ s.streamingActive ? (c(), d("div", ei, [
4202
+ l("div", ti, [
4203
+ W(a, {
4235
4204
  size: 26,
4236
4205
  tail: !0,
4237
4206
  name: s.aiAgentName,
4238
4207
  "image-url": s.aiAgentAvatarUrl
4239
4208
  }, null, 8, ["name", "image-url"])
4240
4209
  ]),
4241
- K(E)
4210
+ W(E)
4242
4211
  ])) : k("", !0)
4243
4212
  ], 34),
4244
- K(Ue, { name: "wm-scrollDown" }, {
4245
- default: je(() => [
4213
+ W(Ne, { name: "wm-scrollDown" }, {
4214
+ default: Fe(() => [
4246
4215
  i.showScrollDown ? (c(), d("button", {
4247
4216
  key: 0,
4248
4217
  type: "button",
4249
4218
  class: "wm-list__scrollDown",
4250
4219
  "aria-label": n.t("messageList.scrollToBottom"),
4251
4220
  title: n.t("messageList.scrollToBottom"),
4252
- onClick: t[5] || (t[5] = (...A) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...A))
4221
+ onClick: t[5] || (t[5] = (...S) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...S))
4253
4222
  }, [...t[13] || (t[13] = [
4254
4223
  l("svg", {
4255
4224
  width: "14",
@@ -4264,14 +4233,14 @@ function ri(e, t, s, r, i, n) {
4264
4233
  }, [
4265
4234
  l("path", { d: "M6 9l6 6 6-6" })
4266
4235
  ], -1)
4267
- ])], 8, si)) : k("", !0)
4236
+ ])], 8, ni)) : k("", !0)
4268
4237
  ]),
4269
4238
  _: 1
4270
4239
  })
4271
4240
  ]);
4272
4241
  }
4273
- const ii = /* @__PURE__ */ N(Nr, [["render", ri], ["__scopeId", "data-v-79b30a8f"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4274
- function ai() {
4242
+ const ri = /* @__PURE__ */ D(Pr, [["render", si], ["__scopeId", "data-v-79b30a8f"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4243
+ function ii() {
4275
4244
  return Oe && [
4276
4245
  "video/webm;codecs=vp9,opus",
4277
4246
  "video/webm;codecs=vp8,opus",
@@ -4291,11 +4260,11 @@ function Ve({ audio: e }) {
4291
4260
  systemAudio: e ? "include" : "exclude"
4292
4261
  };
4293
4262
  }
4294
- function bo(e) {
4263
+ function co(e) {
4295
4264
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
4296
4265
  }
4297
- async function oi() {
4298
- if (!pe) return null;
4266
+ async function ai() {
4267
+ if (!ge) return null;
4299
4268
  let e;
4300
4269
  try {
4301
4270
  e = await navigator.mediaDevices.getDisplayMedia(
@@ -4305,7 +4274,7 @@ async function oi() {
4305
4274
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
4306
4275
  }
4307
4276
  try {
4308
- return await li(e);
4277
+ return await oi(e);
4309
4278
  } catch (t) {
4310
4279
  return console.error("[media] screenshot capture", t), null;
4311
4280
  } finally {
@@ -4314,7 +4283,7 @@ async function oi() {
4314
4283
  });
4315
4284
  }
4316
4285
  }
4317
- async function li(e) {
4286
+ async function oi(e) {
4318
4287
  const t = document.createElement("video");
4319
4288
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
4320
4289
  const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
@@ -4327,64 +4296,64 @@ async function li(e) {
4327
4296
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4328
4297
  return new File([n], `capture-${a}.png`, { type: "image/png" });
4329
4298
  }
4330
- async function ci(e = {}) {
4299
+ async function li(e = {}) {
4331
4300
  var b;
4332
- if (!pe || !Oe) return null;
4301
+ if (!ge || !Oe) return null;
4333
4302
  let t;
4334
4303
  try {
4335
4304
  t = await navigator.mediaDevices.getDisplayMedia(
4336
4305
  Ve({ audio: !0 })
4337
4306
  );
4338
- } catch (y) {
4339
- return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
4307
+ } catch (v) {
4308
+ return (v == null ? void 0 : v.name) !== "NotAllowedError" && console.error("[media] record picker", v), null;
4340
4309
  }
4341
- const s = ai();
4310
+ const s = ii();
4342
4311
  let r;
4343
4312
  try {
4344
4313
  r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4345
- } catch (y) {
4346
- return console.error("[media] recorder init", y), t.getTracks().forEach((T) => {
4347
- T.stop();
4314
+ } catch (v) {
4315
+ return console.error("[media] recorder init", v), t.getTracks().forEach((M) => {
4316
+ M.stop();
4348
4317
  }), null;
4349
4318
  }
4350
4319
  const i = [];
4351
4320
  let n = null, a = !1;
4352
- r.addEventListener("dataavailable", (y) => {
4353
- y.data && y.data.size > 0 && i.push(y.data);
4321
+ r.addEventListener("dataavailable", (v) => {
4322
+ v.data && v.data.size > 0 && i.push(v.data);
4354
4323
  }), r.addEventListener("stop", () => {
4355
- var y, T;
4324
+ var v, M;
4356
4325
  if (n && clearInterval(n), t.getTracks().forEach((E) => {
4357
4326
  E.stop();
4358
4327
  }), i.length) {
4359
- const E = r.mimeType || s || "video/webm", A = new Blob(i, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${q}`, {
4328
+ const E = r.mimeType || s || "video/webm", S = new Blob(i, { type: E }), z = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([S], `ecran-${T}.${z}`, {
4360
4329
  type: E
4361
4330
  });
4362
- (y = e.onfinalize) == null || y.call(e, D);
4331
+ (v = e.onfinalize) == null || v.call(e, U);
4363
4332
  } else
4364
- (T = e.oncancel) == null || T.call(e);
4365
- }), t.getVideoTracks().forEach((y) => {
4366
- y.addEventListener("ended", () => o(), { once: !0 });
4333
+ (M = e.oncancel) == null || M.call(e);
4334
+ }), t.getVideoTracks().forEach((v) => {
4335
+ v.addEventListener("ended", () => o(), { once: !0 });
4367
4336
  });
4368
4337
  function o() {
4369
4338
  if (!a && (a = !0, r.state !== "inactive"))
4370
4339
  try {
4371
4340
  r.stop();
4372
- } catch (y) {
4373
- console.error("[media] recorder stop", y);
4341
+ } catch (v) {
4342
+ console.error("[media] recorder stop", v);
4374
4343
  }
4375
4344
  }
4376
4345
  try {
4377
4346
  r.start(1e3);
4378
- } catch (y) {
4379
- return console.error("[media] recorder start", y), t.getTracks().forEach((T) => {
4380
- T.stop();
4347
+ } catch (v) {
4348
+ return console.error("[media] recorder start", v), t.getTracks().forEach((M) => {
4349
+ M.stop();
4381
4350
  }), null;
4382
4351
  }
4383
4352
  (b = e.onstart) == null || b.call(e);
4384
4353
  const f = Date.now();
4385
4354
  return n = setInterval(() => {
4386
- var y;
4387
- (y = e.ontick) == null || y.call(e, Date.now() - f);
4355
+ var v;
4356
+ (v = e.ontick) == null || v.call(e, Date.now() - f);
4388
4357
  }, 500), {
4389
4358
  stop: o,
4390
4359
  get state() {
@@ -4392,7 +4361,7 @@ async function ci(e = {}) {
4392
4361
  }
4393
4362
  };
4394
4363
  }
4395
- const di = [
4364
+ const ci = [
4396
4365
  {
4397
4366
  action: "file",
4398
4367
  labelKey: "composer.attachFile",
@@ -4408,7 +4377,7 @@ const di = [
4408
4377
  labelKey: "composer.recordScreen",
4409
4378
  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"
4410
4379
  }
4411
- ], ui = {
4380
+ ], di = {
4412
4381
  name: "WmComposer",
4413
4382
  inject: {
4414
4383
  // Translator shared by the Messenger shell; French fallback when
@@ -4442,10 +4411,10 @@ const di = [
4442
4411
  return !this.disabled && !!this.local.trim();
4443
4412
  },
4444
4413
  attachItems() {
4445
- return di.map((e) => ({
4414
+ return ci.map((e) => ({
4446
4415
  ...e,
4447
4416
  label: this.t(e.labelKey),
4448
- disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !Oe)
4417
+ disabled: e.action === "screenshot" && !ge || e.action === "record" && (!ge || !Oe)
4449
4418
  }));
4450
4419
  },
4451
4420
  recordingElapsedLabel() {
@@ -4516,13 +4485,13 @@ const di = [
4516
4485
  },
4517
4486
  async captureScreenshot() {
4518
4487
  if (this.disabled) return;
4519
- const e = await oi();
4488
+ const e = await ai();
4520
4489
  e && this.$emit("attach", e);
4521
4490
  },
4522
4491
  async startRecording() {
4523
4492
  if (this.recording || this.disabled) return;
4524
4493
  this.recordingElapsed = 0;
4525
- const e = await ci({
4494
+ const e = await li({
4526
4495
  onstart: () => {
4527
4496
  this.recording = !0;
4528
4497
  },
@@ -4564,39 +4533,39 @@ const di = [
4564
4533
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4565
4534
  }
4566
4535
  }
4567
- }, hi = {
4536
+ }, ui = {
4568
4537
  key: 0,
4569
4538
  class: "wm-rec"
4570
- }, mi = { class: "wm-rec__lbl" }, fi = {
4539
+ }, mi = { class: "wm-rec__lbl" }, hi = {
4571
4540
  key: 1,
4572
4541
  class: "wm-compose__menu",
4573
4542
  role: "menu"
4574
- }, _i = ["disabled", "onClick"], gi = { class: "wm-compose__menuIcon" }, pi = {
4543
+ }, fi = ["disabled", "onClick"], _i = { class: "wm-compose__menuIcon" }, gi = {
4575
4544
  viewBox: "0 0 24 24",
4576
4545
  width: "14",
4577
4546
  height: "14",
4578
4547
  "aria-hidden": "true"
4579
- }, vi = ["d"], yi = ["placeholder", "disabled"], wi = { class: "wm-compose__actions" }, bi = ["title", "aria-label", "disabled"], ki = ["disabled", "aria-label"];
4580
- function Ci(e, t, s, r, i, n) {
4548
+ }, yi = ["d"], vi = ["placeholder", "disabled"], pi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
4549
+ function ki(e, t, s, r, i, n) {
4581
4550
  return c(), d("div", {
4582
- class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4583
- style: z(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4551
+ class: L(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4552
+ style: j(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4584
4553
  }, [
4585
- i.recording ? (c(), d("div", hi, [
4554
+ i.recording ? (c(), d("div", ui, [
4586
4555
  t[8] || (t[8] = l("span", {
4587
4556
  class: "wm-rec__dot",
4588
4557
  "aria-hidden": "true"
4589
4558
  }, null, -1)),
4590
- l("span", mi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4559
+ l("span", mi, y(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4591
4560
  l("button", {
4592
4561
  type: "button",
4593
4562
  class: "wm-rec__stop",
4594
4563
  onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
4595
- }, v(n.t("composer.stop")), 1)
4564
+ }, y(n.t("composer.stop")), 1)
4596
4565
  ])) : k("", !0),
4597
4566
  l("form", {
4598
- class: R(["wm-compose", { "has-attach": i.attachOpen }]),
4599
- onSubmit: t[7] || (t[7] = J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4567
+ class: L(["wm-compose", { "has-attach": i.attachOpen }]),
4568
+ onSubmit: t[7] || (t[7] = Y((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4600
4569
  }, [
4601
4570
  l("input", {
4602
4571
  ref: "fileEl",
@@ -4610,16 +4579,16 @@ function Ci(e, t, s, r, i, n) {
4610
4579
  class: "wm-compose__overlay",
4611
4580
  onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
4612
4581
  })) : k("", !0),
4613
- i.attachOpen ? (c(), d("div", fi, [
4614
- (c(!0), d(I, null, j(n.attachItems, (a) => (c(), d("button", {
4582
+ i.attachOpen ? (c(), d("div", hi, [
4583
+ (c(!0), d(B, null, N(n.attachItems, (a) => (c(), d("button", {
4615
4584
  key: a.action,
4616
4585
  type: "button",
4617
4586
  class: "wm-compose__menuItem",
4618
4587
  disabled: a.disabled,
4619
4588
  onClick: (o) => n.onAttachAction(a.action)
4620
4589
  }, [
4621
- l("span", gi, [
4622
- (c(), d("svg", pi, [
4590
+ l("span", _i, [
4591
+ (c(), d("svg", gi, [
4623
4592
  l("path", {
4624
4593
  d: a.path,
4625
4594
  stroke: "currentColor",
@@ -4627,13 +4596,13 @@ function Ci(e, t, s, r, i, n) {
4627
4596
  "stroke-linecap": "round",
4628
4597
  "stroke-linejoin": "round",
4629
4598
  fill: "none"
4630
- }, null, 8, vi)
4599
+ }, null, 8, yi)
4631
4600
  ]))
4632
4601
  ]),
4633
- l("span", null, v(a.label), 1)
4634
- ], 8, _i))), 128))
4602
+ l("span", null, y(a.label), 1)
4603
+ ], 8, fi))), 128))
4635
4604
  ])) : k("", !0),
4636
- G(l("textarea", {
4605
+ $(l("textarea", {
4637
4606
  ref: "inputEl",
4638
4607
  "onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
4639
4608
  class: "wm-compose__input",
@@ -4642,13 +4611,13 @@ function Ci(e, t, s, r, i, n) {
4642
4611
  disabled: s.disabled,
4643
4612
  onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
4644
4613
  onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
4645
- }, null, 40, yi), [
4646
- [te, i.local]
4614
+ }, null, 40, vi), [
4615
+ [se, i.local]
4647
4616
  ]),
4648
- l("div", wi, [
4617
+ l("div", pi, [
4649
4618
  l("button", {
4650
4619
  type: "button",
4651
- class: R(["wm-compose__icon", { "is-open": i.attachOpen }]),
4620
+ class: L(["wm-compose__icon", { "is-open": i.attachOpen }]),
4652
4621
  title: s.attachLabel,
4653
4622
  "aria-label": s.attachLabel,
4654
4623
  disabled: i.recording,
@@ -4667,10 +4636,10 @@ function Ci(e, t, s, r, i, n) {
4667
4636
  }, [
4668
4637
  l("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4669
4638
  ], -1)
4670
- ])], 10, bi),
4639
+ ])], 10, wi),
4671
4640
  l("button", {
4672
4641
  type: "submit",
4673
- class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
4642
+ class: L(["wm-compose__send", { "is-empty": !n.canSend }]),
4674
4643
  disabled: !n.canSend,
4675
4644
  "aria-label": n.t("composer.send")
4676
4645
  }, [...t[10] || (t[10] = [
@@ -4687,126 +4656,60 @@ function Ci(e, t, s, r, i, n) {
4687
4656
  }, [
4688
4657
  l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4689
4658
  ], -1)
4690
- ])], 10, ki)
4659
+ ])], 10, bi)
4691
4660
  ])
4692
4661
  ], 34)
4693
4662
  ], 6);
4694
4663
  }
4695
- const Ai = /* @__PURE__ */ N(ui, [["render", Ci], ["__scopeId", "data-v-bba29b9c"]]), Si = {
4696
- name: "WmSuggestionChips",
4664
+ const Ci = /* @__PURE__ */ D(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4665
+ name: "WmInlineCallbacks",
4697
4666
  props: {
4667
+ // Array d'items `{ id?, label, style?, ... }`. Pour les suggestions,
4668
+ // l'item peut aussi porter `text`/`kind` (interprétés côté parent).
4698
4669
  items: { type: Array, default: () => [] },
4699
- // Lets the chips wait for the latest message to land before they pop
4700
- // in. Bumped by the parent on each new suggestion set.
4670
+ variant: {
4671
+ type: String,
4672
+ default: "chips",
4673
+ validator: (e) => e === "chips" || e === "buttons"
4674
+ },
4675
+ // Laisse les chips attendre l'atterrissage du dernier message avant
4676
+ // de pop-in. Bumpé par le parent à chaque nouveau jeu de suggestions.
4701
4677
  baseDelay: { type: Number, default: 360 },
4702
4678
  stepDelay: { type: Number, default: 90 }
4703
4679
  },
4704
4680
  emits: ["select"],
4705
4681
  computed: {
4706
- // Re-key the whole strip on any content change so Vue tears down
4707
- // the chips and the entry animation replays for the new set.
4682
+ // Re-key toute la rangée sur changement de contenu pour que Vue
4683
+ // détruise/recrée les boutons et rejoue l'animation d'entrée.
4708
4684
  batchKey() {
4709
4685
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4710
4686
  }
4687
+ },
4688
+ methods: {
4689
+ btnClass(e) {
4690
+ return this.variant === "chips" ? "wm-icb__btn--chip" : ["wm-icb__btn--action", `wm-icb__btn--${(e == null ? void 0 : e.style) || "neutral"}`];
4691
+ }
4711
4692
  }
4712
- }, Ti = ["onClick"];
4693
+ }, Si = ["onClick"];
4713
4694
  function Mi(e, t, s, r, i, n) {
4714
4695
  return s.items.length ? (c(), d("div", {
4715
4696
  key: n.batchKey,
4716
- class: "wm-chips"
4697
+ class: L(["wm-icb", `wm-icb--${s.variant}`])
4717
4698
  }, [
4718
- (c(!0), d(I, null, j(s.items, (a, o) => (c(), d("button", {
4719
- key: o,
4699
+ (c(!0), d(B, null, N(s.items, (a, o) => (c(), d("button", {
4700
+ key: a.id != null ? a.id : o,
4720
4701
  type: "button",
4721
- class: "wm-chip",
4722
- style: z({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
4702
+ class: L(["wm-icb__btn", n.btnClass(a)]),
4703
+ style: j(
4704
+ s.variant === "chips" ? { animationDelay: s.baseDelay + o * s.stepDelay + "ms" } : null
4705
+ ),
4723
4706
  onClick: (f) => e.$emit("select", a)
4724
- }, v(a.label), 13, Ti))), 128))
4725
- ])) : k("", !0);
4707
+ }, y(a.label), 15, Si))), 128))
4708
+ ], 2)) : k("", !0);
4726
4709
  }
4727
- const xi = /* @__PURE__ */ N(Si, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), Oi = {
4728
- name: "WmApprovalCard",
4729
- components: { AIAvatar: oe },
4730
- inject: {
4731
- // Translator shared by the Messenger shell; French fallback when
4732
- // the component is used standalone.
4733
- t: { default: () => F() }
4734
- },
4735
- props: {
4736
- action: { type: String, required: !0 },
4737
- detail: { type: String, default: "" },
4738
- callbacks: { type: Array, default: () => [] },
4739
- agentName: { type: String, default: "" },
4740
- agentAvatarUrl: { type: String, default: null }
4741
- },
4742
- emits: ["callback"],
4743
- computed: {
4744
- approveCallback() {
4745
- return this.callbacks.find(
4746
- (e) => e.id === "approve" || e.style === "primary"
4747
- ) || this.callbacks[0];
4748
- },
4749
- rejectCallback() {
4750
- return this.callbacks.find(
4751
- (e) => e.id === "reject" || e.style === "danger" || e.style === "neutral"
4752
- ) || (this.callbacks.length > 1 ? this.callbacks[1] : null);
4753
- },
4754
- approveId() {
4755
- var e;
4756
- return (e = this.approveCallback) == null ? void 0 : e.id;
4757
- },
4758
- rejectId() {
4759
- var e;
4760
- return (e = this.rejectCallback) == null ? void 0 : e.id;
4761
- },
4762
- approveLabel() {
4763
- var e;
4764
- return ((e = this.approveCallback) == null ? void 0 : e.label) || this.t("approval.approve");
4765
- },
4766
- rejectLabel() {
4767
- var e;
4768
- return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4769
- }
4770
- }
4771
- }, Ri = { class: "wm-approval" }, Li = { class: "wm-approval__head" }, Ii = { class: "wm-approval__icon" }, Ei = { class: "wm-approval__main" }, Bi = { class: "wm-approval__title" }, Pi = {
4772
- key: 0,
4773
- class: "wm-approval__detail"
4774
- }, Ni = { class: "wm-approval__actions" };
4775
- function Di(e, t, s, r, i, n) {
4776
- const a = B("AIAvatar");
4777
- return c(), d("div", Ri, [
4778
- l("div", Li, [
4779
- l("div", Ii, [
4780
- K(a, {
4781
- size: 24,
4782
- name: s.agentName,
4783
- "image-url": s.agentAvatarUrl
4784
- }, null, 8, ["name", "image-url"])
4785
- ]),
4786
- l("div", Ei, [
4787
- l("div", Bi, v(s.action), 1),
4788
- s.detail ? (c(), d("div", Pi, v(s.detail), 1)) : k("", !0)
4789
- ])
4790
- ]),
4791
- l("div", Ni, [
4792
- n.rejectId ? (c(), d("button", {
4793
- key: 0,
4794
- type: "button",
4795
- class: "wm-approval__btn wm-approval__btn--neutral",
4796
- onClick: t[0] || (t[0] = (o) => e.$emit("callback", n.rejectId))
4797
- }, v(n.rejectLabel), 1)) : k("", !0),
4798
- n.approveId ? (c(), d("button", {
4799
- key: 1,
4800
- type: "button",
4801
- class: "wm-approval__btn wm-approval__btn--primary",
4802
- onClick: t[1] || (t[1] = (o) => e.$emit("callback", n.approveId))
4803
- }, v(n.approveLabel), 1)) : k("", !0)
4804
- ])
4805
- ]);
4806
- }
4807
- const Ui = /* @__PURE__ */ N(Oi, [["render", Di], ["__scopeId", "data-v-a2bed37e"]]);
4808
- let Ne = 0;
4809
- const ji = /* @__PURE__ */ new Set([
4710
+ const Ti = /* @__PURE__ */ D(Ai, [["render", Mi], ["__scopeId", "data-v-10ecd4c6"]]);
4711
+ let De = 0;
4712
+ const xi = /* @__PURE__ */ new Set([
4810
4713
  "text",
4811
4714
  "textarea",
4812
4715
  "number",
@@ -4814,9 +4717,9 @@ const ji = /* @__PURE__ */ new Set([
4814
4717
  "select",
4815
4718
  "multiselect",
4816
4719
  "date"
4817
- ]), Fi = {
4720
+ ]), Oi = {
4818
4721
  name: "WmFormCard",
4819
- components: { AIAvatar: oe },
4722
+ components: { AIAvatar: he },
4820
4723
  inject: {
4821
4724
  // Translator shared by the Messenger shell; French fallback when
4822
4725
  // the component is used standalone.
@@ -4831,8 +4734,8 @@ const ji = /* @__PURE__ */ new Set([
4831
4734
  },
4832
4735
  emits: ["submit"],
4833
4736
  data() {
4834
- return Ne += 1, {
4835
- _uid: Ne,
4737
+ return De += 1, {
4738
+ _uid: De,
4836
4739
  values: {},
4837
4740
  busy: !1,
4838
4741
  error: ""
@@ -4844,7 +4747,7 @@ const ji = /* @__PURE__ */ new Set([
4844
4747
  // douteux.
4845
4748
  normalizedFields() {
4846
4749
  var t;
4847
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !ji.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4750
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !xi.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4848
4751
  }
4849
4752
  },
4850
4753
  created() {
@@ -4897,54 +4800,54 @@ const ji = /* @__PURE__ */ new Set([
4897
4800
  }
4898
4801
  }
4899
4802
  }
4900
- }, Hi = { class: "wm-form" }, zi = { class: "wm-form__head" }, qi = { class: "wm-form__icon" }, Vi = { class: "wm-form__main" }, Ki = { class: "wm-form__title" }, Wi = {
4803
+ }, Ri = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ei = { class: "wm-form__icon" }, Bi = { class: "wm-form__main" }, Ii = { class: "wm-form__title" }, Pi = {
4901
4804
  key: 0,
4902
4805
  class: "wm-form__detail"
4903
- }, $i = ["for"], Gi = {
4806
+ }, Di = ["for"], Ui = {
4904
4807
  key: 0,
4905
4808
  class: "wm-form__req",
4906
4809
  "aria-hidden": "true"
4907
- }, Yi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Qi = ["id", "onUpdate:modelValue", "required", "disabled"], Zi = {
4810
+ }, Ni = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Hi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "required", "disabled"], zi = {
4908
4811
  key: 4,
4909
4812
  class: "wm-form__bool"
4910
- }, ea = ["id", "onUpdate:modelValue", "disabled"], ta = ["id", "onUpdate:modelValue", "required", "disabled"], na = {
4813
+ }, qi = ["id", "onUpdate:modelValue", "disabled"], Vi = ["id", "onUpdate:modelValue", "required", "disabled"], Ki = {
4911
4814
  value: "",
4912
4815
  disabled: ""
4913
- }, sa = ["value"], ra = {
4816
+ }, Wi = ["value"], $i = {
4914
4817
  key: 6,
4915
4818
  class: "wm-form__multi"
4916
- }, ia = ["value", "checked", "disabled", "onChange"], aa = {
4819
+ }, Gi = ["value", "checked", "disabled", "onChange"], Yi = {
4917
4820
  key: 0,
4918
4821
  class: "wm-form__err"
4919
- }, oa = ["disabled"], la = {
4822
+ }, Ji = ["disabled"], Xi = {
4920
4823
  key: 0,
4921
4824
  class: "wm-form__spinner",
4922
4825
  "aria-hidden": "true"
4923
- }, ca = {
4826
+ }, Qi = {
4924
4827
  key: 2,
4925
4828
  class: "wm-form__doneLbl"
4926
4829
  };
4927
- function da(e, t, s, r, i, n) {
4928
- const a = B("AIAvatar");
4929
- return c(), d("div", Hi, [
4930
- l("div", zi, [
4931
- l("div", qi, [
4932
- K(a, {
4830
+ function Zi(e, t, s, r, i, n) {
4831
+ const a = P("AIAvatar");
4832
+ return c(), d("div", Ri, [
4833
+ l("div", Li, [
4834
+ l("div", Ei, [
4835
+ W(a, {
4933
4836
  size: 24,
4934
4837
  name: s.agentName,
4935
4838
  "image-url": s.agentAvatarUrl
4936
4839
  }, null, 8, ["name", "image-url"])
4937
4840
  ]),
4938
- l("div", Vi, [
4939
- l("div", Ki, v(s.form.title || n.t("form.title")), 1),
4940
- s.form.description ? (c(), d("div", Wi, v(s.form.description), 1)) : k("", !0)
4841
+ l("div", Bi, [
4842
+ l("div", Ii, y(s.form.title || n.t("form.title")), 1),
4843
+ s.form.description ? (c(), d("div", Pi, y(s.form.description), 1)) : k("", !0)
4941
4844
  ])
4942
4845
  ]),
4943
4846
  l("form", {
4944
4847
  class: "wm-form__body",
4945
- onSubmit: t[0] || (t[0] = J((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
4848
+ onSubmit: t[0] || (t[0] = Y((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
4946
4849
  }, [
4947
- (c(!0), d(I, null, j(n.normalizedFields, (o) => (c(), d("div", {
4850
+ (c(!0), d(B, null, N(n.normalizedFields, (o) => (c(), d("div", {
4948
4851
  key: o.key,
4949
4852
  class: "wm-form__field"
4950
4853
  }, [
@@ -4952,10 +4855,10 @@ function da(e, t, s, r, i, n) {
4952
4855
  for: `wm-f-${i._uid}-${o.key}`,
4953
4856
  class: "wm-form__label"
4954
4857
  }, [
4955
- Se(v(o.label), 1),
4956
- o.required ? (c(), d("span", Gi, "*")) : k("", !0)
4957
- ], 8, $i),
4958
- o.type === "text" ? G((c(), d("input", {
4858
+ Se(y(o.label), 1),
4859
+ o.required ? (c(), d("span", Ui, "*")) : k("", !0)
4860
+ ], 8, Di),
4861
+ o.type === "text" ? $((c(), d("input", {
4959
4862
  key: 0,
4960
4863
  id: `wm-f-${i._uid}-${o.key}`,
4961
4864
  "onUpdate:modelValue": (f) => i.values[o.key] = f,
@@ -4964,9 +4867,9 @@ function da(e, t, s, r, i, n) {
4964
4867
  placeholder: o.placeholder || "",
4965
4868
  required: o.required,
4966
4869
  disabled: s.readOnly || i.busy
4967
- }, null, 8, Yi)), [
4968
- [te, i.values[o.key]]
4969
- ]) : o.type === "textarea" ? G((c(), d("textarea", {
4870
+ }, null, 8, Ni)), [
4871
+ [se, i.values[o.key]]
4872
+ ]) : o.type === "textarea" ? $((c(), d("textarea", {
4970
4873
  key: 1,
4971
4874
  id: `wm-f-${i._uid}-${o.key}`,
4972
4875
  "onUpdate:modelValue": (f) => i.values[o.key] = f,
@@ -4975,9 +4878,9 @@ function da(e, t, s, r, i, n) {
4975
4878
  placeholder: o.placeholder || "",
4976
4879
  required: o.required,
4977
4880
  disabled: s.readOnly || i.busy
4978
- }, null, 8, Ji)), [
4979
- [te, i.values[o.key]]
4980
- ]) : o.type === "number" ? G((c(), d("input", {
4881
+ }, null, 8, Fi)), [
4882
+ [se, i.values[o.key]]
4883
+ ]) : o.type === "number" ? $((c(), d("input", {
4981
4884
  key: 2,
4982
4885
  id: `wm-f-${i._uid}-${o.key}`,
4983
4886
  "onUpdate:modelValue": (f) => i.values[o.key] = f,
@@ -4986,14 +4889,14 @@ function da(e, t, s, r, i, n) {
4986
4889
  placeholder: o.placeholder || "",
4987
4890
  required: o.required,
4988
4891
  disabled: s.readOnly || i.busy
4989
- }, null, 8, Xi)), [
4892
+ }, null, 8, Hi)), [
4990
4893
  [
4991
- te,
4894
+ se,
4992
4895
  i.values[o.key],
4993
4896
  void 0,
4994
4897
  { number: !0 }
4995
4898
  ]
4996
- ]) : o.type === "date" ? G((c(), d("input", {
4899
+ ]) : o.type === "date" ? $((c(), d("input", {
4997
4900
  key: 3,
4998
4901
  id: `wm-f-${i._uid}-${o.key}`,
4999
4902
  "onUpdate:modelValue": (f) => i.values[o.key] = f,
@@ -5001,19 +4904,19 @@ function da(e, t, s, r, i, n) {
5001
4904
  class: "wm-form__input",
5002
4905
  required: o.required,
5003
4906
  disabled: s.readOnly || i.busy
5004
- }, null, 8, Qi)), [
5005
- [te, i.values[o.key]]
5006
- ]) : o.type === "boolean" ? (c(), d("label", Zi, [
5007
- G(l("input", {
4907
+ }, null, 8, ji)), [
4908
+ [se, i.values[o.key]]
4909
+ ]) : o.type === "boolean" ? (c(), d("label", zi, [
4910
+ $(l("input", {
5008
4911
  id: `wm-f-${i._uid}-${o.key}`,
5009
4912
  "onUpdate:modelValue": (f) => i.values[o.key] = f,
5010
4913
  type: "checkbox",
5011
4914
  disabled: s.readOnly || i.busy
5012
- }, null, 8, ea), [
4915
+ }, null, 8, qi), [
5013
4916
  [$e, i.values[o.key]]
5014
4917
  ]),
5015
- l("span", null, v(o.placeholder || n.t("common.yes")), 1)
5016
- ])) : o.type === "select" ? G((c(), d("select", {
4918
+ l("span", null, y(o.placeholder || n.t("common.yes")), 1)
4919
+ ])) : o.type === "select" ? $((c(), d("select", {
5017
4920
  key: 5,
5018
4921
  id: `wm-f-${i._uid}-${o.key}`,
5019
4922
  "onUpdate:modelValue": (f) => i.values[o.key] = f,
@@ -5021,15 +4924,15 @@ function da(e, t, s, r, i, n) {
5021
4924
  required: o.required,
5022
4925
  disabled: s.readOnly || i.busy
5023
4926
  }, [
5024
- l("option", na, v(o.placeholder || n.t("form.choose")), 1),
5025
- (c(!0), d(I, null, j(o.options, (f) => (c(), d("option", {
4927
+ l("option", Ki, y(o.placeholder || n.t("form.choose")), 1),
4928
+ (c(!0), d(B, null, N(o.options, (f) => (c(), d("option", {
5026
4929
  key: f.value,
5027
4930
  value: f.value
5028
- }, v(f.label), 9, sa))), 128))
5029
- ], 8, ta)), [
4931
+ }, y(f.label), 9, Wi))), 128))
4932
+ ], 8, Vi)), [
5030
4933
  [Ge, i.values[o.key]]
5031
- ]) : o.type === "multiselect" ? (c(), d("div", ra, [
5032
- (c(!0), d(I, null, j(o.options, (f) => (c(), d("label", {
4934
+ ]) : o.type === "multiselect" ? (c(), d("div", $i, [
4935
+ (c(!0), d(B, null, N(o.options, (f) => (c(), d("label", {
5033
4936
  key: f.value,
5034
4937
  class: "wm-form__multiItem"
5035
4938
  }, [
@@ -5043,25 +4946,25 @@ function da(e, t, s, r, i, n) {
5043
4946
  f.value,
5044
4947
  b.target.checked
5045
4948
  )
5046
- }, null, 40, ia),
5047
- l("span", null, v(f.label), 1)
4949
+ }, null, 40, Gi),
4950
+ l("span", null, y(f.label), 1)
5048
4951
  ]))), 128))
5049
4952
  ])) : k("", !0)
5050
4953
  ]))), 128)),
5051
- i.error ? (c(), d("div", aa, v(i.error), 1)) : k("", !0),
5052
- s.readOnly ? (c(), d("div", ca, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
4954
+ i.error ? (c(), d("div", Yi, y(i.error), 1)) : k("", !0),
4955
+ s.readOnly ? (c(), d("div", Qi, y(n.t("form.responseSent")), 1)) : (c(), d("button", {
5053
4956
  key: 1,
5054
4957
  type: "submit",
5055
4958
  class: "wm-form__submit",
5056
4959
  disabled: i.busy
5057
4960
  }, [
5058
- i.busy ? (c(), d("span", la)) : k("", !0),
5059
- l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5060
- ], 8, oa))
4961
+ i.busy ? (c(), d("span", Xi)) : k("", !0),
4962
+ l("span", null, y(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
4963
+ ], 8, Ji))
5061
4964
  ], 32)
5062
4965
  ]);
5063
4966
  }
5064
- const ua = /* @__PURE__ */ N(Fi, [["render", da], ["__scopeId", "data-v-fe65cc56"]]), ha = {
4967
+ const ea = /* @__PURE__ */ D(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56"]]), ta = {
5065
4968
  name: "WmFeedback",
5066
4969
  inject: {
5067
4970
  // Translator shared by the Messenger shell; French fallback when
@@ -5095,13 +4998,13 @@ const ua = /* @__PURE__ */ N(Fi, [["render", da], ["__scopeId", "data-v-fe65cc56
5095
4998
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
5096
4999
  }
5097
5000
  }
5098
- }, ma = { class: "wm-fb" }, fa = { class: "wm-fb__title" }, _a = { class: "wm-fb__sub" }, ga = { class: "wm-fb__row" }, pa = ["onClick"], va = { class: "wm-fb__emoji" }, ya = { class: "wm-fb__label" }, wa = ["disabled"], ba = {
5001
+ }, na = { class: "wm-fb" }, sa = { class: "wm-fb__title" }, ra = { class: "wm-fb__sub" }, ia = { class: "wm-fb__row" }, aa = ["onClick"], oa = { class: "wm-fb__emoji" }, la = { class: "wm-fb__label" }, ca = ["disabled"], da = {
5099
5002
  key: 1,
5100
5003
  class: "wm-fb__done"
5101
- }, ka = { class: "wm-fb__doneTitle" }, Ca = { class: "wm-fb__doneSub" };
5102
- function Aa(e, t, s, r, i, n) {
5103
- return c(), d("div", ma, [
5104
- s.done ? (c(), d("div", ba, [
5004
+ }, ua = { class: "wm-fb__doneTitle" }, ma = { class: "wm-fb__doneSub" };
5005
+ function ha(e, t, s, r, i, n) {
5006
+ return c(), d("div", na, [
5007
+ s.done ? (c(), d("div", da, [
5105
5008
  t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
5106
5009
  l("svg", {
5107
5010
  width: "16",
@@ -5117,32 +5020,32 @@ function Aa(e, t, s, r, i, n) {
5117
5020
  l("path", { d: "M20 6L9 17l-5-5" })
5118
5021
  ])
5119
5022
  ], -1)),
5120
- l("div", ka, v(n.t("feedback.doneTitle")), 1),
5121
- l("div", Ca, v(n.t("feedback.doneSubtitle")), 1)
5122
- ])) : (c(), d(I, { key: 0 }, [
5123
- l("div", fa, v(n.t("feedback.question")), 1),
5124
- l("div", _a, v(n.t("feedback.subtitle")), 1),
5125
- l("div", ga, [
5126
- (c(!0), d(I, null, j(n.options, (a) => (c(), d("button", {
5023
+ l("div", ua, y(n.t("feedback.doneTitle")), 1),
5024
+ l("div", ma, y(n.t("feedback.doneSubtitle")), 1)
5025
+ ])) : (c(), d(B, { key: 0 }, [
5026
+ l("div", sa, y(n.t("feedback.question")), 1),
5027
+ l("div", ra, y(n.t("feedback.subtitle")), 1),
5028
+ l("div", ia, [
5029
+ (c(!0), d(B, null, N(n.options, (a) => (c(), d("button", {
5127
5030
  key: a.v,
5128
5031
  type: "button",
5129
- class: R(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5032
+ class: L(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5130
5033
  onClick: (o) => i.sel = a.v
5131
5034
  }, [
5132
- l("span", va, v(a.e), 1),
5133
- l("span", ya, v(a.l), 1)
5134
- ], 10, pa))), 128))
5035
+ l("span", oa, y(a.e), 1),
5036
+ l("span", la, y(a.l), 1)
5037
+ ], 10, aa))), 128))
5135
5038
  ]),
5136
5039
  l("button", {
5137
5040
  type: "button",
5138
5041
  class: "wm-fb__send",
5139
5042
  disabled: !i.sel || s.busy,
5140
5043
  onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
5141
- }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, wa)
5044
+ }, y(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ca)
5142
5045
  ], 64))
5143
5046
  ]);
5144
5047
  }
5145
- const Sa = /* @__PURE__ */ N(ha, [["render", Aa], ["__scopeId", "data-v-9b630564"]]), Ta = {
5048
+ const fa = /* @__PURE__ */ D(ta, [["render", ha], ["__scopeId", "data-v-9b630564"]]), _a = {
5146
5049
  name: "WmMoreMenu",
5147
5050
  inject: {
5148
5051
  // Translator shared by the Messenger shell; French fallback when
@@ -5177,24 +5080,24 @@ const Sa = /* @__PURE__ */ N(ha, [["render", Aa], ["__scopeId", "data-v-9b630564
5177
5080
  this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
5178
5081
  }
5179
5082
  }
5180
- }, Ma = { class: "wm-mm" }, xa = {
5083
+ }, ga = { class: "wm-mm" }, ya = {
5181
5084
  class: "wm-mm__pop",
5182
5085
  role: "menu"
5183
- }, Oa = {
5086
+ }, va = {
5184
5087
  key: 0,
5185
5088
  class: "wm-mm__section"
5186
- }, Ra = { class: "wm-mm__label" }, La = { class: "wm-mm__label" }, Ia = {
5089
+ }, pa = { class: "wm-mm__label" }, wa = { class: "wm-mm__label" }, ba = {
5187
5090
  key: 1,
5188
5091
  class: "wm-mm__sep"
5189
- }, Ea = { class: "wm-mm__section" }, Ba = { class: "wm-mm__label" }, Pa = { class: "wm-mm__section" }, Na = { class: "wm-mm__label" }, Da = { class: "wm-mm__label" };
5190
- function Ua(e, t, s, r, i, n) {
5191
- return c(), d("div", Ma, [
5092
+ }, ka = { class: "wm-mm__section" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__section" }, Sa = { class: "wm-mm__label" }, Ma = { class: "wm-mm__label" };
5093
+ function Ta(e, t, s, r, i, n) {
5094
+ return c(), d("div", ga, [
5192
5095
  l("div", {
5193
5096
  class: "wm-mm__scrim",
5194
5097
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5195
5098
  }),
5196
- l("div", xa, [
5197
- s.canRename || s.canExport ? (c(), d("div", Oa, [
5099
+ l("div", ya, [
5100
+ s.canRename || s.canExport ? (c(), d("div", va, [
5198
5101
  s.canRename ? (c(), d("button", {
5199
5102
  key: 0,
5200
5103
  type: "button",
@@ -5217,7 +5120,7 @@ function Ua(e, t, s, r, i, n) {
5217
5120
  l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5218
5121
  ])
5219
5122
  ], -1)),
5220
- l("span", Ra, v(n.t("moreMenu.editTitle")), 1)
5123
+ l("span", pa, y(n.t("moreMenu.editTitle")), 1)
5221
5124
  ])) : k("", !0),
5222
5125
  s.canExport ? (c(), d("button", {
5223
5126
  key: 1,
@@ -5240,12 +5143,12 @@ function Ua(e, t, s, r, i, n) {
5240
5143
  l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5241
5144
  ])
5242
5145
  ], -1)),
5243
- l("span", La, v(n.t("moreMenu.exportTranscript")), 1),
5146
+ l("span", wa, y(n.t("moreMenu.exportTranscript")), 1),
5244
5147
  t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
5245
5148
  ])) : k("", !0)
5246
5149
  ])) : k("", !0),
5247
- s.canRename || s.canExport ? (c(), d("div", Ia)) : k("", !0),
5248
- l("div", Ea, [
5150
+ s.canRename || s.canExport ? (c(), d("div", ba)) : k("", !0),
5151
+ l("div", ka, [
5249
5152
  l("button", {
5250
5153
  type: "button",
5251
5154
  class: "wm-mm__item",
@@ -5267,16 +5170,16 @@ function Ua(e, t, s, r, i, n) {
5267
5170
  l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5268
5171
  ])
5269
5172
  ], -1)),
5270
- l("span", Ba, v(n.t("moreMenu.sound")), 1),
5173
+ l("span", Ca, y(n.t("moreMenu.sound")), 1),
5271
5174
  l("span", {
5272
- class: R(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5175
+ class: L(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5273
5176
  }, [...t[9] || (t[9] = [
5274
5177
  l("span", { class: "wm-mm__knob" }, null, -1)
5275
5178
  ])], 2)
5276
5179
  ])
5277
5180
  ]),
5278
5181
  t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
5279
- l("div", Pa, [
5182
+ l("div", Aa, [
5280
5183
  s.statusUrl ? (c(), d("button", {
5281
5184
  key: 0,
5282
5185
  type: "button",
@@ -5298,7 +5201,7 @@ function Ua(e, t, s, r, i, n) {
5298
5201
  l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5299
5202
  ])
5300
5203
  ], -1)),
5301
- l("span", Na, v(n.t("moreMenu.serviceStatus")), 1)
5204
+ l("span", Sa, y(n.t("moreMenu.serviceStatus")), 1)
5302
5205
  ])) : k("", !0),
5303
5206
  s.helpUrl ? (c(), d("button", {
5304
5207
  key: 1,
@@ -5321,13 +5224,13 @@ function Ua(e, t, s, r, i, n) {
5321
5224
  l("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5322
5225
  ])
5323
5226
  ], -1)),
5324
- l("span", Da, v(n.t("moreMenu.helpCenter")), 1)
5227
+ l("span", Ma, y(n.t("moreMenu.helpCenter")), 1)
5325
5228
  ])) : k("", !0)
5326
5229
  ])
5327
5230
  ])
5328
5231
  ]);
5329
5232
  }
5330
- const ja = /* @__PURE__ */ N(Ta, [["render", Ua], ["__scopeId", "data-v-4cf6d578"]]), Fa = {
5233
+ const xa = /* @__PURE__ */ D(_a, [["render", Ta], ["__scopeId", "data-v-4cf6d578"]]), Oa = {
5331
5234
  name: "WmRenameDialog",
5332
5235
  inject: {
5333
5236
  // Translator shared by the Messenger shell; French fallback when
@@ -5369,20 +5272,20 @@ const ja = /* @__PURE__ */ N(Ta, [["render", Ua], ["__scopeId", "data-v-4cf6d578
5369
5272
  this.canSubmit && this.$emit("submit", this.value.trim());
5370
5273
  }
5371
5274
  }
5372
- }, Ha = { class: "wm-dialog" }, za = {
5275
+ }, Ra = { class: "wm-dialog" }, La = {
5373
5276
  class: "wm-dialog__card",
5374
5277
  role: "dialog",
5375
5278
  "aria-modal": "true"
5376
- }, qa = { class: "wm-dialog__head" }, Va = { class: "wm-dialog__title" }, Ka = ["aria-label"], Wa = { class: "wm-dialog__body" }, $a = ["placeholder"], Ga = { class: "wm-dialog__actions" }, Ya = ["disabled"];
5377
- function Ja(e, t, s, r, i, n) {
5378
- return c(), d("div", Ha, [
5279
+ }, Ea = { class: "wm-dialog__head" }, Ba = { class: "wm-dialog__title" }, Ia = ["aria-label"], Pa = { class: "wm-dialog__body" }, Da = ["placeholder"], Ua = { class: "wm-dialog__actions" }, Na = ["disabled"];
5280
+ function Fa(e, t, s, r, i, n) {
5281
+ return c(), d("div", Ra, [
5379
5282
  l("div", {
5380
5283
  class: "wm-dialog__scrim",
5381
5284
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5382
5285
  }),
5383
- l("div", za, [
5384
- l("div", qa, [
5385
- l("div", Va, v(s.title || n.t("rename.title")), 1),
5286
+ l("div", La, [
5287
+ l("div", Ea, [
5288
+ l("div", Ba, y(s.title || n.t("rename.title")), 1),
5386
5289
  l("button", {
5387
5290
  type: "button",
5388
5291
  class: "wm-dialog__close",
@@ -5402,10 +5305,10 @@ function Ja(e, t, s, r, i, n) {
5402
5305
  }, [
5403
5306
  l("path", { d: "M18 6L6 18M6 6l12 12" })
5404
5307
  ], -1)
5405
- ])], 8, Ka)
5308
+ ])], 8, Ia)
5406
5309
  ]),
5407
- l("div", Wa, [
5408
- G(l("input", {
5310
+ l("div", Pa, [
5311
+ $(l("input", {
5409
5312
  ref: "input",
5410
5313
  "onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
5411
5314
  type: "text",
@@ -5413,50 +5316,48 @@ function Ja(e, t, s, r, i, n) {
5413
5316
  placeholder: s.placeholder || n.t("rename.placeholder"),
5414
5317
  maxlength: 120,
5415
5318
  onKeydown: [
5416
- t[3] || (t[3] = ge(J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
5417
- t[4] || (t[4] = ge(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5319
+ t[3] || (t[3] = _e(Y((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
5320
+ t[4] || (t[4] = _e(Y((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5418
5321
  ]
5419
- }, null, 40, $a), [
5420
- [te, i.value]
5322
+ }, null, 40, Da), [
5323
+ [se, i.value]
5421
5324
  ])
5422
5325
  ]),
5423
- l("div", Ga, [
5326
+ l("div", Ua, [
5424
5327
  l("button", {
5425
5328
  type: "button",
5426
5329
  class: "wm-dialog__btn",
5427
5330
  onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5428
- }, v(n.t("common.cancel")), 1),
5331
+ }, y(n.t("common.cancel")), 1),
5429
5332
  l("button", {
5430
5333
  type: "button",
5431
5334
  class: "wm-dialog__btn wm-dialog__btn--primary",
5432
5335
  disabled: !n.canSubmit,
5433
5336
  onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
5434
- }, v(n.t("common.save")), 9, Ya)
5337
+ }, y(n.t("common.save")), 9, Na)
5435
5338
  ])
5436
5339
  ])
5437
5340
  ]);
5438
5341
  }
5439
- const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8"]]), De = "ww-messenger-tokens", Qa = {
5342
+ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", ja = {
5440
5343
  name: "Messenger",
5441
5344
  components: {
5442
- Launcher: Vt,
5443
- Header: gn,
5444
- Onboarding: Xn,
5345
+ Launcher: qt,
5346
+ Header: _n,
5347
+ Onboarding: Jn,
5445
5348
  History: ms,
5446
- MessageList: ii,
5447
- Composer: Ai,
5448
- SuggestionChips: xi,
5449
- ApprovalCard: Ui,
5450
- FormCard: ua,
5451
- Feedback: Sa,
5452
- MoreMenu: ja,
5453
- RenameDialog: Xa
5349
+ MessageList: ri,
5350
+ Composer: Ci,
5351
+ InlineCallbacks: Ti,
5352
+ FormCard: ea,
5353
+ Feedback: fa,
5354
+ MoreMenu: xa,
5355
+ RenameDialog: Ha
5454
5356
  },
5455
5357
  mixins: [
5456
5358
  wt,
5457
5359
  bt,
5458
- kt,
5459
- At
5360
+ Ct
5460
5361
  ],
5461
5362
  // Make signAttachment available to deep children (AttachmentPreview)
5462
5363
  // without prop drilling. The store may not exist yet at provide-time
@@ -5664,24 +5565,24 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5664
5565
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
5665
5566
  return this.allConversations.map((r) => {
5666
5567
  var b;
5667
- const i = e[r.id] || [], n = Y(r.last_read_message_id);
5568
+ const i = e[r.id] || [], n = G(r.last_read_message_id);
5668
5569
  let a = 0, o = null;
5669
- for (let y = i.length - 1; y >= 0; y--) {
5670
- const T = i[y];
5671
- if (!T) continue;
5672
- if (((b = T.author) == null ? void 0 : b.type) === "user") break;
5673
- const E = Y(T.id);
5570
+ for (let v = i.length - 1; v >= 0; v--) {
5571
+ const M = i[v];
5572
+ if (!M) continue;
5573
+ if (((b = M.author) == null ? void 0 : b.type) === "user") break;
5574
+ const E = G(M.id);
5674
5575
  if (E != null) {
5675
5576
  if (n != null && E <= n) break;
5676
- t[T.id] !== 0 && (!o && T.author && (o = T.author), a++);
5577
+ t[M.id] !== 0 && (!o && M.author && (o = M.author), a++);
5677
5578
  }
5678
5579
  }
5679
5580
  if (!i.length) {
5680
- const y = Y(r.last_message_id);
5681
- y != null && (n == null || y > n) && (a = 1, o = r.last_message_author || null);
5581
+ const v = G(r.last_message_id);
5582
+ v != null && (n == null || v > n) && (a = 1, o = r.last_message_author || null);
5682
5583
  }
5683
5584
  const f = i.filter(
5684
- (y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
5585
+ (v) => !((v == null ? void 0 : v.id) != null && t[v.id] === 0)
5685
5586
  );
5686
5587
  return {
5687
5588
  ...r,
@@ -5712,7 +5613,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5712
5613
  preview: s._preview || this.t("onboarding.newMessage"),
5713
5614
  unread: !!s._unread,
5714
5615
  author: s._lastAuthor || null,
5715
- _ts: Be(s, e[s.id] || [])
5616
+ _ts: Ie(s, e[s.id] || [])
5716
5617
  })).sort((s, r) => s._ts < r._ts ? 1 : s._ts > r._ts ? -1 : 0);
5717
5618
  },
5718
5619
  // Unread threads (one entry per conv with unseen agent/human
@@ -5724,7 +5625,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5724
5625
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
5725
5626
  for (const r of this.drawerConversations) {
5726
5627
  if (!r._unread) continue;
5727
- const i = Be(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
5628
+ const i = Ie(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
5728
5629
  t.push({
5729
5630
  convId: r.id,
5730
5631
  preview: r._preview || this.t("notification.youHaveNewMessage"),
@@ -5903,8 +5804,8 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5903
5804
  if (!(a != null && a.loaded)) return t;
5904
5805
  }
5905
5806
  const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
5906
- var o, f, b, y, T;
5907
- return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || me(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5807
+ var o, f, b, v, M;
5808
+ return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || me(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (v = a == null ? void 0 : a.metadata) != null && v.artifact || (M = a == null ? void 0 : a.metadata) != null && M.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((E) => (E == null ? void 0 : E.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5908
5809
  });
5909
5810
  return t.length ? [...t, ...r] : r;
5910
5811
  },
@@ -5926,14 +5827,10 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5926
5827
  const e = (t = this.currentConv) == null ? void 0 : t.id;
5927
5828
  return e ? ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e]) || [] : [];
5928
5829
  },
5929
- pendingApproval() {
5930
- return !this.currentConv || !this.store || this.actionInFlight ? null : this.store.getPendingApproval(this.currentConv.id);
5931
- },
5932
- // Proposition de résolution (propose_resolution) : rendue en carte
5933
- // flottante (popover) au-dessus du composer, comme l'ApprovalCard. =
5934
- // dernier message porteur de `metadata.resolution_request` dont les
5935
- // callbacks ne sont pas encore consommés (le serveur les clear au clic)
5936
- // et sans clic optimiste en vol.
5830
+ // Proposition de résolution (propose_resolution) : rendue en boutons
5831
+ // inline flottants au-dessus du composer. = dernier message porteur de
5832
+ // `metadata.resolution_request` dont les callbacks ne sont pas encore
5833
+ // consommés (le serveur les clear au clic) et sans clic optimiste en vol.
5937
5834
  pendingResolution() {
5938
5835
  var t, s, r, i, n;
5939
5836
  if (!this.currentConv) return null;
@@ -5945,6 +5842,47 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5945
5842
  }
5946
5843
  return null;
5947
5844
  },
5845
+ // Boutons de la carte de résolution, libellés via l'i18n du widget
5846
+ // (par id de callback) — pas de texte en dur côté serveur, ça scale
5847
+ // avec les langues supportées. Fallback sur le label serveur si besoin.
5848
+ resolutionCallbacks() {
5849
+ const e = this.pendingResolution;
5850
+ if (!e || !Array.isArray(e.callbacks)) return [];
5851
+ const t = {
5852
+ resolve_confirm: this.t("resolution.confirm"),
5853
+ resolve_decline: this.t("resolution.decline")
5854
+ };
5855
+ return e.callbacks.map((s) => ({
5856
+ ...s,
5857
+ label: t[s.id] || s.label
5858
+ }));
5859
+ },
5860
+ // Dernière validation client de procédure en attente (step
5861
+ // `customerValidation` côté serveur → message agent public portant des
5862
+ // callbacks intent approve/reject, audience customer). Pilote une carte
5863
+ // de boutons. Détection par callbacks (pas de flag metadata dédié) ;
5864
+ // après le clic le serveur efface les callbacks → la carte disparaît.
5865
+ pendingApproval() {
5866
+ var t, s, r, i;
5867
+ if (!this.currentConv) return null;
5868
+ const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
5869
+ for (let n = e.length - 1; n >= 0; n--) {
5870
+ const a = e[n];
5871
+ if (!(!Array.isArray(a == null ? void 0 : a.callbacks) || !a.callbacks.length || !a.callbacks.some(
5872
+ (f) => (f == null ? void 0 : f.intent) === "approve" && (f.audience ?? "customer") === "customer"
5873
+ )))
5874
+ return (i = (r = this.s) == null ? void 0 : r.awaitingCallback) != null && i[a.id] ? null : a;
5875
+ }
5876
+ return null;
5877
+ },
5878
+ // Boutons de la carte de validation : les callbacks approve/reject du
5879
+ // message (labels + styles posés par le serveur).
5880
+ approvalCallbacks() {
5881
+ const e = this.pendingApproval;
5882
+ return !e || !Array.isArray(e.callbacks) ? [] : e.callbacks.filter(
5883
+ (t) => (t == null ? void 0 : t.intent) === "approve" || (t == null ? void 0 : t.intent) === "reject"
5884
+ );
5885
+ },
5948
5886
  // Statut courant de la conversation ouverte. Source FIABLE = le
5949
5887
  // `conversation_status` estampillé sur le dernier message reçu (canal
5950
5888
  // messages, robuste, aligné avec l'archi serveur). Le champ
@@ -5952,27 +5890,6 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5952
5890
  currentStatus() {
5953
5891
  return this.convStatus(this.currentConv);
5954
5892
  },
5955
- // The approval card sits on top of the chat as an overlay. It must
5956
- // appear only once the conversation has visibly settled, never
5957
- // alongside typing dots or before the explaining bubble. See
5958
- // `approvalPacing` mixin for the settle / latch semantics.
5959
- approvalReady() {
5960
- return this.pendingApproval ? this.pendingApproval.id === this.approvalLatchId ? !0 : !(this.streamingActive || !this.approvalSettled) : !1;
5961
- },
5962
- approvalTitle() {
5963
- var e, t, s;
5964
- return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((s = this.pendingApproval) == null ? void 0 : s.text_md) || this.t("action.title");
5965
- },
5966
- approvalDetail() {
5967
- var r, i, n, a, o, f;
5968
- const e = (n = (i = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : i.pending) == null ? void 0 : n.user_explanation;
5969
- if (typeof e == "string" && e.trim())
5970
- return e.trim();
5971
- const t = (f = (o = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : o.pending) == null ? void 0 : f.prepared_params;
5972
- if (!t || typeof t != "object") return "";
5973
- const s = Object.entries(t);
5974
- return s.length ? s.slice(0, 2).map(([b, y]) => `${b}: ${y}`).join(" · ") : "";
5975
- },
5976
5893
  actionInFlight() {
5977
5894
  var e, t;
5978
5895
  return !this.currentConv || !this.store ? null : ((t = (e = this.store).getActionInFlight) == null ? void 0 : t.call(e, this.currentConv.id)) || null;
@@ -5996,8 +5913,8 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
5996
5913
  return e ? e._draft ? !0 : (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).length === 0 : !1;
5997
5914
  },
5998
5915
  // Maps `widget.starter_prompts` ({ title, message }) into the
5999
- // SuggestionChips shape so they render alongside / in place of
6000
- // the server-issued suggested_replies. `text` carries the
5916
+ // InlineCallbacks item shape so they render alongside / in place of
5917
+ // the server-issued inline suggestions. `text` carries the
6001
5918
  // payload sent on click (the prompt's `message` field), with
6002
5919
  // the user-visible `title` used as a defensive fallback when
6003
5920
  // a malformed entry is missing `message`.
@@ -6020,13 +5937,12 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6020
5937
  return t;
6021
5938
  },
6022
5939
  // Dernier formulaire `request_form` actif sur la conv. Pilote la
6023
- // FormCard. Même slot que l'ApprovalCard priorité gérée dans
6024
- // `floatVisible`. Suit le même pacing (`streamingActive` /
6025
- // `approvalSettled`) que l'ApprovalCard pour ne pas surgir au-dessus
6026
- // d'une bulle en cours d'écriture.
5940
+ // FormCard. Priorité gérée dans `floatVisible`. Gating sur
5941
+ // `streamingActive` pour ne pas surgir au-dessus d'une bulle en
5942
+ // cours d'écriture.
6027
5943
  pendingForm() {
6028
5944
  var e, t;
6029
- return !this.currentConv || !this.store || this.pendingApproval || this.actionInFlight || this.streamingActive || !this.approvalSettled ? null : ((t = (e = this.store).getLatestForm) == null ? void 0 : t.call(e, this.currentConv.id)) || null;
5945
+ return !this.currentConv || !this.store || this.actionInFlight || this.streamingActive ? null : ((t = (e = this.store).getLatestForm) == null ? void 0 : t.call(e, this.currentConv.id)) || null;
6030
5946
  },
6031
5947
  showFeedback() {
6032
5948
  var t;
@@ -6034,7 +5950,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6034
5950
  return !e || this.currentStatus !== "resolved" ? !1 : this.feedbackDone[e.id] ? !0 : !((t = e.metadata) != null && t.feedback);
6035
5951
  },
6036
5952
  floatVisible() {
6037
- return this.approvalReady || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
5953
+ return !!this.pendingApproval || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
6038
5954
  },
6039
5955
  dateLabel() {
6040
5956
  var s, r, i;
@@ -6048,7 +5964,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6048
5964
  }
6049
5965
  }
6050
5966
  return this.t("messageList.today", {
6051
- time: Ce(t, ne(this.locale))
5967
+ time: Ce(t, re(this.locale))
6052
5968
  });
6053
5969
  },
6054
5970
  // Pagination state for the active conversation. Drives the
@@ -6088,7 +6004,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6088
6004
  "currentConv.id": {
6089
6005
  handler(e) {
6090
6006
  var t;
6091
- this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorId = Y(
6007
+ this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.isViewingThread && (this.unreadAnchorId = G(
6092
6008
  (t = this.currentConv) == null ? void 0 : t.last_read_message_id
6093
6009
  ), this.unreadBoundaryTs = e ? (/* @__PURE__ */ new Date()).toISOString() : ""), e && this.scheduleWelcomeReveal(e);
6094
6010
  },
@@ -6100,40 +6016,10 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6100
6016
  // render.
6101
6017
  isViewingThread(e, t) {
6102
6018
  var s;
6103
- e && !t ? (this.unreadAnchorId = Y(
6019
+ e && !t ? (this.unreadAnchorId = G(
6104
6020
  (s = this.currentConv) == null ? void 0 : s.last_read_message_id
6105
6021
  ), this.unreadBoundaryTs = (/* @__PURE__ */ new Date()).toISOString()) : e || (this.unreadAnchorId = null, this.unreadBoundaryTs = "");
6106
6022
  },
6107
- // Fresh `pendingApproval` arrival : kick off the settle debounce so
6108
- // the card waits for the conversation to go quiet. Historical
6109
- // approvals (page reload, conv switch on a thread that already had
6110
- // a pending action) bypass the wait — there's nothing to pace, the
6111
- // user expects to see it on landing.
6112
- pendingApproval: {
6113
- handler(e, t) {
6114
- if (e && !t) {
6115
- const s = e != null && e.created_at ? Date.parse(e.created_at) : NaN;
6116
- if (!(Number.isFinite(s) && s >= this.convOpenedAt)) {
6117
- this.resetApprovalPacing();
6118
- return;
6119
- }
6120
- this.bumpApprovalSettle(2600);
6121
- } else !e && t && this.resetApprovalPacing();
6122
- },
6123
- immediate: !1
6124
- },
6125
- // Every flip of streamingActive while an approval is pending resets
6126
- // the settle clock. This is what makes the card wait through the
6127
- // entire burst : action queue → typing → bubble → maybe another
6128
- // bubble → finally quiet → settle fires → card reveals.
6129
- streamingActive(e, t) {
6130
- e !== t && this.pendingApproval && this.pendingApproval.id !== this.approvalLatchId && this.bumpApprovalSettle();
6131
- },
6132
- // Once the card is cleared to show, latch it to that action id so a
6133
- // late bubble in the same burst can't toggle it back off.
6134
- approvalReady(e) {
6135
- e && this.pendingApproval && (this.approvalLatchId = this.pendingApproval.id);
6136
- },
6137
6023
  // Track the floating overlay (chips / approval / feedback) so we can
6138
6024
  // reserve matching bottom space in the MessageList — otherwise the
6139
6025
  // last message lands behind the overlay.
@@ -6153,14 +6039,14 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6153
6039
  }
6154
6040
  },
6155
6041
  async mounted() {
6156
- if (typeof document < "u" && !document.getElementById(De)) {
6042
+ if (typeof document < "u" && !document.getElementById(Ue)) {
6157
6043
  const e = document.createElement("style");
6158
- e.id = De, e.textContent = it, document.head.appendChild(e);
6044
+ e.id = Ue, e.textContent = it, document.head.appendChild(e);
6159
6045
  }
6160
6046
  this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
6161
6047
  },
6162
6048
  beforeUnmount() {
6163
- this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.cancelWelcomeTimers(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
6049
+ this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.cancelWelcomeTimers(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.teardownNotifications(), this.store && this.store.destroy();
6164
6050
  },
6165
6051
  methods: {
6166
6052
  // Statut effectif d'une conversation : le `conversation_status`
@@ -6335,21 +6221,21 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6335
6221
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6336
6222
  },
6337
6223
  sendCurrentLauncherSize() {
6338
- var y, T, E, A, q, M, D;
6224
+ var v, M, E, S, z, T, U;
6339
6225
  if (this.isOpen) return;
6340
- const e = (T = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : T.call(y, ".wm-launcherWrap");
6226
+ const e = (M = (v = this.$el) == null ? void 0 : v.querySelector) == null ? void 0 : M.call(v, ".wm-launcherWrap");
6341
6227
  if (!e) return;
6342
6228
  const t = e.getBoundingClientRect();
6343
6229
  if (!t.width || !t.height) return;
6344
- const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), o = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6230
+ const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6345
6231
  let b = null;
6346
6232
  if (f) {
6347
- const U = f.getBoundingClientRect();
6233
+ const x = f.getBoundingClientRect();
6348
6234
  b = {
6349
- width: Math.ceil(U.width),
6350
- height: Math.ceil(U.height),
6351
- rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
6352
- bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
6235
+ width: Math.ceil(x.width),
6236
+ height: Math.ceil(x.height),
6237
+ rightOffset: Math.max(0, Math.ceil(t.right - x.right)),
6238
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - x.bottom))
6353
6239
  };
6354
6240
  }
6355
6241
  this.notifyParentResize("closed", {
@@ -6539,7 +6425,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6539
6425
  this.openRenameDialog();
6540
6426
  break;
6541
6427
  case "export":
6542
- yt(
6428
+ pt(
6543
6429
  this.currentConv,
6544
6430
  this.currentConv ? (s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id] : [],
6545
6431
  this.translator,
@@ -6547,14 +6433,14 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6547
6433
  );
6548
6434
  break;
6549
6435
  case "status":
6550
- if (_e(this.statusUrl))
6436
+ if (fe(this.statusUrl))
6551
6437
  try {
6552
6438
  window.open(this.statusUrl, "_blank", "noopener");
6553
6439
  } catch {
6554
6440
  }
6555
6441
  break;
6556
6442
  case "help":
6557
- if (_e(this.helpUrl))
6443
+ if (fe(this.helpUrl))
6558
6444
  try {
6559
6445
  window.open(this.helpUrl, "_blank", "noopener");
6560
6446
  } catch {
@@ -6601,18 +6487,25 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6601
6487
  const e = (t = this.currentConv) == null ? void 0 : t.id;
6602
6488
  !e || !this.store || await this.store.loadMore(e);
6603
6489
  },
6604
- async onApprovalCallback(e) {
6605
- const t = this.pendingApproval;
6606
- t && await this.store.clickCallback(t.id, e);
6607
- },
6608
- async onResolutionCardCallback(e) {
6490
+ // Clic sur un bouton de résolution (Oui / Pas encore). `cb` est
6491
+ // l'objet callback émis par InlineCallbacks → round-trip par `cb.id`.
6492
+ // Le serveur dispatche par `intent` (resolve = clôture déterministe ;
6493
+ // send_message = relance un tour) et consomme les callbacks.
6494
+ async onResolutionSelect(e) {
6609
6495
  const t = this.pendingResolution;
6610
- t && await this.store.clickCallback(t.id, e);
6496
+ !t || !(e != null && e.id) || await this.store.clickCallback(t.id, e.id);
6497
+ },
6498
+ // Clic sur un bouton de validation client (Confirmer / Annuler). `cb`
6499
+ // est le callback émis par InlineCallbacks → round-trip par `cb.id` ;
6500
+ // le serveur dispatche par intent approve/reject (reprise de procédure).
6501
+ async onApprovalSelect(e) {
6502
+ const t = this.pendingApproval;
6503
+ !t || !(e != null && e.id) || await this.store.clickCallback(t.id, e.id);
6611
6504
  },
6612
6505
  async onFormSubmit({ values: e }) {
6613
6506
  const t = this.pendingForm;
6614
6507
  if (!(t != null && t.form)) return;
6615
- const s = mt(t.form, e, this.translator);
6508
+ const s = ht(t.form, e, this.translator);
6616
6509
  if (!s) return;
6617
6510
  let r = this.currentConv;
6618
6511
  r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
@@ -6690,7 +6583,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6690
6583
  if (e) {
6691
6584
  if (e.url) {
6692
6585
  if (await this.openInternalUrl(e.url)) return;
6693
- if (!_e(e.url)) {
6586
+ if (!fe(e.url)) {
6694
6587
  console.warn(
6695
6588
  "[messenger] refusing unsafe quick-link url",
6696
6589
  e.url
@@ -6725,45 +6618,45 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
6725
6618
  }
6726
6619
  }
6727
6620
  }
6728
- }, Za = {
6621
+ }, za = {
6729
6622
  key: 0,
6730
6623
  class: "wm-loading",
6731
6624
  "aria-busy": "true",
6732
6625
  "aria-live": "polite"
6733
- }, eo = ["aria-label"], to = {
6626
+ }, qa = ["aria-label"], Va = {
6734
6627
  key: 0,
6735
6628
  class: "wm-state"
6736
- }, no = { class: "wm-state__err" }, so = { class: "wm-state__errTitle" }, ro = { class: "wm-state__errSub" }, io = { class: "wm-bottom" }, ao = {
6629
+ }, Ka = { class: "wm-state__err" }, Wa = { class: "wm-state__errTitle" }, $a = { class: "wm-state__errSub" }, Ga = { class: "wm-bottom" }, Ya = {
6737
6630
  key: 0,
6738
6631
  ref: "floatEl",
6739
6632
  class: "wm-float"
6740
- }, oo = {
6633
+ }, Ja = {
6741
6634
  key: 1,
6742
6635
  class: "wm-actionWait",
6743
6636
  role: "status",
6744
6637
  "aria-live": "polite"
6745
- }, lo = { class: "wm-actionWait__lbl" }, co = {
6638
+ }, Xa = { class: "wm-actionWait__lbl" }, Qa = {
6746
6639
  key: 2,
6747
6640
  class: "wm-attached"
6748
- }, uo = ["src", "alt"], ho = {
6641
+ }, Za = ["src", "alt"], eo = {
6749
6642
  key: 1,
6750
6643
  class: "wm-attached__file"
6751
- }, mo = { class: "wm-attached__fileMeta" }, fo = { class: "wm-attached__fileName" }, _o = {
6644
+ }, to = { class: "wm-attached__fileMeta" }, no = { class: "wm-attached__fileName" }, so = {
6752
6645
  key: 0,
6753
6646
  class: "wm-attached__fileSize"
6754
- }, go = ["aria-label", "onClick"], po = {
6647
+ }, ro = ["aria-label", "onClick"], io = {
6755
6648
  key: 3,
6756
6649
  class: "wm-ended",
6757
6650
  role: "status",
6758
6651
  "aria-live": "polite"
6759
- }, vo = { class: "wm-ended__lbl" };
6760
- function yo(e, t, s, r, i, n) {
6761
- const a = B("Launcher"), o = B("Header"), f = B("History"), b = B("Onboarding"), y = B("MessageList"), T = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), D = B("MoreMenu"), U = B("RenameDialog");
6652
+ }, ao = { class: "wm-ended__lbl" };
6653
+ function oo(e, t, s, r, i, n) {
6654
+ const a = P("Launcher"), o = P("Header"), f = P("History"), b = P("Onboarding"), v = P("MessageList"), M = P("InlineCallbacks"), E = P("FormCard"), S = P("Feedback"), z = P("Composer"), T = P("MoreMenu"), U = P("RenameDialog");
6762
6655
  return c(), d("div", {
6763
- class: R(["wm-root", `wm-root--${s.displayMode}`]),
6764
- style: z(n.rootStyle)
6656
+ class: L(["wm-root", `wm-root--${s.displayMode}`]),
6657
+ style: j(n.rootStyle)
6765
6658
  }, [
6766
- !i.isOpen && !n.isEmbedded ? (c(), P(a, {
6659
+ !i.isOpen && !n.isEmbedded ? (c(), I(a, {
6767
6660
  key: 0,
6768
6661
  "unread-count": n.unreadCount,
6769
6662
  peeks: n.launcherPeeks,
@@ -6773,23 +6666,23 @@ function yo(e, t, s, r, i, n) {
6773
6666
  }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
6774
6667
  i.isOpen || n.isEmbedded ? (c(), d("section", {
6775
6668
  key: 1,
6776
- class: R([
6669
+ class: L([
6777
6670
  "wm-panel",
6778
6671
  `wm-panel--${s.displayMode}`,
6779
6672
  { "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
6780
6673
  ]),
6781
- style: z(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6674
+ style: j(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6782
6675
  role: "dialog",
6783
6676
  "aria-label": "Messenger",
6784
- onClick: t[7] || (t[7] = (...L) => n.onPanelClick && n.onPanelClick(...L))
6677
+ onClick: t[7] || (t[7] = (...x) => n.onPanelClick && n.onPanelClick(...x))
6785
6678
  }, [
6786
- !n.ready && !n.error ? (c(), d("div", Za, [
6679
+ !n.ready && !n.error ? (c(), d("div", za, [
6787
6680
  n.isEmbedded ? k("", !0) : (c(), d("button", {
6788
6681
  key: 0,
6789
6682
  type: "button",
6790
6683
  class: "wm-loading__close",
6791
6684
  "aria-label": n.t("loading.minimize"),
6792
- onClick: t[0] || (t[0] = (...L) => n.close && n.close(...L))
6685
+ onClick: t[0] || (t[0] = (...x) => n.close && n.close(...x))
6793
6686
  }, [...t[8] || (t[8] = [
6794
6687
  l("svg", {
6795
6688
  width: "13",
@@ -6804,13 +6697,13 @@ function yo(e, t, s, r, i, n) {
6804
6697
  }, [
6805
6698
  l("path", { d: "M18 6L6 18M6 6l12 12" })
6806
6699
  ], -1)
6807
- ])], 8, eo)),
6700
+ ])], 8, qa)),
6808
6701
  t[9] || (t[9] = l("div", {
6809
6702
  class: "wm-loading__spinner",
6810
6703
  "aria-hidden": "true"
6811
6704
  }, null, -1))
6812
- ])) : (c(), d(I, { key: 1 }, [
6813
- K(o, {
6705
+ ])) : (c(), d(B, { key: 1 }, [
6706
+ W(o, {
6814
6707
  title: n.headerTitle,
6815
6708
  "team-members": n.teamMembers,
6816
6709
  "response-label": n.responseLabel,
@@ -6824,8 +6717,8 @@ function yo(e, t, s, r, i, n) {
6824
6717
  onMore: n.toggleMore,
6825
6718
  onClose: n.close
6826
6719
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6827
- n.error ? (c(), d("div", to, [
6828
- l("div", no, [
6720
+ n.error ? (c(), d("div", Va, [
6721
+ l("div", Ka, [
6829
6722
  t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
6830
6723
  l("svg", {
6831
6724
  width: "14",
@@ -6842,16 +6735,16 @@ function yo(e, t, s, r, i, n) {
6842
6735
  ])
6843
6736
  ], -1)),
6844
6737
  l("div", null, [
6845
- l("div", so, v(n.t("error.connectionFailed")), 1),
6846
- l("div", ro, v(n.error), 1)
6738
+ l("div", Wa, y(n.t("error.connectionFailed")), 1),
6739
+ l("div", $a, y(n.error), 1)
6847
6740
  ])
6848
6741
  ])
6849
- ])) : !n.currentConv && i.showHistory ? (c(), P(f, {
6742
+ ])) : !n.currentConv && i.showHistory ? (c(), I(f, {
6850
6743
  key: 1,
6851
6744
  threads: n.openThreads,
6852
6745
  onResume: n.onDrawerPick
6853
- }, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(I, { key: 3 }, [
6854
- K(y, {
6746
+ }, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(B, { key: 3 }, [
6747
+ W(v, {
6855
6748
  ref: "messageList",
6856
6749
  messages: n.displayedMessages,
6857
6750
  "streaming-active": n.streamingActive,
@@ -6865,60 +6758,55 @@ function yo(e, t, s, r, i, n) {
6865
6758
  "ai-agent-avatar-url": n.agentAvatarUrl,
6866
6759
  onLoadMore: n.onLoadMore
6867
6760
  }, 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"]),
6868
- l("div", io, [
6869
- n.floatVisible ? (c(), d("div", ao, [
6870
- n.approvalReady ? (c(), P(T, {
6871
- key: 0,
6872
- action: n.approvalTitle,
6873
- detail: n.approvalDetail,
6874
- callbacks: n.pendingApproval.callbacks,
6875
- "agent-name": n.agentName,
6876
- "agent-avatar-url": n.agentAvatarUrl,
6877
- onCallback: n.onApprovalCallback
6878
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingResolution ? (c(), P(T, {
6879
- key: 1,
6880
- action: n.pendingResolution.text_md,
6881
- callbacks: n.pendingResolution.callbacks,
6882
- "agent-name": n.agentName,
6883
- "agent-avatar-url": n.agentAvatarUrl,
6884
- onCallback: n.onResolutionCardCallback
6885
- }, null, 8, ["action", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), P(E, {
6761
+ l("div", Ga, [
6762
+ n.floatVisible ? (c(), d("div", Ya, [
6763
+ n.pendingApproval ? (c(), I(M, {
6764
+ key: `appr-${n.pendingApproval.id}`,
6765
+ variant: "buttons",
6766
+ items: n.approvalCallbacks,
6767
+ onSelect: n.onApprovalSelect
6768
+ }, null, 8, ["items", "onSelect"])) : n.pendingResolution ? (c(), I(M, {
6769
+ key: `res-${n.pendingResolution.id}`,
6770
+ variant: "buttons",
6771
+ items: n.resolutionCallbacks,
6772
+ onSelect: n.onResolutionSelect
6773
+ }, null, 8, ["items", "onSelect"])) : n.pendingForm ? (c(), I(E, {
6886
6774
  key: n.pendingForm.message && n.pendingForm.message.id,
6887
6775
  form: n.pendingForm.form,
6888
6776
  "agent-name": n.agentName,
6889
6777
  "agent-avatar-url": n.agentAvatarUrl,
6890
6778
  onSubmit: n.onFormSubmit
6891
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), P(A, {
6779
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), I(S, {
6892
6780
  key: 3,
6893
6781
  busy: i.feedbackBusy,
6894
6782
  done: !!(n.currentConv && i.feedbackDone[n.currentConv.id]),
6895
6783
  onSubmit: n.onFeedback
6896
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(q, {
6784
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), I(M, {
6897
6785
  key: 4,
6898
6786
  items: n.suggestions,
6899
6787
  onSelect: n.onSuggestion
6900
6788
  }, null, 8, ["items", "onSelect"]))
6901
6789
  ], 512)) : k("", !0),
6902
- n.actionInFlight ? (c(), d("div", oo, [
6790
+ n.actionInFlight ? (c(), d("div", Ja, [
6903
6791
  t[11] || (t[11] = l("span", {
6904
6792
  class: "wm-actionWait__spinner",
6905
6793
  "aria-hidden": "true"
6906
6794
  }, null, -1)),
6907
- l("span", lo, v(n.t("action.inProgress", {
6795
+ l("span", Xa, y(n.t("action.inProgress", {
6908
6796
  name: n.actionInFlightName
6909
6797
  })), 1)
6910
6798
  ])) : k("", !0),
6911
- i.pendingAttachments.length ? (c(), d("div", co, [
6912
- (c(!0), d(I, null, j(i.pendingAttachments, (L, W) => (c(), d("div", {
6913
- key: L.path || W,
6799
+ i.pendingAttachments.length ? (c(), d("div", Qa, [
6800
+ (c(!0), d(B, null, N(i.pendingAttachments, (x, q) => (c(), d("div", {
6801
+ key: x.path || q,
6914
6802
  class: "wm-attached__item"
6915
6803
  }, [
6916
- L.previewUrl ? (c(), d("img", {
6804
+ x.previewUrl ? (c(), d("img", {
6917
6805
  key: 0,
6918
6806
  class: "wm-attached__thumb",
6919
- src: L.previewUrl,
6920
- alt: L.name
6921
- }, null, 8, uo)) : (c(), d("div", ho, [
6807
+ src: x.previewUrl,
6808
+ alt: x.name
6809
+ }, null, 8, Za)) : (c(), d("div", eo, [
6922
6810
  t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
6923
6811
  l("svg", {
6924
6812
  width: "16",
@@ -6935,10 +6823,10 @@ function yo(e, t, s, r, i, n) {
6935
6823
  l("path", { d: "M14 2v6h6" })
6936
6824
  ])
6937
6825
  ], -1)),
6938
- l("span", mo, [
6939
- l("span", fo, v(L.name), 1),
6940
- n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", _o, v(n.formatAttachmentSize(
6941
- L.size_bytes
6826
+ l("span", to, [
6827
+ l("span", no, y(x.name), 1),
6828
+ n.formatAttachmentSize(x.size_bytes) ? (c(), d("span", so, y(n.formatAttachmentSize(
6829
+ x.size_bytes
6942
6830
  )), 1)) : k("", !0)
6943
6831
  ])
6944
6832
  ])),
@@ -6946,7 +6834,7 @@ function yo(e, t, s, r, i, n) {
6946
6834
  type: "button",
6947
6835
  class: "wm-attached__remove",
6948
6836
  "aria-label": n.t("attachment.remove"),
6949
- onClick: (Q) => n.removePendingAttachment(W)
6837
+ onClick: (J) => n.removePendingAttachment(q)
6950
6838
  }, [...t[13] || (t[13] = [
6951
6839
  l("svg", {
6952
6840
  width: "10",
@@ -6961,48 +6849,47 @@ function yo(e, t, s, r, i, n) {
6961
6849
  }, [
6962
6850
  l("path", { d: "M18 6L6 18M6 6l12 12" })
6963
6851
  ], -1)
6964
- ])], 8, go)
6852
+ ])], 8, ro)
6965
6853
  ]))), 128))
6966
6854
  ])) : k("", !0),
6967
- n.endedBlockVisible ? (c(), d("div", po, [
6968
- l("span", vo, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6855
+ n.endedBlockVisible ? (c(), d("div", io, [
6856
+ l("span", ao, y(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6969
6857
  l("button", {
6970
6858
  type: "button",
6971
6859
  class: "wm-ended__btn",
6972
- onClick: t[2] || (t[2] = (L) => n.isClosed ? n.onReopen() : n.startConv())
6973
- }, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
6974
- ])) : n.actionInFlight ? k("", !0) : (c(), P(M, {
6860
+ onClick: t[2] || (t[2] = (x) => n.isClosed ? n.onReopen() : n.startConv())
6861
+ }, y(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
6862
+ ])) : n.actionInFlight ? k("", !0) : (c(), I(z, {
6975
6863
  key: 4,
6976
6864
  ref: "composer",
6977
6865
  modelValue: i.draft,
6978
- "onUpdate:modelValue": t[3] || (t[3] = (L) => i.draft = L),
6866
+ "onUpdate:modelValue": t[3] || (t[3] = (x) => i.draft = x),
6979
6867
  placeholder: n.composerPlaceholder,
6980
- disabled: !!n.pendingApproval,
6981
6868
  "attach-label": n.t("composer.attachFile"),
6982
6869
  "display-mode": s.displayMode,
6983
6870
  onSend: n.onSend,
6984
6871
  onAttach: n.onAttach
6985
- }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6872
+ }, null, 8, ["modelValue", "placeholder", "attach-label", "display-mode", "onSend", "onAttach"]))
6986
6873
  ]),
6987
- i.moreOpen ? (c(), P(D, {
6874
+ i.moreOpen ? (c(), I(T, {
6988
6875
  key: 0,
6989
6876
  "can-rename": !!n.currentConv && !n.currentConv._draft,
6990
6877
  "can-export": !!n.currentConv && !n.currentConv._draft,
6991
6878
  "sound-enabled": e.soundEnabled,
6992
6879
  "status-url": n.statusUrl,
6993
6880
  "help-url": n.helpUrl,
6994
- onClose: t[4] || (t[4] = (L) => i.moreOpen = !1),
6881
+ onClose: t[4] || (t[4] = (x) => i.moreOpen = !1),
6995
6882
  onSoundToggle: e.onSoundToggle,
6996
6883
  onAction: n.onMoreAction
6997
6884
  }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
6998
- i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), P(U, {
6885
+ i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), I(U, {
6999
6886
  key: 1,
7000
6887
  "initial-value": n.currentConv.name || "",
7001
6888
  title: n.t("rename.dialogTitle"),
7002
- onClose: t[5] || (t[5] = (L) => i.renameDialogOpen = !1),
6889
+ onClose: t[5] || (t[5] = (x) => i.renameDialogOpen = !1),
7003
6890
  onSubmit: n.onRenameSubmit
7004
6891
  }, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
7005
- ], 64)) : (c(), P(b, {
6892
+ ], 64)) : (c(), I(b, {
7006
6893
  key: 2,
7007
6894
  title: n.widgetTitle,
7008
6895
  subtitle: n.widgetSubtitle,
@@ -7014,16 +6901,16 @@ function yo(e, t, s, r, i, n) {
7014
6901
  onStart: n.startConv,
7015
6902
  onSelect: n.onQuickLink,
7016
6903
  onResume: n.onDrawerPick,
7017
- onViewHistory: t[1] || (t[1] = (L) => i.showHistory = !0)
6904
+ onViewHistory: t[1] || (t[1] = (x) => i.showHistory = !0)
7018
6905
  }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
7019
- i.moreOpen && !n.currentConv ? (c(), P(D, {
6906
+ i.moreOpen && !n.currentConv ? (c(), I(T, {
7020
6907
  key: 4,
7021
6908
  "can-rename": !1,
7022
6909
  "can-export": !1,
7023
6910
  "sound-enabled": e.soundEnabled,
7024
6911
  "status-url": n.statusUrl,
7025
6912
  "help-url": n.helpUrl,
7026
- onClose: t[6] || (t[6] = (L) => i.moreOpen = !1),
6913
+ onClose: t[6] || (t[6] = (x) => i.moreOpen = !1),
7027
6914
  onSoundToggle: e.onSoundToggle,
7028
6915
  onAction: n.onMoreAction
7029
6916
  }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
@@ -7031,53 +6918,52 @@ function yo(e, t, s, r, i, n) {
7031
6918
  ], 6)) : k("", !0)
7032
6919
  ], 6);
7033
6920
  }
7034
- const ko = /* @__PURE__ */ N(Qa, [["render", yo], ["__scopeId", "data-v-257d4a0f"]]), Co = "0.5.82";
6921
+ const uo = /* @__PURE__ */ D(ja, [["render", oo], ["__scopeId", "data-v-caa7f955"]]), mo = "0.6.0";
7035
6922
  export {
7036
- oe as AIAvatar,
6923
+ he as AIAvatar,
7037
6924
  be as AVATAR_COLORS,
7038
- Ss as ActionResult,
7039
- Ui as ApprovalCard,
6925
+ As as ActionResult,
7040
6926
  Bs as ArtifactFormResponse,
7041
- $s as ArtifactInfoCard,
7042
- hr as ArtifactRenderer,
7043
- lr as ArtifactTicket,
7044
- Ar as AttachmentPreview,
7045
- xr as Bubble,
7046
- Ai as Composer,
6927
+ Ws as ArtifactInfoCard,
6928
+ ur as ArtifactRenderer,
6929
+ or as ArtifactTicket,
6930
+ Cr as AttachmentPreview,
6931
+ Tr as Bubble,
6932
+ Ci as Composer,
7047
6933
  at as DEFAULT_BASE_URL,
7048
- he as DEFAULT_LANGUAGE,
7049
- Sa as Feedback,
7050
- ua as FormCard,
7051
- gn as Header,
7052
- ve as HumanAvatar,
7053
- Vt as Launcher,
6934
+ ue as DEFAULT_LANGUAGE,
6935
+ fa as Feedback,
6936
+ ea as FormCard,
6937
+ _n as Header,
6938
+ ye as HumanAvatar,
6939
+ Ti as InlineCallbacks,
6940
+ qt as Launcher,
7054
6941
  Oe as MEDIA_RECORDER_SUPPORTED,
7055
- ii as MessageList,
7056
- ko as Messenger,
7057
- ja as MoreMenu,
7058
- Xn as Onboarding,
7059
- pe as SCREEN_CAPTURE_SUPPORTED,
7060
- ht as SUPPORTED_LANGUAGES,
7061
- xi as SuggestionChips,
7062
- nn as TeamAvatars,
7063
- Ir as Typing,
7064
- Co as VERSION,
7065
- Te as avatarColor,
7066
- Me as avatarInitials,
7067
- oi as captureScreenshotFile,
6942
+ ri as MessageList,
6943
+ uo as Messenger,
6944
+ xa as MoreMenu,
6945
+ Jn as Onboarding,
6946
+ ge as SCREEN_CAPTURE_SUPPORTED,
6947
+ mt as SUPPORTED_LANGUAGES,
6948
+ tn as TeamAvatars,
6949
+ Lr as Typing,
6950
+ mo as VERSION,
6951
+ Me as avatarColor,
6952
+ Te as avatarInitials,
6953
+ ai as captureScreenshotFile,
7068
6954
  H as colors,
7069
6955
  rt as createStore,
7070
6956
  F as createTranslator,
7071
6957
  et as createTransport,
7072
- ne as dateLocale,
7073
- ko as default,
6958
+ re as dateLocale,
6959
+ uo as default,
7074
6960
  Ce as formatTime,
7075
- bo as guessAttachmentKind,
7076
- ai as pickRecorderMime,
6961
+ co as guessAttachmentKind,
6962
+ ii as pickRecorderMime,
7077
6963
  qe as renderInlineMarkdown,
7078
6964
  _t as renderMarkdown,
7079
6965
  xe as resolveLanguage,
7080
- ci as startScreenRecording,
6966
+ li as startScreenRecording,
7081
6967
  it as tokensCss,
7082
6968
  st as uuid,
7083
6969
  st as v4