@elcrm/telegram 0.0.43 → 0.0.44
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.es.js +104 -102
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -260,7 +260,7 @@ function Qa(e, t) {
|
|
|
260
260
|
function er(e, t, a) {
|
|
261
261
|
j[e].time = a, j[e].data[t.item][t.name] = t.value, localStorage.setItem(e, N.enCode(j[e]));
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const le = {
|
|
264
264
|
setSSID: ka,
|
|
265
265
|
getSSID: ba,
|
|
266
266
|
getPORT: st,
|
|
@@ -313,23 +313,23 @@ function un(e) {
|
|
|
313
313
|
t && (window.URL || window.webkitURL).revokeObjectURL(t);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
const
|
|
316
|
+
const de = {};
|
|
317
317
|
function nr(e) {
|
|
318
|
-
return e && (
|
|
318
|
+
return e && (de.s = e), de.s;
|
|
319
319
|
}
|
|
320
320
|
function ar(e) {
|
|
321
|
-
return e && (
|
|
321
|
+
return e && (de.a = e), de.a;
|
|
322
322
|
}
|
|
323
323
|
function rr(e) {
|
|
324
|
-
return e && (
|
|
324
|
+
return e && (de.c = e), de.c;
|
|
325
325
|
}
|
|
326
326
|
function or(e) {
|
|
327
|
-
return e && (
|
|
327
|
+
return e && (de.h = e), de.h;
|
|
328
328
|
}
|
|
329
329
|
const pt = { version: { Api: ar, Server: nr, Client: rr }, Host: or };
|
|
330
330
|
let ir = "api", sr = "elcrm", lr = "online";
|
|
331
331
|
function cr() {
|
|
332
|
-
let e =
|
|
332
|
+
let e = le.getPORT(), t = "", a = "";
|
|
333
333
|
return e.address === "localhost" ? (t = `http://localhost:${e.socket}/documents`, a = `http://localhost:${e.socket}/files`) : (t = "https://" + e.address + "/documents", a = "https://" + e.address + "/files"), {
|
|
334
334
|
documents: t,
|
|
335
335
|
files: a
|
|
@@ -337,9 +337,9 @@ function cr() {
|
|
|
337
337
|
}
|
|
338
338
|
let fn = `${ir}.${sr}.${lr}`;
|
|
339
339
|
function _r(e) {
|
|
340
|
-
return "https://" +
|
|
340
|
+
return "https://" + le.getPORT().address + "/audio/" + e;
|
|
341
341
|
}
|
|
342
|
-
function Ue(e, t = {}, a =
|
|
342
|
+
function Ue(e, t = {}, a = le.getAUTH()) {
|
|
343
343
|
return new Promise((r) => {
|
|
344
344
|
const o = new un();
|
|
345
345
|
o.onmessage = (i) => {
|
|
@@ -352,7 +352,7 @@ function Ue(e, t = {}, a = ce.getAUTH()) {
|
|
|
352
352
|
});
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
|
-
function dr(e, t = {}, a =
|
|
355
|
+
function dr(e, t = {}, a = le.getAUTH()) {
|
|
356
356
|
return new Promise((r) => {
|
|
357
357
|
const o = new un();
|
|
358
358
|
o.onmessage = (i) => {
|
|
@@ -376,7 +376,7 @@ function ur(e, t = {}, a) {
|
|
|
376
376
|
}
|
|
377
377
|
let mn = {
|
|
378
378
|
"Content-type": "application/json;charset=utf-8",
|
|
379
|
-
ssid:
|
|
379
|
+
ssid: le.getAUTH() || ""
|
|
380
380
|
};
|
|
381
381
|
async function fr(e, t, a = {}) {
|
|
382
382
|
try {
|
|
@@ -680,8 +680,8 @@ function gr() {
|
|
|
680
680
|
} finally {
|
|
681
681
|
Je = !1, Ve.current = F, On(), Error.prepareStackTrace = D;
|
|
682
682
|
}
|
|
683
|
-
var ye = s ? s.displayName || s.name : "",
|
|
684
|
-
return typeof s == "function" && Ae.set(s,
|
|
683
|
+
var ye = s ? s.displayName || s.name : "", he = ye ? Oe(ye) : "";
|
|
684
|
+
return typeof s == "function" && Ae.set(s, he), he;
|
|
685
685
|
}
|
|
686
686
|
function Gn(s, h, b) {
|
|
687
687
|
return It(s, !1);
|
|
@@ -1007,17 +1007,17 @@ Check the top-level render call using <` + b + ">.");
|
|
|
1007
1007
|
zt(Q, s);
|
|
1008
1008
|
}
|
|
1009
1009
|
if (Be.call(h, "key")) {
|
|
1010
|
-
var
|
|
1010
|
+
var he = B(s), q = Object.keys(h).filter(function(_a) {
|
|
1011
1011
|
return _a !== "key";
|
|
1012
1012
|
}), at = q.length > 0 ? "{key: someKey, " + q.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
1013
|
-
if (!Kt[
|
|
1013
|
+
if (!Kt[he + at]) {
|
|
1014
1014
|
var ca = q.length > 0 ? "{" + q.join(": ..., ") + ": ...}" : "{}";
|
|
1015
1015
|
y(`A props object containing a "key" prop is being spread into JSX:
|
|
1016
1016
|
let props = %s;
|
|
1017
1017
|
<%s {...props} />
|
|
1018
1018
|
React keys must be passed directly to JSX without using spread:
|
|
1019
1019
|
let props = %s;
|
|
1020
|
-
<%s key={someKey} {...props} />`, at,
|
|
1020
|
+
<%s key={someKey} {...props} />`, at, he, ca, he), Kt[he + at] = !0;
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
return s === r ? ra(G) : aa(G), G;
|
|
@@ -1044,12 +1044,12 @@ const pr = "_notice_q5jau_1", xr = "_error_q5jau_10", vr = "_success_q5jau_13",
|
|
|
1044
1044
|
"show-notice": "_show-notice_q5jau_1",
|
|
1045
1045
|
"hide-notice": "_hide-notice_q5jau_1"
|
|
1046
1046
|
};
|
|
1047
|
-
let
|
|
1047
|
+
let ue = {};
|
|
1048
1048
|
function Cr() {
|
|
1049
1049
|
let [e, t] = C.useState([]);
|
|
1050
|
-
return
|
|
1050
|
+
return ue.set = (a) => {
|
|
1051
1051
|
t([...e, a]);
|
|
1052
|
-
},
|
|
1052
|
+
}, ue.del = (a) => {
|
|
1053
1053
|
t(e.filter((r) => r.key !== a));
|
|
1054
1054
|
}, e.length === 0 ? "" : /* @__PURE__ */ n.jsx("ul", { className: hn.notice, children: e.map((a) => a.item) });
|
|
1055
1055
|
}
|
|
@@ -1059,25 +1059,25 @@ function Pe({ data: e }) {
|
|
|
1059
1059
|
setTimeout(function() {
|
|
1060
1060
|
a("hide");
|
|
1061
1061
|
}, 1800), setTimeout(function() {
|
|
1062
|
-
|
|
1062
|
+
ue.del(e.key);
|
|
1063
1063
|
}, 2500);
|
|
1064
1064
|
}, [e.key]);
|
|
1065
1065
|
let r;
|
|
1066
1066
|
switch (e.type) {
|
|
1067
1067
|
case "error":
|
|
1068
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1068
|
+
r = /* @__PURE__ */ n.jsx(pe.error, {});
|
|
1069
1069
|
break;
|
|
1070
1070
|
case "success":
|
|
1071
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1071
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1072
1072
|
break;
|
|
1073
1073
|
case "copy":
|
|
1074
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1074
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1075
1075
|
break;
|
|
1076
1076
|
case "remark":
|
|
1077
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1077
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1078
1078
|
break;
|
|
1079
1079
|
default:
|
|
1080
|
-
r = /* @__PURE__ */ n.jsx(
|
|
1080
|
+
r = /* @__PURE__ */ n.jsx(pe.success, {});
|
|
1081
1081
|
break;
|
|
1082
1082
|
}
|
|
1083
1083
|
return /* @__PURE__ */ n.jsxs("li", { className: "item " + hn[e.type], "data-status": t, children: [
|
|
@@ -1087,26 +1087,26 @@ function Pe({ data: e }) {
|
|
|
1087
1087
|
}
|
|
1088
1088
|
function jr(e) {
|
|
1089
1089
|
let t = Date.now(), a = { key: t, ...e };
|
|
1090
|
-
|
|
1090
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1091
1091
|
}
|
|
1092
1092
|
function yr(e) {
|
|
1093
1093
|
let t = Date.now(), a = { key: t, text: e, type: "error" };
|
|
1094
|
-
|
|
1094
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1095
1095
|
}
|
|
1096
1096
|
function wr(e) {
|
|
1097
1097
|
let t = Date.now(), a = { key: t, text: e, type: "success" };
|
|
1098
|
-
|
|
1098
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1099
1099
|
}
|
|
1100
1100
|
function Sr(e) {
|
|
1101
1101
|
let t = Date.now(), a = { key: t, text: e, type: "remark" };
|
|
1102
|
-
|
|
1102
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1103
1103
|
}
|
|
1104
1104
|
function Er(e) {
|
|
1105
1105
|
let t = Date.now(), a = { key: t, text: e, type: "copy" };
|
|
1106
|
-
|
|
1106
|
+
ue.set({ item: /* @__PURE__ */ n.jsx(Pe, { data: a }, t), key: t });
|
|
1107
1107
|
}
|
|
1108
|
-
const
|
|
1109
|
-
|
|
1108
|
+
const pe = {};
|
|
1109
|
+
pe.error = () => /* @__PURE__ */ n.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", children: [
|
|
1110
1110
|
/* @__PURE__ */ n.jsx(
|
|
1111
1111
|
"path",
|
|
1112
1112
|
{
|
|
@@ -1122,7 +1122,7 @@ xe.error = () => /* @__PURE__ */ n.jsxs("svg", { viewBox: "0 0 24 24", fill: "no
|
|
|
1122
1122
|
}
|
|
1123
1123
|
)
|
|
1124
1124
|
] });
|
|
1125
|
-
|
|
1125
|
+
pe.success = () => /* @__PURE__ */ n.jsxs("svg", { viewBox: "0 0 24 24", fill: "none", children: [
|
|
1126
1126
|
/* @__PURE__ */ n.jsx(
|
|
1127
1127
|
"path",
|
|
1128
1128
|
{
|
|
@@ -1229,12 +1229,12 @@ const Or = "_white_11p39_14", Ar = "_black_11p39_26", Gr = "_shake_11p39_1", zr
|
|
|
1229
1229
|
sx: _o,
|
|
1230
1230
|
sf: uo
|
|
1231
1231
|
};
|
|
1232
|
-
let
|
|
1232
|
+
let ve = {};
|
|
1233
1233
|
function fo({ config: e }) {
|
|
1234
1234
|
let [t, a] = C.useState([]);
|
|
1235
|
-
return
|
|
1235
|
+
return ve.x = (r) => {
|
|
1236
1236
|
r || a([]);
|
|
1237
|
-
},
|
|
1237
|
+
}, ve.config = e, ve.add = (r) => {
|
|
1238
1238
|
a([...t, r]);
|
|
1239
1239
|
}, /* @__PURE__ */ n.jsx(n.Fragment, { children: t.map((r) => r) });
|
|
1240
1240
|
}
|
|
@@ -1317,7 +1317,7 @@ function mo({
|
|
|
1317
1317
|
) : "" });
|
|
1318
1318
|
}
|
|
1319
1319
|
function ho(e) {
|
|
1320
|
-
|
|
1320
|
+
ve.add(/* @__PURE__ */ n.jsx(go, { children: e }, String(Date.now())));
|
|
1321
1321
|
}
|
|
1322
1322
|
function go({ children: e }) {
|
|
1323
1323
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: e });
|
|
@@ -1333,14 +1333,14 @@ function po(e) {
|
|
|
1333
1333
|
function xo({ type: e, name: t, params: a }) {
|
|
1334
1334
|
let [r, o] = C.useState(null);
|
|
1335
1335
|
return C.useEffect(() => {
|
|
1336
|
-
|
|
1336
|
+
ve.config(e, t, a, o);
|
|
1337
1337
|
}, [a.id]), /* @__PURE__ */ n.jsx(n.Fragment, { children: r });
|
|
1338
1338
|
}
|
|
1339
1339
|
function vo(e, t) {
|
|
1340
|
-
|
|
1340
|
+
ve.config(e, t);
|
|
1341
1341
|
}
|
|
1342
1342
|
function ko(e) {
|
|
1343
|
-
|
|
1343
|
+
ve.x(e);
|
|
1344
1344
|
}
|
|
1345
1345
|
const dt = {};
|
|
1346
1346
|
function bo(e, t) {
|
|
@@ -1349,22 +1349,22 @@ function bo(e, t) {
|
|
|
1349
1349
|
function Co(e, t) {
|
|
1350
1350
|
dt[e] !== void 0 && dt[e](t);
|
|
1351
1351
|
}
|
|
1352
|
-
const
|
|
1352
|
+
const ce = {};
|
|
1353
1353
|
function jo(e, t) {
|
|
1354
1354
|
const [a, r] = C.useState(t);
|
|
1355
1355
|
return C.useEffect(() => {
|
|
1356
|
-
if (
|
|
1357
|
-
return
|
|
1358
|
-
|
|
1356
|
+
if (ce[e])
|
|
1357
|
+
return ce[e].push(r);
|
|
1358
|
+
ce[e] = [r];
|
|
1359
1359
|
}, []), [a];
|
|
1360
1360
|
}
|
|
1361
1361
|
function yo(e, t) {
|
|
1362
|
-
if (
|
|
1363
|
-
return
|
|
1364
|
-
|
|
1362
|
+
if (ce[e])
|
|
1363
|
+
return ce[e].push(t);
|
|
1364
|
+
ce[e] = [t];
|
|
1365
1365
|
}
|
|
1366
1366
|
function wo(e, t) {
|
|
1367
|
-
|
|
1367
|
+
ce[e] && ce[e].forEach((a) => a(t));
|
|
1368
1368
|
}
|
|
1369
1369
|
const xt = { setListener: Co, useListener: bo, setEmitter: wo, useEmitter: jo, subEmitter: yo };
|
|
1370
1370
|
function So() {
|
|
@@ -1373,7 +1373,7 @@ function So() {
|
|
|
1373
1373
|
t([a]);
|
|
1374
1374
|
}), /* @__PURE__ */ n.jsx(n.Fragment, { children: e.map((a) => a) });
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1376
|
+
const _e = {
|
|
1377
1377
|
Path: La,
|
|
1378
1378
|
setPage: Sa,
|
|
1379
1379
|
getPage: an,
|
|
@@ -1495,20 +1495,20 @@ function vn(e) {
|
|
|
1495
1495
|
)
|
|
1496
1496
|
] });
|
|
1497
1497
|
}
|
|
1498
|
-
let
|
|
1499
|
-
|
|
1498
|
+
let me = {};
|
|
1499
|
+
me.KeyDown = (e) => {
|
|
1500
1500
|
e.key === "Enter" && e.preventDefault();
|
|
1501
1501
|
};
|
|
1502
|
-
|
|
1502
|
+
me.PasteOne = (e) => {
|
|
1503
1503
|
e.preventDefault(), navigator.clipboard.readText().then((t) => {
|
|
1504
1504
|
t = t.replace(/^\s*/, "").replace(/\s*$/, ""), window.document.execCommand("insertText", !1, t);
|
|
1505
1505
|
}).catch((t) => {
|
|
1506
1506
|
});
|
|
1507
1507
|
};
|
|
1508
|
-
|
|
1508
|
+
me.Focus = (e) => {
|
|
1509
1509
|
e.target.textContent.length === 0 && (e.target.innerHTML = "<br>");
|
|
1510
1510
|
};
|
|
1511
|
-
|
|
1511
|
+
me.Blur = (e) => {
|
|
1512
1512
|
e.target.scrollLeft = 0, e.target.querySelector("br") !== null && e.target.querySelector("br").remove();
|
|
1513
1513
|
};
|
|
1514
1514
|
function kn({ value: e, onValue: t, placeholder: a = "", name: r }) {
|
|
@@ -1540,7 +1540,7 @@ function kn({ value: e, onValue: t, placeholder: a = "", name: r }) {
|
|
|
1540
1540
|
ref: l,
|
|
1541
1541
|
onPaste: u,
|
|
1542
1542
|
onInput: _,
|
|
1543
|
-
onBlur:
|
|
1543
|
+
onBlur: me.Blur,
|
|
1544
1544
|
onKeyDown: d,
|
|
1545
1545
|
contentEditable: "plaintext-only",
|
|
1546
1546
|
suppressContentEditableWarning: !0,
|
|
@@ -2544,7 +2544,7 @@ function Sn({
|
|
|
2544
2544
|
onPaste: m,
|
|
2545
2545
|
onInput: f,
|
|
2546
2546
|
onKeyDown: x,
|
|
2547
|
-
onBlur:
|
|
2547
|
+
onBlur: me.Blur,
|
|
2548
2548
|
contentEditable: c && d ? "plaintext-only" : "false",
|
|
2549
2549
|
...v,
|
|
2550
2550
|
suppressContentEditableWarning: !0,
|
|
@@ -3993,7 +3993,7 @@ function jt({
|
|
|
3993
3993
|
$.key === "Enter" && $.preventDefault();
|
|
3994
3994
|
};
|
|
3995
3995
|
const z = ($) => {
|
|
3996
|
-
|
|
3996
|
+
me.Blur($), a && a({
|
|
3997
3997
|
value: $.target.textContent.replace(/\D/g, ""),
|
|
3998
3998
|
name: r
|
|
3999
3999
|
});
|
|
@@ -4269,7 +4269,7 @@ function ut({
|
|
|
4269
4269
|
}
|
|
4270
4270
|
);
|
|
4271
4271
|
case "Select":
|
|
4272
|
-
return g && (p =
|
|
4272
|
+
return g && (p = le.getSelect(parseInt(g)) ? le.getSelect(parseInt(g)) : { 0: { s: "1", n: "не известно" } }), /* @__PURE__ */ n.jsx(
|
|
4273
4273
|
yt,
|
|
4274
4274
|
{
|
|
4275
4275
|
title: i,
|
|
@@ -4287,7 +4287,7 @@ function ut({
|
|
|
4287
4287
|
}
|
|
4288
4288
|
);
|
|
4289
4289
|
case "Users":
|
|
4290
|
-
return
|
|
4290
|
+
return le.getSelect("user"), /* @__PURE__ */ n.jsx(
|
|
4291
4291
|
St,
|
|
4292
4292
|
{
|
|
4293
4293
|
title: i,
|
|
@@ -4565,7 +4565,7 @@ function Mn({
|
|
|
4565
4565
|
const P = {};
|
|
4566
4566
|
P.field = "group", g && (P.className = g);
|
|
4567
4567
|
const A = (z) => {
|
|
4568
|
-
|
|
4568
|
+
me.Blur(z), m && m({ value: z.target.textContent, name: a });
|
|
4569
4569
|
};
|
|
4570
4570
|
let W = (z, R) => {
|
|
4571
4571
|
v[R] = z.target.textContent, t !== void 0 && t({ value: v.join(","), name: a });
|
|
@@ -4735,7 +4735,7 @@ const Xo = {
|
|
|
4735
4735
|
Toogle: In,
|
|
4736
4736
|
Group: Mn,
|
|
4737
4737
|
Options: Nn
|
|
4738
|
-
}, Qo = "_debug_ug20b_34", ei = "_b_ug20b_46", ti = "_o_ug20b_50", ni = "_mb_ug20b_55", ai = "_tm_ug20b_66", ri = "_ta_ug20b_133",
|
|
4738
|
+
}, Qo = "_debug_ug20b_34", ei = "_b_ug20b_46", ti = "_o_ug20b_50", ni = "_mb_ug20b_55", ai = "_tm_ug20b_66", ri = "_ta_ug20b_133", ge = {
|
|
4739
4739
|
debug: Qo,
|
|
4740
4740
|
b: ei,
|
|
4741
4741
|
o: ti,
|
|
@@ -4744,8 +4744,8 @@ const Xo = {
|
|
|
4744
4744
|
ta: ri,
|
|
4745
4745
|
"--body": "_--body_ug20b_143"
|
|
4746
4746
|
}, S = window.Telegram.WebApp, ie = { is: !1, MainButton: {}, BackButton: {} };
|
|
4747
|
-
let
|
|
4748
|
-
|
|
4747
|
+
let xe = {};
|
|
4748
|
+
xe.dark = {
|
|
4749
4749
|
"--tg-theme-bg-color": "#212121",
|
|
4750
4750
|
"--tg-theme-text-color": "#ffffff",
|
|
4751
4751
|
"--tg-theme-hint-color": "#aaaaaa",
|
|
@@ -4760,7 +4760,7 @@ ve.dark = {
|
|
|
4760
4760
|
"--tg-theme-subtitle-text-color": "#aaaaaa",
|
|
4761
4761
|
"--tg-theme-destructive-text-color": "#e53935"
|
|
4762
4762
|
};
|
|
4763
|
-
|
|
4763
|
+
xe.light = {
|
|
4764
4764
|
"--tg-theme-bg-color": "#ffffff",
|
|
4765
4765
|
"--tg-theme-text-color": "#000000",
|
|
4766
4766
|
"--tg-theme-hint-color": "#999999",
|
|
@@ -4769,7 +4769,7 @@ ve.light = {
|
|
|
4769
4769
|
"--tg-theme-button-text-color": "#ffffff",
|
|
4770
4770
|
"--tg-theme-secondary-bg-color": "#efeff3"
|
|
4771
4771
|
};
|
|
4772
|
-
|
|
4772
|
+
xe.users = {
|
|
4773
4773
|
"--tg-theme-bg-color": "#000000",
|
|
4774
4774
|
"--tg-theme-text-color": "#ffffff",
|
|
4775
4775
|
"--tg-theme-hint-color": "#98989e",
|
|
@@ -4788,7 +4788,7 @@ S.MainButton.set = (e) => {
|
|
|
4788
4788
|
S.MainButton.offClick(t);
|
|
4789
4789
|
}), S.MainButton.callback = [], typeof e == "boolean" ? S.MainButton.isVisible = !1 : (S.MainButton.text = e.text, e.color && (S.MainButton.color = e.color), e.textColor && (S.MainButton.textColor = e.textColor), S.MainButton.isVisible = !0, S.MainButton.isActive = e.isActive === void 0 ? !0 : e.isActive, S.MainButton.callback.push(() => {
|
|
4790
4790
|
var t;
|
|
4791
|
-
e.page === void 0 ? (t = e.callback) == null || t.call(e) :
|
|
4791
|
+
e.page === void 0 ? (t = e.callback) == null || t.call(e) : _e.setPage(e.page);
|
|
4792
4792
|
}), S.MainButton.onClick(S.MainButton.callback[0])));
|
|
4793
4793
|
};
|
|
4794
4794
|
S.BackButton.state = [!1];
|
|
@@ -4797,7 +4797,7 @@ S.BackButton.router = (e) => {
|
|
|
4797
4797
|
e === !1 ? (S.BackButton.isVisible = !1, S.BackButton.offClick(S.BackButton.listen[0]), S.BackButton.listen.shift(), S.BackButton.state.length !== 1 && S.BackButton.state.pop()) : (S.BackButton.isVisible = !0, S.BackButton.offClick(S.BackButton.listen[0]), S.BackButton.listen.shift(), S.BackButton.listen.push(() => {
|
|
4798
4798
|
let t = S.BackButton.state.pop();
|
|
4799
4799
|
if (t.page !== void 0)
|
|
4800
|
-
|
|
4800
|
+
_e.setPage(t.page);
|
|
4801
4801
|
else {
|
|
4802
4802
|
let a = S.BackButton.state[S.BackButton.state.length - 1];
|
|
4803
4803
|
S.BackButton.router(a);
|
|
@@ -4814,53 +4814,53 @@ S.Init = ({ dev: e }) => {
|
|
|
4814
4814
|
if (e) {
|
|
4815
4815
|
let [t, a] = C.useState(!1), [r, o] = C.useState(!1), [i, l] = C.useState("dark"), [c, d] = C.useState(!1), [_, u] = C.useState(!1);
|
|
4816
4816
|
ie.is = !0, ie.MainButton.set = a, ie.BackButton.set = o, C.useEffect(() => {
|
|
4817
|
-
for (let m in
|
|
4817
|
+
for (let m in xe[i])
|
|
4818
4818
|
document.documentElement.style.setProperty(
|
|
4819
4819
|
m,
|
|
4820
|
-
|
|
4820
|
+
xe[i][m]
|
|
4821
4821
|
);
|
|
4822
4822
|
}, []);
|
|
4823
4823
|
let f = (m) => {
|
|
4824
|
-
for (let g in
|
|
4825
|
-
document.documentElement.style.setProperty(g,
|
|
4824
|
+
for (let g in xe[m])
|
|
4825
|
+
document.documentElement.style.setProperty(g, xe[m][g]);
|
|
4826
4826
|
l(m), d(!1);
|
|
4827
4827
|
}, x = () => {
|
|
4828
4828
|
d(!1), u(!0);
|
|
4829
4829
|
};
|
|
4830
4830
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
4831
|
-
/* @__PURE__ */ n.jsxs("div", { className:
|
|
4832
|
-
r === !1 ? /* @__PURE__ */ n.jsx("div", { className:
|
|
4831
|
+
/* @__PURE__ */ n.jsxs("div", { className: ge.debug, children: [
|
|
4832
|
+
r === !1 ? /* @__PURE__ */ n.jsx("div", { className: ge.b, children: "Отмена" }) : /* @__PURE__ */ n.jsx(
|
|
4833
4833
|
"div",
|
|
4834
4834
|
{
|
|
4835
4835
|
onClick: () => {
|
|
4836
|
-
r.page === void 0 ||
|
|
4836
|
+
r.page === void 0 || _e.setPage(r.page);
|
|
4837
4837
|
},
|
|
4838
|
-
className:
|
|
4838
|
+
className: ge.b,
|
|
4839
4839
|
children: "Назад"
|
|
4840
4840
|
}
|
|
4841
4841
|
),
|
|
4842
4842
|
/* @__PURE__ */ n.jsx(
|
|
4843
4843
|
"div",
|
|
4844
4844
|
{
|
|
4845
|
-
className:
|
|
4845
|
+
className: ge.o,
|
|
4846
4846
|
onClick: () => d(!c),
|
|
4847
4847
|
children: "Меню"
|
|
4848
4848
|
}
|
|
4849
4849
|
)
|
|
4850
4850
|
] }),
|
|
4851
|
-
t && /* @__PURE__ */ n.jsx("div", { className:
|
|
4851
|
+
t && /* @__PURE__ */ n.jsx("div", { className: ge.mb, children: /* @__PURE__ */ n.jsx(
|
|
4852
4852
|
"button",
|
|
4853
4853
|
{
|
|
4854
4854
|
onClick: () => {
|
|
4855
|
-
t.page &&
|
|
4855
|
+
t.page && _e.setPage(t.page), t.callback && t.callback();
|
|
4856
4856
|
},
|
|
4857
4857
|
children: t.text
|
|
4858
4858
|
}
|
|
4859
4859
|
) }),
|
|
4860
|
-
c ? /* @__PURE__ */ n.jsxs("div", { className:
|
|
4860
|
+
c ? /* @__PURE__ */ n.jsxs("div", { className: ge.tm, children: [
|
|
4861
4861
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
4862
4862
|
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: x, children: "Authorization" }) }),
|
|
4863
|
-
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () =>
|
|
4863
|
+
/* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsx("button", { onClick: () => _e.setPage("Add"), children: "Add Page" }) })
|
|
4864
4864
|
] }),
|
|
4865
4865
|
/* @__PURE__ */ n.jsxs("ul", { children: [
|
|
4866
4866
|
/* @__PURE__ */ n.jsxs("li", { children: [
|
|
@@ -4903,7 +4903,7 @@ const oi = ({ setAuthorization: e }) => {
|
|
|
4903
4903
|
}, r = (o) => {
|
|
4904
4904
|
localStorage.setItem("auth", t);
|
|
4905
4905
|
};
|
|
4906
|
-
return /* @__PURE__ */ n.jsx("div", { className:
|
|
4906
|
+
return /* @__PURE__ */ n.jsx("div", { className: ge.ta, children: /* @__PURE__ */ n.jsxs("div", { className: "--body", children: [
|
|
4907
4907
|
/* @__PURE__ */ n.jsx("fieldset", { children: /* @__PURE__ */ n.jsx(
|
|
4908
4908
|
Xo.Notes,
|
|
4909
4909
|
{
|
|
@@ -5441,13 +5441,13 @@ H.offline = async (e) => {
|
|
|
5441
5441
|
H.chat = (e) => {
|
|
5442
5442
|
switch (e.data.action) {
|
|
5443
5443
|
case "new_message":
|
|
5444
|
-
|
|
5444
|
+
_e.getModule();
|
|
5445
5445
|
break;
|
|
5446
5446
|
case "view_message":
|
|
5447
|
-
|
|
5447
|
+
_e.getModule();
|
|
5448
5448
|
break;
|
|
5449
5449
|
case "write_message":
|
|
5450
|
-
|
|
5450
|
+
_e.getModule();
|
|
5451
5451
|
break;
|
|
5452
5452
|
}
|
|
5453
5453
|
};
|
|
@@ -5532,7 +5532,7 @@ class ds {
|
|
|
5532
5532
|
}
|
|
5533
5533
|
}
|
|
5534
5534
|
let it, O = {};
|
|
5535
|
-
const Se = () => (it || (it = new ds()), it),
|
|
5535
|
+
const Se = () => (it || (it = new ds()), it), fe = (e, t, a = Se()) => a._withIDBStore("readwrite", (r) => {
|
|
5536
5536
|
O[e] = t, r.put(N.enCode(t), e);
|
|
5537
5537
|
}), oe = (e, t = Se()) => O[e] === void 0 ? new Promise((a, r) => {
|
|
5538
5538
|
let o;
|
|
@@ -5601,21 +5601,21 @@ const Se = () => (it || (it = new ds()), it), me = (e, t, a = Se()) => a._withID
|
|
|
5601
5601
|
});
|
|
5602
5602
|
}, gs = async (e, t, a, r) => {
|
|
5603
5603
|
let o, i;
|
|
5604
|
-
i = await oe(a), i[e.id] = e, await
|
|
5604
|
+
i = await oe(a), i[e.id] = e, await fe(a, i), o !== null && (o = await oe(t), o[e.id] = e.eDate, await fe(t, o)), r !== void 0 && r({ type: "load", page: o, base: i });
|
|
5605
5605
|
}, ps = async (e, t, a, r) => {
|
|
5606
5606
|
let o = await oe(t), i = await oe(a);
|
|
5607
5607
|
for (let l in e)
|
|
5608
5608
|
i[l] = e[l], o[l] = e[l].eDate;
|
|
5609
|
-
await
|
|
5609
|
+
await fe(t, o), await fe(a, i), r !== void 0 && r({ type: "load", page: o, base: i });
|
|
5610
5610
|
}, xs = async (e, t, a, r) => {
|
|
5611
5611
|
let o = await oe(t), i = await oe(a);
|
|
5612
|
-
e.forEach((l) => delete o[l]), await
|
|
5612
|
+
e.forEach((l) => delete o[l]), await fe(t, o), r !== void 0 && r({ type: "load", page: o, base: i });
|
|
5613
5613
|
}, vs = async (e, t, a) => {
|
|
5614
5614
|
let r = await oe(t);
|
|
5615
|
-
e.forEach((o) => delete r[o]), await
|
|
5615
|
+
e.forEach((o) => delete r[o]), await fe(t, r);
|
|
5616
5616
|
}, ks = async (e, t, a) => {
|
|
5617
5617
|
let r = await oe(t);
|
|
5618
|
-
e.forEach((o) => r[o.id] = o.eDate), await
|
|
5618
|
+
e.forEach((o) => r[o.id] = o.eDate), await fe(t, r);
|
|
5619
5619
|
}, bs = async (e, t, a) => {
|
|
5620
5620
|
let r = await oe(t);
|
|
5621
5621
|
if (a !== void 0)
|
|
@@ -5625,7 +5625,7 @@ const Se = () => (it || (it = new ds()), it), me = (e, t, a = Se()) => a._withID
|
|
|
5625
5625
|
}, Cs = (e) => O[e], hl = {
|
|
5626
5626
|
id: bs,
|
|
5627
5627
|
get: oe,
|
|
5628
|
-
set:
|
|
5628
|
+
set: fe,
|
|
5629
5629
|
add: gs,
|
|
5630
5630
|
del: us,
|
|
5631
5631
|
upd: hs,
|
|
@@ -5729,22 +5729,24 @@ const Ts = ({ label: e, onValue: t, value: a, name: r, item: o }) => {
|
|
|
5729
5729
|
"aria-checked": `${i ? "true" : "false"}`
|
|
5730
5730
|
}
|
|
5731
5731
|
);
|
|
5732
|
-
},
|
|
5732
|
+
}, ke = {};
|
|
5733
5733
|
function Rs(e) {
|
|
5734
|
-
const [t, a] = C.useState({}), r = C.useRef(e)
|
|
5735
|
-
|
|
5736
|
-
};
|
|
5737
|
-
return le.u = (i) => {
|
|
5734
|
+
const [t, a] = C.useState({}), r = C.useRef(e);
|
|
5735
|
+
ke.u = (i) => {
|
|
5738
5736
|
r.current = { ...r.current, [i.name]: i.value };
|
|
5739
|
-
},
|
|
5737
|
+
}, ke.r = () => {
|
|
5740
5738
|
a(Date.now());
|
|
5741
|
-
}
|
|
5739
|
+
};
|
|
5740
|
+
const o = (i) => {
|
|
5741
|
+
r.current[i.name] = i.value, i.reload && ke.r();
|
|
5742
|
+
};
|
|
5743
|
+
return [r.current, o];
|
|
5742
5744
|
}
|
|
5743
5745
|
function Is(e) {
|
|
5744
|
-
|
|
5746
|
+
ke.u(e), e.reload && ke.r();
|
|
5745
5747
|
}
|
|
5746
5748
|
function Ms() {
|
|
5747
|
-
|
|
5749
|
+
ke.r && ke.r();
|
|
5748
5750
|
}
|
|
5749
5751
|
const xl = {
|
|
5750
5752
|
Color: Cn,
|
|
@@ -6154,13 +6156,13 @@ export {
|
|
|
6154
6156
|
jn as Modal,
|
|
6155
6157
|
We as Notice,
|
|
6156
6158
|
Cl as Notifications,
|
|
6157
|
-
|
|
6159
|
+
_e as Router,
|
|
6158
6160
|
pl as Scrolling,
|
|
6159
6161
|
kl as Search,
|
|
6160
6162
|
dl as Setting,
|
|
6161
6163
|
pt as Sistym,
|
|
6162
6164
|
ft as Socket,
|
|
6163
|
-
|
|
6165
|
+
le as Store,
|
|
6164
6166
|
jl as Switch,
|
|
6165
6167
|
ii as Tabs,
|
|
6166
6168
|
S as Telegram,
|