@_solaris/messenger-widget 0.5.12 → 0.5.13
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 +2 -2
- package/dist/messenger.cjs +7 -7
- package/dist/messenger.js +718 -702
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as H, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Pe, withCtx as Ue, Fragment as I, renderList as P, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as b, createBlock as N, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as He, markRaw as ke } from "vue";
|
|
2
|
+
const qe = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
5
5
|
"message_stream",
|
|
@@ -35,12 +35,12 @@ function We(e) {
|
|
|
35
35
|
return t.listeners.has(d) || t.listeners.set(d, /* @__PURE__ */ new Set()), t.listeners.get(d).add(f), () => t.listeners.get(d).delete(f);
|
|
36
36
|
}
|
|
37
37
|
function i(d, f) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const _ = t.listeners.get(d);
|
|
39
|
+
_ && _.forEach((y) => {
|
|
40
40
|
try {
|
|
41
41
|
y(f);
|
|
42
|
-
} catch (
|
|
43
|
-
console.error("[transport] listener", d,
|
|
42
|
+
} catch (C) {
|
|
43
|
+
console.error("[transport] listener", d, C);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -53,18 +53,18 @@ function We(e) {
|
|
|
53
53
|
"X-Widget-Id": t.widgetId
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
async function a(d, f,
|
|
56
|
+
async function a(d, f, _) {
|
|
57
57
|
const y = await fetch(`${t.baseUrl}${fe}${f}`, {
|
|
58
58
|
method: d,
|
|
59
59
|
credentials: "include",
|
|
60
60
|
headers: s(),
|
|
61
|
-
body:
|
|
61
|
+
body: _ !== void 0 ? JSON.stringify(_) : void 0
|
|
62
62
|
});
|
|
63
63
|
if (!y.ok) {
|
|
64
|
-
const
|
|
65
|
-
`HTTP ${y.status} ${d} ${f} :: ${(
|
|
64
|
+
const C = await l(y), S = new Error(
|
|
65
|
+
`HTTP ${y.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || y.statusText}`
|
|
66
66
|
);
|
|
67
|
-
throw S.status = y.status, S.body =
|
|
67
|
+
throw S.status = y.status, S.body = C, S;
|
|
68
68
|
}
|
|
69
69
|
return y.status === 204 ? null : y.json();
|
|
70
70
|
}
|
|
@@ -98,9 +98,9 @@ function We(e) {
|
|
|
98
98
|
);
|
|
99
99
|
throw T.status = f.status, T.body = L, T;
|
|
100
100
|
}
|
|
101
|
-
const
|
|
102
|
-
t.userId =
|
|
103
|
-
const [y,
|
|
101
|
+
const _ = await f.json();
|
|
102
|
+
t.userId = _.external_id;
|
|
103
|
+
const [y, C] = await Promise.all([
|
|
104
104
|
fetch(
|
|
105
105
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
106
106
|
{ credentials: "include" }
|
|
@@ -114,17 +114,17 @@ function We(e) {
|
|
|
114
114
|
return L.json();
|
|
115
115
|
}),
|
|
116
116
|
a("GET", "/customers/me")
|
|
117
|
-
]), S = { config: y, customer: (
|
|
118
|
-
return t.lastBootstrap = S, await
|
|
117
|
+
]), S = { config: y, customer: (C == null ? void 0 : C.customer) ?? null };
|
|
118
|
+
return t.lastBootstrap = S, await w(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
119
119
|
"visibilitychange",
|
|
120
120
|
t.visibilityHandler
|
|
121
121
|
)), de(), S;
|
|
122
122
|
}
|
|
123
|
-
async function
|
|
123
|
+
async function w() {
|
|
124
124
|
try {
|
|
125
125
|
const d = await R();
|
|
126
|
-
t.lastActivityAt = d.reduce((f,
|
|
127
|
-
const y =
|
|
126
|
+
t.lastActivityAt = d.reduce((f, _) => {
|
|
127
|
+
const y = _ == null ? void 0 : _.last_message_at;
|
|
128
128
|
return y && (!f || y > f) ? y : f;
|
|
129
129
|
}, null);
|
|
130
130
|
} catch (d) {
|
|
@@ -146,7 +146,7 @@ function We(e) {
|
|
|
146
146
|
async function A(d = {}) {
|
|
147
147
|
return (await a("POST", "/conversations", d)).conversation;
|
|
148
148
|
}
|
|
149
|
-
async function
|
|
149
|
+
async function q(d) {
|
|
150
150
|
return (await a(
|
|
151
151
|
"GET",
|
|
152
152
|
`/conversations/${encodeURIComponent(d)}`
|
|
@@ -167,9 +167,9 @@ function We(e) {
|
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
async function F(d, f = {}) {
|
|
170
|
-
const
|
|
171
|
-
f.before &&
|
|
172
|
-
const y =
|
|
170
|
+
const _ = new URLSearchParams();
|
|
171
|
+
f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
|
|
172
|
+
const y = _.toString() ? `?${_.toString()}` : "";
|
|
173
173
|
return a(
|
|
174
174
|
"GET",
|
|
175
175
|
`/conversations/${encodeURIComponent(d)}/messages${y}`
|
|
@@ -177,42 +177,42 @@ function We(e) {
|
|
|
177
177
|
}
|
|
178
178
|
async function z(d, f) {
|
|
179
179
|
se();
|
|
180
|
-
const
|
|
180
|
+
const _ = {
|
|
181
181
|
client_msg_id: f.client_msg_id,
|
|
182
182
|
type: "content",
|
|
183
183
|
text_md: f.text_md,
|
|
184
184
|
author: { id: t.userId, type: "user" },
|
|
185
185
|
created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
186
186
|
};
|
|
187
|
-
return Array.isArray(f.attachments) && f.attachments.length && (
|
|
187
|
+
return Array.isArray(f.attachments) && f.attachments.length && (_.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (_.metadata = f.metadata), a(
|
|
188
188
|
"POST",
|
|
189
189
|
`/conversations/${encodeURIComponent(d)}/messages`,
|
|
190
|
-
|
|
190
|
+
_
|
|
191
191
|
);
|
|
192
192
|
}
|
|
193
|
-
async function W(d, f,
|
|
193
|
+
async function W(d, f, _) {
|
|
194
194
|
return se(), a(
|
|
195
195
|
"POST",
|
|
196
196
|
`/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
|
|
197
|
-
|
|
197
|
+
_ ? { inputs: _ } : {}
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
200
|
async function Z(d) {
|
|
201
|
-
const f = d.name || "attachment",
|
|
202
|
-
mime_type:
|
|
201
|
+
const f = d.name || "attachment", _ = d.type || "application/octet-stream", y = d.size || 0, C = await a("POST", "/attachments", {
|
|
202
|
+
mime_type: _,
|
|
203
203
|
size_bytes: y,
|
|
204
204
|
name: f
|
|
205
|
-
}), S = await fetch(
|
|
205
|
+
}), S = await fetch(C.upload_url, {
|
|
206
206
|
method: "PUT",
|
|
207
|
-
headers: { "Content-Type":
|
|
207
|
+
headers: { "Content-Type": _ },
|
|
208
208
|
body: d
|
|
209
209
|
});
|
|
210
210
|
if (!S.ok)
|
|
211
211
|
throw new Error(`HTTP ${S.status} PUT signed upload`);
|
|
212
212
|
return {
|
|
213
|
-
type: Ye(
|
|
214
|
-
path:
|
|
215
|
-
mime_type:
|
|
213
|
+
type: Ye(_),
|
|
214
|
+
path: C.path,
|
|
215
|
+
mime_type: _,
|
|
216
216
|
size_bytes: y
|
|
217
217
|
};
|
|
218
218
|
}
|
|
@@ -230,8 +230,8 @@ function We(e) {
|
|
|
230
230
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
231
231
|
try {
|
|
232
232
|
const d = new EventSource(te(), { withCredentials: !0 });
|
|
233
|
-
for (const f of
|
|
234
|
-
d.addEventListener(f, (
|
|
233
|
+
for (const f of qe)
|
|
234
|
+
d.addEventListener(f, (_) => ne(f, _.data));
|
|
235
235
|
d.addEventListener(
|
|
236
236
|
"error",
|
|
237
237
|
() => i("error", new Error("SSE error"))
|
|
@@ -242,10 +242,10 @@ function We(e) {
|
|
|
242
242
|
}
|
|
243
243
|
function ne(d, f) {
|
|
244
244
|
try {
|
|
245
|
-
const
|
|
245
|
+
const _ = JSON.parse(f), y = _ && typeof _ == "object" && "data" in _ ? _.data : _;
|
|
246
246
|
i(d, y);
|
|
247
|
-
} catch (
|
|
248
|
-
console.error("[transport] bad SSE payload", d,
|
|
247
|
+
} catch (_) {
|
|
248
|
+
console.error("[transport] bad SSE payload", d, _);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
function G() {
|
|
@@ -261,8 +261,8 @@ function We(e) {
|
|
|
261
261
|
}
|
|
262
262
|
async function me() {
|
|
263
263
|
try {
|
|
264
|
-
const d = await R(), f = d.reduce((y,
|
|
265
|
-
const S =
|
|
264
|
+
const d = await R(), f = d.reduce((y, C) => {
|
|
265
|
+
const S = C == null ? void 0 : C.last_message_at;
|
|
266
266
|
return S && (!y || S > y) ? S : y;
|
|
267
267
|
}, null);
|
|
268
268
|
f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
|
|
@@ -289,7 +289,7 @@ function We(e) {
|
|
|
289
289
|
r("idle"), de(), t.panelOpen && $();
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function g() {
|
|
293
293
|
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, G(), t.visibilityHandler && (document.removeEventListener(
|
|
294
294
|
"visibilitychange",
|
|
295
295
|
t.visibilityHandler
|
|
@@ -298,14 +298,14 @@ function We(e) {
|
|
|
298
298
|
return {
|
|
299
299
|
on: n,
|
|
300
300
|
start: p,
|
|
301
|
-
stop:
|
|
301
|
+
stop: g,
|
|
302
302
|
setPanelOpen: ce,
|
|
303
303
|
// REST
|
|
304
304
|
getCustomer: k,
|
|
305
305
|
patchCustomer: x,
|
|
306
306
|
listConversations: R,
|
|
307
307
|
createConversation: A,
|
|
308
|
-
getConversation:
|
|
308
|
+
getConversation: q,
|
|
309
309
|
patchConversation: M,
|
|
310
310
|
markConversationRead: j,
|
|
311
311
|
listMessages: F,
|
|
@@ -375,22 +375,22 @@ function Qe(e) {
|
|
|
375
375
|
})
|
|
376
376
|
), n.push(
|
|
377
377
|
e.on("message", (h) => {
|
|
378
|
-
const m = h == null ? void 0 : h.conversation_id,
|
|
379
|
-
!m || !(
|
|
378
|
+
const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.message;
|
|
379
|
+
!m || !(g != null && g.id) || ($(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
|
|
380
380
|
})
|
|
381
381
|
), n.push(
|
|
382
382
|
e.on("message_stream", (h) => {
|
|
383
|
-
const m = h == null ? void 0 : h.message_id,
|
|
384
|
-
!m || typeof
|
|
383
|
+
const m = h == null ? void 0 : h.message_id, g = h == null ? void 0 : h.token;
|
|
384
|
+
!m || typeof g != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + g);
|
|
385
385
|
})
|
|
386
386
|
), n.push(
|
|
387
387
|
e.on("conversation_updated", (h) => {
|
|
388
|
-
const m = h == null ? void 0 : h.conversation_id,
|
|
389
|
-
if (!m || !
|
|
388
|
+
const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.changes;
|
|
389
|
+
if (!m || !g) return;
|
|
390
390
|
const d = t.conversations.findIndex((f) => f.id === m);
|
|
391
391
|
d !== -1 && (t.conversations[d] = {
|
|
392
392
|
...t.conversations[d],
|
|
393
|
-
...
|
|
393
|
+
...g
|
|
394
394
|
});
|
|
395
395
|
})
|
|
396
396
|
), n.push(
|
|
@@ -399,10 +399,10 @@ function Qe(e) {
|
|
|
399
399
|
})
|
|
400
400
|
), n.push(
|
|
401
401
|
e.on("action_status", (h) => {
|
|
402
|
-
const m = h == null ? void 0 : h.conversation_id,
|
|
403
|
-
if (!m || !
|
|
402
|
+
const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.action_id, d = h == null ? void 0 : h.action_name;
|
|
403
|
+
if (!m || !g) return;
|
|
404
404
|
const f = t.runningActionsByConv[m] || {};
|
|
405
|
-
h.state === "running" ? (f[
|
|
405
|
+
h.state === "running" ? (f[g] = d || g, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[g], t.runningActionsByConv[m] = { ...f });
|
|
406
406
|
})
|
|
407
407
|
), n.push(
|
|
408
408
|
e.on("activity", (h) => {
|
|
@@ -420,11 +420,11 @@ function Qe(e) {
|
|
|
420
420
|
),
|
|
421
421
|
15e3
|
|
422
422
|
)
|
|
423
|
-
),
|
|
423
|
+
), g = await Promise.race([
|
|
424
424
|
e.start(h),
|
|
425
425
|
m
|
|
426
426
|
]);
|
|
427
|
-
t.config =
|
|
427
|
+
t.config = g.config, t.customer = g.customer, t.conversations = await Promise.race([
|
|
428
428
|
e.listConversations(),
|
|
429
429
|
m
|
|
430
430
|
]), t.ready = !0;
|
|
@@ -444,16 +444,16 @@ function Qe(e) {
|
|
|
444
444
|
const m = me(h);
|
|
445
445
|
if (!m) return t.customer;
|
|
446
446
|
try {
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
} catch (
|
|
450
|
-
console.error("[store] applyCustomer failed",
|
|
447
|
+
const g = await e.patchCustomer(m);
|
|
448
|
+
g && (t.customer = g);
|
|
449
|
+
} catch (g) {
|
|
450
|
+
console.error("[store] applyCustomer failed", g);
|
|
451
451
|
}
|
|
452
452
|
return t.customer;
|
|
453
453
|
}
|
|
454
454
|
async function a(h = {}) {
|
|
455
|
-
const m = await e.createConversation(h),
|
|
456
|
-
return
|
|
455
|
+
const m = await e.createConversation(h), g = t.conversations.findIndex((d) => d.id === m.id);
|
|
456
|
+
return g === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[g] = m, m;
|
|
457
457
|
}
|
|
458
458
|
const l = 50;
|
|
459
459
|
async function p(h) {
|
|
@@ -461,21 +461,21 @@ function Qe(e) {
|
|
|
461
461
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
462
462
|
k(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
463
463
|
try {
|
|
464
|
-
const
|
|
464
|
+
const g = await e.listMessages(h, {
|
|
465
465
|
limit: l
|
|
466
|
-
}), d = (
|
|
467
|
-
for (const
|
|
468
|
-
(
|
|
469
|
-
const y = f.filter((
|
|
466
|
+
}), d = (g == null ? void 0 : g.messages) ?? [], f = t.messagesByConv[h] || [], _ = /* @__PURE__ */ new Set();
|
|
467
|
+
for (const C of d)
|
|
468
|
+
(C == null ? void 0 : C.id) != null && _.add(`id:${String(C.id)}`), C != null && C.client_msg_id && _.add(`c:${C.client_msg_id}`);
|
|
469
|
+
const y = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
|
|
470
470
|
t.messagesByConv[h] = [...d, ...y].sort(
|
|
471
471
|
ce
|
|
472
472
|
), k(h, {
|
|
473
|
-
nextCursor: (
|
|
473
|
+
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
474
474
|
loading: !1,
|
|
475
475
|
loaded: !0
|
|
476
476
|
});
|
|
477
|
-
} catch (
|
|
478
|
-
console.error("[store] openConversation failed",
|
|
477
|
+
} catch (g) {
|
|
478
|
+
console.error("[store] openConversation failed", g), k(h, {
|
|
479
479
|
nextCursor: null,
|
|
480
480
|
loading: !1,
|
|
481
481
|
loaded: !1
|
|
@@ -483,28 +483,28 @@ function Qe(e) {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
async function
|
|
486
|
+
async function w(h) {
|
|
487
487
|
var f;
|
|
488
488
|
const m = t.paginationByConv[h];
|
|
489
489
|
if (!m || m.loading || !m.nextCursor) return;
|
|
490
|
-
const d = (f = (t.messagesByConv[h] || []).find((
|
|
490
|
+
const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
|
|
491
491
|
if (d) {
|
|
492
492
|
k(h, { ...m, loading: !0 });
|
|
493
493
|
try {
|
|
494
|
-
const
|
|
494
|
+
const _ = await e.listMessages(h, {
|
|
495
495
|
before: d,
|
|
496
496
|
limit: l
|
|
497
|
-
}), y = (
|
|
498
|
-
for (const T of
|
|
497
|
+
}), y = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
|
|
498
|
+
for (const T of C)
|
|
499
499
|
(T == null ? void 0 : T.id) != null && S.add(`id:${String(T.id)}`), T != null && T.client_msg_id && S.add(`c:${T.client_msg_id}`);
|
|
500
500
|
const L = y.filter((T) => !((T == null ? void 0 : T.id) != null && S.has(`id:${String(T.id)}`) || T != null && T.client_msg_id && S.has(`c:${T.client_msg_id}`)));
|
|
501
|
-
t.messagesByConv[h] = [...L, ...
|
|
502
|
-
nextCursor: (
|
|
501
|
+
t.messagesByConv[h] = [...L, ...C], k(h, {
|
|
502
|
+
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
503
503
|
loading: !1,
|
|
504
504
|
loaded: !0
|
|
505
505
|
});
|
|
506
|
-
} catch (
|
|
507
|
-
console.error("[store] loadMore failed",
|
|
506
|
+
} catch (_) {
|
|
507
|
+
console.error("[store] loadMore failed", _), k(h, { ...m, loading: !1 });
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
}
|
|
@@ -512,30 +512,30 @@ function Qe(e) {
|
|
|
512
512
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
513
513
|
}
|
|
514
514
|
async function x(h, m) {
|
|
515
|
-
const
|
|
516
|
-
d !== -1 && (t.conversations[d] =
|
|
515
|
+
const g = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
|
|
516
|
+
d !== -1 && (t.conversations[d] = g);
|
|
517
517
|
}
|
|
518
518
|
async function R(h) {
|
|
519
519
|
if (!h) return [];
|
|
520
520
|
const m = t.messagesByConv[h] || [];
|
|
521
|
-
let
|
|
521
|
+
let g = "";
|
|
522
522
|
for (const d of m)
|
|
523
|
-
d != null && d.created_at && d.created_at >
|
|
523
|
+
d != null && d.created_at && d.created_at > g && (g = d.created_at);
|
|
524
524
|
try {
|
|
525
525
|
const d = await e.listMessages(
|
|
526
526
|
h,
|
|
527
|
-
|
|
527
|
+
g ? { since: g } : {}
|
|
528
528
|
), f = (d == null ? void 0 : d.messages) || [];
|
|
529
529
|
if (!f.length) return [];
|
|
530
|
-
const
|
|
530
|
+
const _ = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
|
|
531
531
|
for (const S of m)
|
|
532
|
-
(S == null ? void 0 : S.id) != null &&
|
|
533
|
-
const
|
|
532
|
+
(S == null ? void 0 : S.id) != null && _.add(String(S.id)), S != null && S.client_msg_id && y.add(S.client_msg_id);
|
|
533
|
+
const C = [];
|
|
534
534
|
for (const S of f) {
|
|
535
|
-
const L = (S == null ? void 0 : S.id) != null &&
|
|
536
|
-
$(h, S), L ||
|
|
535
|
+
const L = (S == null ? void 0 : S.id) != null && _.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
|
|
536
|
+
$(h, S), L || C.push(S);
|
|
537
537
|
}
|
|
538
|
-
return
|
|
538
|
+
return C;
|
|
539
539
|
} catch (d) {
|
|
540
540
|
return console.error("[store] fetchSinceLast failed", d), [];
|
|
541
541
|
}
|
|
@@ -543,20 +543,20 @@ function Qe(e) {
|
|
|
543
543
|
async function A(h, m) {
|
|
544
544
|
if (!(!h || m == null))
|
|
545
545
|
try {
|
|
546
|
-
const
|
|
546
|
+
const g = await e.markConversationRead(h, m), d = (g == null ? void 0 : g.last_read_message_id) ?? m, f = t.conversations.findIndex((_) => (_ == null ? void 0 : _.id) === h);
|
|
547
547
|
f !== -1 && (t.conversations[f] = {
|
|
548
548
|
...t.conversations[f],
|
|
549
549
|
last_read_message_id: d
|
|
550
550
|
});
|
|
551
|
-
} catch (
|
|
552
|
-
console.error("[store] markConversationRead failed",
|
|
551
|
+
} catch (g) {
|
|
552
|
+
console.error("[store] markConversationRead failed", g);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
async function
|
|
555
|
+
async function q(h, m, { attachments: g, metadata: d } = {}) {
|
|
556
556
|
var L;
|
|
557
|
-
const f = (m || "").trim(),
|
|
558
|
-
if (!h || !f && !
|
|
559
|
-
const y = Je(),
|
|
557
|
+
const f = (m || "").trim(), _ = Array.isArray(g) && g.length > 0;
|
|
558
|
+
if (!h || !f && !_) return;
|
|
559
|
+
const y = Je(), C = de(h), S = {
|
|
560
560
|
id: y,
|
|
561
561
|
client_msg_id: y,
|
|
562
562
|
conversation_id: h,
|
|
@@ -566,10 +566,10 @@ function Qe(e) {
|
|
|
566
566
|
type: "user",
|
|
567
567
|
id: ((L = t.customer) == null ? void 0 : L.external_id) || null
|
|
568
568
|
},
|
|
569
|
-
created_at:
|
|
569
|
+
created_at: C,
|
|
570
570
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
571
571
|
_pending: !0,
|
|
572
|
-
...
|
|
572
|
+
..._ ? { payload: { type: "content", attachments: g } } : {},
|
|
573
573
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
574
574
|
};
|
|
575
575
|
$(h, S);
|
|
@@ -577,8 +577,8 @@ function Qe(e) {
|
|
|
577
577
|
await e.postMessage(h, {
|
|
578
578
|
client_msg_id: y,
|
|
579
579
|
text_md: f,
|
|
580
|
-
created_at:
|
|
581
|
-
...
|
|
580
|
+
created_at: C,
|
|
581
|
+
..._ ? { attachments: g } : {},
|
|
582
582
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
583
583
|
});
|
|
584
584
|
} catch (T) {
|
|
@@ -588,10 +588,10 @@ function Qe(e) {
|
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
async function M(h, m,
|
|
591
|
+
async function M(h, m, g) {
|
|
592
592
|
h != null && (t.awaitingCallback[h] = !0);
|
|
593
593
|
try {
|
|
594
|
-
await e.postCallback(h, m,
|
|
594
|
+
await e.postCallback(h, m, g);
|
|
595
595
|
} catch (d) {
|
|
596
596
|
console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
|
|
597
597
|
}
|
|
@@ -601,73 +601,73 @@ function Qe(e) {
|
|
|
601
601
|
if (!h) return null;
|
|
602
602
|
const m = j.get(h);
|
|
603
603
|
if (m != null && m.url) {
|
|
604
|
-
const
|
|
605
|
-
if (!
|
|
604
|
+
const g = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
605
|
+
if (!g || g - Date.now() > 6e4) return m.url;
|
|
606
606
|
}
|
|
607
607
|
try {
|
|
608
|
-
const
|
|
609
|
-
if (
|
|
608
|
+
const g = await e.signAttachment(h);
|
|
609
|
+
if (g != null && g.signed_url)
|
|
610
610
|
return j.set(h, {
|
|
611
|
-
url:
|
|
612
|
-
expires_at:
|
|
613
|
-
}),
|
|
614
|
-
} catch (
|
|
615
|
-
console.error("[store] sign attachment failed",
|
|
611
|
+
url: g.signed_url,
|
|
612
|
+
expires_at: g.expires_at
|
|
613
|
+
}), g.signed_url;
|
|
614
|
+
} catch (g) {
|
|
615
|
+
console.error("[store] sign attachment failed", g);
|
|
616
616
|
}
|
|
617
617
|
return null;
|
|
618
618
|
}
|
|
619
|
-
async function z(h, { rating: m, comment:
|
|
620
|
-
const d = t.conversations.find((y) => y.id === h),
|
|
619
|
+
async function z(h, { rating: m, comment: g } = {}) {
|
|
620
|
+
const d = t.conversations.find((y) => y.id === h), _ = {
|
|
621
621
|
...(d == null ? void 0 : d.metadata) || {},
|
|
622
622
|
feedback: {
|
|
623
623
|
rating: m,
|
|
624
|
-
comment:
|
|
624
|
+
comment: g || null,
|
|
625
625
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
626
626
|
}
|
|
627
627
|
};
|
|
628
|
-
await x(h, { metadata:
|
|
628
|
+
await x(h, { metadata: _ });
|
|
629
629
|
}
|
|
630
630
|
function W(h) {
|
|
631
|
-
var
|
|
631
|
+
var g, d;
|
|
632
632
|
const m = t.messagesByConv[h] || [];
|
|
633
633
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
634
|
-
const
|
|
635
|
-
if ((
|
|
636
|
-
return
|
|
634
|
+
const _ = m[f];
|
|
635
|
+
if ((_ == null ? void 0 : _.type) === "action" && ((g = _ == null ? void 0 : _.payload) == null ? void 0 : g.type) === "action" && ((d = _ == null ? void 0 : _.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(_ == null ? void 0 : _.callbacks) && _.callbacks.length > 0 && !t.awaitingCallback[_.id])
|
|
636
|
+
return _;
|
|
637
637
|
}
|
|
638
638
|
return null;
|
|
639
639
|
}
|
|
640
640
|
function Z(h) {
|
|
641
|
-
var
|
|
641
|
+
var g, d, f;
|
|
642
642
|
const m = t.messagesByConv[h] || [];
|
|
643
|
-
for (let
|
|
644
|
-
const y = m[
|
|
645
|
-
if (((
|
|
643
|
+
for (let _ = m.length - 1; _ >= 0; _--) {
|
|
644
|
+
const y = m[_];
|
|
645
|
+
if (((g = y == null ? void 0 : y.author) == null ? void 0 : g.type) === "user" || (y == null ? void 0 : y.type) === "action" && ((d = y == null ? void 0 : y.payload) == null ? void 0 : d.state) === "pending")
|
|
646
646
|
return null;
|
|
647
|
-
const
|
|
648
|
-
if (
|
|
649
|
-
return { message: y, form:
|
|
647
|
+
const C = (f = y == null ? void 0 : y.metadata) == null ? void 0 : f.form;
|
|
648
|
+
if (C && Array.isArray(C.fields) && C.fields.length > 0)
|
|
649
|
+
return { message: y, form: C };
|
|
650
650
|
}
|
|
651
651
|
return null;
|
|
652
652
|
}
|
|
653
653
|
function ee(h) {
|
|
654
654
|
const m = t.runningActionsByConv[h];
|
|
655
655
|
if (!m) return null;
|
|
656
|
-
const
|
|
657
|
-
if (
|
|
658
|
-
const d =
|
|
656
|
+
const g = Object.keys(m);
|
|
657
|
+
if (g.length === 0) return null;
|
|
658
|
+
const d = g[0];
|
|
659
659
|
return { id: d, payload: { name: m[d] } };
|
|
660
660
|
}
|
|
661
661
|
function te(h) {
|
|
662
|
-
var
|
|
662
|
+
var g, d, f, _;
|
|
663
663
|
const m = t.messagesByConv[h] || [];
|
|
664
664
|
for (let y = m.length - 1; y >= 0; y--) {
|
|
665
|
-
const
|
|
666
|
-
if (((
|
|
667
|
-
if ((
|
|
665
|
+
const C = m[y];
|
|
666
|
+
if (((g = C == null ? void 0 : C.author) == null ? void 0 : g.type) === "user") return [];
|
|
667
|
+
if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
|
|
668
668
|
return [];
|
|
669
|
-
if (((f =
|
|
670
|
-
const S = (
|
|
669
|
+
if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
|
|
670
|
+
const S = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
|
|
671
671
|
return Array.isArray(S) && S.length ? S.map((L) => {
|
|
672
672
|
if (typeof L == "string") {
|
|
673
673
|
const T = L.trim();
|
|
@@ -685,39 +685,39 @@ function Qe(e) {
|
|
|
685
685
|
return [];
|
|
686
686
|
}
|
|
687
687
|
function $(h, m) {
|
|
688
|
-
var
|
|
689
|
-
const
|
|
688
|
+
var _;
|
|
689
|
+
const g = t.messagesByConv[h] || [];
|
|
690
690
|
let d = -1;
|
|
691
|
-
m != null && m.client_msg_id && (d =
|
|
691
|
+
m != null && m.client_msg_id && (d = g.findIndex(
|
|
692
692
|
(y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id === m.client_msg_id
|
|
693
|
-
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d =
|
|
693
|
+
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((y) => ne(y == null ? void 0 : y.id, m.id)));
|
|
694
694
|
let f;
|
|
695
|
-
d === -1 ? f = [...
|
|
696
|
-
...
|
|
695
|
+
d === -1 ? f = [...g, m].sort(ce) : (f = g.slice(), f[d] = {
|
|
696
|
+
...g[d],
|
|
697
697
|
...m,
|
|
698
698
|
_pending: !1,
|
|
699
699
|
_failed: !1
|
|
700
|
-
}), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((
|
|
700
|
+
}), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((_ = m == null ? void 0 : m.payload) != null && _.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
|
|
701
701
|
}
|
|
702
702
|
function ne(h, m) {
|
|
703
703
|
return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
|
|
704
704
|
}
|
|
705
|
-
function G(h, m,
|
|
705
|
+
function G(h, m, g) {
|
|
706
706
|
const d = t.messagesByConv[h];
|
|
707
707
|
if (!d) return;
|
|
708
708
|
const f = d.findIndex((y) => y.id === m);
|
|
709
709
|
if (f === -1) return;
|
|
710
|
-
const
|
|
711
|
-
|
|
710
|
+
const _ = d.slice();
|
|
711
|
+
_[f] = { ...d[f], ...g }, t.messagesByConv[h] = _;
|
|
712
712
|
}
|
|
713
713
|
function se(h, m) {
|
|
714
|
-
const
|
|
715
|
-
if (
|
|
716
|
-
const d = t.conversations[
|
|
714
|
+
const g = t.conversations.findIndex((f) => f.id === h);
|
|
715
|
+
if (g === -1) return;
|
|
716
|
+
const d = t.conversations[g];
|
|
717
717
|
if (m && (!d.last_message_at || m > d.last_message_at)) {
|
|
718
718
|
const f = t.conversations.slice();
|
|
719
|
-
f[
|
|
720
|
-
(
|
|
719
|
+
f[g] = { ...d, last_message_at: m }, f.sort(
|
|
720
|
+
(_, y) => (y.last_message_at || "").localeCompare(_.last_message_at || "")
|
|
721
721
|
), t.conversations = f;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
@@ -726,18 +726,18 @@ function Qe(e) {
|
|
|
726
726
|
}
|
|
727
727
|
function me(h) {
|
|
728
728
|
if (!h || typeof h != "object") return null;
|
|
729
|
-
const m = {},
|
|
729
|
+
const m = {}, g = {};
|
|
730
730
|
for (const [d, f] of Object.entries(h))
|
|
731
|
-
f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(
|
|
732
|
-
return Object.keys(
|
|
731
|
+
f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(g, f) : g[d] = f);
|
|
732
|
+
return Object.keys(g).length && (m.values = g), Object.keys(m).length ? m : null;
|
|
733
733
|
}
|
|
734
734
|
function de(h) {
|
|
735
735
|
const m = t.messagesByConv[h] || [];
|
|
736
|
-
let
|
|
737
|
-
for (const
|
|
738
|
-
|
|
736
|
+
let g = "";
|
|
737
|
+
for (const _ of m)
|
|
738
|
+
_ != null && _.created_at && _.created_at > g && (g = _.created_at);
|
|
739
739
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
740
|
-
return !
|
|
740
|
+
return !g || d > g ? d : new Date(Date.parse(g) + 1).toISOString();
|
|
741
741
|
}
|
|
742
742
|
return {
|
|
743
743
|
state: t,
|
|
@@ -746,11 +746,11 @@ function Qe(e) {
|
|
|
746
746
|
applyCustomer: s,
|
|
747
747
|
createConversation: a,
|
|
748
748
|
openConversation: p,
|
|
749
|
-
loadMore:
|
|
749
|
+
loadMore: w,
|
|
750
750
|
fetchSinceLast: R,
|
|
751
751
|
patchConversation: x,
|
|
752
752
|
markConversationRead: A,
|
|
753
|
-
send:
|
|
753
|
+
send: q,
|
|
754
754
|
clickCallback: M,
|
|
755
755
|
signAttachment: F,
|
|
756
756
|
submitFeedback: z,
|
|
@@ -778,7 +778,7 @@ const D = {
|
|
|
778
778
|
green: "#22C55E",
|
|
779
779
|
red: "#B91C1C",
|
|
780
780
|
redBg: "#FDECEC"
|
|
781
|
-
},
|
|
781
|
+
}, ge = [
|
|
782
782
|
"#5B5FEF",
|
|
783
783
|
"#7C3AED",
|
|
784
784
|
"#DB2777",
|
|
@@ -787,7 +787,7 @@ const D = {
|
|
|
787
787
|
"#059669"
|
|
788
788
|
];
|
|
789
789
|
function ve(e = "") {
|
|
790
|
-
return e ?
|
|
790
|
+
return e ? ge[e.charCodeAt(0) % ge.length] : ge[0];
|
|
791
791
|
}
|
|
792
792
|
function ye(e = "") {
|
|
793
793
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
@@ -841,7 +841,7 @@ const Xe = `
|
|
|
841
841
|
0% { transform: translateX(110%); opacity: 0; }
|
|
842
842
|
100% { transform: translateX(0); opacity: 1; }
|
|
843
843
|
}
|
|
844
|
-
`, Ze = "https://api.messenger.victorc.fr", ie = "fr", et = ["fr", "en"], Ce = { fr: "fr-FR", en: "en-US" },
|
|
844
|
+
`, Ze = "https://api.messenger.victorc.fr", ie = "fr", et = ["fr", "en"], Ce = { fr: "fr-FR", en: "en-US" }, _e = {
|
|
845
845
|
fr: {
|
|
846
846
|
// ── Common ───────────────────────────────────────────────────────
|
|
847
847
|
"common.newConversation": "Nouvelle conversation",
|
|
@@ -1091,13 +1091,13 @@ function we(e) {
|
|
|
1091
1091
|
function oe(e) {
|
|
1092
1092
|
return Ce[we(e)] || Ce[ie];
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
const t = we(e), n =
|
|
1094
|
+
function U(e) {
|
|
1095
|
+
const t = we(e), n = _e[t] || _e[ie], i = _e[ie];
|
|
1096
1096
|
return function(s, a) {
|
|
1097
1097
|
let l = n[s];
|
|
1098
1098
|
return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
|
|
1099
1099
|
/\{(\w+)\}/g,
|
|
1100
|
-
(p,
|
|
1100
|
+
(p, w) => a[w] != null ? String(a[w]) : p
|
|
1101
1101
|
)), l);
|
|
1102
1102
|
};
|
|
1103
1103
|
}
|
|
@@ -1109,7 +1109,7 @@ function Ae(e, t) {
|
|
|
1109
1109
|
function Ie(e, t, n) {
|
|
1110
1110
|
return Array.isArray(t) ? t.map((i) => Ae(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ae(e, String(t));
|
|
1111
1111
|
}
|
|
1112
|
-
function tt(e, t, n =
|
|
1112
|
+
function tt(e, t, n = U()) {
|
|
1113
1113
|
if (!e || !t) return "";
|
|
1114
1114
|
const i = Array.isArray(e.fields) ? e.fields : [], r = [];
|
|
1115
1115
|
for (const s of i) {
|
|
@@ -1124,7 +1124,7 @@ ${l}`);
|
|
|
1124
1124
|
|
|
1125
1125
|
`);
|
|
1126
1126
|
}
|
|
1127
|
-
function nt(e, t, n =
|
|
1127
|
+
function nt(e, t, n = U()) {
|
|
1128
1128
|
const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1129
1129
|
for (const s of r) {
|
|
1130
1130
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
@@ -1194,7 +1194,7 @@ function it(e, t, n, i) {
|
|
|
1194
1194
|
return r.join(`
|
|
1195
1195
|
`);
|
|
1196
1196
|
}
|
|
1197
|
-
function at(e, t, n =
|
|
1197
|
+
function at(e, t, n = U(), i) {
|
|
1198
1198
|
if (!e) return;
|
|
1199
1199
|
const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1200
1200
|
try {
|
|
@@ -1478,10 +1478,10 @@ const ot = {
|
|
|
1478
1478
|
this.nextRevealAt + ht
|
|
1479
1479
|
) + r;
|
|
1480
1480
|
this.nextRevealAt = a;
|
|
1481
|
-
const l = Math.max(0, a - n), p = e.id,
|
|
1482
|
-
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((k) => k !==
|
|
1481
|
+
const l = Math.max(0, a - n), p = e.id, w = setTimeout(() => {
|
|
1482
|
+
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((k) => k !== w), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1483
1483
|
}, l);
|
|
1484
|
-
this.revealTimers.push(
|
|
1484
|
+
this.revealTimers.push(w);
|
|
1485
1485
|
},
|
|
1486
1486
|
// Walk the message list and queue / instantly-reveal every new
|
|
1487
1487
|
// entry according to its origin. Used by the `currentConvMessages`
|
|
@@ -1567,7 +1567,7 @@ const ot = {
|
|
|
1567
1567
|
}, e);
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
|
-
},
|
|
1570
|
+
}, gt = 300, _t = {
|
|
1571
1571
|
data() {
|
|
1572
1572
|
return {
|
|
1573
1573
|
// Numeric message id snapshot frozen the moment the user
|
|
@@ -1607,7 +1607,7 @@ const ot = {
|
|
|
1607
1607
|
l.convId,
|
|
1608
1608
|
l.messageId
|
|
1609
1609
|
);
|
|
1610
|
-
},
|
|
1610
|
+
}, gt))));
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
1613
|
};
|
|
@@ -1648,7 +1648,7 @@ const B = (e, t) => {
|
|
|
1648
1648
|
function wt(e, t, n, i, r, s) {
|
|
1649
1649
|
return c(), u("div", {
|
|
1650
1650
|
class: O(["wm-huav", { "wm-huav--tail": n.tail }]),
|
|
1651
|
-
style:
|
|
1651
|
+
style: H({
|
|
1652
1652
|
width: n.size + "px",
|
|
1653
1653
|
height: n.size + "px",
|
|
1654
1654
|
"--wm-avr": Math.round(n.size * 0.32) + "px",
|
|
@@ -1661,7 +1661,7 @@ function wt(e, t, n, i, r, s) {
|
|
|
1661
1661
|
alt: n.name || ""
|
|
1662
1662
|
}, null, 8, yt)) : (c(), u("span", {
|
|
1663
1663
|
key: 1,
|
|
1664
|
-
style:
|
|
1664
|
+
style: H({ fontSize: n.size * 0.36 + "px" })
|
|
1665
1665
|
}, v(s.initials), 5))
|
|
1666
1666
|
], 6);
|
|
1667
1667
|
}
|
|
@@ -1671,7 +1671,7 @@ const Ee = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
|
|
|
1671
1671
|
inject: {
|
|
1672
1672
|
// Translator shared by the Messenger shell; French fallback when
|
|
1673
1673
|
// the component is used standalone.
|
|
1674
|
-
t: { default: () =>
|
|
1674
|
+
t: { default: () => U() }
|
|
1675
1675
|
},
|
|
1676
1676
|
props: {
|
|
1677
1677
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -1691,20 +1691,26 @@ const Ee = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
|
|
|
1691
1691
|
return this.peeks.slice(0, bt).reverse();
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
|
-
}, Ct =
|
|
1695
|
-
function
|
|
1694
|
+
}, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, It = { class: "wm-peek__text" }, Et = ["onClick"], Rt = ["aria-label"], Bt = ["aria-label"];
|
|
1695
|
+
function Nt(e, t, n, i, r, s) {
|
|
1696
1696
|
const a = E("HumanAvatar");
|
|
1697
|
-
return c(), u("div",
|
|
1698
|
-
|
|
1699
|
-
|
|
1697
|
+
return c(), u("div", {
|
|
1698
|
+
class: "wm-launcherWrap",
|
|
1699
|
+
onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
|
|
1700
|
+
onMouseleave: t[2] || (t[2] = (l) => e.$emit("hover", !1)),
|
|
1701
|
+
onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
|
|
1702
|
+
onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
|
|
1703
|
+
}, [
|
|
1704
|
+
V(Pe, { name: "wm-peek" }, {
|
|
1705
|
+
default: Ue(() => [
|
|
1700
1706
|
s.visiblePeeks.length ? (c(), u("div", {
|
|
1701
1707
|
key: 0,
|
|
1702
1708
|
class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1703
1709
|
}, [
|
|
1704
|
-
(c(!0), u(I, null,
|
|
1710
|
+
(c(!0), u(I, null, P(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1705
1711
|
key: l.convId,
|
|
1706
1712
|
class: "wm-peek",
|
|
1707
|
-
style:
|
|
1713
|
+
style: H({
|
|
1708
1714
|
"--depth": s.visiblePeeks.length - 1 - p,
|
|
1709
1715
|
zIndex: p + 1
|
|
1710
1716
|
}),
|
|
@@ -1713,18 +1719,18 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1713
1719
|
"aria-label": s.t("launcher.openConversationWith", {
|
|
1714
1720
|
name: l.senderName || s.t("launcher.theAgent")
|
|
1715
1721
|
}),
|
|
1716
|
-
onClick: (
|
|
1722
|
+
onClick: (w) => e.$emit("open", l.convId),
|
|
1717
1723
|
onKeydown: [
|
|
1718
|
-
ue(Y((
|
|
1719
|
-
ue(Y((
|
|
1724
|
+
ue(Y((w) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
|
|
1725
|
+
ue(Y((w) => e.$emit("open", l.convId), ["prevent"]), ["space"])
|
|
1720
1726
|
]
|
|
1721
1727
|
}, [
|
|
1722
1728
|
o("button", {
|
|
1723
1729
|
type: "button",
|
|
1724
1730
|
class: "wm-peek__close",
|
|
1725
1731
|
"aria-label": s.t("launcher.dismiss"),
|
|
1726
|
-
onClick: Y((
|
|
1727
|
-
}, [...t[
|
|
1732
|
+
onClick: Y((w) => e.$emit("dismiss", l.convId), ["stop"])
|
|
1733
|
+
}, [...t[5] || (t[5] = [
|
|
1728
1734
|
o("svg", {
|
|
1729
1735
|
width: "9",
|
|
1730
1736
|
height: "9",
|
|
@@ -1738,8 +1744,8 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1738
1744
|
}, [
|
|
1739
1745
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1740
1746
|
], -1)
|
|
1741
|
-
])], 8,
|
|
1742
|
-
o("div",
|
|
1747
|
+
])], 8, At),
|
|
1748
|
+
o("div", St, [
|
|
1743
1749
|
V(a, {
|
|
1744
1750
|
name: l.senderName,
|
|
1745
1751
|
"avatar-url": l.senderAvatarUrl,
|
|
@@ -1749,22 +1755,22 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1749
1755
|
key: 0,
|
|
1750
1756
|
class: "wm-peek__avatarBadge",
|
|
1751
1757
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1752
|
-
}, v(l.count > 9 ? "9+" : l.count), 9,
|
|
1758
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : b("", !0)
|
|
1753
1759
|
]),
|
|
1754
|
-
o("div",
|
|
1755
|
-
o("div",
|
|
1756
|
-
o("span",
|
|
1757
|
-
o("span",
|
|
1760
|
+
o("div", Tt, [
|
|
1761
|
+
o("div", xt, [
|
|
1762
|
+
o("span", Ot, v(l.senderName || s.t("common.agent")), 1),
|
|
1763
|
+
o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
|
|
1758
1764
|
]),
|
|
1759
|
-
o("p",
|
|
1765
|
+
o("p", It, v(l.preview), 1)
|
|
1760
1766
|
]),
|
|
1761
1767
|
o("button", {
|
|
1762
1768
|
type: "button",
|
|
1763
1769
|
class: "wm-peek__open",
|
|
1764
|
-
onClick: Y((
|
|
1765
|
-
}, v(s.t("common.open")), 9,
|
|
1766
|
-
], 44,
|
|
1767
|
-
], 2)) :
|
|
1770
|
+
onClick: Y((w) => e.$emit("open", l.convId), ["stop"])
|
|
1771
|
+
}, v(s.t("common.open")), 9, Et)
|
|
1772
|
+
], 44, Ct))), 128))
|
|
1773
|
+
], 2)) : b("", !0)
|
|
1768
1774
|
]),
|
|
1769
1775
|
_: 1
|
|
1770
1776
|
}),
|
|
@@ -1774,7 +1780,7 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1774
1780
|
"aria-label": s.t("launcher.open"),
|
|
1775
1781
|
onClick: t[0] || (t[0] = (l) => e.$emit("open"))
|
|
1776
1782
|
}, [
|
|
1777
|
-
t[
|
|
1783
|
+
t[6] || (t[6] = o("svg", {
|
|
1778
1784
|
width: "20",
|
|
1779
1785
|
height: "20",
|
|
1780
1786
|
viewBox: "0 0 24 24",
|
|
@@ -1795,11 +1801,11 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1795
1801
|
}) : s.t("launcher.unreadConversationsOne", {
|
|
1796
1802
|
count: n.unreadCount
|
|
1797
1803
|
})
|
|
1798
|
-
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9,
|
|
1799
|
-
], 8,
|
|
1800
|
-
]);
|
|
1804
|
+
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : b("", !0)
|
|
1805
|
+
], 8, Rt)
|
|
1806
|
+
], 32);
|
|
1801
1807
|
}
|
|
1802
|
-
const
|
|
1808
|
+
const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-1fda084c"]]), Pt = {
|
|
1803
1809
|
name: "WmAIAvatar",
|
|
1804
1810
|
props: {
|
|
1805
1811
|
size: { type: Number, default: 26 },
|
|
@@ -1828,27 +1834,27 @@ const Ut = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529
|
|
|
1828
1834
|
return ve(this.name);
|
|
1829
1835
|
}
|
|
1830
1836
|
}
|
|
1831
|
-
},
|
|
1837
|
+
}, Ut = {
|
|
1832
1838
|
key: 0,
|
|
1833
1839
|
class: "wm-aiav__pulse"
|
|
1834
|
-
},
|
|
1835
|
-
function
|
|
1840
|
+
}, jt = ["src", "alt"], Dt = ["width", "height"];
|
|
1841
|
+
function zt(e, t, n, i, r, s) {
|
|
1836
1842
|
return c(), u("div", {
|
|
1837
1843
|
class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
1838
|
-
style:
|
|
1844
|
+
style: H({
|
|
1839
1845
|
width: n.size + "px",
|
|
1840
1846
|
height: n.size + "px",
|
|
1841
1847
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1842
1848
|
})
|
|
1843
1849
|
}, [
|
|
1844
|
-
n.pulse ? (c(), u("div",
|
|
1850
|
+
n.pulse ? (c(), u("div", Ut)) : b("", !0),
|
|
1845
1851
|
o("div", {
|
|
1846
1852
|
class: O(["wm-aiav__inner", {
|
|
1847
1853
|
"wm-aiav__inner--glow": n.pulse,
|
|
1848
1854
|
"wm-aiav__inner--img": !!n.imageUrl,
|
|
1849
1855
|
"wm-aiav__inner--initials": !n.imageUrl && !!s.initials
|
|
1850
1856
|
}]),
|
|
1851
|
-
style:
|
|
1857
|
+
style: H(
|
|
1852
1858
|
!n.imageUrl && s.initials ? { background: s.bgColor } : null
|
|
1853
1859
|
)
|
|
1854
1860
|
}, [
|
|
@@ -1856,9 +1862,9 @@ function qt(e, t, n, i, r, s) {
|
|
|
1856
1862
|
key: 0,
|
|
1857
1863
|
src: n.imageUrl,
|
|
1858
1864
|
alt: n.name || ""
|
|
1859
|
-
}, null, 8,
|
|
1865
|
+
}, null, 8, jt)) : s.initials ? (c(), u("span", {
|
|
1860
1866
|
key: 1,
|
|
1861
|
-
style:
|
|
1867
|
+
style: H({ fontSize: n.size * 0.36 + "px" })
|
|
1862
1868
|
}, v(s.initials), 5)) : (c(), u("svg", {
|
|
1863
1869
|
key: 2,
|
|
1864
1870
|
width: n.size * 0.5,
|
|
@@ -1886,11 +1892,11 @@ function qt(e, t, n, i, r, s) {
|
|
|
1886
1892
|
fill: "white",
|
|
1887
1893
|
opacity: "0.38"
|
|
1888
1894
|
}, null, -1)
|
|
1889
|
-
])], 8,
|
|
1895
|
+
])], 8, Dt))
|
|
1890
1896
|
], 6)
|
|
1891
1897
|
], 6);
|
|
1892
1898
|
}
|
|
1893
|
-
const le = /* @__PURE__ */ B(Pt, [["render",
|
|
1899
|
+
const le = /* @__PURE__ */ B(Pt, [["render", zt], ["__scopeId", "data-v-6f7f685d"]]), Ht = {
|
|
1894
1900
|
name: "WmTeamAvatars",
|
|
1895
1901
|
props: {
|
|
1896
1902
|
members: { type: Array, default: () => [] },
|
|
@@ -1912,23 +1918,23 @@ const le = /* @__PURE__ */ B(Pt, [["render", qt], ["__scopeId", "data-v-6f7f685d
|
|
|
1912
1918
|
return ye(e.name || "");
|
|
1913
1919
|
}
|
|
1914
1920
|
}
|
|
1915
|
-
},
|
|
1921
|
+
}, qt = {
|
|
1916
1922
|
key: 0,
|
|
1917
1923
|
class: "wm-team"
|
|
1918
|
-
},
|
|
1924
|
+
}, $t = ["src", "alt"], Vt = { key: 1 }, Kt = {
|
|
1919
1925
|
key: 0,
|
|
1920
1926
|
class: "wm-team__label"
|
|
1921
1927
|
};
|
|
1922
|
-
function
|
|
1923
|
-
return s.visible ? (c(), u("div",
|
|
1928
|
+
function Wt(e, t, n, i, r, s) {
|
|
1929
|
+
return s.visible ? (c(), u("div", qt, [
|
|
1924
1930
|
o("div", {
|
|
1925
1931
|
class: "wm-team__stack",
|
|
1926
|
-
style:
|
|
1932
|
+
style: H({ width: s.stackWidth + "px" })
|
|
1927
1933
|
}, [
|
|
1928
|
-
(c(!0), u(I, null,
|
|
1934
|
+
(c(!0), u(I, null, P(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1929
1935
|
key: l,
|
|
1930
1936
|
class: "wm-team__pill",
|
|
1931
|
-
style:
|
|
1937
|
+
style: H({
|
|
1932
1938
|
left: l * 13 + "px",
|
|
1933
1939
|
zIndex: 3 - l,
|
|
1934
1940
|
background: s.colorFor(a)
|
|
@@ -1938,19 +1944,19 @@ function Gt(e, t, n, i, r, s) {
|
|
|
1938
1944
|
key: 0,
|
|
1939
1945
|
src: a.avatar_url,
|
|
1940
1946
|
alt: a.name || ""
|
|
1941
|
-
}, null, 8,
|
|
1947
|
+
}, null, 8, $t)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
|
|
1942
1948
|
], 4))), 128))
|
|
1943
1949
|
], 4),
|
|
1944
|
-
n.responseLabel ? (c(), u("span",
|
|
1945
|
-
])) :
|
|
1950
|
+
n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
|
|
1951
|
+
])) : b("", !0);
|
|
1946
1952
|
}
|
|
1947
|
-
const
|
|
1953
|
+
const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
|
|
1948
1954
|
name: "WmHeader",
|
|
1949
|
-
components: { AIAvatar: le, TeamAvatars:
|
|
1955
|
+
components: { AIAvatar: le, TeamAvatars: Gt },
|
|
1950
1956
|
inject: {
|
|
1951
1957
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
1952
1958
|
// translator when the component is used standalone (no provider).
|
|
1953
|
-
t: { default: () =>
|
|
1959
|
+
t: { default: () => U() }
|
|
1954
1960
|
},
|
|
1955
1961
|
props: {
|
|
1956
1962
|
title: { type: String, default: "Nouvelle conversation" },
|
|
@@ -1983,16 +1989,16 @@ const Yt = /* @__PURE__ */ B(Ht, [["render", Gt], ["__scopeId", "data-v-e49a9063
|
|
|
1983
1989
|
return n;
|
|
1984
1990
|
}
|
|
1985
1991
|
}
|
|
1986
|
-
},
|
|
1992
|
+
}, Jt = { class: "wm-header" }, Qt = ["aria-label"], Xt = {
|
|
1987
1993
|
key: 1,
|
|
1988
1994
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
1989
|
-
},
|
|
1995
|
+
}, Zt = { class: "wm-header__avatar" }, en = { class: "wm-header__main" }, tn = { class: "wm-header__title" }, nn = {
|
|
1990
1996
|
key: 3,
|
|
1991
1997
|
class: "wm-header__fill"
|
|
1992
|
-
},
|
|
1993
|
-
function
|
|
1998
|
+
}, sn = { class: "wm-header__actions" }, rn = ["aria-label", "title"], an = ["aria-label", "title"];
|
|
1999
|
+
function on(e, t, n, i, r, s) {
|
|
1994
2000
|
const a = E("AIAvatar"), l = E("TeamAvatars");
|
|
1995
|
-
return c(), u("div",
|
|
2001
|
+
return c(), u("div", Jt, [
|
|
1996
2002
|
n.showBack ? (c(), u("button", {
|
|
1997
2003
|
key: 0,
|
|
1998
2004
|
type: "button",
|
|
@@ -2013,25 +2019,25 @@ function ln(e, t, n, i, r, s) {
|
|
|
2013
2019
|
}, [
|
|
2014
2020
|
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2015
2021
|
], -1)
|
|
2016
|
-
])], 8,
|
|
2022
|
+
])], 8, Qt)) : (c(), u("div", Xt)),
|
|
2017
2023
|
n.showIdentity ? (c(), u(I, { key: 2 }, [
|
|
2018
|
-
o("div",
|
|
2024
|
+
o("div", Zt, [
|
|
2019
2025
|
V(a, {
|
|
2020
2026
|
size: 30,
|
|
2021
2027
|
name: n.agentName,
|
|
2022
2028
|
"image-url": n.agentAvatarUrl
|
|
2023
2029
|
}, null, 8, ["name", "image-url"])
|
|
2024
2030
|
]),
|
|
2025
|
-
o("div",
|
|
2026
|
-
o("div",
|
|
2031
|
+
o("div", en, [
|
|
2032
|
+
o("div", tn, v(n.title), 1)
|
|
2027
2033
|
]),
|
|
2028
2034
|
s.hasTeam ? (c(), N(l, {
|
|
2029
2035
|
key: 0,
|
|
2030
2036
|
members: s.displayedTeamMembers,
|
|
2031
2037
|
"response-label": ""
|
|
2032
|
-
}, null, 8, ["members"])) :
|
|
2033
|
-
], 64)) : (c(), u("div",
|
|
2034
|
-
o("div",
|
|
2038
|
+
}, null, 8, ["members"])) : b("", !0)
|
|
2039
|
+
], 64)) : (c(), u("div", nn)),
|
|
2040
|
+
o("div", sn, [
|
|
2035
2041
|
n.showMore ? (c(), u("button", {
|
|
2036
2042
|
key: 0,
|
|
2037
2043
|
type: "button",
|
|
@@ -2063,7 +2069,7 @@ function ln(e, t, n, i, r, s) {
|
|
|
2063
2069
|
r: "1.6"
|
|
2064
2070
|
})
|
|
2065
2071
|
], -1)
|
|
2066
|
-
])], 10,
|
|
2072
|
+
])], 10, rn)) : b("", !0),
|
|
2067
2073
|
n.showClose ? (c(), u("button", {
|
|
2068
2074
|
key: 1,
|
|
2069
2075
|
type: "button",
|
|
@@ -2085,15 +2091,15 @@ function ln(e, t, n, i, r, s) {
|
|
|
2085
2091
|
}, [
|
|
2086
2092
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2087
2093
|
], -1)
|
|
2088
|
-
])], 8,
|
|
2094
|
+
])], 8, an)) : b("", !0)
|
|
2089
2095
|
])
|
|
2090
2096
|
]);
|
|
2091
2097
|
}
|
|
2092
|
-
const
|
|
2098
|
+
const ln = /* @__PURE__ */ B(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
|
|
2093
2099
|
function Re(e) {
|
|
2094
2100
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2095
2101
|
}
|
|
2096
|
-
function
|
|
2102
|
+
function cn(e) {
|
|
2097
2103
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
|
|
2098
2104
|
}
|
|
2099
2105
|
const Me = "";
|
|
@@ -2103,14 +2109,14 @@ function re(e) {
|
|
|
2103
2109
|
return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
|
|
2104
2110
|
const s = n.length;
|
|
2105
2111
|
return n.push(r), `${Me}CODE${s}${Me}`;
|
|
2106
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) =>
|
|
2112
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => cn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), 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, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
|
|
2107
2113
|
}
|
|
2108
|
-
function
|
|
2114
|
+
function dn(e) {
|
|
2109
2115
|
if (!e) return "";
|
|
2110
2116
|
const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
|
|
2111
2117
|
return re(Re(t));
|
|
2112
2118
|
}
|
|
2113
|
-
function
|
|
2119
|
+
function un(e) {
|
|
2114
2120
|
if (!e) return "";
|
|
2115
2121
|
const t = Re(e).split(`
|
|
2116
2122
|
`), n = [];
|
|
@@ -2119,24 +2125,24 @@ function hn(e) {
|
|
|
2119
2125
|
const s = t[i];
|
|
2120
2126
|
if (/^\s*```([\w-]*)\s*$/.exec(s)) {
|
|
2121
2127
|
i++;
|
|
2122
|
-
const
|
|
2128
|
+
const w = [];
|
|
2123
2129
|
for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
|
|
2124
|
-
|
|
2130
|
+
w.push(t[i]), i++;
|
|
2125
2131
|
i < t.length && i++, n.push({
|
|
2126
2132
|
type: "block",
|
|
2127
|
-
html: `<pre class="wm-md-pre"><code>${
|
|
2133
|
+
html: `<pre class="wm-md-pre"><code>${w.join(`
|
|
2128
2134
|
`)}</code></pre>`
|
|
2129
2135
|
});
|
|
2130
2136
|
continue;
|
|
2131
2137
|
}
|
|
2132
2138
|
if (/^\s*[-*]\s+/.test(s)) {
|
|
2133
|
-
const
|
|
2139
|
+
const w = [];
|
|
2134
2140
|
for (; i < t.length; ) {
|
|
2135
2141
|
const x = /^\s*[-*]\s+(.*)$/.exec(t[i]);
|
|
2136
2142
|
if (!x) break;
|
|
2137
|
-
|
|
2143
|
+
w.push(x[1]), i++;
|
|
2138
2144
|
}
|
|
2139
|
-
const k =
|
|
2145
|
+
const k = w.map((x) => `<li>${re(x)}</li>`).join("");
|
|
2140
2146
|
n.push({
|
|
2141
2147
|
type: "block",
|
|
2142
2148
|
html: `<ul class="wm-md-ul">${k}</ul>`
|
|
@@ -2145,13 +2151,13 @@ function hn(e) {
|
|
|
2145
2151
|
}
|
|
2146
2152
|
const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
2147
2153
|
if (l) {
|
|
2148
|
-
const
|
|
2154
|
+
const w = parseInt(l[1], 10), k = [l[2]];
|
|
2149
2155
|
for (i++; i < t.length; ) {
|
|
2150
2156
|
const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
|
|
2151
2157
|
if (!A) break;
|
|
2152
2158
|
k.push(A[1]), i++;
|
|
2153
2159
|
}
|
|
2154
|
-
const x = k.map((A) => `<li>${re(A)}</li>`).join(""), R =
|
|
2160
|
+
const x = k.map((A) => `<li>${re(A)}</li>`).join(""), R = w !== 1 ? ` start="${w}"` : "";
|
|
2155
2161
|
n.push({
|
|
2156
2162
|
type: "block",
|
|
2157
2163
|
html: `<ol class="wm-md-ol"${R}>${x}</ol>`
|
|
@@ -2160,10 +2166,10 @@ function hn(e) {
|
|
|
2160
2166
|
}
|
|
2161
2167
|
const p = /^(#{1,6})\s+(.*)$/.exec(s);
|
|
2162
2168
|
if (p) {
|
|
2163
|
-
const
|
|
2169
|
+
const w = p[1].length;
|
|
2164
2170
|
n.push({
|
|
2165
2171
|
type: "block",
|
|
2166
|
-
html: `<h${
|
|
2172
|
+
html: `<h${w} class="wm-md-h wm-md-h${w}">${re(p[2])}</h${w}>`
|
|
2167
2173
|
}), i++;
|
|
2168
2174
|
continue;
|
|
2169
2175
|
}
|
|
@@ -2185,13 +2191,13 @@ const Te = {
|
|
|
2185
2191
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
2186
2192
|
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",
|
|
2187
2193
|
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"
|
|
2188
|
-
},
|
|
2194
|
+
}, hn = {
|
|
2189
2195
|
name: "WmOnboarding",
|
|
2190
2196
|
components: { AIAvatar: le },
|
|
2191
2197
|
inject: {
|
|
2192
2198
|
// Translator + resolved-language getter shared by the Messenger
|
|
2193
2199
|
// shell. Fall back to French wording when used standalone.
|
|
2194
|
-
t: { default: () =>
|
|
2200
|
+
t: { default: () => U() },
|
|
2195
2201
|
wmLocale: { default: () => () => "fr" }
|
|
2196
2202
|
},
|
|
2197
2203
|
props: {
|
|
@@ -2232,7 +2238,7 @@ const Te = {
|
|
|
2232
2238
|
return Te[e] || Te.link;
|
|
2233
2239
|
},
|
|
2234
2240
|
renderPreview(e) {
|
|
2235
|
-
return
|
|
2241
|
+
return dn(e);
|
|
2236
2242
|
},
|
|
2237
2243
|
formatTs(e) {
|
|
2238
2244
|
if (!e) return "";
|
|
@@ -2254,10 +2260,10 @@ const Te = {
|
|
|
2254
2260
|
});
|
|
2255
2261
|
}
|
|
2256
2262
|
}
|
|
2257
|
-
},
|
|
2263
|
+
}, mn = { class: "wm-onb" }, fn = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, _n = { class: "wm-onb__title" }, pn = { class: "wm-onb__sub" }, vn = { class: "wm-onb__cta" }, yn = ["disabled"], wn = {
|
|
2258
2264
|
key: 0,
|
|
2259
2265
|
class: "wm-onb__section"
|
|
2260
|
-
},
|
|
2266
|
+
}, bn = { class: "wm-onb__section-title" }, kn = ["onClick"], Cn = { class: "wm-onb__card-icon" }, An = {
|
|
2261
2267
|
width: "16",
|
|
2262
2268
|
height: "16",
|
|
2263
2269
|
viewBox: "0 0 24 24",
|
|
@@ -2267,23 +2273,23 @@ const Te = {
|
|
|
2267
2273
|
"stroke-linecap": "round",
|
|
2268
2274
|
"stroke-linejoin": "round",
|
|
2269
2275
|
"aria-hidden": "true"
|
|
2270
|
-
},
|
|
2276
|
+
}, Sn = ["d"], Mn = { class: "wm-onb__card-body" }, Tn = { class: "wm-onb__card-title" }, xn = {
|
|
2271
2277
|
key: 0,
|
|
2272
2278
|
class: "wm-onb__card-sub"
|
|
2273
|
-
},
|
|
2279
|
+
}, On = {
|
|
2274
2280
|
key: 1,
|
|
2275
2281
|
class: "wm-onb__section"
|
|
2276
|
-
},
|
|
2282
|
+
}, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], Rn = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Pn = { class: "wm-onb__thread-title" }, Un = ["innerHTML"], jn = { class: "wm-onb__thread-meta" }, Dn = {
|
|
2277
2283
|
key: 0,
|
|
2278
2284
|
class: "wm-onb__thread-time"
|
|
2279
|
-
},
|
|
2285
|
+
}, zn = {
|
|
2280
2286
|
key: 0,
|
|
2281
2287
|
class: "wm-onb__empty"
|
|
2282
2288
|
};
|
|
2283
2289
|
function Hn(e, t, n, i, r, s) {
|
|
2284
2290
|
const a = E("AIAvatar");
|
|
2285
|
-
return c(), u("div",
|
|
2286
|
-
o("div",
|
|
2291
|
+
return c(), u("div", mn, [
|
|
2292
|
+
o("div", fn, [
|
|
2287
2293
|
t[2] || (t[2] = o("svg", {
|
|
2288
2294
|
class: "wm-onb__hero-deco",
|
|
2289
2295
|
width: "180",
|
|
@@ -2323,11 +2329,11 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2323
2329
|
"image-url": n.defaultIconUrl
|
|
2324
2330
|
}, null, 8, ["image-url"]),
|
|
2325
2331
|
o("div", gn, [
|
|
2326
|
-
o("div",
|
|
2327
|
-
o("div",
|
|
2332
|
+
o("div", _n, v(s.heroTitle), 1),
|
|
2333
|
+
o("div", pn, v(s.heroSub), 1)
|
|
2328
2334
|
])
|
|
2329
2335
|
]),
|
|
2330
|
-
o("div",
|
|
2336
|
+
o("div", vn, [
|
|
2331
2337
|
o("button", {
|
|
2332
2338
|
type: "button",
|
|
2333
2339
|
class: "wm-onb__startBtn",
|
|
@@ -2350,36 +2356,36 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2350
2356
|
])
|
|
2351
2357
|
], -1)),
|
|
2352
2358
|
o("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
|
|
2353
|
-
], 8,
|
|
2359
|
+
], 8, yn)
|
|
2354
2360
|
]),
|
|
2355
|
-
n.quickLinks.length ? (c(), u("div",
|
|
2356
|
-
o("div",
|
|
2361
|
+
n.quickLinks.length ? (c(), u("div", wn, [
|
|
2362
|
+
o("div", bn, v(s.t("onboarding.quickAccess")), 1),
|
|
2357
2363
|
o("div", {
|
|
2358
2364
|
class: O(s.quickLinksLayout)
|
|
2359
2365
|
}, [
|
|
2360
|
-
(c(!0), u(I, null,
|
|
2366
|
+
(c(!0), u(I, null, P(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2361
2367
|
key: p,
|
|
2362
2368
|
type: "button",
|
|
2363
2369
|
class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
2364
|
-
onClick: (
|
|
2370
|
+
onClick: (w) => e.$emit("select", l)
|
|
2365
2371
|
}, [
|
|
2366
|
-
o("span",
|
|
2367
|
-
(c(), u("svg",
|
|
2372
|
+
o("span", Cn, [
|
|
2373
|
+
(c(), u("svg", An, [
|
|
2368
2374
|
o("path", {
|
|
2369
2375
|
d: s.iconPath(l.icon)
|
|
2370
|
-
}, null, 8,
|
|
2376
|
+
}, null, 8, Sn)
|
|
2371
2377
|
]))
|
|
2372
2378
|
]),
|
|
2373
|
-
o("span",
|
|
2374
|
-
o("span",
|
|
2375
|
-
l.description ? (c(), u("span",
|
|
2379
|
+
o("span", Mn, [
|
|
2380
|
+
o("span", Tn, v(l.label), 1),
|
|
2381
|
+
l.description ? (c(), u("span", xn, v(l.description), 1)) : b("", !0)
|
|
2376
2382
|
])
|
|
2377
|
-
], 10,
|
|
2383
|
+
], 10, kn))), 128))
|
|
2378
2384
|
], 2)
|
|
2379
|
-
])) :
|
|
2380
|
-
n.openThreads.length ? (c(), u("div",
|
|
2381
|
-
o("div",
|
|
2382
|
-
o("div",
|
|
2385
|
+
])) : b("", !0),
|
|
2386
|
+
n.openThreads.length ? (c(), u("div", On, [
|
|
2387
|
+
o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
|
|
2388
|
+
o("div", In, [
|
|
2383
2389
|
t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
|
|
2384
2390
|
o("svg", {
|
|
2385
2391
|
width: "12",
|
|
@@ -2400,12 +2406,12 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2400
2406
|
type: "text",
|
|
2401
2407
|
placeholder: s.t("onboarding.search"),
|
|
2402
2408
|
"aria-label": s.t("onboarding.search")
|
|
2403
|
-
}, null, 8,
|
|
2409
|
+
}, null, 8, En), [
|
|
2404
2410
|
[X, r.query]
|
|
2405
2411
|
])
|
|
2406
2412
|
]),
|
|
2407
|
-
o("div",
|
|
2408
|
-
(c(!0), u(I, null,
|
|
2413
|
+
o("div", Rn, [
|
|
2414
|
+
(c(!0), u(I, null, P(s.filteredThreads, (l) => (c(), u("button", {
|
|
2409
2415
|
key: l.id,
|
|
2410
2416
|
type: "button",
|
|
2411
2417
|
class: "wm-onb__thread",
|
|
@@ -2431,17 +2437,17 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2431
2437
|
key: 0,
|
|
2432
2438
|
class: "wm-onb__thread-dot",
|
|
2433
2439
|
"aria-label": s.t("onboarding.unread")
|
|
2434
|
-
}, null, 8,
|
|
2440
|
+
}, null, 8, Nn)) : b("", !0)
|
|
2435
2441
|
], 2),
|
|
2436
|
-
o("span",
|
|
2442
|
+
o("span", Fn, [
|
|
2437
2443
|
o("span", Pn, v(l.title), 1),
|
|
2438
2444
|
o("span", {
|
|
2439
2445
|
class: "wm-onb__thread-preview",
|
|
2440
2446
|
innerHTML: s.renderPreview(l.preview)
|
|
2441
|
-
}, null, 8,
|
|
2447
|
+
}, null, 8, Un)
|
|
2442
2448
|
]),
|
|
2443
|
-
o("span",
|
|
2444
|
-
s.formatTs(l._ts) ? (c(), u("span",
|
|
2449
|
+
o("span", jn, [
|
|
2450
|
+
s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : b("", !0),
|
|
2445
2451
|
t[6] || (t[6] = o("svg", {
|
|
2446
2452
|
width: "14",
|
|
2447
2453
|
height: "14",
|
|
@@ -2457,17 +2463,17 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2457
2463
|
o("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2458
2464
|
], -1))
|
|
2459
2465
|
])
|
|
2460
|
-
], 8,
|
|
2461
|
-
s.filteredThreads.length ?
|
|
2466
|
+
], 8, Bn))), 128)),
|
|
2467
|
+
s.filteredThreads.length ? b("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2462
2468
|
])
|
|
2463
|
-
])) :
|
|
2469
|
+
])) : b("", !0)
|
|
2464
2470
|
]);
|
|
2465
2471
|
}
|
|
2466
|
-
const
|
|
2467
|
-
function
|
|
2472
|
+
const qn = /* @__PURE__ */ B(hn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
|
|
2473
|
+
function $n(e) {
|
|
2468
2474
|
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();
|
|
2469
2475
|
}
|
|
2470
|
-
const
|
|
2476
|
+
const Vn = {
|
|
2471
2477
|
name: "WmActionResult",
|
|
2472
2478
|
props: {
|
|
2473
2479
|
state: { type: String, default: "success" },
|
|
@@ -2477,13 +2483,13 @@ const Kn = {
|
|
|
2477
2483
|
},
|
|
2478
2484
|
computed: {
|
|
2479
2485
|
detailText() {
|
|
2480
|
-
return
|
|
2486
|
+
return $n(this.detail);
|
|
2481
2487
|
}
|
|
2482
2488
|
}
|
|
2483
|
-
},
|
|
2489
|
+
}, Kn = {
|
|
2484
2490
|
class: "wm-result__icon",
|
|
2485
2491
|
"aria-hidden": "true"
|
|
2486
|
-
},
|
|
2492
|
+
}, Wn = {
|
|
2487
2493
|
key: 0,
|
|
2488
2494
|
width: "11",
|
|
2489
2495
|
height: "11",
|
|
@@ -2493,7 +2499,7 @@ const Kn = {
|
|
|
2493
2499
|
"stroke-width": "2.8",
|
|
2494
2500
|
"stroke-linecap": "round",
|
|
2495
2501
|
"stroke-linejoin": "round"
|
|
2496
|
-
},
|
|
2502
|
+
}, Gn = {
|
|
2497
2503
|
key: 1,
|
|
2498
2504
|
width: "11",
|
|
2499
2505
|
height: "11",
|
|
@@ -2503,7 +2509,7 @@ const Kn = {
|
|
|
2503
2509
|
"stroke-width": "2.6",
|
|
2504
2510
|
"stroke-linecap": "round",
|
|
2505
2511
|
"stroke-linejoin": "round"
|
|
2506
|
-
},
|
|
2512
|
+
}, Yn = {
|
|
2507
2513
|
key: 2,
|
|
2508
2514
|
width: "11",
|
|
2509
2515
|
height: "11",
|
|
@@ -2513,7 +2519,7 @@ const Kn = {
|
|
|
2513
2519
|
"stroke-width": "2.4",
|
|
2514
2520
|
"stroke-linecap": "round",
|
|
2515
2521
|
"stroke-linejoin": "round"
|
|
2516
|
-
},
|
|
2522
|
+
}, Jn = {
|
|
2517
2523
|
key: 3,
|
|
2518
2524
|
width: "12",
|
|
2519
2525
|
height: "12",
|
|
@@ -2523,24 +2529,24 @@ const Kn = {
|
|
|
2523
2529
|
"stroke-width": "2.2",
|
|
2524
2530
|
"stroke-linecap": "round",
|
|
2525
2531
|
"stroke-linejoin": "round"
|
|
2526
|
-
},
|
|
2527
|
-
function
|
|
2532
|
+
}, Qn = { class: "wm-result__body" }, Xn = { class: "wm-result__label" }, Zn = { class: "wm-result__detail" };
|
|
2533
|
+
function es(e, t, n, i, r, s) {
|
|
2528
2534
|
return c(), u("div", {
|
|
2529
2535
|
class: O(["wm-result", `wm-result--${n.state}`])
|
|
2530
2536
|
}, [
|
|
2531
|
-
o("span",
|
|
2532
|
-
n.state === "success" ? (c(), u("svg",
|
|
2537
|
+
o("span", Kn, [
|
|
2538
|
+
n.state === "success" ? (c(), u("svg", Wn, [...t[0] || (t[0] = [
|
|
2533
2539
|
o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2534
|
-
])])) : n.state === "rejected" ? (c(), u("svg",
|
|
2540
|
+
])])) : n.state === "rejected" ? (c(), u("svg", Gn, [...t[1] || (t[1] = [
|
|
2535
2541
|
o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2536
|
-
])])) : n.state === "awaiting" ? (c(), u("svg",
|
|
2542
|
+
])])) : n.state === "awaiting" ? (c(), u("svg", Yn, [...t[2] || (t[2] = [
|
|
2537
2543
|
o("circle", {
|
|
2538
2544
|
cx: "12",
|
|
2539
2545
|
cy: "12",
|
|
2540
2546
|
r: "10"
|
|
2541
2547
|
}, null, -1),
|
|
2542
2548
|
o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2543
|
-
])])) : (c(), u("svg",
|
|
2549
|
+
])])) : (c(), u("svg", Jn, [...t[3] || (t[3] = [
|
|
2544
2550
|
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),
|
|
2545
2551
|
o("line", {
|
|
2546
2552
|
x1: "12",
|
|
@@ -2556,24 +2562,24 @@ function ts(e, t, n, i, r, s) {
|
|
|
2556
2562
|
}, null, -1)
|
|
2557
2563
|
])]))
|
|
2558
2564
|
]),
|
|
2559
|
-
o("span",
|
|
2560
|
-
o("span",
|
|
2565
|
+
o("span", Qn, [
|
|
2566
|
+
o("span", Xn, v(n.label), 1),
|
|
2561
2567
|
s.detailText ? (c(), u(I, { key: 0 }, [
|
|
2562
2568
|
t[4] || (t[4] = o("span", {
|
|
2563
2569
|
class: "wm-result__sep",
|
|
2564
2570
|
"aria-hidden": "true"
|
|
2565
2571
|
}, " · ", -1)),
|
|
2566
|
-
o("span",
|
|
2567
|
-
], 64)) :
|
|
2572
|
+
o("span", Zn, v(s.detailText), 1)
|
|
2573
|
+
], 64)) : b("", !0)
|
|
2568
2574
|
])
|
|
2569
2575
|
], 2);
|
|
2570
2576
|
}
|
|
2571
|
-
const
|
|
2577
|
+
const ts = /* @__PURE__ */ B(Vn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
|
|
2572
2578
|
name: "WmArtifactFormResponse",
|
|
2573
2579
|
inject: {
|
|
2574
2580
|
// Translator shared by the Messenger shell; French fallback when
|
|
2575
2581
|
// the component is used standalone.
|
|
2576
|
-
t: { default: () =>
|
|
2582
|
+
t: { default: () => U() }
|
|
2577
2583
|
},
|
|
2578
2584
|
props: {
|
|
2579
2585
|
data: { type: Object, required: !0 }
|
|
@@ -2584,12 +2590,12 @@ const ns = /* @__PURE__ */ B(Kn, [["render", ts], ["__scopeId", "data-v-7284acd0
|
|
|
2584
2590
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2585
2591
|
}
|
|
2586
2592
|
}
|
|
2587
|
-
},
|
|
2588
|
-
function
|
|
2589
|
-
return c(), u("div",
|
|
2590
|
-
o("div",
|
|
2591
|
-
o("div",
|
|
2592
|
-
o("span",
|
|
2593
|
+
}, ss = { class: "wm-art wm-art--formResponse" }, rs = { class: "wm-art__head" }, is = { class: "wm-art__title" }, as = { class: "wm-art__badge wm-art__badge--success" }, os = { class: "wm-art__body" }, ls = { class: "wm-art__fieldLabel" };
|
|
2594
|
+
function cs(e, t, n, i, r, s) {
|
|
2595
|
+
return c(), u("div", ss, [
|
|
2596
|
+
o("div", rs, [
|
|
2597
|
+
o("div", is, v(n.data.title || s.t("form.title")), 1),
|
|
2598
|
+
o("span", as, [
|
|
2593
2599
|
t[0] || (t[0] = o("svg", {
|
|
2594
2600
|
width: "11",
|
|
2595
2601
|
height: "11",
|
|
@@ -2606,12 +2612,12 @@ function ds(e, t, n, i, r, s) {
|
|
|
2606
2612
|
pe(" " + v(s.t("form.sent")), 1)
|
|
2607
2613
|
])
|
|
2608
2614
|
]),
|
|
2609
|
-
o("div",
|
|
2610
|
-
(c(!0), u(I, null,
|
|
2615
|
+
o("div", os, [
|
|
2616
|
+
(c(!0), u(I, null, P(s.fields, (a, l) => (c(), u("div", {
|
|
2611
2617
|
key: l,
|
|
2612
2618
|
class: "wm-art__field"
|
|
2613
2619
|
}, [
|
|
2614
|
-
o("div",
|
|
2620
|
+
o("div", ls, v(a.label), 1),
|
|
2615
2621
|
o("div", {
|
|
2616
2622
|
class: O([
|
|
2617
2623
|
"wm-art__fieldValue",
|
|
@@ -2622,7 +2628,7 @@ function ds(e, t, n, i, r, s) {
|
|
|
2622
2628
|
])
|
|
2623
2629
|
]);
|
|
2624
2630
|
}
|
|
2625
|
-
const
|
|
2631
|
+
const ds = /* @__PURE__ */ B(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
|
|
2626
2632
|
name: "WmArtifactInfoCard",
|
|
2627
2633
|
props: {
|
|
2628
2634
|
data: { type: Object, required: !0 }
|
|
@@ -2637,32 +2643,32 @@ const us = /* @__PURE__ */ B(ss, [["render", ds], ["__scopeId", "data-v-713aecf1
|
|
|
2637
2643
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2638
2644
|
}
|
|
2639
2645
|
}
|
|
2640
|
-
},
|
|
2646
|
+
}, hs = { class: "wm-art wm-art--infoCard" }, ms = {
|
|
2641
2647
|
key: 0,
|
|
2642
2648
|
class: "wm-art__image"
|
|
2643
|
-
},
|
|
2649
|
+
}, fs = ["src", "alt"], gs = { class: "wm-art__head" }, _s = { class: "wm-art__headMain" }, ps = { class: "wm-art__title" }, vs = {
|
|
2644
2650
|
key: 0,
|
|
2645
2651
|
class: "wm-art__subtitle"
|
|
2646
|
-
},
|
|
2652
|
+
}, ys = {
|
|
2647
2653
|
key: 1,
|
|
2648
2654
|
class: "wm-art__body"
|
|
2649
|
-
},
|
|
2655
|
+
}, ws = {
|
|
2650
2656
|
key: 0,
|
|
2651
2657
|
class: "wm-art__text"
|
|
2652
|
-
},
|
|
2653
|
-
function
|
|
2654
|
-
return c(), u("div",
|
|
2655
|
-
n.data.image_url ? (c(), u("figure",
|
|
2658
|
+
}, bs = { class: "wm-art__fieldLabel" };
|
|
2659
|
+
function ks(e, t, n, i, r, s) {
|
|
2660
|
+
return c(), u("div", hs, [
|
|
2661
|
+
n.data.image_url ? (c(), u("figure", ms, [
|
|
2656
2662
|
o("img", {
|
|
2657
2663
|
src: n.data.image_url,
|
|
2658
2664
|
alt: n.data.title || "",
|
|
2659
2665
|
loading: "lazy"
|
|
2660
|
-
}, null, 8,
|
|
2661
|
-
])) :
|
|
2666
|
+
}, null, 8, fs)
|
|
2667
|
+
])) : b("", !0),
|
|
2662
2668
|
o("div", gs, [
|
|
2663
|
-
o("div",
|
|
2664
|
-
o("div",
|
|
2665
|
-
n.data.subtitle ? (c(), u("div",
|
|
2669
|
+
o("div", _s, [
|
|
2670
|
+
o("div", ps, v(n.data.title), 1),
|
|
2671
|
+
n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : b("", !0)
|
|
2666
2672
|
]),
|
|
2667
2673
|
n.data.badge && n.data.badge.label ? (c(), u("span", {
|
|
2668
2674
|
key: 0,
|
|
@@ -2670,27 +2676,27 @@ function Cs(e, t, n, i, r, s) {
|
|
|
2670
2676
|
"wm-art__badge",
|
|
2671
2677
|
`wm-art__badge--${n.data.badge.tone || "neutral"}`
|
|
2672
2678
|
])
|
|
2673
|
-
}, v(n.data.badge.label), 3)) :
|
|
2679
|
+
}, v(n.data.badge.label), 3)) : b("", !0)
|
|
2674
2680
|
]),
|
|
2675
|
-
s.hasBody ? (c(), u("div",
|
|
2676
|
-
n.data.body ? (c(), u("div",
|
|
2677
|
-
s.fields.length ? (c(!0), u(I, { key: 1 },
|
|
2681
|
+
s.hasBody ? (c(), u("div", ys, [
|
|
2682
|
+
n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : b("", !0),
|
|
2683
|
+
s.fields.length ? (c(!0), u(I, { key: 1 }, P(s.fields, (a, l) => (c(), u("div", {
|
|
2678
2684
|
key: l,
|
|
2679
2685
|
class: "wm-art__field"
|
|
2680
2686
|
}, [
|
|
2681
|
-
o("div",
|
|
2687
|
+
o("div", bs, v(a.label), 1),
|
|
2682
2688
|
o("div", {
|
|
2683
2689
|
class: O([
|
|
2684
2690
|
"wm-art__fieldValue",
|
|
2685
2691
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2686
2692
|
])
|
|
2687
2693
|
}, v(a.value), 3)
|
|
2688
|
-
]))), 128)) :
|
|
2689
|
-
])) :
|
|
2694
|
+
]))), 128)) : b("", !0)
|
|
2695
|
+
])) : b("", !0)
|
|
2690
2696
|
]);
|
|
2691
2697
|
}
|
|
2692
|
-
const
|
|
2693
|
-
function
|
|
2698
|
+
const Cs = /* @__PURE__ */ B(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
2699
|
+
function As(e, t, n) {
|
|
2694
2700
|
if (!e) return "";
|
|
2695
2701
|
const i = new Date(e);
|
|
2696
2702
|
if (Number.isNaN(i.getTime())) return e;
|
|
@@ -2704,12 +2710,12 @@ function Ss(e, t, n) {
|
|
|
2704
2710
|
});
|
|
2705
2711
|
return `${r}${n}${s}`;
|
|
2706
2712
|
}
|
|
2707
|
-
const
|
|
2713
|
+
const Ss = {
|
|
2708
2714
|
name: "WmArtifactTicket",
|
|
2709
2715
|
inject: {
|
|
2710
2716
|
// Translator + resolved-language getter shared by the Messenger
|
|
2711
2717
|
// shell. Fall back to French wording when used standalone.
|
|
2712
|
-
t: { default: () =>
|
|
2718
|
+
t: { default: () => U() },
|
|
2713
2719
|
wmLocale: { default: () => () => "fr" }
|
|
2714
2720
|
},
|
|
2715
2721
|
props: {
|
|
@@ -2722,7 +2728,7 @@ const Ms = {
|
|
|
2722
2728
|
},
|
|
2723
2729
|
formattedDate() {
|
|
2724
2730
|
var e;
|
|
2725
|
-
return
|
|
2731
|
+
return As(
|
|
2726
2732
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
2727
2733
|
oe(this.wmLocale()),
|
|
2728
2734
|
this.t("ticket.dateAt")
|
|
@@ -2750,13 +2756,13 @@ const Ms = {
|
|
|
2750
2756
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
2751
2757
|
}
|
|
2752
2758
|
}
|
|
2753
|
-
},
|
|
2759
|
+
}, Ms = { class: "wm-art wm-art--ticket" }, Ts = { class: "wm-art__head wm-tk__head" }, xs = { class: "wm-art__title wm-tk__title" }, Os = { class: "wm-tk__sub" }, Ls = { class: "wm-tk__ref" }, Is = {
|
|
2754
2760
|
key: 0,
|
|
2755
2761
|
class: "wm-tk__text"
|
|
2756
|
-
},
|
|
2762
|
+
}, Es = {
|
|
2757
2763
|
key: 0,
|
|
2758
2764
|
class: "wm-art__body"
|
|
2759
|
-
},
|
|
2765
|
+
}, Rs = { class: "wm-art__fieldLabel" }, Bs = ["data-level"], Ns = {
|
|
2760
2766
|
key: 1,
|
|
2761
2767
|
class: "wm-tk__date",
|
|
2762
2768
|
width: "12",
|
|
@@ -2768,16 +2774,16 @@ const Ms = {
|
|
|
2768
2774
|
"stroke-linecap": "round",
|
|
2769
2775
|
"stroke-linejoin": "round",
|
|
2770
2776
|
"aria-hidden": "true"
|
|
2771
|
-
},
|
|
2777
|
+
}, Fs = {
|
|
2772
2778
|
key: 1,
|
|
2773
2779
|
class: "wm-art__footer wm-tk__footer"
|
|
2774
2780
|
};
|
|
2775
2781
|
function Ps(e, t, n, i, r, s) {
|
|
2776
|
-
return c(), u("div",
|
|
2777
|
-
o("div",
|
|
2778
|
-
o("div",
|
|
2779
|
-
o("div",
|
|
2780
|
-
o("div",
|
|
2782
|
+
return c(), u("div", Ms, [
|
|
2783
|
+
o("div", Ts, [
|
|
2784
|
+
o("div", xs, v(n.data.title), 1),
|
|
2785
|
+
o("div", Os, [
|
|
2786
|
+
o("div", Ls, [
|
|
2781
2787
|
t[0] || (t[0] = o("svg", {
|
|
2782
2788
|
width: "11",
|
|
2783
2789
|
height: "11",
|
|
@@ -2808,14 +2814,14 @@ function Ps(e, t, n, i, r, s) {
|
|
|
2808
2814
|
pe(" " + v(n.data.status.label), 1)
|
|
2809
2815
|
], 2)
|
|
2810
2816
|
]),
|
|
2811
|
-
n.data.body ? (c(), u("div",
|
|
2817
|
+
n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : b("", !0)
|
|
2812
2818
|
]),
|
|
2813
|
-
s.fields.length ? (c(), u("div",
|
|
2814
|
-
(c(!0), u(I, null,
|
|
2819
|
+
s.fields.length ? (c(), u("div", Es, [
|
|
2820
|
+
(c(!0), u(I, null, P(s.fields, (a, l) => (c(), u("div", {
|
|
2815
2821
|
key: l,
|
|
2816
2822
|
class: "wm-art__field"
|
|
2817
2823
|
}, [
|
|
2818
|
-
o("div",
|
|
2824
|
+
o("div", Rs, v(a.label), 1),
|
|
2819
2825
|
o("div", {
|
|
2820
2826
|
class: O([
|
|
2821
2827
|
"wm-art__fieldValue",
|
|
@@ -2852,7 +2858,7 @@ function Ps(e, t, n, i, r, s) {
|
|
|
2852
2858
|
height: "9",
|
|
2853
2859
|
rx: "0.5"
|
|
2854
2860
|
}, null, -1)
|
|
2855
|
-
])], 8,
|
|
2861
|
+
])], 8, Bs)) : s.isDate(a.label) ? (c(), u("svg", Ns, [...t[3] || (t[3] = [
|
|
2856
2862
|
o("rect", {
|
|
2857
2863
|
x: "3",
|
|
2858
2864
|
y: "4",
|
|
@@ -2861,12 +2867,12 @@ function Ps(e, t, n, i, r, s) {
|
|
|
2861
2867
|
rx: "2"
|
|
2862
2868
|
}, null, -1),
|
|
2863
2869
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
2864
|
-
])])) :
|
|
2870
|
+
])])) : b("", !0),
|
|
2865
2871
|
o("span", null, v(a.value), 1)
|
|
2866
2872
|
], 2)
|
|
2867
2873
|
]))), 128))
|
|
2868
|
-
])) :
|
|
2869
|
-
n.data.created_at ? (c(), u("div",
|
|
2874
|
+
])) : b("", !0),
|
|
2875
|
+
n.data.created_at ? (c(), u("div", Fs, [
|
|
2870
2876
|
t[4] || (t[4] = o("svg", {
|
|
2871
2877
|
width: "11",
|
|
2872
2878
|
height: "11",
|
|
@@ -2888,14 +2894,14 @@ function Ps(e, t, n, i, r, s) {
|
|
|
2888
2894
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
2889
2895
|
], -1)),
|
|
2890
2896
|
o("span", null, v(s.formattedDate), 1)
|
|
2891
|
-
])) :
|
|
2897
|
+
])) : b("", !0)
|
|
2892
2898
|
]);
|
|
2893
2899
|
}
|
|
2894
|
-
const
|
|
2895
|
-
form_response:
|
|
2896
|
-
info_card:
|
|
2897
|
-
ticket:
|
|
2898
|
-
},
|
|
2900
|
+
const Us = /* @__PURE__ */ B(Ss, [["render", Ps], ["__scopeId", "data-v-5f30c914"]]), js = {
|
|
2901
|
+
form_response: ds,
|
|
2902
|
+
info_card: Cs,
|
|
2903
|
+
ticket: Us
|
|
2904
|
+
}, Ds = {
|
|
2899
2905
|
name: "WmArtifactRenderer",
|
|
2900
2906
|
props: {
|
|
2901
2907
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -2906,23 +2912,23 @@ const js = /* @__PURE__ */ B(Ms, [["render", Ps], ["__scopeId", "data-v-5f30c914
|
|
|
2906
2912
|
component() {
|
|
2907
2913
|
var t;
|
|
2908
2914
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
2909
|
-
return e &&
|
|
2915
|
+
return e && js[e] || null;
|
|
2910
2916
|
}
|
|
2911
2917
|
}
|
|
2912
2918
|
};
|
|
2913
|
-
function
|
|
2919
|
+
function zs(e, t, n, i, r, s) {
|
|
2914
2920
|
return s.component ? (c(), N(je(s.component), {
|
|
2915
2921
|
key: 0,
|
|
2916
2922
|
data: n.artifact.data
|
|
2917
|
-
}, null, 8, ["data"])) :
|
|
2923
|
+
}, null, 8, ["data"])) : b("", !0);
|
|
2918
2924
|
}
|
|
2919
|
-
const Hs = /* @__PURE__ */ B(
|
|
2925
|
+
const Hs = /* @__PURE__ */ B(Ds, [["render", zs]]), qs = {
|
|
2920
2926
|
name: "WmAttachmentPreview",
|
|
2921
2927
|
inject: {
|
|
2922
2928
|
signAttachmentFn: { default: null },
|
|
2923
2929
|
// Translator shared by the Messenger shell; French fallback when
|
|
2924
2930
|
// the component is used standalone.
|
|
2925
|
-
t: { default: () =>
|
|
2931
|
+
t: { default: () => U() }
|
|
2926
2932
|
},
|
|
2927
2933
|
props: {
|
|
2928
2934
|
attachment: { type: Object, required: !0 }
|
|
@@ -2984,15 +2990,15 @@ const Hs = /* @__PURE__ */ B(zs, [["render", qs]]), $s = {
|
|
|
2984
2990
|
this.safeHref === "#" && e.preventDefault();
|
|
2985
2991
|
}
|
|
2986
2992
|
}
|
|
2987
|
-
},
|
|
2993
|
+
}, $s = ["href"], Vs = ["src", "alt"], Ks = ["src"], Ws = ["src"], Gs = ["href", "download"], Ys = { class: "wm-att__main" }, Js = { class: "wm-att__name" }, Qs = {
|
|
2988
2994
|
key: 0,
|
|
2989
2995
|
class: "wm-att__meta"
|
|
2990
|
-
},
|
|
2996
|
+
}, Xs = {
|
|
2991
2997
|
key: 0,
|
|
2992
2998
|
class: "wm-att__spin",
|
|
2993
2999
|
"aria-hidden": "true"
|
|
2994
3000
|
};
|
|
2995
|
-
function
|
|
3001
|
+
function Zs(e, t, n, i, r, s) {
|
|
2996
3002
|
return c(), u("div", {
|
|
2997
3003
|
class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
2998
3004
|
}, [
|
|
@@ -3007,18 +3013,18 @@ function er(e, t, n, i, r, s) {
|
|
|
3007
3013
|
src: r.url,
|
|
3008
3014
|
alt: s.displayName,
|
|
3009
3015
|
loading: "lazy"
|
|
3010
|
-
}, null, 8,
|
|
3011
|
-
], 8,
|
|
3016
|
+
}, null, 8, Vs)
|
|
3017
|
+
], 8, $s)) : s.kind === "audio" && r.url ? (c(), u("audio", {
|
|
3012
3018
|
key: 1,
|
|
3013
3019
|
src: r.url,
|
|
3014
3020
|
controls: "",
|
|
3015
3021
|
preload: "metadata"
|
|
3016
|
-
}, null, 8,
|
|
3022
|
+
}, null, 8, Ks)) : s.kind === "video" && r.url ? (c(), u("video", {
|
|
3017
3023
|
key: 2,
|
|
3018
3024
|
src: r.url,
|
|
3019
3025
|
controls: "",
|
|
3020
3026
|
preload: "metadata"
|
|
3021
|
-
}, null, 8,
|
|
3027
|
+
}, null, 8, Ws)) : (c(), u("a", {
|
|
3022
3028
|
key: 3,
|
|
3023
3029
|
class: "wm-att__file",
|
|
3024
3030
|
href: s.safeHref,
|
|
@@ -3043,15 +3049,15 @@ function er(e, t, n, i, r, s) {
|
|
|
3043
3049
|
o("path", { d: "M14 2v6h6" })
|
|
3044
3050
|
])
|
|
3045
3051
|
], -1)),
|
|
3046
|
-
o("span",
|
|
3047
|
-
o("span",
|
|
3048
|
-
s.sizeLabel ? (c(), u("span",
|
|
3052
|
+
o("span", Ys, [
|
|
3053
|
+
o("span", Js, v(s.displayName), 1),
|
|
3054
|
+
s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
|
|
3049
3055
|
]),
|
|
3050
|
-
r.loading ? (c(), u("span",
|
|
3051
|
-
], 8,
|
|
3056
|
+
r.loading ? (c(), u("span", Xs)) : b("", !0)
|
|
3057
|
+
], 8, Gs))
|
|
3052
3058
|
], 2);
|
|
3053
3059
|
}
|
|
3054
|
-
const
|
|
3060
|
+
const er = /* @__PURE__ */ B(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62"]]), tr = {
|
|
3055
3061
|
name: "WmBubble",
|
|
3056
3062
|
props: {
|
|
3057
3063
|
role: { type: String, default: "ai" },
|
|
@@ -3060,53 +3066,53 @@ const tr = /* @__PURE__ */ B($s, [["render", er], ["__scopeId", "data-v-0c877a62
|
|
|
3060
3066
|
},
|
|
3061
3067
|
computed: {
|
|
3062
3068
|
rendered() {
|
|
3063
|
-
return
|
|
3069
|
+
return un(this.text);
|
|
3064
3070
|
}
|
|
3065
3071
|
}
|
|
3066
|
-
},
|
|
3067
|
-
function
|
|
3072
|
+
}, nr = ["innerHTML"];
|
|
3073
|
+
function sr(e, t, n, i, r, s) {
|
|
3068
3074
|
return c(), u("div", {
|
|
3069
3075
|
class: O(["wm-bubble", "wm-bubble--" + n.role])
|
|
3070
3076
|
}, [
|
|
3071
3077
|
De(e.$slots, "default", {}, () => [
|
|
3072
|
-
o("span", { innerHTML: s.rendered }, null, 8,
|
|
3078
|
+
o("span", { innerHTML: s.rendered }, null, 8, nr)
|
|
3073
3079
|
], !0)
|
|
3074
3080
|
], 2);
|
|
3075
3081
|
}
|
|
3076
|
-
const
|
|
3077
|
-
function
|
|
3078
|
-
return c(), u("div",
|
|
3082
|
+
const rr = /* @__PURE__ */ B(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
|
|
3083
|
+
function or(e, t, n, i, r, s) {
|
|
3084
|
+
return c(), u("div", ar, [...t[0] || (t[0] = [
|
|
3079
3085
|
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3080
3086
|
o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3081
3087
|
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3082
3088
|
])]);
|
|
3083
3089
|
}
|
|
3084
|
-
const
|
|
3090
|
+
const lr = /* @__PURE__ */ B(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
|
|
3085
3091
|
function Q(e) {
|
|
3086
3092
|
return e ? e.client_msg_id || e.id : "";
|
|
3087
3093
|
}
|
|
3088
|
-
const
|
|
3094
|
+
const cr = {
|
|
3089
3095
|
transferred_to_human: "system.transferredToHuman",
|
|
3090
3096
|
assigned: "system.assigned",
|
|
3091
3097
|
unassigned: "system.unassigned",
|
|
3092
3098
|
resolved: "system.resolved",
|
|
3093
3099
|
reopened: "system.reopened",
|
|
3094
3100
|
idle: "system.idle"
|
|
3095
|
-
},
|
|
3101
|
+
}, dr = 80, ur = 200, hr = {
|
|
3096
3102
|
name: "WmMessageList",
|
|
3097
3103
|
components: {
|
|
3098
3104
|
AIAvatar: le,
|
|
3099
3105
|
HumanAvatar: Ee,
|
|
3100
|
-
Bubble:
|
|
3101
|
-
Typing:
|
|
3102
|
-
ActionResult:
|
|
3103
|
-
AttachmentPreview:
|
|
3106
|
+
Bubble: rr,
|
|
3107
|
+
Typing: lr,
|
|
3108
|
+
ActionResult: ts,
|
|
3109
|
+
AttachmentPreview: er,
|
|
3104
3110
|
ArtifactRenderer: Hs
|
|
3105
3111
|
},
|
|
3106
3112
|
inject: {
|
|
3107
3113
|
// Translator + resolved-language getter shared by the Messenger
|
|
3108
3114
|
// shell. Fall back to French wording when used standalone.
|
|
3109
|
-
t: { default: () =>
|
|
3115
|
+
t: { default: () => U() },
|
|
3110
3116
|
wmLocale: { default: () => () => "fr" }
|
|
3111
3117
|
},
|
|
3112
3118
|
props: {
|
|
@@ -3200,7 +3206,7 @@ const dr = {
|
|
|
3200
3206
|
if (a.role === "system") continue;
|
|
3201
3207
|
const l = [];
|
|
3202
3208
|
for (const p of a.messages)
|
|
3203
|
-
for (const
|
|
3209
|
+
for (const w of this.itemsOf(p)) l.push(w);
|
|
3204
3210
|
a.items = l;
|
|
3205
3211
|
}
|
|
3206
3212
|
const t = [];
|
|
@@ -3281,11 +3287,11 @@ const dr = {
|
|
|
3281
3287
|
return `g-${n}`;
|
|
3282
3288
|
},
|
|
3283
3289
|
isAtBottom(e) {
|
|
3284
|
-
return e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
3290
|
+
return e.scrollHeight - e.scrollTop - e.clientHeight <= dr;
|
|
3285
3291
|
},
|
|
3286
3292
|
onScroll() {
|
|
3287
3293
|
const e = this.$refs.scrollEl;
|
|
3288
|
-
e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <=
|
|
3294
|
+
e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <= ur && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
3289
3295
|
},
|
|
3290
3296
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3291
3297
|
//
|
|
@@ -3338,8 +3344,8 @@ const dr = {
|
|
|
3338
3344
|
const s = () => {
|
|
3339
3345
|
const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
|
|
3340
3346
|
if (!l) return;
|
|
3341
|
-
const
|
|
3342
|
-
Math.abs(
|
|
3347
|
+
const w = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
|
|
3348
|
+
Math.abs(w) > 0.5 && (e.scrollTop += w);
|
|
3343
3349
|
};
|
|
3344
3350
|
s(), requestAnimationFrame(() => {
|
|
3345
3351
|
s(), requestAnimationFrame(s);
|
|
@@ -3486,9 +3492,9 @@ const dr = {
|
|
|
3486
3492
|
// doit garder son arrondi.
|
|
3487
3493
|
cornersFor(e, t) {
|
|
3488
3494
|
var Z, ee, te;
|
|
3489
|
-
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4,
|
|
3495
|
+
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, w = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], R = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = ($, ne, G) => $ != null && x != null ? $ + q >= x : ne === G || ne === "card" && G === "bubble";
|
|
3490
3496
|
let j = l, F = l, z = l, W = l;
|
|
3491
|
-
return a ? (
|
|
3497
|
+
return a ? (w && (F = p), (k || !s) && (z = p), w && M(R, w, i == null ? void 0 : i.top) && (j = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (w && (j = p), (k || !s) && (W = p), w && M(R, w, i == null ? void 0 : i.top) && (F = p), k && M(A, k, i == null ? void 0 : i.bottom) && (z = p)), { tl: j, tr: F, br: z, bl: W };
|
|
3492
3498
|
},
|
|
3493
3499
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3494
3500
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3601,7 +3607,7 @@ const dr = {
|
|
|
3601
3607
|
},
|
|
3602
3608
|
systemLabel(e) {
|
|
3603
3609
|
var r, s, a;
|
|
3604
|
-
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n =
|
|
3610
|
+
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = cr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
|
|
3605
3611
|
return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
3606
3612
|
},
|
|
3607
3613
|
scrollToBottom() {
|
|
@@ -3609,73 +3615,73 @@ const dr = {
|
|
|
3609
3615
|
e && (e.scrollTop = e.scrollHeight);
|
|
3610
3616
|
}
|
|
3611
3617
|
}
|
|
3612
|
-
},
|
|
3618
|
+
}, mr = {
|
|
3613
3619
|
key: 0,
|
|
3614
3620
|
class: "wm-list__loadMore",
|
|
3615
3621
|
role: "status",
|
|
3616
3622
|
"aria-live": "polite"
|
|
3617
|
-
},
|
|
3623
|
+
}, fr = { class: "wm-list__loadMore-lbl" }, gr = {
|
|
3618
3624
|
key: 1,
|
|
3619
3625
|
class: "wm-list__historyEnd"
|
|
3620
|
-
},
|
|
3626
|
+
}, _r = {
|
|
3621
3627
|
key: 2,
|
|
3622
3628
|
class: "wm-list__sep"
|
|
3623
|
-
},
|
|
3629
|
+
}, pr = { class: "wm-list__sep-label" }, vr = {
|
|
3624
3630
|
key: 0,
|
|
3625
3631
|
class: "wm-list__sep wm-list__sep--unread"
|
|
3626
|
-
},
|
|
3632
|
+
}, yr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, wr = {
|
|
3627
3633
|
key: 0,
|
|
3628
3634
|
class: "wm-list__sysep"
|
|
3629
|
-
},
|
|
3635
|
+
}, br = { class: "wm-list__sysep-label" }, kr = ["data-row-key"], Cr = {
|
|
3630
3636
|
key: 0,
|
|
3631
3637
|
class: "wm-list__avatarSlot"
|
|
3632
|
-
},
|
|
3638
|
+
}, Ar = {
|
|
3633
3639
|
key: 5,
|
|
3634
3640
|
class: "wm-list__body"
|
|
3635
|
-
},
|
|
3641
|
+
}, Sr = { key: 0 }, Mr = {
|
|
3636
3642
|
key: 1,
|
|
3637
3643
|
"aria-hidden": "true"
|
|
3638
|
-
},
|
|
3644
|
+
}, Tr = { key: 2 }, xr = {
|
|
3639
3645
|
key: 3,
|
|
3640
3646
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3641
|
-
},
|
|
3642
|
-
function
|
|
3643
|
-
const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"),
|
|
3647
|
+
}, Or = { class: "wm-list__avatarSlot" };
|
|
3648
|
+
function Lr(e, t, n, i, r, s) {
|
|
3649
|
+
const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), w = E("ArtifactRenderer"), k = E("Bubble"), x = E("AttachmentPreview"), R = E("Typing");
|
|
3644
3650
|
return c(), u("div", {
|
|
3645
3651
|
ref: "scrollEl",
|
|
3646
3652
|
class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
3647
3653
|
onScrollPassive: t[0] || (t[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
3648
3654
|
}, [
|
|
3649
|
-
n.loadingMore ? (c(), u("div",
|
|
3655
|
+
n.loadingMore ? (c(), u("div", mr, [
|
|
3650
3656
|
t[1] || (t[1] = o("span", {
|
|
3651
3657
|
class: "wm-list__loadMore-spinner",
|
|
3652
3658
|
"aria-hidden": "true"
|
|
3653
3659
|
}, null, -1)),
|
|
3654
|
-
o("span",
|
|
3655
|
-
])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) :
|
|
3656
|
-
n.dateLabel ? (c(), u("div",
|
|
3660
|
+
o("span", fr, v(s.t("messageList.loadingHistory")), 1)
|
|
3661
|
+
])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
3662
|
+
n.dateLabel ? (c(), u("div", _r, [
|
|
3657
3663
|
t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3658
|
-
o("span",
|
|
3664
|
+
o("span", pr, v(n.dateLabel), 1),
|
|
3659
3665
|
t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3660
|
-
])) :
|
|
3661
|
-
(c(!0), u(I, null,
|
|
3666
|
+
])) : b("", !0),
|
|
3667
|
+
(c(!0), u(I, null, P(s.groups, (A, q) => (c(), u(I, {
|
|
3662
3668
|
key: A.key
|
|
3663
3669
|
}, [
|
|
3664
|
-
A.key === s.unreadGroupKey ? (c(), u("div",
|
|
3670
|
+
A.key === s.unreadGroupKey ? (c(), u("div", vr, [
|
|
3665
3671
|
t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3666
|
-
o("span",
|
|
3672
|
+
o("span", yr, v(s.t("messageList.unread")), 1),
|
|
3667
3673
|
t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3668
|
-
])) :
|
|
3674
|
+
])) : b("", !0),
|
|
3669
3675
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3670
3676
|
key: 1,
|
|
3671
3677
|
class: O(["wm-list__group", "wm-list__group--" + A.role])
|
|
3672
3678
|
}, [
|
|
3673
|
-
A.role === "system" ? (c(), u("div",
|
|
3679
|
+
A.role === "system" ? (c(), u("div", wr, [
|
|
3674
3680
|
t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
3675
|
-
o("span",
|
|
3681
|
+
o("span", br, v(A.systemLabel), 1),
|
|
3676
3682
|
t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3677
3683
|
])) : (c(), u(I, { key: 1 }, [
|
|
3678
|
-
(c(!0), u(I, null,
|
|
3684
|
+
(c(!0), u(I, null, P(A.items, (M, j) => (c(), u("div", {
|
|
3679
3685
|
key: `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3680
3686
|
"data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3681
3687
|
class: O(["wm-list__row fade-up", [
|
|
@@ -3685,9 +3691,9 @@ function Ir(e, t, n, i, r, s) {
|
|
|
3685
3691
|
"is-failed": M.message._failed
|
|
3686
3692
|
}
|
|
3687
3693
|
]]),
|
|
3688
|
-
style:
|
|
3694
|
+
style: H(s.cornersStyle(A, j))
|
|
3689
3695
|
}, [
|
|
3690
|
-
A.role !== "user" ? (c(), u("div",
|
|
3696
|
+
A.role !== "user" ? (c(), u("div", Cr, [
|
|
3691
3697
|
j === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
|
|
3692
3698
|
A.role === "ai" ? (c(), N(a, {
|
|
3693
3699
|
key: 0,
|
|
@@ -3702,8 +3708,8 @@ function Ir(e, t, n, i, r, s) {
|
|
|
3702
3708
|
size: 26,
|
|
3703
3709
|
tail: !0
|
|
3704
3710
|
}, null, 8, ["name", "avatar-url"]))
|
|
3705
|
-
], 64)) :
|
|
3706
|
-
])) :
|
|
3711
|
+
], 64)) : b("", !0)
|
|
3712
|
+
])) : b("", !0),
|
|
3707
3713
|
M.renderAs === "action" ? (c(), N(p, {
|
|
3708
3714
|
key: 1,
|
|
3709
3715
|
state: M.message.payload.state,
|
|
@@ -3714,46 +3720,46 @@ function Ir(e, t, n, i, r, s) {
|
|
|
3714
3720
|
state: "awaiting",
|
|
3715
3721
|
label: s.t("messageList.approvalRequestSent"),
|
|
3716
3722
|
detail: M.message.text_md || ""
|
|
3717
|
-
}, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), N(
|
|
3723
|
+
}, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), N(w, {
|
|
3718
3724
|
key: 3,
|
|
3719
3725
|
artifact: s.actionArtifact(M.message)
|
|
3720
|
-
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), N(
|
|
3726
|
+
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), N(w, {
|
|
3721
3727
|
key: 4,
|
|
3722
3728
|
artifact: s.artifactOf(M.message)
|
|
3723
|
-
}, null, 8, ["artifact"])) : (c(), u("div",
|
|
3729
|
+
}, null, 8, ["artifact"])) : (c(), u("div", Ar, [
|
|
3724
3730
|
M.message.text_md ? (c(), N(k, {
|
|
3725
3731
|
key: 0,
|
|
3726
3732
|
role: A.role,
|
|
3727
3733
|
text: M.message.text_md
|
|
3728
|
-
}, null, 8, ["role", "text"])) :
|
|
3734
|
+
}, null, 8, ["role", "text"])) : b("", !0),
|
|
3729
3735
|
s.attachmentsOf(M.message).length ? (c(), u("div", {
|
|
3730
3736
|
key: 1,
|
|
3731
3737
|
class: O(["wm-list__atts", {
|
|
3732
3738
|
"wm-list__atts--align-end": A.role === "user"
|
|
3733
3739
|
}])
|
|
3734
3740
|
}, [
|
|
3735
|
-
(c(!0), u(I, null,
|
|
3741
|
+
(c(!0), u(I, null, P(s.attachmentsOf(
|
|
3736
3742
|
M.message
|
|
3737
3743
|
), (F, z) => (c(), N(x, {
|
|
3738
3744
|
key: `${s.messageKey(M.message)}-att-${z}`,
|
|
3739
3745
|
attachment: F
|
|
3740
3746
|
}, null, 8, ["attachment"]))), 128))
|
|
3741
|
-
], 2)) :
|
|
3747
|
+
], 2)) : b("", !0)
|
|
3742
3748
|
]))
|
|
3743
|
-
], 14,
|
|
3749
|
+
], 14, kr))), 128)),
|
|
3744
3750
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3745
3751
|
key: 0,
|
|
3746
3752
|
class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3747
3753
|
}, [
|
|
3748
|
-
A.role !== "user" ? (c(), u("span",
|
|
3749
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span",
|
|
3750
|
-
s.lastTimeOf(A) ? (c(), u("span",
|
|
3751
|
-
], 2)) :
|
|
3754
|
+
A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
3755
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : b("", !0),
|
|
3756
|
+
s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : b("", !0)
|
|
3757
|
+
], 2)) : b("", !0)
|
|
3752
3758
|
], 64))
|
|
3753
|
-
], 2)) :
|
|
3759
|
+
], 2)) : b("", !0)
|
|
3754
3760
|
], 64))), 128)),
|
|
3755
|
-
n.streamingActive ? (c(), u("div",
|
|
3756
|
-
o("div",
|
|
3761
|
+
n.streamingActive ? (c(), u("div", xr, [
|
|
3762
|
+
o("div", Or, [
|
|
3757
3763
|
V(a, {
|
|
3758
3764
|
size: 26,
|
|
3759
3765
|
tail: !0,
|
|
@@ -3762,11 +3768,11 @@ function Ir(e, t, n, i, r, s) {
|
|
|
3762
3768
|
}, null, 8, ["name", "image-url"])
|
|
3763
3769
|
]),
|
|
3764
3770
|
V(R)
|
|
3765
|
-
])) :
|
|
3771
|
+
])) : b("", !0)
|
|
3766
3772
|
], 34);
|
|
3767
3773
|
}
|
|
3768
|
-
const
|
|
3769
|
-
function
|
|
3774
|
+
const Ir = /* @__PURE__ */ B(hr, [["render", Lr], ["__scopeId", "data-v-d769b193"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3775
|
+
function Er() {
|
|
3770
3776
|
return be && [
|
|
3771
3777
|
"video/webm;codecs=vp9,opus",
|
|
3772
3778
|
"video/webm;codecs=vp8,opus",
|
|
@@ -3786,10 +3792,10 @@ function Be({ audio: e }) {
|
|
|
3786
3792
|
systemAudio: e ? "include" : "exclude"
|
|
3787
3793
|
};
|
|
3788
3794
|
}
|
|
3789
|
-
function
|
|
3795
|
+
function za(e) {
|
|
3790
3796
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
3791
3797
|
}
|
|
3792
|
-
async function
|
|
3798
|
+
async function Rr() {
|
|
3793
3799
|
if (!he) return null;
|
|
3794
3800
|
let e;
|
|
3795
3801
|
try {
|
|
@@ -3800,7 +3806,7 @@ async function Br() {
|
|
|
3800
3806
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
3801
3807
|
}
|
|
3802
3808
|
try {
|
|
3803
|
-
return await
|
|
3809
|
+
return await Br(e);
|
|
3804
3810
|
} catch (t) {
|
|
3805
3811
|
return console.error("[media] screenshot capture", t), null;
|
|
3806
3812
|
} finally {
|
|
@@ -3809,21 +3815,21 @@ async function Br() {
|
|
|
3809
3815
|
});
|
|
3810
3816
|
}
|
|
3811
3817
|
}
|
|
3812
|
-
async function
|
|
3818
|
+
async function Br(e) {
|
|
3813
3819
|
const t = document.createElement("video");
|
|
3814
3820
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
3815
3821
|
const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
|
|
3816
3822
|
r.width = n, r.height = i, r.getContext("2d").drawImage(t, 0, 0, n, i);
|
|
3817
3823
|
const s = await new Promise((l, p) => {
|
|
3818
3824
|
r.toBlob(
|
|
3819
|
-
(
|
|
3825
|
+
(w) => w ? l(w) : p(new Error("toBlob failed")),
|
|
3820
3826
|
"image/png"
|
|
3821
3827
|
);
|
|
3822
3828
|
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
3823
3829
|
return new File([s], `capture-${a}.png`, { type: "image/png" });
|
|
3824
3830
|
}
|
|
3825
|
-
async function
|
|
3826
|
-
var
|
|
3831
|
+
async function Nr(e = {}) {
|
|
3832
|
+
var w;
|
|
3827
3833
|
if (!he || !be) return null;
|
|
3828
3834
|
let t;
|
|
3829
3835
|
try {
|
|
@@ -3833,7 +3839,7 @@ async function Fr(e = {}) {
|
|
|
3833
3839
|
} catch (k) {
|
|
3834
3840
|
return (k == null ? void 0 : k.name) !== "NotAllowedError" && console.error("[media] record picker", k), null;
|
|
3835
3841
|
}
|
|
3836
|
-
const n =
|
|
3842
|
+
const n = Er();
|
|
3837
3843
|
let i;
|
|
3838
3844
|
try {
|
|
3839
3845
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
@@ -3851,7 +3857,7 @@ async function Fr(e = {}) {
|
|
|
3851
3857
|
if (s && clearInterval(s), t.getTracks().forEach((R) => {
|
|
3852
3858
|
R.stop();
|
|
3853
3859
|
}), r.length) {
|
|
3854
|
-
const R = i.mimeType || n || "video/webm", A = new Blob(r, { type: R }),
|
|
3860
|
+
const R = i.mimeType || n || "video/webm", A = new Blob(r, { type: R }), q = /mp4/.test(R) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${M}.${q}`, {
|
|
3855
3861
|
type: R
|
|
3856
3862
|
});
|
|
3857
3863
|
(k = e.onfinalize) == null || k.call(e, j);
|
|
@@ -3875,7 +3881,7 @@ async function Fr(e = {}) {
|
|
|
3875
3881
|
x.stop();
|
|
3876
3882
|
}), null;
|
|
3877
3883
|
}
|
|
3878
|
-
(
|
|
3884
|
+
(w = e.onstart) == null || w.call(e);
|
|
3879
3885
|
const p = Date.now();
|
|
3880
3886
|
return s = setInterval(() => {
|
|
3881
3887
|
var k;
|
|
@@ -3887,7 +3893,7 @@ async function Fr(e = {}) {
|
|
|
3887
3893
|
}
|
|
3888
3894
|
};
|
|
3889
3895
|
}
|
|
3890
|
-
const
|
|
3896
|
+
const Fr = [
|
|
3891
3897
|
{
|
|
3892
3898
|
action: "file",
|
|
3893
3899
|
labelKey: "composer.attachFile",
|
|
@@ -3908,7 +3914,7 @@ const Ur = [
|
|
|
3908
3914
|
inject: {
|
|
3909
3915
|
// Translator shared by the Messenger shell; French fallback when
|
|
3910
3916
|
// the component is used standalone.
|
|
3911
|
-
t: { default: () =>
|
|
3917
|
+
t: { default: () => U() }
|
|
3912
3918
|
},
|
|
3913
3919
|
props: {
|
|
3914
3920
|
modelValue: { type: String, default: "" },
|
|
@@ -3931,7 +3937,7 @@ const Ur = [
|
|
|
3931
3937
|
return !this.disabled && !!this.local.trim();
|
|
3932
3938
|
},
|
|
3933
3939
|
attachItems() {
|
|
3934
|
-
return
|
|
3940
|
+
return Fr.map((e) => ({
|
|
3935
3941
|
...e,
|
|
3936
3942
|
label: this.t(e.labelKey),
|
|
3937
3943
|
disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !be)
|
|
@@ -4004,13 +4010,13 @@ const Ur = [
|
|
|
4004
4010
|
},
|
|
4005
4011
|
async captureScreenshot() {
|
|
4006
4012
|
if (this.disabled) return;
|
|
4007
|
-
const e = await
|
|
4013
|
+
const e = await Rr();
|
|
4008
4014
|
e && this.$emit("attach", e);
|
|
4009
4015
|
},
|
|
4010
4016
|
async startRecording() {
|
|
4011
4017
|
if (this.recording || this.disabled) return;
|
|
4012
4018
|
this.recordingElapsed = 0;
|
|
4013
|
-
const e = await
|
|
4019
|
+
const e = await Nr({
|
|
4014
4020
|
onstart: () => {
|
|
4015
4021
|
this.recording = !0;
|
|
4016
4022
|
},
|
|
@@ -4035,33 +4041,33 @@ const Ur = [
|
|
|
4035
4041
|
}
|
|
4036
4042
|
}
|
|
4037
4043
|
}
|
|
4038
|
-
},
|
|
4044
|
+
}, Ur = { class: "wm-compose-wrap" }, jr = {
|
|
4039
4045
|
key: 0,
|
|
4040
4046
|
class: "wm-rec"
|
|
4041
|
-
},
|
|
4047
|
+
}, Dr = { class: "wm-rec__lbl" }, zr = {
|
|
4042
4048
|
key: 1,
|
|
4043
4049
|
class: "wm-compose__menu",
|
|
4044
4050
|
role: "menu"
|
|
4045
|
-
}, Hr = ["disabled", "onClick"],
|
|
4051
|
+
}, Hr = ["disabled", "onClick"], qr = { class: "wm-compose__menuIcon" }, $r = {
|
|
4046
4052
|
viewBox: "0 0 24 24",
|
|
4047
4053
|
width: "14",
|
|
4048
4054
|
height: "14",
|
|
4049
4055
|
"aria-hidden": "true"
|
|
4050
|
-
},
|
|
4051
|
-
function
|
|
4052
|
-
return c(), u("div",
|
|
4053
|
-
r.recording ? (c(), u("div",
|
|
4056
|
+
}, Vr = ["d"], Kr = ["placeholder", "disabled"], Wr = { class: "wm-compose__actions" }, Gr = ["title", "aria-label", "disabled"], Yr = ["disabled", "aria-label"];
|
|
4057
|
+
function Jr(e, t, n, i, r, s) {
|
|
4058
|
+
return c(), u("div", Ur, [
|
|
4059
|
+
r.recording ? (c(), u("div", jr, [
|
|
4054
4060
|
t[8] || (t[8] = o("span", {
|
|
4055
4061
|
class: "wm-rec__dot",
|
|
4056
4062
|
"aria-hidden": "true"
|
|
4057
4063
|
}, null, -1)),
|
|
4058
|
-
o("span",
|
|
4064
|
+
o("span", Dr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
|
|
4059
4065
|
o("button", {
|
|
4060
4066
|
type: "button",
|
|
4061
4067
|
class: "wm-rec__stop",
|
|
4062
4068
|
onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
|
|
4063
4069
|
}, v(s.t("composer.stop")), 1)
|
|
4064
|
-
])) :
|
|
4070
|
+
])) : b("", !0),
|
|
4065
4071
|
o("form", {
|
|
4066
4072
|
class: O(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
4067
4073
|
onSubmit: t[7] || (t[7] = Y((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
|
|
@@ -4077,17 +4083,17 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4077
4083
|
key: 0,
|
|
4078
4084
|
class: "wm-compose__overlay",
|
|
4079
4085
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
4080
|
-
})) :
|
|
4081
|
-
r.attachOpen ? (c(), u("div",
|
|
4082
|
-
(c(!0), u(I, null,
|
|
4086
|
+
})) : b("", !0),
|
|
4087
|
+
r.attachOpen ? (c(), u("div", zr, [
|
|
4088
|
+
(c(!0), u(I, null, P(s.attachItems, (a) => (c(), u("button", {
|
|
4083
4089
|
key: a.action,
|
|
4084
4090
|
type: "button",
|
|
4085
4091
|
class: "wm-compose__menuItem",
|
|
4086
4092
|
disabled: a.disabled,
|
|
4087
4093
|
onClick: (l) => s.onAttachAction(a.action)
|
|
4088
4094
|
}, [
|
|
4089
|
-
o("span",
|
|
4090
|
-
(c(), u("svg",
|
|
4095
|
+
o("span", qr, [
|
|
4096
|
+
(c(), u("svg", $r, [
|
|
4091
4097
|
o("path", {
|
|
4092
4098
|
d: a.path,
|
|
4093
4099
|
stroke: "currentColor",
|
|
@@ -4095,12 +4101,12 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4095
4101
|
"stroke-linecap": "round",
|
|
4096
4102
|
"stroke-linejoin": "round",
|
|
4097
4103
|
fill: "none"
|
|
4098
|
-
}, null, 8,
|
|
4104
|
+
}, null, 8, Vr)
|
|
4099
4105
|
]))
|
|
4100
4106
|
]),
|
|
4101
4107
|
o("span", null, v(a.label), 1)
|
|
4102
4108
|
], 8, Hr))), 128))
|
|
4103
|
-
])) :
|
|
4109
|
+
])) : b("", !0),
|
|
4104
4110
|
K(o("textarea", {
|
|
4105
4111
|
ref: "inputEl",
|
|
4106
4112
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
|
|
@@ -4110,10 +4116,10 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4110
4116
|
disabled: n.disabled,
|
|
4111
4117
|
onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
|
|
4112
4118
|
onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
|
|
4113
|
-
}, null, 40,
|
|
4119
|
+
}, null, 40, Kr), [
|
|
4114
4120
|
[X, r.local]
|
|
4115
4121
|
]),
|
|
4116
|
-
o("div",
|
|
4122
|
+
o("div", Wr, [
|
|
4117
4123
|
o("button", {
|
|
4118
4124
|
type: "button",
|
|
4119
4125
|
class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -4135,7 +4141,7 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4135
4141
|
}, [
|
|
4136
4142
|
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" })
|
|
4137
4143
|
], -1)
|
|
4138
|
-
])], 10,
|
|
4144
|
+
])], 10, Gr),
|
|
4139
4145
|
o("button", {
|
|
4140
4146
|
type: "submit",
|
|
4141
4147
|
class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -4155,12 +4161,12 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4155
4161
|
}, [
|
|
4156
4162
|
o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4157
4163
|
], -1)
|
|
4158
|
-
])], 10,
|
|
4164
|
+
])], 10, Yr)
|
|
4159
4165
|
])
|
|
4160
4166
|
], 34)
|
|
4161
4167
|
]);
|
|
4162
4168
|
}
|
|
4163
|
-
const
|
|
4169
|
+
const Qr = /* @__PURE__ */ B(Pr, [["render", Jr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
|
|
4164
4170
|
name: "WmSuggestionChips",
|
|
4165
4171
|
props: {
|
|
4166
4172
|
items: { type: Array, default: () => [] },
|
|
@@ -4177,28 +4183,28 @@ const Xr = /* @__PURE__ */ B(Pr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8
|
|
|
4177
4183
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4178
4184
|
}
|
|
4179
4185
|
}
|
|
4180
|
-
},
|
|
4181
|
-
function
|
|
4186
|
+
}, Zr = ["onClick"];
|
|
4187
|
+
function ei(e, t, n, i, r, s) {
|
|
4182
4188
|
return n.items.length ? (c(), u("div", {
|
|
4183
4189
|
key: s.batchKey,
|
|
4184
4190
|
class: "wm-chips"
|
|
4185
4191
|
}, [
|
|
4186
|
-
(c(!0), u(I, null,
|
|
4192
|
+
(c(!0), u(I, null, P(n.items, (a, l) => (c(), u("button", {
|
|
4187
4193
|
key: l,
|
|
4188
4194
|
type: "button",
|
|
4189
4195
|
class: "wm-chip",
|
|
4190
|
-
style:
|
|
4196
|
+
style: H({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4191
4197
|
onClick: (p) => e.$emit("select", a)
|
|
4192
|
-
}, v(a.label), 13,
|
|
4193
|
-
])) :
|
|
4198
|
+
}, v(a.label), 13, Zr))), 128))
|
|
4199
|
+
])) : b("", !0);
|
|
4194
4200
|
}
|
|
4195
|
-
const
|
|
4201
|
+
const ti = /* @__PURE__ */ B(Xr, [["render", ei], ["__scopeId", "data-v-47ad8085"]]), ni = {
|
|
4196
4202
|
name: "WmApprovalCard",
|
|
4197
4203
|
components: { AIAvatar: le },
|
|
4198
4204
|
inject: {
|
|
4199
4205
|
// Translator shared by the Messenger shell; French fallback when
|
|
4200
4206
|
// the component is used standalone.
|
|
4201
|
-
t: { default: () =>
|
|
4207
|
+
t: { default: () => U() }
|
|
4202
4208
|
},
|
|
4203
4209
|
props: {
|
|
4204
4210
|
action: { type: String, required: !0 },
|
|
@@ -4236,45 +4242,45 @@ const ni = /* @__PURE__ */ B(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085
|
|
|
4236
4242
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4237
4243
|
}
|
|
4238
4244
|
}
|
|
4239
|
-
},
|
|
4245
|
+
}, si = { class: "wm-approval" }, ri = { class: "wm-approval__head" }, ii = { class: "wm-approval__icon" }, ai = { class: "wm-approval__main" }, oi = { class: "wm-approval__title" }, li = {
|
|
4240
4246
|
key: 0,
|
|
4241
4247
|
class: "wm-approval__detail"
|
|
4242
|
-
},
|
|
4243
|
-
function
|
|
4248
|
+
}, ci = { class: "wm-approval__actions" };
|
|
4249
|
+
function di(e, t, n, i, r, s) {
|
|
4244
4250
|
const a = E("AIAvatar");
|
|
4245
|
-
return c(), u("div",
|
|
4246
|
-
o("div",
|
|
4247
|
-
o("div",
|
|
4251
|
+
return c(), u("div", si, [
|
|
4252
|
+
o("div", ri, [
|
|
4253
|
+
o("div", ii, [
|
|
4248
4254
|
V(a, {
|
|
4249
4255
|
size: 24,
|
|
4250
4256
|
name: n.agentName,
|
|
4251
4257
|
"image-url": n.agentAvatarUrl
|
|
4252
4258
|
}, null, 8, ["name", "image-url"])
|
|
4253
4259
|
]),
|
|
4254
|
-
o("div",
|
|
4255
|
-
o("div",
|
|
4256
|
-
n.detail ? (c(), u("div",
|
|
4260
|
+
o("div", ai, [
|
|
4261
|
+
o("div", oi, v(n.action), 1),
|
|
4262
|
+
n.detail ? (c(), u("div", li, v(n.detail), 1)) : b("", !0)
|
|
4257
4263
|
])
|
|
4258
4264
|
]),
|
|
4259
|
-
o("div",
|
|
4265
|
+
o("div", ci, [
|
|
4260
4266
|
s.rejectId ? (c(), u("button", {
|
|
4261
4267
|
key: 0,
|
|
4262
4268
|
type: "button",
|
|
4263
4269
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4264
4270
|
onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
|
|
4265
|
-
}, v(s.rejectLabel), 1)) :
|
|
4271
|
+
}, v(s.rejectLabel), 1)) : b("", !0),
|
|
4266
4272
|
s.approveId ? (c(), u("button", {
|
|
4267
4273
|
key: 1,
|
|
4268
4274
|
type: "button",
|
|
4269
4275
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4270
4276
|
onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
|
|
4271
|
-
}, v(s.approveLabel), 1)) :
|
|
4277
|
+
}, v(s.approveLabel), 1)) : b("", !0)
|
|
4272
4278
|
])
|
|
4273
4279
|
]);
|
|
4274
4280
|
}
|
|
4275
|
-
const
|
|
4281
|
+
const ui = /* @__PURE__ */ B(ni, [["render", di], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4276
4282
|
let xe = 0;
|
|
4277
|
-
const
|
|
4283
|
+
const hi = /* @__PURE__ */ new Set([
|
|
4278
4284
|
"text",
|
|
4279
4285
|
"textarea",
|
|
4280
4286
|
"number",
|
|
@@ -4282,13 +4288,13 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
4282
4288
|
"select",
|
|
4283
4289
|
"multiselect",
|
|
4284
4290
|
"date"
|
|
4285
|
-
]),
|
|
4291
|
+
]), mi = {
|
|
4286
4292
|
name: "WmFormCard",
|
|
4287
4293
|
components: { AIAvatar: le },
|
|
4288
4294
|
inject: {
|
|
4289
4295
|
// Translator shared by the Messenger shell; French fallback when
|
|
4290
4296
|
// the component is used standalone.
|
|
4291
|
-
t: { default: () =>
|
|
4297
|
+
t: { default: () => U() }
|
|
4292
4298
|
},
|
|
4293
4299
|
props: {
|
|
4294
4300
|
form: { type: Object, required: !0 },
|
|
@@ -4312,7 +4318,7 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
4312
4318
|
// douteux.
|
|
4313
4319
|
normalizedFields() {
|
|
4314
4320
|
var t;
|
|
4315
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4321
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !hi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
4316
4322
|
}
|
|
4317
4323
|
},
|
|
4318
4324
|
created() {
|
|
@@ -4365,54 +4371,54 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
4365
4371
|
}
|
|
4366
4372
|
}
|
|
4367
4373
|
}
|
|
4368
|
-
},
|
|
4374
|
+
}, fi = { class: "wm-form" }, gi = { class: "wm-form__head" }, _i = { class: "wm-form__icon" }, pi = { class: "wm-form__main" }, vi = { class: "wm-form__title" }, yi = {
|
|
4369
4375
|
key: 0,
|
|
4370
4376
|
class: "wm-form__detail"
|
|
4371
|
-
},
|
|
4377
|
+
}, wi = ["for"], bi = {
|
|
4372
4378
|
key: 0,
|
|
4373
4379
|
class: "wm-form__req",
|
|
4374
4380
|
"aria-hidden": "true"
|
|
4375
|
-
},
|
|
4381
|
+
}, ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Si = ["id", "onUpdate:modelValue", "required", "disabled"], Mi = {
|
|
4376
4382
|
key: 4,
|
|
4377
4383
|
class: "wm-form__bool"
|
|
4378
|
-
},
|
|
4384
|
+
}, Ti = ["id", "onUpdate:modelValue", "disabled"], xi = ["id", "onUpdate:modelValue", "required", "disabled"], Oi = {
|
|
4379
4385
|
value: "",
|
|
4380
4386
|
disabled: ""
|
|
4381
|
-
},
|
|
4387
|
+
}, Li = ["value"], Ii = {
|
|
4382
4388
|
key: 6,
|
|
4383
4389
|
class: "wm-form__multi"
|
|
4384
|
-
},
|
|
4390
|
+
}, Ei = ["value", "checked", "disabled", "onChange"], Ri = {
|
|
4385
4391
|
key: 0,
|
|
4386
4392
|
class: "wm-form__err"
|
|
4387
|
-
},
|
|
4393
|
+
}, Bi = ["disabled"], Ni = {
|
|
4388
4394
|
key: 0,
|
|
4389
4395
|
class: "wm-form__spinner",
|
|
4390
4396
|
"aria-hidden": "true"
|
|
4391
|
-
},
|
|
4397
|
+
}, Fi = {
|
|
4392
4398
|
key: 2,
|
|
4393
4399
|
class: "wm-form__doneLbl"
|
|
4394
4400
|
};
|
|
4395
4401
|
function Pi(e, t, n, i, r, s) {
|
|
4396
4402
|
const a = E("AIAvatar");
|
|
4397
|
-
return c(), u("div",
|
|
4403
|
+
return c(), u("div", fi, [
|
|
4398
4404
|
o("div", gi, [
|
|
4399
|
-
o("div",
|
|
4405
|
+
o("div", _i, [
|
|
4400
4406
|
V(a, {
|
|
4401
4407
|
size: 24,
|
|
4402
4408
|
name: n.agentName,
|
|
4403
4409
|
"image-url": n.agentAvatarUrl
|
|
4404
4410
|
}, null, 8, ["name", "image-url"])
|
|
4405
4411
|
]),
|
|
4406
|
-
o("div",
|
|
4407
|
-
o("div",
|
|
4408
|
-
n.form.description ? (c(), u("div",
|
|
4412
|
+
o("div", pi, [
|
|
4413
|
+
o("div", vi, v(n.form.title || s.t("form.title")), 1),
|
|
4414
|
+
n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : b("", !0)
|
|
4409
4415
|
])
|
|
4410
4416
|
]),
|
|
4411
4417
|
o("form", {
|
|
4412
4418
|
class: "wm-form__body",
|
|
4413
4419
|
onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4414
4420
|
}, [
|
|
4415
|
-
(c(!0), u(I, null,
|
|
4421
|
+
(c(!0), u(I, null, P(s.normalizedFields, (l) => (c(), u("div", {
|
|
4416
4422
|
key: l.key,
|
|
4417
4423
|
class: "wm-form__field"
|
|
4418
4424
|
}, [
|
|
@@ -4421,8 +4427,8 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4421
4427
|
class: "wm-form__label"
|
|
4422
4428
|
}, [
|
|
4423
4429
|
pe(v(l.label), 1),
|
|
4424
|
-
l.required ? (c(), u("span",
|
|
4425
|
-
], 8,
|
|
4430
|
+
l.required ? (c(), u("span", bi, "*")) : b("", !0)
|
|
4431
|
+
], 8, wi),
|
|
4426
4432
|
l.type === "text" ? K((c(), u("input", {
|
|
4427
4433
|
key: 0,
|
|
4428
4434
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4432,7 +4438,7 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4432
4438
|
placeholder: l.placeholder || "",
|
|
4433
4439
|
required: l.required,
|
|
4434
4440
|
disabled: n.readOnly || r.busy
|
|
4435
|
-
}, null, 8,
|
|
4441
|
+
}, null, 8, ki)), [
|
|
4436
4442
|
[X, r.values[l.key]]
|
|
4437
4443
|
]) : l.type === "textarea" ? K((c(), u("textarea", {
|
|
4438
4444
|
key: 1,
|
|
@@ -4443,7 +4449,7 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4443
4449
|
placeholder: l.placeholder || "",
|
|
4444
4450
|
required: l.required,
|
|
4445
4451
|
disabled: n.readOnly || r.busy
|
|
4446
|
-
}, null, 8,
|
|
4452
|
+
}, null, 8, Ci)), [
|
|
4447
4453
|
[X, r.values[l.key]]
|
|
4448
4454
|
]) : l.type === "number" ? K((c(), u("input", {
|
|
4449
4455
|
key: 2,
|
|
@@ -4454,7 +4460,7 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4454
4460
|
placeholder: l.placeholder || "",
|
|
4455
4461
|
required: l.required,
|
|
4456
4462
|
disabled: n.readOnly || r.busy
|
|
4457
|
-
}, null, 8,
|
|
4463
|
+
}, null, 8, Ai)), [
|
|
4458
4464
|
[
|
|
4459
4465
|
X,
|
|
4460
4466
|
r.values[l.key],
|
|
@@ -4469,15 +4475,15 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4469
4475
|
class: "wm-form__input",
|
|
4470
4476
|
required: l.required,
|
|
4471
4477
|
disabled: n.readOnly || r.busy
|
|
4472
|
-
}, null, 8,
|
|
4478
|
+
}, null, 8, Si)), [
|
|
4473
4479
|
[X, r.values[l.key]]
|
|
4474
|
-
]) : l.type === "boolean" ? (c(), u("label",
|
|
4480
|
+
]) : l.type === "boolean" ? (c(), u("label", Mi, [
|
|
4475
4481
|
K(o("input", {
|
|
4476
4482
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4477
4483
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4478
4484
|
type: "checkbox",
|
|
4479
4485
|
disabled: n.readOnly || r.busy
|
|
4480
|
-
}, null, 8,
|
|
4486
|
+
}, null, 8, Ti), [
|
|
4481
4487
|
[ze, r.values[l.key]]
|
|
4482
4488
|
]),
|
|
4483
4489
|
o("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
@@ -4489,15 +4495,15 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4489
4495
|
required: l.required,
|
|
4490
4496
|
disabled: n.readOnly || r.busy
|
|
4491
4497
|
}, [
|
|
4492
|
-
o("option",
|
|
4493
|
-
(c(!0), u(I, null,
|
|
4498
|
+
o("option", Oi, v(l.placeholder || s.t("form.choose")), 1),
|
|
4499
|
+
(c(!0), u(I, null, P(l.options, (p) => (c(), u("option", {
|
|
4494
4500
|
key: p.value,
|
|
4495
4501
|
value: p.value
|
|
4496
|
-
}, v(p.label), 9,
|
|
4497
|
-
], 8,
|
|
4498
|
-
[
|
|
4499
|
-
]) : l.type === "multiselect" ? (c(), u("div",
|
|
4500
|
-
(c(!0), u(I, null,
|
|
4502
|
+
}, v(p.label), 9, Li))), 128))
|
|
4503
|
+
], 8, xi)), [
|
|
4504
|
+
[He, r.values[l.key]]
|
|
4505
|
+
]) : l.type === "multiselect" ? (c(), u("div", Ii, [
|
|
4506
|
+
(c(!0), u(I, null, P(l.options, (p) => (c(), u("label", {
|
|
4501
4507
|
key: p.value,
|
|
4502
4508
|
class: "wm-form__multiItem"
|
|
4503
4509
|
}, [
|
|
@@ -4506,35 +4512,35 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4506
4512
|
value: p.value,
|
|
4507
4513
|
checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
|
|
4508
4514
|
disabled: n.readOnly || r.busy,
|
|
4509
|
-
onChange: (
|
|
4515
|
+
onChange: (w) => s.toggleMulti(
|
|
4510
4516
|
l.key,
|
|
4511
4517
|
p.value,
|
|
4512
|
-
|
|
4518
|
+
w.target.checked
|
|
4513
4519
|
)
|
|
4514
|
-
}, null, 40,
|
|
4520
|
+
}, null, 40, Ei),
|
|
4515
4521
|
o("span", null, v(p.label), 1)
|
|
4516
4522
|
]))), 128))
|
|
4517
|
-
])) :
|
|
4523
|
+
])) : b("", !0)
|
|
4518
4524
|
]))), 128)),
|
|
4519
|
-
r.error ? (c(), u("div",
|
|
4520
|
-
n.readOnly ? (c(), u("div",
|
|
4525
|
+
r.error ? (c(), u("div", Ri, v(r.error), 1)) : b("", !0),
|
|
4526
|
+
n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4521
4527
|
key: 1,
|
|
4522
4528
|
type: "submit",
|
|
4523
4529
|
class: "wm-form__submit",
|
|
4524
4530
|
disabled: r.busy
|
|
4525
4531
|
}, [
|
|
4526
|
-
r.busy ? (c(), u("span",
|
|
4532
|
+
r.busy ? (c(), u("span", Ni)) : b("", !0),
|
|
4527
4533
|
o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4528
|
-
], 8,
|
|
4534
|
+
], 8, Bi))
|
|
4529
4535
|
], 32)
|
|
4530
4536
|
]);
|
|
4531
4537
|
}
|
|
4532
|
-
const
|
|
4538
|
+
const Ui = /* @__PURE__ */ B(mi, [["render", Pi], ["__scopeId", "data-v-fe65cc56"]]), ji = {
|
|
4533
4539
|
name: "WmFeedback",
|
|
4534
4540
|
inject: {
|
|
4535
4541
|
// Translator shared by the Messenger shell; French fallback when
|
|
4536
4542
|
// the component is used standalone.
|
|
4537
|
-
t: { default: () =>
|
|
4543
|
+
t: { default: () => U() }
|
|
4538
4544
|
},
|
|
4539
4545
|
props: {
|
|
4540
4546
|
busy: { type: Boolean, default: !1 },
|
|
@@ -4563,13 +4569,13 @@ const ji = /* @__PURE__ */ B(fi, [["render", Pi], ["__scopeId", "data-v-fe65cc56
|
|
|
4563
4569
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4564
4570
|
}
|
|
4565
4571
|
}
|
|
4566
|
-
},
|
|
4572
|
+
}, Di = { class: "wm-fb" }, zi = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, qi = { class: "wm-fb__row" }, $i = ["onClick"], Vi = { class: "wm-fb__emoji" }, Ki = { class: "wm-fb__label" }, Wi = ["disabled"], Gi = {
|
|
4567
4573
|
key: 1,
|
|
4568
4574
|
class: "wm-fb__done"
|
|
4569
|
-
},
|
|
4570
|
-
function
|
|
4571
|
-
return c(), u("div",
|
|
4572
|
-
n.done ? (c(), u("div",
|
|
4575
|
+
}, Yi = { class: "wm-fb__doneTitle" }, Ji = { class: "wm-fb__doneSub" };
|
|
4576
|
+
function Qi(e, t, n, i, r, s) {
|
|
4577
|
+
return c(), u("div", Di, [
|
|
4578
|
+
n.done ? (c(), u("div", Gi, [
|
|
4573
4579
|
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4574
4580
|
o("svg", {
|
|
4575
4581
|
width: "16",
|
|
@@ -4585,37 +4591,37 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4585
4591
|
o("path", { d: "M20 6L9 17l-5-5" })
|
|
4586
4592
|
])
|
|
4587
4593
|
], -1)),
|
|
4588
|
-
o("div",
|
|
4589
|
-
o("div",
|
|
4594
|
+
o("div", Yi, v(s.t("feedback.doneTitle")), 1),
|
|
4595
|
+
o("div", Ji, v(s.t("feedback.doneSubtitle")), 1)
|
|
4590
4596
|
])) : (c(), u(I, { key: 0 }, [
|
|
4591
|
-
o("div",
|
|
4597
|
+
o("div", zi, v(s.t("feedback.question")), 1),
|
|
4592
4598
|
o("div", Hi, v(s.t("feedback.subtitle")), 1),
|
|
4593
|
-
o("div",
|
|
4594
|
-
(c(!0), u(I, null,
|
|
4599
|
+
o("div", qi, [
|
|
4600
|
+
(c(!0), u(I, null, P(s.options, (a) => (c(), u("button", {
|
|
4595
4601
|
key: a.v,
|
|
4596
4602
|
type: "button",
|
|
4597
4603
|
class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
4598
4604
|
onClick: (l) => r.sel = a.v
|
|
4599
4605
|
}, [
|
|
4600
|
-
o("span",
|
|
4601
|
-
o("span",
|
|
4602
|
-
], 10,
|
|
4606
|
+
o("span", Vi, v(a.e), 1),
|
|
4607
|
+
o("span", Ki, v(a.l), 1)
|
|
4608
|
+
], 10, $i))), 128))
|
|
4603
4609
|
]),
|
|
4604
4610
|
o("button", {
|
|
4605
4611
|
type: "button",
|
|
4606
4612
|
class: "wm-fb__send",
|
|
4607
4613
|
disabled: !r.sel || n.busy,
|
|
4608
4614
|
onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
|
|
4609
|
-
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9,
|
|
4615
|
+
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Wi)
|
|
4610
4616
|
], 64))
|
|
4611
4617
|
]);
|
|
4612
4618
|
}
|
|
4613
|
-
const
|
|
4619
|
+
const Xi = /* @__PURE__ */ B(ji, [["render", Qi], ["__scopeId", "data-v-9b630564"]]), Zi = {
|
|
4614
4620
|
name: "WmMoreMenu",
|
|
4615
4621
|
inject: {
|
|
4616
4622
|
// Translator shared by the Messenger shell; French fallback when
|
|
4617
4623
|
// the component is used standalone.
|
|
4618
|
-
t: { default: () =>
|
|
4624
|
+
t: { default: () => U() }
|
|
4619
4625
|
},
|
|
4620
4626
|
props: {
|
|
4621
4627
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -4653,24 +4659,24 @@ const Zi = /* @__PURE__ */ B(Di, [["render", Xi], ["__scopeId", "data-v-9b630564
|
|
|
4653
4659
|
this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
|
|
4654
4660
|
}
|
|
4655
4661
|
}
|
|
4656
|
-
},
|
|
4662
|
+
}, ea = { class: "wm-mm" }, ta = {
|
|
4657
4663
|
class: "wm-mm__pop",
|
|
4658
4664
|
role: "menu"
|
|
4659
|
-
},
|
|
4665
|
+
}, na = {
|
|
4660
4666
|
key: 0,
|
|
4661
4667
|
class: "wm-mm__section"
|
|
4662
|
-
},
|
|
4668
|
+
}, sa = { class: "wm-mm__label" }, ra = { class: "wm-mm__label" }, ia = {
|
|
4663
4669
|
key: 1,
|
|
4664
4670
|
class: "wm-mm__sep"
|
|
4665
|
-
},
|
|
4666
|
-
function
|
|
4667
|
-
return c(), u("div",
|
|
4671
|
+
}, aa = { class: "wm-mm__section" }, oa = { class: "wm-mm__label" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__section" }, da = { class: "wm-mm__label" }, ua = { class: "wm-mm__label" };
|
|
4672
|
+
function ha(e, t, n, i, r, s) {
|
|
4673
|
+
return c(), u("div", ea, [
|
|
4668
4674
|
o("div", {
|
|
4669
4675
|
class: "wm-mm__scrim",
|
|
4670
4676
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4671
4677
|
}),
|
|
4672
|
-
o("div",
|
|
4673
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4678
|
+
o("div", ta, [
|
|
4679
|
+
n.canRename || n.canExport ? (c(), u("div", na, [
|
|
4674
4680
|
n.canRename ? (c(), u("button", {
|
|
4675
4681
|
key: 0,
|
|
4676
4682
|
type: "button",
|
|
@@ -4693,8 +4699,8 @@ function ma(e, t, n, i, r, s) {
|
|
|
4693
4699
|
o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
4694
4700
|
])
|
|
4695
4701
|
], -1)),
|
|
4696
|
-
o("span",
|
|
4697
|
-
])) :
|
|
4702
|
+
o("span", sa, v(s.t("moreMenu.editTitle")), 1)
|
|
4703
|
+
])) : b("", !0),
|
|
4698
4704
|
n.canExport ? (c(), u("button", {
|
|
4699
4705
|
key: 1,
|
|
4700
4706
|
type: "button",
|
|
@@ -4716,12 +4722,12 @@ function ma(e, t, n, i, r, s) {
|
|
|
4716
4722
|
o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
4717
4723
|
])
|
|
4718
4724
|
], -1)),
|
|
4719
|
-
o("span",
|
|
4725
|
+
o("span", ra, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4720
4726
|
t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4721
|
-
])) :
|
|
4722
|
-
])) :
|
|
4723
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4724
|
-
o("div",
|
|
4727
|
+
])) : b("", !0)
|
|
4728
|
+
])) : b("", !0),
|
|
4729
|
+
n.canRename || n.canExport ? (c(), u("div", ia)) : b("", !0),
|
|
4730
|
+
o("div", aa, [
|
|
4725
4731
|
o("button", {
|
|
4726
4732
|
type: "button",
|
|
4727
4733
|
class: "wm-mm__item",
|
|
@@ -4743,7 +4749,7 @@ function ma(e, t, n, i, r, s) {
|
|
|
4743
4749
|
o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
4744
4750
|
])
|
|
4745
4751
|
], -1)),
|
|
4746
|
-
o("span",
|
|
4752
|
+
o("span", oa, v(s.t("moreMenu.sound")), 1),
|
|
4747
4753
|
o("span", {
|
|
4748
4754
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
|
|
4749
4755
|
}, [...t[10] || (t[10] = [
|
|
@@ -4770,7 +4776,7 @@ function ma(e, t, n, i, r, s) {
|
|
|
4770
4776
|
o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
|
|
4771
4777
|
])
|
|
4772
4778
|
], -1)),
|
|
4773
|
-
o("span",
|
|
4779
|
+
o("span", la, v(s.t("moreMenu.browserNotifications")), 1),
|
|
4774
4780
|
o("span", {
|
|
4775
4781
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
|
|
4776
4782
|
}, [...t[12] || (t[12] = [
|
|
@@ -4779,7 +4785,7 @@ function ma(e, t, n, i, r, s) {
|
|
|
4779
4785
|
])
|
|
4780
4786
|
]),
|
|
4781
4787
|
t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
|
|
4782
|
-
o("div",
|
|
4788
|
+
o("div", ca, [
|
|
4783
4789
|
n.statusUrl ? (c(), u("button", {
|
|
4784
4790
|
key: 0,
|
|
4785
4791
|
type: "button",
|
|
@@ -4801,8 +4807,8 @@ function ma(e, t, n, i, r, s) {
|
|
|
4801
4807
|
o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
4802
4808
|
])
|
|
4803
4809
|
], -1)),
|
|
4804
|
-
o("span",
|
|
4805
|
-
])) :
|
|
4810
|
+
o("span", da, v(s.t("moreMenu.serviceStatus")), 1)
|
|
4811
|
+
])) : b("", !0),
|
|
4806
4812
|
n.helpUrl ? (c(), u("button", {
|
|
4807
4813
|
key: 1,
|
|
4808
4814
|
type: "button",
|
|
@@ -4824,18 +4830,18 @@ function ma(e, t, n, i, r, s) {
|
|
|
4824
4830
|
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" })
|
|
4825
4831
|
])
|
|
4826
4832
|
], -1)),
|
|
4827
|
-
o("span",
|
|
4828
|
-
])) :
|
|
4833
|
+
o("span", ua, v(s.t("moreMenu.helpCenter")), 1)
|
|
4834
|
+
])) : b("", !0)
|
|
4829
4835
|
])
|
|
4830
4836
|
])
|
|
4831
4837
|
]);
|
|
4832
4838
|
}
|
|
4833
|
-
const
|
|
4839
|
+
const ma = /* @__PURE__ */ B(Zi, [["render", ha], ["__scopeId", "data-v-76281e95"]]), fa = {
|
|
4834
4840
|
name: "WmRenameDialog",
|
|
4835
4841
|
inject: {
|
|
4836
4842
|
// Translator shared by the Messenger shell; French fallback when
|
|
4837
4843
|
// the component is used standalone.
|
|
4838
|
-
t: { default: () =>
|
|
4844
|
+
t: { default: () => U() }
|
|
4839
4845
|
},
|
|
4840
4846
|
props: {
|
|
4841
4847
|
// Empty defaults: the resolved fallback comes from the translator
|
|
@@ -4872,20 +4878,20 @@ const fa = /* @__PURE__ */ B(ea, [["render", ma], ["__scopeId", "data-v-76281e95
|
|
|
4872
4878
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
4873
4879
|
}
|
|
4874
4880
|
}
|
|
4875
|
-
}, ga = { class: "wm-dialog" },
|
|
4881
|
+
}, ga = { class: "wm-dialog" }, _a = {
|
|
4876
4882
|
class: "wm-dialog__card",
|
|
4877
4883
|
role: "dialog",
|
|
4878
4884
|
"aria-modal": "true"
|
|
4879
|
-
},
|
|
4880
|
-
function
|
|
4885
|
+
}, pa = { class: "wm-dialog__head" }, va = { class: "wm-dialog__title" }, ya = ["aria-label"], wa = { class: "wm-dialog__body" }, ba = ["placeholder"], ka = { class: "wm-dialog__actions" }, Ca = ["disabled"];
|
|
4886
|
+
function Aa(e, t, n, i, r, s) {
|
|
4881
4887
|
return c(), u("div", ga, [
|
|
4882
4888
|
o("div", {
|
|
4883
4889
|
class: "wm-dialog__scrim",
|
|
4884
4890
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4885
4891
|
}),
|
|
4886
|
-
o("div",
|
|
4887
|
-
o("div",
|
|
4888
|
-
o("div",
|
|
4892
|
+
o("div", _a, [
|
|
4893
|
+
o("div", pa, [
|
|
4894
|
+
o("div", va, v(n.title || s.t("rename.title")), 1),
|
|
4889
4895
|
o("button", {
|
|
4890
4896
|
type: "button",
|
|
4891
4897
|
class: "wm-dialog__close",
|
|
@@ -4905,9 +4911,9 @@ function Sa(e, t, n, i, r, s) {
|
|
|
4905
4911
|
}, [
|
|
4906
4912
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4907
4913
|
], -1)
|
|
4908
|
-
])], 8,
|
|
4914
|
+
])], 8, ya)
|
|
4909
4915
|
]),
|
|
4910
|
-
o("div",
|
|
4916
|
+
o("div", wa, [
|
|
4911
4917
|
K(o("input", {
|
|
4912
4918
|
ref: "input",
|
|
4913
4919
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
|
|
@@ -4919,11 +4925,11 @@ function Sa(e, t, n, i, r, s) {
|
|
|
4919
4925
|
t[3] || (t[3] = ue(Y((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
4920
4926
|
t[4] || (t[4] = ue(Y((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
4921
4927
|
]
|
|
4922
|
-
}, null, 40,
|
|
4928
|
+
}, null, 40, ba), [
|
|
4923
4929
|
[X, r.value]
|
|
4924
4930
|
])
|
|
4925
4931
|
]),
|
|
4926
|
-
o("div",
|
|
4932
|
+
o("div", ka, [
|
|
4927
4933
|
o("button", {
|
|
4928
4934
|
type: "button",
|
|
4929
4935
|
class: "wm-dialog__btn",
|
|
@@ -4934,31 +4940,31 @@ function Sa(e, t, n, i, r, s) {
|
|
|
4934
4940
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
4935
4941
|
disabled: !s.canSubmit,
|
|
4936
4942
|
onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
|
|
4937
|
-
}, v(s.t("common.save")), 9,
|
|
4943
|
+
}, v(s.t("common.save")), 9, Ca)
|
|
4938
4944
|
])
|
|
4939
4945
|
])
|
|
4940
4946
|
]);
|
|
4941
4947
|
}
|
|
4942
|
-
const
|
|
4948
|
+
const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ma = {
|
|
4943
4949
|
name: "Messenger",
|
|
4944
4950
|
components: {
|
|
4945
|
-
Launcher:
|
|
4946
|
-
Header:
|
|
4947
|
-
Onboarding:
|
|
4948
|
-
MessageList:
|
|
4949
|
-
Composer:
|
|
4950
|
-
SuggestionChips:
|
|
4951
|
-
ApprovalCard:
|
|
4952
|
-
FormCard:
|
|
4953
|
-
Feedback:
|
|
4954
|
-
MoreMenu:
|
|
4955
|
-
RenameDialog:
|
|
4951
|
+
Launcher: Ft,
|
|
4952
|
+
Header: ln,
|
|
4953
|
+
Onboarding: qn,
|
|
4954
|
+
MessageList: Ir,
|
|
4955
|
+
Composer: Qr,
|
|
4956
|
+
SuggestionChips: ti,
|
|
4957
|
+
ApprovalCard: ui,
|
|
4958
|
+
FormCard: Ui,
|
|
4959
|
+
Feedback: Xi,
|
|
4960
|
+
MoreMenu: ma,
|
|
4961
|
+
RenameDialog: Sa
|
|
4956
4962
|
},
|
|
4957
4963
|
mixins: [
|
|
4958
4964
|
ot,
|
|
4959
4965
|
mt,
|
|
4960
4966
|
ft,
|
|
4961
|
-
|
|
4967
|
+
_t
|
|
4962
4968
|
],
|
|
4963
4969
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
4964
4970
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -5007,6 +5013,7 @@ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5007
5013
|
transport: null,
|
|
5008
5014
|
store: null,
|
|
5009
5015
|
isOpen: !1,
|
|
5016
|
+
launcherHovered: !1,
|
|
5010
5017
|
draft: "",
|
|
5011
5018
|
busy: !1,
|
|
5012
5019
|
bootError: null,
|
|
@@ -5097,7 +5104,7 @@ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5097
5104
|
// `locale` changes. `t()` below (and the provided closure) delegate
|
|
5098
5105
|
// to it so every string resolves against the current language.
|
|
5099
5106
|
translator() {
|
|
5100
|
-
return
|
|
5107
|
+
return U(this.locale);
|
|
5101
5108
|
},
|
|
5102
5109
|
error() {
|
|
5103
5110
|
var e;
|
|
@@ -5128,13 +5135,13 @@ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5128
5135
|
var n;
|
|
5129
5136
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = this.revealedAt;
|
|
5130
5137
|
return this.allConversations.map((i) => {
|
|
5131
|
-
var
|
|
5138
|
+
var w;
|
|
5132
5139
|
const r = e[i.id] || [], s = J(i.last_read_message_id);
|
|
5133
5140
|
let a = 0, l = null;
|
|
5134
5141
|
for (let k = r.length - 1; k >= 0; k--) {
|
|
5135
5142
|
const x = r[k];
|
|
5136
5143
|
if (!x) continue;
|
|
5137
|
-
if (((
|
|
5144
|
+
if (((w = x.author) == null ? void 0 : w.type) === "user") break;
|
|
5138
5145
|
const R = J(x.id);
|
|
5139
5146
|
if (R != null) {
|
|
5140
5147
|
if (s != null && R <= s) break;
|
|
@@ -5326,8 +5333,8 @@ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5326
5333
|
}
|
|
5327
5334
|
const t = this.revealedAt;
|
|
5328
5335
|
return (this.s.messagesByConv[e.id] || []).filter((r) => {
|
|
5329
|
-
var s, a, l, p,
|
|
5330
|
-
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (
|
|
5336
|
+
var s, a, l, p, w;
|
|
5337
|
+
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (w = r == null ? void 0 : r.metadata) != null && w.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
5331
5338
|
});
|
|
5332
5339
|
},
|
|
5333
5340
|
// True whenever we should show the "typing" indicator at the bottom
|
|
@@ -5370,7 +5377,7 @@ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5370
5377
|
const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5371
5378
|
if (!t || typeof t != "object") return "";
|
|
5372
5379
|
const n = Object.entries(t);
|
|
5373
|
-
return n.length ? n.slice(0, 2).map(([
|
|
5380
|
+
return n.length ? n.slice(0, 2).map(([w, k]) => `${w}: ${k}`).join(" · ") : "";
|
|
5374
5381
|
},
|
|
5375
5382
|
actionInFlight() {
|
|
5376
5383
|
var e, t;
|
|
@@ -5651,14 +5658,22 @@ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5651
5658
|
// Mesure la taille rendue du wm-launcherWrap (launcher + peeks éventuels)
|
|
5652
5659
|
// et la pousse au parent. L'iframe s'ajuste pile à cette taille → la
|
|
5653
5660
|
// page derrière redevient cliquable en dehors du launcher.
|
|
5661
|
+
onLauncherHover(e) {
|
|
5662
|
+
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
5663
|
+
},
|
|
5654
5664
|
sendCurrentLauncherSize() {
|
|
5655
|
-
var
|
|
5656
|
-
const e = (
|
|
5665
|
+
var a, l, p, w, k;
|
|
5666
|
+
const e = (l = (a = this.$el) == null ? void 0 : a.querySelector) == null ? void 0 : l.call(a, ".wm-launcherWrap");
|
|
5657
5667
|
if (!e) return;
|
|
5658
5668
|
const t = e.getBoundingClientRect();
|
|
5659
|
-
!t.width || !t.height
|
|
5660
|
-
|
|
5661
|
-
|
|
5669
|
+
if (!t.width || !t.height) return;
|
|
5670
|
+
const i = (((p = this.launcherPeeks) == null ? void 0 : p.length) ?? 0) > 0 ? 16 : 4, r = (k = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : k.call(w, ".wm-launcher"), s = r == null ? void 0 : r.getBoundingClientRect();
|
|
5671
|
+
this.notifyParentResize("closed", {
|
|
5672
|
+
width: Math.ceil(t.width) + i,
|
|
5673
|
+
height: Math.ceil(t.height) + i,
|
|
5674
|
+
launcherWidth: s ? Math.ceil(s.width) : null,
|
|
5675
|
+
launcherHeight: s ? Math.ceil(s.height) : null,
|
|
5676
|
+
launcherHovered: this.launcherHovered
|
|
5662
5677
|
});
|
|
5663
5678
|
},
|
|
5664
5679
|
observeLauncherSize() {
|
|
@@ -5871,29 +5886,29 @@ const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5871
5886
|
}
|
|
5872
5887
|
}
|
|
5873
5888
|
}
|
|
5874
|
-
},
|
|
5889
|
+
}, Ta = {
|
|
5875
5890
|
key: 0,
|
|
5876
5891
|
class: "wm-loading",
|
|
5877
5892
|
"aria-busy": "true",
|
|
5878
5893
|
"aria-live": "polite"
|
|
5879
|
-
},
|
|
5894
|
+
}, xa = ["aria-label"], Oa = {
|
|
5880
5895
|
key: 0,
|
|
5881
5896
|
class: "wm-state"
|
|
5882
|
-
},
|
|
5897
|
+
}, La = { class: "wm-state__err" }, Ia = { class: "wm-state__errTitle" }, Ea = { class: "wm-state__errSub" }, Ra = { class: "wm-bottom" }, Ba = {
|
|
5883
5898
|
key: 0,
|
|
5884
5899
|
ref: "floatEl",
|
|
5885
5900
|
class: "wm-float"
|
|
5886
|
-
},
|
|
5901
|
+
}, Na = {
|
|
5887
5902
|
key: 1,
|
|
5888
5903
|
class: "wm-actionWait",
|
|
5889
5904
|
role: "status",
|
|
5890
5905
|
"aria-live": "polite"
|
|
5891
|
-
},
|
|
5906
|
+
}, Fa = { class: "wm-actionWait__lbl" }, Pa = {
|
|
5892
5907
|
key: 2,
|
|
5893
5908
|
class: "wm-attached"
|
|
5894
|
-
},
|
|
5895
|
-
function
|
|
5896
|
-
const a = E("Launcher"), l = E("Header"), p = E("Onboarding"),
|
|
5909
|
+
}, Ua = ["aria-label", "onClick"];
|
|
5910
|
+
function ja(e, t, n, i, r, s) {
|
|
5911
|
+
const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), w = E("MessageList"), k = E("ApprovalCard"), x = E("FormCard"), R = E("Feedback"), A = E("SuggestionChips"), q = E("Composer"), M = E("MoreMenu"), j = E("RenameDialog");
|
|
5897
5912
|
return c(), u("div", {
|
|
5898
5913
|
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
5899
5914
|
}, [
|
|
@@ -5902,8 +5917,9 @@ function Da(e, t, n, i, r, s) {
|
|
|
5902
5917
|
"unread-count": s.unreadCount,
|
|
5903
5918
|
peeks: s.launcherPeeks,
|
|
5904
5919
|
onOpen: s.openFromPeek,
|
|
5905
|
-
onDismiss: s.dismissPeek
|
|
5906
|
-
|
|
5920
|
+
onDismiss: s.dismissPeek,
|
|
5921
|
+
onHover: s.onLauncherHover
|
|
5922
|
+
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
|
|
5907
5923
|
r.isOpen || s.isEmbedded ? (c(), u("section", {
|
|
5908
5924
|
key: 1,
|
|
5909
5925
|
class: O([
|
|
@@ -5911,12 +5927,12 @@ function Da(e, t, n, i, r, s) {
|
|
|
5911
5927
|
`wm-panel--${n.displayMode}`,
|
|
5912
5928
|
{ "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
|
|
5913
5929
|
]),
|
|
5914
|
-
style:
|
|
5930
|
+
style: H(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
5915
5931
|
role: "dialog",
|
|
5916
5932
|
"aria-label": "Messenger"
|
|
5917
5933
|
}, [
|
|
5918
|
-
!s.ready && !s.error ? (c(), u("div",
|
|
5919
|
-
s.isEmbedded ?
|
|
5934
|
+
!s.ready && !s.error ? (c(), u("div", Ta, [
|
|
5935
|
+
s.isEmbedded ? b("", !0) : (c(), u("button", {
|
|
5920
5936
|
key: 0,
|
|
5921
5937
|
type: "button",
|
|
5922
5938
|
class: "wm-loading__close",
|
|
@@ -5936,7 +5952,7 @@ function Da(e, t, n, i, r, s) {
|
|
|
5936
5952
|
}, [
|
|
5937
5953
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5938
5954
|
], -1)
|
|
5939
|
-
])], 8,
|
|
5955
|
+
])], 8, xa)),
|
|
5940
5956
|
t[6] || (t[6] = o("div", {
|
|
5941
5957
|
class: "wm-loading__spinner",
|
|
5942
5958
|
"aria-hidden": "true"
|
|
@@ -5956,8 +5972,8 @@ function Da(e, t, n, i, r, s) {
|
|
|
5956
5972
|
onMore: s.toggleMore,
|
|
5957
5973
|
onClose: s.close
|
|
5958
5974
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
5959
|
-
s.error ? (c(), u("div",
|
|
5960
|
-
o("div",
|
|
5975
|
+
s.error ? (c(), u("div", Oa, [
|
|
5976
|
+
o("div", La, [
|
|
5961
5977
|
t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
|
|
5962
5978
|
o("svg", {
|
|
5963
5979
|
width: "14",
|
|
@@ -5974,12 +5990,12 @@ function Da(e, t, n, i, r, s) {
|
|
|
5974
5990
|
])
|
|
5975
5991
|
], -1)),
|
|
5976
5992
|
o("div", null, [
|
|
5977
|
-
o("div",
|
|
5978
|
-
o("div",
|
|
5993
|
+
o("div", Ia, v(s.t("error.connectionFailed")), 1),
|
|
5994
|
+
o("div", Ea, v(s.error), 1)
|
|
5979
5995
|
])
|
|
5980
5996
|
])
|
|
5981
5997
|
])) : s.currentConv ? (c(), u(I, { key: 2 }, [
|
|
5982
|
-
V(
|
|
5998
|
+
V(w, {
|
|
5983
5999
|
ref: "messageList",
|
|
5984
6000
|
messages: s.displayedMessages,
|
|
5985
6001
|
"streaming-active": s.streamingActive,
|
|
@@ -5993,8 +6009,8 @@ function Da(e, t, n, i, r, s) {
|
|
|
5993
6009
|
"ai-agent-avatar-url": s.agentAvatarUrl,
|
|
5994
6010
|
onLoadMore: s.onLoadMore
|
|
5995
6011
|
}, 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"]),
|
|
5996
|
-
o("div",
|
|
5997
|
-
s.floatVisible ? (c(), u("div",
|
|
6012
|
+
o("div", Ra, [
|
|
6013
|
+
s.floatVisible ? (c(), u("div", Ba, [
|
|
5998
6014
|
s.approvalReady ? (c(), N(k, {
|
|
5999
6015
|
key: 0,
|
|
6000
6016
|
action: s.approvalTitle,
|
|
@@ -6019,16 +6035,16 @@ function Da(e, t, n, i, r, s) {
|
|
|
6019
6035
|
items: s.suggestions,
|
|
6020
6036
|
onSelect: s.onSuggestion
|
|
6021
6037
|
}, null, 8, ["items", "onSelect"]))
|
|
6022
|
-
], 512)) :
|
|
6023
|
-
s.actionInFlight ? (c(), u("div",
|
|
6038
|
+
], 512)) : b("", !0),
|
|
6039
|
+
s.actionInFlight ? (c(), u("div", Na, [
|
|
6024
6040
|
t[8] || (t[8] = o("span", {
|
|
6025
6041
|
class: "wm-actionWait__spinner",
|
|
6026
6042
|
"aria-hidden": "true"
|
|
6027
6043
|
}, null, -1)),
|
|
6028
|
-
o("span",
|
|
6044
|
+
o("span", Fa, v(s.t("action.inProgress", {
|
|
6029
6045
|
name: s.actionInFlightName
|
|
6030
6046
|
})), 1)
|
|
6031
|
-
])) : (c(), N(
|
|
6047
|
+
])) : (c(), N(q, {
|
|
6032
6048
|
key: 2,
|
|
6033
6049
|
ref: "composer",
|
|
6034
6050
|
modelValue: r.draft,
|
|
@@ -6052,16 +6068,16 @@ function Da(e, t, n, i, r, s) {
|
|
|
6052
6068
|
onSoundToggle: e.onSoundToggle,
|
|
6053
6069
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6054
6070
|
onAction: s.onMoreAction
|
|
6055
|
-
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6071
|
+
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
|
|
6056
6072
|
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(j, {
|
|
6057
6073
|
key: 1,
|
|
6058
6074
|
"initial-value": s.currentConv.name || "",
|
|
6059
6075
|
title: s.t("rename.dialogTitle"),
|
|
6060
6076
|
onClose: t[3] || (t[3] = (F) => r.renameDialogOpen = !1),
|
|
6061
6077
|
onSubmit: s.onRenameSubmit
|
|
6062
|
-
}, null, 8, ["initial-value", "title", "onSubmit"])) :
|
|
6078
|
+
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
|
|
6063
6079
|
r.pendingAttachments.length ? (c(), u("div", Pa, [
|
|
6064
|
-
(c(!0), u(I, null,
|
|
6080
|
+
(c(!0), u(I, null, P(r.pendingAttachments, (F, z) => (c(), u("div", {
|
|
6065
6081
|
key: z,
|
|
6066
6082
|
class: "wm-attached__chip"
|
|
6067
6083
|
}, [
|
|
@@ -6097,9 +6113,9 @@ function Da(e, t, n, i, r, s) {
|
|
|
6097
6113
|
}, [
|
|
6098
6114
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6099
6115
|
], -1)
|
|
6100
|
-
])], 8,
|
|
6116
|
+
])], 8, Ua)
|
|
6101
6117
|
]))), 128))
|
|
6102
|
-
])) :
|
|
6118
|
+
])) : b("", !0)
|
|
6103
6119
|
], 64)) : (c(), N(p, {
|
|
6104
6120
|
key: 1,
|
|
6105
6121
|
"welcome-message": s.widgetWelcomeMessage,
|
|
@@ -6125,58 +6141,58 @@ function Da(e, t, n, i, r, s) {
|
|
|
6125
6141
|
onSoundToggle: e.onSoundToggle,
|
|
6126
6142
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6127
6143
|
onAction: s.onMoreAction
|
|
6128
|
-
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6144
|
+
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0)
|
|
6129
6145
|
], 64))
|
|
6130
|
-
], 6)) :
|
|
6146
|
+
], 6)) : b("", !0)
|
|
6131
6147
|
], 2);
|
|
6132
6148
|
}
|
|
6133
|
-
const Ha = /* @__PURE__ */ B(
|
|
6149
|
+
const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-af4afa93"]]), qa = "0.5.13";
|
|
6134
6150
|
export {
|
|
6135
6151
|
le as AIAvatar,
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6152
|
+
ge as AVATAR_COLORS,
|
|
6153
|
+
ts as ActionResult,
|
|
6154
|
+
ui as ApprovalCard,
|
|
6155
|
+
ds as ArtifactFormResponse,
|
|
6156
|
+
Cs as ArtifactInfoCard,
|
|
6141
6157
|
Hs as ArtifactRenderer,
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6158
|
+
Us as ArtifactTicket,
|
|
6159
|
+
er as AttachmentPreview,
|
|
6160
|
+
rr as Bubble,
|
|
6161
|
+
Qr as Composer,
|
|
6146
6162
|
Ze as DEFAULT_BASE_URL,
|
|
6147
6163
|
ie as DEFAULT_LANGUAGE,
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6164
|
+
Xi as Feedback,
|
|
6165
|
+
Ui as FormCard,
|
|
6166
|
+
ln as Header,
|
|
6151
6167
|
Ee as HumanAvatar,
|
|
6152
|
-
|
|
6168
|
+
Ft as Launcher,
|
|
6153
6169
|
be as MEDIA_RECORDER_SUPPORTED,
|
|
6154
|
-
|
|
6170
|
+
Ir as MessageList,
|
|
6155
6171
|
Ha as Messenger,
|
|
6156
|
-
|
|
6157
|
-
|
|
6172
|
+
ma as MoreMenu,
|
|
6173
|
+
qn as Onboarding,
|
|
6158
6174
|
he as SCREEN_CAPTURE_SUPPORTED,
|
|
6159
6175
|
et as SUPPORTED_LANGUAGES,
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6176
|
+
ti as SuggestionChips,
|
|
6177
|
+
Gt as TeamAvatars,
|
|
6178
|
+
lr as Typing,
|
|
6179
|
+
qa as VERSION,
|
|
6164
6180
|
ve as avatarColor,
|
|
6165
6181
|
ye as avatarInitials,
|
|
6166
|
-
|
|
6182
|
+
Rr as captureScreenshotFile,
|
|
6167
6183
|
D as colors,
|
|
6168
6184
|
Qe as createStore,
|
|
6169
|
-
|
|
6185
|
+
U as createTranslator,
|
|
6170
6186
|
We as createTransport,
|
|
6171
6187
|
oe as dateLocale,
|
|
6172
6188
|
Ha as default,
|
|
6173
6189
|
Le as formatTime,
|
|
6174
|
-
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6190
|
+
za as guessAttachmentKind,
|
|
6191
|
+
Er as pickRecorderMime,
|
|
6192
|
+
dn as renderInlineMarkdown,
|
|
6193
|
+
un as renderMarkdown,
|
|
6178
6194
|
we as resolveLanguage,
|
|
6179
|
-
|
|
6195
|
+
Nr as startScreenRecording,
|
|
6180
6196
|
Xe as tokensCss,
|
|
6181
6197
|
Je as uuid,
|
|
6182
6198
|
Je as v4
|