@_solaris/messenger-widget 0.5.9 → 0.5.11

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 Fe, openBlock as c, createElementBlock as u, normalizeStyle as z, normalizeClass as O, toDisplayString as v, resolveComponent as L, createVNode as V, Transition as Ue, withCtx as je, Fragment as E, renderList as U, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as N, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as De, renderSlot as Pe, vModelCheckbox as qe, vModelSelect as ze, markRaw as ke } from "vue";
1
+ import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Ue, withCtx as Pe, Fragment as I, renderList as U, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as N, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as qe, markRaw as ke } from "vue";
2
2
  const He = [
3
3
  "connected",
4
4
  "message",
@@ -93,10 +93,10 @@ function We(e) {
93
93
  }
94
94
  );
95
95
  if (!f.ok) {
96
- const I = await l(f), T = new Error(
97
- `Session bootstrap failed: HTTP ${f.status} :: ${(I == null ? void 0 : I.error) || f.statusText}`
96
+ const L = await l(f), T = new Error(
97
+ `Session bootstrap failed: HTTP ${f.status} :: ${(L == null ? void 0 : L.error) || f.statusText}`
98
98
  );
99
- throw T.status = f.status, T.body = I, T;
99
+ throw T.status = f.status, T.body = L, T;
100
100
  }
101
101
  const g = await f.json();
102
102
  t.userId = g.external_id;
@@ -104,25 +104,25 @@ function We(e) {
104
104
  fetch(
105
105
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
106
106
  { credentials: "include" }
107
- ).then(async (I) => {
108
- if (!I.ok) {
109
- const T = await l(I);
107
+ ).then(async (L) => {
108
+ if (!L.ok) {
109
+ const T = await l(L);
110
110
  throw new Error(
111
- `HTTP ${I.status} GET /widgets/:id/config :: ${(T == null ? void 0 : T.error) || I.statusText}`
111
+ `HTTP ${L.status} GET /widgets/:id/config :: ${(T == null ? void 0 : T.error) || L.statusText}`
112
112
  );
113
113
  }
114
- return I.json();
114
+ return L.json();
115
115
  }),
116
116
  a("GET", "/customers/me")
117
117
  ]), S = { config: y, customer: (b == null ? void 0 : b.customer) ?? null };
118
- return t.lastBootstrap = S, await C(), typeof document < "u" && (t.visibilityHandler = h, document.addEventListener(
118
+ return t.lastBootstrap = S, await C(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
119
119
  "visibilitychange",
120
120
  t.visibilityHandler
121
121
  )), de(), S;
122
122
  }
123
123
  async function C() {
124
124
  try {
125
- const d = await B();
125
+ const d = await R();
126
126
  t.lastActivityAt = d.reduce((f, g) => {
127
127
  const y = g == null ? void 0 : g.last_message_at;
128
128
  return y && (!f || y > f) ? y : f;
@@ -139,7 +139,7 @@ function We(e) {
139
139
  const f = await a("PATCH", "/customers/me", d);
140
140
  return (f == null ? void 0 : f.customer) ?? null;
141
141
  }
142
- async function B() {
142
+ async function R() {
143
143
  const d = await a("GET", "/conversations");
144
144
  return (d == null ? void 0 : d.conversations) ?? [];
145
145
  }
@@ -159,7 +159,7 @@ function We(e) {
159
159
  f
160
160
  )).conversation;
161
161
  }
162
- async function D(d, f) {
162
+ async function j(d, f) {
163
163
  return a(
164
164
  "PATCH",
165
165
  `/conversations/${encodeURIComponent(d)}/read`,
@@ -175,7 +175,7 @@ function We(e) {
175
175
  `/conversations/${encodeURIComponent(d)}/messages${y}`
176
176
  );
177
177
  }
178
- async function q(d, f) {
178
+ async function z(d, f) {
179
179
  se();
180
180
  const g = {
181
181
  client_msg_id: f.client_msg_id,
@@ -259,9 +259,9 @@ function We(e) {
259
259
  function ce(d) {
260
260
  t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), $()) : se();
261
261
  }
262
- async function he() {
262
+ async function me() {
263
263
  try {
264
- const d = await B(), f = d.reduce((y, b) => {
264
+ const d = await R(), f = d.reduce((y, b) => {
265
265
  const S = b == null ? void 0 : b.last_message_at;
266
266
  return S && (!y || S > y) ? S : y;
267
267
  }, null);
@@ -271,15 +271,15 @@ function We(e) {
271
271
  }
272
272
  }
273
273
  function de() {
274
- m(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(he, $e));
274
+ h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me, $e));
275
275
  }
276
- function m() {
276
+ function h() {
277
277
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
278
278
  }
279
- function h() {
279
+ function m() {
280
280
  if (document.hidden)
281
281
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
282
- t.hiddenGraceTimer = null, document.hidden && (m(), G(), r("paused"));
282
+ t.hiddenGraceTimer = null, document.hidden && (h(), G(), r("paused"));
283
283
  }, Ke);
284
284
  else {
285
285
  if (t.hiddenGraceTimer) {
@@ -290,7 +290,7 @@ function We(e) {
290
290
  }
291
291
  }
292
292
  function _() {
293
- m(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, G(), t.visibilityHandler && (document.removeEventListener(
293
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, G(), t.visibilityHandler && (document.removeEventListener(
294
294
  "visibilitychange",
295
295
  t.visibilityHandler
296
296
  ), t.visibilityHandler = null), t.started = !1;
@@ -303,13 +303,13 @@ function We(e) {
303
303
  // REST
304
304
  getCustomer: k,
305
305
  patchCustomer: x,
306
- listConversations: B,
306
+ listConversations: R,
307
307
  createConversation: A,
308
308
  getConversation: H,
309
309
  patchConversation: M,
310
- markConversationRead: D,
310
+ markConversationRead: j,
311
311
  listMessages: F,
312
- postMessage: q,
312
+ postMessage: z,
313
313
  postCallback: W,
314
314
  uploadAttachment: Z,
315
315
  signAttachment: ee,
@@ -370,48 +370,48 @@ function Qe(e) {
370
370
  connection: "idle"
371
371
  }), n = [];
372
372
  n.push(
373
- e.on("connection", (m) => {
374
- t.connection = m;
373
+ e.on("connection", (h) => {
374
+ t.connection = h;
375
375
  })
376
376
  ), n.push(
377
- e.on("message", (m) => {
378
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.message;
379
- !h || !(_ != null && _.id) || ($(h, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(h, _.created_at));
377
+ e.on("message", (h) => {
378
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
379
+ !m || !(_ != null && _.id) || ($(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(m, _.created_at));
380
380
  })
381
381
  ), n.push(
382
- e.on("message_stream", (m) => {
383
- const h = m == null ? void 0 : m.message_id, _ = m == null ? void 0 : m.token;
384
- !h || typeof _ != "string" || (t.streamingByMsgId[h] = (t.streamingByMsgId[h] || "") + _);
382
+ e.on("message_stream", (h) => {
383
+ const m = h == null ? void 0 : h.message_id, _ = h == null ? void 0 : h.token;
384
+ !m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
385
385
  })
386
386
  ), n.push(
387
- e.on("conversation_updated", (m) => {
388
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.changes;
389
- if (!h || !_) return;
390
- const d = t.conversations.findIndex((f) => f.id === h);
387
+ e.on("conversation_updated", (h) => {
388
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
389
+ if (!m || !_) return;
390
+ const d = t.conversations.findIndex((f) => f.id === m);
391
391
  d !== -1 && (t.conversations[d] = {
392
392
  ...t.conversations[d],
393
393
  ..._
394
394
  });
395
395
  })
396
396
  ), n.push(
397
- e.on("config_updated", (m) => {
398
- m != null && m.config && (t.config = m.config);
397
+ e.on("config_updated", (h) => {
398
+ h != null && h.config && (t.config = h.config);
399
399
  })
400
400
  ), n.push(
401
- e.on("action_status", (m) => {
402
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.action_id, d = m == null ? void 0 : m.action_name;
403
- if (!h || !_) return;
404
- const f = t.runningActionsByConv[h] || {};
405
- m.state === "running" ? (f[_] = d || _, t.runningActionsByConv[h] = { ...f }) : m.state === "done" && (delete f[_], t.runningActionsByConv[h] = { ...f });
401
+ e.on("action_status", (h) => {
402
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, d = h == null ? void 0 : h.action_name;
403
+ if (!m || !_) return;
404
+ const f = t.runningActionsByConv[m] || {};
405
+ h.state === "running" ? (f[_] = d || _, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[_], t.runningActionsByConv[m] = { ...f });
406
406
  })
407
407
  ), n.push(
408
- e.on("activity", (m) => {
409
- Array.isArray(m == null ? void 0 : m.conversations) && (t.conversations = m.conversations);
408
+ e.on("activity", (h) => {
409
+ Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
410
410
  })
411
411
  );
412
- async function i(m) {
412
+ async function i(h) {
413
413
  try {
414
- const h = new Promise(
414
+ const m = new Promise(
415
415
  (d, f) => setTimeout(
416
416
  () => f(
417
417
  new Error(
@@ -421,61 +421,61 @@ function Qe(e) {
421
421
  15e3
422
422
  )
423
423
  ), _ = await Promise.race([
424
- e.start(m),
425
- h
424
+ e.start(h),
425
+ m
426
426
  ]);
427
427
  t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
428
428
  e.listConversations(),
429
- h
429
+ m
430
430
  ]), t.ready = !0;
431
- } catch (h) {
432
- console.error("[store] start failed", h), t.error = (h == null ? void 0 : h.message) || String(h);
431
+ } catch (m) {
432
+ console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
433
433
  }
434
434
  }
435
435
  function r() {
436
- for (const m of n)
436
+ for (const h of n)
437
437
  try {
438
- m();
438
+ h();
439
439
  } catch {
440
440
  }
441
441
  e.stop();
442
442
  }
443
- async function s(m) {
444
- const h = he(m);
445
- if (!h) return t.customer;
443
+ async function s(h) {
444
+ const m = me(h);
445
+ if (!m) return t.customer;
446
446
  try {
447
- const _ = await e.patchCustomer(h);
447
+ const _ = await e.patchCustomer(m);
448
448
  _ && (t.customer = _);
449
449
  } catch (_) {
450
450
  console.error("[store] applyCustomer failed", _);
451
451
  }
452
452
  return t.customer;
453
453
  }
454
- async function a(m = {}) {
455
- const h = await e.createConversation(m), _ = t.conversations.findIndex((d) => d.id === h.id);
456
- return _ === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[_] = h, h;
454
+ async function a(h = {}) {
455
+ const m = await e.createConversation(h), _ = t.conversations.findIndex((d) => d.id === m.id);
456
+ return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
457
457
  }
458
458
  const l = 50;
459
- async function p(m) {
460
- const h = t.paginationByConv[m];
461
- if (!(h != null && h.loaded || h != null && h.loading)) {
462
- k(m, { nextCursor: null, loading: !0, loaded: !1 });
459
+ async function p(h) {
460
+ const m = t.paginationByConv[h];
461
+ if (!(m != null && m.loaded || m != null && m.loading)) {
462
+ k(h, { nextCursor: null, loading: !0, loaded: !1 });
463
463
  try {
464
- const _ = await e.listMessages(m, {
464
+ const _ = await e.listMessages(h, {
465
465
  limit: l
466
- }), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[m] || [], g = /* @__PURE__ */ new Set();
466
+ }), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[h] || [], g = /* @__PURE__ */ new Set();
467
467
  for (const b of d)
468
468
  (b == null ? void 0 : b.id) != null && g.add(`id:${String(b.id)}`), b != null && b.client_msg_id && g.add(`c:${b.client_msg_id}`);
469
469
  const y = f.filter((b) => !((b == null ? void 0 : b.id) != null && g.has(`id:${String(b.id)}`) || b != null && b.client_msg_id && g.has(`c:${b.client_msg_id}`)));
470
- t.messagesByConv[m] = [...d, ...y].sort(
470
+ t.messagesByConv[h] = [...d, ...y].sort(
471
471
  ce
472
- ), k(m, {
472
+ ), k(h, {
473
473
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
474
474
  loading: !1,
475
475
  loaded: !0
476
476
  });
477
477
  } catch (_) {
478
- console.error("[store] openConversation failed", _), k(m, {
478
+ console.error("[store] openConversation failed", _), k(h, {
479
479
  nextCursor: null,
480
480
  loading: !1,
481
481
  loaded: !1
@@ -483,67 +483,67 @@ function Qe(e) {
483
483
  }
484
484
  }
485
485
  }
486
- async function C(m) {
486
+ async function C(h) {
487
487
  var f;
488
- const h = t.paginationByConv[m];
489
- if (!h || h.loading || !h.nextCursor) return;
490
- const d = (f = (t.messagesByConv[m] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
488
+ const m = t.paginationByConv[h];
489
+ if (!m || m.loading || !m.nextCursor) return;
490
+ const d = (f = (t.messagesByConv[h] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
491
491
  if (d) {
492
- k(m, { ...h, loading: !0 });
492
+ k(h, { ...m, loading: !0 });
493
493
  try {
494
- const g = await e.listMessages(m, {
494
+ const g = await e.listMessages(h, {
495
495
  before: d,
496
496
  limit: l
497
- }), y = (g == null ? void 0 : g.messages) ?? [], b = t.messagesByConv[m] || [], S = /* @__PURE__ */ new Set();
497
+ }), y = (g == null ? void 0 : g.messages) ?? [], b = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
498
498
  for (const T of b)
499
499
  (T == null ? void 0 : T.id) != null && S.add(`id:${String(T.id)}`), T != null && T.client_msg_id && S.add(`c:${T.client_msg_id}`);
500
- const I = y.filter((T) => !((T == null ? void 0 : T.id) != null && S.has(`id:${String(T.id)}`) || T != null && T.client_msg_id && S.has(`c:${T.client_msg_id}`)));
501
- t.messagesByConv[m] = [...I, ...b], k(m, {
500
+ const L = y.filter((T) => !((T == null ? void 0 : T.id) != null && S.has(`id:${String(T.id)}`) || T != null && T.client_msg_id && S.has(`c:${T.client_msg_id}`)));
501
+ t.messagesByConv[h] = [...L, ...b], k(h, {
502
502
  nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
503
503
  loading: !1,
504
504
  loaded: !0
505
505
  });
506
506
  } catch (g) {
507
- console.error("[store] loadMore failed", g), k(m, { ...h, loading: !1 });
507
+ console.error("[store] loadMore failed", g), k(h, { ...m, loading: !1 });
508
508
  }
509
509
  }
510
510
  }
511
- function k(m, h) {
512
- t.paginationByConv = { ...t.paginationByConv, [m]: h };
511
+ function k(h, m) {
512
+ t.paginationByConv = { ...t.paginationByConv, [h]: m };
513
513
  }
514
- async function x(m, h) {
515
- const _ = await e.patchConversation(m, h), d = t.conversations.findIndex((f) => f.id === m);
514
+ async function x(h, m) {
515
+ const _ = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
516
516
  d !== -1 && (t.conversations[d] = _);
517
517
  }
518
- async function B(m) {
519
- if (!m) return [];
520
- const h = t.messagesByConv[m] || [];
518
+ async function R(h) {
519
+ if (!h) return [];
520
+ const m = t.messagesByConv[h] || [];
521
521
  let _ = "";
522
- for (const d of h)
522
+ for (const d of m)
523
523
  d != null && d.created_at && d.created_at > _ && (_ = d.created_at);
524
524
  try {
525
525
  const d = await e.listMessages(
526
- m,
526
+ h,
527
527
  _ ? { since: _ } : {}
528
528
  ), f = (d == null ? void 0 : d.messages) || [];
529
529
  if (!f.length) return [];
530
530
  const g = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
531
- for (const S of h)
531
+ for (const S of m)
532
532
  (S == null ? void 0 : S.id) != null && g.add(String(S.id)), S != null && S.client_msg_id && y.add(S.client_msg_id);
533
533
  const b = [];
534
534
  for (const S of f) {
535
- const I = (S == null ? void 0 : S.id) != null && g.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
536
- $(m, S), I || b.push(S);
535
+ const L = (S == null ? void 0 : S.id) != null && g.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
536
+ $(h, S), L || b.push(S);
537
537
  }
538
538
  return b;
539
539
  } catch (d) {
540
540
  return console.error("[store] fetchSinceLast failed", d), [];
541
541
  }
542
542
  }
543
- async function A(m, h) {
544
- if (!(!m || h == null))
543
+ async function A(h, m) {
544
+ if (!(!h || m == null))
545
545
  try {
546
- const _ = await e.markConversationRead(m, h), d = (_ == null ? void 0 : _.last_read_message_id) ?? h, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === m);
546
+ const _ = await e.markConversationRead(h, m), d = (_ == null ? void 0 : _.last_read_message_id) ?? m, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === h);
547
547
  f !== -1 && (t.conversations[f] = {
548
548
  ...t.conversations[f],
549
549
  last_read_message_id: d
@@ -552,19 +552,19 @@ function Qe(e) {
552
552
  console.error("[store] markConversationRead failed", _);
553
553
  }
554
554
  }
555
- async function H(m, h, { attachments: _, metadata: d } = {}) {
556
- var I;
557
- const f = (h || "").trim(), g = Array.isArray(_) && _.length > 0;
558
- if (!m || !f && !g) return;
559
- const y = Je(), b = de(m), S = {
555
+ async function H(h, m, { attachments: _, metadata: d } = {}) {
556
+ var L;
557
+ const f = (m || "").trim(), g = Array.isArray(_) && _.length > 0;
558
+ if (!h || !f && !g) return;
559
+ const y = Je(), b = de(h), S = {
560
560
  id: y,
561
561
  client_msg_id: y,
562
- conversation_id: m,
562
+ conversation_id: h,
563
563
  type: "content",
564
564
  text_md: f,
565
565
  author: {
566
566
  type: "user",
567
- id: ((I = t.customer) == null ? void 0 : I.external_id) || null
567
+ id: ((L = t.customer) == null ? void 0 : L.external_id) || null
568
568
  },
569
569
  created_at: b,
570
570
  // Local-only flag — UI may render dimmed until the SSE echo lands.
@@ -572,9 +572,9 @@ function Qe(e) {
572
572
  ...g ? { payload: { type: "content", attachments: _ } } : {},
573
573
  ...d && typeof d == "object" ? { metadata: d } : {}
574
574
  };
575
- $(m, S);
575
+ $(h, S);
576
576
  try {
577
- await e.postMessage(m, {
577
+ await e.postMessage(h, {
578
578
  client_msg_id: y,
579
579
  text_md: f,
580
580
  created_at: b,
@@ -582,32 +582,32 @@ function Qe(e) {
582
582
  ...d && typeof d == "object" ? { metadata: d } : {}
583
583
  });
584
584
  } catch (T) {
585
- console.error("[store] send failed", T), G(m, y, {
585
+ console.error("[store] send failed", T), G(h, y, {
586
586
  _failed: !0,
587
587
  _pending: !1
588
588
  });
589
589
  }
590
590
  }
591
- async function M(m, h, _) {
592
- m != null && (t.awaitingCallback[m] = !0);
591
+ async function M(h, m, _) {
592
+ h != null && (t.awaitingCallback[h] = !0);
593
593
  try {
594
- await e.postCallback(m, h, _);
594
+ await e.postCallback(h, m, _);
595
595
  } catch (d) {
596
- console.error("[store] callback failed", d), m != null && delete t.awaitingCallback[m];
596
+ console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
597
597
  }
598
598
  }
599
- const D = /* @__PURE__ */ new Map();
600
- async function F(m) {
601
- if (!m) return null;
602
- const h = D.get(m);
603
- if (h != null && h.url) {
604
- const _ = h.expires_at ? Date.parse(h.expires_at) : 0;
605
- if (!_ || _ - Date.now() > 6e4) return h.url;
599
+ const j = /* @__PURE__ */ new Map();
600
+ async function F(h) {
601
+ if (!h) return null;
602
+ const m = j.get(h);
603
+ if (m != null && m.url) {
604
+ const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
605
+ if (!_ || _ - Date.now() > 6e4) return m.url;
606
606
  }
607
607
  try {
608
- const _ = await e.signAttachment(m);
608
+ const _ = await e.signAttachment(h);
609
609
  if (_ != null && _.signed_url)
610
- return D.set(m, {
610
+ return j.set(h, {
611
611
  url: _.signed_url,
612
612
  expires_at: _.expires_at
613
613
  }), _.signed_url;
@@ -616,32 +616,32 @@ function Qe(e) {
616
616
  }
617
617
  return null;
618
618
  }
619
- async function q(m, { rating: h, comment: _ } = {}) {
620
- const d = t.conversations.find((y) => y.id === m), g = {
619
+ async function z(h, { rating: m, comment: _ } = {}) {
620
+ const d = t.conversations.find((y) => y.id === h), g = {
621
621
  ...(d == null ? void 0 : d.metadata) || {},
622
622
  feedback: {
623
- rating: h,
623
+ rating: m,
624
624
  comment: _ || null,
625
625
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
626
626
  }
627
627
  };
628
- await x(m, { metadata: g });
628
+ await x(h, { metadata: g });
629
629
  }
630
- function W(m) {
630
+ function W(h) {
631
631
  var _, d;
632
- const h = t.messagesByConv[m] || [];
633
- for (let f = h.length - 1; f >= 0; f--) {
634
- const g = h[f];
632
+ const m = t.messagesByConv[h] || [];
633
+ for (let f = m.length - 1; f >= 0; f--) {
634
+ const g = m[f];
635
635
  if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((d = g == null ? void 0 : g.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
636
636
  return g;
637
637
  }
638
638
  return null;
639
639
  }
640
- function Z(m) {
640
+ function Z(h) {
641
641
  var _, d, f;
642
- const h = t.messagesByConv[m] || [];
643
- for (let g = h.length - 1; g >= 0; g--) {
644
- const y = h[g];
642
+ const m = t.messagesByConv[h] || [];
643
+ for (let g = m.length - 1; g >= 0; g--) {
644
+ const y = m[g];
645
645
  if (((_ = y == null ? void 0 : y.author) == null ? void 0 : _.type) === "user" || (y == null ? void 0 : y.type) === "action" && ((d = y == null ? void 0 : y.payload) == null ? void 0 : d.state) === "pending")
646
646
  return null;
647
647
  const b = (f = y == null ? void 0 : y.metadata) == null ? void 0 : f.form;
@@ -650,33 +650,33 @@ function Qe(e) {
650
650
  }
651
651
  return null;
652
652
  }
653
- function ee(m) {
654
- const h = t.runningActionsByConv[m];
655
- if (!h) return null;
656
- const _ = Object.keys(h);
653
+ function ee(h) {
654
+ const m = t.runningActionsByConv[h];
655
+ if (!m) return null;
656
+ const _ = Object.keys(m);
657
657
  if (_.length === 0) return null;
658
658
  const d = _[0];
659
- return { id: d, payload: { name: h[d] } };
659
+ return { id: d, payload: { name: m[d] } };
660
660
  }
661
- function te(m) {
661
+ function te(h) {
662
662
  var _, d, f, g;
663
- const h = t.messagesByConv[m] || [];
664
- for (let y = h.length - 1; y >= 0; y--) {
665
- const b = h[y];
663
+ const m = t.messagesByConv[h] || [];
664
+ for (let y = m.length - 1; y >= 0; y--) {
665
+ const b = m[y];
666
666
  if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user") return [];
667
667
  if ((b == null ? void 0 : b.type) === "action" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
668
668
  return [];
669
669
  if (((f = b == null ? void 0 : b.author) == null ? void 0 : f.type) !== "agent_ia") continue;
670
670
  const S = (g = b == null ? void 0 : b.metadata) == null ? void 0 : g.suggested_replies;
671
- return Array.isArray(S) && S.length ? S.map((I) => {
672
- if (typeof I == "string") {
673
- const T = I.trim();
671
+ return Array.isArray(S) && S.length ? S.map((L) => {
672
+ if (typeof L == "string") {
673
+ const T = L.trim();
674
674
  return T ? { label: T, kind: null } : null;
675
675
  }
676
- if (I && typeof I == "object" && typeof I.label == "string") {
677
- const T = I.label.trim();
676
+ if (L && typeof L == "object" && typeof L.label == "string") {
677
+ const T = L.label.trim();
678
678
  if (!T) return null;
679
- const Ne = I.kind === "cta" || I.kind === "choice" || I.kind === "followup" ? I.kind : null;
679
+ const Ne = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
680
680
  return { label: T, kind: Ne };
681
681
  }
682
682
  return null;
@@ -684,57 +684,57 @@ function Qe(e) {
684
684
  }
685
685
  return [];
686
686
  }
687
- function $(m, h) {
687
+ function $(h, m) {
688
688
  var g;
689
- const _ = t.messagesByConv[m] || [];
689
+ const _ = t.messagesByConv[h] || [];
690
690
  let d = -1;
691
- h != null && h.client_msg_id && (d = _.findIndex(
692
- (y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id === h.client_msg_id
693
- )), d === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (d = _.findIndex((y) => ne(y == null ? void 0 : y.id, h.id)));
691
+ m != null && m.client_msg_id && (d = _.findIndex(
692
+ (y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id === m.client_msg_id
693
+ )), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = _.findIndex((y) => ne(y == null ? void 0 : y.id, m.id)));
694
694
  let f;
695
- d === -1 ? f = [..._, h].sort(ce) : (f = _.slice(), f[d] = {
695
+ d === -1 ? f = [..._, m].sort(ce) : (f = _.slice(), f[d] = {
696
696
  ..._[d],
697
- ...h,
697
+ ...m,
698
698
  _pending: !1,
699
699
  _failed: !1
700
- }), t.messagesByConv[m] = f, (h == null ? void 0 : h.type) === "action" && ((g = h == null ? void 0 : h.payload) != null && g.state) && h.payload.state !== "pending" && (h == null ? void 0 : h.id) != null && t.awaitingCallback[h.id] && delete t.awaitingCallback[h.id];
700
+ }), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((g = m == null ? void 0 : m.payload) != null && g.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
701
701
  }
702
- function ne(m, h) {
703
- return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
702
+ function ne(h, m) {
703
+ return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
704
704
  }
705
- function G(m, h, _) {
706
- const d = t.messagesByConv[m];
705
+ function G(h, m, _) {
706
+ const d = t.messagesByConv[h];
707
707
  if (!d) return;
708
- const f = d.findIndex((y) => y.id === h);
708
+ const f = d.findIndex((y) => y.id === m);
709
709
  if (f === -1) return;
710
710
  const g = d.slice();
711
- g[f] = { ...d[f], ..._ }, t.messagesByConv[m] = g;
711
+ g[f] = { ...d[f], ..._ }, t.messagesByConv[h] = g;
712
712
  }
713
- function se(m, h) {
714
- const _ = t.conversations.findIndex((f) => f.id === m);
713
+ function se(h, m) {
714
+ const _ = t.conversations.findIndex((f) => f.id === h);
715
715
  if (_ === -1) return;
716
716
  const d = t.conversations[_];
717
- if (h && (!d.last_message_at || h > d.last_message_at)) {
717
+ if (m && (!d.last_message_at || m > d.last_message_at)) {
718
718
  const f = t.conversations.slice();
719
- f[_] = { ...d, last_message_at: h }, f.sort(
719
+ f[_] = { ...d, last_message_at: m }, f.sort(
720
720
  (g, y) => (y.last_message_at || "").localeCompare(g.last_message_at || "")
721
721
  ), t.conversations = f;
722
722
  }
723
723
  }
724
- function ce(m, h) {
725
- return (m.created_at || "").localeCompare(h.created_at || "");
724
+ function ce(h, m) {
725
+ return (h.created_at || "").localeCompare(m.created_at || "");
726
726
  }
727
- function he(m) {
728
- if (!m || typeof m != "object") return null;
729
- const h = {}, _ = {};
730
- for (const [d, f] of Object.entries(m))
731
- f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (h[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
732
- return Object.keys(_).length && (h.values = _), Object.keys(h).length ? h : null;
727
+ function me(h) {
728
+ if (!h || typeof h != "object") return null;
729
+ const m = {}, _ = {};
730
+ for (const [d, f] of Object.entries(h))
731
+ f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
732
+ return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
733
733
  }
734
- function de(m) {
735
- const h = t.messagesByConv[m] || [];
734
+ function de(h) {
735
+ const m = t.messagesByConv[h] || [];
736
736
  let _ = "";
737
- for (const g of h)
737
+ for (const g of m)
738
738
  g != null && g.created_at && g.created_at > _ && (_ = g.created_at);
739
739
  const d = (/* @__PURE__ */ new Date()).toISOString();
740
740
  return !_ || d > _ ? d : new Date(Date.parse(_) + 1).toISOString();
@@ -747,13 +747,13 @@ function Qe(e) {
747
747
  createConversation: a,
748
748
  openConversation: p,
749
749
  loadMore: C,
750
- fetchSinceLast: B,
750
+ fetchSinceLast: R,
751
751
  patchConversation: x,
752
752
  markConversationRead: A,
753
753
  send: H,
754
754
  clickCallback: M,
755
755
  signAttachment: F,
756
- submitFeedback: q,
756
+ submitFeedback: z,
757
757
  getPendingApproval: W,
758
758
  getActionInFlight: ee,
759
759
  getLatestSuggestions: te,
@@ -762,7 +762,7 @@ function Qe(e) {
762
762
  setPanelOpen: e.setPanelOpen
763
763
  };
764
764
  }
765
- const P = {
765
+ const D = {
766
766
  w: "#ffffff",
767
767
  g50: "#F9F9F7",
768
768
  g100: "#F2F1EE",
@@ -792,7 +792,7 @@ function ve(e = "") {
792
792
  function ye(e = "") {
793
793
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
794
794
  }
795
- function Ie(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
795
+ function Le(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
796
796
  return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
797
797
  }
798
798
  const Xe = `
@@ -801,21 +801,21 @@ const Xe = `
801
801
  .wm-root {
802
802
  --wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
803
803
  --wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
804
- --wm-w: ${P.w};
805
- --wm-g50: ${P.g50};
806
- --wm-g100: ${P.g100};
807
- --wm-g150: ${P.g150};
808
- --wm-g200: ${P.g200};
809
- --wm-g300: ${P.g300};
810
- --wm-g400: ${P.g400};
811
- --wm-g500: ${P.g500};
812
- --wm-g700: ${P.g700};
813
- --wm-g900: ${P.g900};
814
- --wm-a: ${P.accent};
815
- --wm-al: ${P.accentLight};
816
- --wm-green: ${P.green};
817
- --wm-red: ${P.red};
818
- --wm-redBg: ${P.redBg};
804
+ --wm-w: ${D.w};
805
+ --wm-g50: ${D.g50};
806
+ --wm-g100: ${D.g100};
807
+ --wm-g150: ${D.g150};
808
+ --wm-g200: ${D.g200};
809
+ --wm-g300: ${D.g300};
810
+ --wm-g400: ${D.g400};
811
+ --wm-g500: ${D.g500};
812
+ --wm-g700: ${D.g700};
813
+ --wm-g900: ${D.g900};
814
+ --wm-a: ${D.accent};
815
+ --wm-al: ${D.accentLight};
816
+ --wm-green: ${D.green};
817
+ --wm-red: ${D.red};
818
+ --wm-redBg: ${D.redBg};
819
819
  --wm-sh1: 0 1px 3px rgba(0,0,0,.06);
820
820
  --wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
821
821
  --wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
@@ -1091,7 +1091,7 @@ function we(e) {
1091
1091
  function oe(e) {
1092
1092
  return Ce[we(e)] || Ce[ie];
1093
1093
  }
1094
- function j(e) {
1094
+ function P(e) {
1095
1095
  const t = we(e), n = ge[t] || ge[ie], i = ge[ie];
1096
1096
  return function(s, a) {
1097
1097
  let l = n[s];
@@ -1106,17 +1106,17 @@ function Ae(e, t) {
1106
1106
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1107
1107
  return (n == null ? void 0 : n.label) || t;
1108
1108
  }
1109
- function Ee(e, t, n) {
1109
+ function Ie(e, t, n) {
1110
1110
  return Array.isArray(t) ? t.map((i) => Ae(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ae(e, String(t));
1111
1111
  }
1112
- function tt(e, t, n = j()) {
1112
+ function tt(e, t, n = P()) {
1113
1113
  if (!e || !t) return "";
1114
1114
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1115
1115
  for (const s of i) {
1116
1116
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1117
1117
  const a = t[s.key];
1118
1118
  if (a == null || a === "") continue;
1119
- const l = Ee(s, a, n);
1119
+ const l = Ie(s, a, n);
1120
1120
  l && r.push(`${s.label} :
1121
1121
  ${l}`);
1122
1122
  }
@@ -1124,13 +1124,13 @@ ${l}`);
1124
1124
 
1125
1125
  `);
1126
1126
  }
1127
- function nt(e, t, n = j()) {
1127
+ function nt(e, t, n = P()) {
1128
1128
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1129
1129
  for (const s of r) {
1130
1130
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1131
1131
  const a = t == null ? void 0 : t[s.key];
1132
1132
  if (a == null || a === "") continue;
1133
- const l = Ee(s, a, n);
1133
+ const l = Ie(s, a, n);
1134
1134
  if (!l) continue;
1135
1135
  const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1136
1136
  `));
@@ -1194,7 +1194,7 @@ function it(e, t, n, i) {
1194
1194
  return r.join(`
1195
1195
  `);
1196
1196
  }
1197
- function at(e, t, n = j(), i) {
1197
+ function at(e, t, n = P(), i) {
1198
1198
  if (!e) return;
1199
1199
  const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1200
1200
  try {
@@ -1362,7 +1362,7 @@ const ot = {
1362
1362
  }
1363
1363
  }
1364
1364
  }
1365
- }, lt = 450, ct = 50, dt = 900, ut = 12e3, mt = 300, ht = {
1365
+ }, lt = 450, ct = 50, dt = 900, ut = 12e3, ht = 300, mt = {
1366
1366
  data() {
1367
1367
  return {
1368
1368
  // Map: messageId → ms timestamp once shown.
@@ -1475,7 +1475,7 @@ const ot = {
1475
1475
  Math.max(dt, i * ct)
1476
1476
  ), a = Math.max(
1477
1477
  n + lt,
1478
- this.nextRevealAt + mt
1478
+ this.nextRevealAt + ht
1479
1479
  ) + r;
1480
1480
  this.nextRevealAt = a;
1481
1481
  const l = Math.max(0, a - n), p = e.id, C = setTimeout(() => {
@@ -1619,7 +1619,7 @@ function pt(e) {
1619
1619
  }
1620
1620
  return null;
1621
1621
  }
1622
- const R = (e, t) => {
1622
+ const B = (e, t) => {
1623
1623
  const n = e.__vccOpts || e;
1624
1624
  for (const [i, r] of t)
1625
1625
  n[i] = r;
@@ -1648,7 +1648,7 @@ const R = (e, t) => {
1648
1648
  function wt(e, t, n, i, r, s) {
1649
1649
  return c(), u("div", {
1650
1650
  class: O(["wm-huav", { "wm-huav--tail": n.tail }]),
1651
- style: z({
1651
+ style: q({
1652
1652
  width: n.size + "px",
1653
1653
  height: n.size + "px",
1654
1654
  "--wm-avr": Math.round(n.size * 0.32) + "px",
@@ -1661,17 +1661,17 @@ function wt(e, t, n, i, r, s) {
1661
1661
  alt: n.name || ""
1662
1662
  }, null, 8, yt)) : (c(), u("span", {
1663
1663
  key: 1,
1664
- style: z({ fontSize: n.size * 0.36 + "px" })
1664
+ style: q({ fontSize: n.size * 0.36 + "px" })
1665
1665
  }, v(s.initials), 5))
1666
1666
  ], 6);
1667
1667
  }
1668
- const Le = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1668
+ const Ee = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1669
1669
  name: "WmLauncher",
1670
- components: { HumanAvatar: Le },
1670
+ components: { HumanAvatar: Ee },
1671
1671
  inject: {
1672
1672
  // Translator shared by the Messenger shell; French fallback when
1673
1673
  // the component is used standalone.
1674
- t: { default: () => j() }
1674
+ t: { default: () => P() }
1675
1675
  },
1676
1676
  props: {
1677
1677
  // Nombre de conversations non lues — pilote la pastille.
@@ -1691,20 +1691,20 @@ const Le = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
1691
1691
  return this.peeks.slice(0, bt).reverse();
1692
1692
  }
1693
1693
  }
1694
- }, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, It = { class: "wm-peek__name" }, Et = { class: "wm-peek__action" }, Lt = { class: "wm-peek__text" }, Bt = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1694
+ }, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, Lt = { class: "wm-peek__name" }, It = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, Rt = ["onClick"], Bt = ["aria-label"], Nt = ["aria-label"];
1695
1695
  function Ft(e, t, n, i, r, s) {
1696
- const a = L("HumanAvatar");
1696
+ const a = E("HumanAvatar");
1697
1697
  return c(), u("div", Ct, [
1698
1698
  V(Ue, { name: "wm-peek" }, {
1699
- default: je(() => [
1699
+ default: Pe(() => [
1700
1700
  s.visiblePeeks.length ? (c(), u("div", {
1701
1701
  key: 0,
1702
1702
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1703
1703
  }, [
1704
- (c(!0), u(E, null, U(s.visiblePeeks, (l, p) => (c(), u("div", {
1704
+ (c(!0), u(I, null, U(s.visiblePeeks, (l, p) => (c(), u("div", {
1705
1705
  key: l.convId,
1706
1706
  class: "wm-peek",
1707
- style: z({
1707
+ style: q({
1708
1708
  "--depth": s.visiblePeeks.length - 1 - p,
1709
1709
  zIndex: p + 1
1710
1710
  }),
@@ -1753,16 +1753,16 @@ function Ft(e, t, n, i, r, s) {
1753
1753
  ]),
1754
1754
  o("div", xt, [
1755
1755
  o("div", Ot, [
1756
- o("span", It, v(l.senderName || s.t("common.agent")), 1),
1757
- o("span", Et, v(s.t("launcher.repliedToYou")), 1)
1756
+ o("span", Lt, v(l.senderName || s.t("common.agent")), 1),
1757
+ o("span", It, v(s.t("launcher.repliedToYou")), 1)
1758
1758
  ]),
1759
- o("p", Lt, v(l.preview), 1)
1759
+ o("p", Et, v(l.preview), 1)
1760
1760
  ]),
1761
1761
  o("button", {
1762
1762
  type: "button",
1763
1763
  class: "wm-peek__open",
1764
1764
  onClick: Y((C) => e.$emit("open", l.convId), ["stop"])
1765
- }, v(s.t("common.open")), 9, Bt)
1765
+ }, v(s.t("common.open")), 9, Rt)
1766
1766
  ], 44, At))), 128))
1767
1767
  ], 2)) : w("", !0)
1768
1768
  ]),
@@ -1796,10 +1796,10 @@ function Ft(e, t, n, i, r, s) {
1796
1796
  count: n.unreadCount
1797
1797
  })
1798
1798
  }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Nt)) : w("", !0)
1799
- ], 8, Rt)
1799
+ ], 8, Bt)
1800
1800
  ]);
1801
1801
  }
1802
- const Ut = /* @__PURE__ */ R(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), jt = {
1802
+ const Ut = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Pt = {
1803
1803
  name: "WmAIAvatar",
1804
1804
  props: {
1805
1805
  size: { type: Number, default: 26 },
@@ -1828,27 +1828,27 @@ const Ut = /* @__PURE__ */ R(kt, [["render", Ft], ["__scopeId", "data-v-5193a529
1828
1828
  return ve(this.name);
1829
1829
  }
1830
1830
  }
1831
- }, Dt = {
1831
+ }, jt = {
1832
1832
  key: 0,
1833
1833
  class: "wm-aiav__pulse"
1834
- }, Pt = ["src", "alt"], qt = ["width", "height"];
1835
- function zt(e, t, n, i, r, s) {
1834
+ }, Dt = ["src", "alt"], zt = ["width", "height"];
1835
+ function qt(e, t, n, i, r, s) {
1836
1836
  return c(), u("div", {
1837
1837
  class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1838
- style: z({
1838
+ style: q({
1839
1839
  width: n.size + "px",
1840
1840
  height: n.size + "px",
1841
1841
  "--wm-avr": n.size * 0.32 + "px"
1842
1842
  })
1843
1843
  }, [
1844
- n.pulse ? (c(), u("div", Dt)) : w("", !0),
1844
+ n.pulse ? (c(), u("div", jt)) : w("", !0),
1845
1845
  o("div", {
1846
1846
  class: O(["wm-aiav__inner", {
1847
1847
  "wm-aiav__inner--glow": n.pulse,
1848
1848
  "wm-aiav__inner--img": !!n.imageUrl,
1849
1849
  "wm-aiav__inner--initials": !n.imageUrl && !!s.initials
1850
1850
  }]),
1851
- style: z(
1851
+ style: q(
1852
1852
  !n.imageUrl && s.initials ? { background: s.bgColor } : null
1853
1853
  )
1854
1854
  }, [
@@ -1856,9 +1856,9 @@ function zt(e, t, n, i, r, s) {
1856
1856
  key: 0,
1857
1857
  src: n.imageUrl,
1858
1858
  alt: n.name || ""
1859
- }, null, 8, Pt)) : s.initials ? (c(), u("span", {
1859
+ }, null, 8, Dt)) : s.initials ? (c(), u("span", {
1860
1860
  key: 1,
1861
- style: z({ fontSize: n.size * 0.36 + "px" })
1861
+ style: q({ fontSize: n.size * 0.36 + "px" })
1862
1862
  }, v(s.initials), 5)) : (c(), u("svg", {
1863
1863
  key: 2,
1864
1864
  width: n.size * 0.5,
@@ -1886,11 +1886,11 @@ function zt(e, t, n, i, r, s) {
1886
1886
  fill: "white",
1887
1887
  opacity: "0.38"
1888
1888
  }, null, -1)
1889
- ])], 8, qt))
1889
+ ])], 8, zt))
1890
1890
  ], 6)
1891
1891
  ], 6);
1892
1892
  }
1893
- const le = /* @__PURE__ */ R(jt, [["render", zt], ["__scopeId", "data-v-6f7f685d"]]), Ht = {
1893
+ const le = /* @__PURE__ */ B(Pt, [["render", qt], ["__scopeId", "data-v-6f7f685d"]]), Ht = {
1894
1894
  name: "WmTeamAvatars",
1895
1895
  props: {
1896
1896
  members: { type: Array, default: () => [] },
@@ -1923,12 +1923,12 @@ function Gt(e, t, n, i, r, s) {
1923
1923
  return s.visible ? (c(), u("div", $t, [
1924
1924
  o("div", {
1925
1925
  class: "wm-team__stack",
1926
- style: z({ width: s.stackWidth + "px" })
1926
+ style: q({ width: s.stackWidth + "px" })
1927
1927
  }, [
1928
- (c(!0), u(E, null, U(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1928
+ (c(!0), u(I, null, U(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1929
1929
  key: l,
1930
1930
  class: "wm-team__pill",
1931
- style: z({
1931
+ style: q({
1932
1932
  left: l * 13 + "px",
1933
1933
  zIndex: 3 - l,
1934
1934
  background: s.colorFor(a)
@@ -1944,13 +1944,13 @@ function Gt(e, t, n, i, r, s) {
1944
1944
  n.responseLabel ? (c(), u("span", Wt, v(n.responseLabel), 1)) : w("", !0)
1945
1945
  ])) : w("", !0);
1946
1946
  }
1947
- const Yt = /* @__PURE__ */ R(Ht, [["render", Gt], ["__scopeId", "data-v-e49a9063"]]), Jt = {
1947
+ const Yt = /* @__PURE__ */ B(Ht, [["render", Gt], ["__scopeId", "data-v-e49a9063"]]), Jt = {
1948
1948
  name: "WmHeader",
1949
1949
  components: { AIAvatar: le, TeamAvatars: Yt },
1950
1950
  inject: {
1951
1951
  // Translator shared by the Messenger shell. Falls back to a French
1952
1952
  // translator when the component is used standalone (no provider).
1953
- t: { default: () => j() }
1953
+ t: { default: () => P() }
1954
1954
  },
1955
1955
  props: {
1956
1956
  title: { type: String, default: "Nouvelle conversation" },
@@ -1991,7 +1991,7 @@ const Yt = /* @__PURE__ */ R(Ht, [["render", Gt], ["__scopeId", "data-v-e49a9063
1991
1991
  class: "wm-header__fill"
1992
1992
  }, rn = { class: "wm-header__actions" }, an = ["aria-label", "title"], on = ["aria-label", "title"];
1993
1993
  function ln(e, t, n, i, r, s) {
1994
- const a = L("AIAvatar"), l = L("TeamAvatars");
1994
+ const a = E("AIAvatar"), l = E("TeamAvatars");
1995
1995
  return c(), u("div", Qt, [
1996
1996
  n.showBack ? (c(), u("button", {
1997
1997
  key: 0,
@@ -2014,7 +2014,7 @@ function ln(e, t, n, i, r, s) {
2014
2014
  o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2015
2015
  ], -1)
2016
2016
  ])], 8, Xt)) : (c(), u("div", Zt)),
2017
- n.showIdentity ? (c(), u(E, { key: 2 }, [
2017
+ n.showIdentity ? (c(), u(I, { key: 2 }, [
2018
2018
  o("div", en, [
2019
2019
  V(a, {
2020
2020
  size: 30,
@@ -2089,8 +2089,8 @@ function ln(e, t, n, i, r, s) {
2089
2089
  ])
2090
2090
  ]);
2091
2091
  }
2092
- const cn = /* @__PURE__ */ R(Jt, [["render", ln], ["__scopeId", "data-v-925c9e94"]]);
2093
- function Be(e) {
2092
+ const cn = /* @__PURE__ */ B(Jt, [["render", ln], ["__scopeId", "data-v-925c9e94"]]);
2093
+ function Re(e) {
2094
2094
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2095
2095
  }
2096
2096
  function dn(e) {
@@ -2108,11 +2108,11 @@ function re(e) {
2108
2108
  function un(e) {
2109
2109
  if (!e) return "";
2110
2110
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2111
- return re(Be(t));
2111
+ return re(Re(t));
2112
2112
  }
2113
- function mn(e) {
2113
+ function hn(e) {
2114
2114
  if (!e) return "";
2115
- const t = Be(e).split(`
2115
+ const t = Re(e).split(`
2116
2116
  `), n = [];
2117
2117
  let i = 0;
2118
2118
  for (; i < t.length; ) {
@@ -2151,10 +2151,10 @@ function mn(e) {
2151
2151
  if (!A) break;
2152
2152
  k.push(A[1]), i++;
2153
2153
  }
2154
- const x = k.map((A) => `<li>${re(A)}</li>`).join(""), B = C !== 1 ? ` start="${C}"` : "";
2154
+ const x = k.map((A) => `<li>${re(A)}</li>`).join(""), R = C !== 1 ? ` start="${C}"` : "";
2155
2155
  n.push({
2156
2156
  type: "block",
2157
- html: `<ol class="wm-md-ol"${B}>${x}</ol>`
2157
+ html: `<ol class="wm-md-ol"${R}>${x}</ol>`
2158
2158
  });
2159
2159
  continue;
2160
2160
  }
@@ -2185,13 +2185,13 @@ const Te = {
2185
2185
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
2186
2186
  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",
2187
2187
  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"
2188
- }, hn = {
2188
+ }, mn = {
2189
2189
  name: "WmOnboarding",
2190
2190
  components: { AIAvatar: le },
2191
2191
  inject: {
2192
2192
  // Translator + resolved-language getter shared by the Messenger
2193
2193
  // shell. Fall back to French wording when used standalone.
2194
- t: { default: () => j() },
2194
+ t: { default: () => P() },
2195
2195
  wmLocale: { default: () => () => "fr" }
2196
2196
  },
2197
2197
  props: {
@@ -2270,18 +2270,18 @@ const Te = {
2270
2270
  }, Mn = ["d"], Tn = { class: "wm-onb__card-body" }, xn = { class: "wm-onb__card-title" }, On = {
2271
2271
  key: 0,
2272
2272
  class: "wm-onb__card-sub"
2273
- }, In = {
2273
+ }, Ln = {
2274
2274
  key: 1,
2275
2275
  class: "wm-onb__section"
2276
- }, En = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, Bn = ["placeholder", "aria-label"], Rn = { class: "wm-onb__list" }, Nn = ["onClick"], Fn = ["aria-label"], Un = { class: "wm-onb__thread-body" }, jn = { class: "wm-onb__thread-title" }, Dn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, qn = {
2276
+ }, In = { class: "wm-onb__section-title" }, En = { class: "wm-onb__search" }, Rn = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, Nn = ["onClick"], Fn = ["aria-label"], Un = { class: "wm-onb__thread-body" }, Pn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Dn = { class: "wm-onb__thread-meta" }, zn = {
2277
2277
  key: 0,
2278
2278
  class: "wm-onb__thread-time"
2279
- }, zn = {
2279
+ }, qn = {
2280
2280
  key: 0,
2281
2281
  class: "wm-onb__empty"
2282
2282
  };
2283
2283
  function Hn(e, t, n, i, r, s) {
2284
- const a = L("AIAvatar");
2284
+ const a = E("AIAvatar");
2285
2285
  return c(), u("div", fn, [
2286
2286
  o("div", _n, [
2287
2287
  t[2] || (t[2] = o("svg", {
@@ -2357,7 +2357,7 @@ function Hn(e, t, n, i, r, s) {
2357
2357
  o("div", {
2358
2358
  class: O(s.quickLinksLayout)
2359
2359
  }, [
2360
- (c(!0), u(E, null, U(n.quickLinks, (l, p) => (c(), u("button", {
2360
+ (c(!0), u(I, null, U(n.quickLinks, (l, p) => (c(), u("button", {
2361
2361
  key: p,
2362
2362
  type: "button",
2363
2363
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
@@ -2377,9 +2377,9 @@ function Hn(e, t, n, i, r, s) {
2377
2377
  ], 10, Cn))), 128))
2378
2378
  ], 2)
2379
2379
  ])) : w("", !0),
2380
- n.openThreads.length ? (c(), u("div", In, [
2381
- o("div", En, v(s.t("onboarding.recentConversations")), 1),
2382
- o("div", Ln, [
2380
+ n.openThreads.length ? (c(), u("div", Ln, [
2381
+ o("div", In, v(s.t("onboarding.recentConversations")), 1),
2382
+ o("div", En, [
2383
2383
  t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
2384
2384
  o("svg", {
2385
2385
  width: "12",
@@ -2400,12 +2400,12 @@ function Hn(e, t, n, i, r, s) {
2400
2400
  type: "text",
2401
2401
  placeholder: s.t("onboarding.search"),
2402
2402
  "aria-label": s.t("onboarding.search")
2403
- }, null, 8, Bn), [
2403
+ }, null, 8, Rn), [
2404
2404
  [X, r.query]
2405
2405
  ])
2406
2406
  ]),
2407
- o("div", Rn, [
2408
- (c(!0), u(E, null, U(s.filteredThreads, (l) => (c(), u("button", {
2407
+ o("div", Bn, [
2408
+ (c(!0), u(I, null, U(s.filteredThreads, (l) => (c(), u("button", {
2409
2409
  key: l.id,
2410
2410
  type: "button",
2411
2411
  class: "wm-onb__thread",
@@ -2434,14 +2434,14 @@ function Hn(e, t, n, i, r, s) {
2434
2434
  }, null, 8, Fn)) : w("", !0)
2435
2435
  ], 2),
2436
2436
  o("span", Un, [
2437
- o("span", jn, v(l.title), 1),
2437
+ o("span", Pn, v(l.title), 1),
2438
2438
  o("span", {
2439
2439
  class: "wm-onb__thread-preview",
2440
2440
  innerHTML: s.renderPreview(l.preview)
2441
- }, null, 8, Dn)
2441
+ }, null, 8, jn)
2442
2442
  ]),
2443
- o("span", Pn, [
2444
- s.formatTs(l._ts) ? (c(), u("span", qn, v(s.formatTs(l._ts)), 1)) : w("", !0),
2443
+ o("span", Dn, [
2444
+ s.formatTs(l._ts) ? (c(), u("span", zn, v(s.formatTs(l._ts)), 1)) : w("", !0),
2445
2445
  t[6] || (t[6] = o("svg", {
2446
2446
  width: "14",
2447
2447
  height: "14",
@@ -2458,12 +2458,12 @@ function Hn(e, t, n, i, r, s) {
2458
2458
  ], -1))
2459
2459
  ])
2460
2460
  ], 8, Nn))), 128)),
2461
- s.filteredThreads.length ? w("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2461
+ s.filteredThreads.length ? w("", !0) : (c(), u("div", qn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2462
2462
  ])
2463
2463
  ])) : w("", !0)
2464
2464
  ]);
2465
2465
  }
2466
- const $n = /* @__PURE__ */ R(hn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
2466
+ const $n = /* @__PURE__ */ B(mn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
2467
2467
  function Vn(e) {
2468
2468
  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();
2469
2469
  }
@@ -2558,7 +2558,7 @@ function ts(e, t, n, i, r, s) {
2558
2558
  ]),
2559
2559
  o("span", Xn, [
2560
2560
  o("span", Zn, v(n.label), 1),
2561
- s.detailText ? (c(), u(E, { key: 0 }, [
2561
+ s.detailText ? (c(), u(I, { key: 0 }, [
2562
2562
  t[4] || (t[4] = o("span", {
2563
2563
  class: "wm-result__sep",
2564
2564
  "aria-hidden": "true"
@@ -2568,12 +2568,12 @@ function ts(e, t, n, i, r, s) {
2568
2568
  ])
2569
2569
  ], 2);
2570
2570
  }
2571
- const ns = /* @__PURE__ */ R(Kn, [["render", ts], ["__scopeId", "data-v-7284acd0"]]), ss = {
2571
+ const ns = /* @__PURE__ */ B(Kn, [["render", ts], ["__scopeId", "data-v-7284acd0"]]), ss = {
2572
2572
  name: "WmArtifactFormResponse",
2573
2573
  inject: {
2574
2574
  // Translator shared by the Messenger shell; French fallback when
2575
2575
  // the component is used standalone.
2576
- t: { default: () => j() }
2576
+ t: { default: () => P() }
2577
2577
  },
2578
2578
  props: {
2579
2579
  data: { type: Object, required: !0 }
@@ -2607,7 +2607,7 @@ function ds(e, t, n, i, r, s) {
2607
2607
  ])
2608
2608
  ]),
2609
2609
  o("div", ls, [
2610
- (c(!0), u(E, null, U(s.fields, (a, l) => (c(), u("div", {
2610
+ (c(!0), u(I, null, U(s.fields, (a, l) => (c(), u("div", {
2611
2611
  key: l,
2612
2612
  class: "wm-art__field"
2613
2613
  }, [
@@ -2622,7 +2622,7 @@ function ds(e, t, n, i, r, s) {
2622
2622
  ])
2623
2623
  ]);
2624
2624
  }
2625
- const us = /* @__PURE__ */ R(ss, [["render", ds], ["__scopeId", "data-v-713aecf1"]]), ms = {
2625
+ const us = /* @__PURE__ */ B(ss, [["render", ds], ["__scopeId", "data-v-713aecf1"]]), hs = {
2626
2626
  name: "WmArtifactInfoCard",
2627
2627
  props: {
2628
2628
  data: { type: Object, required: !0 }
@@ -2637,7 +2637,7 @@ const us = /* @__PURE__ */ R(ss, [["render", ds], ["__scopeId", "data-v-713aecf1
2637
2637
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2638
2638
  }
2639
2639
  }
2640
- }, hs = { class: "wm-art wm-art--infoCard" }, fs = {
2640
+ }, ms = { class: "wm-art wm-art--infoCard" }, fs = {
2641
2641
  key: 0,
2642
2642
  class: "wm-art__image"
2643
2643
  }, _s = ["src", "alt"], gs = { class: "wm-art__head" }, ps = { class: "wm-art__headMain" }, vs = { class: "wm-art__title" }, ys = {
@@ -2651,7 +2651,7 @@ const us = /* @__PURE__ */ R(ss, [["render", ds], ["__scopeId", "data-v-713aecf1
2651
2651
  class: "wm-art__text"
2652
2652
  }, ks = { class: "wm-art__fieldLabel" };
2653
2653
  function Cs(e, t, n, i, r, s) {
2654
- return c(), u("div", hs, [
2654
+ return c(), u("div", ms, [
2655
2655
  n.data.image_url ? (c(), u("figure", fs, [
2656
2656
  o("img", {
2657
2657
  src: n.data.image_url,
@@ -2674,7 +2674,7 @@ function Cs(e, t, n, i, r, s) {
2674
2674
  ]),
2675
2675
  s.hasBody ? (c(), u("div", ws, [
2676
2676
  n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : w("", !0),
2677
- s.fields.length ? (c(!0), u(E, { key: 1 }, U(s.fields, (a, l) => (c(), u("div", {
2677
+ s.fields.length ? (c(!0), u(I, { key: 1 }, U(s.fields, (a, l) => (c(), u("div", {
2678
2678
  key: l,
2679
2679
  class: "wm-art__field"
2680
2680
  }, [
@@ -2689,7 +2689,7 @@ function Cs(e, t, n, i, r, s) {
2689
2689
  ])) : w("", !0)
2690
2690
  ]);
2691
2691
  }
2692
- const As = /* @__PURE__ */ R(ms, [["render", Cs], ["__scopeId", "data-v-7eae0e4a"]]);
2692
+ const As = /* @__PURE__ */ B(hs, [["render", Cs], ["__scopeId", "data-v-7eae0e4a"]]);
2693
2693
  function Ss(e, t, n) {
2694
2694
  if (!e) return "";
2695
2695
  const i = new Date(e);
@@ -2709,7 +2709,7 @@ const Ms = {
2709
2709
  inject: {
2710
2710
  // Translator + resolved-language getter shared by the Messenger
2711
2711
  // shell. Fall back to French wording when used standalone.
2712
- t: { default: () => j() },
2712
+ t: { default: () => P() },
2713
2713
  wmLocale: { default: () => () => "fr" }
2714
2714
  },
2715
2715
  props: {
@@ -2750,13 +2750,13 @@ const Ms = {
2750
2750
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2751
2751
  }
2752
2752
  }
2753
- }, Ts = { class: "wm-art wm-art--ticket" }, xs = { class: "wm-art__head wm-tk__head" }, Os = { class: "wm-art__title wm-tk__title" }, Is = { class: "wm-tk__sub" }, Es = { class: "wm-tk__ref" }, Ls = {
2753
+ }, Ts = { class: "wm-art wm-art--ticket" }, xs = { class: "wm-art__head wm-tk__head" }, Os = { class: "wm-art__title wm-tk__title" }, Ls = { class: "wm-tk__sub" }, Is = { class: "wm-tk__ref" }, Es = {
2754
2754
  key: 0,
2755
2755
  class: "wm-tk__text"
2756
- }, Bs = {
2756
+ }, Rs = {
2757
2757
  key: 0,
2758
2758
  class: "wm-art__body"
2759
- }, Rs = { class: "wm-art__fieldLabel" }, Ns = ["data-level"], Fs = {
2759
+ }, Bs = { class: "wm-art__fieldLabel" }, Ns = ["data-level"], Fs = {
2760
2760
  key: 1,
2761
2761
  class: "wm-tk__date",
2762
2762
  width: "12",
@@ -2772,12 +2772,12 @@ const Ms = {
2772
2772
  key: 1,
2773
2773
  class: "wm-art__footer wm-tk__footer"
2774
2774
  };
2775
- function js(e, t, n, i, r, s) {
2775
+ function Ps(e, t, n, i, r, s) {
2776
2776
  return c(), u("div", Ts, [
2777
2777
  o("div", xs, [
2778
2778
  o("div", Os, v(n.data.title), 1),
2779
- o("div", Is, [
2780
- o("div", Es, [
2779
+ o("div", Ls, [
2780
+ o("div", Is, [
2781
2781
  t[0] || (t[0] = o("svg", {
2782
2782
  width: "11",
2783
2783
  height: "11",
@@ -2808,14 +2808,14 @@ function js(e, t, n, i, r, s) {
2808
2808
  pe(" " + v(n.data.status.label), 1)
2809
2809
  ], 2)
2810
2810
  ]),
2811
- n.data.body ? (c(), u("div", Ls, v(n.data.body), 1)) : w("", !0)
2811
+ n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : w("", !0)
2812
2812
  ]),
2813
- s.fields.length ? (c(), u("div", Bs, [
2814
- (c(!0), u(E, null, U(s.fields, (a, l) => (c(), u("div", {
2813
+ s.fields.length ? (c(), u("div", Rs, [
2814
+ (c(!0), u(I, null, U(s.fields, (a, l) => (c(), u("div", {
2815
2815
  key: l,
2816
2816
  class: "wm-art__field"
2817
2817
  }, [
2818
- o("div", Rs, v(a.label), 1),
2818
+ o("div", Bs, v(a.label), 1),
2819
2819
  o("div", {
2820
2820
  class: O([
2821
2821
  "wm-art__fieldValue",
@@ -2891,11 +2891,11 @@ function js(e, t, n, i, r, s) {
2891
2891
  ])) : w("", !0)
2892
2892
  ]);
2893
2893
  }
2894
- const Ds = /* @__PURE__ */ R(Ms, [["render", js], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2894
+ const js = /* @__PURE__ */ B(Ms, [["render", Ps], ["__scopeId", "data-v-5f30c914"]]), Ds = {
2895
2895
  form_response: us,
2896
2896
  info_card: As,
2897
- ticket: Ds
2898
- }, qs = {
2897
+ ticket: js
2898
+ }, zs = {
2899
2899
  name: "WmArtifactRenderer",
2900
2900
  props: {
2901
2901
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -2906,23 +2906,23 @@ const Ds = /* @__PURE__ */ R(Ms, [["render", js], ["__scopeId", "data-v-5f30c914
2906
2906
  component() {
2907
2907
  var t;
2908
2908
  const e = (t = this.artifact) == null ? void 0 : t.kind;
2909
- return e && Ps[e] || null;
2909
+ return e && Ds[e] || null;
2910
2910
  }
2911
2911
  }
2912
2912
  };
2913
- function zs(e, t, n, i, r, s) {
2914
- return s.component ? (c(), N(De(s.component), {
2913
+ function qs(e, t, n, i, r, s) {
2914
+ return s.component ? (c(), N(je(s.component), {
2915
2915
  key: 0,
2916
2916
  data: n.artifact.data
2917
2917
  }, null, 8, ["data"])) : w("", !0);
2918
2918
  }
2919
- const Hs = /* @__PURE__ */ R(qs, [["render", zs]]), $s = {
2919
+ const Hs = /* @__PURE__ */ B(zs, [["render", qs]]), $s = {
2920
2920
  name: "WmAttachmentPreview",
2921
2921
  inject: {
2922
2922
  signAttachmentFn: { default: null },
2923
2923
  // Translator shared by the Messenger shell; French fallback when
2924
2924
  // the component is used standalone.
2925
- t: { default: () => j() }
2925
+ t: { default: () => P() }
2926
2926
  },
2927
2927
  props: {
2928
2928
  attachment: { type: Object, required: !0 }
@@ -3051,7 +3051,7 @@ function er(e, t, n, i, r, s) {
3051
3051
  ], 8, Ys))
3052
3052
  ], 2);
3053
3053
  }
3054
- const tr = /* @__PURE__ */ R($s, [["render", er], ["__scopeId", "data-v-0c877a62"]]), nr = {
3054
+ const tr = /* @__PURE__ */ B($s, [["render", er], ["__scopeId", "data-v-0c877a62"]]), nr = {
3055
3055
  name: "WmBubble",
3056
3056
  props: {
3057
3057
  role: { type: String, default: "ai" },
@@ -3060,7 +3060,7 @@ const tr = /* @__PURE__ */ R($s, [["render", er], ["__scopeId", "data-v-0c877a62
3060
3060
  },
3061
3061
  computed: {
3062
3062
  rendered() {
3063
- return mn(this.text);
3063
+ return hn(this.text);
3064
3064
  }
3065
3065
  }
3066
3066
  }, sr = ["innerHTML"];
@@ -3068,12 +3068,12 @@ function rr(e, t, n, i, r, s) {
3068
3068
  return c(), u("div", {
3069
3069
  class: O(["wm-bubble", "wm-bubble--" + n.role])
3070
3070
  }, [
3071
- Pe(e.$slots, "default", {}, () => [
3071
+ De(e.$slots, "default", {}, () => [
3072
3072
  o("span", { innerHTML: s.rendered }, null, 8, sr)
3073
3073
  ], !0)
3074
3074
  ], 2);
3075
3075
  }
3076
- const ir = /* @__PURE__ */ R(nr, [["render", rr], ["__scopeId", "data-v-7ab13147"]]), ar = { name: "WmTyping" }, or = { class: "wm-typing" };
3076
+ const ir = /* @__PURE__ */ B(nr, [["render", rr], ["__scopeId", "data-v-7ab13147"]]), ar = { name: "WmTyping" }, or = { class: "wm-typing" };
3077
3077
  function lr(e, t, n, i, r, s) {
3078
3078
  return c(), u("div", or, [...t[0] || (t[0] = [
3079
3079
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
@@ -3081,7 +3081,7 @@ function lr(e, t, n, i, r, s) {
3081
3081
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3082
3082
  ])]);
3083
3083
  }
3084
- const cr = /* @__PURE__ */ R(ar, [["render", lr], ["__scopeId", "data-v-df2447fd"]]);
3084
+ const cr = /* @__PURE__ */ B(ar, [["render", lr], ["__scopeId", "data-v-df2447fd"]]);
3085
3085
  function Q(e) {
3086
3086
  return e ? e.client_msg_id || e.id : "";
3087
3087
  }
@@ -3092,11 +3092,11 @@ const dr = {
3092
3092
  resolved: "system.resolved",
3093
3093
  reopened: "system.reopened",
3094
3094
  idle: "system.idle"
3095
- }, ur = 80, mr = 200, hr = {
3095
+ }, ur = 80, hr = 200, mr = {
3096
3096
  name: "WmMessageList",
3097
3097
  components: {
3098
3098
  AIAvatar: le,
3099
- HumanAvatar: Le,
3099
+ HumanAvatar: Ee,
3100
3100
  Bubble: ir,
3101
3101
  Typing: cr,
3102
3102
  ActionResult: ns,
@@ -3106,7 +3106,7 @@ const dr = {
3106
3106
  inject: {
3107
3107
  // Translator + resolved-language getter shared by the Messenger
3108
3108
  // shell. Fall back to French wording when used standalone.
3109
- t: { default: () => j() },
3109
+ t: { default: () => P() },
3110
3110
  wmLocale: { default: () => () => "fr" }
3111
3111
  },
3112
3112
  props: {
@@ -3285,7 +3285,7 @@ const dr = {
3285
3285
  },
3286
3286
  onScroll() {
3287
3287
  const e = this.$refs.scrollEl;
3288
- e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <= mr && (this._pendingLoadMore = !0, this.$emit("load-more")));
3288
+ e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <= hr && (this._pendingLoadMore = !0, this.$emit("load-more")));
3289
3289
  },
3290
3290
  // Capture pre-patch scroll state and restore it on the next tick.
3291
3291
  //
@@ -3486,9 +3486,9 @@ const dr = {
3486
3486
  // doit garder son arrondi.
3487
3487
  cornersFor(e, t) {
3488
3488
  var Z, ee, te;
3489
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = ($, ne, G) => $ != null && x != null ? $ + H >= x : ne === G || ne === "card" && G === "bubble";
3490
- let D = l, F = l, q = l, W = l;
3491
- return a ? (C && (F = p), (k || !s) && (q = p), C && M(B, C, i == null ? void 0 : i.top) && (D = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (C && (D = p), (k || !s) && (W = p), C && M(B, C, i == null ? void 0 : i.top) && (F = p), k && M(A, k, i == null ? void 0 : i.bottom) && (q = p)), { tl: D, tr: F, br: q, bl: W };
3489
+ const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], R = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = ($, ne, G) => $ != null && x != null ? $ + H >= x : ne === G || ne === "card" && G === "bubble";
3490
+ let j = l, F = l, z = l, W = l;
3491
+ return a ? (C && (F = p), (k || !s) && (z = p), C && M(R, C, i == null ? void 0 : i.top) && (j = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (C && (j = p), (k || !s) && (W = p), C && M(R, C, i == null ? void 0 : i.top) && (F = p), k && M(A, k, i == null ? void 0 : i.bottom) && (z = p)), { tl: j, tr: F, br: z, bl: W };
3492
3492
  },
3493
3493
  // Inline style emitting the four corner CSS variables. Set on
3494
3494
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3554,7 +3554,7 @@ const dr = {
3554
3554
  const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
3555
3555
  if (!(n != null && n.created_at)) return "";
3556
3556
  try {
3557
- return Ie(
3557
+ return Le(
3558
3558
  new Date(n.created_at),
3559
3559
  oe(this.wmLocale())
3560
3560
  );
@@ -3638,9 +3638,9 @@ const dr = {
3638
3638
  }, xr = { key: 2 }, Or = {
3639
3639
  key: 3,
3640
3640
  class: "wm-list__row wm-list__row--ai fade-up"
3641
- }, Ir = { class: "wm-list__avatarSlot" };
3642
- function Er(e, t, n, i, r, s) {
3643
- const a = L("AIAvatar"), l = L("HumanAvatar"), p = L("ActionResult"), C = L("ArtifactRenderer"), k = L("Bubble"), x = L("AttachmentPreview"), B = L("Typing");
3641
+ }, Lr = { class: "wm-list__avatarSlot" };
3642
+ function Ir(e, t, n, i, r, s) {
3643
+ const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), C = E("ArtifactRenderer"), k = E("Bubble"), x = E("AttachmentPreview"), R = E("Typing");
3644
3644
  return c(), u("div", {
3645
3645
  ref: "scrollEl",
3646
3646
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
@@ -3658,7 +3658,7 @@ function Er(e, t, n, i, r, s) {
3658
3658
  o("span", vr, v(n.dateLabel), 1),
3659
3659
  t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
3660
3660
  ])) : w("", !0),
3661
- (c(!0), u(E, null, U(s.groups, (A, H) => (c(), u(E, {
3661
+ (c(!0), u(I, null, U(s.groups, (A, H) => (c(), u(I, {
3662
3662
  key: A.key
3663
3663
  }, [
3664
3664
  A.key === s.unreadGroupKey ? (c(), u("div", yr, [
@@ -3674,8 +3674,8 @@ function Er(e, t, n, i, r, s) {
3674
3674
  t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3675
3675
  o("span", kr, v(A.systemLabel), 1),
3676
3676
  t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3677
- ])) : (c(), u(E, { key: 1 }, [
3678
- (c(!0), u(E, null, U(A.items, (M, D) => (c(), u("div", {
3677
+ ])) : (c(), u(I, { key: 1 }, [
3678
+ (c(!0), u(I, null, U(A.items, (M, j) => (c(), u("div", {
3679
3679
  key: `${s.messageKey(M.message)}-${M.partKey}`,
3680
3680
  "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
3681
3681
  class: O(["wm-list__row fade-up", [
@@ -3685,10 +3685,10 @@ function Er(e, t, n, i, r, s) {
3685
3685
  "is-failed": M.message._failed
3686
3686
  }
3687
3687
  ]]),
3688
- style: z(s.cornersStyle(A, D))
3688
+ style: q(s.cornersStyle(A, j))
3689
3689
  }, [
3690
3690
  A.role !== "user" ? (c(), u("div", Ar, [
3691
- D === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
3691
+ j === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
3692
3692
  A.role === "ai" ? (c(), N(a, {
3693
3693
  key: 0,
3694
3694
  size: 26,
@@ -3732,10 +3732,10 @@ function Er(e, t, n, i, r, s) {
3732
3732
  "wm-list__atts--align-end": A.role === "user"
3733
3733
  }])
3734
3734
  }, [
3735
- (c(!0), u(E, null, U(s.attachmentsOf(
3735
+ (c(!0), u(I, null, U(s.attachmentsOf(
3736
3736
  M.message
3737
- ), (F, q) => (c(), N(x, {
3738
- key: `${s.messageKey(M.message)}-att-${q}`,
3737
+ ), (F, z) => (c(), N(x, {
3738
+ key: `${s.messageKey(M.message)}-att-${z}`,
3739
3739
  attachment: F
3740
3740
  }, null, 8, ["attachment"]))), 128))
3741
3741
  ], 2)) : w("", !0)
@@ -3753,7 +3753,7 @@ function Er(e, t, n, i, r, s) {
3753
3753
  ], 2)) : w("", !0)
3754
3754
  ], 64))), 128)),
3755
3755
  n.streamingActive ? (c(), u("div", Or, [
3756
- o("div", Ir, [
3756
+ o("div", Lr, [
3757
3757
  V(a, {
3758
3758
  size: 26,
3759
3759
  tail: !0,
@@ -3761,12 +3761,12 @@ function Er(e, t, n, i, r, s) {
3761
3761
  "image-url": n.aiAgentAvatarUrl
3762
3762
  }, null, 8, ["name", "image-url"])
3763
3763
  ]),
3764
- V(B)
3764
+ V(R)
3765
3765
  ])) : w("", !0)
3766
3766
  ], 34);
3767
3767
  }
3768
- const Lr = /* @__PURE__ */ R(hr, [["render", Er], ["__scopeId", "data-v-d769b193"]]), me = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3769
- function Br() {
3768
+ const Er = /* @__PURE__ */ B(mr, [["render", Ir], ["__scopeId", "data-v-d769b193"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3769
+ function Rr() {
3770
3770
  return be && [
3771
3771
  "video/webm;codecs=vp9,opus",
3772
3772
  "video/webm;codecs=vp8,opus",
@@ -3777,7 +3777,7 @@ function Br() {
3777
3777
  return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
3778
3778
  }) || "";
3779
3779
  }
3780
- function Re({ audio: e }) {
3780
+ function Be({ audio: e }) {
3781
3781
  return {
3782
3782
  video: !0,
3783
3783
  audio: !!e,
@@ -3786,15 +3786,15 @@ function Re({ audio: e }) {
3786
3786
  systemAudio: e ? "include" : "exclude"
3787
3787
  };
3788
3788
  }
3789
- function za(e) {
3789
+ function qa(e) {
3790
3790
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3791
3791
  }
3792
- async function Rr() {
3793
- if (!me) return null;
3792
+ async function Br() {
3793
+ if (!he) return null;
3794
3794
  let e;
3795
3795
  try {
3796
3796
  e = await navigator.mediaDevices.getDisplayMedia(
3797
- Re({ audio: !1 })
3797
+ Be({ audio: !1 })
3798
3798
  );
3799
3799
  } catch (t) {
3800
3800
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
@@ -3824,16 +3824,16 @@ async function Nr(e) {
3824
3824
  }
3825
3825
  async function Fr(e = {}) {
3826
3826
  var C;
3827
- if (!me || !be) return null;
3827
+ if (!he || !be) return null;
3828
3828
  let t;
3829
3829
  try {
3830
3830
  t = await navigator.mediaDevices.getDisplayMedia(
3831
- Re({ audio: !0 })
3831
+ Be({ audio: !0 })
3832
3832
  );
3833
3833
  } catch (k) {
3834
3834
  return (k == null ? void 0 : k.name) !== "NotAllowedError" && console.error("[media] record picker", k), null;
3835
3835
  }
3836
- const n = Br();
3836
+ const n = Rr();
3837
3837
  let i;
3838
3838
  try {
3839
3839
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
@@ -3848,13 +3848,13 @@ async function Fr(e = {}) {
3848
3848
  k.data && k.data.size > 0 && r.push(k.data);
3849
3849
  }), i.addEventListener("stop", () => {
3850
3850
  var k, x;
3851
- if (s && clearInterval(s), t.getTracks().forEach((B) => {
3852
- B.stop();
3851
+ if (s && clearInterval(s), t.getTracks().forEach((R) => {
3852
+ R.stop();
3853
3853
  }), r.length) {
3854
- const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${H}`, {
3855
- type: B
3854
+ const R = i.mimeType || n || "video/webm", A = new Blob(r, { type: R }), H = /mp4/.test(R) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${M}.${H}`, {
3855
+ type: R
3856
3856
  });
3857
- (k = e.onfinalize) == null || k.call(e, D);
3857
+ (k = e.onfinalize) == null || k.call(e, j);
3858
3858
  } else
3859
3859
  (x = e.oncancel) == null || x.call(e);
3860
3860
  }), t.getVideoTracks().forEach((k) => {
@@ -3903,12 +3903,12 @@ const Ur = [
3903
3903
  labelKey: "composer.recordScreen",
3904
3904
  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"
3905
3905
  }
3906
- ], jr = {
3906
+ ], Pr = {
3907
3907
  name: "WmComposer",
3908
3908
  inject: {
3909
3909
  // Translator shared by the Messenger shell; French fallback when
3910
3910
  // the component is used standalone.
3911
- t: { default: () => j() }
3911
+ t: { default: () => P() }
3912
3912
  },
3913
3913
  props: {
3914
3914
  modelValue: { type: String, default: "" },
@@ -3934,7 +3934,7 @@ const Ur = [
3934
3934
  return Ur.map((e) => ({
3935
3935
  ...e,
3936
3936
  label: this.t(e.labelKey),
3937
- disabled: e.action === "screenshot" && !me || e.action === "record" && (!me || !be)
3937
+ disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !be)
3938
3938
  }));
3939
3939
  },
3940
3940
  recordingElapsedLabel() {
@@ -4004,7 +4004,7 @@ const Ur = [
4004
4004
  },
4005
4005
  async captureScreenshot() {
4006
4006
  if (this.disabled) return;
4007
- const e = await Rr();
4007
+ const e = await Br();
4008
4008
  e && this.$emit("attach", e);
4009
4009
  },
4010
4010
  async startRecording() {
@@ -4035,10 +4035,10 @@ const Ur = [
4035
4035
  }
4036
4036
  }
4037
4037
  }
4038
- }, Dr = { class: "wm-compose-wrap" }, Pr = {
4038
+ }, jr = { class: "wm-compose-wrap" }, Dr = {
4039
4039
  key: 0,
4040
4040
  class: "wm-rec"
4041
- }, qr = { class: "wm-rec__lbl" }, zr = {
4041
+ }, zr = { class: "wm-rec__lbl" }, qr = {
4042
4042
  key: 1,
4043
4043
  class: "wm-compose__menu",
4044
4044
  role: "menu"
@@ -4049,13 +4049,13 @@ const Ur = [
4049
4049
  "aria-hidden": "true"
4050
4050
  }, Kr = ["d"], Wr = ["placeholder", "disabled"], Gr = { class: "wm-compose__actions" }, Yr = ["title", "aria-label", "disabled"], Jr = ["disabled", "aria-label"];
4051
4051
  function Qr(e, t, n, i, r, s) {
4052
- return c(), u("div", Dr, [
4053
- r.recording ? (c(), u("div", Pr, [
4052
+ return c(), u("div", jr, [
4053
+ r.recording ? (c(), u("div", Dr, [
4054
4054
  t[8] || (t[8] = o("span", {
4055
4055
  class: "wm-rec__dot",
4056
4056
  "aria-hidden": "true"
4057
4057
  }, null, -1)),
4058
- o("span", qr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4058
+ o("span", zr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4059
4059
  o("button", {
4060
4060
  type: "button",
4061
4061
  class: "wm-rec__stop",
@@ -4078,8 +4078,8 @@ function Qr(e, t, n, i, r, s) {
4078
4078
  class: "wm-compose__overlay",
4079
4079
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4080
4080
  })) : w("", !0),
4081
- r.attachOpen ? (c(), u("div", zr, [
4082
- (c(!0), u(E, null, U(s.attachItems, (a) => (c(), u("button", {
4081
+ r.attachOpen ? (c(), u("div", qr, [
4082
+ (c(!0), u(I, null, U(s.attachItems, (a) => (c(), u("button", {
4083
4083
  key: a.action,
4084
4084
  type: "button",
4085
4085
  class: "wm-compose__menuItem",
@@ -4160,7 +4160,7 @@ function Qr(e, t, n, i, r, s) {
4160
4160
  ], 34)
4161
4161
  ]);
4162
4162
  }
4163
- const Xr = /* @__PURE__ */ R(jr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8"]]), Zr = {
4163
+ const Xr = /* @__PURE__ */ B(Pr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8"]]), Zr = {
4164
4164
  name: "WmSuggestionChips",
4165
4165
  props: {
4166
4166
  items: { type: Array, default: () => [] },
@@ -4183,22 +4183,22 @@ function ti(e, t, n, i, r, s) {
4183
4183
  key: s.batchKey,
4184
4184
  class: "wm-chips"
4185
4185
  }, [
4186
- (c(!0), u(E, null, U(n.items, (a, l) => (c(), u("button", {
4186
+ (c(!0), u(I, null, U(n.items, (a, l) => (c(), u("button", {
4187
4187
  key: l,
4188
4188
  type: "button",
4189
4189
  class: "wm-chip",
4190
- style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4190
+ style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4191
4191
  onClick: (p) => e.$emit("select", a)
4192
4192
  }, v(a.label), 13, ei))), 128))
4193
4193
  ])) : w("", !0);
4194
4194
  }
4195
- const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085"]]), si = {
4195
+ const ni = /* @__PURE__ */ B(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085"]]), si = {
4196
4196
  name: "WmApprovalCard",
4197
4197
  components: { AIAvatar: le },
4198
4198
  inject: {
4199
4199
  // Translator shared by the Messenger shell; French fallback when
4200
4200
  // the component is used standalone.
4201
- t: { default: () => j() }
4201
+ t: { default: () => P() }
4202
4202
  },
4203
4203
  props: {
4204
4204
  action: { type: String, required: !0 },
@@ -4241,7 +4241,7 @@ const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085
4241
4241
  class: "wm-approval__detail"
4242
4242
  }, di = { class: "wm-approval__actions" };
4243
4243
  function ui(e, t, n, i, r, s) {
4244
- const a = L("AIAvatar");
4244
+ const a = E("AIAvatar");
4245
4245
  return c(), u("div", ri, [
4246
4246
  o("div", ii, [
4247
4247
  o("div", ai, [
@@ -4272,9 +4272,9 @@ function ui(e, t, n, i, r, s) {
4272
4272
  ])
4273
4273
  ]);
4274
4274
  }
4275
- const mi = /* @__PURE__ */ R(si, [["render", ui], ["__scopeId", "data-v-a2bed37e"]]);
4275
+ const hi = /* @__PURE__ */ B(si, [["render", ui], ["__scopeId", "data-v-a2bed37e"]]);
4276
4276
  let xe = 0;
4277
- const hi = /* @__PURE__ */ new Set([
4277
+ const mi = /* @__PURE__ */ new Set([
4278
4278
  "text",
4279
4279
  "textarea",
4280
4280
  "number",
@@ -4288,7 +4288,7 @@ const hi = /* @__PURE__ */ new Set([
4288
4288
  inject: {
4289
4289
  // Translator shared by the Messenger shell; French fallback when
4290
4290
  // the component is used standalone.
4291
- t: { default: () => j() }
4291
+ t: { default: () => P() }
4292
4292
  },
4293
4293
  props: {
4294
4294
  form: { type: Object, required: !0 },
@@ -4312,7 +4312,7 @@ const hi = /* @__PURE__ */ new Set([
4312
4312
  // douteux.
4313
4313
  normalizedFields() {
4314
4314
  var t;
4315
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !hi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4315
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !mi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4316
4316
  }
4317
4317
  },
4318
4318
  created() {
@@ -4375,13 +4375,13 @@ const hi = /* @__PURE__ */ new Set([
4375
4375
  }, Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Si = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Mi = ["id", "onUpdate:modelValue", "required", "disabled"], Ti = {
4376
4376
  key: 4,
4377
4377
  class: "wm-form__bool"
4378
- }, xi = ["id", "onUpdate:modelValue", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"], Ii = {
4378
+ }, xi = ["id", "onUpdate:modelValue", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"], Li = {
4379
4379
  value: "",
4380
4380
  disabled: ""
4381
- }, Ei = ["value"], Li = {
4381
+ }, Ii = ["value"], Ei = {
4382
4382
  key: 6,
4383
4383
  class: "wm-form__multi"
4384
- }, Bi = ["value", "checked", "disabled", "onChange"], Ri = {
4384
+ }, Ri = ["value", "checked", "disabled", "onChange"], Bi = {
4385
4385
  key: 0,
4386
4386
  class: "wm-form__err"
4387
4387
  }, Ni = ["disabled"], Fi = {
@@ -4392,8 +4392,8 @@ const hi = /* @__PURE__ */ new Set([
4392
4392
  key: 2,
4393
4393
  class: "wm-form__doneLbl"
4394
4394
  };
4395
- function ji(e, t, n, i, r, s) {
4396
- const a = L("AIAvatar");
4395
+ function Pi(e, t, n, i, r, s) {
4396
+ const a = E("AIAvatar");
4397
4397
  return c(), u("div", _i, [
4398
4398
  o("div", gi, [
4399
4399
  o("div", pi, [
@@ -4412,7 +4412,7 @@ function ji(e, t, n, i, r, s) {
4412
4412
  class: "wm-form__body",
4413
4413
  onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4414
4414
  }, [
4415
- (c(!0), u(E, null, U(s.normalizedFields, (l) => (c(), u("div", {
4415
+ (c(!0), u(I, null, U(s.normalizedFields, (l) => (c(), u("div", {
4416
4416
  key: l.key,
4417
4417
  class: "wm-form__field"
4418
4418
  }, [
@@ -4478,7 +4478,7 @@ function ji(e, t, n, i, r, s) {
4478
4478
  type: "checkbox",
4479
4479
  disabled: n.readOnly || r.busy
4480
4480
  }, null, 8, xi), [
4481
- [qe, r.values[l.key]]
4481
+ [ze, r.values[l.key]]
4482
4482
  ]),
4483
4483
  o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4484
4484
  ])) : l.type === "select" ? K((c(), u("select", {
@@ -4489,15 +4489,15 @@ function ji(e, t, n, i, r, s) {
4489
4489
  required: l.required,
4490
4490
  disabled: n.readOnly || r.busy
4491
4491
  }, [
4492
- o("option", Ii, v(l.placeholder || s.t("form.choose")), 1),
4493
- (c(!0), u(E, null, U(l.options, (p) => (c(), u("option", {
4492
+ o("option", Li, v(l.placeholder || s.t("form.choose")), 1),
4493
+ (c(!0), u(I, null, U(l.options, (p) => (c(), u("option", {
4494
4494
  key: p.value,
4495
4495
  value: p.value
4496
- }, v(p.label), 9, Ei))), 128))
4496
+ }, v(p.label), 9, Ii))), 128))
4497
4497
  ], 8, Oi)), [
4498
- [ze, r.values[l.key]]
4499
- ]) : l.type === "multiselect" ? (c(), u("div", Li, [
4500
- (c(!0), u(E, null, U(l.options, (p) => (c(), u("label", {
4498
+ [qe, r.values[l.key]]
4499
+ ]) : l.type === "multiselect" ? (c(), u("div", Ei, [
4500
+ (c(!0), u(I, null, U(l.options, (p) => (c(), u("label", {
4501
4501
  key: p.value,
4502
4502
  class: "wm-form__multiItem"
4503
4503
  }, [
@@ -4511,12 +4511,12 @@ function ji(e, t, n, i, r, s) {
4511
4511
  p.value,
4512
4512
  C.target.checked
4513
4513
  )
4514
- }, null, 40, Bi),
4514
+ }, null, 40, Ri),
4515
4515
  o("span", null, v(p.label), 1)
4516
4516
  ]))), 128))
4517
4517
  ])) : w("", !0)
4518
4518
  ]))), 128)),
4519
- r.error ? (c(), u("div", Ri, v(r.error), 1)) : w("", !0),
4519
+ r.error ? (c(), u("div", Bi, v(r.error), 1)) : w("", !0),
4520
4520
  n.readOnly ? (c(), u("div", Ui, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4521
4521
  key: 1,
4522
4522
  type: "submit",
@@ -4529,12 +4529,12 @@ function ji(e, t, n, i, r, s) {
4529
4529
  ], 32)
4530
4530
  ]);
4531
4531
  }
4532
- const Di = /* @__PURE__ */ R(fi, [["render", ji], ["__scopeId", "data-v-fe65cc56"]]), Pi = {
4532
+ const ji = /* @__PURE__ */ B(fi, [["render", Pi], ["__scopeId", "data-v-fe65cc56"]]), Di = {
4533
4533
  name: "WmFeedback",
4534
4534
  inject: {
4535
4535
  // Translator shared by the Messenger shell; French fallback when
4536
4536
  // the component is used standalone.
4537
- t: { default: () => j() }
4537
+ t: { default: () => P() }
4538
4538
  },
4539
4539
  props: {
4540
4540
  busy: { type: Boolean, default: !1 },
@@ -4563,12 +4563,12 @@ const Di = /* @__PURE__ */ R(fi, [["render", ji], ["__scopeId", "data-v-fe65cc56
4563
4563
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4564
4564
  }
4565
4565
  }
4566
- }, qi = { class: "wm-fb" }, zi = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, $i = { class: "wm-fb__row" }, Vi = ["onClick"], Ki = { class: "wm-fb__emoji" }, Wi = { class: "wm-fb__label" }, Gi = ["disabled"], Yi = {
4566
+ }, zi = { class: "wm-fb" }, qi = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, $i = { class: "wm-fb__row" }, Vi = ["onClick"], Ki = { class: "wm-fb__emoji" }, Wi = { class: "wm-fb__label" }, Gi = ["disabled"], Yi = {
4567
4567
  key: 1,
4568
4568
  class: "wm-fb__done"
4569
4569
  }, Ji = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
4570
4570
  function Xi(e, t, n, i, r, s) {
4571
- return c(), u("div", qi, [
4571
+ return c(), u("div", zi, [
4572
4572
  n.done ? (c(), u("div", Yi, [
4573
4573
  t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4574
4574
  o("svg", {
@@ -4587,11 +4587,11 @@ function Xi(e, t, n, i, r, s) {
4587
4587
  ], -1)),
4588
4588
  o("div", Ji, v(s.t("feedback.doneTitle")), 1),
4589
4589
  o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
4590
- ])) : (c(), u(E, { key: 0 }, [
4591
- o("div", zi, v(s.t("feedback.question")), 1),
4590
+ ])) : (c(), u(I, { key: 0 }, [
4591
+ o("div", qi, v(s.t("feedback.question")), 1),
4592
4592
  o("div", Hi, v(s.t("feedback.subtitle")), 1),
4593
4593
  o("div", $i, [
4594
- (c(!0), u(E, null, U(s.options, (a) => (c(), u("button", {
4594
+ (c(!0), u(I, null, U(s.options, (a) => (c(), u("button", {
4595
4595
  key: a.v,
4596
4596
  type: "button",
4597
4597
  class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
@@ -4610,12 +4610,12 @@ function Xi(e, t, n, i, r, s) {
4610
4610
  ], 64))
4611
4611
  ]);
4612
4612
  }
4613
- const Zi = /* @__PURE__ */ R(Pi, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), ea = {
4613
+ const Zi = /* @__PURE__ */ B(Di, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), ea = {
4614
4614
  name: "WmMoreMenu",
4615
4615
  inject: {
4616
4616
  // Translator shared by the Messenger shell; French fallback when
4617
4617
  // the component is used standalone.
4618
- t: { default: () => j() }
4618
+ t: { default: () => P() }
4619
4619
  },
4620
4620
  props: {
4621
4621
  canRename: { type: Boolean, default: !0 },
@@ -4662,8 +4662,8 @@ const Zi = /* @__PURE__ */ R(Pi, [["render", Xi], ["__scopeId", "data-v-9b630564
4662
4662
  }, ra = { class: "wm-mm__label" }, ia = { class: "wm-mm__label" }, aa = {
4663
4663
  key: 1,
4664
4664
  class: "wm-mm__sep"
4665
- }, oa = { class: "wm-mm__section" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__section" }, ua = { class: "wm-mm__label" }, ma = { class: "wm-mm__label" };
4666
- function ha(e, t, n, i, r, s) {
4665
+ }, oa = { class: "wm-mm__section" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__section" }, ua = { class: "wm-mm__label" }, ha = { class: "wm-mm__label" };
4666
+ function ma(e, t, n, i, r, s) {
4667
4667
  return c(), u("div", ta, [
4668
4668
  o("div", {
4669
4669
  class: "wm-mm__scrim",
@@ -4824,18 +4824,18 @@ function ha(e, t, n, i, r, s) {
4824
4824
  o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
4825
4825
  ])
4826
4826
  ], -1)),
4827
- o("span", ma, v(s.t("moreMenu.helpCenter")), 1)
4827
+ o("span", ha, v(s.t("moreMenu.helpCenter")), 1)
4828
4828
  ])) : w("", !0)
4829
4829
  ])
4830
4830
  ])
4831
4831
  ]);
4832
4832
  }
4833
- const fa = /* @__PURE__ */ R(ea, [["render", ha], ["__scopeId", "data-v-76281e95"]]), _a = {
4833
+ const fa = /* @__PURE__ */ B(ea, [["render", ma], ["__scopeId", "data-v-76281e95"]]), _a = {
4834
4834
  name: "WmRenameDialog",
4835
4835
  inject: {
4836
4836
  // Translator shared by the Messenger shell; French fallback when
4837
4837
  // the component is used standalone.
4838
- t: { default: () => j() }
4838
+ t: { default: () => P() }
4839
4839
  },
4840
4840
  props: {
4841
4841
  // Empty defaults: the resolved fallback comes from the translator
@@ -4939,24 +4939,24 @@ function Sa(e, t, n, i, r, s) {
4939
4939
  ])
4940
4940
  ]);
4941
4941
  }
4942
- const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ta = {
4942
+ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ta = {
4943
4943
  name: "Messenger",
4944
4944
  components: {
4945
4945
  Launcher: Ut,
4946
4946
  Header: cn,
4947
4947
  Onboarding: $n,
4948
- MessageList: Lr,
4948
+ MessageList: Er,
4949
4949
  Composer: Xr,
4950
4950
  SuggestionChips: ni,
4951
- ApprovalCard: mi,
4952
- FormCard: Di,
4951
+ ApprovalCard: hi,
4952
+ FormCard: ji,
4953
4953
  Feedback: Zi,
4954
4954
  MoreMenu: fa,
4955
4955
  RenameDialog: Ma
4956
4956
  },
4957
4957
  mixins: [
4958
4958
  ot,
4959
- ht,
4959
+ mt,
4960
4960
  ft,
4961
4961
  gt
4962
4962
  ],
@@ -5097,7 +5097,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5097
5097
  // `locale` changes. `t()` below (and the provided closure) delegate
5098
5098
  // to it so every string resolves against the current language.
5099
5099
  translator() {
5100
- return j(this.locale);
5100
+ return P(this.locale);
5101
5101
  },
5102
5102
  error() {
5103
5103
  var e;
@@ -5135,9 +5135,9 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5135
5135
  const x = r[k];
5136
5136
  if (!x) continue;
5137
5137
  if (((C = x.author) == null ? void 0 : C.type) === "user") break;
5138
- const B = J(x.id);
5139
- if (B != null) {
5140
- if (s != null && B <= s) break;
5138
+ const R = J(x.id);
5139
+ if (R != null) {
5140
+ if (s != null && R <= s) break;
5141
5141
  t[x.id] !== 0 && (!l && x.author && (l = x.author), a++);
5142
5142
  }
5143
5143
  }
@@ -5413,7 +5413,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5413
5413
  }
5414
5414
  }
5415
5415
  return this.t("messageList.today", {
5416
- time: Ie(t, oe(this.locale))
5416
+ time: Le(t, oe(this.locale))
5417
5417
  });
5418
5418
  },
5419
5419
  // Pagination state for the active conversation. Drives the
@@ -5430,18 +5430,6 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5430
5430
  }
5431
5431
  },
5432
5432
  watch: {
5433
- // Notifie le snippet parent du changement open/close pour qu'il
5434
- // resize l'iframe (sinon en sheet la hauteur est plafonnée).
5435
- isOpen(e) {
5436
- window.parent && window.parent !== window && window.parent.postMessage(
5437
- {
5438
- type: "RESIZE",
5439
- state: e ? "open" : "closed",
5440
- displayMode: this.displayMode
5441
- },
5442
- "*"
5443
- );
5444
- },
5445
5433
  // Prune `dismissedPeeks` entries for threads that are no longer
5446
5434
  // unread (user opened them, or a user reply cleared the unread
5447
5435
  // flag). Without this, the map would grow unbounded across a
@@ -5534,10 +5522,10 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5534
5522
  const e = document.createElement("style");
5535
5523
  e.id = Oe, e.textContent = Xe, document.head.appendChild(e);
5536
5524
  }
5537
- 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());
5525
+ 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());
5538
5526
  },
5539
5527
  beforeUnmount() {
5540
- this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this.cancelReveals(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
5528
+ this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
5541
5529
  },
5542
5530
  methods: {
5543
5531
  // Translate a key against the resolved language. Used in this
@@ -5629,7 +5617,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5629
5617
  },
5630
5618
  // ── Panel open/close + draft conversation ────────────────────────
5631
5619
  async open() {
5632
- this.isOpen = !0, this.store || await this.boot(), this.store && this.store.setPanelOpen(!0);
5620
+ this.isOpen = !0, this.notifyParentResize("open"), this._launcherRo && this._launcherRo.disconnect(), this.store || await this.boot(), this.store && this.store.setPanelOpen(!0);
5633
5621
  const e = this.currentConv;
5634
5622
  if (e && !e._draft) {
5635
5623
  this.activeConvId == null && (this.activeConvId = e.id);
@@ -5641,8 +5629,48 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5641
5629
  this.markConvRead(e);
5642
5630
  }
5643
5631
  },
5644
- close() {
5645
- this.isOpen = !1, this.store && this.store.setPanelOpen(!1);
5632
+ async close() {
5633
+ this.isOpen = !1, await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize(), this.store && this.store.setPanelOpen(!1);
5634
+ },
5635
+ notifyParentResize(e, t) {
5636
+ if (window.parent && window.parent !== window)
5637
+ try {
5638
+ window.parent.postMessage(
5639
+ {
5640
+ type: "RESIZE",
5641
+ state: e,
5642
+ displayMode: this.displayMode,
5643
+ ...t || {}
5644
+ },
5645
+ "*"
5646
+ );
5647
+ } catch (n) {
5648
+ console.warn("[ww-messenger] notifyParentResize failed", n);
5649
+ }
5650
+ },
5651
+ // Mesure la taille rendue du wm-launcherWrap (launcher + peeks éventuels)
5652
+ // et la pousse au parent. L'iframe s'ajuste pile à cette taille → la
5653
+ // page derrière redevient cliquable en dehors du launcher.
5654
+ sendCurrentLauncherSize() {
5655
+ var n, i;
5656
+ const e = (i = (n = this.$el) == null ? void 0 : n.querySelector) == null ? void 0 : i.call(n, ".wm-launcherWrap");
5657
+ if (!e) return;
5658
+ const t = e.getBoundingClientRect();
5659
+ !t.width || !t.height || this.notifyParentResize("closed", {
5660
+ width: Math.ceil(t.width) + 20,
5661
+ height: Math.ceil(t.height) + 20
5662
+ });
5663
+ },
5664
+ observeLauncherSize() {
5665
+ var n, i;
5666
+ if (typeof ResizeObserver > "u") return;
5667
+ const e = (i = (n = this.$el) == null ? void 0 : n.querySelector) == null ? void 0 : i.call(n, ".wm-launcherWrap");
5668
+ if (!e) return;
5669
+ this._launcherRo && this._launcherRo.disconnect();
5670
+ const t = new ResizeObserver(() => {
5671
+ this.isOpen || this.sendCurrentLauncherSize();
5672
+ });
5673
+ t.observe(e), this._launcherRo = t;
5646
5674
  },
5647
5675
  // Opening straight from a notification card: land on that card's
5648
5676
  // thread rather than whatever was last active.
@@ -5848,10 +5876,10 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5848
5876
  class: "wm-loading",
5849
5877
  "aria-busy": "true",
5850
5878
  "aria-live": "polite"
5851
- }, Oa = ["aria-label"], Ia = {
5879
+ }, Oa = ["aria-label"], La = {
5852
5880
  key: 0,
5853
5881
  class: "wm-state"
5854
- }, Ea = { class: "wm-state__err" }, La = { class: "wm-state__errTitle" }, Ba = { class: "wm-state__errSub" }, Ra = { class: "wm-bottom" }, Na = {
5882
+ }, Ia = { class: "wm-state__err" }, Ea = { class: "wm-state__errTitle" }, Ra = { class: "wm-state__errSub" }, Ba = { class: "wm-bottom" }, Na = {
5855
5883
  key: 0,
5856
5884
  ref: "floatEl",
5857
5885
  class: "wm-float"
@@ -5860,12 +5888,12 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5860
5888
  class: "wm-actionWait",
5861
5889
  role: "status",
5862
5890
  "aria-live": "polite"
5863
- }, Ua = { class: "wm-actionWait__lbl" }, ja = {
5891
+ }, Ua = { class: "wm-actionWait__lbl" }, Pa = {
5864
5892
  key: 2,
5865
5893
  class: "wm-attached"
5866
- }, Da = ["aria-label", "onClick"];
5867
- function Pa(e, t, n, i, r, s) {
5868
- const a = L("Launcher"), l = L("Header"), p = L("Onboarding"), C = L("MessageList"), k = L("ApprovalCard"), x = L("FormCard"), B = L("Feedback"), A = L("SuggestionChips"), H = L("Composer"), M = L("MoreMenu"), D = L("RenameDialog");
5894
+ }, ja = ["aria-label", "onClick"];
5895
+ function Da(e, t, n, i, r, s) {
5896
+ const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), C = E("MessageList"), k = E("ApprovalCard"), x = E("FormCard"), R = E("Feedback"), A = E("SuggestionChips"), H = E("Composer"), M = E("MoreMenu"), j = E("RenameDialog");
5869
5897
  return c(), u("div", {
5870
5898
  class: O(["wm-root", `wm-root--${n.displayMode}`])
5871
5899
  }, [
@@ -5883,7 +5911,7 @@ function Pa(e, t, n, i, r, s) {
5883
5911
  `wm-panel--${n.displayMode}`,
5884
5912
  { "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
5885
5913
  ]),
5886
- style: z(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5914
+ style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
5887
5915
  role: "dialog",
5888
5916
  "aria-label": "Messenger"
5889
5917
  }, [
@@ -5913,7 +5941,7 @@ function Pa(e, t, n, i, r, s) {
5913
5941
  class: "wm-loading__spinner",
5914
5942
  "aria-hidden": "true"
5915
5943
  }, null, -1))
5916
- ])) : (c(), u(E, { key: 1 }, [
5944
+ ])) : (c(), u(I, { key: 1 }, [
5917
5945
  V(l, {
5918
5946
  title: s.headerTitle,
5919
5947
  "team-members": s.teamMembers,
@@ -5928,8 +5956,8 @@ function Pa(e, t, n, i, r, s) {
5928
5956
  onMore: s.toggleMore,
5929
5957
  onClose: s.close
5930
5958
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
5931
- s.error ? (c(), u("div", Ia, [
5932
- o("div", Ea, [
5959
+ s.error ? (c(), u("div", La, [
5960
+ o("div", Ia, [
5933
5961
  t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
5934
5962
  o("svg", {
5935
5963
  width: "14",
@@ -5946,11 +5974,11 @@ function Pa(e, t, n, i, r, s) {
5946
5974
  ])
5947
5975
  ], -1)),
5948
5976
  o("div", null, [
5949
- o("div", La, v(s.t("error.connectionFailed")), 1),
5950
- o("div", Ba, v(s.error), 1)
5977
+ o("div", Ea, v(s.t("error.connectionFailed")), 1),
5978
+ o("div", Ra, v(s.error), 1)
5951
5979
  ])
5952
5980
  ])
5953
- ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
5981
+ ])) : s.currentConv ? (c(), u(I, { key: 2 }, [
5954
5982
  V(C, {
5955
5983
  ref: "messageList",
5956
5984
  messages: s.displayedMessages,
@@ -5965,7 +5993,7 @@ function Pa(e, t, n, i, r, s) {
5965
5993
  "ai-agent-avatar-url": s.agentAvatarUrl,
5966
5994
  onLoadMore: s.onLoadMore
5967
5995
  }, 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"]),
5968
- o("div", Ra, [
5996
+ o("div", Ba, [
5969
5997
  s.floatVisible ? (c(), u("div", Na, [
5970
5998
  s.approvalReady ? (c(), N(k, {
5971
5999
  key: 0,
@@ -5981,7 +6009,7 @@ function Pa(e, t, n, i, r, s) {
5981
6009
  "agent-name": s.agentName,
5982
6010
  "agent-avatar-url": s.agentAvatarUrl,
5983
6011
  onSubmit: s.onFormSubmit
5984
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), N(B, {
6012
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), N(R, {
5985
6013
  key: 2,
5986
6014
  busy: r.feedbackBusy,
5987
6015
  done: r.feedbackDone,
@@ -6025,16 +6053,16 @@ function Pa(e, t, n, i, r, s) {
6025
6053
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6026
6054
  onAction: s.onMoreAction
6027
6055
  }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0),
6028
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(D, {
6056
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(j, {
6029
6057
  key: 1,
6030
6058
  "initial-value": s.currentConv.name || "",
6031
6059
  title: s.t("rename.dialogTitle"),
6032
6060
  onClose: t[3] || (t[3] = (F) => r.renameDialogOpen = !1),
6033
6061
  onSubmit: s.onRenameSubmit
6034
6062
  }, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
6035
- r.pendingAttachments.length ? (c(), u("div", ja, [
6036
- (c(!0), u(E, null, U(r.pendingAttachments, (F, q) => (c(), u("div", {
6037
- key: q,
6063
+ r.pendingAttachments.length ? (c(), u("div", Pa, [
6064
+ (c(!0), u(I, null, U(r.pendingAttachments, (F, z) => (c(), u("div", {
6065
+ key: z,
6038
6066
  class: "wm-attached__chip"
6039
6067
  }, [
6040
6068
  t[10] || (t[10] = o("svg", {
@@ -6054,7 +6082,7 @@ function Pa(e, t, n, i, r, s) {
6054
6082
  o("button", {
6055
6083
  type: "button",
6056
6084
  "aria-label": s.t("attachment.remove"),
6057
- onClick: (W) => r.pendingAttachments.splice(q, 1)
6085
+ onClick: (W) => r.pendingAttachments.splice(z, 1)
6058
6086
  }, [...t[9] || (t[9] = [
6059
6087
  o("svg", {
6060
6088
  width: "10",
@@ -6069,7 +6097,7 @@ function Pa(e, t, n, i, r, s) {
6069
6097
  }, [
6070
6098
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6071
6099
  ], -1)
6072
- ])], 8, Da)
6100
+ ])], 8, ja)
6073
6101
  ]))), 128))
6074
6102
  ])) : w("", !0)
6075
6103
  ], 64)) : (c(), N(p, {
@@ -6102,32 +6130,32 @@ function Pa(e, t, n, i, r, s) {
6102
6130
  ], 6)) : w("", !0)
6103
6131
  ], 2);
6104
6132
  }
6105
- const Ha = /* @__PURE__ */ R(Ta, [["render", Pa], ["__scopeId", "data-v-1c840488"]]), $a = "0.5.9";
6133
+ const Ha = /* @__PURE__ */ B(Ta, [["render", Da], ["__scopeId", "data-v-98fea820"]]), $a = "0.5.11";
6106
6134
  export {
6107
6135
  le as AIAvatar,
6108
6136
  _e as AVATAR_COLORS,
6109
6137
  ns as ActionResult,
6110
- mi as ApprovalCard,
6138
+ hi as ApprovalCard,
6111
6139
  us as ArtifactFormResponse,
6112
6140
  As as ArtifactInfoCard,
6113
6141
  Hs as ArtifactRenderer,
6114
- Ds as ArtifactTicket,
6142
+ js as ArtifactTicket,
6115
6143
  tr as AttachmentPreview,
6116
6144
  ir as Bubble,
6117
6145
  Xr as Composer,
6118
6146
  Ze as DEFAULT_BASE_URL,
6119
6147
  ie as DEFAULT_LANGUAGE,
6120
6148
  Zi as Feedback,
6121
- Di as FormCard,
6149
+ ji as FormCard,
6122
6150
  cn as Header,
6123
- Le as HumanAvatar,
6151
+ Ee as HumanAvatar,
6124
6152
  Ut as Launcher,
6125
6153
  be as MEDIA_RECORDER_SUPPORTED,
6126
- Lr as MessageList,
6154
+ Er as MessageList,
6127
6155
  Ha as Messenger,
6128
6156
  fa as MoreMenu,
6129
6157
  $n as Onboarding,
6130
- me as SCREEN_CAPTURE_SUPPORTED,
6158
+ he as SCREEN_CAPTURE_SUPPORTED,
6131
6159
  et as SUPPORTED_LANGUAGES,
6132
6160
  ni as SuggestionChips,
6133
6161
  Yt as TeamAvatars,
@@ -6135,18 +6163,18 @@ export {
6135
6163
  $a as VERSION,
6136
6164
  ve as avatarColor,
6137
6165
  ye as avatarInitials,
6138
- Rr as captureScreenshotFile,
6139
- P as colors,
6166
+ Br as captureScreenshotFile,
6167
+ D as colors,
6140
6168
  Qe as createStore,
6141
- j as createTranslator,
6169
+ P as createTranslator,
6142
6170
  We as createTransport,
6143
6171
  oe as dateLocale,
6144
6172
  Ha as default,
6145
- Ie as formatTime,
6146
- za as guessAttachmentKind,
6147
- Br as pickRecorderMime,
6173
+ Le as formatTime,
6174
+ qa as guessAttachmentKind,
6175
+ Rr as pickRecorderMime,
6148
6176
  un as renderInlineMarkdown,
6149
- mn as renderMarkdown,
6177
+ hn as renderMarkdown,
6150
6178
  we as resolveLanguage,
6151
6179
  Fr as startScreenRecording,
6152
6180
  Xe as tokensCss,