@mobilon-dev/chotto 0.3.92 → 0.3.94

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