corp-chat-library-antd-react-socket 1.1.1 → 1.1.2
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/index.js +134 -131
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import Va from "react-dom";
|
|
|
8
8
|
import { io as Tc } from "socket.io-client";
|
|
9
9
|
import Pc from "axios";
|
|
10
10
|
import Mc from "emoji-picker-react";
|
|
11
|
-
import './index.css';const Rc = "_draggableWrapper_1bp6r_17", Ac = "_activeChatItem_1bp6r_177", Ic = "_message_1bp6r_187", Nc = "_myMessage_1bp6r_197", jc = "_otherMessage_1bp6r_205", Vc = "_bubble_1bp6r_215", Lc = "_myMessageBubble_1bp6r_229", Dc = "_otherMessageBubble_1bp6r_255", kc = "_senderName_1bp6r_281", Hc = "_time_1bp6r_299", Bc = "_chat_header_1bp6r_315", zc = "_localMessage_1bp6r_349", Wc = "_sending_1bp6r_357", Uc = "_chatcontentLayout_1bp6r_411", qc = "_chat_content_1bp6r_423", Gc = "_textArea_1bp6r_467", Kc = "_chatItem_1bp6r_503", Xc = "_chat_body_1bp6r_533", Yc = "_antd_empty_1bp6r_561", Qc = "_chat_inputs_1bp6r_577", Zc = "_files_container_1bp6r_615", Jc = "_file_1bp6r_615", el = "_file_circle_1bp6r_645", tl = "_self_1bp6r_661", rl = "_href_label_1bp6r_667",
|
|
11
|
+
import './index.css';const Rc = "_draggableWrapper_1bp6r_17", Ac = "_activeChatItem_1bp6r_177", Ic = "_message_1bp6r_187", Nc = "_myMessage_1bp6r_197", jc = "_otherMessage_1bp6r_205", Vc = "_bubble_1bp6r_215", Lc = "_myMessageBubble_1bp6r_229", Dc = "_otherMessageBubble_1bp6r_255", kc = "_senderName_1bp6r_281", Hc = "_time_1bp6r_299", Bc = "_chat_header_1bp6r_315", zc = "_localMessage_1bp6r_349", Wc = "_sending_1bp6r_357", Uc = "_chatcontentLayout_1bp6r_411", qc = "_chat_content_1bp6r_423", Gc = "_textArea_1bp6r_467", Kc = "_chatItem_1bp6r_503", Xc = "_chat_body_1bp6r_533", Yc = "_antd_empty_1bp6r_561", Qc = "_chat_inputs_1bp6r_577", Zc = "_files_container_1bp6r_615", Jc = "_file_1bp6r_615", el = "_file_circle_1bp6r_645", tl = "_self_1bp6r_661", rl = "_href_label_1bp6r_667", G = {
|
|
12
12
|
draggableWrapper: Rc,
|
|
13
13
|
"chat-modal__title": "_chat-modal__title_1bp6r_33",
|
|
14
14
|
"chat-input__footer": "_chat-input__footer_1bp6r_57",
|
|
@@ -310,7 +310,7 @@ function ui() {
|
|
|
310
310
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
311
311
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function K(e, t) {
|
|
314
314
|
return li(e) || fl(e, t) || va(e, t) || ui();
|
|
315
315
|
}
|
|
316
316
|
function gl(e, t) {
|
|
@@ -360,7 +360,7 @@ var Ba = process.env.NODE_ENV !== "test" && St() ? T.useLayoutEffect : T.useEffe
|
|
|
360
360
|
}, r);
|
|
361
361
|
};
|
|
362
362
|
function dr(e) {
|
|
363
|
-
var t = T.useRef(!1), r = T.useState(e), n =
|
|
363
|
+
var t = T.useRef(!1), r = T.useState(e), n = K(r, 2), a = n[0], o = n[1];
|
|
364
364
|
T.useEffect(function() {
|
|
365
365
|
return t.current = !1, function() {
|
|
366
366
|
t.current = !0;
|
|
@@ -377,7 +377,7 @@ function dn(e) {
|
|
|
377
377
|
function hl(e, t) {
|
|
378
378
|
var r = t || {}, n = r.defaultValue, a = r.value, o = r.onChange, i = r.postState, s = dr(function() {
|
|
379
379
|
return dn(a) ? a : dn(n) ? typeof n == "function" ? n() : n : typeof e == "function" ? e() : e;
|
|
380
|
-
}), l =
|
|
380
|
+
}), l = K(s, 2), c = l[0], u = l[1], d = a !== void 0 ? a : c, g = i ? i(d) : d, m = ur(o), v = dr([d]), h = K(v, 2), f = h[0], y = h[1];
|
|
381
381
|
za(function() {
|
|
382
382
|
var S = f[0];
|
|
383
383
|
c !== S && m(c, S);
|
|
@@ -411,11 +411,11 @@ function ml(e, t) {
|
|
|
411
411
|
}, [e, t]);
|
|
412
412
|
}
|
|
413
413
|
var yl = ["autoComplete", "onChange", "onFocus", "onBlur", "onPressEnter", "onKeyDown", "onKeyUp", "prefixCls", "disabled", "htmlSize", "className", "maxLength", "suffix", "showCount", "count", "type", "classes", "classNames", "styles", "onCompositionStart", "onCompositionEnd"], bl = /* @__PURE__ */ Xo(function(e, t) {
|
|
414
|
-
var r = e.autoComplete, n = e.onChange, a = e.onFocus, o = e.onBlur, i = e.onPressEnter, s = e.onKeyDown, l = e.onKeyUp, c = e.prefixCls, u = c === void 0 ? "rc-input" : c, d = e.disabled, g = e.htmlSize, m = e.className, v = e.maxLength, h = e.suffix, f = e.showCount, y = e.count, p = e.type, S = p === void 0 ? "text" : p, O = e.classes, C = e.classNames, _ = e.styles, b = e.onCompositionStart, P = e.onCompositionEnd, A = mt(e, yl), M = Q(!1), I =
|
|
414
|
+
var r = e.autoComplete, n = e.onChange, a = e.onFocus, o = e.onBlur, i = e.onPressEnter, s = e.onKeyDown, l = e.onKeyUp, c = e.prefixCls, u = c === void 0 ? "rc-input" : c, d = e.disabled, g = e.htmlSize, m = e.className, v = e.maxLength, h = e.suffix, f = e.showCount, y = e.count, p = e.type, S = p === void 0 ? "text" : p, O = e.classes, C = e.classNames, _ = e.styles, b = e.onCompositionStart, P = e.onCompositionEnd, A = mt(e, yl), M = Q(!1), I = K(M, 2), D = I[0], $ = I[1], E = he(!1), F = he(!1), w = he(null), R = he(null), j = function(te) {
|
|
415
415
|
w.current && cl(w.current, te);
|
|
416
416
|
}, k = hl(e.defaultValue, {
|
|
417
417
|
value: e.value
|
|
418
|
-
}), L =
|
|
418
|
+
}), L = K(k, 2), H = L[0], B = L[1], W = H == null ? "" : String(H), U = Q(null), J = K(U, 2), oe = J[0], le = J[1], de = ml(y, f), ue = de.max || v, se = de.strategy(W), me = !!ue && se > ue;
|
|
419
419
|
rc(t, function() {
|
|
420
420
|
var ie;
|
|
421
421
|
return {
|
|
@@ -2541,10 +2541,10 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
2541
2541
|
key: "map",
|
|
2542
2542
|
value: function(r) {
|
|
2543
2543
|
return Y(this.kvs.entries()).map(function(n) {
|
|
2544
|
-
var a =
|
|
2544
|
+
var a = K(n, 2), o = a[0], i = a[1], s = o.split($i);
|
|
2545
2545
|
return r({
|
|
2546
2546
|
key: s.map(function(l) {
|
|
2547
|
-
var c = l.match(/^([^:]*):(.*)$/), u =
|
|
2547
|
+
var c = l.match(/^([^:]*):(.*)$/), u = K(c, 3), d = u[1], g = u[2];
|
|
2548
2548
|
return d === "number" ? Number(g) : g;
|
|
2549
2549
|
}),
|
|
2550
2550
|
value: i
|
|
@@ -3071,7 +3071,7 @@ var Nt = /* @__PURE__ */ (function() {
|
|
|
3071
3071
|
}), this.forceRootUpdate = t;
|
|
3072
3072
|
});
|
|
3073
3073
|
function Oi(e) {
|
|
3074
|
-
var t = T.useRef(), r = T.useState({}), n =
|
|
3074
|
+
var t = T.useRef(), r = T.useState({}), n = K(r, 2), a = n[1];
|
|
3075
3075
|
if (!t.current)
|
|
3076
3076
|
if (e)
|
|
3077
3077
|
t.current = e;
|
|
@@ -3122,7 +3122,7 @@ var Ln = /* @__PURE__ */ T.createContext({
|
|
|
3122
3122
|
})
|
|
3123
3123
|
}, o);
|
|
3124
3124
|
}, Fu = ["name", "initialValues", "fields", "form", "preserve", "children", "component", "validateMessages", "validateTrigger", "onValuesChange", "onFieldsChange", "onFinish", "onFinishFailed", "clearOnDestroy"], Tu = function(t, r) {
|
|
3125
|
-
var n = t.name, a = t.initialValues, o = t.fields, i = t.form, s = t.preserve, l = t.children, c = t.component, u = c === void 0 ? "form" : c, d = t.validateMessages, g = t.validateTrigger, m = g === void 0 ? "onChange" : g, v = t.onValuesChange, h = t.onFieldsChange, f = t.onFinish, y = t.onFinishFailed, p = t.clearOnDestroy, S = mt(t, Fu), O = T.useRef(null), C = T.useContext(Ln), _ = Oi(i), b =
|
|
3125
|
+
var n = t.name, a = t.initialValues, o = t.fields, i = t.form, s = t.preserve, l = t.children, c = t.component, u = c === void 0 ? "form" : c, d = t.validateMessages, g = t.validateTrigger, m = g === void 0 ? "onChange" : g, v = t.onValuesChange, h = t.onFieldsChange, f = t.onFinish, y = t.onFinishFailed, p = t.clearOnDestroy, S = mt(t, Fu), O = T.useRef(null), C = T.useContext(Ln), _ = Oi(i), b = K(_, 1), P = b[0], A = P.getInternalHooks(Ot), M = A.useSubscribe, I = A.setInitialValues, D = A.setCallbacks, $ = A.setValidateMessages, E = A.setPreserve, F = A.destroyForm;
|
|
3126
3126
|
T.useImperativeHandle(r, function() {
|
|
3127
3127
|
return V(V({}, P), {}, {
|
|
3128
3128
|
nativeElement: O.current
|
|
@@ -3203,7 +3203,7 @@ function Mu() {
|
|
|
3203
3203
|
t[r] = arguments[r];
|
|
3204
3204
|
var n = t[0], a = t[1], o = a === void 0 ? {} : a, i = jl(o) ? {
|
|
3205
3205
|
form: o
|
|
3206
|
-
} : o, s = i.form, l = Q(), c =
|
|
3206
|
+
} : o, s = i.form, l = Q(), c = K(l, 2), u = c[0], d = c[1], g = Ft(function() {
|
|
3207
3207
|
return io(u);
|
|
3208
3208
|
}, [u]), m = he(g);
|
|
3209
3209
|
m.current = g;
|
|
@@ -3468,9 +3468,9 @@ var xa = /* @__PURE__ */ (function() {
|
|
|
3468
3468
|
if (!this.has(r)) {
|
|
3469
3469
|
if (this.size() + 1 > e.MAX_CACHE_SIZE + e.MAX_CACHE_OFFSET) {
|
|
3470
3470
|
var o = this.keys.reduce(function(c, u) {
|
|
3471
|
-
var d =
|
|
3471
|
+
var d = K(c, 2), g = d[1];
|
|
3472
3472
|
return a.internalGet(u)[1] < g ? [u, a.internalGet(u)[1]] : c;
|
|
3473
|
-
}, [this.keys[0], this.cacheCallTimes]), i =
|
|
3473
|
+
}, [this.keys[0], this.cacheCallTimes]), i = K(o, 1), s = i[0];
|
|
3474
3474
|
this.delete(s);
|
|
3475
3475
|
}
|
|
3476
3476
|
this.keys.push(r);
|
|
@@ -3571,13 +3571,13 @@ var Vr = function(t) {
|
|
|
3571
3571
|
return "--".concat(r ? "".concat(r, "-") : "").concat(t).replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g, "$1-$2").replace(/([a-z])([A-Z0-9])/g, "$1-$2").toLowerCase();
|
|
3572
3572
|
}, qu = function(t, r, n) {
|
|
3573
3573
|
return Object.keys(t).length ? ".".concat(r).concat(n != null && n.scope ? ".".concat(n.scope) : "", "{").concat(Object.entries(t).map(function(a) {
|
|
3574
|
-
var o =
|
|
3574
|
+
var o = K(a, 2), i = o[0], s = o[1];
|
|
3575
3575
|
return "".concat(i, ":").concat(s, ";");
|
|
3576
3576
|
}).join(""), "}") : "";
|
|
3577
3577
|
}, Ai = function(t, r, n) {
|
|
3578
3578
|
var a = {}, o = {};
|
|
3579
3579
|
return Object.entries(t).forEach(function(i) {
|
|
3580
|
-
var s, l, c =
|
|
3580
|
+
var s, l, c = K(i, 2), u = c[0], d = c[1];
|
|
3581
3581
|
if (n != null && (s = n.preserve) !== null && s !== void 0 && s[u])
|
|
3582
3582
|
o[u] = d;
|
|
3583
3583
|
else if ((typeof d == "string" || typeof d == "number") && !(n != null && (l = n.ignore) !== null && l !== void 0 && l[u])) {
|
|
@@ -3638,7 +3638,7 @@ if (process.env.NODE_ENV !== "production" && typeof module < "u" && module && mo
|
|
|
3638
3638
|
function Ea(e, t, r, n, a) {
|
|
3639
3639
|
var o = T.useContext(Cr), i = o.cache, s = [e].concat(Y(t)), l = kn(s), c = ed([l]), u = nd(), d = function(h) {
|
|
3640
3640
|
i.opUpdate(l, function(f) {
|
|
3641
|
-
var y = f || [void 0, void 0], p =
|
|
3641
|
+
var y = f || [void 0, void 0], p = K(y, 2), S = p[0], O = S === void 0 ? 0 : S, C = p[1], _ = C;
|
|
3642
3642
|
process.env.NODE_ENV !== "production" && C && u && (n?.(_, u), _ = null);
|
|
3643
3643
|
var b = _ || r(), P = [O, b];
|
|
3644
3644
|
return h ? h(P) : P;
|
|
@@ -3659,11 +3659,11 @@ function Ea(e, t, r, n, a) {
|
|
|
3659
3659
|
a?.(m);
|
|
3660
3660
|
}, function(v) {
|
|
3661
3661
|
return d(function(h) {
|
|
3662
|
-
var f =
|
|
3662
|
+
var f = K(h, 2), y = f[0], p = f[1];
|
|
3663
3663
|
return v && y === 0 && a?.(m), [y + 1, p];
|
|
3664
3664
|
}), function() {
|
|
3665
3665
|
i.opUpdate(l, function(h) {
|
|
3666
|
-
var f = h || [], y =
|
|
3666
|
+
var f = h || [], y = K(f, 2), p = y[0], S = p === void 0 ? 0 : p, O = y[1], C = S - 1;
|
|
3667
3667
|
return C === 0 ? (c(function() {
|
|
3668
3668
|
(v || !i.opGet(l)) && n?.(O, !1);
|
|
3669
3669
|
}), null) : [S - 1, O];
|
|
@@ -3711,7 +3711,7 @@ function fd(e, t) {
|
|
|
3711
3711
|
ignore: g.ignore,
|
|
3712
3712
|
unitless: g.unitless,
|
|
3713
3713
|
preserve: g.preserve
|
|
3714
|
-
}), b =
|
|
3714
|
+
}), b = K(_, 2);
|
|
3715
3715
|
S = b[0], C = b[1];
|
|
3716
3716
|
}
|
|
3717
3717
|
var P = fo(S, s);
|
|
@@ -3723,7 +3723,7 @@ function fd(e, t) {
|
|
|
3723
3723
|
}, function(p) {
|
|
3724
3724
|
ud(p[0]._themeKey, a);
|
|
3725
3725
|
}, function(p) {
|
|
3726
|
-
var S =
|
|
3726
|
+
var S = K(p, 4), O = S[0], C = S[3];
|
|
3727
3727
|
if (g && C) {
|
|
3728
3728
|
var _ = Tt(C, hr("css-variables-".concat(O._themeKey)), {
|
|
3729
3729
|
mark: st,
|
|
@@ -3737,7 +3737,7 @@ function fd(e, t) {
|
|
|
3737
3737
|
return y;
|
|
3738
3738
|
}
|
|
3739
3739
|
var gd = function(t, r, n) {
|
|
3740
|
-
var a =
|
|
3740
|
+
var a = K(t, 5), o = a[2], i = a[3], s = a[4], l = n || {}, c = l.plain;
|
|
3741
3741
|
if (!i)
|
|
3742
3742
|
return null;
|
|
3743
3743
|
var u = o._tokenKey, d = -999, g = {
|
|
@@ -4095,7 +4095,7 @@ function Id() {
|
|
|
4095
4095
|
e.className = po, e.style.position = "fixed", e.style.visibility = "hidden", e.style.top = "-9999px", document.body.appendChild(e);
|
|
4096
4096
|
var t = getComputedStyle(e).content || "";
|
|
4097
4097
|
t = t.replace(/^"/, "").replace(/"$/, ""), t.split(";").forEach(function(a) {
|
|
4098
|
-
var o = a.split(":"), i =
|
|
4098
|
+
var o = a.split(":"), i = K(o, 2), s = i[0], l = i[1];
|
|
4099
4099
|
Pt[s] = l;
|
|
4100
4100
|
});
|
|
4101
4101
|
var r = document.querySelector("style[".concat(po, "]"));
|
|
@@ -4148,7 +4148,7 @@ var Ld = function e(t) {
|
|
|
4148
4148
|
var _ = e(O.style, r, {
|
|
4149
4149
|
root: !1,
|
|
4150
4150
|
parentSelectors: i
|
|
4151
|
-
}), b =
|
|
4151
|
+
}), b = K(_, 1), P = b[0];
|
|
4152
4152
|
f[C] = "@keyframes ".concat(O.getName(s)).concat(P);
|
|
4153
4153
|
}
|
|
4154
4154
|
}
|
|
@@ -4180,7 +4180,7 @@ var Ld = function e(t) {
|
|
|
4180
4180
|
root: I,
|
|
4181
4181
|
injectHash: A,
|
|
4182
4182
|
parentSelectors: [].concat(Y(i), [M])
|
|
4183
|
-
}), $ =
|
|
4183
|
+
}), $ = K(D, 2), E = $[0], F = $[1];
|
|
4184
4184
|
f = V(V({}, f), F), h += "".concat(M).concat(E);
|
|
4185
4185
|
} else {
|
|
4186
4186
|
let j = function(k, L) {
|
|
@@ -4227,7 +4227,7 @@ function qn(e, t) {
|
|
|
4227
4227
|
function() {
|
|
4228
4228
|
var $ = _.join("|");
|
|
4229
4229
|
if (Nd($)) {
|
|
4230
|
-
var E = jd($), F =
|
|
4230
|
+
var E = jd($), F = K(E, 2), w = F[0], R = F[1];
|
|
4231
4231
|
if (w)
|
|
4232
4232
|
return [w, C, R, {}, s, c];
|
|
4233
4233
|
}
|
|
@@ -4238,12 +4238,12 @@ function qn(e, t) {
|
|
|
4238
4238
|
path: n.join("-"),
|
|
4239
4239
|
transformers: y,
|
|
4240
4240
|
linters: p
|
|
4241
|
-
}), L =
|
|
4241
|
+
}), L = K(k, 2), H = L[0], B = L[1], W = Hr(H), U = qi(_, W);
|
|
4242
4242
|
return [W, C, U, B, s, c];
|
|
4243
4243
|
},
|
|
4244
4244
|
// Remove cache if no need
|
|
4245
4245
|
function($, E) {
|
|
4246
|
-
var F =
|
|
4246
|
+
var F = K($, 3), w = F[2];
|
|
4247
4247
|
(E || d) && Bn && Mi(w, {
|
|
4248
4248
|
mark: st,
|
|
4249
4249
|
attachTo: h
|
|
@@ -4251,7 +4251,7 @@ function qn(e, t) {
|
|
|
4251
4251
|
},
|
|
4252
4252
|
// Effect: Inject style here
|
|
4253
4253
|
function($) {
|
|
4254
|
-
var E =
|
|
4254
|
+
var E = K($, 4), F = E[0];
|
|
4255
4255
|
E[1];
|
|
4256
4256
|
var w = E[2], R = E[3];
|
|
4257
4257
|
if (b && F !== Bi) {
|
|
@@ -4278,7 +4278,7 @@ function qn(e, t) {
|
|
|
4278
4278
|
});
|
|
4279
4279
|
}
|
|
4280
4280
|
}
|
|
4281
|
-
), A =
|
|
4281
|
+
), A = K(P, 3), M = A[0], I = A[1], D = A[2];
|
|
4282
4282
|
return function($) {
|
|
4283
4283
|
var E;
|
|
4284
4284
|
return !f || b || !m ? E = /* @__PURE__ */ T.createElement(Dd, null) : E = /* @__PURE__ */ T.createElement("style", lt({}, x(x({}, Wt, I), st, D), {
|
|
@@ -4289,7 +4289,7 @@ function qn(e, t) {
|
|
|
4289
4289
|
};
|
|
4290
4290
|
}
|
|
4291
4291
|
var kd = function(t, r, n) {
|
|
4292
|
-
var a =
|
|
4292
|
+
var a = K(t, 6), o = a[0], i = a[1], s = a[2], l = a[3], c = a[4], u = a[5], d = n || {}, g = d.plain;
|
|
4293
4293
|
if (c)
|
|
4294
4294
|
return null;
|
|
4295
4295
|
var m = o, v = {
|
|
@@ -4310,16 +4310,16 @@ var kd = function(t, r, n) {
|
|
|
4310
4310
|
unitless: o,
|
|
4311
4311
|
ignore: i,
|
|
4312
4312
|
scope: c
|
|
4313
|
-
}), p =
|
|
4313
|
+
}), p = K(y, 2), S = p[0], O = p[1], C = qi(v, O);
|
|
4314
4314
|
return [S, O, C, n];
|
|
4315
4315
|
}, function(f) {
|
|
4316
|
-
var y =
|
|
4316
|
+
var y = K(f, 3), p = y[2];
|
|
4317
4317
|
Bn && Mi(p, {
|
|
4318
4318
|
mark: st,
|
|
4319
4319
|
attachTo: g
|
|
4320
4320
|
});
|
|
4321
4321
|
}, function(f) {
|
|
4322
|
-
var y =
|
|
4322
|
+
var y = K(f, 3), p = y[1], S = y[2];
|
|
4323
4323
|
if (p) {
|
|
4324
4324
|
var O = Tt(p, S, {
|
|
4325
4325
|
mark: st,
|
|
@@ -4332,7 +4332,7 @@ var kd = function(t, r, n) {
|
|
|
4332
4332
|
});
|
|
4333
4333
|
return h;
|
|
4334
4334
|
}, Bd = function(t, r, n) {
|
|
4335
|
-
var a =
|
|
4335
|
+
var a = K(t, 4), o = a[1], i = a[2], s = a[3], l = n || {}, c = l.plain;
|
|
4336
4336
|
if (!o)
|
|
4337
4337
|
return null;
|
|
4338
4338
|
var u = -999, d = {
|
|
@@ -5380,7 +5380,7 @@ function $o(e, t, r, n) {
|
|
|
5380
5380
|
if (n != null && n.deprecatedTokens) {
|
|
5381
5381
|
var o = n.deprecatedTokens;
|
|
5382
5382
|
o.forEach(function(s) {
|
|
5383
|
-
var l =
|
|
5383
|
+
var l = K(s, 2), c = l[0], u = l[1];
|
|
5384
5384
|
if (process.env.NODE_ENV !== "production" && we(!(a != null && a[c]), "Component Token `".concat(String(c), "` of ").concat(String(e), " is deprecated. Please use `").concat(String(u), "` instead.")), a != null && a[c] || a != null && a[u]) {
|
|
5385
5385
|
var d;
|
|
5386
5386
|
(d = a[u]) !== null && d !== void 0 || (a[u] = a?.[c]);
|
|
@@ -5542,7 +5542,7 @@ function Ff(e) {
|
|
|
5542
5542
|
prefixToken: y
|
|
5543
5543
|
}), _ = u(g, m, v, C), b = c(f, v, C);
|
|
5544
5544
|
return function(P) {
|
|
5545
|
-
var A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : P, M = _(P, A), I =
|
|
5545
|
+
var A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : P, M = _(P, A), I = K(M, 2), D = I[1], $ = b(A), E = K($, 2), F = E[0], w = E[1];
|
|
5546
5546
|
return [F, D, w];
|
|
5547
5547
|
};
|
|
5548
5548
|
}
|
|
@@ -5578,7 +5578,7 @@ function Ff(e) {
|
|
|
5578
5578
|
return C;
|
|
5579
5579
|
}
|
|
5580
5580
|
function u(g, m, v) {
|
|
5581
|
-
var h = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, f = Array.isArray(g) ? g : [g, g], y =
|
|
5581
|
+
var h = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, f = Array.isArray(g) ? g : [g, g], y = K(f, 1), p = y[0], S = f.join("-"), O = e.layer || {
|
|
5582
5582
|
name: "antd"
|
|
5583
5583
|
};
|
|
5584
5584
|
return function(C) {
|
|
@@ -6149,7 +6149,7 @@ var qf = /* @__PURE__ */ (function(e) {
|
|
|
6149
6149
|
function Gf(e) {
|
|
6150
6150
|
var t = T.useReducer(function(s) {
|
|
6151
6151
|
return s + 1;
|
|
6152
|
-
}, 0), r =
|
|
6152
|
+
}, 0), r = K(t, 2), n = r[1], a = T.useRef(e), o = ur(function() {
|
|
6153
6153
|
return a.current;
|
|
6154
6154
|
}), i = ur(function(s) {
|
|
6155
6155
|
a.current = typeof s == "function" ? s(a.current) : s, n();
|
|
@@ -6276,7 +6276,7 @@ function Os(e) {
|
|
|
6276
6276
|
return e === Dt || e === Fa;
|
|
6277
6277
|
}
|
|
6278
6278
|
const rg = (function(e, t, r) {
|
|
6279
|
-
var n = dr(Ao), a =
|
|
6279
|
+
var n = dr(Ao), a = K(n, 2), o = a[0], i = a[1], s = Zf(), l = K(s, 2), c = l[0], u = l[1];
|
|
6280
6280
|
function d() {
|
|
6281
6281
|
i(it, !0);
|
|
6282
6282
|
}
|
|
@@ -6298,7 +6298,7 @@ const rg = (function(e, t, r) {
|
|
|
6298
6298
|
}, []), [d, o];
|
|
6299
6299
|
});
|
|
6300
6300
|
function ng(e, t, r, n) {
|
|
6301
|
-
var a = n.motionEnter, o = a === void 0 ? !0 : a, i = n.motionAppear, s = i === void 0 ? !0 : i, l = n.motionLeave, c = l === void 0 ? !0 : l, u = n.motionDeadline, d = n.motionLeaveImmediately, g = n.onAppearPrepare, m = n.onEnterPrepare, v = n.onLeavePrepare, h = n.onAppearStart, f = n.onEnterStart, y = n.onLeaveStart, p = n.onAppearActive, S = n.onEnterActive, O = n.onLeaveActive, C = n.onAppearEnd, _ = n.onEnterEnd, b = n.onLeaveEnd, P = n.onVisibleChanged, A = dr(), M =
|
|
6301
|
+
var a = n.motionEnter, o = a === void 0 ? !0 : a, i = n.motionAppear, s = i === void 0 ? !0 : i, l = n.motionLeave, c = l === void 0 ? !0 : l, u = n.motionDeadline, d = n.motionLeaveImmediately, g = n.onAppearPrepare, m = n.onEnterPrepare, v = n.onLeavePrepare, h = n.onAppearStart, f = n.onEnterStart, y = n.onLeaveStart, p = n.onAppearActive, S = n.onEnterActive, O = n.onLeaveActive, C = n.onAppearEnd, _ = n.onEnterEnd, b = n.onLeaveEnd, P = n.onVisibleChanged, A = dr(), M = K(A, 2), I = M[0], D = M[1], $ = Gf(xt), E = K($, 2), F = E[0], w = E[1], R = dr(null), j = K(R, 2), k = j[0], L = j[1], H = F(), B = he(!1), W = he(null);
|
|
6302
6302
|
function U() {
|
|
6303
6303
|
return r();
|
|
6304
6304
|
}
|
|
@@ -6315,7 +6315,7 @@ function ng(e, t, r, n) {
|
|
|
6315
6315
|
Oe === Ar && te ? Se = C?.(ie, $e) : Oe === Ir && te ? Se = _?.(ie, $e) : Oe === Nr && te && (Se = b?.(ie, $e)), te && Se !== !1 && oe();
|
|
6316
6316
|
}
|
|
6317
6317
|
}
|
|
6318
|
-
}), de = Qf(le), ue =
|
|
6318
|
+
}), de = Qf(le), ue = K(de, 1), se = ue[0], me = function(Oe) {
|
|
6319
6319
|
switch (Oe) {
|
|
6320
6320
|
case Ar:
|
|
6321
6321
|
return x(x(x({}, it, g), Lt, h), Dt, p);
|
|
@@ -6342,7 +6342,7 @@ function ng(e, t, r, n) {
|
|
|
6342
6342
|
deadline: !0
|
|
6343
6343
|
});
|
|
6344
6344
|
}, u))), Ce === ps && oe(), tg;
|
|
6345
|
-
}), z =
|
|
6345
|
+
}), z = K(Te, 2), je = z[0], Ce = z[1], ke = Os(Ce);
|
|
6346
6346
|
J.current = ke;
|
|
6347
6347
|
var rt = he(null);
|
|
6348
6348
|
xs(function() {
|
|
@@ -6389,7 +6389,7 @@ function ag(e) {
|
|
|
6389
6389
|
return null;
|
|
6390
6390
|
}
|
|
6391
6391
|
}
|
|
6392
|
-
var C = ng(y, s, O, a), _ =
|
|
6392
|
+
var C = ng(y, s, O, a), _ = K(C, 4), b = _[0], P = _[1], A = _[2], M = _[3], I = T.useRef(M);
|
|
6393
6393
|
M && (I.current = !0);
|
|
6394
6394
|
var D = T.useCallback(function(j) {
|
|
6395
6395
|
p.current = j, hi(o, j);
|
|
@@ -6672,7 +6672,7 @@ const yg = (e) => {
|
|
|
6672
6672
|
tree: at,
|
|
6673
6673
|
colorPicker: Ct,
|
|
6674
6674
|
datePicker: sn,
|
|
6675
|
-
rangePicker:
|
|
6675
|
+
rangePicker: q,
|
|
6676
6676
|
flex: X,
|
|
6677
6677
|
wave: re,
|
|
6678
6678
|
dropdown: ne,
|
|
@@ -6761,7 +6761,7 @@ const yg = (e) => {
|
|
|
6761
6761
|
tree: at,
|
|
6762
6762
|
colorPicker: Ct,
|
|
6763
6763
|
datePicker: sn,
|
|
6764
|
-
rangePicker:
|
|
6764
|
+
rangePicker: q,
|
|
6765
6765
|
flex: X,
|
|
6766
6766
|
wave: re,
|
|
6767
6767
|
dropdown: ne,
|
|
@@ -7062,7 +7062,7 @@ er.displayName = "IconReact";
|
|
|
7062
7062
|
er.getTwoToneColors = Rg;
|
|
7063
7063
|
er.setTwoToneColors = Mg;
|
|
7064
7064
|
function Is(e) {
|
|
7065
|
-
var t = As(e), r =
|
|
7065
|
+
var t = As(e), r = K(t, 2), n = r[0], a = r[1];
|
|
7066
7066
|
return er.setTwoToneColors({
|
|
7067
7067
|
primaryColor: n,
|
|
7068
7068
|
secondaryColor: a
|
|
@@ -7080,7 +7080,7 @@ var on = /* @__PURE__ */ T.forwardRef(function(e, t) {
|
|
|
7080
7080
|
var f = o ? {
|
|
7081
7081
|
msTransform: "rotate(".concat(o, "deg)"),
|
|
7082
7082
|
transform: "rotate(".concat(o, "deg)")
|
|
7083
|
-
} : void 0, y = As(l), p =
|
|
7083
|
+
} : void 0, y = As(l), p = K(y, 2), S = p[0], O = p[1];
|
|
7084
7084
|
return /* @__PURE__ */ T.createElement("span", lt({
|
|
7085
7085
|
role: "img",
|
|
7086
7086
|
"aria-label": n.name
|
|
@@ -8294,12 +8294,12 @@ function lh({ onSearchChange: e }) {
|
|
|
8294
8294
|
e(t.trim());
|
|
8295
8295
|
}, 300);
|
|
8296
8296
|
return () => clearTimeout(n);
|
|
8297
|
-
}, [t, e]), /* @__PURE__ */ N("header", { className:
|
|
8297
|
+
}, [t, e]), /* @__PURE__ */ N("header", { className: G["chat-header"], children: /* @__PURE__ */ N(
|
|
8298
8298
|
Ws,
|
|
8299
8299
|
{
|
|
8300
8300
|
placeholder: "Поиск",
|
|
8301
8301
|
prefix: /* @__PURE__ */ N(gc, {}),
|
|
8302
|
-
className:
|
|
8302
|
+
className: G["chat-header__input"],
|
|
8303
8303
|
value: t,
|
|
8304
8304
|
onChange: (n) => r(n.target.value)
|
|
8305
8305
|
}
|
|
@@ -8595,41 +8595,41 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8595
8595
|
return;
|
|
8596
8596
|
}
|
|
8597
8597
|
t.current?.connected && t.current.disconnect(), console.log("connect true");
|
|
8598
|
-
const
|
|
8599
|
-
t.current =
|
|
8598
|
+
const q = ke ? Tc(`${c}:${h}`, { transports: ["websocket", "polling"], withCredentials: !0 }) : null;
|
|
8599
|
+
t.current = q, q && (q.on("connect", () => {
|
|
8600
8600
|
console.log("CHAT WEBSOCKET CONNECTED"), n(!0), o("connected");
|
|
8601
8601
|
const X = l.current?.user?.id;
|
|
8602
8602
|
if (!X) {
|
|
8603
8603
|
console.error("User ID is undefined");
|
|
8604
8604
|
return;
|
|
8605
8605
|
}
|
|
8606
|
-
|
|
8607
|
-
}),
|
|
8606
|
+
q.emit(I ?? "", X);
|
|
8607
|
+
}), q.on($ ?? "", (X) => {
|
|
8608
8608
|
console.log(`WS ${$}`, X), X.left && ut(X.left, !1), X.left && oe(X.left?.total_unread), X.right && nt(X.right), z(Mt().unix()), Ce({
|
|
8609
8609
|
message: "Новое уведомление.",
|
|
8610
8610
|
description: "",
|
|
8611
8611
|
type: "success"
|
|
8612
8612
|
});
|
|
8613
|
-
}),
|
|
8613
|
+
}), q.on(F ?? "", (X) => {
|
|
8614
8614
|
console.log(`WS ${F}`, X), X.sms && Ct(X.sms, X.sms.to, !0), z(Mt().unix()), Ce({
|
|
8615
8615
|
message: "Новое уведомление.",
|
|
8616
8616
|
description: "",
|
|
8617
8617
|
type: "success"
|
|
8618
8618
|
});
|
|
8619
|
-
}),
|
|
8619
|
+
}), q.on("disconnect", () => {
|
|
8620
8620
|
console.log("CHAT WEBSOCKET DISCONNECTED"), n(!1), o("disconnected");
|
|
8621
|
-
}),
|
|
8621
|
+
}), q.on("connect_error", () => {
|
|
8622
8622
|
console.log("CHAT WEBSOCKET CONNECT ERROR");
|
|
8623
8623
|
}));
|
|
8624
8624
|
}, [ke, m, h, c, d, y, I, $, F]);
|
|
8625
8625
|
fe(() => {
|
|
8626
8626
|
if (console.log("init", ke), ke && i && c && h && d) {
|
|
8627
8627
|
console.log("Attempting to connect with:", { HTTP_HOST: c, BFF_PORT: h, userdata: i });
|
|
8628
|
-
const
|
|
8628
|
+
const q = setTimeout(() => {
|
|
8629
8629
|
_e();
|
|
8630
8630
|
}, 0);
|
|
8631
8631
|
return () => {
|
|
8632
|
-
clearTimeout(
|
|
8632
|
+
clearTimeout(q), console.log("Cleaning up socket connection"), t.current?.disconnect();
|
|
8633
8633
|
};
|
|
8634
8634
|
} else
|
|
8635
8635
|
console.log("Connection conditions not met:", {
|
|
@@ -8643,12 +8643,15 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8643
8643
|
}, [L]), fe(() => {
|
|
8644
8644
|
k.current = R;
|
|
8645
8645
|
}, [R]), fe(() => {
|
|
8646
|
-
|
|
8646
|
+
if (!c) return;
|
|
8647
|
+
console.log("SET_PROD_AXIOS_INSTANCE");
|
|
8648
|
+
const q = Pc.create({
|
|
8647
8649
|
baseURL: c,
|
|
8648
8650
|
timeout: 3e5
|
|
8649
|
-
})
|
|
8651
|
+
});
|
|
8652
|
+
p(q);
|
|
8650
8653
|
}, [c]);
|
|
8651
|
-
const Ae = Ke(async (
|
|
8654
|
+
const Ae = Ke(async (q = null) => {
|
|
8652
8655
|
if (console.log("fetchChatsList"), console.log("PROD_AXIOS_INSTANCE:", y), console.log("post method exists:", y?.post), console.log("typeof post:", typeof y?.post), de(!0), m)
|
|
8653
8656
|
try {
|
|
8654
8657
|
if (!y || !S || !d) {
|
|
@@ -8657,7 +8660,7 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8657
8660
|
}
|
|
8658
8661
|
console.log("fetchChatsList true");
|
|
8659
8662
|
const X = await y.post(S, {
|
|
8660
|
-
data: { search:
|
|
8663
|
+
data: { search: q },
|
|
8661
8664
|
_token: d
|
|
8662
8665
|
});
|
|
8663
8666
|
X?.data?.content && (j(X?.data?.content?.sms), oe(X?.data?.content?.total_unread));
|
|
@@ -8668,18 +8671,18 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8668
8671
|
}
|
|
8669
8672
|
else
|
|
8670
8673
|
console.log("fetchChatsList PRODMODE false");
|
|
8671
|
-
}, [le, d, y, S]), $e = Ke(async (
|
|
8674
|
+
}, [le, d, y, S]), $e = Ke(async (q, X = null) => {
|
|
8672
8675
|
if (console.log("fetchChatMessages"), !ue && (se(!0), m))
|
|
8673
8676
|
try {
|
|
8674
8677
|
if (!y || !C || !d) return;
|
|
8675
|
-
const re = `${C}/${
|
|
8678
|
+
const re = `${C}/${q}`, ne = await y.post(re, {
|
|
8676
8679
|
data: {
|
|
8677
8680
|
last_id: X
|
|
8678
8681
|
},
|
|
8679
8682
|
_token: d
|
|
8680
8683
|
});
|
|
8681
|
-
ne?.data?.content && (U(
|
|
8682
|
-
chat_id:
|
|
8684
|
+
ne?.data?.content && (U(q), Se({
|
|
8685
|
+
chat_id: q,
|
|
8683
8686
|
who: ne?.data?.content?.who,
|
|
8684
8687
|
messages: ne?.data?.content?.messages,
|
|
8685
8688
|
total: ne?.data?.content?.total
|
|
@@ -8689,32 +8692,32 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8689
8692
|
} finally {
|
|
8690
8693
|
se(!1);
|
|
8691
8694
|
}
|
|
8692
|
-
}, [ue, d, y, C]), Oe = Ke(async ({ to:
|
|
8693
|
-
console.log("sendSms"), te({ to:
|
|
8695
|
+
}, [ue, d, y, C]), Oe = Ke(async ({ to: q, text: X, files: re, answer: ne, timestamp: ge, from_id: xe }) => {
|
|
8696
|
+
console.log("sendSms"), te({ to: q, text: X, answer: ne, timestamp: ge, from_id: xe }), be(!0);
|
|
8694
8697
|
try {
|
|
8695
8698
|
if (!y || !b || !d) return;
|
|
8696
8699
|
const Le = new FormData();
|
|
8697
8700
|
Le.append("_token", d), Le.append(
|
|
8698
8701
|
"data",
|
|
8699
8702
|
JSON.stringify({
|
|
8700
|
-
to:
|
|
8703
|
+
to: q,
|
|
8701
8704
|
text: X,
|
|
8702
8705
|
answer: ne,
|
|
8703
8706
|
timestamp: ge
|
|
8704
8707
|
})
|
|
8705
8708
|
), re && re.length > 0 && re.forEach((dt) => {
|
|
8706
8709
|
dt.originFileObj && Le.append("file[]", dt.originFileObj);
|
|
8707
|
-
}), console.log(
|
|
8710
|
+
}), console.log(q);
|
|
8708
8711
|
const Ye = await y.post(b, Le);
|
|
8709
|
-
console.log("[useSendSms] Ответ от сервера:", Ye), Ye.data && (at(Ye.data.id, Ye.data.timestamp, Ye.data.files,
|
|
8712
|
+
console.log("[useSendSms] Ответ от сервера:", Ye), Ye.data && (at(Ye.data.id, Ye.data.timestamp, Ye.data.files, q), ut(Ye.data.left, !0));
|
|
8710
8713
|
} catch (Le) {
|
|
8711
8714
|
console.error("[useSendSms] Ошибка:", Le);
|
|
8712
8715
|
} finally {
|
|
8713
8716
|
be(!1);
|
|
8714
8717
|
}
|
|
8715
|
-
}, [me, d, y, b]), ie = Ke(async (
|
|
8718
|
+
}, [me, d, y, b]), ie = Ke(async (q) => {
|
|
8716
8719
|
console.log("markMessagesAsRead");
|
|
8717
|
-
for (const X of
|
|
8720
|
+
for (const X of q)
|
|
8718
8721
|
if (m)
|
|
8719
8722
|
try {
|
|
8720
8723
|
if (!y || !A || !d) return;
|
|
@@ -8727,7 +8730,7 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8727
8730
|
}
|
|
8728
8731
|
else
|
|
8729
8732
|
console.log(`/api/sms/read/${X}`);
|
|
8730
|
-
}, [d, y, A]), te = ({ to:
|
|
8733
|
+
}, [d, y, A]), te = ({ to: q, text: X, answer: re, timestamp: ne, from_id: ge }) => {
|
|
8731
8734
|
nt({
|
|
8732
8735
|
from_id: ge,
|
|
8733
8736
|
id: ne,
|
|
@@ -8739,46 +8742,46 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8739
8742
|
status: !1,
|
|
8740
8743
|
isLocal: !0,
|
|
8741
8744
|
isSending: !0
|
|
8742
|
-
},
|
|
8743
|
-
}, Se = (
|
|
8744
|
-
const X = B.current.find((re) => +re.chat_id == +
|
|
8745
|
+
}, q);
|
|
8746
|
+
}, Se = (q) => {
|
|
8747
|
+
const X = B.current.find((re) => +re.chat_id == +q.chat_id);
|
|
8745
8748
|
if (!X)
|
|
8746
|
-
console.log("BEFORE UPDATE CHATS fetchChatMessages", B.current), H((re) => [...re,
|
|
8749
|
+
console.log("BEFORE UPDATE CHATS fetchChatMessages", B.current), H((re) => [...re, q]);
|
|
8747
8750
|
else {
|
|
8748
8751
|
const re = {
|
|
8749
8752
|
...X,
|
|
8750
|
-
messages: [...
|
|
8753
|
+
messages: [...q.messages, ...X.messages]
|
|
8751
8754
|
};
|
|
8752
8755
|
H((ne) => ne.map((ge) => ge.chat_id === re.chat_id ? re : ge));
|
|
8753
8756
|
}
|
|
8754
|
-
}, ut = (
|
|
8757
|
+
}, ut = (q, X = !0) => {
|
|
8755
8758
|
j((re) => {
|
|
8756
8759
|
let ne = -1;
|
|
8757
|
-
return X ? ne = re.findIndex((ge) => ge.chat_id ===
|
|
8760
|
+
return X ? ne = re.findIndex((ge) => ge.chat_id === q.chat_id) : ne = re.findIndex((ge) => ge.chat_id === q.from.id), ne === -1 ? [
|
|
8758
8761
|
re[0],
|
|
8759
|
-
|
|
8762
|
+
q,
|
|
8760
8763
|
...re.slice(1)
|
|
8761
8764
|
] : re.map((ge, xe) => xe === ne ? {
|
|
8762
|
-
...
|
|
8763
|
-
count_unread: X ? ge.count_unread :
|
|
8765
|
+
...q,
|
|
8766
|
+
count_unread: X ? ge.count_unread : q.count_unread
|
|
8764
8767
|
} : ge);
|
|
8765
8768
|
});
|
|
8766
|
-
}, nt = (
|
|
8769
|
+
}, nt = (q, X = null) => {
|
|
8767
8770
|
H((re) => {
|
|
8768
|
-
const ne = X ||
|
|
8771
|
+
const ne = X || q.from_id, ge = re.findIndex((xe) => xe.chat_id === ne);
|
|
8769
8772
|
return ge === -1 ? (console.log("Chat not found, might need to fetch chats list"), re) : re.map((xe, Le) => Le === ge ? {
|
|
8770
8773
|
...xe,
|
|
8771
|
-
messages: [...xe.messages,
|
|
8774
|
+
messages: [...xe.messages, q]
|
|
8772
8775
|
} : xe);
|
|
8773
8776
|
});
|
|
8774
|
-
}, at = (
|
|
8777
|
+
}, at = (q, X, re, ne) => {
|
|
8775
8778
|
H((ge) => {
|
|
8776
8779
|
const xe = ge.findIndex((Le) => Le.chat_id === ne);
|
|
8777
8780
|
return xe === -1 ? (console.log("Chat not found, might need to fetch chats list"), ge) : ge.map((Le, Ye) => {
|
|
8778
8781
|
if (Ye === xe) {
|
|
8779
8782
|
const dt = Le.messages.map((rr) => rr.created_at === X ? {
|
|
8780
8783
|
...rr,
|
|
8781
|
-
id:
|
|
8784
|
+
id: q,
|
|
8782
8785
|
isSending: !1,
|
|
8783
8786
|
files: re
|
|
8784
8787
|
} : rr);
|
|
@@ -8790,14 +8793,14 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8790
8793
|
return Le;
|
|
8791
8794
|
});
|
|
8792
8795
|
});
|
|
8793
|
-
}, Ct = (
|
|
8796
|
+
}, Ct = (q, X, re = !0) => {
|
|
8794
8797
|
H((ne) => {
|
|
8795
8798
|
let ge = -1;
|
|
8796
|
-
return re ? ge = ne.findIndex((xe) => xe.chat_id === X) : ge = ne.findIndex((xe) => xe.chat_id ===
|
|
8799
|
+
return re ? ge = ne.findIndex((xe) => xe.chat_id === X) : ge = ne.findIndex((xe) => xe.chat_id === q.from), ge === -1 ? (console.log("Chat not found, might need to fetch chats list"), ne) : ne.map((xe, Le) => {
|
|
8797
8800
|
if (Le === ge) {
|
|
8798
|
-
const Ye = xe.messages.map((dt) => dt.created_at ===
|
|
8801
|
+
const Ye = xe.messages.map((dt) => dt.created_at === q.created_at ? {
|
|
8799
8802
|
...dt,
|
|
8800
|
-
status:
|
|
8803
|
+
status: q.status
|
|
8801
8804
|
} : dt);
|
|
8802
8805
|
return {
|
|
8803
8806
|
...xe,
|
|
@@ -8807,10 +8810,10 @@ const Mt = /* @__PURE__ */ ii(fh), Us = Zr(void 0), gh = ({ children: e }) => {
|
|
|
8807
8810
|
return xe;
|
|
8808
8811
|
});
|
|
8809
8812
|
});
|
|
8810
|
-
}, sn = (
|
|
8813
|
+
}, sn = (q, X) => {
|
|
8811
8814
|
j((re) => {
|
|
8812
8815
|
let ne = -1;
|
|
8813
|
-
return ne = re.findIndex((ge) => ge.chat_id ===
|
|
8816
|
+
return ne = re.findIndex((ge) => ge.chat_id === q), re.map((ge, xe) => xe === ne ? {
|
|
8814
8817
|
...ge,
|
|
8815
8818
|
count_unread: X
|
|
8816
8819
|
} : ge);
|
|
@@ -8910,19 +8913,19 @@ function hh({ search: e, onSelectChat: t, selectedChatId: r }) {
|
|
|
8910
8913
|
files: []
|
|
8911
8914
|
}), m;
|
|
8912
8915
|
}, [a, e, i, s, l]);
|
|
8913
|
-
return /* @__PURE__ */ N("div", { className:
|
|
8916
|
+
return /* @__PURE__ */ N("div", { className: G["chat-list__container"], children: /* @__PURE__ */ N("ul", { className: G["chat-list"], children: u.map((d, g) => {
|
|
8914
8917
|
const m = s(d), v = l(d, m, d.chat_id === i), h = d.chat_id === r, f = d.text;
|
|
8915
8918
|
return /* @__PURE__ */ N("div", { children: /* @__PURE__ */ Ee(
|
|
8916
8919
|
"li",
|
|
8917
8920
|
{
|
|
8918
|
-
className: `${
|
|
8921
|
+
className: `${G.chatItem} ${h ? G.activeChatItem : ""}`,
|
|
8919
8922
|
onClick: () => {
|
|
8920
8923
|
t(d.chat_id ?? null);
|
|
8921
8924
|
},
|
|
8922
8925
|
children: [
|
|
8923
8926
|
/* @__PURE__ */ Ee("div", { children: [
|
|
8924
|
-
/* @__PURE__ */ N("div", { className:
|
|
8925
|
-
/* @__PURE__ */ N("div", { className:
|
|
8927
|
+
/* @__PURE__ */ N("div", { className: G.companionName, children: v || "Неизвестный" }),
|
|
8928
|
+
/* @__PURE__ */ N("div", { className: G["last-message"], children: c(f, 50) })
|
|
8926
8929
|
] }),
|
|
8927
8930
|
/* @__PURE__ */ N(ic, { count: d.count_unread })
|
|
8928
8931
|
]
|
|
@@ -8950,7 +8953,7 @@ function vh({ draggable: e, setDraggable: t, position: r, setPosition: n }) {
|
|
|
8950
8953
|
] });
|
|
8951
8954
|
return /* @__PURE__ */ Ee("div", { hidden: !0, children: [
|
|
8952
8955
|
/* @__PURE__ */ N("button", { children: "Send" }),
|
|
8953
|
-
/* @__PURE__ */ N("footer", { hidden: !0, className:
|
|
8956
|
+
/* @__PURE__ */ N("footer", { hidden: !0, className: G["chat-footer"], children: /* @__PURE__ */ Ee(Yo.Compact, { children: [
|
|
8954
8957
|
/* @__PURE__ */ N(
|
|
8955
8958
|
ir,
|
|
8956
8959
|
{
|
|
@@ -8976,14 +8979,14 @@ function vh({ draggable: e, setDraggable: t, position: r, setPosition: n }) {
|
|
|
8976
8979
|
const { Content: ph } = Bt;
|
|
8977
8980
|
function mh({ onSelectChat: e, selectedChatId: t }) {
|
|
8978
8981
|
const [r, n] = Q(!1), [a, o] = Q("topLeft"), [i, s] = Q("");
|
|
8979
|
-
return /* @__PURE__ */ Ee(Bt, { className:
|
|
8982
|
+
return /* @__PURE__ */ Ee(Bt, { className: G["sidebar-layout"], children: [
|
|
8980
8983
|
/* @__PURE__ */ N(
|
|
8981
8984
|
lh,
|
|
8982
8985
|
{
|
|
8983
8986
|
onSearchChange: s
|
|
8984
8987
|
}
|
|
8985
8988
|
),
|
|
8986
|
-
/* @__PURE__ */ N(ph, { className:
|
|
8989
|
+
/* @__PURE__ */ N(ph, { className: G["sidebar-content"], children: /* @__PURE__ */ N(
|
|
8987
8990
|
hh,
|
|
8988
8991
|
{
|
|
8989
8992
|
search: i,
|
|
@@ -9026,7 +9029,7 @@ function yh({ onSend: e }) {
|
|
|
9026
9029
|
const v = o.indexOf(m), h = o.slice();
|
|
9027
9030
|
h.splice(v, 1), i(h);
|
|
9028
9031
|
}, g = Ke(() => !1, []);
|
|
9029
|
-
return /* @__PURE__ */ Ee("div", { className:
|
|
9032
|
+
return /* @__PURE__ */ Ee("div", { className: G.chat_inputs, children: [
|
|
9030
9033
|
/* @__PURE__ */ N(
|
|
9031
9034
|
ir,
|
|
9032
9035
|
{
|
|
@@ -9058,7 +9061,7 @@ function yh({ onSend: e }) {
|
|
|
9058
9061
|
/* @__PURE__ */ N(
|
|
9059
9062
|
cc.TextArea,
|
|
9060
9063
|
{
|
|
9061
|
-
className:
|
|
9064
|
+
className: G.textArea,
|
|
9062
9065
|
value: t,
|
|
9063
9066
|
onChange: (m) => r(m.target.value),
|
|
9064
9067
|
onKeyDown: c,
|
|
@@ -9097,7 +9100,7 @@ const bh = ({ children: e }) => /* @__PURE__ */ Ee(lc, { orientation: "center",
|
|
|
9097
9100
|
function Sh({ message: e }) {
|
|
9098
9101
|
const { text: t, files: r, timestamp: n, isSending: a, status: o } = e, {
|
|
9099
9102
|
HTTP_HOST: i
|
|
9100
|
-
} = tr(), s = `message ${
|
|
9103
|
+
} = tr(), s = `message ${G.message} ${G.myMessage} ${a ? G.localMessage : ""}`, l = `${G.bubble} ${G.myMessageBubble}`, c = (u) => {
|
|
9101
9104
|
switch (u) {
|
|
9102
9105
|
// Изображения
|
|
9103
9106
|
case "jpg":
|
|
@@ -9154,11 +9157,11 @@ function Sh({ message: e }) {
|
|
|
9154
9157
|
};
|
|
9155
9158
|
return /* @__PURE__ */ N("div", { className: s, "data-id": e.id, "data-message-id": e.id, children: /* @__PURE__ */ Ee("div", { className: l, children: [
|
|
9156
9159
|
/* @__PURE__ */ N("span", { children: t }),
|
|
9157
|
-
/* @__PURE__ */ N("div", { className:
|
|
9158
|
-
/* @__PURE__ */ N("div", { className: `${
|
|
9159
|
-
/* @__PURE__ */ N("p", { className:
|
|
9160
|
+
/* @__PURE__ */ N("div", { className: G.files_container, children: r && r.length > 0 && r.map((u, d) => /* @__PURE__ */ Ee("a", { href: `${i}/${u.route}`, target: "_blank", className: G.file, children: [
|
|
9161
|
+
/* @__PURE__ */ N("div", { className: `${G.file_circle} ${G.self}`, children: c(u.extension) }),
|
|
9162
|
+
/* @__PURE__ */ N("p", { className: G.href_label, children: u?.name })
|
|
9160
9163
|
] }, `file-${u.id}-${d}`)) }),
|
|
9161
|
-
/* @__PURE__ */ Ee("div", { className:
|
|
9164
|
+
/* @__PURE__ */ Ee("div", { className: G.time, style: { display: "flex", justifyContent: "flex-end", height: "18px" }, children: [
|
|
9162
9165
|
/* @__PURE__ */ N("div", { children: Mt(+n * 1e3).format("HH:mm") }),
|
|
9163
9166
|
!a && /* @__PURE__ */ Ee(
|
|
9164
9167
|
"span",
|
|
@@ -9177,7 +9180,7 @@ function Sh({ message: e }) {
|
|
|
9177
9180
|
}
|
|
9178
9181
|
)
|
|
9179
9182
|
] }),
|
|
9180
|
-
a && /* @__PURE__ */ N("span", { className:
|
|
9183
|
+
a && /* @__PURE__ */ N("span", { className: G.sending, children: " • отправляется..." })
|
|
9181
9184
|
] }) });
|
|
9182
9185
|
}
|
|
9183
9186
|
function Ch({ message: e }) {
|
|
@@ -9240,14 +9243,14 @@ function Ch({ message: e }) {
|
|
|
9240
9243
|
return /* @__PURE__ */ N(Qo, { style: { fontSize: "25px", color: "#555555" } });
|
|
9241
9244
|
}
|
|
9242
9245
|
};
|
|
9243
|
-
return /* @__PURE__ */ N("div", { className: `message ${
|
|
9244
|
-
/* @__PURE__ */ N("div", { className:
|
|
9246
|
+
return /* @__PURE__ */ N("div", { className: `message ${G.message} ${G.otherMessage}`, "data-message-id": e.id, "data-id": e.id, children: /* @__PURE__ */ Ee("div", { className: `${G.bubble} ${G.otherMessageBubble}`, children: [
|
|
9247
|
+
/* @__PURE__ */ N("div", { className: G.senderName, children: a }),
|
|
9245
9248
|
/* @__PURE__ */ N("span", { children: t }),
|
|
9246
|
-
/* @__PURE__ */ N("div", { className:
|
|
9247
|
-
/* @__PURE__ */ N("div", { className: `${
|
|
9248
|
-
/* @__PURE__ */ N("p", { className:
|
|
9249
|
+
/* @__PURE__ */ N("div", { className: G.files_container, children: r && r.length > 0 && r.map((s, l) => /* @__PURE__ */ Ee("a", { href: `${o}/${s.route}`, target: "_blank", className: G.file, children: [
|
|
9250
|
+
/* @__PURE__ */ N("div", { className: `${G.file_circle}`, children: i(s.extension) }),
|
|
9251
|
+
/* @__PURE__ */ N("p", { className: G.href_label, children: s?.name })
|
|
9249
9252
|
] }, `file-${s.id}-${l}`)) }),
|
|
9250
|
-
/* @__PURE__ */ N("div", { className:
|
|
9253
|
+
/* @__PURE__ */ N("div", { className: G.time, children: Mt(+n * 1e3).format("HH:mm") })
|
|
9251
9254
|
] }) });
|
|
9252
9255
|
}
|
|
9253
9256
|
const xh = ({
|
|
@@ -9483,13 +9486,13 @@ function _h({ chatId: e }) {
|
|
|
9483
9486
|
from_id: o
|
|
9484
9487
|
});
|
|
9485
9488
|
};
|
|
9486
|
-
return /* @__PURE__ */ Ee(Bt, { className:
|
|
9487
|
-
/* @__PURE__ */ Ee(s, { className:
|
|
9488
|
-
/* @__PURE__ */ Ee("div", { className:
|
|
9489
|
+
return /* @__PURE__ */ Ee(Bt, { className: G.chatcontentLayout, children: [
|
|
9490
|
+
/* @__PURE__ */ Ee(s, { className: G.chat_content, children: [
|
|
9491
|
+
/* @__PURE__ */ Ee("div", { className: G.chat_header, children: [
|
|
9489
9492
|
/* @__PURE__ */ N("span", { children: I ? c.who ? c.who : "Неизвестный собеседник" : "Загрузка..." }),
|
|
9490
9493
|
_ ? /* @__PURE__ */ N(wc, {}) : /* @__PURE__ */ N("span", { children: e })
|
|
9491
9494
|
] }),
|
|
9492
|
-
/* @__PURE__ */ Ee("div", { className:
|
|
9495
|
+
/* @__PURE__ */ Ee("div", { className: G.chat_body, ref: t, children: [
|
|
9493
9496
|
S && S.length > 0 ? S.map(
|
|
9494
9497
|
($) => $.type === "divider" && !$?.message ? /* @__PURE__ */ N(a, { children: $.timestamp ? Mt(+$.timestamp * 1e3).format("DD.MM.YY").toString() : "" }, $.id) : $?.message?.fromId && o && +$?.message?.fromId == +o ? /* @__PURE__ */ N(
|
|
9495
9498
|
r,
|
|
@@ -9510,7 +9513,7 @@ function _h({ chatId: e }) {
|
|
|
9510
9513
|
{
|
|
9511
9514
|
description: "Еще нет сообщений",
|
|
9512
9515
|
image: Wr.PRESENTED_IMAGE_SIMPLE,
|
|
9513
|
-
className:
|
|
9516
|
+
className: G.antd_empty
|
|
9514
9517
|
}
|
|
9515
9518
|
),
|
|
9516
9519
|
h && /* @__PURE__ */ N(
|
|
@@ -9530,20 +9533,20 @@ function _h({ chatId: e }) {
|
|
|
9530
9533
|
)
|
|
9531
9534
|
] })
|
|
9532
9535
|
] }),
|
|
9533
|
-
/* @__PURE__ */ N(l, { className:
|
|
9536
|
+
/* @__PURE__ */ N(l, { className: G["chat-input__footer"], children: /* @__PURE__ */ N(yh, { onSend: D }) })
|
|
9534
9537
|
] });
|
|
9535
9538
|
}
|
|
9536
9539
|
const { Sider: $h, Content: Oh } = Bt;
|
|
9537
9540
|
function Fh() {
|
|
9538
9541
|
const [e, t] = Q(null);
|
|
9539
|
-
return /* @__PURE__ */ Ee(Bt, { className:
|
|
9540
|
-
/* @__PURE__ */ N($h, { width: 220, className:
|
|
9541
|
-
/* @__PURE__ */ N(Oh, { className:
|
|
9542
|
+
return /* @__PURE__ */ Ee(Bt, { className: G["chat-layout"], children: [
|
|
9543
|
+
/* @__PURE__ */ N($h, { width: 220, className: G["chat-sidebar"], children: /* @__PURE__ */ N(mh, { onSelectChat: t, selectedChatId: e }) }),
|
|
9544
|
+
/* @__PURE__ */ N(Oh, { className: G["chat-content"], children: e ? /* @__PURE__ */ N(_h, { chatId: e }) : /* @__PURE__ */ N(
|
|
9542
9545
|
Wr,
|
|
9543
9546
|
{
|
|
9544
9547
|
description: "Выберите чат",
|
|
9545
9548
|
image: Wr.PRESENTED_IMAGE_SIMPLE,
|
|
9546
|
-
className:
|
|
9549
|
+
className: G.antd_empty
|
|
9547
9550
|
}
|
|
9548
9551
|
) })
|
|
9549
9552
|
] });
|
|
@@ -9597,7 +9600,7 @@ const Th = ({ open: e, onOk: t, onCancel: r, positionCorner: n }) => {
|
|
|
9597
9600
|
title: /* @__PURE__ */ N(
|
|
9598
9601
|
"h3",
|
|
9599
9602
|
{
|
|
9600
|
-
className: `ant-modal-title ${
|
|
9603
|
+
className: `ant-modal-title ${G["chat-modal__title"]}`,
|
|
9601
9604
|
style: { userSelect: i ? "none" : "auto" },
|
|
9602
9605
|
children: "Чаты"
|
|
9603
9606
|
}
|
|
@@ -9610,7 +9613,7 @@ const Th = ({ open: e, onOk: t, onCancel: r, positionCorner: n }) => {
|
|
|
9610
9613
|
maskClosable: !0,
|
|
9611
9614
|
keyboard: !0,
|
|
9612
9615
|
mask: !1,
|
|
9613
|
-
className:
|
|
9616
|
+
className: G.chatModal,
|
|
9614
9617
|
width: 800,
|
|
9615
9618
|
modalRender: (v) => u ? /* @__PURE__ */ N(
|
|
9616
9619
|
Fc,
|
|
@@ -9621,13 +9624,13 @@ const Th = ({ open: e, onOk: t, onCancel: r, positionCorner: n }) => {
|
|
|
9621
9624
|
onStop: m,
|
|
9622
9625
|
nodeRef: a,
|
|
9623
9626
|
position: l,
|
|
9624
|
-
children: /* @__PURE__ */ N("div", { ref: a, className:
|
|
9627
|
+
children: /* @__PURE__ */ N("div", { ref: a, className: G.draggableWrapper, children: v })
|
|
9625
9628
|
}
|
|
9626
9629
|
) : /* @__PURE__ */ N(
|
|
9627
9630
|
"div",
|
|
9628
9631
|
{
|
|
9629
9632
|
ref: a,
|
|
9630
|
-
className:
|
|
9633
|
+
className: G.draggableWrapper,
|
|
9631
9634
|
style: {
|
|
9632
9635
|
position: "fixed",
|
|
9633
9636
|
left: l.x,
|
|
@@ -9689,7 +9692,7 @@ const Th = ({ open: e, onOk: t, onCancel: r, positionCorner: n }) => {
|
|
|
9689
9692
|
}));
|
|
9690
9693
|
}, [u]), g = () => r(!0), m = () => r(!1), v = () => r(!1), h = /* @__PURE__ */ Ee(Je, { style: { background: "transparent" }, type: "primary", onClick: g, children: [
|
|
9691
9694
|
/* @__PURE__ */ N(Oc, {}),
|
|
9692
|
-
a > 0 && /* @__PURE__ */ Ee("span", { className:
|
|
9695
|
+
a > 0 && /* @__PURE__ */ Ee("span", { className: G["notification-badge"], children: [
|
|
9693
9696
|
a,
|
|
9694
9697
|
","
|
|
9695
9698
|
] })
|
package/package.json
CHANGED