@_solaris/messenger-widget 0.5.78 → 0.5.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as O, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as De, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as l, createCommentVNode as k, createBlock as P, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Oe } from "vue";
1
+ import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as Ue, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as D, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -38,18 +38,18 @@ function Ze(e) {
38
38
  function s(u, g) {
39
39
  return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(g), () => t.listeners.get(u).delete(g);
40
40
  }
41
- function r(u, g) {
41
+ function i(u, g) {
42
42
  const p = t.listeners.get(u);
43
43
  p && p.forEach((S) => {
44
44
  try {
45
45
  S(g);
46
- } catch (R) {
47
- console.error("[transport] listener", u, R);
46
+ } catch (O) {
47
+ console.error("[transport] listener", u, O);
48
48
  }
49
49
  });
50
50
  }
51
- function i(u) {
52
- t.connection !== u && (t.connection = u, r("connection", u));
51
+ function a(u) {
52
+ t.connection !== u && (t.connection = u, i("connection", u));
53
53
  }
54
54
  function n() {
55
55
  return {
@@ -64,7 +64,7 @@ function Ze(e) {
64
64
  ...t.origin ? { "X-Parent-Origin": t.origin } : {}
65
65
  };
66
66
  }
67
- async function a(u, g, p) {
67
+ async function r(u, g, p) {
68
68
  const S = await fetch(`${t.baseUrl}${we}${g}`, {
69
69
  method: u,
70
70
  credentials: "include",
@@ -72,14 +72,14 @@ function Ze(e) {
72
72
  body: p !== void 0 ? JSON.stringify(p) : void 0
73
73
  });
74
74
  if (!S.ok) {
75
- const R = await o(S), x = new Error(
76
- `HTTP ${S.status} ${u} ${g} :: ${(R == null ? void 0 : R.error) || S.statusText}`
75
+ const O = await l(S), x = new Error(
76
+ `HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
77
77
  );
78
- throw x.status = S.status, x.body = R, x;
78
+ throw x.status = S.status, x.body = O, x;
79
79
  }
80
80
  return S.status === 204 ? null : S.json();
81
81
  }
82
- async function o(u) {
82
+ async function l(u) {
83
83
  try {
84
84
  return await u.json();
85
85
  } catch {
@@ -112,34 +112,34 @@ function Ze(e) {
112
112
  }
113
113
  );
114
114
  if (!g.ok) {
115
- const V = await o(g), Z = new Error(
115
+ const V = await l(g), Z = new Error(
116
116
  `Session bootstrap failed: HTTP ${g.status} :: ${(V == null ? void 0 : V.error) || g.statusText}`
117
117
  );
118
118
  throw Z.status = g.status, Z.body = V, Z;
119
119
  }
120
120
  const p = await g.json();
121
121
  t.userId = p.external_id;
122
- const [S, R] = await Promise.all([
122
+ const [S, O] = await Promise.all([
123
123
  fetch(
124
124
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
125
125
  { credentials: "include" }
126
126
  ).then(async (V) => {
127
127
  if (!V.ok) {
128
- const Z = await o(V);
128
+ const Z = await l(V);
129
129
  throw new Error(
130
130
  `HTTP ${V.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || V.statusText}`
131
131
  );
132
132
  }
133
133
  return V.json();
134
134
  }),
135
- a("GET", "/customers/me")
136
- ]), x = { config: S, customer: (R == null ? void 0 : R.customer) ?? null };
137
- return t.lastBootstrap = x, await b(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
135
+ r("GET", "/customers/me")
136
+ ]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
137
+ return t.lastBootstrap = x, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
138
138
  "visibilitychange",
139
139
  t.visibilityHandler
140
140
  )), fe(), x;
141
141
  }
142
- async function b() {
142
+ async function k() {
143
143
  try {
144
144
  const u = await E();
145
145
  t.lastActivityAt = u.reduce((g, p) => {
@@ -151,45 +151,45 @@ function Ze(e) {
151
151
  }
152
152
  }
153
153
  async function y() {
154
- const u = await a("GET", "/customers/me");
154
+ const u = await r("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
157
- async function T(u) {
158
- const g = await a("PATCH", "/customers/me", u);
157
+ async function M(u) {
158
+ const g = await r("PATCH", "/customers/me", u);
159
159
  return (g == null ? void 0 : g.customer) ?? null;
160
160
  }
161
161
  async function E() {
162
- const u = await a("GET", "/conversations");
162
+ const u = await r("GET", "/conversations");
163
163
  return (u == null ? void 0 : u.conversations) ?? [];
164
164
  }
165
165
  async function A(u = {}) {
166
- return (await a("POST", "/conversations", u)).conversation;
166
+ return (await r("POST", "/conversations", u)).conversation;
167
167
  }
168
168
  async function q(u) {
169
- return (await a(
169
+ return (await r(
170
170
  "GET",
171
171
  `/conversations/${encodeURIComponent(u)}`
172
172
  )).conversation;
173
173
  }
174
- async function M(u, g) {
175
- return (await a(
174
+ async function T(u, g) {
175
+ return (await r(
176
176
  "PATCH",
177
177
  `/conversations/${encodeURIComponent(u)}`,
178
178
  g
179
179
  )).conversation;
180
180
  }
181
- async function U(u, g) {
182
- return a(
181
+ async function N(u, g) {
182
+ return r(
183
183
  "PATCH",
184
184
  `/conversations/${encodeURIComponent(u)}/read`,
185
185
  { message_id: g }
186
186
  );
187
187
  }
188
- async function D(u, g = {}) {
188
+ async function U(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
190
  g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
191
  const S = p.toString() ? `?${p.toString()}` : "";
192
- return a(
192
+ return r(
193
193
  "GET",
194
194
  `/conversations/${encodeURIComponent(u)}/messages${S}`
195
195
  );
@@ -203,25 +203,25 @@ function Ze(e) {
203
203
  author: { id: t.userId, type: "user" },
204
204
  created_at: g.created_at || (/* @__PURE__ */ new Date()).toISOString()
205
205
  };
206
- return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), a(
206
+ return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), r(
207
207
  "POST",
208
208
  `/conversations/${encodeURIComponent(u)}/messages`,
209
209
  p
210
210
  );
211
211
  }
212
212
  async function W(u, g, p) {
213
- return ae(), a(
213
+ return ae(), r(
214
214
  "POST",
215
215
  `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
216
216
  p ? { inputs: p } : {}
217
217
  );
218
218
  }
219
219
  async function Q(u) {
220
- const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, R = await a("POST", "/attachments", {
220
+ const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await r("POST", "/attachments", {
221
221
  mime_type: p,
222
222
  size_bytes: S,
223
223
  name: g
224
- }), x = await fetch(R.upload_url, {
224
+ }), x = await fetch(O.upload_url, {
225
225
  method: "PUT",
226
226
  headers: { "Content-Type": p },
227
227
  body: u
@@ -230,13 +230,13 @@ function Ze(e) {
230
230
  throw new Error(`HTTP ${x.status} PUT signed upload`);
231
231
  return {
232
232
  type: tt(p),
233
- path: R.path,
233
+ path: O.path,
234
234
  mime_type: p,
235
235
  size_bytes: S
236
236
  };
237
237
  }
238
238
  async function se(u) {
239
- return a(
239
+ return r(
240
240
  "GET",
241
241
  `/attachments/sign?path=${encodeURIComponent(u)}`
242
242
  );
@@ -253,22 +253,22 @@ function Ze(e) {
253
253
  u.addEventListener(g, (p) => ie(g, p.data));
254
254
  u.addEventListener(
255
255
  "error",
256
- () => r("error", new Error("SSE error"))
257
- ), t.eventSource = u, i("open");
256
+ () => i("error", new Error("SSE error"))
257
+ ), t.eventSource = u, a("open");
258
258
  } catch (u) {
259
- console.error("[transport] SSE open failed", u), r("error", u);
259
+ console.error("[transport] SSE open failed", u), i("error", u);
260
260
  }
261
261
  }
262
262
  function ie(u, g) {
263
263
  try {
264
264
  const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
265
- r(u, S);
265
+ i(u, S);
266
266
  } catch (p) {
267
267
  console.error("[transport] bad SSE payload", u, p);
268
268
  }
269
269
  }
270
270
  function X() {
271
- t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && i("idle");
271
+ t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && a("idle");
272
272
  }
273
273
  function ae() {
274
274
  clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
@@ -280,11 +280,11 @@ function Ze(e) {
280
280
  }
281
281
  async function ye() {
282
282
  try {
283
- const u = await E(), g = u.reduce((S, R) => {
284
- const x = R == null ? void 0 : R.last_message_at;
283
+ const u = await E(), g = u.reduce((S, O) => {
284
+ const x = O == null ? void 0 : O.last_message_at;
285
285
  return x && (!S || x > S) ? x : S;
286
286
  }, null);
287
- g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
287
+ g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, i("activity", { conversations: u, latestAt: g }), ae());
288
288
  } catch (u) {
289
289
  console.error("[transport] poll failed", u);
290
290
  }
@@ -298,14 +298,14 @@ function Ze(e) {
298
298
  function m() {
299
299
  if (document.hidden)
300
300
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
301
- t.hiddenGraceTimer = null, document.hidden && (h(), X(), i("paused"));
301
+ t.hiddenGraceTimer = null, document.hidden && (h(), X(), a("paused"));
302
302
  }, Qe);
303
303
  else {
304
304
  if (t.hiddenGraceTimer) {
305
305
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
306
306
  return;
307
307
  }
308
- i("idle"), fe(), t.panelOpen && $();
308
+ a("idle"), fe(), t.panelOpen && $();
309
309
  }
310
310
  }
311
311
  function _() {
@@ -315,7 +315,7 @@ function Ze(e) {
315
315
  ), t.visibilityHandler = null), t.started = !1;
316
316
  }
317
317
  async function w(u) {
318
- return !u || typeof u != "object" ? null : a("POST", "/update", u);
318
+ return !u || typeof u != "object" ? null : r("POST", "/update", u);
319
319
  }
320
320
  function C(u) {
321
321
  if (!(!u || typeof u != "object"))
@@ -336,13 +336,13 @@ function Ze(e) {
336
336
  context: C,
337
337
  // REST
338
338
  getCustomer: y,
339
- patchCustomer: T,
339
+ patchCustomer: M,
340
340
  listConversations: E,
341
341
  createConversation: A,
342
342
  getConversation: q,
343
- patchConversation: M,
344
- markConversationRead: U,
345
- listMessages: D,
343
+ patchConversation: T,
344
+ markConversationRead: N,
345
+ listMessages: U,
346
346
  postMessage: L,
347
347
  postCallback: W,
348
348
  uploadAttachment: Q,
@@ -443,7 +443,7 @@ function st(e) {
443
443
  Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
444
444
  })
445
445
  );
446
- async function r(h) {
446
+ async function i(h) {
447
447
  try {
448
448
  const m = new Promise(
449
449
  (w, C) => setTimeout(
@@ -466,7 +466,7 @@ function st(e) {
466
466
  console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
467
467
  }
468
468
  }
469
- function i() {
469
+ function a() {
470
470
  for (const h of s)
471
471
  try {
472
472
  h();
@@ -485,18 +485,18 @@ function st(e) {
485
485
  }
486
486
  return t.customer;
487
487
  }
488
- async function a(h = {}) {
488
+ async function r(h = {}) {
489
489
  const m = await e.createConversation(h), _ = t.conversations.findIndex((w) => w.id === m.id);
490
490
  return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
491
491
  }
492
- const o = 50;
492
+ const l = 50;
493
493
  async function f(h) {
494
494
  const m = t.paginationByConv[h];
495
495
  if (!(m != null && m.loaded || m != null && m.loading)) {
496
496
  y(h, { nextCursor: null, loading: !0, loaded: !1 });
497
497
  try {
498
498
  const _ = await e.listMessages(h, {
499
- limit: o
499
+ limit: l
500
500
  }), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], u = /* @__PURE__ */ new Set();
501
501
  for (const p of w)
502
502
  (p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
@@ -517,7 +517,7 @@ function st(e) {
517
517
  }
518
518
  }
519
519
  }
520
- async function b(h) {
520
+ async function k(h) {
521
521
  var C;
522
522
  const m = t.paginationByConv[h];
523
523
  if (!m || m.loading || !m.nextCursor) return;
@@ -527,12 +527,12 @@ function st(e) {
527
527
  try {
528
528
  const u = await e.listMessages(h, {
529
529
  before: w,
530
- limit: o
530
+ limit: l
531
531
  }), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
532
532
  for (const x of p)
533
533
  (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}`);
534
- const R = g.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
535
- t.messagesByConv[h] = [...R, ...p], y(h, {
534
+ const O = g.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
535
+ t.messagesByConv[h] = [...O, ...p], y(h, {
536
536
  nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
537
537
  loading: !1,
538
538
  loaded: !0
@@ -545,7 +545,7 @@ function st(e) {
545
545
  function y(h, m) {
546
546
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
547
547
  }
548
- async function T(h, m) {
548
+ async function M(h, m) {
549
549
  const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((C) => C.id === h);
550
550
  w !== -1 && (t.conversations[w] = _);
551
551
  }
@@ -566,8 +566,8 @@ function st(e) {
566
566
  (S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id && g.add(S.client_msg_id);
567
567
  const p = [];
568
568
  for (const S of C) {
569
- const R = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
570
- $(h, S), R || p.push(S);
569
+ const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
570
+ $(h, S), O || p.push(S);
571
571
  }
572
572
  return p;
573
573
  } catch (w) {
@@ -587,7 +587,7 @@ function st(e) {
587
587
  }
588
588
  }
589
589
  async function q(h, m, { attachments: _, metadata: w } = {}) {
590
- var R;
590
+ var O;
591
591
  const C = (m || "").trim(), u = Array.isArray(_) && _.length > 0;
592
592
  if (!h || !C && !u) return;
593
593
  const g = nt(), p = fe(h), S = {
@@ -598,7 +598,7 @@ function st(e) {
598
598
  text_md: C,
599
599
  author: {
600
600
  type: "user",
601
- id: ((R = t.customer) == null ? void 0 : R.external_id) || null
601
+ id: ((O = t.customer) == null ? void 0 : O.external_id) || null
602
602
  },
603
603
  created_at: p,
604
604
  // Local-only flag — UI may render dimmed until the SSE echo lands.
@@ -622,7 +622,7 @@ function st(e) {
622
622
  });
623
623
  }
624
624
  }
625
- async function M(h, m, _) {
625
+ async function T(h, m, _) {
626
626
  h != null && (t.awaitingCallback[h] = !0);
627
627
  try {
628
628
  await e.postCallback(h, m, _);
@@ -630,10 +630,10 @@ function st(e) {
630
630
  console.error("[store] callback failed", w), h != null && delete t.awaitingCallback[h];
631
631
  }
632
632
  }
633
- const U = /* @__PURE__ */ new Map();
634
- async function D(h) {
633
+ const N = /* @__PURE__ */ new Map();
634
+ async function U(h) {
635
635
  if (!h) return null;
636
- const m = U.get(h);
636
+ const m = N.get(h);
637
637
  if (m != null && m.url) {
638
638
  const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
639
639
  if (!_ || _ - Date.now() > 6e4) return m.url;
@@ -641,7 +641,7 @@ function st(e) {
641
641
  try {
642
642
  const _ = await e.signAttachment(h);
643
643
  if (_ != null && _.signed_url)
644
- return U.set(h, {
644
+ return N.set(h, {
645
645
  url: _.signed_url,
646
646
  expires_at: _.expires_at
647
647
  }), _.signed_url;
@@ -659,7 +659,7 @@ function st(e) {
659
659
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
660
660
  }
661
661
  };
662
- await T(h, { metadata: u });
662
+ await M(h, { metadata: u });
663
663
  }
664
664
  function W(h) {
665
665
  var _, w;
@@ -702,15 +702,15 @@ function st(e) {
702
702
  return [];
703
703
  if (((C = p == null ? void 0 : p.author) == null ? void 0 : C.type) !== "agent_ia") continue;
704
704
  const S = (u = p == null ? void 0 : p.metadata) == null ? void 0 : u.suggested_replies;
705
- return Array.isArray(S) && S.length ? S.map((R) => {
706
- if (typeof R == "string") {
707
- const x = R.trim();
705
+ return Array.isArray(S) && S.length ? S.map((O) => {
706
+ if (typeof O == "string") {
707
+ const x = O.trim();
708
708
  return x ? { label: x, kind: null } : null;
709
709
  }
710
- if (R && typeof R == "object" && typeof R.label == "string") {
711
- const x = R.label.trim();
710
+ if (O && typeof O == "object" && typeof O.label == "string") {
711
+ const x = O.label.trim();
712
712
  if (!x) return null;
713
- const V = R.kind === "cta" || R.kind === "choice" || R.kind === "followup" ? R.kind : null;
713
+ const V = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
714
714
  return { label: x, kind: V };
715
715
  }
716
716
  return null;
@@ -775,18 +775,18 @@ function st(e) {
775
775
  }
776
776
  return {
777
777
  state: t,
778
- start: r,
779
- destroy: i,
778
+ start: i,
779
+ destroy: a,
780
780
  applyCustomer: n,
781
- createConversation: a,
781
+ createConversation: r,
782
782
  openConversation: f,
783
- loadMore: b,
783
+ loadMore: k,
784
784
  fetchSinceLast: E,
785
- patchConversation: T,
785
+ patchConversation: M,
786
786
  markConversationRead: A,
787
787
  send: q,
788
- clickCallback: M,
789
- signAttachment: D,
788
+ clickCallback: T,
789
+ signAttachment: U,
790
790
  submitFeedback: L,
791
791
  getPendingApproval: W,
792
792
  getActionInFlight: se,
@@ -1161,55 +1161,55 @@ function ne(e) {
1161
1161
  return Le[xe(e)] || Le[ue];
1162
1162
  }
1163
1163
  function F(e) {
1164
- const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
1165
- return function(n, a) {
1166
- let o = s[n];
1167
- return o == null && (o = r[n]), o == null ? n : (a && (o = o.replace(
1164
+ const t = xe(e), s = ke[t] || ke[ue], i = ke[ue];
1165
+ return function(n, r) {
1166
+ let l = s[n];
1167
+ return l == null && (l = i[n]), l == null ? n : (r && (l = l.replace(
1168
1168
  /\{(\w+)\}/g,
1169
- (f, b) => a[b] != null ? String(a[b]) : f
1170
- )), o);
1169
+ (f, k) => r[k] != null ? String(r[k]) : f
1170
+ )), l);
1171
1171
  };
1172
1172
  }
1173
1173
  function Ie(e, t) {
1174
1174
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1175
- const s = e.options.find((r) => (r == null ? void 0 : r.value) === t);
1175
+ const s = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1176
1176
  return (s == null ? void 0 : s.label) || t;
1177
1177
  }
1178
1178
  function He(e, t, s) {
1179
- return Array.isArray(t) ? t.map((r) => Ie(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
1179
+ return Array.isArray(t) ? t.map((i) => Ie(e, String(i))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
1180
1180
  }
1181
1181
  function ht(e, t, s = F()) {
1182
1182
  if (!e || !t) return "";
1183
- const r = Array.isArray(e.fields) ? e.fields : [], i = [];
1184
- for (const n of r) {
1183
+ const i = Array.isArray(e.fields) ? e.fields : [], a = [];
1184
+ for (const n of i) {
1185
1185
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1186
- const a = t[n.key];
1187
- if (a == null || a === "") continue;
1188
- const o = He(n, a, s);
1189
- o && i.push(`${n.label} :
1190
- ${o}`);
1186
+ const r = t[n.key];
1187
+ if (r == null || r === "") continue;
1188
+ const l = He(n, r, s);
1189
+ l && a.push(`${n.label} :
1190
+ ${l}`);
1191
1191
  }
1192
- return i.join(`
1192
+ return a.join(`
1193
1193
 
1194
1194
  `);
1195
1195
  }
1196
1196
  function mt(e, t, s = F()) {
1197
- const r = [], i = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1198
- for (const n of i) {
1197
+ const i = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1198
+ for (const n of a) {
1199
1199
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1200
- const a = t == null ? void 0 : t[n.key];
1201
- if (a == null || a === "") continue;
1202
- const o = He(n, a, s);
1203
- if (!o) continue;
1204
- const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
1200
+ const r = t == null ? void 0 : t[n.key];
1201
+ if (r == null || r === "") continue;
1202
+ const l = He(n, r, s);
1203
+ if (!l) continue;
1204
+ const f = n.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1205
1205
  `));
1206
- r.push({ label: n.label, value: o, multiline: f });
1206
+ i.push({ label: n.label, value: l, multiline: f });
1207
1207
  }
1208
1208
  return {
1209
1209
  kind: "form_response",
1210
1210
  data: {
1211
1211
  title: (e == null ? void 0 : e.title) || s("form.title"),
1212
- fields: r
1212
+ fields: i
1213
1213
  }
1214
1214
  };
1215
1215
  }
@@ -1223,10 +1223,10 @@ const Ee = "";
1223
1223
  function de(e) {
1224
1224
  let t = e;
1225
1225
  const s = [];
1226
- return t = t.replace(/`([^`\n]+)`/g, (r, i) => {
1226
+ return t = t.replace(/`([^`\n]+)`/g, (i, a) => {
1227
1227
  const n = s.length;
1228
- return s.push(i), `${Ee}CODE${n}${Ee}`;
1229
- }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
1228
+ return s.push(a), `${Ee}CODE${n}${Ee}`;
1229
+ }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, a, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${a}</a>` : a), 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, a) => `<code class="wm-md-code">${s[+a]}</code>`), t;
1230
1230
  }
1231
1231
  function qe(e) {
1232
1232
  if (!e) return "";
@@ -1237,70 +1237,70 @@ function ft(e) {
1237
1237
  if (!e) return "";
1238
1238
  const t = ze(e).split(`
1239
1239
  `), s = [];
1240
- let r = 0;
1241
- for (; r < t.length; ) {
1242
- const n = t[r];
1240
+ let i = 0;
1241
+ for (; i < t.length; ) {
1242
+ const n = t[i];
1243
1243
  if (/^\s*```([\w-]*)\s*$/.exec(n)) {
1244
- r++;
1245
- const b = [];
1246
- for (; r < t.length && !/^\s*```\s*$/.test(t[r]); )
1247
- b.push(t[r]), r++;
1248
- r < t.length && r++, s.push({
1244
+ i++;
1245
+ const k = [];
1246
+ for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
1247
+ k.push(t[i]), i++;
1248
+ i < t.length && i++, s.push({
1249
1249
  type: "block",
1250
- html: `<pre class="wm-md-pre"><code>${b.join(`
1250
+ html: `<pre class="wm-md-pre"><code>${k.join(`
1251
1251
  `)}</code></pre>`
1252
1252
  });
1253
1253
  continue;
1254
1254
  }
1255
1255
  if (/^\s*[-*]\s+/.test(n)) {
1256
- const b = [];
1257
- for (; r < t.length; ) {
1258
- const T = /^\s*[-*]\s+(.*)$/.exec(t[r]);
1259
- if (!T) break;
1260
- b.push(T[1]), r++;
1256
+ const k = [];
1257
+ for (; i < t.length; ) {
1258
+ const M = /^\s*[-*]\s+(.*)$/.exec(t[i]);
1259
+ if (!M) break;
1260
+ k.push(M[1]), i++;
1261
1261
  }
1262
- const y = b.map((T) => `<li>${de(T)}</li>`).join("");
1262
+ const y = k.map((M) => `<li>${de(M)}</li>`).join("");
1263
1263
  s.push({
1264
1264
  type: "block",
1265
1265
  html: `<ul class="wm-md-ul">${y}</ul>`
1266
1266
  });
1267
1267
  continue;
1268
1268
  }
1269
- const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1270
- if (o) {
1271
- const b = parseInt(o[1], 10), y = [o[2]];
1272
- for (r++; r < t.length; ) {
1273
- const A = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1269
+ const l = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1270
+ if (l) {
1271
+ const k = parseInt(l[1], 10), y = [l[2]];
1272
+ for (i++; i < t.length; ) {
1273
+ const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
1274
1274
  if (!A) break;
1275
- y.push(A[1]), r++;
1275
+ y.push(A[1]), i++;
1276
1276
  }
1277
- const T = y.map((A) => `<li>${de(A)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
1277
+ const M = y.map((A) => `<li>${de(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1278
1278
  s.push({
1279
1279
  type: "block",
1280
- html: `<ol class="wm-md-ol"${E}>${T}</ol>`
1280
+ html: `<ol class="wm-md-ol"${E}>${M}</ol>`
1281
1281
  });
1282
1282
  continue;
1283
1283
  }
1284
1284
  const f = /^(#{1,6})\s+(.*)$/.exec(n);
1285
1285
  if (f) {
1286
- const b = f[1].length;
1286
+ const k = f[1].length;
1287
1287
  s.push({
1288
1288
  type: "block",
1289
- html: `<h${b} class="wm-md-h wm-md-h${b}">${de(f[2])}</h${b}>`
1290
- }), r++;
1289
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${de(f[2])}</h${k}>`
1290
+ }), i++;
1291
1291
  continue;
1292
1292
  }
1293
- s.push({ type: "text", html: de(n) }), r++;
1293
+ s.push({ type: "text", html: de(n) }), i++;
1294
1294
  }
1295
- let i = "";
1295
+ let a = "";
1296
1296
  for (let n = 0; n < s.length; n++) {
1297
- const a = s[n];
1298
- i += a.html;
1299
- const o = s[n + 1];
1300
- o && a.type !== "block" && o.type !== "block" && (i += `
1297
+ const r = s[n];
1298
+ a += r.html;
1299
+ const l = s[n + 1];
1300
+ l && r.type !== "block" && l.type !== "block" && (a += `
1301
1301
  `);
1302
1302
  }
1303
- return i;
1303
+ return a;
1304
1304
  }
1305
1305
  function he(e) {
1306
1306
  var s;
@@ -1314,52 +1314,52 @@ function Y(e) {
1314
1314
  }
1315
1315
  function Be(e, t) {
1316
1316
  let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1317
- for (const r of t)
1318
- r != null && r.created_at && r.created_at > s && (s = r.created_at);
1317
+ for (const i of t)
1318
+ i != null && i.created_at && i.created_at > s && (s = i.created_at);
1319
1319
  return s;
1320
1320
  }
1321
1321
  function _t(e, t) {
1322
- var s, r, i;
1322
+ var s, i, a;
1323
1323
  for (let n = t.length - 1; n >= 0; n--) {
1324
- const a = t[n];
1325
- if (!a) continue;
1326
- const o = typeof a.text_md == "string" ? a.text_md.trim() : "";
1327
- if (o)
1328
- return (((s = a.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + o.replace(/\s+/g, " ");
1329
- const f = (r = a.payload) == null ? void 0 : r.attachments;
1324
+ const r = t[n];
1325
+ if (!r) continue;
1326
+ const l = typeof r.text_md == "string" ? r.text_md.trim() : "";
1327
+ if (l)
1328
+ return (((s = r.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1329
+ const f = (i = r.payload) == null ? void 0 : i.attachments;
1330
1330
  if (Array.isArray(f) && f.length) return "📎 Pièce jointe";
1331
1331
  }
1332
- return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
1332
+ return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
1333
1333
  }
1334
1334
  function gt(e, t) {
1335
1335
  return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
1336
1336
  }
1337
- function pt(e, t, s, r) {
1338
- const i = [
1337
+ function pt(e, t, s, i) {
1338
+ const a = [
1339
1339
  `# ${e.name || s("common.conversation")}`,
1340
1340
  e.created_at ? s("export.createdOn", {
1341
- date: new Date(e.created_at).toLocaleString(r)
1341
+ date: new Date(e.created_at).toLocaleString(i)
1342
1342
  }) : "",
1343
1343
  ""
1344
1344
  ];
1345
1345
  for (const n of t) {
1346
1346
  if (!n) continue;
1347
- const a = (n.text_md || "").trim();
1348
- if (!a) continue;
1349
- const o = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1350
- i.push(`[${f}] ${o} :`), i.push(a), i.push("");
1347
+ const r = (n.text_md || "").trim();
1348
+ if (!r) continue;
1349
+ const l = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(i) : "";
1350
+ a.push(`[${f}] ${l} :`), a.push(r), a.push("");
1351
1351
  }
1352
- return i.join(`
1352
+ return a.join(`
1353
1353
  `);
1354
1354
  }
1355
- function vt(e, t, s = F(), r) {
1355
+ function vt(e, t, s = F(), i) {
1356
1356
  if (!e) return;
1357
- const i = pt(e, t || [], s, ne(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1357
+ const a = pt(e, t || [], s, ne(i)), n = new Blob([a], { type: "text/plain;charset=utf-8" });
1358
1358
  try {
1359
- const a = URL.createObjectURL(n), o = document.createElement("a");
1360
- o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
1361
- } catch (a) {
1362
- console.error("[ww-messenger] export failed", a);
1359
+ const r = URL.createObjectURL(n), l = document.createElement("a");
1360
+ l.href = r, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(r), 1e3);
1361
+ } catch (r) {
1362
+ console.error("[ww-messenger] export failed", r);
1363
1363
  }
1364
1364
  }
1365
1365
  const yt = {
@@ -1472,10 +1472,10 @@ const yt = {
1472
1472
  // at message-arrival time because the user may have closed the
1473
1473
  // panel or switched threads during the typing dwell.
1474
1474
  onMessageRevealed(e, t) {
1475
- var i;
1475
+ var a;
1476
1476
  if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !he(e)) return;
1477
1477
  const s = typeof document < "u" && document.hidden;
1478
- this.isOpen && !s && ((i = this.currentConv) == null ? void 0 : i.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1478
+ this.isOpen && !s && ((a = this.currentConv) == null ? void 0 : a.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
1479
1479
  },
1480
1480
  playNotificationSound() {
1481
1481
  if (typeof window > "u") return;
@@ -1489,17 +1489,17 @@ const yt = {
1489
1489
  t.resume();
1490
1490
  } catch {
1491
1491
  }
1492
- const s = t.currentTime, r = t.createOscillator(), i = t.createGain();
1493
- r.connect(i), i.connect(t.destination), r.type = "sine", r.frequency.setValueAtTime(880, s), r.frequency.exponentialRampToValueAtTime(1320, s + 0.08), i.gain.setValueAtTime(0, s), i.gain.linearRampToValueAtTime(0.12, s + 0.02), i.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), r.start(s), r.stop(s + 0.32);
1492
+ const s = t.currentTime, i = t.createOscillator(), a = t.createGain();
1493
+ i.connect(a), a.connect(t.destination), i.type = "sine", i.frequency.setValueAtTime(880, s), i.frequency.exponentialRampToValueAtTime(1320, s + 0.08), a.gain.setValueAtTime(0, s), a.gain.linearRampToValueAtTime(0.12, s + 0.02), a.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), i.start(s), i.stop(s + 0.32);
1494
1494
  } catch {
1495
1495
  }
1496
1496
  },
1497
1497
  showBrowserNotification(e, t) {
1498
1498
  if (typeof Notification > "u" || Notification.permission !== "granted") return;
1499
- const s = t == null ? void 0 : t.author, r = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", o = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
1499
+ const s = t == null ? void 0 : t.author, i = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), r = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = r ? r.slice(0, 140) : this.t("notification.youHaveNewMessage");
1500
1500
  try {
1501
1501
  const f = new Notification(n, {
1502
- body: o,
1502
+ body: l,
1503
1503
  tag: `wm-${e}`,
1504
1504
  renotify: !1,
1505
1505
  silent: !0
@@ -1598,26 +1598,26 @@ const yt = {
1598
1598
  // the activity isn't replayed via SSE, so we fetch it explicitly and
1599
1599
  // run it through pacing.
1600
1600
  setupLiveReveal() {
1601
- var s, r;
1601
+ var s, i;
1602
1602
  if (!this.transport) return;
1603
1603
  this.teardownLiveReveal();
1604
- const e = this.transport.on("message", (i) => {
1605
- const n = i == null ? void 0 : i.conversation_id, a = i == null ? void 0 : i.message;
1606
- n && a && this.paceLiveMessage(a, n);
1604
+ const e = this.transport.on("message", (a) => {
1605
+ const n = a == null ? void 0 : a.conversation_id, r = a == null ? void 0 : a.message;
1606
+ n && r && this.paceLiveMessage(r, n);
1607
1607
  });
1608
1608
  this._liveRevealConvSnapshot = new Map(
1609
- (((s = this.s) == null ? void 0 : s.conversations) || []).map((i) => [
1610
- i.id,
1611
- (i == null ? void 0 : i.last_message_at) || ""
1609
+ (((s = this.s) == null ? void 0 : s.conversations) || []).map((a) => [
1610
+ a.id,
1611
+ (a == null ? void 0 : a.last_message_at) || ""
1612
1612
  ])
1613
1613
  ), this._liveHwm = Object.fromEntries(
1614
- (((r = this.s) == null ? void 0 : r.conversations) || []).map((i) => [
1615
- i.id,
1616
- (i == null ? void 0 : i.last_message_at) || ""
1614
+ (((i = this.s) == null ? void 0 : i.conversations) || []).map((a) => [
1615
+ a.id,
1616
+ (a == null ? void 0 : a.last_message_at) || ""
1617
1617
  ])
1618
1618
  );
1619
- const t = this.transport.on("activity", (i) => {
1620
- this.handleLiveActivity(i);
1619
+ const t = this.transport.on("activity", (a) => {
1620
+ this.handleLiveActivity(a);
1621
1621
  });
1622
1622
  this._liveRevealOff = () => {
1623
1623
  try {
@@ -1647,29 +1647,29 @@ const yt = {
1647
1647
  // on background convs when SSE wasn't open at the moment they
1648
1648
  // arrived.
1649
1649
  async handleLiveActivity(e) {
1650
- var i, n;
1650
+ var a, n;
1651
1651
  const t = e == null ? void 0 : e.conversations;
1652
1652
  if (!Array.isArray(t) || !this.store) return;
1653
- const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), r = [];
1654
- for (const a of t) {
1655
- if (!(a != null && a.id)) continue;
1656
- const o = a.last_message_at || "";
1657
- if (!o) continue;
1658
- const f = s.get(a.id) || "";
1659
- o > f && r.push(a.id);
1653
+ const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
1654
+ for (const r of t) {
1655
+ if (!(r != null && r.id)) continue;
1656
+ const l = r.last_message_at || "";
1657
+ if (!l) continue;
1658
+ const f = s.get(r.id) || "";
1659
+ l > f && i.push(r.id);
1660
1660
  }
1661
1661
  this._liveRevealConvSnapshot = new Map(
1662
- t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
1662
+ t.map((r) => [r.id, (r == null ? void 0 : r.last_message_at) || ""])
1663
1663
  );
1664
- for (const a of r)
1664
+ for (const r of i)
1665
1665
  try {
1666
- const o = await ((n = (i = this.store).fetchSinceLast) == null ? void 0 : n.call(i, a));
1667
- if (!Array.isArray(o)) continue;
1668
- for (const f of o) this.paceLiveMessage(f, a);
1669
- } catch (o) {
1666
+ const l = await ((n = (a = this.store).fetchSinceLast) == null ? void 0 : n.call(a, r));
1667
+ if (!Array.isArray(l)) continue;
1668
+ for (const f of l) this.paceLiveMessage(f, r);
1669
+ } catch (l) {
1670
1670
  console.error(
1671
1671
  "[ww-messenger] activity delta fetch failed",
1672
- o
1672
+ l
1673
1673
  );
1674
1674
  }
1675
1675
  },
@@ -1679,16 +1679,16 @@ const yt = {
1679
1679
  // - inter-bubble gap scales with message length (reading time),
1680
1680
  // bounded by MIN/MAX_TYPING_MS.
1681
1681
  scheduleReveal(e, t) {
1682
- const s = this.revealPacing, r = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
1682
+ const s = this.revealPacing, i = Date.now(), a = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
1683
1683
  s.maxTypingMs,
1684
- Math.max(s.minTypingMs, i * s.msPerChar)
1685
- ), o = Math.max(
1686
- r + s.firstRevealDelayMs,
1684
+ Math.max(s.minTypingMs, a * s.msPerChar)
1685
+ ), l = Math.max(
1686
+ i + s.firstRevealDelayMs,
1687
1687
  this.nextRevealAt + s.pauseBetweenMs
1688
1688
  ) + n;
1689
- this.nextRevealAt = o;
1690
- const f = Math.max(0, o - r), b = e.id, y = setTimeout(() => {
1691
- this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1689
+ this.nextRevealAt = l;
1690
+ const f = Math.max(0, l - i), k = e.id, y = setTimeout(() => {
1691
+ this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1692
1692
  }, f);
1693
1693
  this.revealTimers.push(y);
1694
1694
  },
@@ -1698,28 +1698,28 @@ const yt = {
1698
1698
  // history (instant) and any live message that the transport
1699
1699
  // subscription already paced (idempotent on msg.id).
1700
1700
  paceMessages(e, t) {
1701
- var i;
1701
+ var a;
1702
1702
  if (!Array.isArray(e) || !e.length) return;
1703
- const s = Date.now(), r = { ...this.revealedAt };
1703
+ const s = Date.now(), i = { ...this.revealedAt };
1704
1704
  for (const n of e) {
1705
- if ((n == null ? void 0 : n.id) == null || r[n.id] !== void 0) continue;
1705
+ if ((n == null ? void 0 : n.id) == null || i[n.id] !== void 0) continue;
1706
1706
  if (!he(n)) {
1707
- r[n.id] = s;
1707
+ i[n.id] = s;
1708
1708
  continue;
1709
1709
  }
1710
- const a = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
1711
- if (!Number.isFinite(a) || a < this.convOpenedAt) {
1712
- r[n.id] = s;
1710
+ const r = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
1711
+ if (!Number.isFinite(r) || r < this.convOpenedAt) {
1712
+ i[n.id] = s;
1713
1713
  continue;
1714
1714
  }
1715
- const o = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((i = n == null ? void 0 : n.payload) == null ? void 0 : i.attachments) && n.payload.attachments.length > 0;
1716
- if (!o && !f) {
1717
- r[n.id] = s;
1715
+ const l = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((a = n == null ? void 0 : n.payload) == null ? void 0 : a.attachments) && n.payload.attachments.length > 0;
1716
+ if (!l && !f) {
1717
+ i[n.id] = s;
1718
1718
  continue;
1719
1719
  }
1720
- r[n.id] = 0, this.scheduleReveal(n, t);
1720
+ i[n.id] = 0, this.scheduleReveal(n, t);
1721
1721
  }
1722
- this.revealedAt = r;
1722
+ this.revealedAt = i;
1723
1723
  },
1724
1724
  // Pace a single live message from any conversation. Called from the
1725
1725
  // transport 'message' subscription (live SSE arrival) and from the
@@ -1737,19 +1737,19 @@ const yt = {
1737
1737
  // silently. Both sides of the comparison are server timestamps, so
1738
1738
  // this is immune to client clock skew.
1739
1739
  paceLiveMessage(e, t) {
1740
- var o;
1740
+ var l;
1741
1741
  if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
1742
1742
  if (!he(e)) {
1743
1743
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1744
1744
  return;
1745
1745
  }
1746
- const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, r = Array.isArray((o = e == null ? void 0 : e.payload) == null ? void 0 : o.attachments) && e.payload.attachments.length > 0;
1747
- if (!s && !r) {
1746
+ const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, i = Array.isArray((l = e == null ? void 0 : e.payload) == null ? void 0 : l.attachments) && e.payload.attachments.length > 0;
1747
+ if (!s && !i) {
1748
1748
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1749
1749
  return;
1750
1750
  }
1751
- const i = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
1752
- if (n && (i === void 0 || n > i) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(i !== void 0 && n && n > i)) {
1751
+ const a = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
1752
+ if (n && (a === void 0 || n > a) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(a !== void 0 && n && n > a)) {
1753
1753
  this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
1754
1754
  return;
1755
1755
  }
@@ -1815,16 +1815,16 @@ const yt = {
1815
1815
  // messages, or when the pointer is already at/ahead of the
1816
1816
  // candidate id.
1817
1817
  markConvRead(e) {
1818
- var n, a;
1818
+ var n, r;
1819
1819
  if (!(e != null && e.id) || e._draft || !this.store) return;
1820
- const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = At(t);
1820
+ const t = ((r = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : r[e.id]) || [], s = At(t);
1821
1821
  if (s == null) return;
1822
- const r = Y(e.last_read_message_id), i = Y(s);
1823
- i != null && (r != null && i <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1824
- const o = this._readMarkerPending;
1825
- this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
1826
- o.convId,
1827
- o.messageId
1822
+ const i = Y(e.last_read_message_id), a = Y(s);
1823
+ a != null && (i != null && a <= i || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1824
+ const l = this._readMarkerPending;
1825
+ this._readMarkerPending = null, this._readMarkerTimer = null, l && this.store && this.store.markConversationRead(
1826
+ l.convId,
1827
+ l.messageId
1828
1828
  );
1829
1829
  }, kt))));
1830
1830
  }
@@ -1838,10 +1838,10 @@ function At(e) {
1838
1838
  }
1839
1839
  return null;
1840
1840
  }
1841
- const N = (e, t) => {
1841
+ const P = (e, t) => {
1842
1842
  const s = e.__vccOpts || e;
1843
- for (const [r, i] of t)
1844
- s[r] = i;
1843
+ for (const [i, a] of t)
1844
+ s[i] = a;
1845
1845
  return s;
1846
1846
  }, St = {
1847
1847
  name: "WmHumanAvatar",
@@ -1864,9 +1864,9 @@ const N = (e, t) => {
1864
1864
  }
1865
1865
  }
1866
1866
  }, Tt = ["src", "alt"];
1867
- function Mt(e, t, s, r, i, n) {
1867
+ function Mt(e, t, s, i, a, n) {
1868
1868
  return c(), d("div", {
1869
- class: O(["wm-huav", { "wm-huav--tail": s.tail }]),
1869
+ class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
1870
1870
  style: z({
1871
1871
  width: s.size + "px",
1872
1872
  height: s.size + "px",
@@ -1884,7 +1884,7 @@ function Mt(e, t, s, r, i, n) {
1884
1884
  }, v(n.initials), 5))
1885
1885
  ], 6);
1886
1886
  }
1887
- const ve = /* @__PURE__ */ N(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Rt = {
1887
+ const ve = /* @__PURE__ */ P(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1888
1888
  name: "WmLauncher",
1889
1889
  components: { HumanAvatar: ve },
1890
1890
  inject: {
@@ -1910,24 +1910,24 @@ const ve = /* @__PURE__ */ N(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d
1910
1910
  return this.peeks.slice(0, xt).reverse();
1911
1911
  }
1912
1912
  }
1913
- }, Ot = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Nt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Dt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1914
- function zt(e, t, s, r, i, n) {
1915
- const a = B("HumanAvatar");
1913
+ }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Nt = { class: "wm-peek__action" }, Ut = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
1914
+ function zt(e, t, s, i, a, n) {
1915
+ const r = B("HumanAvatar");
1916
1916
  return c(), d("div", {
1917
1917
  class: "wm-launcherWrap",
1918
- onMouseenter: t[1] || (t[1] = (o) => e.$emit("hover", !0)),
1919
- onMouseleave: t[2] || (t[2] = (o) => e.$emit("hover", !1)),
1920
- onFocusin: t[3] || (t[3] = (o) => e.$emit("hover", !0)),
1921
- onFocusout: t[4] || (t[4] = (o) => e.$emit("hover", !1))
1918
+ onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
1919
+ onMouseleave: t[2] || (t[2] = (l) => e.$emit("hover", !1)),
1920
+ onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1921
+ onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1922
1922
  }, [
1923
- K(De, { name: "wm-peek" }, {
1923
+ K(Ue, { name: "wm-peek" }, {
1924
1924
  default: je(() => [
1925
1925
  n.visiblePeeks.length ? (c(), d("div", {
1926
1926
  key: 0,
1927
- class: O(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1927
+ class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1928
1928
  }, [
1929
- (c(!0), d(I, null, j(n.visiblePeeks, (o, f) => (c(), d("div", {
1930
- key: o.convId,
1929
+ (c(!0), d(I, null, j(n.visiblePeeks, (l, f) => (c(), d("div", {
1930
+ key: l.convId,
1931
1931
  class: "wm-peek",
1932
1932
  style: z({
1933
1933
  "--depth": n.visiblePeeks.length - 1 - f,
@@ -1936,21 +1936,21 @@ function zt(e, t, s, r, i, n) {
1936
1936
  role: "button",
1937
1937
  tabindex: "0",
1938
1938
  "aria-label": n.t("launcher.openConversationWith", {
1939
- name: o.senderName || n.t("launcher.theAgent")
1939
+ name: l.senderName || n.t("launcher.theAgent")
1940
1940
  }),
1941
- onClick: (b) => e.$emit("open", o.convId),
1941
+ onClick: (k) => e.$emit("open", l.convId),
1942
1942
  onKeydown: [
1943
- ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
1944
- ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
1943
+ ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
1944
+ ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1945
1945
  ]
1946
1946
  }, [
1947
- l("button", {
1947
+ o("button", {
1948
1948
  type: "button",
1949
1949
  class: "wm-peek__close",
1950
1950
  "aria-label": n.t("launcher.dismiss"),
1951
- onClick: J((b) => e.$emit("dismiss", o.convId), ["stop"])
1951
+ onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
1952
1952
  }, [...t[5] || (t[5] = [
1953
- l("svg", {
1953
+ o("svg", {
1954
1954
  width: "9",
1955
1955
  height: "9",
1956
1956
  viewBox: "0 0 24 24",
@@ -1961,45 +1961,45 @@ function zt(e, t, s, r, i, n) {
1961
1961
  "stroke-linejoin": "round",
1962
1962
  "aria-hidden": "true"
1963
1963
  }, [
1964
- l("path", { d: "M18 6L6 18M6 6l12 12" })
1964
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
1965
1965
  ], -1)
1966
1966
  ])], 8, Lt),
1967
- l("div", It, [
1968
- K(a, {
1969
- name: o.senderName,
1970
- "avatar-url": o.senderAvatarUrl,
1967
+ o("div", It, [
1968
+ K(r, {
1969
+ name: l.senderName,
1970
+ "avatar-url": l.senderAvatarUrl,
1971
1971
  size: 34
1972
1972
  }, null, 8, ["name", "avatar-url"]),
1973
- o.count > 1 ? (c(), d("span", {
1973
+ l.count > 1 ? (c(), d("span", {
1974
1974
  key: 0,
1975
1975
  class: "wm-peek__avatarBadge",
1976
- "aria-label": n.t("launcher.unreadMessages", { count: o.count })
1977
- }, v(o.count > 9 ? "9+" : o.count), 9, Et)) : k("", !0)
1976
+ "aria-label": n.t("launcher.unreadMessages", { count: l.count })
1977
+ }, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
1978
1978
  ]),
1979
- l("div", Bt, [
1980
- l("div", Pt, [
1981
- l("span", Nt, v(o.senderName || n.t("common.agent")), 1),
1982
- l("span", Ut, v(n.t("launcher.repliedToYou")), 1)
1979
+ o("div", Bt, [
1980
+ o("div", Pt, [
1981
+ o("span", Dt, v(l.senderName || n.t("common.agent")), 1),
1982
+ o("span", Nt, v(n.t("launcher.repliedToYou")), 1)
1983
1983
  ]),
1984
- l("p", Dt, v(o.preview), 1)
1984
+ o("p", Ut, v(l.preview), 1)
1985
1985
  ]),
1986
- l("button", {
1986
+ o("button", {
1987
1987
  type: "button",
1988
1988
  class: "wm-peek__open",
1989
- onClick: J((b) => e.$emit("open", o.convId), ["stop"])
1989
+ onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1990
1990
  }, v(n.t("common.open")), 9, jt)
1991
- ], 44, Ot))), 128))
1992
- ], 2)) : k("", !0)
1991
+ ], 44, Rt))), 128))
1992
+ ], 2)) : b("", !0)
1993
1993
  ]),
1994
1994
  _: 1
1995
1995
  }),
1996
- l("button", {
1996
+ o("button", {
1997
1997
  type: "button",
1998
1998
  class: "wm-launcher",
1999
1999
  "aria-label": n.t("launcher.open"),
2000
- onClick: t[0] || (t[0] = (o) => e.$emit("open"))
2000
+ onClick: t[0] || (t[0] = (l) => e.$emit("open"))
2001
2001
  }, [
2002
- t[6] || (t[6] = l("svg", {
2002
+ t[6] || (t[6] = o("svg", {
2003
2003
  width: "20",
2004
2004
  height: "20",
2005
2005
  viewBox: "0 0 24 24",
@@ -2010,7 +2010,7 @@ function zt(e, t, s, r, i, n) {
2010
2010
  "stroke-linejoin": "round",
2011
2011
  "aria-hidden": "true"
2012
2012
  }, [
2013
- l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2013
+ o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2014
2014
  ], -1)),
2015
2015
  s.unreadCount > 0 ? (c(), d("span", {
2016
2016
  key: 0,
@@ -2020,11 +2020,11 @@ function zt(e, t, s, r, i, n) {
2020
2020
  }) : n.t("launcher.unreadConversationsOne", {
2021
2021
  count: s.unreadCount
2022
2022
  })
2023
- }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : k("", !0)
2023
+ }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : b("", !0)
2024
2024
  ], 8, Ft)
2025
2025
  ], 32);
2026
2026
  }
2027
- const qt = /* @__PURE__ */ N(Rt, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2027
+ const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2028
2028
  name: "WmAIAvatar",
2029
2029
  props: {
2030
2030
  size: { type: Number, default: 26 },
@@ -2057,18 +2057,18 @@ const qt = /* @__PURE__ */ N(Rt, [["render", zt], ["__scopeId", "data-v-d81459bc
2057
2057
  key: 0,
2058
2058
  class: "wm-aiav__pulse"
2059
2059
  }, Wt = ["src", "alt"], $t = ["width", "height"];
2060
- function Gt(e, t, s, r, i, n) {
2060
+ function Gt(e, t, s, i, a, n) {
2061
2061
  return c(), d("div", {
2062
- class: O(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2062
+ class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2063
2063
  style: z({
2064
2064
  width: s.size + "px",
2065
2065
  height: s.size + "px",
2066
2066
  "--wm-avr": s.size * 0.32 + "px"
2067
2067
  })
2068
2068
  }, [
2069
- s.pulse ? (c(), d("div", Kt)) : k("", !0),
2070
- l("div", {
2071
- class: O(["wm-aiav__inner", {
2069
+ s.pulse ? (c(), d("div", Kt)) : b("", !0),
2070
+ o("div", {
2071
+ class: R(["wm-aiav__inner", {
2072
2072
  "wm-aiav__inner--glow": s.pulse,
2073
2073
  "wm-aiav__inner--img": !!s.imageUrl,
2074
2074
  "wm-aiav__inner--initials": !s.imageUrl && !!n.initials
@@ -2092,19 +2092,19 @@ function Gt(e, t, s, r, i, n) {
2092
2092
  fill: "none",
2093
2093
  "aria-hidden": "true"
2094
2094
  }, [...t[0] || (t[0] = [
2095
- l("path", {
2095
+ o("path", {
2096
2096
  d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
2097
2097
  fill: "white",
2098
2098
  opacity: "0.92"
2099
2099
  }, null, -1),
2100
- l("circle", {
2100
+ o("circle", {
2101
2101
  cx: "19",
2102
2102
  cy: "5",
2103
2103
  r: "1.5",
2104
2104
  fill: "white",
2105
2105
  opacity: "0.55"
2106
2106
  }, null, -1),
2107
- l("circle", {
2107
+ o("circle", {
2108
2108
  cx: "5",
2109
2109
  cy: "18",
2110
2110
  r: "1",
@@ -2115,7 +2115,7 @@ function Gt(e, t, s, r, i, n) {
2115
2115
  ], 6)
2116
2116
  ], 6);
2117
2117
  }
2118
- const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2118
+ const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2119
2119
  name: "WmTeamAvatars",
2120
2120
  props: {
2121
2121
  members: { type: Array, default: () => [] },
@@ -2144,32 +2144,32 @@ const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
2144
2144
  key: 0,
2145
2145
  class: "wm-team__label"
2146
2146
  };
2147
- function en(e, t, s, r, i, n) {
2147
+ function en(e, t, s, i, a, n) {
2148
2148
  return n.visible ? (c(), d("div", Jt, [
2149
- l("div", {
2149
+ o("div", {
2150
2150
  class: "wm-team__stack",
2151
2151
  style: z({ width: n.stackWidth + "px" })
2152
2152
  }, [
2153
- (c(!0), d(I, null, j(s.members.slice(0, 3), (a, o) => (c(), d("div", {
2154
- key: o,
2153
+ (c(!0), d(I, null, j(s.members.slice(0, 3), (r, l) => (c(), d("div", {
2154
+ key: l,
2155
2155
  class: "wm-team__pill",
2156
2156
  style: z({
2157
- left: o * 13 + "px",
2158
- zIndex: 3 - o,
2159
- background: n.colorFor(a)
2157
+ left: l * 13 + "px",
2158
+ zIndex: 3 - l,
2159
+ background: n.colorFor(r)
2160
2160
  })
2161
2161
  }, [
2162
- a.avatar_url ? (c(), d("img", {
2162
+ r.avatar_url ? (c(), d("img", {
2163
2163
  key: 0,
2164
- src: a.avatar_url,
2165
- alt: a.name || ""
2166
- }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(a)), 1))
2164
+ src: r.avatar_url,
2165
+ alt: r.name || ""
2166
+ }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(r)), 1))
2167
2167
  ], 4))), 128))
2168
2168
  ], 4),
2169
- s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : k("", !0)
2170
- ])) : k("", !0);
2169
+ s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : b("", !0)
2170
+ ])) : b("", !0);
2171
2171
  }
2172
- const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2172
+ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2173
2173
  name: "WmHeader",
2174
2174
  components: { AIAvatar: oe, TeamAvatars: tn },
2175
2175
  inject: {
@@ -2203,8 +2203,8 @@ const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2203
2203
  const e = Array.isArray(this.teamMembers) ? this.teamMembers : [];
2204
2204
  if (e.length <= 3) return e;
2205
2205
  const t = (/* @__PURE__ */ new Date()).getHours() % e.length, s = [];
2206
- for (let r = 0; r < 3; r++)
2207
- s.push(e[(t + r) % e.length]);
2206
+ for (let i = 0; i < 3; i++)
2207
+ s.push(e[(t + i) % e.length]);
2208
2208
  return s;
2209
2209
  }
2210
2210
  }
@@ -2215,8 +2215,8 @@ const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
2215
2215
  key: 3,
2216
2216
  class: "wm-header__fill"
2217
2217
  }, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
2218
- function fn(e, t, s, r, i, n) {
2219
- const a = B("AIAvatar"), o = B("TeamAvatars");
2218
+ function fn(e, t, s, i, a, n) {
2219
+ const r = B("AIAvatar"), l = B("TeamAvatars");
2220
2220
  return c(), d("div", sn, [
2221
2221
  s.showBack ? (c(), d("button", {
2222
2222
  key: 0,
@@ -2225,7 +2225,7 @@ function fn(e, t, s, r, i, n) {
2225
2225
  "aria-label": n.t("header.backToHome"),
2226
2226
  onClick: t[0] || (t[0] = (f) => e.$emit("back"))
2227
2227
  }, [...t[3] || (t[3] = [
2228
- l("svg", {
2228
+ o("svg", {
2229
2229
  width: "13",
2230
2230
  height: "13",
2231
2231
  viewBox: "0 0 24 24",
@@ -2236,59 +2236,59 @@ function fn(e, t, s, r, i, n) {
2236
2236
  "stroke-linejoin": "round",
2237
2237
  "aria-hidden": "true"
2238
2238
  }, [
2239
- l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2239
+ o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2240
2240
  ], -1)
2241
2241
  ])], 8, rn)) : (c(), d("div", an)),
2242
2242
  s.showIdentity ? (c(), d(I, { key: 2 }, [
2243
- l("div", on, [
2244
- K(a, {
2243
+ o("div", on, [
2244
+ K(r, {
2245
2245
  size: 30,
2246
2246
  name: s.agentName,
2247
2247
  "image-url": s.agentAvatarUrl
2248
2248
  }, null, 8, ["name", "image-url"])
2249
2249
  ]),
2250
- l("div", ln, [
2251
- l("div", cn, v(s.title), 1)
2250
+ o("div", ln, [
2251
+ o("div", cn, v(s.title), 1)
2252
2252
  ]),
2253
- n.hasTeam ? (c(), P(o, {
2253
+ n.hasTeam ? (c(), D(l, {
2254
2254
  key: 0,
2255
2255
  members: n.displayedTeamMembers,
2256
2256
  "response-label": ""
2257
- }, null, 8, ["members"])) : k("", !0)
2257
+ }, null, 8, ["members"])) : b("", !0)
2258
2258
  ], 64)) : (c(), d("div", dn)),
2259
- l("div", un, [
2259
+ o("div", un, [
2260
2260
  s.showMore ? (c(), d("button", {
2261
2261
  key: 0,
2262
2262
  type: "button",
2263
- class: O(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2263
+ class: R(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2264
2264
  "aria-label": n.t("header.moreOptions"),
2265
2265
  title: n.t("header.moreOptions"),
2266
2266
  onClick: t[1] || (t[1] = (f) => e.$emit("more"))
2267
2267
  }, [...t[4] || (t[4] = [
2268
- l("svg", {
2268
+ o("svg", {
2269
2269
  width: "13",
2270
2270
  height: "13",
2271
2271
  viewBox: "0 0 24 24",
2272
2272
  fill: "currentColor",
2273
2273
  "aria-hidden": "true"
2274
2274
  }, [
2275
- l("circle", {
2275
+ o("circle", {
2276
2276
  cx: "12",
2277
2277
  cy: "5",
2278
2278
  r: "1.6"
2279
2279
  }),
2280
- l("circle", {
2280
+ o("circle", {
2281
2281
  cx: "12",
2282
2282
  cy: "12",
2283
2283
  r: "1.6"
2284
2284
  }),
2285
- l("circle", {
2285
+ o("circle", {
2286
2286
  cx: "12",
2287
2287
  cy: "19",
2288
2288
  r: "1.6"
2289
2289
  })
2290
2290
  ], -1)
2291
- ])], 10, hn)) : k("", !0),
2291
+ ])], 10, hn)) : b("", !0),
2292
2292
  s.showClose ? (c(), d("button", {
2293
2293
  key: 1,
2294
2294
  type: "button",
@@ -2297,7 +2297,7 @@ function fn(e, t, s, r, i, n) {
2297
2297
  title: n.t("header.closeWidget"),
2298
2298
  onClick: t[2] || (t[2] = (f) => e.$emit("close"))
2299
2299
  }, [...t[5] || (t[5] = [
2300
- l("svg", {
2300
+ o("svg", {
2301
2301
  width: "13",
2302
2302
  height: "13",
2303
2303
  viewBox: "0 0 24 24",
@@ -2308,13 +2308,13 @@ function fn(e, t, s, r, i, n) {
2308
2308
  "stroke-linejoin": "round",
2309
2309
  "aria-hidden": "true"
2310
2310
  }, [
2311
- l("path", { d: "M18 6L6 18M6 6l12 12" })
2311
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
2312
2312
  ], -1)
2313
- ])], 8, mn)) : k("", !0)
2313
+ ])], 8, mn)) : b("", !0)
2314
2314
  ])
2315
2315
  ]);
2316
2316
  }
2317
- const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2317
+ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2318
2318
  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",
2319
2319
  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",
2320
2320
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2420,15 +2420,15 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2420
2420
  if (!e) return "";
2421
2421
  const t = new Date(e);
2422
2422
  if (Number.isNaN(t.getTime())) return "";
2423
- const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2424
- if (t.toDateString() === r.toDateString())
2423
+ const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2424
+ if (t.toDateString() === i.toDateString())
2425
2425
  return t.toLocaleTimeString(s, {
2426
2426
  hour: "2-digit",
2427
2427
  minute: "2-digit"
2428
2428
  });
2429
- if (r.getTime() - t.getTime() < 7 * 864e5) {
2430
- const a = t.toLocaleDateString(s, { weekday: "short" });
2431
- return a.charAt(0).toUpperCase() + a.slice(1);
2429
+ if (i.getTime() - t.getTime() < 7 * 864e5) {
2430
+ const r = t.toLocaleDateString(s, { weekday: "short" });
2431
+ return r.charAt(0).toUpperCase() + r.slice(1);
2432
2432
  }
2433
2433
  return t.toLocaleDateString(s, {
2434
2434
  day: "2-digit",
@@ -2442,13 +2442,13 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2442
2442
  }, Cn = ["onClick"], An = {
2443
2443
  key: 0,
2444
2444
  class: "wm-onb__defaultAvatar"
2445
- }, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, Rn = {
2445
+ }, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
2446
2446
  key: 0,
2447
2447
  class: "wm-onb__alert-sender"
2448
- }, On = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
2448
+ }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
2449
2449
  key: 0,
2450
2450
  class: "wm-onb__alert-time"
2451
- }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Nn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Dn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2451
+ }, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Nn = ["onClick"], Un = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
2452
2452
  key: 1,
2453
2453
  width: "18",
2454
2454
  height: "18",
@@ -2482,11 +2482,11 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2482
2482
  "stroke-linejoin": "round",
2483
2483
  "aria-hidden": "true"
2484
2484
  }, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
2485
- function Yn(e, t, s, r, i, n) {
2486
- const a = B("AIAvatar");
2485
+ function Yn(e, t, s, i, a, n) {
2486
+ const r = B("AIAvatar");
2487
2487
  return c(), d("div", pn, [
2488
- l("div", vn, [
2489
- t[2] || (t[2] = l("svg", {
2488
+ o("div", vn, [
2489
+ t[2] || (t[2] = o("svg", {
2490
2490
  class: "wm-onb__hero-deco",
2491
2491
  width: "180",
2492
2492
  height: "180",
@@ -2494,7 +2494,7 @@ function Yn(e, t, s, r, i, n) {
2494
2494
  fill: "none",
2495
2495
  "aria-hidden": "true"
2496
2496
  }, [
2497
- l("circle", {
2497
+ o("circle", {
2498
2498
  cx: "170",
2499
2499
  cy: "10",
2500
2500
  r: "105",
@@ -2503,7 +2503,7 @@ function Yn(e, t, s, r, i, n) {
2503
2503
  "stroke-dasharray": "1 5",
2504
2504
  opacity: "0.35"
2505
2505
  }),
2506
- l("circle", {
2506
+ o("circle", {
2507
2507
  cx: "170",
2508
2508
  cy: "10",
2509
2509
  r: "72",
@@ -2512,7 +2512,7 @@ function Yn(e, t, s, r, i, n) {
2512
2512
  "stroke-dasharray": "1 5",
2513
2513
  opacity: "0.5"
2514
2514
  }),
2515
- l("circle", {
2515
+ o("circle", {
2516
2516
  cx: "152",
2517
2517
  cy: "34",
2518
2518
  r: "2.5",
@@ -2520,27 +2520,27 @@ function Yn(e, t, s, r, i, n) {
2520
2520
  opacity: "0.65"
2521
2521
  })
2522
2522
  ], -1)),
2523
- K(a, {
2523
+ K(r, {
2524
2524
  size: 52,
2525
2525
  "image-url": s.defaultIconUrl
2526
2526
  }, null, 8, ["image-url"]),
2527
- l("div", yn, [
2528
- l("div", wn, v(n.heroTitle), 1),
2529
- l("div", bn, v(n.heroSub), 1)
2527
+ o("div", yn, [
2528
+ o("div", wn, v(n.heroTitle), 1),
2529
+ o("div", bn, v(n.heroSub), 1)
2530
2530
  ])
2531
2531
  ]),
2532
2532
  n.unreadThreads.length ? (c(), d("div", kn, [
2533
- (c(!0), d(I, null, j(n.unreadThreads, (o) => (c(), d("button", {
2534
- key: o.id,
2533
+ (c(!0), d(I, null, j(n.unreadThreads, (l) => (c(), d("button", {
2534
+ key: l.id,
2535
2535
  type: "button",
2536
2536
  class: "wm-onb__alert",
2537
- onClick: (f) => e.$emit("resume", o)
2537
+ onClick: (f) => e.$emit("resume", l)
2538
2538
  }, [
2539
- l("span", {
2540
- class: O(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2539
+ o("span", {
2540
+ class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(l)])
2541
2541
  }, [
2542
- n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
2543
- l("svg", {
2542
+ n.isDefaultAvatar(l) ? (c(), d("span", An, [...t[3] || (t[3] = [
2543
+ o("svg", {
2544
2544
  width: "20",
2545
2545
  height: "20",
2546
2546
  viewBox: "0 0 24 24",
@@ -2551,41 +2551,41 @@ function Yn(e, t, s, r, i, n) {
2551
2551
  "stroke-linejoin": "round",
2552
2552
  "aria-hidden": "true"
2553
2553
  }, [
2554
- l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2554
+ o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2555
2555
  ], -1)
2556
- ])])) : (c(), P(Ae(n.avatarComponent(o)), Fe({
2556
+ ])])) : (c(), D(Ae(n.avatarComponent(l)), Fe({
2557
2557
  key: 1,
2558
2558
  ref_for: !0
2559
- }, n.avatarProps(o)), null, 16)),
2560
- l("span", {
2559
+ }, n.avatarProps(l)), null, 16)),
2560
+ o("span", {
2561
2561
  class: "wm-onb__alert-dot",
2562
2562
  "aria-label": n.t("onboarding.unread")
2563
2563
  }, null, 8, Sn)
2564
2564
  ], 2),
2565
- l("span", Tn, [
2566
- l("span", Mn, v(o.title), 1),
2567
- l("span", xn, [
2568
- n.senderLabel(o) ? (c(), d("span", Rn, v(n.senderLabel(o)) + " · ", 1)) : k("", !0),
2569
- l("span", {
2570
- innerHTML: n.renderPreview(o.preview)
2571
- }, null, 8, On)
2565
+ o("span", Tn, [
2566
+ o("span", Mn, v(l.title), 1),
2567
+ o("span", xn, [
2568
+ n.senderLabel(l) ? (c(), d("span", On, v(n.senderLabel(l)) + " · ", 1)) : b("", !0),
2569
+ o("span", {
2570
+ innerHTML: n.renderPreview(l.preview)
2571
+ }, null, 8, Rn)
2572
2572
  ])
2573
2573
  ]),
2574
- l("span", Ln, [
2575
- n.formatTs(o._ts) ? (c(), d("span", In, v(n.formatTs(o._ts)), 1)) : k("", !0),
2576
- l("span", En, v(n.t("onboarding.resume")), 1)
2574
+ o("span", Ln, [
2575
+ n.formatTs(l._ts) ? (c(), d("span", In, v(n.formatTs(l._ts)), 1)) : b("", !0),
2576
+ o("span", En, v(n.t("onboarding.resume")), 1)
2577
2577
  ])
2578
2578
  ], 8, Cn))), 128))
2579
- ])) : k("", !0),
2580
- l("div", Bn, [
2581
- l("button", {
2579
+ ])) : b("", !0),
2580
+ o("div", Bn, [
2581
+ o("button", {
2582
2582
  type: "button",
2583
2583
  class: "wm-onb__btn wm-onb__btn--start",
2584
2584
  disabled: s.busy,
2585
- onClick: t[0] || (t[0] = (o) => e.$emit("start"))
2585
+ onClick: t[0] || (t[0] = (l) => e.$emit("start"))
2586
2586
  }, [
2587
- t[4] || (t[4] = l("span", { class: "wm-onb__btn-icon" }, [
2588
- l("svg", {
2587
+ t[4] || (t[4] = o("span", { class: "wm-onb__btn-icon" }, [
2588
+ o("svg", {
2589
2589
  width: "18",
2590
2590
  height: "18",
2591
2591
  viewBox: "0 0 24 24",
@@ -2596,51 +2596,51 @@ function Yn(e, t, s, r, i, n) {
2596
2596
  "stroke-linejoin": "round",
2597
2597
  "aria-hidden": "true"
2598
2598
  }, [
2599
- l("path", { d: "M12 5v14M5 12h14" })
2599
+ o("path", { d: "M12 5v14M5 12h14" })
2600
2600
  ])
2601
2601
  ], -1)),
2602
- l("span", Nn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
2602
+ o("span", Dn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
2603
2603
  ], 8, Pn),
2604
- (c(!0), d(I, null, j(s.quickLinks, (o, f) => (c(), d("button", {
2604
+ (c(!0), d(I, null, j(s.quickLinks, (l, f) => (c(), d("button", {
2605
2605
  key: "ql-" + f,
2606
2606
  type: "button",
2607
2607
  class: "wm-onb__btn",
2608
- onClick: (b) => e.$emit("select", o)
2608
+ onClick: (k) => e.$emit("select", l)
2609
2609
  }, [
2610
- l("span", Dn, [
2611
- n.safeIconUrl(o) ? (c(), d("span", {
2610
+ o("span", Un, [
2611
+ n.safeIconUrl(l) ? (c(), d("span", {
2612
2612
  key: 0,
2613
2613
  class: "wm-onb__btn-iconImg",
2614
- style: z(n.iconUrlStyle(o)),
2614
+ style: z(n.iconUrlStyle(l)),
2615
2615
  role: "img",
2616
- "aria-label": o.label || ""
2616
+ "aria-label": l.label || ""
2617
2617
  }, null, 12, jn)) : (c(), d("svg", Fn, [
2618
- l("path", {
2619
- d: n.iconPath(o.icon)
2618
+ o("path", {
2619
+ d: n.iconPath(l.icon)
2620
2620
  }, null, 8, Hn)
2621
2621
  ]))
2622
2622
  ]),
2623
- l("span", zn, v(o.label), 1),
2624
- n.isExternalLink(o) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2625
- l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2626
- ])])) : k("", !0)
2627
- ], 8, Un))), 128)),
2623
+ o("span", zn, v(l.label), 1),
2624
+ n.isExternalLink(l) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2625
+ o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2626
+ ])])) : b("", !0)
2627
+ ], 8, Nn))), 128)),
2628
2628
  s.openThreads.length ? (c(), d("button", {
2629
2629
  key: 0,
2630
2630
  type: "button",
2631
2631
  class: "wm-onb__btn",
2632
- onClick: t[1] || (t[1] = (o) => e.$emit("view-history"))
2632
+ onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
2633
2633
  }, [
2634
- l("span", Vn, [
2634
+ o("span", Vn, [
2635
2635
  (c(), d("svg", Kn, [
2636
- l("path", {
2636
+ o("path", {
2637
2637
  d: n.iconPath("chat")
2638
2638
  }, null, 8, Wn)
2639
2639
  ]))
2640
2640
  ]),
2641
- l("span", $n, v(n.t("onboarding.allConversations")), 1),
2642
- l("span", Gn, v(s.openThreads.length), 1),
2643
- t[6] || (t[6] = l("svg", {
2641
+ o("span", $n, v(n.t("onboarding.allConversations")), 1),
2642
+ o("span", Gn, v(s.openThreads.length), 1),
2643
+ t[6] || (t[6] = o("svg", {
2644
2644
  class: "wm-onb__btn-trail",
2645
2645
  width: "13",
2646
2646
  height: "13",
@@ -2652,13 +2652,13 @@ function Yn(e, t, s, r, i, n) {
2652
2652
  "stroke-linejoin": "round",
2653
2653
  "aria-hidden": "true"
2654
2654
  }, [
2655
- l("path", { d: "M9 18l6-6-6-6" })
2655
+ o("path", { d: "M9 18l6-6-6-6" })
2656
2656
  ], -1))
2657
- ])) : k("", !0)
2657
+ ])) : b("", !0)
2658
2658
  ])
2659
2659
  ]);
2660
2660
  }
2661
- const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2661
+ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2662
2662
  name: "WmHistory",
2663
2663
  components: { AIAvatar: oe, HumanAvatar: ve },
2664
2664
  inject: {
@@ -2711,15 +2711,15 @@ const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2711
2711
  if (!e) return "";
2712
2712
  const t = new Date(e);
2713
2713
  if (Number.isNaN(t.getTime())) return "";
2714
- const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
2715
- if (t.toDateString() === r.toDateString())
2714
+ const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2715
+ if (t.toDateString() === i.toDateString())
2716
2716
  return t.toLocaleTimeString(s, {
2717
2717
  hour: "2-digit",
2718
2718
  minute: "2-digit"
2719
2719
  });
2720
- if (r.getTime() - t.getTime() < 7 * 864e5) {
2721
- const a = t.toLocaleDateString(s, { weekday: "short" });
2722
- return a.charAt(0).toUpperCase() + a.slice(1);
2720
+ if (i.getTime() - t.getTime() < 7 * 864e5) {
2721
+ const r = t.toLocaleDateString(s, { weekday: "short" });
2722
+ return r.charAt(0).toUpperCase() + r.slice(1);
2723
2723
  }
2724
2724
  return t.toLocaleDateString(s, {
2725
2725
  day: "2-digit",
@@ -2737,11 +2737,11 @@ const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2737
2737
  key: 0,
2738
2738
  class: "wm-hist__empty"
2739
2739
  };
2740
- function us(e, t, s, r, i, n) {
2740
+ function us(e, t, s, i, a, n) {
2741
2741
  return c(), d("div", Qn, [
2742
- l("div", Zn, [
2743
- t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
2744
- l("svg", {
2742
+ o("div", Zn, [
2743
+ t[1] || (t[1] = o("span", { class: "wm-hist__searchIcon" }, [
2744
+ o("svg", {
2745
2745
  width: "13",
2746
2746
  height: "13",
2747
2747
  viewBox: "0 0 24 24",
@@ -2752,30 +2752,30 @@ function us(e, t, s, r, i, n) {
2752
2752
  "stroke-linejoin": "round",
2753
2753
  "aria-hidden": "true"
2754
2754
  }, [
2755
- l("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2755
+ o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2756
2756
  ])
2757
2757
  ], -1)),
2758
- G(l("input", {
2759
- "onUpdate:modelValue": t[0] || (t[0] = (a) => i.query = a),
2758
+ G(o("input", {
2759
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => a.query = r),
2760
2760
  type: "text",
2761
2761
  placeholder: n.t("onboarding.search"),
2762
2762
  "aria-label": n.t("onboarding.search")
2763
2763
  }, null, 8, es), [
2764
- [te, i.query]
2764
+ [te, a.query]
2765
2765
  ])
2766
2766
  ]),
2767
- l("div", ts, [
2768
- (c(!0), d(I, null, j(n.filteredThreads, (a) => (c(), d("button", {
2769
- key: a.id,
2767
+ o("div", ts, [
2768
+ (c(!0), d(I, null, j(n.filteredThreads, (r) => (c(), d("button", {
2769
+ key: r.id,
2770
2770
  type: "button",
2771
- class: O(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2772
- onClick: (o) => e.$emit("resume", a)
2771
+ class: R(["wm-hist__thread", { "wm-hist__thread--unread": r.unread }]),
2772
+ onClick: (l) => e.$emit("resume", r)
2773
2773
  }, [
2774
- l("span", {
2775
- class: O(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2774
+ o("span", {
2775
+ class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(r)])
2776
2776
  }, [
2777
- n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2778
- l("svg", {
2777
+ n.isDefaultAvatar(r) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2778
+ o("svg", {
2779
2779
  width: "18",
2780
2780
  height: "18",
2781
2781
  viewBox: "0 0 24 24",
@@ -2786,28 +2786,28 @@ function us(e, t, s, r, i, n) {
2786
2786
  "stroke-linejoin": "round",
2787
2787
  "aria-hidden": "true"
2788
2788
  }, [
2789
- l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2789
+ o("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2790
2790
  ], -1)
2791
- ])])) : (c(), P(Ae(n.avatarComponent(a)), Fe({
2791
+ ])])) : (c(), D(Ae(n.avatarComponent(r)), Fe({
2792
2792
  key: 1,
2793
2793
  ref_for: !0
2794
- }, n.avatarProps(a)), null, 16)),
2795
- a.unread ? (c(), d("span", {
2794
+ }, n.avatarProps(r)), null, 16)),
2795
+ r.unread ? (c(), d("span", {
2796
2796
  key: 2,
2797
2797
  class: "wm-hist__thread-dot",
2798
2798
  "aria-label": n.t("onboarding.unread")
2799
- }, null, 8, rs)) : k("", !0)
2799
+ }, null, 8, rs)) : b("", !0)
2800
2800
  ], 2),
2801
- l("span", is, [
2802
- l("span", as, v(a.title), 1),
2803
- l("span", {
2801
+ o("span", is, [
2802
+ o("span", as, v(r.title), 1),
2803
+ o("span", {
2804
2804
  class: "wm-hist__thread-preview",
2805
- innerHTML: n.renderPreview(a.preview)
2805
+ innerHTML: n.renderPreview(r.preview)
2806
2806
  }, null, 8, os)
2807
2807
  ]),
2808
- l("span", ls, [
2809
- n.formatTs(a._ts) ? (c(), d("span", cs, v(n.formatTs(a._ts)), 1)) : k("", !0),
2810
- t[3] || (t[3] = l("svg", {
2808
+ o("span", ls, [
2809
+ n.formatTs(r._ts) ? (c(), d("span", cs, v(n.formatTs(r._ts)), 1)) : b("", !0),
2810
+ t[3] || (t[3] = o("svg", {
2811
2811
  width: "14",
2812
2812
  height: "14",
2813
2813
  viewBox: "0 0 24 24",
@@ -2819,15 +2819,15 @@ function us(e, t, s, r, i, n) {
2819
2819
  class: "wm-hist__thread-chev",
2820
2820
  "aria-hidden": "true"
2821
2821
  }, [
2822
- l("path", { d: "M5 12h14M13 5l7 7-7 7" })
2822
+ o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2823
2823
  ], -1))
2824
2824
  ])
2825
2825
  ], 10, ns))), 128)),
2826
- n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2826
+ n.filteredThreads.length ? b("", !0) : (c(), d("div", ds, v(a.query ? n.t("onboarding.noResults", { query: a.query }) : n.t("onboarding.noConversations")), 1))
2827
2827
  ])
2828
2828
  ]);
2829
2829
  }
2830
- const hs = /* @__PURE__ */ N(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2830
+ const hs = /* @__PURE__ */ P(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2831
2831
  function ms(e) {
2832
2832
  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();
2833
2833
  }
@@ -2888,31 +2888,31 @@ const fs = {
2888
2888
  "stroke-linecap": "round",
2889
2889
  "stroke-linejoin": "round"
2890
2890
  }, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
2891
- function Cs(e, t, s, r, i, n) {
2891
+ function Cs(e, t, s, i, a, n) {
2892
2892
  return c(), d("div", {
2893
- class: O(["wm-result", `wm-result--${s.state}`])
2893
+ class: R(["wm-result", `wm-result--${s.state}`])
2894
2894
  }, [
2895
- l("span", _s, [
2895
+ o("span", _s, [
2896
2896
  s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
2897
- l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2897
+ o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2898
2898
  ])])) : s.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
2899
- l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2899
+ o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2900
2900
  ])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
2901
- l("circle", {
2901
+ o("circle", {
2902
2902
  cx: "12",
2903
2903
  cy: "12",
2904
2904
  r: "10"
2905
2905
  }, null, -1),
2906
- l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2906
+ o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2907
2907
  ])])) : (c(), d("svg", ys, [...t[3] || (t[3] = [
2908
- l("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2909
- l("line", {
2908
+ o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2909
+ o("line", {
2910
2910
  x1: "12",
2911
2911
  y1: "9",
2912
2912
  x2: "12",
2913
2913
  y2: "13"
2914
2914
  }, null, -1),
2915
- l("line", {
2915
+ o("line", {
2916
2916
  x1: "12",
2917
2917
  y1: "17",
2918
2918
  x2: "12.01",
@@ -2920,19 +2920,19 @@ function Cs(e, t, s, r, i, n) {
2920
2920
  }, null, -1)
2921
2921
  ])]))
2922
2922
  ]),
2923
- l("span", ws, [
2924
- l("span", bs, v(s.label), 1),
2923
+ o("span", ws, [
2924
+ o("span", bs, v(s.label), 1),
2925
2925
  n.detailText ? (c(), d(I, { key: 0 }, [
2926
- t[4] || (t[4] = l("span", {
2926
+ t[4] || (t[4] = o("span", {
2927
2927
  class: "wm-result__sep",
2928
2928
  "aria-hidden": "true"
2929
2929
  }, " · ", -1)),
2930
- l("span", ks, v(n.detailText), 1)
2931
- ], 64)) : k("", !0)
2930
+ o("span", ks, v(n.detailText), 1)
2931
+ ], 64)) : b("", !0)
2932
2932
  ])
2933
2933
  ], 2);
2934
2934
  }
2935
- const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2935
+ const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2936
2936
  name: "WmArtifactFormResponse",
2937
2937
  inject: {
2938
2938
  // Translator shared by the Messenger shell; French fallback when
@@ -2948,13 +2948,13 @@ const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
2948
2948
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2949
2949
  }
2950
2950
  }
2951
- }, Ts = { class: "wm-art wm-art--formResponse" }, Ms = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Rs = { class: "wm-art__badge wm-art__badge--success" }, Os = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
2952
- function Is(e, t, s, r, i, n) {
2951
+ }, Ts = { class: "wm-art wm-art--formResponse" }, Ms = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
2952
+ function Is(e, t, s, i, a, n) {
2953
2953
  return c(), d("div", Ts, [
2954
- l("div", Ms, [
2955
- l("div", xs, v(s.data.title || n.t("form.title")), 1),
2956
- l("span", Rs, [
2957
- t[0] || (t[0] = l("svg", {
2954
+ o("div", Ms, [
2955
+ o("div", xs, v(s.data.title || n.t("form.title")), 1),
2956
+ o("span", Os, [
2957
+ t[0] || (t[0] = o("svg", {
2958
2958
  width: "11",
2959
2959
  height: "11",
2960
2960
  viewBox: "0 0 24 24",
@@ -2965,28 +2965,28 @@ function Is(e, t, s, r, i, n) {
2965
2965
  "stroke-linejoin": "round",
2966
2966
  "aria-hidden": "true"
2967
2967
  }, [
2968
- l("polyline", { points: "20 6 9 17 4 12" })
2968
+ o("polyline", { points: "20 6 9 17 4 12" })
2969
2969
  ], -1)),
2970
2970
  Se(" " + v(n.t("form.sent")), 1)
2971
2971
  ])
2972
2972
  ]),
2973
- l("div", Os, [
2974
- (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
2975
- key: o,
2973
+ o("div", Rs, [
2974
+ (c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
2975
+ key: l,
2976
2976
  class: "wm-art__field"
2977
2977
  }, [
2978
- l("div", Ls, v(a.label), 1),
2979
- l("div", {
2980
- class: O([
2978
+ o("div", Ls, v(r.label), 1),
2979
+ o("div", {
2980
+ class: R([
2981
2981
  "wm-art__fieldValue",
2982
- { "wm-art__fieldValue--multi": a.multiline }
2982
+ { "wm-art__fieldValue--multi": r.multiline }
2983
2983
  ])
2984
- }, v(a.value), 3)
2984
+ }, v(r.value), 3)
2985
2985
  ]))), 128))
2986
2986
  ])
2987
2987
  ]);
2988
2988
  }
2989
- const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
2989
+ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
2990
2990
  name: "WmArtifactInfoCard",
2991
2991
  props: {
2992
2992
  data: { type: Object, required: !0 }
@@ -3001,10 +3001,10 @@ const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
3001
3001
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
3002
3002
  }
3003
3003
  }
3004
- }, Ps = { class: "wm-art wm-art--infoCard" }, Ns = {
3004
+ }, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
3005
3005
  key: 0,
3006
3006
  class: "wm-art__image"
3007
- }, Us = ["src", "alt"], Ds = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
3007
+ }, Ns = ["src", "alt"], Us = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
3008
3008
  key: 0,
3009
3009
  class: "wm-art__subtitle"
3010
3010
  }, zs = {
@@ -3014,59 +3014,59 @@ const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
3014
3014
  key: 0,
3015
3015
  class: "wm-art__text"
3016
3016
  }, Vs = { class: "wm-art__fieldLabel" };
3017
- function Ks(e, t, s, r, i, n) {
3017
+ function Ks(e, t, s, i, a, n) {
3018
3018
  return c(), d("div", Ps, [
3019
- s.data.image_url ? (c(), d("figure", Ns, [
3020
- l("img", {
3019
+ s.data.image_url ? (c(), d("figure", Ds, [
3020
+ o("img", {
3021
3021
  src: s.data.image_url,
3022
3022
  alt: s.data.title || "",
3023
3023
  loading: "lazy"
3024
- }, null, 8, Us)
3025
- ])) : k("", !0),
3026
- l("div", Ds, [
3027
- l("div", js, [
3028
- l("div", Fs, v(s.data.title), 1),
3029
- s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : k("", !0)
3024
+ }, null, 8, Ns)
3025
+ ])) : b("", !0),
3026
+ o("div", Us, [
3027
+ o("div", js, [
3028
+ o("div", Fs, v(s.data.title), 1),
3029
+ s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : b("", !0)
3030
3030
  ]),
3031
3031
  s.data.badge && s.data.badge.label ? (c(), d("span", {
3032
3032
  key: 0,
3033
- class: O([
3033
+ class: R([
3034
3034
  "wm-art__badge",
3035
3035
  `wm-art__badge--${s.data.badge.tone || "neutral"}`
3036
3036
  ])
3037
- }, v(s.data.badge.label), 3)) : k("", !0)
3037
+ }, v(s.data.badge.label), 3)) : b("", !0)
3038
3038
  ]),
3039
3039
  n.hasBody ? (c(), d("div", zs, [
3040
- s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : k("", !0),
3041
- n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (a, o) => (c(), d("div", {
3042
- key: o,
3040
+ s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : b("", !0),
3041
+ n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (r, l) => (c(), d("div", {
3042
+ key: l,
3043
3043
  class: "wm-art__field"
3044
3044
  }, [
3045
- l("div", Vs, v(a.label), 1),
3046
- l("div", {
3047
- class: O([
3045
+ o("div", Vs, v(r.label), 1),
3046
+ o("div", {
3047
+ class: R([
3048
3048
  "wm-art__fieldValue",
3049
- { "wm-art__fieldValue--multi": a.multiline }
3049
+ { "wm-art__fieldValue--multi": r.multiline }
3050
3050
  ])
3051
- }, v(a.value), 3)
3052
- ]))), 128)) : k("", !0)
3053
- ])) : k("", !0)
3051
+ }, v(r.value), 3)
3052
+ ]))), 128)) : b("", !0)
3053
+ ])) : b("", !0)
3054
3054
  ]);
3055
3055
  }
3056
- const Ws = /* @__PURE__ */ N(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3056
+ const Ws = /* @__PURE__ */ P(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3057
3057
  function $s(e, t, s) {
3058
3058
  if (!e) return "";
3059
- const r = new Date(e);
3060
- if (Number.isNaN(r.getTime())) return e;
3061
- const i = r.toLocaleDateString(t, {
3059
+ const i = new Date(e);
3060
+ if (Number.isNaN(i.getTime())) return e;
3061
+ const a = i.toLocaleDateString(t, {
3062
3062
  day: "numeric",
3063
3063
  month: "long",
3064
3064
  year: "numeric"
3065
- }), n = r.toLocaleTimeString(t, {
3065
+ }), n = i.toLocaleTimeString(t, {
3066
3066
  hour: "2-digit",
3067
3067
  minute: "2-digit"
3068
3068
  });
3069
- return `${i}${s}${n}`;
3069
+ return `${a}${s}${n}`;
3070
3070
  }
3071
3071
  const Gs = {
3072
3072
  name: "WmArtifactTicket",
@@ -3136,13 +3136,13 @@ const Gs = {
3136
3136
  key: 1,
3137
3137
  class: "wm-art__footer wm-tk__footer"
3138
3138
  };
3139
- function ar(e, t, s, r, i, n) {
3139
+ function ar(e, t, s, i, a, n) {
3140
3140
  return c(), d("div", Ys, [
3141
- l("div", Js, [
3142
- l("div", Xs, v(s.data.title), 1),
3143
- l("div", Qs, [
3144
- l("div", Zs, [
3145
- t[0] || (t[0] = l("svg", {
3141
+ o("div", Js, [
3142
+ o("div", Xs, v(s.data.title), 1),
3143
+ o("div", Qs, [
3144
+ o("div", Zs, [
3145
+ t[0] || (t[0] = o("svg", {
3146
3146
  width: "11",
3147
3147
  height: "11",
3148
3148
  viewBox: "0 0 24 24",
@@ -3153,85 +3153,85 @@ function ar(e, t, s, r, i, n) {
3153
3153
  "stroke-linejoin": "round",
3154
3154
  "aria-hidden": "true"
3155
3155
  }, [
3156
- l("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3157
- l("path", { d: "M13 5v2M13 17v2M13 11v2" })
3156
+ o("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
3157
+ o("path", { d: "M13 5v2M13 17v2M13 11v2" })
3158
3158
  ], -1)),
3159
- l("span", null, v(s.data.reference), 1)
3159
+ o("span", null, v(s.data.reference), 1)
3160
3160
  ]),
3161
- l("span", {
3162
- class: O([
3161
+ o("span", {
3162
+ class: R([
3163
3163
  "wm-art__badge",
3164
3164
  "wm-tk__badge",
3165
3165
  `wm-art__badge--${s.data.status.tone || "neutral"}`
3166
3166
  ])
3167
3167
  }, [
3168
- t[1] || (t[1] = l("span", {
3168
+ t[1] || (t[1] = o("span", {
3169
3169
  class: "wm-tk__dot",
3170
3170
  "aria-hidden": "true"
3171
3171
  }, null, -1)),
3172
3172
  Se(" " + v(s.data.status.label), 1)
3173
3173
  ], 2)
3174
3174
  ]),
3175
- s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : k("", !0)
3175
+ s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : b("", !0)
3176
3176
  ]),
3177
3177
  n.fields.length ? (c(), d("div", tr, [
3178
- (c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
3179
- key: o,
3178
+ (c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
3179
+ key: l,
3180
3180
  class: "wm-art__field"
3181
3181
  }, [
3182
- l("div", nr, v(a.label), 1),
3183
- l("div", {
3184
- class: O([
3182
+ o("div", nr, v(r.label), 1),
3183
+ o("div", {
3184
+ class: R([
3185
3185
  "wm-art__fieldValue",
3186
- { "wm-art__fieldValue--multi": a.multiline }
3186
+ { "wm-art__fieldValue--multi": r.multiline }
3187
3187
  ])
3188
3188
  }, [
3189
- n.isPriority(a.label) ? (c(), d("svg", {
3189
+ n.isPriority(r.label) ? (c(), d("svg", {
3190
3190
  key: 0,
3191
3191
  class: "wm-tk__prio",
3192
- "data-level": n.priorityLevel(a.value),
3192
+ "data-level": n.priorityLevel(r.value),
3193
3193
  width: "12",
3194
3194
  height: "12",
3195
3195
  viewBox: "0 0 12 12",
3196
3196
  "aria-hidden": "true"
3197
3197
  }, [...t[2] || (t[2] = [
3198
- l("rect", {
3198
+ o("rect", {
3199
3199
  x: "1",
3200
3200
  y: "8",
3201
3201
  width: "2",
3202
3202
  height: "3",
3203
3203
  rx: "0.5"
3204
3204
  }, null, -1),
3205
- l("rect", {
3205
+ o("rect", {
3206
3206
  x: "5",
3207
3207
  y: "5",
3208
3208
  width: "2",
3209
3209
  height: "6",
3210
3210
  rx: "0.5"
3211
3211
  }, null, -1),
3212
- l("rect", {
3212
+ o("rect", {
3213
3213
  x: "9",
3214
3214
  y: "2",
3215
3215
  width: "2",
3216
3216
  height: "9",
3217
3217
  rx: "0.5"
3218
3218
  }, null, -1)
3219
- ])], 8, sr)) : n.isDate(a.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3220
- l("rect", {
3219
+ ])], 8, sr)) : n.isDate(r.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3220
+ o("rect", {
3221
3221
  x: "3",
3222
3222
  y: "4",
3223
3223
  width: "18",
3224
3224
  height: "18",
3225
3225
  rx: "2"
3226
3226
  }, null, -1),
3227
- l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3228
- ])])) : k("", !0),
3229
- l("span", null, v(a.value), 1)
3227
+ o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3228
+ ])])) : b("", !0),
3229
+ o("span", null, v(r.value), 1)
3230
3230
  ], 2)
3231
3231
  ]))), 128))
3232
- ])) : k("", !0),
3232
+ ])) : b("", !0),
3233
3233
  s.data.created_at ? (c(), d("div", ir, [
3234
- t[4] || (t[4] = l("svg", {
3234
+ t[4] || (t[4] = o("svg", {
3235
3235
  width: "11",
3236
3236
  height: "11",
3237
3237
  viewBox: "0 0 24 24",
@@ -3242,20 +3242,20 @@ function ar(e, t, s, r, i, n) {
3242
3242
  "stroke-linejoin": "round",
3243
3243
  "aria-hidden": "true"
3244
3244
  }, [
3245
- l("rect", {
3245
+ o("rect", {
3246
3246
  x: "3",
3247
3247
  y: "4",
3248
3248
  width: "18",
3249
3249
  height: "18",
3250
3250
  rx: "2"
3251
3251
  }),
3252
- l("path", { d: "M16 2v4M8 2v4M3 10h18" })
3252
+ o("path", { d: "M16 2v4M8 2v4M3 10h18" })
3253
3253
  ], -1)),
3254
- l("span", null, v(n.formattedDate), 1)
3255
- ])) : k("", !0)
3254
+ o("span", null, v(n.formattedDate), 1)
3255
+ ])) : b("", !0)
3256
3256
  ]);
3257
3257
  }
3258
- const or = /* @__PURE__ */ N(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3258
+ const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3259
3259
  form_response: Es,
3260
3260
  info_card: Ws,
3261
3261
  ticket: or
@@ -3274,13 +3274,13 @@ const or = /* @__PURE__ */ N(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
3274
3274
  }
3275
3275
  }
3276
3276
  };
3277
- function dr(e, t, s, r, i, n) {
3278
- return n.component ? (c(), P(Ae(n.component), {
3277
+ function dr(e, t, s, i, a, n) {
3278
+ return n.component ? (c(), D(Ae(n.component), {
3279
3279
  key: 0,
3280
3280
  data: s.artifact.data
3281
- }, null, 8, ["data"])) : k("", !0);
3281
+ }, null, 8, ["data"])) : b("", !0);
3282
3282
  }
3283
- const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
3283
+ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3284
3284
  name: "WmAttachmentPreview",
3285
3285
  inject: {
3286
3286
  signAttachmentFn: { default: null },
@@ -3296,10 +3296,10 @@ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
3296
3296
  },
3297
3297
  computed: {
3298
3298
  kind() {
3299
- var s, r;
3299
+ var s, i;
3300
3300
  const e = (s = this.attachment) == null ? void 0 : s.type;
3301
3301
  if (e) return e;
3302
- const t = (((r = this.attachment) == null ? void 0 : r.mime_type) || "").toLowerCase();
3302
+ const t = (((i = this.attachment) == null ? void 0 : i.mime_type) || "").toLowerCase();
3303
3303
  return t.startsWith("image/") ? "image" : t.startsWith("audio/") ? "audio" : t.startsWith("video/") ? "video" : "file";
3304
3304
  },
3305
3305
  displayName() {
@@ -3356,30 +3356,30 @@ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
3356
3356
  class: "wm-att__spin",
3357
3357
  "aria-hidden": "true"
3358
3358
  };
3359
- function kr(e, t, s, r, i, n) {
3359
+ function kr(e, t, s, i, a, n) {
3360
3360
  return c(), d("div", {
3361
- class: O(["wm-att", ["wm-att--" + (n.kind || "file")]])
3361
+ class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
3362
3362
  }, [
3363
- n.kind === "image" && i.url ? (c(), d("a", {
3363
+ n.kind === "image" && a.url ? (c(), d("a", {
3364
3364
  key: 0,
3365
3365
  href: n.safeHref,
3366
3366
  target: "_blank",
3367
3367
  rel: "noopener",
3368
3368
  class: "wm-att__imgWrap"
3369
3369
  }, [
3370
- l("img", {
3371
- src: i.url,
3370
+ o("img", {
3371
+ src: a.url,
3372
3372
  alt: n.displayName,
3373
3373
  loading: "lazy"
3374
3374
  }, null, 8, fr)
3375
- ], 8, mr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
3375
+ ], 8, mr)) : n.kind === "audio" && a.url ? (c(), d("audio", {
3376
3376
  key: 1,
3377
- src: i.url,
3377
+ src: a.url,
3378
3378
  controls: "",
3379
3379
  preload: "metadata"
3380
- }, null, 8, _r)) : n.kind === "video" && i.url ? (c(), d("video", {
3380
+ }, null, 8, _r)) : n.kind === "video" && a.url ? (c(), d("video", {
3381
3381
  key: 2,
3382
- src: i.url,
3382
+ src: a.url,
3383
3383
  controls: "",
3384
3384
  playsinline: "",
3385
3385
  preload: "auto"
@@ -3390,10 +3390,10 @@ function kr(e, t, s, r, i, n) {
3390
3390
  download: n.displayName,
3391
3391
  target: "_blank",
3392
3392
  rel: "noopener",
3393
- onClick: t[0] || (t[0] = (...a) => n.onFileClick && n.onFileClick(...a))
3393
+ onClick: t[0] || (t[0] = (...r) => n.onFileClick && n.onFileClick(...r))
3394
3394
  }, [
3395
- t[1] || (t[1] = l("span", { class: "wm-att__icon" }, [
3396
- l("svg", {
3395
+ t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
3396
+ o("svg", {
3397
3397
  width: "14",
3398
3398
  height: "14",
3399
3399
  viewBox: "0 0 24 24",
@@ -3404,19 +3404,19 @@ function kr(e, t, s, r, i, n) {
3404
3404
  "stroke-linejoin": "round",
3405
3405
  "aria-hidden": "true"
3406
3406
  }, [
3407
- l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3408
- l("path", { d: "M14 2v6h6" })
3407
+ o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3408
+ o("path", { d: "M14 2v6h6" })
3409
3409
  ])
3410
3410
  ], -1)),
3411
- l("span", vr, [
3412
- l("span", yr, v(n.displayName), 1),
3413
- n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : k("", !0)
3411
+ o("span", vr, [
3412
+ o("span", yr, v(n.displayName), 1),
3413
+ n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : b("", !0)
3414
3414
  ]),
3415
- i.loading ? (c(), d("span", br)) : k("", !0)
3415
+ a.loading ? (c(), d("span", br)) : b("", !0)
3416
3416
  ], 8, pr))
3417
3417
  ], 2);
3418
3418
  }
3419
- const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3419
+ const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3420
3420
  name: "WmBubble",
3421
3421
  props: {
3422
3422
  role: { type: String, default: "ai" },
@@ -3429,24 +3429,24 @@ const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd
3429
3429
  }
3430
3430
  }
3431
3431
  }, Sr = ["innerHTML"];
3432
- function Tr(e, t, s, r, i, n) {
3432
+ function Tr(e, t, s, i, a, n) {
3433
3433
  return c(), d("div", {
3434
- class: O(["wm-bubble", "wm-bubble--" + s.role])
3434
+ class: R(["wm-bubble", "wm-bubble--" + s.role])
3435
3435
  }, [
3436
3436
  We(e.$slots, "default", {}, () => [
3437
- l("span", { innerHTML: n.rendered }, null, 8, Sr)
3437
+ o("span", { innerHTML: n.rendered }, null, 8, Sr)
3438
3438
  ], !0)
3439
3439
  ], 2);
3440
3440
  }
3441
- const Mr = /* @__PURE__ */ N(Ar, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Rr = { class: "wm-typing" };
3442
- function Or(e, t, s, r, i, n) {
3443
- return c(), d("div", Rr, [...t[0] || (t[0] = [
3444
- l("span", { style: { "animation-delay": "0s" } }, null, -1),
3445
- l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3446
- l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3441
+ const Mr = /* @__PURE__ */ P(Ar, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3442
+ function Rr(e, t, s, i, a, n) {
3443
+ return c(), d("div", Or, [...t[0] || (t[0] = [
3444
+ o("span", { style: { "animation-delay": "0s" } }, null, -1),
3445
+ o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3446
+ o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3447
3447
  ])]);
3448
3448
  }
3449
- const Lr = /* @__PURE__ */ N(xr, [["render", Or], ["__scopeId", "data-v-df2447fd"]]);
3449
+ const Lr = /* @__PURE__ */ P(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3450
3450
  function ee(e) {
3451
3451
  return e ? e.client_msg_id || e.id : "";
3452
3452
  }
@@ -3536,62 +3536,61 @@ const Ir = {
3536
3536
  return !this.hasMore && !this.loadingMore && this.messages.length >= 20;
3537
3537
  },
3538
3538
  groups() {
3539
- var s, r, i, n, a;
3539
+ var s, i, a, n;
3540
3540
  const e = [];
3541
- for (const o of this.messages) {
3542
- if ((s = o == null ? void 0 : o.metadata) != null && s.resolution_request) continue;
3543
- const f = this.roleOf(o);
3544
- if (f === "system") {
3545
- if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
3546
- const T = e[e.length - 1];
3547
- T && T.role === "ai" ? T.messages.push(o) : e.push({
3548
- key: `g-${ee(o)}`,
3541
+ for (const r of this.messages) {
3542
+ const l = this.roleOf(r);
3543
+ if (l === "system") {
3544
+ if (((s = r == null ? void 0 : r.payload) == null ? void 0 : s.event) === "action_admin_pending") {
3545
+ const y = e[e.length - 1];
3546
+ y && y.role === "ai" ? y.messages.push(r) : e.push({
3547
+ key: `g-${ee(r)}`,
3549
3548
  role: "ai",
3550
3549
  agentName: "",
3551
3550
  agentAvatarUrl: null,
3552
- messages: [o],
3551
+ messages: [r],
3553
3552
  items: []
3554
3553
  });
3555
3554
  continue;
3556
3555
  }
3557
3556
  e.push({
3558
- key: `sys-${ee(o)}`,
3559
- role: f,
3560
- messages: [o],
3557
+ key: `sys-${ee(r)}`,
3558
+ role: l,
3559
+ messages: [r],
3561
3560
  items: [],
3562
- systemLabel: this.systemLabel(o)
3561
+ systemLabel: this.systemLabel(r)
3563
3562
  });
3564
3563
  continue;
3565
3564
  }
3566
- const b = e[e.length - 1];
3567
- b && b.role === f && (f === "ai" || b.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? b.messages.push(o) : e.push({
3568
- key: `g-${ee(o)}`,
3569
- role: f,
3570
- agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
3571
- agentAvatarUrl: ((a = o == null ? void 0 : o.author) == null ? void 0 : a.avatar_url) || null,
3572
- messages: [o],
3565
+ const f = e[e.length - 1];
3566
+ f && f.role === l && (l === "ai" || f.agentName === (((i = r == null ? void 0 : r.author) == null ? void 0 : i.name) || "")) ? f.messages.push(r) : e.push({
3567
+ key: `g-${ee(r)}`,
3568
+ role: l,
3569
+ agentName: ((a = r == null ? void 0 : r.author) == null ? void 0 : a.name) || "",
3570
+ agentAvatarUrl: ((n = r == null ? void 0 : r.author) == null ? void 0 : n.avatar_url) || null,
3571
+ messages: [r],
3573
3572
  items: []
3574
3573
  });
3575
3574
  }
3576
- for (const o of e) {
3577
- if (o.role === "system") continue;
3578
- const f = [];
3579
- for (const b of o.messages)
3580
- for (const y of this.itemsOf(b)) f.push(y);
3581
- o.items = f;
3575
+ for (const r of e) {
3576
+ if (r.role === "system") continue;
3577
+ const l = [];
3578
+ for (const f of r.messages)
3579
+ for (const k of this.itemsOf(f)) l.push(k);
3580
+ r.items = l;
3582
3581
  }
3583
3582
  const t = [];
3584
- for (const o of e) {
3585
- if (o.role !== "system" && !o.items.length) continue;
3586
- const f = t[t.length - 1];
3587
- if (f && f.role !== "system" && f.role === o.role && (o.role === "ai" || f.agentName === o.agentName)) {
3588
- f.messages.push(...o.messages), f.items.push(...o.items);
3583
+ for (const r of e) {
3584
+ if (r.role !== "system" && !r.items.length) continue;
3585
+ const l = t[t.length - 1];
3586
+ if (l && l.role !== "system" && l.role === r.role && (r.role === "ai" || l.agentName === r.agentName)) {
3587
+ l.messages.push(...r.messages), l.items.push(...r.items);
3589
3588
  continue;
3590
3589
  }
3591
- t.push(o);
3590
+ t.push(r);
3592
3591
  }
3593
- for (const o of t)
3594
- o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
3592
+ for (const r of t)
3593
+ r.role !== "system" && (r.key = this.stableGroupKey(r.messages));
3595
3594
  return t;
3596
3595
  },
3597
3596
  // Key of the first non-user group that starts after the unread
@@ -3602,10 +3601,10 @@ const Ir = {
3602
3601
  const e = this.unreadAnchorId, t = this.unreadBoundaryTs;
3603
3602
  for (const s of this.groups) {
3604
3603
  if (s.role === "user" || s.role === "system" || !s.items.length) continue;
3605
- const r = s.messages[0];
3606
- if (!r) continue;
3607
- const i = Y(r.id);
3608
- if (i != null && !(i <= e) && !(t && r.created_at && r.created_at > t))
3604
+ const i = s.messages[0];
3605
+ if (!i) continue;
3606
+ const a = Y(i.id);
3607
+ if (a != null && !(a <= e) && !(t && i.created_at && i.created_at > t))
3609
3608
  return s.key;
3610
3609
  }
3611
3610
  return null;
@@ -3643,17 +3642,17 @@ const Ir = {
3643
3642
  this._groupIdByMsgKey || (this._groupIdByMsgKey = /* @__PURE__ */ new Map(), this._groupIdCounter = 0);
3644
3643
  const t = this._groupIdByMsgKey;
3645
3644
  let s = null;
3646
- for (const r of e) {
3647
- const i = ee(r);
3648
- if (i && t.has(i)) {
3649
- s = t.get(i);
3645
+ for (const i of e) {
3646
+ const a = ee(i);
3647
+ if (a && t.has(a)) {
3648
+ s = t.get(a);
3650
3649
  break;
3651
3650
  }
3652
3651
  }
3653
3652
  s == null && (s = ++this._groupIdCounter);
3654
- for (const r of e) {
3655
- const i = ee(r);
3656
- i && t.set(i, s);
3653
+ for (const i of e) {
3654
+ const a = ee(i);
3655
+ a && t.set(a, s);
3657
3656
  }
3658
3657
  return `g-${s}`;
3659
3658
  },
@@ -3691,32 +3690,32 @@ const Ir = {
3691
3690
  const t = this._lastSeenConvId !== this.conversationId;
3692
3691
  this._lastSeenConvId = this.conversationId;
3693
3692
  const s = this.isAtBottom(e);
3694
- let r = null;
3693
+ let i = null;
3695
3694
  if (!t && !s) {
3696
3695
  const n = this.pickAnchor(e);
3697
3696
  if (n != null && n.rowKey) {
3698
- const a = this.findRowByKey(e, n.rowKey);
3699
- if (a) {
3700
- const o = e.getBoundingClientRect().top;
3701
- r = {
3697
+ const r = this.findRowByKey(e, n.rowKey);
3698
+ if (r) {
3699
+ const l = e.getBoundingClientRect().top;
3700
+ i = {
3702
3701
  rowKey: n.rowKey,
3703
- relY: a.getBoundingClientRect().top - o
3702
+ relY: r.getBoundingClientRect().top - l
3704
3703
  };
3705
3704
  }
3706
3705
  }
3707
3706
  }
3708
- const i = { forceBottom: t, wasPinned: s, anchor: r };
3709
- this._scrollSnap = i, this.$nextTick(() => {
3710
- if (this._scrollSnap = null, i.forceBottom || i.wasPinned) {
3707
+ const a = { forceBottom: t, wasPinned: s, anchor: i };
3708
+ this._scrollSnap = a, this.$nextTick(() => {
3709
+ if (this._scrollSnap = null, a.forceBottom || a.wasPinned) {
3711
3710
  e.scrollTop = e.scrollHeight;
3712
3711
  return;
3713
3712
  }
3714
- if (!i.anchor) return;
3713
+ if (!a.anchor) return;
3715
3714
  const n = () => {
3716
- const a = i.anchor, o = this.findRowByKey(e, a.rowKey);
3717
- if (!o) return;
3718
- const b = o.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3719
- Math.abs(b) > 0.5 && (e.scrollTop += b);
3715
+ const r = a.anchor, l = this.findRowByKey(e, r.rowKey);
3716
+ if (!l) return;
3717
+ const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - r.relY;
3718
+ Math.abs(k) > 0.5 && (e.scrollTop += k);
3720
3719
  };
3721
3720
  n(), requestAnimationFrame(() => {
3722
3721
  n(), requestAnimationFrame(n);
@@ -3747,11 +3746,11 @@ const Ir = {
3747
3746
  // very-top-of-scroll edge case the same way the old logic did.
3748
3747
  pickAnchor(e) {
3749
3748
  const t = e.getBoundingClientRect().top, s = e.querySelectorAll(".wm-list__row[data-row-key]");
3750
- let r = null;
3751
- for (const i of s)
3752
- if (r || (r = i), i.getBoundingClientRect().bottom >= t)
3753
- return { rowKey: i.dataset.rowKey };
3754
- return r ? { rowKey: r.dataset.rowKey } : null;
3749
+ let i = null;
3750
+ for (const a of s)
3751
+ if (i || (i = a), a.getBoundingClientRect().bottom >= t)
3752
+ return { rowKey: a.dataset.rowKey };
3753
+ return i ? { rowKey: i.dataset.rowKey } : null;
3755
3754
  },
3756
3755
  findRowByKey(e, t) {
3757
3756
  if (!t) return null;
@@ -3761,10 +3760,10 @@ const Ir = {
3761
3760
  );
3762
3761
  },
3763
3762
  roleOf(e) {
3764
- var s, r;
3763
+ var s, i;
3765
3764
  if ((e == null ? void 0 : e.type) === "system" || ((s = e == null ? void 0 : e.payload) == null ? void 0 : s.type) === "system")
3766
3765
  return "system";
3767
- const t = (r = e == null ? void 0 : e.author) == null ? void 0 : r.type;
3766
+ const t = (i = e == null ? void 0 : e.author) == null ? void 0 : i.type;
3768
3767
  return t === "user" ? "user" : t === "agent_human" ? "human" : "ai";
3769
3768
  },
3770
3769
  roleLabel(e) {
@@ -3863,9 +3862,9 @@ const Ir = {
3863
3862
  // doit garder son arrondi.
3864
3863
  cornersFor(e, t) {
3865
3864
  var Q, se, re;
3866
- const s = e.items, r = (Q = s[t]) == null ? void 0 : Q.kind, i = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = ($, ie, X) => $ != null && T != null ? $ + q >= T : ie === X || ie === "card" && X === "bubble";
3867
- let U = o, D = o, L = o, W = o;
3868
- return a ? (b && (D = f), (y || !n) && (L = f), b && M(E, b, r == null ? void 0 : r.top) && (U = f), y && M(A, y, r == null ? void 0 : r.bottom) && (W = f)) : (b && (U = f), (y || !n) && (W = f), b && M(E, b, r == null ? void 0 : r.top) && (D = f), y && M(A, y, r == null ? void 0 : r.bottom) && (L = f)), { tl: U, tr: D, br: L, bl: W };
3865
+ const s = e.items, i = (Q = s[t]) == null ? void 0 : Q.kind, a = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, f = 4, k = a == null ? void 0 : a.bottom, y = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, T = ($, ie, X) => $ != null && M != null ? $ + q >= M : ie === X || ie === "card" && X === "bubble";
3866
+ let N = l, U = l, L = l, W = l;
3867
+ return r ? (k && (U = f), (y || !n) && (L = f), k && T(E, k, i == null ? void 0 : i.top) && (N = f), y && T(A, y, i == null ? void 0 : i.bottom) && (W = f)) : (k && (N = f), (y || !n) && (W = f), k && T(E, k, i == null ? void 0 : i.top) && (U = f), y && T(A, y, i == null ? void 0 : i.bottom) && (L = f)), { tl: N, tr: U, br: L, bl: W };
3869
3868
  },
3870
3869
  // Inline column-count for the mosaic grid, capped at 4. Single
3871
3870
  // attachment falls back to the vertical-list layout (null). Two
@@ -3888,8 +3887,8 @@ const Ir = {
3888
3887
  // corners of every top-row cell flatten too.
3889
3888
  mosaicCornerStyle(e, t, s) {
3890
3889
  if (!t || t < 2) return null;
3891
- const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, y = "4px", T = {};
3892
- return (a || f) && (T["--wm-r-tl"] = y), (o || f) && (T["--wm-r-tr"] = y), (a || b) && (T["--wm-r-bl"] = y), (o || b) && (T["--wm-r-br"] = y), s && (T["--wm-r-tl"] = y, T["--wm-r-tr"] = y), Object.keys(T).length ? T : null;
3890
+ const i = Math.min(t, 4), a = Math.floor(e / i), n = e % i, r = n > 0, l = n < i - 1 && e + 1 < t, f = a > 0, k = e + i < t, y = "4px", M = {};
3891
+ return (r || f) && (M["--wm-r-tl"] = y), (l || f) && (M["--wm-r-tr"] = y), (r || k) && (M["--wm-r-bl"] = y), (l || k) && (M["--wm-r-br"] = y), s && (M["--wm-r-tl"] = y, M["--wm-r-tr"] = y), Object.keys(M).length ? M : null;
3893
3892
  },
3894
3893
  // Inline style emitting the four corner CSS variables. Set on
3895
3894
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3908,8 +3907,8 @@ const Ir = {
3908
3907
  // Clé unique par item de cluster, alignée avec `:key` /
3909
3908
  // `data-row-key` du template. Sert d'index dans `widthByKey`.
3910
3909
  rowKeyOf(e, t) {
3911
- var r;
3912
- const s = (r = e == null ? void 0 : e.items) == null ? void 0 : r[t];
3910
+ var i;
3911
+ const s = (i = e == null ? void 0 : e.items) == null ? void 0 : i[t];
3913
3912
  return s ? `${ee(s.message)}-${s.partKey}` : "";
3914
3913
  },
3915
3914
  // rAF-debouncé : `updated()` peut être appelé en rafale (stream,
@@ -3930,20 +3929,20 @@ const Ir = {
3930
3929
  for (const n of e.querySelectorAll(
3931
3930
  ".wm-list__row[data-row-key]"
3932
3931
  )) {
3933
- const a = n.dataset.rowKey;
3934
- if (!a) continue;
3935
- const o = n.querySelector(
3932
+ const r = n.dataset.rowKey;
3933
+ if (!r) continue;
3934
+ const l = n.querySelector(
3936
3935
  ".wm-bubble, .wm-result, .wm-art, .wm-list__body"
3937
3936
  );
3938
- if (!o) continue;
3939
- const f = o.getBoundingClientRect().width;
3940
- f > 0 && (t[a] = f);
3937
+ if (!l) continue;
3938
+ const f = l.getBoundingClientRect().width;
3939
+ f > 0 && (t[r] = f);
3941
3940
  }
3942
- const s = this.widthByKey, r = Object.keys(s), i = Object.keys(t);
3943
- if (r.length === i.length) {
3941
+ const s = this.widthByKey, i = Object.keys(s), a = Object.keys(t);
3942
+ if (i.length === a.length) {
3944
3943
  let n = !0;
3945
- for (const a of i)
3946
- if (Math.abs((s[a] ?? 0) - t[a]) > 0.5) {
3944
+ for (const r of a)
3945
+ if (Math.abs((s[r] ?? 0) - t[r]) > 0.5) {
3947
3946
  n = !1;
3948
3947
  break;
3949
3948
  }
@@ -4013,27 +4012,27 @@ const Ir = {
4013
4012
  return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
4014
4013
  },
4015
4014
  actionDetail(e) {
4016
- var s, r, i, n, a, o, f, b;
4015
+ var s, i, a, n, r, l, f, k;
4017
4016
  const t = e == null ? void 0 : e.payload;
4018
4017
  if (!t) return "";
4019
4018
  if (t.state === "success")
4020
- return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
4019
+ return ((s = t.success) == null ? void 0 : s.summary) || ((a = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : a.description) || "";
4021
4020
  if (t.state === "rejected") {
4022
4021
  if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
4023
- const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, T = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4024
- return this.t(T);
4022
+ const y = (l = (r = t.rejected) == null ? void 0 : r.metadata) == null ? void 0 : l.resolution, M = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4023
+ return this.t(M);
4025
4024
  }
4026
- return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
4025
+ return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((k = t.failure) == null ? void 0 : k.error)) || "";
4027
4026
  },
4028
4027
  actionArtifact(e) {
4029
- var s, r;
4030
- const t = (r = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : r.artifact;
4028
+ var s, i;
4029
+ const t = (i = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : i.artifact;
4031
4030
  return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
4032
4031
  },
4033
4032
  systemLabel(e) {
4034
- var i, n, a;
4035
- const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s = Ir[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
4036
- return s ? this.t(s, { name: r }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
4033
+ var a, n, r;
4034
+ const t = (a = e == null ? void 0 : e.payload) == null ? void 0 : a.event, s = Ir[t], i = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((r = e == null ? void 0 : e.author) == null ? void 0 : r.name) || this.t("messageList.anAgent");
4035
+ return s ? this.t(s, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
4037
4036
  },
4038
4037
  scrollToBottom() {
4039
4038
  const e = this.$refs.scrollEl;
@@ -4047,12 +4046,12 @@ const Ir = {
4047
4046
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
4048
4047
  }
4049
4048
  }
4050
- }, Nr = { class: "wm-list__wrap" }, Ur = {
4049
+ }, Dr = { class: "wm-list__wrap" }, Nr = {
4051
4050
  key: 0,
4052
4051
  class: "wm-list__loadMore",
4053
4052
  role: "status",
4054
4053
  "aria-live": "polite"
4055
- }, Dr = { class: "wm-list__loadMore-lbl" }, jr = {
4054
+ }, Ur = { class: "wm-list__loadMore-lbl" }, jr = {
4056
4055
  key: 1,
4057
4056
  class: "wm-list__historyEnd"
4058
4057
  }, Fr = {
@@ -4077,158 +4076,158 @@ const Ir = {
4077
4076
  key: 3,
4078
4077
  class: "wm-list__row wm-list__row--ai fade-up"
4079
4078
  }, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
4080
- function si(e, t, s, r, i, n) {
4081
- const a = B("AIAvatar"), o = B("HumanAvatar"), f = B("ActionResult"), b = B("ArtifactRenderer"), y = B("Bubble"), T = B("AttachmentPreview"), E = B("Typing");
4082
- return c(), d("div", Nr, [
4083
- l("div", {
4079
+ function si(e, t, s, i, a, n) {
4080
+ const r = B("AIAvatar"), l = B("HumanAvatar"), f = B("ActionResult"), k = B("ArtifactRenderer"), y = B("Bubble"), M = B("AttachmentPreview"), E = B("Typing");
4081
+ return c(), d("div", Dr, [
4082
+ o("div", {
4084
4083
  ref: "scrollEl",
4085
- class: O(["wm-list", { "wm-list--silent": i.silentFades }]),
4084
+ class: R(["wm-list", { "wm-list--silent": a.silentFades }]),
4086
4085
  onScrollPassive: t[4] || (t[4] = (...A) => n.onScroll && n.onScroll(...A))
4087
4086
  }, [
4088
- s.loadingMore ? (c(), d("div", Ur, [
4089
- t[6] || (t[6] = l("span", {
4087
+ s.loadingMore ? (c(), d("div", Nr, [
4088
+ t[6] || (t[6] = o("span", {
4090
4089
  class: "wm-list__loadMore-spinner",
4091
4090
  "aria-hidden": "true"
4092
4091
  }, null, -1)),
4093
- l("span", Dr, v(n.t("messageList.loadingHistory")), 1)
4094
- ])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : k("", !0),
4092
+ o("span", Ur, v(n.t("messageList.loadingHistory")), 1)
4093
+ ])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : b("", !0),
4095
4094
  s.dateLabel ? (c(), d("div", Fr, [
4096
- t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
4097
- l("span", Hr, v(s.dateLabel), 1),
4098
- t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
4099
- ])) : k("", !0),
4095
+ t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
4096
+ o("span", Hr, v(s.dateLabel), 1),
4097
+ t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
4098
+ ])) : b("", !0),
4100
4099
  (c(!0), d(I, null, j(n.groups, (A, q) => (c(), d(I, {
4101
4100
  key: A.key
4102
4101
  }, [
4103
4102
  A.key === n.unreadGroupKey ? (c(), d("div", zr, [
4104
- t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4105
- l("span", qr, v(n.t("messageList.unread")), 1),
4106
- t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4107
- ])) : k("", !0),
4103
+ t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4104
+ o("span", qr, v(n.t("messageList.unread")), 1),
4105
+ t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4106
+ ])) : b("", !0),
4108
4107
  A.role === "system" || A.items.length ? (c(), d("div", {
4109
4108
  key: 1,
4110
- class: O(["wm-list__group", "wm-list__group--" + A.role])
4109
+ class: R(["wm-list__group", "wm-list__group--" + A.role])
4111
4110
  }, [
4112
4111
  A.role === "system" ? (c(), d("div", Vr, [
4113
- t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4114
- l("span", Kr, v(A.systemLabel), 1),
4115
- t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4112
+ t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4113
+ o("span", Kr, v(A.systemLabel), 1),
4114
+ t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4116
4115
  ])) : (c(), d(I, { key: 1 }, [
4117
- (c(!0), d(I, null, j(A.items, (M, U) => (c(), d(I, {
4118
- key: `${n.messageKey(M.message)}-${M.partKey}`
4116
+ (c(!0), d(I, null, j(A.items, (T, N) => (c(), d(I, {
4117
+ key: `${n.messageKey(T.message)}-${T.partKey}`
4119
4118
  }, [
4120
- l("div", {
4121
- "data-row-key": `${n.messageKey(M.message)}-${M.partKey}`,
4122
- class: O(["wm-list__row fade-up", [
4119
+ o("div", {
4120
+ "data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
4121
+ class: R(["wm-list__row fade-up", [
4123
4122
  "wm-list__row--" + A.role,
4124
4123
  {
4125
- "is-pending": M.message._pending,
4126
- "is-failed": M.message._failed
4124
+ "is-pending": T.message._pending,
4125
+ "is-failed": T.message._failed
4127
4126
  }
4128
4127
  ]]),
4129
- style: z(n.cornersStyle(A, U)),
4130
- onPointerdown: (D) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
4131
- onPointerup: t[0] || (t[0] = (D) => n.onPressEnd()),
4132
- onPointercancel: t[1] || (t[1] = (D) => n.onPressEnd()),
4133
- onPointerleave: t[2] || (t[2] = (D) => n.onPressEnd()),
4128
+ style: z(n.cornersStyle(A, N)),
4129
+ onPointerdown: (U) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4130
+ onPointerup: t[0] || (t[0] = (U) => n.onPressEnd()),
4131
+ onPointercancel: t[1] || (t[1] = (U) => n.onPressEnd()),
4132
+ onPointerleave: t[2] || (t[2] = (U) => n.onPressEnd()),
4134
4133
  onContextmenu: t[3] || (t[3] = J(() => {
4135
4134
  }, ["prevent"]))
4136
4135
  }, [
4137
4136
  A.role !== "user" ? (c(), d("div", $r, [
4138
- U === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4139
- A.role === "ai" ? (c(), P(a, {
4137
+ N === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
4138
+ A.role === "ai" ? (c(), D(r, {
4140
4139
  key: 0,
4141
4140
  size: 26,
4142
4141
  tail: !0,
4143
4142
  name: s.aiAgentName,
4144
4143
  "image-url": s.aiAgentAvatarUrl
4145
- }, null, 8, ["name", "image-url"])) : (c(), P(o, {
4144
+ }, null, 8, ["name", "image-url"])) : (c(), D(l, {
4146
4145
  key: 1,
4147
4146
  name: A.agentName,
4148
4147
  "avatar-url": A.agentAvatarUrl,
4149
4148
  size: 26,
4150
4149
  tail: !0
4151
4150
  }, null, 8, ["name", "avatar-url"]))
4152
- ], 64)) : k("", !0)
4153
- ])) : k("", !0),
4154
- M.renderAs === "action" ? (c(), P(f, {
4151
+ ], 64)) : b("", !0)
4152
+ ])) : b("", !0),
4153
+ T.renderAs === "action" ? (c(), D(f, {
4155
4154
  key: 1,
4156
- state: M.message.payload.state,
4157
- label: n.actionLabel(M.message),
4158
- detail: n.actionDetail(M.message)
4159
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), P(f, {
4155
+ state: T.message.payload.state,
4156
+ label: n.actionLabel(T.message),
4157
+ detail: n.actionDetail(T.message)
4158
+ }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), D(f, {
4160
4159
  key: 2,
4161
4160
  state: "awaiting",
4162
4161
  label: n.t("messageList.approvalRequestSent"),
4163
- detail: M.message.text_md || ""
4164
- }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), P(b, {
4162
+ detail: T.message.text_md || ""
4163
+ }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), D(k, {
4165
4164
  key: 3,
4166
- artifact: n.actionArtifact(M.message)
4167
- }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), P(b, {
4165
+ artifact: n.actionArtifact(T.message)
4166
+ }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), D(k, {
4168
4167
  key: 4,
4169
- artifact: n.artifactOf(M.message)
4168
+ artifact: n.artifactOf(T.message)
4170
4169
  }, null, 8, ["artifact"])) : (c(), d("div", {
4171
4170
  key: 5,
4172
- class: O(["wm-list__body", {
4173
- "wm-list__body--mixed": !!M.message.text_md && n.attachmentsOf(M.message).length > 0
4171
+ class: R(["wm-list__body", {
4172
+ "wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
4174
4173
  }])
4175
4174
  }, [
4176
- M.message.text_md ? (c(), P(y, {
4175
+ T.message.text_md ? (c(), D(y, {
4177
4176
  key: 0,
4178
4177
  role: A.role,
4179
- text: M.message.text_md
4180
- }, null, 8, ["role", "text"])) : k("", !0),
4181
- n.attachmentsOf(M.message).length ? (c(), d("div", {
4178
+ text: T.message.text_md
4179
+ }, null, 8, ["role", "text"])) : b("", !0),
4180
+ n.attachmentsOf(T.message).length ? (c(), d("div", {
4182
4181
  key: 1,
4183
- class: O(["wm-list__atts", {
4182
+ class: R(["wm-list__atts", {
4184
4183
  "wm-list__atts--align-end": A.role === "user",
4185
- "wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
4184
+ "wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
4186
4185
  }]),
4187
4186
  style: z(
4188
4187
  n.mosaicGridStyle(
4189
- n.attachmentsOf(M.message).length
4188
+ n.attachmentsOf(T.message).length
4190
4189
  )
4191
4190
  )
4192
4191
  }, [
4193
4192
  (c(!0), d(I, null, j(n.attachmentsOf(
4194
- M.message
4195
- ), (D, L) => (c(), P(T, {
4196
- key: `${n.messageKey(M.message)}-att-${L}`,
4197
- attachment: D,
4193
+ T.message
4194
+ ), (U, L) => (c(), D(M, {
4195
+ key: `${n.messageKey(T.message)}-att-${L}`,
4196
+ attachment: U,
4198
4197
  style: z(
4199
4198
  n.mosaicCornerStyle(
4200
4199
  L,
4201
- n.attachmentsOf(M.message).length,
4202
- !!M.message.text_md
4200
+ n.attachmentsOf(T.message).length,
4201
+ !!T.message.text_md
4203
4202
  )
4204
4203
  )
4205
4204
  }, null, 8, ["attachment", "style"]))), 128))
4206
- ], 6)) : k("", !0)
4205
+ ], 6)) : b("", !0)
4207
4206
  ], 2))
4208
4207
  ], 46, Wr),
4209
- U < A.items.length - 1 && i.pressedItemKey === `${n.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || n.timeOf(M.message)) ? (c(), d("div", {
4208
+ N < A.items.length - 1 && a.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4210
4209
  key: 0,
4211
- class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4210
+ class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4212
4211
  }, [
4213
- A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : k("", !0),
4214
- A.role !== "user" && n.timeOf(M.message) ? (c(), d("span", Yr, "•")) : k("", !0),
4215
- n.timeOf(M.message) ? (c(), d("span", Jr, v(n.timeOf(M.message)), 1)) : k("", !0)
4216
- ], 2)) : k("", !0)
4212
+ A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : b("", !0),
4213
+ A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : b("", !0),
4214
+ n.timeOf(T.message) ? (c(), d("span", Jr, v(n.timeOf(T.message)), 1)) : b("", !0)
4215
+ ], 2)) : b("", !0)
4217
4216
  ], 64))), 128)),
4218
4217
  (A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
4219
4218
  key: 0,
4220
- class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4219
+ class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4221
4220
  }, [
4222
- A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : k("", !0),
4223
- A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : k("", !0),
4224
- n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : k("", !0)
4225
- ], 2)) : k("", !0)
4221
+ A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : b("", !0),
4222
+ A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : b("", !0),
4223
+ n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : b("", !0)
4224
+ ], 2)) : b("", !0)
4226
4225
  ], 64))
4227
- ], 2)) : k("", !0)
4226
+ ], 2)) : b("", !0)
4228
4227
  ], 64))), 128)),
4229
4228
  s.streamingActive ? (c(), d("div", ei, [
4230
- l("div", ti, [
4231
- K(a, {
4229
+ o("div", ti, [
4230
+ K(r, {
4232
4231
  size: 26,
4233
4232
  tail: !0,
4234
4233
  name: s.aiAgentName,
@@ -4236,11 +4235,11 @@ function si(e, t, s, r, i, n) {
4236
4235
  }, null, 8, ["name", "image-url"])
4237
4236
  ]),
4238
4237
  K(E)
4239
- ])) : k("", !0)
4238
+ ])) : b("", !0)
4240
4239
  ], 34),
4241
- K(De, { name: "wm-scrollDown" }, {
4240
+ K(Ue, { name: "wm-scrollDown" }, {
4242
4241
  default: je(() => [
4243
- i.showScrollDown ? (c(), d("button", {
4242
+ a.showScrollDown ? (c(), d("button", {
4244
4243
  key: 0,
4245
4244
  type: "button",
4246
4245
  class: "wm-list__scrollDown",
@@ -4248,7 +4247,7 @@ function si(e, t, s, r, i, n) {
4248
4247
  title: n.t("messageList.scrollToBottom"),
4249
4248
  onClick: t[5] || (t[5] = (...A) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...A))
4250
4249
  }, [...t[13] || (t[13] = [
4251
- l("svg", {
4250
+ o("svg", {
4252
4251
  width: "14",
4253
4252
  height: "14",
4254
4253
  viewBox: "0 0 24 24",
@@ -4259,24 +4258,24 @@ function si(e, t, s, r, i, n) {
4259
4258
  "stroke-linejoin": "round",
4260
4259
  "aria-hidden": "true"
4261
4260
  }, [
4262
- l("path", { d: "M6 9l6 6 6-6" })
4261
+ o("path", { d: "M6 9l6 6 6-6" })
4263
4262
  ], -1)
4264
- ])], 8, ni)) : k("", !0)
4263
+ ])], 8, ni)) : b("", !0)
4265
4264
  ]),
4266
4265
  _: 1
4267
4266
  })
4268
4267
  ]);
4269
4268
  }
4270
- const ri = /* @__PURE__ */ N(Pr, [["render", si], ["__scopeId", "data-v-fd42a48c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Re = typeof window < "u" && typeof window.MediaRecorder < "u";
4269
+ const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-cc2c18ec"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4271
4270
  function ii() {
4272
- return Re && [
4271
+ return Oe && [
4273
4272
  "video/webm;codecs=vp9,opus",
4274
4273
  "video/webm;codecs=vp8,opus",
4275
4274
  "video/webm",
4276
4275
  "video/mp4"
4277
4276
  ].find((t) => {
4278
- var s, r;
4279
- return (r = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : r.call(s, t);
4277
+ var s, i;
4278
+ return (i = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(s, t);
4280
4279
  }) || "";
4281
4280
  }
4282
4281
  function Ve({ audio: e }) {
@@ -4313,20 +4312,20 @@ async function ai() {
4313
4312
  }
4314
4313
  async function oi(e) {
4315
4314
  const t = document.createElement("video");
4316
- t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
4317
- const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
4318
- i.width = s, i.height = r, i.getContext("2d").drawImage(t, 0, 0, s, r);
4319
- const n = await new Promise((o, f) => {
4320
- i.toBlob(
4321
- (b) => b ? o(b) : f(new Error("toBlob failed")),
4315
+ t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4316
+ const s = t.videoWidth || 1280, i = t.videoHeight || 720, a = document.createElement("canvas");
4317
+ a.width = s, a.height = i, a.getContext("2d").drawImage(t, 0, 0, s, i);
4318
+ const n = await new Promise((l, f) => {
4319
+ a.toBlob(
4320
+ (k) => k ? l(k) : f(new Error("toBlob failed")),
4322
4321
  "image/png"
4323
4322
  );
4324
- }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4325
- return new File([n], `capture-${a}.png`, { type: "image/png" });
4323
+ }), r = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4324
+ return new File([n], `capture-${r}.png`, { type: "image/png" });
4326
4325
  }
4327
4326
  async function li(e = {}) {
4328
- var b;
4329
- if (!pe || !Re) return null;
4327
+ var k;
4328
+ if (!pe || !Oe) return null;
4330
4329
  let t;
4331
4330
  try {
4332
4331
  t = await navigator.mediaDevices.getDisplayMedia(
@@ -4336,56 +4335,56 @@ async function li(e = {}) {
4336
4335
  return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
4337
4336
  }
4338
4337
  const s = ii();
4339
- let r;
4338
+ let i;
4340
4339
  try {
4341
- r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4340
+ i = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4342
4341
  } catch (y) {
4343
- return console.error("[media] recorder init", y), t.getTracks().forEach((T) => {
4344
- T.stop();
4342
+ return console.error("[media] recorder init", y), t.getTracks().forEach((M) => {
4343
+ M.stop();
4345
4344
  }), null;
4346
4345
  }
4347
- const i = [];
4348
- let n = null, a = !1;
4349
- r.addEventListener("dataavailable", (y) => {
4350
- y.data && y.data.size > 0 && i.push(y.data);
4351
- }), r.addEventListener("stop", () => {
4352
- var y, T;
4346
+ const a = [];
4347
+ let n = null, r = !1;
4348
+ i.addEventListener("dataavailable", (y) => {
4349
+ y.data && y.data.size > 0 && a.push(y.data);
4350
+ }), i.addEventListener("stop", () => {
4351
+ var y, M;
4353
4352
  if (n && clearInterval(n), t.getTracks().forEach((E) => {
4354
4353
  E.stop();
4355
- }), i.length) {
4356
- const E = r.mimeType || s || "video/webm", A = new Blob(i, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${M}.${q}`, {
4354
+ }), a.length) {
4355
+ const E = i.mimeType || s || "video/webm", A = new Blob(a, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${T}.${q}`, {
4357
4356
  type: E
4358
4357
  });
4359
- (y = e.onfinalize) == null || y.call(e, U);
4358
+ (y = e.onfinalize) == null || y.call(e, N);
4360
4359
  } else
4361
- (T = e.oncancel) == null || T.call(e);
4360
+ (M = e.oncancel) == null || M.call(e);
4362
4361
  }), t.getVideoTracks().forEach((y) => {
4363
- y.addEventListener("ended", () => o(), { once: !0 });
4362
+ y.addEventListener("ended", () => l(), { once: !0 });
4364
4363
  });
4365
- function o() {
4366
- if (!a && (a = !0, r.state !== "inactive"))
4364
+ function l() {
4365
+ if (!r && (r = !0, i.state !== "inactive"))
4367
4366
  try {
4368
- r.stop();
4367
+ i.stop();
4369
4368
  } catch (y) {
4370
4369
  console.error("[media] recorder stop", y);
4371
4370
  }
4372
4371
  }
4373
4372
  try {
4374
- r.start(1e3);
4373
+ i.start(1e3);
4375
4374
  } catch (y) {
4376
- return console.error("[media] recorder start", y), t.getTracks().forEach((T) => {
4377
- T.stop();
4375
+ return console.error("[media] recorder start", y), t.getTracks().forEach((M) => {
4376
+ M.stop();
4378
4377
  }), null;
4379
4378
  }
4380
- (b = e.onstart) == null || b.call(e);
4379
+ (k = e.onstart) == null || k.call(e);
4381
4380
  const f = Date.now();
4382
4381
  return n = setInterval(() => {
4383
4382
  var y;
4384
4383
  (y = e.ontick) == null || y.call(e, Date.now() - f);
4385
4384
  }, 500), {
4386
- stop: o,
4385
+ stop: l,
4387
4386
  get state() {
4388
- return r.state;
4387
+ return i.state;
4389
4388
  }
4390
4389
  };
4391
4390
  }
@@ -4442,7 +4441,7 @@ const ci = [
4442
4441
  return ci.map((e) => ({
4443
4442
  ...e,
4444
4443
  label: this.t(e.labelKey),
4445
- disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !Re)
4444
+ disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !Oe)
4446
4445
  }));
4447
4446
  },
4448
4447
  recordingElapsedLabel() {
@@ -4574,51 +4573,51 @@ const ci = [
4574
4573
  height: "14",
4575
4574
  "aria-hidden": "true"
4576
4575
  }, pi = ["d"], vi = ["placeholder", "disabled"], yi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
4577
- function ki(e, t, s, r, i, n) {
4576
+ function ki(e, t, s, i, a, n) {
4578
4577
  return c(), d("div", {
4579
- class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4580
- style: z(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4578
+ class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4579
+ style: z(a.kbOffset ? { transform: `translateY(-${a.kbOffset}px)` } : null)
4581
4580
  }, [
4582
- i.recording ? (c(), d("div", ui, [
4583
- t[8] || (t[8] = l("span", {
4581
+ a.recording ? (c(), d("div", ui, [
4582
+ t[8] || (t[8] = o("span", {
4584
4583
  class: "wm-rec__dot",
4585
4584
  "aria-hidden": "true"
4586
4585
  }, null, -1)),
4587
- l("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4588
- l("button", {
4586
+ o("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4587
+ o("button", {
4589
4588
  type: "button",
4590
4589
  class: "wm-rec__stop",
4591
- onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
4590
+ onClick: t[0] || (t[0] = (...r) => n.stopRecording && n.stopRecording(...r))
4592
4591
  }, v(n.t("composer.stop")), 1)
4593
- ])) : k("", !0),
4594
- l("form", {
4595
- class: O(["wm-compose", { "has-attach": i.attachOpen }]),
4596
- onSubmit: t[7] || (t[7] = J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4592
+ ])) : b("", !0),
4593
+ o("form", {
4594
+ class: R(["wm-compose", { "has-attach": a.attachOpen }]),
4595
+ onSubmit: t[7] || (t[7] = J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]))
4597
4596
  }, [
4598
- l("input", {
4597
+ o("input", {
4599
4598
  ref: "fileEl",
4600
4599
  type: "file",
4601
4600
  hidden: "",
4602
4601
  multiple: "",
4603
- onChange: t[1] || (t[1] = (...a) => n.onFile && n.onFile(...a))
4602
+ onChange: t[1] || (t[1] = (...r) => n.onFile && n.onFile(...r))
4604
4603
  }, null, 544),
4605
- i.attachOpen ? (c(), d("div", {
4604
+ a.attachOpen ? (c(), d("div", {
4606
4605
  key: 0,
4607
4606
  class: "wm-compose__overlay",
4608
- onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
4609
- })) : k("", !0),
4610
- i.attachOpen ? (c(), d("div", mi, [
4611
- (c(!0), d(I, null, j(n.attachItems, (a) => (c(), d("button", {
4612
- key: a.action,
4607
+ onClick: t[2] || (t[2] = (r) => a.attachOpen = !1)
4608
+ })) : b("", !0),
4609
+ a.attachOpen ? (c(), d("div", mi, [
4610
+ (c(!0), d(I, null, j(n.attachItems, (r) => (c(), d("button", {
4611
+ key: r.action,
4613
4612
  type: "button",
4614
4613
  class: "wm-compose__menuItem",
4615
- disabled: a.disabled,
4616
- onClick: (o) => n.onAttachAction(a.action)
4614
+ disabled: r.disabled,
4615
+ onClick: (l) => n.onAttachAction(r.action)
4617
4616
  }, [
4618
- l("span", _i, [
4617
+ o("span", _i, [
4619
4618
  (c(), d("svg", gi, [
4620
- l("path", {
4621
- d: a.path,
4619
+ o("path", {
4620
+ d: r.path,
4622
4621
  stroke: "currentColor",
4623
4622
  "stroke-width": "1.8",
4624
4623
  "stroke-linecap": "round",
@@ -4627,31 +4626,31 @@ function ki(e, t, s, r, i, n) {
4627
4626
  }, null, 8, pi)
4628
4627
  ]))
4629
4628
  ]),
4630
- l("span", null, v(a.label), 1)
4629
+ o("span", null, v(r.label), 1)
4631
4630
  ], 8, fi))), 128))
4632
- ])) : k("", !0),
4633
- G(l("textarea", {
4631
+ ])) : b("", !0),
4632
+ G(o("textarea", {
4634
4633
  ref: "inputEl",
4635
- "onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
4634
+ "onUpdate:modelValue": t[3] || (t[3] = (r) => a.local = r),
4636
4635
  class: "wm-compose__input",
4637
4636
  rows: "3",
4638
4637
  placeholder: s.placeholder,
4639
4638
  disabled: s.disabled,
4640
- onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
4641
- onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
4639
+ onKeydown: t[4] || (t[4] = (...r) => n.onKeydown && n.onKeydown(...r)),
4640
+ onInput: t[5] || (t[5] = (...r) => n.autosize && n.autosize(...r))
4642
4641
  }, null, 40, vi), [
4643
- [te, i.local]
4642
+ [te, a.local]
4644
4643
  ]),
4645
- l("div", yi, [
4646
- l("button", {
4644
+ o("div", yi, [
4645
+ o("button", {
4647
4646
  type: "button",
4648
- class: O(["wm-compose__icon", { "is-open": i.attachOpen }]),
4647
+ class: R(["wm-compose__icon", { "is-open": a.attachOpen }]),
4649
4648
  title: s.attachLabel,
4650
4649
  "aria-label": s.attachLabel,
4651
- disabled: i.recording,
4652
- onClick: t[6] || (t[6] = (a) => i.attachOpen = !i.attachOpen)
4650
+ disabled: a.recording,
4651
+ onClick: t[6] || (t[6] = (r) => a.attachOpen = !a.attachOpen)
4653
4652
  }, [...t[9] || (t[9] = [
4654
- l("svg", {
4653
+ o("svg", {
4655
4654
  width: "13",
4656
4655
  height: "13",
4657
4656
  viewBox: "0 0 24 24",
@@ -4662,16 +4661,16 @@ function ki(e, t, s, r, i, n) {
4662
4661
  "stroke-linejoin": "round",
4663
4662
  "aria-hidden": "true"
4664
4663
  }, [
4665
- l("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4664
+ 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" })
4666
4665
  ], -1)
4667
4666
  ])], 10, wi),
4668
- l("button", {
4667
+ o("button", {
4669
4668
  type: "submit",
4670
- class: O(["wm-compose__send", { "is-empty": !n.canSend }]),
4669
+ class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
4671
4670
  disabled: !n.canSend,
4672
4671
  "aria-label": n.t("composer.send")
4673
4672
  }, [...t[10] || (t[10] = [
4674
- l("svg", {
4673
+ o("svg", {
4675
4674
  width: "13",
4676
4675
  height: "13",
4677
4676
  viewBox: "0 0 24 24",
@@ -4682,14 +4681,14 @@ function ki(e, t, s, r, i, n) {
4682
4681
  "stroke-linejoin": "round",
4683
4682
  "aria-hidden": "true"
4684
4683
  }, [
4685
- l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4684
+ o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4686
4685
  ], -1)
4687
4686
  ])], 10, bi)
4688
4687
  ])
4689
4688
  ], 34)
4690
4689
  ], 6);
4691
4690
  }
4692
- const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4691
+ const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4693
4692
  name: "WmSuggestionChips",
4694
4693
  props: {
4695
4694
  items: { type: Array, default: () => [] },
@@ -4707,21 +4706,21 @@ const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
4707
4706
  }
4708
4707
  }
4709
4708
  }, Si = ["onClick"];
4710
- function Ti(e, t, s, r, i, n) {
4709
+ function Ti(e, t, s, i, a, n) {
4711
4710
  return s.items.length ? (c(), d("div", {
4712
4711
  key: n.batchKey,
4713
4712
  class: "wm-chips"
4714
4713
  }, [
4715
- (c(!0), d(I, null, j(s.items, (a, o) => (c(), d("button", {
4716
- key: o,
4714
+ (c(!0), d(I, null, j(s.items, (r, l) => (c(), d("button", {
4715
+ key: l,
4717
4716
  type: "button",
4718
4717
  class: "wm-chip",
4719
- style: z({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
4720
- onClick: (f) => e.$emit("select", a)
4721
- }, v(a.label), 13, Si))), 128))
4722
- ])) : k("", !0);
4718
+ style: z({ animationDelay: s.baseDelay + l * s.stepDelay + "ms" }),
4719
+ onClick: (f) => e.$emit("select", r)
4720
+ }, v(r.label), 13, Si))), 128))
4721
+ ])) : b("", !0);
4723
4722
  }
4724
- const Mi = /* @__PURE__ */ N(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085"]]), xi = {
4723
+ const Mi = /* @__PURE__ */ P(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085"]]), xi = {
4725
4724
  name: "WmApprovalCard",
4726
4725
  components: { AIAvatar: oe },
4727
4726
  inject: {
@@ -4765,45 +4764,45 @@ const Mi = /* @__PURE__ */ N(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085
4765
4764
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4766
4765
  }
4767
4766
  }
4768
- }, Ri = { class: "wm-approval" }, Oi = { class: "wm-approval__head" }, Li = { class: "wm-approval__icon" }, Ii = { class: "wm-approval__main" }, Ei = { class: "wm-approval__title" }, Bi = {
4767
+ }, Oi = { class: "wm-approval" }, Ri = { class: "wm-approval__head" }, Li = { class: "wm-approval__icon" }, Ii = { class: "wm-approval__main" }, Ei = { class: "wm-approval__title" }, Bi = {
4769
4768
  key: 0,
4770
4769
  class: "wm-approval__detail"
4771
4770
  }, Pi = { class: "wm-approval__actions" };
4772
- function Ni(e, t, s, r, i, n) {
4773
- const a = B("AIAvatar");
4774
- return c(), d("div", Ri, [
4775
- l("div", Oi, [
4776
- l("div", Li, [
4777
- K(a, {
4771
+ function Di(e, t, s, i, a, n) {
4772
+ const r = B("AIAvatar");
4773
+ return c(), d("div", Oi, [
4774
+ o("div", Ri, [
4775
+ o("div", Li, [
4776
+ K(r, {
4778
4777
  size: 24,
4779
4778
  name: s.agentName,
4780
4779
  "image-url": s.agentAvatarUrl
4781
4780
  }, null, 8, ["name", "image-url"])
4782
4781
  ]),
4783
- l("div", Ii, [
4784
- l("div", Ei, v(s.action), 1),
4785
- s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : k("", !0)
4782
+ o("div", Ii, [
4783
+ o("div", Ei, v(s.action), 1),
4784
+ s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : b("", !0)
4786
4785
  ])
4787
4786
  ]),
4788
- l("div", Pi, [
4787
+ o("div", Pi, [
4789
4788
  n.rejectId ? (c(), d("button", {
4790
4789
  key: 0,
4791
4790
  type: "button",
4792
4791
  class: "wm-approval__btn wm-approval__btn--neutral",
4793
- onClick: t[0] || (t[0] = (o) => e.$emit("callback", n.rejectId))
4794
- }, v(n.rejectLabel), 1)) : k("", !0),
4792
+ onClick: t[0] || (t[0] = (l) => e.$emit("callback", n.rejectId))
4793
+ }, v(n.rejectLabel), 1)) : b("", !0),
4795
4794
  n.approveId ? (c(), d("button", {
4796
4795
  key: 1,
4797
4796
  type: "button",
4798
4797
  class: "wm-approval__btn wm-approval__btn--primary",
4799
- onClick: t[1] || (t[1] = (o) => e.$emit("callback", n.approveId))
4800
- }, v(n.approveLabel), 1)) : k("", !0)
4798
+ onClick: t[1] || (t[1] = (l) => e.$emit("callback", n.approveId))
4799
+ }, v(n.approveLabel), 1)) : b("", !0)
4801
4800
  ])
4802
4801
  ]);
4803
4802
  }
4804
- const Ui = /* @__PURE__ */ N(xi, [["render", Ni], ["__scopeId", "data-v-a2bed37e"]]);
4805
- let Ne = 0;
4806
- const Di = /* @__PURE__ */ new Set([
4803
+ const Ni = /* @__PURE__ */ P(xi, [["render", Di], ["__scopeId", "data-v-a2bed37e"]]);
4804
+ let De = 0;
4805
+ const Ui = /* @__PURE__ */ new Set([
4807
4806
  "text",
4808
4807
  "textarea",
4809
4808
  "number",
@@ -4828,8 +4827,8 @@ const Di = /* @__PURE__ */ new Set([
4828
4827
  },
4829
4828
  emits: ["submit"],
4830
4829
  data() {
4831
- return Ne += 1, {
4832
- _uid: Ne,
4830
+ return De += 1, {
4831
+ _uid: De,
4833
4832
  values: {},
4834
4833
  busy: !1,
4835
4834
  error: ""
@@ -4841,7 +4840,7 @@ const Di = /* @__PURE__ */ new Set([
4841
4840
  // douteux.
4842
4841
  normalizedFields() {
4843
4842
  var t;
4844
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Di.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4843
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Ui.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4845
4844
  }
4846
4845
  },
4847
4846
  created() {
@@ -4860,8 +4859,8 @@ const Di = /* @__PURE__ */ new Set([
4860
4859
  this.values = t, this.error = "";
4861
4860
  },
4862
4861
  toggleMulti(e, t, s) {
4863
- const r = Array.isArray(this.values[e]) ? this.values[e].slice() : [], i = r.indexOf(t);
4864
- s && i === -1 ? r.push(t) : !s && i !== -1 && r.splice(i, 1), this.values = { ...this.values, [e]: r };
4862
+ const i = Array.isArray(this.values[e]) ? this.values[e].slice() : [], a = i.indexOf(t);
4863
+ s && a === -1 ? i.push(t) : !s && a !== -1 && i.splice(a, 1), this.values = { ...this.values, [e]: i };
4865
4864
  },
4866
4865
  validate() {
4867
4866
  for (const e of this.normalizedFields) {
@@ -4921,144 +4920,144 @@ const Di = /* @__PURE__ */ new Set([
4921
4920
  key: 2,
4922
4921
  class: "wm-form__doneLbl"
4923
4922
  };
4924
- function ca(e, t, s, r, i, n) {
4925
- const a = B("AIAvatar");
4923
+ function ca(e, t, s, i, a, n) {
4924
+ const r = B("AIAvatar");
4926
4925
  return c(), d("div", Fi, [
4927
- l("div", Hi, [
4928
- l("div", zi, [
4929
- K(a, {
4926
+ o("div", Hi, [
4927
+ o("div", zi, [
4928
+ K(r, {
4930
4929
  size: 24,
4931
4930
  name: s.agentName,
4932
4931
  "image-url": s.agentAvatarUrl
4933
4932
  }, null, 8, ["name", "image-url"])
4934
4933
  ]),
4935
- l("div", qi, [
4936
- l("div", Vi, v(s.form.title || n.t("form.title")), 1),
4937
- s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : k("", !0)
4934
+ o("div", qi, [
4935
+ o("div", Vi, v(s.form.title || n.t("form.title")), 1),
4936
+ s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : b("", !0)
4938
4937
  ])
4939
4938
  ]),
4940
- l("form", {
4939
+ o("form", {
4941
4940
  class: "wm-form__body",
4942
- onSubmit: t[0] || (t[0] = J((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
4941
+ onSubmit: t[0] || (t[0] = J((...l) => n.onSubmit && n.onSubmit(...l), ["prevent"]))
4943
4942
  }, [
4944
- (c(!0), d(I, null, j(n.normalizedFields, (o) => (c(), d("div", {
4945
- key: o.key,
4943
+ (c(!0), d(I, null, j(n.normalizedFields, (l) => (c(), d("div", {
4944
+ key: l.key,
4946
4945
  class: "wm-form__field"
4947
4946
  }, [
4948
- l("label", {
4949
- for: `wm-f-${i._uid}-${o.key}`,
4947
+ o("label", {
4948
+ for: `wm-f-${a._uid}-${l.key}`,
4950
4949
  class: "wm-form__label"
4951
4950
  }, [
4952
- Se(v(o.label), 1),
4953
- o.required ? (c(), d("span", $i, "*")) : k("", !0)
4951
+ Se(v(l.label), 1),
4952
+ l.required ? (c(), d("span", $i, "*")) : b("", !0)
4954
4953
  ], 8, Wi),
4955
- o.type === "text" ? G((c(), d("input", {
4954
+ l.type === "text" ? G((c(), d("input", {
4956
4955
  key: 0,
4957
- id: `wm-f-${i._uid}-${o.key}`,
4958
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4956
+ id: `wm-f-${a._uid}-${l.key}`,
4957
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4959
4958
  type: "text",
4960
4959
  class: "wm-form__input",
4961
- placeholder: o.placeholder || "",
4962
- required: o.required,
4963
- disabled: s.readOnly || i.busy
4960
+ placeholder: l.placeholder || "",
4961
+ required: l.required,
4962
+ disabled: s.readOnly || a.busy
4964
4963
  }, null, 8, Gi)), [
4965
- [te, i.values[o.key]]
4966
- ]) : o.type === "textarea" ? G((c(), d("textarea", {
4964
+ [te, a.values[l.key]]
4965
+ ]) : l.type === "textarea" ? G((c(), d("textarea", {
4967
4966
  key: 1,
4968
- id: `wm-f-${i._uid}-${o.key}`,
4969
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4967
+ id: `wm-f-${a._uid}-${l.key}`,
4968
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4970
4969
  class: "wm-form__textarea",
4971
4970
  rows: "3",
4972
- placeholder: o.placeholder || "",
4973
- required: o.required,
4974
- disabled: s.readOnly || i.busy
4971
+ placeholder: l.placeholder || "",
4972
+ required: l.required,
4973
+ disabled: s.readOnly || a.busy
4975
4974
  }, null, 8, Yi)), [
4976
- [te, i.values[o.key]]
4977
- ]) : o.type === "number" ? G((c(), d("input", {
4975
+ [te, a.values[l.key]]
4976
+ ]) : l.type === "number" ? G((c(), d("input", {
4978
4977
  key: 2,
4979
- id: `wm-f-${i._uid}-${o.key}`,
4980
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4978
+ id: `wm-f-${a._uid}-${l.key}`,
4979
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4981
4980
  type: "number",
4982
4981
  class: "wm-form__input",
4983
- placeholder: o.placeholder || "",
4984
- required: o.required,
4985
- disabled: s.readOnly || i.busy
4982
+ placeholder: l.placeholder || "",
4983
+ required: l.required,
4984
+ disabled: s.readOnly || a.busy
4986
4985
  }, null, 8, Ji)), [
4987
4986
  [
4988
4987
  te,
4989
- i.values[o.key],
4988
+ a.values[l.key],
4990
4989
  void 0,
4991
4990
  { number: !0 }
4992
4991
  ]
4993
- ]) : o.type === "date" ? G((c(), d("input", {
4992
+ ]) : l.type === "date" ? G((c(), d("input", {
4994
4993
  key: 3,
4995
- id: `wm-f-${i._uid}-${o.key}`,
4996
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
4994
+ id: `wm-f-${a._uid}-${l.key}`,
4995
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
4997
4996
  type: "date",
4998
4997
  class: "wm-form__input",
4999
- required: o.required,
5000
- disabled: s.readOnly || i.busy
4998
+ required: l.required,
4999
+ disabled: s.readOnly || a.busy
5001
5000
  }, null, 8, Xi)), [
5002
- [te, i.values[o.key]]
5003
- ]) : o.type === "boolean" ? (c(), d("label", Qi, [
5004
- G(l("input", {
5005
- id: `wm-f-${i._uid}-${o.key}`,
5006
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
5001
+ [te, a.values[l.key]]
5002
+ ]) : l.type === "boolean" ? (c(), d("label", Qi, [
5003
+ G(o("input", {
5004
+ id: `wm-f-${a._uid}-${l.key}`,
5005
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
5007
5006
  type: "checkbox",
5008
- disabled: s.readOnly || i.busy
5007
+ disabled: s.readOnly || a.busy
5009
5008
  }, null, 8, Zi), [
5010
- [$e, i.values[o.key]]
5009
+ [$e, a.values[l.key]]
5011
5010
  ]),
5012
- l("span", null, v(o.placeholder || n.t("common.yes")), 1)
5013
- ])) : o.type === "select" ? G((c(), d("select", {
5011
+ o("span", null, v(l.placeholder || n.t("common.yes")), 1)
5012
+ ])) : l.type === "select" ? G((c(), d("select", {
5014
5013
  key: 5,
5015
- id: `wm-f-${i._uid}-${o.key}`,
5016
- "onUpdate:modelValue": (f) => i.values[o.key] = f,
5014
+ id: `wm-f-${a._uid}-${l.key}`,
5015
+ "onUpdate:modelValue": (f) => a.values[l.key] = f,
5017
5016
  class: "wm-form__select",
5018
- required: o.required,
5019
- disabled: s.readOnly || i.busy
5017
+ required: l.required,
5018
+ disabled: s.readOnly || a.busy
5020
5019
  }, [
5021
- l("option", ta, v(o.placeholder || n.t("form.choose")), 1),
5022
- (c(!0), d(I, null, j(o.options, (f) => (c(), d("option", {
5020
+ o("option", ta, v(l.placeholder || n.t("form.choose")), 1),
5021
+ (c(!0), d(I, null, j(l.options, (f) => (c(), d("option", {
5023
5022
  key: f.value,
5024
5023
  value: f.value
5025
5024
  }, v(f.label), 9, na))), 128))
5026
5025
  ], 8, ea)), [
5027
- [Ge, i.values[o.key]]
5028
- ]) : o.type === "multiselect" ? (c(), d("div", sa, [
5029
- (c(!0), d(I, null, j(o.options, (f) => (c(), d("label", {
5026
+ [Ge, a.values[l.key]]
5027
+ ]) : l.type === "multiselect" ? (c(), d("div", sa, [
5028
+ (c(!0), d(I, null, j(l.options, (f) => (c(), d("label", {
5030
5029
  key: f.value,
5031
5030
  class: "wm-form__multiItem"
5032
5031
  }, [
5033
- l("input", {
5032
+ o("input", {
5034
5033
  type: "checkbox",
5035
5034
  value: f.value,
5036
- checked: Array.isArray(i.values[o.key]) && i.values[o.key].includes(f.value),
5037
- disabled: s.readOnly || i.busy,
5038
- onChange: (b) => n.toggleMulti(
5039
- o.key,
5035
+ checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(f.value),
5036
+ disabled: s.readOnly || a.busy,
5037
+ onChange: (k) => n.toggleMulti(
5038
+ l.key,
5040
5039
  f.value,
5041
- b.target.checked
5040
+ k.target.checked
5042
5041
  )
5043
5042
  }, null, 40, ra),
5044
- l("span", null, v(f.label), 1)
5043
+ o("span", null, v(f.label), 1)
5045
5044
  ]))), 128))
5046
- ])) : k("", !0)
5045
+ ])) : b("", !0)
5047
5046
  ]))), 128)),
5048
- i.error ? (c(), d("div", ia, v(i.error), 1)) : k("", !0),
5047
+ a.error ? (c(), d("div", ia, v(a.error), 1)) : b("", !0),
5049
5048
  s.readOnly ? (c(), d("div", la, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
5050
5049
  key: 1,
5051
5050
  type: "submit",
5052
5051
  class: "wm-form__submit",
5053
- disabled: i.busy
5052
+ disabled: a.busy
5054
5053
  }, [
5055
- i.busy ? (c(), d("span", oa)) : k("", !0),
5056
- l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5054
+ a.busy ? (c(), d("span", oa)) : b("", !0),
5055
+ o("span", null, v(a.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5057
5056
  ], 8, aa))
5058
5057
  ], 32)
5059
5058
  ]);
5060
5059
  }
5061
- const da = /* @__PURE__ */ N(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
5060
+ const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
5062
5061
  name: "WmFeedback",
5063
5062
  inject: {
5064
5063
  // Translator shared by the Messenger shell; French fallback when
@@ -5096,11 +5095,11 @@ const da = /* @__PURE__ */ N(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56
5096
5095
  key: 1,
5097
5096
  class: "wm-fb__done"
5098
5097
  }, ba = { class: "wm-fb__doneTitle" }, ka = { class: "wm-fb__doneSub" };
5099
- function Ca(e, t, s, r, i, n) {
5098
+ function Ca(e, t, s, i, a, n) {
5100
5099
  return c(), d("div", ha, [
5101
5100
  s.done ? (c(), d("div", wa, [
5102
- t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
5103
- l("svg", {
5101
+ t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
5102
+ o("svg", {
5104
5103
  width: "16",
5105
5104
  height: "16",
5106
5105
  viewBox: "0 0 24 24",
@@ -5111,35 +5110,35 @@ function Ca(e, t, s, r, i, n) {
5111
5110
  "stroke-linejoin": "round",
5112
5111
  "aria-hidden": "true"
5113
5112
  }, [
5114
- l("path", { d: "M20 6L9 17l-5-5" })
5113
+ o("path", { d: "M20 6L9 17l-5-5" })
5115
5114
  ])
5116
5115
  ], -1)),
5117
- l("div", ba, v(n.t("feedback.doneTitle")), 1),
5118
- l("div", ka, v(n.t("feedback.doneSubtitle")), 1)
5116
+ o("div", ba, v(n.t("feedback.doneTitle")), 1),
5117
+ o("div", ka, v(n.t("feedback.doneSubtitle")), 1)
5119
5118
  ])) : (c(), d(I, { key: 0 }, [
5120
- l("div", ma, v(n.t("feedback.question")), 1),
5121
- l("div", fa, v(n.t("feedback.subtitle")), 1),
5122
- l("div", _a, [
5123
- (c(!0), d(I, null, j(n.options, (a) => (c(), d("button", {
5124
- key: a.v,
5119
+ o("div", ma, v(n.t("feedback.question")), 1),
5120
+ o("div", fa, v(n.t("feedback.subtitle")), 1),
5121
+ o("div", _a, [
5122
+ (c(!0), d(I, null, j(n.options, (r) => (c(), d("button", {
5123
+ key: r.v,
5125
5124
  type: "button",
5126
- class: O(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5127
- onClick: (o) => i.sel = a.v
5125
+ class: R(["wm-fb__opt", { "is-selected": a.sel === r.v }]),
5126
+ onClick: (l) => a.sel = r.v
5128
5127
  }, [
5129
- l("span", pa, v(a.e), 1),
5130
- l("span", va, v(a.l), 1)
5128
+ o("span", pa, v(r.e), 1),
5129
+ o("span", va, v(r.l), 1)
5131
5130
  ], 10, ga))), 128))
5132
5131
  ]),
5133
- l("button", {
5132
+ o("button", {
5134
5133
  type: "button",
5135
5134
  class: "wm-fb__send",
5136
- disabled: !i.sel || s.busy,
5137
- onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
5135
+ disabled: !a.sel || s.busy,
5136
+ onClick: t[0] || (t[0] = (...r) => n.onSend && n.onSend(...r))
5138
5137
  }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ya)
5139
5138
  ], 64))
5140
5139
  ]);
5141
5140
  }
5142
- const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
5141
+ const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
5143
5142
  name: "WmMoreMenu",
5144
5143
  inject: {
5145
5144
  // Translator shared by the Messenger shell; French fallback when
@@ -5180,26 +5179,26 @@ const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
5180
5179
  }, xa = {
5181
5180
  key: 0,
5182
5181
  class: "wm-mm__section"
5183
- }, Ra = { class: "wm-mm__label" }, Oa = { class: "wm-mm__label" }, La = {
5182
+ }, Oa = { class: "wm-mm__label" }, Ra = { class: "wm-mm__label" }, La = {
5184
5183
  key: 1,
5185
5184
  class: "wm-mm__sep"
5186
- }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Na = { class: "wm-mm__label" };
5187
- function Ua(e, t, s, r, i, n) {
5185
+ }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Da = { class: "wm-mm__label" };
5186
+ function Na(e, t, s, i, a, n) {
5188
5187
  return c(), d("div", Ta, [
5189
- l("div", {
5188
+ o("div", {
5190
5189
  class: "wm-mm__scrim",
5191
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5190
+ onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5192
5191
  }),
5193
- l("div", Ma, [
5192
+ o("div", Ma, [
5194
5193
  s.canRename || s.canExport ? (c(), d("div", xa, [
5195
5194
  s.canRename ? (c(), d("button", {
5196
5195
  key: 0,
5197
5196
  type: "button",
5198
5197
  class: "wm-mm__item",
5199
- onClick: t[1] || (t[1] = (a) => n.emit("rename"))
5198
+ onClick: t[1] || (t[1] = (r) => n.emit("rename"))
5200
5199
  }, [
5201
- t[6] || (t[6] = l("span", { class: "wm-mm__icon" }, [
5202
- l("svg", {
5200
+ t[6] || (t[6] = o("span", { class: "wm-mm__icon" }, [
5201
+ o("svg", {
5203
5202
  width: "12",
5204
5203
  height: "12",
5205
5204
  viewBox: "0 0 24 24",
@@ -5210,20 +5209,20 @@ function Ua(e, t, s, r, i, n) {
5210
5209
  "stroke-linejoin": "round",
5211
5210
  "aria-hidden": "true"
5212
5211
  }, [
5213
- l("path", { d: "M12 20h9" }),
5214
- l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5212
+ o("path", { d: "M12 20h9" }),
5213
+ o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5215
5214
  ])
5216
5215
  ], -1)),
5217
- l("span", Ra, v(n.t("moreMenu.editTitle")), 1)
5218
- ])) : k("", !0),
5216
+ o("span", Oa, v(n.t("moreMenu.editTitle")), 1)
5217
+ ])) : b("", !0),
5219
5218
  s.canExport ? (c(), d("button", {
5220
5219
  key: 1,
5221
5220
  type: "button",
5222
5221
  class: "wm-mm__item",
5223
- onClick: t[2] || (t[2] = (a) => n.emit("export"))
5222
+ onClick: t[2] || (t[2] = (r) => n.emit("export"))
5224
5223
  }, [
5225
- t[7] || (t[7] = l("span", { class: "wm-mm__icon" }, [
5226
- l("svg", {
5224
+ t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
5225
+ o("svg", {
5227
5226
  width: "12",
5228
5227
  height: "12",
5229
5228
  viewBox: "0 0 24 24",
@@ -5234,22 +5233,22 @@ function Ua(e, t, s, r, i, n) {
5234
5233
  "stroke-linejoin": "round",
5235
5234
  "aria-hidden": "true"
5236
5235
  }, [
5237
- l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5236
+ o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5238
5237
  ])
5239
5238
  ], -1)),
5240
- l("span", Oa, v(n.t("moreMenu.exportTranscript")), 1),
5241
- t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
5242
- ])) : k("", !0)
5243
- ])) : k("", !0),
5244
- s.canRename || s.canExport ? (c(), d("div", La)) : k("", !0),
5245
- l("div", Ia, [
5246
- l("button", {
5239
+ o("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
5240
+ t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
5241
+ ])) : b("", !0)
5242
+ ])) : b("", !0),
5243
+ s.canRename || s.canExport ? (c(), d("div", La)) : b("", !0),
5244
+ o("div", Ia, [
5245
+ o("button", {
5247
5246
  type: "button",
5248
5247
  class: "wm-mm__item",
5249
- onClick: t[3] || (t[3] = (...a) => n.toggleSound && n.toggleSound(...a))
5248
+ onClick: t[3] || (t[3] = (...r) => n.toggleSound && n.toggleSound(...r))
5250
5249
  }, [
5251
- t[10] || (t[10] = l("span", { class: "wm-mm__icon" }, [
5252
- l("svg", {
5250
+ t[10] || (t[10] = o("span", { class: "wm-mm__icon" }, [
5251
+ o("svg", {
5253
5252
  width: "12",
5254
5253
  height: "12",
5255
5254
  viewBox: "0 0 24 24",
@@ -5260,28 +5259,28 @@ function Ua(e, t, s, r, i, n) {
5260
5259
  "stroke-linejoin": "round",
5261
5260
  "aria-hidden": "true"
5262
5261
  }, [
5263
- l("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5264
- l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5262
+ o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5263
+ o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5265
5264
  ])
5266
5265
  ], -1)),
5267
- l("span", Ea, v(n.t("moreMenu.sound")), 1),
5268
- l("span", {
5269
- class: O(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5266
+ o("span", Ea, v(n.t("moreMenu.sound")), 1),
5267
+ o("span", {
5268
+ class: R(["wm-mm__toggle", { "wm-mm__toggle--on": a.soundOn }])
5270
5269
  }, [...t[9] || (t[9] = [
5271
- l("span", { class: "wm-mm__knob" }, null, -1)
5270
+ o("span", { class: "wm-mm__knob" }, null, -1)
5272
5271
  ])], 2)
5273
5272
  ])
5274
5273
  ]),
5275
- t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
5276
- l("div", Ba, [
5274
+ t[13] || (t[13] = o("div", { class: "wm-mm__sep" }, null, -1)),
5275
+ o("div", Ba, [
5277
5276
  s.statusUrl ? (c(), d("button", {
5278
5277
  key: 0,
5279
5278
  type: "button",
5280
5279
  class: "wm-mm__item",
5281
- onClick: t[4] || (t[4] = (a) => n.emit("status"))
5280
+ onClick: t[4] || (t[4] = (r) => n.emit("status"))
5282
5281
  }, [
5283
- t[11] || (t[11] = l("span", { class: "wm-mm__icon" }, [
5284
- l("svg", {
5282
+ t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
5283
+ o("svg", {
5285
5284
  width: "12",
5286
5285
  height: "12",
5287
5286
  viewBox: "0 0 24 24",
@@ -5292,19 +5291,19 @@ function Ua(e, t, s, r, i, n) {
5292
5291
  "stroke-linejoin": "round",
5293
5292
  "aria-hidden": "true"
5294
5293
  }, [
5295
- l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5294
+ o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5296
5295
  ])
5297
5296
  ], -1)),
5298
- l("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
5299
- ])) : k("", !0),
5297
+ o("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
5298
+ ])) : b("", !0),
5300
5299
  s.helpUrl ? (c(), d("button", {
5301
5300
  key: 1,
5302
5301
  type: "button",
5303
5302
  class: "wm-mm__item",
5304
- onClick: t[5] || (t[5] = (a) => n.emit("help"))
5303
+ onClick: t[5] || (t[5] = (r) => n.emit("help"))
5305
5304
  }, [
5306
- t[12] || (t[12] = l("span", { class: "wm-mm__icon" }, [
5307
- l("svg", {
5305
+ t[12] || (t[12] = o("span", { class: "wm-mm__icon" }, [
5306
+ o("svg", {
5308
5307
  width: "12",
5309
5308
  height: "12",
5310
5309
  viewBox: "0 0 24 24",
@@ -5315,16 +5314,16 @@ function Ua(e, t, s, r, i, n) {
5315
5314
  "stroke-linejoin": "round",
5316
5315
  "aria-hidden": "true"
5317
5316
  }, [
5318
- l("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5317
+ 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" })
5319
5318
  ])
5320
5319
  ], -1)),
5321
- l("span", Na, v(n.t("moreMenu.helpCenter")), 1)
5322
- ])) : k("", !0)
5320
+ o("span", Da, v(n.t("moreMenu.helpCenter")), 1)
5321
+ ])) : b("", !0)
5323
5322
  ])
5324
5323
  ])
5325
5324
  ]);
5326
5325
  }
5327
- const Da = /* @__PURE__ */ N(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5326
+ const Ua = /* @__PURE__ */ P(Sa, [["render", Na], ["__scopeId", "data-v-4cf6d578"]]), ja = {
5328
5327
  name: "WmRenameDialog",
5329
5328
  inject: {
5330
5329
  // Translator shared by the Messenger shell; French fallback when
@@ -5371,22 +5370,22 @@ const Da = /* @__PURE__ */ N(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578
5371
5370
  role: "dialog",
5372
5371
  "aria-modal": "true"
5373
5372
  }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], Ka = { class: "wm-dialog__body" }, Wa = ["placeholder"], $a = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5374
- function Ya(e, t, s, r, i, n) {
5373
+ function Ya(e, t, s, i, a, n) {
5375
5374
  return c(), d("div", Fa, [
5376
- l("div", {
5375
+ o("div", {
5377
5376
  class: "wm-dialog__scrim",
5378
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5377
+ onClick: t[0] || (t[0] = (r) => e.$emit("close"))
5379
5378
  }),
5380
- l("div", Ha, [
5381
- l("div", za, [
5382
- l("div", qa, v(s.title || n.t("rename.title")), 1),
5383
- l("button", {
5379
+ o("div", Ha, [
5380
+ o("div", za, [
5381
+ o("div", qa, v(s.title || n.t("rename.title")), 1),
5382
+ o("button", {
5384
5383
  type: "button",
5385
5384
  class: "wm-dialog__close",
5386
5385
  "aria-label": n.t("common.close"),
5387
- onClick: t[1] || (t[1] = (a) => e.$emit("close"))
5386
+ onClick: t[1] || (t[1] = (r) => e.$emit("close"))
5388
5387
  }, [...t[7] || (t[7] = [
5389
- l("svg", {
5388
+ o("svg", {
5390
5389
  width: "12",
5391
5390
  height: "12",
5392
5391
  viewBox: "0 0 24 24",
@@ -5397,43 +5396,43 @@ function Ya(e, t, s, r, i, n) {
5397
5396
  "stroke-linejoin": "round",
5398
5397
  "aria-hidden": "true"
5399
5398
  }, [
5400
- l("path", { d: "M18 6L6 18M6 6l12 12" })
5399
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
5401
5400
  ], -1)
5402
5401
  ])], 8, Va)
5403
5402
  ]),
5404
- l("div", Ka, [
5405
- G(l("input", {
5403
+ o("div", Ka, [
5404
+ G(o("input", {
5406
5405
  ref: "input",
5407
- "onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
5406
+ "onUpdate:modelValue": t[2] || (t[2] = (r) => a.value = r),
5408
5407
  type: "text",
5409
5408
  class: "wm-dialog__input",
5410
5409
  placeholder: s.placeholder || n.t("rename.placeholder"),
5411
5410
  maxlength: 120,
5412
5411
  onKeydown: [
5413
- t[3] || (t[3] = ge(J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
5414
- t[4] || (t[4] = ge(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5412
+ t[3] || (t[3] = ge(J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]), ["enter"])),
5413
+ t[4] || (t[4] = ge(J((r) => e.$emit("close"), ["prevent"]), ["esc"]))
5415
5414
  ]
5416
5415
  }, null, 40, Wa), [
5417
- [te, i.value]
5416
+ [te, a.value]
5418
5417
  ])
5419
5418
  ]),
5420
- l("div", $a, [
5421
- l("button", {
5419
+ o("div", $a, [
5420
+ o("button", {
5422
5421
  type: "button",
5423
5422
  class: "wm-dialog__btn",
5424
- onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5423
+ onClick: t[5] || (t[5] = (r) => e.$emit("close"))
5425
5424
  }, v(n.t("common.cancel")), 1),
5426
- l("button", {
5425
+ o("button", {
5427
5426
  type: "button",
5428
5427
  class: "wm-dialog__btn wm-dialog__btn--primary",
5429
5428
  disabled: !n.canSubmit,
5430
- onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
5429
+ onClick: t[6] || (t[6] = (...r) => n.onSubmit && n.onSubmit(...r))
5431
5430
  }, v(n.t("common.save")), 9, Ga)
5432
5431
  ])
5433
5432
  ])
5434
5433
  ]);
5435
5434
  }
5436
- const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", Xa = {
5435
+ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", Xa = {
5437
5436
  name: "Messenger",
5438
5437
  components: {
5439
5438
  Launcher: qt,
@@ -5443,10 +5442,10 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5443
5442
  MessageList: ri,
5444
5443
  Composer: Ci,
5445
5444
  SuggestionChips: Mi,
5446
- ApprovalCard: Ui,
5445
+ ApprovalCard: Ni,
5447
5446
  FormCard: da,
5448
5447
  Feedback: Aa,
5449
- MoreMenu: Da,
5448
+ MoreMenu: Ua,
5450
5449
  RenameDialog: Ja
5451
5450
  },
5452
5451
  mixins: [
@@ -5609,9 +5608,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5609
5608
  // so the choice applies immediately, before the boot round-trip
5610
5609
  // that materializes `state.customer` has completed.
5611
5610
  customerLanguage() {
5612
- var s, r, i, n;
5613
- const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((r = e.values) == null ? void 0 : r.language));
5614
- return t || ((n = (i = this.context) == null ? void 0 : i.customer) == null ? void 0 : n.language) || "";
5611
+ var s, i, a, n;
5612
+ const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((i = e.values) == null ? void 0 : i.language));
5613
+ return t || ((n = (a = this.context) == null ? void 0 : a.customer) == null ? void 0 : n.language) || "";
5615
5614
  },
5616
5615
  // Resolved UI language, by priority:
5617
5616
  // 1. explicit `language` prop (consumer override)
@@ -5658,33 +5657,33 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5658
5657
  drawerConversations() {
5659
5658
  var s;
5660
5659
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
5661
- return this.allConversations.map((r) => {
5662
- var b;
5663
- const i = e[r.id] || [], n = Y(r.last_read_message_id);
5664
- let a = 0, o = null;
5665
- for (let y = i.length - 1; y >= 0; y--) {
5666
- const T = i[y];
5667
- if (!T) continue;
5668
- if (((b = T.author) == null ? void 0 : b.type) === "user") break;
5669
- const E = Y(T.id);
5660
+ return this.allConversations.map((i) => {
5661
+ var k;
5662
+ const a = e[i.id] || [], n = Y(i.last_read_message_id);
5663
+ let r = 0, l = null;
5664
+ for (let y = a.length - 1; y >= 0; y--) {
5665
+ const M = a[y];
5666
+ if (!M) continue;
5667
+ if (((k = M.author) == null ? void 0 : k.type) === "user") break;
5668
+ const E = Y(M.id);
5670
5669
  if (E != null) {
5671
5670
  if (n != null && E <= n) break;
5672
- t[T.id] !== 0 && (!o && T.author && (o = T.author), a++);
5671
+ t[M.id] !== 0 && (!l && M.author && (l = M.author), r++);
5673
5672
  }
5674
5673
  }
5675
- if (!i.length) {
5676
- const y = Y(r.last_message_id);
5677
- y != null && (n == null || y > n) && (a = 1, o = r.last_message_author || null);
5674
+ if (!a.length) {
5675
+ const y = Y(i.last_message_id);
5676
+ y != null && (n == null || y > n) && (r = 1, l = i.last_message_author || null);
5678
5677
  }
5679
- const f = i.filter(
5678
+ const f = a.filter(
5680
5679
  (y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
5681
5680
  );
5682
5681
  return {
5683
- ...r,
5684
- _preview: _t(r, f),
5685
- _unread: a > 0,
5686
- _unreadCount: a,
5687
- _lastAuthor: o
5682
+ ...i,
5683
+ _preview: _t(i, f),
5684
+ _unread: r > 0,
5685
+ _unreadCount: r,
5686
+ _lastAuthor: l
5688
5687
  };
5689
5688
  });
5690
5689
  },
@@ -5706,7 +5705,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5706
5705
  unread: !!s._unread,
5707
5706
  author: s._lastAuthor || null,
5708
5707
  _ts: Be(s, e[s.id] || [])
5709
- })).sort((s, r) => s._ts < r._ts ? 1 : s._ts > r._ts ? -1 : 0);
5708
+ })).sort((s, i) => s._ts < i._ts ? 1 : s._ts > i._ts ? -1 : 0);
5710
5709
  },
5711
5710
  // Unread threads (one entry per conv with unseen agent/human
5712
5711
  // activity), freshest first. Each entry carries everything the
@@ -5715,19 +5714,19 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5715
5714
  latestUnreads() {
5716
5715
  var s;
5717
5716
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
5718
- for (const r of this.drawerConversations) {
5719
- if (!r._unread) continue;
5720
- const i = Be(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
5717
+ for (const i of this.drawerConversations) {
5718
+ if (!i._unread) continue;
5719
+ const a = Be(i, e[i.id] || []), n = i._lastAuthor, r = !n || n.type === "agent_ia", l = (n == null ? void 0 : n.name) || (r ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (r ? this.agentAvatarUrl : null);
5721
5720
  t.push({
5722
- convId: r.id,
5723
- preview: r._preview || this.t("notification.youHaveNewMessage"),
5724
- ts: i,
5725
- count: r._unreadCount || 1,
5726
- senderName: o,
5721
+ convId: i.id,
5722
+ preview: i._preview || this.t("notification.youHaveNewMessage"),
5723
+ ts: a,
5724
+ count: i._unreadCount || 1,
5725
+ senderName: l,
5727
5726
  senderAvatarUrl: f
5728
5727
  });
5729
5728
  }
5730
- return t.sort((r, i) => r.ts < i.ts ? 1 : r.ts > i.ts ? -1 : 0), t;
5729
+ return t.sort((i, a) => i.ts < a.ts ? 1 : i.ts > a.ts ? -1 : 0), t;
5731
5730
  },
5732
5731
  // Notification cards shown in the closed-launcher stack: the unread
5733
5732
  // threads above, minus any the user has dismissed (×) for their
@@ -5763,7 +5762,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5763
5762
  var s;
5764
5763
  const e = (s = this.widget) == null ? void 0 : s.quick_links;
5765
5764
  if (!Array.isArray(e)) return "";
5766
- const t = e.find((r) => r.icon === "status" && r.url);
5765
+ const t = e.find((i) => i.icon === "status" && i.url);
5767
5766
  return (t == null ? void 0 : t.url) || "";
5768
5767
  },
5769
5768
  helpUrl() {
@@ -5771,7 +5770,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5771
5770
  const e = (s = this.widget) == null ? void 0 : s.quick_links;
5772
5771
  if (!Array.isArray(e)) return "";
5773
5772
  const t = e.find(
5774
- (r) => (r.icon === "chat" || r.icon === "help") && r.url
5773
+ (i) => (i.icon === "chat" || i.icon === "help") && i.url
5775
5774
  );
5776
5775
  return (t == null ? void 0 : t.url) || "";
5777
5776
  },
@@ -5838,12 +5837,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5838
5837
  // Last message from a human agent in the current conversation —
5839
5838
  // used to surface the human agent's name + avatar in the header.
5840
5839
  humanMessageAuthor() {
5841
- var t, s, r;
5840
+ var t, s, i;
5842
5841
  if (!this.currentConv) return null;
5843
5842
  const e = ((t = this.s.messagesByConv) == null ? void 0 : t[this.currentConv.id]) || [];
5844
- for (let i = e.length - 1; i >= 0; i--)
5845
- if (((r = (s = e[i]) == null ? void 0 : s.author) == null ? void 0 : r.type) === "agent_human")
5846
- return e[i].author;
5843
+ for (let a = e.length - 1; a >= 0; a--)
5844
+ if (((i = (s = e[a]) == null ? void 0 : s.author) == null ? void 0 : i.type) === "agent_human")
5845
+ return e[a].author;
5847
5846
  return null;
5848
5847
  },
5849
5848
  humanAgentName() {
@@ -5891,37 +5890,37 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5891
5890
  }) : this.isWaitingHuman ? this.t("composer.agentTakingOver") : this.t("composer.placeholder");
5892
5891
  },
5893
5892
  displayedMessages() {
5894
- var i, n;
5893
+ var a, n;
5895
5894
  const e = this.currentConv;
5896
5895
  if (!e) return [];
5897
5896
  const t = this.welcomeRevealedAt[e.id] > 0 ? this.buildWelcomePrefix(e) : [];
5898
5897
  if (!e._draft) {
5899
- const a = (n = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : n[e.id];
5900
- if (!(a != null && a.loaded)) return t;
5898
+ const r = (n = (a = this.s) == null ? void 0 : a.paginationByConv) == null ? void 0 : n[e.id];
5899
+ if (!(r != null && r.loaded)) return t;
5901
5900
  }
5902
- const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
5903
- var o, f, b, y, T;
5904
- return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5901
+ const s = this.revealedAt, i = (this.s.messagesByConv[e.id] || []).filter((r) => {
5902
+ var l, f, k, y, M;
5903
+ return (r == null ? void 0 : r.type) === "action" && ((l = r == null ? void 0 : r.payload) == null ? void 0 : l.state) === "pending" || he(r) && !(s[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((f = r == null ? void 0 : r.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = r == null ? void 0 : r.payload) == null ? void 0 : k.attachments) && r.payload.attachments.length || (y = r == null ? void 0 : r.metadata) != null && y.artifact || (M = r == null ? void 0 : r.metadata) != null && M.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5905
5904
  });
5906
- return t.length ? [...t, ...r] : r;
5905
+ return t.length ? [...t, ...i] : i;
5907
5906
  },
5908
5907
  // True whenever we should show the "typing" indicator at the bottom
5909
5908
  // of the list: either the LLM is actively streaming tokens, or one
5910
5909
  // or more agent messages are queued and waiting for their reveal
5911
5910
  // slot to fire.
5912
5911
  streamingActive() {
5913
- var s, r, i;
5912
+ var s, i, a;
5914
5913
  const e = this.currentConv;
5915
- return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((i = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : i[e.id]) || []).some(
5914
+ return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((a = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : a[e.id]) || []).some(
5916
5915
  (n) => he(n) && !(this.revealedAt[n.id] > 0)
5917
5916
  ) : !1;
5918
5917
  },
5919
5918
  // Internal: the raw persisted list for the current conversation. We
5920
5919
  // watch this to detect new agent messages that need to be paced.
5921
5920
  currentConvMessages() {
5922
- var t, s, r;
5921
+ var t, s, i;
5923
5922
  const e = (t = this.currentConv) == null ? void 0 : t.id;
5924
- return e ? ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e]) || [] : [];
5923
+ return e ? ((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e]) || [] : [];
5925
5924
  },
5926
5925
  pendingApproval() {
5927
5926
  return !this.currentConv || !this.store || this.actionInFlight ? null : this.store.getPendingApproval(this.currentConv.id);
@@ -5930,13 +5929,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5930
5929
  // `metadata.resolution_request` dont les callbacks ne sont pas encore
5931
5930
  // consommés (le serveur les clear au clic) et sans clic optimiste en vol.
5932
5931
  pendingResolution() {
5933
- var t, s, r, i, n;
5932
+ var t, s, i, a, n;
5934
5933
  if (!this.currentConv || !this.store || this.actionInFlight || this.pendingApproval) return null;
5935
5934
  const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
5936
- for (let a = e.length - 1; a >= 0; a--) {
5937
- const o = e[a];
5938
- if ((r = o == null ? void 0 : o.metadata) != null && r.resolution_request)
5939
- return !Array.isArray(o.callbacks) || !o.callbacks.length || (n = (i = this.s) == null ? void 0 : i.awaitingCallback) != null && n[o.id] ? null : o;
5935
+ for (let r = e.length - 1; r >= 0; r--) {
5936
+ const l = e[r];
5937
+ if ((i = l == null ? void 0 : l.metadata) != null && i.resolution_request)
5938
+ return !Array.isArray(l.callbacks) || !l.callbacks.length || (n = (a = this.s) == null ? void 0 : a.awaitingCallback) != null && n[l.id] ? null : l;
5940
5939
  }
5941
5940
  return null;
5942
5941
  },
@@ -5952,14 +5951,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5952
5951
  return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((s = this.pendingApproval) == null ? void 0 : s.text_md) || this.t("action.title");
5953
5952
  },
5954
5953
  approvalDetail() {
5955
- var r, i, n, a, o, f;
5956
- const e = (n = (i = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : i.pending) == null ? void 0 : n.user_explanation;
5954
+ var i, a, n, r, l, f;
5955
+ const e = (n = (a = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : a.pending) == null ? void 0 : n.user_explanation;
5957
5956
  if (typeof e == "string" && e.trim())
5958
5957
  return e.trim();
5959
- const t = (f = (o = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : o.pending) == null ? void 0 : f.prepared_params;
5958
+ const t = (f = (l = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : l.pending) == null ? void 0 : f.prepared_params;
5960
5959
  if (!t || typeof t != "object") return "";
5961
5960
  const s = Object.entries(t);
5962
- return s.length ? s.slice(0, 2).map(([b, y]) => `${b}: ${y}`).join(" · ") : "";
5961
+ return s.length ? s.slice(0, 2).map(([k, y]) => `${k}: ${y}`).join(" · ") : "";
5963
5962
  },
5964
5963
  actionInFlight() {
5965
5964
  var e, t;
@@ -5979,9 +5978,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5979
5978
  // welcome bubble is client-side only and intentionally not
5980
5979
  // counted here.
5981
5980
  conversationIsEmpty() {
5982
- var s, r;
5981
+ var s, i;
5983
5982
  const e = this.currentConv;
5984
- return e ? e._draft ? !0 : (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).length === 0 : !1;
5983
+ return e ? e._draft ? !0 : (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).length === 0 : !1;
5985
5984
  },
5986
5985
  // Maps `widget.starter_prompts` ({ title, message }) into the
5987
5986
  // SuggestionChips shape so they render alongside / in place of
@@ -5994,14 +5993,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5994
5993
  const e = (s = this.widget) == null ? void 0 : s.starter_prompts;
5995
5994
  if (!Array.isArray(e)) return [];
5996
5995
  const t = [];
5997
- for (const r of e) {
5998
- if (!r || typeof r != "object") continue;
5999
- const i = typeof r.title == "string" ? r.title.trim() : "";
6000
- if (!i) continue;
6001
- const n = typeof r.message == "string" ? r.message.trim() : "";
5996
+ for (const i of e) {
5997
+ if (!i || typeof i != "object") continue;
5998
+ const a = typeof i.title == "string" ? i.title.trim() : "";
5999
+ if (!a) continue;
6000
+ const n = typeof i.message == "string" ? i.message.trim() : "";
6002
6001
  t.push({
6003
- label: i,
6004
- text: n || i,
6002
+ label: a,
6003
+ text: n || a,
6005
6004
  kind: "starter"
6006
6005
  });
6007
6006
  }
@@ -6022,17 +6021,17 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6022
6021
  return e ? this.feedbackDone ? !0 : e.status !== "resolved" ? !1 : !((t = e.metadata) != null && t.feedback) : !1;
6023
6022
  },
6024
6023
  floatVisible() {
6025
- return this.approvalReady || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
6024
+ return this.approvalReady || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
6026
6025
  },
6027
6026
  dateLabel() {
6028
- var s, r, i;
6027
+ var s, i, a;
6029
6028
  const e = this.currentConv;
6030
6029
  let t = /* @__PURE__ */ new Date();
6031
6030
  if (e) {
6032
- const a = ((i = (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).find((o) => o == null ? void 0 : o.created_at)) == null ? void 0 : i.created_at) || e.created_at;
6033
- if (a) {
6034
- const o = new Date(a);
6035
- Number.isNaN(o.getTime()) || (t = o);
6031
+ const r = ((a = (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : a.created_at) || e.created_at;
6032
+ if (r) {
6033
+ const l = new Date(r);
6034
+ Number.isNaN(l.getTime()) || (t = l);
6036
6035
  }
6037
6036
  }
6038
6037
  return this.t("messageList.today", {
@@ -6044,8 +6043,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6044
6043
  // history available, nothing loading) so the loader stays inert
6045
6044
  // until `openConversation` has populated the entry.
6046
6045
  paginationState() {
6047
- var s, r, i;
6048
- const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (i = (r = this.s) == null ? void 0 : r.paginationByConv) == null ? void 0 : i[e] : null;
6046
+ var s, i, a;
6047
+ const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (a = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : a[e] : null;
6049
6048
  return {
6050
6049
  loading: !!(t != null && t.loading),
6051
6050
  hasMore: !!(t != null && t.nextCursor)
@@ -6060,13 +6059,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6060
6059
  // ts comparison in `launcherPeeks`.
6061
6060
  latestUnreads: {
6062
6061
  handler(e) {
6063
- const t = new Set(e.map((a) => a.convId)), s = this.dismissedPeeks || {}, r = Object.keys(s);
6064
- if (!r.length) return;
6065
- const i = {};
6062
+ const t = new Set(e.map((r) => r.convId)), s = this.dismissedPeeks || {}, i = Object.keys(s);
6063
+ if (!i.length) return;
6064
+ const a = {};
6066
6065
  let n = !1;
6067
- for (const a of r)
6068
- t.has(a) ? i[a] = s[a] : n = !0;
6069
- n && (this.dismissedPeeks = i);
6066
+ for (const r of i)
6067
+ t.has(r) ? a[r] = s[r] : n = !0;
6068
+ n && (this.dismissedPeeks = a);
6070
6069
  },
6071
6070
  deep: !0
6072
6071
  },
@@ -6141,9 +6140,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6141
6140
  }
6142
6141
  },
6143
6142
  async mounted() {
6144
- if (typeof document < "u" && !document.getElementById(Ue)) {
6143
+ if (typeof document < "u" && !document.getElementById(Ne)) {
6145
6144
  const e = document.createElement("style");
6146
- e.id = Ue, e.textContent = rt, document.head.appendChild(e);
6145
+ e.id = Ne, e.textContent = rt, document.head.appendChild(e);
6147
6146
  }
6148
6147
  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());
6149
6148
  },
@@ -6179,8 +6178,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6179
6178
  const t = e == null ? void 0 : e.data;
6180
6179
  if (!(!t || typeof t != "object")) {
6181
6180
  if (t.type === "UPDATE") {
6182
- this.transport && t.payload && this.transport.update(t.payload).catch((r) => {
6183
- console.warn("[messenger] update failed", r);
6181
+ this.transport && t.payload && this.transport.update(t.payload).catch((i) => {
6182
+ console.warn("[messenger] update failed", i);
6184
6183
  });
6185
6184
  return;
6186
6185
  }
@@ -6188,8 +6187,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6188
6187
  this.transport && t.payload && this.transport.context(t.payload);
6189
6188
  return;
6190
6189
  }
6191
- t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((r) => {
6192
- console.warn("[messenger] eager boot failed", r);
6190
+ t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((i) => {
6191
+ console.warn("[messenger] eager boot failed", i);
6193
6192
  }));
6194
6193
  }
6195
6194
  },
@@ -6209,12 +6208,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6209
6208
  return;
6210
6209
  }
6211
6210
  try {
6212
- await this.waitForParentInit(), this.transport = Oe(
6211
+ await this.waitForParentInit(), this.transport = Re(
6213
6212
  Ze({
6214
6213
  baseUrl: this.baseUrl,
6215
6214
  widgetId: this.widgetId
6216
6215
  })
6217
- ), this.store = Oe(st(this.transport)), this.hydrateNotifPref();
6216
+ ), this.store = Re(st(this.transport)), this.hydrateNotifPref();
6218
6217
  const e = this.parentVariables || this.context || null;
6219
6218
  if (await this.store.start({
6220
6219
  origin: this.parentOrigin,
@@ -6223,8 +6222,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6223
6222
  variables: e && typeof e == "object" ? e : void 0
6224
6223
  }), e && typeof e == "object") {
6225
6224
  const t = {};
6226
- for (const [s, r] of Object.entries(e))
6227
- s !== "customer" && r && typeof r == "object" && !Array.isArray(r) && (t[s] = r);
6225
+ for (const [s, i] of Object.entries(e))
6226
+ s !== "customer" && i && typeof i == "object" && !Array.isArray(i) && (t[s] = i);
6228
6227
  Object.keys(t).length > 0 && this.transport.context(t);
6229
6228
  }
6230
6229
  this.setupLiveReveal();
@@ -6250,12 +6249,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6250
6249
  return;
6251
6250
  }
6252
6251
  this.floatRO = new ResizeObserver((s) => {
6253
- const r = s[0];
6254
- if (!r) return;
6255
- const i = Math.ceil(r.contentRect.height + 8);
6256
- i !== this.floatHeight && (this.floatHeight = i, this.$nextTick(() => {
6257
- var n, a;
6258
- (a = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || a.call(n);
6252
+ const i = s[0];
6253
+ if (!i) return;
6254
+ const a = Math.ceil(i.contentRect.height + 8);
6255
+ a !== this.floatHeight && (this.floatHeight = a, this.$nextTick(() => {
6256
+ var n, r;
6257
+ (r = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || r.call(n);
6259
6258
  }));
6260
6259
  }), this.floatRO.observe(t);
6261
6260
  }
@@ -6309,37 +6308,37 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6309
6308
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6310
6309
  },
6311
6310
  sendCurrentLauncherSize() {
6312
- var y, T, E, A, q, M, U;
6311
+ var y, M, E, A, q, T, N;
6313
6312
  if (this.isOpen) return;
6314
- const e = (T = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : T.call(y, ".wm-launcherWrap");
6313
+ const e = (M = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : M.call(y, ".wm-launcherWrap");
6315
6314
  if (!e) return;
6316
6315
  const t = e.getBoundingClientRect();
6317
6316
  if (!t.width || !t.height) return;
6318
- const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), o = (U = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : U.call(M, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6319
- let b = null;
6317
+ const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, i = 16, a = Math.ceil(t.width), n = Math.ceil(t.height), r = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (N = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : N.call(T, ".wm-peek"), f = l && l.length ? l[l.length - 1] : null;
6318
+ let k = null;
6320
6319
  if (f) {
6321
- const D = f.getBoundingClientRect();
6322
- b = {
6323
- width: Math.ceil(D.width),
6324
- height: Math.ceil(D.height),
6325
- rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
6326
- bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
6320
+ const U = f.getBoundingClientRect();
6321
+ k = {
6322
+ width: Math.ceil(U.width),
6323
+ height: Math.ceil(U.height),
6324
+ rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
6325
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
6327
6326
  };
6328
6327
  }
6329
6328
  this.notifyParentResize("closed", {
6330
- width: i + r,
6331
- height: n + r,
6332
- launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
6333
- launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
6329
+ width: a + i,
6330
+ height: n + i,
6331
+ launcherWidth: (r == null ? void 0 : r.offsetWidth) || null,
6332
+ launcherHeight: (r == null ? void 0 : r.offsetHeight) || null,
6334
6333
  launcherHovered: this.launcherHovered,
6335
- peek: b,
6334
+ peek: k,
6336
6335
  peekHovered: this.launcherHovered && s
6337
6336
  });
6338
6337
  },
6339
6338
  observeLauncherSize() {
6340
- var s, r;
6339
+ var s, i;
6341
6340
  if (typeof ResizeObserver > "u") return;
6342
- const e = (r = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : r.call(s, ".wm-launcherWrap");
6341
+ const e = (i = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : i.call(s, ".wm-launcherWrap");
6343
6342
  if (!e) return;
6344
6343
  this._launcherRo && this._launcherRo.disconnect();
6345
6344
  const t = new ResizeObserver(() => {
@@ -6350,9 +6349,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6350
6349
  // Opening straight from a notification card: land on that card's
6351
6350
  // thread rather than whatever was last active.
6352
6351
  async openFromPeek(e) {
6353
- var s, r;
6352
+ var s, i;
6354
6353
  const t = e || ((s = this.latestUnreads[0]) == null ? void 0 : s.convId);
6355
- t && t !== ((r = this.currentConv) == null ? void 0 : r.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
6354
+ t && t !== ((i = this.currentConv) == null ? void 0 : i.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
6356
6355
  },
6357
6356
  // Stamp the dismissed batch ts for a single conv so its card
6358
6357
  // disappears from the stack until a fresher message arrives.
@@ -6460,17 +6459,17 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6460
6459
  ...this.welcomeRevealedAt,
6461
6460
  [e]: 0
6462
6461
  };
6463
- const i = this.revealPacing, n = t.trim().length, a = Math.min(
6464
- i.maxTypingMs,
6465
- Math.max(i.minTypingMs, n * i.msPerChar)
6466
- ), o = i.firstRevealDelayMs + a, f = setTimeout(() => {
6462
+ const a = this.revealPacing, n = t.trim().length, r = Math.min(
6463
+ a.maxTypingMs,
6464
+ Math.max(a.minTypingMs, n * a.msPerChar)
6465
+ ), l = a.firstRevealDelayMs + r, f = setTimeout(() => {
6467
6466
  this.welcomeRevealedAt = {
6468
6467
  ...this.welcomeRevealedAt,
6469
6468
  [e]: Date.now()
6470
6469
  };
6471
- const b = { ...this.welcomeRevealTimers };
6472
- delete b[e], this.welcomeRevealTimers = b;
6473
- }, o);
6470
+ const k = { ...this.welcomeRevealTimers };
6471
+ delete k[e], this.welcomeRevealTimers = k;
6472
+ }, l);
6474
6473
  this.welcomeRevealTimers = {
6475
6474
  ...this.welcomeRevealTimers,
6476
6475
  [e]: f
@@ -6500,10 +6499,10 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6500
6499
  this.draftConv = null, this.activeConvId = e.id, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = t;
6501
6500
  try {
6502
6501
  await this.store.openConversation(e.id);
6503
- } catch (r) {
6504
- console.error("[ww-messenger] open conv failed", r);
6502
+ } catch (i) {
6503
+ console.error("[ww-messenger] open conv failed", i);
6505
6504
  }
6506
- const s = this.allConversations.find((r) => r.id === e.id);
6505
+ const s = this.allConversations.find((i) => i.id === e.id);
6507
6506
  s && this.markConvRead(s);
6508
6507
  },
6509
6508
  async onMoreAction(e) {
@@ -6547,8 +6546,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6547
6546
  if (!(!s || s === t.name))
6548
6547
  try {
6549
6548
  await this.store.patchConversation(t.id, { name: s });
6550
- } catch (r) {
6551
- console.error("[ww-messenger] rename failed", r);
6549
+ } catch (i) {
6550
+ console.error("[ww-messenger] rename failed", i);
6552
6551
  }
6553
6552
  },
6554
6553
  // ── Send / suggestion / form / attach / feedback ────────────────
@@ -6556,14 +6555,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6556
6555
  let t = this.currentConv;
6557
6556
  if (!t && (this.startConv(), t = this.currentConv, !t) || t._draft && (t = await this.ensureRealConv(), !t))
6558
6557
  return;
6559
- const s = t.id, r = this.pendingAttachments.slice();
6558
+ const s = t.id, i = this.pendingAttachments.slice();
6560
6559
  this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
6561
- const i = r.map((n) => {
6562
- const { previewUrl: a, ...o } = n;
6563
- return o;
6560
+ const a = i.map((n) => {
6561
+ const { previewUrl: r, ...l } = n;
6562
+ return l;
6564
6563
  });
6565
6564
  await this.store.send(s, e, {
6566
- attachments: i.length ? i : void 0
6565
+ attachments: a.length ? a : void 0
6567
6566
  });
6568
6567
  },
6569
6568
  async onSuggestion(e) {
@@ -6588,8 +6587,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6588
6587
  if (!(t != null && t.form)) return;
6589
6588
  const s = ht(t.form, e, this.translator);
6590
6589
  if (!s) return;
6591
- let r = this.currentConv;
6592
- r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
6590
+ let i = this.currentConv;
6591
+ i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, s, {
6593
6592
  metadata: {
6594
6593
  artifact: mt(
6595
6594
  t.form,
@@ -6617,23 +6616,23 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6617
6616
  var t, s;
6618
6617
  if (!(!e || !this.transport))
6619
6618
  try {
6620
- const r = await this.transport.uploadAttachment(e), i = (r == null ? void 0 : r.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((r == null ? void 0 : r.mime_type) || "").toLowerCase().startsWith("image/");
6619
+ const i = await this.transport.uploadAttachment(e), a = (i == null ? void 0 : i.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((i == null ? void 0 : i.mime_type) || "").toLowerCase().startsWith("image/");
6621
6620
  let n = null;
6622
- if (i)
6621
+ if (a)
6623
6622
  try {
6624
- n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, r.path)) || null;
6623
+ n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, i.path)) || null;
6625
6624
  } catch {
6626
6625
  }
6627
6626
  this.pendingAttachments.push({
6628
- type: r.type || "file",
6629
- path: r.path,
6627
+ type: i.type || "file",
6628
+ path: i.path,
6630
6629
  name: e.name || this.t("attachment.fileFallbackName"),
6631
6630
  mime_type: e.type,
6632
6631
  size_bytes: e.size,
6633
6632
  previewUrl: n
6634
6633
  });
6635
- } catch (r) {
6636
- console.error("[ww-messenger] attachment upload failed", r);
6634
+ } catch (i) {
6635
+ console.error("[ww-messenger] attachment upload failed", i);
6637
6636
  }
6638
6637
  },
6639
6638
  // Délégation des clics sur les liens `<a href="#...">` rendus dans le
@@ -6728,41 +6727,41 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6728
6727
  role: "status",
6729
6728
  "aria-live": "polite"
6730
6729
  }, po = { class: "wm-ended__lbl" };
6731
- function vo(e, t, s, r, i, n) {
6732
- const a = B("Launcher"), o = B("Header"), f = B("History"), b = B("Onboarding"), y = B("MessageList"), T = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), U = B("MoreMenu"), D = B("RenameDialog");
6730
+ function vo(e, t, s, i, a, n) {
6731
+ const r = B("Launcher"), l = B("Header"), f = B("History"), k = B("Onboarding"), y = B("MessageList"), M = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), T = B("Composer"), N = B("MoreMenu"), U = B("RenameDialog");
6733
6732
  return c(), d("div", {
6734
- class: O(["wm-root", `wm-root--${s.displayMode}`]),
6733
+ class: R(["wm-root", `wm-root--${s.displayMode}`]),
6735
6734
  style: z(n.rootStyle)
6736
6735
  }, [
6737
- !i.isOpen && !n.isEmbedded ? (c(), P(a, {
6736
+ !a.isOpen && !n.isEmbedded ? (c(), D(r, {
6738
6737
  key: 0,
6739
6738
  "unread-count": n.unreadCount,
6740
6739
  peeks: n.launcherPeeks,
6741
6740
  onOpen: n.openFromPeek,
6742
6741
  onDismiss: n.dismissPeek,
6743
6742
  onHover: n.onLauncherHover
6744
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
6745
- i.isOpen || n.isEmbedded ? (c(), d("section", {
6743
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6744
+ a.isOpen || n.isEmbedded ? (c(), d("section", {
6746
6745
  key: 1,
6747
- class: O([
6746
+ class: R([
6748
6747
  "wm-panel",
6749
6748
  `wm-panel--${s.displayMode}`,
6750
6749
  { "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
6751
6750
  ]),
6752
- style: z(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6751
+ style: z(a.floatHeight ? { "--wm-float-h": a.floatHeight + "px" } : null),
6753
6752
  role: "dialog",
6754
6753
  "aria-label": "Messenger",
6755
6754
  onClick: t[7] || (t[7] = (...L) => n.onPanelClick && n.onPanelClick(...L))
6756
6755
  }, [
6757
6756
  !n.ready && !n.error ? (c(), d("div", Qa, [
6758
- n.isEmbedded ? k("", !0) : (c(), d("button", {
6757
+ n.isEmbedded ? b("", !0) : (c(), d("button", {
6759
6758
  key: 0,
6760
6759
  type: "button",
6761
6760
  class: "wm-loading__close",
6762
6761
  "aria-label": n.t("loading.minimize"),
6763
6762
  onClick: t[0] || (t[0] = (...L) => n.close && n.close(...L))
6764
6763
  }, [...t[8] || (t[8] = [
6765
- l("svg", {
6764
+ o("svg", {
6766
6765
  width: "13",
6767
6766
  height: "13",
6768
6767
  viewBox: "0 0 24 24",
@@ -6773,22 +6772,22 @@ function vo(e, t, s, r, i, n) {
6773
6772
  "stroke-linejoin": "round",
6774
6773
  "aria-hidden": "true"
6775
6774
  }, [
6776
- l("path", { d: "M18 6L6 18M6 6l12 12" })
6775
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
6777
6776
  ], -1)
6778
6777
  ])], 8, Za)),
6779
- t[9] || (t[9] = l("div", {
6778
+ t[9] || (t[9] = o("div", {
6780
6779
  class: "wm-loading__spinner",
6781
6780
  "aria-hidden": "true"
6782
6781
  }, null, -1))
6783
6782
  ])) : (c(), d(I, { key: 1 }, [
6784
- K(o, {
6783
+ K(l, {
6785
6784
  title: n.headerTitle,
6786
6785
  "team-members": n.teamMembers,
6787
6786
  "response-label": n.responseLabel,
6788
6787
  "show-identity": !!n.currentConv,
6789
6788
  "show-back": n.canBack,
6790
6789
  "show-close": !n.isEmbedded,
6791
- "more-active": i.moreOpen,
6790
+ "more-active": a.moreOpen,
6792
6791
  "agent-name": n.agentName,
6793
6792
  "agent-avatar-url": n.agentAvatarUrl,
6794
6793
  onBack: n.goHome,
@@ -6796,9 +6795,9 @@ function vo(e, t, s, r, i, n) {
6796
6795
  onClose: n.close
6797
6796
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6798
6797
  n.error ? (c(), d("div", eo, [
6799
- l("div", to, [
6800
- t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
6801
- l("svg", {
6798
+ o("div", to, [
6799
+ t[10] || (t[10] = o("div", { class: "wm-state__errIcon" }, [
6800
+ o("svg", {
6802
6801
  width: "14",
6803
6802
  height: "14",
6804
6803
  viewBox: "0 0 24 24",
@@ -6809,15 +6808,15 @@ function vo(e, t, s, r, i, n) {
6809
6808
  "stroke-linejoin": "round",
6810
6809
  "aria-hidden": "true"
6811
6810
  }, [
6812
- l("path", { d: "M18 6L6 18M6 6l12 12" })
6811
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
6813
6812
  ])
6814
6813
  ], -1)),
6815
- l("div", null, [
6816
- l("div", no, v(n.t("error.connectionFailed")), 1),
6817
- l("div", so, v(n.error), 1)
6814
+ o("div", null, [
6815
+ o("div", no, v(n.t("error.connectionFailed")), 1),
6816
+ o("div", so, v(n.error), 1)
6818
6817
  ])
6819
6818
  ])
6820
- ])) : !n.currentConv && i.showHistory ? (c(), P(f, {
6819
+ ])) : !n.currentConv && a.showHistory ? (c(), D(f, {
6821
6820
  key: 1,
6822
6821
  threads: n.openThreads,
6823
6822
  onResume: n.onDrawerPick
@@ -6836,9 +6835,9 @@ function vo(e, t, s, r, i, n) {
6836
6835
  "ai-agent-avatar-url": n.agentAvatarUrl,
6837
6836
  onLoadMore: n.onLoadMore
6838
6837
  }, 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"]),
6839
- l("div", ro, [
6838
+ o("div", ro, [
6840
6839
  n.floatVisible ? (c(), d("div", io, [
6841
- n.approvalReady ? (c(), P(T, {
6840
+ n.approvalReady ? (c(), D(M, {
6842
6841
  key: 0,
6843
6842
  action: n.approvalTitle,
6844
6843
  detail: n.approvalDetail,
@@ -6846,41 +6845,34 @@ function vo(e, t, s, r, i, n) {
6846
6845
  "agent-name": n.agentName,
6847
6846
  "agent-avatar-url": n.agentAvatarUrl,
6848
6847
  onCallback: n.onApprovalCallback
6849
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingResolution ? (c(), P(T, {
6850
- key: 1,
6851
- action: n.pendingResolution.text_md,
6852
- callbacks: n.pendingResolution.callbacks,
6853
- "agent-name": n.agentName,
6854
- "agent-avatar-url": n.agentAvatarUrl,
6855
- onCallback: n.onResolutionCallback
6856
- }, null, 8, ["action", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), P(E, {
6848
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), D(E, {
6857
6849
  key: n.pendingForm.message && n.pendingForm.message.id,
6858
6850
  form: n.pendingForm.form,
6859
6851
  "agent-name": n.agentName,
6860
6852
  "agent-avatar-url": n.agentAvatarUrl,
6861
6853
  onSubmit: n.onFormSubmit
6862
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), P(A, {
6863
- key: 3,
6864
- busy: i.feedbackBusy,
6865
- done: i.feedbackDone,
6854
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), D(A, {
6855
+ key: 2,
6856
+ busy: a.feedbackBusy,
6857
+ done: a.feedbackDone,
6866
6858
  onSubmit: n.onFeedback
6867
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(q, {
6868
- key: 4,
6859
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), D(q, {
6860
+ key: 3,
6869
6861
  items: n.suggestions,
6870
6862
  onSelect: n.onSuggestion
6871
6863
  }, null, 8, ["items", "onSelect"]))
6872
- ], 512)) : k("", !0),
6864
+ ], 512)) : b("", !0),
6873
6865
  n.actionInFlight ? (c(), d("div", ao, [
6874
- t[11] || (t[11] = l("span", {
6866
+ t[11] || (t[11] = o("span", {
6875
6867
  class: "wm-actionWait__spinner",
6876
6868
  "aria-hidden": "true"
6877
6869
  }, null, -1)),
6878
- l("span", oo, v(n.t("action.inProgress", {
6870
+ o("span", oo, v(n.t("action.inProgress", {
6879
6871
  name: n.actionInFlightName
6880
6872
  })), 1)
6881
- ])) : k("", !0),
6882
- i.pendingAttachments.length ? (c(), d("div", lo, [
6883
- (c(!0), d(I, null, j(i.pendingAttachments, (L, W) => (c(), d("div", {
6873
+ ])) : b("", !0),
6874
+ a.pendingAttachments.length ? (c(), d("div", lo, [
6875
+ (c(!0), d(I, null, j(a.pendingAttachments, (L, W) => (c(), d("div", {
6884
6876
  key: L.path || W,
6885
6877
  class: "wm-attached__item"
6886
6878
  }, [
@@ -6890,8 +6882,8 @@ function vo(e, t, s, r, i, n) {
6890
6882
  src: L.previewUrl,
6891
6883
  alt: L.name
6892
6884
  }, null, 8, co)) : (c(), d("div", uo, [
6893
- t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
6894
- l("svg", {
6885
+ t[12] || (t[12] = o("span", { class: "wm-attached__fileIcon" }, [
6886
+ o("svg", {
6895
6887
  width: "16",
6896
6888
  height: "16",
6897
6889
  viewBox: "0 0 24 24",
@@ -6902,24 +6894,24 @@ function vo(e, t, s, r, i, n) {
6902
6894
  "stroke-linejoin": "round",
6903
6895
  "aria-hidden": "true"
6904
6896
  }, [
6905
- l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
6906
- l("path", { d: "M14 2v6h6" })
6897
+ o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
6898
+ o("path", { d: "M14 2v6h6" })
6907
6899
  ])
6908
6900
  ], -1)),
6909
- l("span", ho, [
6910
- l("span", mo, v(L.name), 1),
6901
+ o("span", ho, [
6902
+ o("span", mo, v(L.name), 1),
6911
6903
  n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", fo, v(n.formatAttachmentSize(
6912
6904
  L.size_bytes
6913
- )), 1)) : k("", !0)
6905
+ )), 1)) : b("", !0)
6914
6906
  ])
6915
6907
  ])),
6916
- l("button", {
6908
+ o("button", {
6917
6909
  type: "button",
6918
6910
  class: "wm-attached__remove",
6919
6911
  "aria-label": n.t("attachment.remove"),
6920
6912
  onClick: (Q) => n.removePendingAttachment(W)
6921
6913
  }, [...t[13] || (t[13] = [
6922
- l("svg", {
6914
+ o("svg", {
6923
6915
  width: "10",
6924
6916
  height: "10",
6925
6917
  viewBox: "0 0 24 24",
@@ -6930,23 +6922,23 @@ function vo(e, t, s, r, i, n) {
6930
6922
  "stroke-linejoin": "round",
6931
6923
  "aria-hidden": "true"
6932
6924
  }, [
6933
- l("path", { d: "M18 6L6 18M6 6l12 12" })
6925
+ o("path", { d: "M18 6L6 18M6 6l12 12" })
6934
6926
  ], -1)
6935
6927
  ])], 8, _o)
6936
6928
  ]))), 128))
6937
- ])) : k("", !0),
6929
+ ])) : b("", !0),
6938
6930
  n.endedBlockVisible ? (c(), d("div", go, [
6939
- l("span", po, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6940
- l("button", {
6931
+ o("span", po, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6932
+ o("button", {
6941
6933
  type: "button",
6942
6934
  class: "wm-ended__btn",
6943
6935
  onClick: t[2] || (t[2] = (L) => n.isClosed ? n.onReopen() : n.startConv())
6944
6936
  }, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
6945
- ])) : n.actionInFlight ? k("", !0) : (c(), P(M, {
6937
+ ])) : n.actionInFlight ? b("", !0) : (c(), D(T, {
6946
6938
  key: 4,
6947
6939
  ref: "composer",
6948
- modelValue: i.draft,
6949
- "onUpdate:modelValue": t[3] || (t[3] = (L) => i.draft = L),
6940
+ modelValue: a.draft,
6941
+ "onUpdate:modelValue": t[3] || (t[3] = (L) => a.draft = L),
6950
6942
  placeholder: n.composerPlaceholder,
6951
6943
  disabled: !!n.pendingApproval,
6952
6944
  "attach-label": n.t("composer.attachFile"),
@@ -6955,25 +6947,25 @@ function vo(e, t, s, r, i, n) {
6955
6947
  onAttach: n.onAttach
6956
6948
  }, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
6957
6949
  ]),
6958
- i.moreOpen ? (c(), P(U, {
6950
+ a.moreOpen ? (c(), D(N, {
6959
6951
  key: 0,
6960
6952
  "can-rename": !!n.currentConv && !n.currentConv._draft,
6961
6953
  "can-export": !!n.currentConv && !n.currentConv._draft,
6962
6954
  "sound-enabled": e.soundEnabled,
6963
6955
  "status-url": n.statusUrl,
6964
6956
  "help-url": n.helpUrl,
6965
- onClose: t[4] || (t[4] = (L) => i.moreOpen = !1),
6957
+ onClose: t[4] || (t[4] = (L) => a.moreOpen = !1),
6966
6958
  onSoundToggle: e.onSoundToggle,
6967
6959
  onAction: n.onMoreAction
6968
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
6969
- i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), P(D, {
6960
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
6961
+ a.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), D(U, {
6970
6962
  key: 1,
6971
6963
  "initial-value": n.currentConv.name || "",
6972
6964
  title: n.t("rename.dialogTitle"),
6973
- onClose: t[5] || (t[5] = (L) => i.renameDialogOpen = !1),
6965
+ onClose: t[5] || (t[5] = (L) => a.renameDialogOpen = !1),
6974
6966
  onSubmit: n.onRenameSubmit
6975
- }, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
6976
- ], 64)) : (c(), P(b, {
6967
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
6968
+ ], 64)) : (c(), D(k, {
6977
6969
  key: 2,
6978
6970
  title: n.widgetTitle,
6979
6971
  subtitle: n.widgetSubtitle,
@@ -6981,33 +6973,33 @@ function vo(e, t, s, r, i, n) {
6981
6973
  "default-icon-url": n.defaultIconUrl,
6982
6974
  "quick-links": n.quickLinks,
6983
6975
  "open-threads": n.openThreads,
6984
- busy: i.busy,
6976
+ busy: a.busy,
6985
6977
  onStart: n.startConv,
6986
6978
  onSelect: n.onQuickLink,
6987
6979
  onResume: n.onDrawerPick,
6988
- onViewHistory: t[1] || (t[1] = (L) => i.showHistory = !0)
6980
+ onViewHistory: t[1] || (t[1] = (L) => a.showHistory = !0)
6989
6981
  }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6990
- i.moreOpen && !n.currentConv ? (c(), P(U, {
6982
+ a.moreOpen && !n.currentConv ? (c(), D(N, {
6991
6983
  key: 4,
6992
6984
  "can-rename": !1,
6993
6985
  "can-export": !1,
6994
6986
  "sound-enabled": e.soundEnabled,
6995
6987
  "status-url": n.statusUrl,
6996
6988
  "help-url": n.helpUrl,
6997
- onClose: t[6] || (t[6] = (L) => i.moreOpen = !1),
6989
+ onClose: t[6] || (t[6] = (L) => a.moreOpen = !1),
6998
6990
  onSoundToggle: e.onSoundToggle,
6999
6991
  onAction: n.onMoreAction
7000
- }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
6992
+ }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
7001
6993
  ], 64))
7002
- ], 6)) : k("", !0)
6994
+ ], 6)) : b("", !0)
7003
6995
  ], 6);
7004
6996
  }
7005
- const bo = /* @__PURE__ */ N(Xa, [["render", vo], ["__scopeId", "data-v-441d76b9"]]), ko = "0.5.78";
6997
+ const bo = /* @__PURE__ */ P(Xa, [["render", vo], ["__scopeId", "data-v-87556b84"]]), ko = "0.5.79";
7006
6998
  export {
7007
6999
  oe as AIAvatar,
7008
7000
  be as AVATAR_COLORS,
7009
7001
  As as ActionResult,
7010
- Ui as ApprovalCard,
7002
+ Ni as ApprovalCard,
7011
7003
  Es as ArtifactFormResponse,
7012
7004
  Ws as ArtifactInfoCard,
7013
7005
  ur as ArtifactRenderer,
@@ -7022,10 +7014,10 @@ export {
7022
7014
  _n as Header,
7023
7015
  ve as HumanAvatar,
7024
7016
  qt as Launcher,
7025
- Re as MEDIA_RECORDER_SUPPORTED,
7017
+ Oe as MEDIA_RECORDER_SUPPORTED,
7026
7018
  ri as MessageList,
7027
7019
  bo as Messenger,
7028
- Da as MoreMenu,
7020
+ Ua as MoreMenu,
7029
7021
  Jn as Onboarding,
7030
7022
  pe as SCREEN_CAPTURE_SUPPORTED,
7031
7023
  ut as SUPPORTED_LANGUAGES,