@_solaris/messenger-widget 0.5.28 → 0.5.29

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 De, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as I, createVNode as $, Transition as Le, withCtx as Be, Fragment as E, renderList as P, withKeys as ue, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as Pe, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as ke } from "vue";
1
+ import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as $, Transition as Ee, withCtx as Ie, Fragment as I, renderList as D, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as F, withDirectives as V, vModelText as X, createTextVNode as ve, resolveDynamicComponent as De, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as Ce } from "vue";
2
2
  const qe = [
3
3
  "connected",
4
4
  "message",
@@ -6,7 +6,7 @@ const qe = [
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], fe = "/client", $e = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
9
+ ], fe = "/client", $e = 5 * 60 * 1e3, Ke = 10 * 60 * 1e3, Ve = 5 * 60 * 1e3;
10
10
  function We(e) {
11
11
  const t = {
12
12
  baseUrl: Ge(e.baseUrl || ""),
@@ -36,9 +36,9 @@ function We(e) {
36
36
  }
37
37
  function i(d, f) {
38
38
  const _ = t.listeners.get(d);
39
- _ && _.forEach((y) => {
39
+ _ && _.forEach((w) => {
40
40
  try {
41
- y(f);
41
+ w(f);
42
42
  } catch (C) {
43
43
  console.error("[transport] listener", d, C);
44
44
  }
@@ -61,19 +61,19 @@ function We(e) {
61
61
  };
62
62
  }
63
63
  async function a(d, f, _) {
64
- const y = await fetch(`${t.baseUrl}${fe}${f}`, {
64
+ const w = await fetch(`${t.baseUrl}${fe}${f}`, {
65
65
  method: d,
66
66
  credentials: "include",
67
67
  headers: s(),
68
68
  body: _ !== void 0 ? JSON.stringify(_) : void 0
69
69
  });
70
- if (!y.ok) {
71
- const C = await l(y), S = new Error(
72
- `HTTP ${y.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || y.statusText}`
70
+ if (!w.ok) {
71
+ const C = await l(w), M = new Error(
72
+ `HTTP ${w.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || w.statusText}`
73
73
  );
74
- throw S.status = y.status, S.body = C, S;
74
+ throw M.status = w.status, M.body = C, M;
75
75
  }
76
- return y.status === 204 ? null : y.json();
76
+ return w.status === 204 ? null : w.json();
77
77
  }
78
78
  async function l(d) {
79
79
  try {
@@ -116,7 +116,7 @@ function We(e) {
116
116
  }
117
117
  const _ = await f.json();
118
118
  t.userId = _.external_id;
119
- const [y, C] = await Promise.all([
119
+ const [w, C] = await Promise.all([
120
120
  fetch(
121
121
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
122
122
  { credentials: "include" }
@@ -130,24 +130,24 @@ function We(e) {
130
130
  return L.json();
131
131
  }),
132
132
  a("GET", "/customers/me")
133
- ]), S = { config: y, customer: (C == null ? void 0 : C.customer) ?? null };
134
- return t.lastBootstrap = S, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
133
+ ]), M = { config: w, customer: (C == null ? void 0 : C.customer) ?? null };
134
+ return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
135
135
  "visibilitychange",
136
136
  t.visibilityHandler
137
- )), de(), S;
137
+ )), de(), M;
138
138
  }
139
139
  async function k() {
140
140
  try {
141
- const d = await B();
141
+ const d = await E();
142
142
  t.lastActivityAt = d.reduce((f, _) => {
143
- const y = _ == null ? void 0 : _.last_message_at;
144
- return y && (!f || y > f) ? y : f;
143
+ const w = _ == null ? void 0 : _.last_message_at;
144
+ return w && (!f || w > f) ? w : f;
145
145
  }, null);
146
146
  } catch (d) {
147
147
  console.error("[transport] initial /conversations failed", d);
148
148
  }
149
149
  }
150
- async function w() {
150
+ async function b() {
151
151
  const d = await a("GET", "/customers/me");
152
152
  return (d == null ? void 0 : d.customer) ?? null;
153
153
  }
@@ -155,7 +155,7 @@ function We(e) {
155
155
  const f = await a("PATCH", "/customers/me", d);
156
156
  return (f == null ? void 0 : f.customer) ?? null;
157
157
  }
158
- async function B() {
158
+ async function E() {
159
159
  const d = await a("GET", "/conversations");
160
160
  return (d == null ? void 0 : d.conversations) ?? [];
161
161
  }
@@ -168,30 +168,30 @@ function We(e) {
168
168
  `/conversations/${encodeURIComponent(d)}`
169
169
  )).conversation;
170
170
  }
171
- async function M(d, f) {
171
+ async function S(d, f) {
172
172
  return (await a(
173
173
  "PATCH",
174
174
  `/conversations/${encodeURIComponent(d)}`,
175
175
  f
176
176
  )).conversation;
177
177
  }
178
- async function F(d, f) {
178
+ async function P(d, f) {
179
179
  return a(
180
180
  "PATCH",
181
181
  `/conversations/${encodeURIComponent(d)}/read`,
182
182
  { message_id: f }
183
183
  );
184
184
  }
185
- async function N(d, f = {}) {
185
+ async function B(d, f = {}) {
186
186
  const _ = new URLSearchParams();
187
187
  f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
188
- const y = _.toString() ? `?${_.toString()}` : "";
188
+ const w = _.toString() ? `?${_.toString()}` : "";
189
189
  return a(
190
190
  "GET",
191
- `/conversations/${encodeURIComponent(d)}/messages${y}`
191
+ `/conversations/${encodeURIComponent(d)}/messages${w}`
192
192
  );
193
193
  }
194
- async function D(d, f) {
194
+ async function U(d, f) {
195
195
  se();
196
196
  const _ = {
197
197
  client_msg_id: f.client_msg_id,
@@ -206,7 +206,7 @@ function We(e) {
206
206
  _
207
207
  );
208
208
  }
209
- async function G(d, f, _) {
209
+ async function Y(d, f, _) {
210
210
  return se(), a(
211
211
  "POST",
212
212
  `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
@@ -214,22 +214,22 @@ function We(e) {
214
214
  );
215
215
  }
216
216
  async function Z(d) {
217
- const f = d.name || "attachment", _ = d.type || "application/octet-stream", y = d.size || 0, C = await a("POST", "/attachments", {
217
+ const f = d.name || "attachment", _ = d.type || "application/octet-stream", w = d.size || 0, C = await a("POST", "/attachments", {
218
218
  mime_type: _,
219
- size_bytes: y,
219
+ size_bytes: w,
220
220
  name: f
221
- }), S = await fetch(C.upload_url, {
221
+ }), M = await fetch(C.upload_url, {
222
222
  method: "PUT",
223
223
  headers: { "Content-Type": _ },
224
224
  body: d
225
225
  });
226
- if (!S.ok)
227
- throw new Error(`HTTP ${S.status} PUT signed upload`);
226
+ if (!M.ok)
227
+ throw new Error(`HTTP ${M.status} PUT signed upload`);
228
228
  return {
229
229
  type: Ye(_),
230
230
  path: C.path,
231
231
  mime_type: _,
232
- size_bytes: y
232
+ size_bytes: w
233
233
  };
234
234
  }
235
235
  async function ee(d) {
@@ -242,7 +242,7 @@ function We(e) {
242
242
  const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
243
243
  return `${t.baseUrl}${fe}/stream?${d}`;
244
244
  }
245
- function V() {
245
+ function K() {
246
246
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
247
247
  try {
248
248
  const d = new EventSource(te(), { withCredentials: !0 });
@@ -258,28 +258,28 @@ function We(e) {
258
258
  }
259
259
  function ne(d, f) {
260
260
  try {
261
- const _ = JSON.parse(f), y = _ && typeof _ == "object" && "data" in _ ? _.data : _;
262
- i(d, y);
261
+ const _ = JSON.parse(f), w = _ && typeof _ == "object" && "data" in _ ? _.data : _;
262
+ i(d, w);
263
263
  } catch (_) {
264
264
  console.error("[transport] bad SSE payload", d, _);
265
265
  }
266
266
  }
267
- function Y() {
267
+ function J() {
268
268
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
269
269
  }
270
270
  function se() {
271
- clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
272
- t.panelOpen || Y();
273
- }, Ve));
271
+ clearTimeout(t.burstTimer), K(), t.panelOpen || (t.burstTimer = setTimeout(() => {
272
+ t.panelOpen || J();
273
+ }, Ke));
274
274
  }
275
275
  function ce(d) {
276
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
276
+ t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), K()) : se();
277
277
  }
278
278
  async function me() {
279
279
  try {
280
- const d = await B(), f = d.reduce((y, C) => {
281
- const S = C == null ? void 0 : C.last_message_at;
282
- return S && (!y || S > y) ? S : y;
280
+ const d = await E(), f = d.reduce((w, C) => {
281
+ const M = C == null ? void 0 : C.last_message_at;
282
+ return M && (!w || M > w) ? M : w;
283
283
  }, null);
284
284
  f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
285
285
  } catch (d) {
@@ -295,18 +295,18 @@ function We(e) {
295
295
  function m() {
296
296
  if (document.hidden)
297
297
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
298
- t.hiddenGraceTimer = null, document.hidden && (h(), Y(), r("paused"));
299
- }, Ke);
298
+ t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
299
+ }, Ve);
300
300
  else {
301
301
  if (t.hiddenGraceTimer) {
302
302
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
303
303
  return;
304
304
  }
305
- r("idle"), de(), t.panelOpen && V();
305
+ r("idle"), de(), t.panelOpen && K();
306
306
  }
307
307
  }
308
308
  function g() {
309
- h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Y(), t.visibilityHandler && (document.removeEventListener(
309
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
310
310
  "visibilitychange",
311
311
  t.visibilityHandler
312
312
  ), t.visibilityHandler = null), t.started = !1;
@@ -317,16 +317,16 @@ function We(e) {
317
317
  stop: g,
318
318
  setPanelOpen: ce,
319
319
  // REST
320
- getCustomer: w,
320
+ getCustomer: b,
321
321
  patchCustomer: T,
322
- listConversations: B,
322
+ listConversations: E,
323
323
  createConversation: A,
324
324
  getConversation: H,
325
- patchConversation: M,
326
- markConversationRead: F,
327
- listMessages: N,
328
- postMessage: D,
329
- postCallback: G,
325
+ patchConversation: S,
326
+ markConversationRead: P,
327
+ listMessages: B,
328
+ postMessage: U,
329
+ postCallback: Y,
330
330
  uploadAttachment: Z,
331
331
  signAttachment: ee,
332
332
  // Read-only state
@@ -354,7 +354,7 @@ function Je() {
354
354
  return t.slice(0, 4).join("") + "-" + t.slice(4, 6).join("") + "-" + t.slice(6, 8).join("") + "-" + t.slice(8, 10).join("") + "-" + t.slice(10, 16).join("");
355
355
  }
356
356
  function Qe(e) {
357
- const t = De({
357
+ const t = Ue({
358
358
  ready: !1,
359
359
  error: null,
360
360
  config: null,
@@ -392,7 +392,7 @@ function Qe(e) {
392
392
  ), n.push(
393
393
  e.on("message", (h) => {
394
394
  const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.message;
395
- !m || !(g != null && g.id) || (V(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
395
+ !m || !(g != null && g.id) || (K(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
396
396
  })
397
397
  ), n.push(
398
398
  e.on("message_stream", (h) => {
@@ -475,23 +475,23 @@ function Qe(e) {
475
475
  async function p(h) {
476
476
  const m = t.paginationByConv[h];
477
477
  if (!(m != null && m.loaded || m != null && m.loading)) {
478
- w(h, { nextCursor: null, loading: !0, loaded: !1 });
478
+ b(h, { nextCursor: null, loading: !0, loaded: !1 });
479
479
  try {
480
480
  const g = await e.listMessages(h, {
481
481
  limit: l
482
482
  }), d = (g == null ? void 0 : g.messages) ?? [], f = t.messagesByConv[h] || [], _ = /* @__PURE__ */ new Set();
483
483
  for (const C of d)
484
484
  (C == null ? void 0 : C.id) != null && _.add(`id:${String(C.id)}`), C != null && C.client_msg_id && _.add(`c:${C.client_msg_id}`);
485
- const y = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
486
- t.messagesByConv[h] = [...d, ...y].sort(
485
+ const w = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
486
+ t.messagesByConv[h] = [...d, ...w].sort(
487
487
  ce
488
- ), w(h, {
488
+ ), b(h, {
489
489
  nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
490
490
  loading: !1,
491
491
  loaded: !0
492
492
  });
493
493
  } catch (g) {
494
- console.error("[store] openConversation failed", g), w(h, {
494
+ console.error("[store] openConversation failed", g), b(h, {
495
495
  nextCursor: null,
496
496
  loading: !1,
497
497
  loaded: !1
@@ -505,33 +505,33 @@ function Qe(e) {
505
505
  if (!m || m.loading || !m.nextCursor) return;
506
506
  const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
507
507
  if (d) {
508
- w(h, { ...m, loading: !0 });
508
+ b(h, { ...m, loading: !0 });
509
509
  try {
510
510
  const _ = await e.listMessages(h, {
511
511
  before: d,
512
512
  limit: l
513
- }), y = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
513
+ }), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], M = /* @__PURE__ */ new Set();
514
514
  for (const x of C)
515
- (x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
516
- const L = y.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
517
- t.messagesByConv[h] = [...L, ...C], w(h, {
515
+ (x == null ? void 0 : x.id) != null && M.add(`id:${String(x.id)}`), x != null && x.client_msg_id && M.add(`c:${x.client_msg_id}`);
516
+ const L = w.filter((x) => !((x == null ? void 0 : x.id) != null && M.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && M.has(`c:${x.client_msg_id}`)));
517
+ t.messagesByConv[h] = [...L, ...C], b(h, {
518
518
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
519
519
  loading: !1,
520
520
  loaded: !0
521
521
  });
522
522
  } catch (_) {
523
- console.error("[store] loadMore failed", _), w(h, { ...m, loading: !1 });
523
+ console.error("[store] loadMore failed", _), b(h, { ...m, loading: !1 });
524
524
  }
525
525
  }
526
526
  }
527
- function w(h, m) {
527
+ function b(h, m) {
528
528
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
529
529
  }
530
530
  async function T(h, m) {
531
531
  const g = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
532
532
  d !== -1 && (t.conversations[d] = g);
533
533
  }
534
- async function B(h) {
534
+ async function E(h) {
535
535
  if (!h) return [];
536
536
  const m = t.messagesByConv[h] || [];
537
537
  let g = "";
@@ -543,13 +543,13 @@ function Qe(e) {
543
543
  g ? { since: g } : {}
544
544
  ), f = (d == null ? void 0 : d.messages) || [];
545
545
  if (!f.length) return [];
546
- const _ = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
547
- for (const S of m)
548
- (S == null ? void 0 : S.id) != null && _.add(String(S.id)), S != null && S.client_msg_id && y.add(S.client_msg_id);
546
+ const _ = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set();
547
+ for (const M of m)
548
+ (M == null ? void 0 : M.id) != null && _.add(String(M.id)), M != null && M.client_msg_id && w.add(M.client_msg_id);
549
549
  const C = [];
550
- for (const S of f) {
551
- const L = (S == null ? void 0 : S.id) != null && _.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
552
- V(h, S), L || C.push(S);
550
+ for (const M of f) {
551
+ const L = (M == null ? void 0 : M.id) != null && _.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && w.has(M.client_msg_id);
552
+ K(h, M), L || C.push(M);
553
553
  }
554
554
  return C;
555
555
  } catch (d) {
@@ -572,9 +572,9 @@ function Qe(e) {
572
572
  var L;
573
573
  const f = (m || "").trim(), _ = Array.isArray(g) && g.length > 0;
574
574
  if (!h || !f && !_) return;
575
- const y = Je(), C = de(h), S = {
576
- id: y,
577
- client_msg_id: y,
575
+ const w = Je(), C = de(h), M = {
576
+ id: w,
577
+ client_msg_id: w,
578
578
  conversation_id: h,
579
579
  type: "content",
580
580
  text_md: f,
@@ -588,23 +588,23 @@ function Qe(e) {
588
588
  ..._ ? { payload: { type: "content", attachments: g } } : {},
589
589
  ...d && typeof d == "object" ? { metadata: d } : {}
590
590
  };
591
- V(h, S);
591
+ K(h, M);
592
592
  try {
593
593
  await e.postMessage(h, {
594
- client_msg_id: y,
594
+ client_msg_id: w,
595
595
  text_md: f,
596
596
  created_at: C,
597
597
  ..._ ? { attachments: g } : {},
598
598
  ...d && typeof d == "object" ? { metadata: d } : {}
599
599
  });
600
600
  } catch (x) {
601
- console.error("[store] send failed", x), Y(h, y, {
601
+ console.error("[store] send failed", x), J(h, w, {
602
602
  _failed: !0,
603
603
  _pending: !1
604
604
  });
605
605
  }
606
606
  }
607
- async function M(h, m, g) {
607
+ async function S(h, m, g) {
608
608
  h != null && (t.awaitingCallback[h] = !0);
609
609
  try {
610
610
  await e.postCallback(h, m, g);
@@ -612,10 +612,10 @@ function Qe(e) {
612
612
  console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
613
613
  }
614
614
  }
615
- const F = /* @__PURE__ */ new Map();
616
- async function N(h) {
615
+ const P = /* @__PURE__ */ new Map();
616
+ async function B(h) {
617
617
  if (!h) return null;
618
- const m = F.get(h);
618
+ const m = P.get(h);
619
619
  if (m != null && m.url) {
620
620
  const g = m.expires_at ? Date.parse(m.expires_at) : 0;
621
621
  if (!g || g - Date.now() > 6e4) return m.url;
@@ -623,7 +623,7 @@ function Qe(e) {
623
623
  try {
624
624
  const g = await e.signAttachment(h);
625
625
  if (g != null && g.signed_url)
626
- return F.set(h, {
626
+ return P.set(h, {
627
627
  url: g.signed_url,
628
628
  expires_at: g.expires_at
629
629
  }), g.signed_url;
@@ -632,8 +632,8 @@ function Qe(e) {
632
632
  }
633
633
  return null;
634
634
  }
635
- async function D(h, { rating: m, comment: g } = {}) {
636
- const d = t.conversations.find((y) => y.id === h), _ = {
635
+ async function U(h, { rating: m, comment: g } = {}) {
636
+ const d = t.conversations.find((w) => w.id === h), _ = {
637
637
  ...(d == null ? void 0 : d.metadata) || {},
638
638
  feedback: {
639
639
  rating: m,
@@ -643,7 +643,7 @@ function Qe(e) {
643
643
  };
644
644
  await T(h, { metadata: _ });
645
645
  }
646
- function G(h) {
646
+ function Y(h) {
647
647
  var g, d;
648
648
  const m = t.messagesByConv[h] || [];
649
649
  for (let f = m.length - 1; f >= 0; f--) {
@@ -657,12 +657,12 @@ function Qe(e) {
657
657
  var g, d, f;
658
658
  const m = t.messagesByConv[h] || [];
659
659
  for (let _ = m.length - 1; _ >= 0; _--) {
660
- const y = m[_];
661
- if (((g = y == null ? void 0 : y.author) == null ? void 0 : g.type) === "user" || (y == null ? void 0 : y.type) === "action" && ((d = y == null ? void 0 : y.payload) == null ? void 0 : d.state) === "pending")
660
+ const w = m[_];
661
+ if (((g = w == null ? void 0 : w.author) == null ? void 0 : g.type) === "user" || (w == null ? void 0 : w.type) === "action" && ((d = w == null ? void 0 : w.payload) == null ? void 0 : d.state) === "pending")
662
662
  return null;
663
- const C = (f = y == null ? void 0 : y.metadata) == null ? void 0 : f.form;
663
+ const C = (f = w == null ? void 0 : w.metadata) == null ? void 0 : f.form;
664
664
  if (C && Array.isArray(C.fields) && C.fields.length > 0)
665
- return { message: y, form: C };
665
+ return { message: w, form: C };
666
666
  }
667
667
  return null;
668
668
  }
@@ -677,14 +677,14 @@ function Qe(e) {
677
677
  function te(h) {
678
678
  var g, d, f, _;
679
679
  const m = t.messagesByConv[h] || [];
680
- for (let y = m.length - 1; y >= 0; y--) {
681
- const C = m[y];
680
+ for (let w = m.length - 1; w >= 0; w--) {
681
+ const C = m[w];
682
682
  if (((g = C == null ? void 0 : C.author) == null ? void 0 : g.type) === "user") return [];
683
683
  if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
684
684
  return [];
685
685
  if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
686
- const S = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
687
- return Array.isArray(S) && S.length ? S.map((L) => {
686
+ const M = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
687
+ return Array.isArray(M) && M.length ? M.map((L) => {
688
688
  if (typeof L == "string") {
689
689
  const x = L.trim();
690
690
  return x ? { label: x, kind: null } : null;
@@ -692,21 +692,21 @@ function Qe(e) {
692
692
  if (L && typeof L == "object" && typeof L.label == "string") {
693
693
  const x = L.label.trim();
694
694
  if (!x) return null;
695
- const Ue = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
696
- return { label: x, kind: Ue };
695
+ const Fe = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
696
+ return { label: x, kind: Fe };
697
697
  }
698
698
  return null;
699
699
  }).filter(Boolean).slice(0, 4) : [];
700
700
  }
701
701
  return [];
702
702
  }
703
- function V(h, m) {
703
+ function K(h, m) {
704
704
  var _;
705
705
  const g = t.messagesByConv[h] || [];
706
706
  let d = -1;
707
707
  m != null && m.client_msg_id && (d = g.findIndex(
708
- (y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id === m.client_msg_id
709
- )), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((y) => ne(y == null ? void 0 : y.id, m.id)));
708
+ (w) => (w == null ? void 0 : w.client_msg_id) && w.client_msg_id === m.client_msg_id
709
+ )), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((w) => ne(w == null ? void 0 : w.id, m.id)));
710
710
  let f;
711
711
  d === -1 ? f = [...g, m].sort(ce) : (f = g.slice(), f[d] = {
712
712
  ...g[d],
@@ -718,10 +718,10 @@ function Qe(e) {
718
718
  function ne(h, m) {
719
719
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
720
720
  }
721
- function Y(h, m, g) {
721
+ function J(h, m, g) {
722
722
  const d = t.messagesByConv[h];
723
723
  if (!d) return;
724
- const f = d.findIndex((y) => y.id === m);
724
+ const f = d.findIndex((w) => w.id === m);
725
725
  if (f === -1) return;
726
726
  const _ = d.slice();
727
727
  _[f] = { ...d[f], ...g }, t.messagesByConv[h] = _;
@@ -733,7 +733,7 @@ function Qe(e) {
733
733
  if (m && (!d.last_message_at || m > d.last_message_at)) {
734
734
  const f = t.conversations.slice();
735
735
  f[g] = { ...d, last_message_at: m }, f.sort(
736
- (_, y) => (y.last_message_at || "").localeCompare(_.last_message_at || "")
736
+ (_, w) => (w.last_message_at || "").localeCompare(_.last_message_at || "")
737
737
  ), t.conversations = f;
738
738
  }
739
739
  }
@@ -763,14 +763,14 @@ function Qe(e) {
763
763
  createConversation: a,
764
764
  openConversation: p,
765
765
  loadMore: k,
766
- fetchSinceLast: B,
766
+ fetchSinceLast: E,
767
767
  patchConversation: T,
768
768
  markConversationRead: A,
769
769
  send: H,
770
- clickCallback: M,
771
- signAttachment: N,
772
- submitFeedback: D,
773
- getPendingApproval: G,
770
+ clickCallback: S,
771
+ signAttachment: B,
772
+ submitFeedback: U,
773
+ getPendingApproval: Y,
774
774
  getActionInFlight: ee,
775
775
  getLatestSuggestions: te,
776
776
  getLatestForm: Z,
@@ -802,13 +802,13 @@ const z = {
802
802
  "#D97706",
803
803
  "#059669"
804
804
  ];
805
- function ve(e = "") {
805
+ function ye(e = "") {
806
806
  return e ? ge[e.charCodeAt(0) % ge.length] : ge[0];
807
807
  }
808
- function ye(e = "") {
808
+ function we(e = "") {
809
809
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
810
810
  }
811
- function Ee(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
811
+ function pe(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
812
812
  return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
813
813
  }
814
814
  const Xe = `
@@ -857,7 +857,7 @@ const Xe = `
857
857
  0% { transform: translateX(110%); opacity: 0; }
858
858
  100% { transform: translateX(0); opacity: 1; }
859
859
  }
860
- `, Ze = "https://api.messenger.victorc.fr", ie = "fr", et = ["fr", "en"], Ce = { fr: "fr-FR", en: "en-US" }, _e = {
860
+ `, Ze = "https://api.messenger.victorc.fr", ae = "fr", et = ["fr", "en"], Ae = { fr: "fr-FR", en: "en-US" }, _e = {
861
861
  fr: {
862
862
  // ── Common ───────────────────────────────────────────────────────
863
863
  "common.newConversation": "Nouvelle conversation",
@@ -1101,16 +1101,16 @@ I reply within seconds.`,
1101
1101
  "export.createdOn": "Created on: {date}"
1102
1102
  }
1103
1103
  };
1104
- function we(e) {
1105
- if (typeof e != "string") return ie;
1104
+ function be(e) {
1105
+ if (typeof e != "string") return ae;
1106
1106
  const t = e.trim().toLowerCase().slice(0, 2);
1107
- return et.includes(t) ? t : ie;
1107
+ return et.includes(t) ? t : ae;
1108
1108
  }
1109
- function oe(e) {
1110
- return Ce[we(e)] || Ce[ie];
1109
+ function re(e) {
1110
+ return Ae[be(e)] || Ae[ae];
1111
1111
  }
1112
1112
  function j(e) {
1113
- const t = we(e), n = _e[t] || _e[ie], i = _e[ie];
1113
+ const t = be(e), n = _e[t] || _e[ae], i = _e[ae];
1114
1114
  return function(s, a) {
1115
1115
  let l = n[s];
1116
1116
  return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
@@ -1119,13 +1119,13 @@ function j(e) {
1119
1119
  )), l);
1120
1120
  };
1121
1121
  }
1122
- function Ae(e, t) {
1122
+ function Se(e, t) {
1123
1123
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1124
1124
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1125
1125
  return (n == null ? void 0 : n.label) || t;
1126
1126
  }
1127
- function Ie(e, t, n) {
1128
- 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));
1127
+ function Be(e, t, n) {
1128
+ return Array.isArray(t) ? t.map((i) => Se(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Se(e, String(t));
1129
1129
  }
1130
1130
  function tt(e, t, n = j()) {
1131
1131
  if (!e || !t) return "";
@@ -1134,7 +1134,7 @@ function tt(e, t, n = j()) {
1134
1134
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1135
1135
  const a = t[s.key];
1136
1136
  if (a == null || a === "") continue;
1137
- const l = Ie(s, a, n);
1137
+ const l = Be(s, a, n);
1138
1138
  l && r.push(`${s.label} :
1139
1139
  ${l}`);
1140
1140
  }
@@ -1148,7 +1148,7 @@ function nt(e, t, n = j()) {
1148
1148
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1149
1149
  const a = t == null ? void 0 : t[s.key];
1150
1150
  if (a == null || a === "") continue;
1151
- const l = Ie(s, a, n);
1151
+ const l = Be(s, a, n);
1152
1152
  if (!l) continue;
1153
1153
  const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1154
1154
  `));
@@ -1162,7 +1162,7 @@ function nt(e, t, n = j()) {
1162
1162
  }
1163
1163
  };
1164
1164
  }
1165
- function ae(e) {
1165
+ function oe(e) {
1166
1166
  var n;
1167
1167
  const t = (n = e == null ? void 0 : e.author) == null ? void 0 : n.type;
1168
1168
  return t === "agent_ia" || t === "agent_human";
@@ -1172,7 +1172,7 @@ function W(e) {
1172
1172
  const t = typeof e == "number" ? e : Number(e);
1173
1173
  return Number.isFinite(t) ? t : null;
1174
1174
  }
1175
- function Se(e, t) {
1175
+ function Me(e, t) {
1176
1176
  let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1177
1177
  for (const i of t)
1178
1178
  i != null && i.created_at && i.created_at > n && (n = i.created_at);
@@ -1214,7 +1214,7 @@ function it(e, t, n, i) {
1214
1214
  }
1215
1215
  function at(e, t, n = j(), i) {
1216
1216
  if (!e) return;
1217
- const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1217
+ const r = it(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1218
1218
  try {
1219
1219
  const a = URL.createObjectURL(s), l = document.createElement("a");
1220
1220
  l.href = a, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(a), 1e3);
@@ -1333,7 +1333,7 @@ const ot = {
1333
1333
  // panel or switched threads during the typing dwell.
1334
1334
  onMessageRevealed(e, t) {
1335
1335
  var r;
1336
- if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !ae(e)) return;
1336
+ if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !oe(e)) return;
1337
1337
  const n = typeof document < "u" && document.hidden;
1338
1338
  this.isOpen && !n && ((r = this.currentConv) == null ? void 0 : r.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1339
1339
  },
@@ -1497,7 +1497,7 @@ const ot = {
1497
1497
  ) + r;
1498
1498
  this.nextRevealAt = a;
1499
1499
  const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
1500
- this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1500
+ this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1501
1501
  }, l);
1502
1502
  this.revealTimers.push(k);
1503
1503
  },
@@ -1512,7 +1512,7 @@ const ot = {
1512
1512
  const n = Date.now(), i = { ...this.revealedAt };
1513
1513
  for (const s of e) {
1514
1514
  if ((s == null ? void 0 : s.id) == null || i[s.id] !== void 0) continue;
1515
- if (!ae(s)) {
1515
+ if (!oe(s)) {
1516
1516
  i[s.id] = n;
1517
1517
  continue;
1518
1518
  }
@@ -1543,7 +1543,7 @@ const ot = {
1543
1543
  paceLiveMessage(e, t) {
1544
1544
  var r;
1545
1545
  if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
1546
- if (!ae(e)) {
1546
+ if (!oe(e)) {
1547
1547
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1548
1548
  return;
1549
1549
  }
@@ -1637,7 +1637,7 @@ function pt(e) {
1637
1637
  }
1638
1638
  return null;
1639
1639
  }
1640
- const R = (e, t) => {
1640
+ const N = (e, t) => {
1641
1641
  const n = e.__vccOpts || e;
1642
1642
  for (const [i, r] of t)
1643
1643
  n[i] = r;
@@ -1656,10 +1656,10 @@ const R = (e, t) => {
1656
1656
  },
1657
1657
  computed: {
1658
1658
  bg() {
1659
- return this.avatarUrl ? "transparent" : ve(this.name);
1659
+ return this.avatarUrl ? "transparent" : ye(this.name);
1660
1660
  },
1661
1661
  initials() {
1662
- return ye(this.name);
1662
+ return we(this.name);
1663
1663
  }
1664
1664
  }
1665
1665
  }, yt = ["src", "alt"];
@@ -1683,7 +1683,7 @@ function wt(e, t, n, i, r, s) {
1683
1683
  }, v(s.initials), 5))
1684
1684
  ], 6);
1685
1685
  }
1686
- const Re = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1686
+ const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
1687
1687
  name: "WmLauncher",
1688
1688
  components: { HumanAvatar: Re },
1689
1689
  inject: {
@@ -1709,9 +1709,9 @@ const Re = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
1709
1709
  return this.peeks.slice(0, bt).reverse();
1710
1710
  }
1711
1711
  }
1712
- }, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Et = ["onClick"], It = ["aria-label"], Rt = ["aria-label"];
1712
+ }, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, It = ["onClick"], Bt = ["aria-label"], Rt = ["aria-label"];
1713
1713
  function Nt(e, t, n, i, r, s) {
1714
- const a = I("HumanAvatar");
1714
+ const a = R("HumanAvatar");
1715
1715
  return c(), u("div", {
1716
1716
  class: "wm-launcherWrap",
1717
1717
  onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
@@ -1719,13 +1719,13 @@ function Nt(e, t, n, i, r, s) {
1719
1719
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1720
1720
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1721
1721
  }, [
1722
- $(Le, { name: "wm-peek" }, {
1723
- default: Be(() => [
1722
+ $(Ee, { name: "wm-peek" }, {
1723
+ default: Ie(() => [
1724
1724
  s.visiblePeeks.length ? (c(), u("div", {
1725
1725
  key: 0,
1726
1726
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1727
1727
  }, [
1728
- (c(!0), u(E, null, P(s.visiblePeeks, (l, p) => (c(), u("div", {
1728
+ (c(!0), u(I, null, D(s.visiblePeeks, (l, p) => (c(), u("div", {
1729
1729
  key: l.convId,
1730
1730
  class: "wm-peek",
1731
1731
  style: q({
@@ -1739,15 +1739,15 @@ function Nt(e, t, n, i, r, s) {
1739
1739
  }),
1740
1740
  onClick: (k) => e.$emit("open", l.convId),
1741
1741
  onKeydown: [
1742
- ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1743
- ue(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1742
+ ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1743
+ ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1744
1744
  ]
1745
1745
  }, [
1746
1746
  o("button", {
1747
1747
  type: "button",
1748
1748
  class: "wm-peek__close",
1749
1749
  "aria-label": s.t("launcher.dismiss"),
1750
- onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
1750
+ onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
1751
1751
  }, [...t[5] || (t[5] = [
1752
1752
  o("svg", {
1753
1753
  width: "9",
@@ -1773,22 +1773,22 @@ function Nt(e, t, n, i, r, s) {
1773
1773
  key: 0,
1774
1774
  class: "wm-peek__avatarBadge",
1775
1775
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1776
- }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : b("", !0)
1776
+ }, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : y("", !0)
1777
1777
  ]),
1778
1778
  o("div", Tt, [
1779
1779
  o("div", xt, [
1780
1780
  o("span", Ot, v(l.senderName || s.t("common.agent")), 1),
1781
1781
  o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1782
1782
  ]),
1783
- o("p", Bt, v(l.preview), 1)
1783
+ o("p", Et, v(l.preview), 1)
1784
1784
  ]),
1785
1785
  o("button", {
1786
1786
  type: "button",
1787
1787
  class: "wm-peek__open",
1788
- onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1789
- }, v(s.t("common.open")), 9, Et)
1788
+ onClick: G((k) => e.$emit("open", l.convId), ["stop"])
1789
+ }, v(s.t("common.open")), 9, It)
1790
1790
  ], 44, Ct))), 128))
1791
- ], 2)) : b("", !0)
1791
+ ], 2)) : y("", !0)
1792
1792
  ]),
1793
1793
  _: 1
1794
1794
  }),
@@ -1819,11 +1819,11 @@ function Nt(e, t, n, i, r, s) {
1819
1819
  }) : s.t("launcher.unreadConversationsOne", {
1820
1820
  count: n.unreadCount
1821
1821
  })
1822
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Rt)) : b("", !0)
1823
- ], 8, It)
1822
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Rt)) : y("", !0)
1823
+ ], 8, Bt)
1824
1824
  ], 32);
1825
1825
  }
1826
- const Ft = /* @__PURE__ */ R(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1"]]), Ut = {
1826
+ const Pt = /* @__PURE__ */ N(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1"]]), Ft = {
1827
1827
  name: "WmAIAvatar",
1828
1828
  props: {
1829
1829
  size: { type: Number, default: 26 },
@@ -1846,16 +1846,16 @@ const Ft = /* @__PURE__ */ R(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1
1846
1846
  },
1847
1847
  computed: {
1848
1848
  initials() {
1849
- return ye(this.name);
1849
+ return we(this.name);
1850
1850
  },
1851
1851
  bgColor() {
1852
- return ve(this.name);
1852
+ return ye(this.name);
1853
1853
  }
1854
1854
  }
1855
- }, Dt = {
1855
+ }, Ut = {
1856
1856
  key: 0,
1857
1857
  class: "wm-aiav__pulse"
1858
- }, Pt = ["src", "alt"], jt = ["width", "height"];
1858
+ }, Dt = ["src", "alt"], jt = ["width", "height"];
1859
1859
  function Ht(e, t, n, i, r, s) {
1860
1860
  return c(), u("div", {
1861
1861
  class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
@@ -1865,7 +1865,7 @@ function Ht(e, t, n, i, r, s) {
1865
1865
  "--wm-avr": n.size * 0.32 + "px"
1866
1866
  })
1867
1867
  }, [
1868
- n.pulse ? (c(), u("div", Dt)) : b("", !0),
1868
+ n.pulse ? (c(), u("div", Ut)) : y("", !0),
1869
1869
  o("div", {
1870
1870
  class: O(["wm-aiav__inner", {
1871
1871
  "wm-aiav__inner--glow": n.pulse,
@@ -1880,7 +1880,7 @@ function Ht(e, t, n, i, r, s) {
1880
1880
  key: 0,
1881
1881
  src: n.imageUrl,
1882
1882
  alt: n.name || ""
1883
- }, null, 8, Pt)) : s.initials ? (c(), u("span", {
1883
+ }, null, 8, Dt)) : s.initials ? (c(), u("span", {
1884
1884
  key: 1,
1885
1885
  style: q({ fontSize: n.size * 0.36 + "px" })
1886
1886
  }, v(s.initials), 5)) : (c(), u("svg", {
@@ -1914,7 +1914,7 @@ function Ht(e, t, n, i, r, s) {
1914
1914
  ], 6)
1915
1915
  ], 6);
1916
1916
  }
1917
- const le = /* @__PURE__ */ R(Ut, [["render", Ht], ["__scopeId", "data-v-6f7f685d"]]), zt = {
1917
+ const le = /* @__PURE__ */ N(Ft, [["render", Ht], ["__scopeId", "data-v-6f7f685d"]]), zt = {
1918
1918
  name: "WmTeamAvatars",
1919
1919
  props: {
1920
1920
  members: { type: Array, default: () => [] },
@@ -1930,16 +1930,16 @@ const le = /* @__PURE__ */ R(Ut, [["render", Ht], ["__scopeId", "data-v-6f7f685d
1930
1930
  },
1931
1931
  methods: {
1932
1932
  colorFor(e) {
1933
- return e.avatar_url ? "transparent" : ve(e.name || "");
1933
+ return e.avatar_url ? "transparent" : ye(e.name || "");
1934
1934
  },
1935
1935
  initialsFor(e) {
1936
- return ye(e.name || "");
1936
+ return we(e.name || "");
1937
1937
  }
1938
1938
  }
1939
1939
  }, qt = {
1940
1940
  key: 0,
1941
1941
  class: "wm-team"
1942
- }, $t = ["src", "alt"], Vt = { key: 1 }, Kt = {
1942
+ }, $t = ["src", "alt"], Kt = { key: 1 }, Vt = {
1943
1943
  key: 0,
1944
1944
  class: "wm-team__label"
1945
1945
  };
@@ -1949,7 +1949,7 @@ function Wt(e, t, n, i, r, s) {
1949
1949
  class: "wm-team__stack",
1950
1950
  style: q({ width: s.stackWidth + "px" })
1951
1951
  }, [
1952
- (c(!0), u(E, null, P(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1952
+ (c(!0), u(I, null, D(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1953
1953
  key: l,
1954
1954
  class: "wm-team__pill",
1955
1955
  style: q({
@@ -1962,13 +1962,13 @@ function Wt(e, t, n, i, r, s) {
1962
1962
  key: 0,
1963
1963
  src: a.avatar_url,
1964
1964
  alt: a.name || ""
1965
- }, null, 8, $t)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
1965
+ }, null, 8, $t)) : (c(), u("span", Kt, v(s.initialsFor(a)), 1))
1966
1966
  ], 4))), 128))
1967
1967
  ], 4),
1968
- n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
1969
- ])) : b("", !0);
1968
+ n.responseLabel ? (c(), u("span", Vt, v(n.responseLabel), 1)) : y("", !0)
1969
+ ])) : y("", !0);
1970
1970
  }
1971
- const Gt = /* @__PURE__ */ R(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1971
+ const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
1972
1972
  name: "WmHeader",
1973
1973
  components: { AIAvatar: le, TeamAvatars: Gt },
1974
1974
  inject: {
@@ -2015,7 +2015,7 @@ const Gt = /* @__PURE__ */ R(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
2015
2015
  class: "wm-header__fill"
2016
2016
  }, sn = { class: "wm-header__actions" }, rn = ["aria-label", "title"], an = ["aria-label", "title"];
2017
2017
  function on(e, t, n, i, r, s) {
2018
- const a = I("AIAvatar"), l = I("TeamAvatars");
2018
+ const a = R("AIAvatar"), l = R("TeamAvatars");
2019
2019
  return c(), u("div", Jt, [
2020
2020
  n.showBack ? (c(), u("button", {
2021
2021
  key: 0,
@@ -2038,7 +2038,7 @@ function on(e, t, n, i, r, s) {
2038
2038
  o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2039
2039
  ], -1)
2040
2040
  ])], 8, Qt)) : (c(), u("div", Xt)),
2041
- n.showIdentity ? (c(), u(E, { key: 2 }, [
2041
+ n.showIdentity ? (c(), u(I, { key: 2 }, [
2042
2042
  o("div", Zt, [
2043
2043
  $(a, {
2044
2044
  size: 30,
@@ -2049,11 +2049,11 @@ function on(e, t, n, i, r, s) {
2049
2049
  o("div", en, [
2050
2050
  o("div", tn, v(n.title), 1)
2051
2051
  ]),
2052
- s.hasTeam ? (c(), U(l, {
2052
+ s.hasTeam ? (c(), F(l, {
2053
2053
  key: 0,
2054
2054
  members: s.displayedTeamMembers,
2055
2055
  "response-label": ""
2056
- }, null, 8, ["members"])) : b("", !0)
2056
+ }, null, 8, ["members"])) : y("", !0)
2057
2057
  ], 64)) : (c(), u("div", nn)),
2058
2058
  o("div", sn, [
2059
2059
  n.showMore ? (c(), u("button", {
@@ -2087,7 +2087,7 @@ function on(e, t, n, i, r, s) {
2087
2087
  r: "1.6"
2088
2088
  })
2089
2089
  ], -1)
2090
- ])], 10, rn)) : b("", !0),
2090
+ ])], 10, rn)) : y("", !0),
2091
2091
  n.showClose ? (c(), u("button", {
2092
2092
  key: 1,
2093
2093
  type: "button",
@@ -2109,30 +2109,30 @@ function on(e, t, n, i, r, s) {
2109
2109
  }, [
2110
2110
  o("path", { d: "M18 6L6 18M6 6l12 12" })
2111
2111
  ], -1)
2112
- ])], 8, an)) : b("", !0)
2112
+ ])], 8, an)) : y("", !0)
2113
2113
  ])
2114
2114
  ]);
2115
2115
  }
2116
- const ln = /* @__PURE__ */ R(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
2116
+ const ln = /* @__PURE__ */ N(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
2117
2117
  function Ne(e) {
2118
2118
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2119
2119
  }
2120
2120
  function cn(e) {
2121
2121
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
2122
2122
  }
2123
- const Me = "";
2124
- function re(e) {
2123
+ const Te = "";
2124
+ function ie(e) {
2125
2125
  let t = e;
2126
2126
  const n = [];
2127
2127
  return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
2128
2128
  const s = n.length;
2129
- return n.push(r), `${Me}CODE${s}${Me}`;
2129
+ return n.push(r), `${Te}CODE${s}${Te}`;
2130
2130
  }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => cn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
2131
2131
  }
2132
2132
  function dn(e) {
2133
2133
  if (!e) return "";
2134
2134
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2135
- return re(Ne(t));
2135
+ return ie(Ne(t));
2136
2136
  }
2137
2137
  function un(e) {
2138
2138
  if (!e) return "";
@@ -2160,25 +2160,25 @@ function un(e) {
2160
2160
  if (!T) break;
2161
2161
  k.push(T[1]), i++;
2162
2162
  }
2163
- const w = k.map((T) => `<li>${re(T)}</li>`).join("");
2163
+ const b = k.map((T) => `<li>${ie(T)}</li>`).join("");
2164
2164
  n.push({
2165
2165
  type: "block",
2166
- html: `<ul class="wm-md-ul">${w}</ul>`
2166
+ html: `<ul class="wm-md-ul">${b}</ul>`
2167
2167
  });
2168
2168
  continue;
2169
2169
  }
2170
2170
  const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
2171
2171
  if (l) {
2172
- const k = parseInt(l[1], 10), w = [l[2]];
2172
+ const k = parseInt(l[1], 10), b = [l[2]];
2173
2173
  for (i++; i < t.length; ) {
2174
2174
  const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
2175
2175
  if (!A) break;
2176
- w.push(A[1]), i++;
2176
+ b.push(A[1]), i++;
2177
2177
  }
2178
- const T = w.map((A) => `<li>${re(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
2178
+ const T = b.map((A) => `<li>${ie(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
2179
2179
  n.push({
2180
2180
  type: "block",
2181
- html: `<ol class="wm-md-ol"${B}>${T}</ol>`
2181
+ html: `<ol class="wm-md-ol"${E}>${T}</ol>`
2182
2182
  });
2183
2183
  continue;
2184
2184
  }
@@ -2187,11 +2187,11 @@ function un(e) {
2187
2187
  const k = p[1].length;
2188
2188
  n.push({
2189
2189
  type: "block",
2190
- html: `<h${k} class="wm-md-h wm-md-h${k}">${re(p[2])}</h${k}>`
2190
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${ie(p[2])}</h${k}>`
2191
2191
  }), i++;
2192
2192
  continue;
2193
2193
  }
2194
- n.push({ type: "text", html: re(s) }), i++;
2194
+ n.push({ type: "text", html: ie(s) }), i++;
2195
2195
  }
2196
2196
  let r = "";
2197
2197
  for (let s = 0; s < n.length; s++) {
@@ -2203,7 +2203,7 @@ function un(e) {
2203
2203
  }
2204
2204
  return r;
2205
2205
  }
2206
- const Te = {
2206
+ const xe = {
2207
2207
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
2208
2208
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
2209
2209
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2253,7 +2253,7 @@ const Te = {
2253
2253
  },
2254
2254
  methods: {
2255
2255
  iconPath(e) {
2256
- return Te[e] || Te.link;
2256
+ return xe[e] || xe.link;
2257
2257
  },
2258
2258
  renderPreview(e) {
2259
2259
  return dn(e);
@@ -2262,7 +2262,7 @@ const Te = {
2262
2262
  if (!e) return "";
2263
2263
  const t = new Date(e);
2264
2264
  if (Number.isNaN(t.getTime())) return "";
2265
- const n = oe(this.wmLocale()), i = /* @__PURE__ */ new Date();
2265
+ const n = re(this.wmLocale()), i = /* @__PURE__ */ new Date();
2266
2266
  if (t.toDateString() === i.toDateString())
2267
2267
  return t.toLocaleTimeString(n, {
2268
2268
  hour: "2-digit",
@@ -2297,7 +2297,7 @@ const Te = {
2297
2297
  }, On = {
2298
2298
  key: 1,
2299
2299
  class: "wm-onb__section"
2300
- }, Ln = { class: "wm-onb__section-title" }, Bn = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], In = { class: "wm-onb__list" }, Rn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Un = { class: "wm-onb__thread-title" }, Dn = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, jn = {
2300
+ }, Ln = { class: "wm-onb__section-title" }, En = { class: "wm-onb__search" }, In = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, Rn = ["onClick"], Nn = ["aria-label"], Pn = { class: "wm-onb__thread-body" }, Fn = { class: "wm-onb__thread-title" }, Un = ["innerHTML"], Dn = { class: "wm-onb__thread-meta" }, jn = {
2301
2301
  key: 0,
2302
2302
  class: "wm-onb__thread-time"
2303
2303
  }, Hn = {
@@ -2305,7 +2305,7 @@ const Te = {
2305
2305
  class: "wm-onb__empty"
2306
2306
  };
2307
2307
  function zn(e, t, n, i, r, s) {
2308
- const a = I("AIAvatar");
2308
+ const a = R("AIAvatar");
2309
2309
  return c(), u("div", mn, [
2310
2310
  o("div", fn, [
2311
2311
  t[2] || (t[2] = o("svg", {
@@ -2381,7 +2381,7 @@ function zn(e, t, n, i, r, s) {
2381
2381
  o("div", {
2382
2382
  class: O(s.quickLinksLayout)
2383
2383
  }, [
2384
- (c(!0), u(E, null, P(n.quickLinks, (l, p) => (c(), u("button", {
2384
+ (c(!0), u(I, null, D(n.quickLinks, (l, p) => (c(), u("button", {
2385
2385
  key: p,
2386
2386
  type: "button",
2387
2387
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
@@ -2396,14 +2396,14 @@ function zn(e, t, n, i, r, s) {
2396
2396
  ]),
2397
2397
  o("span", Mn, [
2398
2398
  o("span", Tn, v(l.label), 1),
2399
- l.description ? (c(), u("span", xn, v(l.description), 1)) : b("", !0)
2399
+ l.description ? (c(), u("span", xn, v(l.description), 1)) : y("", !0)
2400
2400
  ])
2401
2401
  ], 10, kn))), 128))
2402
2402
  ], 2)
2403
- ])) : b("", !0),
2403
+ ])) : y("", !0),
2404
2404
  n.openThreads.length ? (c(), u("div", On, [
2405
2405
  o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
2406
- o("div", Bn, [
2406
+ o("div", En, [
2407
2407
  t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
2408
2408
  o("svg", {
2409
2409
  width: "12",
@@ -2419,17 +2419,17 @@ function zn(e, t, n, i, r, s) {
2419
2419
  o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2420
2420
  ])
2421
2421
  ], -1)),
2422
- K(o("input", {
2422
+ V(o("input", {
2423
2423
  "onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
2424
2424
  type: "text",
2425
2425
  placeholder: s.t("onboarding.search"),
2426
2426
  "aria-label": s.t("onboarding.search")
2427
- }, null, 8, En), [
2427
+ }, null, 8, In), [
2428
2428
  [X, r.query]
2429
2429
  ])
2430
2430
  ]),
2431
- o("div", In, [
2432
- (c(!0), u(E, null, P(s.filteredThreads, (l) => (c(), u("button", {
2431
+ o("div", Bn, [
2432
+ (c(!0), u(I, null, D(s.filteredThreads, (l) => (c(), u("button", {
2433
2433
  key: l.id,
2434
2434
  type: "button",
2435
2435
  class: "wm-onb__thread",
@@ -2455,17 +2455,17 @@ function zn(e, t, n, i, r, s) {
2455
2455
  key: 0,
2456
2456
  class: "wm-onb__thread-dot",
2457
2457
  "aria-label": s.t("onboarding.unread")
2458
- }, null, 8, Nn)) : b("", !0)
2458
+ }, null, 8, Nn)) : y("", !0)
2459
2459
  ], 2),
2460
- o("span", Fn, [
2461
- o("span", Un, v(l.title), 1),
2460
+ o("span", Pn, [
2461
+ o("span", Fn, v(l.title), 1),
2462
2462
  o("span", {
2463
2463
  class: "wm-onb__thread-preview",
2464
2464
  innerHTML: s.renderPreview(l.preview)
2465
- }, null, 8, Dn)
2465
+ }, null, 8, Un)
2466
2466
  ]),
2467
- o("span", Pn, [
2468
- s.formatTs(l._ts) ? (c(), u("span", jn, v(s.formatTs(l._ts)), 1)) : b("", !0),
2467
+ o("span", Dn, [
2468
+ s.formatTs(l._ts) ? (c(), u("span", jn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2469
2469
  t[6] || (t[6] = o("svg", {
2470
2470
  width: "14",
2471
2471
  height: "14",
@@ -2482,16 +2482,16 @@ function zn(e, t, n, i, r, s) {
2482
2482
  ], -1))
2483
2483
  ])
2484
2484
  ], 8, Rn))), 128)),
2485
- s.filteredThreads.length ? b("", !0) : (c(), u("div", Hn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2485
+ s.filteredThreads.length ? y("", !0) : (c(), u("div", Hn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2486
2486
  ])
2487
- ])) : b("", !0)
2487
+ ])) : y("", !0)
2488
2488
  ]);
2489
2489
  }
2490
- const qn = /* @__PURE__ */ R(hn, [["render", zn], ["__scopeId", "data-v-a85aae63"]]);
2490
+ const qn = /* @__PURE__ */ N(hn, [["render", zn], ["__scopeId", "data-v-a85aae63"]]);
2491
2491
  function $n(e) {
2492
2492
  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();
2493
2493
  }
2494
- const Vn = {
2494
+ const Kn = {
2495
2495
  name: "WmActionResult",
2496
2496
  props: {
2497
2497
  state: { type: String, default: "success" },
@@ -2504,7 +2504,7 @@ const Vn = {
2504
2504
  return $n(this.detail);
2505
2505
  }
2506
2506
  }
2507
- }, Kn = {
2507
+ }, Vn = {
2508
2508
  class: "wm-result__icon",
2509
2509
  "aria-hidden": "true"
2510
2510
  }, Wn = {
@@ -2552,7 +2552,7 @@ function es(e, t, n, i, r, s) {
2552
2552
  return c(), u("div", {
2553
2553
  class: O(["wm-result", `wm-result--${n.state}`])
2554
2554
  }, [
2555
- o("span", Kn, [
2555
+ o("span", Vn, [
2556
2556
  n.state === "success" ? (c(), u("svg", Wn, [...t[0] || (t[0] = [
2557
2557
  o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2558
2558
  ])])) : n.state === "rejected" ? (c(), u("svg", Gn, [...t[1] || (t[1] = [
@@ -2582,17 +2582,17 @@ function es(e, t, n, i, r, s) {
2582
2582
  ]),
2583
2583
  o("span", Qn, [
2584
2584
  o("span", Xn, v(n.label), 1),
2585
- s.detailText ? (c(), u(E, { key: 0 }, [
2585
+ s.detailText ? (c(), u(I, { key: 0 }, [
2586
2586
  t[4] || (t[4] = o("span", {
2587
2587
  class: "wm-result__sep",
2588
2588
  "aria-hidden": "true"
2589
2589
  }, " · ", -1)),
2590
2590
  o("span", Zn, v(s.detailText), 1)
2591
- ], 64)) : b("", !0)
2591
+ ], 64)) : y("", !0)
2592
2592
  ])
2593
2593
  ], 2);
2594
2594
  }
2595
- const ts = /* @__PURE__ */ R(Vn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
2595
+ const ts = /* @__PURE__ */ N(Kn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
2596
2596
  name: "WmArtifactFormResponse",
2597
2597
  inject: {
2598
2598
  // Translator shared by the Messenger shell; French fallback when
@@ -2627,11 +2627,11 @@ function cs(e, t, n, i, r, s) {
2627
2627
  }, [
2628
2628
  o("polyline", { points: "20 6 9 17 4 12" })
2629
2629
  ], -1)),
2630
- pe(" " + v(s.t("form.sent")), 1)
2630
+ ve(" " + v(s.t("form.sent")), 1)
2631
2631
  ])
2632
2632
  ]),
2633
2633
  o("div", os, [
2634
- (c(!0), u(E, null, P(s.fields, (a, l) => (c(), u("div", {
2634
+ (c(!0), u(I, null, D(s.fields, (a, l) => (c(), u("div", {
2635
2635
  key: l,
2636
2636
  class: "wm-art__field"
2637
2637
  }, [
@@ -2646,7 +2646,7 @@ function cs(e, t, n, i, r, s) {
2646
2646
  ])
2647
2647
  ]);
2648
2648
  }
2649
- const ds = /* @__PURE__ */ R(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
2649
+ const ds = /* @__PURE__ */ N(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
2650
2650
  name: "WmArtifactInfoCard",
2651
2651
  props: {
2652
2652
  data: { type: Object, required: !0 }
@@ -2682,11 +2682,11 @@ function ks(e, t, n, i, r, s) {
2682
2682
  alt: n.data.title || "",
2683
2683
  loading: "lazy"
2684
2684
  }, null, 8, fs)
2685
- ])) : b("", !0),
2685
+ ])) : y("", !0),
2686
2686
  o("div", gs, [
2687
2687
  o("div", _s, [
2688
2688
  o("div", ps, v(n.data.title), 1),
2689
- n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : b("", !0)
2689
+ n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : y("", !0)
2690
2690
  ]),
2691
2691
  n.data.badge && n.data.badge.label ? (c(), u("span", {
2692
2692
  key: 0,
@@ -2694,11 +2694,11 @@ function ks(e, t, n, i, r, s) {
2694
2694
  "wm-art__badge",
2695
2695
  `wm-art__badge--${n.data.badge.tone || "neutral"}`
2696
2696
  ])
2697
- }, v(n.data.badge.label), 3)) : b("", !0)
2697
+ }, v(n.data.badge.label), 3)) : y("", !0)
2698
2698
  ]),
2699
2699
  s.hasBody ? (c(), u("div", ys, [
2700
- n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : b("", !0),
2701
- s.fields.length ? (c(!0), u(E, { key: 1 }, P(s.fields, (a, l) => (c(), u("div", {
2700
+ n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : y("", !0),
2701
+ s.fields.length ? (c(!0), u(I, { key: 1 }, D(s.fields, (a, l) => (c(), u("div", {
2702
2702
  key: l,
2703
2703
  class: "wm-art__field"
2704
2704
  }, [
@@ -2709,11 +2709,11 @@ function ks(e, t, n, i, r, s) {
2709
2709
  { "wm-art__fieldValue--multi": a.multiline }
2710
2710
  ])
2711
2711
  }, v(a.value), 3)
2712
- ]))), 128)) : b("", !0)
2713
- ])) : b("", !0)
2712
+ ]))), 128)) : y("", !0)
2713
+ ])) : y("", !0)
2714
2714
  ]);
2715
2715
  }
2716
- const Cs = /* @__PURE__ */ R(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
2716
+ const Cs = /* @__PURE__ */ N(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
2717
2717
  function As(e, t, n) {
2718
2718
  if (!e) return "";
2719
2719
  const i = new Date(e);
@@ -2748,7 +2748,7 @@ const Ss = {
2748
2748
  var e;
2749
2749
  return As(
2750
2750
  (e = this.data) == null ? void 0 : e.created_at,
2751
- oe(this.wmLocale()),
2751
+ re(this.wmLocale()),
2752
2752
  this.t("ticket.dateAt")
2753
2753
  );
2754
2754
  }
@@ -2774,13 +2774,13 @@ const Ss = {
2774
2774
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2775
2775
  }
2776
2776
  }
2777
- }, Ms = { class: "wm-art wm-art--ticket" }, Ts = { class: "wm-art__head wm-tk__head" }, xs = { class: "wm-art__title wm-tk__title" }, Os = { class: "wm-tk__sub" }, Ls = { class: "wm-tk__ref" }, Bs = {
2777
+ }, Ms = { class: "wm-art wm-art--ticket" }, Ts = { class: "wm-art__head wm-tk__head" }, xs = { class: "wm-art__title wm-tk__title" }, Os = { class: "wm-tk__sub" }, Ls = { class: "wm-tk__ref" }, Es = {
2778
2778
  key: 0,
2779
2779
  class: "wm-tk__text"
2780
- }, Es = {
2780
+ }, Is = {
2781
2781
  key: 0,
2782
2782
  class: "wm-art__body"
2783
- }, Is = { class: "wm-art__fieldLabel" }, Rs = ["data-level"], Ns = {
2783
+ }, Bs = { class: "wm-art__fieldLabel" }, Rs = ["data-level"], Ns = {
2784
2784
  key: 1,
2785
2785
  class: "wm-tk__date",
2786
2786
  width: "12",
@@ -2792,11 +2792,11 @@ const Ss = {
2792
2792
  "stroke-linecap": "round",
2793
2793
  "stroke-linejoin": "round",
2794
2794
  "aria-hidden": "true"
2795
- }, Fs = {
2795
+ }, Ps = {
2796
2796
  key: 1,
2797
2797
  class: "wm-art__footer wm-tk__footer"
2798
2798
  };
2799
- function Us(e, t, n, i, r, s) {
2799
+ function Fs(e, t, n, i, r, s) {
2800
2800
  return c(), u("div", Ms, [
2801
2801
  o("div", Ts, [
2802
2802
  o("div", xs, v(n.data.title), 1),
@@ -2829,17 +2829,17 @@ function Us(e, t, n, i, r, s) {
2829
2829
  class: "wm-tk__dot",
2830
2830
  "aria-hidden": "true"
2831
2831
  }, null, -1)),
2832
- pe(" " + v(n.data.status.label), 1)
2832
+ ve(" " + v(n.data.status.label), 1)
2833
2833
  ], 2)
2834
2834
  ]),
2835
- n.data.body ? (c(), u("div", Bs, v(n.data.body), 1)) : b("", !0)
2835
+ n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0)
2836
2836
  ]),
2837
- s.fields.length ? (c(), u("div", Es, [
2838
- (c(!0), u(E, null, P(s.fields, (a, l) => (c(), u("div", {
2837
+ s.fields.length ? (c(), u("div", Is, [
2838
+ (c(!0), u(I, null, D(s.fields, (a, l) => (c(), u("div", {
2839
2839
  key: l,
2840
2840
  class: "wm-art__field"
2841
2841
  }, [
2842
- o("div", Is, v(a.label), 1),
2842
+ o("div", Bs, v(a.label), 1),
2843
2843
  o("div", {
2844
2844
  class: O([
2845
2845
  "wm-art__fieldValue",
@@ -2885,12 +2885,12 @@ function Us(e, t, n, i, r, s) {
2885
2885
  rx: "2"
2886
2886
  }, null, -1),
2887
2887
  o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2888
- ])])) : b("", !0),
2888
+ ])])) : y("", !0),
2889
2889
  o("span", null, v(a.value), 1)
2890
2890
  ], 2)
2891
2891
  ]))), 128))
2892
- ])) : b("", !0),
2893
- n.data.created_at ? (c(), u("div", Fs, [
2892
+ ])) : y("", !0),
2893
+ n.data.created_at ? (c(), u("div", Ps, [
2894
2894
  t[4] || (t[4] = o("svg", {
2895
2895
  width: "11",
2896
2896
  height: "11",
@@ -2912,13 +2912,13 @@ function Us(e, t, n, i, r, s) {
2912
2912
  o("path", { d: "M16 2v4M8 2v4M3 10h18" })
2913
2913
  ], -1)),
2914
2914
  o("span", null, v(s.formattedDate), 1)
2915
- ])) : b("", !0)
2915
+ ])) : y("", !0)
2916
2916
  ]);
2917
2917
  }
2918
- const Ds = /* @__PURE__ */ R(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), Ps = {
2918
+ const Us = /* @__PURE__ */ N(Ss, [["render", Fs], ["__scopeId", "data-v-5f30c914"]]), Ds = {
2919
2919
  form_response: ds,
2920
2920
  info_card: Cs,
2921
- ticket: Ds
2921
+ ticket: Us
2922
2922
  }, js = {
2923
2923
  name: "WmArtifactRenderer",
2924
2924
  props: {
@@ -2930,17 +2930,17 @@ const Ds = /* @__PURE__ */ R(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914
2930
2930
  component() {
2931
2931
  var t;
2932
2932
  const e = (t = this.artifact) == null ? void 0 : t.kind;
2933
- return e && Ps[e] || null;
2933
+ return e && Ds[e] || null;
2934
2934
  }
2935
2935
  }
2936
2936
  };
2937
2937
  function Hs(e, t, n, i, r, s) {
2938
- return s.component ? (c(), U(Pe(s.component), {
2938
+ return s.component ? (c(), F(De(s.component), {
2939
2939
  key: 0,
2940
2940
  data: n.artifact.data
2941
- }, null, 8, ["data"])) : b("", !0);
2941
+ }, null, 8, ["data"])) : y("", !0);
2942
2942
  }
2943
- const zs = /* @__PURE__ */ R(js, [["render", Hs]]), qs = {
2943
+ const zs = /* @__PURE__ */ N(js, [["render", Hs]]), qs = {
2944
2944
  name: "WmAttachmentPreview",
2945
2945
  inject: {
2946
2946
  signAttachmentFn: { default: null },
@@ -3008,7 +3008,7 @@ const zs = /* @__PURE__ */ R(js, [["render", Hs]]), qs = {
3008
3008
  this.safeHref === "#" && e.preventDefault();
3009
3009
  }
3010
3010
  }
3011
- }, $s = ["href"], Vs = ["src", "alt"], Ks = ["src"], Ws = ["src"], Gs = ["href", "download"], Ys = { class: "wm-att__main" }, Js = { class: "wm-att__name" }, Qs = {
3011
+ }, $s = ["href"], Ks = ["src", "alt"], Vs = ["src"], Ws = ["src"], Gs = ["href", "download"], Ys = { class: "wm-att__main" }, Js = { class: "wm-att__name" }, Qs = {
3012
3012
  key: 0,
3013
3013
  class: "wm-att__meta"
3014
3014
  }, Xs = {
@@ -3031,13 +3031,13 @@ function Zs(e, t, n, i, r, s) {
3031
3031
  src: r.url,
3032
3032
  alt: s.displayName,
3033
3033
  loading: "lazy"
3034
- }, null, 8, Vs)
3034
+ }, null, 8, Ks)
3035
3035
  ], 8, $s)) : s.kind === "audio" && r.url ? (c(), u("audio", {
3036
3036
  key: 1,
3037
3037
  src: r.url,
3038
3038
  controls: "",
3039
3039
  preload: "metadata"
3040
- }, null, 8, Ks)) : s.kind === "video" && r.url ? (c(), u("video", {
3040
+ }, null, 8, Vs)) : s.kind === "video" && r.url ? (c(), u("video", {
3041
3041
  key: 2,
3042
3042
  src: r.url,
3043
3043
  controls: "",
@@ -3069,13 +3069,13 @@ function Zs(e, t, n, i, r, s) {
3069
3069
  ], -1)),
3070
3070
  o("span", Ys, [
3071
3071
  o("span", Js, v(s.displayName), 1),
3072
- s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
3072
+ s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : y("", !0)
3073
3073
  ]),
3074
- r.loading ? (c(), u("span", Xs)) : b("", !0)
3074
+ r.loading ? (c(), u("span", Xs)) : y("", !0)
3075
3075
  ], 8, Gs))
3076
3076
  ], 2);
3077
3077
  }
3078
- const er = /* @__PURE__ */ R(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62"]]), tr = {
3078
+ const er = /* @__PURE__ */ N(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62"]]), tr = {
3079
3079
  name: "WmBubble",
3080
3080
  props: {
3081
3081
  role: { type: String, default: "ai" },
@@ -3097,7 +3097,7 @@ function sr(e, t, n, i, r, s) {
3097
3097
  ], !0)
3098
3098
  ], 2);
3099
3099
  }
3100
- const rr = /* @__PURE__ */ R(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
3100
+ const rr = /* @__PURE__ */ N(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
3101
3101
  function or(e, t, n, i, r, s) {
3102
3102
  return c(), u("div", ar, [...t[0] || (t[0] = [
3103
3103
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
@@ -3105,7 +3105,7 @@ function or(e, t, n, i, r, s) {
3105
3105
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3106
3106
  ])]);
3107
3107
  }
3108
- const lr = /* @__PURE__ */ R(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
3108
+ const lr = /* @__PURE__ */ N(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
3109
3109
  function Q(e) {
3110
3110
  return e ? e.client_msg_id || e.id : "";
3111
3111
  }
@@ -3181,7 +3181,12 @@ const cr = {
3181
3181
  // seuil "pinned" — affiche un bouton flottant pour revenir en
3182
3182
  // bas. Recalculé sur chaque `onScroll` et après chaque restore
3183
3183
  // de position.
3184
- showScrollDown: !1
3184
+ showScrollDown: !1,
3185
+ // Clé d'item actuellement long-pressé : affiche la meta-row
3186
+ // (rôle • heure) sous la bulle correspondante tant que la
3187
+ // pression est maintenue. Null hors long-press, ou pour la
3188
+ // dernière row du cluster (sa meta est déjà rendue en pied).
3189
+ pressedItemKey: null
3185
3190
  };
3186
3191
  },
3187
3192
  computed: {
@@ -3195,8 +3200,8 @@ const cr = {
3195
3200
  const l = this.roleOf(a);
3196
3201
  if (l === "system") {
3197
3202
  if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3198
- const w = e[e.length - 1];
3199
- w && w.role === "ai" ? w.messages.push(a) : e.push({
3203
+ const b = e[e.length - 1];
3204
+ b && b.role === "ai" ? b.messages.push(a) : e.push({
3200
3205
  key: `g-${Q(a)}`,
3201
3206
  role: "ai",
3202
3207
  agentName: "",
@@ -3278,7 +3283,7 @@ const cr = {
3278
3283
  },
3279
3284
  beforeUnmount() {
3280
3285
  var e;
3281
- (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame);
3286
+ (e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame), this._pressTimer && clearTimeout(this._pressTimer);
3282
3287
  },
3283
3288
  updated() {
3284
3289
  this.scheduleMeasure();
@@ -3515,9 +3520,9 @@ const cr = {
3515
3520
  // doit garder son arrondi.
3516
3521
  cornersFor(e, t) {
3517
3522
  var Z, ee, te;
3518
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (V, ne, Y) => V != null && T != null ? V + H >= T : ne === Y || ne === "card" && Y === "bubble";
3519
- let F = l, N = l, D = l, G = l;
3520
- return a ? (k && (N = p), (w || !s) && (D = p), k && M(B, k, i == null ? void 0 : i.top) && (F = p), w && M(A, w, i == null ? void 0 : i.bottom) && (G = p)) : (k && (F = p), (w || !s) && (G = p), k && M(B, k, i == null ? void 0 : i.top) && (N = p), w && M(A, w, i == null ? void 0 : i.bottom) && (D = p)), { tl: F, tr: N, br: D, bl: G };
3523
+ const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (K, ne, J) => K != null && T != null ? K + H >= T : ne === J || ne === "card" && J === "bubble";
3524
+ let P = l, B = l, U = l, Y = l;
3525
+ return a ? (k && (B = p), (b || !s) && (U = p), k && S(E, k, i == null ? void 0 : i.top) && (P = p), b && S(A, b, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (P = p), (b || !s) && (Y = p), k && S(E, k, i == null ? void 0 : i.top) && (B = p), b && S(A, b, i == null ? void 0 : i.bottom) && (U = p)), { tl: P, tr: B, br: U, bl: Y };
3521
3526
  },
3522
3527
  // Inline style emitting the four corner CSS variables. Set on
3523
3528
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3579,13 +3584,35 @@ const cr = {
3579
3584
  }
3580
3585
  this.widthByKey = Object.freeze(t);
3581
3586
  },
3587
+ // Long-press : déclenche après ~400ms la révélation de la meta-row
3588
+ // sous la bulle pressée. Tout relâchement / cancel / sortie annule
3589
+ // le timer s'il est encore en attente ou efface la meta visible.
3590
+ onPressStart(e) {
3591
+ this.onPressEnd(), this._pressTimer = setTimeout(() => {
3592
+ this._pressTimer = null, this.pressedItemKey = e;
3593
+ }, 400);
3594
+ },
3595
+ onPressEnd() {
3596
+ this._pressTimer && (clearTimeout(this._pressTimer), this._pressTimer = null), this.pressedItemKey !== null && (this.pressedItemKey = null);
3597
+ },
3598
+ timeOf(e) {
3599
+ if (!(e != null && e.created_at)) return "";
3600
+ try {
3601
+ return pe(
3602
+ new Date(e.created_at),
3603
+ re(this.wmLocale())
3604
+ );
3605
+ } catch {
3606
+ return "";
3607
+ }
3608
+ },
3582
3609
  lastTimeOf(e) {
3583
3610
  const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
3584
3611
  if (!(n != null && n.created_at)) return "";
3585
3612
  try {
3586
- return Ee(
3613
+ return pe(
3587
3614
  new Date(n.created_at),
3588
- oe(this.wmLocale())
3615
+ re(this.wmLocale())
3589
3616
  );
3590
3617
  } catch {
3591
3618
  return "";
@@ -3662,7 +3689,7 @@ const cr = {
3662
3689
  }, wr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, br = {
3663
3690
  key: 0,
3664
3691
  class: "wm-list__sysep"
3665
- }, kr = { class: "wm-list__sysep-label" }, Cr = ["data-row-key"], Ar = {
3692
+ }, kr = { class: "wm-list__sysep-label" }, Cr = ["data-row-key", "onPointerdown"], Ar = {
3666
3693
  key: 0,
3667
3694
  class: "wm-list__avatarSlot"
3668
3695
  }, Sr = {
@@ -3671,126 +3698,146 @@ const cr = {
3671
3698
  }, Mr = { key: 0 }, Tr = {
3672
3699
  key: 1,
3673
3700
  "aria-hidden": "true"
3674
- }, xr = { key: 2 }, Or = {
3701
+ }, xr = { key: 2 }, Or = { key: 0 }, Lr = {
3702
+ key: 1,
3703
+ "aria-hidden": "true"
3704
+ }, Er = { key: 2 }, Ir = {
3675
3705
  key: 3,
3676
3706
  class: "wm-list__row wm-list__row--ai fade-up"
3677
- }, Lr = { class: "wm-list__avatarSlot" }, Br = ["aria-label", "title"];
3678
- function Er(e, t, n, i, r, s) {
3679
- const a = I("AIAvatar"), l = I("HumanAvatar"), p = I("ActionResult"), k = I("ArtifactRenderer"), w = I("Bubble"), T = I("AttachmentPreview"), B = I("Typing");
3707
+ }, Br = { class: "wm-list__avatarSlot" }, Rr = ["aria-label", "title"];
3708
+ function Nr(e, t, n, i, r, s) {
3709
+ const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), b = R("Bubble"), T = R("AttachmentPreview"), E = R("Typing");
3680
3710
  return c(), u("div", mr, [
3681
3711
  o("div", {
3682
3712
  ref: "scrollEl",
3683
3713
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
3684
- onScrollPassive: t[0] || (t[0] = (...A) => s.onScroll && s.onScroll(...A))
3714
+ onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
3685
3715
  }, [
3686
3716
  n.loadingMore ? (c(), u("div", fr, [
3687
- t[2] || (t[2] = o("span", {
3717
+ t[6] || (t[6] = o("span", {
3688
3718
  class: "wm-list__loadMore-spinner",
3689
3719
  "aria-hidden": "true"
3690
3720
  }, null, -1)),
3691
3721
  o("span", gr, v(s.t("messageList.loadingHistory")), 1)
3692
- ])) : s.historyExhausted ? (c(), u("div", _r, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3722
+ ])) : s.historyExhausted ? (c(), u("div", _r, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3693
3723
  n.dateLabel ? (c(), u("div", pr, [
3694
- t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1)),
3724
+ t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
3695
3725
  o("span", vr, v(n.dateLabel), 1),
3696
- t[4] || (t[4] = o("div", { class: "wm-list__line" }, null, -1))
3697
- ])) : b("", !0),
3698
- (c(!0), u(E, null, P(s.groups, (A, H) => (c(), u(E, {
3726
+ t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
3727
+ ])) : y("", !0),
3728
+ (c(!0), u(I, null, D(s.groups, (A, H) => (c(), u(I, {
3699
3729
  key: A.key
3700
3730
  }, [
3701
3731
  A.key === s.unreadGroupKey ? (c(), u("div", yr, [
3702
- t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3732
+ t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3703
3733
  o("span", wr, v(s.t("messageList.unread")), 1),
3704
- t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3705
- ])) : b("", !0),
3734
+ t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3735
+ ])) : y("", !0),
3706
3736
  A.role === "system" || A.items.length ? (c(), u("div", {
3707
3737
  key: 1,
3708
3738
  class: O(["wm-list__group", "wm-list__group--" + A.role])
3709
3739
  }, [
3710
3740
  A.role === "system" ? (c(), u("div", br, [
3711
- t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3741
+ t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3712
3742
  o("span", kr, v(A.systemLabel), 1),
3713
- t[8] || (t[8] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3714
- ])) : (c(), u(E, { key: 1 }, [
3715
- (c(!0), u(E, null, P(A.items, (M, F) => (c(), u("div", {
3716
- key: `${s.messageKey(M.message)}-${M.partKey}`,
3717
- "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
3718
- class: O(["wm-list__row fade-up", [
3719
- "wm-list__row--" + A.role,
3720
- {
3721
- "is-pending": M.message._pending,
3722
- "is-failed": M.message._failed
3723
- }
3724
- ]]),
3725
- style: q(s.cornersStyle(A, F))
3743
+ t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3744
+ ])) : (c(), u(I, { key: 1 }, [
3745
+ (c(!0), u(I, null, D(A.items, (S, P) => (c(), u(I, {
3746
+ key: `${s.messageKey(S.message)}-${S.partKey}`
3726
3747
  }, [
3727
- A.role !== "user" ? (c(), u("div", Ar, [
3728
- F === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
3729
- A.role === "ai" ? (c(), U(a, {
3748
+ o("div", {
3749
+ "data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
3750
+ class: O(["wm-list__row fade-up", [
3751
+ "wm-list__row--" + A.role,
3752
+ {
3753
+ "is-pending": S.message._pending,
3754
+ "is-failed": S.message._failed
3755
+ }
3756
+ ]]),
3757
+ style: q(s.cornersStyle(A, P)),
3758
+ onPointerdown: (B) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
3759
+ onPointerup: t[0] || (t[0] = (B) => s.onPressEnd()),
3760
+ onPointercancel: t[1] || (t[1] = (B) => s.onPressEnd()),
3761
+ onPointerleave: t[2] || (t[2] = (B) => s.onPressEnd()),
3762
+ onContextmenu: t[3] || (t[3] = G(() => {
3763
+ }, ["prevent"]))
3764
+ }, [
3765
+ A.role !== "user" ? (c(), u("div", Ar, [
3766
+ P === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
3767
+ A.role === "ai" ? (c(), F(a, {
3768
+ key: 0,
3769
+ size: 26,
3770
+ tail: !0,
3771
+ name: n.aiAgentName,
3772
+ "image-url": n.aiAgentAvatarUrl
3773
+ }, null, 8, ["name", "image-url"])) : (c(), F(l, {
3774
+ key: 1,
3775
+ name: A.agentName,
3776
+ "avatar-url": A.agentAvatarUrl,
3777
+ size: 26,
3778
+ tail: !0
3779
+ }, null, 8, ["name", "avatar-url"]))
3780
+ ], 64)) : y("", !0)
3781
+ ])) : y("", !0),
3782
+ S.renderAs === "action" ? (c(), F(p, {
3783
+ key: 1,
3784
+ state: S.message.payload.state,
3785
+ label: s.actionLabel(S.message),
3786
+ detail: s.actionDetail(S.message)
3787
+ }, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (c(), F(p, {
3788
+ key: 2,
3789
+ state: "awaiting",
3790
+ label: s.t("messageList.approvalRequestSent"),
3791
+ detail: S.message.text_md || ""
3792
+ }, null, 8, ["label", "detail"])) : S.renderAs === "artifact-of-action" ? (c(), F(k, {
3793
+ key: 3,
3794
+ artifact: s.actionArtifact(S.message)
3795
+ }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), F(k, {
3796
+ key: 4,
3797
+ artifact: s.artifactOf(S.message)
3798
+ }, null, 8, ["artifact"])) : (c(), u("div", Sr, [
3799
+ S.message.text_md ? (c(), F(b, {
3730
3800
  key: 0,
3731
- size: 26,
3732
- tail: !0,
3733
- name: n.aiAgentName,
3734
- "image-url": n.aiAgentAvatarUrl
3735
- }, null, 8, ["name", "image-url"])) : (c(), U(l, {
3801
+ role: A.role,
3802
+ text: S.message.text_md
3803
+ }, null, 8, ["role", "text"])) : y("", !0),
3804
+ s.attachmentsOf(S.message).length ? (c(), u("div", {
3736
3805
  key: 1,
3737
- name: A.agentName,
3738
- "avatar-url": A.agentAvatarUrl,
3739
- size: 26,
3740
- tail: !0
3741
- }, null, 8, ["name", "avatar-url"]))
3742
- ], 64)) : b("", !0)
3743
- ])) : b("", !0),
3744
- M.renderAs === "action" ? (c(), U(p, {
3745
- key: 1,
3746
- state: M.message.payload.state,
3747
- label: s.actionLabel(M.message),
3748
- detail: s.actionDetail(M.message)
3749
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(p, {
3750
- key: 2,
3751
- state: "awaiting",
3752
- label: s.t("messageList.approvalRequestSent"),
3753
- detail: M.message.text_md || ""
3754
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), U(k, {
3755
- key: 3,
3756
- artifact: s.actionArtifact(M.message)
3757
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), U(k, {
3758
- key: 4,
3759
- artifact: s.artifactOf(M.message)
3760
- }, null, 8, ["artifact"])) : (c(), u("div", Sr, [
3761
- M.message.text_md ? (c(), U(w, {
3762
- key: 0,
3763
- role: A.role,
3764
- text: M.message.text_md
3765
- }, null, 8, ["role", "text"])) : b("", !0),
3766
- s.attachmentsOf(M.message).length ? (c(), u("div", {
3767
- key: 1,
3768
- class: O(["wm-list__atts", {
3769
- "wm-list__atts--align-end": A.role === "user"
3770
- }])
3771
- }, [
3772
- (c(!0), u(E, null, P(s.attachmentsOf(
3773
- M.message
3774
- ), (N, D) => (c(), U(T, {
3775
- key: `${s.messageKey(M.message)}-att-${D}`,
3776
- attachment: N
3777
- }, null, 8, ["attachment"]))), 128))
3778
- ], 2)) : b("", !0)
3779
- ]))
3780
- ], 14, Cr))), 128)),
3806
+ class: O(["wm-list__atts", {
3807
+ "wm-list__atts--align-end": A.role === "user"
3808
+ }])
3809
+ }, [
3810
+ (c(!0), u(I, null, D(s.attachmentsOf(
3811
+ S.message
3812
+ ), (B, U) => (c(), F(T, {
3813
+ key: `${s.messageKey(S.message)}-att-${U}`,
3814
+ attachment: B
3815
+ }, null, 8, ["attachment"]))), 128))
3816
+ ], 2)) : y("", !0)
3817
+ ]))
3818
+ ], 46, Cr),
3819
+ P < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
3820
+ key: 0,
3821
+ class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
3822
+ }, [
3823
+ A.role !== "user" ? (c(), u("span", Mr, v(s.roleLabel(A)), 1)) : y("", !0),
3824
+ A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", Tr, "•")) : y("", !0),
3825
+ s.timeOf(S.message) ? (c(), u("span", xr, v(s.timeOf(S.message)), 1)) : y("", !0)
3826
+ ], 2)) : y("", !0)
3827
+ ], 64))), 128)),
3781
3828
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3782
3829
  key: 0,
3783
3830
  class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3784
3831
  }, [
3785
- A.role !== "user" ? (c(), u("span", Mr, v(s.roleLabel(A)), 1)) : b("", !0),
3786
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Tr, "•")) : b("", !0),
3787
- s.lastTimeOf(A) ? (c(), u("span", xr, v(s.lastTimeOf(A)), 1)) : b("", !0)
3788
- ], 2)) : b("", !0)
3832
+ A.role !== "user" ? (c(), u("span", Or, v(s.roleLabel(A)), 1)) : y("", !0),
3833
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Lr, "•")) : y("", !0),
3834
+ s.lastTimeOf(A) ? (c(), u("span", Er, v(s.lastTimeOf(A)), 1)) : y("", !0)
3835
+ ], 2)) : y("", !0)
3789
3836
  ], 64))
3790
- ], 2)) : b("", !0)
3837
+ ], 2)) : y("", !0)
3791
3838
  ], 64))), 128)),
3792
- n.streamingActive ? (c(), u("div", Or, [
3793
- o("div", Lr, [
3839
+ n.streamingActive ? (c(), u("div", Ir, [
3840
+ o("div", Br, [
3794
3841
  $(a, {
3795
3842
  size: 26,
3796
3843
  tail: !0,
@@ -3798,19 +3845,19 @@ function Er(e, t, n, i, r, s) {
3798
3845
  "image-url": n.aiAgentAvatarUrl
3799
3846
  }, null, 8, ["name", "image-url"])
3800
3847
  ]),
3801
- $(B)
3802
- ])) : b("", !0)
3848
+ $(E)
3849
+ ])) : y("", !0)
3803
3850
  ], 34),
3804
- $(Le, { name: "wm-scrollDown" }, {
3805
- default: Be(() => [
3851
+ $(Ee, { name: "wm-scrollDown" }, {
3852
+ default: Ie(() => [
3806
3853
  r.showScrollDown ? (c(), u("button", {
3807
3854
  key: 0,
3808
3855
  type: "button",
3809
3856
  class: "wm-list__scrollDown",
3810
3857
  "aria-label": s.t("messageList.scrollToBottom"),
3811
3858
  title: s.t("messageList.scrollToBottom"),
3812
- onClick: t[1] || (t[1] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3813
- }, [...t[9] || (t[9] = [
3859
+ onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3860
+ }, [...t[13] || (t[13] = [
3814
3861
  o("svg", {
3815
3862
  width: "14",
3816
3863
  height: "14",
@@ -3824,15 +3871,15 @@ function Er(e, t, n, i, r, s) {
3824
3871
  }, [
3825
3872
  o("path", { d: "M6 9l6 6 6-6" })
3826
3873
  ], -1)
3827
- ])], 8, Br)) : b("", !0)
3874
+ ])], 8, Rr)) : y("", !0)
3828
3875
  ]),
3829
3876
  _: 1
3830
3877
  })
3831
3878
  ]);
3832
3879
  }
3833
- const Ir = /* @__PURE__ */ R(hr, [["render", Er], ["__scopeId", "data-v-9590b3b2"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
3834
- function Rr() {
3835
- return be && [
3880
+ const Pr = /* @__PURE__ */ N(hr, [["render", Nr], ["__scopeId", "data-v-43330222"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ke = typeof window < "u" && typeof window.MediaRecorder < "u";
3881
+ function Fr() {
3882
+ return ke && [
3836
3883
  "video/webm;codecs=vp9,opus",
3837
3884
  "video/webm;codecs=vp8,opus",
3838
3885
  "video/webm",
@@ -3842,7 +3889,7 @@ function Rr() {
3842
3889
  return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
3843
3890
  }) || "";
3844
3891
  }
3845
- function Fe({ audio: e }) {
3892
+ function Pe({ audio: e }) {
3846
3893
  return {
3847
3894
  video: !0,
3848
3895
  audio: !!e,
@@ -3851,21 +3898,21 @@ function Fe({ audio: e }) {
3851
3898
  systemAudio: e ? "include" : "exclude"
3852
3899
  };
3853
3900
  }
3854
- function za(e) {
3901
+ function Ka(e) {
3855
3902
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3856
3903
  }
3857
- async function Nr() {
3904
+ async function Ur() {
3858
3905
  if (!he) return null;
3859
3906
  let e;
3860
3907
  try {
3861
3908
  e = await navigator.mediaDevices.getDisplayMedia(
3862
- Fe({ audio: !1 })
3909
+ Pe({ audio: !1 })
3863
3910
  );
3864
3911
  } catch (t) {
3865
3912
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3866
3913
  }
3867
3914
  try {
3868
- return await Fr(e);
3915
+ return await Dr(e);
3869
3916
  } catch (t) {
3870
3917
  return console.error("[media] screenshot capture", t), null;
3871
3918
  } finally {
@@ -3874,7 +3921,7 @@ async function Nr() {
3874
3921
  });
3875
3922
  }
3876
3923
  }
3877
- async function Fr(e) {
3924
+ async function Dr(e) {
3878
3925
  const t = document.createElement("video");
3879
3926
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
3880
3927
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -3887,64 +3934,64 @@ async function Fr(e) {
3887
3934
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
3888
3935
  return new File([s], `capture-${a}.png`, { type: "image/png" });
3889
3936
  }
3890
- async function Ur(e = {}) {
3937
+ async function jr(e = {}) {
3891
3938
  var k;
3892
- if (!he || !be) return null;
3939
+ if (!he || !ke) return null;
3893
3940
  let t;
3894
3941
  try {
3895
3942
  t = await navigator.mediaDevices.getDisplayMedia(
3896
- Fe({ audio: !0 })
3943
+ Pe({ audio: !0 })
3897
3944
  );
3898
- } catch (w) {
3899
- return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
3945
+ } catch (b) {
3946
+ return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
3900
3947
  }
3901
- const n = Rr();
3948
+ const n = Fr();
3902
3949
  let i;
3903
3950
  try {
3904
3951
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
3905
- } catch (w) {
3906
- return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
3952
+ } catch (b) {
3953
+ return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
3907
3954
  T.stop();
3908
3955
  }), null;
3909
3956
  }
3910
3957
  const r = [];
3911
3958
  let s = null, a = !1;
3912
- i.addEventListener("dataavailable", (w) => {
3913
- w.data && w.data.size > 0 && r.push(w.data);
3959
+ i.addEventListener("dataavailable", (b) => {
3960
+ b.data && b.data.size > 0 && r.push(b.data);
3914
3961
  }), i.addEventListener("stop", () => {
3915
- var w, T;
3916
- if (s && clearInterval(s), t.getTracks().forEach((B) => {
3917
- B.stop();
3962
+ var b, T;
3963
+ if (s && clearInterval(s), t.getTracks().forEach((E) => {
3964
+ E.stop();
3918
3965
  }), r.length) {
3919
- 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), F = new File([A], `ecran-${M}.${H}`, {
3920
- type: B
3966
+ const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${S}.${H}`, {
3967
+ type: E
3921
3968
  });
3922
- (w = e.onfinalize) == null || w.call(e, F);
3969
+ (b = e.onfinalize) == null || b.call(e, P);
3923
3970
  } else
3924
3971
  (T = e.oncancel) == null || T.call(e);
3925
- }), t.getVideoTracks().forEach((w) => {
3926
- w.addEventListener("ended", () => l(), { once: !0 });
3972
+ }), t.getVideoTracks().forEach((b) => {
3973
+ b.addEventListener("ended", () => l(), { once: !0 });
3927
3974
  });
3928
3975
  function l() {
3929
3976
  if (!a && (a = !0, i.state !== "inactive"))
3930
3977
  try {
3931
3978
  i.stop();
3932
- } catch (w) {
3933
- console.error("[media] recorder stop", w);
3979
+ } catch (b) {
3980
+ console.error("[media] recorder stop", b);
3934
3981
  }
3935
3982
  }
3936
3983
  try {
3937
3984
  i.start(1e3);
3938
- } catch (w) {
3939
- return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
3985
+ } catch (b) {
3986
+ return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
3940
3987
  T.stop();
3941
3988
  }), null;
3942
3989
  }
3943
3990
  (k = e.onstart) == null || k.call(e);
3944
3991
  const p = Date.now();
3945
3992
  return s = setInterval(() => {
3946
- var w;
3947
- (w = e.ontick) == null || w.call(e, Date.now() - p);
3993
+ var b;
3994
+ (b = e.ontick) == null || b.call(e, Date.now() - p);
3948
3995
  }, 500), {
3949
3996
  stop: l,
3950
3997
  get state() {
@@ -3952,7 +3999,7 @@ async function Ur(e = {}) {
3952
3999
  }
3953
4000
  };
3954
4001
  }
3955
- const Dr = [
4002
+ const Hr = [
3956
4003
  {
3957
4004
  action: "file",
3958
4005
  labelKey: "composer.attachFile",
@@ -3968,7 +4015,7 @@ const Dr = [
3968
4015
  labelKey: "composer.recordScreen",
3969
4016
  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"
3970
4017
  }
3971
- ], Pr = {
4018
+ ], zr = {
3972
4019
  name: "WmComposer",
3973
4020
  inject: {
3974
4021
  // Translator shared by the Messenger shell; French fallback when
@@ -4002,10 +4049,10 @@ const Dr = [
4002
4049
  return !this.disabled && !!this.local.trim();
4003
4050
  },
4004
4051
  attachItems() {
4005
- return Dr.map((e) => ({
4052
+ return Hr.map((e) => ({
4006
4053
  ...e,
4007
4054
  label: this.t(e.labelKey),
4008
- disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !be)
4055
+ disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !ke)
4009
4056
  }));
4010
4057
  },
4011
4058
  recordingElapsedLabel() {
@@ -4076,13 +4123,13 @@ const Dr = [
4076
4123
  },
4077
4124
  async captureScreenshot() {
4078
4125
  if (this.disabled) return;
4079
- const e = await Nr();
4126
+ const e = await Ur();
4080
4127
  e && this.$emit("attach", e);
4081
4128
  },
4082
4129
  async startRecording() {
4083
4130
  if (this.recording || this.disabled) return;
4084
4131
  this.recordingElapsed = 0;
4085
- const e = await Ur({
4132
+ const e = await jr({
4086
4133
  onstart: () => {
4087
4134
  this.recording = !0;
4088
4135
  },
@@ -4124,39 +4171,39 @@ const Dr = [
4124
4171
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4125
4172
  }
4126
4173
  }
4127
- }, jr = {
4174
+ }, qr = {
4128
4175
  key: 0,
4129
4176
  class: "wm-rec"
4130
- }, Hr = { class: "wm-rec__lbl" }, zr = {
4177
+ }, $r = { class: "wm-rec__lbl" }, Kr = {
4131
4178
  key: 1,
4132
4179
  class: "wm-compose__menu",
4133
4180
  role: "menu"
4134
- }, qr = ["disabled", "onClick"], $r = { class: "wm-compose__menuIcon" }, Vr = {
4181
+ }, Vr = ["disabled", "onClick"], Wr = { class: "wm-compose__menuIcon" }, Gr = {
4135
4182
  viewBox: "0 0 24 24",
4136
4183
  width: "14",
4137
4184
  height: "14",
4138
4185
  "aria-hidden": "true"
4139
- }, Kr = ["d"], Wr = ["placeholder", "disabled"], Gr = { class: "wm-compose__actions" }, Yr = ["title", "aria-label", "disabled"], Jr = ["disabled", "aria-label"];
4140
- function Qr(e, t, n, i, r, s) {
4186
+ }, Yr = ["d"], Jr = ["placeholder", "disabled"], Qr = { class: "wm-compose__actions" }, Xr = ["title", "aria-label", "disabled"], Zr = ["disabled", "aria-label"];
4187
+ function ei(e, t, n, i, r, s) {
4141
4188
  return c(), u("div", {
4142
4189
  class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4143
4190
  style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4144
4191
  }, [
4145
- r.recording ? (c(), u("div", jr, [
4192
+ r.recording ? (c(), u("div", qr, [
4146
4193
  t[8] || (t[8] = o("span", {
4147
4194
  class: "wm-rec__dot",
4148
4195
  "aria-hidden": "true"
4149
4196
  }, null, -1)),
4150
- o("span", Hr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4197
+ o("span", $r, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4151
4198
  o("button", {
4152
4199
  type: "button",
4153
4200
  class: "wm-rec__stop",
4154
4201
  onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4155
4202
  }, v(s.t("composer.stop")), 1)
4156
- ])) : b("", !0),
4203
+ ])) : y("", !0),
4157
4204
  o("form", {
4158
4205
  class: O(["wm-compose", { "has-attach": r.attachOpen }]),
4159
- onSubmit: t[7] || (t[7] = J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4206
+ onSubmit: t[7] || (t[7] = G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4160
4207
  }, [
4161
4208
  o("input", {
4162
4209
  ref: "fileEl",
@@ -4169,17 +4216,17 @@ function Qr(e, t, n, i, r, s) {
4169
4216
  key: 0,
4170
4217
  class: "wm-compose__overlay",
4171
4218
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4172
- })) : b("", !0),
4173
- r.attachOpen ? (c(), u("div", zr, [
4174
- (c(!0), u(E, null, P(s.attachItems, (a) => (c(), u("button", {
4219
+ })) : y("", !0),
4220
+ r.attachOpen ? (c(), u("div", Kr, [
4221
+ (c(!0), u(I, null, D(s.attachItems, (a) => (c(), u("button", {
4175
4222
  key: a.action,
4176
4223
  type: "button",
4177
4224
  class: "wm-compose__menuItem",
4178
4225
  disabled: a.disabled,
4179
4226
  onClick: (l) => s.onAttachAction(a.action)
4180
4227
  }, [
4181
- o("span", $r, [
4182
- (c(), u("svg", Vr, [
4228
+ o("span", Wr, [
4229
+ (c(), u("svg", Gr, [
4183
4230
  o("path", {
4184
4231
  d: a.path,
4185
4232
  stroke: "currentColor",
@@ -4187,13 +4234,13 @@ function Qr(e, t, n, i, r, s) {
4187
4234
  "stroke-linecap": "round",
4188
4235
  "stroke-linejoin": "round",
4189
4236
  fill: "none"
4190
- }, null, 8, Kr)
4237
+ }, null, 8, Yr)
4191
4238
  ]))
4192
4239
  ]),
4193
4240
  o("span", null, v(a.label), 1)
4194
- ], 8, qr))), 128))
4195
- ])) : b("", !0),
4196
- K(o("textarea", {
4241
+ ], 8, Vr))), 128))
4242
+ ])) : y("", !0),
4243
+ V(o("textarea", {
4197
4244
  ref: "inputEl",
4198
4245
  "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
4199
4246
  class: "wm-compose__input",
@@ -4202,10 +4249,10 @@ function Qr(e, t, n, i, r, s) {
4202
4249
  disabled: n.disabled,
4203
4250
  onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
4204
4251
  onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
4205
- }, null, 40, Wr), [
4252
+ }, null, 40, Jr), [
4206
4253
  [X, r.local]
4207
4254
  ]),
4208
- o("div", Gr, [
4255
+ o("div", Qr, [
4209
4256
  o("button", {
4210
4257
  type: "button",
4211
4258
  class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
@@ -4227,7 +4274,7 @@ function Qr(e, t, n, i, r, s) {
4227
4274
  }, [
4228
4275
  o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4229
4276
  ], -1)
4230
- ])], 10, Yr),
4277
+ ])], 10, Xr),
4231
4278
  o("button", {
4232
4279
  type: "submit",
4233
4280
  class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
@@ -4247,12 +4294,12 @@ function Qr(e, t, n, i, r, s) {
4247
4294
  }, [
4248
4295
  o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4249
4296
  ], -1)
4250
- ])], 10, Jr)
4297
+ ])], 10, Zr)
4251
4298
  ])
4252
4299
  ], 34)
4253
4300
  ], 6);
4254
4301
  }
4255
- const Xr = /* @__PURE__ */ R(Pr, [["render", Qr], ["__scopeId", "data-v-01e81a27"]]), Zr = {
4302
+ const ti = /* @__PURE__ */ N(zr, [["render", ei], ["__scopeId", "data-v-01e81a27"]]), ni = {
4256
4303
  name: "WmSuggestionChips",
4257
4304
  props: {
4258
4305
  items: { type: Array, default: () => [] },
@@ -4269,22 +4316,22 @@ const Xr = /* @__PURE__ */ R(Pr, [["render", Qr], ["__scopeId", "data-v-01e81a27
4269
4316
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4270
4317
  }
4271
4318
  }
4272
- }, ei = ["onClick"];
4273
- function ti(e, t, n, i, r, s) {
4319
+ }, si = ["onClick"];
4320
+ function ri(e, t, n, i, r, s) {
4274
4321
  return n.items.length ? (c(), u("div", {
4275
4322
  key: s.batchKey,
4276
4323
  class: "wm-chips"
4277
4324
  }, [
4278
- (c(!0), u(E, null, P(n.items, (a, l) => (c(), u("button", {
4325
+ (c(!0), u(I, null, D(n.items, (a, l) => (c(), u("button", {
4279
4326
  key: l,
4280
4327
  type: "button",
4281
4328
  class: "wm-chip",
4282
4329
  style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4283
4330
  onClick: (p) => e.$emit("select", a)
4284
- }, v(a.label), 13, ei))), 128))
4285
- ])) : b("", !0);
4331
+ }, v(a.label), 13, si))), 128))
4332
+ ])) : y("", !0);
4286
4333
  }
4287
- const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085"]]), si = {
4334
+ const ii = /* @__PURE__ */ N(ni, [["render", ri], ["__scopeId", "data-v-47ad8085"]]), ai = {
4288
4335
  name: "WmApprovalCard",
4289
4336
  components: { AIAvatar: le },
4290
4337
  inject: {
@@ -4328,45 +4375,45 @@ const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085
4328
4375
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4329
4376
  }
4330
4377
  }
4331
- }, ri = { class: "wm-approval" }, ii = { class: "wm-approval__head" }, ai = { class: "wm-approval__icon" }, oi = { class: "wm-approval__main" }, li = { class: "wm-approval__title" }, ci = {
4378
+ }, oi = { class: "wm-approval" }, li = { class: "wm-approval__head" }, ci = { class: "wm-approval__icon" }, di = { class: "wm-approval__main" }, ui = { class: "wm-approval__title" }, hi = {
4332
4379
  key: 0,
4333
4380
  class: "wm-approval__detail"
4334
- }, di = { class: "wm-approval__actions" };
4335
- function ui(e, t, n, i, r, s) {
4336
- const a = I("AIAvatar");
4337
- return c(), u("div", ri, [
4338
- o("div", ii, [
4339
- o("div", ai, [
4381
+ }, mi = { class: "wm-approval__actions" };
4382
+ function fi(e, t, n, i, r, s) {
4383
+ const a = R("AIAvatar");
4384
+ return c(), u("div", oi, [
4385
+ o("div", li, [
4386
+ o("div", ci, [
4340
4387
  $(a, {
4341
4388
  size: 24,
4342
4389
  name: n.agentName,
4343
4390
  "image-url": n.agentAvatarUrl
4344
4391
  }, null, 8, ["name", "image-url"])
4345
4392
  ]),
4346
- o("div", oi, [
4347
- o("div", li, v(n.action), 1),
4348
- n.detail ? (c(), u("div", ci, v(n.detail), 1)) : b("", !0)
4393
+ o("div", di, [
4394
+ o("div", ui, v(n.action), 1),
4395
+ n.detail ? (c(), u("div", hi, v(n.detail), 1)) : y("", !0)
4349
4396
  ])
4350
4397
  ]),
4351
- o("div", di, [
4398
+ o("div", mi, [
4352
4399
  s.rejectId ? (c(), u("button", {
4353
4400
  key: 0,
4354
4401
  type: "button",
4355
4402
  class: "wm-approval__btn wm-approval__btn--neutral",
4356
4403
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4357
- }, v(s.rejectLabel), 1)) : b("", !0),
4404
+ }, v(s.rejectLabel), 1)) : y("", !0),
4358
4405
  s.approveId ? (c(), u("button", {
4359
4406
  key: 1,
4360
4407
  type: "button",
4361
4408
  class: "wm-approval__btn wm-approval__btn--primary",
4362
4409
  onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
4363
- }, v(s.approveLabel), 1)) : b("", !0)
4410
+ }, v(s.approveLabel), 1)) : y("", !0)
4364
4411
  ])
4365
4412
  ]);
4366
4413
  }
4367
- const hi = /* @__PURE__ */ R(si, [["render", ui], ["__scopeId", "data-v-a2bed37e"]]);
4368
- let xe = 0;
4369
- const mi = /* @__PURE__ */ new Set([
4414
+ const gi = /* @__PURE__ */ N(ai, [["render", fi], ["__scopeId", "data-v-a2bed37e"]]);
4415
+ let Oe = 0;
4416
+ const _i = /* @__PURE__ */ new Set([
4370
4417
  "text",
4371
4418
  "textarea",
4372
4419
  "number",
@@ -4374,7 +4421,7 @@ const mi = /* @__PURE__ */ new Set([
4374
4421
  "select",
4375
4422
  "multiselect",
4376
4423
  "date"
4377
- ]), fi = {
4424
+ ]), pi = {
4378
4425
  name: "WmFormCard",
4379
4426
  components: { AIAvatar: le },
4380
4427
  inject: {
@@ -4391,8 +4438,8 @@ const mi = /* @__PURE__ */ new Set([
4391
4438
  },
4392
4439
  emits: ["submit"],
4393
4440
  data() {
4394
- return xe += 1, {
4395
- _uid: xe,
4441
+ return Oe += 1, {
4442
+ _uid: Oe,
4396
4443
  values: {},
4397
4444
  busy: !1,
4398
4445
  error: ""
@@ -4404,7 +4451,7 @@ const mi = /* @__PURE__ */ new Set([
4404
4451
  // douteux.
4405
4452
  normalizedFields() {
4406
4453
  var t;
4407
- 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)));
4454
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !_i.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4408
4455
  }
4409
4456
  },
4410
4457
  created() {
@@ -4457,54 +4504,54 @@ const mi = /* @__PURE__ */ new Set([
4457
4504
  }
4458
4505
  }
4459
4506
  }
4460
- }, gi = { class: "wm-form" }, _i = { class: "wm-form__head" }, pi = { class: "wm-form__icon" }, vi = { class: "wm-form__main" }, yi = { class: "wm-form__title" }, wi = {
4507
+ }, vi = { class: "wm-form" }, yi = { class: "wm-form__head" }, wi = { class: "wm-form__icon" }, bi = { class: "wm-form__main" }, ki = { class: "wm-form__title" }, Ci = {
4461
4508
  key: 0,
4462
4509
  class: "wm-form__detail"
4463
- }, bi = ["for"], ki = {
4510
+ }, Ai = ["for"], Si = {
4464
4511
  key: 0,
4465
4512
  class: "wm-form__req",
4466
4513
  "aria-hidden": "true"
4467
- }, 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 = {
4514
+ }, Mi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ti = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"], Li = {
4468
4515
  key: 4,
4469
4516
  class: "wm-form__bool"
4470
- }, xi = ["id", "onUpdate:modelValue", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"], Li = {
4517
+ }, Ei = ["id", "onUpdate:modelValue", "disabled"], Ii = ["id", "onUpdate:modelValue", "required", "disabled"], Bi = {
4471
4518
  value: "",
4472
4519
  disabled: ""
4473
- }, Bi = ["value"], Ei = {
4520
+ }, Ri = ["value"], Ni = {
4474
4521
  key: 6,
4475
4522
  class: "wm-form__multi"
4476
- }, Ii = ["value", "checked", "disabled", "onChange"], Ri = {
4523
+ }, Pi = ["value", "checked", "disabled", "onChange"], Fi = {
4477
4524
  key: 0,
4478
4525
  class: "wm-form__err"
4479
- }, Ni = ["disabled"], Fi = {
4526
+ }, Ui = ["disabled"], Di = {
4480
4527
  key: 0,
4481
4528
  class: "wm-form__spinner",
4482
4529
  "aria-hidden": "true"
4483
- }, Ui = {
4530
+ }, ji = {
4484
4531
  key: 2,
4485
4532
  class: "wm-form__doneLbl"
4486
4533
  };
4487
- function Di(e, t, n, i, r, s) {
4488
- const a = I("AIAvatar");
4489
- return c(), u("div", gi, [
4490
- o("div", _i, [
4491
- o("div", pi, [
4534
+ function Hi(e, t, n, i, r, s) {
4535
+ const a = R("AIAvatar");
4536
+ return c(), u("div", vi, [
4537
+ o("div", yi, [
4538
+ o("div", wi, [
4492
4539
  $(a, {
4493
4540
  size: 24,
4494
4541
  name: n.agentName,
4495
4542
  "image-url": n.agentAvatarUrl
4496
4543
  }, null, 8, ["name", "image-url"])
4497
4544
  ]),
4498
- o("div", vi, [
4499
- o("div", yi, v(n.form.title || s.t("form.title")), 1),
4500
- n.form.description ? (c(), u("div", wi, v(n.form.description), 1)) : b("", !0)
4545
+ o("div", bi, [
4546
+ o("div", ki, v(n.form.title || s.t("form.title")), 1),
4547
+ n.form.description ? (c(), u("div", Ci, v(n.form.description), 1)) : y("", !0)
4501
4548
  ])
4502
4549
  ]),
4503
4550
  o("form", {
4504
4551
  class: "wm-form__body",
4505
- onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4552
+ onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4506
4553
  }, [
4507
- (c(!0), u(E, null, P(s.normalizedFields, (l) => (c(), u("div", {
4554
+ (c(!0), u(I, null, D(s.normalizedFields, (l) => (c(), u("div", {
4508
4555
  key: l.key,
4509
4556
  class: "wm-form__field"
4510
4557
  }, [
@@ -4512,10 +4559,10 @@ function Di(e, t, n, i, r, s) {
4512
4559
  for: `wm-f-${r._uid}-${l.key}`,
4513
4560
  class: "wm-form__label"
4514
4561
  }, [
4515
- pe(v(l.label), 1),
4516
- l.required ? (c(), u("span", ki, "*")) : b("", !0)
4517
- ], 8, bi),
4518
- l.type === "text" ? K((c(), u("input", {
4562
+ ve(v(l.label), 1),
4563
+ l.required ? (c(), u("span", Si, "*")) : y("", !0)
4564
+ ], 8, Ai),
4565
+ l.type === "text" ? V((c(), u("input", {
4519
4566
  key: 0,
4520
4567
  id: `wm-f-${r._uid}-${l.key}`,
4521
4568
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4524,9 +4571,9 @@ function Di(e, t, n, i, r, s) {
4524
4571
  placeholder: l.placeholder || "",
4525
4572
  required: l.required,
4526
4573
  disabled: n.readOnly || r.busy
4527
- }, null, 8, Ci)), [
4574
+ }, null, 8, Mi)), [
4528
4575
  [X, r.values[l.key]]
4529
- ]) : l.type === "textarea" ? K((c(), u("textarea", {
4576
+ ]) : l.type === "textarea" ? V((c(), u("textarea", {
4530
4577
  key: 1,
4531
4578
  id: `wm-f-${r._uid}-${l.key}`,
4532
4579
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4535,9 +4582,9 @@ function Di(e, t, n, i, r, s) {
4535
4582
  placeholder: l.placeholder || "",
4536
4583
  required: l.required,
4537
4584
  disabled: n.readOnly || r.busy
4538
- }, null, 8, Ai)), [
4585
+ }, null, 8, Ti)), [
4539
4586
  [X, r.values[l.key]]
4540
- ]) : l.type === "number" ? K((c(), u("input", {
4587
+ ]) : l.type === "number" ? V((c(), u("input", {
4541
4588
  key: 2,
4542
4589
  id: `wm-f-${r._uid}-${l.key}`,
4543
4590
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4546,14 +4593,14 @@ function Di(e, t, n, i, r, s) {
4546
4593
  placeholder: l.placeholder || "",
4547
4594
  required: l.required,
4548
4595
  disabled: n.readOnly || r.busy
4549
- }, null, 8, Si)), [
4596
+ }, null, 8, xi)), [
4550
4597
  [
4551
4598
  X,
4552
4599
  r.values[l.key],
4553
4600
  void 0,
4554
4601
  { number: !0 }
4555
4602
  ]
4556
- ]) : l.type === "date" ? K((c(), u("input", {
4603
+ ]) : l.type === "date" ? V((c(), u("input", {
4557
4604
  key: 3,
4558
4605
  id: `wm-f-${r._uid}-${l.key}`,
4559
4606
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4561,19 +4608,19 @@ function Di(e, t, n, i, r, s) {
4561
4608
  class: "wm-form__input",
4562
4609
  required: l.required,
4563
4610
  disabled: n.readOnly || r.busy
4564
- }, null, 8, Mi)), [
4611
+ }, null, 8, Oi)), [
4565
4612
  [X, r.values[l.key]]
4566
- ]) : l.type === "boolean" ? (c(), u("label", Ti, [
4567
- K(o("input", {
4613
+ ]) : l.type === "boolean" ? (c(), u("label", Li, [
4614
+ V(o("input", {
4568
4615
  id: `wm-f-${r._uid}-${l.key}`,
4569
4616
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
4570
4617
  type: "checkbox",
4571
4618
  disabled: n.readOnly || r.busy
4572
- }, null, 8, xi), [
4619
+ }, null, 8, Ei), [
4573
4620
  [He, r.values[l.key]]
4574
4621
  ]),
4575
4622
  o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4576
- ])) : l.type === "select" ? K((c(), u("select", {
4623
+ ])) : l.type === "select" ? V((c(), u("select", {
4577
4624
  key: 5,
4578
4625
  id: `wm-f-${r._uid}-${l.key}`,
4579
4626
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4581,15 +4628,15 @@ function Di(e, t, n, i, r, s) {
4581
4628
  required: l.required,
4582
4629
  disabled: n.readOnly || r.busy
4583
4630
  }, [
4584
- o("option", Li, v(l.placeholder || s.t("form.choose")), 1),
4585
- (c(!0), u(E, null, P(l.options, (p) => (c(), u("option", {
4631
+ o("option", Bi, v(l.placeholder || s.t("form.choose")), 1),
4632
+ (c(!0), u(I, null, D(l.options, (p) => (c(), u("option", {
4586
4633
  key: p.value,
4587
4634
  value: p.value
4588
- }, v(p.label), 9, Bi))), 128))
4589
- ], 8, Oi)), [
4635
+ }, v(p.label), 9, Ri))), 128))
4636
+ ], 8, Ii)), [
4590
4637
  [ze, r.values[l.key]]
4591
- ]) : l.type === "multiselect" ? (c(), u("div", Ei, [
4592
- (c(!0), u(E, null, P(l.options, (p) => (c(), u("label", {
4638
+ ]) : l.type === "multiselect" ? (c(), u("div", Ni, [
4639
+ (c(!0), u(I, null, D(l.options, (p) => (c(), u("label", {
4593
4640
  key: p.value,
4594
4641
  class: "wm-form__multiItem"
4595
4642
  }, [
@@ -4603,25 +4650,25 @@ function Di(e, t, n, i, r, s) {
4603
4650
  p.value,
4604
4651
  k.target.checked
4605
4652
  )
4606
- }, null, 40, Ii),
4653
+ }, null, 40, Pi),
4607
4654
  o("span", null, v(p.label), 1)
4608
4655
  ]))), 128))
4609
- ])) : b("", !0)
4656
+ ])) : y("", !0)
4610
4657
  ]))), 128)),
4611
- r.error ? (c(), u("div", Ri, v(r.error), 1)) : b("", !0),
4612
- n.readOnly ? (c(), u("div", Ui, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4658
+ r.error ? (c(), u("div", Fi, v(r.error), 1)) : y("", !0),
4659
+ n.readOnly ? (c(), u("div", ji, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4613
4660
  key: 1,
4614
4661
  type: "submit",
4615
4662
  class: "wm-form__submit",
4616
4663
  disabled: r.busy
4617
4664
  }, [
4618
- r.busy ? (c(), u("span", Fi)) : b("", !0),
4665
+ r.busy ? (c(), u("span", Di)) : y("", !0),
4619
4666
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4620
- ], 8, Ni))
4667
+ ], 8, Ui))
4621
4668
  ], 32)
4622
4669
  ]);
4623
4670
  }
4624
- const Pi = /* @__PURE__ */ R(fi, [["render", Di], ["__scopeId", "data-v-fe65cc56"]]), ji = {
4671
+ const zi = /* @__PURE__ */ N(pi, [["render", Hi], ["__scopeId", "data-v-fe65cc56"]]), qi = {
4625
4672
  name: "WmFeedback",
4626
4673
  inject: {
4627
4674
  // Translator shared by the Messenger shell; French fallback when
@@ -4655,13 +4702,13 @@ const Pi = /* @__PURE__ */ R(fi, [["render", Di], ["__scopeId", "data-v-fe65cc56
4655
4702
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4656
4703
  }
4657
4704
  }
4658
- }, Hi = { class: "wm-fb" }, zi = { class: "wm-fb__title" }, qi = { class: "wm-fb__sub" }, $i = { class: "wm-fb__row" }, Vi = ["onClick"], Ki = { class: "wm-fb__emoji" }, Wi = { class: "wm-fb__label" }, Gi = ["disabled"], Yi = {
4705
+ }, $i = { class: "wm-fb" }, Ki = { class: "wm-fb__title" }, Vi = { class: "wm-fb__sub" }, Wi = { class: "wm-fb__row" }, Gi = ["onClick"], Yi = { class: "wm-fb__emoji" }, Ji = { class: "wm-fb__label" }, Qi = ["disabled"], Xi = {
4659
4706
  key: 1,
4660
4707
  class: "wm-fb__done"
4661
- }, Ji = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
4662
- function Xi(e, t, n, i, r, s) {
4663
- return c(), u("div", Hi, [
4664
- n.done ? (c(), u("div", Yi, [
4708
+ }, Zi = { class: "wm-fb__doneTitle" }, ea = { class: "wm-fb__doneSub" };
4709
+ function ta(e, t, n, i, r, s) {
4710
+ return c(), u("div", $i, [
4711
+ n.done ? (c(), u("div", Xi, [
4665
4712
  t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4666
4713
  o("svg", {
4667
4714
  width: "16",
@@ -4677,32 +4724,32 @@ function Xi(e, t, n, i, r, s) {
4677
4724
  o("path", { d: "M20 6L9 17l-5-5" })
4678
4725
  ])
4679
4726
  ], -1)),
4680
- o("div", Ji, v(s.t("feedback.doneTitle")), 1),
4681
- o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
4682
- ])) : (c(), u(E, { key: 0 }, [
4683
- o("div", zi, v(s.t("feedback.question")), 1),
4684
- o("div", qi, v(s.t("feedback.subtitle")), 1),
4685
- o("div", $i, [
4686
- (c(!0), u(E, null, P(s.options, (a) => (c(), u("button", {
4727
+ o("div", Zi, v(s.t("feedback.doneTitle")), 1),
4728
+ o("div", ea, v(s.t("feedback.doneSubtitle")), 1)
4729
+ ])) : (c(), u(I, { key: 0 }, [
4730
+ o("div", Ki, v(s.t("feedback.question")), 1),
4731
+ o("div", Vi, v(s.t("feedback.subtitle")), 1),
4732
+ o("div", Wi, [
4733
+ (c(!0), u(I, null, D(s.options, (a) => (c(), u("button", {
4687
4734
  key: a.v,
4688
4735
  type: "button",
4689
4736
  class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4690
4737
  onClick: (l) => r.sel = a.v
4691
4738
  }, [
4692
- o("span", Ki, v(a.e), 1),
4693
- o("span", Wi, v(a.l), 1)
4694
- ], 10, Vi))), 128))
4739
+ o("span", Yi, v(a.e), 1),
4740
+ o("span", Ji, v(a.l), 1)
4741
+ ], 10, Gi))), 128))
4695
4742
  ]),
4696
4743
  o("button", {
4697
4744
  type: "button",
4698
4745
  class: "wm-fb__send",
4699
4746
  disabled: !r.sel || n.busy,
4700
4747
  onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
4701
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Gi)
4748
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Qi)
4702
4749
  ], 64))
4703
4750
  ]);
4704
4751
  }
4705
- const Zi = /* @__PURE__ */ R(ji, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), ea = {
4752
+ const na = /* @__PURE__ */ N(qi, [["render", ta], ["__scopeId", "data-v-9b630564"]]), sa = {
4706
4753
  name: "WmMoreMenu",
4707
4754
  inject: {
4708
4755
  // Translator shared by the Messenger shell; French fallback when
@@ -4745,24 +4792,24 @@ const Zi = /* @__PURE__ */ R(ji, [["render", Xi], ["__scopeId", "data-v-9b630564
4745
4792
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4746
4793
  }
4747
4794
  }
4748
- }, ta = { class: "wm-mm" }, na = {
4795
+ }, ra = { class: "wm-mm" }, ia = {
4749
4796
  class: "wm-mm__pop",
4750
4797
  role: "menu"
4751
- }, sa = {
4798
+ }, aa = {
4752
4799
  key: 0,
4753
4800
  class: "wm-mm__section"
4754
- }, ra = { class: "wm-mm__label" }, ia = { class: "wm-mm__label" }, aa = {
4801
+ }, oa = { class: "wm-mm__label" }, la = { class: "wm-mm__label" }, ca = {
4755
4802
  key: 1,
4756
4803
  class: "wm-mm__sep"
4757
- }, 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" };
4758
- function ma(e, t, n, i, r, s) {
4759
- return c(), u("div", ta, [
4804
+ }, da = { class: "wm-mm__section" }, ua = { class: "wm-mm__label" }, ha = { class: "wm-mm__label" }, ma = { class: "wm-mm__section" }, fa = { class: "wm-mm__label" }, ga = { class: "wm-mm__label" };
4805
+ function _a(e, t, n, i, r, s) {
4806
+ return c(), u("div", ra, [
4760
4807
  o("div", {
4761
4808
  class: "wm-mm__scrim",
4762
4809
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4763
4810
  }),
4764
- o("div", na, [
4765
- n.canRename || n.canExport ? (c(), u("div", sa, [
4811
+ o("div", ia, [
4812
+ n.canRename || n.canExport ? (c(), u("div", aa, [
4766
4813
  n.canRename ? (c(), u("button", {
4767
4814
  key: 0,
4768
4815
  type: "button",
@@ -4785,8 +4832,8 @@ function ma(e, t, n, i, r, s) {
4785
4832
  o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4786
4833
  ])
4787
4834
  ], -1)),
4788
- o("span", ra, v(s.t("moreMenu.editTitle")), 1)
4789
- ])) : b("", !0),
4835
+ o("span", oa, v(s.t("moreMenu.editTitle")), 1)
4836
+ ])) : y("", !0),
4790
4837
  n.canExport ? (c(), u("button", {
4791
4838
  key: 1,
4792
4839
  type: "button",
@@ -4808,12 +4855,12 @@ function ma(e, t, n, i, r, s) {
4808
4855
  o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4809
4856
  ])
4810
4857
  ], -1)),
4811
- o("span", ia, v(s.t("moreMenu.exportTranscript")), 1),
4858
+ o("span", la, v(s.t("moreMenu.exportTranscript")), 1),
4812
4859
  t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
4813
- ])) : b("", !0)
4814
- ])) : b("", !0),
4815
- n.canRename || n.canExport ? (c(), u("div", aa)) : b("", !0),
4816
- o("div", oa, [
4860
+ ])) : y("", !0)
4861
+ ])) : y("", !0),
4862
+ n.canRename || n.canExport ? (c(), u("div", ca)) : y("", !0),
4863
+ o("div", da, [
4817
4864
  o("button", {
4818
4865
  type: "button",
4819
4866
  class: "wm-mm__item",
@@ -4835,7 +4882,7 @@ function ma(e, t, n, i, r, s) {
4835
4882
  o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4836
4883
  ])
4837
4884
  ], -1)),
4838
- o("span", la, v(s.t("moreMenu.sound")), 1),
4885
+ o("span", ua, v(s.t("moreMenu.sound")), 1),
4839
4886
  o("span", {
4840
4887
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
4841
4888
  }, [...t[10] || (t[10] = [
@@ -4862,7 +4909,7 @@ function ma(e, t, n, i, r, s) {
4862
4909
  o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
4863
4910
  ])
4864
4911
  ], -1)),
4865
- o("span", ca, v(s.t("moreMenu.browserNotifications")), 1),
4912
+ o("span", ha, v(s.t("moreMenu.browserNotifications")), 1),
4866
4913
  o("span", {
4867
4914
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
4868
4915
  }, [...t[12] || (t[12] = [
@@ -4871,7 +4918,7 @@ function ma(e, t, n, i, r, s) {
4871
4918
  ])
4872
4919
  ]),
4873
4920
  t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
4874
- o("div", da, [
4921
+ o("div", ma, [
4875
4922
  n.statusUrl ? (c(), u("button", {
4876
4923
  key: 0,
4877
4924
  type: "button",
@@ -4893,8 +4940,8 @@ function ma(e, t, n, i, r, s) {
4893
4940
  o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
4894
4941
  ])
4895
4942
  ], -1)),
4896
- o("span", ua, v(s.t("moreMenu.serviceStatus")), 1)
4897
- ])) : b("", !0),
4943
+ o("span", fa, v(s.t("moreMenu.serviceStatus")), 1)
4944
+ ])) : y("", !0),
4898
4945
  n.helpUrl ? (c(), u("button", {
4899
4946
  key: 1,
4900
4947
  type: "button",
@@ -4916,13 +4963,13 @@ function ma(e, t, n, i, r, s) {
4916
4963
  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" })
4917
4964
  ])
4918
4965
  ], -1)),
4919
- o("span", ha, v(s.t("moreMenu.helpCenter")), 1)
4920
- ])) : b("", !0)
4966
+ o("span", ga, v(s.t("moreMenu.helpCenter")), 1)
4967
+ ])) : y("", !0)
4921
4968
  ])
4922
4969
  ])
4923
4970
  ]);
4924
4971
  }
4925
- const fa = /* @__PURE__ */ R(ea, [["render", ma], ["__scopeId", "data-v-76281e95"]]), ga = {
4972
+ const pa = /* @__PURE__ */ N(sa, [["render", _a], ["__scopeId", "data-v-76281e95"]]), va = {
4926
4973
  name: "WmRenameDialog",
4927
4974
  inject: {
4928
4975
  // Translator shared by the Messenger shell; French fallback when
@@ -4964,20 +5011,20 @@ const fa = /* @__PURE__ */ R(ea, [["render", ma], ["__scopeId", "data-v-76281e95
4964
5011
  this.canSubmit && this.$emit("submit", this.value.trim());
4965
5012
  }
4966
5013
  }
4967
- }, _a = { class: "wm-dialog" }, pa = {
5014
+ }, ya = { class: "wm-dialog" }, wa = {
4968
5015
  class: "wm-dialog__card",
4969
5016
  role: "dialog",
4970
5017
  "aria-modal": "true"
4971
- }, va = { class: "wm-dialog__head" }, ya = { class: "wm-dialog__title" }, wa = ["aria-label"], ba = { class: "wm-dialog__body" }, ka = ["placeholder"], Ca = { class: "wm-dialog__actions" }, Aa = ["disabled"];
4972
- function Sa(e, t, n, i, r, s) {
4973
- return c(), u("div", _a, [
5018
+ }, ba = { class: "wm-dialog__head" }, ka = { class: "wm-dialog__title" }, Ca = ["aria-label"], Aa = { class: "wm-dialog__body" }, Sa = ["placeholder"], Ma = { class: "wm-dialog__actions" }, Ta = ["disabled"];
5019
+ function xa(e, t, n, i, r, s) {
5020
+ return c(), u("div", ya, [
4974
5021
  o("div", {
4975
5022
  class: "wm-dialog__scrim",
4976
5023
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4977
5024
  }),
4978
- o("div", pa, [
4979
- o("div", va, [
4980
- o("div", ya, v(n.title || s.t("rename.title")), 1),
5025
+ o("div", wa, [
5026
+ o("div", ba, [
5027
+ o("div", ka, v(n.title || s.t("rename.title")), 1),
4981
5028
  o("button", {
4982
5029
  type: "button",
4983
5030
  class: "wm-dialog__close",
@@ -4997,10 +5044,10 @@ function Sa(e, t, n, i, r, s) {
4997
5044
  }, [
4998
5045
  o("path", { d: "M18 6L6 18M6 6l12 12" })
4999
5046
  ], -1)
5000
- ])], 8, wa)
5047
+ ])], 8, Ca)
5001
5048
  ]),
5002
- o("div", ba, [
5003
- K(o("input", {
5049
+ o("div", Aa, [
5050
+ V(o("input", {
5004
5051
  ref: "input",
5005
5052
  "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
5006
5053
  type: "text",
@@ -5008,14 +5055,14 @@ function Sa(e, t, n, i, r, s) {
5008
5055
  placeholder: n.placeholder || s.t("rename.placeholder"),
5009
5056
  maxlength: 120,
5010
5057
  onKeydown: [
5011
- t[3] || (t[3] = ue(J((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5012
- t[4] || (t[4] = ue(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5058
+ t[3] || (t[3] = ue(G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5059
+ t[4] || (t[4] = ue(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5013
5060
  ]
5014
- }, null, 40, ka), [
5061
+ }, null, 40, Sa), [
5015
5062
  [X, r.value]
5016
5063
  ])
5017
5064
  ]),
5018
- o("div", Ca, [
5065
+ o("div", Ma, [
5019
5066
  o("button", {
5020
5067
  type: "button",
5021
5068
  class: "wm-dialog__btn",
@@ -5026,25 +5073,25 @@ function Sa(e, t, n, i, r, s) {
5026
5073
  class: "wm-dialog__btn wm-dialog__btn--primary",
5027
5074
  disabled: !s.canSubmit,
5028
5075
  onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
5029
- }, v(s.t("common.save")), 9, Aa)
5076
+ }, v(s.t("common.save")), 9, Ta)
5030
5077
  ])
5031
5078
  ])
5032
5079
  ]);
5033
5080
  }
5034
- const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ta = {
5081
+ const Oa = /* @__PURE__ */ N(va, [["render", xa], ["__scopeId", "data-v-6d5f94a8"]]), Le = "ww-messenger-tokens", La = {
5035
5082
  name: "Messenger",
5036
5083
  components: {
5037
- Launcher: Ft,
5084
+ Launcher: Pt,
5038
5085
  Header: ln,
5039
5086
  Onboarding: qn,
5040
- MessageList: Ir,
5041
- Composer: Xr,
5042
- SuggestionChips: ni,
5043
- ApprovalCard: hi,
5044
- FormCard: Pi,
5045
- Feedback: Zi,
5046
- MoreMenu: fa,
5047
- RenameDialog: Ma
5087
+ MessageList: Pr,
5088
+ Composer: ti,
5089
+ SuggestionChips: ii,
5090
+ ApprovalCard: gi,
5091
+ FormCard: zi,
5092
+ Feedback: na,
5093
+ MoreMenu: pa,
5094
+ RenameDialog: Oa
5048
5095
  },
5049
5096
  mixins: [
5050
5097
  ot,
@@ -5187,7 +5234,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5187
5234
  // 4. French.
5188
5235
  locale() {
5189
5236
  var e;
5190
- return we(
5237
+ return be(
5191
5238
  this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
5192
5239
  );
5193
5240
  },
@@ -5229,22 +5276,22 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5229
5276
  var k;
5230
5277
  const r = e[i.id] || [], s = W(i.last_read_message_id);
5231
5278
  let a = 0, l = null;
5232
- for (let w = r.length - 1; w >= 0; w--) {
5233
- const T = r[w];
5279
+ for (let b = r.length - 1; b >= 0; b--) {
5280
+ const T = r[b];
5234
5281
  if (!T) continue;
5235
5282
  if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5236
- const B = W(T.id);
5237
- if (B != null) {
5238
- if (s != null && B <= s) break;
5283
+ const E = W(T.id);
5284
+ if (E != null) {
5285
+ if (s != null && E <= s) break;
5239
5286
  t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5240
5287
  }
5241
5288
  }
5242
5289
  if (!r.length) {
5243
- const w = W(i.last_message_id);
5244
- w != null && (s == null || w > s) && (a = 1, l = i.last_message_author || null);
5290
+ const b = W(i.last_message_id);
5291
+ b != null && (s == null || b > s) && (a = 1, l = i.last_message_author || null);
5245
5292
  }
5246
5293
  const p = r.filter(
5247
- (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
5294
+ (b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
5248
5295
  );
5249
5296
  return {
5250
5297
  ...i,
@@ -5271,7 +5318,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5271
5318
  title: n.name || this.t("common.newConversation"),
5272
5319
  preview: n._preview || this.t("onboarding.newMessage"),
5273
5320
  unread: !!n._unread,
5274
- _ts: Se(n, e[n.id] || [])
5321
+ _ts: Me(n, e[n.id] || [])
5275
5322
  })).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
5276
5323
  },
5277
5324
  // Unread threads (one entry per conv with unseen agent/human
@@ -5283,7 +5330,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5283
5330
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5284
5331
  for (const i of this.drawerConversations) {
5285
5332
  if (!i._unread) continue;
5286
- const r = Se(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5333
+ const r = Me(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5287
5334
  t.push({
5288
5335
  convId: i.id,
5289
5336
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5429,7 +5476,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5429
5476
  const t = this.revealedAt;
5430
5477
  return (this.s.messagesByConv[e.id] || []).filter((r) => {
5431
5478
  var s, a, l, p, k;
5432
- return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5479
+ return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5433
5480
  });
5434
5481
  },
5435
5482
  // True whenever we should show the "typing" indicator at the bottom
@@ -5440,7 +5487,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5440
5487
  var n, i, r;
5441
5488
  const e = this.currentConv;
5442
5489
  return e ? Object.keys(((n = this.s) == null ? void 0 : n.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : (((r = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : r[e.id]) || []).some(
5443
- (s) => ae(s) && !(this.revealedAt[s.id] > 0)
5490
+ (s) => oe(s) && !(this.revealedAt[s.id] > 0)
5444
5491
  ) : !1;
5445
5492
  },
5446
5493
  // Internal: the raw persisted list for the current conversation. We
@@ -5472,7 +5519,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5472
5519
  const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5473
5520
  if (!t || typeof t != "object") return "";
5474
5521
  const n = Object.entries(t);
5475
- return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
5522
+ return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
5476
5523
  },
5477
5524
  actionInFlight() {
5478
5525
  var e, t;
@@ -5515,7 +5562,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5515
5562
  }
5516
5563
  }
5517
5564
  return this.t("messageList.today", {
5518
- time: Ee(t, oe(this.locale))
5565
+ time: pe(t, re(this.locale))
5519
5566
  });
5520
5567
  },
5521
5568
  // Pagination state for the active conversation. Drives the
@@ -5620,9 +5667,9 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5620
5667
  }
5621
5668
  },
5622
5669
  async mounted() {
5623
- if (typeof document < "u" && !document.getElementById(Oe)) {
5670
+ if (typeof document < "u" && !document.getElementById(Le)) {
5624
5671
  const e = document.createElement("style");
5625
- e.id = Oe, e.textContent = Xe, document.head.appendChild(e);
5672
+ e.id = Le, e.textContent = Xe, document.head.appendChild(e);
5626
5673
  }
5627
5674
  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());
5628
5675
  },
@@ -5656,7 +5703,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5656
5703
  onParentMessage(e) {
5657
5704
  var n;
5658
5705
  const t = e == null ? void 0 : e.data;
5659
- !t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.hasValidSessionMarker() && this.boot().catch((i) => {
5706
+ !t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((i) => {
5660
5707
  console.warn("[messenger] eager boot failed", i);
5661
5708
  }));
5662
5709
  },
@@ -5677,12 +5724,12 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5677
5724
  return;
5678
5725
  }
5679
5726
  try {
5680
- await this.waitForParentInit(), this.transport = ke(
5727
+ await this.waitForParentInit(), this.transport = Ce(
5681
5728
  We({
5682
5729
  baseUrl: this.baseUrl,
5683
5730
  widgetId: this.widgetId
5684
5731
  })
5685
- ), this.store = ke(Qe(this.transport)), this.hydrateNotifPref();
5732
+ ), this.store = Ce(Qe(this.transport)), this.hydrateNotifPref();
5686
5733
  const n = ((e = this.parentContext) == null ? void 0 : e.customer) || ((t = this.context) == null ? void 0 : t.customer);
5687
5734
  await this.store.start({
5688
5735
  origin: this.parentOrigin,
@@ -5771,21 +5818,21 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5771
5818
  this.launcherHovered = e, this.sendCurrentLauncherSize();
5772
5819
  },
5773
5820
  sendCurrentLauncherSize() {
5774
- var T, B, A, H, M, F, N;
5821
+ var T, E, A, H, S, P, B;
5775
5822
  if (this.isOpen) return;
5776
- const e = (B = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : B.call(T, ".wm-launcherWrap");
5823
+ const e = (E = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : E.call(T, ".wm-launcherWrap");
5777
5824
  if (!e) return;
5778
5825
  const t = e.getBoundingClientRect();
5779
5826
  if (!t.width || !t.height) return;
5780
- const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (M = (H = this.$el) == null ? void 0 : H.querySelector) == null ? void 0 : M.call(H, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (N = (F = this.$el) == null ? void 0 : F.querySelectorAll) == null ? void 0 : N.call(F, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
5781
- let w = null;
5827
+ const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (S = (H = this.$el) == null ? void 0 : H.querySelector) == null ? void 0 : S.call(H, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (B = (P = this.$el) == null ? void 0 : P.querySelectorAll) == null ? void 0 : B.call(P, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
5828
+ let b = null;
5782
5829
  if (k) {
5783
- const D = k.getBoundingClientRect();
5784
- w = {
5785
- width: Math.ceil(D.width),
5786
- height: Math.ceil(D.height),
5787
- rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
5788
- bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
5830
+ const U = k.getBoundingClientRect();
5831
+ b = {
5832
+ width: Math.ceil(U.width),
5833
+ height: Math.ceil(U.height),
5834
+ rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
5835
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
5789
5836
  };
5790
5837
  }
5791
5838
  this.notifyParentResize("closed", {
@@ -5794,7 +5841,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
5794
5841
  launcherWidth: l ? Math.ceil(l.width) : null,
5795
5842
  launcherHeight: l ? Math.ceil(l.height) : null,
5796
5843
  launcherHovered: this.launcherHovered,
5797
- peek: w,
5844
+ peek: b,
5798
5845
  peekHovered: this.launcherHovered && n
5799
5846
  });
5800
5847
  },
@@ -6008,40 +6055,40 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
6008
6055
  }
6009
6056
  }
6010
6057
  }
6011
- }, xa = {
6058
+ }, Ea = {
6012
6059
  key: 0,
6013
6060
  class: "wm-loading",
6014
6061
  "aria-busy": "true",
6015
6062
  "aria-live": "polite"
6016
- }, Oa = ["aria-label"], La = {
6063
+ }, Ia = ["aria-label"], Ba = {
6017
6064
  key: 0,
6018
6065
  class: "wm-state"
6019
- }, Ba = { class: "wm-state__err" }, Ea = { class: "wm-state__errTitle" }, Ia = { class: "wm-state__errSub" }, Ra = { class: "wm-bottom" }, Na = {
6066
+ }, Ra = { class: "wm-state__err" }, Na = { class: "wm-state__errTitle" }, Pa = { class: "wm-state__errSub" }, Fa = { class: "wm-bottom" }, Ua = {
6020
6067
  key: 0,
6021
6068
  ref: "floatEl",
6022
6069
  class: "wm-float"
6023
- }, Fa = {
6070
+ }, Da = {
6024
6071
  key: 1,
6025
6072
  class: "wm-actionWait",
6026
6073
  role: "status",
6027
6074
  "aria-live": "polite"
6028
- }, Ua = { class: "wm-actionWait__lbl" }, Da = {
6075
+ }, ja = { class: "wm-actionWait__lbl" }, Ha = {
6029
6076
  key: 2,
6030
6077
  class: "wm-attached"
6031
- }, Pa = ["aria-label", "onClick"];
6032
- function ja(e, t, n, i, r, s) {
6033
- const a = I("Launcher"), l = I("Header"), p = I("Onboarding"), k = I("MessageList"), w = I("ApprovalCard"), T = I("FormCard"), B = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), F = I("RenameDialog");
6078
+ }, za = ["aria-label", "onClick"];
6079
+ function qa(e, t, n, i, r, s) {
6080
+ const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), b = R("ApprovalCard"), T = R("FormCard"), E = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), P = R("RenameDialog");
6034
6081
  return c(), u("div", {
6035
6082
  class: O(["wm-root", `wm-root--${n.displayMode}`])
6036
6083
  }, [
6037
- !r.isOpen && !s.isEmbedded ? (c(), U(a, {
6084
+ !r.isOpen && !s.isEmbedded ? (c(), F(a, {
6038
6085
  key: 0,
6039
6086
  "unread-count": s.unreadCount,
6040
6087
  peeks: s.launcherPeeks,
6041
6088
  onOpen: s.openFromPeek,
6042
6089
  onDismiss: s.dismissPeek,
6043
6090
  onHover: s.onLauncherHover
6044
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6091
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : y("", !0),
6045
6092
  r.isOpen || s.isEmbedded ? (c(), u("section", {
6046
6093
  key: 1,
6047
6094
  class: O([
@@ -6053,13 +6100,13 @@ function ja(e, t, n, i, r, s) {
6053
6100
  role: "dialog",
6054
6101
  "aria-label": "Messenger"
6055
6102
  }, [
6056
- !s.ready && !s.error ? (c(), u("div", xa, [
6057
- s.isEmbedded ? b("", !0) : (c(), u("button", {
6103
+ !s.ready && !s.error ? (c(), u("div", Ea, [
6104
+ s.isEmbedded ? y("", !0) : (c(), u("button", {
6058
6105
  key: 0,
6059
6106
  type: "button",
6060
6107
  class: "wm-loading__close",
6061
6108
  "aria-label": s.t("loading.minimize"),
6062
- onClick: t[0] || (t[0] = (...N) => s.close && s.close(...N))
6109
+ onClick: t[0] || (t[0] = (...B) => s.close && s.close(...B))
6063
6110
  }, [...t[5] || (t[5] = [
6064
6111
  o("svg", {
6065
6112
  width: "13",
@@ -6074,12 +6121,12 @@ function ja(e, t, n, i, r, s) {
6074
6121
  }, [
6075
6122
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6076
6123
  ], -1)
6077
- ])], 8, Oa)),
6124
+ ])], 8, Ia)),
6078
6125
  t[6] || (t[6] = o("div", {
6079
6126
  class: "wm-loading__spinner",
6080
6127
  "aria-hidden": "true"
6081
6128
  }, null, -1))
6082
- ])) : (c(), u(E, { key: 1 }, [
6129
+ ])) : (c(), u(I, { key: 1 }, [
6083
6130
  $(l, {
6084
6131
  title: s.headerTitle,
6085
6132
  "team-members": s.teamMembers,
@@ -6094,8 +6141,8 @@ function ja(e, t, n, i, r, s) {
6094
6141
  onMore: s.toggleMore,
6095
6142
  onClose: s.close
6096
6143
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6097
- s.error ? (c(), u("div", La, [
6098
- o("div", Ba, [
6144
+ s.error ? (c(), u("div", Ba, [
6145
+ o("div", Ra, [
6099
6146
  t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
6100
6147
  o("svg", {
6101
6148
  width: "14",
@@ -6112,11 +6159,11 @@ function ja(e, t, n, i, r, s) {
6112
6159
  ])
6113
6160
  ], -1)),
6114
6161
  o("div", null, [
6115
- o("div", Ea, v(s.t("error.connectionFailed")), 1),
6116
- o("div", Ia, v(s.error), 1)
6162
+ o("div", Na, v(s.t("error.connectionFailed")), 1),
6163
+ o("div", Pa, v(s.error), 1)
6117
6164
  ])
6118
6165
  ])
6119
- ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
6166
+ ])) : s.currentConv ? (c(), u(I, { key: 2 }, [
6120
6167
  $(k, {
6121
6168
  ref: "messageList",
6122
6169
  messages: s.displayedMessages,
@@ -6131,9 +6178,9 @@ function ja(e, t, n, i, r, s) {
6131
6178
  "ai-agent-avatar-url": s.agentAvatarUrl,
6132
6179
  onLoadMore: s.onLoadMore
6133
6180
  }, 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"]),
6134
- o("div", Ra, [
6135
- s.floatVisible ? (c(), u("div", Na, [
6136
- s.approvalReady ? (c(), U(w, {
6181
+ o("div", Fa, [
6182
+ s.floatVisible ? (c(), u("div", Ua, [
6183
+ s.approvalReady ? (c(), F(b, {
6137
6184
  key: 0,
6138
6185
  action: s.approvalTitle,
6139
6186
  detail: s.approvalDetail,
@@ -6141,36 +6188,36 @@ function ja(e, t, n, i, r, s) {
6141
6188
  "agent-name": s.agentName,
6142
6189
  "agent-avatar-url": s.agentAvatarUrl,
6143
6190
  onCallback: s.onApprovalCallback
6144
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), U(T, {
6191
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), F(T, {
6145
6192
  key: s.pendingForm.message && s.pendingForm.message.id,
6146
6193
  form: s.pendingForm.form,
6147
6194
  "agent-name": s.agentName,
6148
6195
  "agent-avatar-url": s.agentAvatarUrl,
6149
6196
  onSubmit: s.onFormSubmit
6150
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), U(B, {
6197
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), F(E, {
6151
6198
  key: 2,
6152
6199
  busy: r.feedbackBusy,
6153
6200
  done: r.feedbackDone,
6154
6201
  onSubmit: s.onFeedback
6155
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), U(A, {
6202
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), F(A, {
6156
6203
  key: 3,
6157
6204
  items: s.suggestions,
6158
6205
  onSelect: s.onSuggestion
6159
6206
  }, null, 8, ["items", "onSelect"]))
6160
- ], 512)) : b("", !0),
6161
- s.actionInFlight ? (c(), u("div", Fa, [
6207
+ ], 512)) : y("", !0),
6208
+ s.actionInFlight ? (c(), u("div", Da, [
6162
6209
  t[8] || (t[8] = o("span", {
6163
6210
  class: "wm-actionWait__spinner",
6164
6211
  "aria-hidden": "true"
6165
6212
  }, null, -1)),
6166
- o("span", Ua, v(s.t("action.inProgress", {
6213
+ o("span", ja, v(s.t("action.inProgress", {
6167
6214
  name: s.actionInFlightName
6168
6215
  })), 1)
6169
- ])) : (c(), U(H, {
6216
+ ])) : (c(), F(H, {
6170
6217
  key: 2,
6171
6218
  ref: "composer",
6172
6219
  modelValue: r.draft,
6173
- "onUpdate:modelValue": t[1] || (t[1] = (N) => r.draft = N),
6220
+ "onUpdate:modelValue": t[1] || (t[1] = (B) => r.draft = B),
6174
6221
  placeholder: s.composerPlaceholder,
6175
6222
  disabled: !!s.pendingApproval,
6176
6223
  "attach-label": s.t("composer.attachFile"),
@@ -6179,7 +6226,7 @@ function ja(e, t, n, i, r, s) {
6179
6226
  onAttach: s.onAttach
6180
6227
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6181
6228
  ]),
6182
- r.moreOpen ? (c(), U(M, {
6229
+ r.moreOpen ? (c(), F(S, {
6183
6230
  key: 0,
6184
6231
  "can-rename": !!s.currentConv && !s.currentConv._draft,
6185
6232
  "can-export": !!s.currentConv && !s.currentConv._draft,
@@ -6187,21 +6234,21 @@ function ja(e, t, n, i, r, s) {
6187
6234
  "browser-notif-enabled": e.browserNotifEnabled,
6188
6235
  "status-url": s.statusUrl,
6189
6236
  "help-url": s.helpUrl,
6190
- onClose: t[2] || (t[2] = (N) => r.moreOpen = !1),
6237
+ onClose: t[2] || (t[2] = (B) => r.moreOpen = !1),
6191
6238
  onSoundToggle: e.onSoundToggle,
6192
6239
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6193
6240
  onAction: s.onMoreAction
6194
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
6195
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), U(F, {
6241
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0),
6242
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), F(P, {
6196
6243
  key: 1,
6197
6244
  "initial-value": s.currentConv.name || "",
6198
6245
  title: s.t("rename.dialogTitle"),
6199
- onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
6246
+ onClose: t[3] || (t[3] = (B) => r.renameDialogOpen = !1),
6200
6247
  onSubmit: s.onRenameSubmit
6201
- }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
6202
- r.pendingAttachments.length ? (c(), u("div", Da, [
6203
- (c(!0), u(E, null, P(r.pendingAttachments, (N, D) => (c(), u("div", {
6204
- key: D,
6248
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
6249
+ r.pendingAttachments.length ? (c(), u("div", Ha, [
6250
+ (c(!0), u(I, null, D(r.pendingAttachments, (B, U) => (c(), u("div", {
6251
+ key: U,
6205
6252
  class: "wm-attached__chip"
6206
6253
  }, [
6207
6254
  t[10] || (t[10] = o("svg", {
@@ -6217,11 +6264,11 @@ function ja(e, t, n, i, r, s) {
6217
6264
  }, [
6218
6265
  o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
6219
6266
  ], -1)),
6220
- o("span", null, v(N.name), 1),
6267
+ o("span", null, v(B.name), 1),
6221
6268
  o("button", {
6222
6269
  type: "button",
6223
6270
  "aria-label": s.t("attachment.remove"),
6224
- onClick: (G) => r.pendingAttachments.splice(D, 1)
6271
+ onClick: (Y) => r.pendingAttachments.splice(U, 1)
6225
6272
  }, [...t[9] || (t[9] = [
6226
6273
  o("svg", {
6227
6274
  width: "10",
@@ -6236,10 +6283,10 @@ function ja(e, t, n, i, r, s) {
6236
6283
  }, [
6237
6284
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6238
6285
  ], -1)
6239
- ])], 8, Pa)
6286
+ ])], 8, za)
6240
6287
  ]))), 128))
6241
- ])) : b("", !0)
6242
- ], 64)) : (c(), U(p, {
6288
+ ])) : y("", !0)
6289
+ ], 64)) : (c(), F(p, {
6243
6290
  key: 1,
6244
6291
  "welcome-message": s.widgetWelcomeMessage,
6245
6292
  subtitle: s.widgetSubtitle,
@@ -6252,7 +6299,7 @@ function ja(e, t, n, i, r, s) {
6252
6299
  onSelect: s.onQuickLink,
6253
6300
  onResume: s.onDrawerPick
6254
6301
  }, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6255
- r.moreOpen && !s.currentConv ? (c(), U(M, {
6302
+ r.moreOpen && !s.currentConv ? (c(), F(S, {
6256
6303
  key: 3,
6257
6304
  "can-rename": !1,
6258
6305
  "can-export": !1,
@@ -6260,62 +6307,62 @@ function ja(e, t, n, i, r, s) {
6260
6307
  "browser-notif-enabled": e.browserNotifEnabled,
6261
6308
  "status-url": s.statusUrl,
6262
6309
  "help-url": s.helpUrl,
6263
- onClose: t[4] || (t[4] = (N) => r.moreOpen = !1),
6310
+ onClose: t[4] || (t[4] = (B) => r.moreOpen = !1),
6264
6311
  onSoundToggle: e.onSoundToggle,
6265
6312
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6266
6313
  onAction: s.onMoreAction
6267
- }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0)
6314
+ }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0)
6268
6315
  ], 64))
6269
- ], 6)) : b("", !0)
6316
+ ], 6)) : y("", !0)
6270
6317
  ], 2);
6271
6318
  }
6272
- const qa = /* @__PURE__ */ R(Ta, [["render", ja], ["__scopeId", "data-v-010fdbd1"]]), $a = "0.5.28";
6319
+ const Va = /* @__PURE__ */ N(La, [["render", qa], ["__scopeId", "data-v-1f875d1f"]]), Wa = "0.5.29";
6273
6320
  export {
6274
6321
  le as AIAvatar,
6275
6322
  ge as AVATAR_COLORS,
6276
6323
  ts as ActionResult,
6277
- hi as ApprovalCard,
6324
+ gi as ApprovalCard,
6278
6325
  ds as ArtifactFormResponse,
6279
6326
  Cs as ArtifactInfoCard,
6280
6327
  zs as ArtifactRenderer,
6281
- Ds as ArtifactTicket,
6328
+ Us as ArtifactTicket,
6282
6329
  er as AttachmentPreview,
6283
6330
  rr as Bubble,
6284
- Xr as Composer,
6331
+ ti as Composer,
6285
6332
  Ze as DEFAULT_BASE_URL,
6286
- ie as DEFAULT_LANGUAGE,
6287
- Zi as Feedback,
6288
- Pi as FormCard,
6333
+ ae as DEFAULT_LANGUAGE,
6334
+ na as Feedback,
6335
+ zi as FormCard,
6289
6336
  ln as Header,
6290
6337
  Re as HumanAvatar,
6291
- Ft as Launcher,
6292
- be as MEDIA_RECORDER_SUPPORTED,
6293
- Ir as MessageList,
6294
- qa as Messenger,
6295
- fa as MoreMenu,
6338
+ Pt as Launcher,
6339
+ ke as MEDIA_RECORDER_SUPPORTED,
6340
+ Pr as MessageList,
6341
+ Va as Messenger,
6342
+ pa as MoreMenu,
6296
6343
  qn as Onboarding,
6297
6344
  he as SCREEN_CAPTURE_SUPPORTED,
6298
6345
  et as SUPPORTED_LANGUAGES,
6299
- ni as SuggestionChips,
6346
+ ii as SuggestionChips,
6300
6347
  Gt as TeamAvatars,
6301
6348
  lr as Typing,
6302
- $a as VERSION,
6303
- ve as avatarColor,
6304
- ye as avatarInitials,
6305
- Nr as captureScreenshotFile,
6349
+ Wa as VERSION,
6350
+ ye as avatarColor,
6351
+ we as avatarInitials,
6352
+ Ur as captureScreenshotFile,
6306
6353
  z as colors,
6307
6354
  Qe as createStore,
6308
6355
  j as createTranslator,
6309
6356
  We as createTransport,
6310
- oe as dateLocale,
6311
- qa as default,
6312
- Ee as formatTime,
6313
- za as guessAttachmentKind,
6314
- Rr as pickRecorderMime,
6357
+ re as dateLocale,
6358
+ Va as default,
6359
+ pe as formatTime,
6360
+ Ka as guessAttachmentKind,
6361
+ Fr as pickRecorderMime,
6315
6362
  dn as renderInlineMarkdown,
6316
6363
  un as renderMarkdown,
6317
- we as resolveLanguage,
6318
- Ur as startScreenRecording,
6364
+ be as resolveLanguage,
6365
+ jr as startScreenRecording,
6319
6366
  Xe as tokensCss,
6320
6367
  Je as uuid,
6321
6368
  Je as v4