@_solaris/messenger-widget 0.5.66 → 0.5.68
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 +7 -7
- package/dist/messenger.cjs +7 -7
- package/dist/messenger.js +358 -329
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as Fe, Fragment as
|
|
1
|
+
import { reactive as Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as Fe, Fragment as E, renderList as F, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, resolveDynamicComponent as Ae, mergeProps as je, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
|
|
2
2
|
const Ye = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -35,14 +35,14 @@ function Ze(e) {
|
|
|
35
35
|
};
|
|
36
36
|
if (!t.baseUrl || !t.widgetId)
|
|
37
37
|
throw new Error("[transport] baseUrl and widgetId are required");
|
|
38
|
-
function n(u,
|
|
39
|
-
return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(
|
|
38
|
+
function n(u, g) {
|
|
39
|
+
return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(g), () => t.listeners.get(u).delete(g);
|
|
40
40
|
}
|
|
41
|
-
function r(u,
|
|
41
|
+
function r(u, g) {
|
|
42
42
|
const p = t.listeners.get(u);
|
|
43
43
|
p && p.forEach((S) => {
|
|
44
44
|
try {
|
|
45
|
-
S(
|
|
45
|
+
S(g);
|
|
46
46
|
} catch (O) {
|
|
47
47
|
console.error("[transport] listener", u, O);
|
|
48
48
|
}
|
|
@@ -64,8 +64,8 @@ function Ze(e) {
|
|
|
64
64
|
...t.origin ? { "X-Parent-Origin": t.origin } : {}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
async function i(u,
|
|
68
|
-
const S = await fetch(`${t.baseUrl}${we}${
|
|
67
|
+
async function i(u, g, p) {
|
|
68
|
+
const S = await fetch(`${t.baseUrl}${we}${g}`, {
|
|
69
69
|
method: u,
|
|
70
70
|
credentials: "include",
|
|
71
71
|
headers: s(),
|
|
@@ -73,7 +73,7 @@ function Ze(e) {
|
|
|
73
73
|
});
|
|
74
74
|
if (!S.ok) {
|
|
75
75
|
const O = await l(S), x = new Error(
|
|
76
|
-
`HTTP ${S.status} ${u} ${
|
|
76
|
+
`HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
|
|
77
77
|
);
|
|
78
78
|
throw x.status = S.status, x.body = O, x;
|
|
79
79
|
}
|
|
@@ -86,12 +86,12 @@ function Ze(e) {
|
|
|
86
86
|
return null;
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
async function
|
|
89
|
+
async function _(u) {
|
|
90
90
|
if (t.started) return t.lastBootstrap;
|
|
91
91
|
if (!(u != null && u.origin))
|
|
92
92
|
throw new Error("[transport] start requires origin");
|
|
93
93
|
t.started = !0, t.origin = u.origin, t.token = u.token || "";
|
|
94
|
-
const
|
|
94
|
+
const g = await fetch(
|
|
95
95
|
`${t.baseUrl}${we}/session`,
|
|
96
96
|
{
|
|
97
97
|
method: "POST",
|
|
@@ -111,13 +111,13 @@ function Ze(e) {
|
|
|
111
111
|
})
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
|
-
if (!
|
|
115
|
-
const $ = await l(
|
|
116
|
-
`Session bootstrap failed: HTTP ${
|
|
114
|
+
if (!g.ok) {
|
|
115
|
+
const $ = await l(g), Z = new Error(
|
|
116
|
+
`Session bootstrap failed: HTTP ${g.status} :: ${($ == null ? void 0 : $.error) || g.statusText}`
|
|
117
117
|
);
|
|
118
|
-
throw Z.status =
|
|
118
|
+
throw Z.status = g.status, Z.body = $, Z;
|
|
119
119
|
}
|
|
120
|
-
const p = await
|
|
120
|
+
const p = await g.json();
|
|
121
121
|
t.userId = p.external_id;
|
|
122
122
|
const [S, O] = await Promise.all([
|
|
123
123
|
fetch(
|
|
@@ -141,24 +141,24 @@ function Ze(e) {
|
|
|
141
141
|
}
|
|
142
142
|
async function k() {
|
|
143
143
|
try {
|
|
144
|
-
const u = await
|
|
145
|
-
t.lastActivityAt = u.reduce((
|
|
144
|
+
const u = await L();
|
|
145
|
+
t.lastActivityAt = u.reduce((g, p) => {
|
|
146
146
|
const S = p == null ? void 0 : p.last_message_at;
|
|
147
|
-
return S && (!
|
|
147
|
+
return S && (!g || S > g) ? S : g;
|
|
148
148
|
}, null);
|
|
149
149
|
} catch (u) {
|
|
150
150
|
console.error("[transport] initial /conversations failed", u);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
async function
|
|
153
|
+
async function w() {
|
|
154
154
|
const u = await i("GET", "/customers/me");
|
|
155
155
|
return (u == null ? void 0 : u.customer) ?? null;
|
|
156
156
|
}
|
|
157
157
|
async function T(u) {
|
|
158
|
-
const
|
|
159
|
-
return (
|
|
158
|
+
const g = await i("PATCH", "/customers/me", u);
|
|
159
|
+
return (g == null ? void 0 : g.customer) ?? null;
|
|
160
160
|
}
|
|
161
|
-
async function
|
|
161
|
+
async function L() {
|
|
162
162
|
const u = await i("GET", "/conversations");
|
|
163
163
|
return (u == null ? void 0 : u.conversations) ?? [];
|
|
164
164
|
}
|
|
@@ -171,56 +171,56 @@ function Ze(e) {
|
|
|
171
171
|
`/conversations/${encodeURIComponent(u)}`
|
|
172
172
|
)).conversation;
|
|
173
173
|
}
|
|
174
|
-
async function M(u,
|
|
174
|
+
async function M(u, g) {
|
|
175
175
|
return (await i(
|
|
176
176
|
"PATCH",
|
|
177
177
|
`/conversations/${encodeURIComponent(u)}`,
|
|
178
|
-
|
|
178
|
+
g
|
|
179
179
|
)).conversation;
|
|
180
180
|
}
|
|
181
|
-
async function D(u,
|
|
181
|
+
async function D(u, g) {
|
|
182
182
|
return i(
|
|
183
183
|
"PATCH",
|
|
184
184
|
`/conversations/${encodeURIComponent(u)}/read`,
|
|
185
|
-
{ message_id:
|
|
185
|
+
{ message_id: g }
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
async function N(u,
|
|
188
|
+
async function N(u, g = {}) {
|
|
189
189
|
const p = new URLSearchParams();
|
|
190
|
-
|
|
190
|
+
g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
|
|
191
191
|
const S = p.toString() ? `?${p.toString()}` : "";
|
|
192
192
|
return i(
|
|
193
193
|
"GET",
|
|
194
194
|
`/conversations/${encodeURIComponent(u)}/messages${S}`
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
|
-
async function
|
|
197
|
+
async function I(u, g) {
|
|
198
198
|
ae();
|
|
199
199
|
const p = {
|
|
200
|
-
client_msg_id:
|
|
200
|
+
client_msg_id: g.client_msg_id,
|
|
201
201
|
type: "content",
|
|
202
|
-
text_md:
|
|
202
|
+
text_md: g.text_md,
|
|
203
203
|
author: { id: t.userId, type: "user" },
|
|
204
|
-
created_at:
|
|
204
|
+
created_at: g.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
205
205
|
};
|
|
206
|
-
return Array.isArray(
|
|
206
|
+
return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), i(
|
|
207
207
|
"POST",
|
|
208
208
|
`/conversations/${encodeURIComponent(u)}/messages`,
|
|
209
209
|
p
|
|
210
210
|
);
|
|
211
211
|
}
|
|
212
|
-
async function K(u,
|
|
212
|
+
async function K(u, g, p) {
|
|
213
213
|
return ae(), i(
|
|
214
214
|
"POST",
|
|
215
|
-
`/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(
|
|
215
|
+
`/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
|
|
216
216
|
p ? { inputs: p } : {}
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
219
|
async function Q(u) {
|
|
220
|
-
const
|
|
220
|
+
const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await i("POST", "/attachments", {
|
|
221
221
|
mime_type: p,
|
|
222
222
|
size_bytes: S,
|
|
223
|
-
name:
|
|
223
|
+
name: g
|
|
224
224
|
}), x = await fetch(O.upload_url, {
|
|
225
225
|
method: "PUT",
|
|
226
226
|
headers: { "Content-Type": p },
|
|
@@ -249,8 +249,8 @@ function Ze(e) {
|
|
|
249
249
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
250
250
|
try {
|
|
251
251
|
const u = new EventSource(re(), { withCredentials: !0 });
|
|
252
|
-
for (const
|
|
253
|
-
u.addEventListener(
|
|
252
|
+
for (const g of Ye)
|
|
253
|
+
u.addEventListener(g, (p) => ie(g, p.data));
|
|
254
254
|
u.addEventListener(
|
|
255
255
|
"error",
|
|
256
256
|
() => r("error", new Error("SSE error"))
|
|
@@ -259,9 +259,9 @@ function Ze(e) {
|
|
|
259
259
|
console.error("[transport] SSE open failed", u), r("error", u);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
function ie(u,
|
|
262
|
+
function ie(u, g) {
|
|
263
263
|
try {
|
|
264
|
-
const p = JSON.parse(
|
|
264
|
+
const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
|
|
265
265
|
r(u, S);
|
|
266
266
|
} catch (p) {
|
|
267
267
|
console.error("[transport] bad SSE payload", u, p);
|
|
@@ -280,11 +280,11 @@ function Ze(e) {
|
|
|
280
280
|
}
|
|
281
281
|
async function ye() {
|
|
282
282
|
try {
|
|
283
|
-
const u = await
|
|
283
|
+
const u = await L(), g = u.reduce((S, O) => {
|
|
284
284
|
const x = O == null ? void 0 : O.last_message_at;
|
|
285
285
|
return x && (!S || x > S) ? x : S;
|
|
286
286
|
}, null);
|
|
287
|
-
|
|
287
|
+
g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
|
|
288
288
|
} catch (u) {
|
|
289
289
|
console.error("[transport] poll failed", u);
|
|
290
290
|
}
|
|
@@ -319,31 +319,31 @@ function Ze(e) {
|
|
|
319
319
|
}
|
|
320
320
|
function C(u) {
|
|
321
321
|
if (!(!u || typeof u != "object"))
|
|
322
|
-
for (const [
|
|
322
|
+
for (const [g, p] of Object.entries(u)) {
|
|
323
323
|
if (p === null) {
|
|
324
|
-
delete t.currentContext[
|
|
324
|
+
delete t.currentContext[g];
|
|
325
325
|
continue;
|
|
326
326
|
}
|
|
327
|
-
typeof p == "object" && !Array.isArray(p) && (t.currentContext[
|
|
327
|
+
typeof p == "object" && !Array.isArray(p) && (t.currentContext[g] = { ...p });
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
return {
|
|
331
331
|
on: n,
|
|
332
|
-
start:
|
|
332
|
+
start: _,
|
|
333
333
|
stop: f,
|
|
334
334
|
setPanelOpen: me,
|
|
335
335
|
update: y,
|
|
336
336
|
context: C,
|
|
337
337
|
// REST
|
|
338
|
-
getCustomer:
|
|
338
|
+
getCustomer: w,
|
|
339
339
|
patchCustomer: T,
|
|
340
|
-
listConversations:
|
|
340
|
+
listConversations: L,
|
|
341
341
|
createConversation: A,
|
|
342
342
|
getConversation: q,
|
|
343
343
|
patchConversation: M,
|
|
344
344
|
markConversationRead: D,
|
|
345
345
|
listMessages: N,
|
|
346
|
-
postMessage:
|
|
346
|
+
postMessage: I,
|
|
347
347
|
postCallback: K,
|
|
348
348
|
uploadAttachment: Q,
|
|
349
349
|
signAttachment: se,
|
|
@@ -490,26 +490,26 @@ function st(e) {
|
|
|
490
490
|
return f === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[f] = m, m;
|
|
491
491
|
}
|
|
492
492
|
const l = 50;
|
|
493
|
-
async function
|
|
493
|
+
async function _(h) {
|
|
494
494
|
const m = t.paginationByConv[h];
|
|
495
495
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
496
|
-
|
|
496
|
+
w(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
497
497
|
try {
|
|
498
498
|
const f = await e.listMessages(h, {
|
|
499
499
|
limit: l
|
|
500
500
|
}), y = (f == null ? void 0 : f.messages) ?? [], C = t.messagesByConv[h] || [], u = /* @__PURE__ */ new Set();
|
|
501
501
|
for (const p of y)
|
|
502
502
|
(p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
|
|
503
|
-
const
|
|
504
|
-
t.messagesByConv[h] = [...y, ...
|
|
503
|
+
const g = C.filter((p) => !((p == null ? void 0 : p.id) != null && u.has(`id:${String(p.id)}`) || p != null && p.client_msg_id && u.has(`c:${p.client_msg_id}`)));
|
|
504
|
+
t.messagesByConv[h] = [...y, ...g].sort(
|
|
505
505
|
me
|
|
506
|
-
),
|
|
506
|
+
), w(h, {
|
|
507
507
|
nextCursor: (f == null ? void 0 : f.next_cursor) ?? null,
|
|
508
508
|
loading: !1,
|
|
509
509
|
loaded: !0
|
|
510
510
|
});
|
|
511
511
|
} catch (f) {
|
|
512
|
-
console.error("[store] openConversation failed", f),
|
|
512
|
+
console.error("[store] openConversation failed", f), w(h, {
|
|
513
513
|
nextCursor: null,
|
|
514
514
|
loading: !1,
|
|
515
515
|
loaded: !1
|
|
@@ -523,33 +523,33 @@ function st(e) {
|
|
|
523
523
|
if (!m || m.loading || !m.nextCursor) return;
|
|
524
524
|
const y = (C = (t.messagesByConv[h] || []).find((u) => u == null ? void 0 : u.created_at)) == null ? void 0 : C.created_at;
|
|
525
525
|
if (y) {
|
|
526
|
-
|
|
526
|
+
w(h, { ...m, loading: !0 });
|
|
527
527
|
try {
|
|
528
528
|
const u = await e.listMessages(h, {
|
|
529
529
|
before: y,
|
|
530
530
|
limit: l
|
|
531
|
-
}),
|
|
531
|
+
}), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
|
|
532
532
|
for (const x of p)
|
|
533
533
|
(x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
|
|
534
|
-
const O =
|
|
535
|
-
t.messagesByConv[h] = [...O, ...p],
|
|
534
|
+
const O = g.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
|
|
535
|
+
t.messagesByConv[h] = [...O, ...p], w(h, {
|
|
536
536
|
nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
|
|
537
537
|
loading: !1,
|
|
538
538
|
loaded: !0
|
|
539
539
|
});
|
|
540
540
|
} catch (u) {
|
|
541
|
-
console.error("[store] loadMore failed", u),
|
|
541
|
+
console.error("[store] loadMore failed", u), w(h, { ...m, loading: !1 });
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function w(h, m) {
|
|
546
546
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
547
547
|
}
|
|
548
548
|
async function T(h, m) {
|
|
549
549
|
const f = await e.patchConversation(h, m), y = t.conversations.findIndex((C) => C.id === h);
|
|
550
550
|
y !== -1 && (t.conversations[y] = f);
|
|
551
551
|
}
|
|
552
|
-
async function
|
|
552
|
+
async function L(h) {
|
|
553
553
|
if (!h) return [];
|
|
554
554
|
const m = t.messagesByConv[h] || [];
|
|
555
555
|
let f = "";
|
|
@@ -561,12 +561,12 @@ function st(e) {
|
|
|
561
561
|
f ? { since: f } : {}
|
|
562
562
|
), C = (y == null ? void 0 : y.messages) || [];
|
|
563
563
|
if (!C.length) return [];
|
|
564
|
-
const u = /* @__PURE__ */ new Set(),
|
|
564
|
+
const u = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
|
|
565
565
|
for (const S of m)
|
|
566
|
-
(S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id &&
|
|
566
|
+
(S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id && g.add(S.client_msg_id);
|
|
567
567
|
const p = [];
|
|
568
568
|
for (const S of C) {
|
|
569
|
-
const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) &&
|
|
569
|
+
const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
|
|
570
570
|
W(h, S), O || p.push(S);
|
|
571
571
|
}
|
|
572
572
|
return p;
|
|
@@ -590,9 +590,9 @@ function st(e) {
|
|
|
590
590
|
var O;
|
|
591
591
|
const C = (m || "").trim(), u = Array.isArray(f) && f.length > 0;
|
|
592
592
|
if (!h || !C && !u) return;
|
|
593
|
-
const
|
|
594
|
-
id:
|
|
595
|
-
client_msg_id:
|
|
593
|
+
const g = nt(), p = fe(h), S = {
|
|
594
|
+
id: g,
|
|
595
|
+
client_msg_id: g,
|
|
596
596
|
conversation_id: h,
|
|
597
597
|
type: "content",
|
|
598
598
|
text_md: C,
|
|
@@ -609,14 +609,14 @@ function st(e) {
|
|
|
609
609
|
W(h, S);
|
|
610
610
|
try {
|
|
611
611
|
await e.postMessage(h, {
|
|
612
|
-
client_msg_id:
|
|
612
|
+
client_msg_id: g,
|
|
613
613
|
text_md: C,
|
|
614
614
|
created_at: p,
|
|
615
615
|
...u ? { attachments: f } : {},
|
|
616
616
|
...y && typeof y == "object" ? { metadata: y } : {}
|
|
617
617
|
});
|
|
618
618
|
} catch (x) {
|
|
619
|
-
console.error("[store] send failed", x), X(h,
|
|
619
|
+
console.error("[store] send failed", x), X(h, g, {
|
|
620
620
|
_failed: !0,
|
|
621
621
|
_pending: !1
|
|
622
622
|
});
|
|
@@ -650,8 +650,8 @@ function st(e) {
|
|
|
650
650
|
}
|
|
651
651
|
return null;
|
|
652
652
|
}
|
|
653
|
-
async function
|
|
654
|
-
const y = t.conversations.find((
|
|
653
|
+
async function I(h, { rating: m, comment: f } = {}) {
|
|
654
|
+
const y = t.conversations.find((g) => g.id === h), u = {
|
|
655
655
|
...(y == null ? void 0 : y.metadata) || {},
|
|
656
656
|
feedback: {
|
|
657
657
|
rating: m,
|
|
@@ -675,12 +675,12 @@ function st(e) {
|
|
|
675
675
|
var f, y, C;
|
|
676
676
|
const m = t.messagesByConv[h] || [];
|
|
677
677
|
for (let u = m.length - 1; u >= 0; u--) {
|
|
678
|
-
const
|
|
679
|
-
if (((f =
|
|
678
|
+
const g = m[u];
|
|
679
|
+
if (((f = g == null ? void 0 : g.author) == null ? void 0 : f.type) === "user" || (g == null ? void 0 : g.type) === "action" && ((y = g == null ? void 0 : g.payload) == null ? void 0 : y.state) === "pending")
|
|
680
680
|
return null;
|
|
681
|
-
const p = (C =
|
|
681
|
+
const p = (C = g == null ? void 0 : g.metadata) == null ? void 0 : C.form;
|
|
682
682
|
if (p && Array.isArray(p.fields) && p.fields.length > 0)
|
|
683
|
-
return { message:
|
|
683
|
+
return { message: g, form: p };
|
|
684
684
|
}
|
|
685
685
|
return null;
|
|
686
686
|
}
|
|
@@ -695,8 +695,8 @@ function st(e) {
|
|
|
695
695
|
function re(h) {
|
|
696
696
|
var f, y, C, u;
|
|
697
697
|
const m = t.messagesByConv[h] || [];
|
|
698
|
-
for (let
|
|
699
|
-
const p = m[
|
|
698
|
+
for (let g = m.length - 1; g >= 0; g--) {
|
|
699
|
+
const p = m[g];
|
|
700
700
|
if (((f = p == null ? void 0 : p.author) == null ? void 0 : f.type) === "user") return [];
|
|
701
701
|
if ((p == null ? void 0 : p.type) === "action" && ((y = p == null ? void 0 : p.payload) == null ? void 0 : y.state) === "pending")
|
|
702
702
|
return [];
|
|
@@ -723,8 +723,8 @@ function st(e) {
|
|
|
723
723
|
const f = t.messagesByConv[h] || [];
|
|
724
724
|
let y = -1;
|
|
725
725
|
m != null && m.client_msg_id && (y = f.findIndex(
|
|
726
|
-
(
|
|
727
|
-
)), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = f.findIndex((
|
|
726
|
+
(g) => (g == null ? void 0 : g.client_msg_id) && g.client_msg_id === m.client_msg_id
|
|
727
|
+
)), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = f.findIndex((g) => ie(g == null ? void 0 : g.id, m.id)));
|
|
728
728
|
let C;
|
|
729
729
|
y === -1 ? C = [...f, m].sort(me) : (C = f.slice(), C[y] = {
|
|
730
730
|
...f[y],
|
|
@@ -739,7 +739,7 @@ function st(e) {
|
|
|
739
739
|
function X(h, m, f) {
|
|
740
740
|
const y = t.messagesByConv[h];
|
|
741
741
|
if (!y) return;
|
|
742
|
-
const C = y.findIndex((
|
|
742
|
+
const C = y.findIndex((g) => g.id === m);
|
|
743
743
|
if (C === -1) return;
|
|
744
744
|
const u = y.slice();
|
|
745
745
|
u[C] = { ...y[C], ...f }, t.messagesByConv[h] = u;
|
|
@@ -751,7 +751,7 @@ function st(e) {
|
|
|
751
751
|
if (m && (!y.last_message_at || m > y.last_message_at)) {
|
|
752
752
|
const C = t.conversations.slice();
|
|
753
753
|
C[f] = { ...y, last_message_at: m }, C.sort(
|
|
754
|
-
(u,
|
|
754
|
+
(u, g) => (g.last_message_at || "").localeCompare(u.last_message_at || "")
|
|
755
755
|
), t.conversations = C;
|
|
756
756
|
}
|
|
757
757
|
}
|
|
@@ -779,15 +779,15 @@ function st(e) {
|
|
|
779
779
|
destroy: a,
|
|
780
780
|
applyCustomer: s,
|
|
781
781
|
createConversation: i,
|
|
782
|
-
openConversation:
|
|
782
|
+
openConversation: _,
|
|
783
783
|
loadMore: k,
|
|
784
|
-
fetchSinceLast:
|
|
784
|
+
fetchSinceLast: L,
|
|
785
785
|
patchConversation: T,
|
|
786
786
|
markConversationRead: A,
|
|
787
787
|
send: q,
|
|
788
788
|
clickCallback: M,
|
|
789
789
|
signAttachment: N,
|
|
790
|
-
submitFeedback:
|
|
790
|
+
submitFeedback: I,
|
|
791
791
|
getPendingApproval: K,
|
|
792
792
|
getActionInFlight: se,
|
|
793
793
|
getLatestSuggestions: re,
|
|
@@ -1156,7 +1156,7 @@ function j(e) {
|
|
|
1156
1156
|
let l = n[s];
|
|
1157
1157
|
return l == null && (l = r[s]), l == null ? s : (i && (l = l.replace(
|
|
1158
1158
|
/\{(\w+)\}/g,
|
|
1159
|
-
(
|
|
1159
|
+
(_, k) => i[k] != null ? String(i[k]) : _
|
|
1160
1160
|
)), l);
|
|
1161
1161
|
};
|
|
1162
1162
|
}
|
|
@@ -1191,9 +1191,9 @@ function mt(e, t, n = j()) {
|
|
|
1191
1191
|
if (i == null || i === "") continue;
|
|
1192
1192
|
const l = He(s, i, n);
|
|
1193
1193
|
if (!l) continue;
|
|
1194
|
-
const
|
|
1194
|
+
const _ = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1195
1195
|
`));
|
|
1196
|
-
r.push({ label: s.label, value: l, multiline:
|
|
1196
|
+
r.push({ label: s.label, value: l, multiline: _ });
|
|
1197
1197
|
}
|
|
1198
1198
|
return {
|
|
1199
1199
|
kind: "form_response",
|
|
@@ -1249,34 +1249,34 @@ function ft(e) {
|
|
|
1249
1249
|
if (!T) break;
|
|
1250
1250
|
k.push(T[1]), r++;
|
|
1251
1251
|
}
|
|
1252
|
-
const
|
|
1252
|
+
const w = k.map((T) => `<li>${de(T)}</li>`).join("");
|
|
1253
1253
|
n.push({
|
|
1254
1254
|
type: "block",
|
|
1255
|
-
html: `<ul class="wm-md-ul">${
|
|
1255
|
+
html: `<ul class="wm-md-ul">${w}</ul>`
|
|
1256
1256
|
});
|
|
1257
1257
|
continue;
|
|
1258
1258
|
}
|
|
1259
1259
|
const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
1260
1260
|
if (l) {
|
|
1261
|
-
const k = parseInt(l[1], 10),
|
|
1261
|
+
const k = parseInt(l[1], 10), w = [l[2]];
|
|
1262
1262
|
for (r++; r < t.length; ) {
|
|
1263
1263
|
const A = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
|
|
1264
1264
|
if (!A) break;
|
|
1265
|
-
|
|
1265
|
+
w.push(A[1]), r++;
|
|
1266
1266
|
}
|
|
1267
|
-
const T =
|
|
1267
|
+
const T = w.map((A) => `<li>${de(A)}</li>`).join(""), L = k !== 1 ? ` start="${k}"` : "";
|
|
1268
1268
|
n.push({
|
|
1269
1269
|
type: "block",
|
|
1270
|
-
html: `<ol class="wm-md-ol"${
|
|
1270
|
+
html: `<ol class="wm-md-ol"${L}>${T}</ol>`
|
|
1271
1271
|
});
|
|
1272
1272
|
continue;
|
|
1273
1273
|
}
|
|
1274
|
-
const
|
|
1275
|
-
if (
|
|
1276
|
-
const k =
|
|
1274
|
+
const _ = /^(#{1,6})\s+(.*)$/.exec(s);
|
|
1275
|
+
if (_) {
|
|
1276
|
+
const k = _[1].length;
|
|
1277
1277
|
n.push({
|
|
1278
1278
|
type: "block",
|
|
1279
|
-
html: `<h${k} class="wm-md-h wm-md-h${k}">${de(
|
|
1279
|
+
html: `<h${k} class="wm-md-h wm-md-h${k}">${de(_[2])}</h${k}>`
|
|
1280
1280
|
}), r++;
|
|
1281
1281
|
continue;
|
|
1282
1282
|
}
|
|
@@ -1316,8 +1316,8 @@ function _t(e, t) {
|
|
|
1316
1316
|
const l = typeof i.text_md == "string" ? i.text_md.trim() : "";
|
|
1317
1317
|
if (l)
|
|
1318
1318
|
return (((n = i.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
|
|
1319
|
-
const
|
|
1320
|
-
if (Array.isArray(
|
|
1319
|
+
const _ = (r = i.payload) == null ? void 0 : r.attachments;
|
|
1320
|
+
if (Array.isArray(_) && _.length) return "📎 Pièce jointe";
|
|
1321
1321
|
}
|
|
1322
1322
|
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
|
|
1323
1323
|
}
|
|
@@ -1336,8 +1336,8 @@ function pt(e, t, n, r) {
|
|
|
1336
1336
|
if (!s) continue;
|
|
1337
1337
|
const i = (s.text_md || "").trim();
|
|
1338
1338
|
if (!i) continue;
|
|
1339
|
-
const l = gt(s.author, n),
|
|
1340
|
-
a.push(`[${
|
|
1339
|
+
const l = gt(s.author, n), _ = s.created_at ? new Date(s.created_at).toLocaleString(r) : "";
|
|
1340
|
+
a.push(`[${_}] ${l} :`), a.push(i), a.push("");
|
|
1341
1341
|
}
|
|
1342
1342
|
return a.join(`
|
|
1343
1343
|
`);
|
|
@@ -1488,25 +1488,25 @@ const yt = {
|
|
|
1488
1488
|
if (typeof Notification > "u" || Notification.permission !== "granted") return;
|
|
1489
1489
|
const n = t == null ? void 0 : t.author, r = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), i = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = i ? i.slice(0, 140) : this.t("notification.youHaveNewMessage");
|
|
1490
1490
|
try {
|
|
1491
|
-
const
|
|
1491
|
+
const _ = new Notification(s, {
|
|
1492
1492
|
body: l,
|
|
1493
1493
|
tag: `wm-${e}`,
|
|
1494
1494
|
renotify: !1,
|
|
1495
1495
|
silent: !0
|
|
1496
1496
|
});
|
|
1497
|
-
|
|
1497
|
+
_.onclick = () => {
|
|
1498
1498
|
try {
|
|
1499
1499
|
window.focus();
|
|
1500
1500
|
} catch {
|
|
1501
1501
|
}
|
|
1502
1502
|
this.draftConv = null, this.showOnboarding = !1, this.activeConvId = e, this.isOpen = !0, this.store && this.store.setPanelOpen(!0);
|
|
1503
1503
|
try {
|
|
1504
|
-
|
|
1504
|
+
_.close();
|
|
1505
1505
|
} catch {
|
|
1506
1506
|
}
|
|
1507
1507
|
};
|
|
1508
|
-
} catch (
|
|
1509
|
-
console.warn("[ww-messenger] notification failed",
|
|
1508
|
+
} catch (_) {
|
|
1509
|
+
console.warn("[ww-messenger] notification failed", _);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
@@ -1632,8 +1632,8 @@ const yt = {
|
|
|
1632
1632
|
if (!(i != null && i.id)) continue;
|
|
1633
1633
|
const l = i.last_message_at || "";
|
|
1634
1634
|
if (!l) continue;
|
|
1635
|
-
const
|
|
1636
|
-
l >
|
|
1635
|
+
const _ = n.get(i.id) || "";
|
|
1636
|
+
l > _ && r.push(i.id);
|
|
1637
1637
|
}
|
|
1638
1638
|
this._liveRevealConvSnapshot = new Map(
|
|
1639
1639
|
t.map((i) => [i.id, (i == null ? void 0 : i.last_message_at) || ""])
|
|
@@ -1642,7 +1642,7 @@ const yt = {
|
|
|
1642
1642
|
try {
|
|
1643
1643
|
const l = await ((s = (a = this.store).fetchSinceLast) == null ? void 0 : s.call(a, i));
|
|
1644
1644
|
if (!Array.isArray(l)) continue;
|
|
1645
|
-
for (const
|
|
1645
|
+
for (const _ of l) this.paceLiveMessage(_, i);
|
|
1646
1646
|
} catch (l) {
|
|
1647
1647
|
console.error(
|
|
1648
1648
|
"[ww-messenger] activity delta fetch failed",
|
|
@@ -1664,10 +1664,10 @@ const yt = {
|
|
|
1664
1664
|
this.nextRevealAt + n.pauseBetweenMs
|
|
1665
1665
|
) + s;
|
|
1666
1666
|
this.nextRevealAt = l;
|
|
1667
|
-
const
|
|
1668
|
-
this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !==
|
|
1669
|
-
},
|
|
1670
|
-
this.revealTimers.push(
|
|
1667
|
+
const _ = Math.max(0, l - r), k = e.id, w = setTimeout(() => {
|
|
1668
|
+
this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== w), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1669
|
+
}, _);
|
|
1670
|
+
this.revealTimers.push(w);
|
|
1671
1671
|
},
|
|
1672
1672
|
// Walk the message list and queue / instantly-reveal every new
|
|
1673
1673
|
// entry according to its origin. Used by the `currentConvMessages`
|
|
@@ -1689,8 +1689,8 @@ const yt = {
|
|
|
1689
1689
|
r[s.id] = n;
|
|
1690
1690
|
continue;
|
|
1691
1691
|
}
|
|
1692
|
-
const l = typeof (s == null ? void 0 : s.text_md) == "string" && s.text_md.trim().length > 0,
|
|
1693
|
-
if (!l && !
|
|
1692
|
+
const l = typeof (s == null ? void 0 : s.text_md) == "string" && s.text_md.trim().length > 0, _ = Array.isArray((a = s == null ? void 0 : s.payload) == null ? void 0 : a.attachments) && s.payload.attachments.length > 0;
|
|
1693
|
+
if (!l && !_) {
|
|
1694
1694
|
r[s.id] = n;
|
|
1695
1695
|
continue;
|
|
1696
1696
|
}
|
|
@@ -1893,12 +1893,12 @@ function zt(e, t, n, r, a, s) {
|
|
|
1893
1893
|
key: 0,
|
|
1894
1894
|
class: R(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1895
1895
|
}, [
|
|
1896
|
-
(c(!0), d(
|
|
1896
|
+
(c(!0), d(E, null, F(s.visiblePeeks, (l, _) => (c(), d("div", {
|
|
1897
1897
|
key: l.convId,
|
|
1898
1898
|
class: "wm-peek",
|
|
1899
1899
|
style: z({
|
|
1900
|
-
"--depth": s.visiblePeeks.length - 1 -
|
|
1901
|
-
zIndex:
|
|
1900
|
+
"--depth": s.visiblePeeks.length - 1 - _,
|
|
1901
|
+
zIndex: _ + 1
|
|
1902
1902
|
}),
|
|
1903
1903
|
role: "button",
|
|
1904
1904
|
tabindex: "0",
|
|
@@ -1941,7 +1941,7 @@ function zt(e, t, n, r, a, s) {
|
|
|
1941
1941
|
key: 0,
|
|
1942
1942
|
class: "wm-peek__avatarBadge",
|
|
1943
1943
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1944
|
-
}, v(l.count > 9 ? "9+" : l.count), 9, Et)) :
|
|
1944
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
|
|
1945
1945
|
]),
|
|
1946
1946
|
o("div", Bt, [
|
|
1947
1947
|
o("div", Pt, [
|
|
@@ -1956,7 +1956,7 @@ function zt(e, t, n, r, a, s) {
|
|
|
1956
1956
|
onClick: J((k) => e.$emit("open", l.convId), ["stop"])
|
|
1957
1957
|
}, v(s.t("common.open")), 9, Ft)
|
|
1958
1958
|
], 44, Rt))), 128))
|
|
1959
|
-
], 2)) :
|
|
1959
|
+
], 2)) : b("", !0)
|
|
1960
1960
|
]),
|
|
1961
1961
|
_: 1
|
|
1962
1962
|
}),
|
|
@@ -1987,7 +1987,7 @@ function zt(e, t, n, r, a, s) {
|
|
|
1987
1987
|
}) : s.t("launcher.unreadConversationsOne", {
|
|
1988
1988
|
count: n.unreadCount
|
|
1989
1989
|
})
|
|
1990
|
-
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ht)) :
|
|
1990
|
+
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ht)) : b("", !0)
|
|
1991
1991
|
], 8, jt)
|
|
1992
1992
|
], 32);
|
|
1993
1993
|
}
|
|
@@ -2033,7 +2033,7 @@ function Gt(e, t, n, r, a, s) {
|
|
|
2033
2033
|
"--wm-avr": n.size * 0.32 + "px"
|
|
2034
2034
|
})
|
|
2035
2035
|
}, [
|
|
2036
|
-
n.pulse ? (c(), d("div", Vt)) :
|
|
2036
|
+
n.pulse ? (c(), d("div", Vt)) : b("", !0),
|
|
2037
2037
|
o("div", {
|
|
2038
2038
|
class: R(["wm-aiav__inner", {
|
|
2039
2039
|
"wm-aiav__inner--glow": n.pulse,
|
|
@@ -2117,7 +2117,7 @@ function en(e, t, n, r, a, s) {
|
|
|
2117
2117
|
class: "wm-team__stack",
|
|
2118
2118
|
style: z({ width: s.stackWidth + "px" })
|
|
2119
2119
|
}, [
|
|
2120
|
-
(c(!0), d(
|
|
2120
|
+
(c(!0), d(E, null, F(n.members.slice(0, 3), (i, l) => (c(), d("div", {
|
|
2121
2121
|
key: l,
|
|
2122
2122
|
class: "wm-team__pill",
|
|
2123
2123
|
style: z({
|
|
@@ -2133,8 +2133,8 @@ function en(e, t, n, r, a, s) {
|
|
|
2133
2133
|
}, null, 8, Xt)) : (c(), d("span", Qt, v(s.initialsFor(i)), 1))
|
|
2134
2134
|
], 4))), 128))
|
|
2135
2135
|
], 4),
|
|
2136
|
-
n.responseLabel ? (c(), d("span", Zt, v(n.responseLabel), 1)) :
|
|
2137
|
-
])) :
|
|
2136
|
+
n.responseLabel ? (c(), d("span", Zt, v(n.responseLabel), 1)) : b("", !0)
|
|
2137
|
+
])) : b("", !0);
|
|
2138
2138
|
}
|
|
2139
2139
|
const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
|
|
2140
2140
|
name: "WmHeader",
|
|
@@ -2190,7 +2190,7 @@ function fn(e, t, n, r, a, s) {
|
|
|
2190
2190
|
type: "button",
|
|
2191
2191
|
class: "wm-header__icon",
|
|
2192
2192
|
"aria-label": s.t("header.backToHome"),
|
|
2193
|
-
onClick: t[0] || (t[0] = (
|
|
2193
|
+
onClick: t[0] || (t[0] = (_) => e.$emit("back"))
|
|
2194
2194
|
}, [...t[3] || (t[3] = [
|
|
2195
2195
|
o("svg", {
|
|
2196
2196
|
width: "13",
|
|
@@ -2206,7 +2206,7 @@ function fn(e, t, n, r, a, s) {
|
|
|
2206
2206
|
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2207
2207
|
], -1)
|
|
2208
2208
|
])], 8, rn)) : (c(), d("div", an)),
|
|
2209
|
-
n.showIdentity ? (c(), d(
|
|
2209
|
+
n.showIdentity ? (c(), d(E, { key: 2 }, [
|
|
2210
2210
|
o("div", on, [
|
|
2211
2211
|
V(i, {
|
|
2212
2212
|
size: 30,
|
|
@@ -2221,7 +2221,7 @@ function fn(e, t, n, r, a, s) {
|
|
|
2221
2221
|
key: 0,
|
|
2222
2222
|
members: s.displayedTeamMembers,
|
|
2223
2223
|
"response-label": ""
|
|
2224
|
-
}, null, 8, ["members"])) :
|
|
2224
|
+
}, null, 8, ["members"])) : b("", !0)
|
|
2225
2225
|
], 64)) : (c(), d("div", dn)),
|
|
2226
2226
|
o("div", un, [
|
|
2227
2227
|
n.showMore ? (c(), d("button", {
|
|
@@ -2230,7 +2230,7 @@ function fn(e, t, n, r, a, s) {
|
|
|
2230
2230
|
class: R(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
|
|
2231
2231
|
"aria-label": s.t("header.moreOptions"),
|
|
2232
2232
|
title: s.t("header.moreOptions"),
|
|
2233
|
-
onClick: t[1] || (t[1] = (
|
|
2233
|
+
onClick: t[1] || (t[1] = (_) => e.$emit("more"))
|
|
2234
2234
|
}, [...t[4] || (t[4] = [
|
|
2235
2235
|
o("svg", {
|
|
2236
2236
|
width: "13",
|
|
@@ -2255,14 +2255,14 @@ function fn(e, t, n, r, a, s) {
|
|
|
2255
2255
|
r: "1.6"
|
|
2256
2256
|
})
|
|
2257
2257
|
], -1)
|
|
2258
|
-
])], 10, hn)) :
|
|
2258
|
+
])], 10, hn)) : b("", !0),
|
|
2259
2259
|
n.showClose ? (c(), d("button", {
|
|
2260
2260
|
key: 1,
|
|
2261
2261
|
type: "button",
|
|
2262
2262
|
class: "wm-header__icon",
|
|
2263
2263
|
"aria-label": s.t("header.closeWidget"),
|
|
2264
2264
|
title: s.t("header.closeWidget"),
|
|
2265
|
-
onClick: t[2] || (t[2] = (
|
|
2265
|
+
onClick: t[2] || (t[2] = (_) => e.$emit("close"))
|
|
2266
2266
|
}, [...t[5] || (t[5] = [
|
|
2267
2267
|
o("svg", {
|
|
2268
2268
|
width: "13",
|
|
@@ -2277,7 +2277,7 @@ function fn(e, t, n, r, a, s) {
|
|
|
2277
2277
|
}, [
|
|
2278
2278
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2279
2279
|
], -1)
|
|
2280
|
-
])], 8, mn)) :
|
|
2280
|
+
])], 8, mn)) : b("", !0)
|
|
2281
2281
|
])
|
|
2282
2282
|
]);
|
|
2283
2283
|
}
|
|
@@ -2497,11 +2497,11 @@ function Yn(e, t, n, r, a, s) {
|
|
|
2497
2497
|
])
|
|
2498
2498
|
]),
|
|
2499
2499
|
s.unreadThreads.length ? (c(), d("div", kn, [
|
|
2500
|
-
(c(!0), d(
|
|
2500
|
+
(c(!0), d(E, null, F(s.unreadThreads, (l) => (c(), d("button", {
|
|
2501
2501
|
key: l.id,
|
|
2502
2502
|
type: "button",
|
|
2503
2503
|
class: "wm-onb__alert",
|
|
2504
|
-
onClick: (
|
|
2504
|
+
onClick: (_) => e.$emit("resume", l)
|
|
2505
2505
|
}, [
|
|
2506
2506
|
o("span", {
|
|
2507
2507
|
class: R(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
|
|
@@ -2532,18 +2532,18 @@ function Yn(e, t, n, r, a, s) {
|
|
|
2532
2532
|
o("span", Mn, [
|
|
2533
2533
|
o("span", Tn, v(l.title), 1),
|
|
2534
2534
|
o("span", xn, [
|
|
2535
|
-
s.senderLabel(l) ? (c(), d("span", On, v(s.senderLabel(l)) + " · ", 1)) :
|
|
2535
|
+
s.senderLabel(l) ? (c(), d("span", On, v(s.senderLabel(l)) + " · ", 1)) : b("", !0),
|
|
2536
2536
|
o("span", {
|
|
2537
2537
|
innerHTML: s.renderPreview(l.preview)
|
|
2538
2538
|
}, null, 8, Rn)
|
|
2539
2539
|
])
|
|
2540
2540
|
]),
|
|
2541
2541
|
o("span", Ln, [
|
|
2542
|
-
s.formatTs(l._ts) ? (c(), d("span", In, v(s.formatTs(l._ts)), 1)) :
|
|
2542
|
+
s.formatTs(l._ts) ? (c(), d("span", In, v(s.formatTs(l._ts)), 1)) : b("", !0),
|
|
2543
2543
|
o("span", En, v(s.t("onboarding.resume")), 1)
|
|
2544
2544
|
])
|
|
2545
2545
|
], 8, Cn))), 128))
|
|
2546
|
-
])) :
|
|
2546
|
+
])) : b("", !0),
|
|
2547
2547
|
o("div", Bn, [
|
|
2548
2548
|
o("button", {
|
|
2549
2549
|
type: "button",
|
|
@@ -2568,8 +2568,8 @@ function Yn(e, t, n, r, a, s) {
|
|
|
2568
2568
|
], -1)),
|
|
2569
2569
|
o("span", Un, v(n.busy ? "…" : s.t("onboarding.start")), 1)
|
|
2570
2570
|
], 8, Pn),
|
|
2571
|
-
(c(!0), d(
|
|
2572
|
-
key: "ql-" +
|
|
2571
|
+
(c(!0), d(E, null, F(n.quickLinks, (l, _) => (c(), d("button", {
|
|
2572
|
+
key: "ql-" + _,
|
|
2573
2573
|
type: "button",
|
|
2574
2574
|
class: "wm-onb__btn",
|
|
2575
2575
|
onClick: (k) => e.$emit("select", l)
|
|
@@ -2590,7 +2590,7 @@ function Yn(e, t, n, r, a, s) {
|
|
|
2590
2590
|
o("span", zn, v(l.label), 1),
|
|
2591
2591
|
s.isExternalLink(l) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
|
|
2592
2592
|
o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
|
|
2593
|
-
])])) :
|
|
2593
|
+
])])) : b("", !0)
|
|
2594
2594
|
], 8, Dn))), 128)),
|
|
2595
2595
|
n.openThreads.length ? (c(), d("button", {
|
|
2596
2596
|
key: 0,
|
|
@@ -2621,7 +2621,7 @@ function Yn(e, t, n, r, a, s) {
|
|
|
2621
2621
|
}, [
|
|
2622
2622
|
o("path", { d: "M9 18l6-6-6-6" })
|
|
2623
2623
|
], -1))
|
|
2624
|
-
])) :
|
|
2624
|
+
])) : b("", !0)
|
|
2625
2625
|
])
|
|
2626
2626
|
]);
|
|
2627
2627
|
}
|
|
@@ -2732,7 +2732,7 @@ function us(e, t, n, r, a, s) {
|
|
|
2732
2732
|
])
|
|
2733
2733
|
]),
|
|
2734
2734
|
o("div", ts, [
|
|
2735
|
-
(c(!0), d(
|
|
2735
|
+
(c(!0), d(E, null, F(s.filteredThreads, (i) => (c(), d("button", {
|
|
2736
2736
|
key: i.id,
|
|
2737
2737
|
type: "button",
|
|
2738
2738
|
class: R(["wm-hist__thread", { "wm-hist__thread--unread": i.unread }]),
|
|
@@ -2763,7 +2763,7 @@ function us(e, t, n, r, a, s) {
|
|
|
2763
2763
|
key: 2,
|
|
2764
2764
|
class: "wm-hist__thread-dot",
|
|
2765
2765
|
"aria-label": s.t("onboarding.unread")
|
|
2766
|
-
}, null, 8, rs)) :
|
|
2766
|
+
}, null, 8, rs)) : b("", !0)
|
|
2767
2767
|
], 2),
|
|
2768
2768
|
o("span", is, [
|
|
2769
2769
|
o("span", as, v(i.title), 1),
|
|
@@ -2773,7 +2773,7 @@ function us(e, t, n, r, a, s) {
|
|
|
2773
2773
|
}, null, 8, os)
|
|
2774
2774
|
]),
|
|
2775
2775
|
o("span", ls, [
|
|
2776
|
-
s.formatTs(i._ts) ? (c(), d("span", cs, v(s.formatTs(i._ts)), 1)) :
|
|
2776
|
+
s.formatTs(i._ts) ? (c(), d("span", cs, v(s.formatTs(i._ts)), 1)) : b("", !0),
|
|
2777
2777
|
t[3] || (t[3] = o("svg", {
|
|
2778
2778
|
width: "14",
|
|
2779
2779
|
height: "14",
|
|
@@ -2790,7 +2790,7 @@ function us(e, t, n, r, a, s) {
|
|
|
2790
2790
|
], -1))
|
|
2791
2791
|
])
|
|
2792
2792
|
], 10, ns))), 128)),
|
|
2793
|
-
s.filteredThreads.length ?
|
|
2793
|
+
s.filteredThreads.length ? b("", !0) : (c(), d("div", ds, v(a.query ? s.t("onboarding.noResults", { query: a.query }) : s.t("onboarding.noConversations")), 1))
|
|
2794
2794
|
])
|
|
2795
2795
|
]);
|
|
2796
2796
|
}
|
|
@@ -2889,13 +2889,13 @@ function Cs(e, t, n, r, a, s) {
|
|
|
2889
2889
|
]),
|
|
2890
2890
|
o("span", ws, [
|
|
2891
2891
|
o("span", bs, v(n.label), 1),
|
|
2892
|
-
s.detailText ? (c(), d(
|
|
2892
|
+
s.detailText ? (c(), d(E, { key: 0 }, [
|
|
2893
2893
|
t[4] || (t[4] = o("span", {
|
|
2894
2894
|
class: "wm-result__sep",
|
|
2895
2895
|
"aria-hidden": "true"
|
|
2896
2896
|
}, " · ", -1)),
|
|
2897
2897
|
o("span", ks, v(s.detailText), 1)
|
|
2898
|
-
], 64)) :
|
|
2898
|
+
], 64)) : b("", !0)
|
|
2899
2899
|
])
|
|
2900
2900
|
], 2);
|
|
2901
2901
|
}
|
|
@@ -2938,7 +2938,7 @@ function Is(e, t, n, r, a, s) {
|
|
|
2938
2938
|
])
|
|
2939
2939
|
]),
|
|
2940
2940
|
o("div", Rs, [
|
|
2941
|
-
(c(!0), d(
|
|
2941
|
+
(c(!0), d(E, null, F(s.fields, (i, l) => (c(), d("div", {
|
|
2942
2942
|
key: l,
|
|
2943
2943
|
class: "wm-art__field"
|
|
2944
2944
|
}, [
|
|
@@ -2989,11 +2989,11 @@ function Vs(e, t, n, r, a, s) {
|
|
|
2989
2989
|
alt: n.data.title || "",
|
|
2990
2990
|
loading: "lazy"
|
|
2991
2991
|
}, null, 8, Ds)
|
|
2992
|
-
])) :
|
|
2992
|
+
])) : b("", !0),
|
|
2993
2993
|
o("div", Ns, [
|
|
2994
2994
|
o("div", Fs, [
|
|
2995
2995
|
o("div", js, v(n.data.title), 1),
|
|
2996
|
-
n.data.subtitle ? (c(), d("div", Hs, v(n.data.subtitle), 1)) :
|
|
2996
|
+
n.data.subtitle ? (c(), d("div", Hs, v(n.data.subtitle), 1)) : b("", !0)
|
|
2997
2997
|
]),
|
|
2998
2998
|
n.data.badge && n.data.badge.label ? (c(), d("span", {
|
|
2999
2999
|
key: 0,
|
|
@@ -3001,11 +3001,11 @@ function Vs(e, t, n, r, a, s) {
|
|
|
3001
3001
|
"wm-art__badge",
|
|
3002
3002
|
`wm-art__badge--${n.data.badge.tone || "neutral"}`
|
|
3003
3003
|
])
|
|
3004
|
-
}, v(n.data.badge.label), 3)) :
|
|
3004
|
+
}, v(n.data.badge.label), 3)) : b("", !0)
|
|
3005
3005
|
]),
|
|
3006
3006
|
s.hasBody ? (c(), d("div", zs, [
|
|
3007
|
-
n.data.body ? (c(), d("div", qs, v(n.data.body), 1)) :
|
|
3008
|
-
s.fields.length ? (c(!0), d(
|
|
3007
|
+
n.data.body ? (c(), d("div", qs, v(n.data.body), 1)) : b("", !0),
|
|
3008
|
+
s.fields.length ? (c(!0), d(E, { key: 1 }, F(s.fields, (i, l) => (c(), d("div", {
|
|
3009
3009
|
key: l,
|
|
3010
3010
|
class: "wm-art__field"
|
|
3011
3011
|
}, [
|
|
@@ -3016,8 +3016,8 @@ function Vs(e, t, n, r, a, s) {
|
|
|
3016
3016
|
{ "wm-art__fieldValue--multi": i.multiline }
|
|
3017
3017
|
])
|
|
3018
3018
|
}, v(i.value), 3)
|
|
3019
|
-
]))), 128)) :
|
|
3020
|
-
])) :
|
|
3019
|
+
]))), 128)) : b("", !0)
|
|
3020
|
+
])) : b("", !0)
|
|
3021
3021
|
]);
|
|
3022
3022
|
}
|
|
3023
3023
|
const Ks = /* @__PURE__ */ P(Bs, [["render", Vs], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
@@ -3139,10 +3139,10 @@ function ar(e, t, n, r, a, s) {
|
|
|
3139
3139
|
Se(" " + v(n.data.status.label), 1)
|
|
3140
3140
|
], 2)
|
|
3141
3141
|
]),
|
|
3142
|
-
n.data.body ? (c(), d("div", er, v(n.data.body), 1)) :
|
|
3142
|
+
n.data.body ? (c(), d("div", er, v(n.data.body), 1)) : b("", !0)
|
|
3143
3143
|
]),
|
|
3144
3144
|
s.fields.length ? (c(), d("div", tr, [
|
|
3145
|
-
(c(!0), d(
|
|
3145
|
+
(c(!0), d(E, null, F(s.fields, (i, l) => (c(), d("div", {
|
|
3146
3146
|
key: l,
|
|
3147
3147
|
class: "wm-art__field"
|
|
3148
3148
|
}, [
|
|
@@ -3192,11 +3192,11 @@ function ar(e, t, n, r, a, s) {
|
|
|
3192
3192
|
rx: "2"
|
|
3193
3193
|
}, null, -1),
|
|
3194
3194
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
3195
|
-
])])) :
|
|
3195
|
+
])])) : b("", !0),
|
|
3196
3196
|
o("span", null, v(i.value), 1)
|
|
3197
3197
|
], 2)
|
|
3198
3198
|
]))), 128))
|
|
3199
|
-
])) :
|
|
3199
|
+
])) : b("", !0),
|
|
3200
3200
|
n.data.created_at ? (c(), d("div", ir, [
|
|
3201
3201
|
t[4] || (t[4] = o("svg", {
|
|
3202
3202
|
width: "11",
|
|
@@ -3219,7 +3219,7 @@ function ar(e, t, n, r, a, s) {
|
|
|
3219
3219
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
3220
3220
|
], -1)),
|
|
3221
3221
|
o("span", null, v(s.formattedDate), 1)
|
|
3222
|
-
])) :
|
|
3222
|
+
])) : b("", !0)
|
|
3223
3223
|
]);
|
|
3224
3224
|
}
|
|
3225
3225
|
const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
|
|
@@ -3245,7 +3245,7 @@ function dr(e, t, n, r, a, s) {
|
|
|
3245
3245
|
return s.component ? (c(), U(Ae(s.component), {
|
|
3246
3246
|
key: 0,
|
|
3247
3247
|
data: n.artifact.data
|
|
3248
|
-
}, null, 8, ["data"])) :
|
|
3248
|
+
}, null, 8, ["data"])) : b("", !0);
|
|
3249
3249
|
}
|
|
3250
3250
|
const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
|
|
3251
3251
|
name: "WmAttachmentPreview",
|
|
@@ -3377,9 +3377,9 @@ function kr(e, t, n, r, a, s) {
|
|
|
3377
3377
|
], -1)),
|
|
3378
3378
|
o("span", vr, [
|
|
3379
3379
|
o("span", yr, v(s.displayName), 1),
|
|
3380
|
-
s.sizeLabel ? (c(), d("span", wr, v(s.sizeLabel), 1)) :
|
|
3380
|
+
s.sizeLabel ? (c(), d("span", wr, v(s.sizeLabel), 1)) : b("", !0)
|
|
3381
3381
|
]),
|
|
3382
|
-
a.loading ? (c(), d("span", br)) :
|
|
3382
|
+
a.loading ? (c(), d("span", br)) : b("", !0)
|
|
3383
3383
|
], 8, pr))
|
|
3384
3384
|
], 2);
|
|
3385
3385
|
}
|
|
@@ -3508,8 +3508,8 @@ const Ir = {
|
|
|
3508
3508
|
const l = this.roleOf(i);
|
|
3509
3509
|
if (l === "system") {
|
|
3510
3510
|
if (((n = i == null ? void 0 : i.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3511
|
-
const
|
|
3512
|
-
|
|
3511
|
+
const w = e[e.length - 1];
|
|
3512
|
+
w && w.role === "ai" ? w.messages.push(i) : e.push({
|
|
3513
3513
|
key: `g-${ee(i)}`,
|
|
3514
3514
|
role: "ai",
|
|
3515
3515
|
agentName: "",
|
|
@@ -3528,8 +3528,8 @@ const Ir = {
|
|
|
3528
3528
|
});
|
|
3529
3529
|
continue;
|
|
3530
3530
|
}
|
|
3531
|
-
const
|
|
3532
|
-
|
|
3531
|
+
const _ = e[e.length - 1];
|
|
3532
|
+
_ && _.role === l && (l === "ai" || _.agentName === (((r = i == null ? void 0 : i.author) == null ? void 0 : r.name) || "")) ? _.messages.push(i) : e.push({
|
|
3533
3533
|
key: `g-${ee(i)}`,
|
|
3534
3534
|
role: l,
|
|
3535
3535
|
agentName: ((a = i == null ? void 0 : i.author) == null ? void 0 : a.name) || "",
|
|
@@ -3541,8 +3541,8 @@ const Ir = {
|
|
|
3541
3541
|
for (const i of e) {
|
|
3542
3542
|
if (i.role === "system") continue;
|
|
3543
3543
|
const l = [];
|
|
3544
|
-
for (const
|
|
3545
|
-
for (const k of this.itemsOf(
|
|
3544
|
+
for (const _ of i.messages)
|
|
3545
|
+
for (const k of this.itemsOf(_)) l.push(k);
|
|
3546
3546
|
i.items = l;
|
|
3547
3547
|
}
|
|
3548
3548
|
const t = [];
|
|
@@ -3828,9 +3828,9 @@ const Ir = {
|
|
|
3828
3828
|
// doit garder son arrondi.
|
|
3829
3829
|
cornersFor(e, t) {
|
|
3830
3830
|
var Q, se, re;
|
|
3831
|
-
const n = e.items, r = (Q = n[t]) == null ? void 0 : Q.kind, a = (se = n[t - 1]) == null ? void 0 : se.kind, s = (re = n[t + 1]) == null ? void 0 : re.kind, i = e.role === "user", l = 14,
|
|
3832
|
-
let D = l, N = l,
|
|
3833
|
-
return i ? (k && (N =
|
|
3831
|
+
const n = e.items, r = (Q = n[t]) == null ? void 0 : Q.kind, a = (se = n[t - 1]) == null ? void 0 : se.kind, s = (re = n[t + 1]) == null ? void 0 : re.kind, i = e.role === "user", l = 14, _ = 4, k = a == null ? void 0 : a.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], L = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = (W, ie, X) => W != null && T != null ? W + q >= T : ie === X || ie === "card" && X === "bubble";
|
|
3832
|
+
let D = l, N = l, I = l, K = l;
|
|
3833
|
+
return i ? (k && (N = _), (w || !s) && (I = _), k && M(L, k, r == null ? void 0 : r.top) && (D = _), w && M(A, w, r == null ? void 0 : r.bottom) && (K = _)) : (k && (D = _), (w || !s) && (K = _), k && M(L, k, r == null ? void 0 : r.top) && (N = _), w && M(A, w, r == null ? void 0 : r.bottom) && (I = _)), { tl: D, tr: N, br: I, bl: K };
|
|
3834
3834
|
},
|
|
3835
3835
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3836
3836
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -3840,6 +3840,28 @@ const Ir = {
|
|
|
3840
3840
|
mosaicGridStyle(e) {
|
|
3841
3841
|
return !e || e < 2 ? null : { "grid-template-columns": `repeat(${Math.min(e, 4)}, 1fr)` };
|
|
3842
3842
|
},
|
|
3843
|
+
// Per-cell corner radius for a mosaic tile. The grid as a whole
|
|
3844
|
+
// should read as a single rounded rectangle made of N tiles :
|
|
3845
|
+
// only the cells sitting on the OUTER edge of the grid keep a
|
|
3846
|
+
// rounded corner, every internal corner where two tiles meet
|
|
3847
|
+
// collapses to a small radius. `mixed` flags that a text
|
|
3848
|
+
// bubble sits above the mosaic — in that case the top edge of
|
|
3849
|
+
// the grid is connected to the bubble's flat bottom, so the
|
|
3850
|
+
// top corners of every top-row cell flatten too. Returned as
|
|
3851
|
+
// `--wm-r-*` CSS vars which AttachmentPreview's image wrap /
|
|
3852
|
+
// file card / audio / video all consume natively.
|
|
3853
|
+
mosaicCornerStyle(e, t, n) {
|
|
3854
|
+
if (!t || t < 2) return null;
|
|
3855
|
+
const r = Math.min(t, 4), a = Math.floor(e / r), s = e % r, i = s > 0, l = s < r - 1 && e + 1 < t, _ = a > 0, k = e + r < t, w = 2, T = 12;
|
|
3856
|
+
let L = !i && !_ ? T : w, A = !l && !_ ? T : w;
|
|
3857
|
+
const q = !i && !k ? T : w, M = !l && !k ? T : w;
|
|
3858
|
+
return n && !_ && (L = w, A = w), {
|
|
3859
|
+
"--wm-r-tl": `${L}px`,
|
|
3860
|
+
"--wm-r-tr": `${A}px`,
|
|
3861
|
+
"--wm-r-br": `${M}px`,
|
|
3862
|
+
"--wm-r-bl": `${q}px`
|
|
3863
|
+
};
|
|
3864
|
+
},
|
|
3843
3865
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3844
3866
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
3845
3867
|
// ArtifactRenderer. Returns null for single-item clusters so
|
|
@@ -3885,8 +3907,8 @@ const Ir = {
|
|
|
3885
3907
|
".wm-bubble, .wm-result, .wm-art, .wm-list__body"
|
|
3886
3908
|
);
|
|
3887
3909
|
if (!l) continue;
|
|
3888
|
-
const
|
|
3889
|
-
|
|
3910
|
+
const _ = l.getBoundingClientRect().width;
|
|
3911
|
+
_ > 0 && (t[i] = _);
|
|
3890
3912
|
}
|
|
3891
3913
|
const n = this.widthByKey, r = Object.keys(n), a = Object.keys(t);
|
|
3892
3914
|
if (r.length === a.length) {
|
|
@@ -4019,7 +4041,7 @@ const Ir = {
|
|
|
4019
4041
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4020
4042
|
}, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
|
|
4021
4043
|
function si(e, t, n, r, a, s) {
|
|
4022
|
-
const i = B("AIAvatar"), l = B("HumanAvatar"),
|
|
4044
|
+
const i = B("AIAvatar"), l = B("HumanAvatar"), _ = B("ActionResult"), k = B("ArtifactRenderer"), w = B("Bubble"), T = B("AttachmentPreview"), L = B("Typing");
|
|
4023
4045
|
return c(), d("div", Ur, [
|
|
4024
4046
|
o("div", {
|
|
4025
4047
|
ref: "scrollEl",
|
|
@@ -4032,20 +4054,20 @@ function si(e, t, n, r, a, s) {
|
|
|
4032
4054
|
"aria-hidden": "true"
|
|
4033
4055
|
}, null, -1)),
|
|
4034
4056
|
o("span", Nr, v(s.t("messageList.loadingHistory")), 1)
|
|
4035
|
-
])) : s.historyExhausted ? (c(), d("div", Fr, v(s.t("messageList.conversationStart")), 1)) :
|
|
4057
|
+
])) : s.historyExhausted ? (c(), d("div", Fr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
4036
4058
|
n.dateLabel ? (c(), d("div", jr, [
|
|
4037
4059
|
t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
4038
4060
|
o("span", Hr, v(n.dateLabel), 1),
|
|
4039
4061
|
t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
|
|
4040
|
-
])) :
|
|
4041
|
-
(c(!0), d(
|
|
4062
|
+
])) : b("", !0),
|
|
4063
|
+
(c(!0), d(E, null, F(s.groups, (A, q) => (c(), d(E, {
|
|
4042
4064
|
key: A.key
|
|
4043
4065
|
}, [
|
|
4044
4066
|
A.key === s.unreadGroupKey ? (c(), d("div", zr, [
|
|
4045
4067
|
t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
4046
4068
|
o("span", qr, v(s.t("messageList.unread")), 1),
|
|
4047
4069
|
t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
4048
|
-
])) :
|
|
4070
|
+
])) : b("", !0),
|
|
4049
4071
|
A.role === "system" || A.items.length ? (c(), d("div", {
|
|
4050
4072
|
key: 1,
|
|
4051
4073
|
class: R(["wm-list__group", "wm-list__group--" + A.role])
|
|
@@ -4054,8 +4076,8 @@ function si(e, t, n, r, a, s) {
|
|
|
4054
4076
|
t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4055
4077
|
o("span", Vr, v(A.systemLabel), 1),
|
|
4056
4078
|
t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4057
|
-
])) : (c(), d(
|
|
4058
|
-
(c(!0), d(
|
|
4079
|
+
])) : (c(), d(E, { key: 1 }, [
|
|
4080
|
+
(c(!0), d(E, null, F(A.items, (M, D) => (c(), d(E, {
|
|
4059
4081
|
key: `${s.messageKey(M.message)}-${M.partKey}`
|
|
4060
4082
|
}, [
|
|
4061
4083
|
o("div", {
|
|
@@ -4076,7 +4098,7 @@ function si(e, t, n, r, a, s) {
|
|
|
4076
4098
|
}, ["prevent"]))
|
|
4077
4099
|
}, [
|
|
4078
4100
|
A.role !== "user" ? (c(), d("div", Wr, [
|
|
4079
|
-
D === A.items.length - 1 ? (c(), d(
|
|
4101
|
+
D === A.items.length - 1 ? (c(), d(E, { key: 0 }, [
|
|
4080
4102
|
A.role === "ai" ? (c(), U(i, {
|
|
4081
4103
|
key: 0,
|
|
4082
4104
|
size: 26,
|
|
@@ -4090,14 +4112,14 @@ function si(e, t, n, r, a, s) {
|
|
|
4090
4112
|
size: 26,
|
|
4091
4113
|
tail: !0
|
|
4092
4114
|
}, null, 8, ["name", "avatar-url"]))
|
|
4093
|
-
], 64)) :
|
|
4094
|
-
])) :
|
|
4095
|
-
M.renderAs === "action" ? (c(), U(
|
|
4115
|
+
], 64)) : b("", !0)
|
|
4116
|
+
])) : b("", !0),
|
|
4117
|
+
M.renderAs === "action" ? (c(), U(_, {
|
|
4096
4118
|
key: 1,
|
|
4097
4119
|
state: M.message.payload.state,
|
|
4098
4120
|
label: s.actionLabel(M.message),
|
|
4099
4121
|
detail: s.actionDetail(M.message)
|
|
4100
|
-
}, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(
|
|
4122
|
+
}, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(_, {
|
|
4101
4123
|
key: 2,
|
|
4102
4124
|
state: "awaiting",
|
|
4103
4125
|
label: s.t("messageList.approvalRequestSent"),
|
|
@@ -4114,11 +4136,11 @@ function si(e, t, n, r, a, s) {
|
|
|
4114
4136
|
"wm-list__body--mixed": !!M.message.text_md && s.attachmentsOf(M.message).length > 0
|
|
4115
4137
|
}])
|
|
4116
4138
|
}, [
|
|
4117
|
-
M.message.text_md ? (c(), U(
|
|
4139
|
+
M.message.text_md ? (c(), U(w, {
|
|
4118
4140
|
key: 0,
|
|
4119
4141
|
role: A.role,
|
|
4120
4142
|
text: M.message.text_md
|
|
4121
|
-
}, null, 8, ["role", "text"])) :
|
|
4143
|
+
}, null, 8, ["role", "text"])) : b("", !0),
|
|
4122
4144
|
s.attachmentsOf(M.message).length ? (c(), d("div", {
|
|
4123
4145
|
key: 1,
|
|
4124
4146
|
class: R(["wm-list__atts", {
|
|
@@ -4131,34 +4153,41 @@ function si(e, t, n, r, a, s) {
|
|
|
4131
4153
|
)
|
|
4132
4154
|
)
|
|
4133
4155
|
}, [
|
|
4134
|
-
(c(!0), d(
|
|
4156
|
+
(c(!0), d(E, null, F(s.attachmentsOf(
|
|
4135
4157
|
M.message
|
|
4136
|
-
), (N,
|
|
4137
|
-
key: `${s.messageKey(M.message)}-att-${
|
|
4138
|
-
attachment: N
|
|
4139
|
-
|
|
4140
|
-
|
|
4158
|
+
), (N, I) => (c(), U(T, {
|
|
4159
|
+
key: `${s.messageKey(M.message)}-att-${I}`,
|
|
4160
|
+
attachment: N,
|
|
4161
|
+
style: z(
|
|
4162
|
+
s.mosaicCornerStyle(
|
|
4163
|
+
I,
|
|
4164
|
+
s.attachmentsOf(M.message).length,
|
|
4165
|
+
!!M.message.text_md
|
|
4166
|
+
)
|
|
4167
|
+
)
|
|
4168
|
+
}, null, 8, ["attachment", "style"]))), 128))
|
|
4169
|
+
], 6)) : b("", !0)
|
|
4141
4170
|
], 2))
|
|
4142
4171
|
], 46, Kr),
|
|
4143
4172
|
D < A.items.length - 1 && a.pressedItemKey === `${s.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || s.timeOf(M.message)) ? (c(), d("div", {
|
|
4144
4173
|
key: 0,
|
|
4145
4174
|
class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
4146
4175
|
}, [
|
|
4147
|
-
A.role !== "user" ? (c(), d("span", Gr, v(s.roleLabel(A)), 1)) :
|
|
4148
|
-
A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", Yr, "•")) :
|
|
4149
|
-
s.timeOf(M.message) ? (c(), d("span", Jr, v(s.timeOf(M.message)), 1)) :
|
|
4150
|
-
], 2)) :
|
|
4176
|
+
A.role !== "user" ? (c(), d("span", Gr, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
4177
|
+
A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", Yr, "•")) : b("", !0),
|
|
4178
|
+
s.timeOf(M.message) ? (c(), d("span", Jr, v(s.timeOf(M.message)), 1)) : b("", !0)
|
|
4179
|
+
], 2)) : b("", !0)
|
|
4151
4180
|
], 64))), 128)),
|
|
4152
4181
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), d("div", {
|
|
4153
4182
|
key: 0,
|
|
4154
4183
|
class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
4155
4184
|
}, [
|
|
4156
|
-
A.role !== "user" ? (c(), d("span", Xr, v(s.roleLabel(A)), 1)) :
|
|
4157
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Qr, "•")) :
|
|
4158
|
-
s.lastTimeOf(A) ? (c(), d("span", Zr, v(s.lastTimeOf(A)), 1)) :
|
|
4159
|
-
], 2)) :
|
|
4185
|
+
A.role !== "user" ? (c(), d("span", Xr, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
4186
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : b("", !0),
|
|
4187
|
+
s.lastTimeOf(A) ? (c(), d("span", Zr, v(s.lastTimeOf(A)), 1)) : b("", !0)
|
|
4188
|
+
], 2)) : b("", !0)
|
|
4160
4189
|
], 64))
|
|
4161
|
-
], 2)) :
|
|
4190
|
+
], 2)) : b("", !0)
|
|
4162
4191
|
], 64))), 128)),
|
|
4163
4192
|
n.streamingActive ? (c(), d("div", ei, [
|
|
4164
4193
|
o("div", ti, [
|
|
@@ -4169,8 +4198,8 @@ function si(e, t, n, r, a, s) {
|
|
|
4169
4198
|
"image-url": n.aiAgentAvatarUrl
|
|
4170
4199
|
}, null, 8, ["name", "image-url"])
|
|
4171
4200
|
]),
|
|
4172
|
-
V(
|
|
4173
|
-
])) :
|
|
4201
|
+
V(L)
|
|
4202
|
+
])) : b("", !0)
|
|
4174
4203
|
], 34),
|
|
4175
4204
|
V(Ne, { name: "wm-scrollDown" }, {
|
|
4176
4205
|
default: Fe(() => [
|
|
@@ -4195,13 +4224,13 @@ function si(e, t, n, r, a, s) {
|
|
|
4195
4224
|
}, [
|
|
4196
4225
|
o("path", { d: "M6 9l6 6 6-6" })
|
|
4197
4226
|
], -1)
|
|
4198
|
-
])], 8, ni)) :
|
|
4227
|
+
])], 8, ni)) : b("", !0)
|
|
4199
4228
|
]),
|
|
4200
4229
|
_: 1
|
|
4201
4230
|
})
|
|
4202
4231
|
]);
|
|
4203
4232
|
}
|
|
4204
|
-
const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-
|
|
4233
|
+
const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-8fa8d0bd"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4205
4234
|
function ii() {
|
|
4206
4235
|
return Oe && [
|
|
4207
4236
|
"video/webm;codecs=vp9,opus",
|
|
@@ -4250,9 +4279,9 @@ async function oi(e) {
|
|
|
4250
4279
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
4251
4280
|
const n = t.videoWidth || 1280, r = t.videoHeight || 720, a = document.createElement("canvas");
|
|
4252
4281
|
a.width = n, a.height = r, a.getContext("2d").drawImage(t, 0, 0, n, r);
|
|
4253
|
-
const s = await new Promise((l,
|
|
4282
|
+
const s = await new Promise((l, _) => {
|
|
4254
4283
|
a.toBlob(
|
|
4255
|
-
(k) => k ? l(k) :
|
|
4284
|
+
(k) => k ? l(k) : _(new Error("toBlob failed")),
|
|
4256
4285
|
"image/png"
|
|
4257
4286
|
);
|
|
4258
4287
|
}), i = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
@@ -4266,56 +4295,56 @@ async function li(e = {}) {
|
|
|
4266
4295
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
4267
4296
|
$e({ audio: !0 })
|
|
4268
4297
|
);
|
|
4269
|
-
} catch (
|
|
4270
|
-
return (
|
|
4298
|
+
} catch (w) {
|
|
4299
|
+
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
4271
4300
|
}
|
|
4272
4301
|
const n = ii();
|
|
4273
4302
|
let r;
|
|
4274
4303
|
try {
|
|
4275
4304
|
r = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
4276
|
-
} catch (
|
|
4277
|
-
return console.error("[media] recorder init",
|
|
4305
|
+
} catch (w) {
|
|
4306
|
+
return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
|
|
4278
4307
|
T.stop();
|
|
4279
4308
|
}), null;
|
|
4280
4309
|
}
|
|
4281
4310
|
const a = [];
|
|
4282
4311
|
let s = null, i = !1;
|
|
4283
|
-
r.addEventListener("dataavailable", (
|
|
4284
|
-
|
|
4312
|
+
r.addEventListener("dataavailable", (w) => {
|
|
4313
|
+
w.data && w.data.size > 0 && a.push(w.data);
|
|
4285
4314
|
}), r.addEventListener("stop", () => {
|
|
4286
|
-
var
|
|
4287
|
-
if (s && clearInterval(s), t.getTracks().forEach((
|
|
4288
|
-
|
|
4315
|
+
var w, T;
|
|
4316
|
+
if (s && clearInterval(s), t.getTracks().forEach((L) => {
|
|
4317
|
+
L.stop();
|
|
4289
4318
|
}), a.length) {
|
|
4290
|
-
const
|
|
4291
|
-
type:
|
|
4319
|
+
const L = r.mimeType || n || "video/webm", A = new Blob(a, { type: L }), q = /mp4/.test(L) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${q}`, {
|
|
4320
|
+
type: L
|
|
4292
4321
|
});
|
|
4293
|
-
(
|
|
4322
|
+
(w = e.onfinalize) == null || w.call(e, D);
|
|
4294
4323
|
} else
|
|
4295
4324
|
(T = e.oncancel) == null || T.call(e);
|
|
4296
|
-
}), t.getVideoTracks().forEach((
|
|
4297
|
-
|
|
4325
|
+
}), t.getVideoTracks().forEach((w) => {
|
|
4326
|
+
w.addEventListener("ended", () => l(), { once: !0 });
|
|
4298
4327
|
});
|
|
4299
4328
|
function l() {
|
|
4300
4329
|
if (!i && (i = !0, r.state !== "inactive"))
|
|
4301
4330
|
try {
|
|
4302
4331
|
r.stop();
|
|
4303
|
-
} catch (
|
|
4304
|
-
console.error("[media] recorder stop",
|
|
4332
|
+
} catch (w) {
|
|
4333
|
+
console.error("[media] recorder stop", w);
|
|
4305
4334
|
}
|
|
4306
4335
|
}
|
|
4307
4336
|
try {
|
|
4308
4337
|
r.start(1e3);
|
|
4309
|
-
} catch (
|
|
4310
|
-
return console.error("[media] recorder start",
|
|
4338
|
+
} catch (w) {
|
|
4339
|
+
return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
|
|
4311
4340
|
T.stop();
|
|
4312
4341
|
}), null;
|
|
4313
4342
|
}
|
|
4314
4343
|
(k = e.onstart) == null || k.call(e);
|
|
4315
|
-
const
|
|
4344
|
+
const _ = Date.now();
|
|
4316
4345
|
return s = setInterval(() => {
|
|
4317
|
-
var
|
|
4318
|
-
(
|
|
4346
|
+
var w;
|
|
4347
|
+
(w = e.ontick) == null || w.call(e, Date.now() - _);
|
|
4319
4348
|
}, 500), {
|
|
4320
4349
|
stop: l,
|
|
4321
4350
|
get state() {
|
|
@@ -4524,7 +4553,7 @@ function ki(e, t, n, r, a, s) {
|
|
|
4524
4553
|
class: "wm-rec__stop",
|
|
4525
4554
|
onClick: t[0] || (t[0] = (...i) => s.stopRecording && s.stopRecording(...i))
|
|
4526
4555
|
}, v(s.t("composer.stop")), 1)
|
|
4527
|
-
])) :
|
|
4556
|
+
])) : b("", !0),
|
|
4528
4557
|
o("form", {
|
|
4529
4558
|
class: R(["wm-compose", { "has-attach": a.attachOpen }]),
|
|
4530
4559
|
onSubmit: t[7] || (t[7] = J((...i) => s.onSubmit && s.onSubmit(...i), ["prevent"]))
|
|
@@ -4540,9 +4569,9 @@ function ki(e, t, n, r, a, s) {
|
|
|
4540
4569
|
key: 0,
|
|
4541
4570
|
class: "wm-compose__overlay",
|
|
4542
4571
|
onClick: t[2] || (t[2] = (i) => a.attachOpen = !1)
|
|
4543
|
-
})) :
|
|
4572
|
+
})) : b("", !0),
|
|
4544
4573
|
a.attachOpen ? (c(), d("div", mi, [
|
|
4545
|
-
(c(!0), d(
|
|
4574
|
+
(c(!0), d(E, null, F(s.attachItems, (i) => (c(), d("button", {
|
|
4546
4575
|
key: i.action,
|
|
4547
4576
|
type: "button",
|
|
4548
4577
|
class: "wm-compose__menuItem",
|
|
@@ -4563,7 +4592,7 @@ function ki(e, t, n, r, a, s) {
|
|
|
4563
4592
|
]),
|
|
4564
4593
|
o("span", null, v(i.label), 1)
|
|
4565
4594
|
], 8, fi))), 128))
|
|
4566
|
-
])) :
|
|
4595
|
+
])) : b("", !0),
|
|
4567
4596
|
G(o("textarea", {
|
|
4568
4597
|
ref: "inputEl",
|
|
4569
4598
|
"onUpdate:modelValue": t[3] || (t[3] = (i) => a.local = i),
|
|
@@ -4646,14 +4675,14 @@ function Mi(e, t, n, r, a, s) {
|
|
|
4646
4675
|
key: s.batchKey,
|
|
4647
4676
|
class: "wm-chips"
|
|
4648
4677
|
}, [
|
|
4649
|
-
(c(!0), d(
|
|
4678
|
+
(c(!0), d(E, null, F(n.items, (i, l) => (c(), d("button", {
|
|
4650
4679
|
key: l,
|
|
4651
4680
|
type: "button",
|
|
4652
4681
|
class: "wm-chip",
|
|
4653
4682
|
style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4654
|
-
onClick: (
|
|
4683
|
+
onClick: (_) => e.$emit("select", i)
|
|
4655
4684
|
}, v(i.label), 13, Si))), 128))
|
|
4656
|
-
])) :
|
|
4685
|
+
])) : b("", !0);
|
|
4657
4686
|
}
|
|
4658
4687
|
const Ti = /* @__PURE__ */ P(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), xi = {
|
|
4659
4688
|
name: "WmApprovalCard",
|
|
@@ -4716,7 +4745,7 @@ function Ui(e, t, n, r, a, s) {
|
|
|
4716
4745
|
]),
|
|
4717
4746
|
o("div", Ii, [
|
|
4718
4747
|
o("div", Ei, v(n.action), 1),
|
|
4719
|
-
n.detail ? (c(), d("div", Bi, v(n.detail), 1)) :
|
|
4748
|
+
n.detail ? (c(), d("div", Bi, v(n.detail), 1)) : b("", !0)
|
|
4720
4749
|
])
|
|
4721
4750
|
]),
|
|
4722
4751
|
o("div", Pi, [
|
|
@@ -4725,13 +4754,13 @@ function Ui(e, t, n, r, a, s) {
|
|
|
4725
4754
|
type: "button",
|
|
4726
4755
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4727
4756
|
onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
|
|
4728
|
-
}, v(s.rejectLabel), 1)) :
|
|
4757
|
+
}, v(s.rejectLabel), 1)) : b("", !0),
|
|
4729
4758
|
s.approveId ? (c(), d("button", {
|
|
4730
4759
|
key: 1,
|
|
4731
4760
|
type: "button",
|
|
4732
4761
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4733
4762
|
onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
|
|
4734
|
-
}, v(s.approveLabel), 1)) :
|
|
4763
|
+
}, v(s.approveLabel), 1)) : b("", !0)
|
|
4735
4764
|
])
|
|
4736
4765
|
]);
|
|
4737
4766
|
}
|
|
@@ -4868,14 +4897,14 @@ function ca(e, t, n, r, a, s) {
|
|
|
4868
4897
|
]),
|
|
4869
4898
|
o("div", qi, [
|
|
4870
4899
|
o("div", $i, v(n.form.title || s.t("form.title")), 1),
|
|
4871
|
-
n.form.description ? (c(), d("div", Vi, v(n.form.description), 1)) :
|
|
4900
|
+
n.form.description ? (c(), d("div", Vi, v(n.form.description), 1)) : b("", !0)
|
|
4872
4901
|
])
|
|
4873
4902
|
]),
|
|
4874
4903
|
o("form", {
|
|
4875
4904
|
class: "wm-form__body",
|
|
4876
4905
|
onSubmit: t[0] || (t[0] = J((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4877
4906
|
}, [
|
|
4878
|
-
(c(!0), d(
|
|
4907
|
+
(c(!0), d(E, null, F(s.normalizedFields, (l) => (c(), d("div", {
|
|
4879
4908
|
key: l.key,
|
|
4880
4909
|
class: "wm-form__field"
|
|
4881
4910
|
}, [
|
|
@@ -4884,12 +4913,12 @@ function ca(e, t, n, r, a, s) {
|
|
|
4884
4913
|
class: "wm-form__label"
|
|
4885
4914
|
}, [
|
|
4886
4915
|
Se(v(l.label), 1),
|
|
4887
|
-
l.required ? (c(), d("span", Wi, "*")) :
|
|
4916
|
+
l.required ? (c(), d("span", Wi, "*")) : b("", !0)
|
|
4888
4917
|
], 8, Ki),
|
|
4889
4918
|
l.type === "text" ? G((c(), d("input", {
|
|
4890
4919
|
key: 0,
|
|
4891
4920
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
4892
|
-
"onUpdate:modelValue": (
|
|
4921
|
+
"onUpdate:modelValue": (_) => a.values[l.key] = _,
|
|
4893
4922
|
type: "text",
|
|
4894
4923
|
class: "wm-form__input",
|
|
4895
4924
|
placeholder: l.placeholder || "",
|
|
@@ -4900,7 +4929,7 @@ function ca(e, t, n, r, a, s) {
|
|
|
4900
4929
|
]) : l.type === "textarea" ? G((c(), d("textarea", {
|
|
4901
4930
|
key: 1,
|
|
4902
4931
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
4903
|
-
"onUpdate:modelValue": (
|
|
4932
|
+
"onUpdate:modelValue": (_) => a.values[l.key] = _,
|
|
4904
4933
|
class: "wm-form__textarea",
|
|
4905
4934
|
rows: "3",
|
|
4906
4935
|
placeholder: l.placeholder || "",
|
|
@@ -4911,7 +4940,7 @@ function ca(e, t, n, r, a, s) {
|
|
|
4911
4940
|
]) : l.type === "number" ? G((c(), d("input", {
|
|
4912
4941
|
key: 2,
|
|
4913
4942
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
4914
|
-
"onUpdate:modelValue": (
|
|
4943
|
+
"onUpdate:modelValue": (_) => a.values[l.key] = _,
|
|
4915
4944
|
type: "number",
|
|
4916
4945
|
class: "wm-form__input",
|
|
4917
4946
|
placeholder: l.placeholder || "",
|
|
@@ -4927,7 +4956,7 @@ function ca(e, t, n, r, a, s) {
|
|
|
4927
4956
|
]) : l.type === "date" ? G((c(), d("input", {
|
|
4928
4957
|
key: 3,
|
|
4929
4958
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
4930
|
-
"onUpdate:modelValue": (
|
|
4959
|
+
"onUpdate:modelValue": (_) => a.values[l.key] = _,
|
|
4931
4960
|
type: "date",
|
|
4932
4961
|
class: "wm-form__input",
|
|
4933
4962
|
required: l.required,
|
|
@@ -4937,7 +4966,7 @@ function ca(e, t, n, r, a, s) {
|
|
|
4937
4966
|
]) : l.type === "boolean" ? (c(), d("label", Qi, [
|
|
4938
4967
|
G(o("input", {
|
|
4939
4968
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
4940
|
-
"onUpdate:modelValue": (
|
|
4969
|
+
"onUpdate:modelValue": (_) => a.values[l.key] = _,
|
|
4941
4970
|
type: "checkbox",
|
|
4942
4971
|
disabled: n.readOnly || a.busy
|
|
4943
4972
|
}, null, 8, Zi), [
|
|
@@ -4947,46 +4976,46 @@ function ca(e, t, n, r, a, s) {
|
|
|
4947
4976
|
])) : l.type === "select" ? G((c(), d("select", {
|
|
4948
4977
|
key: 5,
|
|
4949
4978
|
id: `wm-f-${a._uid}-${l.key}`,
|
|
4950
|
-
"onUpdate:modelValue": (
|
|
4979
|
+
"onUpdate:modelValue": (_) => a.values[l.key] = _,
|
|
4951
4980
|
class: "wm-form__select",
|
|
4952
4981
|
required: l.required,
|
|
4953
4982
|
disabled: n.readOnly || a.busy
|
|
4954
4983
|
}, [
|
|
4955
4984
|
o("option", ta, v(l.placeholder || s.t("form.choose")), 1),
|
|
4956
|
-
(c(!0), d(
|
|
4957
|
-
key:
|
|
4958
|
-
value:
|
|
4959
|
-
}, v(
|
|
4985
|
+
(c(!0), d(E, null, F(l.options, (_) => (c(), d("option", {
|
|
4986
|
+
key: _.value,
|
|
4987
|
+
value: _.value
|
|
4988
|
+
}, v(_.label), 9, na))), 128))
|
|
4960
4989
|
], 8, ea)), [
|
|
4961
4990
|
[Ge, a.values[l.key]]
|
|
4962
4991
|
]) : l.type === "multiselect" ? (c(), d("div", sa, [
|
|
4963
|
-
(c(!0), d(
|
|
4964
|
-
key:
|
|
4992
|
+
(c(!0), d(E, null, F(l.options, (_) => (c(), d("label", {
|
|
4993
|
+
key: _.value,
|
|
4965
4994
|
class: "wm-form__multiItem"
|
|
4966
4995
|
}, [
|
|
4967
4996
|
o("input", {
|
|
4968
4997
|
type: "checkbox",
|
|
4969
|
-
value:
|
|
4970
|
-
checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(
|
|
4998
|
+
value: _.value,
|
|
4999
|
+
checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(_.value),
|
|
4971
5000
|
disabled: n.readOnly || a.busy,
|
|
4972
5001
|
onChange: (k) => s.toggleMulti(
|
|
4973
5002
|
l.key,
|
|
4974
|
-
|
|
5003
|
+
_.value,
|
|
4975
5004
|
k.target.checked
|
|
4976
5005
|
)
|
|
4977
5006
|
}, null, 40, ra),
|
|
4978
|
-
o("span", null, v(
|
|
5007
|
+
o("span", null, v(_.label), 1)
|
|
4979
5008
|
]))), 128))
|
|
4980
|
-
])) :
|
|
5009
|
+
])) : b("", !0)
|
|
4981
5010
|
]))), 128)),
|
|
4982
|
-
a.error ? (c(), d("div", ia, v(a.error), 1)) :
|
|
5011
|
+
a.error ? (c(), d("div", ia, v(a.error), 1)) : b("", !0),
|
|
4983
5012
|
n.readOnly ? (c(), d("div", la, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
|
|
4984
5013
|
key: 1,
|
|
4985
5014
|
type: "submit",
|
|
4986
5015
|
class: "wm-form__submit",
|
|
4987
5016
|
disabled: a.busy
|
|
4988
5017
|
}, [
|
|
4989
|
-
a.busy ? (c(), d("span", oa)) :
|
|
5018
|
+
a.busy ? (c(), d("span", oa)) : b("", !0),
|
|
4990
5019
|
o("span", null, v(a.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4991
5020
|
], 8, aa))
|
|
4992
5021
|
], 32)
|
|
@@ -5050,11 +5079,11 @@ function Ca(e, t, n, r, a, s) {
|
|
|
5050
5079
|
], -1)),
|
|
5051
5080
|
o("div", ba, v(s.t("feedback.doneTitle")), 1),
|
|
5052
5081
|
o("div", ka, v(s.t("feedback.doneSubtitle")), 1)
|
|
5053
|
-
])) : (c(), d(
|
|
5082
|
+
])) : (c(), d(E, { key: 0 }, [
|
|
5054
5083
|
o("div", ma, v(s.t("feedback.question")), 1),
|
|
5055
5084
|
o("div", fa, v(s.t("feedback.subtitle")), 1),
|
|
5056
5085
|
o("div", _a, [
|
|
5057
|
-
(c(!0), d(
|
|
5086
|
+
(c(!0), d(E, null, F(s.options, (i) => (c(), d("button", {
|
|
5058
5087
|
key: i.v,
|
|
5059
5088
|
type: "button",
|
|
5060
5089
|
class: R(["wm-fb__opt", { "is-selected": a.sel === i.v }]),
|
|
@@ -5149,7 +5178,7 @@ function Da(e, t, n, r, a, s) {
|
|
|
5149
5178
|
])
|
|
5150
5179
|
], -1)),
|
|
5151
5180
|
o("span", Oa, v(s.t("moreMenu.editTitle")), 1)
|
|
5152
|
-
])) :
|
|
5181
|
+
])) : b("", !0),
|
|
5153
5182
|
n.canExport ? (c(), d("button", {
|
|
5154
5183
|
key: 1,
|
|
5155
5184
|
type: "button",
|
|
@@ -5173,9 +5202,9 @@ function Da(e, t, n, r, a, s) {
|
|
|
5173
5202
|
], -1)),
|
|
5174
5203
|
o("span", Ra, v(s.t("moreMenu.exportTranscript")), 1),
|
|
5175
5204
|
t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5176
|
-
])) :
|
|
5177
|
-
])) :
|
|
5178
|
-
n.canRename || n.canExport ? (c(), d("div", La)) :
|
|
5205
|
+
])) : b("", !0)
|
|
5206
|
+
])) : b("", !0),
|
|
5207
|
+
n.canRename || n.canExport ? (c(), d("div", La)) : b("", !0),
|
|
5179
5208
|
o("div", Ia, [
|
|
5180
5209
|
o("button", {
|
|
5181
5210
|
type: "button",
|
|
@@ -5230,7 +5259,7 @@ function Da(e, t, n, r, a, s) {
|
|
|
5230
5259
|
])
|
|
5231
5260
|
], -1)),
|
|
5232
5261
|
o("span", Pa, v(s.t("moreMenu.serviceStatus")), 1)
|
|
5233
|
-
])) :
|
|
5262
|
+
])) : b("", !0),
|
|
5234
5263
|
n.helpUrl ? (c(), d("button", {
|
|
5235
5264
|
key: 1,
|
|
5236
5265
|
type: "button",
|
|
@@ -5253,7 +5282,7 @@ function Da(e, t, n, r, a, s) {
|
|
|
5253
5282
|
])
|
|
5254
5283
|
], -1)),
|
|
5255
5284
|
o("span", Ua, v(s.t("moreMenu.helpCenter")), 1)
|
|
5256
|
-
])) :
|
|
5285
|
+
])) : b("", !0)
|
|
5257
5286
|
])
|
|
5258
5287
|
])
|
|
5259
5288
|
]);
|
|
@@ -5592,26 +5621,26 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5592
5621
|
var k;
|
|
5593
5622
|
const a = e[r.id] || [], s = Y(r.last_read_message_id);
|
|
5594
5623
|
let i = 0, l = null;
|
|
5595
|
-
for (let
|
|
5596
|
-
const T = a[
|
|
5624
|
+
for (let w = a.length - 1; w >= 0; w--) {
|
|
5625
|
+
const T = a[w];
|
|
5597
5626
|
if (!T) continue;
|
|
5598
5627
|
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5599
|
-
const
|
|
5600
|
-
if (
|
|
5601
|
-
if (s != null &&
|
|
5628
|
+
const L = Y(T.id);
|
|
5629
|
+
if (L != null) {
|
|
5630
|
+
if (s != null && L <= s) break;
|
|
5602
5631
|
t[T.id] !== 0 && (!l && T.author && (l = T.author), i++);
|
|
5603
5632
|
}
|
|
5604
5633
|
}
|
|
5605
5634
|
if (!a.length) {
|
|
5606
|
-
const
|
|
5607
|
-
|
|
5635
|
+
const w = Y(r.last_message_id);
|
|
5636
|
+
w != null && (s == null || w > s) && (i = 1, l = r.last_message_author || null);
|
|
5608
5637
|
}
|
|
5609
|
-
const
|
|
5610
|
-
(
|
|
5638
|
+
const _ = a.filter(
|
|
5639
|
+
(w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
|
|
5611
5640
|
);
|
|
5612
5641
|
return {
|
|
5613
5642
|
...r,
|
|
5614
|
-
_preview: _t(r,
|
|
5643
|
+
_preview: _t(r, _),
|
|
5615
5644
|
_unread: i > 0,
|
|
5616
5645
|
_unreadCount: i,
|
|
5617
5646
|
_lastAuthor: l
|
|
@@ -5647,14 +5676,14 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5647
5676
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
|
|
5648
5677
|
for (const r of this.drawerConversations) {
|
|
5649
5678
|
if (!r._unread) continue;
|
|
5650
|
-
const a = Be(r, e[r.id] || []), s = r._lastAuthor, i = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (i ? this.agentName : "") || "",
|
|
5679
|
+
const a = Be(r, e[r.id] || []), s = r._lastAuthor, i = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (i ? this.agentName : "") || "", _ = (s == null ? void 0 : s.avatar_url) || (i ? this.agentAvatarUrl : null);
|
|
5651
5680
|
t.push({
|
|
5652
5681
|
convId: r.id,
|
|
5653
5682
|
preview: r._preview || this.t("notification.youHaveNewMessage"),
|
|
5654
5683
|
ts: a,
|
|
5655
5684
|
count: r._unreadCount || 1,
|
|
5656
5685
|
senderName: l,
|
|
5657
|
-
senderAvatarUrl:
|
|
5686
|
+
senderAvatarUrl: _
|
|
5658
5687
|
});
|
|
5659
5688
|
}
|
|
5660
5689
|
return t.sort((r, a) => r.ts < a.ts ? 1 : r.ts > a.ts ? -1 : 0), t;
|
|
@@ -5814,8 +5843,8 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5814
5843
|
if (!(i != null && i.loaded)) return t;
|
|
5815
5844
|
}
|
|
5816
5845
|
const n = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((i) => {
|
|
5817
|
-
var l,
|
|
5818
|
-
return (i == null ? void 0 : i.type) === "action" && ((l = i == null ? void 0 : i.payload) == null ? void 0 : l.state) === "pending" || he(i) && !(n[i.id] > 0) ? !1 : (i == null ? void 0 : i.type) === "action" || (i == null ? void 0 : i.type) === "system" || ((
|
|
5846
|
+
var l, _, k, w, T;
|
|
5847
|
+
return (i == null ? void 0 : i.type) === "action" && ((l = i == null ? void 0 : i.payload) == null ? void 0 : l.state) === "pending" || he(i) && !(n[i.id] > 0) ? !1 : (i == null ? void 0 : i.type) === "action" || (i == null ? void 0 : i.type) === "system" || ((_ = i == null ? void 0 : i.payload) == null ? void 0 : _.type) === "system" || Array.isArray((k = i == null ? void 0 : i.payload) == null ? void 0 : k.attachments) && i.payload.attachments.length || (w = i == null ? void 0 : i.metadata) != null && w.artifact || (T = i == null ? void 0 : i.metadata) != null && T.form ? !0 : typeof (i == null ? void 0 : i.text_md) == "string" && i.text_md.trim().length > 0;
|
|
5819
5848
|
});
|
|
5820
5849
|
return t.length ? [...t, ...r] : r;
|
|
5821
5850
|
},
|
|
@@ -5852,14 +5881,14 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5852
5881
|
return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || this.t("action.title");
|
|
5853
5882
|
},
|
|
5854
5883
|
approvalDetail() {
|
|
5855
|
-
var r, a, s, i, l,
|
|
5884
|
+
var r, a, s, i, l, _;
|
|
5856
5885
|
const e = (s = (a = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : a.pending) == null ? void 0 : s.user_explanation;
|
|
5857
5886
|
if (typeof e == "string" && e.trim())
|
|
5858
5887
|
return e.trim();
|
|
5859
|
-
const t = (
|
|
5888
|
+
const t = (_ = (l = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : l.pending) == null ? void 0 : _.prepared_params;
|
|
5860
5889
|
if (!t || typeof t != "object") return "";
|
|
5861
5890
|
const n = Object.entries(t);
|
|
5862
|
-
return n.length ? n.slice(0, 2).map(([k,
|
|
5891
|
+
return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
|
|
5863
5892
|
},
|
|
5864
5893
|
actionInFlight() {
|
|
5865
5894
|
var e, t;
|
|
@@ -6209,16 +6238,16 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6209
6238
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
6210
6239
|
},
|
|
6211
6240
|
sendCurrentLauncherSize() {
|
|
6212
|
-
var
|
|
6241
|
+
var w, T, L, A, q, M, D;
|
|
6213
6242
|
if (this.isOpen) return;
|
|
6214
|
-
const e = (T = (
|
|
6243
|
+
const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
|
|
6215
6244
|
if (!e) return;
|
|
6216
6245
|
const t = e.getBoundingClientRect();
|
|
6217
6246
|
if (!t.width || !t.height) return;
|
|
6218
|
-
const n = (((
|
|
6247
|
+
const n = (((L = this.launcherPeeks) == null ? void 0 : L.length) ?? 0) > 0, r = 16, a = Math.ceil(t.width), s = Math.ceil(t.height), i = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), _ = l && l.length ? l[l.length - 1] : null;
|
|
6219
6248
|
let k = null;
|
|
6220
|
-
if (
|
|
6221
|
-
const N =
|
|
6249
|
+
if (_) {
|
|
6250
|
+
const N = _.getBoundingClientRect();
|
|
6222
6251
|
k = {
|
|
6223
6252
|
width: Math.ceil(N.width),
|
|
6224
6253
|
height: Math.ceil(N.height),
|
|
@@ -6355,7 +6384,7 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6355
6384
|
const a = this.revealPacing, s = t.trim().length, i = Math.min(
|
|
6356
6385
|
a.maxTypingMs,
|
|
6357
6386
|
Math.max(a.minTypingMs, s * a.msPerChar)
|
|
6358
|
-
), l = a.firstRevealDelayMs + i,
|
|
6387
|
+
), l = a.firstRevealDelayMs + i, _ = setTimeout(() => {
|
|
6359
6388
|
this.welcomeRevealedAt = {
|
|
6360
6389
|
...this.welcomeRevealedAt,
|
|
6361
6390
|
[e]: Date.now()
|
|
@@ -6365,7 +6394,7 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6365
6394
|
}, l);
|
|
6366
6395
|
this.welcomeRevealTimers = {
|
|
6367
6396
|
...this.welcomeRevealTimers,
|
|
6368
|
-
[e]:
|
|
6397
|
+
[e]: _
|
|
6369
6398
|
};
|
|
6370
6399
|
},
|
|
6371
6400
|
// Clear pending welcome timers (panel unmount, refresh). Doesn't
|
|
@@ -6612,7 +6641,7 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6612
6641
|
class: "wm-attached__fileSize"
|
|
6613
6642
|
}, _o = ["aria-label", "onClick"];
|
|
6614
6643
|
function go(e, t, n, r, a, s) {
|
|
6615
|
-
const i = B("Launcher"), l = B("Header"),
|
|
6644
|
+
const i = B("Launcher"), l = B("Header"), _ = B("History"), k = B("Onboarding"), w = B("MessageList"), T = B("ApprovalCard"), L = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), D = B("MoreMenu"), N = B("RenameDialog");
|
|
6616
6645
|
return c(), d("div", {
|
|
6617
6646
|
class: R(["wm-root", `wm-root--${n.displayMode}`]),
|
|
6618
6647
|
style: z(s.rootStyle)
|
|
@@ -6624,7 +6653,7 @@ function go(e, t, n, r, a, s) {
|
|
|
6624
6653
|
onOpen: s.openFromPeek,
|
|
6625
6654
|
onDismiss: s.dismissPeek,
|
|
6626
6655
|
onHover: s.onLauncherHover
|
|
6627
|
-
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) :
|
|
6656
|
+
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
|
|
6628
6657
|
a.isOpen || s.isEmbedded ? (c(), d("section", {
|
|
6629
6658
|
key: 1,
|
|
6630
6659
|
class: R([
|
|
@@ -6635,15 +6664,15 @@ function go(e, t, n, r, a, s) {
|
|
|
6635
6664
|
style: z(a.floatHeight ? { "--wm-float-h": a.floatHeight + "px" } : null),
|
|
6636
6665
|
role: "dialog",
|
|
6637
6666
|
"aria-label": "Messenger",
|
|
6638
|
-
onClick: t[6] || (t[6] = (...
|
|
6667
|
+
onClick: t[6] || (t[6] = (...I) => s.onPanelClick && s.onPanelClick(...I))
|
|
6639
6668
|
}, [
|
|
6640
6669
|
!s.ready && !s.error ? (c(), d("div", Qa, [
|
|
6641
|
-
s.isEmbedded ?
|
|
6670
|
+
s.isEmbedded ? b("", !0) : (c(), d("button", {
|
|
6642
6671
|
key: 0,
|
|
6643
6672
|
type: "button",
|
|
6644
6673
|
class: "wm-loading__close",
|
|
6645
6674
|
"aria-label": s.t("loading.minimize"),
|
|
6646
|
-
onClick: t[0] || (t[0] = (...
|
|
6675
|
+
onClick: t[0] || (t[0] = (...I) => s.close && s.close(...I))
|
|
6647
6676
|
}, [...t[7] || (t[7] = [
|
|
6648
6677
|
o("svg", {
|
|
6649
6678
|
width: "13",
|
|
@@ -6663,7 +6692,7 @@ function go(e, t, n, r, a, s) {
|
|
|
6663
6692
|
class: "wm-loading__spinner",
|
|
6664
6693
|
"aria-hidden": "true"
|
|
6665
6694
|
}, null, -1))
|
|
6666
|
-
])) : (c(), d(
|
|
6695
|
+
])) : (c(), d(E, { key: 1 }, [
|
|
6667
6696
|
V(l, {
|
|
6668
6697
|
title: s.headerTitle,
|
|
6669
6698
|
"team-members": s.teamMembers,
|
|
@@ -6700,12 +6729,12 @@ function go(e, t, n, r, a, s) {
|
|
|
6700
6729
|
o("div", so, v(s.error), 1)
|
|
6701
6730
|
])
|
|
6702
6731
|
])
|
|
6703
|
-
])) : !s.currentConv && a.showHistory ? (c(), U(
|
|
6732
|
+
])) : !s.currentConv && a.showHistory ? (c(), U(_, {
|
|
6704
6733
|
key: 1,
|
|
6705
6734
|
threads: s.openThreads,
|
|
6706
6735
|
onResume: s.onDrawerPick
|
|
6707
|
-
}, null, 8, ["threads", "onResume"])) : s.currentConv ? (c(), d(
|
|
6708
|
-
V(
|
|
6736
|
+
}, null, 8, ["threads", "onResume"])) : s.currentConv ? (c(), d(E, { key: 3 }, [
|
|
6737
|
+
V(w, {
|
|
6709
6738
|
ref: "messageList",
|
|
6710
6739
|
messages: s.displayedMessages,
|
|
6711
6740
|
"streaming-active": s.streamingActive,
|
|
@@ -6729,7 +6758,7 @@ function go(e, t, n, r, a, s) {
|
|
|
6729
6758
|
"agent-name": s.agentName,
|
|
6730
6759
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6731
6760
|
onCallback: s.onApprovalCallback
|
|
6732
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), U(
|
|
6761
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), U(L, {
|
|
6733
6762
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
6734
6763
|
form: s.pendingForm.form,
|
|
6735
6764
|
"agent-name": s.agentName,
|
|
@@ -6745,7 +6774,7 @@ function go(e, t, n, r, a, s) {
|
|
|
6745
6774
|
items: s.suggestions,
|
|
6746
6775
|
onSelect: s.onSuggestion
|
|
6747
6776
|
}, null, 8, ["items", "onSelect"]))
|
|
6748
|
-
], 512)) :
|
|
6777
|
+
], 512)) : b("", !0),
|
|
6749
6778
|
s.actionInFlight ? (c(), d("div", ao, [
|
|
6750
6779
|
t[10] || (t[10] = o("span", {
|
|
6751
6780
|
class: "wm-actionWait__spinner",
|
|
@@ -6754,17 +6783,17 @@ function go(e, t, n, r, a, s) {
|
|
|
6754
6783
|
o("span", oo, v(s.t("action.inProgress", {
|
|
6755
6784
|
name: s.actionInFlightName
|
|
6756
6785
|
})), 1)
|
|
6757
|
-
])) :
|
|
6786
|
+
])) : b("", !0),
|
|
6758
6787
|
a.pendingAttachments.length ? (c(), d("div", lo, [
|
|
6759
|
-
(c(!0), d(
|
|
6760
|
-
key:
|
|
6788
|
+
(c(!0), d(E, null, F(a.pendingAttachments, (I, K) => (c(), d("div", {
|
|
6789
|
+
key: I.path || K,
|
|
6761
6790
|
class: "wm-attached__item"
|
|
6762
6791
|
}, [
|
|
6763
|
-
|
|
6792
|
+
I.previewUrl ? (c(), d("img", {
|
|
6764
6793
|
key: 0,
|
|
6765
6794
|
class: "wm-attached__thumb",
|
|
6766
|
-
src:
|
|
6767
|
-
alt:
|
|
6795
|
+
src: I.previewUrl,
|
|
6796
|
+
alt: I.name
|
|
6768
6797
|
}, null, 8, co)) : (c(), d("div", uo, [
|
|
6769
6798
|
t[11] || (t[11] = o("span", { class: "wm-attached__fileIcon" }, [
|
|
6770
6799
|
o("svg", {
|
|
@@ -6783,10 +6812,10 @@ function go(e, t, n, r, a, s) {
|
|
|
6783
6812
|
])
|
|
6784
6813
|
], -1)),
|
|
6785
6814
|
o("span", ho, [
|
|
6786
|
-
o("span", mo, v(
|
|
6787
|
-
s.formatAttachmentSize(
|
|
6788
|
-
|
|
6789
|
-
)), 1)) :
|
|
6815
|
+
o("span", mo, v(I.name), 1),
|
|
6816
|
+
s.formatAttachmentSize(I.size_bytes) ? (c(), d("span", fo, v(s.formatAttachmentSize(
|
|
6817
|
+
I.size_bytes
|
|
6818
|
+
)), 1)) : b("", !0)
|
|
6790
6819
|
])
|
|
6791
6820
|
])),
|
|
6792
6821
|
o("button", {
|
|
@@ -6810,12 +6839,12 @@ function go(e, t, n, r, a, s) {
|
|
|
6810
6839
|
], -1)
|
|
6811
6840
|
])], 8, _o)
|
|
6812
6841
|
]))), 128))
|
|
6813
|
-
])) :
|
|
6814
|
-
s.actionInFlight ?
|
|
6842
|
+
])) : b("", !0),
|
|
6843
|
+
s.actionInFlight ? b("", !0) : (c(), U(M, {
|
|
6815
6844
|
key: 3,
|
|
6816
6845
|
ref: "composer",
|
|
6817
6846
|
modelValue: a.draft,
|
|
6818
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
6847
|
+
"onUpdate:modelValue": t[2] || (t[2] = (I) => a.draft = I),
|
|
6819
6848
|
placeholder: s.composerPlaceholder,
|
|
6820
6849
|
disabled: !!s.pendingApproval,
|
|
6821
6850
|
"attach-label": s.t("composer.attachFile"),
|
|
@@ -6831,17 +6860,17 @@ function go(e, t, n, r, a, s) {
|
|
|
6831
6860
|
"sound-enabled": e.soundEnabled,
|
|
6832
6861
|
"status-url": s.statusUrl,
|
|
6833
6862
|
"help-url": s.helpUrl,
|
|
6834
|
-
onClose: t[3] || (t[3] = (
|
|
6863
|
+
onClose: t[3] || (t[3] = (I) => a.moreOpen = !1),
|
|
6835
6864
|
onSoundToggle: e.onSoundToggle,
|
|
6836
6865
|
onAction: s.onMoreAction
|
|
6837
|
-
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) :
|
|
6866
|
+
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
|
|
6838
6867
|
a.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), U(N, {
|
|
6839
6868
|
key: 1,
|
|
6840
6869
|
"initial-value": s.currentConv.name || "",
|
|
6841
6870
|
title: s.t("rename.dialogTitle"),
|
|
6842
|
-
onClose: t[4] || (t[4] = (
|
|
6871
|
+
onClose: t[4] || (t[4] = (I) => a.renameDialogOpen = !1),
|
|
6843
6872
|
onSubmit: s.onRenameSubmit
|
|
6844
|
-
}, null, 8, ["initial-value", "title", "onSubmit"])) :
|
|
6873
|
+
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
|
|
6845
6874
|
], 64)) : (c(), U(k, {
|
|
6846
6875
|
key: 2,
|
|
6847
6876
|
title: s.widgetTitle,
|
|
@@ -6854,7 +6883,7 @@ function go(e, t, n, r, a, s) {
|
|
|
6854
6883
|
onStart: s.startConv,
|
|
6855
6884
|
onSelect: s.onQuickLink,
|
|
6856
6885
|
onResume: s.onDrawerPick,
|
|
6857
|
-
onViewHistory: t[1] || (t[1] = (
|
|
6886
|
+
onViewHistory: t[1] || (t[1] = (I) => a.showHistory = !0)
|
|
6858
6887
|
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6859
6888
|
a.moreOpen && !s.currentConv ? (c(), U(D, {
|
|
6860
6889
|
key: 4,
|
|
@@ -6863,15 +6892,15 @@ function go(e, t, n, r, a, s) {
|
|
|
6863
6892
|
"sound-enabled": e.soundEnabled,
|
|
6864
6893
|
"status-url": s.statusUrl,
|
|
6865
6894
|
"help-url": s.helpUrl,
|
|
6866
|
-
onClose: t[5] || (t[5] = (
|
|
6895
|
+
onClose: t[5] || (t[5] = (I) => a.moreOpen = !1),
|
|
6867
6896
|
onSoundToggle: e.onSoundToggle,
|
|
6868
6897
|
onAction: s.onMoreAction
|
|
6869
|
-
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) :
|
|
6898
|
+
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
|
|
6870
6899
|
], 64))
|
|
6871
|
-
], 6)) :
|
|
6900
|
+
], 6)) : b("", !0)
|
|
6872
6901
|
], 6);
|
|
6873
6902
|
}
|
|
6874
|
-
const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-a54649f6"]]), wo = "0.5.
|
|
6903
|
+
const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-a54649f6"]]), wo = "0.5.68";
|
|
6875
6904
|
export {
|
|
6876
6905
|
oe as AIAvatar,
|
|
6877
6906
|
be as AVATAR_COLORS,
|