@bcc-code/vue-bcc-chat-ui 7.4.8 → 7.4.9
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/vue-bcc-chat-ui.js +673 -663
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +3 -3
package/dist/vue-bcc-chat-ui.js
CHANGED
|
@@ -7572,98 +7572,96 @@ function Ld(e, t) {
|
|
|
7572
7572
|
function Rd(e, t = 25, n) {
|
|
7573
7573
|
let r = e.trim();
|
|
7574
7574
|
if (!r || !n) return;
|
|
7575
|
-
let i =
|
|
7575
|
+
let i = Yd();
|
|
7576
7576
|
if (!i) return;
|
|
7577
7577
|
let a = new Tl(i), o = r.toLowerCase(), s = a.getSearchableConversations(), c = new Map(s.map((e) => [e.id, e.targetId]));
|
|
7578
7578
|
return {
|
|
7579
7579
|
conversations: s.map((e) => ({
|
|
7580
7580
|
conversation: e,
|
|
7581
|
-
matches:
|
|
7581
|
+
matches: $d(e.title, o)
|
|
7582
7582
|
})).filter((e) => e.matches.length > 0).slice(0, t),
|
|
7583
7583
|
messages: a.getAllMessages().filter((e) => !e.parentMessageId && e.category === "message").map((e) => ({
|
|
7584
7584
|
message: {
|
|
7585
7585
|
...e,
|
|
7586
7586
|
conversationId: c.get(e.conversationId) ?? e.conversationId
|
|
7587
7587
|
},
|
|
7588
|
-
matches:
|
|
7588
|
+
matches: $d(e.text, o)
|
|
7589
7589
|
})).filter((e) => e.matches.length > 0).slice(0, t)
|
|
7590
7590
|
};
|
|
7591
7591
|
}
|
|
7592
|
-
|
|
7593
|
-
let t = new q.GroupMembersRequestBuilder(e).setLimit(50).build(), n = !0, r = [];
|
|
7594
|
-
try {
|
|
7595
|
-
for (; n;) {
|
|
7596
|
-
let e = await X(t.fetchNext(), Rt);
|
|
7597
|
-
if (!e?.length) break;
|
|
7598
|
-
r.push(...e.map((e) => Ul(e))), n = e.length === 50;
|
|
7599
|
-
}
|
|
7600
|
-
} catch {
|
|
7601
|
-
return r;
|
|
7602
|
-
}
|
|
7603
|
-
return r;
|
|
7604
|
-
}
|
|
7592
|
+
var zd = 10;
|
|
7605
7593
|
async function Bd(e) {
|
|
7606
|
-
|
|
7607
|
-
let
|
|
7608
|
-
|
|
7594
|
+
let t = new q.GroupMembersRequestBuilder(e).setLimit(50).build(), n = !0, r = /* @__PURE__ */ new Map();
|
|
7595
|
+
for (let e = 0; n && e < zd; e++) {
|
|
7596
|
+
let e = await X(t.fetchNext(), Rt);
|
|
7597
|
+
if (!e?.length) break;
|
|
7598
|
+
for (let t of e) r.set(t.getUid(), Ul(t));
|
|
7599
|
+
n = e.length === 50;
|
|
7600
|
+
}
|
|
7601
|
+
return [...r.values()];
|
|
7602
|
+
}
|
|
7603
|
+
async function Vd(e) {
|
|
7604
|
+
await Zd("failed to get muted setting. User not logged in");
|
|
7605
|
+
let t = await Qd(`${it().chatApiBaseUrl}/chats/${e}/settings/${(await q.getLoggedinUser())?.getUid?.()}`, { method: "GET" });
|
|
7606
|
+
return Jd()?.storeParticipantSettings({
|
|
7609
7607
|
chatUid: e,
|
|
7610
7608
|
mutedUntil: t.mutedUntil,
|
|
7611
7609
|
lastUpdated: Date.now()
|
|
7612
7610
|
}), t.mutedUntil;
|
|
7613
7611
|
}
|
|
7614
|
-
async function
|
|
7615
|
-
await
|
|
7616
|
-
let n = await
|
|
7612
|
+
async function Hd(e, t) {
|
|
7613
|
+
await Zd("failed to mute chat. User not logged in");
|
|
7614
|
+
let n = await Qd(`${it().chatApiBaseUrl}/chats/${e}/settings/${(await q.getLoggedinUser())?.getUid?.()}`, {
|
|
7617
7615
|
method: "PATCH",
|
|
7618
7616
|
body: JSON.stringify({ mutedUntil: t })
|
|
7619
7617
|
});
|
|
7620
|
-
return
|
|
7618
|
+
return Jd()?.storeParticipantSettings({
|
|
7621
7619
|
chatUid: e,
|
|
7622
7620
|
mutedUntil: n.mutedUntil,
|
|
7623
7621
|
lastUpdated: Date.now()
|
|
7624
7622
|
}), n.mutedUntil;
|
|
7625
7623
|
}
|
|
7626
|
-
async function
|
|
7627
|
-
return await
|
|
7624
|
+
async function Ud() {
|
|
7625
|
+
return await Zd("failed to get muted all setting. User not logged in"), Qd(`${it().chatApiBaseUrl}/person/settings`, { method: "GET" });
|
|
7628
7626
|
}
|
|
7629
|
-
async function
|
|
7630
|
-
return await
|
|
7627
|
+
async function Wd(e) {
|
|
7628
|
+
return await Zd("failed to update person settings. User not logged in"), Qd(`${it().chatApiBaseUrl}/person/settings`, {
|
|
7631
7629
|
method: "PATCH",
|
|
7632
7630
|
body: JSON.stringify(e)
|
|
7633
7631
|
});
|
|
7634
7632
|
}
|
|
7635
|
-
async function
|
|
7636
|
-
return (await
|
|
7633
|
+
async function Gd(e) {
|
|
7634
|
+
return (await Wd({ mutedAll: e })).mutedAll;
|
|
7637
7635
|
}
|
|
7638
|
-
async function
|
|
7639
|
-
let { mutedAll: e } = await
|
|
7640
|
-
return
|
|
7636
|
+
async function Kd() {
|
|
7637
|
+
let { mutedAll: e } = await Ud();
|
|
7638
|
+
return Gd(!e);
|
|
7641
7639
|
}
|
|
7642
|
-
function
|
|
7640
|
+
function qd(e, t, n) {
|
|
7643
7641
|
let r = n ? new Date(n) : null;
|
|
7644
7642
|
return e.map((e) => e.targetId !== t && e.id !== t ? e : {
|
|
7645
7643
|
...e,
|
|
7646
7644
|
muteSettings: r
|
|
7647
7645
|
});
|
|
7648
7646
|
}
|
|
7649
|
-
function
|
|
7650
|
-
if (!
|
|
7651
|
-
let e =
|
|
7647
|
+
function Jd() {
|
|
7648
|
+
if (!Xd()) return null;
|
|
7649
|
+
let e = Yd();
|
|
7652
7650
|
return e ? new Tl(e) : null;
|
|
7653
7651
|
}
|
|
7654
|
-
function
|
|
7652
|
+
function Yd() {
|
|
7655
7653
|
let e = Jt();
|
|
7656
7654
|
return e ? `bcc-chat:${it().appId}:${e}` : null;
|
|
7657
7655
|
}
|
|
7658
|
-
function
|
|
7656
|
+
function Xd() {
|
|
7659
7657
|
return q.__bccCompatLoggedInUser ?? null;
|
|
7660
7658
|
}
|
|
7661
|
-
async function
|
|
7659
|
+
async function Zd(e) {
|
|
7662
7660
|
let t = await q.getLoggedinUser();
|
|
7663
7661
|
if (q.__bccCompatLoggedInUser = t ?? null, !t?.getUid?.()) throw Error(e);
|
|
7664
7662
|
return t;
|
|
7665
7663
|
}
|
|
7666
|
-
async function
|
|
7664
|
+
async function Qd(e, t) {
|
|
7667
7665
|
let n = lt();
|
|
7668
7666
|
if (!n) throw Error("Missing access token.");
|
|
7669
7667
|
let r = await fetch(e, {
|
|
@@ -7676,7 +7674,7 @@ async function Zd(e, t) {
|
|
|
7676
7674
|
if (!r.ok) throw Error(`Request failed with status ${r.status}`);
|
|
7677
7675
|
return await r.json();
|
|
7678
7676
|
}
|
|
7679
|
-
function
|
|
7677
|
+
function $d(e, t) {
|
|
7680
7678
|
if (!e) return [];
|
|
7681
7679
|
let n = e.toLowerCase(), r = [], i = 0;
|
|
7682
7680
|
for (; i < n.length;) {
|
|
@@ -7694,7 +7692,7 @@ function Qd(e, t) {
|
|
|
7694
7692
|
var $ = j(null);
|
|
7695
7693
|
//#endregion
|
|
7696
7694
|
//#region src/chat/theme.ts
|
|
7697
|
-
function
|
|
7695
|
+
function ef(e) {
|
|
7698
7696
|
let t = { palette: {
|
|
7699
7697
|
mode: e,
|
|
7700
7698
|
setMode(e) {
|
|
@@ -7703,17 +7701,17 @@ function $d(e) {
|
|
|
7703
7701
|
} };
|
|
7704
7702
|
return t;
|
|
7705
7703
|
}
|
|
7706
|
-
var
|
|
7707
|
-
function
|
|
7708
|
-
|
|
7704
|
+
var tf = D(ef("light"));
|
|
7705
|
+
function nf(e) {
|
|
7706
|
+
tf.value.palette.setMode(e);
|
|
7709
7707
|
}
|
|
7710
7708
|
//#endregion
|
|
7711
7709
|
//#region src/chat/types.ts
|
|
7712
|
-
var
|
|
7710
|
+
var rf = /* @__PURE__ */ function(e) {
|
|
7713
7711
|
return e.DEBUG = "Debug", e.INFO = "Info", e.WARN = "Warn", e.ERROR = "Error", e;
|
|
7714
|
-
}({}),
|
|
7715
|
-
function
|
|
7716
|
-
|
|
7712
|
+
}({}), af = D(!1), of = D(null), sf = D("light"), cf = D(void 0), lf = D(void 0), uf = /* @__PURE__ */ new Set(), df = D({}), ff = /* @__PURE__ */ new Map(), pf;
|
|
7713
|
+
function mf(e, t, n) {
|
|
7714
|
+
lf.value?.({
|
|
7717
7715
|
logUid: crypto.randomUUID(),
|
|
7718
7716
|
message: t,
|
|
7719
7717
|
severity: e,
|
|
@@ -7721,17 +7719,17 @@ function pf(e, t, n) {
|
|
|
7721
7719
|
userMetadata: n
|
|
7722
7720
|
});
|
|
7723
7721
|
}
|
|
7724
|
-
function mf(e) {
|
|
7725
|
-
of.value = e, tf(e), !(typeof document > "u") && document.documentElement.classList.toggle("dark", e === "dark");
|
|
7726
|
-
}
|
|
7727
7722
|
function hf(e) {
|
|
7728
|
-
|
|
7729
|
-
|
|
7723
|
+
sf.value = e, nf(e), !(typeof document > "u") && document.documentElement.classList.toggle("dark", e === "dark");
|
|
7724
|
+
}
|
|
7725
|
+
function gf(e) {
|
|
7726
|
+
if ($.value && !e && !of.value) return $.value;
|
|
7727
|
+
let t = e ?? of.value;
|
|
7730
7728
|
if (!t) throw Error("Environment has not been set yet. Call app.use(chat, { environment: ... }) first.");
|
|
7731
|
-
return (!$.value ||
|
|
7729
|
+
return (!$.value || of.value !== t) && (of.value = t, rt(t), $.value = pu({ environment: t })), $.value;
|
|
7732
7730
|
}
|
|
7733
|
-
var
|
|
7734
|
-
function
|
|
7731
|
+
var _f = a(() => $.value?.currentUser.value?.uid);
|
|
7732
|
+
function vf(e) {
|
|
7735
7733
|
if (Array.isArray(e)) return e;
|
|
7736
7734
|
if (e && typeof e == "object") {
|
|
7737
7735
|
let t = e.data;
|
|
@@ -7739,30 +7737,30 @@ function _f(e) {
|
|
|
7739
7737
|
}
|
|
7740
7738
|
return [];
|
|
7741
7739
|
}
|
|
7742
|
-
function
|
|
7743
|
-
let t =
|
|
7740
|
+
function yf(e) {
|
|
7741
|
+
let t = ff.get(e);
|
|
7744
7742
|
if (!t) {
|
|
7745
|
-
let n =
|
|
7746
|
-
|
|
7743
|
+
let n = bf(e).finally(() => {
|
|
7744
|
+
ff.get(e) === n && ff.delete(e);
|
|
7747
7745
|
});
|
|
7748
|
-
t = n,
|
|
7746
|
+
t = n, ff.set(e, t);
|
|
7749
7747
|
}
|
|
7750
7748
|
return t;
|
|
7751
7749
|
}
|
|
7752
|
-
async function
|
|
7750
|
+
async function bf(e) {
|
|
7753
7751
|
try {
|
|
7754
7752
|
let t = await X(q.getMessageReceipts(e), Rt);
|
|
7755
|
-
|
|
7756
|
-
...
|
|
7757
|
-
[e]:
|
|
7753
|
+
df.value = {
|
|
7754
|
+
...df.value,
|
|
7755
|
+
[e]: vf(t)
|
|
7758
7756
|
};
|
|
7759
7757
|
} catch {}
|
|
7760
7758
|
}
|
|
7761
|
-
async function
|
|
7759
|
+
async function xf(e, t) {
|
|
7762
7760
|
let n = e.lastMessage, r = n ? void 0 : e.source?.getLastMessage?.();
|
|
7763
7761
|
if (!(r || n)) return;
|
|
7764
7762
|
let i = n?.senderId ?? r?.getSender?.()?.getUid?.() ?? "", a = String(n?.id ?? r?.getId?.() ?? ""), o = !!(t && i && t === i && a);
|
|
7765
|
-
return o && a &&
|
|
7763
|
+
return o && a && df.value[a] === void 0 && await yf(a), {
|
|
7766
7764
|
text: e.subtitle,
|
|
7767
7765
|
type: n?.type ?? r?.getType?.() ?? "text",
|
|
7768
7766
|
senderUid: i,
|
|
@@ -7770,10 +7768,10 @@ async function bf(e, t) {
|
|
|
7770
7768
|
sentAt: n?.sentAt ?? Qt(r?.getSentAt?.()) ?? /* @__PURE__ */ new Date(0),
|
|
7771
7769
|
sentByCurrentUser: o,
|
|
7772
7770
|
readAt: Qt(r?.getReadAt?.()),
|
|
7773
|
-
messageReceipts: o ?
|
|
7771
|
+
messageReceipts: o ? df.value[a] : void 0
|
|
7774
7772
|
};
|
|
7775
7773
|
}
|
|
7776
|
-
var
|
|
7774
|
+
var Sf = a(() => $.value?.connected.value ?? !1), Cf = a(() => af.value && !Sf.value), wf = a(() => $.value?.loggedIn.value ?? !1), Tf = {
|
|
7777
7775
|
onlineMode: a({
|
|
7778
7776
|
get: () => $.value?.offlineMode.value ? "offline" : "online",
|
|
7779
7777
|
set: (e) => {
|
|
@@ -7781,83 +7779,83 @@ var xf = a(() => $.value?.connected.value ?? !1), Sf = a(() => rf.value && !xf.v
|
|
|
7781
7779
|
}
|
|
7782
7780
|
}),
|
|
7783
7781
|
onlineStatus: a(() => $.value ? $.value.offlineMode.value || !$.value.connected.value ? "offline" : "online" : "offline")
|
|
7784
|
-
},
|
|
7785
|
-
async function
|
|
7782
|
+
}, Ef = D([]);
|
|
7783
|
+
async function Df(e, t) {
|
|
7786
7784
|
return {
|
|
7787
7785
|
chatUid: e.targetId,
|
|
7788
7786
|
type: e.type,
|
|
7789
7787
|
name: e.title,
|
|
7790
7788
|
unreadMessageCount: e.unreadCount,
|
|
7791
|
-
lastMessage: await
|
|
7789
|
+
lastMessage: await xf(e, t),
|
|
7792
7790
|
membersCount: e.memberCount ?? 0,
|
|
7793
7791
|
tags: [...e.tags],
|
|
7794
7792
|
muteSettings: e.muteSettings ?? null,
|
|
7795
7793
|
hasJoined: e.hasJoined ?? !0
|
|
7796
7794
|
};
|
|
7797
7795
|
}
|
|
7798
|
-
var
|
|
7799
|
-
R([() => $.value?.conversations.value, () =>
|
|
7796
|
+
var Of = /* @__PURE__ */ new WeakMap(), kf, Af = "";
|
|
7797
|
+
R([() => $.value?.conversations.value, () => _f.value], async () => {
|
|
7800
7798
|
let e = crypto.randomUUID();
|
|
7801
|
-
|
|
7802
|
-
let t =
|
|
7803
|
-
t !==
|
|
7799
|
+
Af = e;
|
|
7800
|
+
let t = _f.value;
|
|
7801
|
+
t !== kf && (Of = /* @__PURE__ */ new WeakMap(), kf = t);
|
|
7804
7802
|
let n = await Promise.all(($.value?.conversations?.value ?? []).map((e) => {
|
|
7805
|
-
let n =
|
|
7806
|
-
return n || (n =
|
|
7803
|
+
let n = Of.get(e);
|
|
7804
|
+
return n || (n = Df(e, t), Of.set(e, n), n.catch(() => Of.delete(e))), n;
|
|
7807
7805
|
}));
|
|
7808
|
-
|
|
7809
|
-
}), R(() =>
|
|
7810
|
-
|
|
7806
|
+
Af === e && (Ef.value = n);
|
|
7807
|
+
}), R(() => _f.value, () => {
|
|
7808
|
+
df.value = {}, ff.clear();
|
|
7811
7809
|
});
|
|
7812
|
-
async function
|
|
7813
|
-
|
|
7810
|
+
async function jf(e, t) {
|
|
7811
|
+
lf.value = t.loggerCallback, Dt(t.language ?? "en"), hf(t.themeMode), e.use(re);
|
|
7814
7812
|
let n = e.config.globalProperties.$primevue;
|
|
7815
|
-
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.provide("theme", { theme:
|
|
7816
|
-
let r =
|
|
7817
|
-
|
|
7813
|
+
n && (n.config.ripple = !0, n.config.inputVariant = "filled"), e.provide("theme", { theme: tf });
|
|
7814
|
+
let r = gf(t.environment);
|
|
7815
|
+
mf(rf.INFO, "Initializing chat", {
|
|
7818
7816
|
environment: t.environment,
|
|
7819
7817
|
language: xt.value,
|
|
7820
7818
|
themeMode: t.themeMode
|
|
7821
|
-
}), await r.init(),
|
|
7822
|
-
e ? await
|
|
7823
|
-
}, { immediate: !0 }) : t.accessToken && await
|
|
7819
|
+
}), await r.init(), af.value = !0, pf?.(), g(t.accessToken) ? pf = R(t.accessToken, async (e) => {
|
|
7820
|
+
e ? await Mf(e) : await Nf();
|
|
7821
|
+
}, { immediate: !0 }) : t.accessToken && await Mf(t.accessToken), mf(rf.INFO, "Chat initialized", { environment: it().appId });
|
|
7824
7822
|
}
|
|
7825
|
-
async function
|
|
7826
|
-
if (!e) return
|
|
7827
|
-
let t =
|
|
7828
|
-
|
|
7823
|
+
async function Mf(e) {
|
|
7824
|
+
if (!e) return Nf();
|
|
7825
|
+
let t = gf();
|
|
7826
|
+
mf(rf.INFO, "Signing in to chat"), await t.login(e);
|
|
7829
7827
|
}
|
|
7830
|
-
async function
|
|
7831
|
-
$.value && (
|
|
7828
|
+
async function Nf() {
|
|
7829
|
+
$.value && (mf(rf.INFO, "Signing out from chat"), await $.value.logout());
|
|
7832
7830
|
}
|
|
7833
|
-
async function
|
|
7831
|
+
async function Pf(e) {
|
|
7834
7832
|
let t = e ?? "default";
|
|
7835
|
-
|
|
7836
|
-
let n =
|
|
7837
|
-
await n.init(), await n.connectRealtime(), await
|
|
7833
|
+
uf.add(t);
|
|
7834
|
+
let n = gf();
|
|
7835
|
+
await n.init(), await n.connectRealtime(), await Uf();
|
|
7838
7836
|
}
|
|
7839
|
-
async function
|
|
7837
|
+
async function Ff(e) {
|
|
7840
7838
|
if (!$.value) return;
|
|
7841
7839
|
let t = e ?? "default";
|
|
7842
|
-
|
|
7840
|
+
uf.delete(t), !(uf.size > 0) && (await $.value.disconnectRealtime(), $.value.closeThread());
|
|
7843
7841
|
}
|
|
7844
|
-
async function
|
|
7845
|
-
|
|
7846
|
-
}
|
|
7847
|
-
function If(e) {
|
|
7848
|
-
Dt(e);
|
|
7842
|
+
async function If() {
|
|
7843
|
+
uf.clear(), $.value && (await $.value.disconnectRealtime(), $.value.closeThread());
|
|
7849
7844
|
}
|
|
7850
7845
|
function Lf(e) {
|
|
7851
|
-
|
|
7846
|
+
Dt(e);
|
|
7852
7847
|
}
|
|
7853
7848
|
function Rf(e) {
|
|
7854
|
-
|
|
7849
|
+
hf(e);
|
|
7855
7850
|
}
|
|
7856
7851
|
function zf(e) {
|
|
7857
|
-
|
|
7852
|
+
return e ? Mf(e) : Nf();
|
|
7858
7853
|
}
|
|
7859
|
-
|
|
7860
|
-
|
|
7854
|
+
function Bf(e) {
|
|
7855
|
+
gf(e);
|
|
7856
|
+
}
|
|
7857
|
+
async function Vf(e, t = !1) {
|
|
7858
|
+
if (!wf.value) return null;
|
|
7861
7859
|
try {
|
|
7862
7860
|
return await q.getGroup(e);
|
|
7863
7861
|
} catch (e) {
|
|
@@ -7866,14 +7864,14 @@ async function Bf(e, t = !1) {
|
|
|
7866
7864
|
return null;
|
|
7867
7865
|
}
|
|
7868
7866
|
}
|
|
7869
|
-
async function
|
|
7870
|
-
let t =
|
|
7871
|
-
return
|
|
7867
|
+
async function Hf(e) {
|
|
7868
|
+
let t = gf();
|
|
7869
|
+
return mf(rf.INFO, "Starting direct message"), t.initiateDirectMessage(e);
|
|
7872
7870
|
}
|
|
7873
|
-
async function
|
|
7874
|
-
return $.value ? (await $.value.fetchConversations(),
|
|
7871
|
+
async function Uf() {
|
|
7872
|
+
return $.value ? (await $.value.fetchConversations(), Ef.value) : [];
|
|
7875
7873
|
}
|
|
7876
|
-
async function
|
|
7874
|
+
async function Wf(e) {
|
|
7877
7875
|
if (!$.value) return;
|
|
7878
7876
|
let t = $.value.conversations;
|
|
7879
7877
|
t.value = t.value.map((t) => t.targetId === e || t.id === e ? {
|
|
@@ -7881,147 +7879,147 @@ async function Uf(e) {
|
|
|
7881
7879
|
unreadCount: 0
|
|
7882
7880
|
} : t);
|
|
7883
7881
|
}
|
|
7884
|
-
async function
|
|
7882
|
+
async function Gf(e) {
|
|
7885
7883
|
try {
|
|
7886
|
-
return
|
|
7884
|
+
return wf.value && (await q.getOnlineGroupMemberCount([e]))[e] || 0;
|
|
7887
7885
|
} catch {
|
|
7888
7886
|
return 0;
|
|
7889
7887
|
}
|
|
7890
7888
|
}
|
|
7891
|
-
async function
|
|
7892
|
-
let n = await
|
|
7893
|
-
return $.value && ($.value.conversations.value =
|
|
7894
|
-
}
|
|
7895
|
-
async function Kf(e) {
|
|
7896
|
-
let t = await Bd(e);
|
|
7897
|
-
return $.value && ($.value.conversations.value = Kd($.value.conversations.value, e, t)), t;
|
|
7889
|
+
async function Kf(e, t) {
|
|
7890
|
+
let n = await Hd(e, t);
|
|
7891
|
+
return $.value && ($.value.conversations.value = qd($.value.conversations.value, e, n)), n;
|
|
7898
7892
|
}
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
return
|
|
7893
|
+
async function qf(e) {
|
|
7894
|
+
let t = await Vd(e);
|
|
7895
|
+
return $.value && ($.value.conversations.value = qd($.value.conversations.value, e, t)), t;
|
|
7902
7896
|
}
|
|
7897
|
+
var Jf = a(() => $.value?.pinnedMessages.value ?? []);
|
|
7903
7898
|
function Yf(e) {
|
|
7904
|
-
return
|
|
7899
|
+
return gf().pinMessage(e);
|
|
7905
7900
|
}
|
|
7906
7901
|
function Xf(e) {
|
|
7907
|
-
return
|
|
7902
|
+
return gf().unpinMessage(e);
|
|
7908
7903
|
}
|
|
7909
7904
|
function Zf(e) {
|
|
7910
|
-
return
|
|
7905
|
+
return gf().togglePinnedMessage(e);
|
|
7911
7906
|
}
|
|
7912
7907
|
function Qf(e) {
|
|
7913
|
-
|
|
7908
|
+
return $.value?.isMessagePinned(e) ?? !1;
|
|
7914
7909
|
}
|
|
7915
|
-
|
|
7910
|
+
function $f(e) {
|
|
7911
|
+
cf.value = e;
|
|
7912
|
+
}
|
|
7913
|
+
var ep = /* @__PURE__ */ new Map(), tp = {
|
|
7916
7914
|
state: a(() => $.value?.callState.value ?? "idle"),
|
|
7917
7915
|
activeType: a(() => $.value?.activeCallType.value ?? "video"),
|
|
7918
7916
|
activeSessionId: a(() => $.value?.activeCallSessionId.value ?? null),
|
|
7919
7917
|
incomingCall: a(() => $.value?.incomingCall.value ?? null),
|
|
7920
|
-
incomingCalls: a(() => $.value?.incomingCalls.value ??
|
|
7918
|
+
incomingCalls: a(() => $.value?.incomingCalls.value ?? ep),
|
|
7921
7919
|
outgoingCall: a(() => $.value?.outgoingCall.value ?? null),
|
|
7922
7920
|
lastEndReason: a(() => $.value?.lastCallEndReason.value ?? null),
|
|
7923
|
-
start: (e, t, n = "video", r = "user", i) =>
|
|
7924
|
-
join: (e, t, n = "video", r) =>
|
|
7925
|
-
accept: (e, t, n) =>
|
|
7926
|
-
reject: (e) =>
|
|
7927
|
-
end: () =>
|
|
7921
|
+
start: (e, t, n = "video", r = "user", i) => gf().initiateCall(e, t, n, r, i),
|
|
7922
|
+
join: (e, t, n = "video", r) => gf().joinChatCall(e, t, n, r),
|
|
7923
|
+
accept: (e, t, n) => gf().acceptIncomingCall(e, t, n),
|
|
7924
|
+
reject: (e) => gf().rejectIncomingCall(e),
|
|
7925
|
+
end: () => gf().endActiveCall(),
|
|
7928
7926
|
leave: () => $.value?.leaveActiveCall(),
|
|
7929
|
-
joinActive: (e, t) =>
|
|
7930
|
-
},
|
|
7931
|
-
install:
|
|
7932
|
-
initialized:
|
|
7933
|
-
connected:
|
|
7934
|
-
connecting:
|
|
7935
|
-
loggedIn:
|
|
7936
|
-
userChats:
|
|
7937
|
-
userUid:
|
|
7938
|
-
connect:
|
|
7939
|
-
disconnect:
|
|
7940
|
-
disconnectAll:
|
|
7941
|
-
setAccessToken:
|
|
7942
|
-
login:
|
|
7943
|
-
logout:
|
|
7944
|
-
setCurrentEnvironment:
|
|
7927
|
+
joinActive: (e, t) => gf().joinOutgoingCallSession(e, t)
|
|
7928
|
+
}, np = {
|
|
7929
|
+
install: jf,
|
|
7930
|
+
initialized: af,
|
|
7931
|
+
connected: Sf,
|
|
7932
|
+
connecting: Cf,
|
|
7933
|
+
loggedIn: wf,
|
|
7934
|
+
userChats: Ef,
|
|
7935
|
+
userUid: _f,
|
|
7936
|
+
connect: Pf,
|
|
7937
|
+
disconnect: Ff,
|
|
7938
|
+
disconnectAll: If,
|
|
7939
|
+
setAccessToken: zf,
|
|
7940
|
+
login: Mf,
|
|
7941
|
+
logout: Nf,
|
|
7942
|
+
setCurrentEnvironment: Bf,
|
|
7945
7943
|
getCurrentEnvironment: it,
|
|
7946
|
-
setThemeMode:
|
|
7947
|
-
setLanguage:
|
|
7948
|
-
getGroup:
|
|
7949
|
-
getChatMembersInfo:
|
|
7950
|
-
getUserChats:
|
|
7951
|
-
initiateDirectMessage:
|
|
7952
|
-
clearChatCount:
|
|
7944
|
+
setThemeMode: Rf,
|
|
7945
|
+
setLanguage: Lf,
|
|
7946
|
+
getGroup: Vf,
|
|
7947
|
+
getChatMembersInfo: Bd,
|
|
7948
|
+
getUserChats: Uf,
|
|
7949
|
+
initiateDirectMessage: Hf,
|
|
7950
|
+
clearChatCount: Wf,
|
|
7953
7951
|
refreshVisibleMessages: () => $.value?.refreshVisibleMessages(),
|
|
7954
|
-
getChatOnlineCount:
|
|
7952
|
+
getChatOnlineCount: Gf,
|
|
7955
7953
|
searchChat: (e, t = 25) => Rd(e, t, $.value?.currentUser.value?.uid),
|
|
7956
7954
|
getSenderDisplayName: Ld,
|
|
7957
7955
|
getMessageTextPreview: ll,
|
|
7958
7956
|
proxyImage: _t,
|
|
7959
|
-
getMutedUntil:
|
|
7960
|
-
muteChat:
|
|
7961
|
-
getMyChatSettings:
|
|
7962
|
-
updateMyChatSettings:
|
|
7963
|
-
setMuteAll:
|
|
7964
|
-
toggleMuteAll:
|
|
7957
|
+
getMutedUntil: qf,
|
|
7958
|
+
muteChat: Kf,
|
|
7959
|
+
getMyChatSettings: Ud,
|
|
7960
|
+
updateMyChatSettings: Wd,
|
|
7961
|
+
setMuteAll: Gd,
|
|
7962
|
+
toggleMuteAll: Kd,
|
|
7965
7963
|
toMarkdownHtml: Uc,
|
|
7966
7964
|
retrieveCcToken: pt,
|
|
7967
|
-
scrollToMessageId:
|
|
7968
|
-
scrollToMessage:
|
|
7969
|
-
pinnedMessages:
|
|
7970
|
-
pinMessage:
|
|
7971
|
-
unpinMessage:
|
|
7972
|
-
togglePinnedMessage:
|
|
7973
|
-
isMessagePinned:
|
|
7974
|
-
connectivity:
|
|
7975
|
-
onlineMode:
|
|
7976
|
-
onlineStatus:
|
|
7977
|
-
theme:
|
|
7978
|
-
themeMode:
|
|
7965
|
+
scrollToMessageId: cf,
|
|
7966
|
+
scrollToMessage: $f,
|
|
7967
|
+
pinnedMessages: Jf,
|
|
7968
|
+
pinMessage: Yf,
|
|
7969
|
+
unpinMessage: Xf,
|
|
7970
|
+
togglePinnedMessage: Zf,
|
|
7971
|
+
isMessagePinned: Qf,
|
|
7972
|
+
connectivity: Tf,
|
|
7973
|
+
onlineMode: Tf.onlineMode,
|
|
7974
|
+
onlineStatus: Tf.onlineStatus,
|
|
7975
|
+
theme: tf,
|
|
7976
|
+
themeMode: sf,
|
|
7979
7977
|
language: xt,
|
|
7980
|
-
calls:
|
|
7978
|
+
calls: tp
|
|
7981
7979
|
};
|
|
7982
7980
|
//#endregion
|
|
7983
7981
|
//#region src/chat/conversationState.ts
|
|
7984
|
-
function np(e) {
|
|
7985
|
-
return e?.source?.getConversationWith?.();
|
|
7986
|
-
}
|
|
7987
7982
|
function rp(e) {
|
|
7988
|
-
return
|
|
7983
|
+
return e?.source?.getConversationWith?.();
|
|
7989
7984
|
}
|
|
7990
7985
|
function ip(e) {
|
|
7991
|
-
return
|
|
7986
|
+
return !!rp(e)?.getMetadata?.()?.isChannel;
|
|
7992
7987
|
}
|
|
7993
7988
|
function ap(e) {
|
|
7994
|
-
|
|
7995
|
-
return typeof t == "string" ? t : void 0;
|
|
7989
|
+
return rp(e)?.getHasJoined?.() ?? !1;
|
|
7996
7990
|
}
|
|
7997
7991
|
function op(e) {
|
|
7998
|
-
|
|
7992
|
+
let t = rp(e)?.getScope?.();
|
|
7993
|
+
return typeof t == "string" ? t : void 0;
|
|
7999
7994
|
}
|
|
8000
7995
|
function sp(e) {
|
|
8001
|
-
return !
|
|
7996
|
+
return ip(e) && (!ap(e) || op(e) === "participant");
|
|
8002
7997
|
}
|
|
8003
7998
|
function cp(e) {
|
|
8004
|
-
return !
|
|
7999
|
+
return !ip(e) || ap(e);
|
|
8005
8000
|
}
|
|
8006
8001
|
function lp(e) {
|
|
8007
|
-
return !
|
|
8002
|
+
return !ip(e) || ap(e);
|
|
8008
8003
|
}
|
|
8009
8004
|
function up(e) {
|
|
8010
|
-
return !
|
|
8005
|
+
return !ip(e) || ap(e) && op(e) !== "participant";
|
|
8011
8006
|
}
|
|
8012
8007
|
function dp(e) {
|
|
8013
|
-
return !
|
|
8008
|
+
return !ip(e) || ap(e) && op(e) !== "participant";
|
|
8014
8009
|
}
|
|
8015
8010
|
function fp(e) {
|
|
8016
|
-
return
|
|
8011
|
+
return !ip(e);
|
|
8012
|
+
}
|
|
8013
|
+
function pp(e) {
|
|
8014
|
+
return e?.type === "user" || !ip(e) && ap(e);
|
|
8017
8015
|
}
|
|
8018
8016
|
//#endregion
|
|
8019
8017
|
//#region src/composables/chat/useConversationContext.ts
|
|
8020
|
-
function
|
|
8021
|
-
let { chatClient: t, selectedConversation: n } = e, r = a(() => t.value?.currentUser.value?.uid), i = a(() =>
|
|
8018
|
+
function mp(e) {
|
|
8019
|
+
let { chatClient: t, selectedConversation: n } = e, r = a(() => t.value?.currentUser.value?.uid), i = a(() => cp(n.value)), o = a(() => lp(n.value)), s = a(() => up(n.value)), c = a(() => fp(n.value)), l = a(() => !!t.value?.pinningEnabled.value && dp(n.value)), u = a(() => {
|
|
8022
8020
|
let t = e.getPropIsReadOnly();
|
|
8023
|
-
return t === void 0 ?
|
|
8024
|
-
}), d = a(() =>
|
|
8021
|
+
return t === void 0 ? sp(n.value) : t;
|
|
8022
|
+
}), d = a(() => ip(n.value)), f = a(() => {
|
|
8025
8023
|
let t = n.value, i = r.value, a = e.getMentionCandidates();
|
|
8026
8024
|
return t ? t.type === "user" ? !t.targetId || t.targetId === i ? [] : [{
|
|
8027
8025
|
uid: t.targetId,
|
|
@@ -8043,26 +8041,26 @@ function pp(e) {
|
|
|
8043
8041
|
mentionCandidates: f,
|
|
8044
8042
|
mentionNameByUid: a((e) => {
|
|
8045
8043
|
let n = Cn(cn(f.value), t.value?.mentionDisplayNamesByUid.value ?? {});
|
|
8046
|
-
return e &&
|
|
8044
|
+
return e && vp(e, n) ? e : n;
|
|
8047
8045
|
})
|
|
8048
8046
|
};
|
|
8049
8047
|
}
|
|
8050
|
-
var
|
|
8051
|
-
function
|
|
8052
|
-
E(
|
|
8048
|
+
var hp = Symbol("conversationCtx");
|
|
8049
|
+
function gp(e) {
|
|
8050
|
+
E(hp, e);
|
|
8053
8051
|
}
|
|
8054
|
-
function
|
|
8055
|
-
let e = h(
|
|
8052
|
+
function _p() {
|
|
8053
|
+
let e = h(hp);
|
|
8056
8054
|
if (!e) throw Error("useConversationContext() requires an ancestor <BccChat> component.");
|
|
8057
8055
|
return e;
|
|
8058
8056
|
}
|
|
8059
|
-
function
|
|
8057
|
+
function vp(e, t) {
|
|
8060
8058
|
let n = Object.keys(e);
|
|
8061
8059
|
return n.length === Object.keys(t).length && n.every((n) => t[n] === e[n]);
|
|
8062
8060
|
}
|
|
8063
8061
|
//#endregion
|
|
8064
8062
|
//#region src/composables/chat/useMessagesContext.ts
|
|
8065
|
-
function
|
|
8063
|
+
function yp(e) {
|
|
8066
8064
|
let { chatClient: t, selectedConversation: n, usesPublicContract: r, loadingChat: i } = e, o = a(() => {
|
|
8067
8065
|
let n = t.value?.messages.value ?? [];
|
|
8068
8066
|
return e.getHideDeletedMessages() ? n.filter((e) => !e.isDeleted) : n;
|
|
@@ -8090,18 +8088,18 @@ function vp(e) {
|
|
|
8090
8088
|
isChatEmpty: a(() => !!n.value && !s.value && o.value.length === 0)
|
|
8091
8089
|
};
|
|
8092
8090
|
}
|
|
8093
|
-
var
|
|
8094
|
-
function
|
|
8095
|
-
E(
|
|
8091
|
+
var bp = Symbol("messagesCtx");
|
|
8092
|
+
function xp(e) {
|
|
8093
|
+
E(bp, e);
|
|
8096
8094
|
}
|
|
8097
|
-
function
|
|
8098
|
-
let e = h(
|
|
8095
|
+
function Sp() {
|
|
8096
|
+
let e = h(bp);
|
|
8099
8097
|
if (!e) throw Error("useMessagesContext() requires an ancestor <BccChat> component.");
|
|
8100
8098
|
return e;
|
|
8101
8099
|
}
|
|
8102
8100
|
//#endregion
|
|
8103
8101
|
//#region src/composables/useComposerDrafts.ts
|
|
8104
|
-
function
|
|
8102
|
+
function Cp(e) {
|
|
8105
8103
|
let t = D(""), n = D(""), r = D(0), i = D(0), a = e.mainComposerRef, o = e.threadComposerRef;
|
|
8106
8104
|
function s() {
|
|
8107
8105
|
t.value = "", r.value += 1;
|
|
@@ -8191,8 +8189,8 @@ function Sp(e) {
|
|
|
8191
8189
|
}
|
|
8192
8190
|
//#endregion
|
|
8193
8191
|
//#region src/composables/chat/useComposerContext.ts
|
|
8194
|
-
function
|
|
8195
|
-
let { chatClient: t } = e, n =
|
|
8192
|
+
function wp(e) {
|
|
8193
|
+
let { chatClient: t } = e, n = Cp({
|
|
8196
8194
|
getClient: () => t.value,
|
|
8197
8195
|
getMentionNameByUid: () => e.mentionNameByUid.value,
|
|
8198
8196
|
afterSchedule: e.afterSchedule,
|
|
@@ -8227,18 +8225,18 @@ function Cp(e) {
|
|
|
8227
8225
|
sendThreadPoll: n.sendThreadPoll
|
|
8228
8226
|
};
|
|
8229
8227
|
}
|
|
8230
|
-
var
|
|
8231
|
-
function
|
|
8232
|
-
E(
|
|
8228
|
+
var Tp = Symbol("composerCtx");
|
|
8229
|
+
function Ep(e) {
|
|
8230
|
+
E(Tp, e);
|
|
8233
8231
|
}
|
|
8234
|
-
function
|
|
8235
|
-
let e = h(
|
|
8232
|
+
function Dp() {
|
|
8233
|
+
let e = h(Tp);
|
|
8236
8234
|
if (!e) throw Error("useComposerContext() requires an ancestor <BccChat> component.");
|
|
8237
8235
|
return e;
|
|
8238
8236
|
}
|
|
8239
8237
|
//#endregion
|
|
8240
8238
|
//#region src/composables/useMessageInfoDialog.ts
|
|
8241
|
-
function
|
|
8239
|
+
function Op(e) {
|
|
8242
8240
|
let t = D(null), n = D([]), r = D(!1), i = D(null), a = D({}), o = D({}), s = /* @__PURE__ */ new Map(), c = D({}), l = D({}), u = /* @__PURE__ */ new Map();
|
|
8243
8241
|
async function d(t) {
|
|
8244
8242
|
let n = a.value[t.id];
|
|
@@ -8324,16 +8322,16 @@ function Dp(e) {
|
|
|
8324
8322
|
}
|
|
8325
8323
|
//#endregion
|
|
8326
8324
|
//#region src/composables/chat/useDialogsContext.ts
|
|
8327
|
-
var
|
|
8328
|
-
function
|
|
8325
|
+
var kp = !1;
|
|
8326
|
+
function Ap() {
|
|
8329
8327
|
try {
|
|
8330
8328
|
return ce();
|
|
8331
8329
|
} catch {
|
|
8332
|
-
return
|
|
8330
|
+
return kp || (kp = !0, console.error("[bcc-chat] No toast service found, so chat notifications (e.g. \"Forwarded to …\") are not shown. Install it with `BccComponentLibrary(app)` (or PrimeVue's `ToastService`) and render `<BccToast />` once in your app root.")), null;
|
|
8333
8331
|
}
|
|
8334
8332
|
}
|
|
8335
|
-
function
|
|
8336
|
-
let { chatClient: t, selectedConversation: n } = e, r =
|
|
8333
|
+
function jp(e) {
|
|
8334
|
+
let { chatClient: t, selectedConversation: n } = e, r = Op({
|
|
8337
8335
|
getClient: () => t.value,
|
|
8338
8336
|
fetchErrorFallback: e.fetchErrorFallback
|
|
8339
8337
|
}), i = D(e.getInitialScheduledMessagesOpen()), o = a(() => e.canScheduleMessages() && !!t.value?.scheduledMessages.value.length), s = a(() => t.value?.loadingScheduledMessages.value ?? !1), c = a(() => t.value?.scheduledMessages.value ?? []);
|
|
@@ -8354,7 +8352,7 @@ function Ap(e) {
|
|
|
8354
8352
|
function p() {
|
|
8355
8353
|
d.value = !1;
|
|
8356
8354
|
}
|
|
8357
|
-
let m =
|
|
8355
|
+
let m = Ap(), h = D(null), g = D(!1);
|
|
8358
8356
|
function _(e) {
|
|
8359
8357
|
h.value = e;
|
|
8360
8358
|
}
|
|
@@ -8405,18 +8403,18 @@ function Ap(e) {
|
|
|
8405
8403
|
sendForwardedMessage: y
|
|
8406
8404
|
};
|
|
8407
8405
|
}
|
|
8408
|
-
var
|
|
8409
|
-
function
|
|
8410
|
-
E(
|
|
8406
|
+
var Mp = Symbol("dialogsCtx");
|
|
8407
|
+
function Np(e) {
|
|
8408
|
+
E(Mp, e);
|
|
8411
8409
|
}
|
|
8412
|
-
function
|
|
8413
|
-
let e = h(
|
|
8410
|
+
function Pp() {
|
|
8411
|
+
let e = h(Mp);
|
|
8414
8412
|
if (!e) throw Error("useDialogsContext() requires an ancestor <BccChat> component.");
|
|
8415
8413
|
return e;
|
|
8416
8414
|
}
|
|
8417
8415
|
//#endregion
|
|
8418
8416
|
//#region src/composables/useChatActions.ts
|
|
8419
|
-
function
|
|
8417
|
+
function Fp({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
8420
8418
|
let i = [];
|
|
8421
8419
|
function a(e, t) {
|
|
8422
8420
|
i.push(r.on(e, t));
|
|
@@ -8457,7 +8455,7 @@ function Pp({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
|
8457
8455
|
let { message: n, optionId: r } = t, i = e.client.value;
|
|
8458
8456
|
i && await i.votePoll(n, r);
|
|
8459
8457
|
}), a("message:openReference", (e) => {
|
|
8460
|
-
|
|
8458
|
+
np.scrollToMessage(e);
|
|
8461
8459
|
}), a("message:forward", (e) => {
|
|
8462
8460
|
n.openForwardMessage(e);
|
|
8463
8461
|
}), a("message:togglePin", async (t) => {
|
|
@@ -8520,8 +8518,8 @@ function Pp({ conversation: e, composer: t, dialogs: n, bus: r }) {
|
|
|
8520
8518
|
}
|
|
8521
8519
|
//#endregion
|
|
8522
8520
|
//#region src/composables/useChatEventBus.ts
|
|
8523
|
-
var
|
|
8524
|
-
function
|
|
8521
|
+
var Ip = Symbol("chatBus");
|
|
8522
|
+
function Lp() {
|
|
8525
8523
|
let e = /* @__PURE__ */ new Map();
|
|
8526
8524
|
return {
|
|
8527
8525
|
emit(t, ...n) {
|
|
@@ -8537,41 +8535,53 @@ function Ip() {
|
|
|
8537
8535
|
}
|
|
8538
8536
|
};
|
|
8539
8537
|
}
|
|
8540
|
-
function
|
|
8541
|
-
E(
|
|
8538
|
+
function Rp(e) {
|
|
8539
|
+
E(Ip, e);
|
|
8542
8540
|
}
|
|
8543
|
-
function
|
|
8544
|
-
let e = h(
|
|
8541
|
+
function zp() {
|
|
8542
|
+
let e = h(Ip);
|
|
8545
8543
|
if (!e) throw Error("useChatBus() requires an ancestor <BccChat> component.");
|
|
8546
8544
|
return e;
|
|
8547
8545
|
}
|
|
8548
|
-
function
|
|
8546
|
+
function Bp(e, t, n) {
|
|
8549
8547
|
let r = e.on(t, n);
|
|
8550
8548
|
w(r);
|
|
8551
8549
|
}
|
|
8552
8550
|
//#endregion
|
|
8553
8551
|
//#region src/composables/useGroupMemberTracking.ts
|
|
8554
|
-
function
|
|
8555
|
-
let t = D([]), n = `bcc-chat-group-${crypto.randomUUID()}`, r = `bcc-chat-presence-${crypto.randomUUID()}`, i = 0, a;
|
|
8556
|
-
function
|
|
8552
|
+
function Vp(e) {
|
|
8553
|
+
let t = D([]), n = `bcc-chat-group-${crypto.randomUUID()}`, r = `bcc-chat-presence-${crypto.randomUUID()}`, i = 0, a, o;
|
|
8554
|
+
function s(e) {
|
|
8555
|
+
if (o?.groupUid !== e) {
|
|
8556
|
+
let t = Bd(e), n = () => {
|
|
8557
|
+
o?.members === t && (o = void 0);
|
|
8558
|
+
};
|
|
8559
|
+
t.then(n, n), o = {
|
|
8560
|
+
groupUid: e,
|
|
8561
|
+
members: t
|
|
8562
|
+
};
|
|
8563
|
+
}
|
|
8564
|
+
return o.members;
|
|
8565
|
+
}
|
|
8566
|
+
function c() {
|
|
8557
8567
|
i++, a = void 0, t.value.length !== 0 && (t.value = [], e.onMembersChanged([]));
|
|
8558
8568
|
}
|
|
8559
|
-
async function
|
|
8569
|
+
async function l(n) {
|
|
8560
8570
|
let r = ++i;
|
|
8561
8571
|
if (e.isChannel() || !e.hasJoined()) {
|
|
8562
8572
|
a = void 0, t.value = [], e.onMembersChanged([]);
|
|
8563
8573
|
return;
|
|
8564
8574
|
}
|
|
8565
8575
|
try {
|
|
8566
|
-
let o = await
|
|
8576
|
+
let o = await s(n);
|
|
8567
8577
|
if (r !== i) return;
|
|
8568
|
-
a = n, t.value =
|
|
8578
|
+
a = n, t.value = o, e.onMembersChanged(t.value);
|
|
8569
8579
|
} catch {
|
|
8570
8580
|
if (r !== i) return;
|
|
8571
8581
|
a = void 0, t.value = [], e.onMembersChanged([]);
|
|
8572
8582
|
}
|
|
8573
8583
|
}
|
|
8574
|
-
function
|
|
8584
|
+
function u(n, r, i, a) {
|
|
8575
8585
|
let o = e.getConversationTargetId(), s = n?.getGuid?.();
|
|
8576
8586
|
if (!o || !s || s !== o || e.isChannel() || !e.hasJoined()) return;
|
|
8577
8587
|
let c = Ul(r, a ?? r.getScope?.() ?? q.GROUP_MEMBER_SCOPE.PARTICIPANT);
|
|
@@ -8580,7 +8590,7 @@ function Bp(e) {
|
|
|
8580
8590
|
...c
|
|
8581
8591
|
} : e), e.onMembersChanged(t.value);
|
|
8582
8592
|
}
|
|
8583
|
-
function
|
|
8593
|
+
function d(n) {
|
|
8584
8594
|
let r = n?.getUid?.();
|
|
8585
8595
|
if (!r || !a || a !== e.getConversationTargetId() || e.isChannel() || !e.hasJoined() || !t.value.some((e) => e.uid === r)) return;
|
|
8586
8596
|
let { status: i, lastSeen: o } = Ul(n);
|
|
@@ -8592,48 +8602,48 @@ function Bp(e) {
|
|
|
8592
8602
|
}
|
|
8593
8603
|
return C(() => {
|
|
8594
8604
|
q.addUserListener(r, new q.UserListener({
|
|
8595
|
-
onUserOnline: (e) =>
|
|
8596
|
-
onUserOffline: (e) =>
|
|
8605
|
+
onUserOnline: (e) => d(e),
|
|
8606
|
+
onUserOffline: (e) => d(e)
|
|
8597
8607
|
})), q.addGroupListener(n, new q.GroupListener({
|
|
8598
8608
|
onGroupMemberScopeChanged: (e, t, n, r, i) => {
|
|
8599
|
-
|
|
8609
|
+
u(i, t, "update", n);
|
|
8600
8610
|
},
|
|
8601
8611
|
onGroupMemberKicked: (e, t, n, r) => {
|
|
8602
|
-
|
|
8612
|
+
u(r, t, "remove");
|
|
8603
8613
|
},
|
|
8604
8614
|
onGroupMemberBanned: (e, t, n, r) => {
|
|
8605
|
-
|
|
8615
|
+
u(r, t, "remove");
|
|
8606
8616
|
},
|
|
8607
8617
|
onGroupMemberUnbanned: (e, t, n, r) => {
|
|
8608
|
-
|
|
8618
|
+
u(r, t, "add");
|
|
8609
8619
|
},
|
|
8610
8620
|
onMemberAddedToGroup: (e, t, n, r) => {
|
|
8611
|
-
|
|
8621
|
+
u(r, t, "add");
|
|
8612
8622
|
},
|
|
8613
8623
|
onGroupMemberLeft: (e, t, n) => {
|
|
8614
|
-
|
|
8624
|
+
u(n, t, "remove");
|
|
8615
8625
|
},
|
|
8616
8626
|
onGroupMemberJoined: (e, t, n) => {
|
|
8617
|
-
|
|
8627
|
+
u(n, t, "add");
|
|
8618
8628
|
}
|
|
8619
8629
|
}));
|
|
8620
8630
|
}), w(() => {
|
|
8621
8631
|
q.removeGroupListener(n), q.removeUserListener(r);
|
|
8622
8632
|
}), {
|
|
8623
8633
|
groupMembers: t,
|
|
8624
|
-
fetchGroupMembers:
|
|
8625
|
-
clearGroupMembers:
|
|
8634
|
+
fetchGroupMembers: l,
|
|
8635
|
+
clearGroupMembers: c
|
|
8626
8636
|
};
|
|
8627
8637
|
}
|
|
8628
8638
|
//#endregion
|
|
8629
8639
|
//#region src/composables/useMessageNavigation.ts
|
|
8630
|
-
function
|
|
8640
|
+
function Hp(e) {
|
|
8631
8641
|
async function t(n, r = !1) {
|
|
8632
|
-
let i = n ??
|
|
8642
|
+
let i = n ?? np.scrollToMessageId.value;
|
|
8633
8643
|
if (!i) return;
|
|
8634
8644
|
let a = e.getClient();
|
|
8635
8645
|
if (a && !await a.ensureMessageLoaded(i)) {
|
|
8636
|
-
|
|
8646
|
+
np.scrollToMessageId.value === i && (np.scrollToMessageId.value = void 0);
|
|
8637
8647
|
return;
|
|
8638
8648
|
}
|
|
8639
8649
|
await v(), await new Promise(requestAnimationFrame);
|
|
@@ -8645,7 +8655,7 @@ function Vp(e) {
|
|
|
8645
8655
|
s.scrollTo({
|
|
8646
8656
|
top: d,
|
|
8647
8657
|
behavior: "smooth"
|
|
8648
|
-
}),
|
|
8658
|
+
}), np.scrollToMessageId.value === i && (np.scrollToMessageId.value = void 0);
|
|
8649
8659
|
}
|
|
8650
8660
|
function n(e) {
|
|
8651
8661
|
t(e);
|
|
@@ -8657,7 +8667,7 @@ function Vp(e) {
|
|
|
8657
8667
|
}
|
|
8658
8668
|
//#endregion
|
|
8659
8669
|
//#region src/chat/clipboardFiles.ts
|
|
8660
|
-
var
|
|
8670
|
+
var Up = /* @__PURE__ */ new Set([
|
|
8661
8671
|
"",
|
|
8662
8672
|
"image.png",
|
|
8663
8673
|
"image.jpeg",
|
|
@@ -8665,7 +8675,7 @@ var Hp = /* @__PURE__ */ new Set([
|
|
|
8665
8675
|
"image.gif",
|
|
8666
8676
|
"image.webp",
|
|
8667
8677
|
"blob"
|
|
8668
|
-
]),
|
|
8678
|
+
]), Wp = {
|
|
8669
8679
|
"image/png": "png",
|
|
8670
8680
|
"image/jpeg": "jpg",
|
|
8671
8681
|
"image/jpg": "jpg",
|
|
@@ -8674,18 +8684,18 @@ var Hp = /* @__PURE__ */ new Set([
|
|
|
8674
8684
|
"image/bmp": "bmp",
|
|
8675
8685
|
"image/svg+xml": "svg"
|
|
8676
8686
|
};
|
|
8677
|
-
function
|
|
8687
|
+
function Gp(e) {
|
|
8678
8688
|
let t = e.name.trim(), n = t.toLowerCase();
|
|
8679
|
-
return
|
|
8689
|
+
return Up.has(n) ? `pasted-image.${Wp[e.type] ?? "png"}` : t;
|
|
8680
8690
|
}
|
|
8681
|
-
function
|
|
8691
|
+
function Kp(e) {
|
|
8682
8692
|
let t = e.clipboardData?.items;
|
|
8683
8693
|
if (!t) return null;
|
|
8684
8694
|
for (let e of t) {
|
|
8685
8695
|
if (e.kind !== "file" || !e.type.startsWith("image/")) continue;
|
|
8686
8696
|
let t = e.getAsFile();
|
|
8687
8697
|
if (!t) continue;
|
|
8688
|
-
let n =
|
|
8698
|
+
let n = Gp(t);
|
|
8689
8699
|
return n === t.name ? t : new File([t], n, {
|
|
8690
8700
|
type: t.type,
|
|
8691
8701
|
lastModified: t.lastModified
|
|
@@ -8695,7 +8705,7 @@ function Gp(e) {
|
|
|
8695
8705
|
}
|
|
8696
8706
|
//#endregion
|
|
8697
8707
|
//#region src/composables/useIsTouchUi.ts
|
|
8698
|
-
function
|
|
8708
|
+
function qp() {
|
|
8699
8709
|
let e = typeof window < "u" ? window.matchMedia("(hover: hover) and (pointer: fine)") : null, t = D(!!e?.matches);
|
|
8700
8710
|
return e?.addEventListener("change", (e) => {
|
|
8701
8711
|
t.value = e.matches;
|
|
@@ -8703,7 +8713,7 @@ function Kp() {
|
|
|
8703
8713
|
}
|
|
8704
8714
|
//#endregion
|
|
8705
8715
|
//#region src/composables/useComposerTriggers.ts
|
|
8706
|
-
function
|
|
8716
|
+
function Jp(e) {
|
|
8707
8717
|
return {
|
|
8708
8718
|
id: "mention",
|
|
8709
8719
|
triggerChar: "@",
|
|
@@ -8720,7 +8730,7 @@ function qp(e) {
|
|
|
8720
8730
|
}
|
|
8721
8731
|
};
|
|
8722
8732
|
}
|
|
8723
|
-
function
|
|
8733
|
+
function Yp(e) {
|
|
8724
8734
|
let t = D(null), n = D([]), r = D({
|
|
8725
8735
|
x: 0,
|
|
8726
8736
|
y: 0,
|
|
@@ -8753,7 +8763,7 @@ function Jp(e) {
|
|
|
8753
8763
|
}
|
|
8754
8764
|
for (let a of e.getTriggers()) {
|
|
8755
8765
|
if (!a.enabled()) continue;
|
|
8756
|
-
let e =
|
|
8766
|
+
let e = Xp(r, a.triggerChar);
|
|
8757
8767
|
if (!e) continue;
|
|
8758
8768
|
let c = a.getCandidates(e.query).slice(0, a.maxSuggestions ?? 8);
|
|
8759
8769
|
if (!c.length) {
|
|
@@ -8798,7 +8808,7 @@ function Jp(e) {
|
|
|
8798
8808
|
refreshActiveTrigger: c
|
|
8799
8809
|
};
|
|
8800
8810
|
}
|
|
8801
|
-
function
|
|
8811
|
+
function Xp(e, t) {
|
|
8802
8812
|
let n = window.getSelection();
|
|
8803
8813
|
if (!n || n.rangeCount === 0 || !n.isCollapsed) return null;
|
|
8804
8814
|
let r = n.getRangeAt(0);
|
|
@@ -8809,13 +8819,13 @@ function Yp(e, t) {
|
|
|
8809
8819
|
if (o === -1 || o > 0 && !/\s/.test(a[o - 1] ?? "")) return null;
|
|
8810
8820
|
let s = a.slice(o + 1);
|
|
8811
8821
|
if (/\s/.test(s)) return null;
|
|
8812
|
-
let c =
|
|
8822
|
+
let c = Qp(e, o, a.length) ?? Zp(r, t);
|
|
8813
8823
|
return c ? {
|
|
8814
8824
|
query: s,
|
|
8815
8825
|
range: c
|
|
8816
8826
|
} : null;
|
|
8817
8827
|
}
|
|
8818
|
-
function
|
|
8828
|
+
function Zp(e, t) {
|
|
8819
8829
|
let n = e.endContainer;
|
|
8820
8830
|
n.nodeType !== Node.TEXT_NODE && (n = e.endContainer.childNodes[e.endOffset - 1] ?? e.endContainer.childNodes[0] ?? null);
|
|
8821
8831
|
for (let r = 0; r < 4 && n; r += 1) {
|
|
@@ -8831,7 +8841,7 @@ function Xp(e, t) {
|
|
|
8831
8841
|
}
|
|
8832
8842
|
return null;
|
|
8833
8843
|
}
|
|
8834
|
-
function
|
|
8844
|
+
function Qp(e, t, n) {
|
|
8835
8845
|
let r = document.createTreeWalker(e, NodeFilter.SHOW_TEXT), i = 0, a = null, o = 0, s = null, c = 0;
|
|
8836
8846
|
for (let e = r.nextNode(); e; e = r.nextNode()) {
|
|
8837
8847
|
let r = e.textContent?.length ?? 0, l = i + r;
|
|
@@ -8845,7 +8855,7 @@ function Zp(e, t, n) {
|
|
|
8845
8855
|
let l = document.createRange();
|
|
8846
8856
|
return l.setStart(a, o), l.setEnd(s, c), l;
|
|
8847
8857
|
}
|
|
8848
|
-
function
|
|
8858
|
+
function $p(e, t) {
|
|
8849
8859
|
e.deleteContents();
|
|
8850
8860
|
let n = document.createElement("span");
|
|
8851
8861
|
n.className = "composer-mention", n.setAttribute("data-mention-uid", t.uid), n.contentEditable = "false", n.textContent = `@${t.displayName}`;
|
|
@@ -8856,22 +8866,22 @@ function Qp(e, t) {
|
|
|
8856
8866
|
}
|
|
8857
8867
|
//#endregion
|
|
8858
8868
|
//#region src/composables/useRichTextComposer.ts
|
|
8859
|
-
var
|
|
8860
|
-
function
|
|
8869
|
+
var em = 64;
|
|
8870
|
+
function tm(e, t, n) {
|
|
8861
8871
|
let r = D(0), i = D(!1), o = D({
|
|
8862
8872
|
x: 0,
|
|
8863
8873
|
y: 0,
|
|
8864
8874
|
placement: "above"
|
|
8865
8875
|
}), s = D(Fc(n.getModelValue())), c = null, l = a(() => {
|
|
8866
8876
|
let e = [...n.extraTriggers ?? []];
|
|
8867
|
-
return n.getMentionCandidates && e.unshift(
|
|
8877
|
+
return n.getMentionCandidates && e.unshift(Jp({
|
|
8868
8878
|
enabled: () => n.mentionsEnabled?.() ?? !0,
|
|
8869
8879
|
getMentionCandidates: () => n.getMentionCandidates?.() ?? [],
|
|
8870
8880
|
insertMention: (e, t) => {
|
|
8871
|
-
|
|
8881
|
+
$p(t, e), w(), T();
|
|
8872
8882
|
}
|
|
8873
8883
|
})), e;
|
|
8874
|
-
}), { triggerCandidates: u, triggerMenuPosition: d, highlightedTriggerIndex: f, showTriggerMenu: p, hideTriggerMenu: m, handleInput: h, handleKeydown: g, selectTriggerCandidate: _, refreshActiveTrigger: y } =
|
|
8884
|
+
}), { triggerCandidates: u, triggerMenuPosition: d, highlightedTriggerIndex: f, showTriggerMenu: p, hideTriggerMenu: m, handleInput: h, handleKeydown: g, selectTriggerCandidate: _, refreshActiveTrigger: y } = Yp({
|
|
8875
8885
|
editorRef: t,
|
|
8876
8886
|
getTriggers: () => l.value,
|
|
8877
8887
|
onChange: () => w()
|
|
@@ -8947,7 +8957,7 @@ function em(e, t, n) {
|
|
|
8947
8957
|
function F(e, n) {
|
|
8948
8958
|
let r = t.value, i = e.getBoundingClientRect(), a = r?.getBoundingClientRect(), s = i.width || i.height ? i : a;
|
|
8949
8959
|
if (!s) return;
|
|
8950
|
-
let c = P(), l = c ? 248 : 176, u = c ? 48 : 180, d = c ?
|
|
8960
|
+
let c = P(), l = c ? 248 : 176, u = c ? 48 : 180, d = c ? em : 0, f = !c && !!n, p = f ? n.clientX : s.left + s.width / 2, m = f ? n.clientY : s.top, h = f ? n.clientY : s.bottom, g = l / 2 + 8, _ = N(p, g, Math.max(g, window.innerWidth - l / 2 - 8)), v = m - 6 - 8, y = window.innerHeight - h - 6 - 8;
|
|
8951
8961
|
if (!c && (y >= u || y >= v)) {
|
|
8952
8962
|
let e = Math.max(8, window.innerHeight - u - 8);
|
|
8953
8963
|
o.value = {
|
|
@@ -9105,7 +9115,7 @@ function em(e, t, n) {
|
|
|
9105
9115
|
}
|
|
9106
9116
|
//#endregion
|
|
9107
9117
|
//#region src/components/messages/ComposerActionsPopover.vue?vue&type=script&setup=true&lang.ts
|
|
9108
|
-
var
|
|
9118
|
+
var nm = ["data-testid", "onClick"], rm = { class: "composer-actions-menu__icon" }, im = { class: "composer-actions-menu__icon" }, am = /*@__PURE__*/ p({
|
|
9109
9119
|
__name: "ComposerActionsPopover",
|
|
9110
9120
|
emits: ["pickFile", "openPoll"],
|
|
9111
9121
|
setup(e, { expose: t, emit: n }) {
|
|
@@ -9170,18 +9180,18 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9170
9180
|
class: "composer-actions-menu__item",
|
|
9171
9181
|
"data-testid": e.testId,
|
|
9172
9182
|
onClick: (t) => h(e.kind)
|
|
9173
|
-
}, [l("span",
|
|
9183
|
+
}, [l("span", rm, [(T(), o(A(e.icon), { class: "size-5" }))]), l("span", null, M(N(u)(e.label)), 1)], 8, nm)), 64)), l("button", {
|
|
9174
9184
|
type: "button",
|
|
9175
9185
|
class: "composer-actions-menu__item",
|
|
9176
9186
|
"data-testid": "composer-create-poll",
|
|
9177
9187
|
onClick: g
|
|
9178
|
-
}, [l("span",
|
|
9188
|
+
}, [l("span", im, [(T(), o(A(N(pe)), { class: "size-5" }))]), l("span", null, M(N(u)("createPoll")), 1)])], 512)), [[L, a.value]]);
|
|
9179
9189
|
}
|
|
9180
|
-
}),
|
|
9190
|
+
}), om = (e, t) => {
|
|
9181
9191
|
let n = e.__vccOpts || e;
|
|
9182
9192
|
for (let [e, r] of t) n[e] = r;
|
|
9183
9193
|
return n;
|
|
9184
|
-
},
|
|
9194
|
+
}, sm = /*#__PURE__*/ om(am, [["__scopeId", "data-v-5e8b1d79"]]), cm = { class: "border-default flex items-start justify-between gap-2 border-t-1 px-3 py-2" }, lm = { class: "min-w-0" }, um = { class: "body-md text-default mt-0.5 overflow-hidden font-medium text-ellipsis whitespace-nowrap" }, dm = { class: "body-md text-subtle overflow-hidden text-ellipsis whitespace-nowrap" }, fm = /* @__PURE__ */ p({
|
|
9185
9195
|
__name: "ComposerContextBanner",
|
|
9186
9196
|
props: {
|
|
9187
9197
|
message: {},
|
|
@@ -9190,11 +9200,11 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9190
9200
|
},
|
|
9191
9201
|
emits: ["cancel"],
|
|
9192
9202
|
setup(e, { emit: t }) {
|
|
9193
|
-
let n = e, r = t, { t: i } = Y(), o =
|
|
9194
|
-
return (t, n) => (T(), c("div",
|
|
9203
|
+
let n = e, r = t, { t: i } = Y(), o = _p(), s = a(() => ol(n.message, i("message"), o.mentionNameByUid.value));
|
|
9204
|
+
return (t, n) => (T(), c("div", cm, [l("div", lm, [
|
|
9195
9205
|
l("p", { class: y(["body-sm font-semibold uppercase", e.variant === "editing" ? "text-information" : "text-success"]) }, M(e.variant === "editing" ? N(i)("editingInContext", { context: e.contextLabel }) : N(i)("replyingInContext", { context: e.contextLabel })), 3),
|
|
9196
|
-
l("p",
|
|
9197
|
-
l("p",
|
|
9206
|
+
l("p", um, M(e.message.senderName), 1),
|
|
9207
|
+
l("p", dm, M(s.value), 1)
|
|
9198
9208
|
]), f(N(H), {
|
|
9199
9209
|
icon: N(ge),
|
|
9200
9210
|
text: "",
|
|
@@ -9203,18 +9213,18 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9203
9213
|
onClick: n[0] ||= (e) => r("cancel")
|
|
9204
9214
|
}, null, 8, ["icon"])]));
|
|
9205
9215
|
}
|
|
9206
|
-
}),
|
|
9216
|
+
}), pm = [
|
|
9207
9217
|
"👍",
|
|
9208
9218
|
"❤️",
|
|
9209
9219
|
"🔥",
|
|
9210
9220
|
"😂",
|
|
9211
9221
|
"🙏",
|
|
9212
9222
|
"🎉"
|
|
9213
|
-
],
|
|
9223
|
+
], mm = /* @__PURE__ */ "👏.😍.🤯.😮.😢.😡.👀.✅.💯.🙌.🤝.👌.💪.🤔.🫶.😅.🥳.💛.🌟.🚀.💥.🎯.📌.💡.🕊️.☀️.🌈.🍀.🎶.🫡".split("."), hm = ["aria-label", "onClick"], gm = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
9214
9224
|
__name: "ComposerEmojiPopover",
|
|
9215
9225
|
emits: ["select"],
|
|
9216
9226
|
setup(e, { expose: t, emit: n }) {
|
|
9217
|
-
let i = n, a = [...
|
|
9227
|
+
let i = n, a = [...pm, ...mm], o = D(!1), s = D(null);
|
|
9218
9228
|
function u() {
|
|
9219
9229
|
o.value = !o.value;
|
|
9220
9230
|
}
|
|
@@ -9248,12 +9258,12 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9248
9258
|
"aria-label": e,
|
|
9249
9259
|
onMousedown: t[0] ||= V(() => {}, ["prevent"]),
|
|
9250
9260
|
onClick: (t) => i("select", e)
|
|
9251
|
-
}, M(e), 41,
|
|
9261
|
+
}, M(e), 41, hm)), 64))], 512)), [[L, o.value]]);
|
|
9252
9262
|
}
|
|
9253
|
-
}), [["__scopeId", "data-v-60f03f8e"]]),
|
|
9263
|
+
}), [["__scopeId", "data-v-60f03f8e"]]), _m = ["aria-label"], vm = { class: "format-menu__label" }, ym = ["aria-label"], bm = { class: "format-menu__label" }, xm = ["aria-label"], Sm = { class: "format-menu__label" }, Cm = ["aria-label"], wm = {
|
|
9254
9264
|
class: "format-menu__icon",
|
|
9255
9265
|
"aria-hidden": "true"
|
|
9256
|
-
},
|
|
9266
|
+
}, Tm = { class: "format-menu__label" }, Em = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
9257
9267
|
__name: "ComposerFormatMenu",
|
|
9258
9268
|
props: {
|
|
9259
9269
|
visible: { type: Boolean },
|
|
@@ -9280,7 +9290,7 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9280
9290
|
}, [a[12] ||= l("span", {
|
|
9281
9291
|
class: "format-menu__icon font-bold",
|
|
9282
9292
|
"aria-hidden": "true"
|
|
9283
|
-
}, "B", -1), l("span",
|
|
9293
|
+
}, "B", -1), l("span", vm, M(N(r)("bold")), 1)], 40, _m),
|
|
9284
9294
|
l("button", {
|
|
9285
9295
|
type: "button",
|
|
9286
9296
|
class: "format-menu__item",
|
|
@@ -9291,7 +9301,7 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9291
9301
|
}, [a[13] ||= l("span", {
|
|
9292
9302
|
class: "format-menu__icon italic",
|
|
9293
9303
|
"aria-hidden": "true"
|
|
9294
|
-
}, "I", -1), l("span",
|
|
9304
|
+
}, "I", -1), l("span", bm, M(N(r)("italic")), 1)], 40, ym),
|
|
9295
9305
|
l("button", {
|
|
9296
9306
|
type: "button",
|
|
9297
9307
|
class: "format-menu__item",
|
|
@@ -9302,7 +9312,7 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9302
9312
|
}, [a[14] ||= l("span", {
|
|
9303
9313
|
class: "format-menu__icon underline",
|
|
9304
9314
|
"aria-hidden": "true"
|
|
9305
|
-
}, "U", -1), l("span",
|
|
9315
|
+
}, "U", -1), l("span", Sm, M(N(r)("underline")), 1)], 40, xm),
|
|
9306
9316
|
l("button", {
|
|
9307
9317
|
type: "button",
|
|
9308
9318
|
class: "format-menu__item",
|
|
@@ -9310,16 +9320,16 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9310
9320
|
onPointerdown: a[9] ||= V(() => {}, ["prevent"]),
|
|
9311
9321
|
onMousedown: a[10] ||= V(() => {}, ["prevent"]),
|
|
9312
9322
|
onClick: a[11] ||= (e) => n("link")
|
|
9313
|
-
}, [l("span",
|
|
9323
|
+
}, [l("span", wm, [f(N(Fe), { "aria-hidden": "true" })]), l("span", Tm, M(N(r)("link")), 1)], 40, Cm)
|
|
9314
9324
|
], 6)) : s("", !0)]));
|
|
9315
9325
|
}
|
|
9316
|
-
}), [["__scopeId", "data-v-4151ff5d"]]),
|
|
9326
|
+
}), [["__scopeId", "data-v-4151ff5d"]]), Dm = { class: "space-y-4" }, Om = {
|
|
9317
9327
|
key: 0,
|
|
9318
9328
|
class: "body-md text-subtle truncate"
|
|
9319
|
-
},
|
|
9329
|
+
}, km = { class: "space-y-2" }, Am = { class: "heading-sm text-subtle block font-medium!" }, jm = {
|
|
9320
9330
|
key: 0,
|
|
9321
9331
|
class: "body-sm text-danger"
|
|
9322
|
-
},
|
|
9332
|
+
}, Mm = /* @__PURE__ */ p({
|
|
9323
9333
|
__name: "ComposerLinkDialog",
|
|
9324
9334
|
props: {
|
|
9325
9335
|
visible: { type: Boolean },
|
|
@@ -9367,8 +9377,8 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9367
9377
|
"icon",
|
|
9368
9378
|
"disabled"
|
|
9369
9379
|
])]),
|
|
9370
|
-
default: z(() => [l("div",
|
|
9371
|
-
l("label",
|
|
9380
|
+
default: z(() => [l("div", Dm, [e.selectedText ? (T(), c("p", Om, M(e.selectedText), 1)) : s("", !0), l("div", km, [
|
|
9381
|
+
l("label", Am, M(N(u)("linkUrl")), 1),
|
|
9372
9382
|
f(N(ae), {
|
|
9373
9383
|
modelValue: p.value,
|
|
9374
9384
|
"onUpdate:modelValue": n[0] ||= (e) => p.value = e,
|
|
@@ -9388,12 +9398,12 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9388
9398
|
"placeholder",
|
|
9389
9399
|
"onKeydown"
|
|
9390
9400
|
]),
|
|
9391
|
-
g.value ? (T(), c("p",
|
|
9401
|
+
g.value ? (T(), c("p", jm, M(N(u)("invalidLinkUrl")), 1)) : s("", !0)
|
|
9392
9402
|
])])]),
|
|
9393
9403
|
_: 1
|
|
9394
9404
|
}, 8, ["visible", "header"]));
|
|
9395
9405
|
}
|
|
9396
|
-
}),
|
|
9406
|
+
}), Nm = { class: "space-y-6" }, Pm = { class: "space-y-2" }, Fm = { class: "heading-sm text-subtle block font-medium!" }, Im = { class: "space-y-2" }, Lm = { class: "heading-sm text-subtle block font-medium!" }, Rm = /* @__PURE__ */ p({
|
|
9397
9407
|
__name: "ComposerPollDialog",
|
|
9398
9408
|
props: {
|
|
9399
9409
|
visible: { type: Boolean },
|
|
@@ -9445,13 +9455,13 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9445
9455
|
"icon",
|
|
9446
9456
|
"disabled"
|
|
9447
9457
|
])]),
|
|
9448
|
-
default: z(() => [l("div",
|
|
9458
|
+
default: z(() => [l("div", Nm, [l("div", Pm, [l("label", Fm, M(N(u)("question")), 1), f(N(ae), {
|
|
9449
9459
|
modelValue: d.value,
|
|
9450
9460
|
"onUpdate:modelValue": n[0] ||= (e) => d.value = e,
|
|
9451
9461
|
fluid: "",
|
|
9452
9462
|
placeholder: N(u)("pollQuestionPlaceholder")
|
|
9453
|
-
}, null, 8, ["modelValue", "placeholder"])]), l("div",
|
|
9454
|
-
l("label",
|
|
9463
|
+
}, null, 8, ["modelValue", "placeholder"])]), l("div", Im, [
|
|
9464
|
+
l("label", Lm, M(N(u)("options")), 1),
|
|
9455
9465
|
(T(!0), c(r, null, O(p.value, (e, t) => (T(), c("div", {
|
|
9456
9466
|
key: t,
|
|
9457
9467
|
class: "center"
|
|
@@ -9486,9 +9496,9 @@ var tm = ["data-testid", "onClick"], nm = { class: "composer-actions-menu__icon"
|
|
|
9486
9496
|
_: 1
|
|
9487
9497
|
}, 8, ["visible", "header"]));
|
|
9488
9498
|
}
|
|
9489
|
-
}),
|
|
9490
|
-
function
|
|
9491
|
-
let t = e.now ?? (() => /* @__PURE__ */ new Date()), n = e.defaultOffsetMs ??
|
|
9499
|
+
}), zm = 36e5;
|
|
9500
|
+
function Bm(e = {}) {
|
|
9501
|
+
let t = e.now ?? (() => /* @__PURE__ */ new Date()), n = e.defaultOffsetMs ?? zm, r = 0;
|
|
9492
9502
|
function i(e) {
|
|
9493
9503
|
return r += 1, {
|
|
9494
9504
|
id: r,
|
|
@@ -9556,13 +9566,13 @@ function zm(e = {}) {
|
|
|
9556
9566
|
}
|
|
9557
9567
|
//#endregion
|
|
9558
9568
|
//#region src/components/messages/ComposerScheduleDialog.vue?vue&type=script&setup=true&lang.ts
|
|
9559
|
-
var
|
|
9569
|
+
var Vm = { class: "w-full space-y-6" }, Hm = { class: "w-full space-y-2" }, Um = { class: "heading-sm text-subtle block font-medium!" }, Wm = ["aria-label"], Gm = {
|
|
9560
9570
|
key: 0,
|
|
9561
9571
|
class: "body-sm text-danger"
|
|
9562
|
-
},
|
|
9572
|
+
}, Km = {
|
|
9563
9573
|
key: 0,
|
|
9564
9574
|
class: "body-sm text-danger"
|
|
9565
|
-
},
|
|
9575
|
+
}, qm = { class: "body-md bg-elevation-surface-sunken-default rounded-lg px-4 py-3" }, Jm = /* @__PURE__ */ p({
|
|
9566
9576
|
__name: "ComposerScheduleDialog",
|
|
9567
9577
|
props: {
|
|
9568
9578
|
visible: { type: Boolean },
|
|
@@ -9574,7 +9584,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9574
9584
|
},
|
|
9575
9585
|
emits: ["update:visible", "schedule"],
|
|
9576
9586
|
setup(e, { expose: t, emit: n }) {
|
|
9577
|
-
let i = e, u = n, { t: d } = Y(), { occurrences: p, canRemoveOccurrences: m, hasDuplicateOccurrences: h, isValid: g, addOccurrence: _, removeOccurrence: v, reset: y, statusFor: b, pendingSubmitDates: x, isRetry: S, beginSubmission: C, applyResult: w } =
|
|
9587
|
+
let i = e, u = n, { t: d } = Y(), { occurrences: p, canRemoveOccurrences: m, hasDuplicateOccurrences: h, isValid: g, addOccurrence: _, removeOccurrence: v, reset: y, statusFor: b, pendingSubmitDates: x, isRetry: S, beginSubmission: C, applyResult: w } = Bm(), E = a(() => g.value && i.canSchedule && !i.submitting && x.value.length > 0);
|
|
9578
9588
|
function D() {
|
|
9579
9589
|
if (!E.value) return;
|
|
9580
9590
|
let e = C();
|
|
@@ -9610,8 +9620,8 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9610
9620
|
"icon",
|
|
9611
9621
|
"disabled"
|
|
9612
9622
|
])]),
|
|
9613
|
-
default: z(() => [l("div",
|
|
9614
|
-
l("label",
|
|
9623
|
+
default: z(() => [l("div", Vm, [l("div", Hm, [
|
|
9624
|
+
l("label", Um, M(N(d)("sendAt")), 1),
|
|
9615
9625
|
(T(!0), c(r, null, O(N(p), (t, n) => (T(), c("div", {
|
|
9616
9626
|
key: t.id,
|
|
9617
9627
|
class: "w-full space-y-1"
|
|
@@ -9671,8 +9681,8 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9671
9681
|
"disabled",
|
|
9672
9682
|
"onClick"
|
|
9673
9683
|
])) : s("", !0)
|
|
9674
|
-
], 8,
|
|
9675
|
-
N(h) ? (T(), c("p",
|
|
9684
|
+
], 8, Wm), N(b)(t)?.success === !1 ? (T(), c("p", Gm, M(N(b)(t)?.error ?? N(d)("scheduleTimeFailed")), 1)) : s("", !0)]))), 128)),
|
|
9685
|
+
N(h) ? (T(), c("p", Km, M(N(d)("duplicateScheduleTimes")), 1)) : s("", !0),
|
|
9676
9686
|
f(N(H), {
|
|
9677
9687
|
label: N(d)("addScheduleTime"),
|
|
9678
9688
|
icon: N(le),
|
|
@@ -9688,22 +9698,22 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9688
9698
|
"disabled",
|
|
9689
9699
|
"onClick"
|
|
9690
9700
|
])
|
|
9691
|
-
]), l("div",
|
|
9701
|
+
]), l("div", qm, M(e.contentPreview), 1)])]),
|
|
9692
9702
|
_: 1
|
|
9693
9703
|
}, 8, ["visible", "header"]));
|
|
9694
9704
|
}
|
|
9695
|
-
}),
|
|
9705
|
+
}), Ym = [
|
|
9696
9706
|
"aria-selected",
|
|
9697
9707
|
"onMouseover",
|
|
9698
9708
|
"onMousedown"
|
|
9699
|
-
],
|
|
9709
|
+
], Xm = {
|
|
9700
9710
|
key: 1,
|
|
9701
9711
|
class: "trigger-menu__avatar-fallback",
|
|
9702
9712
|
"aria-hidden": "true"
|
|
9703
|
-
},
|
|
9713
|
+
}, Zm = { class: "min-w-0" }, Qm = { class: "trigger-menu__label" }, $m = {
|
|
9704
9714
|
key: 0,
|
|
9705
9715
|
class: "trigger-menu__subtitle"
|
|
9706
|
-
},
|
|
9716
|
+
}, eh = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
9707
9717
|
__name: "ComposerTriggerMenu",
|
|
9708
9718
|
props: /*@__PURE__*/ _({
|
|
9709
9719
|
visible: { type: Boolean },
|
|
@@ -9738,26 +9748,26 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9738
9748
|
src: e.avatar,
|
|
9739
9749
|
name: e.label,
|
|
9740
9750
|
size: "sm"
|
|
9741
|
-
}, null, 8, ["src", "name"])) : (T(), c("span",
|
|
9751
|
+
}, null, 8, ["src", "name"])) : (T(), c("span", Xm, M(e.label.charAt(0)), 1)), l("span", Zm, [l("span", Qm, M(e.label), 1), e.subtitle ? (T(), c("span", $m, M(e.subtitle), 1)) : s("", !0)])], 42, Ym))), 128))], 38)) : s("", !0)]));
|
|
9742
9752
|
}
|
|
9743
|
-
}), [["__scopeId", "data-v-9cc0f5b0"]]),
|
|
9753
|
+
}), [["__scopeId", "data-v-9cc0f5b0"]]), th = [
|
|
9744
9754
|
"accept",
|
|
9745
9755
|
"multiple",
|
|
9746
9756
|
"disabled"
|
|
9747
|
-
],
|
|
9757
|
+
], nh = { class: "px-1 pb-1.5" }, rh = {
|
|
9748
9758
|
key: 0,
|
|
9749
9759
|
class: "composer-file-preview"
|
|
9750
|
-
},
|
|
9760
|
+
}, ih = { class: "min-w-0" }, ah = { class: "heading-sm text-default truncate" }, oh = { class: "body-sm text-subtle truncate" }, sh = {
|
|
9751
9761
|
key: 0,
|
|
9752
9762
|
class: "body-sm text-subtle",
|
|
9753
9763
|
role: "status"
|
|
9754
|
-
},
|
|
9764
|
+
}, ch = { class: "heading-sm text-default truncate" }, lh = { class: "body-sm text-subtle" }, uh = ["data-placeholder"], dh = {
|
|
9755
9765
|
key: 2,
|
|
9756
9766
|
class: "body-sm text-subtle flex items-center gap-2 px-0.5"
|
|
9757
|
-
},
|
|
9767
|
+
}, fh = {
|
|
9758
9768
|
key: 2,
|
|
9759
9769
|
class: "ml-auto"
|
|
9760
|
-
},
|
|
9770
|
+
}, ph = 450, mh = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
9761
9771
|
__name: "MessageComposer",
|
|
9762
9772
|
props: {
|
|
9763
9773
|
modelValue: {},
|
|
@@ -9795,7 +9805,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9795
9805
|
video: "video/*",
|
|
9796
9806
|
audio: "audio/*",
|
|
9797
9807
|
file: "*/*"
|
|
9798
|
-
}, u = e, d = n, p = D(null), m = D(null), h = D(null), _ = D([]), b = a(() => _.value[0] ?? null), x = D(0), C = D("file"), w = D(!1), E = D(!1), O = D(!1), k = D(null), A = D(!1), j = D(""), ee = D(""), P = D(!1), { t: F } = Y(), { isTouchUI: I } =
|
|
9808
|
+
}, u = e, d = n, p = D(null), m = D(null), h = D(null), _ = D([]), b = a(() => _.value[0] ?? null), x = D(0), C = D("file"), w = D(!1), E = D(!1), O = D(!1), k = D(null), A = D(!1), j = D(""), ee = D(""), P = D(!1), { t: F } = Y(), { isTouchUI: I } = qp(), L = null, z = D(null), te = D(null), { applyLink: B, applyFormat: ne, cancelLink: re, editorKey: U, formatMenuPosition: W, focusEditor: ie, handleContextMenu: ae, handleInput: oe, handleKeydown: G, handlePaste: se, hideFormatMenu: ce, insertText: q, requestLink: ue, resetEditor: de, showFormatMenu: fe, triggerCandidates: pe, triggerMenuPosition: me, highlightedTriggerIndex: _e, showTriggerMenu: ve, selectTriggerCandidate: ye } = tm(z, te, {
|
|
9799
9809
|
getModelValue: () => u.modelValue,
|
|
9800
9810
|
updateModelValue: (e) => d("update:modelValue", e),
|
|
9801
9811
|
submit: () => Le(),
|
|
@@ -9839,7 +9849,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9839
9849
|
}
|
|
9840
9850
|
function je(e) {
|
|
9841
9851
|
if (u.disabled) return;
|
|
9842
|
-
let t =
|
|
9852
|
+
let t = Kp(e);
|
|
9843
9853
|
if (t) {
|
|
9844
9854
|
e.preventDefault(), _.value = [t], x.value = 0, Oe();
|
|
9845
9855
|
return;
|
|
@@ -9894,7 +9904,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9894
9904
|
function Ue(e) {
|
|
9895
9905
|
!u.disabled && Ee.value && (e instanceof MouseEvent && e.button !== 0 || (P.value = !1, He(), L = setTimeout(() => {
|
|
9896
9906
|
L = null, P.value = !0, We();
|
|
9897
|
-
},
|
|
9907
|
+
}, ph)));
|
|
9898
9908
|
}
|
|
9899
9909
|
function We() {
|
|
9900
9910
|
!u.disabled && Ee.value && (O.value = !0, document.addEventListener("pointerdown", Ke, !0), document.addEventListener("keydown", Je));
|
|
@@ -9964,15 +9974,15 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9964
9974
|
disabled: e.disabled,
|
|
9965
9975
|
onChange: Ae,
|
|
9966
9976
|
onCancel: Oe
|
|
9967
|
-
}, null, 40,
|
|
9968
|
-
e.editingMessage ? (T(), o(
|
|
9977
|
+
}, null, 40, th),
|
|
9978
|
+
e.editingMessage ? (T(), o(fm, {
|
|
9969
9979
|
key: 0,
|
|
9970
9980
|
message: e.editingMessage,
|
|
9971
9981
|
variant: "editing",
|
|
9972
9982
|
"context-label": e.contextLabel,
|
|
9973
9983
|
onCancel: n[0] ||= (e) => d("cancelEdit")
|
|
9974
9984
|
}, null, 8, ["message", "context-label"])) : s("", !0),
|
|
9975
|
-
e.replyToMessage ? (T(), o(
|
|
9985
|
+
e.replyToMessage ? (T(), o(fm, {
|
|
9976
9986
|
key: 1,
|
|
9977
9987
|
message: e.replyToMessage,
|
|
9978
9988
|
variant: "replying",
|
|
@@ -9980,12 +9990,12 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9980
9990
|
"data-testid": "composer-reply-context",
|
|
9981
9991
|
onCancel: n[1] ||= (e) => d("cancelReply")
|
|
9982
9992
|
}, null, 8, ["message", "context-label"])) : s("", !0),
|
|
9983
|
-
l("div",
|
|
9984
|
-
b.value ? (T(), c("div",
|
|
9985
|
-
l("p",
|
|
9986
|
-
l("p",
|
|
9987
|
-
x.value ? (T(), c("p",
|
|
9988
|
-
], 64)) : (T(), c(r, { key: 1 }, [l("p",
|
|
9993
|
+
l("div", nh, [
|
|
9994
|
+
b.value ? (T(), c("div", rh, [l("div", ih, [_.value.length > 1 ? (T(), c(r, { key: 0 }, [
|
|
9995
|
+
l("p", ah, M(N(F)("imageCount", { count: _.value.length })), 1),
|
|
9996
|
+
l("p", oh, M(_.value.map((e) => e.name).join(", ")), 1),
|
|
9997
|
+
x.value ? (T(), c("p", sh, M(N(F)("albumLimitNotice", { count: _.value.length })), 1)) : s("", !0)
|
|
9998
|
+
], 64)) : (T(), c(r, { key: 1 }, [l("p", ch, M(b.value.name), 1), l("p", lh, M(b.value.type || Se.value), 1)], 64))]), f(N(H), {
|
|
9989
9999
|
icon: N(ge),
|
|
9990
10000
|
text: "",
|
|
9991
10001
|
rounded: "",
|
|
@@ -9997,13 +10007,13 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
9997
10007
|
ref: z,
|
|
9998
10008
|
class: y(["composer-shell", u.compact ? "composer-shell--compact" : "composer-shell--default"])
|
|
9999
10009
|
}, [
|
|
10000
|
-
f(
|
|
10010
|
+
f(sm, {
|
|
10001
10011
|
ref_key: "composerActionsRef",
|
|
10002
10012
|
ref: m,
|
|
10003
10013
|
onPickFile: ke,
|
|
10004
10014
|
onOpenPoll: n[2] ||= (e) => w.value = !0
|
|
10005
10015
|
}, null, 512),
|
|
10006
|
-
!N(I) && !e.openEmojiPicker ? (T(), o(
|
|
10016
|
+
!N(I) && !e.openEmojiPicker ? (T(), o(gm, {
|
|
10007
10017
|
key: 0,
|
|
10008
10018
|
ref_key: "composerEmojiRef",
|
|
10009
10019
|
ref: h,
|
|
@@ -10058,8 +10068,8 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10058
10068
|
onKeydown: n[7] ||= (...e) => N(G) && N(G)(...e),
|
|
10059
10069
|
onPaste: je,
|
|
10060
10070
|
onContextmenu: n[8] ||= (...e) => N(ae) && N(ae)(...e)
|
|
10061
|
-
}, null, 42,
|
|
10062
|
-
b.value || e.editingMessage || e.contextLabel || e.offlineMode ? (T(), c("div",
|
|
10071
|
+
}, null, 42, uh)),
|
|
10072
|
+
b.value || e.editingMessage || e.contextLabel || e.offlineMode ? (T(), c("div", dh, [
|
|
10063
10073
|
e.editingMessage ? (T(), o(N(K), {
|
|
10064
10074
|
key: 0,
|
|
10065
10075
|
text: N(F)("editing"),
|
|
@@ -10076,7 +10086,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10076
10086
|
size: "sm",
|
|
10077
10087
|
class: "composer-meta-tag"
|
|
10078
10088
|
}, null, 8, ["text"])) : s("", !0),
|
|
10079
|
-
e.offlineMode ? (T(), c("p",
|
|
10089
|
+
e.offlineMode ? (T(), c("p", fh, M(e.pendingQueueCount ? N(F)("offlineQueued", { count: e.pendingQueueCount }) : N(F)("offline")), 1)) : s("", !0)
|
|
10080
10090
|
])) : s("", !0),
|
|
10081
10091
|
e.showScheduledButton ? (T(), o(N(H), {
|
|
10082
10092
|
key: 3,
|
|
@@ -10129,7 +10139,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10129
10139
|
onClick: Ye
|
|
10130
10140
|
}, [f(N(Ce), { class: "text-subtle size-5" }), l("span", null, M(N(F)("scheduleMessage")), 1)])], 512)) : s("", !0)
|
|
10131
10141
|
], 2),
|
|
10132
|
-
f(
|
|
10142
|
+
f(Em, {
|
|
10133
10143
|
visible: N(fe),
|
|
10134
10144
|
position: N(W),
|
|
10135
10145
|
onFormat: n[9] ||= (e) => N(ne)(e),
|
|
@@ -10139,7 +10149,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10139
10149
|
"position",
|
|
10140
10150
|
"onLink"
|
|
10141
10151
|
]),
|
|
10142
|
-
f(
|
|
10152
|
+
f(eh, {
|
|
10143
10153
|
"highlighted-index": N(_e),
|
|
10144
10154
|
"onUpdate:highlightedIndex": n[10] ||= (e) => g(_e) ? _e.value = e : null,
|
|
10145
10155
|
visible: N(ve),
|
|
@@ -10152,13 +10162,13 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10152
10162
|
"position",
|
|
10153
10163
|
"candidates"
|
|
10154
10164
|
]),
|
|
10155
|
-
f(
|
|
10165
|
+
f(Rm, {
|
|
10156
10166
|
visible: w.value,
|
|
10157
10167
|
"onUpdate:visible": n[12] ||= (e) => w.value = e,
|
|
10158
10168
|
disabled: e.disabled,
|
|
10159
10169
|
onSend: ze
|
|
10160
10170
|
}, null, 8, ["visible", "disabled"]),
|
|
10161
|
-
f(
|
|
10171
|
+
f(Mm, {
|
|
10162
10172
|
visible: A.value,
|
|
10163
10173
|
"onUpdate:visible": n[13] ||= (e) => A.value = e,
|
|
10164
10174
|
disabled: e.disabled,
|
|
@@ -10172,7 +10182,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10172
10182
|
"initial-url",
|
|
10173
10183
|
"selected-text"
|
|
10174
10184
|
]),
|
|
10175
|
-
f(
|
|
10185
|
+
f(Jm, {
|
|
10176
10186
|
visible: E.value,
|
|
10177
10187
|
"onUpdate:visible": n[14] ||= (e) => E.value = e,
|
|
10178
10188
|
disabled: e.disabled,
|
|
@@ -10192,17 +10202,17 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10192
10202
|
])
|
|
10193
10203
|
], 2));
|
|
10194
10204
|
}
|
|
10195
|
-
}), [["__scopeId", "data-v-cf4d0e9c"]]),
|
|
10205
|
+
}), [["__scopeId", "data-v-cf4d0e9c"]]), hh = {
|
|
10196
10206
|
key: 2,
|
|
10197
10207
|
class: "composer-readonly-notice"
|
|
10198
|
-
},
|
|
10208
|
+
}, gh = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
10199
10209
|
__name: "ConversationComposer",
|
|
10200
10210
|
props: {
|
|
10201
10211
|
target: {},
|
|
10202
10212
|
openEmojiPicker: { type: [Function, null] }
|
|
10203
10213
|
},
|
|
10204
10214
|
setup(e, { expose: t }) {
|
|
10205
|
-
let n = e, { t: r } = Y(), i =
|
|
10215
|
+
let n = e, { t: r } = Y(), i = _p(), l = Sp(), u = Dp(), d = Pp(), f = zp(), p = a(() => n.target === "thread"), m = a({
|
|
10206
10216
|
get: () => p.value ? u.threadDraft.value : u.draft.value,
|
|
10207
10217
|
set: (e) => {
|
|
10208
10218
|
p.value ? u.threadDraft.value = e : u.draft.value = e;
|
|
@@ -10210,7 +10220,7 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10210
10220
|
}), h = a(() => p.value ? u.threadComposerResetSignal.value : u.composerResetSignal.value), g = a(() => p.value ? !!l.activeThreadParentMessage.value : !!i.conversation.value), _ = a(() => p.value), v = a(() => {
|
|
10211
10221
|
let e = p.value ? l.loadingThreadMessages.value : l.loadingMessages.value;
|
|
10212
10222
|
return u.isSendingMessage.value || e || u.isSchedulingMessage.value;
|
|
10213
|
-
}), y = a(() => p.value ? g.value && i.canOpenThread.value : g.value && !i.isReadOnly.value), b = a(() => !p.value && g.value && i.isChannel.value && !
|
|
10223
|
+
}), y = a(() => p.value ? g.value && i.canOpenThread.value : g.value && !i.isReadOnly.value), b = a(() => !p.value && g.value && i.isChannel.value && !ap(i.conversation.value)), x = a(() => p.value ? g.value && !i.canOpenThread.value : g.value && i.isReadOnly.value);
|
|
10214
10224
|
function S() {
|
|
10215
10225
|
f.emit("composer:send", { target: n.target });
|
|
10216
10226
|
}
|
|
@@ -10243,15 +10253,15 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10243
10253
|
f.emit("composer:cancelEdit");
|
|
10244
10254
|
}
|
|
10245
10255
|
let P = D(null);
|
|
10246
|
-
|
|
10256
|
+
Bp(f, "ui:closeComposerActions", () => {
|
|
10247
10257
|
P.value?.hideComposerActions();
|
|
10248
|
-
}),
|
|
10258
|
+
}), Bp(f, "composer:scheduleResult", (e) => {
|
|
10249
10259
|
e.target === n.target && (O.value = e.result);
|
|
10250
10260
|
});
|
|
10251
10261
|
async function F() {
|
|
10252
10262
|
await P.value?.focusEditor();
|
|
10253
10263
|
}
|
|
10254
|
-
return t({ focusEditor: F }), (t, n) => y.value ? (T(), o(
|
|
10264
|
+
return t({ focusEditor: F }), (t, n) => y.value ? (T(), o(mh, {
|
|
10255
10265
|
key: 0,
|
|
10256
10266
|
ref_key: "composerRef",
|
|
10257
10267
|
ref: P,
|
|
@@ -10298,11 +10308,11 @@ var Bm = { class: "w-full space-y-6" }, Vm = { class: "w-full space-y-2" }, Hm =
|
|
|
10298
10308
|
"scheduling-enabled",
|
|
10299
10309
|
"schedule-result",
|
|
10300
10310
|
"scheduling"
|
|
10301
|
-
])) : b.value ? k(t.$slots, "channel-not-joined", {}, void 0, !0, 1) : x.value ? (T(), c("div",
|
|
10311
|
+
])) : b.value ? k(t.$slots, "channel-not-joined", {}, void 0, !0, 1) : x.value ? (T(), c("div", hh, M(p.value ? N(r)("repliesDisabledInChannels") : N(r)("readOnlyChannel")), 1)) : s("", !0);
|
|
10302
10312
|
}
|
|
10303
|
-
}), [["__scopeId", "data-v-54125c2e"]]),
|
|
10304
|
-
function
|
|
10305
|
-
let n = e.actionMenuRef, r = D(null), i = D(null), a = D({}), o = D({}), { isTouchUI: s } =
|
|
10313
|
+
}), [["__scopeId", "data-v-54125c2e"]]), _h = e("Browser", { web: () => import("./web-DSJwqhTK.js").then((e) => new e.BrowserWeb()) }), vh = 1800;
|
|
10314
|
+
function yh(e) {
|
|
10315
|
+
let n = e.actionMenuRef, r = D(null), i = D(null), a = D({}), o = D({}), { isTouchUI: s } = qp(), c = null;
|
|
10306
10316
|
function l(e) {
|
|
10307
10317
|
return e.kind === "text" && il(e.text);
|
|
10308
10318
|
}
|
|
@@ -10355,7 +10365,7 @@ function vh(e) {
|
|
|
10355
10365
|
let n = x(e);
|
|
10356
10366
|
if (n?.url) {
|
|
10357
10367
|
try {
|
|
10358
|
-
if (t.getPlatform() !== "web") await
|
|
10368
|
+
if (t.getPlatform() !== "web") await _h.open({
|
|
10359
10369
|
url: n.url,
|
|
10360
10370
|
windowName: "_self"
|
|
10361
10371
|
});
|
|
@@ -10481,7 +10491,7 @@ function vh(e) {
|
|
|
10481
10491
|
}
|
|
10482
10492
|
i.value = e.id, c && clearTimeout(c), c = setTimeout(() => {
|
|
10483
10493
|
i.value = null;
|
|
10484
|
-
},
|
|
10494
|
+
}, vh), A();
|
|
10485
10495
|
}
|
|
10486
10496
|
function P(t) {
|
|
10487
10497
|
e.canReply() && (e.emit.reply(t), A());
|
|
@@ -10657,8 +10667,8 @@ function vh(e) {
|
|
|
10657
10667
|
}
|
|
10658
10668
|
//#endregion
|
|
10659
10669
|
//#region src/composables/useMessageListScroll.ts
|
|
10660
|
-
var
|
|
10661
|
-
function
|
|
10670
|
+
var bh = 1, xh = 2, Sh = 80, Ch = 1800, wh = 4;
|
|
10671
|
+
function Th(e) {
|
|
10662
10672
|
let t = e.threadRef, n = !0, r = 0, i = null, a = null, o = null, s = null;
|
|
10663
10673
|
function c() {
|
|
10664
10674
|
o != null && (cancelAnimationFrame(o), o = null);
|
|
@@ -10696,7 +10706,7 @@ function wh(e) {
|
|
|
10696
10706
|
expectedScrollTop: t,
|
|
10697
10707
|
timeoutId: setTimeout(() => {
|
|
10698
10708
|
f();
|
|
10699
|
-
},
|
|
10709
|
+
}, Ch)
|
|
10700
10710
|
}, p(e);
|
|
10701
10711
|
}
|
|
10702
10712
|
function h() {
|
|
@@ -10707,9 +10717,9 @@ function wh(e) {
|
|
|
10707
10717
|
let a = t.value;
|
|
10708
10718
|
if (!a) return;
|
|
10709
10719
|
let o = a.scrollTop;
|
|
10710
|
-
i?.el === a && Math.abs(o - i.expectedScrollTop) >
|
|
10720
|
+
i?.el === a && Math.abs(o - i.expectedScrollTop) > wh && f();
|
|
10711
10721
|
let s = o < r, c = Math.max(0, a.scrollHeight - o - a.clientHeight);
|
|
10712
|
-
s && c >
|
|
10722
|
+
s && c > bh ? n = !1 : c <= xh && !n && (n = !0, e.onAtBottom?.()), r = o, a.scrollTop <= Sh && !e.isLoading() && !e.isLoadingOlder() && e.canLoadOlder() && e.onLoadOlder();
|
|
10713
10723
|
}
|
|
10714
10724
|
return R(() => {
|
|
10715
10725
|
let t = e.getMessages();
|
|
@@ -10737,14 +10747,14 @@ function wh(e) {
|
|
|
10737
10747
|
}
|
|
10738
10748
|
//#endregion
|
|
10739
10749
|
//#region src/composables/useImageZoom.ts
|
|
10740
|
-
var
|
|
10741
|
-
function
|
|
10750
|
+
var Eh = 1, Dh = 4;
|
|
10751
|
+
function Oh(e) {
|
|
10742
10752
|
let t = D(1), n = D(0), r = D(0), i = D(!1), a = /* @__PURE__ */ new Map(), o = null, s = 0, c = 0, l = 0, u = 0, d = 0, f = 1, p = 0, m = 0;
|
|
10743
10753
|
function h(e, t, n) {
|
|
10744
10754
|
return Math.min(Math.max(e, t), n);
|
|
10745
10755
|
}
|
|
10746
10756
|
function g(e) {
|
|
10747
|
-
return h(e,
|
|
10757
|
+
return h(e, Eh, Dh);
|
|
10748
10758
|
}
|
|
10749
10759
|
function _(n, r, i = t.value) {
|
|
10750
10760
|
let a = e.viewportRef.value?.clientWidth ?? 0, o = e.viewportRef.value?.clientHeight ?? 0, s = e.imageRef.value?.clientWidth ?? a, c = e.imageRef.value?.clientHeight ?? o, l = s * i, u = c * i, d = Math.max(0, (l - a) / 2), f = Math.max(0, (u - o) / 2);
|
|
@@ -10834,16 +10844,16 @@ function Dh(e) {
|
|
|
10834
10844
|
}
|
|
10835
10845
|
//#endregion
|
|
10836
10846
|
//#region src/components/overlays/FullscreenDialog.vue?vue&type=script&setup=true&lang.ts
|
|
10837
|
-
var
|
|
10847
|
+
var kh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, Ah = { class: "heading-sm text-default truncate" }, jh = {
|
|
10838
10848
|
key: 0,
|
|
10839
10849
|
class: "body-sm text-subtle truncate"
|
|
10840
|
-
},
|
|
10850
|
+
}, Mh = { class: "w-full" }, Nh = {
|
|
10841
10851
|
key: 0,
|
|
10842
10852
|
class: "fullscreen-dialog__actions"
|
|
10843
|
-
},
|
|
10853
|
+
}, Ph = {
|
|
10844
10854
|
key: 0,
|
|
10845
10855
|
class: "fullscreen-dialog__footer"
|
|
10846
|
-
},
|
|
10856
|
+
}, Fh = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
10847
10857
|
__name: "FullscreenDialog",
|
|
10848
10858
|
props: {
|
|
10849
10859
|
open: { type: Boolean },
|
|
@@ -10869,7 +10879,7 @@ var Oh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, kh = { class: "h
|
|
|
10869
10879
|
pt: { root: { "aria-label": n.title || void 0 } },
|
|
10870
10880
|
"onUpdate:visible": i
|
|
10871
10881
|
}, {
|
|
10872
|
-
header: z(() => [l("div",
|
|
10882
|
+
header: z(() => [l("div", kh, [l("p", Ah, M(e.title), 1), e.subtitle ? (T(), c("p", jh, M(e.subtitle), 1)) : s("", !0)])]),
|
|
10873
10883
|
closebutton: z(({ closeCallback: t }) => [f(N(H), {
|
|
10874
10884
|
icon: N(ge),
|
|
10875
10885
|
"aria-label": e.closeAriaLabel || e.closeLabel,
|
|
@@ -10883,7 +10893,7 @@ var Oh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, kh = { class: "h
|
|
|
10883
10893
|
"aria-label",
|
|
10884
10894
|
"onClick"
|
|
10885
10895
|
])]),
|
|
10886
|
-
default: z(() => [l("div",
|
|
10896
|
+
default: z(() => [l("div", Mh, [t.$slots.actions ? (T(), c("div", Nh, [k(t.$slots, "actions", {}, void 0, !0)])) : s("", !0), k(t.$slots, "default", {}, void 0, !0)]), t.$slots.footer ? (T(), c("div", Ph, [k(t.$slots, "footer", {}, void 0, !0)])) : s("", !0)]),
|
|
10887
10897
|
_: 3
|
|
10888
10898
|
}, 8, [
|
|
10889
10899
|
"visible",
|
|
@@ -10891,23 +10901,23 @@ var Oh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, kh = { class: "h
|
|
|
10891
10901
|
"pt"
|
|
10892
10902
|
]));
|
|
10893
10903
|
}
|
|
10894
|
-
}), [["__scopeId", "data-v-de874d43"]]),
|
|
10904
|
+
}), [["__scopeId", "data-v-de874d43"]]), Ih = ["href"], Lh = { class: "media-viewer-shell flex min-h-0 flex-1 items-center justify-center overflow-hidden" }, Rh = ["src", "alt"], zh = {
|
|
10895
10905
|
key: 1,
|
|
10896
10906
|
class: "media-viewer-stage media-viewer-stage-video flex w-full items-center justify-center"
|
|
10897
|
-
},
|
|
10907
|
+
}, Bh = {
|
|
10898
10908
|
class: "max-h-full w-full bg-black",
|
|
10899
10909
|
controls: "",
|
|
10900
10910
|
playsinline: "",
|
|
10901
10911
|
autoplay: ""
|
|
10902
|
-
},
|
|
10912
|
+
}, Vh = ["src", "type"], Hh = {
|
|
10903
10913
|
key: 0,
|
|
10904
10914
|
class: "media-viewer-footer flex min-w-0 items-center justify-between gap-3 px-4 py-3 max-md:px-3.5 max-md:py-3"
|
|
10905
|
-
},
|
|
10915
|
+
}, Uh = { class: "min-w-0 flex-1" }, Wh = { class: "heading-sm text-default truncate" }, Gh = { class: "body-sm text-subtle" }, Kh = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
10906
10916
|
__name: "MediaViewerDialog",
|
|
10907
10917
|
props: { attachment: {} },
|
|
10908
10918
|
emits: ["close"],
|
|
10909
10919
|
setup(e, { emit: t }) {
|
|
10910
|
-
let n = e, i = t, u = D(null), d = D(null), f = a(() => !!n.attachment?.url), p = a(() => n.attachment?.kind === "image"), m = a(() => n.attachment?.kind === "video"), { t: h } = Y(), { scale: g, translateX: _, translateY: v, isDragging: b, resetTransform: S, handlePointerDown: C, handlePointerMove: w, handlePointerUp: E, handlePointerCancel: O, handleWheel: k, handleDoubleClick: j } =
|
|
10920
|
+
let n = e, i = t, u = D(null), d = D(null), f = a(() => !!n.attachment?.url), p = a(() => n.attachment?.kind === "image"), m = a(() => n.attachment?.kind === "video"), { t: h } = Y(), { scale: g, translateX: _, translateY: v, isDragging: b, resetTransform: S, handlePointerDown: C, handlePointerMove: w, handlePointerUp: E, handlePointerCancel: O, handleWheel: k, handleDoubleClick: j } = Oh({
|
|
10911
10921
|
viewportRef: u,
|
|
10912
10922
|
imageRef: d,
|
|
10913
10923
|
isImage: () => p.value
|
|
@@ -10918,7 +10928,7 @@ var Oh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, kh = { class: "h
|
|
|
10918
10928
|
function ee() {
|
|
10919
10929
|
i("close");
|
|
10920
10930
|
}
|
|
10921
|
-
return (t, n) => (T(), o(
|
|
10931
|
+
return (t, n) => (T(), o(Fh, {
|
|
10922
10932
|
open: f.value,
|
|
10923
10933
|
title: e.attachment?.name || N(h)("attachment"),
|
|
10924
10934
|
subtitle: e.attachment?.kind || "",
|
|
@@ -10935,9 +10945,9 @@ var Oh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, kh = { class: "h
|
|
|
10935
10945
|
}, [(T(), o(A(N(ze)), {
|
|
10936
10946
|
class: "size-4",
|
|
10937
10947
|
"aria-hidden": "true"
|
|
10938
|
-
})), l("span", null, M(N(h)("openInNewTab")), 1)], 8,
|
|
10939
|
-
footer: z(() => [e.attachment ? (T(), c("div",
|
|
10940
|
-
default: z(() => [l("div",
|
|
10948
|
+
})), l("span", null, M(N(h)("openInNewTab")), 1)], 8, Ih)) : s("", !0)]),
|
|
10949
|
+
footer: z(() => [e.attachment ? (T(), c("div", Hh, [l("div", Uh, [l("p", Wh, M(e.attachment.name), 1), l("p", Gh, M(e.attachment.kind), 1)])])) : s("", !0)]),
|
|
10950
|
+
default: z(() => [l("div", Lh, [e.attachment?.url ? (T(), c(r, { key: 0 }, [p.value ? (T(), c("div", {
|
|
10941
10951
|
key: 0,
|
|
10942
10952
|
ref_key: "viewportRef",
|
|
10943
10953
|
ref: u,
|
|
@@ -10960,10 +10970,10 @@ var Oh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, kh = { class: "h
|
|
|
10960
10970
|
transform: `translate3d(${N(_)}px, ${N(v)}px, 0) scale(${N(g)})`,
|
|
10961
10971
|
transformOrigin: "center center"
|
|
10962
10972
|
})
|
|
10963
|
-
}, null, 14,
|
|
10973
|
+
}, null, 14, Rh)], 544)) : m.value ? (T(), c("div", zh, [l("video", Bh, [l("source", {
|
|
10964
10974
|
src: e.attachment.url,
|
|
10965
10975
|
type: e.attachment.mimeType || void 0
|
|
10966
|
-
}, null, 8,
|
|
10976
|
+
}, null, 8, Vh)])])) : s("", !0)], 64)) : s("", !0)])]),
|
|
10967
10977
|
_: 1
|
|
10968
10978
|
}, 8, [
|
|
10969
10979
|
"open",
|
|
@@ -10976,7 +10986,7 @@ var Oh = { class: "fullscreen-dialog__header min-w-0 flex-1" }, kh = { class: "h
|
|
|
10976
10986
|
}), [["__scopeId", "data-v-52ad66cb"]]);
|
|
10977
10987
|
//#endregion
|
|
10978
10988
|
//#region src/composables/useAudioPlayer.ts
|
|
10979
|
-
function
|
|
10989
|
+
function qh(e) {
|
|
10980
10990
|
let t = D(!1), n = D(0), r = D(0), i = D(!1);
|
|
10981
10991
|
function a() {
|
|
10982
10992
|
t.value = !0;
|
|
@@ -11032,19 +11042,19 @@ function Kh(e) {
|
|
|
11032
11042
|
}
|
|
11033
11043
|
//#endregion
|
|
11034
11044
|
//#region src/components/messages/AudioStickyPlayer.vue?vue&type=script&setup=true&lang.ts
|
|
11035
|
-
var
|
|
11045
|
+
var Jh = {
|
|
11036
11046
|
key: 0,
|
|
11037
11047
|
class: "audio-sticky-player flex items-center gap-2 px-3 py-2"
|
|
11038
|
-
},
|
|
11048
|
+
}, Yh = ["src", "type"], Xh = { class: "audio-sticky-player__body min-w-0 flex-1" }, Zh = { class: "body-sm text-default truncate font-medium" }, Qh = { class: "flex items-center gap-2" }, $h = [
|
|
11039
11049
|
"max",
|
|
11040
11050
|
"value",
|
|
11041
11051
|
"aria-label"
|
|
11042
|
-
],
|
|
11052
|
+
], eg = { class: "body-sm text-subtle shrink-0 tabular-nums" }, tg = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11043
11053
|
__name: "AudioStickyPlayer",
|
|
11044
11054
|
props: { attachment: {} },
|
|
11045
11055
|
emits: ["close"],
|
|
11046
11056
|
setup(e, { emit: t }) {
|
|
11047
|
-
let n = e, r = t, { t: i } = Y(), a = D(null), { isPlaying: o, currentTime: u, duration: d, togglePlay: p, startSeek: m, seek: h, endSeek: g } =
|
|
11057
|
+
let n = e, r = t, { t: i } = Y(), a = D(null), { isPlaying: o, currentTime: u, duration: d, togglePlay: p, startSeek: m, seek: h, endSeek: g } = qh({ audioRef: a });
|
|
11048
11058
|
R(() => n.attachment?.url, () => {
|
|
11049
11059
|
let e = a.value;
|
|
11050
11060
|
e && (e.load(), e.play());
|
|
@@ -11064,7 +11074,7 @@ var qh = {
|
|
|
11064
11074
|
function x(e) {
|
|
11065
11075
|
return !Number.isFinite(e) || e < 0 ? "0:00" : `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
11066
11076
|
}
|
|
11067
|
-
return (t, n) => e.attachment ? (T(), c("div",
|
|
11077
|
+
return (t, n) => e.attachment ? (T(), c("div", Jh, [
|
|
11068
11078
|
l("audio", {
|
|
11069
11079
|
ref_key: "audioRef",
|
|
11070
11080
|
ref: a,
|
|
@@ -11072,7 +11082,7 @@ var qh = {
|
|
|
11072
11082
|
}, [l("source", {
|
|
11073
11083
|
src: e.attachment.url,
|
|
11074
11084
|
type: e.attachment.mimeType || void 0
|
|
11075
|
-
}, null, 8,
|
|
11085
|
+
}, null, 8, Yh)], 512),
|
|
11076
11086
|
f(N(H), {
|
|
11077
11087
|
icon: N(o) ? N(Be) : N(Ue),
|
|
11078
11088
|
"aria-label": N(o) ? N(i)("pause") : N(i)("play"),
|
|
@@ -11086,7 +11096,7 @@ var qh = {
|
|
|
11086
11096
|
"aria-label",
|
|
11087
11097
|
"onClick"
|
|
11088
11098
|
]),
|
|
11089
|
-
l("div",
|
|
11099
|
+
l("div", Xh, [l("p", Zh, M(e.attachment.name), 1), l("div", Qh, [l("input", {
|
|
11090
11100
|
type: "range",
|
|
11091
11101
|
class: "audio-sticky-player__seek min-w-0 flex-1",
|
|
11092
11102
|
min: "0",
|
|
@@ -11102,7 +11112,7 @@ var qh = {
|
|
|
11102
11112
|
onTouchmove: v,
|
|
11103
11113
|
onTouchend: v,
|
|
11104
11114
|
onChange: n[0] ||= (...e) => N(g) && N(g)(...e)
|
|
11105
|
-
}, null, 40,
|
|
11115
|
+
}, null, 40, $h), l("span", eg, M(x(N(u))) + " / " + M(x(N(d))), 1)])]),
|
|
11106
11116
|
f(N(H), {
|
|
11107
11117
|
icon: N(ge),
|
|
11108
11118
|
"aria-label": N(i)("close"),
|
|
@@ -11114,7 +11124,7 @@ var qh = {
|
|
|
11114
11124
|
}, null, 8, ["icon", "aria-label"])
|
|
11115
11125
|
])) : s("", !0);
|
|
11116
11126
|
}
|
|
11117
|
-
}), [["__scopeId", "data-v-fc0db029"]]),
|
|
11127
|
+
}), [["__scopeId", "data-v-fc0db029"]]), ng = { class: "date-separator" }, rg = { class: "date-separator__label" }, ig = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11118
11128
|
__name: "MessageDateSeparator",
|
|
11119
11129
|
props: { date: {} },
|
|
11120
11130
|
setup(e) {
|
|
@@ -11128,9 +11138,9 @@ var qh = {
|
|
|
11128
11138
|
year: "numeric"
|
|
11129
11139
|
}).format(i);
|
|
11130
11140
|
});
|
|
11131
|
-
return (e, t) => (T(), c("div",
|
|
11141
|
+
return (e, t) => (T(), c("div", ng, [l("span", rg, M(i.value), 1)]));
|
|
11132
11142
|
}
|
|
11133
|
-
}), [["__scopeId", "data-v-d235376e"]]),
|
|
11143
|
+
}), [["__scopeId", "data-v-d235376e"]]), ag = e("Haptics", { web: () => import("./web-BXfaCfgZ.js").then((e) => new e.HapticsWeb()) }), og = /* @__PURE__ */ p({
|
|
11134
11144
|
__name: "PersonAvatar",
|
|
11135
11145
|
props: {
|
|
11136
11146
|
image: {},
|
|
@@ -11144,22 +11154,22 @@ var qh = {
|
|
|
11144
11154
|
shape: "circle"
|
|
11145
11155
|
}, null, 8, ["image", "label"]));
|
|
11146
11156
|
}
|
|
11147
|
-
}),
|
|
11157
|
+
}), sg = {
|
|
11148
11158
|
"data-testid": "action-message",
|
|
11149
11159
|
class: "message-action-row border-default bg-elevation-surface-default body-sm text-subtle max-w-4/5 rounded-full border px-3 py-1 text-center"
|
|
11150
|
-
},
|
|
11160
|
+
}, cg = { class: "message-action-row__text" }, lg = /* @__PURE__ */ p({
|
|
11151
11161
|
__name: "ActionMessageRow",
|
|
11152
11162
|
props: { text: {} },
|
|
11153
11163
|
setup(e) {
|
|
11154
|
-
return (t, n) => (T(), c("div",
|
|
11164
|
+
return (t, n) => (T(), c("div", sg, [l("span", cg, M(e.text), 1)]));
|
|
11155
11165
|
}
|
|
11156
|
-
}),
|
|
11166
|
+
}), ug = ["href"], dg = {
|
|
11157
11167
|
key: 0,
|
|
11158
11168
|
class: "bg-elevation-surface-hovered aspect-[1.9/1] w-full overflow-hidden"
|
|
11159
|
-
},
|
|
11169
|
+
}, fg = ["src", "alt"], pg = { class: "space-y-1.5 px-3 py-3" }, mg = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, hg = { class: "heading-sm text-default line-clamp-2" }, gg = { class: "body-md text-subtle line-clamp-2" }, _g = {
|
|
11160
11170
|
key: 0,
|
|
11161
11171
|
class: "body-sm text-subtlest"
|
|
11162
|
-
},
|
|
11172
|
+
}, vg = /* @__PURE__ */ p({
|
|
11163
11173
|
__name: "LinkPreviewCard",
|
|
11164
11174
|
props: {
|
|
11165
11175
|
url: {},
|
|
@@ -11226,18 +11236,18 @@ var qh = {
|
|
|
11226
11236
|
target: "_blank",
|
|
11227
11237
|
rel: "noreferrer",
|
|
11228
11238
|
class: y(["bg-elevation-surface-default shadow-raised mt-2 block overflow-hidden rounded-xl border-0 no-underline transition hover:opacity-95", e.isOwn ? "bg-elevation-surface-default text-default" : "bg-elevation-surface-sunken text-default"])
|
|
11229
|
-
}, [n.value?.imageUrl ? (T(), c("div",
|
|
11239
|
+
}, [n.value?.imageUrl ? (T(), c("div", dg, [l("img", {
|
|
11230
11240
|
src: n.value.imageUrl,
|
|
11231
11241
|
alt: n.value.title || o.value,
|
|
11232
11242
|
class: "h-full w-full object-cover"
|
|
11233
|
-
}, null, 8,
|
|
11234
|
-
l("p",
|
|
11235
|
-
l("p",
|
|
11236
|
-
l("p",
|
|
11237
|
-
r.value && !n.value ? (T(), c("p",
|
|
11238
|
-
])], 10,
|
|
11239
|
-
}
|
|
11240
|
-
}),
|
|
11243
|
+
}, null, 8, fg)])) : s("", !0), l("div", pg, [
|
|
11244
|
+
l("p", mg, M(n.value?.siteName || o.value), 1),
|
|
11245
|
+
l("p", hg, M(n.value?.title || o.value), 1),
|
|
11246
|
+
l("p", gg, M(n.value?.description || u.value), 1),
|
|
11247
|
+
r.value && !n.value ? (T(), c("p", _g, M(N(i)("loadingPreview")), 1)) : s("", !0)
|
|
11248
|
+
])], 10, ug));
|
|
11249
|
+
}
|
|
11250
|
+
}), yg = { class: "linkified-text" }, bg = ["innerHTML"], xg = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11241
11251
|
__name: "LinkifiedText",
|
|
11242
11252
|
props: {
|
|
11243
11253
|
text: {},
|
|
@@ -11256,32 +11266,32 @@ var qh = {
|
|
|
11256
11266
|
let t = e.target;
|
|
11257
11267
|
t.tagName === "A" && d(e, t);
|
|
11258
11268
|
}
|
|
11259
|
-
return (t, n) => (T(), c("div",
|
|
11269
|
+
return (t, n) => (T(), c("div", yg, [l("div", {
|
|
11260
11270
|
class: y(["rich-text-content", e.textClass]),
|
|
11261
11271
|
onClick: f,
|
|
11262
11272
|
innerHTML: i.value
|
|
11263
|
-
}, null, 10,
|
|
11273
|
+
}, null, 10, bg), e.showPreview !== !1 && u.value ? (T(), o(vg, {
|
|
11264
11274
|
key: 0,
|
|
11265
11275
|
url: u.value,
|
|
11266
11276
|
"is-own": e.isOwn
|
|
11267
11277
|
}, null, 8, ["url", "is-own"])) : s("", !0)]));
|
|
11268
11278
|
}
|
|
11269
|
-
}), [["__scopeId", "data-v-656b44e8"]]),
|
|
11279
|
+
}), [["__scopeId", "data-v-656b44e8"]]), Sg = { class: "w-full space-y-1" }, Cg = {
|
|
11270
11280
|
key: 0,
|
|
11271
11281
|
class: "attachment-media-bleed",
|
|
11272
11282
|
"data-testid": "attachment-album"
|
|
11273
|
-
},
|
|
11283
|
+
}, wg = { class: "grid grid-cols-2 gap-0.5 overflow-hidden rounded-lg" }, Tg = ["aria-label"], Eg = {
|
|
11274
11284
|
key: 2,
|
|
11275
11285
|
class: "heading-lg pointer-events-none absolute inset-0 flex items-center justify-center bg-black/50 text-white"
|
|
11276
|
-
},
|
|
11286
|
+
}, Dg = {
|
|
11277
11287
|
class: "attachment-video",
|
|
11278
11288
|
controls: "",
|
|
11279
11289
|
playsinline: "",
|
|
11280
11290
|
preload: "metadata"
|
|
11281
|
-
},
|
|
11291
|
+
}, Og = ["src", "type"], kg = ["onClick"], Ag = { class: "inline-flex items-center gap-2 truncate font-medium" }, jg = ["href"], Mg = { class: "flex min-w-0 items-center gap-2" }, Ng = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, Pg = { class: "text-default truncate font-medium" }, Fg = { class: "body-sm text-subtle shrink-0" }, Ig = {
|
|
11282
11292
|
key: 4,
|
|
11283
11293
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm"
|
|
11284
|
-
},
|
|
11294
|
+
}, Lg = { class: "flex min-w-0 items-center gap-2" }, Rg = { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full" }, zg = { class: "text-default truncate font-medium" }, Bg = { class: "body-sm text-subtle shrink-0" }, Vg = 4, Hg = 4 / 3, Ug = 16 / 9, Wg = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11285
11295
|
__name: "MessageAttachmentList",
|
|
11286
11296
|
props: { message: {} },
|
|
11287
11297
|
emits: ["openMedia"],
|
|
@@ -11349,13 +11359,13 @@ var qh = {
|
|
|
11349
11359
|
return Math.max(0, h(e).findIndex((e) => e.src === t.url));
|
|
11350
11360
|
}
|
|
11351
11361
|
function _(e) {
|
|
11352
|
-
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ?
|
|
11362
|
+
return e.width && e.height && e.width > 0 && e.height > 0 ? e.width / e.height : e.kind === "video" ? Ug : Hg;
|
|
11353
11363
|
}
|
|
11354
11364
|
function v(e) {
|
|
11355
11365
|
return { aspectRatio: String(_(e)) };
|
|
11356
11366
|
}
|
|
11357
|
-
return (t, u) => (T(), c("div",
|
|
11358
|
-
m(e.message) ? (T(), c("div",
|
|
11367
|
+
return (t, u) => (T(), c("div", Sg, [
|
|
11368
|
+
m(e.message) ? (T(), c("div", Cg, [l("div", wg, [(T(!0), c(r, null, O(e.message.attachments.slice(0, Vg), (t, n) => (T(), c("div", {
|
|
11359
11369
|
key: `${e.message.id}-${n}`,
|
|
11360
11370
|
class: y(["relative", { "col-span-2": e.message.attachments.length === 3 && n === 0 }])
|
|
11361
11371
|
}, [t.url ? (T(), o(N(W), {
|
|
@@ -11378,7 +11388,7 @@ var qh = {
|
|
|
11378
11388
|
class: y(["bg-elevation-surface-raised-default size-full animate-pulse", e.message.attachments.length === 3 && n === 0 ? "aspect-2/1" : "aspect-square"]),
|
|
11379
11389
|
role: "img",
|
|
11380
11390
|
"aria-label": N(i)("queued")
|
|
11381
|
-
}, null, 10,
|
|
11391
|
+
}, null, 10, Tg)), n === 3 && e.message.attachments.length > Vg ? (T(), c("span", Eg, " +" + M(e.message.attachments.length - Vg), 1)) : s("", !0)], 2))), 128))])])) : s("", !0),
|
|
11382
11392
|
(T(!0), c(r, null, O(m(e.message) ? [] : e.message.attachments, (t, s) => (T(), c(r, { key: `${e.message.id}-${s}` }, [t.kind === "image" && t.url ? (T(), o(N(W), {
|
|
11383
11393
|
key: 0,
|
|
11384
11394
|
preview: "",
|
|
@@ -11397,28 +11407,28 @@ var qh = {
|
|
|
11397
11407
|
key: 1,
|
|
11398
11408
|
class: "attachment-media-bleed bg-elevation-surface-default shadow-raised attachment-media-frame group relative overflow-hidden rounded-xl border-0",
|
|
11399
11409
|
style: x(v(t))
|
|
11400
|
-
}, [l("video",
|
|
11410
|
+
}, [l("video", Dg, [l("source", {
|
|
11401
11411
|
src: t.url,
|
|
11402
11412
|
type: t.mimeType || void 0
|
|
11403
|
-
}, null, 8,
|
|
11413
|
+
}, null, 8, Og)])], 4)) : t.kind === "audio" && t.url ? (T(), c("button", {
|
|
11404
11414
|
key: 2,
|
|
11405
11415
|
type: "button",
|
|
11406
11416
|
class: "flex w-full items-center justify-between gap-3 rounded-2xl px-3 py-2 text-left text-sm transition hover:opacity-90",
|
|
11407
11417
|
onClick: (e) => n("openMedia", t)
|
|
11408
|
-
}, [l("span",
|
|
11418
|
+
}, [l("span", Ag, [u[0] ||= l("span", { class: "bg-elevation-surface-hovered text-default inline-flex h-8 w-8 items-center justify-center rounded-full" }, " ♪ ", -1), d(" " + M(N(i)("audioMessage")), 1)])], 8, kg)) : t.url ? (T(), c("a", {
|
|
11409
11419
|
key: 3,
|
|
11410
11420
|
href: t.url,
|
|
11411
11421
|
target: "_blank",
|
|
11412
11422
|
rel: "noreferrer",
|
|
11413
11423
|
class: "flex items-center justify-between gap-3 rounded-2xl px-3 py-2 text-sm no-underline transition hover:opacity-90"
|
|
11414
|
-
}, [l("span",
|
|
11424
|
+
}, [l("span", Mg, [l("span", Ng, [(T(), o(A(f(t)), {
|
|
11415
11425
|
class: "size-5",
|
|
11416
11426
|
"aria-hidden": "true"
|
|
11417
|
-
}))]), l("span",
|
|
11427
|
+
}))]), l("span", Pg, M(t.name), 1)]), l("span", Fg, M(a(t.size)), 1)], 8, jg)) : (T(), c("div", Ig, [l("span", Lg, [l("span", Rg, [(T(), o(A(f(t)), {
|
|
11418
11428
|
class: "size-5",
|
|
11419
11429
|
"aria-hidden": "true"
|
|
11420
|
-
}))]), l("span",
|
|
11421
|
-
p(e.message) ? (T(), o(
|
|
11430
|
+
}))]), l("span", zg, M(t.name), 1)]), l("span", Bg, M(a(t.size) || N(i)("queued")), 1)]))], 64))), 128)),
|
|
11431
|
+
p(e.message) ? (T(), o(xg, {
|
|
11422
11432
|
key: 1,
|
|
11423
11433
|
text: e.message.text,
|
|
11424
11434
|
"is-own": e.message.isOwn,
|
|
@@ -11426,7 +11436,7 @@ var qh = {
|
|
|
11426
11436
|
}, null, 8, ["text", "is-own"])) : s("", !0)
|
|
11427
11437
|
]));
|
|
11428
11438
|
}
|
|
11429
|
-
}), [["__scopeId", "data-v-fe064f15"]]),
|
|
11439
|
+
}), [["__scopeId", "data-v-fe064f15"]]), Gg = { class: "message-status" }, Kg = { key: 0 }, qg = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11430
11440
|
__name: "MessageDeliveryStatus",
|
|
11431
11441
|
props: { message: {} },
|
|
11432
11442
|
setup(e) {
|
|
@@ -11475,8 +11485,8 @@ var qh = {
|
|
|
11475
11485
|
};
|
|
11476
11486
|
}
|
|
11477
11487
|
});
|
|
11478
|
-
return (t, n) => (T(), c("div",
|
|
11479
|
-
e.message.isEdited && e.message.kind !== "poll" ? (T(), c("span",
|
|
11488
|
+
return (t, n) => (T(), c("div", Gg, [
|
|
11489
|
+
e.message.isEdited && e.message.kind !== "poll" ? (T(), c("span", Kg, M(N(r)("edited")), 1)) : s("", !0),
|
|
11480
11490
|
l("span", null, M(i(e.message.sentAt)), 1),
|
|
11481
11491
|
u.value ? (T(), o(A(u.value.icon), {
|
|
11482
11492
|
key: 1,
|
|
@@ -11491,17 +11501,17 @@ var qh = {
|
|
|
11491
11501
|
])) : s("", !0)
|
|
11492
11502
|
]));
|
|
11493
11503
|
}
|
|
11494
|
-
}), [["__scopeId", "data-v-a6e23274"]]),
|
|
11504
|
+
}), [["__scopeId", "data-v-a6e23274"]]), Jg = {
|
|
11495
11505
|
key: 0,
|
|
11496
11506
|
class: "forwarded-label body-sm text-subtle mb-1"
|
|
11497
|
-
},
|
|
11507
|
+
}, Yg = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11498
11508
|
__name: "MessageForwardedLabel",
|
|
11499
11509
|
props: { message: {} },
|
|
11500
11510
|
setup(e) {
|
|
11501
11511
|
let { t } = Y();
|
|
11502
|
-
return (n, r) => e.message.forwardedFrom ? (T(), c("p",
|
|
11512
|
+
return (n, r) => e.message.forwardedFrom ? (T(), c("p", Jg, M(N(t)("forwardedFrom", { name: e.message.forwardedFrom.senderName })), 1)) : s("", !0);
|
|
11503
11513
|
}
|
|
11504
|
-
}), [["__scopeId", "data-v-2227d78f"]]),
|
|
11514
|
+
}), [["__scopeId", "data-v-2227d78f"]]), Xg = { class: "mb-1 flex items-start justify-between gap-2" }, Zg = { class: "body-sm text-subtlest truncate font-medium!" }, Qg = /* @__PURE__ */ p({
|
|
11505
11515
|
__name: "MessageItemHeader",
|
|
11506
11516
|
props: { message: {} },
|
|
11507
11517
|
setup(e) {
|
|
@@ -11517,7 +11527,7 @@ var qh = {
|
|
|
11517
11527
|
function a() {
|
|
11518
11528
|
return t.message.senderName?.trim() || (t.message.isOwn ? r("you") : r("system"));
|
|
11519
11529
|
}
|
|
11520
|
-
return (t, n) => (T(), c("div",
|
|
11530
|
+
return (t, n) => (T(), c("div", Xg, [l("span", Zg, M(a()), 1), e.message.scheduled?.scheduleDate ? (T(), o(N(K), {
|
|
11521
11531
|
key: 0,
|
|
11522
11532
|
text: N(r)("scheduledDateLabel", { date: i(e.message.scheduled.scheduleDate) }),
|
|
11523
11533
|
context: "warn",
|
|
@@ -11526,7 +11536,7 @@ var qh = {
|
|
|
11526
11536
|
class: "shrink-0"
|
|
11527
11537
|
}, null, 8, ["text"])) : s("", !0)]));
|
|
11528
11538
|
}
|
|
11529
|
-
}),
|
|
11539
|
+
}), $g = ["disabled", "onClick"], e_ = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11530
11540
|
__name: "MessageReactionList",
|
|
11531
11541
|
props: {
|
|
11532
11542
|
message: {},
|
|
@@ -11545,9 +11555,9 @@ var qh = {
|
|
|
11545
11555
|
class: y(["message-reaction-list__item rounded-full px-2 py-0.75 leading-none transition", t.reactedByMe ? "reaction-chip-selected" : e.message.isOwn ? "reaction-chip-own" : "reaction-chip-other"]),
|
|
11546
11556
|
disabled: e.disabled,
|
|
11547
11557
|
onClick: (e) => n("toggle", t.emoji)
|
|
11548
|
-
}, M(t.emoji) + " " + M(t.count), 11,
|
|
11558
|
+
}, M(t.emoji) + " " + M(t.count), 11, $g))), 128))], 2)) : s("", !0);
|
|
11549
11559
|
}
|
|
11550
|
-
}), [["__scopeId", "data-v-c17c8bfd"]]),
|
|
11560
|
+
}), [["__scopeId", "data-v-c17c8bfd"]]), t_ = { class: "message-reactions flex min-w-0 flex-1 flex-wrap items-center gap-1.5" }, n_ = ["aria-label", "title"], r_ = { class: "message-reactions__thread-count" }, i_ = /* @__PURE__ */ p({
|
|
11551
11561
|
__name: "MessageItemReactions",
|
|
11552
11562
|
props: {
|
|
11553
11563
|
message: {},
|
|
@@ -11557,7 +11567,7 @@ var qh = {
|
|
|
11557
11567
|
emits: ["toggleReaction", "openThread"],
|
|
11558
11568
|
setup(e, { emit: t }) {
|
|
11559
11569
|
let n = e, r = t, { t: i } = Y(), u = a(() => i("threadReplies", { count: n.message.replyCount })), d = a(() => n.canOpenThread !== !1 && n.message.replyCount > 0);
|
|
11560
|
-
return (t, n) => (T(), c("div",
|
|
11570
|
+
return (t, n) => (T(), c("div", t_, [f(e_, {
|
|
11561
11571
|
message: e.message,
|
|
11562
11572
|
disabled: e.canReact === !1,
|
|
11563
11573
|
compact: "",
|
|
@@ -11572,21 +11582,21 @@ var qh = {
|
|
|
11572
11582
|
}, [(T(), o(A(N(Ge)), {
|
|
11573
11583
|
class: "size-4",
|
|
11574
11584
|
"aria-hidden": "true"
|
|
11575
|
-
})), l("span",
|
|
11585
|
+
})), l("span", r_, M(e.message.replyCount), 1)], 8, n_)) : s("", !0)]));
|
|
11576
11586
|
}
|
|
11577
|
-
}),
|
|
11587
|
+
}), a_ = { class: "pinned-label body-sm text-subtle mb-1 flex items-center gap-1 font-medium" }, o_ = /* @__PURE__ */ p({
|
|
11578
11588
|
__name: "MessagePinnedLabel",
|
|
11579
11589
|
setup(e) {
|
|
11580
11590
|
let { t } = Y();
|
|
11581
|
-
return (e, n) => (T(), c("p",
|
|
11591
|
+
return (e, n) => (T(), c("p", a_, [f(N(Ae), {
|
|
11582
11592
|
class: "pinned-label__icon size-3.5 shrink-0",
|
|
11583
11593
|
"aria-hidden": "true"
|
|
11584
11594
|
}), l("span", null, M(N(t)("pinnedLabel")), 1)]));
|
|
11585
11595
|
}
|
|
11586
|
-
}),
|
|
11596
|
+
}), s_ = {
|
|
11587
11597
|
key: 0,
|
|
11588
11598
|
class: ""
|
|
11589
|
-
},
|
|
11599
|
+
}, c_ = { class: "heading-sm text-default" }, l_ = { class: "body-sm text-subtle" }, u_ = { class: "space-y-2 py-3" }, d_ = ["disabled", "onClick"], f_ = { class: "body-md flex items-center justify-between gap-3 px-3 py-1.5" }, p_ = { class: "body-sm text-subtle shrink-0" }, m_ = { class: "bg-alpha-default h-1.5" }, h_ = /* @__PURE__ */ p({
|
|
11590
11600
|
__name: "MessagePollContent",
|
|
11591
11601
|
props: {
|
|
11592
11602
|
message: {},
|
|
@@ -11605,36 +11615,36 @@ var qh = {
|
|
|
11605
11615
|
let t = n.currentUserId;
|
|
11606
11616
|
return !(t && n.pendingOptionKey !== `${n.message.id}:${e}` && !n.message.poll.options.some((n) => n.id === e && n.voters.some((e) => e.uid === t)));
|
|
11607
11617
|
}
|
|
11608
|
-
return (t, n) => e.message.poll ? (T(), c("div",
|
|
11618
|
+
return (t, n) => e.message.poll ? (T(), c("div", s_, [l("div", null, [l("h4", c_, M(e.message.poll.question), 1), l("p", l_, M(N(a)("voteCount", { count: e.message.poll.totalVotes })), 1)]), l("div", u_, [(T(!0), c(r, null, O(e.message.poll.options, (t) => (T(), c("button", {
|
|
11609
11619
|
key: t.id,
|
|
11610
11620
|
type: "button",
|
|
11611
11621
|
class: "shadow-raised bg-elevation-surface-raised-default block w-full overflow-hidden rounded-lg text-left",
|
|
11612
11622
|
disabled: u(t.id),
|
|
11613
11623
|
onClick: (e) => i("vote", t.id)
|
|
11614
|
-
}, [l("div",
|
|
11624
|
+
}, [l("div", f_, [l("span", { class: y(["truncate font-medium", o(t.id) ? "text-success" : ""]) }, M(t.text), 3), l("span", p_, M(N(a)("voteCount", { count: t.voteCount })), 1)]), l("div", m_, [l("div", {
|
|
11615
11625
|
class: y(["h-full transition-all", o(t.id) ? "bg-accent-green-subtle-default" : "bg-accent-teal-subtle-default"]),
|
|
11616
11626
|
style: x({ width: `${e.message.poll.totalVotes ? t.voteCount / e.message.poll.totalVotes * 100 : 0}%` })
|
|
11617
|
-
}, null, 6)])], 8,
|
|
11627
|
+
}, null, 6)])], 8, d_))), 128))])])) : s("", !0);
|
|
11618
11628
|
}
|
|
11619
|
-
}),
|
|
11629
|
+
}), g_ = { class: "heading-xs" }, __ = { class: "truncate" }, v_ = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11620
11630
|
__name: "MessageReplyQuote",
|
|
11621
11631
|
props: { message: {} },
|
|
11622
11632
|
emits: ["open"],
|
|
11623
11633
|
setup(e, { emit: t }) {
|
|
11624
|
-
let n = e, r =
|
|
11634
|
+
let n = e, r = _p(), i = a(() => n.message.replyTo ? sl(n.message.replyTo.text, r.mentionNameByUid.value) : ""), o = t;
|
|
11625
11635
|
return (t, n) => (T(), c("button", {
|
|
11626
11636
|
type: "button",
|
|
11627
11637
|
class: "reply-quote",
|
|
11628
11638
|
onClick: n[0] ||= (e) => o("open")
|
|
11629
|
-
}, [l("p",
|
|
11639
|
+
}, [l("p", g_, M(e.message.replyTo.senderName), 1), l("p", __, M(i.value), 1)]));
|
|
11630
11640
|
}
|
|
11631
|
-
}), [["__scopeId", "data-v-e27c136c"]]),
|
|
11641
|
+
}), [["__scopeId", "data-v-e27c136c"]]), y_ = { class: "space-y-2" }, b_ = /* @__PURE__ */ p({
|
|
11632
11642
|
__name: "MessageTextContent",
|
|
11633
11643
|
props: { message: {} },
|
|
11634
11644
|
emits: ["anchorclick"],
|
|
11635
11645
|
setup(e) {
|
|
11636
|
-
let t =
|
|
11637
|
-
return (t, r) => (T(), c("div",
|
|
11646
|
+
let t = _p(), n = a(() => t.mentionNameByUid.value);
|
|
11647
|
+
return (t, r) => (T(), c("div", y_, [e.message.translatedText ? (T(), o(xg, {
|
|
11638
11648
|
key: 0,
|
|
11639
11649
|
text: e.message.translatedText,
|
|
11640
11650
|
"mention-name-by-uid": n.value,
|
|
@@ -11648,7 +11658,7 @@ var qh = {
|
|
|
11648
11658
|
"mention-name-by-uid",
|
|
11649
11659
|
"is-own",
|
|
11650
11660
|
"class"
|
|
11651
|
-
])) : s("", !0), f(
|
|
11661
|
+
])) : s("", !0), f(xg, {
|
|
11652
11662
|
text: e.message.text,
|
|
11653
11663
|
"mention-name-by-uid": n.value,
|
|
11654
11664
|
"is-own": e.message.isOwn,
|
|
@@ -11661,11 +11671,11 @@ var qh = {
|
|
|
11661
11671
|
"is-own"
|
|
11662
11672
|
])]));
|
|
11663
11673
|
}
|
|
11664
|
-
}),
|
|
11674
|
+
}), x_ = [
|
|
11665
11675
|
"id",
|
|
11666
11676
|
"data-message-id",
|
|
11667
11677
|
"data-message-kind"
|
|
11668
|
-
],
|
|
11678
|
+
], S_ = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, C_ = { class: "message-item__footer body-sm text-subtlest mt-0.5 flex items-end justify-between gap-2" }, w_ = 500, T_ = 10, E_ = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11669
11679
|
__name: "MessageItem",
|
|
11670
11680
|
props: {
|
|
11671
11681
|
message: {},
|
|
@@ -11721,13 +11731,13 @@ var qh = {
|
|
|
11721
11731
|
x: t.clientX,
|
|
11722
11732
|
y: t.clientY
|
|
11723
11733
|
}, w(), b = setTimeout(() => {
|
|
11724
|
-
b = null, C = !0,
|
|
11725
|
-
},
|
|
11734
|
+
b = null, C = !0, ag.impact({ style: n.Medium }), u("tap", e);
|
|
11735
|
+
}, w_));
|
|
11726
11736
|
}
|
|
11727
11737
|
function O(e) {
|
|
11728
11738
|
if (!S) return;
|
|
11729
11739
|
let t = e.touches[0];
|
|
11730
|
-
t && Math.hypot(t.clientX - S.x, t.clientY - S.y) >
|
|
11740
|
+
t && Math.hypot(t.clientX - S.x, t.clientY - S.y) > T_ && (w(), S = null);
|
|
11731
11741
|
}
|
|
11732
11742
|
function k() {
|
|
11733
11743
|
w(), S = null;
|
|
@@ -11747,12 +11757,12 @@ var qh = {
|
|
|
11747
11757
|
"data-message-id": e.message.id,
|
|
11748
11758
|
"data-message-kind": e.message.kind,
|
|
11749
11759
|
class: y(["message-item group", d.value])
|
|
11750
|
-
}, [e.message.kind === "action" ? (T(), o(
|
|
11760
|
+
}, [e.message.kind === "action" ? (T(), o(lg, {
|
|
11751
11761
|
key: 0,
|
|
11752
11762
|
text: e.message.text,
|
|
11753
11763
|
class: y(m.value)
|
|
11754
11764
|
}, null, 8, ["text", "class"])) : (T(), c(r, { key: 1 }, [
|
|
11755
|
-
e.canShowSenderAvatar && !e.message.isOwn ? (T(), o(
|
|
11765
|
+
e.canShowSenderAvatar && !e.message.isOwn ? (T(), o(og, {
|
|
11756
11766
|
key: 0,
|
|
11757
11767
|
image: e.message.senderAvatar,
|
|
11758
11768
|
name: e.message.senderName,
|
|
@@ -11769,21 +11779,21 @@ var qh = {
|
|
|
11769
11779
|
onTouchend: k,
|
|
11770
11780
|
onTouchcancel: k
|
|
11771
11781
|
}, [
|
|
11772
|
-
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(
|
|
11782
|
+
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(Qg, {
|
|
11773
11783
|
key: 0,
|
|
11774
11784
|
message: e.message
|
|
11775
11785
|
}, null, 8, ["message"])) : s("", !0),
|
|
11776
|
-
e.isPinned ? (T(), o(
|
|
11777
|
-
e.message.forwardedFrom ? (T(), o(
|
|
11786
|
+
e.isPinned ? (T(), o(o_, { key: 1 })) : s("", !0),
|
|
11787
|
+
e.message.forwardedFrom ? (T(), o(Yg, {
|
|
11778
11788
|
key: 2,
|
|
11779
11789
|
message: e.message
|
|
11780
11790
|
}, null, 8, ["message"])) : s("", !0),
|
|
11781
|
-
e.message.replyTo ? (T(), o(
|
|
11791
|
+
e.message.replyTo ? (T(), o(v_, {
|
|
11782
11792
|
key: 3,
|
|
11783
11793
|
message: e.message,
|
|
11784
11794
|
onOpen: M
|
|
11785
11795
|
}, null, 8, ["message"])) : s("", !0),
|
|
11786
|
-
e.message.kind === "poll" && e.message.poll ? (T(), o(
|
|
11796
|
+
e.message.kind === "poll" && e.message.poll ? (T(), o(h_, {
|
|
11787
11797
|
key: 4,
|
|
11788
11798
|
message: e.message,
|
|
11789
11799
|
"current-user-id": e.currentUserId,
|
|
@@ -11793,16 +11803,16 @@ var qh = {
|
|
|
11793
11803
|
"message",
|
|
11794
11804
|
"current-user-id",
|
|
11795
11805
|
"pending-option-key"
|
|
11796
|
-
])) : e.message.attachments?.length ? (T(), o(
|
|
11806
|
+
])) : e.message.attachments?.length ? (T(), o(Wg, {
|
|
11797
11807
|
key: 5,
|
|
11798
11808
|
message: e.message,
|
|
11799
11809
|
onOpenMedia: n[1] ||= (e) => u("openMedia", e)
|
|
11800
|
-
}, null, 8, ["message"])) : (T(), o(
|
|
11810
|
+
}, null, 8, ["message"])) : (T(), o(b_, {
|
|
11801
11811
|
key: 6,
|
|
11802
11812
|
message: e.message,
|
|
11803
11813
|
onAnchorclick: n[2] ||= (e, n) => t.$emit("anchorclick", e, n)
|
|
11804
11814
|
}, null, 8, ["message"])),
|
|
11805
|
-
l("div",
|
|
11815
|
+
l("div", S_, [f(i_, {
|
|
11806
11816
|
message: e.message,
|
|
11807
11817
|
"can-react": e.canReact,
|
|
11808
11818
|
"can-open-thread": e.canOpenThread,
|
|
@@ -11812,7 +11822,7 @@ var qh = {
|
|
|
11812
11822
|
"message",
|
|
11813
11823
|
"can-react",
|
|
11814
11824
|
"can-open-thread"
|
|
11815
|
-
]), f(
|
|
11825
|
+
]), f(qg, { message: e.message }, null, 8, ["message"])])
|
|
11816
11826
|
], 34),
|
|
11817
11827
|
e.contextMenuOpen && e.isTouchUi ? (T(), c("div", {
|
|
11818
11828
|
key: 1,
|
|
@@ -11821,21 +11831,21 @@ var qh = {
|
|
|
11821
11831
|
class: "message-bubble-wrapper",
|
|
11822
11832
|
style: x({ top: j.value })
|
|
11823
11833
|
}, [l("div", { class: y(["message-bubble", p.value]) }, [
|
|
11824
|
-
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(
|
|
11834
|
+
!e.message.isOwn || e.message.scheduled?.scheduleDate ? (T(), o(Qg, {
|
|
11825
11835
|
key: 0,
|
|
11826
11836
|
message: e.message
|
|
11827
11837
|
}, null, 8, ["message"])) : s("", !0),
|
|
11828
|
-
e.isPinned ? (T(), o(
|
|
11829
|
-
e.message.forwardedFrom ? (T(), o(
|
|
11838
|
+
e.isPinned ? (T(), o(o_, { key: 1 })) : s("", !0),
|
|
11839
|
+
e.message.forwardedFrom ? (T(), o(Yg, {
|
|
11830
11840
|
key: 2,
|
|
11831
11841
|
message: e.message
|
|
11832
11842
|
}, null, 8, ["message"])) : s("", !0),
|
|
11833
|
-
e.message.replyTo ? (T(), o(
|
|
11843
|
+
e.message.replyTo ? (T(), o(v_, {
|
|
11834
11844
|
key: 3,
|
|
11835
11845
|
message: e.message,
|
|
11836
11846
|
onOpen: M
|
|
11837
11847
|
}, null, 8, ["message"])) : s("", !0),
|
|
11838
|
-
e.message.kind === "poll" && e.message.poll ? (T(), o(
|
|
11848
|
+
e.message.kind === "poll" && e.message.poll ? (T(), o(h_, {
|
|
11839
11849
|
key: 4,
|
|
11840
11850
|
message: e.message,
|
|
11841
11851
|
"current-user-id": e.currentUserId,
|
|
@@ -11845,16 +11855,16 @@ var qh = {
|
|
|
11845
11855
|
"message",
|
|
11846
11856
|
"current-user-id",
|
|
11847
11857
|
"pending-option-key"
|
|
11848
|
-
])) : e.message.attachments?.length ? (T(), o(
|
|
11858
|
+
])) : e.message.attachments?.length ? (T(), o(Wg, {
|
|
11849
11859
|
key: 5,
|
|
11850
11860
|
message: e.message,
|
|
11851
11861
|
onOpenMedia: n[6] ||= (e) => u("openMedia", e)
|
|
11852
|
-
}, null, 8, ["message"])) : (T(), o(
|
|
11862
|
+
}, null, 8, ["message"])) : (T(), o(b_, {
|
|
11853
11863
|
key: 6,
|
|
11854
11864
|
message: e.message,
|
|
11855
11865
|
onAnchorclick: n[7] ||= (e, n) => t.$emit("anchorclick", e, n)
|
|
11856
11866
|
}, null, 8, ["message"])),
|
|
11857
|
-
l("div",
|
|
11867
|
+
l("div", C_, [f(i_, {
|
|
11858
11868
|
message: e.message,
|
|
11859
11869
|
"can-react": e.canReact,
|
|
11860
11870
|
"can-open-thread": e.canOpenThread,
|
|
@@ -11864,14 +11874,14 @@ var qh = {
|
|
|
11864
11874
|
"message",
|
|
11865
11875
|
"can-react",
|
|
11866
11876
|
"can-open-thread"
|
|
11867
|
-
]), f(
|
|
11877
|
+
]), f(qg, { message: e.message }, null, 8, ["message"])])
|
|
11868
11878
|
], 2)], 4)], 2)) : s("", !0)
|
|
11869
|
-
], 64))], 10,
|
|
11879
|
+
], 64))], 10, x_));
|
|
11870
11880
|
}
|
|
11871
|
-
}), [["__scopeId", "data-v-d265fe94"]]),
|
|
11881
|
+
}), [["__scopeId", "data-v-d265fe94"]]), D_ = { class: "shadow-overlay bg-elevation-surface-raised-default mx-auto flex w-max max-w-full items-center gap-1 rounded-full px-3 py-1" }, O_ = ["disabled", "onClick"], k_ = ["disabled"], A_ = {
|
|
11872
11882
|
key: 0,
|
|
11873
11883
|
class: "bg-elevation-surface-raised-default shadow-overlay m-0 grid grid-cols-6 gap-1 rounded-lg p-1.5"
|
|
11874
|
-
},
|
|
11884
|
+
}, j_ = ["onClick"], M_ = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11875
11885
|
__name: "MessageItemMenuReactions",
|
|
11876
11886
|
props: {
|
|
11877
11887
|
message: {},
|
|
@@ -11883,20 +11893,20 @@ var qh = {
|
|
|
11883
11893
|
R(() => n.message.id, () => {
|
|
11884
11894
|
u.value = !1;
|
|
11885
11895
|
});
|
|
11886
|
-
let d = a(() =>
|
|
11896
|
+
let d = a(() => mm);
|
|
11887
11897
|
function f(e) {
|
|
11888
11898
|
return (n.message.reactions ?? []).some((t) => t.emoji === e);
|
|
11889
11899
|
}
|
|
11890
11900
|
function p() {
|
|
11891
11901
|
n.canReact && (u.value = !u.value);
|
|
11892
11902
|
}
|
|
11893
|
-
return (t, n) => (T(), c(r, null, [l("div",
|
|
11903
|
+
return (t, n) => (T(), c(r, null, [l("div", D_, [(T(!0), c(r, null, O(N(pm), (t) => (T(), c("button", {
|
|
11894
11904
|
key: `${e.message.id}-${t}-common`,
|
|
11895
11905
|
type: "button",
|
|
11896
11906
|
class: y(["message-reaction-button", f(t) ? "bg-background-success-default" : "bg-transparent"]),
|
|
11897
11907
|
disabled: !e.canReact,
|
|
11898
11908
|
onClick: (e) => i("react", t)
|
|
11899
|
-
}, M(t), 11,
|
|
11909
|
+
}, M(t), 11, O_))), 128)), l("button", {
|
|
11900
11910
|
type: "button",
|
|
11901
11911
|
class: "message-reaction-more",
|
|
11902
11912
|
disabled: !e.canReact,
|
|
@@ -11904,37 +11914,37 @@ var qh = {
|
|
|
11904
11914
|
}, [(T(), o(A(u.value ? N(Pe) : N(Ne)), {
|
|
11905
11915
|
class: "size-7",
|
|
11906
11916
|
"aria-hidden": "true"
|
|
11907
|
-
}))], 8,
|
|
11917
|
+
}))], 8, k_)]), u.value && e.canReact ? (T(), c("div", A_, [(T(!0), c(r, null, O(d.value, (t) => (T(), c("button", {
|
|
11908
11918
|
key: `${e.message.id}-${t}-extended`,
|
|
11909
11919
|
type: "button",
|
|
11910
11920
|
class: y(["message-expanded-reaction-button", f(t) ? "bg-background-success-default" : "bg-transparent"]),
|
|
11911
11921
|
onClick: (e) => i("react", t)
|
|
11912
|
-
}, M(t), 11,
|
|
11922
|
+
}, M(t), 11, j_))), 128))])) : s("", !0)], 64));
|
|
11913
11923
|
}
|
|
11914
|
-
}), [["__scopeId", "data-v-0a11761a"]]),
|
|
11924
|
+
}), [["__scopeId", "data-v-0a11761a"]]), N_ = { class: "message-action-list" }, P_ = { class: "message-receipt-summary__icon" }, F_ = { class: "message-receipt-summary__label" }, I_ = {
|
|
11915
11925
|
key: 0,
|
|
11916
11926
|
class: "message-receipt-summary__avatars",
|
|
11917
11927
|
"aria-hidden": "true"
|
|
11918
|
-
},
|
|
11928
|
+
}, L_ = { class: "message-receipt-summary__icon" }, R_ = { class: "message-receipt-summary__label" }, z_ = { class: "message-receipt-summary__icon" }, B_ = { class: "message-receipt-summary__label" }, V_ = {
|
|
11919
11929
|
key: 3,
|
|
11920
11930
|
class: "message-action-list__divider",
|
|
11921
11931
|
"aria-hidden": "true"
|
|
11922
|
-
},
|
|
11932
|
+
}, H_ = {
|
|
11923
11933
|
key: 1,
|
|
11924
11934
|
class: "message-action-list message-receipt-panel"
|
|
11925
|
-
},
|
|
11935
|
+
}, U_ = { class: "message-receipt-list" }, W_ = { class: "message-receipt-row__body" }, G_ = { class: "message-receipt-row__name" }, K_ = { class: "message-receipt-row__time" }, q_ = {
|
|
11926
11936
|
key: 2,
|
|
11927
11937
|
class: "message-action-list message-receipt-panel"
|
|
11928
|
-
},
|
|
11938
|
+
}, J_ = { class: "message-receipt-list" }, Y_ = { class: "message-poll-voters-group__header" }, X_ = { class: "message-poll-voters-group__text" }, Z_ = { class: "message-poll-voters-group__count" }, Q_ = { class: "message-receipt-row__body" }, $_ = { class: "message-receipt-row__name" }, ev = {
|
|
11929
11939
|
key: 3,
|
|
11930
11940
|
class: "message-action-list message-receipt-panel"
|
|
11931
|
-
},
|
|
11941
|
+
}, tv = {
|
|
11932
11942
|
key: 0,
|
|
11933
11943
|
class: "message-receipt-loading"
|
|
11934
|
-
},
|
|
11944
|
+
}, nv = {
|
|
11935
11945
|
key: 1,
|
|
11936
11946
|
class: "message-receipt-list"
|
|
11937
|
-
},
|
|
11947
|
+
}, rv = { class: "message-poll-voters-group__header" }, iv = { class: "message-poll-voters-group__text" }, av = { class: "message-poll-voters-group__count" }, ov = { class: "message-receipt-row__body" }, sv = { class: "message-receipt-row__name" }, cv = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
11938
11948
|
__name: "MessageItemMenu",
|
|
11939
11949
|
props: {
|
|
11940
11950
|
message: {},
|
|
@@ -12047,18 +12057,18 @@ var qh = {
|
|
|
12047
12057
|
top: `${k.value.top}px`
|
|
12048
12058
|
}),
|
|
12049
12059
|
"data-testid": "message-action-popover-shell"
|
|
12050
|
-
}, [E.value === "actions" ? (T(), c(r, { key: 0 }, [f(
|
|
12060
|
+
}, [E.value === "actions" ? (T(), c(r, { key: 0 }, [f(M_, {
|
|
12051
12061
|
message: e.message,
|
|
12052
12062
|
"can-react": e.canReact,
|
|
12053
12063
|
onReact: n[0] ||= (e) => b("react", e)
|
|
12054
|
-
}, null, 8, ["message", "can-react"]), l("div",
|
|
12064
|
+
}, null, 8, ["message", "can-react"]), l("div", N_, [
|
|
12055
12065
|
e.receiptSummaryAction ? (T(), c("button", {
|
|
12056
12066
|
key: 0,
|
|
12057
12067
|
type: "button",
|
|
12058
12068
|
class: "message-receipt-summary",
|
|
12059
12069
|
onClick: L
|
|
12060
12070
|
}, [
|
|
12061
|
-
l("span",
|
|
12071
|
+
l("span", P_, [e.receiptSummaryAction.loading ? (T(), o(N(se), {
|
|
12062
12072
|
key: 0,
|
|
12063
12073
|
style: {
|
|
12064
12074
|
width: "1rem",
|
|
@@ -12070,8 +12080,8 @@ var qh = {
|
|
|
12070
12080
|
class: "text-success size-4",
|
|
12071
12081
|
"aria-hidden": "true"
|
|
12072
12082
|
}))]),
|
|
12073
|
-
l("span",
|
|
12074
|
-
d.value.length ? (T(), c("span",
|
|
12083
|
+
l("span", F_, M(e.receiptSummaryAction.label), 1),
|
|
12084
|
+
d.value.length ? (T(), c("span", I_, [(T(!0), c(r, null, O(d.value, (e) => (T(), o(og, {
|
|
12075
12085
|
key: e.user.uid,
|
|
12076
12086
|
image: e.user.avatar,
|
|
12077
12087
|
name: e.user.name,
|
|
@@ -12083,25 +12093,25 @@ var qh = {
|
|
|
12083
12093
|
type: "button",
|
|
12084
12094
|
class: "message-receipt-summary",
|
|
12085
12095
|
onClick: R
|
|
12086
|
-
}, [l("span",
|
|
12096
|
+
}, [l("span", L_, [f(N(Qe), {
|
|
12087
12097
|
class: "text-success size-4",
|
|
12088
12098
|
"aria-hidden": "true"
|
|
12089
|
-
})]), l("span",
|
|
12099
|
+
})]), l("span", R_, M(e.pollVotersSummaryAction.label), 1)])) : s("", !0),
|
|
12090
12100
|
e.reactionsSummaryAction ? (T(), c("button", {
|
|
12091
12101
|
key: 2,
|
|
12092
12102
|
type: "button",
|
|
12093
12103
|
class: "message-receipt-summary",
|
|
12094
12104
|
onClick: z
|
|
12095
|
-
}, [l("span",
|
|
12105
|
+
}, [l("span", z_, [f(N(ue), {
|
|
12096
12106
|
class: "text-success size-4",
|
|
12097
12107
|
"aria-hidden": "true"
|
|
12098
|
-
})]), l("span",
|
|
12099
|
-
e.receiptSummaryAction || e.pollVotersSummaryAction || e.reactionsSummaryAction ? (T(), c("div",
|
|
12108
|
+
})]), l("span", B_, M(e.reactionsSummaryAction.label), 1)])) : s("", !0),
|
|
12109
|
+
e.receiptSummaryAction || e.pollVotersSummaryAction || e.reactionsSummaryAction ? (T(), c("div", V_)) : s("", !0),
|
|
12100
12110
|
f(N(oe), {
|
|
12101
12111
|
model: e.actionItems,
|
|
12102
12112
|
class: "message-action-list__menu"
|
|
12103
12113
|
}, null, 8, ["model"])
|
|
12104
|
-
])], 64)) : E.value === "receipts" ? (T(), c("section",
|
|
12114
|
+
])], 64)) : E.value === "receipts" ? (T(), c("section", H_, [
|
|
12105
12115
|
l("button", {
|
|
12106
12116
|
type: "button",
|
|
12107
12117
|
class: "message-receipt-back",
|
|
@@ -12114,18 +12124,18 @@ var qh = {
|
|
|
12114
12124
|
class: "message-action-list__divider",
|
|
12115
12125
|
"aria-hidden": "true"
|
|
12116
12126
|
}, null, -1),
|
|
12117
|
-
l("div",
|
|
12127
|
+
l("div", U_, [(T(!0), c(r, null, O(p.value, (e) => (T(), c("div", {
|
|
12118
12128
|
key: e.user.uid,
|
|
12119
12129
|
class: "message-receipt-row"
|
|
12120
|
-
}, [f(
|
|
12130
|
+
}, [f(og, {
|
|
12121
12131
|
image: e.user.avatar,
|
|
12122
12132
|
name: e.user.name,
|
|
12123
12133
|
class: "message-receipt-row__avatar"
|
|
12124
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
12134
|
+
}, null, 8, ["image", "name"]), l("div", W_, [l("p", G_, M(e.user.name), 1), l("p", K_, [f(N(xe), {
|
|
12125
12135
|
class: "message-receipt-row__icon text-success",
|
|
12126
12136
|
"aria-hidden": "true"
|
|
12127
12137
|
}), l("span", null, M(B(e.timestamp)), 1)])])]))), 128))])
|
|
12128
|
-
])) : E.value === "pollVoters" ? (T(), c("section",
|
|
12138
|
+
])) : E.value === "pollVoters" ? (T(), c("section", q_, [
|
|
12129
12139
|
l("button", {
|
|
12130
12140
|
type: "button",
|
|
12131
12141
|
class: "message-receipt-back",
|
|
@@ -12138,18 +12148,18 @@ var qh = {
|
|
|
12138
12148
|
class: "message-action-list__divider",
|
|
12139
12149
|
"aria-hidden": "true"
|
|
12140
12150
|
}, null, -1),
|
|
12141
|
-
l("div",
|
|
12151
|
+
l("div", J_, [(T(!0), c(r, null, O(m.value, (e) => (T(), c("div", {
|
|
12142
12152
|
key: e.id,
|
|
12143
12153
|
class: "message-poll-voters-group"
|
|
12144
|
-
}, [l("div",
|
|
12154
|
+
}, [l("div", Y_, [l("span", X_, M(e.text), 1), l("span", Z_, M(N(y)("voteCount", { count: e.voteCount })), 1)]), (T(!0), c(r, null, O(e.voters, (e) => (T(), c("div", {
|
|
12145
12155
|
key: e.uid,
|
|
12146
12156
|
class: "message-receipt-row"
|
|
12147
|
-
}, [f(
|
|
12157
|
+
}, [f(og, {
|
|
12148
12158
|
image: e.avatar,
|
|
12149
12159
|
name: e.name,
|
|
12150
12160
|
class: "message-receipt-row__avatar"
|
|
12151
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
12152
|
-
])) : (T(), c("section",
|
|
12161
|
+
}, null, 8, ["image", "name"]), l("div", Q_, [l("p", $_, M(e.name), 1)])]))), 128))]))), 128))])
|
|
12162
|
+
])) : (T(), c("section", ev, [
|
|
12153
12163
|
l("button", {
|
|
12154
12164
|
type: "button",
|
|
12155
12165
|
class: "message-receipt-back",
|
|
@@ -12162,32 +12172,32 @@ var qh = {
|
|
|
12162
12172
|
class: "message-action-list__divider",
|
|
12163
12173
|
"aria-hidden": "true"
|
|
12164
12174
|
}, null, -1),
|
|
12165
|
-
e.reactionsSummaryAction?.loading && !h.value.length ? (T(), c("div",
|
|
12175
|
+
e.reactionsSummaryAction?.loading && !h.value.length ? (T(), c("div", tv, [f(N(se), {
|
|
12166
12176
|
style: {
|
|
12167
12177
|
width: "1.25rem",
|
|
12168
12178
|
height: "1.25rem"
|
|
12169
12179
|
},
|
|
12170
12180
|
"stroke-width": "5"
|
|
12171
|
-
})])) : (T(), c("div",
|
|
12181
|
+
})])) : (T(), c("div", nv, [(T(!0), c(r, null, O(g.value, (e) => (T(), c("div", {
|
|
12172
12182
|
key: e.emoji,
|
|
12173
12183
|
class: "message-poll-voters-group"
|
|
12174
|
-
}, [l("div",
|
|
12184
|
+
}, [l("div", rv, [l("span", iv, M(e.emoji), 1), l("span", av, M(e.reactedBy.length), 1)]), (T(!0), c(r, null, O(e.reactedBy, (e) => (T(), c("div", {
|
|
12175
12185
|
key: e.user.uid,
|
|
12176
12186
|
class: "message-receipt-row"
|
|
12177
|
-
}, [f(
|
|
12187
|
+
}, [f(og, {
|
|
12178
12188
|
image: e.user.avatar,
|
|
12179
12189
|
name: e.user.name,
|
|
12180
12190
|
class: "message-receipt-row__avatar"
|
|
12181
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
12191
|
+
}, null, 8, ["image", "name"]), l("div", ov, [l("p", sv, M(e.user.name), 1)])]))), 128))]))), 128))]))
|
|
12182
12192
|
]))], 4)) : s("", !0)]));
|
|
12183
12193
|
}
|
|
12184
|
-
}), [["__scopeId", "data-v-8143e7ac"]]),
|
|
12194
|
+
}), [["__scopeId", "data-v-8143e7ac"]]), lv = { class: "chat-header border-default bg-elevation-surface-default sticky top-0 z-10 flex items-center justify-between gap-3 border-b px-4 py-3 max-md:px-4 max-md:pb-3 sm:px-5 sm:py-3.5" }, uv = {
|
|
12185
12195
|
key: 0,
|
|
12186
12196
|
class: "chat-header__identity flex min-w-0 items-center gap-3"
|
|
12187
|
-
},
|
|
12197
|
+
}, dv = { class: "chat-header__text min-w-0" }, fv = { class: "chat-header__title heading-md text-default sm:heading-lg truncate" }, pv = { class: "chat-header__subtitle body-sm text-subtle sm:body-md truncate" }, mv = { key: 0 }, hv = { key: 1 }, gv = { class: "chat-header__actions flex items-center gap-2" }, _v = {
|
|
12188
12198
|
key: 0,
|
|
12189
12199
|
class: "chat-header__tags hidden flex-wrap gap-2 md:flex"
|
|
12190
|
-
},
|
|
12200
|
+
}, vv = /* @__PURE__ */ p({
|
|
12191
12201
|
__name: "MessageListHeader",
|
|
12192
12202
|
props: {
|
|
12193
12203
|
conversation: {},
|
|
@@ -12195,32 +12205,32 @@ var qh = {
|
|
|
12195
12205
|
},
|
|
12196
12206
|
setup(e) {
|
|
12197
12207
|
let { t } = Y();
|
|
12198
|
-
return (n, i) => (T(), c("header",
|
|
12208
|
+
return (n, i) => (T(), c("header", lv, [e.conversation ? (T(), c("div", uv, [f(og, {
|
|
12199
12209
|
image: e.conversation.avatar,
|
|
12200
12210
|
name: e.conversation.title,
|
|
12201
12211
|
class: "chat-header__avatar shrink-0"
|
|
12202
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
12212
|
+
}, null, 8, ["image", "name"]), l("div", dv, [l("p", fv, M(e.parentMessage ? N(t)("thread") : e.conversation.title), 1), l("p", pv, [e.parentMessage ? (T(), c("span", mv, M(e.parentMessage.senderName), 1)) : (T(), c("span", hv, [e.conversation.type === "user" ? (T(), c(r, { key: 0 }, [d(M(N(t)("directMessage")), 1)], 64)) : (T(), c(r, { key: 1 }, [d(M(e.conversation.memberCount ? N(t)("members", { count: e.conversation.memberCount }) : N(t)("groupChat")), 1)], 64))]))])])])) : s("", !0), l("div", gv, [e.conversation?.tags?.length ? (T(), c("div", _v, [(T(!0), c(r, null, O(e.conversation.tags.slice(0, 3), (e) => (T(), o(N(K), {
|
|
12203
12213
|
key: e,
|
|
12204
12214
|
text: e,
|
|
12205
12215
|
context: "secondary",
|
|
12206
12216
|
rounded: ""
|
|
12207
12217
|
}, null, 8, ["text"]))), 128))])) : s("", !0)])]));
|
|
12208
12218
|
}
|
|
12209
|
-
}),
|
|
12219
|
+
}), yv = {
|
|
12210
12220
|
key: 0,
|
|
12211
12221
|
class: "pinned-bar",
|
|
12212
12222
|
"data-testid": "pinned-messages-bar"
|
|
12213
|
-
},
|
|
12223
|
+
}, bv = ["title"], xv = { class: "pinned-bar__text min-w-0" }, Sv = { class: "pinned-bar__headline body-sm text-subtle block truncate font-semibold" }, Cv = { class: "pinned-bar__preview body-md text-default block truncate" }, wv = { class: "pinned-bar__sender font-medium" }, Tv = { class: "pinned-bar__actions flex shrink-0 items-center gap-1" }, Ev = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
12214
12224
|
__name: "PinnedMessagesBar",
|
|
12215
12225
|
setup(e) {
|
|
12216
|
-
let { t } = Y(), n =
|
|
12226
|
+
let { t } = Y(), n = _p(), r = Sp(), i = zp(), u = a(() => r.pinnedMessages.value), d = a(() => u.value[0] ?? null), p = a(() => u.value.length > 1), m = a(() => p.value ? t("pinnedMessagesCount", { count: u.value.length }) : t("pinnedMessage")), h = a(() => d.value ? ol(d.value, t("attachment"), n.mentionNameByUid.value) : "");
|
|
12217
12227
|
function g() {
|
|
12218
12228
|
d.value && i.emit("message:openReference", d.value.id);
|
|
12219
12229
|
}
|
|
12220
12230
|
function _() {
|
|
12221
12231
|
d.value && i.emit("message:unpin", d.value.id);
|
|
12222
12232
|
}
|
|
12223
|
-
return (e, r) => d.value ? (T(), c("div",
|
|
12233
|
+
return (e, r) => d.value ? (T(), c("div", yv, [l("button", {
|
|
12224
12234
|
type: "button",
|
|
12225
12235
|
class: "pinned-bar__summary",
|
|
12226
12236
|
title: N(t)("goToMessage"),
|
|
@@ -12228,11 +12238,11 @@ var qh = {
|
|
|
12228
12238
|
}, [f(N(Ae), {
|
|
12229
12239
|
class: "pinned-bar__icon size-4 shrink-0",
|
|
12230
12240
|
"aria-hidden": "true"
|
|
12231
|
-
}), l("span",
|
|
12232
|
-
l("span",
|
|
12241
|
+
}), l("span", xv, [l("span", Sv, M(m.value), 1), l("span", Cv, [
|
|
12242
|
+
l("span", wv, M(d.value.senderName), 1),
|
|
12233
12243
|
r[1] ||= l("span", { "aria-hidden": "true" }, ": ", -1),
|
|
12234
12244
|
l("span", null, M(h.value), 1)
|
|
12235
|
-
])])], 8,
|
|
12245
|
+
])])], 8, bv), l("div", Tv, [p.value ? (T(), o(N(H), {
|
|
12236
12246
|
key: 0,
|
|
12237
12247
|
icon: N(Ie),
|
|
12238
12248
|
"aria-label": N(t)("pinnedMessages"),
|
|
@@ -12260,16 +12270,16 @@ var qh = {
|
|
|
12260
12270
|
"title"
|
|
12261
12271
|
])) : s("", !0)])])) : s("", !0);
|
|
12262
12272
|
}
|
|
12263
|
-
}), [["__scopeId", "data-v-ed2c3c4c"]]),
|
|
12273
|
+
}), [["__scopeId", "data-v-ed2c3c4c"]]), Dv = {
|
|
12264
12274
|
key: 2,
|
|
12265
12275
|
class: "message-list__empty-state"
|
|
12266
|
-
},
|
|
12276
|
+
}, Ov = { class: "space-y-2" }, kv = {
|
|
12267
12277
|
key: 0,
|
|
12268
12278
|
class: "message-list__thread-root"
|
|
12269
|
-
},
|
|
12279
|
+
}, Av = { class: "body-sm text-subtlest truncate font-semibold uppercase" }, jv = { class: "body-md text-default mt-1 line-clamp-2" }, Mv = {
|
|
12270
12280
|
key: 1,
|
|
12271
12281
|
class: "surface-default text-subtle rounded-2xl p-5 text-center"
|
|
12272
|
-
},
|
|
12282
|
+
}, Nv = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
12273
12283
|
__name: "MessageList",
|
|
12274
12284
|
props: {
|
|
12275
12285
|
target: {},
|
|
@@ -12280,13 +12290,13 @@ var qh = {
|
|
|
12280
12290
|
},
|
|
12281
12291
|
emits: ["anchorclick"],
|
|
12282
12292
|
setup(e) {
|
|
12283
|
-
let t = e, { t: n } = Y(), i =
|
|
12293
|
+
let t = e, { t: n } = Y(), i = _p(), u = Pp(), d = Sp(), p = zp(), m = a(() => t.target === "thread"), h = a(() => m.value ? d.threadMessages.value : t.hideGroupActions ? d.messages.value.filter((e) => e.kind !== "action") : d.messages.value), g = a(() => m.value ? d.loadingThreadMessages.value : d.loadingMessages.value), _ = a(() => m.value ? d.activeThreadParentMessage.value : null), v = a(() => !m.value && i.canOpenThread.value), b = a(() => !i.client.value?.offlineMode.value && (m.value ? d.hasOlderThreadMessages.value : d.hasOlderMessages.value)), x = a(() => m.value ? d.loadingOlderThreadMessages.value : d.loadingOlderMessages.value), S = a(() => !m.value && d.pinnedMessages.value.length > 0), C = a(() => m.value ? !0 : d.showDefaultEmptyState.value), w = a(() => {
|
|
12284
12294
|
let e = i.conversation.value;
|
|
12285
12295
|
return e ? _.value ? n("thread") : e.title : "";
|
|
12286
12296
|
}), E = a(() => {
|
|
12287
12297
|
let e = i.conversation.value;
|
|
12288
12298
|
return e ? _.value ? _.value.senderName : e.memberCount ? n("members", { count: e.memberCount }) : n("groupChat") : "";
|
|
12289
|
-
}), A = a(() => i.conversation.value?.memberCount ?? 0), j = D(null), ee = D(null), P = D(null), I = a(() => !!_.value), L = a(() => I.value && !t.showHeader), R = a(() =>
|
|
12299
|
+
}), A = a(() => i.conversation.value?.memberCount ?? 0), j = D(null), ee = D(null), P = D(null), I = a(() => !!_.value), L = a(() => I.value && !t.showHeader), R = a(() => pp(i.conversation.value)), z = F("threadRef"), { handleThreadScroll: te } = Th({
|
|
12290
12300
|
getConversation: () => i.conversation.value,
|
|
12291
12301
|
getParentMessage: () => _.value,
|
|
12292
12302
|
getMessages: () => h.value,
|
|
@@ -12296,7 +12306,7 @@ var qh = {
|
|
|
12296
12306
|
onLoadOlder: () => p.emit("list:loadOlder", { target: t.target }),
|
|
12297
12307
|
onAtBottom: () => p.emit("list:atBottom", { target: t.target }),
|
|
12298
12308
|
threadRef: z
|
|
12299
|
-
}), B = F("actionMenuRef"), { activeActionMessage: V, handleMessageContextMenu: ne, handleMessageTap: H, resetActionMenuState: re, reactToMessage: U, toggleInlineReaction: W, getReceiptSummaryAction: ie, getPollVotersSummaryAction: ae, loadReactionDetails: oe, getReactionsSummaryAction: G, getActionItems: se, isTouchUI: K } =
|
|
12309
|
+
}), B = F("actionMenuRef"), { activeActionMessage: V, handleMessageContextMenu: ne, handleMessageTap: H, resetActionMenuState: re, reactToMessage: U, toggleInlineReaction: W, getReceiptSummaryAction: ie, getPollVotersSummaryAction: ae, loadReactionDetails: oe, getReactionsSummaryAction: G, getActionItems: se, isTouchUI: K } = yh({
|
|
12300
12310
|
canUseMessageActions: () => i.canUseMessageActions.value,
|
|
12301
12311
|
canReact: () => i.canReact.value,
|
|
12302
12312
|
canReply: () => i.canReply.value,
|
|
@@ -12382,11 +12392,11 @@ var qh = {
|
|
|
12382
12392
|
title: w.value,
|
|
12383
12393
|
subtitle: E.value,
|
|
12384
12394
|
memberCount: A.value
|
|
12385
|
-
}, () => [f(
|
|
12395
|
+
}, () => [f(vv, {
|
|
12386
12396
|
conversation: N(i).conversation.value,
|
|
12387
12397
|
"parent-message": _.value
|
|
12388
12398
|
}, null, 8, ["conversation", "parent-message"])], !0, 0) : s("", !0),
|
|
12389
|
-
S.value ? (T(), o(
|
|
12399
|
+
S.value ? (T(), o(Ev, { key: 1 })) : s("", !0),
|
|
12390
12400
|
N(i).conversation.value ? (T(), c("div", {
|
|
12391
12401
|
key: 3,
|
|
12392
12402
|
class: y(["message-list__body", L.value || I.value ? "bg-elevation-surface-overlay" : ""])
|
|
@@ -12396,12 +12406,12 @@ var qh = {
|
|
|
12396
12406
|
ref: z,
|
|
12397
12407
|
class: y(["message-list__scroll min-h-0 flex-1", L.value ? "p-0" : I.value ? "px-5 py-4" : "px-2 pt-2 pb-3"]),
|
|
12398
12408
|
onScroll: u[2] ||= (...e) => N(te) && N(te)(...e)
|
|
12399
|
-
}, [l("div",
|
|
12400
|
-
_.value ? (T(), c("div",
|
|
12401
|
-
(T(!0), c(r, null, O(h.value, (e, n) => (T(), c(r, { key: e.id }, [me(n) ? (T(), o(
|
|
12409
|
+
}, [l("div", Ov, [
|
|
12410
|
+
_.value ? (T(), c("div", kv, [l("p", Av, M(_.value.senderName), 1), l("p", jv, M(N(ol)(_.value, N(n)("message"), N(i).mentionNameByUid.value)), 1)])) : s("", !0),
|
|
12411
|
+
(T(!0), c(r, null, O(h.value, (e, n) => (T(), c(r, { key: e.id }, [me(n) ? (T(), o(ig, {
|
|
12402
12412
|
key: 0,
|
|
12403
12413
|
date: e.sentAt
|
|
12404
|
-
}, null, 8, ["date"])) : s("", !0), f(
|
|
12414
|
+
}, null, 8, ["date"])) : s("", !0), f(E_, {
|
|
12405
12415
|
message: e,
|
|
12406
12416
|
"current-user-id": N(i).currentUserId.value,
|
|
12407
12417
|
"can-react": N(i).canReact.value,
|
|
@@ -12439,20 +12449,20 @@ var qh = {
|
|
|
12439
12449
|
"onToggleReaction",
|
|
12440
12450
|
"onOpenThread"
|
|
12441
12451
|
])], 64))), 128)),
|
|
12442
|
-
h.value.length === 0 && C.value && !g.value ? (T(), c("div",
|
|
12452
|
+
h.value.length === 0 && C.value && !g.value ? (T(), c("div", Mv, M(N(n)("noMessagesYetInThisGroup")), 1)) : s("", !0)
|
|
12443
12453
|
])], 34),
|
|
12444
|
-
f(
|
|
12454
|
+
f(tg, {
|
|
12445
12455
|
attachment: ee.value,
|
|
12446
12456
|
onClose: ue
|
|
12447
12457
|
}, null, 8, ["attachment"]),
|
|
12448
12458
|
l("footer", { class: y(["message-list__composer flex shrink-0 flex-col", I.value ? L.value ? "bg-transparent p-0" : "message-list__composer--thread" : "bg-transparent p-0"]) }, [k(a.$slots, "composer", {}, void 0, !0)], 2)
|
|
12449
|
-
], 2)) : (T(), c("div",
|
|
12459
|
+
], 2)) : (T(), c("div", Dv, M(N(n)("selectConversationToStart")), 1))
|
|
12450
12460
|
], 2),
|
|
12451
|
-
f(
|
|
12461
|
+
f(Kh, {
|
|
12452
12462
|
attachment: j.value,
|
|
12453
12463
|
onClose: le
|
|
12454
12464
|
}, null, 8, ["attachment"]),
|
|
12455
|
-
f(
|
|
12465
|
+
f(cv, {
|
|
12456
12466
|
ref_key: "actionMenuRef",
|
|
12457
12467
|
ref: B,
|
|
12458
12468
|
message: N(V),
|
|
@@ -12475,13 +12485,13 @@ var qh = {
|
|
|
12475
12485
|
])
|
|
12476
12486
|
], 64));
|
|
12477
12487
|
}
|
|
12478
|
-
}), [["__scopeId", "data-v-faddbe05"]]),
|
|
12488
|
+
}), [["__scopeId", "data-v-faddbe05"]]), Pv = {
|
|
12479
12489
|
key: 0,
|
|
12480
12490
|
class: "flex h-full min-h-64 items-center justify-center"
|
|
12481
|
-
},
|
|
12491
|
+
}, Fv = { class: "mb-3" }, Iv = { class: "border-default max-h-full flex-1 space-y-1 overflow-y-auto rounded-xl border" }, Lv = ["onClick"], Rv = { class: "flex items-center gap-3" }, zv = { class: "heading-sm text-default truncate" }, Bv = {
|
|
12482
12492
|
key: 0,
|
|
12483
12493
|
class: "conversation-list__empty border-default bg-elevation-surface-sunken-default body-md text-subtle rounded-xl border p-5 text-center"
|
|
12484
|
-
},
|
|
12494
|
+
}, Vv = /* @__PURE__ */ p({
|
|
12485
12495
|
__name: "ForwardMessageDialog",
|
|
12486
12496
|
props: {
|
|
12487
12497
|
open: { type: Boolean },
|
|
@@ -12504,33 +12514,33 @@ var qh = {
|
|
|
12504
12514
|
type: e.type
|
|
12505
12515
|
});
|
|
12506
12516
|
}
|
|
12507
|
-
return (t, n) => (T(), o(
|
|
12517
|
+
return (t, n) => (T(), o(Fh, {
|
|
12508
12518
|
open: e.open,
|
|
12509
12519
|
title: N(u)("forwardMessage"),
|
|
12510
12520
|
"close-label": N(u)("close"),
|
|
12511
12521
|
onClose: n[1] ||= (e) => i("close")
|
|
12512
12522
|
}, {
|
|
12513
|
-
default: z(() => [e.sending ? (T(), c("div",
|
|
12523
|
+
default: z(() => [e.sending ? (T(), c("div", Pv, [f(N(se), {
|
|
12514
12524
|
style: {
|
|
12515
12525
|
width: "2.75rem",
|
|
12516
12526
|
height: "2.75rem"
|
|
12517
12527
|
},
|
|
12518
12528
|
"stroke-width": "6"
|
|
12519
|
-
})])) : (T(), c(r, { key: 1 }, [l("div",
|
|
12529
|
+
})])) : (T(), c(r, { key: 1 }, [l("div", Fv, [f(N(ae), {
|
|
12520
12530
|
"model-value": d.value,
|
|
12521
12531
|
placeholder: N(u)("searchByGroupName"),
|
|
12522
12532
|
class: "w-full",
|
|
12523
12533
|
"onUpdate:modelValue": n[0] ||= (e) => d.value = String(e)
|
|
12524
|
-
}, null, 8, ["model-value", "placeholder"])]), l("section",
|
|
12534
|
+
}, null, 8, ["model-value", "placeholder"])]), l("section", Iv, [(T(!0), c(r, null, O(p.value, (e) => (T(), c("button", {
|
|
12525
12535
|
key: e.id,
|
|
12526
12536
|
type: "button",
|
|
12527
12537
|
class: "hover:bg-elevation-surface-hovered w-full rounded-xl border border-transparent px-4 py-3 text-left transition-colors",
|
|
12528
12538
|
onClick: (t) => m(e)
|
|
12529
|
-
}, [l("div",
|
|
12539
|
+
}, [l("div", Rv, [f(og, {
|
|
12530
12540
|
image: e.avatar,
|
|
12531
12541
|
name: e.title,
|
|
12532
12542
|
class: "shrink-0"
|
|
12533
|
-
}, null, 8, ["image", "name"]), l("p",
|
|
12543
|
+
}, null, 8, ["image", "name"]), l("p", zv, M(e.title), 1)])], 8, Lv))), 128)), p.value.length === 0 ? (T(), c("div", Bv, M(N(u)("noMatchingChatsFound")), 1)) : s("", !0)])], 64))]),
|
|
12534
12544
|
_: 1
|
|
12535
12545
|
}, 8, [
|
|
12536
12546
|
"open",
|
|
@@ -12538,13 +12548,13 @@ var qh = {
|
|
|
12538
12548
|
"close-label"
|
|
12539
12549
|
]));
|
|
12540
12550
|
}
|
|
12541
|
-
}),
|
|
12551
|
+
}), Hv = { class: "receipt-section" }, Uv = {
|
|
12542
12552
|
key: 0,
|
|
12543
12553
|
class: "receipt-section__header"
|
|
12544
|
-
},
|
|
12554
|
+
}, Wv = { class: "body-sm text-subtle font-semibold" }, Gv = { class: "body-sm text-subtlest" }, Kv = {
|
|
12545
12555
|
key: 1,
|
|
12546
12556
|
class: "receipt-section__list"
|
|
12547
|
-
},
|
|
12557
|
+
}, qv = { class: "receipt-section__identity" }, Jv = { class: "min-w-0" }, Yv = { class: "receipt-section__name heading-sm text-default truncate" }, Xv = { class: "receipt-section__time body-md text-subtle" }, Zv = { class: "truncate" }, Qv = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
12548
12558
|
__name: "ReceiptSection",
|
|
12549
12559
|
props: {
|
|
12550
12560
|
title: {},
|
|
@@ -12557,34 +12567,34 @@ var qh = {
|
|
|
12557
12567
|
},
|
|
12558
12568
|
setup(e) {
|
|
12559
12569
|
let t = e, n = a(() => String(t.receipts.length));
|
|
12560
|
-
return (t, i) => (T(), c("section",
|
|
12570
|
+
return (t, i) => (T(), c("section", Hv, [e.showHeader ? (T(), c("div", Uv, [l("p", Wv, M(e.title), 1), l("span", Gv, M(n.value), 1)])) : s("", !0), e.receipts.length ? (T(), c("div", Kv, [(T(!0), c(r, null, O(e.receipts, (t) => (T(), c("div", {
|
|
12561
12571
|
key: `${t.kind}-${t.user.uid}`,
|
|
12562
12572
|
class: "receipt-section__row"
|
|
12563
|
-
}, [l("div",
|
|
12573
|
+
}, [l("div", qv, [f(og, {
|
|
12564
12574
|
image: t.user.avatar,
|
|
12565
12575
|
name: t.user.name,
|
|
12566
12576
|
class: "receipt-section__avatar"
|
|
12567
|
-
}, null, 8, ["image", "name"]), l("div",
|
|
12577
|
+
}, null, 8, ["image", "name"]), l("div", Jv, [l("p", Yv, M(t.user.name), 1), l("p", Xv, [f(N(xe), {
|
|
12568
12578
|
class: "receipt-section__icon text-success",
|
|
12569
12579
|
"aria-hidden": "true"
|
|
12570
|
-
}), l("span",
|
|
12580
|
+
}), l("span", Zv, M(e.formatDateTime(t.timestamp)), 1)])])])]))), 128))])) : s("", !0)]));
|
|
12571
12581
|
}
|
|
12572
|
-
}), [["__scopeId", "data-v-376a2c51"]]),
|
|
12582
|
+
}), [["__scopeId", "data-v-376a2c51"]]), $v = {
|
|
12573
12583
|
key: 0,
|
|
12574
12584
|
class: "message-info-dialog-content overflow-y-auto"
|
|
12575
|
-
},
|
|
12585
|
+
}, ey = {
|
|
12576
12586
|
key: 0,
|
|
12577
12587
|
class: "flex items-center justify-center px-4 py-8 sm:px-6"
|
|
12578
|
-
},
|
|
12588
|
+
}, ty = {
|
|
12579
12589
|
key: 1,
|
|
12580
12590
|
class: "message-info-error body-md mx-4 rounded-xl px-4 py-3 sm:mx-6"
|
|
12581
|
-
},
|
|
12591
|
+
}, ny = {
|
|
12582
12592
|
key: 2,
|
|
12583
12593
|
class: "message-info-list"
|
|
12584
|
-
},
|
|
12594
|
+
}, ry = {
|
|
12585
12595
|
key: 1,
|
|
12586
12596
|
class: "message-info-empty body-md text-subtle"
|
|
12587
|
-
},
|
|
12597
|
+
}, iy = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
12588
12598
|
__name: "MessageInfoDialog",
|
|
12589
12599
|
props: {
|
|
12590
12600
|
open: { type: Boolean },
|
|
@@ -12609,25 +12619,25 @@ var qh = {
|
|
|
12609
12619
|
return (t.timestamp?.getTime() ?? 0) - n;
|
|
12610
12620
|
});
|
|
12611
12621
|
}
|
|
12612
|
-
return (t, n) => (T(), o(
|
|
12622
|
+
return (t, n) => (T(), o(Fh, {
|
|
12613
12623
|
open: e.open,
|
|
12614
12624
|
title: N(l)("seen"),
|
|
12615
12625
|
"close-label": N(l)("close"),
|
|
12616
12626
|
onClose: n[0] ||= (e) => r("close")
|
|
12617
12627
|
}, {
|
|
12618
|
-
default: z(() => [e.message ? (T(), c("div",
|
|
12628
|
+
default: z(() => [e.message ? (T(), c("div", $v, [e.loading ? (T(), c("div", ey, [f(N(se), {
|
|
12619
12629
|
style: {
|
|
12620
12630
|
width: "2.5rem",
|
|
12621
12631
|
height: "2.5rem"
|
|
12622
12632
|
},
|
|
12623
12633
|
"stroke-width": "5"
|
|
12624
|
-
})])) : e.error ? (T(), c("div",
|
|
12634
|
+
})])) : e.error ? (T(), c("div", ty, M(e.error), 1)) : (T(), c("div", ny, [u.value.length ? (T(), o(Qv, {
|
|
12625
12635
|
key: 0,
|
|
12626
12636
|
title: N(l)("readBy"),
|
|
12627
12637
|
receipts: u.value,
|
|
12628
12638
|
"format-date-time": d,
|
|
12629
12639
|
"show-header": !1
|
|
12630
|
-
}, null, 8, ["title", "receipts"])) : (T(), c("p",
|
|
12640
|
+
}, null, 8, ["title", "receipts"])) : (T(), c("p", ry, M(N(l)("nobodyHasReadThisMessageYet")), 1))]))])) : s("", !0)]),
|
|
12631
12641
|
_: 1
|
|
12632
12642
|
}, 8, [
|
|
12633
12643
|
"open",
|
|
@@ -12635,13 +12645,13 @@ var qh = {
|
|
|
12635
12645
|
"close-label"
|
|
12636
12646
|
]));
|
|
12637
12647
|
}
|
|
12638
|
-
}), [["__scopeId", "data-v-ed86e885"]]),
|
|
12648
|
+
}), [["__scopeId", "data-v-ed86e885"]]), ay = { class: "min-h-0 flex-1 overflow-y-auto" }, oy = {
|
|
12639
12649
|
key: 0,
|
|
12640
12650
|
class: "bg-elevation-surface-sunken-default body-md flex h-full min-h-40 items-center justify-center rounded-xl px-6 text-center"
|
|
12641
|
-
},
|
|
12651
|
+
}, sy = {
|
|
12642
12652
|
key: 1,
|
|
12643
12653
|
class: "space-y-3"
|
|
12644
|
-
},
|
|
12654
|
+
}, cy = { class: "space-y-1" }, ly = { class: "flex items-center justify-between gap-2" }, uy = { class: "heading-sm text-default truncate" }, dy = { class: "body-md text-default wrap-break-word whitespace-pre-wrap" }, fy = { class: "body-sm text-subtlest" }, py = { class: "mt-3 flex flex-wrap items-center gap-1" }, my = /* @__PURE__ */ p({
|
|
12645
12655
|
__name: "PinnedMessagesDialog",
|
|
12646
12656
|
props: {
|
|
12647
12657
|
open: { type: Boolean },
|
|
@@ -12675,19 +12685,19 @@ var qh = {
|
|
|
12675
12685
|
function h(e) {
|
|
12676
12686
|
i("jump", e.id), i("close");
|
|
12677
12687
|
}
|
|
12678
|
-
return (t, n) => (T(), o(
|
|
12688
|
+
return (t, n) => (T(), o(Fh, {
|
|
12679
12689
|
open: e.open,
|
|
12680
12690
|
title: N(u)("pinnedMessages"),
|
|
12681
12691
|
subtitle: e.conversationTitle ?? "",
|
|
12682
12692
|
"close-label": N(u)("close"),
|
|
12683
12693
|
onClose: n[0] ||= (e) => i("close")
|
|
12684
12694
|
}, {
|
|
12685
|
-
default: z(() => [l("div",
|
|
12695
|
+
default: z(() => [l("div", ay, [e.messages.length === 0 ? (T(), c("div", oy, M(N(u)("noPinnedMessages")), 1)) : (T(), c("div", sy, [(T(!0), c(r, null, O(e.messages, (t) => (T(), c("article", {
|
|
12686
12696
|
key: t.id,
|
|
12687
12697
|
class: "border-default rounded-lg border px-4 py-3",
|
|
12688
12698
|
"data-testid": "pinned-message-row"
|
|
12689
|
-
}, [l("div",
|
|
12690
|
-
l("div",
|
|
12699
|
+
}, [l("div", cy, [
|
|
12700
|
+
l("div", ly, [l("p", uy, M(t.senderName), 1), N(Mt)(t) ? (T(), o(N(K), {
|
|
12691
12701
|
key: 0,
|
|
12692
12702
|
text: N(u)("pinnedLabel"),
|
|
12693
12703
|
context: "info",
|
|
@@ -12695,9 +12705,9 @@ var qh = {
|
|
|
12695
12705
|
size: "sm",
|
|
12696
12706
|
class: "shrink-0"
|
|
12697
12707
|
}, null, 8, ["text"])) : s("", !0)]),
|
|
12698
|
-
l("p",
|
|
12699
|
-
l("p",
|
|
12700
|
-
]), l("div",
|
|
12708
|
+
l("p", dy, M(p(t)), 1),
|
|
12709
|
+
l("p", fy, M(m(t)) + " · " + M(d(t.pinnedAt)), 1)
|
|
12710
|
+
]), l("div", py, [f(N(H), {
|
|
12701
12711
|
label: N(u)("goToMessage"),
|
|
12702
12712
|
icon: N(We),
|
|
12703
12713
|
severity: "secondary",
|
|
@@ -12727,34 +12737,34 @@ var qh = {
|
|
|
12727
12737
|
"close-label"
|
|
12728
12738
|
]));
|
|
12729
12739
|
}
|
|
12730
|
-
}),
|
|
12740
|
+
}), hy = { class: "min-h-0 flex-1 overflow-y-auto" }, gy = {
|
|
12731
12741
|
key: 0,
|
|
12732
12742
|
class: "flex h-full min-h-64 items-center justify-center"
|
|
12733
|
-
},
|
|
12743
|
+
}, _y = {
|
|
12734
12744
|
key: 1,
|
|
12735
12745
|
class: "bg-elevation-surface-sunken-default body-md flex h-full min-h-64 items-center justify-center rounded-xl px-6 text-center"
|
|
12736
|
-
},
|
|
12746
|
+
}, vy = {
|
|
12737
12747
|
key: 2,
|
|
12738
12748
|
class: "space-y-3"
|
|
12739
|
-
},
|
|
12749
|
+
}, yy = { class: "flex flex-wrap items-start justify-between gap-3" }, by = { class: "w-full space-y-2" }, xy = { class: "center between gap-2" }, Sy = { class: "" }, Cy = { class: "space-y-1" }, wy = { class: "heading-sm text-default" }, Ty = {
|
|
12740
12750
|
key: 0,
|
|
12741
12751
|
class: "body-md text-default"
|
|
12742
|
-
},
|
|
12752
|
+
}, Ey = {
|
|
12743
12753
|
key: 1,
|
|
12744
12754
|
class: "body-md text-default wrap-break-word whitespace-pre-wrap"
|
|
12745
|
-
},
|
|
12755
|
+
}, Dy = {
|
|
12746
12756
|
key: 0,
|
|
12747
12757
|
class: "max-w-sm"
|
|
12748
|
-
},
|
|
12758
|
+
}, Oy = { class: "flex flex-wrap items-center gap-1" }, ky = {
|
|
12749
12759
|
key: 0,
|
|
12750
12760
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3 sm:flex-row sm:items-center"
|
|
12751
|
-
},
|
|
12761
|
+
}, Ay = { class: "grid w-full grid-cols-1 gap-2 sm:grid-cols-[1fr_8rem]" }, jy = { class: "flex items-center gap-2" }, My = {
|
|
12752
12762
|
key: 1,
|
|
12753
12763
|
class: "bg-elevation-surface-sunken-default mt-4 flex flex-col gap-3 rounded-xl p-3"
|
|
12754
|
-
},
|
|
12764
|
+
}, Ny = {
|
|
12755
12765
|
key: 0,
|
|
12756
12766
|
class: "relative max-w-sm"
|
|
12757
|
-
},
|
|
12767
|
+
}, Py = { class: "absolute top-2 right-2" }, Fy = ["placeholder"], Iy = { class: "flex items-center justify-end gap-2" }, Ly = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
12758
12768
|
__name: "ScheduledMessagesDialog",
|
|
12759
12769
|
props: {
|
|
12760
12770
|
open: { type: Boolean },
|
|
@@ -12836,24 +12846,24 @@ var qh = {
|
|
|
12836
12846
|
function B(e) {
|
|
12837
12847
|
u.value === e.id && A(), i("remove", e);
|
|
12838
12848
|
}
|
|
12839
|
-
return (t, n) => (T(), o(
|
|
12849
|
+
return (t, n) => (T(), o(Fh, {
|
|
12840
12850
|
open: e.open,
|
|
12841
12851
|
title: N(v)("scheduledMessages"),
|
|
12842
12852
|
subtitle: e.conversationTitle ? N(v)("queuedForConversation", { title: e.conversationTitle }) : N(v)("queuedOutgoingMessagesForThisChat"),
|
|
12843
12853
|
"close-label": N(v)("close"),
|
|
12844
12854
|
onClose: n[3] ||= (e) => i("close")
|
|
12845
12855
|
}, {
|
|
12846
|
-
default: z(() => [l("div",
|
|
12856
|
+
default: z(() => [l("div", hy, [e.loading ? (T(), c("div", gy, [f(N(se), {
|
|
12847
12857
|
style: {
|
|
12848
12858
|
width: "2.75rem",
|
|
12849
12859
|
height: "2.75rem"
|
|
12850
12860
|
},
|
|
12851
12861
|
"stroke-width": "6"
|
|
12852
|
-
})])) : y.value.length === 0 ? (T(), c("div",
|
|
12862
|
+
})])) : y.value.length === 0 ? (T(), c("div", _y, M(N(v)("noScheduledMessagesForConversation")), 1)) : (T(), c("div", vy, [(T(!0), c(r, null, O(y.value, (e) => (T(), c("article", {
|
|
12853
12863
|
key: e.id,
|
|
12854
12864
|
class: "border-default rounded-lg border px-4 py-3"
|
|
12855
|
-
}, [l("div",
|
|
12856
|
-
l("div",
|
|
12865
|
+
}, [l("div", yy, [l("div", by, [
|
|
12866
|
+
l("div", xy, [l("div", Sy, [e.kind === "poll" ? (T(), o(N(K), {
|
|
12857
12867
|
key: 0,
|
|
12858
12868
|
text: N(v)("poll"),
|
|
12859
12869
|
context: "info",
|
|
@@ -12874,9 +12884,9 @@ var qh = {
|
|
|
12874
12884
|
size: "small",
|
|
12875
12885
|
onClick: (t) => B(e)
|
|
12876
12886
|
}, null, 8, ["icon", "onClick"])]),
|
|
12877
|
-
l("div",
|
|
12878
|
-
P(e) && (u.value !== e.id || d.value !== "text") ? (T(), c("div",
|
|
12879
|
-
]), l("div",
|
|
12887
|
+
l("div", Cy, [l("p", wy, M(x(e.scheduled?.scheduleDate)), 1), e.kind === "poll" && e.poll ? (T(), c("p", Ty, M(e.poll.question), 1)) : (T(), c("p", Ey, M(N(ol)(e, N(v)("attachment"))), 1))]),
|
|
12888
|
+
P(e) && (u.value !== e.id || d.value !== "text") ? (T(), c("div", Dy, [f(Wg, { message: j(e) }, null, 8, ["message"])])) : s("", !0)
|
|
12889
|
+
]), l("div", Oy, [e.kind === "poll" ? s("", !0) : (T(), o(N(H), {
|
|
12880
12890
|
key: 0,
|
|
12881
12891
|
label: N(v)("edit"),
|
|
12882
12892
|
icon: N(we),
|
|
@@ -12898,7 +12908,7 @@ var qh = {
|
|
|
12898
12908
|
"label",
|
|
12899
12909
|
"icon",
|
|
12900
12910
|
"onClick"
|
|
12901
|
-
])) : s("", !0)])]), u.value === e.id && d.value === "reschedule" ? (T(), c("div",
|
|
12911
|
+
])) : s("", !0)])]), u.value === e.id && d.value === "reschedule" ? (T(), c("div", ky, [l("div", Ay, [te(l("input", {
|
|
12902
12912
|
"onUpdate:modelValue": n[0] ||= (e) => m.value = e,
|
|
12903
12913
|
type: "date",
|
|
12904
12914
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
@@ -12910,7 +12920,7 @@ var qh = {
|
|
|
12910
12920
|
pattern: "^([01]\\d|2[0-3]):([0-5]\\d)$",
|
|
12911
12921
|
"aria-label": "Time (24-hour)",
|
|
12912
12922
|
class: "surface-input body-md w-full rounded-xl p-2 ring-0 outline-none"
|
|
12913
|
-
}, null, 512), [[I, h.value]])]), l("div",
|
|
12923
|
+
}, null, 512), [[I, h.value]])]), l("div", jy, [f(N(H), {
|
|
12914
12924
|
label: N(v)("save"),
|
|
12915
12925
|
size: "small",
|
|
12916
12926
|
disabled: !m.value || !b.value,
|
|
@@ -12924,8 +12934,8 @@ var qh = {
|
|
|
12924
12934
|
size: "small",
|
|
12925
12935
|
text: "",
|
|
12926
12936
|
onClick: A
|
|
12927
|
-
}, null, 8, ["label"])])])) : u.value === e.id && d.value === "text" ? (T(), c("div",
|
|
12928
|
-
P(e) ? (T(), c("div",
|
|
12937
|
+
}, null, 8, ["label"])])])) : u.value === e.id && d.value === "text" ? (T(), c("div", My, [
|
|
12938
|
+
P(e) ? (T(), c("div", Ny, [f(Wg, { message: j(e) }, null, 8, ["message"]), l("div", Py, [f(N(H), {
|
|
12929
12939
|
icon: N(ge),
|
|
12930
12940
|
"aria-label": N(v)("remove"),
|
|
12931
12941
|
text: "",
|
|
@@ -12939,8 +12949,8 @@ var qh = {
|
|
|
12939
12949
|
rows: "3",
|
|
12940
12950
|
class: "surface-input body-md w-full rounded-xl px-3 py-2 ring-0 outline-none",
|
|
12941
12951
|
placeholder: N(v)("writeMessage")
|
|
12942
|
-
}, null, 8,
|
|
12943
|
-
l("div",
|
|
12952
|
+
}, null, 8, Fy), [[I, g.value]]),
|
|
12953
|
+
l("div", Iy, [f(N(H), {
|
|
12944
12954
|
label: N(v)("cancel"),
|
|
12945
12955
|
size: "small",
|
|
12946
12956
|
text: "",
|
|
@@ -12964,7 +12974,7 @@ var qh = {
|
|
|
12964
12974
|
"close-label"
|
|
12965
12975
|
]));
|
|
12966
12976
|
}
|
|
12967
|
-
}), [["__scopeId", "data-v-fc06094b"]]),
|
|
12977
|
+
}), [["__scopeId", "data-v-fc06094b"]]), Ry = { class: "chat-status-overlay" }, zy = { class: "chat-status-overlay__card" }, By = /*#__PURE__*/ om(/* @__PURE__ */ p({
|
|
12968
12978
|
__name: "ChatStatusOverlay",
|
|
12969
12979
|
props: {
|
|
12970
12980
|
visible: { type: Boolean },
|
|
@@ -12996,9 +13006,9 @@ var qh = {
|
|
|
12996
13006
|
message: t.messages.connecting,
|
|
12997
13007
|
slotName: "connecting"
|
|
12998
13008
|
} : null);
|
|
12999
|
-
return (e, t) => n.value ? k(e.$slots, n.value.slotName, {}, () => [l("div",
|
|
13009
|
+
return (e, t) => n.value ? k(e.$slots, n.value.slotName, {}, () => [l("div", Ry, [l("div", zy, [k(e.$slots, `${n.value.slotName}-content`, {}, () => [l("span", null, M(n.value.message), 1)], !0)])])], !0, 0) : s("", !0);
|
|
13000
13010
|
}
|
|
13001
|
-
}), [["__scopeId", "data-v-8dc85e79"]]),
|
|
13011
|
+
}), [["__scopeId", "data-v-8dc85e79"]]), Vy = 2e4, Hy = /* @__PURE__ */ p({
|
|
13002
13012
|
__name: "BccChat",
|
|
13003
13013
|
props: {
|
|
13004
13014
|
client: { default: null },
|
|
@@ -13051,14 +13061,14 @@ var qh = {
|
|
|
13051
13061
|
let o = e, l = n, { t: p } = Y(), h = D(null), g = D(!1), _ = D(!1), x = D(!1), C = a(() => o.client ?? $.value ?? null), w = a(() => !!o.chatUid), E = a(() => {
|
|
13052
13062
|
let e = C.value;
|
|
13053
13063
|
return e ? o.chatUid ? e.conversations.value.find((e) => e.targetId === o.chatUid || e.id === o.chatUid) ?? null : e.activeConversation.value : null;
|
|
13054
|
-
}), { groupMembers: O, fetchGroupMembers: A, clearGroupMembers: j } =
|
|
13064
|
+
}), { groupMembers: O, fetchGroupMembers: A, clearGroupMembers: j } = Vp({
|
|
13055
13065
|
getConversationTargetId: () => E.value?.targetId,
|
|
13056
|
-
isChannel: () =>
|
|
13057
|
-
hasJoined: () =>
|
|
13066
|
+
isChannel: () => ip(E.value),
|
|
13067
|
+
hasJoined: () => ap(E.value),
|
|
13058
13068
|
onMembersChanged: (e) => {
|
|
13059
13069
|
l("chatMembersFetched", e), C.value?.rememberMentionDisplayNames(e);
|
|
13060
13070
|
}
|
|
13061
|
-
}), ee =
|
|
13071
|
+
}), ee = mp({
|
|
13062
13072
|
chatClient: C,
|
|
13063
13073
|
selectedConversation: E,
|
|
13064
13074
|
getPropIsReadOnly: () => o.isReadOnly,
|
|
@@ -13068,39 +13078,39 @@ var qh = {
|
|
|
13068
13078
|
currentUserId: C.value?.currentUser.value?.uid
|
|
13069
13079
|
})
|
|
13070
13080
|
});
|
|
13071
|
-
|
|
13072
|
-
let P =
|
|
13081
|
+
gp(ee);
|
|
13082
|
+
let P = yp({
|
|
13073
13083
|
chatClient: C,
|
|
13074
13084
|
selectedConversation: E,
|
|
13075
13085
|
usesPublicContract: w,
|
|
13076
13086
|
loadingChat: _,
|
|
13077
13087
|
getHideDeletedMessages: () => o.hideDeletedMessages
|
|
13078
13088
|
});
|
|
13079
|
-
|
|
13080
|
-
let I = a(() => P.messages.value.length > 0), L =
|
|
13089
|
+
xp(P);
|
|
13090
|
+
let I = a(() => P.messages.value.length > 0), L = jp({
|
|
13081
13091
|
chatClient: C,
|
|
13082
13092
|
selectedConversation: E,
|
|
13083
13093
|
canScheduleMessages: () => !ee.isReadOnly.value && E.value?.type !== "user",
|
|
13084
13094
|
getInitialScheduledMessagesOpen: () => !!o.initialScheduledMessagesOpen,
|
|
13085
13095
|
fetchErrorFallback: p("loadMessageReceiptsError")
|
|
13086
13096
|
});
|
|
13087
|
-
|
|
13088
|
-
let te = F("mainComposerRef"), B = F("threadComposerRef"), V =
|
|
13097
|
+
Np(L);
|
|
13098
|
+
let te = F("mainComposerRef"), B = F("threadComposerRef"), V = wp({
|
|
13089
13099
|
chatClient: C,
|
|
13090
13100
|
mentionNameByUid: ee.mentionNameByUid,
|
|
13091
13101
|
afterSchedule: () => L.openScheduledMessages(),
|
|
13092
13102
|
mainComposerRef: te,
|
|
13093
13103
|
threadComposerRef: B
|
|
13094
13104
|
});
|
|
13095
|
-
|
|
13096
|
-
let ne =
|
|
13097
|
-
|
|
13105
|
+
Ep(V);
|
|
13106
|
+
let ne = Lp();
|
|
13107
|
+
Rp(ne), Fp({
|
|
13098
13108
|
conversation: ee,
|
|
13099
13109
|
composer: V,
|
|
13100
13110
|
dialogs: L,
|
|
13101
13111
|
bus: ne
|
|
13102
13112
|
});
|
|
13103
|
-
let { scrollToRequestedMessage: H } =
|
|
13113
|
+
let { scrollToRequestedMessage: H } = Hp({
|
|
13104
13114
|
chatRootRef: h,
|
|
13105
13115
|
getClient: () => C.value
|
|
13106
13116
|
});
|
|
@@ -13120,8 +13130,8 @@ var qh = {
|
|
|
13120
13130
|
e && l("chatEmpty");
|
|
13121
13131
|
}), R([
|
|
13122
13132
|
() => o.chatUid,
|
|
13123
|
-
() => o.client ? o.client.initialized.value :
|
|
13124
|
-
() => o.client ? o.client.loggedIn.value :
|
|
13133
|
+
() => o.client ? o.client.initialized.value : np.initialized.value,
|
|
13134
|
+
() => o.client ? o.client.loggedIn.value : np.loggedIn.value,
|
|
13125
13135
|
() => C.value?.conversations.value.length ?? 0
|
|
13126
13136
|
], async ([e, t, n]) => {
|
|
13127
13137
|
w.value && e && t && n && C.value && await U();
|
|
@@ -13134,7 +13144,7 @@ var qh = {
|
|
|
13134
13144
|
() => re.value,
|
|
13135
13145
|
() => P.messages.value.length,
|
|
13136
13146
|
() => P.threadMessages.value.length,
|
|
13137
|
-
() =>
|
|
13147
|
+
() => np.scrollToMessageId.value
|
|
13138
13148
|
], async () => {
|
|
13139
13149
|
re.value && await H();
|
|
13140
13150
|
});
|
|
@@ -13165,13 +13175,13 @@ var qh = {
|
|
|
13165
13175
|
g.value = !0, x.value = !1, l("chatMembersFetched", []);
|
|
13166
13176
|
return;
|
|
13167
13177
|
}
|
|
13168
|
-
e.activeConversationId.value !== t.id && await e.selectConversation(t.id), t.type === "group" ?
|
|
13178
|
+
e.activeConversationId.value !== t.id && await e.selectConversation(t.id), t.type === "group" ? A(t.targetId) : j();
|
|
13169
13179
|
} finally {
|
|
13170
13180
|
_.value = !1;
|
|
13171
13181
|
}
|
|
13172
13182
|
}
|
|
13173
13183
|
async function W(e, t) {
|
|
13174
|
-
let n = await
|
|
13184
|
+
let n = await np.getGroup(e, !0);
|
|
13175
13185
|
if (!n || typeof n != "object") return null;
|
|
13176
13186
|
let r = String(n.getGuid());
|
|
13177
13187
|
if (!r) return null;
|
|
@@ -13205,7 +13215,7 @@ var qh = {
|
|
|
13205
13215
|
n(), clearTimeout(r), e(t);
|
|
13206
13216
|
}, n = R(re, (e) => {
|
|
13207
13217
|
e && t(!0);
|
|
13208
|
-
}), r = setTimeout(() => t(!1),
|
|
13218
|
+
}), r = setTimeout(() => t(!1), Vy);
|
|
13209
13219
|
});
|
|
13210
13220
|
}
|
|
13211
13221
|
function se(e) {
|
|
@@ -13230,7 +13240,7 @@ var qh = {
|
|
|
13230
13240
|
_: 1
|
|
13231
13241
|
})], void 0, 0) : s("", !0),
|
|
13232
13242
|
C.value ? (T(), c(r, { key: 1 }, [
|
|
13233
|
-
f(
|
|
13243
|
+
f(Nv, {
|
|
13234
13244
|
target: "main",
|
|
13235
13245
|
class: y(["min-h-0 flex-1", e.containerClass]),
|
|
13236
13246
|
"hide-group-actions": e.hideGroupActions,
|
|
@@ -13239,7 +13249,7 @@ var qh = {
|
|
|
13239
13249
|
"action-message-row-class": e.actionMessageRowClass,
|
|
13240
13250
|
onAnchorclick: ie
|
|
13241
13251
|
}, u({
|
|
13242
|
-
composer: z(() => [f(
|
|
13252
|
+
composer: z(() => [f(gh, {
|
|
13243
13253
|
ref_key: "mainComposerRef",
|
|
13244
13254
|
ref: te,
|
|
13245
13255
|
target: "main",
|
|
@@ -13261,7 +13271,7 @@ var qh = {
|
|
|
13261
13271
|
"action-message-class",
|
|
13262
13272
|
"action-message-row-class"
|
|
13263
13273
|
]),
|
|
13264
|
-
f(
|
|
13274
|
+
f(Fh, {
|
|
13265
13275
|
open: !!N(P).activeThreadParentMessage.value,
|
|
13266
13276
|
title: N(p)("threadWithCount", { count: N(P).activeThreadParentMessage.value?.replyCount ?? 0 }),
|
|
13267
13277
|
subtitle: E.value?.title ?? "",
|
|
@@ -13269,13 +13279,13 @@ var qh = {
|
|
|
13269
13279
|
"close-aria-label": N(p)("closeThread"),
|
|
13270
13280
|
onClose: n[0] ||= (e) => N(ne).emit("ui:closeThread")
|
|
13271
13281
|
}, {
|
|
13272
|
-
default: z(() => [f(
|
|
13282
|
+
default: z(() => [f(Nv, {
|
|
13273
13283
|
target: "thread",
|
|
13274
13284
|
class: "min-h-0 flex-1",
|
|
13275
13285
|
"action-message-class": e.actionMessageClass,
|
|
13276
13286
|
"action-message-row-class": e.actionMessageRowClass
|
|
13277
13287
|
}, {
|
|
13278
|
-
composer: z(() => [f(
|
|
13288
|
+
composer: z(() => [f(gh, {
|
|
13279
13289
|
ref_key: "threadComposerRef",
|
|
13280
13290
|
ref: B,
|
|
13281
13291
|
target: "thread",
|
|
@@ -13291,7 +13301,7 @@ var qh = {
|
|
|
13291
13301
|
"close-label",
|
|
13292
13302
|
"close-aria-label"
|
|
13293
13303
|
]),
|
|
13294
|
-
f(
|
|
13304
|
+
f(Ly, {
|
|
13295
13305
|
open: N(L).showScheduledMessages.value,
|
|
13296
13306
|
loading: N(L).loadingScheduledMessages.value,
|
|
13297
13307
|
messages: N(L).scheduledMessages.value,
|
|
@@ -13306,7 +13316,7 @@ var qh = {
|
|
|
13306
13316
|
"messages",
|
|
13307
13317
|
"conversation-title"
|
|
13308
13318
|
]),
|
|
13309
|
-
f(
|
|
13319
|
+
f(iy, {
|
|
13310
13320
|
open: !!N(L).infoMessage.value,
|
|
13311
13321
|
message: N(L).infoMessage.value,
|
|
13312
13322
|
receipts: N(L).infoMessageReceipts.value,
|
|
@@ -13320,7 +13330,7 @@ var qh = {
|
|
|
13320
13330
|
"loading",
|
|
13321
13331
|
"error"
|
|
13322
13332
|
]),
|
|
13323
|
-
f(
|
|
13333
|
+
f(my, {
|
|
13324
13334
|
open: N(L).showPinnedMessages.value,
|
|
13325
13335
|
messages: N(P).pinnedMessages.value,
|
|
13326
13336
|
"can-unpin": N(ee).canPin.value,
|
|
@@ -13336,7 +13346,7 @@ var qh = {
|
|
|
13336
13346
|
"mention-name-by-uid",
|
|
13337
13347
|
"conversation-title"
|
|
13338
13348
|
]),
|
|
13339
|
-
f(
|
|
13349
|
+
f(Vv, {
|
|
13340
13350
|
open: !!N(L).forwardMessageSource.value,
|
|
13341
13351
|
chats: C.value?.conversations.value ?? [],
|
|
13342
13352
|
sending: N(L).sendingForwardMessage.value,
|
|
@@ -13348,7 +13358,7 @@ var qh = {
|
|
|
13348
13358
|
"sending"
|
|
13349
13359
|
])
|
|
13350
13360
|
], 64)) : s("", !0),
|
|
13351
|
-
f(
|
|
13361
|
+
f(By, {
|
|
13352
13362
|
visible: w.value && (C.value?.offlineMode.value || !C.value?.connected.value || _.value && !I.value || g.value || x.value || N(P).isChatEmpty.value),
|
|
13353
13363
|
"offline-mode": !(!C.value?.offlineMode.value || E.value),
|
|
13354
13364
|
connected: !!(C.value?.connected.value || E.value),
|
|
@@ -13386,6 +13396,6 @@ var qh = {
|
|
|
13386
13396
|
}
|
|
13387
13397
|
});
|
|
13388
13398
|
//#endregion
|
|
13389
|
-
export {
|
|
13399
|
+
export { Hy as BccChat, Hy as BccChatMessageList, rf as LogSeverity, np as chat, np as default, pu as createChatClient };
|
|
13390
13400
|
|
|
13391
13401
|
//# sourceMappingURL=vue-bcc-chat-ui.js.map
|