@_solaris/messenger-widget 0.2.8 → 0.2.10
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 +7 -7
- package/dist/messenger.embed.js +17 -17
- package/dist/messenger.js +439 -397
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as z, Transition as Se, withCtx as xe, withKeys as me, withModifiers as X, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as j, resolveComponent as O, createBlock as
|
|
1
|
+
import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as z, Transition as Se, withCtx as xe, withKeys as me, withModifiers as X, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as j, resolveComponent as O, createBlock as R, createTextVNode as ie, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as H, vModelText as K, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
|
|
2
2
|
const Ee = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -108,7 +108,7 @@ function $e(t) {
|
|
|
108
108
|
const h = await o("GET", "/conversations");
|
|
109
109
|
return (h == null ? void 0 : h.conversations) ?? [];
|
|
110
110
|
}
|
|
111
|
-
async function
|
|
111
|
+
async function $(h = {}) {
|
|
112
112
|
return (await o("POST", "/conversations", h)).conversation;
|
|
113
113
|
}
|
|
114
114
|
async function A(h) {
|
|
@@ -192,13 +192,13 @@ function $e(t) {
|
|
|
192
192
|
try {
|
|
193
193
|
const h = new EventSource(Y());
|
|
194
194
|
for (const f of Ee)
|
|
195
|
-
h.addEventListener(f, (_) =>
|
|
195
|
+
h.addEventListener(f, (_) => ae(f, _.data));
|
|
196
196
|
h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
|
|
197
197
|
} catch (h) {
|
|
198
198
|
console.error("[transport] SSE open failed", h), a("error", h);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function ae(h, f) {
|
|
202
202
|
try {
|
|
203
203
|
const _ = JSON.parse(f), k = _ && typeof _ == "object" && "data" in _ ? _.data : _;
|
|
204
204
|
a(h, k);
|
|
@@ -214,10 +214,10 @@ function $e(t) {
|
|
|
214
214
|
e.panelOpen || J();
|
|
215
215
|
}, Le));
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function oe(h) {
|
|
218
218
|
e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), W()) : G();
|
|
219
219
|
}
|
|
220
|
-
async function
|
|
220
|
+
async function le() {
|
|
221
221
|
try {
|
|
222
222
|
const h = await S(), f = h.reduce((k, I) => {
|
|
223
223
|
const T = I == null ? void 0 : I.last_message_at;
|
|
@@ -229,7 +229,7 @@ function $e(t) {
|
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
231
|
function Z() {
|
|
232
|
-
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(
|
|
232
|
+
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(le, Be));
|
|
233
233
|
}
|
|
234
234
|
function u() {
|
|
235
235
|
e.pollTimer && (clearInterval(e.pollTimer), e.pollTimer = null);
|
|
@@ -270,13 +270,13 @@ function $e(t) {
|
|
|
270
270
|
on: n,
|
|
271
271
|
start: p,
|
|
272
272
|
stop: g,
|
|
273
|
-
setPanelOpen:
|
|
273
|
+
setPanelOpen: oe,
|
|
274
274
|
// REST
|
|
275
275
|
bootstrap: v,
|
|
276
276
|
getCustomer: C,
|
|
277
277
|
patchCustomer: w,
|
|
278
278
|
listConversations: S,
|
|
279
|
-
createConversation:
|
|
279
|
+
createConversation: $,
|
|
280
280
|
getConversation: A,
|
|
281
281
|
patchConversation: D,
|
|
282
282
|
listMessages: x,
|
|
@@ -382,7 +382,7 @@ function De(t) {
|
|
|
382
382
|
t.stop();
|
|
383
383
|
}
|
|
384
384
|
async function s(u) {
|
|
385
|
-
const m =
|
|
385
|
+
const m = le(u);
|
|
386
386
|
if (!m) return e.customer;
|
|
387
387
|
try {
|
|
388
388
|
const p = await t.patchCustomer(m);
|
|
@@ -437,7 +437,7 @@ function De(t) {
|
|
|
437
437
|
const p = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
|
|
438
438
|
g !== -1 && (e.conversations[g] = p);
|
|
439
439
|
}
|
|
440
|
-
async function
|
|
440
|
+
async function $(u, m, { attachments: p, metadata: g } = {}) {
|
|
441
441
|
var T;
|
|
442
442
|
const h = (m || "").trim(), f = Array.isArray(p) && p.length > 0;
|
|
443
443
|
if (!u || !h && !f) return;
|
|
@@ -567,11 +567,11 @@ function De(t) {
|
|
|
567
567
|
let g = -1;
|
|
568
568
|
m != null && m.client_msg_id && (g = p.findIndex(
|
|
569
569
|
(_) => (_ == null ? void 0 : _.client_msg_id) && _.client_msg_id === m.client_msg_id
|
|
570
|
-
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = p.findIndex((_) =>
|
|
570
|
+
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = p.findIndex((_) => ae(_ == null ? void 0 : _.id, m.id)));
|
|
571
571
|
let h;
|
|
572
|
-
g === -1 ? h = [...p, m].sort(
|
|
572
|
+
g === -1 ? h = [...p, m].sort(oe) : (h = p.slice(), h[g] = { ...p[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
|
-
function
|
|
574
|
+
function ae(u, m) {
|
|
575
575
|
return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
|
|
576
576
|
}
|
|
577
577
|
function J(u, m, p) {
|
|
@@ -593,10 +593,10 @@ function De(t) {
|
|
|
593
593
|
), e.conversations = h;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function oe(u, m) {
|
|
597
597
|
return (u.created_at || "").localeCompare(m.created_at || "");
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function le(u) {
|
|
600
600
|
if (!u || typeof u != "object") return null;
|
|
601
601
|
const m = {}, p = {};
|
|
602
602
|
for (const [g, h] of Object.entries(u))
|
|
@@ -620,7 +620,7 @@ function De(t) {
|
|
|
620
620
|
openConversation: v,
|
|
621
621
|
loadMore: C,
|
|
622
622
|
patchConversation: S,
|
|
623
|
-
send:
|
|
623
|
+
send: $,
|
|
624
624
|
clickCallback: A,
|
|
625
625
|
signAttachment: x,
|
|
626
626
|
submitFeedback: N,
|
|
@@ -648,9 +648,9 @@ const U = {
|
|
|
648
648
|
green: "#22C55E",
|
|
649
649
|
red: "#B91C1C",
|
|
650
650
|
redBg: "#FDECEC"
|
|
651
|
-
},
|
|
651
|
+
}, ce = ["#5B5FEF", "#7C3AED", "#DB2777", "#0891B2", "#D97706", "#059669"];
|
|
652
652
|
function ye(t = "") {
|
|
653
|
-
return t ?
|
|
653
|
+
return t ? ce[t.charCodeAt(0) % ce.length] : ce[0];
|
|
654
654
|
}
|
|
655
655
|
function we(t = "") {
|
|
656
656
|
return t.split(" ").map((e) => e[0] || "").join("").toUpperCase().slice(0, 2);
|
|
@@ -998,12 +998,12 @@ function gt(t, e, n, a, r, s) {
|
|
|
998
998
|
])])) : (l(), d("div", dt)),
|
|
999
999
|
n.showIdentity ? (l(), d(M, { key: 2 }, [
|
|
1000
1000
|
i("div", ut, [
|
|
1001
|
-
n.escalated ? (l(),
|
|
1001
|
+
n.escalated ? (l(), R(o, {
|
|
1002
1002
|
key: 0,
|
|
1003
1003
|
name: n.agentName,
|
|
1004
1004
|
"avatar-url": n.agentAvatarUrl,
|
|
1005
1005
|
size: 34
|
|
1006
|
-
}, null, 8, ["name", "avatar-url"])) : (l(),
|
|
1006
|
+
}, null, 8, ["name", "avatar-url"])) : (l(), R(c, {
|
|
1007
1007
|
key: 1,
|
|
1008
1008
|
size: 34
|
|
1009
1009
|
}))
|
|
@@ -1011,14 +1011,14 @@ function gt(t, e, n, a, r, s) {
|
|
|
1011
1011
|
i("div", ht, [
|
|
1012
1012
|
i("div", mt, b(n.title), 1),
|
|
1013
1013
|
s.showPresence ? (l(), d("div", ft, [
|
|
1014
|
-
s.hasTeam ? (l(),
|
|
1014
|
+
s.hasTeam ? (l(), R(v, {
|
|
1015
1015
|
key: 0,
|
|
1016
1016
|
members: n.teamMembers,
|
|
1017
1017
|
"response-label": n.responseLabel
|
|
1018
1018
|
}, null, 8, ["members", "response-label"])) : y("", !0),
|
|
1019
1019
|
i("span", pt, [
|
|
1020
1020
|
e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
|
|
1021
|
-
|
|
1021
|
+
ie(" " + b(s.statusText), 1)
|
|
1022
1022
|
])
|
|
1023
1023
|
])) : y("", !0)
|
|
1024
1024
|
])
|
|
@@ -1241,7 +1241,7 @@ const zt = {
|
|
|
1241
1241
|
name: "WmActionResult",
|
|
1242
1242
|
props: {
|
|
1243
1243
|
state: { type: String, default: "success" },
|
|
1244
|
-
// 'success' | 'failure' | 'rejected'
|
|
1244
|
+
// 'success' | 'failure' | 'rejected' | 'awaiting'
|
|
1245
1245
|
label: { type: String, required: !0 },
|
|
1246
1246
|
detail: { type: String, default: "" }
|
|
1247
1247
|
},
|
|
@@ -1275,6 +1275,16 @@ const zt = {
|
|
|
1275
1275
|
"stroke-linejoin": "round"
|
|
1276
1276
|
}, Gt = {
|
|
1277
1277
|
key: 2,
|
|
1278
|
+
width: "11",
|
|
1279
|
+
height: "11",
|
|
1280
|
+
viewBox: "0 0 24 24",
|
|
1281
|
+
fill: "none",
|
|
1282
|
+
stroke: "currentColor",
|
|
1283
|
+
"stroke-width": "2.4",
|
|
1284
|
+
"stroke-linecap": "round",
|
|
1285
|
+
"stroke-linejoin": "round"
|
|
1286
|
+
}, Kt = {
|
|
1287
|
+
key: 3,
|
|
1278
1288
|
width: "12",
|
|
1279
1289
|
height: "12",
|
|
1280
1290
|
viewBox: "0 0 24 24",
|
|
@@ -1283,8 +1293,8 @@ const zt = {
|
|
|
1283
1293
|
"stroke-width": "2.2",
|
|
1284
1294
|
"stroke-linecap": "round",
|
|
1285
1295
|
"stroke-linejoin": "round"
|
|
1286
|
-
},
|
|
1287
|
-
function
|
|
1296
|
+
}, Yt = { class: "wm-result__label" }, Jt = { class: "wm-result__detail" };
|
|
1297
|
+
function Xt(t, e, n, a, r, s) {
|
|
1288
1298
|
return l(), d("div", {
|
|
1289
1299
|
class: E(["wm-result", `wm-result--${n.state}`])
|
|
1290
1300
|
}, [
|
|
@@ -1293,7 +1303,14 @@ function Jt(t, e, n, a, r, s) {
|
|
|
1293
1303
|
i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
1294
1304
|
])])) : n.state === "rejected" ? (l(), d("svg", Wt, [...e[1] || (e[1] = [
|
|
1295
1305
|
i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
1296
|
-
])])) : (l(), d("svg", Gt, [...e[2] || (e[2] = [
|
|
1306
|
+
])])) : n.state === "awaiting" ? (l(), d("svg", Gt, [...e[2] || (e[2] = [
|
|
1307
|
+
i("circle", {
|
|
1308
|
+
cx: "12",
|
|
1309
|
+
cy: "12",
|
|
1310
|
+
r: "10"
|
|
1311
|
+
}, null, -1),
|
|
1312
|
+
i("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
1313
|
+
])])) : (l(), d("svg", Kt, [...e[3] || (e[3] = [
|
|
1297
1314
|
i("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
1298
1315
|
i("line", {
|
|
1299
1316
|
x1: "12",
|
|
@@ -1309,17 +1326,17 @@ function Jt(t, e, n, a, r, s) {
|
|
|
1309
1326
|
}, null, -1)
|
|
1310
1327
|
])]))
|
|
1311
1328
|
]),
|
|
1312
|
-
i("span",
|
|
1329
|
+
i("span", Yt, b(n.label), 1),
|
|
1313
1330
|
s.detailText ? (l(), d(M, { key: 0 }, [
|
|
1314
|
-
e[
|
|
1331
|
+
e[4] || (e[4] = i("span", {
|
|
1315
1332
|
class: "wm-result__sep",
|
|
1316
1333
|
"aria-hidden": "true"
|
|
1317
1334
|
}, "·", -1)),
|
|
1318
|
-
i("span",
|
|
1335
|
+
i("span", Jt, b(s.detailText), 1)
|
|
1319
1336
|
], 64)) : y("", !0)
|
|
1320
1337
|
], 2);
|
|
1321
1338
|
}
|
|
1322
|
-
const
|
|
1339
|
+
const Qt = /* @__PURE__ */ B(zt, [["render", Xt], ["__scopeId", "data-v-7f90dad6"]]), Zt = {
|
|
1323
1340
|
name: "WmArtifactFormResponse",
|
|
1324
1341
|
props: {
|
|
1325
1342
|
data: { type: Object, required: !0 }
|
|
@@ -1330,11 +1347,11 @@ const Xt = /* @__PURE__ */ B(zt, [["render", Jt], ["__scopeId", "data-v-5c07ce9d
|
|
|
1330
1347
|
return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
|
|
1331
1348
|
}
|
|
1332
1349
|
}
|
|
1333
|
-
},
|
|
1334
|
-
function
|
|
1335
|
-
return l(), d("div",
|
|
1336
|
-
i("div",
|
|
1337
|
-
i("div",
|
|
1350
|
+
}, en = { class: "wm-art wm-art--formResponse" }, tn = { class: "wm-art__head" }, nn = { class: "wm-art__title" }, sn = { class: "wm-art__body" }, rn = { class: "wm-art__fieldLabel" };
|
|
1351
|
+
function an(t, e, n, a, r, s) {
|
|
1352
|
+
return l(), d("div", en, [
|
|
1353
|
+
i("div", tn, [
|
|
1354
|
+
i("div", nn, b(n.data.title || "Formulaire"), 1),
|
|
1338
1355
|
e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
|
|
1339
1356
|
i("svg", {
|
|
1340
1357
|
width: "11",
|
|
@@ -1349,15 +1366,15 @@ function rn(t, e, n, a, r, s) {
|
|
|
1349
1366
|
}, [
|
|
1350
1367
|
i("polyline", { points: "20 6 9 17 4 12" })
|
|
1351
1368
|
]),
|
|
1352
|
-
|
|
1369
|
+
ie(" Envoyé ")
|
|
1353
1370
|
], -1))
|
|
1354
1371
|
]),
|
|
1355
|
-
i("div",
|
|
1372
|
+
i("div", sn, [
|
|
1356
1373
|
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1357
1374
|
key: c,
|
|
1358
1375
|
class: "wm-art__field"
|
|
1359
1376
|
}, [
|
|
1360
|
-
i("div",
|
|
1377
|
+
i("div", rn, b(o.label), 1),
|
|
1361
1378
|
i("div", {
|
|
1362
1379
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1363
1380
|
}, b(o.value), 3)
|
|
@@ -1365,7 +1382,7 @@ function rn(t, e, n, a, r, s) {
|
|
|
1365
1382
|
])
|
|
1366
1383
|
]);
|
|
1367
1384
|
}
|
|
1368
|
-
const
|
|
1385
|
+
const on = /* @__PURE__ */ B(Zt, [["render", an], ["__scopeId", "data-v-812bda8b"]]), ln = {
|
|
1369
1386
|
name: "WmArtifactInfoCard",
|
|
1370
1387
|
props: {
|
|
1371
1388
|
data: { type: Object, required: !0 }
|
|
@@ -1380,45 +1397,45 @@ const an = /* @__PURE__ */ B(Qt, [["render", rn], ["__scopeId", "data-v-812bda8b
|
|
|
1380
1397
|
return !!((t = this.data) != null && t.body) || this.fields.length > 0;
|
|
1381
1398
|
}
|
|
1382
1399
|
}
|
|
1383
|
-
},
|
|
1400
|
+
}, cn = { class: "wm-art wm-art--infoCard" }, dn = {
|
|
1384
1401
|
key: 0,
|
|
1385
1402
|
class: "wm-art__image"
|
|
1386
|
-
},
|
|
1403
|
+
}, un = ["src", "alt"], hn = { class: "wm-art__head" }, mn = { class: "wm-art__headMain" }, fn = { class: "wm-art__title" }, pn = {
|
|
1387
1404
|
key: 0,
|
|
1388
1405
|
class: "wm-art__subtitle"
|
|
1389
|
-
},
|
|
1406
|
+
}, _n = {
|
|
1390
1407
|
key: 1,
|
|
1391
1408
|
class: "wm-art__body"
|
|
1392
|
-
},
|
|
1409
|
+
}, vn = {
|
|
1393
1410
|
key: 0,
|
|
1394
1411
|
class: "wm-art__text"
|
|
1395
|
-
},
|
|
1396
|
-
function
|
|
1397
|
-
return l(), d("div",
|
|
1398
|
-
n.data.image_url ? (l(), d("figure",
|
|
1412
|
+
}, gn = { class: "wm-art__fieldLabel" };
|
|
1413
|
+
function yn(t, e, n, a, r, s) {
|
|
1414
|
+
return l(), d("div", cn, [
|
|
1415
|
+
n.data.image_url ? (l(), d("figure", dn, [
|
|
1399
1416
|
i("img", {
|
|
1400
1417
|
src: n.data.image_url,
|
|
1401
1418
|
alt: n.data.title || "",
|
|
1402
1419
|
loading: "lazy"
|
|
1403
|
-
}, null, 8,
|
|
1420
|
+
}, null, 8, un)
|
|
1404
1421
|
])) : y("", !0),
|
|
1405
|
-
i("div",
|
|
1406
|
-
i("div",
|
|
1407
|
-
i("div",
|
|
1408
|
-
n.data.subtitle ? (l(), d("div",
|
|
1422
|
+
i("div", hn, [
|
|
1423
|
+
i("div", mn, [
|
|
1424
|
+
i("div", fn, b(n.data.title), 1),
|
|
1425
|
+
n.data.subtitle ? (l(), d("div", pn, b(n.data.subtitle), 1)) : y("", !0)
|
|
1409
1426
|
]),
|
|
1410
1427
|
n.data.badge && n.data.badge.label ? (l(), d("span", {
|
|
1411
1428
|
key: 0,
|
|
1412
1429
|
class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
|
|
1413
1430
|
}, b(n.data.badge.label), 3)) : y("", !0)
|
|
1414
1431
|
]),
|
|
1415
|
-
s.hasBody ? (l(), d("div",
|
|
1416
|
-
n.data.body ? (l(), d("div",
|
|
1432
|
+
s.hasBody ? (l(), d("div", _n, [
|
|
1433
|
+
n.data.body ? (l(), d("div", vn, b(n.data.body), 1)) : y("", !0),
|
|
1417
1434
|
s.fields.length ? (l(!0), d(M, { key: 1 }, j(s.fields, (o, c) => (l(), d("div", {
|
|
1418
1435
|
key: c,
|
|
1419
1436
|
class: "wm-art__field"
|
|
1420
1437
|
}, [
|
|
1421
|
-
i("div",
|
|
1438
|
+
i("div", gn, b(o.label), 1),
|
|
1422
1439
|
i("div", {
|
|
1423
1440
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1424
1441
|
}, b(o.value), 3)
|
|
@@ -1426,15 +1443,15 @@ function gn(t, e, n, a, r, s) {
|
|
|
1426
1443
|
])) : y("", !0)
|
|
1427
1444
|
]);
|
|
1428
1445
|
}
|
|
1429
|
-
const
|
|
1430
|
-
function
|
|
1446
|
+
const wn = /* @__PURE__ */ B(ln, [["render", yn], ["__scopeId", "data-v-d7369333"]]);
|
|
1447
|
+
function bn(t) {
|
|
1431
1448
|
if (!t) return "";
|
|
1432
1449
|
const e = new Date(t);
|
|
1433
1450
|
if (Number.isNaN(e.getTime())) return t;
|
|
1434
1451
|
const n = e.toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" }), a = e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
1435
1452
|
return `${n} à ${a}`;
|
|
1436
1453
|
}
|
|
1437
|
-
const
|
|
1454
|
+
const kn = {
|
|
1438
1455
|
name: "WmArtifactTicket",
|
|
1439
1456
|
props: {
|
|
1440
1457
|
data: { type: Object, required: !0 }
|
|
@@ -1446,7 +1463,7 @@ const bn = {
|
|
|
1446
1463
|
},
|
|
1447
1464
|
formattedDate() {
|
|
1448
1465
|
var t;
|
|
1449
|
-
return
|
|
1466
|
+
return bn((t = this.data) == null ? void 0 : t.created_at);
|
|
1450
1467
|
}
|
|
1451
1468
|
},
|
|
1452
1469
|
methods: {
|
|
@@ -1463,22 +1480,22 @@ const bn = {
|
|
|
1463
1480
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(e) ? 3 : /low|basse|faible|minor/.test(e) ? 1 : 2;
|
|
1464
1481
|
}
|
|
1465
1482
|
}
|
|
1466
|
-
},
|
|
1483
|
+
}, Cn = { class: "wm-art wm-art--ticket" }, An = { class: "wm-art__head wm-tk__head" }, Sn = { class: "wm-art__title wm-tk__title" }, xn = { class: "wm-tk__sub" }, Mn = { class: "wm-tk__ref" }, Tn = {
|
|
1467
1484
|
key: 0,
|
|
1468
1485
|
class: "wm-tk__text"
|
|
1469
|
-
},
|
|
1486
|
+
}, In = {
|
|
1470
1487
|
key: 0,
|
|
1471
1488
|
class: "wm-art__body"
|
|
1472
|
-
},
|
|
1489
|
+
}, On = { class: "wm-art__fieldLabel" }, En = ["data-level"], Bn = {
|
|
1473
1490
|
key: 1,
|
|
1474
1491
|
class: "wm-art__footer wm-tk__footer"
|
|
1475
1492
|
};
|
|
1476
|
-
function
|
|
1477
|
-
return l(), d("div",
|
|
1478
|
-
i("div",
|
|
1479
|
-
i("div",
|
|
1480
|
-
i("div",
|
|
1481
|
-
i("div",
|
|
1493
|
+
function Ln(t, e, n, a, r, s) {
|
|
1494
|
+
return l(), d("div", Cn, [
|
|
1495
|
+
i("div", An, [
|
|
1496
|
+
i("div", Sn, b(n.data.title), 1),
|
|
1497
|
+
i("div", xn, [
|
|
1498
|
+
i("div", Mn, [
|
|
1482
1499
|
e[0] || (e[0] = i("svg", {
|
|
1483
1500
|
width: "11",
|
|
1484
1501
|
height: "11",
|
|
@@ -1502,17 +1519,17 @@ function Bn(t, e, n, a, r, s) {
|
|
|
1502
1519
|
class: "wm-tk__dot",
|
|
1503
1520
|
"aria-hidden": "true"
|
|
1504
1521
|
}, null, -1)),
|
|
1505
|
-
|
|
1522
|
+
ie(" " + b(n.data.status.label), 1)
|
|
1506
1523
|
], 2)
|
|
1507
1524
|
]),
|
|
1508
|
-
n.data.body ? (l(), d("div",
|
|
1525
|
+
n.data.body ? (l(), d("div", Tn, b(n.data.body), 1)) : y("", !0)
|
|
1509
1526
|
]),
|
|
1510
|
-
s.fields.length ? (l(), d("div",
|
|
1527
|
+
s.fields.length ? (l(), d("div", In, [
|
|
1511
1528
|
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1512
1529
|
key: c,
|
|
1513
1530
|
class: "wm-art__field"
|
|
1514
1531
|
}, [
|
|
1515
|
-
i("div",
|
|
1532
|
+
i("div", On, b(o.label), 1),
|
|
1516
1533
|
i("div", {
|
|
1517
1534
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1518
1535
|
}, [
|
|
@@ -1546,12 +1563,12 @@ function Bn(t, e, n, a, r, s) {
|
|
|
1546
1563
|
height: "9",
|
|
1547
1564
|
rx: "0.5"
|
|
1548
1565
|
}, null, -1)
|
|
1549
|
-
])], 8,
|
|
1566
|
+
])], 8, En)) : y("", !0),
|
|
1550
1567
|
i("span", null, b(o.value), 1)
|
|
1551
1568
|
], 2)
|
|
1552
1569
|
]))), 128))
|
|
1553
1570
|
])) : y("", !0),
|
|
1554
|
-
n.data.created_at ? (l(), d("div",
|
|
1571
|
+
n.data.created_at ? (l(), d("div", Bn, [
|
|
1555
1572
|
e[3] || (e[3] = i("svg", {
|
|
1556
1573
|
width: "11",
|
|
1557
1574
|
height: "11",
|
|
@@ -1576,11 +1593,11 @@ function Bn(t, e, n, a, r, s) {
|
|
|
1576
1593
|
])) : y("", !0)
|
|
1577
1594
|
]);
|
|
1578
1595
|
}
|
|
1579
|
-
const
|
|
1580
|
-
form_response:
|
|
1581
|
-
info_card:
|
|
1582
|
-
ticket:
|
|
1583
|
-
},
|
|
1596
|
+
const Rn = /* @__PURE__ */ B(kn, [["render", Ln], ["__scopeId", "data-v-97001af0"]]), $n = {
|
|
1597
|
+
form_response: on,
|
|
1598
|
+
info_card: wn,
|
|
1599
|
+
ticket: Rn
|
|
1600
|
+
}, Fn = {
|
|
1584
1601
|
name: "WmArtifactRenderer",
|
|
1585
1602
|
props: {
|
|
1586
1603
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -1591,17 +1608,17 @@ const Ln = /* @__PURE__ */ B(bn, [["render", Bn], ["__scopeId", "data-v-97001af0
|
|
|
1591
1608
|
component() {
|
|
1592
1609
|
var e;
|
|
1593
1610
|
const t = (e = this.artifact) == null ? void 0 : e.kind;
|
|
1594
|
-
return t &&
|
|
1611
|
+
return t && $n[t] || null;
|
|
1595
1612
|
}
|
|
1596
1613
|
}
|
|
1597
1614
|
};
|
|
1598
|
-
function
|
|
1599
|
-
return s.component ? (l(),
|
|
1615
|
+
function jn(t, e, n, a, r, s) {
|
|
1616
|
+
return s.component ? (l(), R(Me(s.component), {
|
|
1600
1617
|
key: 0,
|
|
1601
1618
|
data: n.artifact.data
|
|
1602
1619
|
}, null, 8, ["data"])) : y("", !0);
|
|
1603
1620
|
}
|
|
1604
|
-
const
|
|
1621
|
+
const Un = /* @__PURE__ */ B(Fn, [["render", jn]]), Dn = {
|
|
1605
1622
|
name: "WmAttachmentPreview",
|
|
1606
1623
|
inject: {
|
|
1607
1624
|
signAttachmentFn: { default: null }
|
|
@@ -1655,15 +1672,15 @@ const jn = /* @__PURE__ */ B($n, [["render", Fn]]), Un = {
|
|
|
1655
1672
|
this.url || t.preventDefault();
|
|
1656
1673
|
}
|
|
1657
1674
|
}
|
|
1658
|
-
},
|
|
1675
|
+
}, Nn = ["href"], Pn = ["src", "alt"], Hn = ["src"], zn = ["src"], Vn = ["href", "download"], qn = { class: "wm-att__main" }, Wn = { class: "wm-att__name" }, Gn = {
|
|
1659
1676
|
key: 0,
|
|
1660
1677
|
class: "wm-att__meta"
|
|
1661
|
-
},
|
|
1678
|
+
}, Kn = {
|
|
1662
1679
|
key: 0,
|
|
1663
1680
|
class: "wm-att__spin",
|
|
1664
1681
|
"aria-hidden": "true"
|
|
1665
1682
|
};
|
|
1666
|
-
function
|
|
1683
|
+
function Yn(t, e, n, a, r, s) {
|
|
1667
1684
|
return l(), d("div", {
|
|
1668
1685
|
class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
1669
1686
|
}, [
|
|
@@ -1678,18 +1695,18 @@ function Kn(t, e, n, a, r, s) {
|
|
|
1678
1695
|
src: r.url,
|
|
1679
1696
|
alt: s.displayName,
|
|
1680
1697
|
loading: "lazy"
|
|
1681
|
-
}, null, 8,
|
|
1682
|
-
], 8,
|
|
1698
|
+
}, null, 8, Pn)
|
|
1699
|
+
], 8, Nn)) : s.kind === "audio" && r.url ? (l(), d("audio", {
|
|
1683
1700
|
key: 1,
|
|
1684
1701
|
src: r.url,
|
|
1685
1702
|
controls: "",
|
|
1686
1703
|
preload: "metadata"
|
|
1687
|
-
}, null, 8,
|
|
1704
|
+
}, null, 8, Hn)) : s.kind === "video" && r.url ? (l(), d("video", {
|
|
1688
1705
|
key: 2,
|
|
1689
1706
|
src: r.url,
|
|
1690
1707
|
controls: "",
|
|
1691
1708
|
preload: "metadata"
|
|
1692
|
-
}, null, 8,
|
|
1709
|
+
}, null, 8, zn)) : (l(), d("a", {
|
|
1693
1710
|
key: 3,
|
|
1694
1711
|
class: "wm-att__file",
|
|
1695
1712
|
href: r.url || "#",
|
|
@@ -1714,19 +1731,19 @@ function Kn(t, e, n, a, r, s) {
|
|
|
1714
1731
|
i("path", { d: "M14 2v6h6" })
|
|
1715
1732
|
])
|
|
1716
1733
|
], -1)),
|
|
1717
|
-
i("span",
|
|
1718
|
-
i("span",
|
|
1719
|
-
s.sizeLabel ? (l(), d("span",
|
|
1734
|
+
i("span", qn, [
|
|
1735
|
+
i("span", Wn, b(s.displayName), 1),
|
|
1736
|
+
s.sizeLabel ? (l(), d("span", Gn, b(s.sizeLabel), 1)) : y("", !0)
|
|
1720
1737
|
]),
|
|
1721
|
-
r.loading ? (l(), d("span",
|
|
1722
|
-
], 8,
|
|
1738
|
+
r.loading ? (l(), d("span", Kn)) : y("", !0)
|
|
1739
|
+
], 8, Vn))
|
|
1723
1740
|
], 2);
|
|
1724
1741
|
}
|
|
1725
|
-
const
|
|
1726
|
-
function
|
|
1742
|
+
const Jn = /* @__PURE__ */ B(Dn, [["render", Yn], ["__scopeId", "data-v-1cd1267b"]]);
|
|
1743
|
+
function Xn(t) {
|
|
1727
1744
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1728
1745
|
}
|
|
1729
|
-
function
|
|
1746
|
+
function Qn(t) {
|
|
1730
1747
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
|
|
1731
1748
|
}
|
|
1732
1749
|
const _e = "";
|
|
@@ -1736,11 +1753,11 @@ function te(t) {
|
|
|
1736
1753
|
return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
|
|
1737
1754
|
const s = n.length;
|
|
1738
1755
|
return n.push(r), `${_e}CODE${s}${_e}`;
|
|
1739
|
-
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) =>
|
|
1756
|
+
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => Qn(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;
|
|
1740
1757
|
}
|
|
1741
|
-
function
|
|
1758
|
+
function Zn(t) {
|
|
1742
1759
|
if (!t) return "";
|
|
1743
|
-
const e =
|
|
1760
|
+
const e = Xn(t).split(`
|
|
1744
1761
|
`), n = [];
|
|
1745
1762
|
let a = 0;
|
|
1746
1763
|
for (; a < e.length; ) {
|
|
@@ -1776,8 +1793,8 @@ function Qn(t) {
|
|
|
1776
1793
|
if (!A) break;
|
|
1777
1794
|
w.push(A[1]), a++;
|
|
1778
1795
|
}
|
|
1779
|
-
const S = w.map((A) => `<li>${te(A)}</li>`).join(""),
|
|
1780
|
-
n.push({ type: "block", html: `<ol class="wm-md-ol"${
|
|
1796
|
+
const S = w.map((A) => `<li>${te(A)}</li>`).join(""), $ = C !== 1 ? ` start="${C}"` : "";
|
|
1797
|
+
n.push({ type: "block", html: `<ol class="wm-md-ol"${$}>${S}</ol>` });
|
|
1781
1798
|
continue;
|
|
1782
1799
|
}
|
|
1783
1800
|
const v = /^(#{1,6})\s+(.*)$/.exec(s);
|
|
@@ -1801,7 +1818,7 @@ function Qn(t) {
|
|
|
1801
1818
|
}
|
|
1802
1819
|
return r;
|
|
1803
1820
|
}
|
|
1804
|
-
const
|
|
1821
|
+
const es = {
|
|
1805
1822
|
name: "WmBubble",
|
|
1806
1823
|
props: {
|
|
1807
1824
|
role: { type: String, default: "ai" },
|
|
@@ -1810,41 +1827,41 @@ const Zn = {
|
|
|
1810
1827
|
},
|
|
1811
1828
|
computed: {
|
|
1812
1829
|
rendered() {
|
|
1813
|
-
return
|
|
1830
|
+
return Zn(this.text);
|
|
1814
1831
|
}
|
|
1815
1832
|
}
|
|
1816
|
-
},
|
|
1817
|
-
function
|
|
1833
|
+
}, ts = ["innerHTML"];
|
|
1834
|
+
function ns(t, e, n, a, r, s) {
|
|
1818
1835
|
return l(), d("div", {
|
|
1819
1836
|
class: E(["wm-bubble", "wm-bubble--" + n.role])
|
|
1820
1837
|
}, [
|
|
1821
1838
|
Te(t.$slots, "default", {}, () => [
|
|
1822
|
-
i("span", { innerHTML: s.rendered }, null, 8,
|
|
1839
|
+
i("span", { innerHTML: s.rendered }, null, 8, ts)
|
|
1823
1840
|
], !0)
|
|
1824
1841
|
], 2);
|
|
1825
1842
|
}
|
|
1826
|
-
const
|
|
1827
|
-
function
|
|
1828
|
-
return l(), d("div",
|
|
1843
|
+
const ss = /* @__PURE__ */ B(es, [["render", ns], ["__scopeId", "data-v-5c9e9f2b"]]), rs = { name: "WmTyping" }, is = { class: "wm-typing" };
|
|
1844
|
+
function as(t, e, n, a, r, s) {
|
|
1845
|
+
return l(), d("div", is, [...e[0] || (e[0] = [
|
|
1829
1846
|
i("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
1830
1847
|
i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
1831
1848
|
i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
1832
1849
|
])]);
|
|
1833
1850
|
}
|
|
1834
|
-
const
|
|
1835
|
-
function
|
|
1851
|
+
const os = /* @__PURE__ */ B(rs, [["render", as], ["__scopeId", "data-v-df2447fd"]]);
|
|
1852
|
+
function ne(t) {
|
|
1836
1853
|
return t ? t.client_msg_id || t.id : "";
|
|
1837
1854
|
}
|
|
1838
|
-
const
|
|
1855
|
+
const ls = {
|
|
1839
1856
|
transferred_to_human: "Conversation transférée à un humain",
|
|
1840
1857
|
assigned: "{name} a rejoint la conversation",
|
|
1841
1858
|
unassigned: "L'agent a quitté la conversation",
|
|
1842
1859
|
resolved: "Conversation résolue",
|
|
1843
1860
|
reopened: "Conversation rouverte",
|
|
1844
1861
|
idle: "Conversation en pause"
|
|
1845
|
-
},
|
|
1862
|
+
}, cs = 80, ds = 200, us = {
|
|
1846
1863
|
name: "WmMessageList",
|
|
1847
|
-
components: { AIAvatar: Q, HumanAvatar: ke, Bubble:
|
|
1864
|
+
components: { AIAvatar: Q, HumanAvatar: ke, Bubble: ss, Typing: os, ActionResult: Qt, AttachmentPreview: Jn, ArtifactRenderer: Un },
|
|
1848
1865
|
props: {
|
|
1849
1866
|
messages: { type: Array, default: () => [] },
|
|
1850
1867
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1877,36 +1894,48 @@ const os = {
|
|
|
1877
1894
|
return !this.hasMore && !this.loadingMore && this.messages.length >= 20;
|
|
1878
1895
|
},
|
|
1879
1896
|
groups() {
|
|
1880
|
-
var e, n, a;
|
|
1897
|
+
var e, n, a, r;
|
|
1881
1898
|
const t = [];
|
|
1882
|
-
for (const
|
|
1883
|
-
const
|
|
1884
|
-
if (
|
|
1899
|
+
for (const s of this.messages) {
|
|
1900
|
+
const o = this.roleOf(s);
|
|
1901
|
+
if (o === "system") {
|
|
1902
|
+
if (((e = s == null ? void 0 : s.payload) == null ? void 0 : e.event) === "action_admin_pending") {
|
|
1903
|
+
const C = t[t.length - 1];
|
|
1904
|
+
C && C.role === "ai" ? C.messages.push(s) : t.push({
|
|
1905
|
+
key: `g-${ne(s)}`,
|
|
1906
|
+
role: "ai",
|
|
1907
|
+
agentName: "",
|
|
1908
|
+
agentAvatarUrl: null,
|
|
1909
|
+
messages: [s],
|
|
1910
|
+
items: []
|
|
1911
|
+
});
|
|
1912
|
+
continue;
|
|
1913
|
+
}
|
|
1885
1914
|
t.push({
|
|
1886
|
-
key: `sys-${
|
|
1887
|
-
role:
|
|
1888
|
-
messages: [
|
|
1915
|
+
key: `sys-${ne(s)}`,
|
|
1916
|
+
role: o,
|
|
1917
|
+
messages: [s],
|
|
1889
1918
|
items: [],
|
|
1890
|
-
systemLabel: this.systemLabel(
|
|
1919
|
+
systemLabel: this.systemLabel(s)
|
|
1891
1920
|
});
|
|
1892
1921
|
continue;
|
|
1893
1922
|
}
|
|
1894
|
-
const
|
|
1895
|
-
|
|
1896
|
-
key: `g-${
|
|
1897
|
-
role:
|
|
1898
|
-
agentName: ((
|
|
1899
|
-
agentAvatarUrl: ((
|
|
1900
|
-
messages: [
|
|
1923
|
+
const c = t[t.length - 1];
|
|
1924
|
+
c && c.role === o && (o === "ai" || c.agentName === (((n = s == null ? void 0 : s.author) == null ? void 0 : n.name) || "")) ? c.messages.push(s) : t.push({
|
|
1925
|
+
key: `g-${ne(s)}`,
|
|
1926
|
+
role: o,
|
|
1927
|
+
agentName: ((a = s == null ? void 0 : s.author) == null ? void 0 : a.name) || "",
|
|
1928
|
+
agentAvatarUrl: ((r = s == null ? void 0 : s.author) == null ? void 0 : r.avatar_url) || null,
|
|
1929
|
+
messages: [s],
|
|
1901
1930
|
items: []
|
|
1902
1931
|
});
|
|
1903
1932
|
}
|
|
1904
|
-
for (const
|
|
1905
|
-
if (
|
|
1906
|
-
const
|
|
1907
|
-
for (const
|
|
1908
|
-
for (const
|
|
1909
|
-
|
|
1933
|
+
for (const s of t) {
|
|
1934
|
+
if (s.role === "system") continue;
|
|
1935
|
+
const o = [];
|
|
1936
|
+
for (const c of s.messages)
|
|
1937
|
+
for (const v of this.itemsOf(c)) o.push(v);
|
|
1938
|
+
s.items = o;
|
|
1910
1939
|
}
|
|
1911
1940
|
return t;
|
|
1912
1941
|
},
|
|
@@ -1937,13 +1966,13 @@ const os = {
|
|
|
1937
1966
|
this._lastSeenConvId = this.conversationId, this.scrollToBottom();
|
|
1938
1967
|
},
|
|
1939
1968
|
methods: {
|
|
1940
|
-
messageKey:
|
|
1969
|
+
messageKey: ne,
|
|
1941
1970
|
isAtBottom(t) {
|
|
1942
|
-
return t.scrollHeight - t.scrollTop - t.clientHeight <=
|
|
1971
|
+
return t.scrollHeight - t.scrollTop - t.clientHeight <= cs;
|
|
1943
1972
|
},
|
|
1944
1973
|
onScroll() {
|
|
1945
1974
|
const t = this.$refs.scrollEl;
|
|
1946
|
-
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <=
|
|
1975
|
+
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= ds && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
1947
1976
|
},
|
|
1948
1977
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
1949
1978
|
//
|
|
@@ -2053,20 +2082,28 @@ const os = {
|
|
|
2053
2082
|
// - `kind` : `{ top, bottom }` for the smart-corner
|
|
2054
2083
|
// logic — 'bubble' (narrow) | 'card' (wide)
|
|
2055
2084
|
itemsOf(t) {
|
|
2085
|
+
var e;
|
|
2056
2086
|
if (!t) return [];
|
|
2087
|
+
if (t.type === "system" && ((e = t == null ? void 0 : t.payload) == null ? void 0 : e.event) === "action_admin_pending")
|
|
2088
|
+
return [{
|
|
2089
|
+
message: t,
|
|
2090
|
+
partKey: "main",
|
|
2091
|
+
renderAs: "admin-pending",
|
|
2092
|
+
kind: { top: "bubble", bottom: "bubble" }
|
|
2093
|
+
}];
|
|
2057
2094
|
if (t.type === "action" && t.payload && t.payload.state !== "pending") {
|
|
2058
|
-
const
|
|
2095
|
+
const n = [{
|
|
2059
2096
|
message: t,
|
|
2060
2097
|
partKey: "main",
|
|
2061
2098
|
renderAs: "action",
|
|
2062
2099
|
kind: { top: "bubble", bottom: "bubble" }
|
|
2063
2100
|
}];
|
|
2064
|
-
return this.actionArtifact(t) &&
|
|
2101
|
+
return this.actionArtifact(t) && n.push({
|
|
2065
2102
|
message: t,
|
|
2066
2103
|
partKey: "artifact",
|
|
2067
2104
|
renderAs: "artifact-of-action",
|
|
2068
2105
|
kind: { top: "card", bottom: "card" }
|
|
2069
|
-
}),
|
|
2106
|
+
}), n;
|
|
2070
2107
|
}
|
|
2071
2108
|
return this.artifactOf(t) ? [{
|
|
2072
2109
|
message: t,
|
|
@@ -2097,9 +2134,9 @@ const os = {
|
|
|
2097
2134
|
// user.
|
|
2098
2135
|
cornersFor(t, e) {
|
|
2099
2136
|
var N, F, P;
|
|
2100
|
-
const n = t.items, a = (N = n[e]) == null ? void 0 : N.kind, r = (F = n[e - 1]) == null ? void 0 : F.kind, s = (P = n[e + 1]) == null ? void 0 : P.kind, o = t.role === "user", c = 14, v = 4, C = (q, Y) => q === "card"
|
|
2101
|
-
let
|
|
2102
|
-
return o ? (w && (A = v, C(w, a.top) && (
|
|
2137
|
+
const n = t.items, a = (N = n[e]) == null ? void 0 : N.kind, r = (F = n[e - 1]) == null ? void 0 : F.kind, s = (P = n[e + 1]) == null ? void 0 : P.kind, o = t.role === "user", c = 14, v = 4, C = (q, Y) => q === "card" || q === Y, w = r ? r.bottom : null, S = s ? s.top : null;
|
|
2138
|
+
let $ = c, A = c, D = c, x = c;
|
|
2139
|
+
return o ? (w && (A = v, C(w, a.top) && ($ = v)), S && (D = v, C(S, a.bottom) && (x = v)), !S && a.bottom === "bubble" && (D = v)) : (w && ($ = v, C(w, a.top) && (A = v)), S && (x = v, C(S, a.bottom) && (D = v)), !S && a.bottom === "bubble" && (x = v)), { tl: $, tr: A, br: D, bl: x };
|
|
2103
2140
|
},
|
|
2104
2141
|
// Inline style emitting the four corner CSS variables. Set on
|
|
2105
2142
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -2154,7 +2191,7 @@ const os = {
|
|
|
2154
2191
|
},
|
|
2155
2192
|
systemLabel(t) {
|
|
2156
2193
|
var r, s, o;
|
|
2157
|
-
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n =
|
|
2194
|
+
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = ls[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) || "";
|
|
2158
2195
|
return n.replace("{name}", a || "Un agent");
|
|
2159
2196
|
},
|
|
2160
2197
|
scrollToBottom() {
|
|
@@ -2162,59 +2199,59 @@ const os = {
|
|
|
2162
2199
|
t && (t.scrollTop = t.scrollHeight);
|
|
2163
2200
|
}
|
|
2164
2201
|
}
|
|
2165
|
-
},
|
|
2202
|
+
}, hs = {
|
|
2166
2203
|
key: 0,
|
|
2167
2204
|
class: "wm-list__loadMore",
|
|
2168
2205
|
role: "status",
|
|
2169
2206
|
"aria-live": "polite"
|
|
2170
|
-
},
|
|
2207
|
+
}, ms = {
|
|
2171
2208
|
key: 1,
|
|
2172
2209
|
class: "wm-list__historyEnd"
|
|
2173
|
-
},
|
|
2210
|
+
}, fs = {
|
|
2174
2211
|
key: 2,
|
|
2175
2212
|
class: "wm-list__sep"
|
|
2176
|
-
},
|
|
2213
|
+
}, ps = { class: "wm-list__sep-label" }, _s = {
|
|
2177
2214
|
key: 0,
|
|
2178
2215
|
class: "wm-list__sep wm-list__sep--unread"
|
|
2179
|
-
},
|
|
2216
|
+
}, vs = {
|
|
2180
2217
|
key: 0,
|
|
2181
2218
|
class: "wm-list__sysep"
|
|
2182
|
-
},
|
|
2219
|
+
}, gs = { class: "wm-list__sysep-label" }, ys = {
|
|
2183
2220
|
key: 0,
|
|
2184
2221
|
class: "wm-list__avatarSlot"
|
|
2185
|
-
},
|
|
2186
|
-
key:
|
|
2222
|
+
}, ws = {
|
|
2223
|
+
key: 5,
|
|
2187
2224
|
class: "wm-list__body"
|
|
2188
|
-
},
|
|
2225
|
+
}, bs = { key: 0 }, ks = {
|
|
2189
2226
|
key: 1,
|
|
2190
2227
|
"aria-hidden": "true"
|
|
2191
|
-
},
|
|
2228
|
+
}, Cs = { key: 2 }, As = {
|
|
2192
2229
|
key: 3,
|
|
2193
2230
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
2194
|
-
},
|
|
2195
|
-
function
|
|
2196
|
-
const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"),
|
|
2231
|
+
}, Ss = { class: "wm-list__avatarSlot" };
|
|
2232
|
+
function xs(t, e, n, a, r, s) {
|
|
2233
|
+
const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"), $ = O("Typing");
|
|
2197
2234
|
return l(), d("div", {
|
|
2198
2235
|
ref: "scrollEl",
|
|
2199
2236
|
class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
2200
2237
|
onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
2201
2238
|
}, [
|
|
2202
|
-
n.loadingMore ? (l(), d("div",
|
|
2239
|
+
n.loadingMore ? (l(), d("div", hs, [...e[1] || (e[1] = [
|
|
2203
2240
|
i("span", {
|
|
2204
2241
|
class: "wm-list__loadMore-spinner",
|
|
2205
2242
|
"aria-hidden": "true"
|
|
2206
2243
|
}, null, -1),
|
|
2207
2244
|
i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
|
|
2208
|
-
])])) : s.historyExhausted ? (l(), d("div",
|
|
2209
|
-
n.dateLabel ? (l(), d("div",
|
|
2245
|
+
])])) : s.historyExhausted ? (l(), d("div", ms, "Début de la conversation")) : y("", !0),
|
|
2246
|
+
n.dateLabel ? (l(), d("div", fs, [
|
|
2210
2247
|
e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
|
|
2211
|
-
i("span",
|
|
2248
|
+
i("span", ps, b(n.dateLabel), 1),
|
|
2212
2249
|
e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
|
|
2213
2250
|
])) : y("", !0),
|
|
2214
2251
|
(l(!0), d(M, null, j(s.groups, (A, D) => (l(), d(M, {
|
|
2215
2252
|
key: A.key
|
|
2216
2253
|
}, [
|
|
2217
|
-
A.key === s.unreadGroupKey ? (l(), d("div",
|
|
2254
|
+
A.key === s.unreadGroupKey ? (l(), d("div", _s, [...e[4] || (e[4] = [
|
|
2218
2255
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
|
|
2219
2256
|
i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
|
|
2220
2257
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
|
|
@@ -2222,9 +2259,9 @@ function Ss(t, e, n, a, r, s) {
|
|
|
2222
2259
|
i("div", {
|
|
2223
2260
|
class: E(["wm-list__group", "wm-list__group--" + A.role])
|
|
2224
2261
|
}, [
|
|
2225
|
-
A.role === "system" ? (l(), d("div",
|
|
2262
|
+
A.role === "system" ? (l(), d("div", vs, [
|
|
2226
2263
|
e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
2227
|
-
i("span",
|
|
2264
|
+
i("span", gs, b(A.systemLabel), 1),
|
|
2228
2265
|
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2229
2266
|
])) : (l(), d(M, { key: 1 }, [
|
|
2230
2267
|
(l(!0), d(M, null, j(A.items, (x, N) => (l(), d("div", {
|
|
@@ -2232,13 +2269,13 @@ function Ss(t, e, n, a, r, s) {
|
|
|
2232
2269
|
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
|
|
2233
2270
|
style: V(s.cornersStyle(A, N))
|
|
2234
2271
|
}, [
|
|
2235
|
-
A.role !== "user" ? (l(), d("div",
|
|
2272
|
+
A.role !== "user" ? (l(), d("div", ys, [
|
|
2236
2273
|
N === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
|
|
2237
|
-
A.role === "ai" ? (l(),
|
|
2274
|
+
A.role === "ai" ? (l(), R(o, {
|
|
2238
2275
|
key: 0,
|
|
2239
2276
|
size: 26,
|
|
2240
2277
|
tail: !0
|
|
2241
|
-
})) : (l(),
|
|
2278
|
+
})) : (l(), R(c, {
|
|
2242
2279
|
key: 1,
|
|
2243
2280
|
name: A.agentName,
|
|
2244
2281
|
"avatar-url": A.agentAvatarUrl,
|
|
@@ -2246,19 +2283,24 @@ function Ss(t, e, n, a, r, s) {
|
|
|
2246
2283
|
}, null, 8, ["name", "avatar-url"]))
|
|
2247
2284
|
], 64)) : y("", !0)
|
|
2248
2285
|
])) : y("", !0),
|
|
2249
|
-
x.renderAs === "action" ? (l(),
|
|
2286
|
+
x.renderAs === "action" ? (l(), R(v, {
|
|
2250
2287
|
key: 1,
|
|
2251
2288
|
state: x.message.payload.state,
|
|
2252
2289
|
label: s.actionLabel(x.message),
|
|
2253
2290
|
detail: s.actionDetail(x.message)
|
|
2254
|
-
}, null, 8, ["state", "label", "detail"])) : x.renderAs === "
|
|
2291
|
+
}, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), R(v, {
|
|
2255
2292
|
key: 2,
|
|
2256
|
-
|
|
2257
|
-
|
|
2293
|
+
state: "awaiting",
|
|
2294
|
+
label: "Demande d'approbation envoyée",
|
|
2295
|
+
detail: x.message.text_md || ""
|
|
2296
|
+
}, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), R(C, {
|
|
2258
2297
|
key: 3,
|
|
2298
|
+
artifact: s.actionArtifact(x.message)
|
|
2299
|
+
}, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), R(C, {
|
|
2300
|
+
key: 4,
|
|
2259
2301
|
artifact: s.artifactOf(x.message)
|
|
2260
|
-
}, null, 8, ["artifact"])) : (l(), d("div",
|
|
2261
|
-
x.message.text_md ? (l(),
|
|
2302
|
+
}, null, 8, ["artifact"])) : (l(), d("div", ws, [
|
|
2303
|
+
x.message.text_md ? (l(), R(w, {
|
|
2262
2304
|
key: 0,
|
|
2263
2305
|
role: A.role,
|
|
2264
2306
|
text: x.message.text_md
|
|
@@ -2267,7 +2309,7 @@ function Ss(t, e, n, a, r, s) {
|
|
|
2267
2309
|
key: 1,
|
|
2268
2310
|
class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2269
2311
|
}, [
|
|
2270
|
-
(l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, P) => (l(),
|
|
2312
|
+
(l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, P) => (l(), R(S, {
|
|
2271
2313
|
key: `${s.messageKey(x.message)}-att-${P}`,
|
|
2272
2314
|
attachment: F
|
|
2273
2315
|
}, null, 8, ["attachment"]))), 128))
|
|
@@ -2278,26 +2320,26 @@ function Ss(t, e, n, a, r, s) {
|
|
|
2278
2320
|
key: 0,
|
|
2279
2321
|
class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2280
2322
|
}, [
|
|
2281
|
-
A.role !== "user" ? (l(), d("span",
|
|
2282
|
-
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span",
|
|
2283
|
-
s.lastTimeOf(A) ? (l(), d("span",
|
|
2323
|
+
A.role !== "user" ? (l(), d("span", bs, b(s.roleLabel(A)), 1)) : y("", !0),
|
|
2324
|
+
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", ks, "·")) : y("", !0),
|
|
2325
|
+
s.lastTimeOf(A) ? (l(), d("span", Cs, b(s.lastTimeOf(A)), 1)) : y("", !0)
|
|
2284
2326
|
], 2)) : y("", !0)
|
|
2285
2327
|
], 64))
|
|
2286
2328
|
], 2)
|
|
2287
2329
|
], 64))), 128)),
|
|
2288
|
-
n.streamingActive ? (l(), d("div",
|
|
2289
|
-
i("div",
|
|
2330
|
+
n.streamingActive ? (l(), d("div", As, [
|
|
2331
|
+
i("div", Ss, [
|
|
2290
2332
|
z(o, {
|
|
2291
2333
|
size: 26,
|
|
2292
2334
|
tail: !0
|
|
2293
2335
|
})
|
|
2294
2336
|
]),
|
|
2295
|
-
z(
|
|
2337
|
+
z($)
|
|
2296
2338
|
])) : y("", !0)
|
|
2297
2339
|
], 34);
|
|
2298
2340
|
}
|
|
2299
|
-
const
|
|
2300
|
-
function
|
|
2341
|
+
const Ms = /* @__PURE__ */ B(us, [["render", xs], ["__scopeId", "data-v-87ebab08"]]), se = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2342
|
+
function Ts() {
|
|
2301
2343
|
return he && [
|
|
2302
2344
|
"video/webm;codecs=vp9,opus",
|
|
2303
2345
|
"video/webm;codecs=vp8,opus",
|
|
@@ -2317,11 +2359,11 @@ function Ce({ audio: t }) {
|
|
|
2317
2359
|
systemAudio: t ? "include" : "exclude"
|
|
2318
2360
|
};
|
|
2319
2361
|
}
|
|
2320
|
-
function
|
|
2362
|
+
function Ni(t) {
|
|
2321
2363
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2322
2364
|
}
|
|
2323
|
-
async function
|
|
2324
|
-
if (!
|
|
2365
|
+
async function Is() {
|
|
2366
|
+
if (!se) return null;
|
|
2325
2367
|
let t;
|
|
2326
2368
|
try {
|
|
2327
2369
|
t = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !1 }));
|
|
@@ -2329,7 +2371,7 @@ async function Ts() {
|
|
|
2329
2371
|
return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
|
|
2330
2372
|
}
|
|
2331
2373
|
try {
|
|
2332
|
-
return await
|
|
2374
|
+
return await Os(t);
|
|
2333
2375
|
} catch (e) {
|
|
2334
2376
|
return console.error("[media] screenshot capture", e), null;
|
|
2335
2377
|
} finally {
|
|
@@ -2338,7 +2380,7 @@ async function Ts() {
|
|
|
2338
2380
|
});
|
|
2339
2381
|
}
|
|
2340
2382
|
}
|
|
2341
|
-
async function
|
|
2383
|
+
async function Os(t) {
|
|
2342
2384
|
const e = document.createElement("video");
|
|
2343
2385
|
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((c) => requestAnimationFrame(c));
|
|
2344
2386
|
const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -2348,16 +2390,16 @@ async function Is(t) {
|
|
|
2348
2390
|
}), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
2349
2391
|
return new File([s], `capture-${o}.png`, { type: "image/png" });
|
|
2350
2392
|
}
|
|
2351
|
-
async function
|
|
2393
|
+
async function Es(t = {}) {
|
|
2352
2394
|
var C;
|
|
2353
|
-
if (!
|
|
2395
|
+
if (!se || !he) return null;
|
|
2354
2396
|
let e;
|
|
2355
2397
|
try {
|
|
2356
2398
|
e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
|
|
2357
2399
|
} catch (w) {
|
|
2358
2400
|
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
2359
2401
|
}
|
|
2360
|
-
const n =
|
|
2402
|
+
const n = Ts();
|
|
2361
2403
|
let a;
|
|
2362
2404
|
try {
|
|
2363
2405
|
a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
|
|
@@ -2372,10 +2414,10 @@ async function Os(t = {}) {
|
|
|
2372
2414
|
w.data && w.data.size > 0 && r.push(w.data);
|
|
2373
2415
|
}), a.addEventListener("stop", () => {
|
|
2374
2416
|
var w, S;
|
|
2375
|
-
if (s && clearInterval(s), e.getTracks().forEach((
|
|
2376
|
-
|
|
2417
|
+
if (s && clearInterval(s), e.getTracks().forEach(($) => {
|
|
2418
|
+
$.stop();
|
|
2377
2419
|
}), r.length) {
|
|
2378
|
-
const
|
|
2420
|
+
const $ = a.mimeType || n || "video/webm", A = new Blob(r, { type: $ }), D = /mp4/.test($) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${x}.${D}`, { type: $ });
|
|
2379
2421
|
(w = t.onfinalize) == null || w.call(t, N);
|
|
2380
2422
|
} else
|
|
2381
2423
|
(S = t.oncancel) == null || S.call(t);
|
|
@@ -2409,7 +2451,7 @@ async function Os(t = {}) {
|
|
|
2409
2451
|
}
|
|
2410
2452
|
};
|
|
2411
2453
|
}
|
|
2412
|
-
const
|
|
2454
|
+
const Bs = [
|
|
2413
2455
|
{
|
|
2414
2456
|
action: "file",
|
|
2415
2457
|
label: "Joindre un fichier",
|
|
@@ -2425,7 +2467,7 @@ const Es = [
|
|
|
2425
2467
|
label: "Enregistrer l'écran",
|
|
2426
2468
|
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"
|
|
2427
2469
|
}
|
|
2428
|
-
],
|
|
2470
|
+
], Ls = {
|
|
2429
2471
|
name: "WmComposer",
|
|
2430
2472
|
props: {
|
|
2431
2473
|
modelValue: { type: String, default: "" },
|
|
@@ -2448,9 +2490,9 @@ const Es = [
|
|
|
2448
2490
|
return !this.disabled && !!this.local.trim();
|
|
2449
2491
|
},
|
|
2450
2492
|
attachItems() {
|
|
2451
|
-
return
|
|
2493
|
+
return Bs.map((t) => ({
|
|
2452
2494
|
...t,
|
|
2453
|
-
disabled: t.action === "screenshot" && !
|
|
2495
|
+
disabled: t.action === "screenshot" && !se || t.action === "record" && (!se || !he)
|
|
2454
2496
|
}));
|
|
2455
2497
|
},
|
|
2456
2498
|
recordingElapsedLabel() {
|
|
@@ -2520,13 +2562,13 @@ const Es = [
|
|
|
2520
2562
|
},
|
|
2521
2563
|
async captureScreenshot() {
|
|
2522
2564
|
if (this.disabled) return;
|
|
2523
|
-
const t = await
|
|
2565
|
+
const t = await Is();
|
|
2524
2566
|
t && this.$emit("attach", t);
|
|
2525
2567
|
},
|
|
2526
2568
|
async startRecording() {
|
|
2527
2569
|
if (this.recording || this.disabled) return;
|
|
2528
2570
|
this.recordingElapsed = 0;
|
|
2529
|
-
const t = await
|
|
2571
|
+
const t = await Es({
|
|
2530
2572
|
onstart: () => {
|
|
2531
2573
|
this.recording = !0;
|
|
2532
2574
|
},
|
|
@@ -2551,27 +2593,27 @@ const Es = [
|
|
|
2551
2593
|
}
|
|
2552
2594
|
}
|
|
2553
2595
|
}
|
|
2554
|
-
},
|
|
2596
|
+
}, Rs = { class: "wm-compose-wrap" }, $s = {
|
|
2555
2597
|
key: 0,
|
|
2556
2598
|
class: "wm-rec"
|
|
2557
|
-
},
|
|
2599
|
+
}, Fs = { class: "wm-rec__lbl" }, js = {
|
|
2558
2600
|
key: 1,
|
|
2559
2601
|
class: "wm-compose__menu",
|
|
2560
2602
|
role: "menu"
|
|
2561
|
-
},
|
|
2603
|
+
}, Us = ["disabled", "onClick"], Ds = { class: "wm-compose__menuIcon" }, Ns = {
|
|
2562
2604
|
viewBox: "0 0 24 24",
|
|
2563
2605
|
width: "14",
|
|
2564
2606
|
height: "14",
|
|
2565
2607
|
"aria-hidden": "true"
|
|
2566
|
-
},
|
|
2567
|
-
function
|
|
2568
|
-
return l(), d("div",
|
|
2569
|
-
r.recording ? (l(), d("div",
|
|
2608
|
+
}, Ps = ["d"], Hs = ["placeholder", "disabled"], zs = { class: "wm-compose__actions" }, Vs = ["title", "aria-label", "disabled"], qs = ["disabled"];
|
|
2609
|
+
function Ws(t, e, n, a, r, s) {
|
|
2610
|
+
return l(), d("div", Rs, [
|
|
2611
|
+
r.recording ? (l(), d("div", $s, [
|
|
2570
2612
|
e[8] || (e[8] = i("span", {
|
|
2571
2613
|
class: "wm-rec__dot",
|
|
2572
2614
|
"aria-hidden": "true"
|
|
2573
2615
|
}, null, -1)),
|
|
2574
|
-
i("span",
|
|
2616
|
+
i("span", Fs, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
|
|
2575
2617
|
i("button", {
|
|
2576
2618
|
type: "button",
|
|
2577
2619
|
class: "wm-rec__stop",
|
|
@@ -2594,7 +2636,7 @@ function qs(t, e, n, a, r, s) {
|
|
|
2594
2636
|
class: "wm-compose__overlay",
|
|
2595
2637
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2596
2638
|
})) : y("", !0),
|
|
2597
|
-
r.attachOpen ? (l(), d("div",
|
|
2639
|
+
r.attachOpen ? (l(), d("div", js, [
|
|
2598
2640
|
(l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
|
|
2599
2641
|
key: o.action,
|
|
2600
2642
|
type: "button",
|
|
@@ -2602,8 +2644,8 @@ function qs(t, e, n, a, r, s) {
|
|
|
2602
2644
|
disabled: o.disabled,
|
|
2603
2645
|
onClick: (c) => s.onAttachAction(o.action)
|
|
2604
2646
|
}, [
|
|
2605
|
-
i("span",
|
|
2606
|
-
(l(), d("svg",
|
|
2647
|
+
i("span", Ds, [
|
|
2648
|
+
(l(), d("svg", Ns, [
|
|
2607
2649
|
i("path", {
|
|
2608
2650
|
d: o.path,
|
|
2609
2651
|
stroke: "currentColor",
|
|
@@ -2611,11 +2653,11 @@ function qs(t, e, n, a, r, s) {
|
|
|
2611
2653
|
"stroke-linecap": "round",
|
|
2612
2654
|
"stroke-linejoin": "round",
|
|
2613
2655
|
fill: "none"
|
|
2614
|
-
}, null, 8,
|
|
2656
|
+
}, null, 8, Ps)
|
|
2615
2657
|
]))
|
|
2616
2658
|
]),
|
|
2617
2659
|
i("span", null, b(o.label), 1)
|
|
2618
|
-
], 8,
|
|
2660
|
+
], 8, Us))), 128))
|
|
2619
2661
|
])) : y("", !0),
|
|
2620
2662
|
H(i("textarea", {
|
|
2621
2663
|
ref: "inputEl",
|
|
@@ -2626,10 +2668,10 @@ function qs(t, e, n, a, r, s) {
|
|
|
2626
2668
|
disabled: n.disabled,
|
|
2627
2669
|
onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
2628
2670
|
onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
|
|
2629
|
-
}, null, 40,
|
|
2671
|
+
}, null, 40, Hs), [
|
|
2630
2672
|
[K, r.local]
|
|
2631
2673
|
]),
|
|
2632
|
-
i("div",
|
|
2674
|
+
i("div", zs, [
|
|
2633
2675
|
i("button", {
|
|
2634
2676
|
type: "button",
|
|
2635
2677
|
class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -2651,7 +2693,7 @@ function qs(t, e, n, a, r, s) {
|
|
|
2651
2693
|
}, [
|
|
2652
2694
|
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" })
|
|
2653
2695
|
], -1)
|
|
2654
|
-
])], 10,
|
|
2696
|
+
])], 10, Vs),
|
|
2655
2697
|
i("button", {
|
|
2656
2698
|
type: "submit",
|
|
2657
2699
|
class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -2671,12 +2713,12 @@ function qs(t, e, n, a, r, s) {
|
|
|
2671
2713
|
}, [
|
|
2672
2714
|
i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
2673
2715
|
], -1)
|
|
2674
|
-
])], 10,
|
|
2716
|
+
])], 10, qs)
|
|
2675
2717
|
])
|
|
2676
2718
|
], 34)
|
|
2677
2719
|
]);
|
|
2678
2720
|
}
|
|
2679
|
-
const
|
|
2721
|
+
const Gs = /* @__PURE__ */ B(Ls, [["render", Ws], ["__scopeId", "data-v-14fa9ec0"]]), Ks = {
|
|
2680
2722
|
name: "WmSuggestionChips",
|
|
2681
2723
|
props: {
|
|
2682
2724
|
items: { type: Array, default: () => [] },
|
|
@@ -2693,8 +2735,8 @@ const Ws = /* @__PURE__ */ B(Bs, [["render", qs], ["__scopeId", "data-v-14fa9ec0
|
|
|
2693
2735
|
return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
|
|
2694
2736
|
}
|
|
2695
2737
|
}
|
|
2696
|
-
},
|
|
2697
|
-
function
|
|
2738
|
+
}, Ys = ["onClick"];
|
|
2739
|
+
function Js(t, e, n, a, r, s) {
|
|
2698
2740
|
return n.items.length ? (l(), d("div", {
|
|
2699
2741
|
key: s.batchKey,
|
|
2700
2742
|
class: "wm-chips"
|
|
@@ -2705,10 +2747,10 @@ function Ys(t, e, n, a, r, s) {
|
|
|
2705
2747
|
class: "wm-chip",
|
|
2706
2748
|
style: V({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
|
|
2707
2749
|
onClick: (v) => t.$emit("select", o)
|
|
2708
|
-
}, b(o.label), 13,
|
|
2750
|
+
}, b(o.label), 13, Ys))), 128))
|
|
2709
2751
|
])) : y("", !0);
|
|
2710
2752
|
}
|
|
2711
|
-
const
|
|
2753
|
+
const Xs = /* @__PURE__ */ B(Ks, [["render", Js], ["__scopeId", "data-v-55aa529d"]]), Qs = {
|
|
2712
2754
|
name: "WmApprovalCard",
|
|
2713
2755
|
components: { AIAvatar: Q },
|
|
2714
2756
|
props: {
|
|
@@ -2741,23 +2783,23 @@ const Js = /* @__PURE__ */ B(Gs, [["render", Ys], ["__scopeId", "data-v-55aa529d
|
|
|
2741
2783
|
return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
|
|
2742
2784
|
}
|
|
2743
2785
|
}
|
|
2744
|
-
},
|
|
2786
|
+
}, Zs = { class: "wm-approval" }, er = { class: "wm-approval__head" }, tr = { class: "wm-approval__icon" }, nr = { class: "wm-approval__main" }, sr = { class: "wm-approval__title" }, rr = {
|
|
2745
2787
|
key: 0,
|
|
2746
2788
|
class: "wm-approval__detail"
|
|
2747
|
-
},
|
|
2748
|
-
function
|
|
2789
|
+
}, ir = { class: "wm-approval__actions" };
|
|
2790
|
+
function ar(t, e, n, a, r, s) {
|
|
2749
2791
|
const o = O("AIAvatar");
|
|
2750
|
-
return l(), d("div",
|
|
2751
|
-
i("div",
|
|
2752
|
-
i("div",
|
|
2792
|
+
return l(), d("div", Zs, [
|
|
2793
|
+
i("div", er, [
|
|
2794
|
+
i("div", tr, [
|
|
2753
2795
|
z(o, { size: 24 })
|
|
2754
2796
|
]),
|
|
2755
|
-
i("div",
|
|
2756
|
-
i("div",
|
|
2757
|
-
n.detail ? (l(), d("div",
|
|
2797
|
+
i("div", nr, [
|
|
2798
|
+
i("div", sr, b(n.action), 1),
|
|
2799
|
+
n.detail ? (l(), d("div", rr, b(n.detail), 1)) : y("", !0)
|
|
2758
2800
|
])
|
|
2759
2801
|
]),
|
|
2760
|
-
i("div",
|
|
2802
|
+
i("div", ir, [
|
|
2761
2803
|
s.rejectId ? (l(), d("button", {
|
|
2762
2804
|
key: 0,
|
|
2763
2805
|
type: "button",
|
|
@@ -2773,9 +2815,9 @@ function ir(t, e, n, a, r, s) {
|
|
|
2773
2815
|
])
|
|
2774
2816
|
]);
|
|
2775
2817
|
}
|
|
2776
|
-
const
|
|
2818
|
+
const or = /* @__PURE__ */ B(Qs, [["render", ar], ["__scopeId", "data-v-b1be139c"]]);
|
|
2777
2819
|
let ve = 0;
|
|
2778
|
-
const
|
|
2820
|
+
const lr = /* @__PURE__ */ new Set([
|
|
2779
2821
|
"text",
|
|
2780
2822
|
"textarea",
|
|
2781
2823
|
"number",
|
|
@@ -2783,7 +2825,7 @@ const or = /* @__PURE__ */ new Set([
|
|
|
2783
2825
|
"select",
|
|
2784
2826
|
"multiselect",
|
|
2785
2827
|
"date"
|
|
2786
|
-
]),
|
|
2828
|
+
]), cr = {
|
|
2787
2829
|
name: "WmFormCard",
|
|
2788
2830
|
components: { AIAvatar: Q },
|
|
2789
2831
|
props: {
|
|
@@ -2806,7 +2848,7 @@ const or = /* @__PURE__ */ new Set([
|
|
|
2806
2848
|
// douteux.
|
|
2807
2849
|
normalizedFields() {
|
|
2808
2850
|
var e;
|
|
2809
|
-
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
2851
|
+
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !lr.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
2810
2852
|
}
|
|
2811
2853
|
},
|
|
2812
2854
|
created() {
|
|
@@ -2857,43 +2899,43 @@ const or = /* @__PURE__ */ new Set([
|
|
|
2857
2899
|
}
|
|
2858
2900
|
}
|
|
2859
2901
|
}
|
|
2860
|
-
},
|
|
2902
|
+
}, dr = { class: "wm-form" }, ur = { class: "wm-form__head" }, hr = { class: "wm-form__icon" }, mr = { class: "wm-form__main" }, fr = { class: "wm-form__title" }, pr = {
|
|
2861
2903
|
key: 0,
|
|
2862
2904
|
class: "wm-form__detail"
|
|
2863
|
-
},
|
|
2905
|
+
}, _r = ["for"], vr = {
|
|
2864
2906
|
key: 0,
|
|
2865
2907
|
class: "wm-form__req",
|
|
2866
2908
|
"aria-hidden": "true"
|
|
2867
|
-
},
|
|
2909
|
+
}, gr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], yr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], wr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], br = ["id", "onUpdate:modelValue", "required", "disabled"], kr = {
|
|
2868
2910
|
key: 4,
|
|
2869
2911
|
class: "wm-form__bool"
|
|
2870
|
-
},
|
|
2912
|
+
}, Cr = ["id", "onUpdate:modelValue", "disabled"], Ar = ["id", "onUpdate:modelValue", "required", "disabled"], Sr = {
|
|
2871
2913
|
value: "",
|
|
2872
2914
|
disabled: ""
|
|
2873
|
-
},
|
|
2915
|
+
}, xr = ["value"], Mr = {
|
|
2874
2916
|
key: 6,
|
|
2875
2917
|
class: "wm-form__multi"
|
|
2876
|
-
},
|
|
2918
|
+
}, Tr = ["value", "checked", "disabled", "onChange"], Ir = {
|
|
2877
2919
|
key: 0,
|
|
2878
2920
|
class: "wm-form__err"
|
|
2879
|
-
},
|
|
2921
|
+
}, Or = ["disabled"], Er = {
|
|
2880
2922
|
key: 0,
|
|
2881
2923
|
class: "wm-form__spinner",
|
|
2882
2924
|
"aria-hidden": "true"
|
|
2883
|
-
},
|
|
2925
|
+
}, Br = {
|
|
2884
2926
|
key: 2,
|
|
2885
2927
|
class: "wm-form__doneLbl"
|
|
2886
2928
|
};
|
|
2887
|
-
function
|
|
2929
|
+
function Lr(t, e, n, a, r, s) {
|
|
2888
2930
|
const o = O("AIAvatar");
|
|
2889
|
-
return l(), d("div",
|
|
2890
|
-
i("div",
|
|
2891
|
-
i("div",
|
|
2931
|
+
return l(), d("div", dr, [
|
|
2932
|
+
i("div", ur, [
|
|
2933
|
+
i("div", hr, [
|
|
2892
2934
|
z(o, { size: 24 })
|
|
2893
2935
|
]),
|
|
2894
|
-
i("div",
|
|
2895
|
-
i("div",
|
|
2896
|
-
n.form.description ? (l(), d("div",
|
|
2936
|
+
i("div", mr, [
|
|
2937
|
+
i("div", fr, b(n.form.title || "Formulaire"), 1),
|
|
2938
|
+
n.form.description ? (l(), d("div", pr, b(n.form.description), 1)) : y("", !0)
|
|
2897
2939
|
])
|
|
2898
2940
|
]),
|
|
2899
2941
|
i("form", {
|
|
@@ -2908,9 +2950,9 @@ function Br(t, e, n, a, r, s) {
|
|
|
2908
2950
|
for: `wm-f-${r._uid}-${c.key}`,
|
|
2909
2951
|
class: "wm-form__label"
|
|
2910
2952
|
}, [
|
|
2911
|
-
|
|
2912
|
-
c.required ? (l(), d("span",
|
|
2913
|
-
], 8,
|
|
2953
|
+
ie(b(c.label), 1),
|
|
2954
|
+
c.required ? (l(), d("span", vr, "*")) : y("", !0)
|
|
2955
|
+
], 8, _r),
|
|
2914
2956
|
c.type === "text" ? H((l(), d("input", {
|
|
2915
2957
|
key: 0,
|
|
2916
2958
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
@@ -2920,7 +2962,7 @@ function Br(t, e, n, a, r, s) {
|
|
|
2920
2962
|
placeholder: c.placeholder || "",
|
|
2921
2963
|
required: c.required,
|
|
2922
2964
|
disabled: n.readOnly || r.busy
|
|
2923
|
-
}, null, 8,
|
|
2965
|
+
}, null, 8, gr)), [
|
|
2924
2966
|
[K, r.values[c.key]]
|
|
2925
2967
|
]) : c.type === "textarea" ? H((l(), d("textarea", {
|
|
2926
2968
|
key: 1,
|
|
@@ -2931,7 +2973,7 @@ function Br(t, e, n, a, r, s) {
|
|
|
2931
2973
|
placeholder: c.placeholder || "",
|
|
2932
2974
|
required: c.required,
|
|
2933
2975
|
disabled: n.readOnly || r.busy
|
|
2934
|
-
}, null, 8,
|
|
2976
|
+
}, null, 8, yr)), [
|
|
2935
2977
|
[K, r.values[c.key]]
|
|
2936
2978
|
]) : c.type === "number" ? H((l(), d("input", {
|
|
2937
2979
|
key: 2,
|
|
@@ -2942,7 +2984,7 @@ function Br(t, e, n, a, r, s) {
|
|
|
2942
2984
|
placeholder: c.placeholder || "",
|
|
2943
2985
|
required: c.required,
|
|
2944
2986
|
disabled: n.readOnly || r.busy
|
|
2945
|
-
}, null, 8,
|
|
2987
|
+
}, null, 8, wr)), [
|
|
2946
2988
|
[
|
|
2947
2989
|
K,
|
|
2948
2990
|
r.values[c.key],
|
|
@@ -2957,15 +2999,15 @@ function Br(t, e, n, a, r, s) {
|
|
|
2957
2999
|
class: "wm-form__input",
|
|
2958
3000
|
required: c.required,
|
|
2959
3001
|
disabled: n.readOnly || r.busy
|
|
2960
|
-
}, null, 8,
|
|
3002
|
+
}, null, 8, br)), [
|
|
2961
3003
|
[K, r.values[c.key]]
|
|
2962
|
-
]) : c.type === "boolean" ? (l(), d("label",
|
|
3004
|
+
]) : c.type === "boolean" ? (l(), d("label", kr, [
|
|
2963
3005
|
H(i("input", {
|
|
2964
3006
|
id: `wm-f-${r._uid}-${c.key}`,
|
|
2965
3007
|
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2966
3008
|
type: "checkbox",
|
|
2967
3009
|
disabled: n.readOnly || r.busy
|
|
2968
|
-
}, null, 8,
|
|
3010
|
+
}, null, 8, Cr), [
|
|
2969
3011
|
[Ie, r.values[c.key]]
|
|
2970
3012
|
]),
|
|
2971
3013
|
i("span", null, b(c.placeholder || "Oui"), 1)
|
|
@@ -2977,14 +3019,14 @@ function Br(t, e, n, a, r, s) {
|
|
|
2977
3019
|
required: c.required,
|
|
2978
3020
|
disabled: n.readOnly || r.busy
|
|
2979
3021
|
}, [
|
|
2980
|
-
i("option",
|
|
3022
|
+
i("option", Sr, b(c.placeholder || "Choisir…"), 1),
|
|
2981
3023
|
(l(!0), d(M, null, j(c.options, (v) => (l(), d("option", {
|
|
2982
3024
|
key: v.value,
|
|
2983
3025
|
value: v.value
|
|
2984
|
-
}, b(v.label), 9,
|
|
2985
|
-
], 8,
|
|
3026
|
+
}, b(v.label), 9, xr))), 128))
|
|
3027
|
+
], 8, Ar)), [
|
|
2986
3028
|
[Oe, r.values[c.key]]
|
|
2987
|
-
]) : c.type === "multiselect" ? (l(), d("div",
|
|
3029
|
+
]) : c.type === "multiselect" ? (l(), d("div", Mr, [
|
|
2988
3030
|
(l(!0), d(M, null, j(c.options, (v) => (l(), d("label", {
|
|
2989
3031
|
key: v.value,
|
|
2990
3032
|
class: "wm-form__multiItem"
|
|
@@ -2995,25 +3037,25 @@ function Br(t, e, n, a, r, s) {
|
|
|
2995
3037
|
checked: Array.isArray(r.values[c.key]) && r.values[c.key].includes(v.value),
|
|
2996
3038
|
disabled: n.readOnly || r.busy,
|
|
2997
3039
|
onChange: (C) => s.toggleMulti(c.key, v.value, C.target.checked)
|
|
2998
|
-
}, null, 40,
|
|
3040
|
+
}, null, 40, Tr),
|
|
2999
3041
|
i("span", null, b(v.label), 1)
|
|
3000
3042
|
]))), 128))
|
|
3001
3043
|
])) : y("", !0)
|
|
3002
3044
|
]))), 128)),
|
|
3003
|
-
r.error ? (l(), d("div",
|
|
3004
|
-
n.readOnly ? (l(), d("div",
|
|
3045
|
+
r.error ? (l(), d("div", Ir, b(r.error), 1)) : y("", !0),
|
|
3046
|
+
n.readOnly ? (l(), d("div", Br, "Réponse envoyée")) : (l(), d("button", {
|
|
3005
3047
|
key: 1,
|
|
3006
3048
|
type: "submit",
|
|
3007
3049
|
class: "wm-form__submit",
|
|
3008
3050
|
disabled: r.busy
|
|
3009
3051
|
}, [
|
|
3010
|
-
r.busy ? (l(), d("span",
|
|
3052
|
+
r.busy ? (l(), d("span", Er)) : y("", !0),
|
|
3011
3053
|
i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
|
|
3012
|
-
], 8,
|
|
3054
|
+
], 8, Or))
|
|
3013
3055
|
], 32)
|
|
3014
3056
|
]);
|
|
3015
3057
|
}
|
|
3016
|
-
const
|
|
3058
|
+
const Rr = /* @__PURE__ */ B(cr, [["render", Lr], ["__scopeId", "data-v-64b40f76"]]), $r = {
|
|
3017
3059
|
name: "WmFeedback",
|
|
3018
3060
|
props: {
|
|
3019
3061
|
busy: { type: Boolean, default: !1 },
|
|
@@ -3037,43 +3079,43 @@ const Lr = /* @__PURE__ */ B(lr, [["render", Br], ["__scopeId", "data-v-64b40f76
|
|
|
3037
3079
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
3038
3080
|
}
|
|
3039
3081
|
}
|
|
3040
|
-
},
|
|
3082
|
+
}, Fr = { class: "wm-fb" }, jr = { class: "wm-fb__row" }, Ur = ["onClick"], Dr = { class: "wm-fb__emoji" }, Nr = { class: "wm-fb__label" }, Pr = ["disabled"], Hr = {
|
|
3041
3083
|
key: 1,
|
|
3042
3084
|
class: "wm-fb__done"
|
|
3043
3085
|
};
|
|
3044
|
-
function
|
|
3045
|
-
return l(), d("div",
|
|
3046
|
-
n.done ? (l(), d("div",
|
|
3086
|
+
function zr(t, e, n, a, r, s) {
|
|
3087
|
+
return l(), d("div", Fr, [
|
|
3088
|
+
n.done ? (l(), d("div", Hr, [...e[3] || (e[3] = [
|
|
3047
3089
|
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)
|
|
3048
3090
|
])])) : (l(), d(M, { key: 0 }, [
|
|
3049
3091
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
3050
3092
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
3051
|
-
i("div",
|
|
3093
|
+
i("div", jr, [
|
|
3052
3094
|
(l(!0), d(M, null, j(r.options, (o) => (l(), d("button", {
|
|
3053
3095
|
key: o.v,
|
|
3054
3096
|
type: "button",
|
|
3055
3097
|
class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
3056
3098
|
onClick: (c) => r.sel = o.v
|
|
3057
3099
|
}, [
|
|
3058
|
-
i("span",
|
|
3059
|
-
i("span",
|
|
3060
|
-
], 10,
|
|
3100
|
+
i("span", Dr, b(o.e), 1),
|
|
3101
|
+
i("span", Nr, b(o.l), 1)
|
|
3102
|
+
], 10, Ur))), 128))
|
|
3061
3103
|
]),
|
|
3062
3104
|
i("button", {
|
|
3063
3105
|
type: "button",
|
|
3064
3106
|
class: "wm-fb__send",
|
|
3065
3107
|
disabled: !r.sel || n.busy,
|
|
3066
3108
|
onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
|
|
3067
|
-
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9,
|
|
3109
|
+
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Pr)
|
|
3068
3110
|
], 64))
|
|
3069
3111
|
]);
|
|
3070
3112
|
}
|
|
3071
|
-
const
|
|
3072
|
-
function
|
|
3113
|
+
const Vr = /* @__PURE__ */ B($r, [["render", zr], ["__scopeId", "data-v-6f45ff3b"]]);
|
|
3114
|
+
function qr(t) {
|
|
3073
3115
|
const e = new Date(t);
|
|
3074
3116
|
return e.setHours(0, 0, 0, 0), e;
|
|
3075
3117
|
}
|
|
3076
|
-
const
|
|
3118
|
+
const Wr = {
|
|
3077
3119
|
name: "WmHistoryDrawer",
|
|
3078
3120
|
props: {
|
|
3079
3121
|
conversations: { type: Array, default: () => [] },
|
|
@@ -3107,7 +3149,7 @@ const qr = {
|
|
|
3107
3149
|
) : this.normalized;
|
|
3108
3150
|
},
|
|
3109
3151
|
groups() {
|
|
3110
|
-
const e =
|
|
3152
|
+
const e = qr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
|
|
3111
3153
|
for (const o of this.filtered) {
|
|
3112
3154
|
if (!o.stamp) {
|
|
3113
3155
|
s.push(o);
|
|
@@ -3125,29 +3167,29 @@ const qr = {
|
|
|
3125
3167
|
return this.filtered.length > 0;
|
|
3126
3168
|
}
|
|
3127
3169
|
}
|
|
3128
|
-
},
|
|
3170
|
+
}, Gr = { class: "wm-hd" }, Kr = {
|
|
3129
3171
|
class: "wm-hd__panel",
|
|
3130
3172
|
role: "dialog",
|
|
3131
3173
|
"aria-label": "Vos discussions"
|
|
3132
|
-
},
|
|
3174
|
+
}, Yr = { class: "wm-hd__head" }, Jr = { class: "wm-hd__top" }, Xr = { class: "wm-hd__search" }, Qr = { class: "wm-hd__list" }, Zr = {
|
|
3133
3175
|
key: 0,
|
|
3134
3176
|
class: "wm-hd__group"
|
|
3135
|
-
},
|
|
3177
|
+
}, ei = { class: "wm-hd__groupLabel" }, ti = { class: "wm-hd__rows" }, ni = ["onClick"], si = { class: "wm-hd__rowIcon" }, ri = {
|
|
3136
3178
|
key: 0,
|
|
3137
3179
|
class: "wm-hd__rowDot",
|
|
3138
3180
|
"aria-label": "Message non lu"
|
|
3139
|
-
},
|
|
3181
|
+
}, ii = { class: "wm-hd__rowBody" }, ai = { class: "wm-hd__rowTop" }, oi = { class: "wm-hd__rowTitle" }, li = { class: "wm-hd__rowPreview" }, ci = {
|
|
3140
3182
|
key: 0,
|
|
3141
3183
|
class: "wm-hd__empty"
|
|
3142
3184
|
};
|
|
3143
|
-
function
|
|
3144
|
-
return l(), d("div",
|
|
3185
|
+
function di(t, e, n, a, r, s) {
|
|
3186
|
+
return l(), d("div", Gr, [
|
|
3145
3187
|
i("div", {
|
|
3146
3188
|
class: "wm-hd__scrim",
|
|
3147
3189
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3148
3190
|
}),
|
|
3149
|
-
i("aside",
|
|
3150
|
-
i("div",
|
|
3191
|
+
i("aside", Kr, [
|
|
3192
|
+
i("div", Yr, [
|
|
3151
3193
|
e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
|
|
3152
3194
|
i("div", { class: "wm-hd__title" }, "Vos discussions"),
|
|
3153
3195
|
i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
|
|
@@ -3173,7 +3215,7 @@ function ci(t, e, n, a, r, s) {
|
|
|
3173
3215
|
], -1)
|
|
3174
3216
|
])])
|
|
3175
3217
|
]),
|
|
3176
|
-
i("div",
|
|
3218
|
+
i("div", Jr, [
|
|
3177
3219
|
i("button", {
|
|
3178
3220
|
type: "button",
|
|
3179
3221
|
class: "wm-hd__new",
|
|
@@ -3196,7 +3238,7 @@ function ci(t, e, n, a, r, s) {
|
|
|
3196
3238
|
], -1),
|
|
3197
3239
|
i("span", null, "Démarrer un nouveau fil", -1)
|
|
3198
3240
|
])]),
|
|
3199
|
-
i("div",
|
|
3241
|
+
i("div", Xr, [
|
|
3200
3242
|
e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
|
|
3201
3243
|
i("svg", {
|
|
3202
3244
|
width: "12",
|
|
@@ -3222,13 +3264,13 @@ function ci(t, e, n, a, r, s) {
|
|
|
3222
3264
|
])
|
|
3223
3265
|
])
|
|
3224
3266
|
]),
|
|
3225
|
-
i("div",
|
|
3267
|
+
i("div", Qr, [
|
|
3226
3268
|
(l(!0), d(M, null, j(s.groups, (o) => (l(), d(M, {
|
|
3227
3269
|
key: o.key
|
|
3228
3270
|
}, [
|
|
3229
|
-
o.items.length ? (l(), d("div",
|
|
3230
|
-
i("div",
|
|
3231
|
-
i("div",
|
|
3271
|
+
o.items.length ? (l(), d("div", Zr, [
|
|
3272
|
+
i("div", ei, b(o.label), 1),
|
|
3273
|
+
i("div", ti, [
|
|
3232
3274
|
(l(!0), d(M, null, j(o.items, (c) => (l(), d("button", {
|
|
3233
3275
|
key: c.id,
|
|
3234
3276
|
type: "button",
|
|
@@ -3238,7 +3280,7 @@ function ci(t, e, n, a, r, s) {
|
|
|
3238
3280
|
}]),
|
|
3239
3281
|
onClick: (v) => t.$emit("pick", c)
|
|
3240
3282
|
}, [
|
|
3241
|
-
i("div",
|
|
3283
|
+
i("div", si, [
|
|
3242
3284
|
e[8] || (e[8] = i("svg", {
|
|
3243
3285
|
width: "11",
|
|
3244
3286
|
height: "11",
|
|
@@ -3252,24 +3294,24 @@ function ci(t, e, n, a, r, s) {
|
|
|
3252
3294
|
opacity: "0.92"
|
|
3253
3295
|
})
|
|
3254
3296
|
], -1)),
|
|
3255
|
-
c.unread ? (l(), d("span",
|
|
3297
|
+
c.unread ? (l(), d("span", ri)) : y("", !0)
|
|
3256
3298
|
]),
|
|
3257
|
-
i("div",
|
|
3258
|
-
i("div",
|
|
3259
|
-
i("span",
|
|
3299
|
+
i("div", ii, [
|
|
3300
|
+
i("div", ai, [
|
|
3301
|
+
i("span", oi, b(c.title), 1)
|
|
3260
3302
|
]),
|
|
3261
|
-
i("div",
|
|
3303
|
+
i("div", li, b(c.preview || "Aucun message"), 1)
|
|
3262
3304
|
])
|
|
3263
|
-
], 10,
|
|
3305
|
+
], 10, ni))), 128))
|
|
3264
3306
|
])
|
|
3265
3307
|
])) : y("", !0)
|
|
3266
3308
|
], 64))), 128)),
|
|
3267
|
-
s.hasAny ? y("", !0) : (l(), d("div",
|
|
3309
|
+
s.hasAny ? y("", !0) : (l(), d("div", ci, " Aucun fil pour le moment. "))
|
|
3268
3310
|
])
|
|
3269
3311
|
])
|
|
3270
3312
|
]);
|
|
3271
3313
|
}
|
|
3272
|
-
const
|
|
3314
|
+
const ui = /* @__PURE__ */ B(Wr, [["render", di], ["__scopeId", "data-v-1259e822"]]), hi = {
|
|
3273
3315
|
name: "WmMoreMenu",
|
|
3274
3316
|
props: {
|
|
3275
3317
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -3296,18 +3338,18 @@ const di = /* @__PURE__ */ B(qr, [["render", ci], ["__scopeId", "data-v-1259e822
|
|
|
3296
3338
|
this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
|
|
3297
3339
|
}
|
|
3298
3340
|
}
|
|
3299
|
-
},
|
|
3341
|
+
}, mi = { class: "wm-mm" }, fi = {
|
|
3300
3342
|
class: "wm-mm__pop",
|
|
3301
3343
|
role: "menu"
|
|
3302
|
-
},
|
|
3303
|
-
function
|
|
3304
|
-
return l(), d("div",
|
|
3344
|
+
}, pi = { class: "wm-mm__section" }, _i = { class: "wm-mm__section" }, vi = { class: "wm-mm__section" };
|
|
3345
|
+
function gi(t, e, n, a, r, s) {
|
|
3346
|
+
return l(), d("div", mi, [
|
|
3305
3347
|
i("div", {
|
|
3306
3348
|
class: "wm-mm__scrim",
|
|
3307
3349
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3308
3350
|
}),
|
|
3309
|
-
i("div",
|
|
3310
|
-
i("div",
|
|
3351
|
+
i("div", fi, [
|
|
3352
|
+
i("div", pi, [
|
|
3311
3353
|
i("button", {
|
|
3312
3354
|
type: "button",
|
|
3313
3355
|
class: "wm-mm__item",
|
|
@@ -3371,7 +3413,7 @@ function vi(t, e, n, a, r, s) {
|
|
|
3371
3413
|
])])) : y("", !0)
|
|
3372
3414
|
]),
|
|
3373
3415
|
e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3374
|
-
i("div",
|
|
3416
|
+
i("div", _i, [
|
|
3375
3417
|
i("button", {
|
|
3376
3418
|
type: "button",
|
|
3377
3419
|
class: "wm-mm__item",
|
|
@@ -3401,7 +3443,7 @@ function vi(t, e, n, a, r, s) {
|
|
|
3401
3443
|
])
|
|
3402
3444
|
]),
|
|
3403
3445
|
e[18] || (e[18] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3404
|
-
i("div",
|
|
3446
|
+
i("div", vi, [
|
|
3405
3447
|
n.statusUrl ? (l(), d("button", {
|
|
3406
3448
|
key: 0,
|
|
3407
3449
|
type: "button",
|
|
@@ -3452,13 +3494,13 @@ function vi(t, e, n, a, r, s) {
|
|
|
3452
3494
|
])
|
|
3453
3495
|
]);
|
|
3454
3496
|
}
|
|
3455
|
-
const
|
|
3497
|
+
const yi = /* @__PURE__ */ B(hi, [["render", gi], ["__scopeId", "data-v-c1bb81d2"]]), ge = "ww-messenger-tokens";
|
|
3456
3498
|
function de(t) {
|
|
3457
3499
|
var n;
|
|
3458
3500
|
const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
|
|
3459
3501
|
return e === "agent_ia" || e === "agent_human";
|
|
3460
3502
|
}
|
|
3461
|
-
function
|
|
3503
|
+
function wi(t, e) {
|
|
3462
3504
|
if (!t || !e) return "";
|
|
3463
3505
|
const n = Array.isArray(t.fields) ? t.fields : [], a = [];
|
|
3464
3506
|
for (const r of n) {
|
|
@@ -3467,8 +3509,8 @@ function yi(t, e) {
|
|
|
3467
3509
|
if (s == null || s === "") continue;
|
|
3468
3510
|
let o;
|
|
3469
3511
|
if (Array.isArray(s)) {
|
|
3470
|
-
if (o = s.map((c) =>
|
|
3471
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3512
|
+
if (o = s.map((c) => re(r, String(c))).join(", "), !o) continue;
|
|
3513
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = re(r, String(s));
|
|
3472
3514
|
a.push(`${r.label} :
|
|
3473
3515
|
${o}`);
|
|
3474
3516
|
}
|
|
@@ -3476,12 +3518,12 @@ ${o}`);
|
|
|
3476
3518
|
|
|
3477
3519
|
`);
|
|
3478
3520
|
}
|
|
3479
|
-
function
|
|
3521
|
+
function re(t, e) {
|
|
3480
3522
|
if (!Array.isArray(t == null ? void 0 : t.options)) return e;
|
|
3481
3523
|
const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
|
|
3482
3524
|
return (n == null ? void 0 : n.label) || e;
|
|
3483
3525
|
}
|
|
3484
|
-
function
|
|
3526
|
+
function bi(t, e) {
|
|
3485
3527
|
const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
|
|
3486
3528
|
for (const r of a) {
|
|
3487
3529
|
if (!(r != null && r.key) || !(r != null && r.label)) continue;
|
|
@@ -3489,8 +3531,8 @@ function wi(t, e) {
|
|
|
3489
3531
|
if (s == null || s === "") continue;
|
|
3490
3532
|
let o;
|
|
3491
3533
|
if (Array.isArray(s)) {
|
|
3492
|
-
if (o = s.map((v) =>
|
|
3493
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3534
|
+
if (o = s.map((v) => re(r, String(v))).join(", "), !o) continue;
|
|
3535
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = re(r, String(s));
|
|
3494
3536
|
const c = r.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
|
|
3495
3537
|
`));
|
|
3496
3538
|
n.push({ label: r.label, value: o, multiline: c });
|
|
@@ -3503,20 +3545,20 @@ function wi(t, e) {
|
|
|
3503
3545
|
}
|
|
3504
3546
|
};
|
|
3505
3547
|
}
|
|
3506
|
-
const
|
|
3548
|
+
const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
|
|
3507
3549
|
name: "Messenger",
|
|
3508
3550
|
components: {
|
|
3509
3551
|
Launcher: Ge,
|
|
3510
3552
|
Header: yt,
|
|
3511
3553
|
Onboarding: Pt,
|
|
3512
|
-
MessageList:
|
|
3513
|
-
Composer:
|
|
3514
|
-
SuggestionChips:
|
|
3515
|
-
ApprovalCard:
|
|
3516
|
-
FormCard:
|
|
3517
|
-
Feedback:
|
|
3518
|
-
HistoryDrawer:
|
|
3519
|
-
MoreMenu:
|
|
3554
|
+
MessageList: Ms,
|
|
3555
|
+
Composer: Gs,
|
|
3556
|
+
SuggestionChips: Xs,
|
|
3557
|
+
ApprovalCard: or,
|
|
3558
|
+
FormCard: Rr,
|
|
3559
|
+
Feedback: Vr,
|
|
3560
|
+
HistoryDrawer: ui,
|
|
3561
|
+
MoreMenu: yi
|
|
3520
3562
|
},
|
|
3521
3563
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
3522
3564
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -4192,11 +4234,11 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
|
|
|
4192
4234
|
// bounded by MIN/MAX_BETWEEN_MS.
|
|
4193
4235
|
scheduleReveal(t) {
|
|
4194
4236
|
const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
|
|
4195
|
-
|
|
4196
|
-
Math.max(
|
|
4237
|
+
Si,
|
|
4238
|
+
Math.max(Ai, n * Ci)
|
|
4197
4239
|
), s = Math.max(
|
|
4198
|
-
e +
|
|
4199
|
-
this.nextRevealAt +
|
|
4240
|
+
e + ki,
|
|
4241
|
+
this.nextRevealAt + xi
|
|
4200
4242
|
) + a;
|
|
4201
4243
|
this.nextRevealAt = s;
|
|
4202
4244
|
const o = Math.max(0, s - e), c = t.id, v = setTimeout(() => {
|
|
@@ -4369,8 +4411,8 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
|
|
|
4369
4411
|
];
|
|
4370
4412
|
for (const w of e) {
|
|
4371
4413
|
if (!w) continue;
|
|
4372
|
-
const S = ((o = w.author) == null ? void 0 : o.name) || (((c = w.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = w.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"),
|
|
4373
|
-
A && (n.push(`[${
|
|
4414
|
+
const S = ((o = w.author) == null ? void 0 : o.name) || (((c = w.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = w.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"), $ = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
|
|
4415
|
+
A && (n.push(`[${$}] ${S} :`), n.push(A), n.push(""));
|
|
4374
4416
|
}
|
|
4375
4417
|
const a = new Blob([n.join(`
|
|
4376
4418
|
`)], { type: "text/plain;charset=utf-8" });
|
|
@@ -4404,12 +4446,12 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
|
|
|
4404
4446
|
async onFormSubmit({ values: t }) {
|
|
4405
4447
|
const e = this.pendingForm;
|
|
4406
4448
|
if (!(e != null && e.form)) return;
|
|
4407
|
-
const n =
|
|
4449
|
+
const n = wi(e.form, t);
|
|
4408
4450
|
if (!n) return;
|
|
4409
4451
|
const a = this.currentConv;
|
|
4410
4452
|
a && await this.store.send(a.id, n, {
|
|
4411
4453
|
metadata: {
|
|
4412
|
-
artifact:
|
|
4454
|
+
artifact: bi(e.form, t)
|
|
4413
4455
|
}
|
|
4414
4456
|
});
|
|
4415
4457
|
},
|
|
@@ -4453,33 +4495,33 @@ const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
|
|
|
4453
4495
|
}
|
|
4454
4496
|
}
|
|
4455
4497
|
}
|
|
4456
|
-
},
|
|
4498
|
+
}, Ti = {
|
|
4457
4499
|
key: 0,
|
|
4458
4500
|
class: "wm-loading",
|
|
4459
4501
|
"aria-busy": "true",
|
|
4460
4502
|
"aria-live": "polite"
|
|
4461
|
-
},
|
|
4503
|
+
}, Ii = {
|
|
4462
4504
|
key: 0,
|
|
4463
4505
|
class: "wm-state"
|
|
4464
|
-
},
|
|
4506
|
+
}, Oi = { class: "wm-state__err" }, Ei = { class: "wm-state__errSub" }, Bi = { class: "wm-bottom" }, Li = {
|
|
4465
4507
|
key: 0,
|
|
4466
4508
|
ref: "floatEl",
|
|
4467
4509
|
class: "wm-float"
|
|
4468
|
-
},
|
|
4510
|
+
}, Ri = {
|
|
4469
4511
|
key: 1,
|
|
4470
4512
|
class: "wm-actionWait",
|
|
4471
4513
|
role: "status",
|
|
4472
4514
|
"aria-live": "polite"
|
|
4473
|
-
},
|
|
4515
|
+
}, $i = { class: "wm-actionWait__lbl" }, Fi = {
|
|
4474
4516
|
key: 1,
|
|
4475
4517
|
class: "wm-attached"
|
|
4476
|
-
},
|
|
4477
|
-
function
|
|
4478
|
-
const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"),
|
|
4518
|
+
}, ji = ["onClick"];
|
|
4519
|
+
function Ui(t, e, n, a, r, s) {
|
|
4520
|
+
const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"), $ = O("Feedback"), A = O("SuggestionChips"), D = O("Composer"), x = O("MoreMenu"), N = O("HistoryDrawer");
|
|
4479
4521
|
return l(), d("div", {
|
|
4480
4522
|
class: E(["wm-root", `wm-root--${n.displayMode}`])
|
|
4481
4523
|
}, [
|
|
4482
|
-
!r.isOpen && !s.isEmbedded ? (l(),
|
|
4524
|
+
!r.isOpen && !s.isEmbedded ? (l(), R(o, {
|
|
4483
4525
|
key: 0,
|
|
4484
4526
|
"unread-count": s.unreadCount,
|
|
4485
4527
|
peek: s.launcherPeek,
|
|
@@ -4493,7 +4535,7 @@ function ji(t, e, n, a, r, s) {
|
|
|
4493
4535
|
role: "dialog",
|
|
4494
4536
|
"aria-label": "Messenger"
|
|
4495
4537
|
}, [
|
|
4496
|
-
!s.ready && !s.error ? (l(), d("div",
|
|
4538
|
+
!s.ready && !s.error ? (l(), d("div", Ti, [
|
|
4497
4539
|
s.isEmbedded ? y("", !0) : (l(), d("button", {
|
|
4498
4540
|
key: 0,
|
|
4499
4541
|
type: "button",
|
|
@@ -4535,8 +4577,8 @@ function ji(t, e, n, a, r, s) {
|
|
|
4535
4577
|
onMore: s.toggleMore,
|
|
4536
4578
|
onClose: s.close
|
|
4537
4579
|
}, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
4538
|
-
s.error ? (l(), d("div",
|
|
4539
|
-
i("div",
|
|
4580
|
+
s.error ? (l(), d("div", Ii, [
|
|
4581
|
+
i("div", Oi, [
|
|
4540
4582
|
e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
|
|
4541
4583
|
i("svg", {
|
|
4542
4584
|
width: "14",
|
|
@@ -4554,7 +4596,7 @@ function ji(t, e, n, a, r, s) {
|
|
|
4554
4596
|
], -1)),
|
|
4555
4597
|
i("div", null, [
|
|
4556
4598
|
e[8] || (e[8] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
|
|
4557
|
-
i("div",
|
|
4599
|
+
i("div", Ei, b(s.error), 1)
|
|
4558
4600
|
])
|
|
4559
4601
|
])
|
|
4560
4602
|
])) : s.currentConv ? (l(), d(M, { key: 2 }, [
|
|
@@ -4569,36 +4611,36 @@ function ji(t, e, n, a, r, s) {
|
|
|
4569
4611
|
"unread-anchor-ts": r.unreadAnchorTs,
|
|
4570
4612
|
onLoadMore: s.onLoadMore
|
|
4571
4613
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4572
|
-
i("div",
|
|
4573
|
-
s.floatVisible ? (l(), d("div",
|
|
4574
|
-
s.approvalReady ? (l(),
|
|
4614
|
+
i("div", Bi, [
|
|
4615
|
+
s.floatVisible ? (l(), d("div", Li, [
|
|
4616
|
+
s.approvalReady ? (l(), R(w, {
|
|
4575
4617
|
key: 0,
|
|
4576
4618
|
action: s.approvalTitle,
|
|
4577
4619
|
detail: s.approvalDetail,
|
|
4578
4620
|
callbacks: s.pendingApproval.callbacks,
|
|
4579
4621
|
onCallback: s.onApprovalCallback
|
|
4580
|
-
}, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(),
|
|
4622
|
+
}, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), R(S, {
|
|
4581
4623
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
4582
4624
|
form: s.pendingForm.form,
|
|
4583
4625
|
onSubmit: s.onFormSubmit
|
|
4584
|
-
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(),
|
|
4626
|
+
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), R($, {
|
|
4585
4627
|
key: 2,
|
|
4586
4628
|
busy: r.feedbackBusy,
|
|
4587
4629
|
done: r.feedbackDone,
|
|
4588
4630
|
onSubmit: s.onFeedback
|
|
4589
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (l(),
|
|
4631
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (l(), R(A, {
|
|
4590
4632
|
key: 3,
|
|
4591
4633
|
items: s.suggestions,
|
|
4592
4634
|
onSelect: s.onSuggestion
|
|
4593
4635
|
}, null, 8, ["items", "onSelect"]))
|
|
4594
4636
|
], 512)) : y("", !0),
|
|
4595
|
-
s.actionInFlight ? (l(), d("div",
|
|
4637
|
+
s.actionInFlight ? (l(), d("div", Ri, [
|
|
4596
4638
|
e[10] || (e[10] = i("span", {
|
|
4597
4639
|
class: "wm-actionWait__spinner",
|
|
4598
4640
|
"aria-hidden": "true"
|
|
4599
4641
|
}, null, -1)),
|
|
4600
|
-
i("span",
|
|
4601
|
-
])) : (l(),
|
|
4642
|
+
i("span", $i, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
|
|
4643
|
+
])) : (l(), R(D, {
|
|
4602
4644
|
key: 2,
|
|
4603
4645
|
ref: "composer",
|
|
4604
4646
|
modelValue: r.draft,
|
|
@@ -4610,7 +4652,7 @@ function ji(t, e, n, a, r, s) {
|
|
|
4610
4652
|
onAttach: s.onAttach
|
|
4611
4653
|
}, null, 8, ["modelValue", "placeholder", "disabled", "onSend", "onAttach"]))
|
|
4612
4654
|
]),
|
|
4613
|
-
r.moreOpen ? (l(),
|
|
4655
|
+
r.moreOpen ? (l(), R(x, {
|
|
4614
4656
|
key: 0,
|
|
4615
4657
|
"can-rename": !!s.currentConv,
|
|
4616
4658
|
"can-clear": !!s.currentConv,
|
|
@@ -4622,7 +4664,7 @@ function ji(t, e, n, a, r, s) {
|
|
|
4622
4664
|
onNotifToggle: s.onNotifToggle,
|
|
4623
4665
|
onAction: s.onMoreAction
|
|
4624
4666
|
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
|
|
4625
|
-
r.pendingAttachments.length ? (l(), d("div",
|
|
4667
|
+
r.pendingAttachments.length ? (l(), d("div", Fi, [
|
|
4626
4668
|
(l(!0), d(M, null, j(r.pendingAttachments, (F, P) => (l(), d("div", {
|
|
4627
4669
|
key: P,
|
|
4628
4670
|
class: "wm-attached__chip"
|
|
@@ -4659,10 +4701,10 @@ function ji(t, e, n, a, r, s) {
|
|
|
4659
4701
|
}, [
|
|
4660
4702
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4661
4703
|
], -1)
|
|
4662
|
-
])], 8,
|
|
4704
|
+
])], 8, ji)
|
|
4663
4705
|
]))), 128))
|
|
4664
4706
|
])) : y("", !0)
|
|
4665
|
-
], 64)) : (l(),
|
|
4707
|
+
], 64)) : (l(), R(v, {
|
|
4666
4708
|
key: 1,
|
|
4667
4709
|
"welcome-message": s.widgetWelcomeMessage,
|
|
4668
4710
|
"agent-name": s.agentName,
|
|
@@ -4673,7 +4715,7 @@ function ji(t, e, n, a, r, s) {
|
|
|
4673
4715
|
onSelect: s.onQuickLink,
|
|
4674
4716
|
onResume: s.onDrawerPick
|
|
4675
4717
|
}, null, 8, ["welcome-message", "agent-name", "quick-links", "unread-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
4676
|
-
r.historyOpen ? (l(),
|
|
4718
|
+
r.historyOpen ? (l(), R(N, {
|
|
4677
4719
|
key: 3,
|
|
4678
4720
|
conversations: s.drawerConversations,
|
|
4679
4721
|
"active-id": s.currentConv ? s.currentConv.id : null,
|
|
@@ -4681,7 +4723,7 @@ function ji(t, e, n, a, r, s) {
|
|
|
4681
4723
|
onNew: s.onDrawerNew,
|
|
4682
4724
|
onPick: s.onDrawerPick
|
|
4683
4725
|
}, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
|
|
4684
|
-
r.moreOpen && !s.currentConv ? (l(),
|
|
4726
|
+
r.moreOpen && !s.currentConv ? (l(), R(x, {
|
|
4685
4727
|
key: 4,
|
|
4686
4728
|
"can-rename": !1,
|
|
4687
4729
|
"can-clear": !1,
|
|
@@ -4697,48 +4739,48 @@ function ji(t, e, n, a, r, s) {
|
|
|
4697
4739
|
], 6)) : y("", !0)
|
|
4698
4740
|
], 2);
|
|
4699
4741
|
}
|
|
4700
|
-
const
|
|
4742
|
+
const Pi = /* @__PURE__ */ B(Mi, [["render", Ui], ["__scopeId", "data-v-8264e504"]]), Hi = "0.2.10";
|
|
4701
4743
|
export {
|
|
4702
4744
|
Q as AIAvatar,
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4745
|
+
ce as AVATAR_COLORS,
|
|
4746
|
+
Qt as ActionResult,
|
|
4747
|
+
or as ApprovalCard,
|
|
4748
|
+
on as ArtifactFormResponse,
|
|
4749
|
+
wn as ArtifactInfoCard,
|
|
4750
|
+
Un as ArtifactRenderer,
|
|
4751
|
+
Rn as ArtifactTicket,
|
|
4752
|
+
Jn as AttachmentPreview,
|
|
4753
|
+
ss as Bubble,
|
|
4754
|
+
Gs as Composer,
|
|
4713
4755
|
Pe as DEFAULT_BASE_URL,
|
|
4714
|
-
|
|
4715
|
-
|
|
4756
|
+
Vr as Feedback,
|
|
4757
|
+
Rr as FormCard,
|
|
4716
4758
|
yt as Header,
|
|
4717
|
-
|
|
4759
|
+
ui as HistoryDrawer,
|
|
4718
4760
|
ke as HumanAvatar,
|
|
4719
4761
|
Ge as Launcher,
|
|
4720
4762
|
he as MEDIA_RECORDER_SUPPORTED,
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4763
|
+
Ms as MessageList,
|
|
4764
|
+
Pi as Messenger,
|
|
4765
|
+
yi as MoreMenu,
|
|
4724
4766
|
Pt as Onboarding,
|
|
4725
|
-
|
|
4726
|
-
|
|
4767
|
+
se as SCREEN_CAPTURE_SUPPORTED,
|
|
4768
|
+
Xs as SuggestionChips,
|
|
4727
4769
|
ot as TeamAvatars,
|
|
4728
|
-
|
|
4729
|
-
|
|
4770
|
+
os as Typing,
|
|
4771
|
+
Hi as VERSION,
|
|
4730
4772
|
ye as avatarColor,
|
|
4731
4773
|
we as avatarInitials,
|
|
4732
|
-
|
|
4774
|
+
Is as captureScreenshotFile,
|
|
4733
4775
|
U as colors,
|
|
4734
4776
|
De as createStore,
|
|
4735
4777
|
$e as createTransport,
|
|
4736
|
-
|
|
4778
|
+
Pi as default,
|
|
4737
4779
|
be as formatTime,
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4780
|
+
Ni as guessAttachmentKind,
|
|
4781
|
+
Ts as pickRecorderMime,
|
|
4782
|
+
Zn as renderMarkdown,
|
|
4783
|
+
Es as startScreenRecording,
|
|
4742
4784
|
Ne as tokensCss,
|
|
4743
4785
|
Ue as uuid,
|
|
4744
4786
|
Ue as v4
|