@_solaris/messenger-widget 0.2.0 → 0.2.1
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.cjs +9 -9
- package/dist/messenger.embed.js +13 -13
- package/dist/messenger.js +631 -577
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as xe, openBlock as l, createElementBlock as c, createVNode as
|
|
1
|
+
import { reactive as xe, openBlock as l, createElementBlock as c, createVNode as P, Transition as Me, withCtx as Te, withKeys as me, withModifiers as Y, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as T, renderList as F, resolveComponent as I, createBlock as $, createTextVNode as se, resolveDynamicComponent as Oe, renderSlot as Ie, withDirectives as z, vModelText as G, vModelCheckbox as Ee, vModelSelect as Be, createStaticVNode as ue, markRaw as fe } from "vue";
|
|
2
2
|
const Le = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -39,8 +39,8 @@ function je(t) {
|
|
|
39
39
|
p && p.forEach((k) => {
|
|
40
40
|
try {
|
|
41
41
|
k(f);
|
|
42
|
-
} catch (
|
|
43
|
-
console.error("[transport] listener", h,
|
|
42
|
+
} catch (O) {
|
|
43
|
+
console.error("[transport] listener", h, O);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -61,10 +61,10 @@ function je(t) {
|
|
|
61
61
|
body: p !== void 0 ? JSON.stringify(p) : void 0
|
|
62
62
|
});
|
|
63
63
|
if (!k.ok) {
|
|
64
|
-
const
|
|
65
|
-
`HTTP ${k.status} ${h} ${f} :: ${(
|
|
64
|
+
const O = await d(k), M = new Error(
|
|
65
|
+
`HTTP ${k.status} ${h} ${f} :: ${(O == null ? void 0 : O.error) || k.statusText}`
|
|
66
66
|
);
|
|
67
|
-
throw M.status = k.status, M.body =
|
|
67
|
+
throw M.status = k.status, M.body = O, M;
|
|
68
68
|
}
|
|
69
69
|
return k.status === 204 ? null : k.json();
|
|
70
70
|
}
|
|
@@ -148,18 +148,18 @@ function je(t) {
|
|
|
148
148
|
p ? { inputs: p } : {}
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
|
-
async function
|
|
151
|
+
async function H(h) {
|
|
152
152
|
const f = (
|
|
153
153
|
/** @type {File} */
|
|
154
154
|
h.name || "attachment"
|
|
155
|
-
), p = h.type || "application/octet-stream", k = h.size || 0,
|
|
155
|
+
), p = h.type || "application/octet-stream", k = h.size || 0, O = (
|
|
156
156
|
/** @type {import('./types.js').AttachmentUploadTicket} */
|
|
157
157
|
await o("POST", "/attachments", {
|
|
158
158
|
mime_type: p,
|
|
159
159
|
size_bytes: k,
|
|
160
160
|
name: f
|
|
161
161
|
})
|
|
162
|
-
), M = await fetch(
|
|
162
|
+
), M = await fetch(O.upload_url, {
|
|
163
163
|
method: "PUT",
|
|
164
164
|
headers: { "Content-Type": p },
|
|
165
165
|
body: h
|
|
@@ -168,7 +168,7 @@ function je(t) {
|
|
|
168
168
|
throw new Error(`HTTP ${M.status} PUT signed upload`);
|
|
169
169
|
return {
|
|
170
170
|
type: De(p),
|
|
171
|
-
path:
|
|
171
|
+
path: O.path,
|
|
172
172
|
mime_type: p,
|
|
173
173
|
size_bytes: k
|
|
174
174
|
};
|
|
@@ -219,8 +219,8 @@ function je(t) {
|
|
|
219
219
|
}
|
|
220
220
|
async function oe() {
|
|
221
221
|
try {
|
|
222
|
-
const h = await S(), f = h.reduce((k,
|
|
223
|
-
const M =
|
|
222
|
+
const h = await S(), f = h.reduce((k, O) => {
|
|
223
|
+
const M = O == null ? void 0 : O.last_message_at;
|
|
224
224
|
return M && (!k || M > k) ? M : k;
|
|
225
225
|
}, null);
|
|
226
226
|
f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), W());
|
|
@@ -255,21 +255,21 @@ function je(t) {
|
|
|
255
255
|
try {
|
|
256
256
|
const f = await S();
|
|
257
257
|
e.lastActivityAt = f.reduce((p, k) => {
|
|
258
|
-
const
|
|
259
|
-
return
|
|
258
|
+
const O = k == null ? void 0 : k.last_message_at;
|
|
259
|
+
return O && (!p || O > p) ? O : p;
|
|
260
260
|
}, null);
|
|
261
261
|
} catch (f) {
|
|
262
262
|
console.error("[transport] initial /conversations failed", f);
|
|
263
263
|
}
|
|
264
264
|
return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), Q(), h;
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function g() {
|
|
267
267
|
u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, K(), 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:
|
|
272
|
+
stop: g,
|
|
273
273
|
setPanelOpen: ae,
|
|
274
274
|
// REST
|
|
275
275
|
bootstrap: v,
|
|
@@ -282,7 +282,7 @@ function je(t) {
|
|
|
282
282
|
listMessages: x,
|
|
283
283
|
postMessage: N,
|
|
284
284
|
postCallback: j,
|
|
285
|
-
uploadAttachment:
|
|
285
|
+
uploadAttachment: H,
|
|
286
286
|
signAttachment: X,
|
|
287
287
|
// Read-only state
|
|
288
288
|
get connection() {
|
|
@@ -351,22 +351,22 @@ function Pe(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
|
|
355
|
-
|
|
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,
|
|
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[_] =
|
|
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
|
-
(_,
|
|
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) {
|
|
@@ -393,7 +393,7 @@ function Pe(t) {
|
|
|
393
393
|
return e.customer;
|
|
394
394
|
}
|
|
395
395
|
async function o(u = {}) {
|
|
396
|
-
const m = await t.createConversation(u), _ = e.conversations.findIndex((
|
|
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;
|
|
@@ -419,7 +419,7 @@ function Pe(t) {
|
|
|
419
419
|
}), Z = (R == null ? void 0 : R.messages) ?? [];
|
|
420
420
|
if (f = [...Z, ...f], h = (R == null ? void 0 : R.next_cursor) ?? null, !Z.length || f.length >= 60) break;
|
|
421
421
|
}
|
|
422
|
-
const k = e.messagesByConv[u] || [],
|
|
422
|
+
const k = e.messagesByConv[u] || [], O = new Set(k.map((R) => String(R == null ? void 0 : R.id))), M = [...f.filter((R) => !O.has(String(R == null ? void 0 : R.id))), ...k];
|
|
423
423
|
e.messagesByConv[u] = M, w(u, {
|
|
424
424
|
nextCursor: h,
|
|
425
425
|
loading: !1,
|
|
@@ -434,14 +434,14 @@ function Pe(t) {
|
|
|
434
434
|
e.paginationByConv = { ...e.paginationByConv, [u]: m };
|
|
435
435
|
}
|
|
436
436
|
async function S(u, m) {
|
|
437
|
-
const _ = await t.patchConversation(u, m),
|
|
438
|
-
|
|
437
|
+
const _ = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
|
|
438
|
+
g !== -1 && (e.conversations[g] = _);
|
|
439
439
|
}
|
|
440
|
-
async function L(u, m, { attachments: _, metadata:
|
|
440
|
+
async function L(u, m, { attachments: _, metadata: g } = {}) {
|
|
441
441
|
var M;
|
|
442
442
|
const h = (m || "").trim(), f = Array.isArray(_) && _.length > 0;
|
|
443
443
|
if (!u || !h && !f) return;
|
|
444
|
-
const p = Ne(), k = Q(u),
|
|
444
|
+
const p = Ne(), k = Q(u), O = {
|
|
445
445
|
id: p,
|
|
446
446
|
client_msg_id: p,
|
|
447
447
|
conversation_id: u,
|
|
@@ -455,16 +455,16 @@ function Pe(t) {
|
|
|
455
455
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
456
456
|
_pending: !0,
|
|
457
457
|
...f ? { payload: { type: "content", attachments: _ } } : {},
|
|
458
|
-
...
|
|
458
|
+
...g && typeof g == "object" ? { metadata: g } : {}
|
|
459
459
|
};
|
|
460
|
-
q(u,
|
|
460
|
+
q(u, O);
|
|
461
461
|
try {
|
|
462
462
|
await t.postMessage(u, {
|
|
463
463
|
client_msg_id: p,
|
|
464
464
|
text_md: h,
|
|
465
465
|
created_at: k,
|
|
466
466
|
...f ? { attachments: _ } : {},
|
|
467
|
-
...
|
|
467
|
+
...g && typeof g == "object" ? { metadata: g } : {}
|
|
468
468
|
});
|
|
469
469
|
} catch (R) {
|
|
470
470
|
console.error("[store] send failed", R), K(u, p, { _failed: !0, _pending: !1 });
|
|
@@ -474,8 +474,8 @@ function Pe(t) {
|
|
|
474
474
|
u != null && (e.awaitingCallback[u] = !0);
|
|
475
475
|
try {
|
|
476
476
|
await t.postCallback(u, m, _);
|
|
477
|
-
} catch (
|
|
478
|
-
console.error("[store] callback failed",
|
|
477
|
+
} catch (g) {
|
|
478
|
+
console.error("[store] callback failed", g), u != null && delete e.awaitingCallback[u];
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
const D = /* @__PURE__ */ new Map();
|
|
@@ -496,8 +496,8 @@ function Pe(t) {
|
|
|
496
496
|
return null;
|
|
497
497
|
}
|
|
498
498
|
async function N(u, { rating: m, comment: _ } = {}) {
|
|
499
|
-
const
|
|
500
|
-
...(
|
|
499
|
+
const g = e.conversations.find((p) => p.id === u), f = {
|
|
500
|
+
...(g == null ? void 0 : g.metadata) || {},
|
|
501
501
|
feedback: {
|
|
502
502
|
rating: m,
|
|
503
503
|
comment: _ || null,
|
|
@@ -507,21 +507,21 @@ function Pe(t) {
|
|
|
507
507
|
await S(u, { metadata: f });
|
|
508
508
|
}
|
|
509
509
|
function j(u) {
|
|
510
|
-
var _,
|
|
510
|
+
var _, g;
|
|
511
511
|
const m = e.messagesByConv[u] || [];
|
|
512
512
|
for (let h = m.length - 1; h >= 0; h--) {
|
|
513
513
|
const f = m[h];
|
|
514
|
-
if ((f == null ? void 0 : f.type) === "action" && ((_ = f == null ? void 0 : f.payload) == null ? void 0 : _.type) === "action" && ((
|
|
514
|
+
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
515
|
return f;
|
|
516
516
|
}
|
|
517
517
|
return null;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
var _,
|
|
519
|
+
function H(u) {
|
|
520
|
+
var _, g, h;
|
|
521
521
|
const m = e.messagesByConv[u] || [];
|
|
522
522
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
523
523
|
const p = m[f];
|
|
524
|
-
if (((_ = p == null ? void 0 : p.author) == null ? void 0 : _.type) === "user" || (p == null ? void 0 : p.type) === "action" && ((
|
|
524
|
+
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
525
|
const k = (h = p == null ? void 0 : p.metadata) == null ? void 0 : h.form;
|
|
526
526
|
if (k && Array.isArray(k.fields) && k.fields.length > 0)
|
|
527
527
|
return { message: p, form: k };
|
|
@@ -533,19 +533,19 @@ function Pe(t) {
|
|
|
533
533
|
if (!m) return null;
|
|
534
534
|
const _ = Object.keys(m);
|
|
535
535
|
if (_.length === 0) return null;
|
|
536
|
-
const
|
|
537
|
-
return { id:
|
|
536
|
+
const g = _[0];
|
|
537
|
+
return { id: g, payload: { name: m[g] } };
|
|
538
538
|
}
|
|
539
539
|
function re(u) {
|
|
540
|
-
var _,
|
|
540
|
+
var _, g, h, f;
|
|
541
541
|
const m = e.messagesByConv[u] || [];
|
|
542
542
|
for (let p = m.length - 1; p >= 0; p--) {
|
|
543
543
|
const k = m[p];
|
|
544
544
|
if (((_ = k == null ? void 0 : k.author) == null ? void 0 : _.type) === "user") return [];
|
|
545
|
-
if ((k == null ? void 0 : k.type) === "action" && ((
|
|
545
|
+
if ((k == null ? void 0 : k.type) === "action" && ((g = k == null ? void 0 : k.payload) == null ? void 0 : g.state) === "pending") return [];
|
|
546
546
|
if (((h = k == null ? void 0 : k.author) == null ? void 0 : h.type) !== "agent_ia") continue;
|
|
547
|
-
const
|
|
548
|
-
return Array.isArray(
|
|
547
|
+
const O = (f = k == null ? void 0 : k.metadata) == null ? void 0 : f.suggested_replies;
|
|
548
|
+
return Array.isArray(O) && O.length ? O.map((M) => {
|
|
549
549
|
if (typeof M == "string") {
|
|
550
550
|
const R = M.trim();
|
|
551
551
|
return R ? { label: R, kind: null } : null;
|
|
@@ -564,31 +564,31 @@ function Pe(t) {
|
|
|
564
564
|
function q(u, m) {
|
|
565
565
|
var f;
|
|
566
566
|
const _ = e.messagesByConv[u] || [];
|
|
567
|
-
let
|
|
568
|
-
m != null && m.client_msg_id && (
|
|
567
|
+
let g = -1;
|
|
568
|
+
m != null && m.client_msg_id && (g = _.findIndex(
|
|
569
569
|
(p) => (p == null ? void 0 : p.client_msg_id) && p.client_msg_id === m.client_msg_id
|
|
570
|
-
)),
|
|
570
|
+
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = _.findIndex((p) => ie(p == null ? void 0 : p.id, m.id)));
|
|
571
571
|
let h;
|
|
572
|
-
|
|
572
|
+
g === -1 ? h = [..._, m].sort(ae) : (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
573
|
}
|
|
574
574
|
function ie(u, m) {
|
|
575
575
|
return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
|
|
576
576
|
}
|
|
577
577
|
function K(u, m, _) {
|
|
578
|
-
const
|
|
579
|
-
if (!
|
|
580
|
-
const h =
|
|
578
|
+
const g = e.messagesByConv[u];
|
|
579
|
+
if (!g) return;
|
|
580
|
+
const h = g.findIndex((p) => p.id === m);
|
|
581
581
|
if (h === -1) return;
|
|
582
|
-
const f =
|
|
583
|
-
f[h] = { ...
|
|
582
|
+
const f = g.slice();
|
|
583
|
+
f[h] = { ...g[h], ..._ }, e.messagesByConv[u] = f;
|
|
584
584
|
}
|
|
585
585
|
function W(u, m) {
|
|
586
586
|
const _ = e.conversations.findIndex((h) => h.id === u);
|
|
587
587
|
if (_ === -1) return;
|
|
588
|
-
const
|
|
589
|
-
if (m && (!
|
|
588
|
+
const g = e.conversations[_];
|
|
589
|
+
if (m && (!g.last_message_at || m > g.last_message_at)) {
|
|
590
590
|
const h = e.conversations.slice();
|
|
591
|
-
h[_] = { ...
|
|
591
|
+
h[_] = { ...g, last_message_at: m }, h.sort(
|
|
592
592
|
(f, p) => (p.last_message_at || "").localeCompare(f.last_message_at || "")
|
|
593
593
|
), e.conversations = h;
|
|
594
594
|
}
|
|
@@ -599,8 +599,8 @@ function Pe(t) {
|
|
|
599
599
|
function oe(u) {
|
|
600
600
|
if (!u || typeof u != "object") return null;
|
|
601
601
|
const m = {}, _ = {};
|
|
602
|
-
for (const [
|
|
603
|
-
h !== void 0 && (
|
|
602
|
+
for (const [g, h] of Object.entries(u))
|
|
603
|
+
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
604
|
return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
|
|
605
605
|
}
|
|
606
606
|
function Q(u) {
|
|
@@ -608,8 +608,8 @@ function Pe(t) {
|
|
|
608
608
|
let _ = "";
|
|
609
609
|
for (const f of m)
|
|
610
610
|
f != null && f.created_at && f.created_at > _ && (_ = f.created_at);
|
|
611
|
-
const
|
|
612
|
-
return !_ ||
|
|
611
|
+
const g = (/* @__PURE__ */ new Date()).toISOString();
|
|
612
|
+
return !_ || g > _ ? g : new Date(Date.parse(_) + 1).toISOString();
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
615
615
|
state: e,
|
|
@@ -627,7 +627,7 @@ function Pe(t) {
|
|
|
627
627
|
getPendingApproval: j,
|
|
628
628
|
getActionInFlight: X,
|
|
629
629
|
getLatestSuggestions: re,
|
|
630
|
-
getLatestForm:
|
|
630
|
+
getLatestForm: H,
|
|
631
631
|
// Pass-through for panel open/close (controls SSE burst).
|
|
632
632
|
setPanelOpen: t.setPanelOpen
|
|
633
633
|
};
|
|
@@ -722,7 +722,7 @@ const He = `
|
|
|
722
722
|
}, qe = { class: "wm-launcherWrap" }, We = { class: "wm-peek__text" }, Ge = ["aria-label"];
|
|
723
723
|
function Ke(t, e, n, a, r, s) {
|
|
724
724
|
return l(), c("div", qe, [
|
|
725
|
-
|
|
725
|
+
P(Me, { name: "wm-peek" }, {
|
|
726
726
|
default: Te(() => [
|
|
727
727
|
n.peek ? (l(), c("div", {
|
|
728
728
|
key: 0,
|
|
@@ -757,7 +757,7 @@ function Ke(t, e, n, a, r, s) {
|
|
|
757
757
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
758
758
|
], -1)
|
|
759
759
|
])])
|
|
760
|
-
], 32)) :
|
|
760
|
+
], 32)) : y("", !0)
|
|
761
761
|
]),
|
|
762
762
|
_: 1
|
|
763
763
|
}),
|
|
@@ -784,7 +784,7 @@ function Ke(t, e, n, a, r, s) {
|
|
|
784
784
|
key: 0,
|
|
785
785
|
class: "wm-launcher__badge",
|
|
786
786
|
"aria-label": `${n.unreadCount} conversation${n.unreadCount > 1 ? "s" : ""} non lue${n.unreadCount > 1 ? "s" : ""}`
|
|
787
|
-
}, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ge)) :
|
|
787
|
+
}, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ge)) : y("", !0)
|
|
788
788
|
])
|
|
789
789
|
]);
|
|
790
790
|
}
|
|
@@ -794,20 +794,18 @@ const Ye = /* @__PURE__ */ B(Ve, [["render", Ke], ["__scopeId", "data-v-fabef371
|
|
|
794
794
|
size: { type: Number, default: 26 },
|
|
795
795
|
pulse: { type: Boolean, default: !1 }
|
|
796
796
|
}
|
|
797
|
-
}, Xe =
|
|
798
|
-
|
|
797
|
+
}, Xe = {
|
|
798
|
+
key: 0,
|
|
799
|
+
class: "wm-aiav__pulse"
|
|
800
|
+
}, Qe = ["width", "height"];
|
|
801
|
+
function Ze(t, e, n, a, r, s) {
|
|
799
802
|
return l(), c("div", {
|
|
800
803
|
class: "wm-aiav",
|
|
801
|
-
style:
|
|
804
|
+
style: V({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
|
|
802
805
|
}, [
|
|
803
|
-
n.pulse ? (l(), c("div",
|
|
804
|
-
key: 0,
|
|
805
|
-
class: "wm-aiav__pulse",
|
|
806
|
-
style: P({ borderRadius: n.size * 0.32 + 3 + "px" })
|
|
807
|
-
}, null, 4)) : g("", !0),
|
|
806
|
+
n.pulse ? (l(), c("div", Xe)) : y("", !0),
|
|
808
807
|
i("div", {
|
|
809
|
-
class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
|
|
810
|
-
style: P({ borderRadius: n.size * 0.32 + "px" })
|
|
808
|
+
class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
|
|
811
809
|
}, [
|
|
812
810
|
(l(), c("svg", {
|
|
813
811
|
width: n.size * 0.5,
|
|
@@ -835,11 +833,11 @@ function Qe(t, e, n, a, r, s) {
|
|
|
835
833
|
fill: "white",
|
|
836
834
|
opacity: "0.38"
|
|
837
835
|
}, null, -1)
|
|
838
|
-
])], 8,
|
|
839
|
-
],
|
|
836
|
+
])], 8, Qe))
|
|
837
|
+
], 2)
|
|
840
838
|
], 4);
|
|
841
839
|
}
|
|
842
|
-
const J = /* @__PURE__ */ B(Je, [["render",
|
|
840
|
+
const J = /* @__PURE__ */ B(Je, [["render", Ze], ["__scopeId", "data-v-5ce9c382"]]), et = {
|
|
843
841
|
name: "WmHumanAvatar",
|
|
844
842
|
props: {
|
|
845
843
|
name: { type: String, default: "" },
|
|
@@ -854,14 +852,14 @@ const J = /* @__PURE__ */ B(Je, [["render", Qe], ["__scopeId", "data-v-fe042be7"
|
|
|
854
852
|
return we(this.name);
|
|
855
853
|
}
|
|
856
854
|
}
|
|
857
|
-
},
|
|
858
|
-
function
|
|
855
|
+
}, tt = ["src", "alt"];
|
|
856
|
+
function nt(t, e, n, a, r, s) {
|
|
859
857
|
return l(), c("div", {
|
|
860
858
|
class: "wm-huav",
|
|
861
|
-
style:
|
|
859
|
+
style: V({
|
|
862
860
|
width: n.size + "px",
|
|
863
861
|
height: n.size + "px",
|
|
864
|
-
|
|
862
|
+
"--wm-avr": Math.round(n.size * 0.32) + "px",
|
|
865
863
|
background: s.bg
|
|
866
864
|
})
|
|
867
865
|
}, [
|
|
@@ -869,13 +867,13 @@ function tt(t, e, n, a, r, s) {
|
|
|
869
867
|
key: 0,
|
|
870
868
|
src: n.avatarUrl,
|
|
871
869
|
alt: n.name || ""
|
|
872
|
-
}, null, 8,
|
|
870
|
+
}, null, 8, tt)) : (l(), c("span", {
|
|
873
871
|
key: 1,
|
|
874
|
-
style:
|
|
872
|
+
style: V({ fontSize: n.size * 0.36 + "px" })
|
|
875
873
|
}, b(s.initials), 5))
|
|
876
874
|
], 4);
|
|
877
875
|
}
|
|
878
|
-
const ke = /* @__PURE__ */ B(
|
|
876
|
+
const ke = /* @__PURE__ */ B(et, [["render", nt], ["__scopeId", "data-v-a772b179"]]), st = {
|
|
879
877
|
name: "WmTeamAvatars",
|
|
880
878
|
props: {
|
|
881
879
|
members: { type: Array, default: () => [] },
|
|
@@ -897,37 +895,37 @@ const ke = /* @__PURE__ */ B(Ze, [["render", tt], ["__scopeId", "data-v-79449443
|
|
|
897
895
|
return we(t.name || "");
|
|
898
896
|
}
|
|
899
897
|
}
|
|
900
|
-
},
|
|
898
|
+
}, rt = {
|
|
901
899
|
key: 0,
|
|
902
900
|
class: "wm-team"
|
|
903
|
-
},
|
|
901
|
+
}, it = ["src", "alt"], at = { key: 1 }, ot = {
|
|
904
902
|
key: 0,
|
|
905
903
|
class: "wm-team__label"
|
|
906
904
|
};
|
|
907
|
-
function
|
|
908
|
-
return s.visible ? (l(), c("div",
|
|
905
|
+
function lt(t, e, n, a, r, s) {
|
|
906
|
+
return s.visible ? (l(), c("div", rt, [
|
|
909
907
|
i("div", {
|
|
910
908
|
class: "wm-team__stack",
|
|
911
|
-
style:
|
|
909
|
+
style: V({ width: s.stackWidth + "px" })
|
|
912
910
|
}, [
|
|
913
|
-
(l(!0), c(
|
|
911
|
+
(l(!0), c(T, null, F(n.members.slice(0, 3), (o, d) => (l(), c("div", {
|
|
914
912
|
key: d,
|
|
915
913
|
class: "wm-team__pill",
|
|
916
|
-
style:
|
|
914
|
+
style: V({ left: d * 13 + "px", zIndex: 3 - d, background: s.colorFor(o) })
|
|
917
915
|
}, [
|
|
918
916
|
o.avatar_url ? (l(), c("img", {
|
|
919
917
|
key: 0,
|
|
920
918
|
src: o.avatar_url,
|
|
921
919
|
alt: o.name || ""
|
|
922
|
-
}, null, 8,
|
|
920
|
+
}, null, 8, it)) : (l(), c("span", at, b(s.initialsFor(o)), 1))
|
|
923
921
|
], 4))), 128))
|
|
924
922
|
], 4),
|
|
925
|
-
n.responseLabel ? (l(), c("span",
|
|
926
|
-
])) :
|
|
923
|
+
n.responseLabel ? (l(), c("span", ot, b(n.responseLabel), 1)) : y("", !0)
|
|
924
|
+
])) : y("", !0);
|
|
927
925
|
}
|
|
928
|
-
const
|
|
926
|
+
const ct = /* @__PURE__ */ B(st, [["render", lt], ["__scopeId", "data-v-3659b9c1"]]), dt = {
|
|
929
927
|
name: "WmHeader",
|
|
930
|
-
components: { AIAvatar: J, HumanAvatar: ke, TeamAvatars:
|
|
928
|
+
components: { AIAvatar: J, HumanAvatar: ke, TeamAvatars: ct },
|
|
931
929
|
props: {
|
|
932
930
|
title: { type: String, default: "Nouvelle conversation" },
|
|
933
931
|
escalated: { type: Boolean, default: !1 },
|
|
@@ -958,19 +956,19 @@ const lt = /* @__PURE__ */ B(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1
|
|
|
958
956
|
return this.escalated && this.agentName ? this.agentName : "En ligne";
|
|
959
957
|
}
|
|
960
958
|
}
|
|
961
|
-
},
|
|
959
|
+
}, ut = { class: "wm-header" }, ht = {
|
|
962
960
|
key: 1,
|
|
963
961
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
964
|
-
},
|
|
962
|
+
}, mt = { class: "wm-header__avatar" }, ft = { class: "wm-header__main" }, _t = { class: "wm-header__title" }, pt = {
|
|
965
963
|
key: 0,
|
|
966
964
|
class: "wm-header__sub"
|
|
967
|
-
},
|
|
965
|
+
}, vt = { class: "wm-header__status" }, yt = {
|
|
968
966
|
key: 3,
|
|
969
967
|
class: "wm-header__fill"
|
|
970
|
-
},
|
|
971
|
-
function
|
|
968
|
+
}, gt = { class: "wm-header__actions" };
|
|
969
|
+
function wt(t, e, n, a, r, s) {
|
|
972
970
|
const o = I("HumanAvatar"), d = I("AIAvatar"), v = I("TeamAvatars");
|
|
973
|
-
return l(), c("div",
|
|
971
|
+
return l(), c("div", ut, [
|
|
974
972
|
n.showBack ? (l(), c("button", {
|
|
975
973
|
key: 0,
|
|
976
974
|
type: "button",
|
|
@@ -991,9 +989,9 @@ function gt(t, e, n, a, r, s) {
|
|
|
991
989
|
}, [
|
|
992
990
|
i("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
993
991
|
], -1)
|
|
994
|
-
])])) : (l(), c("div",
|
|
995
|
-
n.showIdentity ? (l(), c(
|
|
996
|
-
i("div",
|
|
992
|
+
])])) : (l(), c("div", ht)),
|
|
993
|
+
n.showIdentity ? (l(), c(T, { key: 2 }, [
|
|
994
|
+
i("div", mt, [
|
|
997
995
|
n.escalated ? (l(), $(o, {
|
|
998
996
|
key: 0,
|
|
999
997
|
name: n.agentName,
|
|
@@ -1004,22 +1002,22 @@ function gt(t, e, n, a, r, s) {
|
|
|
1004
1002
|
size: 34
|
|
1005
1003
|
}))
|
|
1006
1004
|
]),
|
|
1007
|
-
i("div",
|
|
1008
|
-
i("div",
|
|
1009
|
-
s.showPresence ? (l(), c("div",
|
|
1005
|
+
i("div", ft, [
|
|
1006
|
+
i("div", _t, b(n.title), 1),
|
|
1007
|
+
s.showPresence ? (l(), c("div", pt, [
|
|
1010
1008
|
s.hasTeam ? (l(), $(v, {
|
|
1011
1009
|
key: 0,
|
|
1012
1010
|
members: n.teamMembers,
|
|
1013
1011
|
"response-label": n.responseLabel
|
|
1014
|
-
}, null, 8, ["members", "response-label"])) :
|
|
1015
|
-
i("span",
|
|
1012
|
+
}, null, 8, ["members", "response-label"])) : y("", !0),
|
|
1013
|
+
i("span", vt, [
|
|
1016
1014
|
e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
|
|
1017
1015
|
se(" " + b(s.statusText), 1)
|
|
1018
1016
|
])
|
|
1019
|
-
])) :
|
|
1017
|
+
])) : y("", !0)
|
|
1020
1018
|
])
|
|
1021
|
-
], 64)) : (l(), c("div",
|
|
1022
|
-
i("div",
|
|
1019
|
+
], 64)) : (l(), c("div", yt)),
|
|
1020
|
+
i("div", gt, [
|
|
1023
1021
|
n.showMore ? (l(), c("button", {
|
|
1024
1022
|
key: 0,
|
|
1025
1023
|
type: "button",
|
|
@@ -1051,7 +1049,7 @@ function gt(t, e, n, a, r, s) {
|
|
|
1051
1049
|
r: "1.6"
|
|
1052
1050
|
})
|
|
1053
1051
|
], -1)
|
|
1054
|
-
])], 2)) :
|
|
1052
|
+
])], 2)) : y("", !0),
|
|
1055
1053
|
n.showClose ? (l(), c("button", {
|
|
1056
1054
|
key: 1,
|
|
1057
1055
|
type: "button",
|
|
@@ -1073,17 +1071,17 @@ function gt(t, e, n, a, r, s) {
|
|
|
1073
1071
|
}, [
|
|
1074
1072
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1075
1073
|
], -1)
|
|
1076
|
-
])])) :
|
|
1074
|
+
])])) : y("", !0)
|
|
1077
1075
|
])
|
|
1078
1076
|
]);
|
|
1079
1077
|
}
|
|
1080
|
-
const
|
|
1078
|
+
const bt = /* @__PURE__ */ B(dt, [["render", wt], ["__scopeId", "data-v-b5f5f6a9"]]), _e = {
|
|
1081
1079
|
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",
|
|
1082
1080
|
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",
|
|
1083
1081
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
1084
1082
|
chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
|
|
1085
1083
|
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"
|
|
1086
|
-
},
|
|
1084
|
+
}, kt = {
|
|
1087
1085
|
name: "WmOnboarding",
|
|
1088
1086
|
components: { AIAvatar: J },
|
|
1089
1087
|
props: {
|
|
@@ -1108,13 +1106,13 @@ Je réponds en quelques secondes.`;
|
|
|
1108
1106
|
return _e[t] || _e.link;
|
|
1109
1107
|
}
|
|
1110
1108
|
}
|
|
1111
|
-
},
|
|
1109
|
+
}, Ct = { class: "wm-onb" }, At = { class: "wm-onb__hero" }, St = { class: "wm-onb__title" }, xt = { class: "wm-onb__sub" }, Mt = {
|
|
1112
1110
|
key: 0,
|
|
1113
1111
|
class: "wm-onb__section"
|
|
1114
|
-
},
|
|
1112
|
+
}, Tt = { class: "wm-onb__links" }, Ot = ["onClick"], It = { class: "wm-onb__resume-body" }, Et = { class: "wm-onb__resume-title" }, Bt = { class: "wm-onb__resume-preview" }, Lt = {
|
|
1115
1113
|
key: 1,
|
|
1116
1114
|
class: "wm-onb__section"
|
|
1117
|
-
},
|
|
1115
|
+
}, Rt = { class: "wm-onb__links" }, $t = ["onClick"], Ft = { class: "wm-onb__link-icon" }, jt = {
|
|
1118
1116
|
width: "14",
|
|
1119
1117
|
height: "14",
|
|
1120
1118
|
viewBox: "0 0 24 24",
|
|
@@ -1124,22 +1122,22 @@ Je réponds en quelques secondes.`;
|
|
|
1124
1122
|
"stroke-linecap": "round",
|
|
1125
1123
|
"stroke-linejoin": "round",
|
|
1126
1124
|
"aria-hidden": "true"
|
|
1127
|
-
},
|
|
1128
|
-
function
|
|
1125
|
+
}, Ut = ["d"], Dt = { class: "wm-onb__link-label" }, Nt = { class: "wm-onb__cta" }, Pt = ["disabled"];
|
|
1126
|
+
function Ht(t, e, n, a, r, s) {
|
|
1129
1127
|
const o = I("AIAvatar");
|
|
1130
|
-
return l(), c("div",
|
|
1131
|
-
i("div",
|
|
1132
|
-
|
|
1128
|
+
return l(), c("div", Ct, [
|
|
1129
|
+
i("div", At, [
|
|
1130
|
+
P(o, {
|
|
1133
1131
|
size: 56,
|
|
1134
1132
|
pulse: !0
|
|
1135
1133
|
}),
|
|
1136
|
-
i("div",
|
|
1137
|
-
i("div",
|
|
1134
|
+
i("div", St, b(s.heroTitle), 1),
|
|
1135
|
+
i("div", xt, b(s.heroSub), 1)
|
|
1138
1136
|
]),
|
|
1139
|
-
n.unreadThreads.length ? (l(), c("div",
|
|
1137
|
+
n.unreadThreads.length ? (l(), c("div", Mt, [
|
|
1140
1138
|
e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Messages non lus", -1)),
|
|
1141
|
-
i("div",
|
|
1142
|
-
(l(!0), c(
|
|
1139
|
+
i("div", Tt, [
|
|
1140
|
+
(l(!0), c(T, null, F(n.unreadThreads, (d) => (l(), c("button", {
|
|
1143
1141
|
key: d.id,
|
|
1144
1142
|
type: "button",
|
|
1145
1143
|
class: "wm-onb__link wm-onb__resume",
|
|
@@ -1165,8 +1163,8 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1165
1163
|
})
|
|
1166
1164
|
], -1)),
|
|
1167
1165
|
i("span", It, [
|
|
1168
|
-
i("span",
|
|
1169
|
-
i("span",
|
|
1166
|
+
i("span", Et, b(d.title), 1),
|
|
1167
|
+
i("span", Bt, b(d.preview), 1)
|
|
1170
1168
|
]),
|
|
1171
1169
|
e[2] || (e[2] = i("svg", {
|
|
1172
1170
|
width: "13",
|
|
@@ -1182,26 +1180,26 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1182
1180
|
}, [
|
|
1183
1181
|
i("path", { d: "M9 18l6-6-6-6" })
|
|
1184
1182
|
], -1))
|
|
1185
|
-
], 8,
|
|
1183
|
+
], 8, Ot))), 128))
|
|
1186
1184
|
])
|
|
1187
|
-
])) :
|
|
1188
|
-
n.quickLinks.length ? (l(), c("div",
|
|
1185
|
+
])) : y("", !0),
|
|
1186
|
+
n.quickLinks.length ? (l(), c("div", Lt, [
|
|
1189
1187
|
e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
|
|
1190
|
-
i("div",
|
|
1191
|
-
(l(!0), c(
|
|
1188
|
+
i("div", Rt, [
|
|
1189
|
+
(l(!0), c(T, null, F(n.quickLinks, (d, v) => (l(), c("button", {
|
|
1192
1190
|
key: v,
|
|
1193
1191
|
type: "button",
|
|
1194
1192
|
class: "wm-onb__link",
|
|
1195
1193
|
onClick: (C) => t.$emit("select", d)
|
|
1196
1194
|
}, [
|
|
1197
|
-
i("span",
|
|
1198
|
-
(l(), c("svg",
|
|
1195
|
+
i("span", Ft, [
|
|
1196
|
+
(l(), c("svg", jt, [
|
|
1199
1197
|
i("path", {
|
|
1200
1198
|
d: s.iconPath(d.icon)
|
|
1201
|
-
}, null, 8,
|
|
1199
|
+
}, null, 8, Ut)
|
|
1202
1200
|
]))
|
|
1203
1201
|
]),
|
|
1204
|
-
i("span",
|
|
1202
|
+
i("span", Dt, b(d.label), 1),
|
|
1205
1203
|
e[4] || (e[4] = i("svg", {
|
|
1206
1204
|
width: "13",
|
|
1207
1205
|
height: "13",
|
|
@@ -1216,24 +1214,24 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1216
1214
|
}, [
|
|
1217
1215
|
i("path", { d: "M9 18l6-6-6-6" })
|
|
1218
1216
|
], -1))
|
|
1219
|
-
], 8,
|
|
1217
|
+
], 8, $t))), 128))
|
|
1220
1218
|
])
|
|
1221
|
-
])) :
|
|
1222
|
-
i("div",
|
|
1219
|
+
])) : y("", !0),
|
|
1220
|
+
i("div", Nt, [
|
|
1223
1221
|
i("button", {
|
|
1224
1222
|
type: "button",
|
|
1225
1223
|
class: "wm-onb__startBtn",
|
|
1226
1224
|
disabled: n.busy,
|
|
1227
1225
|
onClick: e[0] || (e[0] = (d) => t.$emit("start"))
|
|
1228
|
-
}, b(n.busy ? "…" : "Commencer une conversation"), 9,
|
|
1226
|
+
}, b(n.busy ? "…" : "Commencer une conversation"), 9, Pt)
|
|
1229
1227
|
])
|
|
1230
1228
|
]);
|
|
1231
1229
|
}
|
|
1232
|
-
const
|
|
1233
|
-
function
|
|
1230
|
+
const zt = /* @__PURE__ */ B(kt, [["render", Ht], ["__scopeId", "data-v-bd89bc8f"]]);
|
|
1231
|
+
function Vt(t) {
|
|
1234
1232
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1235
1233
|
}
|
|
1236
|
-
function
|
|
1234
|
+
function qt(t) {
|
|
1237
1235
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
|
|
1238
1236
|
}
|
|
1239
1237
|
const pe = "";
|
|
@@ -1243,11 +1241,11 @@ function ee(t) {
|
|
|
1243
1241
|
return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
|
|
1244
1242
|
const s = n.length;
|
|
1245
1243
|
return n.push(r), `${pe}CODE${s}${pe}`;
|
|
1246
|
-
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) =>
|
|
1244
|
+
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => qt(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;
|
|
1247
1245
|
}
|
|
1248
1246
|
function Ce(t) {
|
|
1249
1247
|
if (!t) return "";
|
|
1250
|
-
const e =
|
|
1248
|
+
const e = Vt(t).split(`
|
|
1251
1249
|
`), n = [];
|
|
1252
1250
|
let a = 0;
|
|
1253
1251
|
for (; a < e.length; ) {
|
|
@@ -1308,7 +1306,7 @@ function Ce(t) {
|
|
|
1308
1306
|
}
|
|
1309
1307
|
return r;
|
|
1310
1308
|
}
|
|
1311
|
-
const
|
|
1309
|
+
const Wt = {
|
|
1312
1310
|
name: "WmArtifactFormResponse",
|
|
1313
1311
|
props: {
|
|
1314
1312
|
data: { type: Object, required: !0 }
|
|
@@ -1319,11 +1317,11 @@ const qt = {
|
|
|
1319
1317
|
return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
|
|
1320
1318
|
}
|
|
1321
1319
|
}
|
|
1322
|
-
},
|
|
1323
|
-
function
|
|
1324
|
-
return l(), c("div",
|
|
1325
|
-
i("div",
|
|
1326
|
-
i("div",
|
|
1320
|
+
}, Gt = { class: "wm-art wm-art--formResponse" }, Kt = { class: "wm-art__head" }, Yt = { class: "wm-art__title" }, Jt = { class: "wm-art__body" }, Xt = { class: "wm-art__fieldLabel" };
|
|
1321
|
+
function Qt(t, e, n, a, r, s) {
|
|
1322
|
+
return l(), c("div", Gt, [
|
|
1323
|
+
i("div", Kt, [
|
|
1324
|
+
i("div", Yt, b(n.data.title || "Formulaire"), 1),
|
|
1327
1325
|
e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
|
|
1328
1326
|
i("svg", {
|
|
1329
1327
|
width: "11",
|
|
@@ -1341,12 +1339,12 @@ function Xt(t, e, n, a, r, s) {
|
|
|
1341
1339
|
se(" Envoyé ")
|
|
1342
1340
|
], -1))
|
|
1343
1341
|
]),
|
|
1344
|
-
i("div",
|
|
1345
|
-
(l(!0), c(
|
|
1342
|
+
i("div", Jt, [
|
|
1343
|
+
(l(!0), c(T, null, F(s.fields, (o, d) => (l(), c("div", {
|
|
1346
1344
|
key: d,
|
|
1347
1345
|
class: "wm-art__field"
|
|
1348
1346
|
}, [
|
|
1349
|
-
i("div",
|
|
1347
|
+
i("div", Xt, b(o.label), 1),
|
|
1350
1348
|
i("div", {
|
|
1351
1349
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1352
1350
|
}, b(o.value), 3)
|
|
@@ -1354,7 +1352,7 @@ function Xt(t, e, n, a, r, s) {
|
|
|
1354
1352
|
])
|
|
1355
1353
|
]);
|
|
1356
1354
|
}
|
|
1357
|
-
const
|
|
1355
|
+
const Zt = /* @__PURE__ */ B(Wt, [["render", Qt], ["__scopeId", "data-v-812bda8b"]]), en = {
|
|
1358
1356
|
name: "WmArtifactInfoCard",
|
|
1359
1357
|
props: {
|
|
1360
1358
|
data: { type: Object, required: !0 }
|
|
@@ -1369,61 +1367,61 @@ const Qt = /* @__PURE__ */ B(qt, [["render", Xt], ["__scopeId", "data-v-812bda8b
|
|
|
1369
1367
|
return !!((t = this.data) != null && t.body) || this.fields.length > 0;
|
|
1370
1368
|
}
|
|
1371
1369
|
}
|
|
1372
|
-
},
|
|
1370
|
+
}, tn = { class: "wm-art wm-art--infoCard" }, nn = {
|
|
1373
1371
|
key: 0,
|
|
1374
1372
|
class: "wm-art__image"
|
|
1375
|
-
},
|
|
1373
|
+
}, sn = ["src", "alt"], rn = { class: "wm-art__head" }, an = { class: "wm-art__headMain" }, on = { class: "wm-art__title" }, ln = {
|
|
1376
1374
|
key: 0,
|
|
1377
1375
|
class: "wm-art__subtitle"
|
|
1378
|
-
},
|
|
1376
|
+
}, cn = {
|
|
1379
1377
|
key: 1,
|
|
1380
1378
|
class: "wm-art__body"
|
|
1381
|
-
},
|
|
1379
|
+
}, dn = {
|
|
1382
1380
|
key: 0,
|
|
1383
1381
|
class: "wm-art__text"
|
|
1384
|
-
},
|
|
1385
|
-
function
|
|
1386
|
-
return l(), c("div",
|
|
1387
|
-
n.data.image_url ? (l(), c("figure",
|
|
1382
|
+
}, un = { class: "wm-art__fieldLabel" };
|
|
1383
|
+
function hn(t, e, n, a, r, s) {
|
|
1384
|
+
return l(), c("div", tn, [
|
|
1385
|
+
n.data.image_url ? (l(), c("figure", nn, [
|
|
1388
1386
|
i("img", {
|
|
1389
1387
|
src: n.data.image_url,
|
|
1390
1388
|
alt: n.data.title || "",
|
|
1391
1389
|
loading: "lazy"
|
|
1392
|
-
}, null, 8,
|
|
1393
|
-
])) :
|
|
1394
|
-
i("div",
|
|
1395
|
-
i("div",
|
|
1396
|
-
i("div",
|
|
1397
|
-
n.data.subtitle ? (l(), c("div",
|
|
1390
|
+
}, null, 8, sn)
|
|
1391
|
+
])) : y("", !0),
|
|
1392
|
+
i("div", rn, [
|
|
1393
|
+
i("div", an, [
|
|
1394
|
+
i("div", on, b(n.data.title), 1),
|
|
1395
|
+
n.data.subtitle ? (l(), c("div", ln, b(n.data.subtitle), 1)) : y("", !0)
|
|
1398
1396
|
]),
|
|
1399
1397
|
n.data.badge && n.data.badge.label ? (l(), c("span", {
|
|
1400
1398
|
key: 0,
|
|
1401
1399
|
class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
|
|
1402
|
-
}, b(n.data.badge.label), 3)) :
|
|
1400
|
+
}, b(n.data.badge.label), 3)) : y("", !0)
|
|
1403
1401
|
]),
|
|
1404
|
-
s.hasBody ? (l(), c("div",
|
|
1405
|
-
n.data.body ? (l(), c("div",
|
|
1406
|
-
s.fields.length ? (l(!0), c(
|
|
1402
|
+
s.hasBody ? (l(), c("div", cn, [
|
|
1403
|
+
n.data.body ? (l(), c("div", dn, b(n.data.body), 1)) : y("", !0),
|
|
1404
|
+
s.fields.length ? (l(!0), c(T, { key: 1 }, F(s.fields, (o, d) => (l(), c("div", {
|
|
1407
1405
|
key: d,
|
|
1408
1406
|
class: "wm-art__field"
|
|
1409
1407
|
}, [
|
|
1410
|
-
i("div",
|
|
1408
|
+
i("div", un, b(o.label), 1),
|
|
1411
1409
|
i("div", {
|
|
1412
1410
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1413
1411
|
}, b(o.value), 3)
|
|
1414
|
-
]))), 128)) :
|
|
1415
|
-
])) :
|
|
1412
|
+
]))), 128)) : y("", !0)
|
|
1413
|
+
])) : y("", !0)
|
|
1416
1414
|
]);
|
|
1417
1415
|
}
|
|
1418
|
-
const
|
|
1419
|
-
function
|
|
1416
|
+
const mn = /* @__PURE__ */ B(en, [["render", hn], ["__scopeId", "data-v-d7369333"]]);
|
|
1417
|
+
function fn(t) {
|
|
1420
1418
|
if (!t) return "";
|
|
1421
1419
|
const e = new Date(t);
|
|
1422
1420
|
if (Number.isNaN(e.getTime())) return t;
|
|
1423
1421
|
const n = e.toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" }), a = e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
1424
1422
|
return `${n} à ${a}`;
|
|
1425
1423
|
}
|
|
1426
|
-
const
|
|
1424
|
+
const _n = {
|
|
1427
1425
|
name: "WmArtifactTicket",
|
|
1428
1426
|
props: {
|
|
1429
1427
|
data: { type: Object, required: !0 }
|
|
@@ -1439,7 +1437,7 @@ const fn = {
|
|
|
1439
1437
|
},
|
|
1440
1438
|
formattedDate() {
|
|
1441
1439
|
var t;
|
|
1442
|
-
return
|
|
1440
|
+
return fn((t = this.data) == null ? void 0 : t.created_at);
|
|
1443
1441
|
}
|
|
1444
1442
|
},
|
|
1445
1443
|
methods: {
|
|
@@ -1456,22 +1454,22 @@ const fn = {
|
|
|
1456
1454
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(e) ? 3 : /low|basse|faible|minor/.test(e) ? 1 : 2;
|
|
1457
1455
|
}
|
|
1458
1456
|
}
|
|
1459
|
-
},
|
|
1457
|
+
}, pn = { class: "wm-art wm-art--ticket" }, vn = { class: "wm-art__head wm-tk__head" }, yn = { class: "wm-art__title wm-tk__title" }, gn = { class: "wm-tk__sub" }, wn = { class: "wm-tk__ref" }, bn = {
|
|
1460
1458
|
key: 0,
|
|
1461
1459
|
class: "wm-art__body"
|
|
1462
|
-
},
|
|
1460
|
+
}, kn = {
|
|
1463
1461
|
key: 0,
|
|
1464
1462
|
class: "wm-tk__text"
|
|
1465
|
-
},
|
|
1463
|
+
}, Cn = { class: "wm-art__fieldLabel" }, An = ["data-level"], Sn = {
|
|
1466
1464
|
key: 1,
|
|
1467
1465
|
class: "wm-art__footer wm-tk__footer"
|
|
1468
1466
|
};
|
|
1469
|
-
function
|
|
1470
|
-
return l(), c("div",
|
|
1471
|
-
i("div",
|
|
1472
|
-
i("div",
|
|
1473
|
-
i("div",
|
|
1474
|
-
i("div",
|
|
1467
|
+
function xn(t, e, n, a, r, s) {
|
|
1468
|
+
return l(), c("div", pn, [
|
|
1469
|
+
i("div", vn, [
|
|
1470
|
+
i("div", yn, b(n.data.title), 1),
|
|
1471
|
+
i("div", gn, [
|
|
1472
|
+
i("div", wn, [
|
|
1475
1473
|
e[0] || (e[0] = i("svg", {
|
|
1476
1474
|
width: "11",
|
|
1477
1475
|
height: "11",
|
|
@@ -1499,13 +1497,13 @@ function Sn(t, e, n, a, r, s) {
|
|
|
1499
1497
|
], 2)
|
|
1500
1498
|
])
|
|
1501
1499
|
]),
|
|
1502
|
-
s.hasBody ? (l(), c("div",
|
|
1503
|
-
n.data.body ? (l(), c("div",
|
|
1504
|
-
s.fields.length ? (l(!0), c(
|
|
1500
|
+
s.hasBody ? (l(), c("div", bn, [
|
|
1501
|
+
n.data.body ? (l(), c("div", kn, b(n.data.body), 1)) : y("", !0),
|
|
1502
|
+
s.fields.length ? (l(!0), c(T, { key: 1 }, F(s.fields, (o, d) => (l(), c("div", {
|
|
1505
1503
|
key: d,
|
|
1506
1504
|
class: "wm-art__field"
|
|
1507
1505
|
}, [
|
|
1508
|
-
i("div",
|
|
1506
|
+
i("div", Cn, b(o.label), 1),
|
|
1509
1507
|
i("div", {
|
|
1510
1508
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1511
1509
|
}, [
|
|
@@ -1539,12 +1537,12 @@ function Sn(t, e, n, a, r, s) {
|
|
|
1539
1537
|
height: "9",
|
|
1540
1538
|
rx: "0.5"
|
|
1541
1539
|
}, null, -1)
|
|
1542
|
-
])], 8,
|
|
1540
|
+
])], 8, An)) : y("", !0),
|
|
1543
1541
|
i("span", null, b(o.value), 1)
|
|
1544
1542
|
], 2)
|
|
1545
|
-
]))), 128)) :
|
|
1546
|
-
])) :
|
|
1547
|
-
n.data.created_at ? (l(), c("div",
|
|
1543
|
+
]))), 128)) : y("", !0)
|
|
1544
|
+
])) : y("", !0),
|
|
1545
|
+
n.data.created_at ? (l(), c("div", Sn, [
|
|
1548
1546
|
e[3] || (e[3] = i("svg", {
|
|
1549
1547
|
width: "11",
|
|
1550
1548
|
height: "11",
|
|
@@ -1566,14 +1564,14 @@ function Sn(t, e, n, a, r, s) {
|
|
|
1566
1564
|
i("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
1567
1565
|
], -1)),
|
|
1568
1566
|
i("span", null, b(s.formattedDate), 1)
|
|
1569
|
-
])) :
|
|
1567
|
+
])) : y("", !0)
|
|
1570
1568
|
]);
|
|
1571
1569
|
}
|
|
1572
|
-
const
|
|
1573
|
-
form_response:
|
|
1574
|
-
info_card:
|
|
1575
|
-
ticket:
|
|
1576
|
-
},
|
|
1570
|
+
const Mn = /* @__PURE__ */ B(_n, [["render", xn], ["__scopeId", "data-v-f0495924"]]), Tn = {
|
|
1571
|
+
form_response: Zt,
|
|
1572
|
+
info_card: mn,
|
|
1573
|
+
ticket: Mn
|
|
1574
|
+
}, On = {
|
|
1577
1575
|
name: "WmArtifactRenderer",
|
|
1578
1576
|
props: {
|
|
1579
1577
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -1584,17 +1582,17 @@ const xn = /* @__PURE__ */ B(fn, [["render", Sn], ["__scopeId", "data-v-f0495924
|
|
|
1584
1582
|
component() {
|
|
1585
1583
|
var e;
|
|
1586
1584
|
const t = (e = this.artifact) == null ? void 0 : e.kind;
|
|
1587
|
-
return t &&
|
|
1585
|
+
return t && Tn[t] || null;
|
|
1588
1586
|
}
|
|
1589
1587
|
}
|
|
1590
1588
|
};
|
|
1591
1589
|
function In(t, e, n, a, r, s) {
|
|
1592
|
-
return s.component ? (l(), $(
|
|
1590
|
+
return s.component ? (l(), $(Oe(s.component), {
|
|
1593
1591
|
key: 0,
|
|
1594
1592
|
data: n.artifact.data
|
|
1595
|
-
}, null, 8, ["data"])) :
|
|
1593
|
+
}, null, 8, ["data"])) : y("", !0);
|
|
1596
1594
|
}
|
|
1597
|
-
const Ae = /* @__PURE__ */ B(
|
|
1595
|
+
const Ae = /* @__PURE__ */ B(On, [["render", In]]), En = {
|
|
1598
1596
|
name: "WmActionResult",
|
|
1599
1597
|
components: { ArtifactRenderer: Ae },
|
|
1600
1598
|
props: {
|
|
@@ -1617,7 +1615,7 @@ const Ae = /* @__PURE__ */ B(Tn, [["render", In]]), On = {
|
|
|
1617
1615
|
return Ce(this.detail);
|
|
1618
1616
|
}
|
|
1619
1617
|
}
|
|
1620
|
-
},
|
|
1618
|
+
}, Bn = { class: "wm-result-wrap" }, Ln = { class: "wm-result" }, Rn = {
|
|
1621
1619
|
key: 0,
|
|
1622
1620
|
width: "10",
|
|
1623
1621
|
height: "10",
|
|
@@ -1628,7 +1626,7 @@ const Ae = /* @__PURE__ */ B(Tn, [["render", In]]), On = {
|
|
|
1628
1626
|
"stroke-linecap": "round",
|
|
1629
1627
|
"stroke-linejoin": "round",
|
|
1630
1628
|
"aria-hidden": "true"
|
|
1631
|
-
},
|
|
1629
|
+
}, $n = {
|
|
1632
1630
|
key: 1,
|
|
1633
1631
|
width: "10",
|
|
1634
1632
|
height: "10",
|
|
@@ -1639,24 +1637,24 @@ const Ae = /* @__PURE__ */ B(Tn, [["render", In]]), On = {
|
|
|
1639
1637
|
"stroke-linecap": "round",
|
|
1640
1638
|
"stroke-linejoin": "round",
|
|
1641
1639
|
"aria-hidden": "true"
|
|
1642
|
-
},
|
|
1640
|
+
}, Fn = { class: "wm-result__body" }, jn = ["innerHTML"], Un = {
|
|
1643
1641
|
key: 0,
|
|
1644
1642
|
class: "wm-result-art"
|
|
1645
1643
|
};
|
|
1646
|
-
function
|
|
1644
|
+
function Dn(t, e, n, a, r, s) {
|
|
1647
1645
|
const o = I("ArtifactRenderer");
|
|
1648
|
-
return l(), c("div",
|
|
1649
|
-
i("div",
|
|
1646
|
+
return l(), c("div", Bn, [
|
|
1647
|
+
i("div", Ln, [
|
|
1650
1648
|
i("div", {
|
|
1651
1649
|
class: E(["wm-result__check", { "wm-result__check--ok": s.ok }])
|
|
1652
1650
|
}, [
|
|
1653
|
-
s.ok ? (l(), c("svg",
|
|
1651
|
+
s.ok ? (l(), c("svg", Rn, [...e[0] || (e[0] = [
|
|
1654
1652
|
i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
1655
|
-
])])) : (l(), c("svg",
|
|
1653
|
+
])])) : (l(), c("svg", $n, [...e[1] || (e[1] = [
|
|
1656
1654
|
i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
1657
1655
|
])]))
|
|
1658
1656
|
], 2),
|
|
1659
|
-
i("div",
|
|
1657
|
+
i("div", Fn, [
|
|
1660
1658
|
i("div", {
|
|
1661
1659
|
class: E(["wm-result__label", { "wm-result__label--struck": !s.ok }])
|
|
1662
1660
|
}, b(n.label), 3),
|
|
@@ -1664,15 +1662,15 @@ function Un(t, e, n, a, r, s) {
|
|
|
1664
1662
|
key: 0,
|
|
1665
1663
|
class: "wm-result__detail",
|
|
1666
1664
|
innerHTML: s.detailHtml
|
|
1667
|
-
}, null, 8,
|
|
1665
|
+
}, null, 8, jn)) : y("", !0)
|
|
1668
1666
|
])
|
|
1669
1667
|
]),
|
|
1670
|
-
n.artifact ? (l(), c("div",
|
|
1671
|
-
|
|
1672
|
-
])) :
|
|
1668
|
+
n.artifact ? (l(), c("div", Un, [
|
|
1669
|
+
P(o, { artifact: n.artifact }, null, 8, ["artifact"])
|
|
1670
|
+
])) : y("", !0)
|
|
1673
1671
|
]);
|
|
1674
1672
|
}
|
|
1675
|
-
const
|
|
1673
|
+
const Nn = /* @__PURE__ */ B(En, [["render", Dn], ["__scopeId", "data-v-037fd69e"]]), Pn = {
|
|
1676
1674
|
name: "WmAttachmentPreview",
|
|
1677
1675
|
inject: {
|
|
1678
1676
|
signAttachmentFn: { default: null }
|
|
@@ -1726,15 +1724,15 @@ const Dn = /* @__PURE__ */ B(On, [["render", Un], ["__scopeId", "data-v-037fd69e
|
|
|
1726
1724
|
this.url || t.preventDefault();
|
|
1727
1725
|
}
|
|
1728
1726
|
}
|
|
1729
|
-
},
|
|
1727
|
+
}, Hn = ["href"], zn = ["src", "alt"], Vn = ["src"], qn = ["src"], Wn = ["href", "download"], Gn = { class: "wm-att__main" }, Kn = { class: "wm-att__name" }, Yn = {
|
|
1730
1728
|
key: 0,
|
|
1731
1729
|
class: "wm-att__meta"
|
|
1732
|
-
},
|
|
1730
|
+
}, Jn = {
|
|
1733
1731
|
key: 0,
|
|
1734
1732
|
class: "wm-att__spin",
|
|
1735
1733
|
"aria-hidden": "true"
|
|
1736
1734
|
};
|
|
1737
|
-
function
|
|
1735
|
+
function Xn(t, e, n, a, r, s) {
|
|
1738
1736
|
return l(), c("div", {
|
|
1739
1737
|
class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
1740
1738
|
}, [
|
|
@@ -1749,18 +1747,18 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1749
1747
|
src: r.url,
|
|
1750
1748
|
alt: s.displayName,
|
|
1751
1749
|
loading: "lazy"
|
|
1752
|
-
}, null, 8,
|
|
1753
|
-
], 8,
|
|
1750
|
+
}, null, 8, zn)
|
|
1751
|
+
], 8, Hn)) : s.kind === "audio" && r.url ? (l(), c("audio", {
|
|
1754
1752
|
key: 1,
|
|
1755
1753
|
src: r.url,
|
|
1756
1754
|
controls: "",
|
|
1757
1755
|
preload: "metadata"
|
|
1758
|
-
}, null, 8,
|
|
1756
|
+
}, null, 8, Vn)) : s.kind === "video" && r.url ? (l(), c("video", {
|
|
1759
1757
|
key: 2,
|
|
1760
1758
|
src: r.url,
|
|
1761
1759
|
controls: "",
|
|
1762
1760
|
preload: "metadata"
|
|
1763
|
-
}, null, 8,
|
|
1761
|
+
}, null, 8, qn)) : (l(), c("a", {
|
|
1764
1762
|
key: 3,
|
|
1765
1763
|
class: "wm-att__file",
|
|
1766
1764
|
href: r.url || "#",
|
|
@@ -1785,15 +1783,15 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1785
1783
|
i("path", { d: "M14 2v6h6" })
|
|
1786
1784
|
])
|
|
1787
1785
|
], -1)),
|
|
1788
|
-
i("span",
|
|
1789
|
-
i("span",
|
|
1790
|
-
s.sizeLabel ? (l(), c("span",
|
|
1786
|
+
i("span", Gn, [
|
|
1787
|
+
i("span", Kn, b(s.displayName), 1),
|
|
1788
|
+
s.sizeLabel ? (l(), c("span", Yn, b(s.sizeLabel), 1)) : y("", !0)
|
|
1791
1789
|
]),
|
|
1792
|
-
r.loading ? (l(), c("span",
|
|
1793
|
-
], 8,
|
|
1790
|
+
r.loading ? (l(), c("span", Jn)) : y("", !0)
|
|
1791
|
+
], 8, Wn))
|
|
1794
1792
|
], 2);
|
|
1795
1793
|
}
|
|
1796
|
-
const
|
|
1794
|
+
const Qn = /* @__PURE__ */ B(Pn, [["render", Xn], ["__scopeId", "data-v-1cd1267b"]]), Zn = {
|
|
1797
1795
|
name: "WmBubble",
|
|
1798
1796
|
props: {
|
|
1799
1797
|
role: { type: String, default: "ai" },
|
|
@@ -1805,38 +1803,38 @@ const Xn = /* @__PURE__ */ B(Nn, [["render", Jn], ["__scopeId", "data-v-1cd1267b
|
|
|
1805
1803
|
return Ce(this.text);
|
|
1806
1804
|
}
|
|
1807
1805
|
}
|
|
1808
|
-
},
|
|
1809
|
-
function
|
|
1806
|
+
}, es = ["innerHTML"];
|
|
1807
|
+
function ts(t, e, n, a, r, s) {
|
|
1810
1808
|
return l(), c("div", {
|
|
1811
1809
|
class: E(["wm-bubble", "wm-bubble--" + n.role])
|
|
1812
1810
|
}, [
|
|
1813
|
-
|
|
1814
|
-
i("span", { innerHTML: s.rendered }, null, 8,
|
|
1811
|
+
Ie(t.$slots, "default", {}, () => [
|
|
1812
|
+
i("span", { innerHTML: s.rendered }, null, 8, es)
|
|
1815
1813
|
], !0)
|
|
1816
1814
|
], 2);
|
|
1817
1815
|
}
|
|
1818
|
-
const
|
|
1819
|
-
function
|
|
1820
|
-
return l(), c("div",
|
|
1816
|
+
const ns = /* @__PURE__ */ B(Zn, [["render", ts], ["__scopeId", "data-v-c52bb028"]]), ss = { name: "WmTyping" }, rs = { class: "wm-typing" };
|
|
1817
|
+
function is(t, e, n, a, r, s) {
|
|
1818
|
+
return l(), c("div", rs, [...e[0] || (e[0] = [
|
|
1821
1819
|
i("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
1822
1820
|
i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
1823
1821
|
i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
1824
1822
|
])]);
|
|
1825
1823
|
}
|
|
1826
|
-
const
|
|
1824
|
+
const as = /* @__PURE__ */ B(ss, [["render", is], ["__scopeId", "data-v-df2447fd"]]);
|
|
1827
1825
|
function ce(t) {
|
|
1828
1826
|
return t ? t.client_msg_id || t.id : "";
|
|
1829
1827
|
}
|
|
1830
|
-
const
|
|
1828
|
+
const os = {
|
|
1831
1829
|
transferred_to_human: "Conversation transférée à un humain",
|
|
1832
1830
|
assigned: "{name} a rejoint la conversation",
|
|
1833
1831
|
unassigned: "L'agent a quitté la conversation",
|
|
1834
1832
|
resolved: "Conversation résolue",
|
|
1835
1833
|
reopened: "Conversation rouverte",
|
|
1836
1834
|
idle: "Conversation en pause"
|
|
1837
|
-
},
|
|
1835
|
+
}, ls = 80, cs = 200, ds = {
|
|
1838
1836
|
name: "WmMessageList",
|
|
1839
|
-
components: { AIAvatar: J, HumanAvatar: ke, Bubble:
|
|
1837
|
+
components: { AIAvatar: J, HumanAvatar: ke, Bubble: ns, Typing: as, ActionResult: Nn, AttachmentPreview: Qn, ArtifactRenderer: Ae },
|
|
1840
1838
|
props: {
|
|
1841
1839
|
messages: { type: Array, default: () => [] },
|
|
1842
1840
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1847,7 +1845,12 @@ const as = {
|
|
|
1847
1845
|
// True while older messages are being fetched.
|
|
1848
1846
|
loadingMore: { type: Boolean, default: !1 },
|
|
1849
1847
|
// True when the server still has older messages to return.
|
|
1850
|
-
hasMore: { type: Boolean, default: !1 }
|
|
1848
|
+
hasMore: { type: Boolean, default: !1 },
|
|
1849
|
+
// ISO timestamp frozen at the moment the user started viewing the
|
|
1850
|
+
// current thread. Drives the "Non lus" separator: rendered before the
|
|
1851
|
+
// first non-user group whose first message is newer than this anchor.
|
|
1852
|
+
// Empty string disables the separator (fresh thread or no prior read).
|
|
1853
|
+
unreadAnchorTs: { type: String, default: "" }
|
|
1851
1854
|
},
|
|
1852
1855
|
emits: ["load-more"],
|
|
1853
1856
|
data() {
|
|
@@ -1887,6 +1890,19 @@ const as = {
|
|
|
1887
1890
|
});
|
|
1888
1891
|
}
|
|
1889
1892
|
return t;
|
|
1893
|
+
},
|
|
1894
|
+
// Key of the first non-user group that starts after the unread anchor.
|
|
1895
|
+
// ISO 8601 timestamps sort lexicographically, so a string `>` compare
|
|
1896
|
+
// is correct here (same trick as the unread flag in Messenger.vue).
|
|
1897
|
+
unreadGroupKey() {
|
|
1898
|
+
if (!this.unreadAnchorTs) return null;
|
|
1899
|
+
for (const t of this.groups) {
|
|
1900
|
+
if (t.role === "user" || t.role === "system") continue;
|
|
1901
|
+
const e = t.messages[0];
|
|
1902
|
+
if (e != null && e.created_at && e.created_at > this.unreadAnchorTs)
|
|
1903
|
+
return t.key;
|
|
1904
|
+
}
|
|
1905
|
+
return null;
|
|
1890
1906
|
}
|
|
1891
1907
|
},
|
|
1892
1908
|
watch: {
|
|
@@ -1904,11 +1920,11 @@ const as = {
|
|
|
1904
1920
|
methods: {
|
|
1905
1921
|
messageKey: ce,
|
|
1906
1922
|
isAtBottom(t) {
|
|
1907
|
-
return t.scrollHeight - t.scrollTop - t.clientHeight <=
|
|
1923
|
+
return t.scrollHeight - t.scrollTop - t.clientHeight <= ls;
|
|
1908
1924
|
},
|
|
1909
1925
|
onScroll() {
|
|
1910
1926
|
const t = this.$refs.scrollEl;
|
|
1911
|
-
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <=
|
|
1927
|
+
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= cs && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
1912
1928
|
},
|
|
1913
1929
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
1914
1930
|
//
|
|
@@ -2080,7 +2096,7 @@ const as = {
|
|
|
2080
2096
|
},
|
|
2081
2097
|
systemLabel(t) {
|
|
2082
2098
|
var r, s, o;
|
|
2083
|
-
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n =
|
|
2099
|
+
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = os[e] || (t == null ? void 0 : t.text_md) || "Mise à jour de la conversation", a = ((s = t == null ? void 0 : t.metadata) == null ? void 0 : s.agent_name) || ((o = t == null ? void 0 : t.author) == null ? void 0 : o.name) || "";
|
|
2084
2100
|
return n.replace("{name}", a || "Un agent");
|
|
2085
2101
|
},
|
|
2086
2102
|
scrollToBottom() {
|
|
@@ -2088,125 +2104,136 @@ const as = {
|
|
|
2088
2104
|
t && (t.scrollTop = t.scrollHeight);
|
|
2089
2105
|
}
|
|
2090
2106
|
}
|
|
2091
|
-
},
|
|
2107
|
+
}, us = {
|
|
2092
2108
|
key: 0,
|
|
2093
2109
|
class: "wm-list__loadMore",
|
|
2094
2110
|
role: "status",
|
|
2095
2111
|
"aria-live": "polite"
|
|
2096
|
-
},
|
|
2112
|
+
}, hs = {
|
|
2097
2113
|
key: 1,
|
|
2098
2114
|
class: "wm-list__historyEnd"
|
|
2099
|
-
},
|
|
2115
|
+
}, ms = {
|
|
2100
2116
|
key: 2,
|
|
2101
2117
|
class: "wm-list__sep"
|
|
2102
|
-
},
|
|
2118
|
+
}, fs = { class: "wm-list__sep-label" }, _s = {
|
|
2119
|
+
key: 0,
|
|
2120
|
+
class: "wm-list__sep wm-list__sep--unread"
|
|
2121
|
+
}, ps = {
|
|
2103
2122
|
key: 0,
|
|
2104
2123
|
class: "wm-list__sysep"
|
|
2105
|
-
},
|
|
2124
|
+
}, vs = { class: "wm-list__sysep-label" }, ys = {
|
|
2106
2125
|
key: 0,
|
|
2107
2126
|
class: "wm-list__avatarSlot"
|
|
2108
|
-
},
|
|
2127
|
+
}, gs = {
|
|
2109
2128
|
key: 3,
|
|
2110
2129
|
class: "wm-list__body"
|
|
2111
|
-
},
|
|
2130
|
+
}, ws = { key: 0 }, bs = {
|
|
2112
2131
|
key: 1,
|
|
2113
2132
|
"aria-hidden": "true"
|
|
2114
|
-
},
|
|
2133
|
+
}, ks = { key: 2 }, Cs = {
|
|
2115
2134
|
key: 3,
|
|
2116
2135
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
2117
|
-
},
|
|
2118
|
-
function
|
|
2136
|
+
}, As = { class: "wm-list__avatarSlot" };
|
|
2137
|
+
function Ss(t, e, n, a, r, s) {
|
|
2119
2138
|
const o = I("AIAvatar"), d = I("HumanAvatar"), v = I("ActionResult"), C = I("ArtifactRenderer"), w = I("Bubble"), S = I("AttachmentPreview"), L = I("Typing");
|
|
2120
2139
|
return l(), c("div", {
|
|
2121
2140
|
ref: "scrollEl",
|
|
2122
2141
|
class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
2123
2142
|
onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
2124
2143
|
}, [
|
|
2125
|
-
n.loadingMore ? (l(), c("div",
|
|
2144
|
+
n.loadingMore ? (l(), c("div", us, [...e[1] || (e[1] = [
|
|
2126
2145
|
i("span", {
|
|
2127
2146
|
class: "wm-list__loadMore-spinner",
|
|
2128
2147
|
"aria-hidden": "true"
|
|
2129
2148
|
}, null, -1),
|
|
2130
2149
|
i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
|
|
2131
|
-
])])) : s.historyExhausted ? (l(), c("div",
|
|
2132
|
-
n.dateLabel ? (l(), c("div",
|
|
2150
|
+
])])) : s.historyExhausted ? (l(), c("div", hs, "Début de la conversation")) : y("", !0),
|
|
2151
|
+
n.dateLabel ? (l(), c("div", ms, [
|
|
2133
2152
|
e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
|
|
2134
|
-
i("span",
|
|
2153
|
+
i("span", fs, b(n.dateLabel), 1),
|
|
2135
2154
|
e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
|
|
2136
|
-
])) :
|
|
2137
|
-
(l(!0), c(
|
|
2138
|
-
key: A.key
|
|
2139
|
-
class: E(["wm-list__group", "wm-list__group--" + A.role])
|
|
2155
|
+
])) : y("", !0),
|
|
2156
|
+
(l(!0), c(T, null, F(s.groups, (A, D) => (l(), c(T, {
|
|
2157
|
+
key: A.key
|
|
2140
2158
|
}, [
|
|
2141
|
-
A.
|
|
2142
|
-
|
|
2143
|
-
i("span",
|
|
2144
|
-
|
|
2145
|
-
])) : (
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2159
|
+
A.key === s.unreadGroupKey ? (l(), c("div", _s, [...e[4] || (e[4] = [
|
|
2160
|
+
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
|
|
2161
|
+
i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
|
|
2162
|
+
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
|
|
2163
|
+
])])) : y("", !0),
|
|
2164
|
+
i("div", {
|
|
2165
|
+
class: E(["wm-list__group", "wm-list__group--" + A.role])
|
|
2166
|
+
}, [
|
|
2167
|
+
A.role === "system" ? (l(), c("div", ps, [
|
|
2168
|
+
e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
2169
|
+
i("span", vs, b(A.systemLabel), 1),
|
|
2170
|
+
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2171
|
+
])) : (l(), c(T, { key: 1 }, [
|
|
2172
|
+
(l(!0), c(T, null, F(A.messages, (x, N) => (l(), c("div", {
|
|
2173
|
+
key: s.messageKey(x),
|
|
2174
|
+
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x._pending, "is-failed": x._failed }]]),
|
|
2175
|
+
style: V(s.cornersStyle(A, N))
|
|
2176
|
+
}, [
|
|
2177
|
+
A.role !== "user" ? (l(), c("div", ys, [
|
|
2178
|
+
N === A.messages.length - 1 ? (l(), c(T, { key: 0 }, [
|
|
2179
|
+
A.role === "ai" ? (l(), $(o, {
|
|
2180
|
+
key: 0,
|
|
2181
|
+
size: 26
|
|
2182
|
+
})) : (l(), $(d, {
|
|
2183
|
+
key: 1,
|
|
2184
|
+
name: A.agentName,
|
|
2185
|
+
"avatar-url": A.agentAvatarUrl,
|
|
2186
|
+
size: 26
|
|
2187
|
+
}, null, 8, ["name", "avatar-url"]))
|
|
2188
|
+
], 64)) : y("", !0)
|
|
2189
|
+
])) : y("", !0),
|
|
2190
|
+
x.type === "action" && x.payload && x.payload.state !== "pending" ? (l(), $(v, {
|
|
2191
|
+
key: 1,
|
|
2192
|
+
state: x.payload.state,
|
|
2193
|
+
label: s.actionLabel(x),
|
|
2194
|
+
detail: s.actionDetail(x),
|
|
2195
|
+
artifact: s.actionArtifact(x)
|
|
2196
|
+
}, null, 8, ["state", "label", "detail", "artifact"])) : s.artifactOf(x) ? (l(), $(C, {
|
|
2197
|
+
key: 2,
|
|
2198
|
+
artifact: s.artifactOf(x)
|
|
2199
|
+
}, null, 8, ["artifact"])) : (l(), c("div", gs, [
|
|
2200
|
+
x.text_md ? (l(), $(w, {
|
|
2154
2201
|
key: 0,
|
|
2155
|
-
|
|
2156
|
-
|
|
2202
|
+
role: A.role,
|
|
2203
|
+
text: x.text_md
|
|
2204
|
+
}, null, 8, ["role", "text"])) : y("", !0),
|
|
2205
|
+
s.attachmentsOf(x).length ? (l(), c("div", {
|
|
2157
2206
|
key: 1,
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
},
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2182
|
-
}, [
|
|
2183
|
-
(l(!0), c(O, null, F(s.attachmentsOf(x), (j, z) => (l(), $(S, {
|
|
2184
|
-
key: `${s.messageKey(x)}-att-${z}`,
|
|
2185
|
-
attachment: j
|
|
2186
|
-
}, null, 8, ["attachment"]))), 128))
|
|
2187
|
-
], 2)) : g("", !0)
|
|
2188
|
-
]))
|
|
2189
|
-
], 6))), 128)),
|
|
2190
|
-
A.role !== "user" || s.lastTimeOf(A) ? (l(), c("div", {
|
|
2191
|
-
key: 0,
|
|
2192
|
-
class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2193
|
-
}, [
|
|
2194
|
-
A.role !== "user" ? (l(), c("span", ys, b(s.roleLabel(A)), 1)) : g("", !0),
|
|
2195
|
-
A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", gs, "·")) : g("", !0),
|
|
2196
|
-
s.lastTimeOf(A) ? (l(), c("span", ws, b(s.lastTimeOf(A)), 1)) : g("", !0)
|
|
2197
|
-
], 2)) : g("", !0)
|
|
2198
|
-
], 64))
|
|
2199
|
-
], 2))), 128)),
|
|
2200
|
-
n.streamingActive ? (l(), c("div", bs, [
|
|
2201
|
-
i("div", ks, [
|
|
2202
|
-
H(o, { size: 26 })
|
|
2207
|
+
class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2208
|
+
}, [
|
|
2209
|
+
(l(!0), c(T, null, F(s.attachmentsOf(x), (j, H) => (l(), $(S, {
|
|
2210
|
+
key: `${s.messageKey(x)}-att-${H}`,
|
|
2211
|
+
attachment: j
|
|
2212
|
+
}, null, 8, ["attachment"]))), 128))
|
|
2213
|
+
], 2)) : y("", !0)
|
|
2214
|
+
]))
|
|
2215
|
+
], 6))), 128)),
|
|
2216
|
+
A.role !== "user" || s.lastTimeOf(A) ? (l(), c("div", {
|
|
2217
|
+
key: 0,
|
|
2218
|
+
class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2219
|
+
}, [
|
|
2220
|
+
A.role !== "user" ? (l(), c("span", ws, b(s.roleLabel(A)), 1)) : y("", !0),
|
|
2221
|
+
A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", bs, "·")) : y("", !0),
|
|
2222
|
+
s.lastTimeOf(A) ? (l(), c("span", ks, b(s.lastTimeOf(A)), 1)) : y("", !0)
|
|
2223
|
+
], 2)) : y("", !0)
|
|
2224
|
+
], 64))
|
|
2225
|
+
], 2)
|
|
2226
|
+
], 64))), 128)),
|
|
2227
|
+
n.streamingActive ? (l(), c("div", Cs, [
|
|
2228
|
+
i("div", As, [
|
|
2229
|
+
P(o, { size: 26 })
|
|
2203
2230
|
]),
|
|
2204
|
-
|
|
2205
|
-
])) :
|
|
2231
|
+
P(L)
|
|
2232
|
+
])) : y("", !0)
|
|
2206
2233
|
], 34);
|
|
2207
2234
|
}
|
|
2208
|
-
const
|
|
2209
|
-
function
|
|
2235
|
+
const xs = /* @__PURE__ */ B(ds, [["render", Ss], ["__scopeId", "data-v-195ed9b1"]]), te = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2236
|
+
function Ms() {
|
|
2210
2237
|
return he && [
|
|
2211
2238
|
"video/webm;codecs=vp9,opus",
|
|
2212
2239
|
"video/webm;codecs=vp8,opus",
|
|
@@ -2226,10 +2253,10 @@ function Se({ audio: t }) {
|
|
|
2226
2253
|
systemAudio: t ? "include" : "exclude"
|
|
2227
2254
|
};
|
|
2228
2255
|
}
|
|
2229
|
-
function
|
|
2256
|
+
function Di(t) {
|
|
2230
2257
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2231
2258
|
}
|
|
2232
|
-
async function
|
|
2259
|
+
async function Ts() {
|
|
2233
2260
|
if (!te) return null;
|
|
2234
2261
|
let t;
|
|
2235
2262
|
try {
|
|
@@ -2238,7 +2265,7 @@ async function xs() {
|
|
|
2238
2265
|
return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
|
|
2239
2266
|
}
|
|
2240
2267
|
try {
|
|
2241
|
-
return await
|
|
2268
|
+
return await Os(t);
|
|
2242
2269
|
} catch (e) {
|
|
2243
2270
|
return console.error("[media] screenshot capture", e), null;
|
|
2244
2271
|
} finally {
|
|
@@ -2247,7 +2274,7 @@ async function xs() {
|
|
|
2247
2274
|
});
|
|
2248
2275
|
}
|
|
2249
2276
|
}
|
|
2250
|
-
async function
|
|
2277
|
+
async function Os(t) {
|
|
2251
2278
|
const e = document.createElement("video");
|
|
2252
2279
|
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((d) => requestAnimationFrame(d));
|
|
2253
2280
|
const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -2257,7 +2284,7 @@ async function Ms(t) {
|
|
|
2257
2284
|
}), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
2258
2285
|
return new File([s], `capture-${o}.png`, { type: "image/png" });
|
|
2259
2286
|
}
|
|
2260
|
-
async function
|
|
2287
|
+
async function Is(t = {}) {
|
|
2261
2288
|
var C;
|
|
2262
2289
|
if (!te || !he) return null;
|
|
2263
2290
|
let e;
|
|
@@ -2266,7 +2293,7 @@ async function Ts(t = {}) {
|
|
|
2266
2293
|
} catch (w) {
|
|
2267
2294
|
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
2268
2295
|
}
|
|
2269
|
-
const n =
|
|
2296
|
+
const n = Ms();
|
|
2270
2297
|
let a;
|
|
2271
2298
|
try {
|
|
2272
2299
|
a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
|
|
@@ -2318,7 +2345,7 @@ async function Ts(t = {}) {
|
|
|
2318
2345
|
}
|
|
2319
2346
|
};
|
|
2320
2347
|
}
|
|
2321
|
-
const
|
|
2348
|
+
const Es = [
|
|
2322
2349
|
{
|
|
2323
2350
|
action: "file",
|
|
2324
2351
|
label: "Joindre un fichier",
|
|
@@ -2334,7 +2361,7 @@ const Is = [
|
|
|
2334
2361
|
label: "Enregistrer l'écran",
|
|
2335
2362
|
path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
|
|
2336
2363
|
}
|
|
2337
|
-
],
|
|
2364
|
+
], Bs = {
|
|
2338
2365
|
name: "WmComposer",
|
|
2339
2366
|
props: {
|
|
2340
2367
|
modelValue: { type: String, default: "" },
|
|
@@ -2357,7 +2384,7 @@ const Is = [
|
|
|
2357
2384
|
return !this.disabled && !!this.local.trim();
|
|
2358
2385
|
},
|
|
2359
2386
|
attachItems() {
|
|
2360
|
-
return
|
|
2387
|
+
return Es.map((t) => ({
|
|
2361
2388
|
...t,
|
|
2362
2389
|
disabled: t.action === "screenshot" && !te || t.action === "record" && (!te || !he)
|
|
2363
2390
|
}));
|
|
@@ -2429,13 +2456,13 @@ const Is = [
|
|
|
2429
2456
|
},
|
|
2430
2457
|
async captureScreenshot() {
|
|
2431
2458
|
if (this.disabled) return;
|
|
2432
|
-
const t = await
|
|
2459
|
+
const t = await Ts();
|
|
2433
2460
|
t && this.$emit("attach", t);
|
|
2434
2461
|
},
|
|
2435
2462
|
async startRecording() {
|
|
2436
2463
|
if (this.recording || this.disabled) return;
|
|
2437
2464
|
this.recordingElapsed = 0;
|
|
2438
|
-
const t = await
|
|
2465
|
+
const t = await Is({
|
|
2439
2466
|
onstart: () => {
|
|
2440
2467
|
this.recording = !0;
|
|
2441
2468
|
},
|
|
@@ -2460,33 +2487,33 @@ const Is = [
|
|
|
2460
2487
|
}
|
|
2461
2488
|
}
|
|
2462
2489
|
}
|
|
2463
|
-
},
|
|
2490
|
+
}, Ls = { class: "wm-compose-wrap" }, Rs = {
|
|
2464
2491
|
key: 0,
|
|
2465
2492
|
class: "wm-rec"
|
|
2466
|
-
},
|
|
2493
|
+
}, $s = { class: "wm-rec__lbl" }, Fs = {
|
|
2467
2494
|
key: 1,
|
|
2468
2495
|
class: "wm-compose__menu",
|
|
2469
2496
|
role: "menu"
|
|
2470
|
-
},
|
|
2497
|
+
}, js = ["disabled", "onClick"], Us = { class: "wm-compose__menuIcon" }, Ds = {
|
|
2471
2498
|
viewBox: "0 0 24 24",
|
|
2472
2499
|
width: "14",
|
|
2473
2500
|
height: "14",
|
|
2474
2501
|
"aria-hidden": "true"
|
|
2475
|
-
},
|
|
2476
|
-
function
|
|
2477
|
-
return l(), c("div",
|
|
2478
|
-
r.recording ? (l(), c("div",
|
|
2502
|
+
}, Ns = ["d"], Ps = ["placeholder", "disabled"], Hs = { class: "wm-compose__actions" }, zs = ["title", "aria-label", "disabled"], Vs = ["disabled"];
|
|
2503
|
+
function qs(t, e, n, a, r, s) {
|
|
2504
|
+
return l(), c("div", Ls, [
|
|
2505
|
+
r.recording ? (l(), c("div", Rs, [
|
|
2479
2506
|
e[8] || (e[8] = i("span", {
|
|
2480
2507
|
class: "wm-rec__dot",
|
|
2481
2508
|
"aria-hidden": "true"
|
|
2482
2509
|
}, null, -1)),
|
|
2483
|
-
i("span",
|
|
2510
|
+
i("span", $s, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
|
|
2484
2511
|
i("button", {
|
|
2485
2512
|
type: "button",
|
|
2486
2513
|
class: "wm-rec__stop",
|
|
2487
2514
|
onClick: e[0] || (e[0] = (...o) => s.stopRecording && s.stopRecording(...o))
|
|
2488
2515
|
}, "Arrêter")
|
|
2489
|
-
])) :
|
|
2516
|
+
])) : y("", !0),
|
|
2490
2517
|
i("form", {
|
|
2491
2518
|
class: E(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
2492
2519
|
onSubmit: e[7] || (e[7] = Y((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
|
|
@@ -2502,17 +2529,17 @@ function zs(t, e, n, a, r, s) {
|
|
|
2502
2529
|
key: 0,
|
|
2503
2530
|
class: "wm-compose__overlay",
|
|
2504
2531
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2505
|
-
})) :
|
|
2506
|
-
r.attachOpen ? (l(), c("div",
|
|
2507
|
-
(l(!0), c(
|
|
2532
|
+
})) : y("", !0),
|
|
2533
|
+
r.attachOpen ? (l(), c("div", Fs, [
|
|
2534
|
+
(l(!0), c(T, null, F(s.attachItems, (o) => (l(), c("button", {
|
|
2508
2535
|
key: o.action,
|
|
2509
2536
|
type: "button",
|
|
2510
2537
|
class: "wm-compose__menuItem",
|
|
2511
2538
|
disabled: o.disabled,
|
|
2512
2539
|
onClick: (d) => s.onAttachAction(o.action)
|
|
2513
2540
|
}, [
|
|
2514
|
-
i("span",
|
|
2515
|
-
(l(), c("svg",
|
|
2541
|
+
i("span", Us, [
|
|
2542
|
+
(l(), c("svg", Ds, [
|
|
2516
2543
|
i("path", {
|
|
2517
2544
|
d: o.path,
|
|
2518
2545
|
stroke: "currentColor",
|
|
@@ -2520,13 +2547,13 @@ function zs(t, e, n, a, r, s) {
|
|
|
2520
2547
|
"stroke-linecap": "round",
|
|
2521
2548
|
"stroke-linejoin": "round",
|
|
2522
2549
|
fill: "none"
|
|
2523
|
-
}, null, 8,
|
|
2550
|
+
}, null, 8, Ns)
|
|
2524
2551
|
]))
|
|
2525
2552
|
]),
|
|
2526
2553
|
i("span", null, b(o.label), 1)
|
|
2527
|
-
], 8,
|
|
2528
|
-
])) :
|
|
2529
|
-
|
|
2554
|
+
], 8, js))), 128))
|
|
2555
|
+
])) : y("", !0),
|
|
2556
|
+
z(i("textarea", {
|
|
2530
2557
|
ref: "inputEl",
|
|
2531
2558
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.local = o),
|
|
2532
2559
|
class: "wm-compose__input",
|
|
@@ -2535,10 +2562,10 @@ function zs(t, e, n, a, r, s) {
|
|
|
2535
2562
|
disabled: n.disabled,
|
|
2536
2563
|
onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
2537
2564
|
onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
|
|
2538
|
-
}, null, 40,
|
|
2565
|
+
}, null, 40, Ps), [
|
|
2539
2566
|
[G, r.local]
|
|
2540
2567
|
]),
|
|
2541
|
-
i("div",
|
|
2568
|
+
i("div", Hs, [
|
|
2542
2569
|
i("button", {
|
|
2543
2570
|
type: "button",
|
|
2544
2571
|
class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -2560,7 +2587,7 @@ function zs(t, e, n, a, r, s) {
|
|
|
2560
2587
|
}, [
|
|
2561
2588
|
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" })
|
|
2562
2589
|
], -1)
|
|
2563
|
-
])], 10,
|
|
2590
|
+
])], 10, zs),
|
|
2564
2591
|
i("button", {
|
|
2565
2592
|
type: "submit",
|
|
2566
2593
|
class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -2580,12 +2607,12 @@ function zs(t, e, n, a, r, s) {
|
|
|
2580
2607
|
}, [
|
|
2581
2608
|
i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
2582
2609
|
], -1)
|
|
2583
|
-
])], 10,
|
|
2610
|
+
])], 10, Vs)
|
|
2584
2611
|
])
|
|
2585
2612
|
], 34)
|
|
2586
2613
|
]);
|
|
2587
2614
|
}
|
|
2588
|
-
const
|
|
2615
|
+
const Ws = /* @__PURE__ */ B(Bs, [["render", qs], ["__scopeId", "data-v-14fa9ec0"]]), Gs = {
|
|
2589
2616
|
name: "WmSuggestionChips",
|
|
2590
2617
|
props: {
|
|
2591
2618
|
items: { type: Array, default: () => [] },
|
|
@@ -2602,22 +2629,22 @@ const Vs = /* @__PURE__ */ B(Os, [["render", zs], ["__scopeId", "data-v-14fa9ec0
|
|
|
2602
2629
|
return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
|
|
2603
2630
|
}
|
|
2604
2631
|
}
|
|
2605
|
-
},
|
|
2606
|
-
function
|
|
2632
|
+
}, Ks = ["onClick"];
|
|
2633
|
+
function Ys(t, e, n, a, r, s) {
|
|
2607
2634
|
return n.items.length ? (l(), c("div", {
|
|
2608
2635
|
key: s.batchKey,
|
|
2609
2636
|
class: "wm-chips"
|
|
2610
2637
|
}, [
|
|
2611
|
-
(l(!0), c(
|
|
2638
|
+
(l(!0), c(T, null, F(n.items, (o, d) => (l(), c("button", {
|
|
2612
2639
|
key: d,
|
|
2613
2640
|
type: "button",
|
|
2614
2641
|
class: "wm-chip",
|
|
2615
|
-
style:
|
|
2642
|
+
style: V({ animationDelay: n.baseDelay + d * n.stepDelay + "ms" }),
|
|
2616
2643
|
onClick: (v) => t.$emit("select", o)
|
|
2617
|
-
}, b(o.label), 13,
|
|
2618
|
-
])) :
|
|
2644
|
+
}, b(o.label), 13, Ks))), 128))
|
|
2645
|
+
])) : y("", !0);
|
|
2619
2646
|
}
|
|
2620
|
-
const
|
|
2647
|
+
const Js = /* @__PURE__ */ B(Gs, [["render", Ys], ["__scopeId", "data-v-55aa529d"]]), Xs = {
|
|
2621
2648
|
name: "WmApprovalCard",
|
|
2622
2649
|
components: { AIAvatar: J },
|
|
2623
2650
|
props: {
|
|
@@ -2650,41 +2677,41 @@ const Ks = /* @__PURE__ */ B(qs, [["render", Gs], ["__scopeId", "data-v-55aa529d
|
|
|
2650
2677
|
return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
|
|
2651
2678
|
}
|
|
2652
2679
|
}
|
|
2653
|
-
},
|
|
2680
|
+
}, Qs = { class: "wm-approval" }, Zs = { class: "wm-approval__head" }, er = { class: "wm-approval__icon" }, tr = { class: "wm-approval__main" }, nr = { class: "wm-approval__title" }, sr = {
|
|
2654
2681
|
key: 0,
|
|
2655
2682
|
class: "wm-approval__detail"
|
|
2656
|
-
},
|
|
2657
|
-
function
|
|
2683
|
+
}, rr = { class: "wm-approval__actions" };
|
|
2684
|
+
function ir(t, e, n, a, r, s) {
|
|
2658
2685
|
const o = I("AIAvatar");
|
|
2659
|
-
return l(), c("div",
|
|
2660
|
-
i("div",
|
|
2661
|
-
i("div",
|
|
2662
|
-
|
|
2686
|
+
return l(), c("div", Qs, [
|
|
2687
|
+
i("div", Zs, [
|
|
2688
|
+
i("div", er, [
|
|
2689
|
+
P(o, { size: 24 })
|
|
2663
2690
|
]),
|
|
2664
|
-
i("div",
|
|
2665
|
-
i("div",
|
|
2666
|
-
n.detail ? (l(), c("div",
|
|
2691
|
+
i("div", tr, [
|
|
2692
|
+
i("div", nr, b(n.action), 1),
|
|
2693
|
+
n.detail ? (l(), c("div", sr, b(n.detail), 1)) : y("", !0)
|
|
2667
2694
|
])
|
|
2668
2695
|
]),
|
|
2669
|
-
i("div",
|
|
2696
|
+
i("div", rr, [
|
|
2670
2697
|
s.rejectId ? (l(), c("button", {
|
|
2671
2698
|
key: 0,
|
|
2672
2699
|
type: "button",
|
|
2673
2700
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
2674
2701
|
onClick: e[0] || (e[0] = (d) => t.$emit("callback", s.rejectId))
|
|
2675
|
-
}, b(s.rejectLabel), 1)) :
|
|
2702
|
+
}, b(s.rejectLabel), 1)) : y("", !0),
|
|
2676
2703
|
s.approveId ? (l(), c("button", {
|
|
2677
2704
|
key: 1,
|
|
2678
2705
|
type: "button",
|
|
2679
2706
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
2680
2707
|
onClick: e[1] || (e[1] = (d) => t.$emit("callback", s.approveId))
|
|
2681
|
-
}, b(s.approveLabel), 1)) :
|
|
2708
|
+
}, b(s.approveLabel), 1)) : y("", !0)
|
|
2682
2709
|
])
|
|
2683
2710
|
]);
|
|
2684
2711
|
}
|
|
2685
|
-
const
|
|
2712
|
+
const ar = /* @__PURE__ */ B(Xs, [["render", ir], ["__scopeId", "data-v-b1be139c"]]);
|
|
2686
2713
|
let ve = 0;
|
|
2687
|
-
const
|
|
2714
|
+
const or = /* @__PURE__ */ new Set([
|
|
2688
2715
|
"text",
|
|
2689
2716
|
"textarea",
|
|
2690
2717
|
"number",
|
|
@@ -2692,7 +2719,7 @@ const ir = /* @__PURE__ */ new Set([
|
|
|
2692
2719
|
"select",
|
|
2693
2720
|
"multiselect",
|
|
2694
2721
|
"date"
|
|
2695
|
-
]),
|
|
2722
|
+
]), lr = {
|
|
2696
2723
|
name: "WmFormCard",
|
|
2697
2724
|
components: { AIAvatar: J },
|
|
2698
2725
|
props: {
|
|
@@ -2715,7 +2742,7 @@ const ir = /* @__PURE__ */ new Set([
|
|
|
2715
2742
|
// douteux.
|
|
2716
2743
|
normalizedFields() {
|
|
2717
2744
|
var e;
|
|
2718
|
-
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
2745
|
+
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !or.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
2719
2746
|
}
|
|
2720
2747
|
},
|
|
2721
2748
|
created() {
|
|
@@ -2766,50 +2793,50 @@ const ir = /* @__PURE__ */ new Set([
|
|
|
2766
2793
|
}
|
|
2767
2794
|
}
|
|
2768
2795
|
}
|
|
2769
|
-
},
|
|
2796
|
+
}, cr = { class: "wm-form" }, dr = { class: "wm-form__head" }, ur = { class: "wm-form__icon" }, hr = { class: "wm-form__main" }, mr = { class: "wm-form__title" }, fr = {
|
|
2770
2797
|
key: 0,
|
|
2771
2798
|
class: "wm-form__detail"
|
|
2772
|
-
},
|
|
2799
|
+
}, _r = ["for"], pr = {
|
|
2773
2800
|
key: 0,
|
|
2774
2801
|
class: "wm-form__req",
|
|
2775
2802
|
"aria-hidden": "true"
|
|
2776
|
-
},
|
|
2803
|
+
}, vr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], yr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], gr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], wr = ["id", "onUpdate:modelValue", "required", "disabled"], br = {
|
|
2777
2804
|
key: 4,
|
|
2778
2805
|
class: "wm-form__bool"
|
|
2779
|
-
},
|
|
2806
|
+
}, kr = ["id", "onUpdate:modelValue", "disabled"], Cr = ["id", "onUpdate:modelValue", "required", "disabled"], Ar = {
|
|
2780
2807
|
value: "",
|
|
2781
2808
|
disabled: ""
|
|
2782
|
-
},
|
|
2809
|
+
}, Sr = ["value"], xr = {
|
|
2783
2810
|
key: 6,
|
|
2784
2811
|
class: "wm-form__multi"
|
|
2785
|
-
},
|
|
2812
|
+
}, Mr = ["value", "checked", "disabled", "onChange"], Tr = {
|
|
2786
2813
|
key: 0,
|
|
2787
2814
|
class: "wm-form__err"
|
|
2788
|
-
},
|
|
2815
|
+
}, Or = ["disabled"], Ir = {
|
|
2789
2816
|
key: 0,
|
|
2790
2817
|
class: "wm-form__spinner",
|
|
2791
2818
|
"aria-hidden": "true"
|
|
2792
|
-
},
|
|
2819
|
+
}, Er = {
|
|
2793
2820
|
key: 2,
|
|
2794
2821
|
class: "wm-form__doneLbl"
|
|
2795
2822
|
};
|
|
2796
|
-
function
|
|
2823
|
+
function Br(t, e, n, a, r, s) {
|
|
2797
2824
|
const o = I("AIAvatar");
|
|
2798
|
-
return l(), c("div",
|
|
2799
|
-
i("div",
|
|
2800
|
-
i("div",
|
|
2801
|
-
|
|
2825
|
+
return l(), c("div", cr, [
|
|
2826
|
+
i("div", dr, [
|
|
2827
|
+
i("div", ur, [
|
|
2828
|
+
P(o, { size: 24 })
|
|
2802
2829
|
]),
|
|
2803
|
-
i("div",
|
|
2804
|
-
i("div",
|
|
2805
|
-
n.form.description ? (l(), c("div",
|
|
2830
|
+
i("div", hr, [
|
|
2831
|
+
i("div", mr, b(n.form.title || "Formulaire"), 1),
|
|
2832
|
+
n.form.description ? (l(), c("div", fr, b(n.form.description), 1)) : y("", !0)
|
|
2806
2833
|
])
|
|
2807
2834
|
]),
|
|
2808
2835
|
i("form", {
|
|
2809
2836
|
class: "wm-form__body",
|
|
2810
2837
|
onSubmit: e[0] || (e[0] = Y((...d) => s.onSubmit && s.onSubmit(...d), ["prevent"]))
|
|
2811
2838
|
}, [
|
|
2812
|
-
(l(!0), c(
|
|
2839
|
+
(l(!0), c(T, null, F(s.normalizedFields, (d) => (l(), c("div", {
|
|
2813
2840
|
key: d.key,
|
|
2814
2841
|
class: "wm-form__field"
|
|
2815
2842
|
}, [
|
|
@@ -2818,9 +2845,9 @@ function Or(t, e, n, a, r, s) {
|
|
|
2818
2845
|
class: "wm-form__label"
|
|
2819
2846
|
}, [
|
|
2820
2847
|
se(b(d.label), 1),
|
|
2821
|
-
d.required ? (l(), c("span",
|
|
2822
|
-
], 8,
|
|
2823
|
-
d.type === "text" ?
|
|
2848
|
+
d.required ? (l(), c("span", pr, "*")) : y("", !0)
|
|
2849
|
+
], 8, _r),
|
|
2850
|
+
d.type === "text" ? z((l(), c("input", {
|
|
2824
2851
|
key: 0,
|
|
2825
2852
|
id: `wm-f-${r._uid}-${d.key}`,
|
|
2826
2853
|
"onUpdate:modelValue": (v) => r.values[d.key] = v,
|
|
@@ -2829,9 +2856,9 @@ function Or(t, e, n, a, r, s) {
|
|
|
2829
2856
|
placeholder: d.placeholder || "",
|
|
2830
2857
|
required: d.required,
|
|
2831
2858
|
disabled: n.readOnly || r.busy
|
|
2832
|
-
}, null, 8,
|
|
2859
|
+
}, null, 8, vr)), [
|
|
2833
2860
|
[G, r.values[d.key]]
|
|
2834
|
-
]) : d.type === "textarea" ?
|
|
2861
|
+
]) : d.type === "textarea" ? z((l(), c("textarea", {
|
|
2835
2862
|
key: 1,
|
|
2836
2863
|
id: `wm-f-${r._uid}-${d.key}`,
|
|
2837
2864
|
"onUpdate:modelValue": (v) => r.values[d.key] = v,
|
|
@@ -2840,9 +2867,9 @@ function Or(t, e, n, a, r, s) {
|
|
|
2840
2867
|
placeholder: d.placeholder || "",
|
|
2841
2868
|
required: d.required,
|
|
2842
2869
|
disabled: n.readOnly || r.busy
|
|
2843
|
-
}, null, 8,
|
|
2870
|
+
}, null, 8, yr)), [
|
|
2844
2871
|
[G, r.values[d.key]]
|
|
2845
|
-
]) : d.type === "number" ?
|
|
2872
|
+
]) : d.type === "number" ? z((l(), c("input", {
|
|
2846
2873
|
key: 2,
|
|
2847
2874
|
id: `wm-f-${r._uid}-${d.key}`,
|
|
2848
2875
|
"onUpdate:modelValue": (v) => r.values[d.key] = v,
|
|
@@ -2851,14 +2878,14 @@ function Or(t, e, n, a, r, s) {
|
|
|
2851
2878
|
placeholder: d.placeholder || "",
|
|
2852
2879
|
required: d.required,
|
|
2853
2880
|
disabled: n.readOnly || r.busy
|
|
2854
|
-
}, null, 8,
|
|
2881
|
+
}, null, 8, gr)), [
|
|
2855
2882
|
[
|
|
2856
2883
|
G,
|
|
2857
2884
|
r.values[d.key],
|
|
2858
2885
|
void 0,
|
|
2859
2886
|
{ number: !0 }
|
|
2860
2887
|
]
|
|
2861
|
-
]) : d.type === "date" ?
|
|
2888
|
+
]) : d.type === "date" ? z((l(), c("input", {
|
|
2862
2889
|
key: 3,
|
|
2863
2890
|
id: `wm-f-${r._uid}-${d.key}`,
|
|
2864
2891
|
"onUpdate:modelValue": (v) => r.values[d.key] = v,
|
|
@@ -2866,19 +2893,19 @@ function Or(t, e, n, a, r, s) {
|
|
|
2866
2893
|
class: "wm-form__input",
|
|
2867
2894
|
required: d.required,
|
|
2868
2895
|
disabled: n.readOnly || r.busy
|
|
2869
|
-
}, null, 8,
|
|
2896
|
+
}, null, 8, wr)), [
|
|
2870
2897
|
[G, r.values[d.key]]
|
|
2871
|
-
]) : d.type === "boolean" ? (l(), c("label",
|
|
2872
|
-
|
|
2898
|
+
]) : d.type === "boolean" ? (l(), c("label", br, [
|
|
2899
|
+
z(i("input", {
|
|
2873
2900
|
id: `wm-f-${r._uid}-${d.key}`,
|
|
2874
2901
|
"onUpdate:modelValue": (v) => r.values[d.key] = v,
|
|
2875
2902
|
type: "checkbox",
|
|
2876
2903
|
disabled: n.readOnly || r.busy
|
|
2877
|
-
}, null, 8,
|
|
2904
|
+
}, null, 8, kr), [
|
|
2878
2905
|
[Ee, r.values[d.key]]
|
|
2879
2906
|
]),
|
|
2880
2907
|
i("span", null, b(d.placeholder || "Oui"), 1)
|
|
2881
|
-
])) : d.type === "select" ?
|
|
2908
|
+
])) : d.type === "select" ? z((l(), c("select", {
|
|
2882
2909
|
key: 5,
|
|
2883
2910
|
id: `wm-f-${r._uid}-${d.key}`,
|
|
2884
2911
|
"onUpdate:modelValue": (v) => r.values[d.key] = v,
|
|
@@ -2886,15 +2913,15 @@ function Or(t, e, n, a, r, s) {
|
|
|
2886
2913
|
required: d.required,
|
|
2887
2914
|
disabled: n.readOnly || r.busy
|
|
2888
2915
|
}, [
|
|
2889
|
-
i("option",
|
|
2890
|
-
(l(!0), c(
|
|
2916
|
+
i("option", Ar, b(d.placeholder || "Choisir…"), 1),
|
|
2917
|
+
(l(!0), c(T, null, F(d.options, (v) => (l(), c("option", {
|
|
2891
2918
|
key: v.value,
|
|
2892
2919
|
value: v.value
|
|
2893
|
-
}, b(v.label), 9,
|
|
2894
|
-
], 8,
|
|
2920
|
+
}, b(v.label), 9, Sr))), 128))
|
|
2921
|
+
], 8, Cr)), [
|
|
2895
2922
|
[Be, r.values[d.key]]
|
|
2896
|
-
]) : d.type === "multiselect" ? (l(), c("div",
|
|
2897
|
-
(l(!0), c(
|
|
2923
|
+
]) : d.type === "multiselect" ? (l(), c("div", xr, [
|
|
2924
|
+
(l(!0), c(T, null, F(d.options, (v) => (l(), c("label", {
|
|
2898
2925
|
key: v.value,
|
|
2899
2926
|
class: "wm-form__multiItem"
|
|
2900
2927
|
}, [
|
|
@@ -2904,25 +2931,25 @@ function Or(t, e, n, a, r, s) {
|
|
|
2904
2931
|
checked: Array.isArray(r.values[d.key]) && r.values[d.key].includes(v.value),
|
|
2905
2932
|
disabled: n.readOnly || r.busy,
|
|
2906
2933
|
onChange: (C) => s.toggleMulti(d.key, v.value, C.target.checked)
|
|
2907
|
-
}, null, 40,
|
|
2934
|
+
}, null, 40, Mr),
|
|
2908
2935
|
i("span", null, b(v.label), 1)
|
|
2909
2936
|
]))), 128))
|
|
2910
|
-
])) :
|
|
2937
|
+
])) : y("", !0)
|
|
2911
2938
|
]))), 128)),
|
|
2912
|
-
r.error ? (l(), c("div",
|
|
2913
|
-
n.readOnly ? (l(), c("div",
|
|
2939
|
+
r.error ? (l(), c("div", Tr, b(r.error), 1)) : y("", !0),
|
|
2940
|
+
n.readOnly ? (l(), c("div", Er, "Réponse envoyée")) : (l(), c("button", {
|
|
2914
2941
|
key: 1,
|
|
2915
2942
|
type: "submit",
|
|
2916
2943
|
class: "wm-form__submit",
|
|
2917
2944
|
disabled: r.busy
|
|
2918
2945
|
}, [
|
|
2919
|
-
r.busy ? (l(), c("span",
|
|
2946
|
+
r.busy ? (l(), c("span", Ir)) : y("", !0),
|
|
2920
2947
|
i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
|
|
2921
|
-
], 8,
|
|
2948
|
+
], 8, Or))
|
|
2922
2949
|
], 32)
|
|
2923
2950
|
]);
|
|
2924
2951
|
}
|
|
2925
|
-
const
|
|
2952
|
+
const Lr = /* @__PURE__ */ B(lr, [["render", Br], ["__scopeId", "data-v-64b40f76"]]), Rr = {
|
|
2926
2953
|
name: "WmFeedback",
|
|
2927
2954
|
props: {
|
|
2928
2955
|
busy: { type: Boolean, default: !1 },
|
|
@@ -2946,43 +2973,43 @@ const Er = /* @__PURE__ */ B(ar, [["render", Or], ["__scopeId", "data-v-64b40f76
|
|
|
2946
2973
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
2947
2974
|
}
|
|
2948
2975
|
}
|
|
2949
|
-
},
|
|
2976
|
+
}, $r = { class: "wm-fb" }, Fr = { class: "wm-fb__row" }, jr = ["onClick"], Ur = { class: "wm-fb__emoji" }, Dr = { class: "wm-fb__label" }, Nr = ["disabled"], Pr = {
|
|
2950
2977
|
key: 1,
|
|
2951
2978
|
class: "wm-fb__done"
|
|
2952
2979
|
};
|
|
2953
|
-
function
|
|
2954
|
-
return l(), c("div",
|
|
2955
|
-
n.done ? (l(), c("div",
|
|
2980
|
+
function Hr(t, e, n, a, r, s) {
|
|
2981
|
+
return l(), c("div", $r, [
|
|
2982
|
+
n.done ? (l(), c("div", Pr, [...e[3] || (e[3] = [
|
|
2956
2983
|
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)
|
|
2957
|
-
])])) : (l(), c(
|
|
2984
|
+
])])) : (l(), c(T, { key: 0 }, [
|
|
2958
2985
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
2959
2986
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
2960
|
-
i("div",
|
|
2961
|
-
(l(!0), c(
|
|
2987
|
+
i("div", Fr, [
|
|
2988
|
+
(l(!0), c(T, null, F(r.options, (o) => (l(), c("button", {
|
|
2962
2989
|
key: o.v,
|
|
2963
2990
|
type: "button",
|
|
2964
2991
|
class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
2965
2992
|
onClick: (d) => r.sel = o.v
|
|
2966
2993
|
}, [
|
|
2967
|
-
i("span",
|
|
2968
|
-
i("span",
|
|
2969
|
-
], 10,
|
|
2994
|
+
i("span", Ur, b(o.e), 1),
|
|
2995
|
+
i("span", Dr, b(o.l), 1)
|
|
2996
|
+
], 10, jr))), 128))
|
|
2970
2997
|
]),
|
|
2971
2998
|
i("button", {
|
|
2972
2999
|
type: "button",
|
|
2973
3000
|
class: "wm-fb__send",
|
|
2974
3001
|
disabled: !r.sel || n.busy,
|
|
2975
3002
|
onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
|
|
2976
|
-
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9,
|
|
3003
|
+
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Nr)
|
|
2977
3004
|
], 64))
|
|
2978
3005
|
]);
|
|
2979
3006
|
}
|
|
2980
|
-
const
|
|
2981
|
-
function
|
|
3007
|
+
const zr = /* @__PURE__ */ B(Rr, [["render", Hr], ["__scopeId", "data-v-6f45ff3b"]]);
|
|
3008
|
+
function Vr(t) {
|
|
2982
3009
|
const e = new Date(t);
|
|
2983
3010
|
return e.setHours(0, 0, 0, 0), e;
|
|
2984
3011
|
}
|
|
2985
|
-
const
|
|
3012
|
+
const qr = {
|
|
2986
3013
|
name: "WmHistoryDrawer",
|
|
2987
3014
|
props: {
|
|
2988
3015
|
conversations: { type: Array, default: () => [] },
|
|
@@ -3016,7 +3043,7 @@ const zr = {
|
|
|
3016
3043
|
) : this.normalized;
|
|
3017
3044
|
},
|
|
3018
3045
|
groups() {
|
|
3019
|
-
const e =
|
|
3046
|
+
const e = Vr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
|
|
3020
3047
|
for (const o of this.filtered) {
|
|
3021
3048
|
if (!o.stamp) {
|
|
3022
3049
|
s.push(o);
|
|
@@ -3034,29 +3061,29 @@ const zr = {
|
|
|
3034
3061
|
return this.filtered.length > 0;
|
|
3035
3062
|
}
|
|
3036
3063
|
}
|
|
3037
|
-
},
|
|
3064
|
+
}, Wr = { class: "wm-hd" }, Gr = {
|
|
3038
3065
|
class: "wm-hd__panel",
|
|
3039
3066
|
role: "dialog",
|
|
3040
3067
|
"aria-label": "Vos discussions"
|
|
3041
|
-
},
|
|
3068
|
+
}, Kr = { class: "wm-hd__head" }, Yr = { class: "wm-hd__top" }, Jr = { class: "wm-hd__search" }, Xr = { class: "wm-hd__list" }, Qr = {
|
|
3042
3069
|
key: 0,
|
|
3043
3070
|
class: "wm-hd__group"
|
|
3044
|
-
},
|
|
3071
|
+
}, Zr = { class: "wm-hd__groupLabel" }, ei = { class: "wm-hd__rows" }, ti = ["onClick"], ni = { class: "wm-hd__rowIcon" }, si = {
|
|
3045
3072
|
key: 0,
|
|
3046
3073
|
class: "wm-hd__rowDot",
|
|
3047
3074
|
"aria-label": "Message non lu"
|
|
3048
|
-
},
|
|
3075
|
+
}, ri = { class: "wm-hd__rowBody" }, ii = { class: "wm-hd__rowTop" }, ai = { class: "wm-hd__rowTitle" }, oi = { class: "wm-hd__rowPreview" }, li = {
|
|
3049
3076
|
key: 0,
|
|
3050
3077
|
class: "wm-hd__empty"
|
|
3051
3078
|
};
|
|
3052
|
-
function
|
|
3053
|
-
return l(), c("div",
|
|
3079
|
+
function ci(t, e, n, a, r, s) {
|
|
3080
|
+
return l(), c("div", Wr, [
|
|
3054
3081
|
i("div", {
|
|
3055
3082
|
class: "wm-hd__scrim",
|
|
3056
3083
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3057
3084
|
}),
|
|
3058
|
-
i("aside",
|
|
3059
|
-
i("div",
|
|
3085
|
+
i("aside", Gr, [
|
|
3086
|
+
i("div", Kr, [
|
|
3060
3087
|
e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
|
|
3061
3088
|
i("div", { class: "wm-hd__title" }, "Vos discussions"),
|
|
3062
3089
|
i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
|
|
@@ -3082,7 +3109,7 @@ function oi(t, e, n, a, r, s) {
|
|
|
3082
3109
|
], -1)
|
|
3083
3110
|
])])
|
|
3084
3111
|
]),
|
|
3085
|
-
i("div",
|
|
3112
|
+
i("div", Yr, [
|
|
3086
3113
|
i("button", {
|
|
3087
3114
|
type: "button",
|
|
3088
3115
|
class: "wm-hd__new",
|
|
@@ -3105,7 +3132,7 @@ function oi(t, e, n, a, r, s) {
|
|
|
3105
3132
|
], -1),
|
|
3106
3133
|
i("span", null, "Démarrer un nouveau fil", -1)
|
|
3107
3134
|
])]),
|
|
3108
|
-
i("div",
|
|
3135
|
+
i("div", Jr, [
|
|
3109
3136
|
e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
|
|
3110
3137
|
i("svg", {
|
|
3111
3138
|
width: "12",
|
|
@@ -3121,7 +3148,7 @@ function oi(t, e, n, a, r, s) {
|
|
|
3121
3148
|
i("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
3122
3149
|
])
|
|
3123
3150
|
], -1)),
|
|
3124
|
-
|
|
3151
|
+
z(i("input", {
|
|
3125
3152
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.query = o),
|
|
3126
3153
|
type: "text",
|
|
3127
3154
|
placeholder: "Rechercher dans vos messages",
|
|
@@ -3131,14 +3158,14 @@ function oi(t, e, n, a, r, s) {
|
|
|
3131
3158
|
])
|
|
3132
3159
|
])
|
|
3133
3160
|
]),
|
|
3134
|
-
i("div",
|
|
3135
|
-
(l(!0), c(
|
|
3161
|
+
i("div", Xr, [
|
|
3162
|
+
(l(!0), c(T, null, F(s.groups, (o) => (l(), c(T, {
|
|
3136
3163
|
key: o.key
|
|
3137
3164
|
}, [
|
|
3138
|
-
o.items.length ? (l(), c("div",
|
|
3139
|
-
i("div",
|
|
3140
|
-
i("div",
|
|
3141
|
-
(l(!0), c(
|
|
3165
|
+
o.items.length ? (l(), c("div", Qr, [
|
|
3166
|
+
i("div", Zr, b(o.label), 1),
|
|
3167
|
+
i("div", ei, [
|
|
3168
|
+
(l(!0), c(T, null, F(o.items, (d) => (l(), c("button", {
|
|
3142
3169
|
key: d.id,
|
|
3143
3170
|
type: "button",
|
|
3144
3171
|
class: E(["wm-hd__row", {
|
|
@@ -3147,7 +3174,7 @@ function oi(t, e, n, a, r, s) {
|
|
|
3147
3174
|
}]),
|
|
3148
3175
|
onClick: (v) => t.$emit("pick", d)
|
|
3149
3176
|
}, [
|
|
3150
|
-
i("div",
|
|
3177
|
+
i("div", ni, [
|
|
3151
3178
|
e[8] || (e[8] = i("svg", {
|
|
3152
3179
|
width: "11",
|
|
3153
3180
|
height: "11",
|
|
@@ -3161,24 +3188,24 @@ function oi(t, e, n, a, r, s) {
|
|
|
3161
3188
|
opacity: "0.92"
|
|
3162
3189
|
})
|
|
3163
3190
|
], -1)),
|
|
3164
|
-
d.unread ? (l(), c("span",
|
|
3191
|
+
d.unread ? (l(), c("span", si)) : y("", !0)
|
|
3165
3192
|
]),
|
|
3166
|
-
i("div",
|
|
3167
|
-
i("div",
|
|
3168
|
-
i("span",
|
|
3193
|
+
i("div", ri, [
|
|
3194
|
+
i("div", ii, [
|
|
3195
|
+
i("span", ai, b(d.title), 1)
|
|
3169
3196
|
]),
|
|
3170
|
-
i("div",
|
|
3197
|
+
i("div", oi, b(d.preview || "Aucun message"), 1)
|
|
3171
3198
|
])
|
|
3172
|
-
], 10,
|
|
3199
|
+
], 10, ti))), 128))
|
|
3173
3200
|
])
|
|
3174
|
-
])) :
|
|
3201
|
+
])) : y("", !0)
|
|
3175
3202
|
], 64))), 128)),
|
|
3176
|
-
s.hasAny ?
|
|
3203
|
+
s.hasAny ? y("", !0) : (l(), c("div", li, " Aucun fil pour le moment. "))
|
|
3177
3204
|
])
|
|
3178
3205
|
])
|
|
3179
3206
|
]);
|
|
3180
3207
|
}
|
|
3181
|
-
const
|
|
3208
|
+
const di = /* @__PURE__ */ B(qr, [["render", ci], ["__scopeId", "data-v-1259e822"]]), ui = {
|
|
3182
3209
|
name: "WmMoreMenu",
|
|
3183
3210
|
props: {
|
|
3184
3211
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -3205,18 +3232,18 @@ const li = /* @__PURE__ */ B(zr, [["render", oi], ["__scopeId", "data-v-1259e822
|
|
|
3205
3232
|
this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
|
|
3206
3233
|
}
|
|
3207
3234
|
}
|
|
3208
|
-
},
|
|
3235
|
+
}, hi = { class: "wm-mm" }, mi = {
|
|
3209
3236
|
class: "wm-mm__pop",
|
|
3210
3237
|
role: "menu"
|
|
3211
|
-
},
|
|
3212
|
-
function
|
|
3213
|
-
return l(), c("div",
|
|
3238
|
+
}, fi = { class: "wm-mm__section" }, _i = { class: "wm-mm__section" }, pi = { class: "wm-mm__section" };
|
|
3239
|
+
function vi(t, e, n, a, r, s) {
|
|
3240
|
+
return l(), c("div", hi, [
|
|
3214
3241
|
i("div", {
|
|
3215
3242
|
class: "wm-mm__scrim",
|
|
3216
3243
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3217
3244
|
}),
|
|
3218
|
-
i("div",
|
|
3219
|
-
i("div",
|
|
3245
|
+
i("div", mi, [
|
|
3246
|
+
i("div", fi, [
|
|
3220
3247
|
i("button", {
|
|
3221
3248
|
type: "button",
|
|
3222
3249
|
class: "wm-mm__item",
|
|
@@ -3246,7 +3273,7 @@ function _i(t, e, n, a, r, s) {
|
|
|
3246
3273
|
onClick: e[2] || (e[2] = (o) => s.emit("rename"))
|
|
3247
3274
|
}, [...e[9] || (e[9] = [
|
|
3248
3275
|
ue('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M12 20h9" data-v-c1bb81d2></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-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Renommer le fil</span>', 2)
|
|
3249
|
-
])])) :
|
|
3276
|
+
])])) : y("", !0),
|
|
3250
3277
|
n.canClear ? (l(), c("button", {
|
|
3251
3278
|
key: 1,
|
|
3252
3279
|
type: "button",
|
|
@@ -3269,7 +3296,7 @@ function _i(t, e, n, a, r, s) {
|
|
|
3269
3296
|
])
|
|
3270
3297
|
], -1),
|
|
3271
3298
|
i("span", { class: "wm-mm__label" }, "Effacer ce fil", -1)
|
|
3272
|
-
])])) :
|
|
3299
|
+
])])) : y("", !0),
|
|
3273
3300
|
n.canExport ? (l(), c("button", {
|
|
3274
3301
|
key: 2,
|
|
3275
3302
|
type: "button",
|
|
@@ -3277,10 +3304,10 @@ function _i(t, e, n, a, r, s) {
|
|
|
3277
3304
|
onClick: e[4] || (e[4] = (o) => s.emit("export"))
|
|
3278
3305
|
}, [...e[11] || (e[11] = [
|
|
3279
3306
|
ue('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Exporter la transcription</span><span class="wm-mm__hint" data-v-c1bb81d2>.txt</span>', 3)
|
|
3280
|
-
])])) :
|
|
3307
|
+
])])) : y("", !0)
|
|
3281
3308
|
]),
|
|
3282
3309
|
e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3283
|
-
i("div",
|
|
3310
|
+
i("div", _i, [
|
|
3284
3311
|
i("button", {
|
|
3285
3312
|
type: "button",
|
|
3286
3313
|
class: "wm-mm__item",
|
|
@@ -3310,7 +3337,7 @@ function _i(t, e, n, a, r, s) {
|
|
|
3310
3337
|
])
|
|
3311
3338
|
]),
|
|
3312
3339
|
e[18] || (e[18] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3313
|
-
i("div",
|
|
3340
|
+
i("div", pi, [
|
|
3314
3341
|
n.statusUrl ? (l(), c("button", {
|
|
3315
3342
|
key: 0,
|
|
3316
3343
|
type: "button",
|
|
@@ -3333,7 +3360,7 @@ function _i(t, e, n, a, r, s) {
|
|
|
3333
3360
|
])
|
|
3334
3361
|
], -1),
|
|
3335
3362
|
i("span", { class: "wm-mm__label" }, "Statut des services", -1)
|
|
3336
|
-
])])) :
|
|
3363
|
+
])])) : y("", !0),
|
|
3337
3364
|
n.helpUrl ? (l(), c("button", {
|
|
3338
3365
|
key: 1,
|
|
3339
3366
|
type: "button",
|
|
@@ -3356,18 +3383,18 @@ function _i(t, e, n, a, r, s) {
|
|
|
3356
3383
|
])
|
|
3357
3384
|
], -1),
|
|
3358
3385
|
i("span", { class: "wm-mm__label" }, "Centre d'aide", -1)
|
|
3359
|
-
])])) :
|
|
3386
|
+
])])) : y("", !0)
|
|
3360
3387
|
])
|
|
3361
3388
|
])
|
|
3362
3389
|
]);
|
|
3363
3390
|
}
|
|
3364
|
-
const
|
|
3391
|
+
const yi = /* @__PURE__ */ B(ui, [["render", vi], ["__scopeId", "data-v-c1bb81d2"]]), ye = "ww-messenger-tokens";
|
|
3365
3392
|
function de(t) {
|
|
3366
3393
|
var n;
|
|
3367
3394
|
const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
|
|
3368
3395
|
return e === "agent_ia" || e === "agent_human";
|
|
3369
3396
|
}
|
|
3370
|
-
function
|
|
3397
|
+
function gi(t, e) {
|
|
3371
3398
|
if (!t || !e) return "";
|
|
3372
3399
|
const n = Array.isArray(t.fields) ? t.fields : [], a = [];
|
|
3373
3400
|
for (const r of n) {
|
|
@@ -3390,7 +3417,7 @@ function ne(t, e) {
|
|
|
3390
3417
|
const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
|
|
3391
3418
|
return (n == null ? void 0 : n.label) || e;
|
|
3392
3419
|
}
|
|
3393
|
-
function
|
|
3420
|
+
function wi(t, e) {
|
|
3394
3421
|
const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
|
|
3395
3422
|
for (const r of a) {
|
|
3396
3423
|
if (!(r != null && r.key) || !(r != null && r.label)) continue;
|
|
@@ -3412,20 +3439,20 @@ function yi(t, e) {
|
|
|
3412
3439
|
}
|
|
3413
3440
|
};
|
|
3414
3441
|
}
|
|
3415
|
-
const
|
|
3442
|
+
const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
|
|
3416
3443
|
name: "Messenger",
|
|
3417
3444
|
components: {
|
|
3418
3445
|
Launcher: Ye,
|
|
3419
|
-
Header:
|
|
3420
|
-
Onboarding:
|
|
3421
|
-
MessageList:
|
|
3422
|
-
Composer:
|
|
3423
|
-
SuggestionChips:
|
|
3424
|
-
ApprovalCard:
|
|
3425
|
-
FormCard:
|
|
3426
|
-
Feedback:
|
|
3427
|
-
HistoryDrawer:
|
|
3428
|
-
MoreMenu:
|
|
3446
|
+
Header: bt,
|
|
3447
|
+
Onboarding: zt,
|
|
3448
|
+
MessageList: xs,
|
|
3449
|
+
Composer: Ws,
|
|
3450
|
+
SuggestionChips: Js,
|
|
3451
|
+
ApprovalCard: ar,
|
|
3452
|
+
FormCard: Lr,
|
|
3453
|
+
Feedback: zr,
|
|
3454
|
+
HistoryDrawer: di,
|
|
3455
|
+
MoreMenu: yi
|
|
3429
3456
|
},
|
|
3430
3457
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
3431
3458
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -3501,6 +3528,14 @@ const gi = 450, wi = 50, bi = 900, ki = 12e3, Ci = 300, Ai = {
|
|
|
3501
3528
|
// unread dot in the history drawer survives reloads. The server
|
|
3502
3529
|
// has no per-customer read model, so this is purely client-side.
|
|
3503
3530
|
readState: {},
|
|
3531
|
+
// ISO timestamp frozen at the moment the user *started viewing*
|
|
3532
|
+
// the current thread (panel open + thread visible). Drives the
|
|
3533
|
+
// "Non lus" separator inside the MessageList: messages newer than
|
|
3534
|
+
// this anchor are shown below the separator. Distinct from
|
|
3535
|
+
// `readState` because that one gets bumped to the latest as soon
|
|
3536
|
+
// as the messages render — we need to remember what was read
|
|
3537
|
+
// BEFORE this viewing session so the separator stays put.
|
|
3538
|
+
unreadAnchorTs: "",
|
|
3504
3539
|
// Live-measured height of the floating overlay (chips / approval
|
|
3505
3540
|
// / feedback). Reserved as bottom padding on the MessageList so
|
|
3506
3541
|
// the latest message scrolls above the overlay instead of
|
|
@@ -3614,6 +3649,13 @@ const gi = 450, wi = 50, bi = 900, ki = 12e3, Ci = 300, Ai = {
|
|
|
3614
3649
|
const t = this.latestUnread;
|
|
3615
3650
|
return t ? t.preview || "Vous avez un nouveau message" : "";
|
|
3616
3651
|
},
|
|
3652
|
+
// True when the user is actively looking at a thread (panel open or
|
|
3653
|
+
// embedded, no history drawer overlay, a currentConv exists). Used as
|
|
3654
|
+
// the trigger to (re)snapshot `unreadAnchorTs` so the "Non lus"
|
|
3655
|
+
// separator anchors against what was read PRIOR to this viewing.
|
|
3656
|
+
isViewingThread() {
|
|
3657
|
+
return (this.isOpen || this.isEmbedded) && !this.historyOpen && !!this.currentConv;
|
|
3658
|
+
},
|
|
3617
3659
|
currentConv() {
|
|
3618
3660
|
if (this.showOnboarding) return null;
|
|
3619
3661
|
const t = this.allConversations;
|
|
@@ -3839,11 +3881,22 @@ const gi = 450, wi = 50, bi = 900, ki = 12e3, Ci = 300, Ai = {
|
|
|
3839
3881
|
// timers, reset the queue and stamp the open time so the messages
|
|
3840
3882
|
// we're about to load count as history and bypass pacing.
|
|
3841
3883
|
"currentConv.id": {
|
|
3842
|
-
handler() {
|
|
3843
|
-
this.cancelReveals(), this.revealedAt = {}, this.nextRevealAt = 0, this.convOpenedAt = Date.now(), this.moreOpen = !1, this.resetApprovalPacing();
|
|
3884
|
+
handler(t) {
|
|
3885
|
+
this.cancelReveals(), this.revealedAt = {}, this.nextRevealAt = 0, this.convOpenedAt = Date.now(), this.moreOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorTs = t && this.readState[t] || "");
|
|
3844
3886
|
},
|
|
3845
3887
|
immediate: !0
|
|
3846
3888
|
},
|
|
3889
|
+
// Panel just opened onto a thread (or history drawer just closed back
|
|
3890
|
+
// onto one). Snapshot the read mark so the separator marks the
|
|
3891
|
+
// pre-session boundary, even though markConvRead will immediately
|
|
3892
|
+
// bump readState as the messages render.
|
|
3893
|
+
isViewingThread(t, e) {
|
|
3894
|
+
var n;
|
|
3895
|
+
if (t && !e) {
|
|
3896
|
+
const a = (n = this.currentConv) == null ? void 0 : n.id;
|
|
3897
|
+
this.unreadAnchorTs = a && this.readState[a] || "";
|
|
3898
|
+
} else t || (this.unreadAnchorTs = "");
|
|
3899
|
+
},
|
|
3847
3900
|
// Fresh `pendingApproval` arrival : kick off the settle debounce so
|
|
3848
3901
|
// the card waits for the conversation to go quiet. Historical
|
|
3849
3902
|
// approvals (page reload, conv switch on a thread that already had
|
|
@@ -4075,11 +4128,11 @@ const gi = 450, wi = 50, bi = 900, ki = 12e3, Ci = 300, Ai = {
|
|
|
4075
4128
|
// bounded by MIN/MAX_BETWEEN_MS.
|
|
4076
4129
|
scheduleReveal(t) {
|
|
4077
4130
|
const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
|
|
4078
|
-
|
|
4079
|
-
Math.max(
|
|
4131
|
+
Ai,
|
|
4132
|
+
Math.max(Ci, n * ki)
|
|
4080
4133
|
), s = Math.max(
|
|
4081
|
-
e +
|
|
4082
|
-
this.nextRevealAt +
|
|
4134
|
+
e + bi,
|
|
4135
|
+
this.nextRevealAt + Si
|
|
4083
4136
|
) + a;
|
|
4084
4137
|
this.nextRevealAt = s;
|
|
4085
4138
|
const o = Math.max(0, s - e), d = t.id, v = setTimeout(() => {
|
|
@@ -4287,12 +4340,12 @@ const gi = 450, wi = 50, bi = 900, ki = 12e3, Ci = 300, Ai = {
|
|
|
4287
4340
|
async onFormSubmit({ values: t }) {
|
|
4288
4341
|
const e = this.pendingForm;
|
|
4289
4342
|
if (!(e != null && e.form)) return;
|
|
4290
|
-
const n =
|
|
4343
|
+
const n = gi(e.form, t);
|
|
4291
4344
|
if (!n) return;
|
|
4292
4345
|
const a = this.currentConv;
|
|
4293
4346
|
a && await this.store.send(a.id, n, {
|
|
4294
4347
|
metadata: {
|
|
4295
|
-
artifact:
|
|
4348
|
+
artifact: wi(e.form, t)
|
|
4296
4349
|
}
|
|
4297
4350
|
});
|
|
4298
4351
|
},
|
|
@@ -4336,28 +4389,28 @@ const gi = 450, wi = 50, bi = 900, ki = 12e3, Ci = 300, Ai = {
|
|
|
4336
4389
|
}
|
|
4337
4390
|
}
|
|
4338
4391
|
}
|
|
4339
|
-
},
|
|
4392
|
+
}, Mi = {
|
|
4340
4393
|
key: 0,
|
|
4341
4394
|
class: "wm-loading",
|
|
4342
4395
|
"aria-busy": "true",
|
|
4343
4396
|
"aria-live": "polite"
|
|
4344
|
-
},
|
|
4397
|
+
}, Ti = {
|
|
4345
4398
|
key: 0,
|
|
4346
4399
|
class: "wm-state"
|
|
4347
|
-
},
|
|
4400
|
+
}, Oi = { class: "wm-state__err" }, Ii = { class: "wm-state__errSub" }, Ei = { class: "wm-bottom" }, Bi = {
|
|
4348
4401
|
key: 0,
|
|
4349
4402
|
ref: "floatEl",
|
|
4350
4403
|
class: "wm-float"
|
|
4351
|
-
},
|
|
4404
|
+
}, Li = {
|
|
4352
4405
|
key: 1,
|
|
4353
4406
|
class: "wm-actionWait",
|
|
4354
4407
|
role: "status",
|
|
4355
4408
|
"aria-live": "polite"
|
|
4356
|
-
},
|
|
4409
|
+
}, Ri = { class: "wm-actionWait__lbl" }, $i = {
|
|
4357
4410
|
key: 1,
|
|
4358
4411
|
class: "wm-attached"
|
|
4359
|
-
},
|
|
4360
|
-
function
|
|
4412
|
+
}, Fi = ["onClick"];
|
|
4413
|
+
function ji(t, e, n, a, r, s) {
|
|
4361
4414
|
const o = I("Launcher"), d = I("Header"), v = I("Onboarding"), C = I("MessageList"), w = I("ApprovalCard"), S = I("FormCard"), L = I("Feedback"), A = I("SuggestionChips"), D = I("Composer"), x = I("MoreMenu"), N = I("HistoryDrawer");
|
|
4362
4415
|
return l(), c("div", {
|
|
4363
4416
|
class: E(["wm-root", `wm-root--${n.displayMode}`])
|
|
@@ -4368,16 +4421,16 @@ function $i(t, e, n, a, r, s) {
|
|
|
4368
4421
|
peek: s.launcherPeek,
|
|
4369
4422
|
onOpen: s.openFromPeek,
|
|
4370
4423
|
onDismiss: e[0] || (e[0] = (j) => r.labelDismissed = !0)
|
|
4371
|
-
}, null, 8, ["unread-count", "peek", "onOpen"])) :
|
|
4424
|
+
}, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
|
|
4372
4425
|
r.isOpen || s.isEmbedded ? (l(), c("section", {
|
|
4373
4426
|
key: 1,
|
|
4374
4427
|
class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
4375
|
-
style:
|
|
4428
|
+
style: V(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
4376
4429
|
role: "dialog",
|
|
4377
4430
|
"aria-label": "Messenger"
|
|
4378
4431
|
}, [
|
|
4379
|
-
!s.ready && !s.error ? (l(), c("div",
|
|
4380
|
-
s.isEmbedded ?
|
|
4432
|
+
!s.ready && !s.error ? (l(), c("div", Mi, [
|
|
4433
|
+
s.isEmbedded ? y("", !0) : (l(), c("button", {
|
|
4381
4434
|
key: 0,
|
|
4382
4435
|
type: "button",
|
|
4383
4436
|
class: "wm-loading__close",
|
|
@@ -4402,8 +4455,8 @@ function $i(t, e, n, a, r, s) {
|
|
|
4402
4455
|
class: "wm-loading__spinner",
|
|
4403
4456
|
"aria-hidden": "true"
|
|
4404
4457
|
}, null, -1))
|
|
4405
|
-
])) : (l(), c(
|
|
4406
|
-
|
|
4458
|
+
])) : (l(), c(T, { key: 1 }, [
|
|
4459
|
+
P(d, {
|
|
4407
4460
|
title: s.headerTitle,
|
|
4408
4461
|
escalated: s.isEscalated,
|
|
4409
4462
|
"agent-name": s.humanAgentName,
|
|
@@ -4418,8 +4471,8 @@ function $i(t, e, n, a, r, s) {
|
|
|
4418
4471
|
onMore: s.toggleMore,
|
|
4419
4472
|
onClose: s.close
|
|
4420
4473
|
}, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
4421
|
-
s.error ? (l(), c("div",
|
|
4422
|
-
i("div",
|
|
4474
|
+
s.error ? (l(), c("div", Ti, [
|
|
4475
|
+
i("div", Oi, [
|
|
4423
4476
|
e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
|
|
4424
4477
|
i("svg", {
|
|
4425
4478
|
width: "14",
|
|
@@ -4437,11 +4490,11 @@ function $i(t, e, n, a, r, s) {
|
|
|
4437
4490
|
], -1)),
|
|
4438
4491
|
i("div", null, [
|
|
4439
4492
|
e[8] || (e[8] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
|
|
4440
|
-
i("div",
|
|
4493
|
+
i("div", Ii, b(s.error), 1)
|
|
4441
4494
|
])
|
|
4442
4495
|
])
|
|
4443
|
-
])) : s.currentConv ? (l(), c(
|
|
4444
|
-
|
|
4496
|
+
])) : s.currentConv ? (l(), c(T, { key: 2 }, [
|
|
4497
|
+
P(C, {
|
|
4445
4498
|
ref: "messageList",
|
|
4446
4499
|
messages: s.displayedMessages,
|
|
4447
4500
|
"streaming-active": s.streamingActive,
|
|
@@ -4449,10 +4502,11 @@ function $i(t, e, n, a, r, s) {
|
|
|
4449
4502
|
"conversation-id": s.currentConv ? s.currentConv.id : null,
|
|
4450
4503
|
"loading-more": s.paginationState.loading,
|
|
4451
4504
|
"has-more": s.paginationState.hasMore,
|
|
4505
|
+
"unread-anchor-ts": r.unreadAnchorTs,
|
|
4452
4506
|
onLoadMore: s.onLoadMore
|
|
4453
|
-
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "onLoadMore"]),
|
|
4454
|
-
i("div",
|
|
4455
|
-
s.floatVisible ? (l(), c("div",
|
|
4507
|
+
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4508
|
+
i("div", Ei, [
|
|
4509
|
+
s.floatVisible ? (l(), c("div", Bi, [
|
|
4456
4510
|
s.approvalReady ? (l(), $(w, {
|
|
4457
4511
|
key: 0,
|
|
4458
4512
|
action: s.approvalTitle,
|
|
@@ -4473,13 +4527,13 @@ function $i(t, e, n, a, r, s) {
|
|
|
4473
4527
|
items: s.suggestions,
|
|
4474
4528
|
onSelect: s.onSuggestion
|
|
4475
4529
|
}, null, 8, ["items", "onSelect"]))
|
|
4476
|
-
], 512)) :
|
|
4477
|
-
s.actionInFlight ? (l(), c("div",
|
|
4530
|
+
], 512)) : y("", !0),
|
|
4531
|
+
s.actionInFlight ? (l(), c("div", Li, [
|
|
4478
4532
|
e[10] || (e[10] = i("span", {
|
|
4479
4533
|
class: "wm-actionWait__spinner",
|
|
4480
4534
|
"aria-hidden": "true"
|
|
4481
4535
|
}, null, -1)),
|
|
4482
|
-
i("span",
|
|
4536
|
+
i("span", Ri, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
|
|
4483
4537
|
])) : (l(), $(D, {
|
|
4484
4538
|
key: 2,
|
|
4485
4539
|
ref: "composer",
|
|
@@ -4503,10 +4557,10 @@ function $i(t, e, n, a, r, s) {
|
|
|
4503
4557
|
onClose: e[3] || (e[3] = (j) => r.moreOpen = !1),
|
|
4504
4558
|
onNotifToggle: s.onNotifToggle,
|
|
4505
4559
|
onAction: s.onMoreAction
|
|
4506
|
-
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) :
|
|
4507
|
-
r.pendingAttachments.length ? (l(), c("div",
|
|
4508
|
-
(l(!0), c(
|
|
4509
|
-
key:
|
|
4560
|
+
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
|
|
4561
|
+
r.pendingAttachments.length ? (l(), c("div", $i, [
|
|
4562
|
+
(l(!0), c(T, null, F(r.pendingAttachments, (j, H) => (l(), c("div", {
|
|
4563
|
+
key: H,
|
|
4510
4564
|
class: "wm-attached__chip"
|
|
4511
4565
|
}, [
|
|
4512
4566
|
e[12] || (e[12] = i("svg", {
|
|
@@ -4526,7 +4580,7 @@ function $i(t, e, n, a, r, s) {
|
|
|
4526
4580
|
i("button", {
|
|
4527
4581
|
type: "button",
|
|
4528
4582
|
"aria-label": "Retirer",
|
|
4529
|
-
onClick: (X) => r.pendingAttachments.splice(
|
|
4583
|
+
onClick: (X) => r.pendingAttachments.splice(H, 1)
|
|
4530
4584
|
}, [...e[11] || (e[11] = [
|
|
4531
4585
|
i("svg", {
|
|
4532
4586
|
width: "10",
|
|
@@ -4541,9 +4595,9 @@ function $i(t, e, n, a, r, s) {
|
|
|
4541
4595
|
}, [
|
|
4542
4596
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4543
4597
|
], -1)
|
|
4544
|
-
])], 8,
|
|
4598
|
+
])], 8, Fi)
|
|
4545
4599
|
]))), 128))
|
|
4546
|
-
])) :
|
|
4600
|
+
])) : y("", !0)
|
|
4547
4601
|
], 64)) : (l(), $(v, {
|
|
4548
4602
|
key: 1,
|
|
4549
4603
|
"welcome-message": s.widgetWelcomeMessage,
|
|
@@ -4562,7 +4616,7 @@ function $i(t, e, n, a, r, s) {
|
|
|
4562
4616
|
onClose: e[4] || (e[4] = (j) => r.historyOpen = !1),
|
|
4563
4617
|
onNew: s.onDrawerNew,
|
|
4564
4618
|
onPick: s.onDrawerPick
|
|
4565
|
-
}, null, 8, ["conversations", "active-id", "onNew", "onPick"])) :
|
|
4619
|
+
}, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
|
|
4566
4620
|
r.moreOpen && !s.currentConv ? (l(), $(x, {
|
|
4567
4621
|
key: 4,
|
|
4568
4622
|
"can-rename": !1,
|
|
@@ -4574,53 +4628,53 @@ function $i(t, e, n, a, r, s) {
|
|
|
4574
4628
|
onClose: e[5] || (e[5] = (j) => r.moreOpen = !1),
|
|
4575
4629
|
onNotifToggle: s.onNotifToggle,
|
|
4576
4630
|
onAction: s.onMoreAction
|
|
4577
|
-
}, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) :
|
|
4631
|
+
}, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
|
|
4578
4632
|
], 64))
|
|
4579
|
-
], 6)) :
|
|
4633
|
+
], 6)) : y("", !0)
|
|
4580
4634
|
], 2);
|
|
4581
4635
|
}
|
|
4582
|
-
const
|
|
4636
|
+
const Ni = /* @__PURE__ */ B(xi, [["render", ji], ["__scopeId", "data-v-5233982a"]]), Pi = "0.2.1";
|
|
4583
4637
|
export {
|
|
4584
4638
|
J as AIAvatar,
|
|
4585
4639
|
le as AVATAR_COLORS,
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4640
|
+
Nn as ActionResult,
|
|
4641
|
+
ar as ApprovalCard,
|
|
4642
|
+
Zt as ArtifactFormResponse,
|
|
4643
|
+
mn as ArtifactInfoCard,
|
|
4590
4644
|
Ae as ArtifactRenderer,
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4645
|
+
Mn as ArtifactTicket,
|
|
4646
|
+
Qn as AttachmentPreview,
|
|
4647
|
+
ns as Bubble,
|
|
4648
|
+
Ws as Composer,
|
|
4595
4649
|
ze as DEFAULT_BASE_URL,
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4650
|
+
zr as Feedback,
|
|
4651
|
+
Lr as FormCard,
|
|
4652
|
+
bt as Header,
|
|
4653
|
+
di as HistoryDrawer,
|
|
4600
4654
|
ke as HumanAvatar,
|
|
4601
4655
|
Ye as Launcher,
|
|
4602
4656
|
he as MEDIA_RECORDER_SUPPORTED,
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4657
|
+
xs as MessageList,
|
|
4658
|
+
Ni as Messenger,
|
|
4659
|
+
yi as MoreMenu,
|
|
4660
|
+
zt as Onboarding,
|
|
4607
4661
|
te as SCREEN_CAPTURE_SUPPORTED,
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4662
|
+
Js as SuggestionChips,
|
|
4663
|
+
ct as TeamAvatars,
|
|
4664
|
+
as as Typing,
|
|
4665
|
+
Pi as VERSION,
|
|
4612
4666
|
ge as avatarColor,
|
|
4613
4667
|
we as avatarInitials,
|
|
4614
|
-
|
|
4668
|
+
Ts as captureScreenshotFile,
|
|
4615
4669
|
U as colors,
|
|
4616
4670
|
Pe as createStore,
|
|
4617
4671
|
je as createTransport,
|
|
4618
|
-
|
|
4672
|
+
Ni as default,
|
|
4619
4673
|
be as formatTime,
|
|
4620
|
-
|
|
4621
|
-
|
|
4674
|
+
Di as guessAttachmentKind,
|
|
4675
|
+
Ms as pickRecorderMime,
|
|
4622
4676
|
Ce as renderMarkdown,
|
|
4623
|
-
|
|
4677
|
+
Is as startScreenRecording,
|
|
4624
4678
|
He as tokensCss,
|
|
4625
4679
|
Ne as uuid,
|
|
4626
4680
|
Ne as v4
|