@_solaris/messenger-widget 0.5.55 → 0.5.57
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/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +11 -11
- package/dist/messenger.cjs +9 -9
- package/dist/messenger.js +898 -799
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/core/types.d.ts +26 -0
- package/dist/types/mixins/revealPacing.d.ts +9 -0
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Ue, withCtx as je, Fragment as L, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as P, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
|
|
2
|
+
const Ye = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
5
5
|
"message_stream",
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
],
|
|
10
|
-
function
|
|
9
|
+
], we = "/client", Je = 5 * 60 * 1e3, Xe = 10 * 60 * 1e3, Qe = 5 * 60 * 1e3;
|
|
10
|
+
function Ze(e) {
|
|
11
11
|
const t = {
|
|
12
|
-
baseUrl:
|
|
12
|
+
baseUrl: et(e.baseUrl || ""),
|
|
13
13
|
widgetId: e.widgetId || "",
|
|
14
14
|
// Posé après `start()` à partir de la response /session.
|
|
15
15
|
userId: "",
|
|
@@ -65,17 +65,17 @@ function Je(e) {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
async function r(u, _, p) {
|
|
68
|
-
const S = await fetch(`${t.baseUrl}${
|
|
68
|
+
const S = await fetch(`${t.baseUrl}${we}${_}`, {
|
|
69
69
|
method: u,
|
|
70
70
|
credentials: "include",
|
|
71
71
|
headers: s(),
|
|
72
72
|
body: p !== void 0 ? JSON.stringify(p) : void 0
|
|
73
73
|
});
|
|
74
74
|
if (!S.ok) {
|
|
75
|
-
const O = await l(S),
|
|
75
|
+
const O = await l(S), x = new Error(
|
|
76
76
|
`HTTP ${S.status} ${u} ${_} :: ${(O == null ? void 0 : O.error) || S.statusText}`
|
|
77
77
|
);
|
|
78
|
-
throw
|
|
78
|
+
throw x.status = S.status, x.body = O, x;
|
|
79
79
|
}
|
|
80
80
|
return S.status === 204 ? null : S.json();
|
|
81
81
|
}
|
|
@@ -92,7 +92,7 @@ function Je(e) {
|
|
|
92
92
|
throw new Error("[transport] start requires origin");
|
|
93
93
|
t.started = !0, t.origin = u.origin, t.token = u.token || "";
|
|
94
94
|
const _ = await fetch(
|
|
95
|
-
`${t.baseUrl}${
|
|
95
|
+
`${t.baseUrl}${we}/session`,
|
|
96
96
|
{
|
|
97
97
|
method: "POST",
|
|
98
98
|
credentials: "include",
|
|
@@ -133,15 +133,15 @@ function Je(e) {
|
|
|
133
133
|
return $.json();
|
|
134
134
|
}),
|
|
135
135
|
r("GET", "/customers/me")
|
|
136
|
-
]),
|
|
137
|
-
return t.lastBootstrap =
|
|
136
|
+
]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
|
|
137
|
+
return t.lastBootstrap = x, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
138
138
|
"visibilitychange",
|
|
139
139
|
t.visibilityHandler
|
|
140
|
-
)),
|
|
140
|
+
)), fe(), x;
|
|
141
141
|
}
|
|
142
142
|
async function k() {
|
|
143
143
|
try {
|
|
144
|
-
const u = await
|
|
144
|
+
const u = await I();
|
|
145
145
|
t.lastActivityAt = u.reduce((_, p) => {
|
|
146
146
|
const S = p == null ? void 0 : p.last_message_at;
|
|
147
147
|
return S && (!_ || S > _) ? S : _;
|
|
@@ -154,11 +154,11 @@ function Je(e) {
|
|
|
154
154
|
const u = await r("GET", "/customers/me");
|
|
155
155
|
return (u == null ? void 0 : u.customer) ?? null;
|
|
156
156
|
}
|
|
157
|
-
async function
|
|
157
|
+
async function T(u) {
|
|
158
158
|
const _ = await r("PATCH", "/customers/me", u);
|
|
159
159
|
return (_ == null ? void 0 : _.customer) ?? null;
|
|
160
160
|
}
|
|
161
|
-
async function
|
|
161
|
+
async function I() {
|
|
162
162
|
const u = await r("GET", "/conversations");
|
|
163
163
|
return (u == null ? void 0 : u.conversations) ?? [];
|
|
164
164
|
}
|
|
@@ -178,14 +178,14 @@ function Je(e) {
|
|
|
178
178
|
_
|
|
179
179
|
)).conversation;
|
|
180
180
|
}
|
|
181
|
-
async function
|
|
181
|
+
async function N(u, _) {
|
|
182
182
|
return r(
|
|
183
183
|
"PATCH",
|
|
184
184
|
`/conversations/${encodeURIComponent(u)}/read`,
|
|
185
185
|
{ message_id: _ }
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function U(u, _ = {}) {
|
|
189
189
|
const p = new URLSearchParams();
|
|
190
190
|
_.before && p.set("before", _.before), _.since && p.set("since", _.since), _.limit && p.set("limit", String(_.limit));
|
|
191
191
|
const S = p.toString() ? `?${p.toString()}` : "";
|
|
@@ -194,7 +194,7 @@ function Je(e) {
|
|
|
194
194
|
`/conversations/${encodeURIComponent(u)}/messages${S}`
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
|
-
async function
|
|
197
|
+
async function D(u, _) {
|
|
198
198
|
ae();
|
|
199
199
|
const p = {
|
|
200
200
|
client_msg_id: _.client_msg_id,
|
|
@@ -221,15 +221,15 @@ function Je(e) {
|
|
|
221
221
|
mime_type: p,
|
|
222
222
|
size_bytes: S,
|
|
223
223
|
name: _
|
|
224
|
-
}),
|
|
224
|
+
}), x = await fetch(O.upload_url, {
|
|
225
225
|
method: "PUT",
|
|
226
226
|
headers: { "Content-Type": p },
|
|
227
227
|
body: u
|
|
228
228
|
});
|
|
229
|
-
if (!
|
|
230
|
-
throw new Error(`HTTP ${
|
|
229
|
+
if (!x.ok)
|
|
230
|
+
throw new Error(`HTTP ${x.status} PUT signed upload`);
|
|
231
231
|
return {
|
|
232
|
-
type:
|
|
232
|
+
type: tt(p),
|
|
233
233
|
path: O.path,
|
|
234
234
|
mime_type: p,
|
|
235
235
|
size_bytes: S
|
|
@@ -243,13 +243,13 @@ function Je(e) {
|
|
|
243
243
|
}
|
|
244
244
|
function re() {
|
|
245
245
|
const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
|
|
246
|
-
return `${t.baseUrl}${
|
|
246
|
+
return `${t.baseUrl}${we}/stream?${u}`;
|
|
247
247
|
}
|
|
248
248
|
function W() {
|
|
249
249
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
250
250
|
try {
|
|
251
251
|
const u = new EventSource(re(), { withCredentials: !0 });
|
|
252
|
-
for (const _ of
|
|
252
|
+
for (const _ of Ye)
|
|
253
253
|
u.addEventListener(_, (p) => ie(_, p.data));
|
|
254
254
|
u.addEventListener(
|
|
255
255
|
"error",
|
|
@@ -267,30 +267,30 @@ function Je(e) {
|
|
|
267
267
|
console.error("[transport] bad SSE payload", u, p);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function X() {
|
|
271
271
|
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && a("idle");
|
|
272
272
|
}
|
|
273
273
|
function ae() {
|
|
274
274
|
clearTimeout(t.burstTimer), W(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
275
|
-
t.panelOpen ||
|
|
276
|
-
},
|
|
275
|
+
t.panelOpen || X();
|
|
276
|
+
}, Xe));
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function me(u) {
|
|
279
279
|
t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), W()) : ae();
|
|
280
280
|
}
|
|
281
|
-
async function
|
|
281
|
+
async function ye() {
|
|
282
282
|
try {
|
|
283
|
-
const u = await
|
|
284
|
-
const
|
|
285
|
-
return
|
|
283
|
+
const u = await I(), _ = u.reduce((S, O) => {
|
|
284
|
+
const x = O == null ? void 0 : O.last_message_at;
|
|
285
|
+
return x && (!S || x > S) ? x : S;
|
|
286
286
|
}, null);
|
|
287
287
|
_ && (!t.lastActivityAt || _ > t.lastActivityAt) && (t.lastActivityAt = _, i("activity", { conversations: u, latestAt: _ }), ae());
|
|
288
288
|
} catch (u) {
|
|
289
289
|
console.error("[transport] poll failed", u);
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(
|
|
292
|
+
function fe() {
|
|
293
|
+
h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ye, Je));
|
|
294
294
|
}
|
|
295
295
|
function h() {
|
|
296
296
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
@@ -298,18 +298,18 @@ function Je(e) {
|
|
|
298
298
|
function m() {
|
|
299
299
|
if (document.hidden)
|
|
300
300
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
301
|
-
t.hiddenGraceTimer = null, document.hidden && (h(),
|
|
302
|
-
},
|
|
301
|
+
t.hiddenGraceTimer = null, document.hidden && (h(), X(), a("paused"));
|
|
302
|
+
}, Qe);
|
|
303
303
|
else {
|
|
304
304
|
if (t.hiddenGraceTimer) {
|
|
305
305
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
308
|
-
a("idle"),
|
|
308
|
+
a("idle"), fe(), t.panelOpen && W();
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
function f() {
|
|
312
|
-
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null,
|
|
312
|
+
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, X(), t.visibilityHandler && (document.removeEventListener(
|
|
313
313
|
"visibilitychange",
|
|
314
314
|
t.visibilityHandler
|
|
315
315
|
), t.visibilityHandler = null), t.started = !1;
|
|
@@ -331,19 +331,19 @@ function Je(e) {
|
|
|
331
331
|
on: n,
|
|
332
332
|
start: g,
|
|
333
333
|
stop: f,
|
|
334
|
-
setPanelOpen:
|
|
334
|
+
setPanelOpen: me,
|
|
335
335
|
update: y,
|
|
336
336
|
context: C,
|
|
337
337
|
// REST
|
|
338
338
|
getCustomer: w,
|
|
339
|
-
patchCustomer:
|
|
340
|
-
listConversations:
|
|
339
|
+
patchCustomer: T,
|
|
340
|
+
listConversations: I,
|
|
341
341
|
createConversation: A,
|
|
342
342
|
getConversation: q,
|
|
343
343
|
patchConversation: M,
|
|
344
|
-
markConversationRead:
|
|
345
|
-
listMessages:
|
|
346
|
-
postMessage:
|
|
344
|
+
markConversationRead: N,
|
|
345
|
+
listMessages: U,
|
|
346
|
+
postMessage: D,
|
|
347
347
|
postCallback: K,
|
|
348
348
|
uploadAttachment: Q,
|
|
349
349
|
signAttachment: se,
|
|
@@ -353,13 +353,13 @@ function Je(e) {
|
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function et(e) {
|
|
357
357
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function tt(e) {
|
|
360
360
|
return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function nt() {
|
|
363
363
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
364
364
|
return crypto.randomUUID();
|
|
365
365
|
const e = new Uint8Array(16);
|
|
@@ -371,8 +371,8 @@ function et() {
|
|
|
371
371
|
const t = [...e].map((n) => n.toString(16).padStart(2, "0"));
|
|
372
372
|
return t.slice(0, 4).join("") + "-" + t.slice(4, 6).join("") + "-" + t.slice(6, 8).join("") + "-" + t.slice(8, 10).join("") + "-" + t.slice(10, 16).join("");
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
const t =
|
|
374
|
+
function st(e) {
|
|
375
|
+
const t = Ve({
|
|
376
376
|
ready: !1,
|
|
377
377
|
error: null,
|
|
378
378
|
config: null,
|
|
@@ -475,7 +475,7 @@ function tt(e) {
|
|
|
475
475
|
e.stop();
|
|
476
476
|
}
|
|
477
477
|
async function s(h) {
|
|
478
|
-
const m =
|
|
478
|
+
const m = ye(h);
|
|
479
479
|
if (!m) return t.customer;
|
|
480
480
|
try {
|
|
481
481
|
const f = await e.patchCustomer(m);
|
|
@@ -502,7 +502,7 @@ function tt(e) {
|
|
|
502
502
|
(p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
|
|
503
503
|
const _ = C.filter((p) => !((p == null ? void 0 : p.id) != null && u.has(`id:${String(p.id)}`) || p != null && p.client_msg_id && u.has(`c:${p.client_msg_id}`)));
|
|
504
504
|
t.messagesByConv[h] = [...y, ..._].sort(
|
|
505
|
-
|
|
505
|
+
me
|
|
506
506
|
), w(h, {
|
|
507
507
|
nextCursor: (f == null ? void 0 : f.next_cursor) ?? null,
|
|
508
508
|
loading: !1,
|
|
@@ -529,9 +529,9 @@ function tt(e) {
|
|
|
529
529
|
before: y,
|
|
530
530
|
limit: l
|
|
531
531
|
}), _ = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
|
|
532
|
-
for (const
|
|
533
|
-
(
|
|
534
|
-
const O = _.filter((
|
|
532
|
+
for (const x of p)
|
|
533
|
+
(x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
|
|
534
|
+
const O = _.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
|
|
535
535
|
t.messagesByConv[h] = [...O, ...p], w(h, {
|
|
536
536
|
nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
|
|
537
537
|
loading: !1,
|
|
@@ -545,11 +545,11 @@ function tt(e) {
|
|
|
545
545
|
function w(h, m) {
|
|
546
546
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
547
547
|
}
|
|
548
|
-
async function
|
|
548
|
+
async function T(h, m) {
|
|
549
549
|
const f = await e.patchConversation(h, m), y = t.conversations.findIndex((C) => C.id === h);
|
|
550
550
|
y !== -1 && (t.conversations[y] = f);
|
|
551
551
|
}
|
|
552
|
-
async function
|
|
552
|
+
async function I(h) {
|
|
553
553
|
if (!h) return [];
|
|
554
554
|
const m = t.messagesByConv[h] || [];
|
|
555
555
|
let f = "";
|
|
@@ -590,7 +590,7 @@ function tt(e) {
|
|
|
590
590
|
var O;
|
|
591
591
|
const C = (m || "").trim(), u = Array.isArray(f) && f.length > 0;
|
|
592
592
|
if (!h || !C && !u) return;
|
|
593
|
-
const _ =
|
|
593
|
+
const _ = nt(), p = fe(h), S = {
|
|
594
594
|
id: _,
|
|
595
595
|
client_msg_id: _,
|
|
596
596
|
conversation_id: h,
|
|
@@ -615,8 +615,8 @@ function tt(e) {
|
|
|
615
615
|
...u ? { attachments: f } : {},
|
|
616
616
|
...y && typeof y == "object" ? { metadata: y } : {}
|
|
617
617
|
});
|
|
618
|
-
} catch (
|
|
619
|
-
console.error("[store] send failed",
|
|
618
|
+
} catch (x) {
|
|
619
|
+
console.error("[store] send failed", x), X(h, _, {
|
|
620
620
|
_failed: !0,
|
|
621
621
|
_pending: !1
|
|
622
622
|
});
|
|
@@ -630,10 +630,10 @@ function tt(e) {
|
|
|
630
630
|
console.error("[store] callback failed", y), h != null && delete t.awaitingCallback[h];
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
async function
|
|
633
|
+
const N = /* @__PURE__ */ new Map();
|
|
634
|
+
async function U(h) {
|
|
635
635
|
if (!h) return null;
|
|
636
|
-
const m =
|
|
636
|
+
const m = N.get(h);
|
|
637
637
|
if (m != null && m.url) {
|
|
638
638
|
const f = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
639
639
|
if (!f || f - Date.now() > 6e4) return m.url;
|
|
@@ -641,7 +641,7 @@ function tt(e) {
|
|
|
641
641
|
try {
|
|
642
642
|
const f = await e.signAttachment(h);
|
|
643
643
|
if (f != null && f.signed_url)
|
|
644
|
-
return
|
|
644
|
+
return N.set(h, {
|
|
645
645
|
url: f.signed_url,
|
|
646
646
|
expires_at: f.expires_at
|
|
647
647
|
}), f.signed_url;
|
|
@@ -650,7 +650,7 @@ function tt(e) {
|
|
|
650
650
|
}
|
|
651
651
|
return null;
|
|
652
652
|
}
|
|
653
|
-
async function
|
|
653
|
+
async function D(h, { rating: m, comment: f } = {}) {
|
|
654
654
|
const y = t.conversations.find((_) => _.id === h), u = {
|
|
655
655
|
...(y == null ? void 0 : y.metadata) || {},
|
|
656
656
|
feedback: {
|
|
@@ -659,7 +659,7 @@ function tt(e) {
|
|
|
659
659
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
|
-
await
|
|
662
|
+
await T(h, { metadata: u });
|
|
663
663
|
}
|
|
664
664
|
function K(h) {
|
|
665
665
|
var f, y;
|
|
@@ -704,14 +704,14 @@ function tt(e) {
|
|
|
704
704
|
const S = (u = p == null ? void 0 : p.metadata) == null ? void 0 : u.suggested_replies;
|
|
705
705
|
return Array.isArray(S) && S.length ? S.map((O) => {
|
|
706
706
|
if (typeof O == "string") {
|
|
707
|
-
const
|
|
708
|
-
return
|
|
707
|
+
const x = O.trim();
|
|
708
|
+
return x ? { label: x, kind: null } : null;
|
|
709
709
|
}
|
|
710
710
|
if (O && typeof O == "object" && typeof O.label == "string") {
|
|
711
|
-
const
|
|
712
|
-
if (!
|
|
711
|
+
const x = O.label.trim();
|
|
712
|
+
if (!x) return null;
|
|
713
713
|
const $ = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
|
|
714
|
-
return { label:
|
|
714
|
+
return { label: x, kind: $ };
|
|
715
715
|
}
|
|
716
716
|
return null;
|
|
717
717
|
}).filter(Boolean).slice(0, 4) : [];
|
|
@@ -726,7 +726,7 @@ function tt(e) {
|
|
|
726
726
|
(_) => (_ == null ? void 0 : _.client_msg_id) && _.client_msg_id === m.client_msg_id
|
|
727
727
|
)), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = f.findIndex((_) => ie(_ == null ? void 0 : _.id, m.id)));
|
|
728
728
|
let C;
|
|
729
|
-
y === -1 ? C = [...f, m].sort(
|
|
729
|
+
y === -1 ? C = [...f, m].sort(me) : (C = f.slice(), C[y] = {
|
|
730
730
|
...f[y],
|
|
731
731
|
...m,
|
|
732
732
|
_pending: !1,
|
|
@@ -736,7 +736,7 @@ function tt(e) {
|
|
|
736
736
|
function ie(h, m) {
|
|
737
737
|
return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function X(h, m, f) {
|
|
740
740
|
const y = t.messagesByConv[h];
|
|
741
741
|
if (!y) return;
|
|
742
742
|
const C = y.findIndex((_) => _.id === m);
|
|
@@ -755,17 +755,17 @@ function tt(e) {
|
|
|
755
755
|
), t.conversations = C;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function me(h, m) {
|
|
759
759
|
return (h.created_at || "").localeCompare(m.created_at || "");
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function ye(h) {
|
|
762
762
|
if (!h || typeof h != "object") return null;
|
|
763
763
|
const m = {}, f = {};
|
|
764
764
|
for (const [y, C] of Object.entries(h))
|
|
765
765
|
C !== void 0 && (y === "name" || y === "email" || y === "language" ? C != null && String(C).trim() !== "" && (m[y] = C) : (y === "values" || y === "metadata") && C && typeof C == "object" ? Object.assign(f, C) : f[y] = C);
|
|
766
766
|
return Object.keys(f).length && (m.values = f), Object.keys(m).length ? m : null;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function fe(h) {
|
|
769
769
|
const m = t.messagesByConv[h] || [];
|
|
770
770
|
let f = "";
|
|
771
771
|
for (const u of m)
|
|
@@ -781,13 +781,13 @@ function tt(e) {
|
|
|
781
781
|
createConversation: r,
|
|
782
782
|
openConversation: g,
|
|
783
783
|
loadMore: k,
|
|
784
|
-
fetchSinceLast:
|
|
785
|
-
patchConversation:
|
|
784
|
+
fetchSinceLast: I,
|
|
785
|
+
patchConversation: T,
|
|
786
786
|
markConversationRead: A,
|
|
787
787
|
send: q,
|
|
788
788
|
clickCallback: M,
|
|
789
|
-
signAttachment:
|
|
790
|
-
submitFeedback:
|
|
789
|
+
signAttachment: U,
|
|
790
|
+
submitFeedback: D,
|
|
791
791
|
getPendingApproval: K,
|
|
792
792
|
getActionInFlight: se,
|
|
793
793
|
getLatestSuggestions: re,
|
|
@@ -812,7 +812,7 @@ const H = {
|
|
|
812
812
|
green: "#22C55E",
|
|
813
813
|
red: "#B91C1C",
|
|
814
814
|
redBg: "#FDECEC"
|
|
815
|
-
},
|
|
815
|
+
}, be = [
|
|
816
816
|
"#5B5FEF",
|
|
817
817
|
"#7C3AED",
|
|
818
818
|
"#DB2777",
|
|
@@ -820,16 +820,16 @@ const H = {
|
|
|
820
820
|
"#D97706",
|
|
821
821
|
"#059669"
|
|
822
822
|
];
|
|
823
|
-
function
|
|
824
|
-
return e ?
|
|
823
|
+
function Me(e = "") {
|
|
824
|
+
return e ? be[e.charCodeAt(0) % be.length] : be[0];
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function Te(e = "") {
|
|
827
827
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function Ce(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
|
|
830
830
|
return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
|
|
831
831
|
}
|
|
832
|
-
const
|
|
832
|
+
const rt = `
|
|
833
833
|
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
|
|
834
834
|
|
|
835
835
|
.wm-root {
|
|
@@ -876,11 +876,11 @@ const nt = `
|
|
|
876
876
|
0% { transform: translateX(110%); opacity: 0; }
|
|
877
877
|
100% { transform: translateX(0); opacity: 1; }
|
|
878
878
|
}
|
|
879
|
-
`,
|
|
880
|
-
function
|
|
881
|
-
return typeof e != "string" || !e || e.length > 64 ? !1 :
|
|
879
|
+
`, it = "https://api.messenger.victorc.fr", at = /^[a-zA-Z]{3,32}$/, ot = /^#[0-9a-fA-F]{3,8}$/, lt = /^(rgb|rgba|hsl|hsla)\(\s*[\d.,%\s/]{1,60}\)$/;
|
|
880
|
+
function ct(e) {
|
|
881
|
+
return typeof e != "string" || !e || e.length > 64 ? !1 : ot.test(e) || lt.test(e) || at.test(e);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function dt(e) {
|
|
884
884
|
if (typeof e != "string" || !e || e.length > 2048 || /["'()\\;\s<>]/.test(e)) return null;
|
|
885
885
|
let t;
|
|
886
886
|
try {
|
|
@@ -890,7 +890,7 @@ function lt(e) {
|
|
|
890
890
|
}
|
|
891
891
|
return t.protocol === "https:" || t.protocol === "http:" || t.protocol === "data:" && /^data:image\//i.test(e) ? e : null;
|
|
892
892
|
}
|
|
893
|
-
const
|
|
893
|
+
const ue = "fr", ut = ["fr", "en"], Le = { fr: "fr-FR", en: "en-US" }, ke = {
|
|
894
894
|
fr: {
|
|
895
895
|
// ── Common ───────────────────────────────────────────────────────
|
|
896
896
|
"common.newConversation": "Nouvelle conversation",
|
|
@@ -1142,16 +1142,16 @@ I reply within seconds.`,
|
|
|
1142
1142
|
"export.createdOn": "Created on: {date}"
|
|
1143
1143
|
}
|
|
1144
1144
|
};
|
|
1145
|
-
function
|
|
1146
|
-
if (typeof e != "string") return
|
|
1145
|
+
function xe(e) {
|
|
1146
|
+
if (typeof e != "string") return ue;
|
|
1147
1147
|
const t = e.trim().toLowerCase().slice(0, 2);
|
|
1148
|
-
return
|
|
1148
|
+
return ut.includes(t) ? t : ue;
|
|
1149
1149
|
}
|
|
1150
1150
|
function ne(e) {
|
|
1151
|
-
return
|
|
1151
|
+
return Le[xe(e)] || Le[ue];
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
const t =
|
|
1153
|
+
function F(e) {
|
|
1154
|
+
const t = xe(e), n = ke[t] || ke[ue], i = ke[ue];
|
|
1155
1155
|
return function(s, r) {
|
|
1156
1156
|
let l = n[s];
|
|
1157
1157
|
return l == null && (l = i[s]), l == null ? s : (r && (l = l.replace(
|
|
@@ -1165,17 +1165,17 @@ function Ie(e, t) {
|
|
|
1165
1165
|
const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
|
|
1166
1166
|
return (n == null ? void 0 : n.label) || t;
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function He(e, t, n) {
|
|
1169
1169
|
return Array.isArray(t) ? t.map((i) => Ie(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ie(e, String(t));
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function ht(e, t, n = F()) {
|
|
1172
1172
|
if (!e || !t) return "";
|
|
1173
1173
|
const i = Array.isArray(e.fields) ? e.fields : [], a = [];
|
|
1174
1174
|
for (const s of i) {
|
|
1175
1175
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1176
1176
|
const r = t[s.key];
|
|
1177
1177
|
if (r == null || r === "") continue;
|
|
1178
|
-
const l =
|
|
1178
|
+
const l = He(s, r, n);
|
|
1179
1179
|
l && a.push(`${s.label} :
|
|
1180
1180
|
${l}`);
|
|
1181
1181
|
}
|
|
@@ -1183,13 +1183,13 @@ ${l}`);
|
|
|
1183
1183
|
|
|
1184
1184
|
`);
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function mt(e, t, n = F()) {
|
|
1187
1187
|
const i = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1188
1188
|
for (const s of a) {
|
|
1189
1189
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1190
1190
|
const r = t == null ? void 0 : t[s.key];
|
|
1191
1191
|
if (r == null || r === "") continue;
|
|
1192
|
-
const l =
|
|
1192
|
+
const l = He(s, r, n);
|
|
1193
1193
|
if (!l) continue;
|
|
1194
1194
|
const g = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1195
1195
|
`));
|
|
@@ -1203,29 +1203,29 @@ function ut(e, t, n = j()) {
|
|
|
1203
1203
|
}
|
|
1204
1204
|
};
|
|
1205
1205
|
}
|
|
1206
|
-
function
|
|
1206
|
+
function ze(e) {
|
|
1207
1207
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1208
1208
|
}
|
|
1209
|
-
function
|
|
1209
|
+
function _e(e) {
|
|
1210
1210
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
|
|
1211
1211
|
}
|
|
1212
|
-
const
|
|
1213
|
-
function
|
|
1212
|
+
const Ee = "";
|
|
1213
|
+
function de(e) {
|
|
1214
1214
|
let t = e;
|
|
1215
1215
|
const n = [];
|
|
1216
1216
|
return t = t.replace(/`([^`\n]+)`/g, (i, a) => {
|
|
1217
1217
|
const s = n.length;
|
|
1218
|
-
return n.push(a), `${
|
|
1219
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, a, s) =>
|
|
1218
|
+
return n.push(a), `${Ee}CODE${s}${Ee}`;
|
|
1219
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, a, s) => _e(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${a}</a>` : a), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, a) => `<code class="wm-md-code">${n[+a]}</code>`), t;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function qe(e) {
|
|
1222
1222
|
if (!e) return "";
|
|
1223
1223
|
const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
|
|
1224
|
-
return
|
|
1224
|
+
return de(ze(t));
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function ft(e) {
|
|
1227
1227
|
if (!e) return "";
|
|
1228
|
-
const t =
|
|
1228
|
+
const t = ze(e).split(`
|
|
1229
1229
|
`), n = [];
|
|
1230
1230
|
let i = 0;
|
|
1231
1231
|
for (; i < t.length; ) {
|
|
@@ -1245,11 +1245,11 @@ function ht(e) {
|
|
|
1245
1245
|
if (/^\s*[-*]\s+/.test(s)) {
|
|
1246
1246
|
const k = [];
|
|
1247
1247
|
for (; i < t.length; ) {
|
|
1248
|
-
const
|
|
1249
|
-
if (!
|
|
1250
|
-
k.push(
|
|
1248
|
+
const T = /^\s*[-*]\s+(.*)$/.exec(t[i]);
|
|
1249
|
+
if (!T) break;
|
|
1250
|
+
k.push(T[1]), i++;
|
|
1251
1251
|
}
|
|
1252
|
-
const w = k.map((
|
|
1252
|
+
const w = k.map((T) => `<li>${de(T)}</li>`).join("");
|
|
1253
1253
|
n.push({
|
|
1254
1254
|
type: "block",
|
|
1255
1255
|
html: `<ul class="wm-md-ul">${w}</ul>`
|
|
@@ -1264,10 +1264,10 @@ function ht(e) {
|
|
|
1264
1264
|
if (!A) break;
|
|
1265
1265
|
w.push(A[1]), i++;
|
|
1266
1266
|
}
|
|
1267
|
-
const
|
|
1267
|
+
const T = w.map((A) => `<li>${de(A)}</li>`).join(""), I = k !== 1 ? ` start="${k}"` : "";
|
|
1268
1268
|
n.push({
|
|
1269
1269
|
type: "block",
|
|
1270
|
-
html: `<ol class="wm-md-ol"${
|
|
1270
|
+
html: `<ol class="wm-md-ol"${I}>${T}</ol>`
|
|
1271
1271
|
});
|
|
1272
1272
|
continue;
|
|
1273
1273
|
}
|
|
@@ -1276,11 +1276,11 @@ function ht(e) {
|
|
|
1276
1276
|
const k = g[1].length;
|
|
1277
1277
|
n.push({
|
|
1278
1278
|
type: "block",
|
|
1279
|
-
html: `<h${k} class="wm-md-h wm-md-h${k}">${
|
|
1279
|
+
html: `<h${k} class="wm-md-h wm-md-h${k}">${de(g[2])}</h${k}>`
|
|
1280
1280
|
}), i++;
|
|
1281
1281
|
continue;
|
|
1282
1282
|
}
|
|
1283
|
-
n.push({ type: "text", html:
|
|
1283
|
+
n.push({ type: "text", html: de(s) }), i++;
|
|
1284
1284
|
}
|
|
1285
1285
|
let a = "";
|
|
1286
1286
|
for (let s = 0; s < n.length; s++) {
|
|
@@ -1292,7 +1292,7 @@ function ht(e) {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
return a;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function he(e) {
|
|
1296
1296
|
var n;
|
|
1297
1297
|
const t = (n = e == null ? void 0 : e.author) == null ? void 0 : n.type;
|
|
1298
1298
|
return t === "agent_ia" || t === "agent_human";
|
|
@@ -1302,13 +1302,13 @@ function Y(e) {
|
|
|
1302
1302
|
const t = typeof e == "number" ? e : Number(e);
|
|
1303
1303
|
return Number.isFinite(t) ? t : null;
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function Be(e, t) {
|
|
1306
1306
|
let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
|
|
1307
1307
|
for (const i of t)
|
|
1308
1308
|
i != null && i.created_at && i.created_at > n && (n = i.created_at);
|
|
1309
1309
|
return n;
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function _t(e, t) {
|
|
1312
1312
|
var n, i, a;
|
|
1313
1313
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
1314
1314
|
const r = t[s];
|
|
@@ -1321,10 +1321,10 @@ function mt(e, t) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function gt(e, t) {
|
|
1325
1325
|
return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function pt(e, t, n, i) {
|
|
1328
1328
|
const a = [
|
|
1329
1329
|
`# ${e.name || n("common.conversation")}`,
|
|
1330
1330
|
e.created_at ? n("export.createdOn", {
|
|
@@ -1336,15 +1336,15 @@ function _t(e, t, n, i) {
|
|
|
1336
1336
|
if (!s) continue;
|
|
1337
1337
|
const r = (s.text_md || "").trim();
|
|
1338
1338
|
if (!r) continue;
|
|
1339
|
-
const l =
|
|
1339
|
+
const l = gt(s.author, n), g = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
|
|
1340
1340
|
a.push(`[${g}] ${l} :`), a.push(r), a.push("");
|
|
1341
1341
|
}
|
|
1342
1342
|
return a.join(`
|
|
1343
1343
|
`);
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function vt(e, t, n = F(), i) {
|
|
1346
1346
|
if (!e) return;
|
|
1347
|
-
const a =
|
|
1347
|
+
const a = pt(e, t || [], n, ne(i)), s = new Blob([a], { type: "text/plain;charset=utf-8" });
|
|
1348
1348
|
try {
|
|
1349
1349
|
const r = URL.createObjectURL(s), l = document.createElement("a");
|
|
1350
1350
|
l.href = r, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(r), 1e3);
|
|
@@ -1352,7 +1352,7 @@ function gt(e, t, n = j(), i) {
|
|
|
1352
1352
|
console.error("[ww-messenger] export failed", r);
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
const
|
|
1355
|
+
const yt = {
|
|
1356
1356
|
data() {
|
|
1357
1357
|
const e = typeof Notification < "u";
|
|
1358
1358
|
return {
|
|
@@ -1463,7 +1463,7 @@ const pt = {
|
|
|
1463
1463
|
// panel or switched threads during the typing dwell.
|
|
1464
1464
|
onMessageRevealed(e, t) {
|
|
1465
1465
|
var a;
|
|
1466
|
-
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !
|
|
1466
|
+
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !he(e)) return;
|
|
1467
1467
|
const n = typeof document < "u" && document.hidden;
|
|
1468
1468
|
this.isOpen && !n && ((a = this.currentConv) == null ? void 0 : a.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
|
|
1469
1469
|
},
|
|
@@ -1510,7 +1510,45 @@ const pt = {
|
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
|
-
},
|
|
1513
|
+
}, le = Object.freeze({
|
|
1514
|
+
firstRevealDelayMs: 450,
|
|
1515
|
+
msPerChar: 50,
|
|
1516
|
+
minTypingMs: 900,
|
|
1517
|
+
maxTypingMs: 12e3,
|
|
1518
|
+
pauseBetweenMs: 300
|
|
1519
|
+
}), ce = (e, t) => Number.isFinite(e) ? e : t, wt = {
|
|
1520
|
+
computed: {
|
|
1521
|
+
// Resolved pacing values for the current widget. Reads each key
|
|
1522
|
+
// from `widget.reveal_pacing` (server-side single source of truth)
|
|
1523
|
+
// and falls back per-key to `FALLBACK_PACING` so a missing widget
|
|
1524
|
+
// config or a partial override still yields a complete shape.
|
|
1525
|
+
// Exposed on the merged component, so both the agent-message
|
|
1526
|
+
// pacer below AND the welcome-bubble pacer in `Messenger.vue`
|
|
1527
|
+
// consume the same values.
|
|
1528
|
+
revealPacing() {
|
|
1529
|
+
var t;
|
|
1530
|
+
const e = ((t = this.widget) == null ? void 0 : t.reveal_pacing) || {};
|
|
1531
|
+
return {
|
|
1532
|
+
firstRevealDelayMs: ce(
|
|
1533
|
+
e.first_reveal_delay_ms,
|
|
1534
|
+
le.firstRevealDelayMs
|
|
1535
|
+
),
|
|
1536
|
+
msPerChar: ce(e.ms_per_char, le.msPerChar),
|
|
1537
|
+
minTypingMs: ce(
|
|
1538
|
+
e.min_typing_ms,
|
|
1539
|
+
le.minTypingMs
|
|
1540
|
+
),
|
|
1541
|
+
maxTypingMs: ce(
|
|
1542
|
+
e.max_typing_ms,
|
|
1543
|
+
le.maxTypingMs
|
|
1544
|
+
),
|
|
1545
|
+
pauseBetweenMs: ce(
|
|
1546
|
+
e.pause_between_ms,
|
|
1547
|
+
le.pauseBetweenMs
|
|
1548
|
+
)
|
|
1549
|
+
};
|
|
1550
|
+
}
|
|
1551
|
+
},
|
|
1514
1552
|
data() {
|
|
1515
1553
|
return {
|
|
1516
1554
|
// Map: messageId → ms timestamp once shown.
|
|
@@ -1618,18 +1656,18 @@ const pt = {
|
|
|
1618
1656
|
// - inter-bubble gap scales with message length (reading time),
|
|
1619
1657
|
// bounded by MIN/MAX_TYPING_MS.
|
|
1620
1658
|
scheduleReveal(e, t) {
|
|
1621
|
-
const n = Date.now(),
|
|
1622
|
-
|
|
1623
|
-
Math.max(
|
|
1624
|
-
),
|
|
1625
|
-
|
|
1626
|
-
this.nextRevealAt +
|
|
1627
|
-
) +
|
|
1628
|
-
this.nextRevealAt =
|
|
1629
|
-
const
|
|
1630
|
-
this.revealedAt = { ...this.revealedAt, [
|
|
1631
|
-
},
|
|
1632
|
-
this.revealTimers.push(
|
|
1659
|
+
const n = this.revealPacing, i = Date.now(), a = ((e == null ? void 0 : e.text_md) || "").length, s = Math.min(
|
|
1660
|
+
n.maxTypingMs,
|
|
1661
|
+
Math.max(n.minTypingMs, a * n.msPerChar)
|
|
1662
|
+
), l = Math.max(
|
|
1663
|
+
i + n.firstRevealDelayMs,
|
|
1664
|
+
this.nextRevealAt + n.pauseBetweenMs
|
|
1665
|
+
) + s;
|
|
1666
|
+
this.nextRevealAt = l;
|
|
1667
|
+
const g = Math.max(0, l - i), k = e.id, w = setTimeout(() => {
|
|
1668
|
+
this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== w), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1669
|
+
}, g);
|
|
1670
|
+
this.revealTimers.push(w);
|
|
1633
1671
|
},
|
|
1634
1672
|
// Walk the message list and queue / instantly-reveal every new
|
|
1635
1673
|
// entry according to its origin. Used by the `currentConvMessages`
|
|
@@ -1642,7 +1680,7 @@ const pt = {
|
|
|
1642
1680
|
const n = Date.now(), i = { ...this.revealedAt };
|
|
1643
1681
|
for (const s of e) {
|
|
1644
1682
|
if ((s == null ? void 0 : s.id) == null || i[s.id] !== void 0) continue;
|
|
1645
|
-
if (!
|
|
1683
|
+
if (!he(s)) {
|
|
1646
1684
|
i[s.id] = n;
|
|
1647
1685
|
continue;
|
|
1648
1686
|
}
|
|
@@ -1673,7 +1711,7 @@ const pt = {
|
|
|
1673
1711
|
paceLiveMessage(e, t) {
|
|
1674
1712
|
var a;
|
|
1675
1713
|
if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
|
|
1676
|
-
if (!
|
|
1714
|
+
if (!he(e)) {
|
|
1677
1715
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1678
1716
|
return;
|
|
1679
1717
|
}
|
|
@@ -1685,7 +1723,7 @@ const pt = {
|
|
|
1685
1723
|
this.revealedAt = { ...this.revealedAt, [e.id]: 0 }, this.scheduleReveal(e, t);
|
|
1686
1724
|
}
|
|
1687
1725
|
}
|
|
1688
|
-
},
|
|
1726
|
+
}, bt = {
|
|
1689
1727
|
data() {
|
|
1690
1728
|
return {
|
|
1691
1729
|
approvalSettled: !0,
|
|
@@ -1715,7 +1753,7 @@ const pt = {
|
|
|
1715
1753
|
}, e);
|
|
1716
1754
|
}
|
|
1717
1755
|
}
|
|
1718
|
-
},
|
|
1756
|
+
}, kt = 300, Ct = {
|
|
1719
1757
|
data() {
|
|
1720
1758
|
return {
|
|
1721
1759
|
// Numeric message id snapshot frozen the moment the user
|
|
@@ -1746,7 +1784,7 @@ const pt = {
|
|
|
1746
1784
|
markConvRead(e) {
|
|
1747
1785
|
var s, r;
|
|
1748
1786
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1749
|
-
const t = ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || [], n =
|
|
1787
|
+
const t = ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || [], n = At(t);
|
|
1750
1788
|
if (n == null) return;
|
|
1751
1789
|
const i = Y(e.last_read_message_id), a = Y(n);
|
|
1752
1790
|
a != null && (i != null && a <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
@@ -1755,11 +1793,11 @@ const pt = {
|
|
|
1755
1793
|
l.convId,
|
|
1756
1794
|
l.messageId
|
|
1757
1795
|
);
|
|
1758
|
-
},
|
|
1796
|
+
}, kt))));
|
|
1759
1797
|
}
|
|
1760
1798
|
}
|
|
1761
1799
|
};
|
|
1762
|
-
function
|
|
1800
|
+
function At(e) {
|
|
1763
1801
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
1764
1802
|
const n = e[t];
|
|
1765
1803
|
if (!(!n || n._pending) && Y(n.id) != null)
|
|
@@ -1772,7 +1810,7 @@ const B = (e, t) => {
|
|
|
1772
1810
|
for (const [i, a] of t)
|
|
1773
1811
|
n[i] = a;
|
|
1774
1812
|
return n;
|
|
1775
|
-
},
|
|
1813
|
+
}, St = {
|
|
1776
1814
|
name: "WmHumanAvatar",
|
|
1777
1815
|
props: {
|
|
1778
1816
|
name: { type: String, default: "" },
|
|
@@ -1786,16 +1824,16 @@ const B = (e, t) => {
|
|
|
1786
1824
|
},
|
|
1787
1825
|
computed: {
|
|
1788
1826
|
bg() {
|
|
1789
|
-
return this.avatarUrl ? "transparent" :
|
|
1827
|
+
return this.avatarUrl ? "transparent" : Me(this.name);
|
|
1790
1828
|
},
|
|
1791
1829
|
initials() {
|
|
1792
|
-
return
|
|
1830
|
+
return Te(this.name);
|
|
1793
1831
|
}
|
|
1794
1832
|
}
|
|
1795
|
-
},
|
|
1796
|
-
function
|
|
1833
|
+
}, Mt = ["src", "alt"];
|
|
1834
|
+
function Tt(e, t, n, i, a, s) {
|
|
1797
1835
|
return c(), d("div", {
|
|
1798
|
-
class:
|
|
1836
|
+
class: R(["wm-huav", { "wm-huav--tail": n.tail }]),
|
|
1799
1837
|
style: z({
|
|
1800
1838
|
width: n.size + "px",
|
|
1801
1839
|
height: n.size + "px",
|
|
@@ -1807,19 +1845,19 @@ function It(e, t, n, i, a, s) {
|
|
|
1807
1845
|
key: 0,
|
|
1808
1846
|
src: n.avatarUrl,
|
|
1809
1847
|
alt: n.name || ""
|
|
1810
|
-
}, null, 8,
|
|
1848
|
+
}, null, 8, Mt)) : (c(), d("span", {
|
|
1811
1849
|
key: 1,
|
|
1812
1850
|
style: z({ fontSize: n.size * 0.36 + "px" })
|
|
1813
1851
|
}, v(s.initials), 5))
|
|
1814
1852
|
], 6);
|
|
1815
1853
|
}
|
|
1816
|
-
const
|
|
1854
|
+
const ve = /* @__PURE__ */ B(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
|
|
1817
1855
|
name: "WmLauncher",
|
|
1818
|
-
components: { HumanAvatar:
|
|
1856
|
+
components: { HumanAvatar: ve },
|
|
1819
1857
|
inject: {
|
|
1820
1858
|
// Translator shared by the Messenger shell; French fallback when
|
|
1821
1859
|
// the component is used standalone.
|
|
1822
|
-
t: { default: () =>
|
|
1860
|
+
t: { default: () => F() }
|
|
1823
1861
|
},
|
|
1824
1862
|
props: {
|
|
1825
1863
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -1836,12 +1874,12 @@ const ge = /* @__PURE__ */ B(xt, [["render", It], ["__scopeId", "data-v-14e10c0d
|
|
|
1836
1874
|
// élément en ordre DOM avec un flex column normal). Les plus
|
|
1837
1875
|
// anciens remontent dans la pile.
|
|
1838
1876
|
visiblePeeks() {
|
|
1839
|
-
return this.peeks.slice(0,
|
|
1877
|
+
return this.peeks.slice(0, xt).reverse();
|
|
1840
1878
|
}
|
|
1841
1879
|
}
|
|
1842
|
-
}, Rt = ["aria-label", "onClick", "onKeydown"],
|
|
1843
|
-
function
|
|
1844
|
-
const r =
|
|
1880
|
+
}, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Nt = { class: "wm-peek__action" }, Ut = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
|
|
1881
|
+
function zt(e, t, n, i, a, s) {
|
|
1882
|
+
const r = E("HumanAvatar");
|
|
1845
1883
|
return c(), d("div", {
|
|
1846
1884
|
class: "wm-launcherWrap",
|
|
1847
1885
|
onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
|
|
@@ -1849,13 +1887,13 @@ function Vt(e, t, n, i, a, s) {
|
|
|
1849
1887
|
onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
|
|
1850
1888
|
onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
|
|
1851
1889
|
}, [
|
|
1852
|
-
V(
|
|
1853
|
-
default:
|
|
1890
|
+
V(Ue, { name: "wm-peek" }, {
|
|
1891
|
+
default: je(() => [
|
|
1854
1892
|
s.visiblePeeks.length ? (c(), d("div", {
|
|
1855
1893
|
key: 0,
|
|
1856
|
-
class:
|
|
1894
|
+
class: R(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1857
1895
|
}, [
|
|
1858
|
-
(c(!0), d(L, null,
|
|
1896
|
+
(c(!0), d(L, null, j(s.visiblePeeks, (l, g) => (c(), d("div", {
|
|
1859
1897
|
key: l.convId,
|
|
1860
1898
|
class: "wm-peek",
|
|
1861
1899
|
style: z({
|
|
@@ -1869,15 +1907,15 @@ function Vt(e, t, n, i, a, s) {
|
|
|
1869
1907
|
}),
|
|
1870
1908
|
onClick: (k) => e.$emit("open", l.convId),
|
|
1871
1909
|
onKeydown: [
|
|
1872
|
-
|
|
1873
|
-
|
|
1910
|
+
ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
|
|
1911
|
+
ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
|
|
1874
1912
|
]
|
|
1875
1913
|
}, [
|
|
1876
1914
|
o("button", {
|
|
1877
1915
|
type: "button",
|
|
1878
1916
|
class: "wm-peek__close",
|
|
1879
1917
|
"aria-label": s.t("launcher.dismiss"),
|
|
1880
|
-
onClick:
|
|
1918
|
+
onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
|
|
1881
1919
|
}, [...t[5] || (t[5] = [
|
|
1882
1920
|
o("svg", {
|
|
1883
1921
|
width: "9",
|
|
@@ -1892,8 +1930,8 @@ function Vt(e, t, n, i, a, s) {
|
|
|
1892
1930
|
}, [
|
|
1893
1931
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1894
1932
|
], -1)
|
|
1895
|
-
])], 8,
|
|
1896
|
-
o("div",
|
|
1933
|
+
])], 8, Lt),
|
|
1934
|
+
o("div", It, [
|
|
1897
1935
|
V(r, {
|
|
1898
1936
|
name: l.senderName,
|
|
1899
1937
|
"avatar-url": l.senderAvatarUrl,
|
|
@@ -1903,20 +1941,20 @@ function Vt(e, t, n, i, a, s) {
|
|
|
1903
1941
|
key: 0,
|
|
1904
1942
|
class: "wm-peek__avatarBadge",
|
|
1905
1943
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1906
|
-
}, v(l.count > 9 ? "9+" : l.count), 9,
|
|
1944
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
|
|
1907
1945
|
]),
|
|
1908
|
-
o("div",
|
|
1909
|
-
o("div",
|
|
1910
|
-
o("span",
|
|
1911
|
-
o("span",
|
|
1946
|
+
o("div", Bt, [
|
|
1947
|
+
o("div", Pt, [
|
|
1948
|
+
o("span", Dt, v(l.senderName || s.t("common.agent")), 1),
|
|
1949
|
+
o("span", Nt, v(s.t("launcher.repliedToYou")), 1)
|
|
1912
1950
|
]),
|
|
1913
|
-
o("p",
|
|
1951
|
+
o("p", Ut, v(l.preview), 1)
|
|
1914
1952
|
]),
|
|
1915
1953
|
o("button", {
|
|
1916
1954
|
type: "button",
|
|
1917
1955
|
class: "wm-peek__open",
|
|
1918
|
-
onClick:
|
|
1919
|
-
}, v(s.t("common.open")), 9,
|
|
1956
|
+
onClick: J((k) => e.$emit("open", l.convId), ["stop"])
|
|
1957
|
+
}, v(s.t("common.open")), 9, jt)
|
|
1920
1958
|
], 44, Rt))), 128))
|
|
1921
1959
|
], 2)) : b("", !0)
|
|
1922
1960
|
]),
|
|
@@ -1949,11 +1987,11 @@ function Vt(e, t, n, i, a, s) {
|
|
|
1949
1987
|
}) : s.t("launcher.unreadConversationsOne", {
|
|
1950
1988
|
count: n.unreadCount
|
|
1951
1989
|
})
|
|
1952
|
-
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9,
|
|
1953
|
-
], 8,
|
|
1990
|
+
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ht)) : b("", !0)
|
|
1991
|
+
], 8, Ft)
|
|
1954
1992
|
], 32);
|
|
1955
1993
|
}
|
|
1956
|
-
const
|
|
1994
|
+
const qt = /* @__PURE__ */ B(Ot, [["render", zt], ["__scopeId", "data-v-44ddf1a1"]]), $t = {
|
|
1957
1995
|
name: "WmAIAvatar",
|
|
1958
1996
|
props: {
|
|
1959
1997
|
size: { type: Number, default: 26 },
|
|
@@ -1976,28 +2014,28 @@ const Kt = /* @__PURE__ */ B(Et, [["render", Vt], ["__scopeId", "data-v-44ddf1a1
|
|
|
1976
2014
|
},
|
|
1977
2015
|
computed: {
|
|
1978
2016
|
initials() {
|
|
1979
|
-
return
|
|
2017
|
+
return Te(this.name);
|
|
1980
2018
|
},
|
|
1981
2019
|
bgColor() {
|
|
1982
|
-
return
|
|
2020
|
+
return Me(this.name);
|
|
1983
2021
|
}
|
|
1984
2022
|
}
|
|
1985
|
-
},
|
|
2023
|
+
}, Vt = {
|
|
1986
2024
|
key: 0,
|
|
1987
2025
|
class: "wm-aiav__pulse"
|
|
1988
|
-
},
|
|
1989
|
-
function
|
|
2026
|
+
}, Kt = ["src", "alt"], Wt = ["width", "height"];
|
|
2027
|
+
function Gt(e, t, n, i, a, s) {
|
|
1990
2028
|
return c(), d("div", {
|
|
1991
|
-
class:
|
|
2029
|
+
class: R(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
1992
2030
|
style: z({
|
|
1993
2031
|
width: n.size + "px",
|
|
1994
2032
|
height: n.size + "px",
|
|
1995
2033
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1996
2034
|
})
|
|
1997
2035
|
}, [
|
|
1998
|
-
n.pulse ? (c(), d("div",
|
|
2036
|
+
n.pulse ? (c(), d("div", Vt)) : b("", !0),
|
|
1999
2037
|
o("div", {
|
|
2000
|
-
class:
|
|
2038
|
+
class: R(["wm-aiav__inner", {
|
|
2001
2039
|
"wm-aiav__inner--glow": n.pulse,
|
|
2002
2040
|
"wm-aiav__inner--img": !!n.imageUrl,
|
|
2003
2041
|
"wm-aiav__inner--initials": !n.imageUrl && !!s.initials
|
|
@@ -2010,7 +2048,7 @@ function Jt(e, t, n, i, a, s) {
|
|
|
2010
2048
|
key: 0,
|
|
2011
2049
|
src: n.imageUrl,
|
|
2012
2050
|
alt: n.name || ""
|
|
2013
|
-
}, null, 8,
|
|
2051
|
+
}, null, 8, Kt)) : s.initials ? (c(), d("span", {
|
|
2014
2052
|
key: 1,
|
|
2015
2053
|
style: z({ fontSize: n.size * 0.36 + "px" })
|
|
2016
2054
|
}, v(s.initials), 5)) : (c(), d("svg", {
|
|
@@ -2040,11 +2078,11 @@ function Jt(e, t, n, i, a, s) {
|
|
|
2040
2078
|
fill: "white",
|
|
2041
2079
|
opacity: "0.38"
|
|
2042
2080
|
}, null, -1)
|
|
2043
|
-
])], 8,
|
|
2081
|
+
])], 8, Wt))
|
|
2044
2082
|
], 6)
|
|
2045
2083
|
], 6);
|
|
2046
2084
|
}
|
|
2047
|
-
const oe = /* @__PURE__ */ B(
|
|
2085
|
+
const oe = /* @__PURE__ */ B($t, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
|
|
2048
2086
|
name: "WmTeamAvatars",
|
|
2049
2087
|
props: {
|
|
2050
2088
|
members: { type: Array, default: () => [] },
|
|
@@ -2060,26 +2098,26 @@ const oe = /* @__PURE__ */ B(Wt, [["render", Jt], ["__scopeId", "data-v-6f7f685d
|
|
|
2060
2098
|
},
|
|
2061
2099
|
methods: {
|
|
2062
2100
|
colorFor(e) {
|
|
2063
|
-
return e.avatar_url ? "transparent" :
|
|
2101
|
+
return e.avatar_url ? "transparent" : Me(e.name || "");
|
|
2064
2102
|
},
|
|
2065
2103
|
initialsFor(e) {
|
|
2066
|
-
return
|
|
2104
|
+
return Te(e.name || "");
|
|
2067
2105
|
}
|
|
2068
2106
|
}
|
|
2069
|
-
},
|
|
2107
|
+
}, Jt = {
|
|
2070
2108
|
key: 0,
|
|
2071
2109
|
class: "wm-team"
|
|
2072
|
-
},
|
|
2110
|
+
}, Xt = ["src", "alt"], Qt = { key: 1 }, Zt = {
|
|
2073
2111
|
key: 0,
|
|
2074
2112
|
class: "wm-team__label"
|
|
2075
2113
|
};
|
|
2076
|
-
function
|
|
2077
|
-
return s.visible ? (c(), d("div",
|
|
2114
|
+
function en(e, t, n, i, a, s) {
|
|
2115
|
+
return s.visible ? (c(), d("div", Jt, [
|
|
2078
2116
|
o("div", {
|
|
2079
2117
|
class: "wm-team__stack",
|
|
2080
2118
|
style: z({ width: s.stackWidth + "px" })
|
|
2081
2119
|
}, [
|
|
2082
|
-
(c(!0), d(L, null,
|
|
2120
|
+
(c(!0), d(L, null, j(n.members.slice(0, 3), (r, l) => (c(), d("div", {
|
|
2083
2121
|
key: l,
|
|
2084
2122
|
class: "wm-team__pill",
|
|
2085
2123
|
style: z({
|
|
@@ -2092,19 +2130,19 @@ function sn(e, t, n, i, a, s) {
|
|
|
2092
2130
|
key: 0,
|
|
2093
2131
|
src: r.avatar_url,
|
|
2094
2132
|
alt: r.name || ""
|
|
2095
|
-
}, null, 8,
|
|
2133
|
+
}, null, 8, Xt)) : (c(), d("span", Qt, v(s.initialsFor(r)), 1))
|
|
2096
2134
|
], 4))), 128))
|
|
2097
2135
|
], 4),
|
|
2098
|
-
n.responseLabel ? (c(), d("span",
|
|
2136
|
+
n.responseLabel ? (c(), d("span", Zt, v(n.responseLabel), 1)) : b("", !0)
|
|
2099
2137
|
])) : b("", !0);
|
|
2100
2138
|
}
|
|
2101
|
-
const
|
|
2139
|
+
const tn = /* @__PURE__ */ B(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
|
|
2102
2140
|
name: "WmHeader",
|
|
2103
|
-
components: { AIAvatar: oe, TeamAvatars:
|
|
2141
|
+
components: { AIAvatar: oe, TeamAvatars: tn },
|
|
2104
2142
|
inject: {
|
|
2105
2143
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
2106
2144
|
// translator when the component is used standalone (no provider).
|
|
2107
|
-
t: { default: () =>
|
|
2145
|
+
t: { default: () => F() }
|
|
2108
2146
|
},
|
|
2109
2147
|
props: {
|
|
2110
2148
|
title: { type: String, default: "Nouvelle conversation" },
|
|
@@ -2137,16 +2175,16 @@ const rn = /* @__PURE__ */ B(Qt, [["render", sn], ["__scopeId", "data-v-e49a9063
|
|
|
2137
2175
|
return n;
|
|
2138
2176
|
}
|
|
2139
2177
|
}
|
|
2140
|
-
},
|
|
2178
|
+
}, sn = { class: "wm-header" }, rn = ["aria-label"], an = {
|
|
2141
2179
|
key: 1,
|
|
2142
2180
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
2143
|
-
},
|
|
2181
|
+
}, on = { class: "wm-header__avatar" }, ln = { class: "wm-header__main" }, cn = { class: "wm-header__title" }, dn = {
|
|
2144
2182
|
key: 3,
|
|
2145
2183
|
class: "wm-header__fill"
|
|
2146
|
-
},
|
|
2147
|
-
function
|
|
2148
|
-
const r =
|
|
2149
|
-
return c(), d("div",
|
|
2184
|
+
}, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
|
|
2185
|
+
function fn(e, t, n, i, a, s) {
|
|
2186
|
+
const r = E("AIAvatar"), l = E("TeamAvatars");
|
|
2187
|
+
return c(), d("div", sn, [
|
|
2150
2188
|
n.showBack ? (c(), d("button", {
|
|
2151
2189
|
key: 0,
|
|
2152
2190
|
type: "button",
|
|
@@ -2167,29 +2205,29 @@ function pn(e, t, n, i, a, s) {
|
|
|
2167
2205
|
}, [
|
|
2168
2206
|
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2169
2207
|
], -1)
|
|
2170
|
-
])], 8,
|
|
2208
|
+
])], 8, rn)) : (c(), d("div", an)),
|
|
2171
2209
|
n.showIdentity ? (c(), d(L, { key: 2 }, [
|
|
2172
|
-
o("div",
|
|
2210
|
+
o("div", on, [
|
|
2173
2211
|
V(r, {
|
|
2174
2212
|
size: 30,
|
|
2175
2213
|
name: n.agentName,
|
|
2176
2214
|
"image-url": n.agentAvatarUrl
|
|
2177
2215
|
}, null, 8, ["name", "image-url"])
|
|
2178
2216
|
]),
|
|
2179
|
-
o("div",
|
|
2180
|
-
o("div",
|
|
2217
|
+
o("div", ln, [
|
|
2218
|
+
o("div", cn, v(n.title), 1)
|
|
2181
2219
|
]),
|
|
2182
2220
|
s.hasTeam ? (c(), P(l, {
|
|
2183
2221
|
key: 0,
|
|
2184
2222
|
members: s.displayedTeamMembers,
|
|
2185
2223
|
"response-label": ""
|
|
2186
2224
|
}, null, 8, ["members"])) : b("", !0)
|
|
2187
|
-
], 64)) : (c(), d("div",
|
|
2188
|
-
o("div",
|
|
2225
|
+
], 64)) : (c(), d("div", dn)),
|
|
2226
|
+
o("div", un, [
|
|
2189
2227
|
n.showMore ? (c(), d("button", {
|
|
2190
2228
|
key: 0,
|
|
2191
2229
|
type: "button",
|
|
2192
|
-
class:
|
|
2230
|
+
class: R(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
|
|
2193
2231
|
"aria-label": s.t("header.moreOptions"),
|
|
2194
2232
|
title: s.t("header.moreOptions"),
|
|
2195
2233
|
onClick: t[1] || (t[1] = (g) => e.$emit("more"))
|
|
@@ -2217,7 +2255,7 @@ function pn(e, t, n, i, a, s) {
|
|
|
2217
2255
|
r: "1.6"
|
|
2218
2256
|
})
|
|
2219
2257
|
], -1)
|
|
2220
|
-
])], 10,
|
|
2258
|
+
])], 10, hn)) : b("", !0),
|
|
2221
2259
|
n.showClose ? (c(), d("button", {
|
|
2222
2260
|
key: 1,
|
|
2223
2261
|
type: "button",
|
|
@@ -2239,25 +2277,25 @@ function pn(e, t, n, i, a, s) {
|
|
|
2239
2277
|
}, [
|
|
2240
2278
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2241
2279
|
], -1)
|
|
2242
|
-
])], 8,
|
|
2280
|
+
])], 8, mn)) : b("", !0)
|
|
2243
2281
|
])
|
|
2244
2282
|
]);
|
|
2245
2283
|
}
|
|
2246
|
-
const
|
|
2284
|
+
const _n = /* @__PURE__ */ B(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
|
|
2247
2285
|
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",
|
|
2248
2286
|
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",
|
|
2249
2287
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
2250
2288
|
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",
|
|
2251
2289
|
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"
|
|
2252
|
-
},
|
|
2290
|
+
}, gn = {
|
|
2253
2291
|
name: "WmOnboarding",
|
|
2254
|
-
components: { AIAvatar: oe, HumanAvatar:
|
|
2292
|
+
components: { AIAvatar: oe, HumanAvatar: ve },
|
|
2255
2293
|
inject: {
|
|
2256
2294
|
// Translator + resolved-language getter shared by the Messenger
|
|
2257
2295
|
// shell. The language getter feeds `formatTs` (relative date
|
|
2258
2296
|
// labels on unread alerts) ; falls back to French when the
|
|
2259
2297
|
// component is used standalone.
|
|
2260
|
-
t: { default: () =>
|
|
2298
|
+
t: { default: () => F() },
|
|
2261
2299
|
wmLocale: { default: () => () => "fr" }
|
|
2262
2300
|
},
|
|
2263
2301
|
props: {
|
|
@@ -2283,7 +2321,7 @@ const vn = /* @__PURE__ */ B(an, [["render", pn], ["__scopeId", "data-v-7af4c118
|
|
|
2283
2321
|
},
|
|
2284
2322
|
methods: {
|
|
2285
2323
|
iconPath(e) {
|
|
2286
|
-
return
|
|
2324
|
+
return Pe[e] || Pe.link;
|
|
2287
2325
|
},
|
|
2288
2326
|
// True when activating the link opens an external destination
|
|
2289
2327
|
// (full URL or relative path) — anchor links (`#…`, which route
|
|
@@ -2297,7 +2335,7 @@ const vn = /* @__PURE__ */ B(an, [["render", pn], ["__scopeId", "data-v-7af4c118
|
|
|
2297
2335
|
// on the masked-glyph span and as the source of `--icon-url`
|
|
2298
2336
|
// (cf. iconUrlStyle).
|
|
2299
2337
|
safeIconUrl(e) {
|
|
2300
|
-
return
|
|
2338
|
+
return dt(e == null ? void 0 : e.icon_url);
|
|
2301
2339
|
},
|
|
2302
2340
|
// Inline style exposing the link's icon_url as a CSS custom
|
|
2303
2341
|
// property — only when the URL passes the safety gate, so a
|
|
@@ -2307,7 +2345,7 @@ const vn = /* @__PURE__ */ B(an, [["render", pn], ["__scopeId", "data-v-7af4c118
|
|
|
2307
2345
|
return t ? { "--icon-url": `url("${t}")` } : null;
|
|
2308
2346
|
},
|
|
2309
2347
|
renderPreview(e) {
|
|
2310
|
-
return
|
|
2348
|
+
return qe(e);
|
|
2311
2349
|
},
|
|
2312
2350
|
// Avatar resolution for a thread row, in priority order :
|
|
2313
2351
|
// 1. last sender's `avatar_url` (image)
|
|
@@ -2365,19 +2403,19 @@ const vn = /* @__PURE__ */ B(an, [["render", pn], ["__scopeId", "data-v-7af4c118
|
|
|
2365
2403
|
});
|
|
2366
2404
|
}
|
|
2367
2405
|
}
|
|
2368
|
-
},
|
|
2406
|
+
}, pn = { class: "wm-onb" }, vn = { class: "wm-onb__hero" }, yn = { class: "wm-onb__hero-text" }, wn = { class: "wm-onb__title" }, bn = { class: "wm-onb__sub" }, kn = {
|
|
2369
2407
|
key: 0,
|
|
2370
2408
|
class: "wm-onb__alertList"
|
|
2371
|
-
},
|
|
2409
|
+
}, Cn = ["onClick"], An = {
|
|
2372
2410
|
key: 0,
|
|
2373
2411
|
class: "wm-onb__defaultAvatar"
|
|
2374
|
-
},
|
|
2412
|
+
}, Sn = ["aria-label"], Mn = { class: "wm-onb__alert-body" }, Tn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
|
|
2375
2413
|
key: 0,
|
|
2376
2414
|
class: "wm-onb__alert-sender"
|
|
2377
|
-
}, Rn = ["innerHTML"],
|
|
2415
|
+
}, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
|
|
2378
2416
|
key: 0,
|
|
2379
2417
|
class: "wm-onb__alert-time"
|
|
2380
|
-
},
|
|
2418
|
+
}, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Nn = ["onClick"], Un = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
|
|
2381
2419
|
key: 1,
|
|
2382
2420
|
width: "18",
|
|
2383
2421
|
height: "18",
|
|
@@ -2388,7 +2426,7 @@ const vn = /* @__PURE__ */ B(an, [["render", pn], ["__scopeId", "data-v-7af4c118
|
|
|
2388
2426
|
"stroke-linecap": "round",
|
|
2389
2427
|
"stroke-linejoin": "round",
|
|
2390
2428
|
"aria-hidden": "true"
|
|
2391
|
-
},
|
|
2429
|
+
}, Hn = ["d"], zn = { class: "wm-onb__btn-label" }, qn = {
|
|
2392
2430
|
key: 0,
|
|
2393
2431
|
class: "wm-onb__btn-trail",
|
|
2394
2432
|
width: "13",
|
|
@@ -2400,7 +2438,7 @@ const vn = /* @__PURE__ */ B(an, [["render", pn], ["__scopeId", "data-v-7af4c118
|
|
|
2400
2438
|
"stroke-linecap": "round",
|
|
2401
2439
|
"stroke-linejoin": "round",
|
|
2402
2440
|
"aria-hidden": "true"
|
|
2403
|
-
},
|
|
2441
|
+
}, $n = { class: "wm-onb__btn-icon" }, Vn = {
|
|
2404
2442
|
width: "18",
|
|
2405
2443
|
height: "18",
|
|
2406
2444
|
viewBox: "0 0 24 24",
|
|
@@ -2410,11 +2448,11 @@ const vn = /* @__PURE__ */ B(an, [["render", pn], ["__scopeId", "data-v-7af4c118
|
|
|
2410
2448
|
"stroke-linecap": "round",
|
|
2411
2449
|
"stroke-linejoin": "round",
|
|
2412
2450
|
"aria-hidden": "true"
|
|
2413
|
-
},
|
|
2414
|
-
function
|
|
2415
|
-
const r =
|
|
2416
|
-
return c(), d("div",
|
|
2417
|
-
o("div",
|
|
2451
|
+
}, Kn = ["d"], Wn = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
|
|
2452
|
+
function Yn(e, t, n, i, a, s) {
|
|
2453
|
+
const r = E("AIAvatar");
|
|
2454
|
+
return c(), d("div", pn, [
|
|
2455
|
+
o("div", vn, [
|
|
2418
2456
|
t[2] || (t[2] = o("svg", {
|
|
2419
2457
|
class: "wm-onb__hero-deco",
|
|
2420
2458
|
width: "180",
|
|
@@ -2453,22 +2491,22 @@ function Qn(e, t, n, i, a, s) {
|
|
|
2453
2491
|
size: 52,
|
|
2454
2492
|
"image-url": n.defaultIconUrl
|
|
2455
2493
|
}, null, 8, ["image-url"]),
|
|
2456
|
-
o("div",
|
|
2457
|
-
o("div",
|
|
2458
|
-
o("div",
|
|
2494
|
+
o("div", yn, [
|
|
2495
|
+
o("div", wn, v(s.heroTitle), 1),
|
|
2496
|
+
o("div", bn, v(s.heroSub), 1)
|
|
2459
2497
|
])
|
|
2460
2498
|
]),
|
|
2461
|
-
s.unreadThreads.length ? (c(), d("div",
|
|
2462
|
-
(c(!0), d(L, null,
|
|
2499
|
+
s.unreadThreads.length ? (c(), d("div", kn, [
|
|
2500
|
+
(c(!0), d(L, null, j(s.unreadThreads, (l) => (c(), d("button", {
|
|
2463
2501
|
key: l.id,
|
|
2464
2502
|
type: "button",
|
|
2465
2503
|
class: "wm-onb__alert",
|
|
2466
2504
|
onClick: (g) => e.$emit("resume", l)
|
|
2467
2505
|
}, [
|
|
2468
2506
|
o("span", {
|
|
2469
|
-
class:
|
|
2507
|
+
class: R(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
|
|
2470
2508
|
}, [
|
|
2471
|
-
s.isDefaultAvatar(l) ? (c(), d("span",
|
|
2509
|
+
s.isDefaultAvatar(l) ? (c(), d("span", An, [...t[3] || (t[3] = [
|
|
2472
2510
|
o("svg", {
|
|
2473
2511
|
width: "20",
|
|
2474
2512
|
height: "20",
|
|
@@ -2482,31 +2520,31 @@ function Qn(e, t, n, i, a, s) {
|
|
|
2482
2520
|
}, [
|
|
2483
2521
|
o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
2484
2522
|
], -1)
|
|
2485
|
-
])])) : (c(), P(
|
|
2523
|
+
])])) : (c(), P(Ae(s.avatarComponent(l)), Fe({
|
|
2486
2524
|
key: 1,
|
|
2487
2525
|
ref_for: !0
|
|
2488
2526
|
}, s.avatarProps(l)), null, 16)),
|
|
2489
2527
|
o("span", {
|
|
2490
2528
|
class: "wm-onb__alert-dot",
|
|
2491
2529
|
"aria-label": s.t("onboarding.unread")
|
|
2492
|
-
}, null, 8,
|
|
2530
|
+
}, null, 8, Sn)
|
|
2493
2531
|
], 2),
|
|
2494
|
-
o("span",
|
|
2495
|
-
o("span",
|
|
2496
|
-
o("span",
|
|
2497
|
-
s.senderLabel(l) ? (c(), d("span",
|
|
2532
|
+
o("span", Mn, [
|
|
2533
|
+
o("span", Tn, v(l.title), 1),
|
|
2534
|
+
o("span", xn, [
|
|
2535
|
+
s.senderLabel(l) ? (c(), d("span", On, v(s.senderLabel(l)) + " · ", 1)) : b("", !0),
|
|
2498
2536
|
o("span", {
|
|
2499
2537
|
innerHTML: s.renderPreview(l.preview)
|
|
2500
2538
|
}, null, 8, Rn)
|
|
2501
2539
|
])
|
|
2502
2540
|
]),
|
|
2503
|
-
o("span",
|
|
2504
|
-
s.formatTs(l._ts) ? (c(), d("span",
|
|
2505
|
-
o("span",
|
|
2541
|
+
o("span", Ln, [
|
|
2542
|
+
s.formatTs(l._ts) ? (c(), d("span", In, v(s.formatTs(l._ts)), 1)) : b("", !0),
|
|
2543
|
+
o("span", En, v(s.t("onboarding.resume")), 1)
|
|
2506
2544
|
])
|
|
2507
|
-
], 8,
|
|
2545
|
+
], 8, Cn))), 128))
|
|
2508
2546
|
])) : b("", !0),
|
|
2509
|
-
o("div",
|
|
2547
|
+
o("div", Bn, [
|
|
2510
2548
|
o("button", {
|
|
2511
2549
|
type: "button",
|
|
2512
2550
|
class: "wm-onb__btn wm-onb__btn--start",
|
|
@@ -2528,47 +2566,47 @@ function Qn(e, t, n, i, a, s) {
|
|
|
2528
2566
|
o("path", { d: "M12 5v14M5 12h14" })
|
|
2529
2567
|
])
|
|
2530
2568
|
], -1)),
|
|
2531
|
-
o("span",
|
|
2532
|
-
], 8,
|
|
2533
|
-
(c(!0), d(L, null,
|
|
2569
|
+
o("span", Dn, v(n.busy ? "…" : s.t("onboarding.start")), 1)
|
|
2570
|
+
], 8, Pn),
|
|
2571
|
+
(c(!0), d(L, null, j(n.quickLinks, (l, g) => (c(), d("button", {
|
|
2534
2572
|
key: "ql-" + g,
|
|
2535
2573
|
type: "button",
|
|
2536
2574
|
class: "wm-onb__btn",
|
|
2537
2575
|
onClick: (k) => e.$emit("select", l)
|
|
2538
2576
|
}, [
|
|
2539
|
-
o("span",
|
|
2577
|
+
o("span", Un, [
|
|
2540
2578
|
s.safeIconUrl(l) ? (c(), d("span", {
|
|
2541
2579
|
key: 0,
|
|
2542
2580
|
class: "wm-onb__btn-iconImg",
|
|
2543
2581
|
style: z(s.iconUrlStyle(l)),
|
|
2544
2582
|
role: "img",
|
|
2545
2583
|
"aria-label": l.label || ""
|
|
2546
|
-
}, null, 12,
|
|
2584
|
+
}, null, 12, jn)) : (c(), d("svg", Fn, [
|
|
2547
2585
|
o("path", {
|
|
2548
2586
|
d: s.iconPath(l.icon)
|
|
2549
|
-
}, null, 8,
|
|
2587
|
+
}, null, 8, Hn)
|
|
2550
2588
|
]))
|
|
2551
2589
|
]),
|
|
2552
|
-
o("span",
|
|
2553
|
-
s.isExternalLink(l) ? (c(), d("svg",
|
|
2590
|
+
o("span", zn, v(l.label), 1),
|
|
2591
|
+
s.isExternalLink(l) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
|
|
2554
2592
|
o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
|
|
2555
2593
|
])])) : b("", !0)
|
|
2556
|
-
], 8,
|
|
2594
|
+
], 8, Nn))), 128)),
|
|
2557
2595
|
n.openThreads.length ? (c(), d("button", {
|
|
2558
2596
|
key: 0,
|
|
2559
2597
|
type: "button",
|
|
2560
2598
|
class: "wm-onb__btn",
|
|
2561
2599
|
onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
|
|
2562
2600
|
}, [
|
|
2563
|
-
o("span",
|
|
2564
|
-
(c(), d("svg",
|
|
2601
|
+
o("span", $n, [
|
|
2602
|
+
(c(), d("svg", Vn, [
|
|
2565
2603
|
o("path", {
|
|
2566
2604
|
d: s.iconPath("chat")
|
|
2567
|
-
}, null, 8,
|
|
2605
|
+
}, null, 8, Kn)
|
|
2568
2606
|
]))
|
|
2569
2607
|
]),
|
|
2570
|
-
o("span",
|
|
2571
|
-
o("span",
|
|
2608
|
+
o("span", Wn, v(s.t("onboarding.allConversations")), 1),
|
|
2609
|
+
o("span", Gn, v(n.openThreads.length), 1),
|
|
2572
2610
|
t[6] || (t[6] = o("svg", {
|
|
2573
2611
|
class: "wm-onb__btn-trail",
|
|
2574
2612
|
width: "13",
|
|
@@ -2587,11 +2625,11 @@ function Qn(e, t, n, i, a, s) {
|
|
|
2587
2625
|
])
|
|
2588
2626
|
]);
|
|
2589
2627
|
}
|
|
2590
|
-
const
|
|
2628
|
+
const Jn = /* @__PURE__ */ B(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
|
|
2591
2629
|
name: "WmHistory",
|
|
2592
|
-
components: { AIAvatar: oe, HumanAvatar:
|
|
2630
|
+
components: { AIAvatar: oe, HumanAvatar: ve },
|
|
2593
2631
|
inject: {
|
|
2594
|
-
t: { default: () =>
|
|
2632
|
+
t: { default: () => F() },
|
|
2595
2633
|
wmLocale: { default: () => () => "fr" }
|
|
2596
2634
|
},
|
|
2597
2635
|
props: {
|
|
@@ -2611,7 +2649,7 @@ const Zn = /* @__PURE__ */ B(yn, [["render", Qn], ["__scopeId", "data-v-96c105fa
|
|
|
2611
2649
|
},
|
|
2612
2650
|
methods: {
|
|
2613
2651
|
renderPreview(e) {
|
|
2614
|
-
return
|
|
2652
|
+
return qe(e);
|
|
2615
2653
|
},
|
|
2616
2654
|
avatarComponent(e) {
|
|
2617
2655
|
var t;
|
|
@@ -2656,19 +2694,19 @@ const Zn = /* @__PURE__ */ B(yn, [["render", Qn], ["__scopeId", "data-v-96c105fa
|
|
|
2656
2694
|
});
|
|
2657
2695
|
}
|
|
2658
2696
|
}
|
|
2659
|
-
},
|
|
2697
|
+
}, Qn = { class: "wm-hist" }, Zn = { class: "wm-hist__search" }, es = ["placeholder", "aria-label"], ts = { class: "wm-hist__list" }, ns = ["onClick"], ss = {
|
|
2660
2698
|
key: 0,
|
|
2661
2699
|
class: "wm-hist__defaultAvatar"
|
|
2662
|
-
},
|
|
2700
|
+
}, rs = ["aria-label"], is = { class: "wm-hist__thread-body" }, as = { class: "wm-hist__thread-title" }, os = ["innerHTML"], ls = { class: "wm-hist__thread-meta" }, cs = {
|
|
2663
2701
|
key: 0,
|
|
2664
2702
|
class: "wm-hist__thread-time"
|
|
2665
|
-
},
|
|
2703
|
+
}, ds = {
|
|
2666
2704
|
key: 0,
|
|
2667
2705
|
class: "wm-hist__empty"
|
|
2668
2706
|
};
|
|
2669
|
-
function
|
|
2670
|
-
return c(), d("div",
|
|
2671
|
-
o("div",
|
|
2707
|
+
function us(e, t, n, i, a, s) {
|
|
2708
|
+
return c(), d("div", Qn, [
|
|
2709
|
+
o("div", Zn, [
|
|
2672
2710
|
t[1] || (t[1] = o("span", { class: "wm-hist__searchIcon" }, [
|
|
2673
2711
|
o("svg", {
|
|
2674
2712
|
width: "13",
|
|
@@ -2689,21 +2727,21 @@ function fs(e, t, n, i, a, s) {
|
|
|
2689
2727
|
type: "text",
|
|
2690
2728
|
placeholder: s.t("onboarding.search"),
|
|
2691
2729
|
"aria-label": s.t("onboarding.search")
|
|
2692
|
-
}, null, 8,
|
|
2730
|
+
}, null, 8, es), [
|
|
2693
2731
|
[te, a.query]
|
|
2694
2732
|
])
|
|
2695
2733
|
]),
|
|
2696
|
-
o("div",
|
|
2697
|
-
(c(!0), d(L, null,
|
|
2734
|
+
o("div", ts, [
|
|
2735
|
+
(c(!0), d(L, null, j(s.filteredThreads, (r) => (c(), d("button", {
|
|
2698
2736
|
key: r.id,
|
|
2699
2737
|
type: "button",
|
|
2700
|
-
class:
|
|
2738
|
+
class: R(["wm-hist__thread", { "wm-hist__thread--unread": r.unread }]),
|
|
2701
2739
|
onClick: (l) => e.$emit("resume", r)
|
|
2702
2740
|
}, [
|
|
2703
2741
|
o("span", {
|
|
2704
|
-
class:
|
|
2742
|
+
class: R(["wm-hist__thread-avatar", s.avatarWrapperClass(r)])
|
|
2705
2743
|
}, [
|
|
2706
|
-
s.isDefaultAvatar(r) ? (c(), d("span",
|
|
2744
|
+
s.isDefaultAvatar(r) ? (c(), d("span", ss, [...t[2] || (t[2] = [
|
|
2707
2745
|
o("svg", {
|
|
2708
2746
|
width: "18",
|
|
2709
2747
|
height: "18",
|
|
@@ -2717,7 +2755,7 @@ function fs(e, t, n, i, a, s) {
|
|
|
2717
2755
|
}, [
|
|
2718
2756
|
o("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
|
|
2719
2757
|
], -1)
|
|
2720
|
-
])])) : (c(), P(
|
|
2758
|
+
])])) : (c(), P(Ae(s.avatarComponent(r)), Fe({
|
|
2721
2759
|
key: 1,
|
|
2722
2760
|
ref_for: !0
|
|
2723
2761
|
}, s.avatarProps(r)), null, 16)),
|
|
@@ -2725,17 +2763,17 @@ function fs(e, t, n, i, a, s) {
|
|
|
2725
2763
|
key: 2,
|
|
2726
2764
|
class: "wm-hist__thread-dot",
|
|
2727
2765
|
"aria-label": s.t("onboarding.unread")
|
|
2728
|
-
}, null, 8,
|
|
2766
|
+
}, null, 8, rs)) : b("", !0)
|
|
2729
2767
|
], 2),
|
|
2730
|
-
o("span",
|
|
2731
|
-
o("span",
|
|
2768
|
+
o("span", is, [
|
|
2769
|
+
o("span", as, v(r.title), 1),
|
|
2732
2770
|
o("span", {
|
|
2733
2771
|
class: "wm-hist__thread-preview",
|
|
2734
2772
|
innerHTML: s.renderPreview(r.preview)
|
|
2735
|
-
}, null, 8,
|
|
2773
|
+
}, null, 8, os)
|
|
2736
2774
|
]),
|
|
2737
|
-
o("span",
|
|
2738
|
-
s.formatTs(r._ts) ? (c(), d("span",
|
|
2775
|
+
o("span", ls, [
|
|
2776
|
+
s.formatTs(r._ts) ? (c(), d("span", cs, v(s.formatTs(r._ts)), 1)) : b("", !0),
|
|
2739
2777
|
t[3] || (t[3] = o("svg", {
|
|
2740
2778
|
width: "14",
|
|
2741
2779
|
height: "14",
|
|
@@ -2751,16 +2789,16 @@ function fs(e, t, n, i, a, s) {
|
|
|
2751
2789
|
o("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2752
2790
|
], -1))
|
|
2753
2791
|
])
|
|
2754
|
-
], 10,
|
|
2755
|
-
s.filteredThreads.length ? b("", !0) : (c(), d("div",
|
|
2792
|
+
], 10, ns))), 128)),
|
|
2793
|
+
s.filteredThreads.length ? b("", !0) : (c(), d("div", ds, v(a.query ? s.t("onboarding.noResults", { query: a.query }) : s.t("onboarding.noConversations")), 1))
|
|
2756
2794
|
])
|
|
2757
2795
|
]);
|
|
2758
2796
|
}
|
|
2759
|
-
const
|
|
2760
|
-
function
|
|
2797
|
+
const hs = /* @__PURE__ */ B(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
|
|
2798
|
+
function ms(e) {
|
|
2761
2799
|
return typeof e != "string" ? "" : e.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
|
|
2762
2800
|
}
|
|
2763
|
-
const
|
|
2801
|
+
const fs = {
|
|
2764
2802
|
name: "WmActionResult",
|
|
2765
2803
|
props: {
|
|
2766
2804
|
state: { type: String, default: "success" },
|
|
@@ -2770,13 +2808,13 @@ const ps = {
|
|
|
2770
2808
|
},
|
|
2771
2809
|
computed: {
|
|
2772
2810
|
detailText() {
|
|
2773
|
-
return
|
|
2811
|
+
return ms(this.detail);
|
|
2774
2812
|
}
|
|
2775
2813
|
}
|
|
2776
|
-
},
|
|
2814
|
+
}, _s = {
|
|
2777
2815
|
class: "wm-result__icon",
|
|
2778
2816
|
"aria-hidden": "true"
|
|
2779
|
-
},
|
|
2817
|
+
}, gs = {
|
|
2780
2818
|
key: 0,
|
|
2781
2819
|
width: "11",
|
|
2782
2820
|
height: "11",
|
|
@@ -2786,7 +2824,7 @@ const ps = {
|
|
|
2786
2824
|
"stroke-width": "2.8",
|
|
2787
2825
|
"stroke-linecap": "round",
|
|
2788
2826
|
"stroke-linejoin": "round"
|
|
2789
|
-
},
|
|
2827
|
+
}, ps = {
|
|
2790
2828
|
key: 1,
|
|
2791
2829
|
width: "11",
|
|
2792
2830
|
height: "11",
|
|
@@ -2796,7 +2834,7 @@ const ps = {
|
|
|
2796
2834
|
"stroke-width": "2.6",
|
|
2797
2835
|
"stroke-linecap": "round",
|
|
2798
2836
|
"stroke-linejoin": "round"
|
|
2799
|
-
},
|
|
2837
|
+
}, vs = {
|
|
2800
2838
|
key: 2,
|
|
2801
2839
|
width: "11",
|
|
2802
2840
|
height: "11",
|
|
@@ -2806,7 +2844,7 @@ const ps = {
|
|
|
2806
2844
|
"stroke-width": "2.4",
|
|
2807
2845
|
"stroke-linecap": "round",
|
|
2808
2846
|
"stroke-linejoin": "round"
|
|
2809
|
-
},
|
|
2847
|
+
}, ys = {
|
|
2810
2848
|
key: 3,
|
|
2811
2849
|
width: "12",
|
|
2812
2850
|
height: "12",
|
|
@@ -2816,24 +2854,24 @@ const ps = {
|
|
|
2816
2854
|
"stroke-width": "2.2",
|
|
2817
2855
|
"stroke-linecap": "round",
|
|
2818
2856
|
"stroke-linejoin": "round"
|
|
2819
|
-
},
|
|
2820
|
-
function
|
|
2857
|
+
}, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
|
|
2858
|
+
function Cs(e, t, n, i, a, s) {
|
|
2821
2859
|
return c(), d("div", {
|
|
2822
|
-
class:
|
|
2860
|
+
class: R(["wm-result", `wm-result--${n.state}`])
|
|
2823
2861
|
}, [
|
|
2824
|
-
o("span",
|
|
2825
|
-
n.state === "success" ? (c(), d("svg",
|
|
2862
|
+
o("span", _s, [
|
|
2863
|
+
n.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
|
|
2826
2864
|
o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2827
|
-
])])) : n.state === "rejected" ? (c(), d("svg",
|
|
2865
|
+
])])) : n.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
|
|
2828
2866
|
o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2829
|
-
])])) : n.state === "awaiting" ? (c(), d("svg",
|
|
2867
|
+
])])) : n.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
|
|
2830
2868
|
o("circle", {
|
|
2831
2869
|
cx: "12",
|
|
2832
2870
|
cy: "12",
|
|
2833
2871
|
r: "10"
|
|
2834
2872
|
}, null, -1),
|
|
2835
2873
|
o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2836
|
-
])])) : (c(), d("svg",
|
|
2874
|
+
])])) : (c(), d("svg", ys, [...t[3] || (t[3] = [
|
|
2837
2875
|
o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
2838
2876
|
o("line", {
|
|
2839
2877
|
x1: "12",
|
|
@@ -2849,24 +2887,24 @@ function Ms(e, t, n, i, a, s) {
|
|
|
2849
2887
|
}, null, -1)
|
|
2850
2888
|
])]))
|
|
2851
2889
|
]),
|
|
2852
|
-
o("span",
|
|
2853
|
-
o("span",
|
|
2890
|
+
o("span", ws, [
|
|
2891
|
+
o("span", bs, v(n.label), 1),
|
|
2854
2892
|
s.detailText ? (c(), d(L, { key: 0 }, [
|
|
2855
2893
|
t[4] || (t[4] = o("span", {
|
|
2856
2894
|
class: "wm-result__sep",
|
|
2857
2895
|
"aria-hidden": "true"
|
|
2858
2896
|
}, " · ", -1)),
|
|
2859
|
-
o("span",
|
|
2897
|
+
o("span", ks, v(s.detailText), 1)
|
|
2860
2898
|
], 64)) : b("", !0)
|
|
2861
2899
|
])
|
|
2862
2900
|
], 2);
|
|
2863
2901
|
}
|
|
2864
|
-
const
|
|
2902
|
+
const As = /* @__PURE__ */ B(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
|
|
2865
2903
|
name: "WmArtifactFormResponse",
|
|
2866
2904
|
inject: {
|
|
2867
2905
|
// Translator shared by the Messenger shell; French fallback when
|
|
2868
2906
|
// the component is used standalone.
|
|
2869
|
-
t: { default: () =>
|
|
2907
|
+
t: { default: () => F() }
|
|
2870
2908
|
},
|
|
2871
2909
|
props: {
|
|
2872
2910
|
data: { type: Object, required: !0 }
|
|
@@ -2877,12 +2915,12 @@ const Ts = /* @__PURE__ */ B(ps, [["render", Ms], ["__scopeId", "data-v-7284acd0
|
|
|
2877
2915
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2878
2916
|
}
|
|
2879
2917
|
}
|
|
2880
|
-
},
|
|
2881
|
-
function
|
|
2882
|
-
return c(), d("div",
|
|
2883
|
-
o("div",
|
|
2884
|
-
o("div",
|
|
2885
|
-
o("span",
|
|
2918
|
+
}, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
|
|
2919
|
+
function Is(e, t, n, i, a, s) {
|
|
2920
|
+
return c(), d("div", Ms, [
|
|
2921
|
+
o("div", Ts, [
|
|
2922
|
+
o("div", xs, v(n.data.title || s.t("form.title")), 1),
|
|
2923
|
+
o("span", Os, [
|
|
2886
2924
|
t[0] || (t[0] = o("svg", {
|
|
2887
2925
|
width: "11",
|
|
2888
2926
|
height: "11",
|
|
@@ -2896,17 +2934,17 @@ function Ps(e, t, n, i, a, s) {
|
|
|
2896
2934
|
}, [
|
|
2897
2935
|
o("polyline", { points: "20 6 9 17 4 12" })
|
|
2898
2936
|
], -1)),
|
|
2899
|
-
|
|
2937
|
+
Se(" " + v(s.t("form.sent")), 1)
|
|
2900
2938
|
])
|
|
2901
2939
|
]),
|
|
2902
2940
|
o("div", Rs, [
|
|
2903
|
-
(c(!0), d(L, null,
|
|
2941
|
+
(c(!0), d(L, null, j(s.fields, (r, l) => (c(), d("div", {
|
|
2904
2942
|
key: l,
|
|
2905
2943
|
class: "wm-art__field"
|
|
2906
2944
|
}, [
|
|
2907
|
-
o("div",
|
|
2945
|
+
o("div", Ls, v(r.label), 1),
|
|
2908
2946
|
o("div", {
|
|
2909
|
-
class:
|
|
2947
|
+
class: R([
|
|
2910
2948
|
"wm-art__fieldValue",
|
|
2911
2949
|
{ "wm-art__fieldValue--multi": r.multiline }
|
|
2912
2950
|
])
|
|
@@ -2915,7 +2953,7 @@ function Ps(e, t, n, i, a, s) {
|
|
|
2915
2953
|
])
|
|
2916
2954
|
]);
|
|
2917
2955
|
}
|
|
2918
|
-
const
|
|
2956
|
+
const Es = /* @__PURE__ */ B(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
|
|
2919
2957
|
name: "WmArtifactInfoCard",
|
|
2920
2958
|
props: {
|
|
2921
2959
|
data: { type: Object, required: !0 }
|
|
@@ -2930,50 +2968,50 @@ const Ns = /* @__PURE__ */ B(xs, [["render", Ps], ["__scopeId", "data-v-713aecf1
|
|
|
2930
2968
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2931
2969
|
}
|
|
2932
2970
|
}
|
|
2933
|
-
},
|
|
2971
|
+
}, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
|
|
2934
2972
|
key: 0,
|
|
2935
2973
|
class: "wm-art__image"
|
|
2936
|
-
},
|
|
2974
|
+
}, Ns = ["src", "alt"], Us = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
|
|
2937
2975
|
key: 0,
|
|
2938
2976
|
class: "wm-art__subtitle"
|
|
2939
|
-
},
|
|
2977
|
+
}, zs = {
|
|
2940
2978
|
key: 1,
|
|
2941
2979
|
class: "wm-art__body"
|
|
2942
|
-
},
|
|
2980
|
+
}, qs = {
|
|
2943
2981
|
key: 0,
|
|
2944
2982
|
class: "wm-art__text"
|
|
2945
|
-
},
|
|
2946
|
-
function
|
|
2947
|
-
return c(), d("div",
|
|
2948
|
-
n.data.image_url ? (c(), d("figure",
|
|
2983
|
+
}, $s = { class: "wm-art__fieldLabel" };
|
|
2984
|
+
function Vs(e, t, n, i, a, s) {
|
|
2985
|
+
return c(), d("div", Ps, [
|
|
2986
|
+
n.data.image_url ? (c(), d("figure", Ds, [
|
|
2949
2987
|
o("img", {
|
|
2950
2988
|
src: n.data.image_url,
|
|
2951
2989
|
alt: n.data.title || "",
|
|
2952
2990
|
loading: "lazy"
|
|
2953
|
-
}, null, 8,
|
|
2991
|
+
}, null, 8, Ns)
|
|
2954
2992
|
])) : b("", !0),
|
|
2955
|
-
o("div",
|
|
2956
|
-
o("div",
|
|
2957
|
-
o("div",
|
|
2958
|
-
n.data.subtitle ? (c(), d("div",
|
|
2993
|
+
o("div", Us, [
|
|
2994
|
+
o("div", js, [
|
|
2995
|
+
o("div", Fs, v(n.data.title), 1),
|
|
2996
|
+
n.data.subtitle ? (c(), d("div", Hs, v(n.data.subtitle), 1)) : b("", !0)
|
|
2959
2997
|
]),
|
|
2960
2998
|
n.data.badge && n.data.badge.label ? (c(), d("span", {
|
|
2961
2999
|
key: 0,
|
|
2962
|
-
class:
|
|
3000
|
+
class: R([
|
|
2963
3001
|
"wm-art__badge",
|
|
2964
3002
|
`wm-art__badge--${n.data.badge.tone || "neutral"}`
|
|
2965
3003
|
])
|
|
2966
3004
|
}, v(n.data.badge.label), 3)) : b("", !0)
|
|
2967
3005
|
]),
|
|
2968
|
-
s.hasBody ? (c(), d("div",
|
|
2969
|
-
n.data.body ? (c(), d("div",
|
|
2970
|
-
s.fields.length ? (c(!0), d(L, { key: 1 },
|
|
3006
|
+
s.hasBody ? (c(), d("div", zs, [
|
|
3007
|
+
n.data.body ? (c(), d("div", qs, v(n.data.body), 1)) : b("", !0),
|
|
3008
|
+
s.fields.length ? (c(!0), d(L, { key: 1 }, j(s.fields, (r, l) => (c(), d("div", {
|
|
2971
3009
|
key: l,
|
|
2972
3010
|
class: "wm-art__field"
|
|
2973
3011
|
}, [
|
|
2974
|
-
o("div",
|
|
3012
|
+
o("div", $s, v(r.label), 1),
|
|
2975
3013
|
o("div", {
|
|
2976
|
-
class:
|
|
3014
|
+
class: R([
|
|
2977
3015
|
"wm-art__fieldValue",
|
|
2978
3016
|
{ "wm-art__fieldValue--multi": r.multiline }
|
|
2979
3017
|
])
|
|
@@ -2982,8 +3020,8 @@ function Gs(e, t, n, i, a, s) {
|
|
|
2982
3020
|
])) : b("", !0)
|
|
2983
3021
|
]);
|
|
2984
3022
|
}
|
|
2985
|
-
const
|
|
2986
|
-
function
|
|
3023
|
+
const Ks = /* @__PURE__ */ B(Bs, [["render", Vs], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
3024
|
+
function Ws(e, t, n) {
|
|
2987
3025
|
if (!e) return "";
|
|
2988
3026
|
const i = new Date(e);
|
|
2989
3027
|
if (Number.isNaN(i.getTime())) return e;
|
|
@@ -2997,12 +3035,12 @@ function Xs(e, t, n) {
|
|
|
2997
3035
|
});
|
|
2998
3036
|
return `${a}${n}${s}`;
|
|
2999
3037
|
}
|
|
3000
|
-
const
|
|
3038
|
+
const Gs = {
|
|
3001
3039
|
name: "WmArtifactTicket",
|
|
3002
3040
|
inject: {
|
|
3003
3041
|
// Translator + resolved-language getter shared by the Messenger
|
|
3004
3042
|
// shell. Fall back to French wording when used standalone.
|
|
3005
|
-
t: { default: () =>
|
|
3043
|
+
t: { default: () => F() },
|
|
3006
3044
|
wmLocale: { default: () => () => "fr" }
|
|
3007
3045
|
},
|
|
3008
3046
|
props: {
|
|
@@ -3015,7 +3053,7 @@ const Js = {
|
|
|
3015
3053
|
},
|
|
3016
3054
|
formattedDate() {
|
|
3017
3055
|
var e;
|
|
3018
|
-
return
|
|
3056
|
+
return Ws(
|
|
3019
3057
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
3020
3058
|
ne(this.wmLocale()),
|
|
3021
3059
|
this.t("ticket.dateAt")
|
|
@@ -3043,13 +3081,13 @@ const Js = {
|
|
|
3043
3081
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
3044
3082
|
}
|
|
3045
3083
|
}
|
|
3046
|
-
},
|
|
3084
|
+
}, Ys = { class: "wm-art wm-art--ticket" }, Js = { class: "wm-art__head wm-tk__head" }, Xs = { class: "wm-art__title wm-tk__title" }, Qs = { class: "wm-tk__sub" }, Zs = { class: "wm-tk__ref" }, er = {
|
|
3047
3085
|
key: 0,
|
|
3048
3086
|
class: "wm-tk__text"
|
|
3049
|
-
},
|
|
3087
|
+
}, tr = {
|
|
3050
3088
|
key: 0,
|
|
3051
3089
|
class: "wm-art__body"
|
|
3052
|
-
},
|
|
3090
|
+
}, nr = { class: "wm-art__fieldLabel" }, sr = ["data-level"], rr = {
|
|
3053
3091
|
key: 1,
|
|
3054
3092
|
class: "wm-tk__date",
|
|
3055
3093
|
width: "12",
|
|
@@ -3061,16 +3099,16 @@ const Js = {
|
|
|
3061
3099
|
"stroke-linecap": "round",
|
|
3062
3100
|
"stroke-linejoin": "round",
|
|
3063
3101
|
"aria-hidden": "true"
|
|
3064
|
-
},
|
|
3102
|
+
}, ir = {
|
|
3065
3103
|
key: 1,
|
|
3066
3104
|
class: "wm-art__footer wm-tk__footer"
|
|
3067
3105
|
};
|
|
3068
|
-
function
|
|
3069
|
-
return c(), d("div",
|
|
3070
|
-
o("div",
|
|
3071
|
-
o("div",
|
|
3072
|
-
o("div",
|
|
3073
|
-
o("div",
|
|
3106
|
+
function ar(e, t, n, i, a, s) {
|
|
3107
|
+
return c(), d("div", Ys, [
|
|
3108
|
+
o("div", Js, [
|
|
3109
|
+
o("div", Xs, v(n.data.title), 1),
|
|
3110
|
+
o("div", Qs, [
|
|
3111
|
+
o("div", Zs, [
|
|
3074
3112
|
t[0] || (t[0] = o("svg", {
|
|
3075
3113
|
width: "11",
|
|
3076
3114
|
height: "11",
|
|
@@ -3088,7 +3126,7 @@ function cr(e, t, n, i, a, s) {
|
|
|
3088
3126
|
o("span", null, v(n.data.reference), 1)
|
|
3089
3127
|
]),
|
|
3090
3128
|
o("span", {
|
|
3091
|
-
class:
|
|
3129
|
+
class: R([
|
|
3092
3130
|
"wm-art__badge",
|
|
3093
3131
|
"wm-tk__badge",
|
|
3094
3132
|
`wm-art__badge--${n.data.status.tone || "neutral"}`
|
|
@@ -3098,19 +3136,19 @@ function cr(e, t, n, i, a, s) {
|
|
|
3098
3136
|
class: "wm-tk__dot",
|
|
3099
3137
|
"aria-hidden": "true"
|
|
3100
3138
|
}, null, -1)),
|
|
3101
|
-
|
|
3139
|
+
Se(" " + v(n.data.status.label), 1)
|
|
3102
3140
|
], 2)
|
|
3103
3141
|
]),
|
|
3104
|
-
n.data.body ? (c(), d("div",
|
|
3142
|
+
n.data.body ? (c(), d("div", er, v(n.data.body), 1)) : b("", !0)
|
|
3105
3143
|
]),
|
|
3106
|
-
s.fields.length ? (c(), d("div",
|
|
3107
|
-
(c(!0), d(L, null,
|
|
3144
|
+
s.fields.length ? (c(), d("div", tr, [
|
|
3145
|
+
(c(!0), d(L, null, j(s.fields, (r, l) => (c(), d("div", {
|
|
3108
3146
|
key: l,
|
|
3109
3147
|
class: "wm-art__field"
|
|
3110
3148
|
}, [
|
|
3111
|
-
o("div",
|
|
3149
|
+
o("div", nr, v(r.label), 1),
|
|
3112
3150
|
o("div", {
|
|
3113
|
-
class:
|
|
3151
|
+
class: R([
|
|
3114
3152
|
"wm-art__fieldValue",
|
|
3115
3153
|
{ "wm-art__fieldValue--multi": r.multiline }
|
|
3116
3154
|
])
|
|
@@ -3145,7 +3183,7 @@ function cr(e, t, n, i, a, s) {
|
|
|
3145
3183
|
height: "9",
|
|
3146
3184
|
rx: "0.5"
|
|
3147
3185
|
}, null, -1)
|
|
3148
|
-
])], 8,
|
|
3186
|
+
])], 8, sr)) : s.isDate(r.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
|
|
3149
3187
|
o("rect", {
|
|
3150
3188
|
x: "3",
|
|
3151
3189
|
y: "4",
|
|
@@ -3159,7 +3197,7 @@ function cr(e, t, n, i, a, s) {
|
|
|
3159
3197
|
], 2)
|
|
3160
3198
|
]))), 128))
|
|
3161
3199
|
])) : b("", !0),
|
|
3162
|
-
n.data.created_at ? (c(), d("div",
|
|
3200
|
+
n.data.created_at ? (c(), d("div", ir, [
|
|
3163
3201
|
t[4] || (t[4] = o("svg", {
|
|
3164
3202
|
width: "11",
|
|
3165
3203
|
height: "11",
|
|
@@ -3184,11 +3222,11 @@ function cr(e, t, n, i, a, s) {
|
|
|
3184
3222
|
])) : b("", !0)
|
|
3185
3223
|
]);
|
|
3186
3224
|
}
|
|
3187
|
-
const
|
|
3188
|
-
form_response:
|
|
3189
|
-
info_card:
|
|
3190
|
-
ticket:
|
|
3191
|
-
},
|
|
3225
|
+
const or = /* @__PURE__ */ B(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
|
|
3226
|
+
form_response: Es,
|
|
3227
|
+
info_card: Ks,
|
|
3228
|
+
ticket: or
|
|
3229
|
+
}, cr = {
|
|
3192
3230
|
name: "WmArtifactRenderer",
|
|
3193
3231
|
props: {
|
|
3194
3232
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -3199,23 +3237,23 @@ const dr = /* @__PURE__ */ B(Js, [["render", cr], ["__scopeId", "data-v-5f30c914
|
|
|
3199
3237
|
component() {
|
|
3200
3238
|
var t;
|
|
3201
3239
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
3202
|
-
return e &&
|
|
3240
|
+
return e && lr[e] || null;
|
|
3203
3241
|
}
|
|
3204
3242
|
}
|
|
3205
3243
|
};
|
|
3206
|
-
function
|
|
3207
|
-
return s.component ? (c(), P(
|
|
3244
|
+
function dr(e, t, n, i, a, s) {
|
|
3245
|
+
return s.component ? (c(), P(Ae(s.component), {
|
|
3208
3246
|
key: 0,
|
|
3209
3247
|
data: n.artifact.data
|
|
3210
3248
|
}, null, 8, ["data"])) : b("", !0);
|
|
3211
3249
|
}
|
|
3212
|
-
const
|
|
3250
|
+
const ur = /* @__PURE__ */ B(cr, [["render", dr]]), hr = {
|
|
3213
3251
|
name: "WmAttachmentPreview",
|
|
3214
3252
|
inject: {
|
|
3215
3253
|
signAttachmentFn: { default: null },
|
|
3216
3254
|
// Translator shared by the Messenger shell; French fallback when
|
|
3217
3255
|
// the component is used standalone.
|
|
3218
|
-
t: { default: () =>
|
|
3256
|
+
t: { default: () => F() }
|
|
3219
3257
|
},
|
|
3220
3258
|
props: {
|
|
3221
3259
|
attachment: { type: Object, required: !0 }
|
|
@@ -3277,17 +3315,17 @@ const fr = /* @__PURE__ */ B(hr, [["render", mr]]), _r = {
|
|
|
3277
3315
|
this.safeHref === "#" && e.preventDefault();
|
|
3278
3316
|
}
|
|
3279
3317
|
}
|
|
3280
|
-
},
|
|
3318
|
+
}, mr = ["href"], fr = ["src", "alt"], _r = ["src"], gr = ["src"], pr = ["href", "download"], vr = { class: "wm-att__main" }, yr = { class: "wm-att__name" }, wr = {
|
|
3281
3319
|
key: 0,
|
|
3282
3320
|
class: "wm-att__meta"
|
|
3283
|
-
},
|
|
3321
|
+
}, br = {
|
|
3284
3322
|
key: 0,
|
|
3285
3323
|
class: "wm-att__spin",
|
|
3286
3324
|
"aria-hidden": "true"
|
|
3287
3325
|
};
|
|
3288
|
-
function
|
|
3326
|
+
function kr(e, t, n, i, a, s) {
|
|
3289
3327
|
return c(), d("div", {
|
|
3290
|
-
class:
|
|
3328
|
+
class: R(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
3291
3329
|
}, [
|
|
3292
3330
|
s.kind === "image" && a.url ? (c(), d("a", {
|
|
3293
3331
|
key: 0,
|
|
@@ -3300,18 +3338,18 @@ function Sr(e, t, n, i, a, s) {
|
|
|
3300
3338
|
src: a.url,
|
|
3301
3339
|
alt: s.displayName,
|
|
3302
3340
|
loading: "lazy"
|
|
3303
|
-
}, null, 8,
|
|
3304
|
-
], 8,
|
|
3341
|
+
}, null, 8, fr)
|
|
3342
|
+
], 8, mr)) : s.kind === "audio" && a.url ? (c(), d("audio", {
|
|
3305
3343
|
key: 1,
|
|
3306
3344
|
src: a.url,
|
|
3307
3345
|
controls: "",
|
|
3308
3346
|
preload: "metadata"
|
|
3309
|
-
}, null, 8,
|
|
3347
|
+
}, null, 8, _r)) : s.kind === "video" && a.url ? (c(), d("video", {
|
|
3310
3348
|
key: 2,
|
|
3311
3349
|
src: a.url,
|
|
3312
3350
|
controls: "",
|
|
3313
3351
|
preload: "metadata"
|
|
3314
|
-
}, null, 8,
|
|
3352
|
+
}, null, 8, gr)) : (c(), d("a", {
|
|
3315
3353
|
key: 3,
|
|
3316
3354
|
class: "wm-att__file",
|
|
3317
3355
|
href: s.safeHref,
|
|
@@ -3336,15 +3374,15 @@ function Sr(e, t, n, i, a, s) {
|
|
|
3336
3374
|
o("path", { d: "M14 2v6h6" })
|
|
3337
3375
|
])
|
|
3338
3376
|
], -1)),
|
|
3339
|
-
o("span",
|
|
3340
|
-
o("span",
|
|
3341
|
-
s.sizeLabel ? (c(), d("span",
|
|
3377
|
+
o("span", vr, [
|
|
3378
|
+
o("span", yr, v(s.displayName), 1),
|
|
3379
|
+
s.sizeLabel ? (c(), d("span", wr, v(s.sizeLabel), 1)) : b("", !0)
|
|
3342
3380
|
]),
|
|
3343
|
-
a.loading ? (c(), d("span",
|
|
3344
|
-
], 8,
|
|
3381
|
+
a.loading ? (c(), d("span", br)) : b("", !0)
|
|
3382
|
+
], 8, pr))
|
|
3345
3383
|
], 2);
|
|
3346
3384
|
}
|
|
3347
|
-
const
|
|
3385
|
+
const Cr = /* @__PURE__ */ B(hr, [["render", kr], ["__scopeId", "data-v-0c877a62"]]), Ar = {
|
|
3348
3386
|
name: "WmBubble",
|
|
3349
3387
|
props: {
|
|
3350
3388
|
role: { type: String, default: "ai" },
|
|
@@ -3353,53 +3391,53 @@ const Mr = /* @__PURE__ */ B(_r, [["render", Sr], ["__scopeId", "data-v-0c877a62
|
|
|
3353
3391
|
},
|
|
3354
3392
|
computed: {
|
|
3355
3393
|
rendered() {
|
|
3356
|
-
return
|
|
3394
|
+
return ft(this.text);
|
|
3357
3395
|
}
|
|
3358
3396
|
}
|
|
3359
|
-
},
|
|
3360
|
-
function
|
|
3397
|
+
}, Sr = ["innerHTML"];
|
|
3398
|
+
function Mr(e, t, n, i, a, s) {
|
|
3361
3399
|
return c(), d("div", {
|
|
3362
|
-
class:
|
|
3400
|
+
class: R(["wm-bubble", "wm-bubble--" + n.role])
|
|
3363
3401
|
}, [
|
|
3364
|
-
|
|
3365
|
-
o("span", { innerHTML: s.rendered }, null, 8,
|
|
3402
|
+
Ke(e.$slots, "default", {}, () => [
|
|
3403
|
+
o("span", { innerHTML: s.rendered }, null, 8, Sr)
|
|
3366
3404
|
], !0)
|
|
3367
3405
|
], 2);
|
|
3368
3406
|
}
|
|
3369
|
-
const
|
|
3407
|
+
const Tr = /* @__PURE__ */ B(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
|
|
3370
3408
|
function Rr(e, t, n, i, a, s) {
|
|
3371
|
-
return c(), d("div",
|
|
3409
|
+
return c(), d("div", Or, [...t[0] || (t[0] = [
|
|
3372
3410
|
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3373
3411
|
o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3374
3412
|
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3375
3413
|
])]);
|
|
3376
3414
|
}
|
|
3377
|
-
const
|
|
3415
|
+
const Lr = /* @__PURE__ */ B(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3378
3416
|
function ee(e) {
|
|
3379
3417
|
return e ? e.client_msg_id || e.id : "";
|
|
3380
3418
|
}
|
|
3381
|
-
const
|
|
3419
|
+
const Ir = {
|
|
3382
3420
|
transferred_to_human: "system.transferredToHuman",
|
|
3383
3421
|
assigned: "system.assigned",
|
|
3384
3422
|
unassigned: "system.unassigned",
|
|
3385
3423
|
resolved: "system.resolved",
|
|
3386
3424
|
reopened: "system.reopened",
|
|
3387
3425
|
idle: "system.idle"
|
|
3388
|
-
},
|
|
3426
|
+
}, Er = 80, Br = 200, Pr = {
|
|
3389
3427
|
name: "WmMessageList",
|
|
3390
3428
|
components: {
|
|
3391
3429
|
AIAvatar: oe,
|
|
3392
|
-
HumanAvatar:
|
|
3393
|
-
Bubble:
|
|
3394
|
-
Typing:
|
|
3395
|
-
ActionResult:
|
|
3396
|
-
AttachmentPreview:
|
|
3397
|
-
ArtifactRenderer:
|
|
3430
|
+
HumanAvatar: ve,
|
|
3431
|
+
Bubble: Tr,
|
|
3432
|
+
Typing: Lr,
|
|
3433
|
+
ActionResult: As,
|
|
3434
|
+
AttachmentPreview: Cr,
|
|
3435
|
+
ArtifactRenderer: ur
|
|
3398
3436
|
},
|
|
3399
3437
|
inject: {
|
|
3400
3438
|
// Translator + resolved-language getter shared by the Messenger
|
|
3401
3439
|
// shell. Fall back to French wording when used standalone.
|
|
3402
|
-
t: { default: () =>
|
|
3440
|
+
t: { default: () => F() },
|
|
3403
3441
|
wmLocale: { default: () => () => "fr" }
|
|
3404
3442
|
},
|
|
3405
3443
|
props: {
|
|
@@ -3584,11 +3622,11 @@ const Pr = {
|
|
|
3584
3622
|
return `g-${n}`;
|
|
3585
3623
|
},
|
|
3586
3624
|
isAtBottom(e) {
|
|
3587
|
-
return e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
3625
|
+
return e.scrollHeight - e.scrollTop - e.clientHeight <= Er;
|
|
3588
3626
|
},
|
|
3589
3627
|
onScroll() {
|
|
3590
3628
|
const e = this.$refs.scrollEl;
|
|
3591
|
-
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <=
|
|
3629
|
+
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Br && (this._pendingLoadMore = !0, this.$emit("load-more"))));
|
|
3592
3630
|
},
|
|
3593
3631
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3594
3632
|
//
|
|
@@ -3789,9 +3827,9 @@ const Pr = {
|
|
|
3789
3827
|
// doit garder son arrondi.
|
|
3790
3828
|
cornersFor(e, t) {
|
|
3791
3829
|
var Q, se, re;
|
|
3792
|
-
const n = e.items, i = (Q = n[t]) == null ? void 0 : Q.kind, a = (se = n[t - 1]) == null ? void 0 : se.kind, s = (re = n[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, g = 4, k = a == null ? void 0 : a.bottom, w = s == null ? void 0 : s.top,
|
|
3793
|
-
let
|
|
3794
|
-
return r ? (k && (
|
|
3830
|
+
const n = e.items, i = (Q = n[t]) == null ? void 0 : Q.kind, a = (se = n[t - 1]) == null ? void 0 : se.kind, s = (re = n[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, g = 4, k = a == null ? void 0 : a.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = (W, ie, X) => W != null && T != null ? W + q >= T : ie === X || ie === "card" && X === "bubble";
|
|
3831
|
+
let N = l, U = l, D = l, K = l;
|
|
3832
|
+
return r ? (k && (U = g), (w || !s) && (D = g), k && M(I, k, i == null ? void 0 : i.top) && (N = g), w && M(A, w, i == null ? void 0 : i.bottom) && (K = g)) : (k && (N = g), (w || !s) && (K = g), k && M(I, k, i == null ? void 0 : i.top) && (U = g), w && M(A, w, i == null ? void 0 : i.bottom) && (D = g)), { tl: N, tr: U, br: D, bl: K };
|
|
3795
3833
|
},
|
|
3796
3834
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3797
3835
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3867,7 +3905,7 @@ const Pr = {
|
|
|
3867
3905
|
timeOf(e) {
|
|
3868
3906
|
if (!(e != null && e.created_at)) return "";
|
|
3869
3907
|
try {
|
|
3870
|
-
return
|
|
3908
|
+
return Ce(
|
|
3871
3909
|
new Date(e.created_at),
|
|
3872
3910
|
ne(this.wmLocale())
|
|
3873
3911
|
);
|
|
@@ -3879,7 +3917,7 @@ const Pr = {
|
|
|
3879
3917
|
const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
|
|
3880
3918
|
if (!(n != null && n.created_at)) return "";
|
|
3881
3919
|
try {
|
|
3882
|
-
return
|
|
3920
|
+
return Ce(
|
|
3883
3921
|
new Date(n.created_at),
|
|
3884
3922
|
ne(this.wmLocale())
|
|
3885
3923
|
);
|
|
@@ -3926,7 +3964,7 @@ const Pr = {
|
|
|
3926
3964
|
},
|
|
3927
3965
|
systemLabel(e) {
|
|
3928
3966
|
var a, s, r;
|
|
3929
|
-
const t = (a = e == null ? void 0 : e.payload) == null ? void 0 : a.event, n =
|
|
3967
|
+
const t = (a = e == null ? void 0 : e.payload) == null ? void 0 : a.event, n = Ir[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((r = e == null ? void 0 : e.author) == null ? void 0 : r.name) || this.t("messageList.anAgent");
|
|
3930
3968
|
return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
3931
3969
|
},
|
|
3932
3970
|
scrollToBottom() {
|
|
@@ -3941,98 +3979,98 @@ const Pr = {
|
|
|
3941
3979
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
3942
3980
|
}
|
|
3943
3981
|
}
|
|
3944
|
-
},
|
|
3982
|
+
}, Dr = { class: "wm-list__wrap" }, Nr = {
|
|
3945
3983
|
key: 0,
|
|
3946
3984
|
class: "wm-list__loadMore",
|
|
3947
3985
|
role: "status",
|
|
3948
3986
|
"aria-live": "polite"
|
|
3949
|
-
},
|
|
3987
|
+
}, Ur = { class: "wm-list__loadMore-lbl" }, jr = {
|
|
3950
3988
|
key: 1,
|
|
3951
3989
|
class: "wm-list__historyEnd"
|
|
3952
|
-
},
|
|
3990
|
+
}, Fr = {
|
|
3953
3991
|
key: 2,
|
|
3954
3992
|
class: "wm-list__sep"
|
|
3955
|
-
},
|
|
3993
|
+
}, Hr = { class: "wm-list__sep-label" }, zr = {
|
|
3956
3994
|
key: 0,
|
|
3957
3995
|
class: "wm-list__sep wm-list__sep--unread"
|
|
3958
|
-
},
|
|
3996
|
+
}, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, $r = {
|
|
3959
3997
|
key: 0,
|
|
3960
3998
|
class: "wm-list__sysep"
|
|
3961
|
-
},
|
|
3999
|
+
}, Vr = { class: "wm-list__sysep-label" }, Kr = ["data-row-key", "onPointerdown"], Wr = {
|
|
3962
4000
|
key: 0,
|
|
3963
4001
|
class: "wm-list__avatarSlot"
|
|
3964
|
-
},
|
|
4002
|
+
}, Gr = {
|
|
3965
4003
|
key: 5,
|
|
3966
4004
|
class: "wm-list__body"
|
|
3967
|
-
},
|
|
4005
|
+
}, Yr = { key: 0 }, Jr = {
|
|
3968
4006
|
key: 1,
|
|
3969
4007
|
"aria-hidden": "true"
|
|
3970
|
-
},
|
|
4008
|
+
}, Xr = { key: 2 }, Qr = { key: 0 }, Zr = {
|
|
3971
4009
|
key: 1,
|
|
3972
4010
|
"aria-hidden": "true"
|
|
3973
|
-
},
|
|
4011
|
+
}, ei = { key: 2 }, ti = {
|
|
3974
4012
|
key: 3,
|
|
3975
4013
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3976
|
-
},
|
|
3977
|
-
function
|
|
3978
|
-
const r =
|
|
3979
|
-
return c(), d("div",
|
|
4014
|
+
}, ni = { class: "wm-list__avatarSlot" }, si = ["aria-label", "title"];
|
|
4015
|
+
function ri(e, t, n, i, a, s) {
|
|
4016
|
+
const r = E("AIAvatar"), l = E("HumanAvatar"), g = E("ActionResult"), k = E("ArtifactRenderer"), w = E("Bubble"), T = E("AttachmentPreview"), I = E("Typing");
|
|
4017
|
+
return c(), d("div", Dr, [
|
|
3980
4018
|
o("div", {
|
|
3981
4019
|
ref: "scrollEl",
|
|
3982
|
-
class:
|
|
4020
|
+
class: R(["wm-list", { "wm-list--silent": a.silentFades }]),
|
|
3983
4021
|
onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
|
|
3984
4022
|
}, [
|
|
3985
|
-
n.loadingMore ? (c(), d("div",
|
|
4023
|
+
n.loadingMore ? (c(), d("div", Nr, [
|
|
3986
4024
|
t[6] || (t[6] = o("span", {
|
|
3987
4025
|
class: "wm-list__loadMore-spinner",
|
|
3988
4026
|
"aria-hidden": "true"
|
|
3989
4027
|
}, null, -1)),
|
|
3990
|
-
o("span",
|
|
3991
|
-
])) : s.historyExhausted ? (c(), d("div",
|
|
3992
|
-
n.dateLabel ? (c(), d("div",
|
|
4028
|
+
o("span", Ur, v(s.t("messageList.loadingHistory")), 1)
|
|
4029
|
+
])) : s.historyExhausted ? (c(), d("div", jr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
4030
|
+
n.dateLabel ? (c(), d("div", Fr, [
|
|
3993
4031
|
t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3994
|
-
o("span",
|
|
4032
|
+
o("span", Hr, v(n.dateLabel), 1),
|
|
3995
4033
|
t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3996
4034
|
])) : b("", !0),
|
|
3997
|
-
(c(!0), d(L, null,
|
|
4035
|
+
(c(!0), d(L, null, j(s.groups, (A, q) => (c(), d(L, {
|
|
3998
4036
|
key: A.key
|
|
3999
4037
|
}, [
|
|
4000
|
-
A.key === s.unreadGroupKey ? (c(), d("div",
|
|
4038
|
+
A.key === s.unreadGroupKey ? (c(), d("div", zr, [
|
|
4001
4039
|
t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
4002
|
-
o("span",
|
|
4040
|
+
o("span", qr, v(s.t("messageList.unread")), 1),
|
|
4003
4041
|
t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
4004
4042
|
])) : b("", !0),
|
|
4005
4043
|
A.role === "system" || A.items.length ? (c(), d("div", {
|
|
4006
4044
|
key: 1,
|
|
4007
|
-
class:
|
|
4045
|
+
class: R(["wm-list__group", "wm-list__group--" + A.role])
|
|
4008
4046
|
}, [
|
|
4009
|
-
A.role === "system" ? (c(), d("div",
|
|
4047
|
+
A.role === "system" ? (c(), d("div", $r, [
|
|
4010
4048
|
t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4011
|
-
o("span",
|
|
4049
|
+
o("span", Vr, v(A.systemLabel), 1),
|
|
4012
4050
|
t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4013
4051
|
])) : (c(), d(L, { key: 1 }, [
|
|
4014
|
-
(c(!0), d(L, null,
|
|
4052
|
+
(c(!0), d(L, null, j(A.items, (M, N) => (c(), d(L, {
|
|
4015
4053
|
key: `${s.messageKey(M.message)}-${M.partKey}`
|
|
4016
4054
|
}, [
|
|
4017
4055
|
o("div", {
|
|
4018
4056
|
"data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
|
|
4019
|
-
class:
|
|
4057
|
+
class: R(["wm-list__row fade-up", [
|
|
4020
4058
|
"wm-list__row--" + A.role,
|
|
4021
4059
|
{
|
|
4022
4060
|
"is-pending": M.message._pending,
|
|
4023
4061
|
"is-failed": M.message._failed
|
|
4024
4062
|
}
|
|
4025
4063
|
]]),
|
|
4026
|
-
style: z(s.cornersStyle(A,
|
|
4027
|
-
onPointerdown: (
|
|
4028
|
-
onPointerup: t[0] || (t[0] = (
|
|
4029
|
-
onPointercancel: t[1] || (t[1] = (
|
|
4030
|
-
onPointerleave: t[2] || (t[2] = (
|
|
4031
|
-
onContextmenu: t[3] || (t[3] =
|
|
4064
|
+
style: z(s.cornersStyle(A, N)),
|
|
4065
|
+
onPointerdown: (U) => s.onPressStart(`${s.messageKey(M.message)}-${M.partKey}`),
|
|
4066
|
+
onPointerup: t[0] || (t[0] = (U) => s.onPressEnd()),
|
|
4067
|
+
onPointercancel: t[1] || (t[1] = (U) => s.onPressEnd()),
|
|
4068
|
+
onPointerleave: t[2] || (t[2] = (U) => s.onPressEnd()),
|
|
4069
|
+
onContextmenu: t[3] || (t[3] = J(() => {
|
|
4032
4070
|
}, ["prevent"]))
|
|
4033
4071
|
}, [
|
|
4034
|
-
A.role !== "user" ? (c(), d("div",
|
|
4035
|
-
|
|
4072
|
+
A.role !== "user" ? (c(), d("div", Wr, [
|
|
4073
|
+
N === A.items.length - 1 ? (c(), d(L, { key: 0 }, [
|
|
4036
4074
|
A.role === "ai" ? (c(), P(r, {
|
|
4037
4075
|
key: 0,
|
|
4038
4076
|
size: 26,
|
|
@@ -4064,7 +4102,7 @@ function oi(e, t, n, i, a, s) {
|
|
|
4064
4102
|
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), P(k, {
|
|
4065
4103
|
key: 4,
|
|
4066
4104
|
artifact: s.artifactOf(M.message)
|
|
4067
|
-
}, null, 8, ["artifact"])) : (c(), d("div",
|
|
4105
|
+
}, null, 8, ["artifact"])) : (c(), d("div", Gr, [
|
|
4068
4106
|
M.message.text_md ? (c(), P(w, {
|
|
4069
4107
|
key: 0,
|
|
4070
4108
|
role: A.role,
|
|
@@ -4072,41 +4110,41 @@ function oi(e, t, n, i, a, s) {
|
|
|
4072
4110
|
}, null, 8, ["role", "text"])) : b("", !0),
|
|
4073
4111
|
s.attachmentsOf(M.message).length ? (c(), d("div", {
|
|
4074
4112
|
key: 1,
|
|
4075
|
-
class:
|
|
4113
|
+
class: R(["wm-list__atts", {
|
|
4076
4114
|
"wm-list__atts--align-end": A.role === "user"
|
|
4077
4115
|
}])
|
|
4078
4116
|
}, [
|
|
4079
|
-
(c(!0), d(L, null,
|
|
4117
|
+
(c(!0), d(L, null, j(s.attachmentsOf(
|
|
4080
4118
|
M.message
|
|
4081
|
-
), (
|
|
4082
|
-
key: `${s.messageKey(M.message)}-att-${
|
|
4083
|
-
attachment:
|
|
4119
|
+
), (U, D) => (c(), P(T, {
|
|
4120
|
+
key: `${s.messageKey(M.message)}-att-${D}`,
|
|
4121
|
+
attachment: U
|
|
4084
4122
|
}, null, 8, ["attachment"]))), 128))
|
|
4085
4123
|
], 2)) : b("", !0)
|
|
4086
4124
|
]))
|
|
4087
|
-
], 46,
|
|
4088
|
-
|
|
4125
|
+
], 46, Kr),
|
|
4126
|
+
N < A.items.length - 1 && a.pressedItemKey === `${s.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || s.timeOf(M.message)) ? (c(), d("div", {
|
|
4089
4127
|
key: 0,
|
|
4090
|
-
class:
|
|
4128
|
+
class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
4091
4129
|
}, [
|
|
4092
|
-
A.role !== "user" ? (c(), d("span",
|
|
4093
|
-
A.role !== "user" && s.timeOf(M.message) ? (c(), d("span",
|
|
4094
|
-
s.timeOf(M.message) ? (c(), d("span",
|
|
4130
|
+
A.role !== "user" ? (c(), d("span", Yr, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
4131
|
+
A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", Jr, "•")) : b("", !0),
|
|
4132
|
+
s.timeOf(M.message) ? (c(), d("span", Xr, v(s.timeOf(M.message)), 1)) : b("", !0)
|
|
4095
4133
|
], 2)) : b("", !0)
|
|
4096
4134
|
], 64))), 128)),
|
|
4097
4135
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), d("div", {
|
|
4098
4136
|
key: 0,
|
|
4099
|
-
class:
|
|
4137
|
+
class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
4100
4138
|
}, [
|
|
4101
|
-
A.role !== "user" ? (c(), d("span",
|
|
4102
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span",
|
|
4103
|
-
s.lastTimeOf(A) ? (c(), d("span",
|
|
4139
|
+
A.role !== "user" ? (c(), d("span", Qr, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
4140
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Zr, "•")) : b("", !0),
|
|
4141
|
+
s.lastTimeOf(A) ? (c(), d("span", ei, v(s.lastTimeOf(A)), 1)) : b("", !0)
|
|
4104
4142
|
], 2)) : b("", !0)
|
|
4105
4143
|
], 64))
|
|
4106
4144
|
], 2)) : b("", !0)
|
|
4107
4145
|
], 64))), 128)),
|
|
4108
|
-
n.streamingActive ? (c(), d("div",
|
|
4109
|
-
o("div",
|
|
4146
|
+
n.streamingActive ? (c(), d("div", ti, [
|
|
4147
|
+
o("div", ni, [
|
|
4110
4148
|
V(r, {
|
|
4111
4149
|
size: 26,
|
|
4112
4150
|
tail: !0,
|
|
@@ -4114,11 +4152,11 @@ function oi(e, t, n, i, a, s) {
|
|
|
4114
4152
|
"image-url": n.aiAgentAvatarUrl
|
|
4115
4153
|
}, null, 8, ["name", "image-url"])
|
|
4116
4154
|
]),
|
|
4117
|
-
V(
|
|
4155
|
+
V(I)
|
|
4118
4156
|
])) : b("", !0)
|
|
4119
4157
|
], 34),
|
|
4120
|
-
V(
|
|
4121
|
-
default:
|
|
4158
|
+
V(Ue, { name: "wm-scrollDown" }, {
|
|
4159
|
+
default: je(() => [
|
|
4122
4160
|
a.showScrollDown ? (c(), d("button", {
|
|
4123
4161
|
key: 0,
|
|
4124
4162
|
type: "button",
|
|
@@ -4140,15 +4178,15 @@ function oi(e, t, n, i, a, s) {
|
|
|
4140
4178
|
}, [
|
|
4141
4179
|
o("path", { d: "M6 9l6 6 6-6" })
|
|
4142
4180
|
], -1)
|
|
4143
|
-
])], 8,
|
|
4181
|
+
])], 8, si)) : b("", !0)
|
|
4144
4182
|
]),
|
|
4145
4183
|
_: 1
|
|
4146
4184
|
})
|
|
4147
4185
|
]);
|
|
4148
4186
|
}
|
|
4149
|
-
const
|
|
4150
|
-
function
|
|
4151
|
-
return
|
|
4187
|
+
const ii = /* @__PURE__ */ B(Pr, [["render", ri], ["__scopeId", "data-v-cf20685c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4188
|
+
function ai() {
|
|
4189
|
+
return Oe && [
|
|
4152
4190
|
"video/webm;codecs=vp9,opus",
|
|
4153
4191
|
"video/webm;codecs=vp8,opus",
|
|
4154
4192
|
"video/webm",
|
|
@@ -4158,7 +4196,7 @@ function ci() {
|
|
|
4158
4196
|
return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
|
|
4159
4197
|
}) || "";
|
|
4160
4198
|
}
|
|
4161
|
-
function
|
|
4199
|
+
function $e({ audio: e }) {
|
|
4162
4200
|
return {
|
|
4163
4201
|
video: !0,
|
|
4164
4202
|
audio: !!e,
|
|
@@ -4167,21 +4205,21 @@ function ze({ audio: e }) {
|
|
|
4167
4205
|
systemAudio: e ? "include" : "exclude"
|
|
4168
4206
|
};
|
|
4169
4207
|
}
|
|
4170
|
-
function
|
|
4208
|
+
function fo(e) {
|
|
4171
4209
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
4172
4210
|
}
|
|
4173
|
-
async function
|
|
4174
|
-
if (!
|
|
4211
|
+
async function oi() {
|
|
4212
|
+
if (!pe) return null;
|
|
4175
4213
|
let e;
|
|
4176
4214
|
try {
|
|
4177
4215
|
e = await navigator.mediaDevices.getDisplayMedia(
|
|
4178
|
-
|
|
4216
|
+
$e({ audio: !1 })
|
|
4179
4217
|
);
|
|
4180
4218
|
} catch (t) {
|
|
4181
4219
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
4182
4220
|
}
|
|
4183
4221
|
try {
|
|
4184
|
-
return await
|
|
4222
|
+
return await li(e);
|
|
4185
4223
|
} catch (t) {
|
|
4186
4224
|
return console.error("[media] screenshot capture", t), null;
|
|
4187
4225
|
} finally {
|
|
@@ -4190,7 +4228,7 @@ async function di() {
|
|
|
4190
4228
|
});
|
|
4191
4229
|
}
|
|
4192
4230
|
}
|
|
4193
|
-
async function
|
|
4231
|
+
async function li(e) {
|
|
4194
4232
|
const t = document.createElement("video");
|
|
4195
4233
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
4196
4234
|
const n = t.videoWidth || 1280, i = t.videoHeight || 720, a = document.createElement("canvas");
|
|
@@ -4203,24 +4241,24 @@ async function ui(e) {
|
|
|
4203
4241
|
}), r = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
4204
4242
|
return new File([s], `capture-${r}.png`, { type: "image/png" });
|
|
4205
4243
|
}
|
|
4206
|
-
async function
|
|
4244
|
+
async function ci(e = {}) {
|
|
4207
4245
|
var k;
|
|
4208
|
-
if (!
|
|
4246
|
+
if (!pe || !Oe) return null;
|
|
4209
4247
|
let t;
|
|
4210
4248
|
try {
|
|
4211
4249
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
4212
|
-
|
|
4250
|
+
$e({ audio: !0 })
|
|
4213
4251
|
);
|
|
4214
4252
|
} catch (w) {
|
|
4215
4253
|
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
4216
4254
|
}
|
|
4217
|
-
const n =
|
|
4255
|
+
const n = ai();
|
|
4218
4256
|
let i;
|
|
4219
4257
|
try {
|
|
4220
4258
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
4221
4259
|
} catch (w) {
|
|
4222
|
-
return console.error("[media] recorder init", w), t.getTracks().forEach((
|
|
4223
|
-
|
|
4260
|
+
return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
|
|
4261
|
+
T.stop();
|
|
4224
4262
|
}), null;
|
|
4225
4263
|
}
|
|
4226
4264
|
const a = [];
|
|
@@ -4228,16 +4266,16 @@ async function hi(e = {}) {
|
|
|
4228
4266
|
i.addEventListener("dataavailable", (w) => {
|
|
4229
4267
|
w.data && w.data.size > 0 && a.push(w.data);
|
|
4230
4268
|
}), i.addEventListener("stop", () => {
|
|
4231
|
-
var w,
|
|
4232
|
-
if (s && clearInterval(s), t.getTracks().forEach((
|
|
4233
|
-
|
|
4269
|
+
var w, T;
|
|
4270
|
+
if (s && clearInterval(s), t.getTracks().forEach((I) => {
|
|
4271
|
+
I.stop();
|
|
4234
4272
|
}), a.length) {
|
|
4235
|
-
const
|
|
4236
|
-
type:
|
|
4273
|
+
const I = i.mimeType || n || "video/webm", A = new Blob(a, { type: I }), q = /mp4/.test(I) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${M}.${q}`, {
|
|
4274
|
+
type: I
|
|
4237
4275
|
});
|
|
4238
|
-
(w = e.onfinalize) == null || w.call(e,
|
|
4276
|
+
(w = e.onfinalize) == null || w.call(e, N);
|
|
4239
4277
|
} else
|
|
4240
|
-
(
|
|
4278
|
+
(T = e.oncancel) == null || T.call(e);
|
|
4241
4279
|
}), t.getVideoTracks().forEach((w) => {
|
|
4242
4280
|
w.addEventListener("ended", () => l(), { once: !0 });
|
|
4243
4281
|
});
|
|
@@ -4252,8 +4290,8 @@ async function hi(e = {}) {
|
|
|
4252
4290
|
try {
|
|
4253
4291
|
i.start(1e3);
|
|
4254
4292
|
} catch (w) {
|
|
4255
|
-
return console.error("[media] recorder start", w), t.getTracks().forEach((
|
|
4256
|
-
|
|
4293
|
+
return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
|
|
4294
|
+
T.stop();
|
|
4257
4295
|
}), null;
|
|
4258
4296
|
}
|
|
4259
4297
|
(k = e.onstart) == null || k.call(e);
|
|
@@ -4268,7 +4306,7 @@ async function hi(e = {}) {
|
|
|
4268
4306
|
}
|
|
4269
4307
|
};
|
|
4270
4308
|
}
|
|
4271
|
-
const
|
|
4309
|
+
const di = [
|
|
4272
4310
|
{
|
|
4273
4311
|
action: "file",
|
|
4274
4312
|
labelKey: "composer.attachFile",
|
|
@@ -4284,12 +4322,12 @@ const mi = [
|
|
|
4284
4322
|
labelKey: "composer.recordScreen",
|
|
4285
4323
|
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"
|
|
4286
4324
|
}
|
|
4287
|
-
],
|
|
4325
|
+
], ui = {
|
|
4288
4326
|
name: "WmComposer",
|
|
4289
4327
|
inject: {
|
|
4290
4328
|
// Translator shared by the Messenger shell; French fallback when
|
|
4291
4329
|
// the component is used standalone.
|
|
4292
|
-
t: { default: () =>
|
|
4330
|
+
t: { default: () => F() }
|
|
4293
4331
|
},
|
|
4294
4332
|
props: {
|
|
4295
4333
|
modelValue: { type: String, default: "" },
|
|
@@ -4318,10 +4356,10 @@ const mi = [
|
|
|
4318
4356
|
return !this.disabled && !!this.local.trim();
|
|
4319
4357
|
},
|
|
4320
4358
|
attachItems() {
|
|
4321
|
-
return
|
|
4359
|
+
return di.map((e) => ({
|
|
4322
4360
|
...e,
|
|
4323
4361
|
label: this.t(e.labelKey),
|
|
4324
|
-
disabled: e.action === "screenshot" && !
|
|
4362
|
+
disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !Oe)
|
|
4325
4363
|
}));
|
|
4326
4364
|
},
|
|
4327
4365
|
recordingElapsedLabel() {
|
|
@@ -4392,13 +4430,13 @@ const mi = [
|
|
|
4392
4430
|
},
|
|
4393
4431
|
async captureScreenshot() {
|
|
4394
4432
|
if (this.disabled) return;
|
|
4395
|
-
const e = await
|
|
4433
|
+
const e = await oi();
|
|
4396
4434
|
e && this.$emit("attach", e);
|
|
4397
4435
|
},
|
|
4398
4436
|
async startRecording() {
|
|
4399
4437
|
if (this.recording || this.disabled) return;
|
|
4400
4438
|
this.recordingElapsed = 0;
|
|
4401
|
-
const e = await
|
|
4439
|
+
const e = await ci({
|
|
4402
4440
|
onstart: () => {
|
|
4403
4441
|
this.recording = !0;
|
|
4404
4442
|
},
|
|
@@ -4440,30 +4478,30 @@ const mi = [
|
|
|
4440
4478
|
!e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
|
|
4441
4479
|
}
|
|
4442
4480
|
}
|
|
4443
|
-
},
|
|
4481
|
+
}, hi = {
|
|
4444
4482
|
key: 0,
|
|
4445
4483
|
class: "wm-rec"
|
|
4446
|
-
},
|
|
4484
|
+
}, mi = { class: "wm-rec__lbl" }, fi = {
|
|
4447
4485
|
key: 1,
|
|
4448
4486
|
class: "wm-compose__menu",
|
|
4449
4487
|
role: "menu"
|
|
4450
|
-
},
|
|
4488
|
+
}, _i = ["disabled", "onClick"], gi = { class: "wm-compose__menuIcon" }, pi = {
|
|
4451
4489
|
viewBox: "0 0 24 24",
|
|
4452
4490
|
width: "14",
|
|
4453
4491
|
height: "14",
|
|
4454
4492
|
"aria-hidden": "true"
|
|
4455
|
-
},
|
|
4456
|
-
function
|
|
4493
|
+
}, vi = ["d"], yi = ["placeholder", "disabled"], wi = { class: "wm-compose__actions" }, bi = ["title", "aria-label", "disabled"], ki = ["disabled", "aria-label"];
|
|
4494
|
+
function Ci(e, t, n, i, a, s) {
|
|
4457
4495
|
return c(), d("div", {
|
|
4458
|
-
class:
|
|
4496
|
+
class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
|
|
4459
4497
|
style: z(a.kbOffset ? { transform: `translateY(-${a.kbOffset}px)` } : null)
|
|
4460
4498
|
}, [
|
|
4461
|
-
a.recording ? (c(), d("div",
|
|
4499
|
+
a.recording ? (c(), d("div", hi, [
|
|
4462
4500
|
t[8] || (t[8] = o("span", {
|
|
4463
4501
|
class: "wm-rec__dot",
|
|
4464
4502
|
"aria-hidden": "true"
|
|
4465
4503
|
}, null, -1)),
|
|
4466
|
-
o("span",
|
|
4504
|
+
o("span", mi, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
|
|
4467
4505
|
o("button", {
|
|
4468
4506
|
type: "button",
|
|
4469
4507
|
class: "wm-rec__stop",
|
|
@@ -4471,8 +4509,8 @@ function Mi(e, t, n, i, a, s) {
|
|
|
4471
4509
|
}, v(s.t("composer.stop")), 1)
|
|
4472
4510
|
])) : b("", !0),
|
|
4473
4511
|
o("form", {
|
|
4474
|
-
class:
|
|
4475
|
-
onSubmit: t[7] || (t[7] =
|
|
4512
|
+
class: R(["wm-compose", { "has-attach": a.attachOpen }]),
|
|
4513
|
+
onSubmit: t[7] || (t[7] = J((...r) => s.onSubmit && s.onSubmit(...r), ["prevent"]))
|
|
4476
4514
|
}, [
|
|
4477
4515
|
o("input", {
|
|
4478
4516
|
ref: "fileEl",
|
|
@@ -4486,16 +4524,16 @@ function Mi(e, t, n, i, a, s) {
|
|
|
4486
4524
|
class: "wm-compose__overlay",
|
|
4487
4525
|
onClick: t[2] || (t[2] = (r) => a.attachOpen = !1)
|
|
4488
4526
|
})) : b("", !0),
|
|
4489
|
-
a.attachOpen ? (c(), d("div",
|
|
4490
|
-
(c(!0), d(L, null,
|
|
4527
|
+
a.attachOpen ? (c(), d("div", fi, [
|
|
4528
|
+
(c(!0), d(L, null, j(s.attachItems, (r) => (c(), d("button", {
|
|
4491
4529
|
key: r.action,
|
|
4492
4530
|
type: "button",
|
|
4493
4531
|
class: "wm-compose__menuItem",
|
|
4494
4532
|
disabled: r.disabled,
|
|
4495
4533
|
onClick: (l) => s.onAttachAction(r.action)
|
|
4496
4534
|
}, [
|
|
4497
|
-
o("span",
|
|
4498
|
-
(c(), d("svg",
|
|
4535
|
+
o("span", gi, [
|
|
4536
|
+
(c(), d("svg", pi, [
|
|
4499
4537
|
o("path", {
|
|
4500
4538
|
d: r.path,
|
|
4501
4539
|
stroke: "currentColor",
|
|
@@ -4503,11 +4541,11 @@ function Mi(e, t, n, i, a, s) {
|
|
|
4503
4541
|
"stroke-linecap": "round",
|
|
4504
4542
|
"stroke-linejoin": "round",
|
|
4505
4543
|
fill: "none"
|
|
4506
|
-
}, null, 8,
|
|
4544
|
+
}, null, 8, vi)
|
|
4507
4545
|
]))
|
|
4508
4546
|
]),
|
|
4509
4547
|
o("span", null, v(r.label), 1)
|
|
4510
|
-
], 8,
|
|
4548
|
+
], 8, _i))), 128))
|
|
4511
4549
|
])) : b("", !0),
|
|
4512
4550
|
G(o("textarea", {
|
|
4513
4551
|
ref: "inputEl",
|
|
@@ -4518,13 +4556,13 @@ function Mi(e, t, n, i, a, s) {
|
|
|
4518
4556
|
disabled: n.disabled,
|
|
4519
4557
|
onKeydown: t[4] || (t[4] = (...r) => s.onKeydown && s.onKeydown(...r)),
|
|
4520
4558
|
onInput: t[5] || (t[5] = (...r) => s.autosize && s.autosize(...r))
|
|
4521
|
-
}, null, 40,
|
|
4559
|
+
}, null, 40, yi), [
|
|
4522
4560
|
[te, a.local]
|
|
4523
4561
|
]),
|
|
4524
|
-
o("div",
|
|
4562
|
+
o("div", wi, [
|
|
4525
4563
|
o("button", {
|
|
4526
4564
|
type: "button",
|
|
4527
|
-
class:
|
|
4565
|
+
class: R(["wm-compose__icon", { "is-open": a.attachOpen }]),
|
|
4528
4566
|
title: n.attachLabel,
|
|
4529
4567
|
"aria-label": n.attachLabel,
|
|
4530
4568
|
disabled: a.recording,
|
|
@@ -4543,10 +4581,10 @@ function Mi(e, t, n, i, a, s) {
|
|
|
4543
4581
|
}, [
|
|
4544
4582
|
o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
4545
4583
|
], -1)
|
|
4546
|
-
])], 10,
|
|
4584
|
+
])], 10, bi),
|
|
4547
4585
|
o("button", {
|
|
4548
4586
|
type: "submit",
|
|
4549
|
-
class:
|
|
4587
|
+
class: R(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
4550
4588
|
disabled: !s.canSend,
|
|
4551
4589
|
"aria-label": s.t("composer.send")
|
|
4552
4590
|
}, [...t[10] || (t[10] = [
|
|
@@ -4563,12 +4601,12 @@ function Mi(e, t, n, i, a, s) {
|
|
|
4563
4601
|
}, [
|
|
4564
4602
|
o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4565
4603
|
], -1)
|
|
4566
|
-
])], 10,
|
|
4604
|
+
])], 10, ki)
|
|
4567
4605
|
])
|
|
4568
4606
|
], 34)
|
|
4569
4607
|
], 6);
|
|
4570
4608
|
}
|
|
4571
|
-
const
|
|
4609
|
+
const Ai = /* @__PURE__ */ B(ui, [["render", Ci], ["__scopeId", "data-v-01e81a27"]]), Si = {
|
|
4572
4610
|
name: "WmSuggestionChips",
|
|
4573
4611
|
props: {
|
|
4574
4612
|
items: { type: Array, default: () => [] },
|
|
@@ -4585,28 +4623,28 @@ const Ti = /* @__PURE__ */ B(fi, [["render", Mi], ["__scopeId", "data-v-01e81a27
|
|
|
4585
4623
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4586
4624
|
}
|
|
4587
4625
|
}
|
|
4588
|
-
},
|
|
4589
|
-
function
|
|
4626
|
+
}, Mi = ["onClick"];
|
|
4627
|
+
function Ti(e, t, n, i, a, s) {
|
|
4590
4628
|
return n.items.length ? (c(), d("div", {
|
|
4591
4629
|
key: s.batchKey,
|
|
4592
4630
|
class: "wm-chips"
|
|
4593
4631
|
}, [
|
|
4594
|
-
(c(!0), d(L, null,
|
|
4632
|
+
(c(!0), d(L, null, j(n.items, (r, l) => (c(), d("button", {
|
|
4595
4633
|
key: l,
|
|
4596
4634
|
type: "button",
|
|
4597
4635
|
class: "wm-chip",
|
|
4598
4636
|
style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4599
4637
|
onClick: (g) => e.$emit("select", r)
|
|
4600
|
-
}, v(r.label), 13,
|
|
4638
|
+
}, v(r.label), 13, Mi))), 128))
|
|
4601
4639
|
])) : b("", !0);
|
|
4602
4640
|
}
|
|
4603
|
-
const
|
|
4641
|
+
const xi = /* @__PURE__ */ B(Si, [["render", Ti], ["__scopeId", "data-v-47ad8085"]]), Oi = {
|
|
4604
4642
|
name: "WmApprovalCard",
|
|
4605
4643
|
components: { AIAvatar: oe },
|
|
4606
4644
|
inject: {
|
|
4607
4645
|
// Translator shared by the Messenger shell; French fallback when
|
|
4608
4646
|
// the component is used standalone.
|
|
4609
|
-
t: { default: () =>
|
|
4647
|
+
t: { default: () => F() }
|
|
4610
4648
|
},
|
|
4611
4649
|
props: {
|
|
4612
4650
|
action: { type: String, required: !0 },
|
|
@@ -4644,27 +4682,27 @@ const Li = /* @__PURE__ */ B(xi, [["render", Ii], ["__scopeId", "data-v-47ad8085
|
|
|
4644
4682
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4645
4683
|
}
|
|
4646
4684
|
}
|
|
4647
|
-
}, Ri = { class: "wm-approval" },
|
|
4685
|
+
}, Ri = { class: "wm-approval" }, Li = { class: "wm-approval__head" }, Ii = { class: "wm-approval__icon" }, Ei = { class: "wm-approval__main" }, Bi = { class: "wm-approval__title" }, Pi = {
|
|
4648
4686
|
key: 0,
|
|
4649
4687
|
class: "wm-approval__detail"
|
|
4650
|
-
},
|
|
4651
|
-
function
|
|
4652
|
-
const r =
|
|
4688
|
+
}, Di = { class: "wm-approval__actions" };
|
|
4689
|
+
function Ni(e, t, n, i, a, s) {
|
|
4690
|
+
const r = E("AIAvatar");
|
|
4653
4691
|
return c(), d("div", Ri, [
|
|
4654
|
-
o("div",
|
|
4655
|
-
o("div",
|
|
4692
|
+
o("div", Li, [
|
|
4693
|
+
o("div", Ii, [
|
|
4656
4694
|
V(r, {
|
|
4657
4695
|
size: 24,
|
|
4658
4696
|
name: n.agentName,
|
|
4659
4697
|
"image-url": n.agentAvatarUrl
|
|
4660
4698
|
}, null, 8, ["name", "image-url"])
|
|
4661
4699
|
]),
|
|
4662
|
-
o("div",
|
|
4663
|
-
o("div",
|
|
4664
|
-
n.detail ? (c(), d("div",
|
|
4700
|
+
o("div", Ei, [
|
|
4701
|
+
o("div", Bi, v(n.action), 1),
|
|
4702
|
+
n.detail ? (c(), d("div", Pi, v(n.detail), 1)) : b("", !0)
|
|
4665
4703
|
])
|
|
4666
4704
|
]),
|
|
4667
|
-
o("div",
|
|
4705
|
+
o("div", Di, [
|
|
4668
4706
|
s.rejectId ? (c(), d("button", {
|
|
4669
4707
|
key: 0,
|
|
4670
4708
|
type: "button",
|
|
@@ -4680,9 +4718,9 @@ function ji(e, t, n, i, a, s) {
|
|
|
4680
4718
|
])
|
|
4681
4719
|
]);
|
|
4682
4720
|
}
|
|
4683
|
-
const
|
|
4684
|
-
let
|
|
4685
|
-
const
|
|
4721
|
+
const Ui = /* @__PURE__ */ B(Oi, [["render", Ni], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4722
|
+
let De = 0;
|
|
4723
|
+
const ji = /* @__PURE__ */ new Set([
|
|
4686
4724
|
"text",
|
|
4687
4725
|
"textarea",
|
|
4688
4726
|
"number",
|
|
@@ -4690,13 +4728,13 @@ const zi = /* @__PURE__ */ new Set([
|
|
|
4690
4728
|
"select",
|
|
4691
4729
|
"multiselect",
|
|
4692
4730
|
"date"
|
|
4693
|
-
]),
|
|
4731
|
+
]), Fi = {
|
|
4694
4732
|
name: "WmFormCard",
|
|
4695
4733
|
components: { AIAvatar: oe },
|
|
4696
4734
|
inject: {
|
|
4697
4735
|
// Translator shared by the Messenger shell; French fallback when
|
|
4698
4736
|
// the component is used standalone.
|
|
4699
|
-
t: { default: () =>
|
|
4737
|
+
t: { default: () => F() }
|
|
4700
4738
|
},
|
|
4701
4739
|
props: {
|
|
4702
4740
|
form: { type: Object, required: !0 },
|
|
@@ -4707,8 +4745,8 @@ const zi = /* @__PURE__ */ new Set([
|
|
|
4707
4745
|
},
|
|
4708
4746
|
emits: ["submit"],
|
|
4709
4747
|
data() {
|
|
4710
|
-
return
|
|
4711
|
-
_uid:
|
|
4748
|
+
return De += 1, {
|
|
4749
|
+
_uid: De,
|
|
4712
4750
|
values: {},
|
|
4713
4751
|
busy: !1,
|
|
4714
4752
|
error: ""
|
|
@@ -4720,7 +4758,7 @@ const zi = /* @__PURE__ */ new Set([
|
|
|
4720
4758
|
// douteux.
|
|
4721
4759
|
normalizedFields() {
|
|
4722
4760
|
var t;
|
|
4723
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4761
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !ji.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
4724
4762
|
}
|
|
4725
4763
|
},
|
|
4726
4764
|
created() {
|
|
@@ -4773,54 +4811,54 @@ const zi = /* @__PURE__ */ new Set([
|
|
|
4773
4811
|
}
|
|
4774
4812
|
}
|
|
4775
4813
|
}
|
|
4776
|
-
},
|
|
4814
|
+
}, Hi = { class: "wm-form" }, zi = { class: "wm-form__head" }, qi = { class: "wm-form__icon" }, $i = { class: "wm-form__main" }, Vi = { class: "wm-form__title" }, Ki = {
|
|
4777
4815
|
key: 0,
|
|
4778
4816
|
class: "wm-form__detail"
|
|
4779
|
-
},
|
|
4817
|
+
}, Wi = ["for"], Gi = {
|
|
4780
4818
|
key: 0,
|
|
4781
4819
|
class: "wm-form__req",
|
|
4782
4820
|
"aria-hidden": "true"
|
|
4783
|
-
},
|
|
4821
|
+
}, Yi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Qi = ["id", "onUpdate:modelValue", "required", "disabled"], Zi = {
|
|
4784
4822
|
key: 4,
|
|
4785
4823
|
class: "wm-form__bool"
|
|
4786
|
-
},
|
|
4824
|
+
}, ea = ["id", "onUpdate:modelValue", "disabled"], ta = ["id", "onUpdate:modelValue", "required", "disabled"], na = {
|
|
4787
4825
|
value: "",
|
|
4788
4826
|
disabled: ""
|
|
4789
|
-
},
|
|
4827
|
+
}, sa = ["value"], ra = {
|
|
4790
4828
|
key: 6,
|
|
4791
4829
|
class: "wm-form__multi"
|
|
4792
|
-
},
|
|
4830
|
+
}, ia = ["value", "checked", "disabled", "onChange"], aa = {
|
|
4793
4831
|
key: 0,
|
|
4794
4832
|
class: "wm-form__err"
|
|
4795
|
-
},
|
|
4833
|
+
}, oa = ["disabled"], la = {
|
|
4796
4834
|
key: 0,
|
|
4797
4835
|
class: "wm-form__spinner",
|
|
4798
4836
|
"aria-hidden": "true"
|
|
4799
|
-
},
|
|
4837
|
+
}, ca = {
|
|
4800
4838
|
key: 2,
|
|
4801
4839
|
class: "wm-form__doneLbl"
|
|
4802
4840
|
};
|
|
4803
|
-
function
|
|
4804
|
-
const r =
|
|
4805
|
-
return c(), d("div",
|
|
4806
|
-
o("div",
|
|
4807
|
-
o("div",
|
|
4841
|
+
function da(e, t, n, i, a, s) {
|
|
4842
|
+
const r = E("AIAvatar");
|
|
4843
|
+
return c(), d("div", Hi, [
|
|
4844
|
+
o("div", zi, [
|
|
4845
|
+
o("div", qi, [
|
|
4808
4846
|
V(r, {
|
|
4809
4847
|
size: 24,
|
|
4810
4848
|
name: n.agentName,
|
|
4811
4849
|
"image-url": n.agentAvatarUrl
|
|
4812
4850
|
}, null, 8, ["name", "image-url"])
|
|
4813
4851
|
]),
|
|
4814
|
-
o("div",
|
|
4815
|
-
o("div",
|
|
4816
|
-
n.form.description ? (c(), d("div",
|
|
4852
|
+
o("div", $i, [
|
|
4853
|
+
o("div", Vi, v(n.form.title || s.t("form.title")), 1),
|
|
4854
|
+
n.form.description ? (c(), d("div", Ki, v(n.form.description), 1)) : b("", !0)
|
|
4817
4855
|
])
|
|
4818
4856
|
]),
|
|
4819
4857
|
o("form", {
|
|
4820
4858
|
class: "wm-form__body",
|
|
4821
|
-
onSubmit: t[0] || (t[0] =
|
|
4859
|
+
onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4822
4860
|
}, [
|
|
4823
|
-
(c(!0), d(L, null,
|
|
4861
|
+
(c(!0), d(L, null, j(s.normalizedFields, (l) => (c(), d("div", {
|
|
4824
4862
|
key: l.key,
|
|
4825
4863
|
class: "wm-form__field"
|
|
4826
4864
|
}, [
|
|
@@ -4828,9 +4866,9 @@ function ma(e, t, n, i, a, s) {
|
|
|
4828
4866
|
for: `wm-f-${a._uid}-${l.key}`,
|
|
4829
4867
|
class: "wm-form__label"
|
|
4830
4868
|
}, [
|
|
4831
|
-
|
|
4832
|
-
l.required ? (c(), d("span",
|
|
4833
|
-
], 8,
|
|
4869
|
+
Se(v(l.label), 1),
|
|
4870
|
+
l.required ? (c(), d("span", Gi, "*")) : b("", !0)
|
|
4871
|
+
], 8, Wi),
|
|
4834
4872
|
l.type === "text" ? G((c(), d("input", {
|
|
4835
4873
|
key: 0,
|
|
4836
4874
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
@@ -4840,7 +4878,7 @@ function ma(e, t, n, i, a, s) {
|
|
|
4840
4878
|
placeholder: l.placeholder || "",
|
|
4841
4879
|
required: l.required,
|
|
4842
4880
|
disabled: n.readOnly || a.busy
|
|
4843
|
-
}, null, 8,
|
|
4881
|
+
}, null, 8, Yi)), [
|
|
4844
4882
|
[te, a.values[l.key]]
|
|
4845
4883
|
]) : l.type === "textarea" ? G((c(), d("textarea", {
|
|
4846
4884
|
key: 1,
|
|
@@ -4851,7 +4889,7 @@ function ma(e, t, n, i, a, s) {
|
|
|
4851
4889
|
placeholder: l.placeholder || "",
|
|
4852
4890
|
required: l.required,
|
|
4853
4891
|
disabled: n.readOnly || a.busy
|
|
4854
|
-
}, null, 8,
|
|
4892
|
+
}, null, 8, Ji)), [
|
|
4855
4893
|
[te, a.values[l.key]]
|
|
4856
4894
|
]) : l.type === "number" ? G((c(), d("input", {
|
|
4857
4895
|
key: 2,
|
|
@@ -4862,7 +4900,7 @@ function ma(e, t, n, i, a, s) {
|
|
|
4862
4900
|
placeholder: l.placeholder || "",
|
|
4863
4901
|
required: l.required,
|
|
4864
4902
|
disabled: n.readOnly || a.busy
|
|
4865
|
-
}, null, 8,
|
|
4903
|
+
}, null, 8, Xi)), [
|
|
4866
4904
|
[
|
|
4867
4905
|
te,
|
|
4868
4906
|
a.values[l.key],
|
|
@@ -4877,16 +4915,16 @@ function ma(e, t, n, i, a, s) {
|
|
|
4877
4915
|
class: "wm-form__input",
|
|
4878
4916
|
required: l.required,
|
|
4879
4917
|
disabled: n.readOnly || a.busy
|
|
4880
|
-
}, null, 8,
|
|
4918
|
+
}, null, 8, Qi)), [
|
|
4881
4919
|
[te, a.values[l.key]]
|
|
4882
|
-
]) : l.type === "boolean" ? (c(), d("label",
|
|
4920
|
+
]) : l.type === "boolean" ? (c(), d("label", Zi, [
|
|
4883
4921
|
G(o("input", {
|
|
4884
4922
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
4885
4923
|
"onUpdate:modelValue": (g) => a.values[l.key] = g,
|
|
4886
4924
|
type: "checkbox",
|
|
4887
4925
|
disabled: n.readOnly || a.busy
|
|
4888
|
-
}, null, 8,
|
|
4889
|
-
[
|
|
4926
|
+
}, null, 8, ea), [
|
|
4927
|
+
[We, a.values[l.key]]
|
|
4890
4928
|
]),
|
|
4891
4929
|
o("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
4892
4930
|
])) : l.type === "select" ? G((c(), d("select", {
|
|
@@ -4897,15 +4935,15 @@ function ma(e, t, n, i, a, s) {
|
|
|
4897
4935
|
required: l.required,
|
|
4898
4936
|
disabled: n.readOnly || a.busy
|
|
4899
4937
|
}, [
|
|
4900
|
-
o("option",
|
|
4901
|
-
(c(!0), d(L, null,
|
|
4938
|
+
o("option", na, v(l.placeholder || s.t("form.choose")), 1),
|
|
4939
|
+
(c(!0), d(L, null, j(l.options, (g) => (c(), d("option", {
|
|
4902
4940
|
key: g.value,
|
|
4903
4941
|
value: g.value
|
|
4904
|
-
}, v(g.label), 9,
|
|
4905
|
-
], 8,
|
|
4906
|
-
[
|
|
4907
|
-
]) : l.type === "multiselect" ? (c(), d("div",
|
|
4908
|
-
(c(!0), d(L, null,
|
|
4942
|
+
}, v(g.label), 9, sa))), 128))
|
|
4943
|
+
], 8, ta)), [
|
|
4944
|
+
[Ge, a.values[l.key]]
|
|
4945
|
+
]) : l.type === "multiselect" ? (c(), d("div", ra, [
|
|
4946
|
+
(c(!0), d(L, null, j(l.options, (g) => (c(), d("label", {
|
|
4909
4947
|
key: g.value,
|
|
4910
4948
|
class: "wm-form__multiItem"
|
|
4911
4949
|
}, [
|
|
@@ -4919,30 +4957,30 @@ function ma(e, t, n, i, a, s) {
|
|
|
4919
4957
|
g.value,
|
|
4920
4958
|
k.target.checked
|
|
4921
4959
|
)
|
|
4922
|
-
}, null, 40,
|
|
4960
|
+
}, null, 40, ia),
|
|
4923
4961
|
o("span", null, v(g.label), 1)
|
|
4924
4962
|
]))), 128))
|
|
4925
4963
|
])) : b("", !0)
|
|
4926
4964
|
]))), 128)),
|
|
4927
|
-
a.error ? (c(), d("div",
|
|
4928
|
-
n.readOnly ? (c(), d("div",
|
|
4965
|
+
a.error ? (c(), d("div", aa, v(a.error), 1)) : b("", !0),
|
|
4966
|
+
n.readOnly ? (c(), d("div", ca, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
|
|
4929
4967
|
key: 1,
|
|
4930
4968
|
type: "submit",
|
|
4931
4969
|
class: "wm-form__submit",
|
|
4932
4970
|
disabled: a.busy
|
|
4933
4971
|
}, [
|
|
4934
|
-
a.busy ? (c(), d("span",
|
|
4972
|
+
a.busy ? (c(), d("span", la)) : b("", !0),
|
|
4935
4973
|
o("span", null, v(a.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4936
|
-
], 8,
|
|
4974
|
+
], 8, oa))
|
|
4937
4975
|
], 32)
|
|
4938
4976
|
]);
|
|
4939
4977
|
}
|
|
4940
|
-
const
|
|
4978
|
+
const ua = /* @__PURE__ */ B(Fi, [["render", da], ["__scopeId", "data-v-fe65cc56"]]), ha = {
|
|
4941
4979
|
name: "WmFeedback",
|
|
4942
4980
|
inject: {
|
|
4943
4981
|
// Translator shared by the Messenger shell; French fallback when
|
|
4944
4982
|
// the component is used standalone.
|
|
4945
|
-
t: { default: () =>
|
|
4983
|
+
t: { default: () => F() }
|
|
4946
4984
|
},
|
|
4947
4985
|
props: {
|
|
4948
4986
|
busy: { type: Boolean, default: !1 },
|
|
@@ -4971,13 +5009,13 @@ const fa = /* @__PURE__ */ B(qi, [["render", ma], ["__scopeId", "data-v-fe65cc56
|
|
|
4971
5009
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4972
5010
|
}
|
|
4973
5011
|
}
|
|
4974
|
-
},
|
|
5012
|
+
}, ma = { class: "wm-fb" }, fa = { class: "wm-fb__title" }, _a = { class: "wm-fb__sub" }, ga = { class: "wm-fb__row" }, pa = ["onClick"], va = { class: "wm-fb__emoji" }, ya = { class: "wm-fb__label" }, wa = ["disabled"], ba = {
|
|
4975
5013
|
key: 1,
|
|
4976
5014
|
class: "wm-fb__done"
|
|
4977
|
-
},
|
|
4978
|
-
function
|
|
4979
|
-
return c(), d("div",
|
|
4980
|
-
n.done ? (c(), d("div",
|
|
5015
|
+
}, ka = { class: "wm-fb__doneTitle" }, Ca = { class: "wm-fb__doneSub" };
|
|
5016
|
+
function Aa(e, t, n, i, a, s) {
|
|
5017
|
+
return c(), d("div", ma, [
|
|
5018
|
+
n.done ? (c(), d("div", ba, [
|
|
4981
5019
|
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4982
5020
|
o("svg", {
|
|
4983
5021
|
width: "16",
|
|
@@ -4993,37 +5031,37 @@ function Ta(e, t, n, i, a, s) {
|
|
|
4993
5031
|
o("path", { d: "M20 6L9 17l-5-5" })
|
|
4994
5032
|
])
|
|
4995
5033
|
], -1)),
|
|
4996
|
-
o("div",
|
|
4997
|
-
o("div",
|
|
5034
|
+
o("div", ka, v(s.t("feedback.doneTitle")), 1),
|
|
5035
|
+
o("div", Ca, v(s.t("feedback.doneSubtitle")), 1)
|
|
4998
5036
|
])) : (c(), d(L, { key: 0 }, [
|
|
4999
|
-
o("div",
|
|
5000
|
-
o("div",
|
|
5001
|
-
o("div",
|
|
5002
|
-
(c(!0), d(L, null,
|
|
5037
|
+
o("div", fa, v(s.t("feedback.question")), 1),
|
|
5038
|
+
o("div", _a, v(s.t("feedback.subtitle")), 1),
|
|
5039
|
+
o("div", ga, [
|
|
5040
|
+
(c(!0), d(L, null, j(s.options, (r) => (c(), d("button", {
|
|
5003
5041
|
key: r.v,
|
|
5004
5042
|
type: "button",
|
|
5005
|
-
class:
|
|
5043
|
+
class: R(["wm-fb__opt", { "is-selected": a.sel === r.v }]),
|
|
5006
5044
|
onClick: (l) => a.sel = r.v
|
|
5007
5045
|
}, [
|
|
5008
|
-
o("span",
|
|
5009
|
-
o("span",
|
|
5010
|
-
], 10,
|
|
5046
|
+
o("span", va, v(r.e), 1),
|
|
5047
|
+
o("span", ya, v(r.l), 1)
|
|
5048
|
+
], 10, pa))), 128))
|
|
5011
5049
|
]),
|
|
5012
5050
|
o("button", {
|
|
5013
5051
|
type: "button",
|
|
5014
5052
|
class: "wm-fb__send",
|
|
5015
5053
|
disabled: !a.sel || n.busy,
|
|
5016
5054
|
onClick: t[0] || (t[0] = (...r) => s.onSend && s.onSend(...r))
|
|
5017
|
-
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9,
|
|
5055
|
+
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, wa)
|
|
5018
5056
|
], 64))
|
|
5019
5057
|
]);
|
|
5020
5058
|
}
|
|
5021
|
-
const
|
|
5059
|
+
const Sa = /* @__PURE__ */ B(ha, [["render", Aa], ["__scopeId", "data-v-9b630564"]]), Ma = {
|
|
5022
5060
|
name: "WmMoreMenu",
|
|
5023
5061
|
inject: {
|
|
5024
5062
|
// Translator shared by the Messenger shell; French fallback when
|
|
5025
5063
|
// the component is used standalone.
|
|
5026
|
-
t: { default: () =>
|
|
5064
|
+
t: { default: () => F() }
|
|
5027
5065
|
},
|
|
5028
5066
|
props: {
|
|
5029
5067
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -5053,24 +5091,24 @@ const xa = /* @__PURE__ */ B(_a, [["render", Ta], ["__scopeId", "data-v-9b630564
|
|
|
5053
5091
|
this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
|
|
5054
5092
|
}
|
|
5055
5093
|
}
|
|
5056
|
-
},
|
|
5094
|
+
}, Ta = { class: "wm-mm" }, xa = {
|
|
5057
5095
|
class: "wm-mm__pop",
|
|
5058
5096
|
role: "menu"
|
|
5059
|
-
},
|
|
5097
|
+
}, Oa = {
|
|
5060
5098
|
key: 0,
|
|
5061
5099
|
class: "wm-mm__section"
|
|
5062
|
-
}, Ra = { class: "wm-mm__label" },
|
|
5100
|
+
}, Ra = { class: "wm-mm__label" }, La = { class: "wm-mm__label" }, Ia = {
|
|
5063
5101
|
key: 1,
|
|
5064
5102
|
class: "wm-mm__sep"
|
|
5065
|
-
},
|
|
5066
|
-
function
|
|
5067
|
-
return c(), d("div",
|
|
5103
|
+
}, Ea = { class: "wm-mm__section" }, Ba = { class: "wm-mm__label" }, Pa = { class: "wm-mm__section" }, Da = { class: "wm-mm__label" }, Na = { class: "wm-mm__label" };
|
|
5104
|
+
function Ua(e, t, n, i, a, s) {
|
|
5105
|
+
return c(), d("div", Ta, [
|
|
5068
5106
|
o("div", {
|
|
5069
5107
|
class: "wm-mm__scrim",
|
|
5070
5108
|
onClick: t[0] || (t[0] = (r) => e.$emit("close"))
|
|
5071
5109
|
}),
|
|
5072
|
-
o("div",
|
|
5073
|
-
n.canRename || n.canExport ? (c(), d("div",
|
|
5110
|
+
o("div", xa, [
|
|
5111
|
+
n.canRename || n.canExport ? (c(), d("div", Oa, [
|
|
5074
5112
|
n.canRename ? (c(), d("button", {
|
|
5075
5113
|
key: 0,
|
|
5076
5114
|
type: "button",
|
|
@@ -5116,12 +5154,12 @@ function Ha(e, t, n, i, a, s) {
|
|
|
5116
5154
|
o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
5117
5155
|
])
|
|
5118
5156
|
], -1)),
|
|
5119
|
-
o("span",
|
|
5157
|
+
o("span", La, v(s.t("moreMenu.exportTranscript")), 1),
|
|
5120
5158
|
t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5121
5159
|
])) : b("", !0)
|
|
5122
5160
|
])) : b("", !0),
|
|
5123
|
-
n.canRename || n.canExport ? (c(), d("div",
|
|
5124
|
-
o("div",
|
|
5161
|
+
n.canRename || n.canExport ? (c(), d("div", Ia)) : b("", !0),
|
|
5162
|
+
o("div", Ea, [
|
|
5125
5163
|
o("button", {
|
|
5126
5164
|
type: "button",
|
|
5127
5165
|
class: "wm-mm__item",
|
|
@@ -5143,16 +5181,16 @@ function Ha(e, t, n, i, a, s) {
|
|
|
5143
5181
|
o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
5144
5182
|
])
|
|
5145
5183
|
], -1)),
|
|
5146
|
-
o("span",
|
|
5184
|
+
o("span", Ba, v(s.t("moreMenu.sound")), 1),
|
|
5147
5185
|
o("span", {
|
|
5148
|
-
class:
|
|
5186
|
+
class: R(["wm-mm__toggle", { "wm-mm__toggle--on": a.soundOn }])
|
|
5149
5187
|
}, [...t[9] || (t[9] = [
|
|
5150
5188
|
o("span", { class: "wm-mm__knob" }, null, -1)
|
|
5151
5189
|
])], 2)
|
|
5152
5190
|
])
|
|
5153
5191
|
]),
|
|
5154
5192
|
t[13] || (t[13] = o("div", { class: "wm-mm__sep" }, null, -1)),
|
|
5155
|
-
o("div",
|
|
5193
|
+
o("div", Pa, [
|
|
5156
5194
|
n.statusUrl ? (c(), d("button", {
|
|
5157
5195
|
key: 0,
|
|
5158
5196
|
type: "button",
|
|
@@ -5174,7 +5212,7 @@ function Ha(e, t, n, i, a, s) {
|
|
|
5174
5212
|
o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
5175
5213
|
])
|
|
5176
5214
|
], -1)),
|
|
5177
|
-
o("span",
|
|
5215
|
+
o("span", Da, v(s.t("moreMenu.serviceStatus")), 1)
|
|
5178
5216
|
])) : b("", !0),
|
|
5179
5217
|
n.helpUrl ? (c(), d("button", {
|
|
5180
5218
|
key: 1,
|
|
@@ -5197,18 +5235,18 @@ function Ha(e, t, n, i, a, s) {
|
|
|
5197
5235
|
o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
|
|
5198
5236
|
])
|
|
5199
5237
|
], -1)),
|
|
5200
|
-
o("span",
|
|
5238
|
+
o("span", Na, v(s.t("moreMenu.helpCenter")), 1)
|
|
5201
5239
|
])) : b("", !0)
|
|
5202
5240
|
])
|
|
5203
5241
|
])
|
|
5204
5242
|
]);
|
|
5205
5243
|
}
|
|
5206
|
-
const
|
|
5244
|
+
const ja = /* @__PURE__ */ B(Ma, [["render", Ua], ["__scopeId", "data-v-4cf6d578"]]), Fa = {
|
|
5207
5245
|
name: "WmRenameDialog",
|
|
5208
5246
|
inject: {
|
|
5209
5247
|
// Translator shared by the Messenger shell; French fallback when
|
|
5210
5248
|
// the component is used standalone.
|
|
5211
|
-
t: { default: () =>
|
|
5249
|
+
t: { default: () => F() }
|
|
5212
5250
|
},
|
|
5213
5251
|
props: {
|
|
5214
5252
|
// Empty defaults: the resolved fallback comes from the translator
|
|
@@ -5245,20 +5283,20 @@ const za = /* @__PURE__ */ B(Oa, [["render", Ha], ["__scopeId", "data-v-4cf6d578
|
|
|
5245
5283
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
5246
5284
|
}
|
|
5247
5285
|
}
|
|
5248
|
-
},
|
|
5286
|
+
}, Ha = { class: "wm-dialog" }, za = {
|
|
5249
5287
|
class: "wm-dialog__card",
|
|
5250
5288
|
role: "dialog",
|
|
5251
5289
|
"aria-modal": "true"
|
|
5252
|
-
},
|
|
5253
|
-
function
|
|
5254
|
-
return c(), d("div",
|
|
5290
|
+
}, qa = { class: "wm-dialog__head" }, $a = { class: "wm-dialog__title" }, Va = ["aria-label"], Ka = { class: "wm-dialog__body" }, Wa = ["placeholder"], Ga = { class: "wm-dialog__actions" }, Ya = ["disabled"];
|
|
5291
|
+
function Ja(e, t, n, i, a, s) {
|
|
5292
|
+
return c(), d("div", Ha, [
|
|
5255
5293
|
o("div", {
|
|
5256
5294
|
class: "wm-dialog__scrim",
|
|
5257
5295
|
onClick: t[0] || (t[0] = (r) => e.$emit("close"))
|
|
5258
5296
|
}),
|
|
5259
|
-
o("div",
|
|
5260
|
-
o("div",
|
|
5261
|
-
o("div",
|
|
5297
|
+
o("div", za, [
|
|
5298
|
+
o("div", qa, [
|
|
5299
|
+
o("div", $a, v(n.title || s.t("rename.title")), 1),
|
|
5262
5300
|
o("button", {
|
|
5263
5301
|
type: "button",
|
|
5264
5302
|
class: "wm-dialog__close",
|
|
@@ -5278,9 +5316,9 @@ function Za(e, t, n, i, a, s) {
|
|
|
5278
5316
|
}, [
|
|
5279
5317
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5280
5318
|
], -1)
|
|
5281
|
-
])], 8,
|
|
5319
|
+
])], 8, Va)
|
|
5282
5320
|
]),
|
|
5283
|
-
o("div",
|
|
5321
|
+
o("div", Ka, [
|
|
5284
5322
|
G(o("input", {
|
|
5285
5323
|
ref: "input",
|
|
5286
5324
|
"onUpdate:modelValue": t[2] || (t[2] = (r) => a.value = r),
|
|
@@ -5289,14 +5327,14 @@ function Za(e, t, n, i, a, s) {
|
|
|
5289
5327
|
placeholder: n.placeholder || s.t("rename.placeholder"),
|
|
5290
5328
|
maxlength: 120,
|
|
5291
5329
|
onKeydown: [
|
|
5292
|
-
t[3] || (t[3] =
|
|
5293
|
-
t[4] || (t[4] =
|
|
5330
|
+
t[3] || (t[3] = ge(J((...r) => s.onSubmit && s.onSubmit(...r), ["prevent"]), ["enter"])),
|
|
5331
|
+
t[4] || (t[4] = ge(J((r) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5294
5332
|
]
|
|
5295
|
-
}, null, 40,
|
|
5333
|
+
}, null, 40, Wa), [
|
|
5296
5334
|
[te, a.value]
|
|
5297
5335
|
])
|
|
5298
5336
|
]),
|
|
5299
|
-
o("div",
|
|
5337
|
+
o("div", Ga, [
|
|
5300
5338
|
o("button", {
|
|
5301
5339
|
type: "button",
|
|
5302
5340
|
class: "wm-dialog__btn",
|
|
@@ -5307,32 +5345,32 @@ function Za(e, t, n, i, a, s) {
|
|
|
5307
5345
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5308
5346
|
disabled: !s.canSubmit,
|
|
5309
5347
|
onClick: t[6] || (t[6] = (...r) => s.onSubmit && s.onSubmit(...r))
|
|
5310
|
-
}, v(s.t("common.save")), 9,
|
|
5348
|
+
}, v(s.t("common.save")), 9, Ya)
|
|
5311
5349
|
])
|
|
5312
5350
|
])
|
|
5313
5351
|
]);
|
|
5314
5352
|
}
|
|
5315
|
-
const
|
|
5353
|
+
const Xa = /* @__PURE__ */ B(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", Qa = {
|
|
5316
5354
|
name: "Messenger",
|
|
5317
5355
|
components: {
|
|
5318
|
-
Launcher:
|
|
5319
|
-
Header:
|
|
5320
|
-
Onboarding:
|
|
5321
|
-
History:
|
|
5322
|
-
MessageList:
|
|
5323
|
-
Composer:
|
|
5324
|
-
SuggestionChips:
|
|
5325
|
-
ApprovalCard:
|
|
5326
|
-
FormCard:
|
|
5327
|
-
Feedback:
|
|
5328
|
-
MoreMenu:
|
|
5329
|
-
RenameDialog:
|
|
5356
|
+
Launcher: qt,
|
|
5357
|
+
Header: _n,
|
|
5358
|
+
Onboarding: Jn,
|
|
5359
|
+
History: hs,
|
|
5360
|
+
MessageList: ii,
|
|
5361
|
+
Composer: Ai,
|
|
5362
|
+
SuggestionChips: xi,
|
|
5363
|
+
ApprovalCard: Ui,
|
|
5364
|
+
FormCard: ua,
|
|
5365
|
+
Feedback: Sa,
|
|
5366
|
+
MoreMenu: ja,
|
|
5367
|
+
RenameDialog: Xa
|
|
5330
5368
|
},
|
|
5331
5369
|
mixins: [
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5370
|
+
yt,
|
|
5371
|
+
wt,
|
|
5372
|
+
bt,
|
|
5373
|
+
Ct
|
|
5336
5374
|
],
|
|
5337
5375
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
5338
5376
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -5354,7 +5392,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5354
5392
|
},
|
|
5355
5393
|
props: {
|
|
5356
5394
|
// Hardcoded server default (overridable for staging/dev).
|
|
5357
|
-
baseUrl: { type: String, default:
|
|
5395
|
+
baseUrl: { type: String, default: it },
|
|
5358
5396
|
widgetId: { type: String, default: "" },
|
|
5359
5397
|
// En mode iframe (modèle par défaut), `origin` et `token` ne sont
|
|
5360
5398
|
// PAS des props : ils sont reçus via `postMessage` du parent
|
|
@@ -5421,6 +5459,19 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5421
5459
|
// instead of the Onboarding home. Set by `onDrawerPick`, read
|
|
5422
5460
|
// (and cleared) by `goHome`.
|
|
5423
5461
|
backToHistory: !1,
|
|
5462
|
+
// Per-conv reveal state for the synthetic welcome bubble.
|
|
5463
|
+
// Mirrors the pacer's sentinel scheme on `revealedAt`:
|
|
5464
|
+
// undefined → not scheduled
|
|
5465
|
+
// 0 → typing-pace in flight (streamingActive=true)
|
|
5466
|
+
// > 0 → revealed (welcome bubble visible at top of conv)
|
|
5467
|
+
// Keyed by conv id so each thread paces its own welcome once
|
|
5468
|
+
// per session ; re-entering an already-revealed conv skips the
|
|
5469
|
+
// typing pass and shows the bubble immediately.
|
|
5470
|
+
welcomeRevealedAt: {},
|
|
5471
|
+
// setTimeout handles for the welcome reveals, indexed by conv id.
|
|
5472
|
+
// Cleared in `beforeUnmount` so the component never fires a
|
|
5473
|
+
// reactive write after teardown.
|
|
5474
|
+
welcomeRevealTimers: {},
|
|
5424
5475
|
// convId → ISO ts of the unread batch the user has dismissed
|
|
5425
5476
|
// (×) on the closed-launcher notification stack. A new message
|
|
5426
5477
|
// on the same thread bumps the ts, which makes the comparison
|
|
@@ -5482,7 +5533,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5482
5533
|
// 4. French.
|
|
5483
5534
|
locale() {
|
|
5484
5535
|
var e;
|
|
5485
|
-
return
|
|
5536
|
+
return xe(
|
|
5486
5537
|
this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
|
|
5487
5538
|
);
|
|
5488
5539
|
},
|
|
@@ -5490,7 +5541,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5490
5541
|
// `locale` changes. `t()` below (and the provided closure) delegate
|
|
5491
5542
|
// to it so every string resolves against the current language.
|
|
5492
5543
|
translator() {
|
|
5493
|
-
return
|
|
5544
|
+
return F(this.locale);
|
|
5494
5545
|
},
|
|
5495
5546
|
error() {
|
|
5496
5547
|
var e;
|
|
@@ -5525,13 +5576,13 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5525
5576
|
const a = e[i.id] || [], s = Y(i.last_read_message_id);
|
|
5526
5577
|
let r = 0, l = null;
|
|
5527
5578
|
for (let w = a.length - 1; w >= 0; w--) {
|
|
5528
|
-
const
|
|
5529
|
-
if (!
|
|
5530
|
-
if (((k =
|
|
5531
|
-
const
|
|
5532
|
-
if (
|
|
5533
|
-
if (s != null &&
|
|
5534
|
-
t[
|
|
5579
|
+
const T = a[w];
|
|
5580
|
+
if (!T) continue;
|
|
5581
|
+
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5582
|
+
const I = Y(T.id);
|
|
5583
|
+
if (I != null) {
|
|
5584
|
+
if (s != null && I <= s) break;
|
|
5585
|
+
t[T.id] !== 0 && (!l && T.author && (l = T.author), r++);
|
|
5535
5586
|
}
|
|
5536
5587
|
}
|
|
5537
5588
|
if (!a.length) {
|
|
@@ -5543,7 +5594,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5543
5594
|
);
|
|
5544
5595
|
return {
|
|
5545
5596
|
...i,
|
|
5546
|
-
_preview:
|
|
5597
|
+
_preview: _t(i, g),
|
|
5547
5598
|
_unread: r > 0,
|
|
5548
5599
|
_unreadCount: r,
|
|
5549
5600
|
_lastAuthor: l
|
|
@@ -5567,7 +5618,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5567
5618
|
preview: n._preview || this.t("onboarding.newMessage"),
|
|
5568
5619
|
unread: !!n._unread,
|
|
5569
5620
|
author: n._lastAuthor || null,
|
|
5570
|
-
_ts:
|
|
5621
|
+
_ts: Be(n, e[n.id] || [])
|
|
5571
5622
|
})).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
|
|
5572
5623
|
},
|
|
5573
5624
|
// Unread threads (one entry per conv with unseen agent/human
|
|
@@ -5579,7 +5630,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5579
5630
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
|
|
5580
5631
|
for (const i of this.drawerConversations) {
|
|
5581
5632
|
if (!i._unread) continue;
|
|
5582
|
-
const a =
|
|
5633
|
+
const a = Be(i, e[i.id] || []), s = i._lastAuthor, r = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (r ? this.agentName : "") || "", g = (s == null ? void 0 : s.avatar_url) || (r ? this.agentAvatarUrl : null);
|
|
5583
5634
|
t.push({
|
|
5584
5635
|
convId: i.id,
|
|
5585
5636
|
preview: i._preview || this.t("notification.youHaveNewMessage"),
|
|
@@ -5651,7 +5702,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5651
5702
|
rootStyle() {
|
|
5652
5703
|
var t;
|
|
5653
5704
|
const e = (t = this.widget) == null ? void 0 : t.primary_color;
|
|
5654
|
-
return e &&
|
|
5705
|
+
return e && ct(e) ? { "--wm-primary": e } : null;
|
|
5655
5706
|
},
|
|
5656
5707
|
// Hero title shown above the onboarding actions. Schema-side the
|
|
5657
5708
|
// column was renamed `welcome_message` → `title` ; the old name
|
|
@@ -5740,14 +5791,14 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5740
5791
|
var a, s;
|
|
5741
5792
|
const e = this.currentConv;
|
|
5742
5793
|
if (!e) return [];
|
|
5743
|
-
const t = this.buildWelcomePrefix(e);
|
|
5794
|
+
const t = this.welcomeRevealedAt[e.id] > 0 ? this.buildWelcomePrefix(e) : [];
|
|
5744
5795
|
if (!e._draft) {
|
|
5745
5796
|
const r = (s = (a = this.s) == null ? void 0 : a.paginationByConv) == null ? void 0 : s[e.id];
|
|
5746
5797
|
if (!(r != null && r.loaded)) return t;
|
|
5747
5798
|
}
|
|
5748
5799
|
const n = this.revealedAt, i = (this.s.messagesByConv[e.id] || []).filter((r) => {
|
|
5749
|
-
var l, g, k, w,
|
|
5750
|
-
return (r == null ? void 0 : r.type) === "action" && ((l = r == null ? void 0 : r.payload) == null ? void 0 : l.state) === "pending" ||
|
|
5800
|
+
var l, g, k, w, T;
|
|
5801
|
+
return (r == null ? void 0 : r.type) === "action" && ((l = r == null ? void 0 : r.payload) == null ? void 0 : l.state) === "pending" || he(r) && !(n[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((g = r == null ? void 0 : r.payload) == null ? void 0 : g.type) === "system" || Array.isArray((k = r == null ? void 0 : r.payload) == null ? void 0 : k.attachments) && r.payload.attachments.length || (w = r == null ? void 0 : r.metadata) != null && w.artifact || (T = r == null ? void 0 : r.metadata) != null && T.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
5751
5802
|
});
|
|
5752
5803
|
return t.length ? [...t, ...i] : i;
|
|
5753
5804
|
},
|
|
@@ -5758,8 +5809,8 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5758
5809
|
streamingActive() {
|
|
5759
5810
|
var n, i, a;
|
|
5760
5811
|
const e = this.currentConv;
|
|
5761
|
-
return e ? Object.keys(((n = this.s) == null ? void 0 : n.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : (((a = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : a[e.id]) || []).some(
|
|
5762
|
-
(s) =>
|
|
5812
|
+
return e ? Object.keys(((n = this.s) == null ? void 0 : n.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((a = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : a[e.id]) || []).some(
|
|
5813
|
+
(s) => he(s) && !(this.revealedAt[s.id] > 0)
|
|
5763
5814
|
) : !1;
|
|
5764
5815
|
},
|
|
5765
5816
|
// Internal: the raw persisted list for the current conversation. We
|
|
@@ -5834,7 +5885,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5834
5885
|
}
|
|
5835
5886
|
}
|
|
5836
5887
|
return this.t("messageList.today", {
|
|
5837
|
-
time:
|
|
5888
|
+
time: Ce(t, ne(this.locale))
|
|
5838
5889
|
});
|
|
5839
5890
|
},
|
|
5840
5891
|
// Pagination state for the active conversation. Drives the
|
|
@@ -5876,7 +5927,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5876
5927
|
var t;
|
|
5877
5928
|
this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.resetApprovalPacing(), this.isViewingThread && (this.unreadAnchorId = Y(
|
|
5878
5929
|
(t = this.currentConv) == null ? void 0 : t.last_read_message_id
|
|
5879
|
-
), this.unreadBoundaryTs = e ? (/* @__PURE__ */ new Date()).toISOString() : "");
|
|
5930
|
+
), this.unreadBoundaryTs = e ? (/* @__PURE__ */ new Date()).toISOString() : ""), e && this.scheduleWelcomeReveal(e);
|
|
5880
5931
|
},
|
|
5881
5932
|
immediate: !0
|
|
5882
5933
|
},
|
|
@@ -5939,14 +5990,14 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
5939
5990
|
}
|
|
5940
5991
|
},
|
|
5941
5992
|
async mounted() {
|
|
5942
|
-
if (typeof document < "u" && !document.getElementById(
|
|
5993
|
+
if (typeof document < "u" && !document.getElementById(Ne)) {
|
|
5943
5994
|
const e = document.createElement("style");
|
|
5944
|
-
e.id =
|
|
5995
|
+
e.id = Ne, e.textContent = rt, document.head.appendChild(e);
|
|
5945
5996
|
}
|
|
5946
5997
|
this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
|
|
5947
5998
|
},
|
|
5948
5999
|
beforeUnmount() {
|
|
5949
|
-
this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
|
|
6000
|
+
this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.cancelWelcomeTimers(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
|
|
5950
6001
|
},
|
|
5951
6002
|
methods: {
|
|
5952
6003
|
// Translate a key against the resolved language. Used in this
|
|
@@ -6007,12 +6058,12 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6007
6058
|
return;
|
|
6008
6059
|
}
|
|
6009
6060
|
try {
|
|
6010
|
-
await this.waitForParentInit(), this.transport =
|
|
6011
|
-
|
|
6061
|
+
await this.waitForParentInit(), this.transport = Re(
|
|
6062
|
+
Ze({
|
|
6012
6063
|
baseUrl: this.baseUrl,
|
|
6013
6064
|
widgetId: this.widgetId
|
|
6014
6065
|
})
|
|
6015
|
-
), this.store =
|
|
6066
|
+
), this.store = Re(st(this.transport)), this.hydrateNotifPref();
|
|
6016
6067
|
const e = this.parentVariables || this.context || null;
|
|
6017
6068
|
if (await this.store.start({
|
|
6018
6069
|
origin: this.parentOrigin,
|
|
@@ -6031,7 +6082,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6031
6082
|
}
|
|
6032
6083
|
},
|
|
6033
6084
|
async refresh() {
|
|
6034
|
-
this.store && this.store.destroy(), this.cancelReveals(), this.teardownLiveReveal(), this.teardownNotifications(), this.convOpenedAt = 0, this.transport = null, this.store = null, this.isOpen = !1, this.draft = "", this.busy = !1, this.bootError = null, this.pendingAttachments = [], this.feedbackBusy = !1, this.feedbackDone = !1, this.moreOpen = !1, this.renameDialogOpen = !1, this.draftConv = null, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, await this.boot(), this.isEmbedded && this.store && await this.open();
|
|
6085
|
+
this.store && this.store.destroy(), this.cancelReveals(), this.cancelWelcomeTimers(), this.welcomeRevealedAt = {}, this.teardownLiveReveal(), this.teardownNotifications(), this.convOpenedAt = 0, this.transport = null, this.store = null, this.isOpen = !1, this.draft = "", this.busy = !1, this.bootError = null, this.pendingAttachments = [], this.feedbackBusy = !1, this.feedbackDone = !1, this.moreOpen = !1, this.renameDialogOpen = !1, this.draftConv = null, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, await this.boot(), this.isEmbedded && this.store && await this.open();
|
|
6035
6086
|
},
|
|
6036
6087
|
// ── Float overlay measurement ────────────────────────────────────
|
|
6037
6088
|
syncFloatObserver(e) {
|
|
@@ -6107,21 +6158,21 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6107
6158
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
6108
6159
|
},
|
|
6109
6160
|
sendCurrentLauncherSize() {
|
|
6110
|
-
var w,
|
|
6161
|
+
var w, T, I, A, q, M, N;
|
|
6111
6162
|
if (this.isOpen) return;
|
|
6112
|
-
const e = (
|
|
6163
|
+
const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
|
|
6113
6164
|
if (!e) return;
|
|
6114
6165
|
const t = e.getBoundingClientRect();
|
|
6115
6166
|
if (!t.width || !t.height) return;
|
|
6116
|
-
const n = (((
|
|
6167
|
+
const n = (((I = this.launcherPeeks) == null ? void 0 : I.length) ?? 0) > 0, i = 16, a = Math.ceil(t.width), s = Math.ceil(t.height), r = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (N = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : N.call(M, ".wm-peek"), g = l && l.length ? l[l.length - 1] : null;
|
|
6117
6168
|
let k = null;
|
|
6118
6169
|
if (g) {
|
|
6119
|
-
const
|
|
6170
|
+
const U = g.getBoundingClientRect();
|
|
6120
6171
|
k = {
|
|
6121
|
-
width: Math.ceil(
|
|
6122
|
-
height: Math.ceil(
|
|
6123
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
6124
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
6172
|
+
width: Math.ceil(U.width),
|
|
6173
|
+
height: Math.ceil(U.height),
|
|
6174
|
+
rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
|
|
6175
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
|
|
6125
6176
|
};
|
|
6126
6177
|
}
|
|
6127
6178
|
this.notifyParentResize("closed", {
|
|
@@ -6181,8 +6232,11 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6181
6232
|
if (this.busy) return null;
|
|
6182
6233
|
this.busy = !0;
|
|
6183
6234
|
try {
|
|
6184
|
-
const t = await this.store.createConversation({});
|
|
6185
|
-
return
|
|
6235
|
+
const t = await this.store.createConversation({}), n = this.welcomeRevealedAt.__draft__;
|
|
6236
|
+
return n !== void 0 && (this.welcomeRevealedAt = {
|
|
6237
|
+
...this.welcomeRevealedAt,
|
|
6238
|
+
[t.id]: n
|
|
6239
|
+
}), this.draftConv = null, this.activeConvId = t.id, await this.store.openConversation(t.id), this.markConvRead(t), t;
|
|
6186
6240
|
} catch (t) {
|
|
6187
6241
|
return console.error("[ww-messenger] create conv failed", t), this.bootError = (t == null ? void 0 : t.message) || String(t), null;
|
|
6188
6242
|
} finally {
|
|
@@ -6202,10 +6256,11 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6202
6256
|
// Build the synthetic agent bubble that prefaces every conversation
|
|
6203
6257
|
// with `widget.welcome_message`. Returns an empty array when no
|
|
6204
6258
|
// welcome line is configured ; otherwise a single-element array
|
|
6205
|
-
// ready to be spread at the head of `displayedMessages`. The
|
|
6206
|
-
// is keyed `__welcome__` and
|
|
6207
|
-
//
|
|
6208
|
-
//
|
|
6259
|
+
// ready to be spread at the head of `displayedMessages`. The
|
|
6260
|
+
// bubble is keyed `__welcome__` and stamped with the conv's own
|
|
6261
|
+
// `created_at` so it sits chronologically before every real
|
|
6262
|
+
// message ; reveal gating is done by `displayedMessages`
|
|
6263
|
+
// against `welcomeRevealedAt[convId]`.
|
|
6209
6264
|
buildWelcomePrefix(e) {
|
|
6210
6265
|
const t = this.widgetWelcomeMessage;
|
|
6211
6266
|
return !t || typeof t != "string" || !t.trim() ? [] : [
|
|
@@ -6221,6 +6276,50 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6221
6276
|
}
|
|
6222
6277
|
];
|
|
6223
6278
|
},
|
|
6279
|
+
// Pace the synthetic welcome bubble on first entry into a conv:
|
|
6280
|
+
// mark it queued (entry = 0), then flip to a timestamp after the
|
|
6281
|
+
// typing dwell so it lands like a normal agent message. Mirrors
|
|
6282
|
+
// the per-message scaling used by `revealPacing.scheduleReveal`
|
|
6283
|
+
// (FIRST_REVEAL_DELAY lead-in + clamped char-count dwell), but
|
|
6284
|
+
// tracked separately because the bubble lives outside the store.
|
|
6285
|
+
// Idempotent on conv id : a re-entry into an already-revealed
|
|
6286
|
+
// conv leaves the entry untouched, so the welcome stays visible
|
|
6287
|
+
// without re-pacing.
|
|
6288
|
+
scheduleWelcomeReveal(e) {
|
|
6289
|
+
if (!e) return;
|
|
6290
|
+
const t = this.widgetWelcomeMessage;
|
|
6291
|
+
if (!t || typeof t != "string" || !t.trim() || this.welcomeRevealedAt[e] !== void 0) return;
|
|
6292
|
+
this.welcomeRevealedAt = {
|
|
6293
|
+
...this.welcomeRevealedAt,
|
|
6294
|
+
[e]: 0
|
|
6295
|
+
};
|
|
6296
|
+
const n = this.revealPacing, i = t.trim().length, a = Math.min(
|
|
6297
|
+
n.maxTypingMs,
|
|
6298
|
+
Math.max(n.minTypingMs, i * n.msPerChar)
|
|
6299
|
+
), s = n.firstRevealDelayMs + a, r = setTimeout(() => {
|
|
6300
|
+
this.welcomeRevealedAt = {
|
|
6301
|
+
...this.welcomeRevealedAt,
|
|
6302
|
+
[e]: Date.now()
|
|
6303
|
+
};
|
|
6304
|
+
const l = { ...this.welcomeRevealTimers };
|
|
6305
|
+
delete l[e], this.welcomeRevealTimers = l;
|
|
6306
|
+
}, s);
|
|
6307
|
+
this.welcomeRevealTimers = {
|
|
6308
|
+
...this.welcomeRevealTimers,
|
|
6309
|
+
[e]: r
|
|
6310
|
+
};
|
|
6311
|
+
},
|
|
6312
|
+
// Clear pending welcome timers (panel unmount, refresh). Doesn't
|
|
6313
|
+
// touch `welcomeRevealedAt`: the caller decides whether to also
|
|
6314
|
+
// wipe the revealed map (refresh does, unmount doesn't).
|
|
6315
|
+
cancelWelcomeTimers() {
|
|
6316
|
+
for (const e of Object.values(this.welcomeRevealTimers))
|
|
6317
|
+
try {
|
|
6318
|
+
clearTimeout(e);
|
|
6319
|
+
} catch {
|
|
6320
|
+
}
|
|
6321
|
+
this.welcomeRevealTimers = {};
|
|
6322
|
+
},
|
|
6224
6323
|
// ── Header / more menu ──────────────────────────────────────────
|
|
6225
6324
|
toggleMore() {
|
|
6226
6325
|
this.moreOpen = !this.moreOpen;
|
|
@@ -6247,7 +6346,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6247
6346
|
this.openRenameDialog();
|
|
6248
6347
|
break;
|
|
6249
6348
|
case "export":
|
|
6250
|
-
|
|
6349
|
+
vt(
|
|
6251
6350
|
this.currentConv,
|
|
6252
6351
|
this.currentConv ? (n = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : n[this.currentConv.id] : [],
|
|
6253
6352
|
this.translator,
|
|
@@ -6255,14 +6354,14 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6255
6354
|
);
|
|
6256
6355
|
break;
|
|
6257
6356
|
case "status":
|
|
6258
|
-
if (
|
|
6357
|
+
if (_e(this.statusUrl))
|
|
6259
6358
|
try {
|
|
6260
6359
|
window.open(this.statusUrl, "_blank", "noopener");
|
|
6261
6360
|
} catch {
|
|
6262
6361
|
}
|
|
6263
6362
|
break;
|
|
6264
6363
|
case "help":
|
|
6265
|
-
if (
|
|
6364
|
+
if (_e(this.helpUrl))
|
|
6266
6365
|
try {
|
|
6267
6366
|
window.open(this.helpUrl, "_blank", "noopener");
|
|
6268
6367
|
} catch {
|
|
@@ -6311,12 +6410,12 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6311
6410
|
async onFormSubmit({ values: e }) {
|
|
6312
6411
|
const t = this.pendingForm;
|
|
6313
6412
|
if (!(t != null && t.form)) return;
|
|
6314
|
-
const n =
|
|
6413
|
+
const n = ht(t.form, e, this.translator);
|
|
6315
6414
|
if (!n) return;
|
|
6316
6415
|
let i = this.currentConv;
|
|
6317
6416
|
i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, n, {
|
|
6318
6417
|
metadata: {
|
|
6319
|
-
artifact:
|
|
6418
|
+
artifact: mt(
|
|
6320
6419
|
t.form,
|
|
6321
6420
|
e,
|
|
6322
6421
|
this.translator
|
|
@@ -6367,7 +6466,7 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6367
6466
|
if (e) {
|
|
6368
6467
|
if (e.url) {
|
|
6369
6468
|
if (await this.openInternalUrl(e.url)) return;
|
|
6370
|
-
if (!
|
|
6469
|
+
if (!_e(e.url)) {
|
|
6371
6470
|
console.warn(
|
|
6372
6471
|
"[messenger] refusing unsafe quick-link url",
|
|
6373
6472
|
e.url
|
|
@@ -6399,31 +6498,31 @@ const eo = /* @__PURE__ */ B(qa, [["render", Za], ["__scopeId", "data-v-6d5f94a8
|
|
|
6399
6498
|
}
|
|
6400
6499
|
}
|
|
6401
6500
|
}
|
|
6402
|
-
},
|
|
6501
|
+
}, Za = {
|
|
6403
6502
|
key: 0,
|
|
6404
6503
|
class: "wm-loading",
|
|
6405
6504
|
"aria-busy": "true",
|
|
6406
6505
|
"aria-live": "polite"
|
|
6407
|
-
},
|
|
6506
|
+
}, eo = ["aria-label"], to = {
|
|
6408
6507
|
key: 0,
|
|
6409
6508
|
class: "wm-state"
|
|
6410
|
-
},
|
|
6509
|
+
}, no = { class: "wm-state__err" }, so = { class: "wm-state__errTitle" }, ro = { class: "wm-state__errSub" }, io = { class: "wm-bottom" }, ao = {
|
|
6411
6510
|
key: 0,
|
|
6412
6511
|
ref: "floatEl",
|
|
6413
6512
|
class: "wm-float"
|
|
6414
|
-
},
|
|
6513
|
+
}, oo = {
|
|
6415
6514
|
key: 1,
|
|
6416
6515
|
class: "wm-actionWait",
|
|
6417
6516
|
role: "status",
|
|
6418
6517
|
"aria-live": "polite"
|
|
6419
|
-
},
|
|
6518
|
+
}, lo = { class: "wm-actionWait__lbl" }, co = {
|
|
6420
6519
|
key: 2,
|
|
6421
6520
|
class: "wm-attached"
|
|
6422
|
-
},
|
|
6423
|
-
function
|
|
6424
|
-
const r =
|
|
6521
|
+
}, uo = ["aria-label", "onClick"];
|
|
6522
|
+
function ho(e, t, n, i, a, s) {
|
|
6523
|
+
const r = E("Launcher"), l = E("Header"), g = E("History"), k = E("Onboarding"), w = E("MessageList"), T = E("ApprovalCard"), I = E("FormCard"), A = E("Feedback"), q = E("SuggestionChips"), M = E("Composer"), N = E("MoreMenu"), U = E("RenameDialog");
|
|
6425
6524
|
return c(), d("div", {
|
|
6426
|
-
class:
|
|
6525
|
+
class: R(["wm-root", `wm-root--${n.displayMode}`]),
|
|
6427
6526
|
style: z(s.rootStyle)
|
|
6428
6527
|
}, [
|
|
6429
6528
|
!a.isOpen && !s.isEmbedded ? (c(), P(r, {
|
|
@@ -6436,7 +6535,7 @@ function _o(e, t, n, i, a, s) {
|
|
|
6436
6535
|
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
|
|
6437
6536
|
a.isOpen || s.isEmbedded ? (c(), d("section", {
|
|
6438
6537
|
key: 1,
|
|
6439
|
-
class:
|
|
6538
|
+
class: R([
|
|
6440
6539
|
"wm-panel",
|
|
6441
6540
|
`wm-panel--${n.displayMode}`,
|
|
6442
6541
|
{ "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
|
|
@@ -6444,15 +6543,15 @@ function _o(e, t, n, i, a, s) {
|
|
|
6444
6543
|
style: z(a.floatHeight ? { "--wm-float-h": a.floatHeight + "px" } : null),
|
|
6445
6544
|
role: "dialog",
|
|
6446
6545
|
"aria-label": "Messenger",
|
|
6447
|
-
onClick: t[6] || (t[6] = (...
|
|
6546
|
+
onClick: t[6] || (t[6] = (...D) => s.onPanelClick && s.onPanelClick(...D))
|
|
6448
6547
|
}, [
|
|
6449
|
-
!s.ready && !s.error ? (c(), d("div",
|
|
6548
|
+
!s.ready && !s.error ? (c(), d("div", Za, [
|
|
6450
6549
|
s.isEmbedded ? b("", !0) : (c(), d("button", {
|
|
6451
6550
|
key: 0,
|
|
6452
6551
|
type: "button",
|
|
6453
6552
|
class: "wm-loading__close",
|
|
6454
6553
|
"aria-label": s.t("loading.minimize"),
|
|
6455
|
-
onClick: t[0] || (t[0] = (...
|
|
6554
|
+
onClick: t[0] || (t[0] = (...D) => s.close && s.close(...D))
|
|
6456
6555
|
}, [...t[7] || (t[7] = [
|
|
6457
6556
|
o("svg", {
|
|
6458
6557
|
width: "13",
|
|
@@ -6467,7 +6566,7 @@ function _o(e, t, n, i, a, s) {
|
|
|
6467
6566
|
}, [
|
|
6468
6567
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6469
6568
|
], -1)
|
|
6470
|
-
])], 8,
|
|
6569
|
+
])], 8, eo)),
|
|
6471
6570
|
t[8] || (t[8] = o("div", {
|
|
6472
6571
|
class: "wm-loading__spinner",
|
|
6473
6572
|
"aria-hidden": "true"
|
|
@@ -6487,8 +6586,8 @@ function _o(e, t, n, i, a, s) {
|
|
|
6487
6586
|
onMore: s.toggleMore,
|
|
6488
6587
|
onClose: s.close
|
|
6489
6588
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6490
|
-
s.error ? (c(), d("div",
|
|
6491
|
-
o("div",
|
|
6589
|
+
s.error ? (c(), d("div", to, [
|
|
6590
|
+
o("div", no, [
|
|
6492
6591
|
t[9] || (t[9] = o("div", { class: "wm-state__errIcon" }, [
|
|
6493
6592
|
o("svg", {
|
|
6494
6593
|
width: "14",
|
|
@@ -6505,8 +6604,8 @@ function _o(e, t, n, i, a, s) {
|
|
|
6505
6604
|
])
|
|
6506
6605
|
], -1)),
|
|
6507
6606
|
o("div", null, [
|
|
6508
|
-
o("div",
|
|
6509
|
-
o("div",
|
|
6607
|
+
o("div", so, v(s.t("error.connectionFailed")), 1),
|
|
6608
|
+
o("div", ro, v(s.error), 1)
|
|
6510
6609
|
])
|
|
6511
6610
|
])
|
|
6512
6611
|
])) : !s.currentConv && a.showHistory ? (c(), P(g, {
|
|
@@ -6528,9 +6627,9 @@ function _o(e, t, n, i, a, s) {
|
|
|
6528
6627
|
"ai-agent-avatar-url": s.agentAvatarUrl,
|
|
6529
6628
|
onLoadMore: s.onLoadMore
|
|
6530
6629
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
|
|
6531
|
-
o("div",
|
|
6532
|
-
s.floatVisible ? (c(), d("div",
|
|
6533
|
-
s.approvalReady ? (c(), P(
|
|
6630
|
+
o("div", io, [
|
|
6631
|
+
s.floatVisible ? (c(), d("div", ao, [
|
|
6632
|
+
s.approvalReady ? (c(), P(T, {
|
|
6534
6633
|
key: 0,
|
|
6535
6634
|
action: s.approvalTitle,
|
|
6536
6635
|
detail: s.approvalDetail,
|
|
@@ -6538,7 +6637,7 @@ function _o(e, t, n, i, a, s) {
|
|
|
6538
6637
|
"agent-name": s.agentName,
|
|
6539
6638
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6540
6639
|
onCallback: s.onApprovalCallback
|
|
6541
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), P(
|
|
6640
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), P(I, {
|
|
6542
6641
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
6543
6642
|
form: s.pendingForm.form,
|
|
6544
6643
|
"agent-name": s.agentName,
|
|
@@ -6555,19 +6654,19 @@ function _o(e, t, n, i, a, s) {
|
|
|
6555
6654
|
onSelect: s.onSuggestion
|
|
6556
6655
|
}, null, 8, ["items", "onSelect"]))
|
|
6557
6656
|
], 512)) : b("", !0),
|
|
6558
|
-
s.actionInFlight ? (c(), d("div",
|
|
6657
|
+
s.actionInFlight ? (c(), d("div", oo, [
|
|
6559
6658
|
t[10] || (t[10] = o("span", {
|
|
6560
6659
|
class: "wm-actionWait__spinner",
|
|
6561
6660
|
"aria-hidden": "true"
|
|
6562
6661
|
}, null, -1)),
|
|
6563
|
-
o("span",
|
|
6662
|
+
o("span", lo, v(s.t("action.inProgress", {
|
|
6564
6663
|
name: s.actionInFlightName
|
|
6565
6664
|
})), 1)
|
|
6566
6665
|
])) : (c(), P(M, {
|
|
6567
6666
|
key: 2,
|
|
6568
6667
|
ref: "composer",
|
|
6569
6668
|
modelValue: a.draft,
|
|
6570
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
6669
|
+
"onUpdate:modelValue": t[2] || (t[2] = (D) => a.draft = D),
|
|
6571
6670
|
placeholder: s.composerPlaceholder,
|
|
6572
6671
|
disabled: !!s.pendingApproval,
|
|
6573
6672
|
"attach-label": s.t("composer.attachFile"),
|
|
@@ -6576,26 +6675,26 @@ function _o(e, t, n, i, a, s) {
|
|
|
6576
6675
|
onAttach: s.onAttach
|
|
6577
6676
|
}, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
|
|
6578
6677
|
]),
|
|
6579
|
-
a.moreOpen ? (c(), P(
|
|
6678
|
+
a.moreOpen ? (c(), P(N, {
|
|
6580
6679
|
key: 0,
|
|
6581
6680
|
"can-rename": !!s.currentConv && !s.currentConv._draft,
|
|
6582
6681
|
"can-export": !!s.currentConv && !s.currentConv._draft,
|
|
6583
6682
|
"sound-enabled": e.soundEnabled,
|
|
6584
6683
|
"status-url": s.statusUrl,
|
|
6585
6684
|
"help-url": s.helpUrl,
|
|
6586
|
-
onClose: t[3] || (t[3] = (
|
|
6685
|
+
onClose: t[3] || (t[3] = (D) => a.moreOpen = !1),
|
|
6587
6686
|
onSoundToggle: e.onSoundToggle,
|
|
6588
6687
|
onAction: s.onMoreAction
|
|
6589
6688
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
|
|
6590
|
-
a.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(
|
|
6689
|
+
a.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(U, {
|
|
6591
6690
|
key: 1,
|
|
6592
6691
|
"initial-value": s.currentConv.name || "",
|
|
6593
6692
|
title: s.t("rename.dialogTitle"),
|
|
6594
|
-
onClose: t[4] || (t[4] = (
|
|
6693
|
+
onClose: t[4] || (t[4] = (D) => a.renameDialogOpen = !1),
|
|
6595
6694
|
onSubmit: s.onRenameSubmit
|
|
6596
6695
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
|
|
6597
|
-
a.pendingAttachments.length ? (c(), d("div",
|
|
6598
|
-
(c(!0), d(L, null,
|
|
6696
|
+
a.pendingAttachments.length ? (c(), d("div", co, [
|
|
6697
|
+
(c(!0), d(L, null, j(a.pendingAttachments, (D, K) => (c(), d("div", {
|
|
6599
6698
|
key: K,
|
|
6600
6699
|
class: "wm-attached__chip"
|
|
6601
6700
|
}, [
|
|
@@ -6612,7 +6711,7 @@ function _o(e, t, n, i, a, s) {
|
|
|
6612
6711
|
}, [
|
|
6613
6712
|
o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
6614
6713
|
], -1)),
|
|
6615
|
-
o("span", null, v(
|
|
6714
|
+
o("span", null, v(D.name), 1),
|
|
6616
6715
|
o("button", {
|
|
6617
6716
|
type: "button",
|
|
6618
6717
|
"aria-label": s.t("attachment.remove"),
|
|
@@ -6631,7 +6730,7 @@ function _o(e, t, n, i, a, s) {
|
|
|
6631
6730
|
}, [
|
|
6632
6731
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6633
6732
|
], -1)
|
|
6634
|
-
])], 8,
|
|
6733
|
+
])], 8, uo)
|
|
6635
6734
|
]))), 128))
|
|
6636
6735
|
])) : b("", !0)
|
|
6637
6736
|
], 64)) : (c(), P(k, {
|
|
@@ -6646,16 +6745,16 @@ function _o(e, t, n, i, a, s) {
|
|
|
6646
6745
|
onStart: s.startConv,
|
|
6647
6746
|
onSelect: s.onQuickLink,
|
|
6648
6747
|
onResume: s.onDrawerPick,
|
|
6649
|
-
onViewHistory: t[1] || (t[1] = (
|
|
6748
|
+
onViewHistory: t[1] || (t[1] = (D) => a.showHistory = !0)
|
|
6650
6749
|
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6651
|
-
a.moreOpen && !s.currentConv ? (c(), P(
|
|
6750
|
+
a.moreOpen && !s.currentConv ? (c(), P(N, {
|
|
6652
6751
|
key: 4,
|
|
6653
6752
|
"can-rename": !1,
|
|
6654
6753
|
"can-export": !1,
|
|
6655
6754
|
"sound-enabled": e.soundEnabled,
|
|
6656
6755
|
"status-url": s.statusUrl,
|
|
6657
6756
|
"help-url": s.helpUrl,
|
|
6658
|
-
onClose: t[5] || (t[5] = (
|
|
6757
|
+
onClose: t[5] || (t[5] = (D) => a.moreOpen = !1),
|
|
6659
6758
|
onSoundToggle: e.onSoundToggle,
|
|
6660
6759
|
onAction: s.onMoreAction
|
|
6661
6760
|
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
|
|
@@ -6663,54 +6762,54 @@ function _o(e, t, n, i, a, s) {
|
|
|
6663
6762
|
], 6)) : b("", !0)
|
|
6664
6763
|
], 6);
|
|
6665
6764
|
}
|
|
6666
|
-
const
|
|
6765
|
+
const _o = /* @__PURE__ */ B(Qa, [["render", ho], ["__scopeId", "data-v-f5e554c2"]]), go = "0.5.57";
|
|
6667
6766
|
export {
|
|
6668
6767
|
oe as AIAvatar,
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
|
|
6768
|
+
be as AVATAR_COLORS,
|
|
6769
|
+
As as ActionResult,
|
|
6770
|
+
Ui as ApprovalCard,
|
|
6771
|
+
Es as ArtifactFormResponse,
|
|
6772
|
+
Ks as ArtifactInfoCard,
|
|
6773
|
+
ur as ArtifactRenderer,
|
|
6774
|
+
or as ArtifactTicket,
|
|
6775
|
+
Cr as AttachmentPreview,
|
|
6776
|
+
Tr as Bubble,
|
|
6777
|
+
Ai as Composer,
|
|
6778
|
+
it as DEFAULT_BASE_URL,
|
|
6779
|
+
ue as DEFAULT_LANGUAGE,
|
|
6780
|
+
Sa as Feedback,
|
|
6781
|
+
ua as FormCard,
|
|
6782
|
+
_n as Header,
|
|
6783
|
+
ve as HumanAvatar,
|
|
6784
|
+
qt as Launcher,
|
|
6785
|
+
Oe as MEDIA_RECORDER_SUPPORTED,
|
|
6786
|
+
ii as MessageList,
|
|
6787
|
+
_o as Messenger,
|
|
6788
|
+
ja as MoreMenu,
|
|
6789
|
+
Jn as Onboarding,
|
|
6790
|
+
pe as SCREEN_CAPTURE_SUPPORTED,
|
|
6791
|
+
ut as SUPPORTED_LANGUAGES,
|
|
6792
|
+
xi as SuggestionChips,
|
|
6793
|
+
tn as TeamAvatars,
|
|
6794
|
+
Lr as Typing,
|
|
6795
|
+
go as VERSION,
|
|
6796
|
+
Me as avatarColor,
|
|
6797
|
+
Te as avatarInitials,
|
|
6798
|
+
oi as captureScreenshotFile,
|
|
6700
6799
|
H as colors,
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6800
|
+
st as createStore,
|
|
6801
|
+
F as createTranslator,
|
|
6802
|
+
Ze as createTransport,
|
|
6704
6803
|
ne as dateLocale,
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6804
|
+
_o as default,
|
|
6805
|
+
Ce as formatTime,
|
|
6806
|
+
fo as guessAttachmentKind,
|
|
6807
|
+
ai as pickRecorderMime,
|
|
6808
|
+
qe as renderInlineMarkdown,
|
|
6809
|
+
ft as renderMarkdown,
|
|
6810
|
+
xe as resolveLanguage,
|
|
6811
|
+
ci as startScreenRecording,
|
|
6812
|
+
rt as tokensCss,
|
|
6813
|
+
nt as uuid,
|
|
6814
|
+
nt as v4
|
|
6716
6815
|
};
|