@mobilon-dev/chotto 0.3.120 → 0.3.123

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.
@@ -1,5 +1,5 @@
1
1
  import { createElementBlock as t, openBlock as o, createElementVNode as n } from "vue";
2
- import r from "../../../../_virtual/_plugin-vue_export-helper.js";
2
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
3
3
  const C = {}, l = {
4
4
  width: "16",
5
5
  height: "16",
@@ -1,7 +1,7 @@
1
1
  import t from "./ChatItem.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f1c3ebdc"]]);
4
+ const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3d817d5e"]]);
5
5
  export {
6
- c as default
6
+ e as default
7
7
  };
@@ -1,78 +1,79 @@
1
- import { defineComponent as Ht, inject as Nt, useId as Ut, ref as E, computed as l, watch as Ft, onMounted as Pt, nextTick as F, onUnmounted as Rt, createElementBlock as a, openBlock as o, createElementVNode as m, createCommentVNode as c, withModifiers as Wt, normalizeClass as P, normalizeStyle as nt, createVNode as R, createBlock as d, renderSlot as $t, withCtx as W, toDisplayString as f, resolveDynamicComponent as it, unref as h, Teleport as jt, Fragment as Xt, renderList as Yt } from "vue";
2
- import { getStatus as zt, statuses as Ot } from "../../../functions/getStatusMessage.js";
1
+ import { defineComponent as Ft, inject as Pt, useId as Rt, ref as E, computed as l, watch as Wt, onMounted as $t, nextTick as P, onUnmounted as jt, createElementBlock as a, openBlock as o, createElementVNode as m, createCommentVNode as c, withModifiers as Xt, normalizeClass as R, normalizeStyle as ot, createVNode as W, createBlock as d, renderSlot as Yt, withCtx as $, toDisplayString as f, resolveDynamicComponent as at, unref as h, Teleport as Ot, Fragment as zt, renderList as qt } from "vue";
2
+ import { getStatus as Gt, statuses as Jt } from "../../../functions/getStatusMessage.js";
3
3
  import "../../../functions/parseMarkdown.js";
4
- import { t as A } from "../../../locale/useLocale.js";
5
- import { resolveMessageDraftStore as qt } from "../../../hooks/useMessageDraft.js";
6
- import { useTheme as Gt } from "../../../hooks/useTheme.js";
7
- import { useEmojiNative as Jt } from "../../../hooks/useEmojiNative.js";
4
+ import { t as S } from "../../../locale/useLocale.js";
5
+ import { resolveMessageDraftStore as Kt } from "../../../hooks/useMessageDraft.js";
6
+ import { useTheme as Qt } from "../../../hooks/useTheme.js";
7
+ import { useEmojiNative as Zt } from "../../../hooks/useEmojiNative.js";
8
8
  /* empty css */
9
9
  /* empty css */
10
10
  /* empty css */
11
11
  import "../../../node_modules/linkifyjs/dist/linkify.js";
12
12
  import "../../../node_modules/linkify-string/dist/linkify-string.js";
13
- import { textToAppleEmojiHtml as $, textContainsEmoji as ot } from "../../../functions/renderAppleEmojis.js";
14
- import at from "../../1_atoms/Tooltip/Tooltip.vue.js";
15
- import Kt from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
16
- import Qt from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
17
- import Zt from "../../1_icons/AvatarIcon.vue.js";
18
- import te from "../../1_icons/VerifiedBadge.vue.js";
19
- import ee from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
20
- import ne from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
21
- import ie from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
22
- import oe from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
23
- import ae from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
24
- import st from "./icons/AudioIcon.vue.js";
25
- import j from "./icons/FileIcon.vue.js";
26
- import ct from "./icons/ImageIcon.vue.js";
27
- import se from "./icons/MissedCallIcon.vue.js";
28
- import X from "./icons/StickerIcon.vue.js";
29
- import rt from "./icons/VideoIcon.vue.js";
30
- import lt from "./icons/VoiceIcon.vue.js";
31
- const ce = ["data-chat-id"], re = { class: "chat-item__avatar-container" }, le = ["src"], ue = {
13
+ import { textToAppleEmojiHtml as j, textContainsEmoji as st } from "../../../functions/renderAppleEmojis.js";
14
+ import ct from "../../1_atoms/Tooltip/Tooltip.vue.js";
15
+ import te from "../../1_atoms/ButtonContextMenu/ButtonContextMenu.vue.js";
16
+ import ee from "../../1_atoms/ContextMenu/ContextMenu.vue.js";
17
+ import ne from "../../1_icons/AvatarIcon.vue.js";
18
+ import ie from "../../1_icons/VerifiedBadge.vue.js";
19
+ import oe from "../../1_icons/MessageStatus/ErrorStatusIcon.vue.js";
20
+ import ae from "../../1_icons/MessageStatus/PendingStatusIcon.vue.js";
21
+ import se from "../../1_icons/MessageStatus/ReadStatusIcon.vue.js";
22
+ import ce from "../../1_icons/MessageStatus/ReceivedStatusIcon.vue.js";
23
+ import re from "../../1_icons/MessageStatus/SentStatusIcon.vue.js";
24
+ import rt from "./icons/AudioIcon.vue.js";
25
+ import X from "./icons/FileIcon.vue.js";
26
+ import lt from "./icons/ImageIcon.vue.js";
27
+ import le from "./icons/MissedCallIcon.vue.js";
28
+ import Y from "./icons/StickerIcon.vue.js";
29
+ import ut from "./icons/VideoIcon.vue.js";
30
+ import mt from "./icons/VoiceIcon.vue.js";
31
+ import ue from "../../1_icons/DeletedMessageIcon.vue.js";
32
+ const me = ["data-chat-id"], de = { class: "chat-item__avatar-container" }, he = ["src"], fe = {
32
33
  key: 1,
33
34
  class: "chat-item__avatar-placeholder"
34
- }, me = { class: "chat-item__info-container" }, de = { class: "chat-item__title-row" }, he = ["innerHTML"], fe = {
35
+ }, ve = { class: "chat-item__info-container" }, ge = { class: "chat-item__title-row" }, ye = ["innerHTML"], pe = {
35
36
  key: 1,
36
37
  class: "chat-item__name"
37
- }, ve = {
38
+ }, _e = {
38
39
  key: 0,
39
40
  class: "chat-item__last-message"
40
- }, ge = {
41
+ }, xe = {
41
42
  key: 1,
42
43
  class: "chat-item__last-message-text chat-item__last-message-text--draft"
43
- }, ye = { class: "chat-item__draft-label" }, pe = ["innerHTML"], _e = {
44
+ }, ke = { class: "chat-item__draft-label" }, we = ["innerHTML"], Ce = {
44
45
  key: 2,
45
46
  class: "chat-item__draft-text"
46
- }, ke = ["innerHTML"], xe = {
47
+ }, Ie = ["innerHTML"], Te = {
47
48
  key: 3,
48
49
  class: "chat-item__last-message-text"
49
- }, we = { class: "chat-item__details-container" }, Ce = {
50
+ }, Me = { class: "chat-item__details-container" }, Ee = {
50
51
  key: 0,
51
52
  class: "chat-item__time"
52
- }, Ie = { class: "chat-item__status-unread-container" }, Te = {
53
+ }, Se = { class: "chat-item__status-unread-container" }, Le = {
53
54
  key: 1,
54
55
  class: "chat-item__unread"
55
- }, Me = {
56
+ }, be = {
56
57
  key: 2,
57
58
  class: "chat-item__status-chat-container"
58
- }, Ee = {
59
+ }, Ae = {
59
60
  key: 0,
60
61
  class: "chat-item__fixed pi pi-thumbtack"
61
- }, Se = {
62
+ }, Be = {
62
63
  key: 0,
63
64
  id: "noSelectButton",
64
65
  class: "chat-item__menu-button"
65
- }, Le = {
66
+ }, De = {
66
67
  key: 1,
67
68
  id: "noSelectButton",
68
69
  class: "chat-item__menu-button"
69
- }, be = {
70
+ }, Ve = {
70
71
  key: 0,
71
72
  class: "dialog__container"
72
- }, Ae = ["onClick"], Be = ["src"], Ve = {
73
+ }, He = ["onClick"], Ne = ["src"], Ue = {
73
74
  key: 1,
74
75
  class: "dialog__icon pi pi-user"
75
- }, De = { class: "dialog__text-container" }, He = { class: "dialog__name" }, Ne = { class: "dialog__time" }, fn = /* @__PURE__ */ Ht({
76
+ }, Fe = { class: "dialog__text-container" }, Pe = { class: "dialog__name" }, Re = { class: "dialog__time" }, _n = /* @__PURE__ */ Ft({
76
77
  __name: "ChatItem",
77
78
  props: {
78
79
  chat: {},
@@ -80,31 +81,31 @@ const ce = ["data-chat-id"], re = { class: "chat-item__avatar-container" }, le =
80
81
  contextMenuTrigger: { default: "hover" }
81
82
  },
82
83
  emits: ["select", "action", "expand"],
83
- setup(s, { emit: ut }) {
84
- const S = Nt("chatAppId"), { getTheme: Y } = Gt(S), { isNative: z, emojiSrc: B } = Jt(S), mt = qt(String(S ?? "")), n = s, L = ut, y = Ut(), p = E(!1), k = E(!1), V = E(!1), dt = E(null), x = l(
84
+ setup(s, { emit: dt }) {
85
+ const L = Pt("chatAppId"), { getTheme: O } = Qt(L), { isNative: z, emojiSrc: B } = Zt(L), ht = Kt(String(L ?? "")), e = s, b = dt, y = Rt(), p = E(!1), x = E(!1), D = E(!1), ft = E(null), k = l(
85
86
  () => {
86
87
  var t;
87
- return (((t = n.chat.actions) == null ? void 0 : t.length) ?? 0) > 0;
88
+ return (((t = e.chat.actions) == null ? void 0 : t.length) ?? 0) > 0;
88
89
  }
89
- ), ht = () => {
90
- V.value = !0;
91
- }, ft = (t) => {
92
- V.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && L("select", { chat: n.chat, dialog: null }), V.value = !1;
93
- }, vt = (t) => {
94
- L("select", { chat: n.chat, dialog: t });
95
- }, gt = () => n.chat.isSelected ? "chat-item__selected" : "", yt = (t) => t.isSelected ? "dialog__selected" : "", O = (t) => {
96
- n.contextMenuTrigger === "rightClick" && D(), L("action", { chat: n.chat, ...t });
97
- }, D = () => {
90
+ ), vt = () => {
91
+ D.value = !0;
92
+ }, gt = (t) => {
93
+ D.value || t.target instanceof HTMLElement && t.target.id != "noSelectButton" && b("select", { chat: e.chat, dialog: null }), D.value = !1;
94
+ }, yt = (t) => {
95
+ b("select", { chat: e.chat, dialog: t });
96
+ }, pt = () => e.chat.isSelected ? "chat-item__selected" : "", _t = (t) => t.isSelected ? "dialog__selected" : "", q = (t) => {
97
+ e.contextMenuTrigger === "rightClick" && V(), b("action", { chat: e.chat, ...t });
98
+ }, V = () => {
98
99
  const t = document.getElementById("context-menu-rightclick-" + y);
99
- t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), k.value = !1;
100
- }, pt = () => {
101
- document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((e) => {
102
- const i = e;
100
+ t && (t.style.top = "0", t.style.left = "0", t.style.opacity = "0", t.style.display = "none"), x.value = !1;
101
+ }, xt = () => {
102
+ document.querySelectorAll('[id^="context-menu-rightclick-"]').forEach((n) => {
103
+ const i = n;
103
104
  i.id !== "context-menu-rightclick-" + y && (i.style.top = "0", i.style.left = "0", i.style.opacity = "0", i.style.display = "none");
104
105
  });
105
- }, _t = () => n.chat.dialogs ? [...n.chat.dialogs].sort((t, e) => Number(t["lastActivity.timestamp"]) > Number(e["lastActivity.timestamp"]) ? -1 : Number(t["lastActivity.timestamp"]) < Number(e["lastActivity.timestamp"]) ? 1 : (Number(t["lastActivity.timestamp"]) == Number(e["lastActivity.timestamp"]), 0)) : [], kt = l(() => zt(n.chat["lastMessage.status"])), xt = l(() => n.chat.showEmptyIndicator || n.chat.countUnread > 0), wt = l(() => n.chat.countUnread > 0 ? n.chat.countUnread > 99 ? "99+" : n.chat.countUnread : n.chat.showEmptyIndicator ? "" : void 0);
106
- let b;
107
- const _ = E(0), q = [A("component.ChatItem.typing") + ".", A("component.ChatItem.typing") + "..", A("component.ChatItem.typing") + "..."], G = (t) => {
106
+ }, kt = () => e.chat.dialogs ? [...e.chat.dialogs].sort((t, n) => Number(t["lastActivity.timestamp"]) > Number(n["lastActivity.timestamp"]) ? -1 : Number(t["lastActivity.timestamp"]) < Number(n["lastActivity.timestamp"]) ? 1 : (Number(t["lastActivity.timestamp"]) == Number(n["lastActivity.timestamp"]), 0)) : [], wt = l(() => Gt(e.chat["lastMessage.status"])), Ct = l(() => e.chat.showEmptyIndicator || e.chat.countUnread > 0), It = l(() => e.chat.countUnread > 0 ? e.chat.countUnread > 99 ? "99+" : e.chat.countUnread : e.chat.showEmptyIndicator ? "" : void 0);
107
+ let A;
108
+ const _ = E(0), G = [S("component.ChatItem.typing") + ".", S("component.ChatItem.typing") + "..", S("component.ChatItem.typing") + "..."], Tt = S("component.DeletedMessageContent.text"), H = (t) => typeof t != "string" && (t == null ? void 0 : t.deleted) === !0, J = (t) => {
108
109
  var u, r, v;
109
110
  if (typeof t == "string")
110
111
  return t;
@@ -114,239 +115,241 @@ const ce = ["data-chat-id"], re = { class: "chat-item__avatar-container" }, le =
114
115
  return (t.isVoiceMessage || ((u = t == null ? void 0 : t.data) == null ? void 0 : u.isVoiceMessage)) === !0 ? "Голосовое сообщение" : "Аудиофайл";
115
116
  if ((t == null ? void 0 : t.type) === "message.missedCall")
116
117
  return "Пропущенный звонок";
117
- const e = (r = t == null ? void 0 : t.data) == null ? void 0 : r.text;
118
- if (e)
119
- return e;
118
+ const n = (r = t == null ? void 0 : t.data) == null ? void 0 : r.text;
119
+ if (n)
120
+ return n;
120
121
  const i = (v = t == null ? void 0 : t.data) == null ? void 0 : v.filename;
121
122
  return i || "";
122
- }, Ct = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, H = A("component.ChatItem.draft"), N = l(() => {
123
- var e;
124
- const t = mt.getChatDraft(String(S ?? ""), n.chat.chatId);
125
- if (!(!t || t.edit) && !(!t.listPreviewText && !t.listPreviewFile) && !(!(t.text || "").trim() && !t.file && !((e = t.files) != null && e.length)))
123
+ }, K = (t) => H(t) ? Tt : J(t), Mt = (t) => typeof t == "string" ? null : (t == null ? void 0 : t.type) || null, N = S("component.ChatItem.draft"), U = l(() => {
124
+ var n;
125
+ const t = ht.getChatDraft(String(L ?? ""), e.chat.chatId);
126
+ if (!(!t || t.edit) && !(!t.listPreviewText && !t.listPreviewFile) && !(!(t.text || "").trim() && !t.file && !((n = t.files) != null && n.length)))
126
127
  return t;
127
- }), w = l(() => !!N.value), g = l(() => {
128
- var e;
129
- const t = N.value;
130
- return t ? t.file ? (((e = t.listPreviewFile) == null ? void 0 : e.name) || t.file.name || "").trim() : (t.listPreviewText || "").trim() : "";
131
- }), J = l(() => {
132
- const t = N.value;
128
+ }), w = l(() => !!U.value), g = l(() => {
129
+ var n;
130
+ const t = U.value;
131
+ return t ? t.file ? (((n = t.listPreviewFile) == null ? void 0 : n.name) || t.file.name || "").trim() : (t.listPreviewText || "").trim() : "";
132
+ }), Q = l(() => {
133
+ const t = U.value;
133
134
  if (!(t != null && t.file)) return null;
134
- const e = t.listPreviewFile, i = ((e == null ? void 0 : e.type) || t.file.type || "").toLowerCase(), u = ((e == null ? void 0 : e.name) || t.file.name || "").toLowerCase();
135
- return i === "sticker" || u.endsWith(".tgs") || u.endsWith(".webp") ? X : i === "image" || i.includes("image") ? ct : i === "video" || i.includes("video") ? rt : i === "audio" || i.includes("audio") ? u.includes("voice") || u.includes("голос") ? lt : st : i === "file" || u ? j : j;
136
- }), It = l(() => $(g.value || "", null, B.value)), K = l(() => {
137
- var e, i, u;
138
- if (n.chat.typing || w.value)
135
+ const n = t.listPreviewFile, i = ((n == null ? void 0 : n.type) || t.file.type || "").toLowerCase(), u = ((n == null ? void 0 : n.name) || t.file.name || "").toLowerCase();
136
+ return i === "sticker" || u.endsWith(".tgs") || u.endsWith(".webp") ? Y : i === "image" || i.includes("image") ? lt : i === "video" || i.includes("video") ? ut : i === "audio" || i.includes("audio") ? u.includes("voice") || u.includes("голос") ? mt : rt : i === "file" || u ? X : X;
137
+ }), Et = l(() => j(g.value || "", null, B.value)), Z = l(() => {
138
+ var n, i, u;
139
+ if (e.chat.typing || w.value)
139
140
  return null;
140
- const t = Ct(n.chat.lastMessage);
141
+ if (H(e.chat.lastMessage))
142
+ return ue;
143
+ const t = Mt(e.chat.lastMessage);
141
144
  if (!t)
142
145
  return null;
143
146
  if (t === "message.sticker")
144
- return X;
147
+ return Y;
145
148
  if (t === "message.image")
146
- return ct;
149
+ return lt;
147
150
  if (t === "message.video")
148
- return rt;
151
+ return ut;
149
152
  if (t === "message.audio") {
150
- const r = n.chat.lastMessage;
151
- return (r.isVoiceMessage || ((e = r == null ? void 0 : r.data) == null ? void 0 : e.isVoiceMessage)) === !0 ? lt : st;
153
+ const r = e.chat.lastMessage;
154
+ return (r.isVoiceMessage || ((n = r == null ? void 0 : r.data) == null ? void 0 : n.isVoiceMessage)) === !0 ? mt : rt;
152
155
  }
153
156
  if (t === "message.missedCall")
154
- return se;
157
+ return le;
155
158
  if (t === "message.file") {
156
- const r = n.chat.lastMessage, v = ((u = (i = r == null ? void 0 : r.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
157
- return v.endsWith(".tgs") || v.endsWith(".webp") ? X : j;
159
+ const r = e.chat.lastMessage, v = ((u = (i = r == null ? void 0 : r.data) == null ? void 0 : i.filename) == null ? void 0 : u.toLowerCase()) || "";
160
+ return v.endsWith(".tgs") || v.endsWith(".webp") ? Y : X;
158
161
  }
159
162
  return null;
160
- }), Tt = l(() => n.chat.typing ? q[_.value] : w.value ? g.value ? `${H} ${g.value}` : H : G(n.chat.lastMessage)), U = l(() => n.chat.typing ? q[_.value] : G(n.chat.lastMessage)), Q = l(
161
- () => !z.value && ot(g.value || U.value || "")
162
- ), Mt = l(
163
- () => !z.value && ot(n.chat.name || "")
164
- ), Et = l(() => $(U.value || "", null, B.value)), St = l(() => $(n.chat.name || "", null, B.value));
165
- Ft(
166
- () => n.chat.typing,
163
+ }), St = l(() => e.chat.typing ? G[_.value] : w.value ? g.value ? `${N} ${g.value}` : N : H(e.chat.lastMessage) ? J(e.chat.lastMessage) : K(e.chat.lastMessage)), F = l(() => e.chat.typing ? G[_.value] : K(e.chat.lastMessage)), tt = l(
164
+ () => !z.value && st(g.value || F.value || "")
165
+ ), Lt = l(
166
+ () => !z.value && st(e.chat.name || "")
167
+ ), bt = l(() => j(F.value || "", null, B.value)), At = l(() => j(e.chat.name || "", null, B.value));
168
+ Wt(
169
+ () => e.chat.typing,
167
170
  () => {
168
- n.chat.typing ? b = setInterval(() => {
171
+ e.chat.typing ? A = setInterval(() => {
169
172
  _.value < 2 ? _.value += 1 : _.value = 0;
170
- }, 1e3) : (_.value = 0, b && (clearInterval(b), b = void 0));
173
+ }, 1e3) : (_.value = 0, A && (clearInterval(A), A = void 0));
171
174
  },
172
175
  { immediate: !0 }
173
176
  );
174
- const Lt = () => {
175
- n.contextMenuTrigger === "hover" && x.value && (p.value = !0);
176
- }, bt = (t) => {
177
- n.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? p.value = !0 : p.value = !1);
178
- }, At = (t) => {
179
- n.contextMenuTrigger === "rightClick" && x.value && Bt(t);
180
- }, Bt = (t) => {
181
- pt(), k.value = !0, F(() => {
182
- const e = document.getElementById("context-menu-rightclick-" + y);
183
- if (e) {
177
+ const Bt = () => {
178
+ e.contextMenuTrigger === "hover" && k.value && (p.value = !0);
179
+ }, Dt = (t) => {
180
+ e.contextMenuTrigger === "hover" && (t.relatedTarget instanceof HTMLElement && t.relatedTarget.className == "context-menu__list" ? p.value = !0 : p.value = !1);
181
+ }, Vt = (t) => {
182
+ e.contextMenuTrigger === "rightClick" && k.value && Ht(t);
183
+ }, Ht = (t) => {
184
+ xt(), x.value = !0, P(() => {
185
+ const n = document.getElementById("context-menu-rightclick-" + y);
186
+ if (n) {
184
187
  const i = t.clientX, u = t.clientY;
185
- e.style.display = "inherit";
186
- const r = e.getBoundingClientRect();
187
- e.style.display = "none", F(() => {
188
- const v = window.innerWidth, et = window.innerHeight, C = window.scrollX || window.pageXOffset, I = window.scrollY || window.pageYOffset;
188
+ n.style.display = "inherit";
189
+ const r = n.getBoundingClientRect();
190
+ n.style.display = "none", P(() => {
191
+ const v = window.innerWidth, it = window.innerHeight, C = window.scrollX || window.pageXOffset, I = window.scrollY || window.pageYOffset;
189
192
  let T = i + C, M = u + I;
190
- T + r.width > v + C && (T = i + C - r.width), M + r.height > et + I && (M = u + I - r.height), T < C && (T = C), M < I && (M = I), e.style.top = M + "px", e.style.left = T + "px", e.style.opacity = "1", e.style.display = "inherit";
193
+ T + r.width > v + C && (T = i + C - r.width), M + r.height > it + I && (M = u + I - r.height), T < C && (T = C), M < I && (M = I), n.style.top = M + "px", n.style.left = T + "px", n.style.opacity = "1", n.style.display = "inherit";
191
194
  });
192
195
  }
193
196
  });
194
- }, Vt = () => {
195
- }, Dt = () => {
196
- }, Z = (t) => {
197
- if (n.contextMenuTrigger === "rightClick" && k.value) {
198
- const e = t.target, i = document.getElementById("context-menu-rightclick-" + y);
199
- (!i || !i.contains(e)) && D();
197
+ }, Nt = () => {
198
+ }, Ut = () => {
199
+ }, et = (t) => {
200
+ if (e.contextMenuTrigger === "rightClick" && x.value) {
201
+ const n = t.target, i = document.getElementById("context-menu-rightclick-" + y);
202
+ (!i || !i.contains(n)) && V();
200
203
  }
201
- }, tt = () => {
202
- n.contextMenuTrigger === "rightClick" && k.value && D();
204
+ }, nt = () => {
205
+ e.contextMenuTrigger === "rightClick" && x.value && V();
203
206
  };
204
- return Pt(() => {
205
- n.contextMenuTrigger === "rightClick" && (document.addEventListener("click", Z), window.addEventListener("scroll", tt, !0), F(() => {
207
+ return $t(() => {
208
+ e.contextMenuTrigger === "rightClick" && (document.addEventListener("click", et), window.addEventListener("scroll", nt, !0), P(() => {
206
209
  const t = document.getElementById("context-menu-rightclick-" + y);
207
210
  t && (t.style.display = "none", t.style.opacity = "0");
208
211
  }));
209
- }), Rt(() => {
210
- document.removeEventListener("click", Z), window.removeEventListener("scroll", tt, !0);
211
- }), (t, e) => (o(), a("div", null, [
212
+ }), jt(() => {
213
+ document.removeEventListener("click", et), window.removeEventListener("scroll", nt, !0);
214
+ }), (t, n) => (o(), a("div", null, [
212
215
  m("div", {
213
216
  ref_key: "containerRef",
214
- ref: dt,
215
- class: P(["chat-item__container", gt()]),
217
+ ref: ft,
218
+ class: R(["chat-item__container", pt()]),
216
219
  "data-testid": "chat-item",
217
- "data-chat-id": n.chat.chatId,
218
- onMouseenter: Lt,
219
- onMouseleave: bt,
220
- onClick: ft,
221
- onContextmenu: Wt(At, ["prevent"])
220
+ "data-chat-id": e.chat.chatId,
221
+ onMouseenter: Bt,
222
+ onMouseleave: Dt,
223
+ onClick: gt,
224
+ onContextmenu: Xt(Vt, ["prevent"])
222
225
  }, [
223
- m("div", re, [
226
+ m("div", de, [
224
227
  m("span", {
225
228
  class: "chat-item__status-user",
226
- style: nt({ backgroundColor: n.chat.status })
229
+ style: ot({ backgroundColor: e.chat.status })
227
230
  }, null, 4),
228
- n.chat.avatar ? (o(), a("img", {
231
+ e.chat.avatar ? (o(), a("img", {
229
232
  key: 0,
230
- src: n.chat.avatar,
233
+ src: e.chat.avatar,
231
234
  height: "48",
232
235
  width: "48"
233
- }, null, 8, le)) : (o(), a("div", ue, [
234
- R(Zt)
236
+ }, null, 8, he)) : (o(), a("div", fe, [
237
+ W(ne)
235
238
  ]))
236
239
  ]),
237
- m("div", me, [
238
- m("div", de, [
239
- R(at, {
240
+ m("div", ve, [
241
+ m("div", ge, [
242
+ W(ct, {
240
243
  text: s.chat.name,
241
244
  position: "bottom"
242
245
  }, {
243
- default: W(() => [
244
- Mt.value ? (o(), a("div", {
246
+ default: $(() => [
247
+ Lt.value ? (o(), a("div", {
245
248
  key: 0,
246
249
  class: "chat-item__name",
247
- innerHTML: St.value
248
- }, null, 8, he)) : (o(), a("div", fe, f(s.chat.name), 1))
250
+ innerHTML: At.value
251
+ }, null, 8, ye)) : (o(), a("div", pe, f(s.chat.name), 1))
249
252
  ]),
250
253
  _: 1
251
254
  }, 8, ["text"]),
252
- s.chat.verified ? (o(), d(te, { key: 0 })) : c("", !0),
253
- $t(t.$slots, "name-suffix", {}, void 0, !0)
255
+ s.chat.verified ? (o(), d(ie, { key: 0 })) : c("", !0),
256
+ Yt(t.$slots, "name-suffix", {}, void 0, !0)
254
257
  ]),
255
- R(at, {
256
- text: Tt.value,
258
+ W(ct, {
259
+ text: St.value,
257
260
  position: "bottom"
258
261
  }, {
259
- default: W(() => [
260
- s.chat.lastMessage || s.chat.typing || w.value ? (o(), a("div", ve, [
261
- K.value && !w.value ? (o(), d(it(K.value), {
262
+ default: $(() => [
263
+ s.chat.lastMessage || s.chat.typing || w.value ? (o(), a("div", _e, [
264
+ Z.value && !w.value ? (o(), d(at(Z.value), {
262
265
  key: 0,
263
266
  class: "chat-item__message-icon"
264
267
  })) : c("", !0),
265
- w.value ? (o(), a("span", ge, [
266
- m("span", ye, f(h(H)), 1),
267
- J.value ? (o(), d(it(J.value), {
268
+ w.value ? (o(), a("span", xe, [
269
+ m("span", ke, f(h(N)), 1),
270
+ Q.value ? (o(), d(at(Q.value), {
268
271
  key: 0,
269
272
  class: "chat-item__message-icon"
270
273
  })) : c("", !0),
271
- g.value && Q.value ? (o(), a("span", {
274
+ g.value && tt.value ? (o(), a("span", {
272
275
  key: 1,
273
276
  class: "chat-item__draft-text",
274
- innerHTML: It.value
275
- }, null, 8, pe)) : g.value ? (o(), a("span", _e, f(g.value), 1)) : c("", !0)
276
- ])) : Q.value ? (o(), a("span", {
277
+ innerHTML: Et.value
278
+ }, null, 8, we)) : g.value ? (o(), a("span", Ce, f(g.value), 1)) : c("", !0)
279
+ ])) : tt.value ? (o(), a("span", {
277
280
  key: 2,
278
281
  class: "chat-item__last-message-text",
279
- innerHTML: Et.value
280
- }, null, 8, ke)) : (o(), a("span", xe, f(U.value), 1))
282
+ innerHTML: bt.value
283
+ }, null, 8, Ie)) : (o(), a("span", Te, f(F.value), 1))
281
284
  ])) : c("", !0)
282
285
  ]),
283
286
  _: 1
284
287
  }, 8, ["text"])
285
288
  ]),
286
- m("div", we, [
287
- s.chat["lastActivity.time"] && (!x.value || !p.value) ? (o(), a("div", Ce, f(s.chat["lastActivity.time"]), 1)) : c("", !0),
288
- p.value && x.value && s.contextMenuTrigger === "hover" ? (o(), d(Kt, {
289
+ m("div", Me, [
290
+ s.chat["lastActivity.time"] && (!k.value || !p.value) ? (o(), a("div", Ee, f(s.chat["lastActivity.time"]), 1)) : c("", !0),
291
+ p.value && k.value && s.contextMenuTrigger === "hover" ? (o(), d(te, {
289
292
  key: 1,
290
293
  mode: "click",
291
294
  "menu-side": "bottom-right",
292
295
  actions: s.chat.actions,
293
- onClick: O,
294
- onButtonClick: ht,
295
- onMenuMouseLeave: e[0] || (e[0] = (i) => p.value = !1)
296
+ onClick: q,
297
+ onButtonClick: vt,
298
+ onMenuMouseLeave: n[0] || (n[0] = (i) => p.value = !1)
296
299
  }, {
297
- default: W(() => [...e[2] || (e[2] = [
300
+ default: $(() => [...n[2] || (n[2] = [
298
301
  m("span", { class: "pi pi-ellipsis-h chat-item__actions-trigger" }, null, -1)
299
302
  ])]),
300
303
  _: 1
301
304
  }, 8, ["actions"])) : c("", !0),
302
- (o(), d(jt, { to: "body" }, [
303
- s.contextMenuTrigger === "rightClick" && x.value && k.value ? (o(), d(Qt, {
305
+ (o(), d(Ot, { to: "body" }, [
306
+ s.contextMenuTrigger === "rightClick" && k.value && x.value ? (o(), d(ee, {
304
307
  key: 0,
305
308
  id: "context-menu-rightclick-" + h(y),
306
309
  actions: s.chat.actions,
307
- "data-theme": h(Y)().theme ? h(Y)().theme : "light",
308
- onClick: O,
309
- onMouseenter: Vt,
310
- onMouseleave: Dt
310
+ "data-theme": h(O)().theme ? h(O)().theme : "light",
311
+ onClick: q,
312
+ onMouseenter: Nt,
313
+ onMouseleave: Ut
311
314
  }, null, 8, ["id", "actions", "data-theme"])) : c("", !0)
312
315
  ])),
313
- m("div", Ie, [
314
- h(Ot).includes(s.chat["lastMessage.status"]) ? (o(), a("div", {
316
+ m("div", Se, [
317
+ h(Jt).includes(s.chat["lastMessage.status"]) ? (o(), a("div", {
315
318
  key: 0,
316
- class: P(["chat-item__status-message", kt.value])
319
+ class: R(["chat-item__status-message", wt.value])
317
320
  }, [
318
- s.chat["lastMessage.status"] === "pending" ? (o(), d(h(ne), { key: 0 })) : s.chat["lastMessage.status"] === "error" ? (o(), d(h(ee), { key: 1 })) : s.chat["lastMessage.status"] === "read" ? (o(), d(h(ie), { key: 2 })) : s.chat["lastMessage.status"] === "received" ? (o(), d(h(oe), { key: 3 })) : (o(), d(h(ae), { key: 4 }))
321
+ s.chat["lastMessage.status"] === "pending" ? (o(), d(h(ae), { key: 0 })) : s.chat["lastMessage.status"] === "error" ? (o(), d(h(oe), { key: 1 })) : s.chat["lastMessage.status"] === "read" ? (o(), d(h(se), { key: 2 })) : s.chat["lastMessage.status"] === "received" ? (o(), d(h(ce), { key: 3 })) : (o(), d(h(re), { key: 4 }))
319
322
  ], 2)) : c("", !0),
320
- xt.value ? (o(), a("div", Te, f(wt.value), 1)) : c("", !0)
323
+ Ct.value ? (o(), a("div", Le, f(It.value), 1)) : c("", !0)
321
324
  ]),
322
- s.chat.countUnread < 1 ? (o(), a("div", Me, [
323
- s.chat.isFixedTop || s.chat.isFixedBottom ? (o(), a("span", Ee)) : c("", !0)
325
+ s.chat.countUnread < 1 ? (o(), a("div", be, [
326
+ s.chat.isFixedTop || s.chat.isFixedBottom ? (o(), a("span", Ae)) : c("", !0)
324
327
  ])) : c("", !0)
325
328
  ]),
326
- n.showDialogs && s.chat.dialogs ? (o(), a("div", {
329
+ e.showDialogs && s.chat.dialogs ? (o(), a("div", {
327
330
  key: 0,
328
331
  class: "chat-item__dialog-buttons",
329
- onClick: e[1] || (e[1] = (i) => L("expand", n.chat))
332
+ onClick: n[1] || (n[1] = (i) => b("expand", e.chat))
330
333
  }, [
331
- n.showDialogs && !s.chat.dialogsExpanded ? (o(), a("button", Se, [...e[3] || (e[3] = [
334
+ e.showDialogs && !s.chat.dialogsExpanded ? (o(), a("button", Be, [...n[3] || (n[3] = [
332
335
  m("span", {
333
336
  id: "noSelectButton",
334
337
  class: "pi pi-angle-down"
335
338
  }, null, -1)
336
339
  ])])) : c("", !0),
337
- n.showDialogs && s.chat.dialogsExpanded ? (o(), a("button", Le, [...e[4] || (e[4] = [
340
+ e.showDialogs && s.chat.dialogsExpanded ? (o(), a("button", De, [...n[4] || (n[4] = [
338
341
  m("span", {
339
342
  id: "noSelectButton",
340
343
  class: "pi pi-angle-up"
341
344
  }, null, -1)
342
345
  ])])) : c("", !0)
343
346
  ])) : c("", !0)
344
- ], 42, ce),
345
- n.showDialogs && s.chat.dialogsExpanded ? (o(), a("div", be, [
346
- (o(!0), a(Xt, null, Yt(_t(), (i) => (o(), a("div", {
347
+ ], 42, me),
348
+ e.showDialogs && s.chat.dialogsExpanded ? (o(), a("div", Ve, [
349
+ (o(!0), a(zt, null, qt(kt(), (i) => (o(), a("div", {
347
350
  key: i.dialogId,
348
- class: P(["dialog__item", yt(i)]),
349
- onClick: (u) => vt(i)
351
+ class: R(["dialog__item", _t(i)]),
352
+ onClick: (u) => yt(i)
350
353
  }, [
351
354
  i.icon ? (o(), a("img", {
352
355
  key: 0,
@@ -354,21 +357,21 @@ const ce = ["data-chat-id"], re = { class: "chat-item__avatar-container" }, le =
354
357
  src: i.icon,
355
358
  height: "16",
356
359
  width: "16"
357
- }, null, 8, Be)) : (o(), a("span", Ve)),
358
- m("div", De, [
359
- m("div", He, f(i.name), 1),
360
- m("div", Ne, f(i["lastActivity.time"]), 1)
360
+ }, null, 8, Ne)) : (o(), a("span", Ue)),
361
+ m("div", Fe, [
362
+ m("div", Pe, f(i.name), 1),
363
+ m("div", Re, f(i["lastActivity.time"]), 1)
361
364
  ]),
362
365
  i.countUnread > 0 ? (o(), a("div", {
363
366
  key: 2,
364
367
  class: "chat-item__unread",
365
- style: nt(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
368
+ style: ot(i.colorUnread ? { backgroundColor: i.colorUnread } : {})
366
369
  }, f(i.countUnread > 99 ? "99+" : i.countUnread), 5)) : c("", !0)
367
- ], 10, Ae))), 128))
370
+ ], 10, He))), 128))
368
371
  ])) : c("", !0)
369
372
  ]));
370
373
  }
371
374
  });
372
375
  export {
373
- fn as default
376
+ _n as default
374
377
  };
@@ -1,7 +1,7 @@
1
- import t from "./DeletedMessageContent.vue2.js";
1
+ import e from "./DeletedMessageContent.vue2.js";
2
2
  /* empty css */
3
- import e from "../../../_virtual/_plugin-vue_export-helper.js";
4
- const s = /* @__PURE__ */ e(t, [["__scopeId", "data-v-ca0c3683"]]);
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ t(e, [["__scopeId", "data-v-ecf8bbc1"]]);
5
5
  export {
6
- s as default
6
+ a as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as u, computed as c, createBlock as f, createElementBlock as n, openBlock as t, withCtx as i, createElementVNode as o, createVNode as d, toDisplayString as s, createCommentVNode as m } from "vue";
2
2
  import { useLocale as h } from "../../../locale/useLocale.js";
3
3
  import x from "../../1_atoms/Tooltip/Tooltip.vue.js";
4
- import r from "./icons/DeletedMessageIcon.vue.js";
4
+ import r from "../../1_icons/DeletedMessageIcon.vue.js";
5
5
  const y = { class: "deleted-message-content__tooltip" }, b = {
6
6
  key: 0,
7
7
  class: "deleted-message-content__tooltip-original"