@_solaris/messenger-widget 0.3.1 → 0.3.2

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 Se, openBlock as l, createElementBlock as c, createVNode as K, Transition as xe, withCtx as Te, withKeys as ae, withModifiers as X, createElementVNode as i, toDisplayString as b, createCommentVNode as g, normalizeStyle as G, normalizeClass as B, Fragment as T, renderList as D, resolveComponent as I, createBlock as $, createTextVNode as de, resolveDynamicComponent as Me, renderSlot as Oe, withDirectives as q, vModelText as J, vModelCheckbox as Ie, vModelSelect as Be, createStaticVNode as he, markRaw as fe } from "vue";
1
+ import { reactive as Se, openBlock as l, createElementBlock as c, createVNode as K, Transition as xe, withCtx as Te, withKeys as ae, withModifiers as X, createElementVNode as i, toDisplayString as w, createCommentVNode as y, normalizeStyle as G, normalizeClass as E, Fragment as M, renderList as D, resolveComponent as B, createBlock as L, createTextVNode as te, resolveDynamicComponent as Me, renderSlot as Oe, withDirectives as q, vModelText as J, vModelCheckbox as Ie, vModelSelect as Be, createStaticVNode as ue, markRaw as me } from "vue";
2
2
  const Ee = [
3
3
  "connected",
4
4
  "message",
@@ -6,7 +6,7 @@ const Ee = [
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], _e = "/client", $e = 5 * 60 * 1e3, Le = 10 * 60 * 1e3, Re = 5 * 60 * 1e3;
9
+ ], fe = "/client", $e = 5 * 60 * 1e3, Le = 10 * 60 * 1e3, Re = 5 * 60 * 1e3;
10
10
  function Fe(t) {
11
11
  const e = {
12
12
  baseUrl: De(t.baseUrl || ""),
@@ -39,8 +39,8 @@ function Fe(t) {
39
39
  p && p.forEach((C) => {
40
40
  try {
41
41
  C(f);
42
- } catch (O) {
43
- console.error("[transport] listener", h, O);
42
+ } catch (T) {
43
+ console.error("[transport] listener", h, T);
44
44
  }
45
45
  });
46
46
  }
@@ -55,16 +55,16 @@ function Fe(t) {
55
55
  };
56
56
  }
57
57
  async function o(h, f, p) {
58
- const C = await fetch(`${e.baseUrl}${_e}${f}`, {
58
+ const C = await fetch(`${e.baseUrl}${fe}${f}`, {
59
59
  method: h,
60
60
  headers: { "Content-Type": "application/json", ...s() },
61
61
  body: p !== void 0 ? JSON.stringify(p) : void 0
62
62
  });
63
63
  if (!C.ok) {
64
- const O = await d(C), M = new Error(
65
- `HTTP ${C.status} ${h} ${f} :: ${(O == null ? void 0 : O.error) || C.statusText}`
64
+ const T = await d(C), O = new Error(
65
+ `HTTP ${C.status} ${h} ${f} :: ${(T == null ? void 0 : T.error) || C.statusText}`
66
66
  );
67
- throw M.status = C.status, M.body = O, M;
67
+ throw O.status = C.status, O.body = T, O;
68
68
  }
69
69
  return C.status === 204 ? null : C.json();
70
70
  }
@@ -100,7 +100,7 @@ function Fe(t) {
100
100
  const h = await o("GET", "/customers/me");
101
101
  return (h == null ? void 0 : h.customer) ?? null;
102
102
  }
103
- async function w(h) {
103
+ async function b(h) {
104
104
  const f = await o("PATCH", "/customers/me", h);
105
105
  return (f == null ? void 0 : f.customer) ?? null;
106
106
  }
@@ -108,7 +108,7 @@ function Fe(t) {
108
108
  const h = await o("GET", "/conversations");
109
109
  return (h == null ? void 0 : h.conversations) ?? [];
110
110
  }
111
- async function R(h = {}) {
111
+ async function F(h = {}) {
112
112
  return (await o("POST", "/conversations", h)).conversation;
113
113
  }
114
114
  async function A(h) {
@@ -148,27 +148,27 @@ function Fe(t) {
148
148
  p ? { inputs: p } : {}
149
149
  );
150
150
  }
151
- async function F(h) {
151
+ async function R(h) {
152
152
  const f = (
153
153
  /** @type {File} */
154
154
  h.name || "attachment"
155
- ), p = h.type || "application/octet-stream", C = h.size || 0, O = (
155
+ ), p = h.type || "application/octet-stream", C = h.size || 0, T = (
156
156
  /** @type {import('./types.js').AttachmentUploadTicket} */
157
157
  await o("POST", "/attachments", {
158
158
  mime_type: p,
159
159
  size_bytes: C,
160
160
  name: f
161
161
  })
162
- ), M = await fetch(O.upload_url, {
162
+ ), O = await fetch(T.upload_url, {
163
163
  method: "PUT",
164
164
  headers: { "Content-Type": p },
165
165
  body: h
166
166
  });
167
- if (!M.ok)
168
- throw new Error(`HTTP ${M.status} PUT signed upload`);
167
+ if (!O.ok)
168
+ throw new Error(`HTTP ${O.status} PUT signed upload`);
169
169
  return {
170
170
  type: Ne(p),
171
- path: O.path,
171
+ path: T.path,
172
172
  mime_type: p,
173
173
  size_bytes: C
174
174
  };
@@ -185,20 +185,20 @@ function Fe(t) {
185
185
  userHash: e.userHash,
186
186
  widgetId: e.widgetId
187
187
  }).toString();
188
- return `${e.baseUrl}${_e}/stream?${h}`;
188
+ return `${e.baseUrl}${fe}/stream?${h}`;
189
189
  }
190
190
  function z() {
191
191
  if (!e.eventSource && !(typeof document < "u" && document.hidden))
192
192
  try {
193
193
  const h = new EventSource(Y());
194
194
  for (const f of Ee)
195
- h.addEventListener(f, (p) => Q(f, p.data));
195
+ h.addEventListener(f, (p) => Z(f, p.data));
196
196
  h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
197
197
  } catch (h) {
198
198
  console.error("[transport] SSE open failed", h), a("error", h);
199
199
  }
200
200
  }
201
- function Q(h, f) {
201
+ function Z(h, f) {
202
202
  try {
203
203
  const p = JSON.parse(f), C = p && typeof p == "object" && "data" in p ? p.data : p;
204
204
  a(h, C);
@@ -214,22 +214,22 @@ function Fe(t) {
214
214
  e.panelOpen || W();
215
215
  }, Le));
216
216
  }
217
- function Z(h) {
217
+ function Q(h) {
218
218
  e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), z()) : V();
219
219
  }
220
- async function ce() {
220
+ async function de() {
221
221
  try {
222
- const h = await S(), f = h.reduce((C, O) => {
223
- const M = O == null ? void 0 : O.last_message_at;
224
- return M && (!C || M > C) ? M : C;
222
+ const h = await S(), f = h.reduce((C, T) => {
223
+ const O = T == null ? void 0 : T.last_message_at;
224
+ return O && (!C || O > C) ? O : C;
225
225
  }, null);
226
226
  f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), V());
227
227
  } catch (h) {
228
228
  console.error("[transport] poll failed", h);
229
229
  }
230
230
  }
231
- function ne() {
232
- u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(ce, $e));
231
+ function se() {
232
+ u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(de, $e));
233
233
  }
234
234
  function u() {
235
235
  e.pollTimer && (clearInterval(e.pollTimer), e.pollTimer = null);
@@ -244,7 +244,7 @@ function Fe(t) {
244
244
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null;
245
245
  return;
246
246
  }
247
- r("idle"), ne(), e.panelOpen && z();
247
+ r("idle"), se(), e.panelOpen && z();
248
248
  }
249
249
  }
250
250
  async function _() {
@@ -255,34 +255,34 @@ function Fe(t) {
255
255
  try {
256
256
  const f = await S();
257
257
  e.lastActivityAt = f.reduce((p, C) => {
258
- const O = C == null ? void 0 : C.last_message_at;
259
- return O && (!p || O > p) ? O : p;
258
+ const T = C == null ? void 0 : C.last_message_at;
259
+ return T && (!p || T > p) ? T : p;
260
260
  }, null);
261
261
  } catch (f) {
262
262
  console.error("[transport] initial /conversations failed", f);
263
263
  }
264
- return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), ne(), h;
264
+ return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), se(), h;
265
265
  }
266
- function y() {
266
+ function g() {
267
267
  u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, W(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
268
268
  }
269
269
  return {
270
270
  on: n,
271
271
  start: _,
272
- stop: y,
273
- setPanelOpen: Z,
272
+ stop: g,
273
+ setPanelOpen: Q,
274
274
  // REST
275
275
  bootstrap: v,
276
276
  getCustomer: k,
277
- patchCustomer: w,
277
+ patchCustomer: b,
278
278
  listConversations: S,
279
- createConversation: R,
279
+ createConversation: F,
280
280
  getConversation: A,
281
281
  patchConversation: U,
282
282
  listMessages: x,
283
283
  postMessage: j,
284
284
  postCallback: P,
285
- uploadAttachment: F,
285
+ uploadAttachment: R,
286
286
  signAttachment: H,
287
287
  // Read-only state
288
288
  get connection() {
@@ -351,22 +351,22 @@ function Ue(t) {
351
351
  })), n.push(t.on("conversation_updated", (u) => {
352
352
  const m = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.changes;
353
353
  if (!m || !_) return;
354
- const y = e.conversations.findIndex((h) => h.id === m);
355
- y !== -1 && (e.conversations[y] = { ...e.conversations[y], ..._ });
354
+ const g = e.conversations.findIndex((h) => h.id === m);
355
+ g !== -1 && (e.conversations[g] = { ...e.conversations[g], ..._ });
356
356
  })), n.push(t.on("config_updated", (u) => {
357
357
  u != null && u.config && (e.config = u.config);
358
358
  })), n.push(t.on("action_status", (u) => {
359
- const m = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.action_id, y = u == null ? void 0 : u.action_name;
359
+ const m = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.action_id, g = u == null ? void 0 : u.action_name;
360
360
  if (!m || !_) return;
361
361
  const h = e.runningActionsByConv[m] || {};
362
- u.state === "running" ? (h[_] = y || _, e.runningActionsByConv[m] = { ...h }) : u.state === "done" && (delete h[_], e.runningActionsByConv[m] = { ...h });
362
+ u.state === "running" ? (h[_] = g || _, e.runningActionsByConv[m] = { ...h }) : u.state === "done" && (delete h[_], e.runningActionsByConv[m] = { ...h });
363
363
  })), n.push(t.on("activity", (u) => {
364
364
  Array.isArray(u == null ? void 0 : u.conversations) && (e.conversations = u.conversations);
365
365
  }));
366
366
  async function a() {
367
367
  try {
368
368
  const u = new Promise(
369
- (_, y) => setTimeout(() => y(new Error("bootstrap timeout (15s) — check baseUrl, CORS, and network")), 15e3)
369
+ (_, g) => setTimeout(() => g(new Error("bootstrap timeout (15s) — check baseUrl, CORS, and network")), 15e3)
370
370
  ), m = await Promise.race([t.start(), u]);
371
371
  e.config = m.config, e.customer = m.customer, e.conversations = await Promise.race([t.listConversations(), u]), e.ready = !0;
372
372
  } catch (u) {
@@ -382,7 +382,7 @@ function Ue(t) {
382
382
  t.stop();
383
383
  }
384
384
  async function s(u) {
385
- const m = ce(u);
385
+ const m = de(u);
386
386
  if (!m) return e.customer;
387
387
  try {
388
388
  const _ = await t.patchCustomer(m);
@@ -393,55 +393,56 @@ function Ue(t) {
393
393
  return e.customer;
394
394
  }
395
395
  async function o(u = {}) {
396
- const m = await t.createConversation(u), _ = e.conversations.findIndex((y) => y.id === m.id);
396
+ const m = await t.createConversation(u), _ = e.conversations.findIndex((g) => g.id === m.id);
397
397
  return _ === -1 ? e.conversations = [m, ...e.conversations] : e.conversations[_] = m, m;
398
398
  }
399
399
  const d = 50;
400
400
  async function v(u) {
401
401
  if (e.messagesByConv[u]) return;
402
402
  const m = await t.listMessages(u, { limit: d });
403
- e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], w(u, {
403
+ e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], b(u, {
404
404
  nextCursor: (m == null ? void 0 : m.next_cursor) ?? null,
405
405
  loading: !1,
406
406
  loaded: !0
407
407
  });
408
408
  }
409
409
  async function k(u) {
410
+ var h;
410
411
  const m = e.paginationByConv[u];
411
- if (!(!m || m.loading || !m.nextCursor)) {
412
- w(u, { ...m, loading: !0 });
412
+ if (!m || m.loading || !m.nextCursor) return;
413
+ const g = (h = (e.messagesByConv[u] || []).find((f) => f == null ? void 0 : f.created_at)) == null ? void 0 : h.created_at;
414
+ if (g) {
415
+ b(u, { ...m, loading: !0 });
413
416
  try {
414
- let h = m.nextCursor, f = [], p = 0;
415
- for (; p < 6 && h; p++) {
416
- const L = await t.listMessages(u, {
417
- before: h,
418
- limit: d
419
- }), se = (L == null ? void 0 : L.messages) ?? [];
420
- if (f = [...se, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !se.length || f.length >= 60) break;
421
- }
422
- const C = e.messagesByConv[u] || [], O = new Set(C.map((L) => String(L == null ? void 0 : L.id))), M = [...f.filter((L) => !O.has(String(L == null ? void 0 : L.id))), ...C];
423
- e.messagesByConv[u] = M, w(u, {
424
- nextCursor: h,
417
+ const f = await t.listMessages(u, {
418
+ before: g,
419
+ limit: d
420
+ }), p = (f == null ? void 0 : f.messages) ?? [], C = e.messagesByConv[u] || [], T = /* @__PURE__ */ new Set();
421
+ for (const I of C)
422
+ (I == null ? void 0 : I.id) != null && T.add(`id:${String(I.id)}`), I != null && I.client_msg_id && T.add(`c:${I.client_msg_id}`);
423
+ const O = p.filter((I) => !((I == null ? void 0 : I.id) != null && T.has(`id:${String(I.id)}`) || I != null && I.client_msg_id && T.has(`c:${I.client_msg_id}`)));
424
+ e.messagesByConv[u] = [...O, ...C], b(u, {
425
+ nextCursor: (f == null ? void 0 : f.next_cursor) ?? null,
425
426
  loading: !1,
426
427
  loaded: !0
427
428
  });
428
- } catch (_) {
429
- console.error("[store] loadMore failed", _), w(u, { ...m, loading: !1 });
429
+ } catch (f) {
430
+ console.error("[store] loadMore failed", f), b(u, { ...m, loading: !1 });
430
431
  }
431
432
  }
432
433
  }
433
- function w(u, m) {
434
+ function b(u, m) {
434
435
  e.paginationByConv = { ...e.paginationByConv, [u]: m };
435
436
  }
436
437
  async function S(u, m) {
437
- const _ = await t.patchConversation(u, m), y = e.conversations.findIndex((h) => h.id === u);
438
- y !== -1 && (e.conversations[y] = _);
438
+ const _ = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
439
+ g !== -1 && (e.conversations[g] = _);
439
440
  }
440
- async function R(u, m, { attachments: _, metadata: y } = {}) {
441
- var M;
441
+ async function F(u, m, { attachments: _, metadata: g } = {}) {
442
+ var O;
442
443
  const h = (m || "").trim(), f = Array.isArray(_) && _.length > 0;
443
444
  if (!u || !h && !f) return;
444
- const p = je(), C = ne(u), O = {
445
+ const p = je(), C = se(u), T = {
445
446
  id: p,
446
447
  client_msg_id: p,
447
448
  conversation_id: u,
@@ -449,33 +450,33 @@ function Ue(t) {
449
450
  text_md: h,
450
451
  author: {
451
452
  type: "user",
452
- id: ((M = e.customer) == null ? void 0 : M.external_id) || null
453
+ id: ((O = e.customer) == null ? void 0 : O.external_id) || null
453
454
  },
454
455
  created_at: C,
455
456
  // Local-only flag — UI may render dimmed until the SSE echo lands.
456
457
  _pending: !0,
457
458
  ...f ? { payload: { type: "content", attachments: _ } } : {},
458
- ...y && typeof y == "object" ? { metadata: y } : {}
459
+ ...g && typeof g == "object" ? { metadata: g } : {}
459
460
  };
460
- z(u, O);
461
+ z(u, T);
461
462
  try {
462
463
  await t.postMessage(u, {
463
464
  client_msg_id: p,
464
465
  text_md: h,
465
466
  created_at: C,
466
467
  ...f ? { attachments: _ } : {},
467
- ...y && typeof y == "object" ? { metadata: y } : {}
468
+ ...g && typeof g == "object" ? { metadata: g } : {}
468
469
  });
469
- } catch (L) {
470
- console.error("[store] send failed", L), W(u, p, { _failed: !0, _pending: !1 });
470
+ } catch (I) {
471
+ console.error("[store] send failed", I), W(u, p, { _failed: !0, _pending: !1 });
471
472
  }
472
473
  }
473
474
  async function A(u, m, _) {
474
475
  u != null && (e.awaitingCallback[u] = !0);
475
476
  try {
476
477
  await t.postCallback(u, m, _);
477
- } catch (y) {
478
- console.error("[store] callback failed", y), u != null && delete e.awaitingCallback[u];
478
+ } catch (g) {
479
+ console.error("[store] callback failed", g), u != null && delete e.awaitingCallback[u];
479
480
  }
480
481
  }
481
482
  const U = /* @__PURE__ */ new Map();
@@ -496,8 +497,8 @@ function Ue(t) {
496
497
  return null;
497
498
  }
498
499
  async function j(u, { rating: m, comment: _ } = {}) {
499
- const y = e.conversations.find((p) => p.id === u), f = {
500
- ...(y == null ? void 0 : y.metadata) || {},
500
+ const g = e.conversations.find((p) => p.id === u), f = {
501
+ ...(g == null ? void 0 : g.metadata) || {},
501
502
  feedback: {
502
503
  rating: m,
503
504
  comment: _ || null,
@@ -507,21 +508,21 @@ function Ue(t) {
507
508
  await S(u, { metadata: f });
508
509
  }
509
510
  function P(u) {
510
- var _, y;
511
+ var _, g;
511
512
  const m = e.messagesByConv[u] || [];
512
513
  for (let h = m.length - 1; h >= 0; h--) {
513
514
  const f = m[h];
514
- if ((f == null ? void 0 : f.type) === "action" && ((_ = f == null ? void 0 : f.payload) == null ? void 0 : _.type) === "action" && ((y = f == null ? void 0 : f.payload) == null ? void 0 : y.state) === "pending" && Array.isArray(f == null ? void 0 : f.callbacks) && f.callbacks.length > 0 && !e.awaitingCallback[f.id])
515
+ if ((f == null ? void 0 : f.type) === "action" && ((_ = f == null ? void 0 : f.payload) == null ? void 0 : _.type) === "action" && ((g = f == null ? void 0 : f.payload) == null ? void 0 : g.state) === "pending" && Array.isArray(f == null ? void 0 : f.callbacks) && f.callbacks.length > 0 && !e.awaitingCallback[f.id])
515
516
  return f;
516
517
  }
517
518
  return null;
518
519
  }
519
- function F(u) {
520
- var _, y, h;
520
+ function R(u) {
521
+ var _, g, h;
521
522
  const m = e.messagesByConv[u] || [];
522
523
  for (let f = m.length - 1; f >= 0; f--) {
523
524
  const p = m[f];
524
- if (((_ = p == null ? void 0 : p.author) == null ? void 0 : _.type) === "user" || (p == null ? void 0 : p.type) === "action" && ((y = p == null ? void 0 : p.payload) == null ? void 0 : y.state) === "pending") return null;
525
+ if (((_ = p == null ? void 0 : p.author) == null ? void 0 : _.type) === "user" || (p == null ? void 0 : p.type) === "action" && ((g = p == null ? void 0 : p.payload) == null ? void 0 : g.state) === "pending") return null;
525
526
  const C = (h = p == null ? void 0 : p.metadata) == null ? void 0 : h.form;
526
527
  if (C && Array.isArray(C.fields) && C.fields.length > 0)
527
528
  return { message: p, form: C };
@@ -533,28 +534,28 @@ function Ue(t) {
533
534
  if (!m) return null;
534
535
  const _ = Object.keys(m);
535
536
  if (_.length === 0) return null;
536
- const y = _[0];
537
- return { id: y, payload: { name: m[y] } };
537
+ const g = _[0];
538
+ return { id: g, payload: { name: m[g] } };
538
539
  }
539
540
  function Y(u) {
540
- var _, y, h, f;
541
+ var _, g, h, f;
541
542
  const m = e.messagesByConv[u] || [];
542
543
  for (let p = m.length - 1; p >= 0; p--) {
543
544
  const C = m[p];
544
545
  if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user") return [];
545
- if ((C == null ? void 0 : C.type) === "action" && ((y = C == null ? void 0 : C.payload) == null ? void 0 : y.state) === "pending") return [];
546
+ if ((C == null ? void 0 : C.type) === "action" && ((g = C == null ? void 0 : C.payload) == null ? void 0 : g.state) === "pending") return [];
546
547
  if (((h = C == null ? void 0 : C.author) == null ? void 0 : h.type) !== "agent_ia") continue;
547
- const O = (f = C == null ? void 0 : C.metadata) == null ? void 0 : f.suggested_replies;
548
- return Array.isArray(O) && O.length ? O.map((M) => {
549
- if (typeof M == "string") {
550
- const L = M.trim();
551
- return L ? { label: L, kind: null } : null;
548
+ const T = (f = C == null ? void 0 : C.metadata) == null ? void 0 : f.suggested_replies;
549
+ return Array.isArray(T) && T.length ? T.map((O) => {
550
+ if (typeof O == "string") {
551
+ const I = O.trim();
552
+ return I ? { label: I, kind: null } : null;
552
553
  }
553
- if (M && typeof M == "object" && typeof M.label == "string") {
554
- const L = M.label.trim();
555
- if (!L) return null;
556
- const se = M.kind === "cta" || M.kind === "choice" || M.kind === "followup" ? M.kind : null;
557
- return { label: L, kind: se };
554
+ if (O && typeof O == "object" && typeof O.label == "string") {
555
+ const I = O.label.trim();
556
+ if (!I) return null;
557
+ const Ae = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
558
+ return { label: I, kind: Ae };
558
559
  }
559
560
  return null;
560
561
  }).filter(Boolean).slice(0, 4) : [];
@@ -564,52 +565,52 @@ function Ue(t) {
564
565
  function z(u, m) {
565
566
  var f;
566
567
  const _ = e.messagesByConv[u] || [];
567
- let y = -1;
568
- m != null && m.client_msg_id && (y = _.findIndex(
568
+ let g = -1;
569
+ m != null && m.client_msg_id && (g = _.findIndex(
569
570
  (p) => (p == null ? void 0 : p.client_msg_id) && p.client_msg_id === m.client_msg_id
570
- )), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = _.findIndex((p) => Q(p == null ? void 0 : p.id, m.id)));
571
+ )), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = _.findIndex((p) => Z(p == null ? void 0 : p.id, m.id)));
571
572
  let h;
572
- y === -1 ? h = [..._, m].sort(Z) : (h = _.slice(), h[y] = { ..._[y], ...m, _pending: !1, _failed: !1 }), e.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && e.awaitingCallback[m.id] && delete e.awaitingCallback[m.id];
573
+ g === -1 ? h = [..._, m].sort(Q) : (h = _.slice(), h[g] = { ..._[g], ...m, _pending: !1, _failed: !1 }), e.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && e.awaitingCallback[m.id] && delete e.awaitingCallback[m.id];
573
574
  }
574
- function Q(u, m) {
575
+ function Z(u, m) {
575
576
  return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
576
577
  }
577
578
  function W(u, m, _) {
578
- const y = e.messagesByConv[u];
579
- if (!y) return;
580
- const h = y.findIndex((p) => p.id === m);
579
+ const g = e.messagesByConv[u];
580
+ if (!g) return;
581
+ const h = g.findIndex((p) => p.id === m);
581
582
  if (h === -1) return;
582
- const f = y.slice();
583
- f[h] = { ...y[h], ..._ }, e.messagesByConv[u] = f;
583
+ const f = g.slice();
584
+ f[h] = { ...g[h], ..._ }, e.messagesByConv[u] = f;
584
585
  }
585
586
  function V(u, m) {
586
587
  const _ = e.conversations.findIndex((h) => h.id === u);
587
588
  if (_ === -1) return;
588
- const y = e.conversations[_];
589
- if (m && (!y.last_message_at || m > y.last_message_at)) {
589
+ const g = e.conversations[_];
590
+ if (m && (!g.last_message_at || m > g.last_message_at)) {
590
591
  const h = e.conversations.slice();
591
- h[_] = { ...y, last_message_at: m }, h.sort(
592
+ h[_] = { ...g, last_message_at: m }, h.sort(
592
593
  (f, p) => (p.last_message_at || "").localeCompare(f.last_message_at || "")
593
594
  ), e.conversations = h;
594
595
  }
595
596
  }
596
- function Z(u, m) {
597
+ function Q(u, m) {
597
598
  return (u.created_at || "").localeCompare(m.created_at || "");
598
599
  }
599
- function ce(u) {
600
+ function de(u) {
600
601
  if (!u || typeof u != "object") return null;
601
602
  const m = {}, _ = {};
602
- for (const [y, h] of Object.entries(u))
603
- h !== void 0 && (y === "name" || y === "email" ? h != null && String(h).trim() !== "" && (m[y] = h) : (y === "values" || y === "metadata") && h && typeof h == "object" ? Object.assign(_, h) : _[y] = h);
603
+ for (const [g, h] of Object.entries(u))
604
+ h !== void 0 && (g === "name" || g === "email" ? h != null && String(h).trim() !== "" && (m[g] = h) : (g === "values" || g === "metadata") && h && typeof h == "object" ? Object.assign(_, h) : _[g] = h);
604
605
  return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
605
606
  }
606
- function ne(u) {
607
+ function se(u) {
607
608
  const m = e.messagesByConv[u] || [];
608
609
  let _ = "";
609
610
  for (const f of m)
610
611
  f != null && f.created_at && f.created_at > _ && (_ = f.created_at);
611
- const y = (/* @__PURE__ */ new Date()).toISOString();
612
- return !_ || y > _ ? y : new Date(Date.parse(_) + 1).toISOString();
612
+ const g = (/* @__PURE__ */ new Date()).toISOString();
613
+ return !_ || g > _ ? g : new Date(Date.parse(_) + 1).toISOString();
613
614
  }
614
615
  return {
615
616
  state: e,
@@ -620,14 +621,14 @@ function Ue(t) {
620
621
  openConversation: v,
621
622
  loadMore: k,
622
623
  patchConversation: S,
623
- send: R,
624
+ send: F,
624
625
  clickCallback: A,
625
626
  signAttachment: x,
626
627
  submitFeedback: j,
627
628
  getPendingApproval: P,
628
629
  getActionInFlight: H,
629
630
  getLatestSuggestions: Y,
630
- getLatestForm: F,
631
+ getLatestForm: R,
631
632
  // Pass-through for panel open/close (controls SSE burst).
632
633
  setPanelOpen: t.setPanelOpen
633
634
  };
@@ -648,14 +649,14 @@ const N = {
648
649
  green: "#22C55E",
649
650
  red: "#B91C1C",
650
651
  redBg: "#FDECEC"
651
- }, ue = ["#5B5FEF", "#7C3AED", "#DB2777", "#0891B2", "#D97706", "#059669"];
652
- function we(t = "") {
653
- return t ? ue[t.charCodeAt(0) % ue.length] : ue[0];
652
+ }, ce = ["#5B5FEF", "#7C3AED", "#DB2777", "#0891B2", "#D97706", "#059669"];
653
+ function ye(t = "") {
654
+ return t ? ce[t.charCodeAt(0) % ce.length] : ce[0];
654
655
  }
655
- function be(t = "") {
656
+ function we(t = "") {
656
657
  return t.split(" ").map((e) => e[0] || "").join("").toUpperCase().slice(0, 2);
657
658
  }
658
- function ke(t = /* @__PURE__ */ new Date()) {
659
+ function be(t = /* @__PURE__ */ new Date()) {
659
660
  return t.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
660
661
  }
661
662
  const Pe = `
@@ -704,7 +705,7 @@ const Pe = `
704
705
  0% { transform: translateX(110%); opacity: 0; }
705
706
  100% { transform: translateX(0); opacity: 1; }
706
707
  }
707
- `, He = "https://api.messenger.victorc.fr", E = (t, e) => {
708
+ `, He = "https://api.messenger.victorc.fr", $ = (t, e) => {
708
709
  const n = t.__vccOpts || t;
709
710
  for (const [a, r] of e)
710
711
  n[a] = r;
@@ -736,7 +737,7 @@ function Ke(t, e, n, a, r, s) {
736
737
  e[3] || (e[3] = ae(X((o) => t.$emit("open"), ["prevent"]), ["space"]))
737
738
  ]
738
739
  }, [
739
- i("p", qe, b(n.peek), 1),
740
+ i("p", qe, w(n.peek), 1),
740
741
  i("button", {
741
742
  type: "button",
742
743
  class: "wm-peek__close",
@@ -757,7 +758,7 @@ function Ke(t, e, n, a, r, s) {
757
758
  i("path", { d: "M18 6L6 18M6 6l12 12" })
758
759
  ], -1)
759
760
  ])])
760
- ], 32)) : g("", !0)
761
+ ], 32)) : y("", !0)
761
762
  ]),
762
763
  _: 1
763
764
  }),
@@ -784,11 +785,11 @@ function Ke(t, e, n, a, r, s) {
784
785
  key: 0,
785
786
  class: "wm-launcher__badge",
786
787
  "aria-label": `${n.unreadCount} conversation${n.unreadCount > 1 ? "s" : ""} non lue${n.unreadCount > 1 ? "s" : ""}`
787
- }, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, We)) : g("", !0)
788
+ }, w(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, We)) : y("", !0)
788
789
  ])
789
790
  ]);
790
791
  }
791
- const Ge = /* @__PURE__ */ E(ze, [["render", Ke], ["__scopeId", "data-v-fabef371"]]), Ye = {
792
+ const Ge = /* @__PURE__ */ $(ze, [["render", Ke], ["__scopeId", "data-v-fabef371"]]), Ye = {
792
793
  name: "WmAIAvatar",
793
794
  props: {
794
795
  size: { type: Number, default: 26 },
@@ -804,14 +805,14 @@ const Ge = /* @__PURE__ */ E(ze, [["render", Ke], ["__scopeId", "data-v-fabef371
804
805
  key: 0,
805
806
  class: "wm-aiav__pulse"
806
807
  }, Xe = ["width", "height"];
807
- function Qe(t, e, n, a, r, s) {
808
+ function Ze(t, e, n, a, r, s) {
808
809
  return l(), c("div", {
809
- class: B(["wm-aiav", { "wm-aiav--tail": n.tail }]),
810
+ class: E(["wm-aiav", { "wm-aiav--tail": n.tail }]),
810
811
  style: G({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
811
812
  }, [
812
- n.pulse ? (l(), c("div", Je)) : g("", !0),
813
+ n.pulse ? (l(), c("div", Je)) : y("", !0),
813
814
  i("div", {
814
- class: B(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
815
+ class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
815
816
  }, [
816
817
  (l(), c("svg", {
817
818
  width: n.size * 0.5,
@@ -843,7 +844,7 @@ function Qe(t, e, n, a, r, s) {
843
844
  ], 2)
844
845
  ], 6);
845
846
  }
846
- const te = /* @__PURE__ */ E(Ye, [["render", Qe], ["__scopeId", "data-v-8c924688"]]), Ze = {
847
+ const ne = /* @__PURE__ */ $(Ye, [["render", Ze], ["__scopeId", "data-v-8c924688"]]), Qe = {
847
848
  name: "WmHumanAvatar",
848
849
  props: {
849
850
  name: { type: String, default: "" },
@@ -852,10 +853,10 @@ const te = /* @__PURE__ */ E(Ye, [["render", Qe], ["__scopeId", "data-v-8c924688
852
853
  },
853
854
  computed: {
854
855
  bg() {
855
- return this.avatarUrl ? "transparent" : we(this.name);
856
+ return this.avatarUrl ? "transparent" : ye(this.name);
856
857
  },
857
858
  initials() {
858
- return be(this.name);
859
+ return we(this.name);
859
860
  }
860
861
  }
861
862
  }, et = ["src", "alt"];
@@ -876,10 +877,10 @@ function tt(t, e, n, a, r, s) {
876
877
  }, null, 8, et)) : (l(), c("span", {
877
878
  key: 1,
878
879
  style: G({ fontSize: n.size * 0.36 + "px" })
879
- }, b(s.initials), 5))
880
+ }, w(s.initials), 5))
880
881
  ], 4);
881
882
  }
882
- const Ce = /* @__PURE__ */ E(Ze, [["render", tt], ["__scopeId", "data-v-a772b179"]]), nt = {
883
+ const ke = /* @__PURE__ */ $(Qe, [["render", tt], ["__scopeId", "data-v-a772b179"]]), nt = {
883
884
  name: "WmTeamAvatars",
884
885
  props: {
885
886
  members: { type: Array, default: () => [] },
@@ -895,10 +896,10 @@ const Ce = /* @__PURE__ */ E(Ze, [["render", tt], ["__scopeId", "data-v-a772b179
895
896
  },
896
897
  methods: {
897
898
  colorFor(t) {
898
- return t.avatar_url ? "transparent" : we(t.name || "");
899
+ return t.avatar_url ? "transparent" : ye(t.name || "");
899
900
  },
900
901
  initialsFor(t) {
901
- return be(t.name || "");
902
+ return we(t.name || "");
902
903
  }
903
904
  }
904
905
  }, st = {
@@ -914,7 +915,7 @@ function ot(t, e, n, a, r, s) {
914
915
  class: "wm-team__stack",
915
916
  style: G({ width: s.stackWidth + "px" })
916
917
  }, [
917
- (l(!0), c(T, null, D(n.members.slice(0, 3), (o, d) => (l(), c("div", {
918
+ (l(!0), c(M, null, D(n.members.slice(0, 3), (o, d) => (l(), c("div", {
918
919
  key: d,
919
920
  class: "wm-team__pill",
920
921
  style: G({ left: d * 13 + "px", zIndex: 3 - d, background: s.colorFor(o) })
@@ -923,15 +924,15 @@ function ot(t, e, n, a, r, s) {
923
924
  key: 0,
924
925
  src: o.avatar_url,
925
926
  alt: o.name || ""
926
- }, null, 8, rt)) : (l(), c("span", it, b(s.initialsFor(o)), 1))
927
+ }, null, 8, rt)) : (l(), c("span", it, w(s.initialsFor(o)), 1))
927
928
  ], 4))), 128))
928
929
  ], 4),
929
- n.responseLabel ? (l(), c("span", at, b(n.responseLabel), 1)) : g("", !0)
930
- ])) : g("", !0);
930
+ n.responseLabel ? (l(), c("span", at, w(n.responseLabel), 1)) : y("", !0)
931
+ ])) : y("", !0);
931
932
  }
932
- const lt = /* @__PURE__ */ E(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1"]]), dt = {
933
+ const lt = /* @__PURE__ */ $(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1"]]), dt = {
933
934
  name: "WmHeader",
934
- components: { AIAvatar: te, HumanAvatar: Ce, TeamAvatars: lt },
935
+ components: { AIAvatar: ne, HumanAvatar: ke, TeamAvatars: lt },
935
936
  props: {
936
937
  title: { type: String, default: "Nouvelle conversation" },
937
938
  escalated: { type: Boolean, default: !1 },
@@ -973,7 +974,7 @@ const lt = /* @__PURE__ */ E(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1
973
974
  class: "wm-header__fill"
974
975
  }, gt = { class: "wm-header__actions" };
975
976
  function yt(t, e, n, a, r, s) {
976
- const o = I("HumanAvatar"), d = I("AIAvatar"), v = I("TeamAvatars");
977
+ const o = B("HumanAvatar"), d = B("AIAvatar"), v = B("TeamAvatars");
977
978
  return l(), c("div", ct, [
978
979
  n.showBack ? (l(), c("button", {
979
980
  key: 0,
@@ -996,38 +997,38 @@ function yt(t, e, n, a, r, s) {
996
997
  i("path", { d: "M19 12H5M12 5l-7 7 7 7" })
997
998
  ], -1)
998
999
  ])])) : (l(), c("div", ut)),
999
- n.showIdentity ? (l(), c(T, { key: 2 }, [
1000
+ n.showIdentity ? (l(), c(M, { key: 2 }, [
1000
1001
  i("div", ht, [
1001
- n.escalated ? (l(), $(o, {
1002
+ n.escalated ? (l(), L(o, {
1002
1003
  key: 0,
1003
1004
  name: n.agentName,
1004
1005
  "avatar-url": n.agentAvatarUrl,
1005
1006
  size: 34
1006
- }, null, 8, ["name", "avatar-url"])) : (l(), $(d, {
1007
+ }, null, 8, ["name", "avatar-url"])) : (l(), L(d, {
1007
1008
  key: 1,
1008
1009
  size: 34
1009
1010
  }))
1010
1011
  ]),
1011
1012
  i("div", mt, [
1012
- i("div", ft, b(n.title), 1),
1013
+ i("div", ft, w(n.title), 1),
1013
1014
  s.showPresence ? (l(), c("div", _t, [
1014
- s.hasTeam ? (l(), $(v, {
1015
+ s.hasTeam ? (l(), L(v, {
1015
1016
  key: 0,
1016
1017
  members: n.teamMembers,
1017
1018
  "response-label": n.responseLabel
1018
- }, null, 8, ["members", "response-label"])) : g("", !0),
1019
+ }, null, 8, ["members", "response-label"])) : y("", !0),
1019
1020
  i("span", pt, [
1020
1021
  e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
1021
- de(" " + b(s.statusText), 1)
1022
+ te(" " + w(s.statusText), 1)
1022
1023
  ])
1023
- ])) : g("", !0)
1024
+ ])) : y("", !0)
1024
1025
  ])
1025
1026
  ], 64)) : (l(), c("div", vt)),
1026
1027
  i("div", gt, [
1027
1028
  n.showMore ? (l(), c("button", {
1028
1029
  key: 0,
1029
1030
  type: "button",
1030
- class: B(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
1031
+ class: E(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
1031
1032
  "aria-label": "Plus d'options",
1032
1033
  title: "Plus d'options",
1033
1034
  onClick: e[1] || (e[1] = (k) => t.$emit("more"))
@@ -1055,7 +1056,7 @@ function yt(t, e, n, a, r, s) {
1055
1056
  r: "1.6"
1056
1057
  })
1057
1058
  ], -1)
1058
- ])], 2)) : g("", !0),
1059
+ ])], 2)) : y("", !0),
1059
1060
  n.showClose ? (l(), c("button", {
1060
1061
  key: 1,
1061
1062
  type: "button",
@@ -1077,11 +1078,11 @@ function yt(t, e, n, a, r, s) {
1077
1078
  }, [
1078
1079
  i("path", { d: "M18 6L6 18M6 6l12 12" })
1079
1080
  ], -1)
1080
- ])])) : g("", !0)
1081
+ ])])) : y("", !0)
1081
1082
  ])
1082
1083
  ]);
1083
1084
  }
1084
- const wt = /* @__PURE__ */ E(dt, [["render", yt], ["__scopeId", "data-v-b5f5f6a9"]]), pe = {
1085
+ const wt = /* @__PURE__ */ $(dt, [["render", yt], ["__scopeId", "data-v-b5f5f6a9"]]), _e = {
1085
1086
  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",
1086
1087
  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",
1087
1088
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -1089,7 +1090,7 @@ const wt = /* @__PURE__ */ E(dt, [["render", yt], ["__scopeId", "data-v-b5f5f6a9
1089
1090
  link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
1090
1091
  }, bt = {
1091
1092
  name: "WmOnboarding",
1092
- components: { AIAvatar: te },
1093
+ components: { AIAvatar: ne },
1093
1094
  props: {
1094
1095
  welcomeMessage: { type: String, default: "" },
1095
1096
  agentName: { type: String, default: "" },
@@ -1097,7 +1098,7 @@ const wt = /* @__PURE__ */ E(dt, [["render", yt], ["__scopeId", "data-v-b5f5f6a9
1097
1098
  openThreads: { type: Array, default: () => [] },
1098
1099
  busy: { type: Boolean, default: !1 }
1099
1100
  },
1100
- emits: ["start", "select", "resume"],
1101
+ emits: ["start", "select", "resume", "view-all"],
1101
1102
  computed: {
1102
1103
  heroTitle() {
1103
1104
  return this.welcomeMessage ? this.welcomeMessage : this.agentName ? `Bonjour, je suis ${this.agentName}` : "Bonjour, je suis votre assistant";
@@ -1109,20 +1110,13 @@ Je réponds en quelques secondes.`;
1109
1110
  },
1110
1111
  methods: {
1111
1112
  iconPath(t) {
1112
- return pe[t] || pe.link;
1113
+ return _e[t] || _e.link;
1113
1114
  }
1114
1115
  }
1115
1116
  }, kt = { class: "wm-onb" }, Ct = { class: "wm-onb__hero" }, At = { class: "wm-onb__title" }, St = { class: "wm-onb__sub" }, xt = {
1116
1117
  key: 0,
1117
1118
  class: "wm-onb__section"
1118
- }, Tt = { class: "wm-onb__links" }, Mt = ["onClick"], Ot = {
1119
- key: 0,
1120
- class: "wm-onb__resume-dot",
1121
- "aria-label": "Non lu"
1122
- }, It = { class: "wm-onb__resume-body" }, Bt = { class: "wm-onb__resume-title" }, Et = { class: "wm-onb__resume-preview" }, $t = {
1123
- key: 1,
1124
- class: "wm-onb__section"
1125
- }, Lt = { class: "wm-onb__links" }, Rt = ["onClick"], Ft = { class: "wm-onb__link-icon" }, Dt = {
1119
+ }, Tt = { class: "wm-onb__links" }, Mt = ["onClick"], Ot = { class: "wm-onb__link-icon" }, It = {
1126
1120
  width: "14",
1127
1121
  height: "14",
1128
1122
  viewBox: "0 0 24 24",
@@ -1132,31 +1126,72 @@ Je réponds en quelques secondes.`;
1132
1126
  "stroke-linecap": "round",
1133
1127
  "stroke-linejoin": "round",
1134
1128
  "aria-hidden": "true"
1135
- }, Nt = ["d"], jt = { class: "wm-onb__link-label" }, Ut = { class: "wm-onb__cta" }, Pt = ["disabled"];
1129
+ }, Bt = ["d"], Et = { class: "wm-onb__link-label" }, $t = {
1130
+ key: 1,
1131
+ class: "wm-onb__section"
1132
+ }, Lt = { class: "wm-onb__links" }, Rt = ["onClick"], Ft = {
1133
+ key: 0,
1134
+ class: "wm-onb__resume-dot",
1135
+ "aria-label": "Non lu"
1136
+ }, Dt = { class: "wm-onb__resume-body" }, Nt = { class: "wm-onb__resume-title" }, jt = { class: "wm-onb__resume-preview" }, Ut = { class: "wm-onb__cta" }, Pt = ["disabled"];
1136
1137
  function Ht(t, e, n, a, r, s) {
1137
- const o = I("AIAvatar");
1138
+ const o = B("AIAvatar");
1138
1139
  return l(), c("div", kt, [
1139
1140
  i("div", Ct, [
1140
1141
  K(o, {
1141
1142
  size: 56,
1142
1143
  pulse: !0
1143
1144
  }),
1144
- i("div", At, b(s.heroTitle), 1),
1145
- i("div", St, b(s.heroSub), 1)
1145
+ i("div", At, w(s.heroTitle), 1),
1146
+ i("div", St, w(s.heroSub), 1)
1146
1147
  ]),
1147
- n.openThreads.length ? (l(), c("div", xt, [
1148
- e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Vos conversations", -1)),
1148
+ n.quickLinks.length ? (l(), c("div", xt, [
1149
+ e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
1149
1150
  i("div", Tt, [
1150
- (l(!0), c(T, null, D(n.openThreads, (d) => (l(), c("button", {
1151
+ (l(!0), c(M, null, D(n.quickLinks, (d, v) => (l(), c("button", {
1152
+ key: v,
1153
+ type: "button",
1154
+ class: "wm-onb__link",
1155
+ onClick: (k) => t.$emit("select", d)
1156
+ }, [
1157
+ i("span", Ot, [
1158
+ (l(), c("svg", It, [
1159
+ i("path", {
1160
+ d: s.iconPath(d.icon)
1161
+ }, null, 8, Bt)
1162
+ ]))
1163
+ ]),
1164
+ i("span", Et, w(d.label), 1),
1165
+ e[2] || (e[2] = i("svg", {
1166
+ width: "13",
1167
+ height: "13",
1168
+ viewBox: "0 0 24 24",
1169
+ fill: "none",
1170
+ stroke: "currentColor",
1171
+ "stroke-width": "1.8",
1172
+ "stroke-linecap": "round",
1173
+ "stroke-linejoin": "round",
1174
+ class: "wm-onb__link-chev",
1175
+ "aria-hidden": "true"
1176
+ }, [
1177
+ i("path", { d: "M9 18l6-6-6-6" })
1178
+ ], -1))
1179
+ ], 8, Mt))), 128))
1180
+ ])
1181
+ ])) : y("", !0),
1182
+ n.openThreads.length ? (l(), c("div", $t, [
1183
+ e[7] || (e[7] = i("div", { class: "wm-onb__section-title" }, "Vos conversations", -1)),
1184
+ i("div", Lt, [
1185
+ (l(!0), c(M, null, D(n.openThreads, (d) => (l(), c("button", {
1151
1186
  key: d.id,
1152
1187
  type: "button",
1153
1188
  class: "wm-onb__link wm-onb__resume",
1154
1189
  onClick: (v) => t.$emit("resume", d)
1155
1190
  }, [
1156
1191
  i("span", {
1157
- class: B(["wm-onb__link-icon", { "wm-onb__resume-icon": d.unread }])
1192
+ class: E(["wm-onb__link-icon", { "wm-onb__resume-icon": d.unread }])
1158
1193
  }, [
1159
- e[1] || (e[1] = i("svg", {
1194
+ e[4] || (e[4] = i("svg", {
1160
1195
  width: "14",
1161
1196
  height: "14",
1162
1197
  viewBox: "0 0 24 24",
@@ -1169,13 +1204,13 @@ function Ht(t, e, n, a, r, s) {
1169
1204
  }, [
1170
1205
  i("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
1171
1206
  ], -1)),
1172
- d.unread ? (l(), c("span", Ot)) : g("", !0)
1207
+ d.unread ? (l(), c("span", Ft)) : y("", !0)
1173
1208
  ], 2),
1174
- i("span", It, [
1175
- i("span", Bt, b(d.title), 1),
1176
- i("span", Et, b(d.preview), 1)
1209
+ i("span", Dt, [
1210
+ i("span", Nt, w(d.title), 1),
1211
+ i("span", jt, w(d.preview), 1)
1177
1212
  ]),
1178
- e[2] || (e[2] = i("svg", {
1213
+ e[5] || (e[5] = i("svg", {
1179
1214
  width: "13",
1180
1215
  height: "13",
1181
1216
  viewBox: "0 0 24 24",
@@ -1189,54 +1224,40 @@ function Ht(t, e, n, a, r, s) {
1189
1224
  }, [
1190
1225
  i("path", { d: "M9 18l6-6-6-6" })
1191
1226
  ], -1))
1192
- ], 8, Mt))), 128))
1193
- ])
1194
- ])) : g("", !0),
1195
- n.quickLinks.length ? (l(), c("div", $t, [
1196
- e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
1197
- i("div", Lt, [
1198
- (l(!0), c(T, null, D(n.quickLinks, (d, v) => (l(), c("button", {
1199
- key: v,
1227
+ ], 8, Rt))), 128)),
1228
+ i("button", {
1200
1229
  type: "button",
1201
- class: "wm-onb__link",
1202
- onClick: (k) => t.$emit("select", d)
1203
- }, [
1204
- i("span", Ft, [
1205
- (l(), c("svg", Dt, [
1206
- i("path", {
1207
- d: s.iconPath(d.icon)
1208
- }, null, 8, Nt)
1209
- ]))
1210
- ]),
1211
- i("span", jt, b(d.label), 1),
1212
- e[4] || (e[4] = i("svg", {
1213
- width: "13",
1214
- height: "13",
1230
+ class: "wm-onb__viewAll",
1231
+ onClick: e[0] || (e[0] = (d) => t.$emit("view-all"))
1232
+ }, [...e[6] || (e[6] = [
1233
+ te(" Voir toutes les conversations ", -1),
1234
+ i("svg", {
1235
+ width: "12",
1236
+ height: "12",
1215
1237
  viewBox: "0 0 24 24",
1216
1238
  fill: "none",
1217
1239
  stroke: "currentColor",
1218
1240
  "stroke-width": "1.8",
1219
1241
  "stroke-linecap": "round",
1220
1242
  "stroke-linejoin": "round",
1221
- class: "wm-onb__link-chev",
1222
1243
  "aria-hidden": "true"
1223
1244
  }, [
1224
1245
  i("path", { d: "M9 18l6-6-6-6" })
1225
- ], -1))
1226
- ], 8, Rt))), 128))
1246
+ ], -1)
1247
+ ])])
1227
1248
  ])
1228
- ])) : g("", !0),
1249
+ ])) : y("", !0),
1229
1250
  i("div", Ut, [
1230
1251
  i("button", {
1231
1252
  type: "button",
1232
1253
  class: "wm-onb__startBtn",
1233
1254
  disabled: n.busy,
1234
- onClick: e[0] || (e[0] = (d) => t.$emit("start"))
1235
- }, b(n.busy ? "…" : "Commencer une conversation"), 9, Pt)
1255
+ onClick: e[1] || (e[1] = (d) => t.$emit("start"))
1256
+ }, w(n.busy ? "…" : "Commencer une conversation"), 9, Pt)
1236
1257
  ])
1237
1258
  ]);
1238
1259
  }
1239
- const zt = /* @__PURE__ */ E(bt, [["render", Ht], ["__scopeId", "data-v-7ce03b72"]]);
1260
+ const zt = /* @__PURE__ */ $(bt, [["render", Ht], ["__scopeId", "data-v-13584fe8"]]);
1240
1261
  function Vt(t) {
1241
1262
  return typeof t != "string" ? "" : t.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
1242
1263
  }
@@ -1296,10 +1317,10 @@ const qt = {
1296
1317
  "stroke-width": "2.2",
1297
1318
  "stroke-linecap": "round",
1298
1319
  "stroke-linejoin": "round"
1299
- }, Xt = { class: "wm-result__body" }, Qt = { class: "wm-result__label" }, Zt = { class: "wm-result__detail" };
1320
+ }, Xt = { class: "wm-result__body" }, Zt = { class: "wm-result__label" }, Qt = { class: "wm-result__detail" };
1300
1321
  function en(t, e, n, a, r, s) {
1301
1322
  return l(), c("div", {
1302
- class: B(["wm-result", `wm-result--${n.state}`])
1323
+ class: E(["wm-result", `wm-result--${n.state}`])
1303
1324
  }, [
1304
1325
  i("span", Wt, [
1305
1326
  n.state === "success" ? (l(), c("svg", Kt, [...e[0] || (e[0] = [
@@ -1330,18 +1351,18 @@ function en(t, e, n, a, r, s) {
1330
1351
  ])]))
1331
1352
  ]),
1332
1353
  i("span", Xt, [
1333
- i("span", Qt, b(n.label), 1),
1334
- s.detailText ? (l(), c(T, { key: 0 }, [
1354
+ i("span", Zt, w(n.label), 1),
1355
+ s.detailText ? (l(), c(M, { key: 0 }, [
1335
1356
  e[4] || (e[4] = i("span", {
1336
1357
  class: "wm-result__sep",
1337
1358
  "aria-hidden": "true"
1338
1359
  }, " · ", -1)),
1339
- i("span", Zt, b(s.detailText), 1)
1340
- ], 64)) : g("", !0)
1360
+ i("span", Qt, w(s.detailText), 1)
1361
+ ], 64)) : y("", !0)
1341
1362
  ])
1342
1363
  ], 2);
1343
1364
  }
1344
- const tn = /* @__PURE__ */ E(qt, [["render", en], ["__scopeId", "data-v-64a83fb8"]]), nn = {
1365
+ const tn = /* @__PURE__ */ $(qt, [["render", en], ["__scopeId", "data-v-64a83fb8"]]), nn = {
1345
1366
  name: "WmArtifactFormResponse",
1346
1367
  props: {
1347
1368
  data: { type: Object, required: !0 }
@@ -1356,7 +1377,7 @@ const tn = /* @__PURE__ */ E(qt, [["render", en], ["__scopeId", "data-v-64a83fb8
1356
1377
  function dn(t, e, n, a, r, s) {
1357
1378
  return l(), c("div", sn, [
1358
1379
  i("div", rn, [
1359
- i("div", an, b(n.data.title || "Formulaire"), 1),
1380
+ i("div", an, w(n.data.title || "Formulaire"), 1),
1360
1381
  e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
1361
1382
  i("svg", {
1362
1383
  width: "11",
@@ -1371,23 +1392,23 @@ function dn(t, e, n, a, r, s) {
1371
1392
  }, [
1372
1393
  i("polyline", { points: "20 6 9 17 4 12" })
1373
1394
  ]),
1374
- de(" Envoyé ")
1395
+ te(" Envoyé ")
1375
1396
  ], -1))
1376
1397
  ]),
1377
1398
  i("div", on, [
1378
- (l(!0), c(T, null, D(s.fields, (o, d) => (l(), c("div", {
1399
+ (l(!0), c(M, null, D(s.fields, (o, d) => (l(), c("div", {
1379
1400
  key: d,
1380
1401
  class: "wm-art__field"
1381
1402
  }, [
1382
- i("div", ln, b(o.label), 1),
1403
+ i("div", ln, w(o.label), 1),
1383
1404
  i("div", {
1384
- class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1385
- }, b(o.value), 3)
1405
+ class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1406
+ }, w(o.value), 3)
1386
1407
  ]))), 128))
1387
1408
  ])
1388
1409
  ]);
1389
1410
  }
1390
- const cn = /* @__PURE__ */ E(nn, [["render", dn], ["__scopeId", "data-v-ca24a9c9"]]), un = {
1411
+ const cn = /* @__PURE__ */ $(nn, [["render", dn], ["__scopeId", "data-v-ca24a9c9"]]), un = {
1391
1412
  name: "WmArtifactInfoCard",
1392
1413
  props: {
1393
1414
  data: { type: Object, required: !0 }
@@ -1423,32 +1444,32 @@ function kn(t, e, n, a, r, s) {
1423
1444
  alt: n.data.title || "",
1424
1445
  loading: "lazy"
1425
1446
  }, null, 8, fn)
1426
- ])) : g("", !0),
1447
+ ])) : y("", !0),
1427
1448
  i("div", _n, [
1428
1449
  i("div", pn, [
1429
- i("div", vn, b(n.data.title), 1),
1430
- n.data.subtitle ? (l(), c("div", gn, b(n.data.subtitle), 1)) : g("", !0)
1450
+ i("div", vn, w(n.data.title), 1),
1451
+ n.data.subtitle ? (l(), c("div", gn, w(n.data.subtitle), 1)) : y("", !0)
1431
1452
  ]),
1432
1453
  n.data.badge && n.data.badge.label ? (l(), c("span", {
1433
1454
  key: 0,
1434
- class: B(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
1435
- }, b(n.data.badge.label), 3)) : g("", !0)
1455
+ class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
1456
+ }, w(n.data.badge.label), 3)) : y("", !0)
1436
1457
  ]),
1437
1458
  s.hasBody ? (l(), c("div", yn, [
1438
- n.data.body ? (l(), c("div", wn, b(n.data.body), 1)) : g("", !0),
1439
- s.fields.length ? (l(!0), c(T, { key: 1 }, D(s.fields, (o, d) => (l(), c("div", {
1459
+ n.data.body ? (l(), c("div", wn, w(n.data.body), 1)) : y("", !0),
1460
+ s.fields.length ? (l(!0), c(M, { key: 1 }, D(s.fields, (o, d) => (l(), c("div", {
1440
1461
  key: d,
1441
1462
  class: "wm-art__field"
1442
1463
  }, [
1443
- i("div", bn, b(o.label), 1),
1464
+ i("div", bn, w(o.label), 1),
1444
1465
  i("div", {
1445
- class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1446
- }, b(o.value), 3)
1447
- ]))), 128)) : g("", !0)
1448
- ])) : g("", !0)
1466
+ class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1467
+ }, w(o.value), 3)
1468
+ ]))), 128)) : y("", !0)
1469
+ ])) : y("", !0)
1449
1470
  ]);
1450
1471
  }
1451
- const Cn = /* @__PURE__ */ E(un, [["render", kn], ["__scopeId", "data-v-d7369333"]]);
1472
+ const Cn = /* @__PURE__ */ $(un, [["render", kn], ["__scopeId", "data-v-d7369333"]]);
1452
1473
  function An(t) {
1453
1474
  if (!t) return "";
1454
1475
  const e = new Date(t);
@@ -1515,7 +1536,7 @@ const Sn = {
1515
1536
  function Dn(t, e, n, a, r, s) {
1516
1537
  return l(), c("div", xn, [
1517
1538
  i("div", Tn, [
1518
- i("div", Mn, b(n.data.title), 1),
1539
+ i("div", Mn, w(n.data.title), 1),
1519
1540
  i("div", On, [
1520
1541
  i("div", In, [
1521
1542
  e[0] || (e[0] = i("svg", {
@@ -1532,28 +1553,28 @@ function Dn(t, e, n, a, r, s) {
1532
1553
  i("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" }),
1533
1554
  i("path", { d: "M13 5v2M13 17v2M13 11v2" })
1534
1555
  ], -1)),
1535
- i("span", null, b(n.data.reference), 1)
1556
+ i("span", null, w(n.data.reference), 1)
1536
1557
  ]),
1537
1558
  i("span", {
1538
- class: B(["wm-art__badge", "wm-tk__badge", `wm-art__badge--${n.data.status.tone || "neutral"}`])
1559
+ class: E(["wm-art__badge", "wm-tk__badge", `wm-art__badge--${n.data.status.tone || "neutral"}`])
1539
1560
  }, [
1540
1561
  e[1] || (e[1] = i("span", {
1541
1562
  class: "wm-tk__dot",
1542
1563
  "aria-hidden": "true"
1543
1564
  }, null, -1)),
1544
- de(" " + b(n.data.status.label), 1)
1565
+ te(" " + w(n.data.status.label), 1)
1545
1566
  ], 2)
1546
1567
  ]),
1547
- n.data.body ? (l(), c("div", Bn, b(n.data.body), 1)) : g("", !0)
1568
+ n.data.body ? (l(), c("div", Bn, w(n.data.body), 1)) : y("", !0)
1548
1569
  ]),
1549
1570
  s.fields.length ? (l(), c("div", En, [
1550
- (l(!0), c(T, null, D(s.fields, (o, d) => (l(), c("div", {
1571
+ (l(!0), c(M, null, D(s.fields, (o, d) => (l(), c("div", {
1551
1572
  key: d,
1552
1573
  class: "wm-art__field"
1553
1574
  }, [
1554
- i("div", $n, b(o.label), 1),
1575
+ i("div", $n, w(o.label), 1),
1555
1576
  i("div", {
1556
- class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1577
+ class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1557
1578
  }, [
1558
1579
  s.isPriority(o.label) ? (l(), c("svg", {
1559
1580
  key: 0,
@@ -1594,11 +1615,11 @@ function Dn(t, e, n, a, r, s) {
1594
1615
  rx: "2"
1595
1616
  }, null, -1),
1596
1617
  i("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
1597
- ])])) : g("", !0),
1598
- i("span", null, b(o.value), 1)
1618
+ ])])) : y("", !0),
1619
+ i("span", null, w(o.value), 1)
1599
1620
  ], 2)
1600
1621
  ]))), 128))
1601
- ])) : g("", !0),
1622
+ ])) : y("", !0),
1602
1623
  n.data.created_at ? (l(), c("div", Fn, [
1603
1624
  e[4] || (e[4] = i("svg", {
1604
1625
  width: "11",
@@ -1620,11 +1641,11 @@ function Dn(t, e, n, a, r, s) {
1620
1641
  }),
1621
1642
  i("path", { d: "M16 2v4M8 2v4M3 10h18" })
1622
1643
  ], -1)),
1623
- i("span", null, b(s.formattedDate), 1)
1624
- ])) : g("", !0)
1644
+ i("span", null, w(s.formattedDate), 1)
1645
+ ])) : y("", !0)
1625
1646
  ]);
1626
1647
  }
1627
- const Nn = /* @__PURE__ */ E(Sn, [["render", Dn], ["__scopeId", "data-v-8b274eb7"]]), jn = {
1648
+ const Nn = /* @__PURE__ */ $(Sn, [["render", Dn], ["__scopeId", "data-v-8b274eb7"]]), jn = {
1628
1649
  form_response: cn,
1629
1650
  info_card: Cn,
1630
1651
  ticket: Nn
@@ -1644,12 +1665,12 @@ const Nn = /* @__PURE__ */ E(Sn, [["render", Dn], ["__scopeId", "data-v-8b274eb7
1644
1665
  }
1645
1666
  };
1646
1667
  function Pn(t, e, n, a, r, s) {
1647
- return s.component ? (l(), $(Me(s.component), {
1668
+ return s.component ? (l(), L(Me(s.component), {
1648
1669
  key: 0,
1649
1670
  data: n.artifact.data
1650
- }, null, 8, ["data"])) : g("", !0);
1671
+ }, null, 8, ["data"])) : y("", !0);
1651
1672
  }
1652
- const Hn = /* @__PURE__ */ E(Un, [["render", Pn]]), zn = {
1673
+ const Hn = /* @__PURE__ */ $(Un, [["render", Pn]]), zn = {
1653
1674
  name: "WmAttachmentPreview",
1654
1675
  inject: {
1655
1676
  signAttachmentFn: { default: null }
@@ -1706,14 +1727,14 @@ const Hn = /* @__PURE__ */ E(Un, [["render", Pn]]), zn = {
1706
1727
  }, Vn = ["href"], qn = ["src", "alt"], Wn = ["src"], Kn = ["src"], Gn = ["href", "download"], Yn = { class: "wm-att__main" }, Jn = { class: "wm-att__name" }, Xn = {
1707
1728
  key: 0,
1708
1729
  class: "wm-att__meta"
1709
- }, Qn = {
1730
+ }, Zn = {
1710
1731
  key: 0,
1711
1732
  class: "wm-att__spin",
1712
1733
  "aria-hidden": "true"
1713
1734
  };
1714
- function Zn(t, e, n, a, r, s) {
1735
+ function Qn(t, e, n, a, r, s) {
1715
1736
  return l(), c("div", {
1716
- class: B(["wm-att", ["wm-att--" + (s.kind || "file")]])
1737
+ class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
1717
1738
  }, [
1718
1739
  s.kind === "image" && r.url ? (l(), c("a", {
1719
1740
  key: 0,
@@ -1763,27 +1784,27 @@ function Zn(t, e, n, a, r, s) {
1763
1784
  ])
1764
1785
  ], -1)),
1765
1786
  i("span", Yn, [
1766
- i("span", Jn, b(s.displayName), 1),
1767
- s.sizeLabel ? (l(), c("span", Xn, b(s.sizeLabel), 1)) : g("", !0)
1787
+ i("span", Jn, w(s.displayName), 1),
1788
+ s.sizeLabel ? (l(), c("span", Xn, w(s.sizeLabel), 1)) : y("", !0)
1768
1789
  ]),
1769
- r.loading ? (l(), c("span", Qn)) : g("", !0)
1790
+ r.loading ? (l(), c("span", Zn)) : y("", !0)
1770
1791
  ], 8, Gn))
1771
1792
  ], 2);
1772
1793
  }
1773
- const es = /* @__PURE__ */ E(zn, [["render", Zn], ["__scopeId", "data-v-1cd1267b"]]);
1794
+ const es = /* @__PURE__ */ $(zn, [["render", Qn], ["__scopeId", "data-v-1cd1267b"]]);
1774
1795
  function ts(t) {
1775
1796
  return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1776
1797
  }
1777
1798
  function ns(t) {
1778
1799
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
1779
1800
  }
1780
- const ve = "";
1801
+ const pe = "";
1781
1802
  function re(t) {
1782
1803
  let e = t;
1783
1804
  const n = [];
1784
1805
  return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
1785
1806
  const s = n.length;
1786
- return n.push(r), `${ve}CODE${s}${ve}`;
1807
+ return n.push(r), `${pe}CODE${s}${pe}`;
1787
1808
  }), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => ns(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), e = e.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), e = e.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), e = e.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/CODE(\d+)/g, (a, r) => `<code class="wm-md-code">${n[+r]}</code>`), e;
1788
1809
  }
1789
1810
  function ss(t) {
@@ -1812,20 +1833,20 @@ function ss(t) {
1812
1833
  if (!S) break;
1813
1834
  k.push(S[1]), a++;
1814
1835
  }
1815
- const w = k.map((S) => `<li>${re(S)}</li>`).join("");
1816
- n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
1836
+ const b = k.map((S) => `<li>${re(S)}</li>`).join("");
1837
+ n.push({ type: "block", html: `<ul class="wm-md-ul">${b}</ul>` });
1817
1838
  continue;
1818
1839
  }
1819
1840
  const d = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1820
1841
  if (d) {
1821
- const k = parseInt(d[1], 10), w = [d[2]];
1842
+ const k = parseInt(d[1], 10), b = [d[2]];
1822
1843
  for (a++; a < e.length; ) {
1823
1844
  const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
1824
1845
  if (!A) break;
1825
- w.push(A[1]), a++;
1846
+ b.push(A[1]), a++;
1826
1847
  }
1827
- const S = w.map((A) => `<li>${re(A)}</li>`).join(""), R = k !== 1 ? ` start="${k}"` : "";
1828
- n.push({ type: "block", html: `<ol class="wm-md-ol"${R}>${S}</ol>` });
1848
+ const S = b.map((A) => `<li>${re(A)}</li>`).join(""), F = k !== 1 ? ` start="${k}"` : "";
1849
+ n.push({ type: "block", html: `<ol class="wm-md-ol"${F}>${S}</ol>` });
1829
1850
  continue;
1830
1851
  }
1831
1852
  const v = /^(#{1,6})\s+(.*)$/.exec(s);
@@ -1864,14 +1885,14 @@ const rs = {
1864
1885
  }, is = ["innerHTML"];
1865
1886
  function as(t, e, n, a, r, s) {
1866
1887
  return l(), c("div", {
1867
- class: B(["wm-bubble", "wm-bubble--" + n.role])
1888
+ class: E(["wm-bubble", "wm-bubble--" + n.role])
1868
1889
  }, [
1869
1890
  Oe(t.$slots, "default", {}, () => [
1870
1891
  i("span", { innerHTML: s.rendered }, null, 8, is)
1871
1892
  ], !0)
1872
1893
  ], 2);
1873
1894
  }
1874
- const os = /* @__PURE__ */ E(rs, [["render", as], ["__scopeId", "data-v-5c9e9f2b"]]), ls = { name: "WmTyping" }, ds = { class: "wm-typing" };
1895
+ const os = /* @__PURE__ */ $(rs, [["render", as], ["__scopeId", "data-v-5c9e9f2b"]]), ls = { name: "WmTyping" }, ds = { class: "wm-typing" };
1875
1896
  function cs(t, e, n, a, r, s) {
1876
1897
  return l(), c("div", ds, [...e[0] || (e[0] = [
1877
1898
  i("span", { style: { "animation-delay": "0s" } }, null, -1),
@@ -1879,7 +1900,7 @@ function cs(t, e, n, a, r, s) {
1879
1900
  i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
1880
1901
  ])]);
1881
1902
  }
1882
- const us = /* @__PURE__ */ E(ls, [["render", cs], ["__scopeId", "data-v-df2447fd"]]);
1903
+ const us = /* @__PURE__ */ $(ls, [["render", cs], ["__scopeId", "data-v-df2447fd"]]);
1883
1904
  function ee(t) {
1884
1905
  return t ? t.client_msg_id || t.id : "";
1885
1906
  }
@@ -1892,7 +1913,7 @@ const hs = {
1892
1913
  idle: "Conversation en pause"
1893
1914
  }, ms = 80, fs = 200, _s = {
1894
1915
  name: "WmMessageList",
1895
- components: { AIAvatar: te, HumanAvatar: Ce, Bubble: os, Typing: us, ActionResult: tn, AttachmentPreview: es, ArtifactRenderer: Hn },
1916
+ components: { AIAvatar: ne, HumanAvatar: ke, Bubble: os, Typing: us, ActionResult: tn, AttachmentPreview: es, ArtifactRenderer: Hn },
1896
1917
  props: {
1897
1918
  messages: { type: Array, default: () => [] },
1898
1919
  streamingActive: { type: Boolean, default: !1 },
@@ -2197,10 +2218,10 @@ const hs = {
2197
2218
  // adjacent à une `bubble`) : mon coin déborde le voisin et
2198
2219
  // doit garder son arrondi.
2199
2220
  cornersFor(t, e) {
2200
- var Y, z, Q;
2201
- const n = t.items, a = (Y = n[e]) == null ? void 0 : Y.kind, r = (z = n[e - 1]) == null ? void 0 : z.kind, s = (Q = n[e + 1]) == null ? void 0 : Q.kind, o = t.role === "user", d = 14, v = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, S = this.widthByKey[this.rowKeyOf(t, e)], R = this.widthByKey[this.rowKeyOf(t, e - 1)], A = this.widthByKey[this.rowKeyOf(t, e + 1)], U = 0.5, x = (W, V, Z) => W != null && S != null ? W + U >= S : V === Z || V === "card" && Z === "bubble";
2202
- let j = d, P = d, F = d, H = d;
2203
- return o ? (k && (P = v), (w || !s) && (F = v), k && x(R, k, a == null ? void 0 : a.top) && (j = v), w && x(A, w, a == null ? void 0 : a.bottom) && (H = v)) : (k && (j = v), (w || !s) && (H = v), k && x(R, k, a == null ? void 0 : a.top) && (P = v), w && x(A, w, a == null ? void 0 : a.bottom) && (F = v)), { tl: j, tr: P, br: F, bl: H };
2221
+ var Y, z, Z;
2222
+ const n = t.items, a = (Y = n[e]) == null ? void 0 : Y.kind, r = (z = n[e - 1]) == null ? void 0 : z.kind, s = (Z = n[e + 1]) == null ? void 0 : Z.kind, o = t.role === "user", d = 14, v = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, S = this.widthByKey[this.rowKeyOf(t, e)], F = this.widthByKey[this.rowKeyOf(t, e - 1)], A = this.widthByKey[this.rowKeyOf(t, e + 1)], U = 0.5, x = (W, V, Q) => W != null && S != null ? W + U >= S : V === Q || V === "card" && Q === "bubble";
2223
+ let j = d, P = d, R = d, H = d;
2224
+ return o ? (k && (P = v), (b || !s) && (R = v), k && x(F, k, a == null ? void 0 : a.top) && (j = v), b && x(A, b, a == null ? void 0 : a.bottom) && (H = v)) : (k && (j = v), (b || !s) && (H = v), k && x(F, k, a == null ? void 0 : a.top) && (P = v), b && x(A, b, a == null ? void 0 : a.bottom) && (R = v)), { tl: j, tr: P, br: R, bl: H };
2204
2225
  },
2205
2226
  // Inline style emitting the four corner CSS variables. Set on
2206
2227
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -2262,7 +2283,7 @@ const hs = {
2262
2283
  const e = t.items[t.items.length - 1], n = (e == null ? void 0 : e.message) || t.messages[t.messages.length - 1];
2263
2284
  if (!(n != null && n.created_at)) return "";
2264
2285
  try {
2265
- return ke(new Date(n.created_at));
2286
+ return be(new Date(n.created_at));
2266
2287
  } catch {
2267
2288
  return "";
2268
2289
  }
@@ -2345,10 +2366,10 @@ const hs = {
2345
2366
  class: "wm-list__row wm-list__row--ai fade-up"
2346
2367
  }, Is = { class: "wm-list__avatarSlot" };
2347
2368
  function Bs(t, e, n, a, r, s) {
2348
- const o = I("AIAvatar"), d = I("HumanAvatar"), v = I("ActionResult"), k = I("ArtifactRenderer"), w = I("Bubble"), S = I("AttachmentPreview"), R = I("Typing");
2369
+ const o = B("AIAvatar"), d = B("HumanAvatar"), v = B("ActionResult"), k = B("ArtifactRenderer"), b = B("Bubble"), S = B("AttachmentPreview"), F = B("Typing");
2349
2370
  return l(), c("div", {
2350
2371
  ref: "scrollEl",
2351
- class: B(["wm-list", { "wm-list--silent": r.silentFades }]),
2372
+ class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
2352
2373
  onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
2353
2374
  }, [
2354
2375
  n.loadingMore ? (l(), c("div", ps, [...e[1] || (e[1] = [
@@ -2357,92 +2378,92 @@ function Bs(t, e, n, a, r, s) {
2357
2378
  "aria-hidden": "true"
2358
2379
  }, null, -1),
2359
2380
  i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
2360
- ])])) : s.historyExhausted ? (l(), c("div", vs, "Début de la conversation")) : g("", !0),
2381
+ ])])) : s.historyExhausted ? (l(), c("div", vs, "Début de la conversation")) : y("", !0),
2361
2382
  n.dateLabel ? (l(), c("div", gs, [
2362
2383
  e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
2363
- i("span", ys, b(n.dateLabel), 1),
2384
+ i("span", ys, w(n.dateLabel), 1),
2364
2385
  e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
2365
- ])) : g("", !0),
2366
- (l(!0), c(T, null, D(s.groups, (A, U) => (l(), c(T, {
2386
+ ])) : y("", !0),
2387
+ (l(!0), c(M, null, D(s.groups, (A, U) => (l(), c(M, {
2367
2388
  key: A.key
2368
2389
  }, [
2369
2390
  A.key === s.unreadGroupKey ? (l(), c("div", ws, [...e[4] || (e[4] = [
2370
2391
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
2371
2392
  i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
2372
2393
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
2373
- ])])) : g("", !0),
2394
+ ])])) : y("", !0),
2374
2395
  A.role === "system" || A.items.length ? (l(), c("div", {
2375
2396
  key: 1,
2376
- class: B(["wm-list__group", "wm-list__group--" + A.role])
2397
+ class: E(["wm-list__group", "wm-list__group--" + A.role])
2377
2398
  }, [
2378
2399
  A.role === "system" ? (l(), c("div", bs, [
2379
2400
  e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
2380
- i("span", ks, b(A.systemLabel), 1),
2401
+ i("span", ks, w(A.systemLabel), 1),
2381
2402
  e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
2382
- ])) : (l(), c(T, { key: 1 }, [
2383
- (l(!0), c(T, null, D(A.items, (x, j) => (l(), c("div", {
2403
+ ])) : (l(), c(M, { key: 1 }, [
2404
+ (l(!0), c(M, null, D(A.items, (x, j) => (l(), c("div", {
2384
2405
  key: `${s.messageKey(x.message)}-${x.partKey}`,
2385
2406
  "data-row-key": `${s.messageKey(x.message)}-${x.partKey}`,
2386
- class: B(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
2407
+ class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
2387
2408
  style: G(s.cornersStyle(A, j))
2388
2409
  }, [
2389
2410
  A.role !== "user" ? (l(), c("div", As, [
2390
- j === A.items.length - 1 ? (l(), c(T, { key: 0 }, [
2391
- A.role === "ai" ? (l(), $(o, {
2411
+ j === A.items.length - 1 ? (l(), c(M, { key: 0 }, [
2412
+ A.role === "ai" ? (l(), L(o, {
2392
2413
  key: 0,
2393
2414
  size: 26,
2394
2415
  tail: !0
2395
- })) : (l(), $(d, {
2416
+ })) : (l(), L(d, {
2396
2417
  key: 1,
2397
2418
  name: A.agentName,
2398
2419
  "avatar-url": A.agentAvatarUrl,
2399
2420
  size: 26
2400
2421
  }, null, 8, ["name", "avatar-url"]))
2401
- ], 64)) : g("", !0)
2402
- ])) : g("", !0),
2403
- x.renderAs === "action" ? (l(), $(v, {
2422
+ ], 64)) : y("", !0)
2423
+ ])) : y("", !0),
2424
+ x.renderAs === "action" ? (l(), L(v, {
2404
2425
  key: 1,
2405
2426
  state: x.message.payload.state,
2406
2427
  label: s.actionLabel(x.message),
2407
2428
  detail: s.actionDetail(x.message)
2408
- }, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), $(v, {
2429
+ }, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), L(v, {
2409
2430
  key: 2,
2410
2431
  state: "awaiting",
2411
2432
  label: "Demande d'approbation envoyée",
2412
2433
  detail: x.message.text_md || ""
2413
- }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), $(k, {
2434
+ }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), L(k, {
2414
2435
  key: 3,
2415
2436
  artifact: s.actionArtifact(x.message)
2416
- }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), $(k, {
2437
+ }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), L(k, {
2417
2438
  key: 4,
2418
2439
  artifact: s.artifactOf(x.message)
2419
2440
  }, null, 8, ["artifact"])) : (l(), c("div", Ss, [
2420
- x.message.text_md ? (l(), $(w, {
2441
+ x.message.text_md ? (l(), L(b, {
2421
2442
  key: 0,
2422
2443
  role: A.role,
2423
2444
  text: x.message.text_md
2424
- }, null, 8, ["role", "text"])) : g("", !0),
2445
+ }, null, 8, ["role", "text"])) : y("", !0),
2425
2446
  s.attachmentsOf(x.message).length ? (l(), c("div", {
2426
2447
  key: 1,
2427
- class: B(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2448
+ class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2428
2449
  }, [
2429
- (l(!0), c(T, null, D(s.attachmentsOf(x.message), (P, F) => (l(), $(S, {
2430
- key: `${s.messageKey(x.message)}-att-${F}`,
2450
+ (l(!0), c(M, null, D(s.attachmentsOf(x.message), (P, R) => (l(), L(S, {
2451
+ key: `${s.messageKey(x.message)}-att-${R}`,
2431
2452
  attachment: P
2432
2453
  }, null, 8, ["attachment"]))), 128))
2433
- ], 2)) : g("", !0)
2454
+ ], 2)) : y("", !0)
2434
2455
  ]))
2435
2456
  ], 14, Cs))), 128)),
2436
2457
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (l(), c("div", {
2437
2458
  key: 0,
2438
- class: B(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
2459
+ class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
2439
2460
  }, [
2440
- A.role !== "user" ? (l(), c("span", xs, b(s.roleLabel(A)), 1)) : g("", !0),
2441
- A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", Ts, "·")) : g("", !0),
2442
- s.lastTimeOf(A) ? (l(), c("span", Ms, b(s.lastTimeOf(A)), 1)) : g("", !0)
2443
- ], 2)) : g("", !0)
2461
+ A.role !== "user" ? (l(), c("span", xs, w(s.roleLabel(A)), 1)) : y("", !0),
2462
+ A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", Ts, "·")) : y("", !0),
2463
+ s.lastTimeOf(A) ? (l(), c("span", Ms, w(s.lastTimeOf(A)), 1)) : y("", !0)
2464
+ ], 2)) : y("", !0)
2444
2465
  ], 64))
2445
- ], 2)) : g("", !0)
2466
+ ], 2)) : y("", !0)
2446
2467
  ], 64))), 128)),
2447
2468
  n.streamingActive ? (l(), c("div", Os, [
2448
2469
  i("div", Is, [
@@ -2451,13 +2472,13 @@ function Bs(t, e, n, a, r, s) {
2451
2472
  tail: !0
2452
2473
  })
2453
2474
  ]),
2454
- K(R)
2455
- ])) : g("", !0)
2475
+ K(F)
2476
+ ])) : y("", !0)
2456
2477
  ], 34);
2457
2478
  }
2458
- const Es = /* @__PURE__ */ E(_s, [["render", Bs], ["__scopeId", "data-v-6bd35fa5"]]), oe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", me = typeof window < "u" && typeof window.MediaRecorder < "u";
2479
+ const Es = /* @__PURE__ */ $(_s, [["render", Bs], ["__scopeId", "data-v-6bd35fa5"]]), oe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2459
2480
  function $s() {
2460
- return me && [
2481
+ return he && [
2461
2482
  "video/webm;codecs=vp9,opus",
2462
2483
  "video/webm;codecs=vp8,opus",
2463
2484
  "video/webm",
@@ -2467,7 +2488,7 @@ function $s() {
2467
2488
  return (a = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : a.call(n, e);
2468
2489
  }) || "";
2469
2490
  }
2470
- function Ae({ audio: t }) {
2491
+ function Ce({ audio: t }) {
2471
2492
  return {
2472
2493
  video: !0,
2473
2494
  audio: !!t,
@@ -2483,7 +2504,7 @@ async function Ls() {
2483
2504
  if (!oe) return null;
2484
2505
  let t;
2485
2506
  try {
2486
- t = await navigator.mediaDevices.getDisplayMedia(Ae({ audio: !1 }));
2507
+ t = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !1 }));
2487
2508
  } catch (e) {
2488
2509
  return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
2489
2510
  }
@@ -2509,58 +2530,58 @@ async function Rs(t) {
2509
2530
  }
2510
2531
  async function Fs(t = {}) {
2511
2532
  var k;
2512
- if (!oe || !me) return null;
2533
+ if (!oe || !he) return null;
2513
2534
  let e;
2514
2535
  try {
2515
- e = await navigator.mediaDevices.getDisplayMedia(Ae({ audio: !0 }));
2516
- } catch (w) {
2517
- return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
2536
+ e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
2537
+ } catch (b) {
2538
+ return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
2518
2539
  }
2519
2540
  const n = $s();
2520
2541
  let a;
2521
2542
  try {
2522
2543
  a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
2523
- } catch (w) {
2524
- return console.error("[media] recorder init", w), e.getTracks().forEach((S) => {
2544
+ } catch (b) {
2545
+ return console.error("[media] recorder init", b), e.getTracks().forEach((S) => {
2525
2546
  S.stop();
2526
2547
  }), null;
2527
2548
  }
2528
2549
  const r = [];
2529
2550
  let s = null, o = !1;
2530
- a.addEventListener("dataavailable", (w) => {
2531
- w.data && w.data.size > 0 && r.push(w.data);
2551
+ a.addEventListener("dataavailable", (b) => {
2552
+ b.data && b.data.size > 0 && r.push(b.data);
2532
2553
  }), a.addEventListener("stop", () => {
2533
- var w, S;
2534
- if (s && clearInterval(s), e.getTracks().forEach((R) => {
2535
- R.stop();
2554
+ var b, S;
2555
+ if (s && clearInterval(s), e.getTracks().forEach((F) => {
2556
+ F.stop();
2536
2557
  }), r.length) {
2537
- const R = a.mimeType || n || "video/webm", A = new Blob(r, { type: R }), U = /mp4/.test(R) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${x}.${U}`, { type: R });
2538
- (w = t.onfinalize) == null || w.call(t, j);
2558
+ const F = a.mimeType || n || "video/webm", A = new Blob(r, { type: F }), U = /mp4/.test(F) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${x}.${U}`, { type: F });
2559
+ (b = t.onfinalize) == null || b.call(t, j);
2539
2560
  } else
2540
2561
  (S = t.oncancel) == null || S.call(t);
2541
- }), e.getVideoTracks().forEach((w) => {
2542
- w.addEventListener("ended", () => d(), { once: !0 });
2562
+ }), e.getVideoTracks().forEach((b) => {
2563
+ b.addEventListener("ended", () => d(), { once: !0 });
2543
2564
  });
2544
2565
  function d() {
2545
2566
  if (!o && (o = !0, a.state !== "inactive"))
2546
2567
  try {
2547
2568
  a.stop();
2548
- } catch (w) {
2549
- console.error("[media] recorder stop", w);
2569
+ } catch (b) {
2570
+ console.error("[media] recorder stop", b);
2550
2571
  }
2551
2572
  }
2552
2573
  try {
2553
2574
  a.start(1e3);
2554
- } catch (w) {
2555
- return console.error("[media] recorder start", w), e.getTracks().forEach((S) => {
2575
+ } catch (b) {
2576
+ return console.error("[media] recorder start", b), e.getTracks().forEach((S) => {
2556
2577
  S.stop();
2557
2578
  }), null;
2558
2579
  }
2559
2580
  (k = t.onstart) == null || k.call(t);
2560
2581
  const v = Date.now();
2561
2582
  return s = setInterval(() => {
2562
- var w;
2563
- (w = t.ontick) == null || w.call(t, Date.now() - v);
2583
+ var b;
2584
+ (b = t.ontick) == null || b.call(t, Date.now() - v);
2564
2585
  }, 500), {
2565
2586
  stop: d,
2566
2587
  get state() {
@@ -2609,7 +2630,7 @@ const Ds = [
2609
2630
  attachItems() {
2610
2631
  return Ds.map((t) => ({
2611
2632
  ...t,
2612
- disabled: t.action === "screenshot" && !oe || t.action === "record" && (!oe || !me)
2633
+ disabled: t.action === "screenshot" && !oe || t.action === "record" && (!oe || !he)
2613
2634
  }));
2614
2635
  },
2615
2636
  recordingElapsedLabel() {
@@ -2730,15 +2751,15 @@ function Xs(t, e, n, a, r, s) {
2730
2751
  class: "wm-rec__dot",
2731
2752
  "aria-hidden": "true"
2732
2753
  }, null, -1)),
2733
- i("span", Ps, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
2754
+ i("span", Ps, "Enregistrement · " + w(s.recordingElapsedLabel), 1),
2734
2755
  i("button", {
2735
2756
  type: "button",
2736
2757
  class: "wm-rec__stop",
2737
2758
  onClick: e[0] || (e[0] = (...o) => s.stopRecording && s.stopRecording(...o))
2738
2759
  }, "Arrêter")
2739
- ])) : g("", !0),
2760
+ ])) : y("", !0),
2740
2761
  i("form", {
2741
- class: B(["wm-compose", { "has-attach": r.attachOpen }]),
2762
+ class: E(["wm-compose", { "has-attach": r.attachOpen }]),
2742
2763
  onSubmit: e[7] || (e[7] = X((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
2743
2764
  }, [
2744
2765
  i("input", {
@@ -2752,9 +2773,9 @@ function Xs(t, e, n, a, r, s) {
2752
2773
  key: 0,
2753
2774
  class: "wm-compose__overlay",
2754
2775
  onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
2755
- })) : g("", !0),
2776
+ })) : y("", !0),
2756
2777
  r.attachOpen ? (l(), c("div", Hs, [
2757
- (l(!0), c(T, null, D(s.attachItems, (o) => (l(), c("button", {
2778
+ (l(!0), c(M, null, D(s.attachItems, (o) => (l(), c("button", {
2758
2779
  key: o.action,
2759
2780
  type: "button",
2760
2781
  class: "wm-compose__menuItem",
@@ -2773,9 +2794,9 @@ function Xs(t, e, n, a, r, s) {
2773
2794
  }, null, 8, Ws)
2774
2795
  ]))
2775
2796
  ]),
2776
- i("span", null, b(o.label), 1)
2797
+ i("span", null, w(o.label), 1)
2777
2798
  ], 8, zs))), 128))
2778
- ])) : g("", !0),
2799
+ ])) : y("", !0),
2779
2800
  q(i("textarea", {
2780
2801
  ref: "inputEl",
2781
2802
  "onUpdate:modelValue": e[3] || (e[3] = (o) => r.local = o),
@@ -2791,7 +2812,7 @@ function Xs(t, e, n, a, r, s) {
2791
2812
  i("div", Gs, [
2792
2813
  i("button", {
2793
2814
  type: "button",
2794
- class: B(["wm-compose__icon", { "is-open": r.attachOpen }]),
2815
+ class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
2795
2816
  title: n.attachLabel,
2796
2817
  "aria-label": n.attachLabel,
2797
2818
  disabled: r.recording,
@@ -2813,7 +2834,7 @@ function Xs(t, e, n, a, r, s) {
2813
2834
  ])], 10, Ys),
2814
2835
  i("button", {
2815
2836
  type: "submit",
2816
- class: B(["wm-compose__send", { "is-empty": !s.canSend }]),
2837
+ class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
2817
2838
  disabled: !s.canSend,
2818
2839
  "aria-label": "Envoyer"
2819
2840
  }, [...e[10] || (e[10] = [
@@ -2835,7 +2856,7 @@ function Xs(t, e, n, a, r, s) {
2835
2856
  ], 34)
2836
2857
  ]);
2837
2858
  }
2838
- const Qs = /* @__PURE__ */ E(Ns, [["render", Xs], ["__scopeId", "data-v-14fa9ec0"]]), Zs = {
2859
+ const Zs = /* @__PURE__ */ $(Ns, [["render", Xs], ["__scopeId", "data-v-14fa9ec0"]]), Qs = {
2839
2860
  name: "WmSuggestionChips",
2840
2861
  props: {
2841
2862
  items: { type: Array, default: () => [] },
@@ -2858,18 +2879,18 @@ function tr(t, e, n, a, r, s) {
2858
2879
  key: s.batchKey,
2859
2880
  class: "wm-chips"
2860
2881
  }, [
2861
- (l(!0), c(T, null, D(n.items, (o, d) => (l(), c("button", {
2882
+ (l(!0), c(M, null, D(n.items, (o, d) => (l(), c("button", {
2862
2883
  key: d,
2863
2884
  type: "button",
2864
2885
  class: "wm-chip",
2865
2886
  style: G({ animationDelay: n.baseDelay + d * n.stepDelay + "ms" }),
2866
2887
  onClick: (v) => t.$emit("select", o)
2867
- }, b(o.label), 13, er))), 128))
2868
- ])) : g("", !0);
2888
+ }, w(o.label), 13, er))), 128))
2889
+ ])) : y("", !0);
2869
2890
  }
2870
- const nr = /* @__PURE__ */ E(Zs, [["render", tr], ["__scopeId", "data-v-55aa529d"]]), sr = {
2891
+ const nr = /* @__PURE__ */ $(Qs, [["render", tr], ["__scopeId", "data-v-55aa529d"]]), sr = {
2871
2892
  name: "WmApprovalCard",
2872
- components: { AIAvatar: te },
2893
+ components: { AIAvatar: ne },
2873
2894
  props: {
2874
2895
  action: { type: String, required: !0 },
2875
2896
  detail: { type: String, default: "" },
@@ -2905,15 +2926,15 @@ const nr = /* @__PURE__ */ E(Zs, [["render", tr], ["__scopeId", "data-v-55aa529d
2905
2926
  class: "wm-approval__detail"
2906
2927
  }, cr = { class: "wm-approval__actions" };
2907
2928
  function ur(t, e, n, a, r, s) {
2908
- const o = I("AIAvatar");
2929
+ const o = B("AIAvatar");
2909
2930
  return l(), c("div", rr, [
2910
2931
  i("div", ir, [
2911
2932
  i("div", ar, [
2912
2933
  K(o, { size: 24 })
2913
2934
  ]),
2914
2935
  i("div", or, [
2915
- i("div", lr, b(n.action), 1),
2916
- n.detail ? (l(), c("div", dr, b(n.detail), 1)) : g("", !0)
2936
+ i("div", lr, w(n.action), 1),
2937
+ n.detail ? (l(), c("div", dr, w(n.detail), 1)) : y("", !0)
2917
2938
  ])
2918
2939
  ]),
2919
2940
  i("div", cr, [
@@ -2922,18 +2943,18 @@ function ur(t, e, n, a, r, s) {
2922
2943
  type: "button",
2923
2944
  class: "wm-approval__btn wm-approval__btn--neutral",
2924
2945
  onClick: e[0] || (e[0] = (d) => t.$emit("callback", s.rejectId))
2925
- }, b(s.rejectLabel), 1)) : g("", !0),
2946
+ }, w(s.rejectLabel), 1)) : y("", !0),
2926
2947
  s.approveId ? (l(), c("button", {
2927
2948
  key: 1,
2928
2949
  type: "button",
2929
2950
  class: "wm-approval__btn wm-approval__btn--primary",
2930
2951
  onClick: e[1] || (e[1] = (d) => t.$emit("callback", s.approveId))
2931
- }, b(s.approveLabel), 1)) : g("", !0)
2952
+ }, w(s.approveLabel), 1)) : y("", !0)
2932
2953
  ])
2933
2954
  ]);
2934
2955
  }
2935
- const hr = /* @__PURE__ */ E(sr, [["render", ur], ["__scopeId", "data-v-b1be139c"]]);
2936
- let ge = 0;
2956
+ const hr = /* @__PURE__ */ $(sr, [["render", ur], ["__scopeId", "data-v-b1be139c"]]);
2957
+ let ve = 0;
2937
2958
  const mr = /* @__PURE__ */ new Set([
2938
2959
  "text",
2939
2960
  "textarea",
@@ -2944,7 +2965,7 @@ const mr = /* @__PURE__ */ new Set([
2944
2965
  "date"
2945
2966
  ]), fr = {
2946
2967
  name: "WmFormCard",
2947
- components: { AIAvatar: te },
2968
+ components: { AIAvatar: ne },
2948
2969
  props: {
2949
2970
  form: { type: Object, required: !0 },
2950
2971
  readOnly: { type: Boolean, default: !1 },
@@ -2952,8 +2973,8 @@ const mr = /* @__PURE__ */ new Set([
2952
2973
  },
2953
2974
  emits: ["submit"],
2954
2975
  data() {
2955
- return ge += 1, {
2956
- _uid: ge,
2976
+ return ve += 1, {
2977
+ _uid: ve,
2957
2978
  values: {},
2958
2979
  busy: !1,
2959
2980
  error: ""
@@ -3044,22 +3065,22 @@ const mr = /* @__PURE__ */ new Set([
3044
3065
  class: "wm-form__doneLbl"
3045
3066
  };
3046
3067
  function Nr(t, e, n, a, r, s) {
3047
- const o = I("AIAvatar");
3068
+ const o = B("AIAvatar");
3048
3069
  return l(), c("div", _r, [
3049
3070
  i("div", pr, [
3050
3071
  i("div", vr, [
3051
3072
  K(o, { size: 24 })
3052
3073
  ]),
3053
3074
  i("div", gr, [
3054
- i("div", yr, b(n.form.title || "Formulaire"), 1),
3055
- n.form.description ? (l(), c("div", wr, b(n.form.description), 1)) : g("", !0)
3075
+ i("div", yr, w(n.form.title || "Formulaire"), 1),
3076
+ n.form.description ? (l(), c("div", wr, w(n.form.description), 1)) : y("", !0)
3056
3077
  ])
3057
3078
  ]),
3058
3079
  i("form", {
3059
3080
  class: "wm-form__body",
3060
3081
  onSubmit: e[0] || (e[0] = X((...d) => s.onSubmit && s.onSubmit(...d), ["prevent"]))
3061
3082
  }, [
3062
- (l(!0), c(T, null, D(s.normalizedFields, (d) => (l(), c("div", {
3083
+ (l(!0), c(M, null, D(s.normalizedFields, (d) => (l(), c("div", {
3063
3084
  key: d.key,
3064
3085
  class: "wm-form__field"
3065
3086
  }, [
@@ -3067,8 +3088,8 @@ function Nr(t, e, n, a, r, s) {
3067
3088
  for: `wm-f-${r._uid}-${d.key}`,
3068
3089
  class: "wm-form__label"
3069
3090
  }, [
3070
- de(b(d.label), 1),
3071
- d.required ? (l(), c("span", kr, "*")) : g("", !0)
3091
+ te(w(d.label), 1),
3092
+ d.required ? (l(), c("span", kr, "*")) : y("", !0)
3072
3093
  ], 8, br),
3073
3094
  d.type === "text" ? q((l(), c("input", {
3074
3095
  key: 0,
@@ -3127,7 +3148,7 @@ function Nr(t, e, n, a, r, s) {
3127
3148
  }, null, 8, Mr), [
3128
3149
  [Ie, r.values[d.key]]
3129
3150
  ]),
3130
- i("span", null, b(d.placeholder || "Oui"), 1)
3151
+ i("span", null, w(d.placeholder || "Oui"), 1)
3131
3152
  ])) : d.type === "select" ? q((l(), c("select", {
3132
3153
  key: 5,
3133
3154
  id: `wm-f-${r._uid}-${d.key}`,
@@ -3136,15 +3157,15 @@ function Nr(t, e, n, a, r, s) {
3136
3157
  required: d.required,
3137
3158
  disabled: n.readOnly || r.busy
3138
3159
  }, [
3139
- i("option", Ir, b(d.placeholder || "Choisir…"), 1),
3140
- (l(!0), c(T, null, D(d.options, (v) => (l(), c("option", {
3160
+ i("option", Ir, w(d.placeholder || "Choisir…"), 1),
3161
+ (l(!0), c(M, null, D(d.options, (v) => (l(), c("option", {
3141
3162
  key: v.value,
3142
3163
  value: v.value
3143
- }, b(v.label), 9, Br))), 128))
3164
+ }, w(v.label), 9, Br))), 128))
3144
3165
  ], 8, Or)), [
3145
3166
  [Be, r.values[d.key]]
3146
3167
  ]) : d.type === "multiselect" ? (l(), c("div", Er, [
3147
- (l(!0), c(T, null, D(d.options, (v) => (l(), c("label", {
3168
+ (l(!0), c(M, null, D(d.options, (v) => (l(), c("label", {
3148
3169
  key: v.value,
3149
3170
  class: "wm-form__multiItem"
3150
3171
  }, [
@@ -3155,24 +3176,24 @@ function Nr(t, e, n, a, r, s) {
3155
3176
  disabled: n.readOnly || r.busy,
3156
3177
  onChange: (k) => s.toggleMulti(d.key, v.value, k.target.checked)
3157
3178
  }, null, 40, $r),
3158
- i("span", null, b(v.label), 1)
3179
+ i("span", null, w(v.label), 1)
3159
3180
  ]))), 128))
3160
- ])) : g("", !0)
3181
+ ])) : y("", !0)
3161
3182
  ]))), 128)),
3162
- r.error ? (l(), c("div", Lr, b(r.error), 1)) : g("", !0),
3183
+ r.error ? (l(), c("div", Lr, w(r.error), 1)) : y("", !0),
3163
3184
  n.readOnly ? (l(), c("div", Dr, "Réponse envoyée")) : (l(), c("button", {
3164
3185
  key: 1,
3165
3186
  type: "submit",
3166
3187
  class: "wm-form__submit",
3167
3188
  disabled: r.busy
3168
3189
  }, [
3169
- r.busy ? (l(), c("span", Fr)) : g("", !0),
3170
- i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
3190
+ r.busy ? (l(), c("span", Fr)) : y("", !0),
3191
+ i("span", null, w(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
3171
3192
  ], 8, Rr))
3172
3193
  ], 32)
3173
3194
  ]);
3174
3195
  }
3175
- const jr = /* @__PURE__ */ E(fr, [["render", Nr], ["__scopeId", "data-v-64b40f76"]]), Ur = {
3196
+ const jr = /* @__PURE__ */ $(fr, [["render", Nr], ["__scopeId", "data-v-64b40f76"]]), Ur = {
3176
3197
  name: "WmFeedback",
3177
3198
  props: {
3178
3199
  busy: { type: Boolean, default: !1 },
@@ -3203,19 +3224,19 @@ const jr = /* @__PURE__ */ E(fr, [["render", Nr], ["__scopeId", "data-v-64b40f76
3203
3224
  function Gr(t, e, n, a, r, s) {
3204
3225
  return l(), c("div", Pr, [
3205
3226
  n.done ? (l(), c("div", Kr, [...e[3] || (e[3] = [
3206
- he('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
3207
- ])])) : (l(), c(T, { key: 0 }, [
3227
+ ue('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
3228
+ ])])) : (l(), c(M, { key: 0 }, [
3208
3229
  e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
3209
3230
  e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
3210
3231
  i("div", Hr, [
3211
- (l(!0), c(T, null, D(r.options, (o) => (l(), c("button", {
3232
+ (l(!0), c(M, null, D(r.options, (o) => (l(), c("button", {
3212
3233
  key: o.v,
3213
3234
  type: "button",
3214
- class: B(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
3235
+ class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
3215
3236
  onClick: (d) => r.sel = o.v
3216
3237
  }, [
3217
- i("span", Vr, b(o.e), 1),
3218
- i("span", qr, b(o.l), 1)
3238
+ i("span", Vr, w(o.e), 1),
3239
+ i("span", qr, w(o.l), 1)
3219
3240
  ], 10, zr))), 128))
3220
3241
  ]),
3221
3242
  i("button", {
@@ -3223,11 +3244,11 @@ function Gr(t, e, n, a, r, s) {
3223
3244
  class: "wm-fb__send",
3224
3245
  disabled: !r.sel || n.busy,
3225
3246
  onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
3226
- }, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Wr)
3247
+ }, w(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Wr)
3227
3248
  ], 64))
3228
3249
  ]);
3229
3250
  }
3230
- const Yr = /* @__PURE__ */ E(Ur, [["render", Gr], ["__scopeId", "data-v-6f45ff3b"]]);
3251
+ const Yr = /* @__PURE__ */ $(Ur, [["render", Gr], ["__scopeId", "data-v-6f45ff3b"]]);
3231
3252
  function Jr(t) {
3232
3253
  const e = new Date(t);
3233
3254
  return e.setHours(0, 0, 0, 0), e;
@@ -3284,7 +3305,7 @@ const Xr = {
3284
3305
  return this.filtered.length > 0;
3285
3306
  }
3286
3307
  }
3287
- }, Qr = { class: "wm-hd" }, Zr = {
3308
+ }, Zr = { class: "wm-hd" }, Qr = {
3288
3309
  class: "wm-hd__panel",
3289
3310
  role: "dialog",
3290
3311
  "aria-label": "Vos discussions"
@@ -3300,12 +3321,12 @@ const Xr = {
3300
3321
  class: "wm-hd__empty"
3301
3322
  };
3302
3323
  function _i(t, e, n, a, r, s) {
3303
- return l(), c("div", Qr, [
3324
+ return l(), c("div", Zr, [
3304
3325
  i("div", {
3305
3326
  class: "wm-hd__scrim",
3306
3327
  onClick: e[0] || (e[0] = (o) => t.$emit("close"))
3307
3328
  }),
3308
- i("aside", Zr, [
3329
+ i("aside", Qr, [
3309
3330
  i("div", ei, [
3310
3331
  e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
3311
3332
  i("div", { class: "wm-hd__title" }, "Vos discussions"),
@@ -3382,16 +3403,16 @@ function _i(t, e, n, a, r, s) {
3382
3403
  ])
3383
3404
  ]),
3384
3405
  i("div", si, [
3385
- (l(!0), c(T, null, D(s.groups, (o) => (l(), c(T, {
3406
+ (l(!0), c(M, null, D(s.groups, (o) => (l(), c(M, {
3386
3407
  key: o.key
3387
3408
  }, [
3388
3409
  o.items.length ? (l(), c("div", ri, [
3389
- i("div", ii, b(o.label), 1),
3410
+ i("div", ii, w(o.label), 1),
3390
3411
  i("div", ai, [
3391
- (l(!0), c(T, null, D(o.items, (d) => (l(), c("button", {
3412
+ (l(!0), c(M, null, D(o.items, (d) => (l(), c("button", {
3392
3413
  key: d.id,
3393
3414
  type: "button",
3394
- class: B(["wm-hd__row", {
3415
+ class: E(["wm-hd__row", {
3395
3416
  "wm-hd__row--active": d.id === n.activeId,
3396
3417
  "wm-hd__row--unread": d.unread
3397
3418
  }]),
@@ -3411,24 +3432,24 @@ function _i(t, e, n, a, r, s) {
3411
3432
  opacity: "0.92"
3412
3433
  })
3413
3434
  ], -1)),
3414
- d.unread ? (l(), c("span", di)) : g("", !0)
3435
+ d.unread ? (l(), c("span", di)) : y("", !0)
3415
3436
  ]),
3416
3437
  i("div", ci, [
3417
3438
  i("div", ui, [
3418
- i("span", hi, b(d.title), 1)
3439
+ i("span", hi, w(d.title), 1)
3419
3440
  ]),
3420
- i("div", mi, b(d.preview || "Aucun message"), 1)
3441
+ i("div", mi, w(d.preview || "Aucun message"), 1)
3421
3442
  ])
3422
3443
  ], 10, oi))), 128))
3423
3444
  ])
3424
- ])) : g("", !0)
3445
+ ])) : y("", !0)
3425
3446
  ], 64))), 128)),
3426
- s.hasAny ? g("", !0) : (l(), c("div", fi, " Aucun fil pour le moment. "))
3447
+ s.hasAny ? y("", !0) : (l(), c("div", fi, " Aucun fil pour le moment. "))
3427
3448
  ])
3428
3449
  ])
3429
3450
  ]);
3430
3451
  }
3431
- const pi = /* @__PURE__ */ E(Xr, [["render", _i], ["__scopeId", "data-v-1259e822"]]), vi = {
3452
+ const pi = /* @__PURE__ */ $(Xr, [["render", _i], ["__scopeId", "data-v-1259e822"]]), vi = {
3432
3453
  name: "WmMoreMenu",
3433
3454
  props: {
3434
3455
  canRename: { type: Boolean, default: !0 },
@@ -3494,16 +3515,16 @@ function Ci(t, e, n, a, r, s) {
3494
3515
  class: "wm-mm__item",
3495
3516
  onClick: e[2] || (e[2] = (o) => s.emit("rename"))
3496
3517
  }, [...e[8] || (e[8] = [
3497
- he('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M12 20h9" data-v-3181ad1b></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Modifier le titre</span>', 2)
3498
- ])])) : g("", !0),
3518
+ ue('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M12 20h9" data-v-3181ad1b></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Modifier le titre</span>', 2)
3519
+ ])])) : y("", !0),
3499
3520
  n.canExport ? (l(), c("button", {
3500
3521
  key: 1,
3501
3522
  type: "button",
3502
3523
  class: "wm-mm__item",
3503
3524
  onClick: e[3] || (e[3] = (o) => s.emit("export"))
3504
3525
  }, [...e[9] || (e[9] = [
3505
- he('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Exporter la transcription</span><span class="wm-mm__hint" data-v-3181ad1b>.txt</span>', 3)
3506
- ])])) : g("", !0)
3526
+ ue('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Exporter la transcription</span><span class="wm-mm__hint" data-v-3181ad1b>.txt</span>', 3)
3527
+ ])])) : y("", !0)
3507
3528
  ]),
3508
3529
  e[15] || (e[15] = i("div", { class: "wm-mm__sep" }, null, -1)),
3509
3530
  i("div", bi, [
@@ -3529,7 +3550,7 @@ function Ci(t, e, n, a, r, s) {
3529
3550
  ], -1)),
3530
3551
  e[12] || (e[12] = i("span", { class: "wm-mm__label" }, "Notifications", -1)),
3531
3552
  i("span", {
3532
- class: B(["wm-mm__toggle", { "wm-mm__toggle--on": r.notifOn }])
3553
+ class: E(["wm-mm__toggle", { "wm-mm__toggle--on": r.notifOn }])
3533
3554
  }, [...e[10] || (e[10] = [
3534
3555
  i("span", { class: "wm-mm__knob" }, null, -1)
3535
3556
  ])], 2)
@@ -3559,7 +3580,7 @@ function Ci(t, e, n, a, r, s) {
3559
3580
  ])
3560
3581
  ], -1),
3561
3582
  i("span", { class: "wm-mm__label" }, "Statut des services", -1)
3562
- ])])) : g("", !0),
3583
+ ])])) : y("", !0),
3563
3584
  n.helpUrl ? (l(), c("button", {
3564
3585
  key: 1,
3565
3586
  type: "button",
@@ -3582,12 +3603,12 @@ function Ci(t, e, n, a, r, s) {
3582
3603
  ])
3583
3604
  ], -1),
3584
3605
  i("span", { class: "wm-mm__label" }, "Centre d'aide", -1)
3585
- ])])) : g("", !0)
3606
+ ])])) : y("", !0)
3586
3607
  ])
3587
3608
  ])
3588
3609
  ]);
3589
3610
  }
3590
- const Ai = /* @__PURE__ */ E(vi, [["render", Ci], ["__scopeId", "data-v-3181ad1b"]]), Si = {
3611
+ const Ai = /* @__PURE__ */ $(vi, [["render", Ci], ["__scopeId", "data-v-3181ad1b"]]), Si = {
3591
3612
  name: "WmRenameDialog",
3592
3613
  props: {
3593
3614
  title: { type: String, default: "Modifier le titre" },
@@ -3634,7 +3655,7 @@ function Li(t, e, n, a, r, s) {
3634
3655
  }),
3635
3656
  i("div", Ti, [
3636
3657
  i("div", Mi, [
3637
- i("div", Oi, b(n.title), 1),
3658
+ i("div", Oi, w(n.title), 1),
3638
3659
  i("button", {
3639
3660
  type: "button",
3640
3661
  class: "wm-dialog__close",
@@ -3688,7 +3709,7 @@ function Li(t, e, n, a, r, s) {
3688
3709
  ])
3689
3710
  ]);
3690
3711
  }
3691
- const Ri = /* @__PURE__ */ E(Si, [["render", Li], ["__scopeId", "data-v-4f4b37c9"]]), ye = "ww-messenger-tokens";
3712
+ const Ri = /* @__PURE__ */ $(Si, [["render", Li], ["__scopeId", "data-v-4f4b37c9"]]), ge = "ww-messenger-tokens";
3692
3713
  function ie(t) {
3693
3714
  var n;
3694
3715
  const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
@@ -3746,7 +3767,7 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
3746
3767
  Header: wt,
3747
3768
  Onboarding: zt,
3748
3769
  MessageList: Es,
3749
- Composer: Qs,
3770
+ Composer: Zs,
3750
3771
  SuggestionChips: nr,
3751
3772
  ApprovalCard: hr,
3752
3773
  FormCard: jr,
@@ -4081,14 +4102,11 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4081
4102
  displayedMessages() {
4082
4103
  const t = this.currentConv;
4083
4104
  if (!t) return [];
4084
- const e = (r) => {
4085
- var s, o, d, v;
4086
- return (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.type) === "system" || Array.isArray((o = r == null ? void 0 : r.payload) == null ? void 0 : o.attachments) && r.payload.attachments.length || (d = r == null ? void 0 : r.metadata) != null && d.artifact || (v = r == null ? void 0 : r.metadata) != null && v.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
4087
- }, n = (r) => {
4088
- var s;
4089
- return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending";
4090
- }, a = this.revealedAt;
4091
- return (this.s.messagesByConv[t.id] || []).filter((r) => !n(r)).filter((r) => ie(r) ? a[r.id] > 0 : !0).filter(e);
4105
+ const e = this.revealedAt;
4106
+ return (this.s.messagesByConv[t.id] || []).filter((n) => {
4107
+ var a, r, s, o, d;
4108
+ return (n == null ? void 0 : n.type) === "action" && ((a = n == null ? void 0 : n.payload) == null ? void 0 : a.state) === "pending" || ie(n) && !(e[n.id] > 0) ? !1 : (n == null ? void 0 : n.type) === "action" || (n == null ? void 0 : n.type) === "system" || ((r = n == null ? void 0 : n.payload) == null ? void 0 : r.type) === "system" || Array.isArray((s = n == null ? void 0 : n.payload) == null ? void 0 : s.attachments) && n.payload.attachments.length || (o = n == null ? void 0 : n.metadata) != null && o.artifact || (d = n == null ? void 0 : n.metadata) != null && d.form ? !0 : typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0;
4109
+ });
4092
4110
  },
4093
4111
  // True whenever we should show the "typing" indicator at the bottom
4094
4112
  // of the list: either the LLM is actively streaming tokens, or one
@@ -4136,7 +4154,7 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4136
4154
  const e = (v = (d = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : d.pending) == null ? void 0 : v.prepared_params;
4137
4155
  if (!e || typeof e != "object") return "";
4138
4156
  const n = Object.entries(e);
4139
- return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
4157
+ return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
4140
4158
  },
4141
4159
  actionInFlight() {
4142
4160
  var t, e;
@@ -4178,7 +4196,7 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4178
4196
  Number.isNaN(d.getTime()) || (e = d);
4179
4197
  }
4180
4198
  }
4181
- return `Aujourd'hui · ${ke(e)}`;
4199
+ return `Aujourd'hui · ${be(e)}`;
4182
4200
  },
4183
4201
  // Pagination state for the active conversation. Drives the
4184
4202
  // MessageList's scroll-up history loader. Defaults are safe (no
@@ -4306,9 +4324,9 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4306
4324
  hasWidgetId: !!this.widgetId,
4307
4325
  hasUserId: !!this.userId,
4308
4326
  hasUserHash: !!this.userHash
4309
- }), typeof document < "u" && !document.getElementById(ye)) {
4327
+ }), typeof document < "u" && !document.getElementById(ge)) {
4310
4328
  const t = document.createElement("style");
4311
- t.id = ye, t.textContent = Pe, document.head.appendChild(t);
4329
+ t.id = ge, t.textContent = Pe, document.head.appendChild(t);
4312
4330
  }
4313
4331
  this.hydrateReadState(), await this.boot(), this.isEmbedded && this.store && await this.open();
4314
4332
  },
@@ -4413,11 +4431,7 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4413
4431
  n && this.readState[t.id] !== n && (this.readState = { ...this.readState, [t.id]: n }, this.persistReadState());
4414
4432
  },
4415
4433
  cancelReveals() {
4416
- for (const t of this.revealTimers)
4417
- try {
4418
- clearTimeout(t);
4419
- } catch {
4420
- }
4434
+ for (const t of this.revealTimers) clearTimeout(t);
4421
4435
  this.revealTimers = [];
4422
4436
  },
4423
4437
  // Clears any in-flight settle timer and returns the approval pacing
@@ -4426,14 +4440,7 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4426
4440
  // switch, on `pendingApproval` cleared (approve/reject/expire), and
4427
4441
  // on unmount.
4428
4442
  resetApprovalPacing() {
4429
- if (this.approvalSettleTimer) {
4430
- try {
4431
- clearTimeout(this.approvalSettleTimer);
4432
- } catch {
4433
- }
4434
- this.approvalSettleTimer = null;
4435
- }
4436
- this.approvalSettled = !0, this.approvalLatchId = null;
4443
+ this.approvalSettleTimer && (clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = null), this.approvalSettled = !0, this.approvalLatchId = null;
4437
4444
  },
4438
4445
  // Pause the approval card for one settle period. A follow-on bubble
4439
4446
  // from the same SSE burst should land (and start streaming, which
@@ -4443,12 +4450,7 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4443
4450
  // Each call resets the timer; the card reveals only after a full
4444
4451
  // quiet period.
4445
4452
  bumpApprovalSettle(t = 800) {
4446
- if (this.approvalSettled = !1, this.approvalSettleTimer)
4447
- try {
4448
- clearTimeout(this.approvalSettleTimer);
4449
- } catch {
4450
- }
4451
- this.approvalSettleTimer = setTimeout(() => {
4453
+ this.approvalSettled = !1, this.approvalSettleTimer && clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = setTimeout(() => {
4452
4454
  this.approvalSettled = !0, this.approvalSettleTimer = null;
4453
4455
  }, t);
4454
4456
  },
@@ -4467,13 +4469,9 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4467
4469
  ) + a;
4468
4470
  this.nextRevealAt = s;
4469
4471
  const o = Math.max(0, s - e), d = t.id, v = setTimeout(() => {
4470
- this.revealedAt = { ...this.revealedAt, [d]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== v);
4472
+ this.revealedAt = { ...this.revealedAt, [d]: Date.now() }, this.revealTimers = this.revealTimers.filter((k) => k !== v);
4471
4473
  }, o);
4472
4474
  this.revealTimers.push(v);
4473
- const k = setTimeout(() => {
4474
- this.revealedAt[d] > 0 || (this.revealedAt = { ...this.revealedAt, [d]: Date.now() }), this.revealTimers = this.revealTimers.filter((w) => w !== k);
4475
- }, o + 4e3);
4476
- this.revealTimers.push(k);
4477
4475
  },
4478
4476
  async boot() {
4479
4477
  if (!this.canBoot) {
@@ -4490,12 +4488,12 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4490
4488
  baseUrl: this.baseUrl,
4491
4489
  widgetId: this.widgetId,
4492
4490
  userId: this.userId
4493
- }), this.transport = fe(Fe({
4491
+ }), this.transport = me(Fe({
4494
4492
  baseUrl: this.baseUrl,
4495
4493
  widgetId: this.widgetId,
4496
4494
  userId: this.userId,
4497
4495
  userHash: this.userHash
4498
- })), this.store = fe(Ue(this.transport)), this.hydrateNotifPref(), this.setupNotifications(), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
4496
+ })), this.store = me(Ue(this.transport)), this.hydrateNotifPref(), this.setupNotifications(), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
4499
4497
  ready: this.store.state.ready,
4500
4498
  error: this.store.state.error
4501
4499
  });
@@ -4741,18 +4739,18 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4741
4739
  t.created_at ? `Créée le : ${t.created_at}` : "",
4742
4740
  ""
4743
4741
  ];
4744
- for (const w of e) {
4745
- if (!w) continue;
4746
- const S = ((o = w.author) == null ? void 0 : o.name) || (((d = w.author) == null ? void 0 : d.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((k = w.author) == null ? void 0 : k.type) === "agent_ia" ? "Assistant IA" : "Système"), R = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
4747
- A && (n.push(`[${R}] ${S} :`), n.push(A), n.push(""));
4742
+ for (const b of e) {
4743
+ if (!b) continue;
4744
+ const S = ((o = b.author) == null ? void 0 : o.name) || (((d = b.author) == null ? void 0 : d.type) === "user" ? "Vous" : ((v = b.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((k = b.author) == null ? void 0 : k.type) === "agent_ia" ? "Assistant IA" : "Système"), F = b.created_at ? new Date(b.created_at).toLocaleString("fr-FR") : "", A = (b.text_md || "").trim();
4745
+ A && (n.push(`[${F}] ${S} :`), n.push(A), n.push(""));
4748
4746
  }
4749
4747
  const a = new Blob([n.join(`
4750
4748
  `)], { type: "text/plain;charset=utf-8" });
4751
4749
  try {
4752
- const w = URL.createObjectURL(a), S = document.createElement("a");
4753
- S.href = w, S.download = `${(t.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(S), S.click(), document.body.removeChild(S), setTimeout(() => URL.revokeObjectURL(w), 1e3);
4754
- } catch (w) {
4755
- console.error("[ww-messenger] export failed", w);
4750
+ const b = URL.createObjectURL(a), S = document.createElement("a");
4751
+ S.href = b, S.download = `${(t.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(S), S.click(), document.body.removeChild(S), setTimeout(() => URL.revokeObjectURL(b), 1e3);
4752
+ } catch (b) {
4753
+ console.error("[ww-messenger] export failed", b);
4756
4754
  }
4757
4755
  },
4758
4756
  async onSend(t) {
@@ -4844,37 +4842,37 @@ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
4844
4842
  class: "wm-actionWait",
4845
4843
  role: "status",
4846
4844
  "aria-live": "polite"
4847
- }, Xi = { class: "wm-actionWait__lbl" }, Qi = {
4845
+ }, Xi = { class: "wm-actionWait__lbl" }, Zi = {
4848
4846
  key: 2,
4849
4847
  class: "wm-attached"
4850
- }, Zi = ["onClick"];
4848
+ }, Qi = ["onClick"];
4851
4849
  function ea(t, e, n, a, r, s) {
4852
- const o = I("Launcher"), d = I("Header"), v = I("Onboarding"), k = I("MessageList"), w = I("ApprovalCard"), S = I("FormCard"), R = I("Feedback"), A = I("SuggestionChips"), U = I("Composer"), x = I("MoreMenu"), j = I("RenameDialog"), P = I("HistoryDrawer");
4850
+ const o = B("Launcher"), d = B("Header"), v = B("Onboarding"), k = B("MessageList"), b = B("ApprovalCard"), S = B("FormCard"), F = B("Feedback"), A = B("SuggestionChips"), U = B("Composer"), x = B("MoreMenu"), j = B("RenameDialog"), P = B("HistoryDrawer");
4853
4851
  return l(), c("div", {
4854
- class: B(["wm-root", `wm-root--${n.displayMode}`])
4852
+ class: E(["wm-root", `wm-root--${n.displayMode}`])
4855
4853
  }, [
4856
- !r.isOpen && !s.isEmbedded ? (l(), $(o, {
4854
+ !r.isOpen && !s.isEmbedded ? (l(), L(o, {
4857
4855
  key: 0,
4858
4856
  "unread-count": s.unreadCount,
4859
4857
  peek: s.launcherPeek,
4860
4858
  onOpen: s.openFromPeek,
4861
- onDismiss: e[0] || (e[0] = (F) => r.labelDismissed = !0)
4862
- }, null, 8, ["unread-count", "peek", "onOpen"])) : g("", !0),
4859
+ onDismiss: e[0] || (e[0] = (R) => r.labelDismissed = !0)
4860
+ }, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
4863
4861
  r.isOpen || s.isEmbedded ? (l(), c("section", {
4864
4862
  key: 1,
4865
- class: B(["wm-panel", `wm-panel--${n.displayMode}`]),
4863
+ class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
4866
4864
  style: G(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
4867
4865
  role: "dialog",
4868
4866
  "aria-label": "Messenger"
4869
4867
  }, [
4870
4868
  !s.ready && !s.error ? (l(), c("div", Vi, [
4871
- s.isEmbedded ? g("", !0) : (l(), c("button", {
4869
+ s.isEmbedded ? y("", !0) : (l(), c("button", {
4872
4870
  key: 0,
4873
4871
  type: "button",
4874
4872
  class: "wm-loading__close",
4875
4873
  "aria-label": "Réduire",
4876
- onClick: e[1] || (e[1] = (...F) => s.close && s.close(...F))
4877
- }, [...e[7] || (e[7] = [
4874
+ onClick: e[1] || (e[1] = (...R) => s.close && s.close(...R))
4875
+ }, [...e[8] || (e[8] = [
4878
4876
  i("svg", {
4879
4877
  width: "13",
4880
4878
  height: "13",
@@ -4889,11 +4887,11 @@ function ea(t, e, n, a, r, s) {
4889
4887
  i("path", { d: "M18 6L6 18M6 6l12 12" })
4890
4888
  ], -1)
4891
4889
  ])])),
4892
- e[8] || (e[8] = i("div", {
4890
+ e[9] || (e[9] = i("div", {
4893
4891
  class: "wm-loading__spinner",
4894
4892
  "aria-hidden": "true"
4895
4893
  }, null, -1))
4896
- ])) : (l(), c(T, { key: 1 }, [
4894
+ ])) : (l(), c(M, { key: 1 }, [
4897
4895
  K(d, {
4898
4896
  title: s.headerTitle,
4899
4897
  escalated: s.isEscalated,
@@ -4911,7 +4909,7 @@ function ea(t, e, n, a, r, s) {
4911
4909
  }, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
4912
4910
  s.error ? (l(), c("div", qi, [
4913
4911
  i("div", Wi, [
4914
- e[10] || (e[10] = i("div", { class: "wm-state__errIcon" }, [
4912
+ e[11] || (e[11] = i("div", { class: "wm-state__errIcon" }, [
4915
4913
  i("svg", {
4916
4914
  width: "14",
4917
4915
  height: "14",
@@ -4927,11 +4925,11 @@ function ea(t, e, n, a, r, s) {
4927
4925
  ])
4928
4926
  ], -1)),
4929
4927
  i("div", null, [
4930
- e[9] || (e[9] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
4931
- i("div", Ki, b(s.error), 1)
4928
+ e[10] || (e[10] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
4929
+ i("div", Ki, w(s.error), 1)
4932
4930
  ])
4933
4931
  ])
4934
- ])) : s.currentConv ? (l(), c(T, { key: 2 }, [
4932
+ ])) : s.currentConv ? (l(), c(M, { key: 2 }, [
4935
4933
  K(k, {
4936
4934
  ref: "messageList",
4937
4935
  messages: s.displayedMessages,
@@ -4946,38 +4944,38 @@ function ea(t, e, n, a, r, s) {
4946
4944
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "unread-boundary-ts", "onLoadMore"]),
4947
4945
  i("div", Gi, [
4948
4946
  s.floatVisible ? (l(), c("div", Yi, [
4949
- s.approvalReady ? (l(), $(w, {
4947
+ s.approvalReady ? (l(), L(b, {
4950
4948
  key: 0,
4951
4949
  action: s.approvalTitle,
4952
4950
  detail: s.approvalDetail,
4953
4951
  callbacks: s.pendingApproval.callbacks,
4954
4952
  onCallback: s.onApprovalCallback
4955
- }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), $(S, {
4953
+ }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), L(S, {
4956
4954
  key: s.pendingForm.message && s.pendingForm.message.id,
4957
4955
  form: s.pendingForm.form,
4958
4956
  onSubmit: s.onFormSubmit
4959
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), $(R, {
4957
+ }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), L(F, {
4960
4958
  key: 2,
4961
4959
  busy: r.feedbackBusy,
4962
4960
  done: r.feedbackDone,
4963
4961
  onSubmit: s.onFeedback
4964
- }, null, 8, ["busy", "done", "onSubmit"])) : (l(), $(A, {
4962
+ }, null, 8, ["busy", "done", "onSubmit"])) : (l(), L(A, {
4965
4963
  key: 3,
4966
4964
  items: s.suggestions,
4967
4965
  onSelect: s.onSuggestion
4968
4966
  }, null, 8, ["items", "onSelect"]))
4969
- ], 512)) : g("", !0),
4967
+ ], 512)) : y("", !0),
4970
4968
  s.actionInFlight ? (l(), c("div", Ji, [
4971
- e[11] || (e[11] = i("span", {
4969
+ e[12] || (e[12] = i("span", {
4972
4970
  class: "wm-actionWait__spinner",
4973
4971
  "aria-hidden": "true"
4974
4972
  }, null, -1)),
4975
- i("span", Xi, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4976
- ])) : (l(), $(U, {
4973
+ i("span", Xi, w(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4974
+ ])) : (l(), L(U, {
4977
4975
  key: 2,
4978
4976
  ref: "composer",
4979
4977
  modelValue: r.draft,
4980
- "onUpdate:modelValue": e[2] || (e[2] = (F) => r.draft = F),
4978
+ "onUpdate:modelValue": e[3] || (e[3] = (R) => r.draft = R),
4981
4979
  placeholder: s.composerPlaceholder,
4982
4980
  disabled: !!s.pendingApproval,
4983
4981
  "attach-label": "Joindre un fichier",
@@ -4985,30 +4983,30 @@ function ea(t, e, n, a, r, s) {
4985
4983
  onAttach: s.onAttach
4986
4984
  }, null, 8, ["modelValue", "placeholder", "disabled", "onSend", "onAttach"]))
4987
4985
  ]),
4988
- r.moreOpen ? (l(), $(x, {
4986
+ r.moreOpen ? (l(), L(x, {
4989
4987
  key: 0,
4990
4988
  "can-rename": !!s.currentConv && !s.currentConv._draft,
4991
4989
  "can-export": !!s.currentConv && !s.currentConv._draft,
4992
4990
  "notif-enabled": r.notifEnabled,
4993
4991
  "status-url": s.statusUrl,
4994
4992
  "help-url": s.helpUrl,
4995
- onClose: e[3] || (e[3] = (F) => r.moreOpen = !1),
4993
+ onClose: e[4] || (e[4] = (R) => r.moreOpen = !1),
4996
4994
  onNotifToggle: s.onNotifToggle,
4997
4995
  onAction: s.onMoreAction
4998
- }, null, 8, ["can-rename", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : g("", !0),
4999
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (l(), $(j, {
4996
+ }, null, 8, ["can-rename", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
4997
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (l(), L(j, {
5000
4998
  key: 1,
5001
4999
  "initial-value": s.currentConv.name || "",
5002
5000
  title: "Modifier le titre de la conversation",
5003
- onClose: e[4] || (e[4] = (F) => r.renameDialogOpen = !1),
5001
+ onClose: e[5] || (e[5] = (R) => r.renameDialogOpen = !1),
5004
5002
  onSubmit: s.onRenameSubmit
5005
- }, null, 8, ["initial-value", "onSubmit"])) : g("", !0),
5006
- r.pendingAttachments.length ? (l(), c("div", Qi, [
5007
- (l(!0), c(T, null, D(r.pendingAttachments, (F, H) => (l(), c("div", {
5003
+ }, null, 8, ["initial-value", "onSubmit"])) : y("", !0),
5004
+ r.pendingAttachments.length ? (l(), c("div", Zi, [
5005
+ (l(!0), c(M, null, D(r.pendingAttachments, (R, H) => (l(), c("div", {
5008
5006
  key: H,
5009
5007
  class: "wm-attached__chip"
5010
5008
  }, [
5011
- e[13] || (e[13] = i("svg", {
5009
+ e[14] || (e[14] = i("svg", {
5012
5010
  width: "11",
5013
5011
  height: "11",
5014
5012
  viewBox: "0 0 24 24",
@@ -5021,12 +5019,12 @@ function ea(t, e, n, a, r, s) {
5021
5019
  }, [
5022
5020
  i("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" })
5023
5021
  ], -1)),
5024
- i("span", null, b(F.name), 1),
5022
+ i("span", null, w(R.name), 1),
5025
5023
  i("button", {
5026
5024
  type: "button",
5027
5025
  "aria-label": "Retirer",
5028
5026
  onClick: (Y) => r.pendingAttachments.splice(H, 1)
5029
- }, [...e[12] || (e[12] = [
5027
+ }, [...e[13] || (e[13] = [
5030
5028
  i("svg", {
5031
5029
  width: "10",
5032
5030
  height: "10",
@@ -5040,10 +5038,10 @@ function ea(t, e, n, a, r, s) {
5040
5038
  }, [
5041
5039
  i("path", { d: "M18 6L6 18M6 6l12 12" })
5042
5040
  ], -1)
5043
- ])], 8, Zi)
5041
+ ])], 8, Qi)
5044
5042
  ]))), 128))
5045
- ])) : g("", !0)
5046
- ], 64)) : (l(), $(v, {
5043
+ ])) : y("", !0)
5044
+ ], 64)) : (l(), L(v, {
5047
5045
  key: 1,
5048
5046
  "welcome-message": s.widgetWelcomeMessage,
5049
5047
  "agent-name": s.agentName,
@@ -5052,35 +5050,36 @@ function ea(t, e, n, a, r, s) {
5052
5050
  busy: r.busy,
5053
5051
  onStart: s.startConv,
5054
5052
  onSelect: s.onQuickLink,
5055
- onResume: s.onDrawerPick
5053
+ onResume: s.onDrawerPick,
5054
+ onViewAll: e[2] || (e[2] = (R) => r.historyOpen = !0)
5056
5055
  }, null, 8, ["welcome-message", "agent-name", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
5057
- r.historyOpen ? (l(), $(P, {
5056
+ r.historyOpen ? (l(), L(P, {
5058
5057
  key: 3,
5059
5058
  conversations: s.drawerConversations,
5060
5059
  "active-id": s.currentConv ? s.currentConv.id : null,
5061
- onClose: e[5] || (e[5] = (F) => r.historyOpen = !1),
5060
+ onClose: e[6] || (e[6] = (R) => r.historyOpen = !1),
5062
5061
  onNew: s.onDrawerNew,
5063
5062
  onPick: s.onDrawerPick
5064
- }, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : g("", !0),
5065
- r.moreOpen && !s.currentConv ? (l(), $(x, {
5063
+ }, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
5064
+ r.moreOpen && !s.currentConv ? (l(), L(x, {
5066
5065
  key: 4,
5067
5066
  "can-rename": !1,
5068
5067
  "can-export": !1,
5069
5068
  "notif-enabled": r.notifEnabled,
5070
5069
  "status-url": s.statusUrl,
5071
5070
  "help-url": s.helpUrl,
5072
- onClose: e[6] || (e[6] = (F) => r.moreOpen = !1),
5071
+ onClose: e[7] || (e[7] = (R) => r.moreOpen = !1),
5073
5072
  onNotifToggle: s.onNotifToggle,
5074
5073
  onAction: s.onMoreAction
5075
- }, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : g("", !0)
5074
+ }, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
5076
5075
  ], 64))
5077
- ], 6)) : g("", !0)
5076
+ ], 6)) : y("", !0)
5078
5077
  ], 2);
5079
5078
  }
5080
- const sa = /* @__PURE__ */ E(zi, [["render", ea], ["__scopeId", "data-v-a988e756"]]), ra = "0.3.1";
5079
+ const sa = /* @__PURE__ */ $(zi, [["render", ea], ["__scopeId", "data-v-5889aa58"]]), ra = "0.3.2";
5081
5080
  export {
5082
- te as AIAvatar,
5083
- ue as AVATAR_COLORS,
5081
+ ne as AIAvatar,
5082
+ ce as AVATAR_COLORS,
5084
5083
  tn as ActionResult,
5085
5084
  hr as ApprovalCard,
5086
5085
  cn as ArtifactFormResponse,
@@ -5089,15 +5088,15 @@ export {
5089
5088
  Nn as ArtifactTicket,
5090
5089
  es as AttachmentPreview,
5091
5090
  os as Bubble,
5092
- Qs as Composer,
5091
+ Zs as Composer,
5093
5092
  He as DEFAULT_BASE_URL,
5094
5093
  Yr as Feedback,
5095
5094
  jr as FormCard,
5096
5095
  wt as Header,
5097
5096
  pi as HistoryDrawer,
5098
- Ce as HumanAvatar,
5097
+ ke as HumanAvatar,
5099
5098
  Ge as Launcher,
5100
- me as MEDIA_RECORDER_SUPPORTED,
5099
+ he as MEDIA_RECORDER_SUPPORTED,
5101
5100
  Es as MessageList,
5102
5101
  sa as Messenger,
5103
5102
  Ai as MoreMenu,
@@ -5107,14 +5106,14 @@ export {
5107
5106
  lt as TeamAvatars,
5108
5107
  us as Typing,
5109
5108
  ra as VERSION,
5110
- we as avatarColor,
5111
- be as avatarInitials,
5109
+ ye as avatarColor,
5110
+ we as avatarInitials,
5112
5111
  Ls as captureScreenshotFile,
5113
5112
  N as colors,
5114
5113
  Ue as createStore,
5115
5114
  Fe as createTransport,
5116
5115
  sa as default,
5117
- ke as formatTime,
5116
+ be as formatTime,
5118
5117
  na as guessAttachmentKind,
5119
5118
  $s as pickRecorderMime,
5120
5119
  ss as renderMarkdown,