@_solaris/messenger-widget 0.5.10 → 0.5.12

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 q, normalizeClass as O, toDisplayString as v, resolveComponent as L, createVNode as V, Transition as Ue, withCtx as Pe, 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 je, renderSlot as De, vModelCheckbox as ze, vModelSelect as qe, 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
  }
@@ -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,7 +303,7 @@ 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,
@@ -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
599
  const j = /* @__PURE__ */ new Map();
600
- async function F(m) {
601
- if (!m) return null;
602
- const h = j.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;
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 j.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 z(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,7 +747,7 @@ 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,
@@ -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 = `
@@ -1106,7 +1106,7 @@ 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
1112
  function tt(e, t, n = P()) {
@@ -1116,7 +1116,7 @@ function tt(e, t, n = P()) {
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
  }
@@ -1130,7 +1130,7 @@ function nt(e, t, n = P()) {
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
  `));
@@ -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;
@@ -1665,9 +1665,9 @@ function wt(e, t, n, i, r, s) {
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.
@@ -1691,9 +1691,9 @@ 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
1699
  default: Pe(() => [
@@ -1701,7 +1701,7 @@ function Ft(e, t, n, i, r, s) {
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
1707
  style: q({
@@ -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"]]), Pt = {
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 },
@@ -1890,7 +1890,7 @@ function qt(e, t, n, i, r, s) {
1890
1890
  ], 6)
1891
1891
  ], 6);
1892
1892
  }
1893
- const le = /* @__PURE__ */ R(Pt, [["render", qt], ["__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: () => [] },
@@ -1925,7 +1925,7 @@ function Gt(e, t, n, i, r, s) {
1925
1925
  class: "wm-team__stack",
1926
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
1931
  style: q({
@@ -1944,7 +1944,7 @@ 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: {
@@ -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,7 +2185,7 @@ 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: {
@@ -2270,10 +2270,10 @@ 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" }, Pn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Dn = { class: "wm-onb__thread-meta" }, zn = {
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
2279
  }, qn = {
@@ -2281,7 +2281,7 @@ const Te = {
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",
@@ -2463,7 +2463,7 @@ function Hn(e, t, n, i, r, s) {
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,7 +2568,7 @@ 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
@@ -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);
@@ -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",
@@ -2776,8 +2776,8 @@ 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 Ps(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,7 +2891,7 @@ function Ps(e, t, n, i, r, s) {
2891
2891
  ])) : w("", !0)
2892
2892
  ]);
2893
2893
  }
2894
- const js = /* @__PURE__ */ R(Ms, [["render", Ps], ["__scopeId", "data-v-5f30c914"]]), Ds = {
2894
+ const js = /* @__PURE__ */ B(Ms, [["render", Ps], ["__scopeId", "data-v-5f30c914"]]), Ds = {
2895
2895
  form_response: us,
2896
2896
  info_card: As,
2897
2897
  ticket: js
@@ -2916,7 +2916,7 @@ function qs(e, t, n, i, r, s) {
2916
2916
  data: n.artifact.data
2917
2917
  }, null, 8, ["data"])) : w("", !0);
2918
2918
  }
2919
- const Hs = /* @__PURE__ */ R(zs, [["render", qs]]), $s = {
2919
+ const Hs = /* @__PURE__ */ B(zs, [["render", qs]]), $s = {
2920
2920
  name: "WmAttachmentPreview",
2921
2921
  inject: {
2922
2922
  signAttachmentFn: { default: null },
@@ -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"];
@@ -3073,7 +3073,7 @@ function rr(e, t, n, i, r, s) {
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,
@@ -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";
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
3490
  let j = l, F = l, z = l, W = l;
3491
- return a ? (C && (F = p), (k || !s) && (z = p), C && M(B, 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(B, 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 };
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, j) => (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", [
@@ -3688,7 +3688,7 @@ function Er(e, t, n, i, r, s) {
3688
3688
  style: q(s.cornersStyle(A, j))
3689
3689
  }, [
3690
3690
  A.role !== "user" ? (c(), u("div", Ar, [
3691
- j === 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,7 +3732,7 @@ 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
3737
  ), (F, z) => (c(), N(x, {
3738
3738
  key: `${s.messageKey(M.message)}-att-${z}`,
@@ -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,
@@ -3789,12 +3789,12 @@ function Re({ audio: e }) {
3789
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,11 +3848,11 @@ 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), j = 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
3857
  (k = e.onfinalize) == null || k.call(e, j);
3858
3858
  } else
@@ -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() {
@@ -4079,7 +4079,7 @@ function Qr(e, t, n, i, r, s) {
4079
4079
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4080
4080
  })) : w("", !0),
4081
4081
  r.attachOpen ? (c(), u("div", qr, [
4082
- (c(!0), u(E, null, U(s.attachItems, (a) => (c(), u("button", {
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(Pr, [["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,7 +4183,7 @@ 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",
@@ -4192,7 +4192,7 @@ function ti(e, t, n, i, r, s) {
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: {
@@ -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",
@@ -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 = {
@@ -4393,7 +4393,7 @@ const hi = /* @__PURE__ */ new Set([
4393
4393
  class: "wm-form__doneLbl"
4394
4394
  };
4395
4395
  function Pi(e, t, n, i, r, s) {
4396
- const a = L("AIAvatar");
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 Pi(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
  }, [
@@ -4489,15 +4489,15 @@ function Pi(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
4498
  [qe, 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", {
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 Pi(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,7 +4529,7 @@ function Pi(e, t, n, i, r, s) {
4529
4529
  ], 32)
4530
4530
  ]);
4531
4531
  }
4532
- const ji = /* @__PURE__ */ R(fi, [["render", Pi], ["__scopeId", "data-v-fe65cc56"]]), Di = {
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
@@ -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 }, [
4590
+ ])) : (c(), u(I, { key: 0 }, [
4591
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,7 +4610,7 @@ function Xi(e, t, n, i, r, s) {
4610
4610
  ], 64))
4611
4611
  ]);
4612
4612
  }
4613
- const Zi = /* @__PURE__ */ R(Di, [["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
@@ -4662,8 +4662,8 @@ const Zi = /* @__PURE__ */ R(Di, [["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,13 +4824,13 @@ 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
@@ -4939,16 +4939,16 @@ 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,
4951
+ ApprovalCard: hi,
4952
4952
  FormCard: ji,
4953
4953
  Feedback: Zi,
4954
4954
  MoreMenu: fa,
@@ -4956,7 +4956,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
4956
4956
  },
4957
4957
  mixins: [
4958
4958
  ot,
4959
- ht,
4959
+ mt,
4960
4960
  ft,
4961
4961
  gt
4962
4962
  ],
@@ -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
@@ -5522,10 +5522,10 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5522
5522
  const e = document.createElement("style");
5523
5523
  e.id = Oe, e.textContent = Xe, document.head.appendChild(e);
5524
5524
  }
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());
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());
5526
5526
  },
5527
5527
  beforeUnmount() {
5528
- 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();
5529
5529
  },
5530
5530
  methods: {
5531
5531
  // Translate a key against the resolved language. Used in this
@@ -5617,7 +5617,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5617
5617
  },
5618
5618
  // ── Panel open/close + draft conversation ────────────────────────
5619
5619
  async open() {
5620
- this.isOpen = !0, this.notifyParentResize("open"), 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);
5621
5621
  const e = this.currentConv;
5622
5622
  if (e && !e._draft) {
5623
5623
  this.activeConvId == null && (this.activeConvId = e.id);
@@ -5629,24 +5629,49 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5629
5629
  this.markConvRead(e);
5630
5630
  }
5631
5631
  },
5632
- close() {
5633
- this.isOpen = !1, this.notifyParentResize("closed"), 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
5634
  },
5635
- notifyParentResize(e) {
5635
+ notifyParentResize(e, t) {
5636
5636
  if (window.parent && window.parent !== window)
5637
5637
  try {
5638
5638
  window.parent.postMessage(
5639
5639
  {
5640
5640
  type: "RESIZE",
5641
5641
  state: e,
5642
- displayMode: this.displayMode
5642
+ displayMode: this.displayMode,
5643
+ ...t || {}
5643
5644
  },
5644
5645
  "*"
5645
5646
  );
5646
- } catch (t) {
5647
- console.warn("[ww-messenger] notifyParentResize failed", t);
5647
+ } catch (n) {
5648
+ console.warn("[ww-messenger] notifyParentResize failed", n);
5648
5649
  }
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) + 60,
5661
+ height: Math.ceil(t.height) + 60
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;
5674
+ },
5650
5675
  // Opening straight from a notification card: land on that card's
5651
5676
  // thread rather than whatever was last active.
5652
5677
  async openFromPeek(e) {
@@ -5851,10 +5876,10 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5851
5876
  class: "wm-loading",
5852
5877
  "aria-busy": "true",
5853
5878
  "aria-live": "polite"
5854
- }, Oa = ["aria-label"], Ia = {
5879
+ }, Oa = ["aria-label"], La = {
5855
5880
  key: 0,
5856
5881
  class: "wm-state"
5857
- }, 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 = {
5858
5883
  key: 0,
5859
5884
  ref: "floatEl",
5860
5885
  class: "wm-float"
@@ -5868,7 +5893,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5868
5893
  class: "wm-attached"
5869
5894
  }, ja = ["aria-label", "onClick"];
5870
5895
  function Da(e, t, n, i, r, s) {
5871
- 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"), j = L("RenameDialog");
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");
5872
5897
  return c(), u("div", {
5873
5898
  class: O(["wm-root", `wm-root--${n.displayMode}`])
5874
5899
  }, [
@@ -5916,7 +5941,7 @@ function Da(e, t, n, i, r, s) {
5916
5941
  class: "wm-loading__spinner",
5917
5942
  "aria-hidden": "true"
5918
5943
  }, null, -1))
5919
- ])) : (c(), u(E, { key: 1 }, [
5944
+ ])) : (c(), u(I, { key: 1 }, [
5920
5945
  V(l, {
5921
5946
  title: s.headerTitle,
5922
5947
  "team-members": s.teamMembers,
@@ -5931,8 +5956,8 @@ function Da(e, t, n, i, r, s) {
5931
5956
  onMore: s.toggleMore,
5932
5957
  onClose: s.close
5933
5958
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
5934
- s.error ? (c(), u("div", Ia, [
5935
- o("div", Ea, [
5959
+ s.error ? (c(), u("div", La, [
5960
+ o("div", Ia, [
5936
5961
  t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
5937
5962
  o("svg", {
5938
5963
  width: "14",
@@ -5949,11 +5974,11 @@ function Da(e, t, n, i, r, s) {
5949
5974
  ])
5950
5975
  ], -1)),
5951
5976
  o("div", null, [
5952
- o("div", La, v(s.t("error.connectionFailed")), 1),
5953
- 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)
5954
5979
  ])
5955
5980
  ])
5956
- ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
5981
+ ])) : s.currentConv ? (c(), u(I, { key: 2 }, [
5957
5982
  V(C, {
5958
5983
  ref: "messageList",
5959
5984
  messages: s.displayedMessages,
@@ -5968,7 +5993,7 @@ function Da(e, t, n, i, r, s) {
5968
5993
  "ai-agent-avatar-url": s.agentAvatarUrl,
5969
5994
  onLoadMore: s.onLoadMore
5970
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"]),
5971
- o("div", Ra, [
5996
+ o("div", Ba, [
5972
5997
  s.floatVisible ? (c(), u("div", Na, [
5973
5998
  s.approvalReady ? (c(), N(k, {
5974
5999
  key: 0,
@@ -5984,7 +6009,7 @@ function Da(e, t, n, i, r, s) {
5984
6009
  "agent-name": s.agentName,
5985
6010
  "agent-avatar-url": s.agentAvatarUrl,
5986
6011
  onSubmit: s.onFormSubmit
5987
- }, 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, {
5988
6013
  key: 2,
5989
6014
  busy: r.feedbackBusy,
5990
6015
  done: r.feedbackDone,
@@ -6036,7 +6061,7 @@ function Da(e, t, n, i, r, s) {
6036
6061
  onSubmit: s.onRenameSubmit
6037
6062
  }, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
6038
6063
  r.pendingAttachments.length ? (c(), u("div", Pa, [
6039
- (c(!0), u(E, null, U(r.pendingAttachments, (F, z) => (c(), u("div", {
6064
+ (c(!0), u(I, null, U(r.pendingAttachments, (F, z) => (c(), u("div", {
6040
6065
  key: z,
6041
6066
  class: "wm-attached__chip"
6042
6067
  }, [
@@ -6105,12 +6130,12 @@ function Da(e, t, n, i, r, s) {
6105
6130
  ], 6)) : w("", !0)
6106
6131
  ], 2);
6107
6132
  }
6108
- const Ha = /* @__PURE__ */ R(Ta, [["render", Da], ["__scopeId", "data-v-5c404154"]]), $a = "0.5.10";
6133
+ const Ha = /* @__PURE__ */ B(Ta, [["render", Da], ["__scopeId", "data-v-2143c40c"]]), $a = "0.5.12";
6109
6134
  export {
6110
6135
  le as AIAvatar,
6111
6136
  _e as AVATAR_COLORS,
6112
6137
  ns as ActionResult,
6113
- mi as ApprovalCard,
6138
+ hi as ApprovalCard,
6114
6139
  us as ArtifactFormResponse,
6115
6140
  As as ArtifactInfoCard,
6116
6141
  Hs as ArtifactRenderer,
@@ -6123,14 +6148,14 @@ export {
6123
6148
  Zi as Feedback,
6124
6149
  ji as FormCard,
6125
6150
  cn as Header,
6126
- Le as HumanAvatar,
6151
+ Ee as HumanAvatar,
6127
6152
  Ut as Launcher,
6128
6153
  be as MEDIA_RECORDER_SUPPORTED,
6129
- Lr as MessageList,
6154
+ Er as MessageList,
6130
6155
  Ha as Messenger,
6131
6156
  fa as MoreMenu,
6132
6157
  $n as Onboarding,
6133
- me as SCREEN_CAPTURE_SUPPORTED,
6158
+ he as SCREEN_CAPTURE_SUPPORTED,
6134
6159
  et as SUPPORTED_LANGUAGES,
6135
6160
  ni as SuggestionChips,
6136
6161
  Yt as TeamAvatars,
@@ -6138,18 +6163,18 @@ export {
6138
6163
  $a as VERSION,
6139
6164
  ve as avatarColor,
6140
6165
  ye as avatarInitials,
6141
- Rr as captureScreenshotFile,
6166
+ Br as captureScreenshotFile,
6142
6167
  D as colors,
6143
6168
  Qe as createStore,
6144
6169
  P as createTranslator,
6145
6170
  We as createTransport,
6146
6171
  oe as dateLocale,
6147
6172
  Ha as default,
6148
- Ie as formatTime,
6173
+ Le as formatTime,
6149
6174
  qa as guessAttachmentKind,
6150
- Br as pickRecorderMime,
6175
+ Rr as pickRecorderMime,
6151
6176
  un as renderInlineMarkdown,
6152
- mn as renderMarkdown,
6177
+ hn as renderMarkdown,
6153
6178
  we as resolveLanguage,
6154
6179
  Fr as startScreenRecording,
6155
6180
  Xe as tokensCss,