@elcrm/telegram 0.0.69 → 0.0.70
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.d.ts +12 -11
- package/dist/index.es.js +65 -66
- package/dist/index.umd.js +7 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,16 +15,6 @@ declare namespace Telegram {
|
|
|
15
15
|
*/
|
|
16
16
|
const Notice: (type: any, text?: any, thema?: any) => void;
|
|
17
17
|
const Header: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
/**
|
|
19
|
-
* Компонент Footer
|
|
20
|
-
*
|
|
21
|
-
* @param {TAction[]} [actions] - Массив действий для отображения в футере
|
|
22
|
-
* @param {React.ReactNode} [children] - Дополнительные дочерние элементы
|
|
23
|
-
* @param {string} [className] - Пользовательский CSS-класс
|
|
24
|
-
* @param {string} [page] - Текущая страница для определения активного действия
|
|
25
|
-
* @param {"row"|"column"} [direction="row"] - Направление расположения элементов футера
|
|
26
|
-
* @param {(page: string) => void} [onPageChange] - Функция для обработки смены страницы
|
|
27
|
-
*/
|
|
28
18
|
const Footer: ({ actions, children, className, page, onPageChange, direction, }: import("./Footer").TFooter) => import("react/jsx-runtime").JSX.Element;
|
|
29
19
|
/**
|
|
30
20
|
* Компонент BottomSheet
|
|
@@ -60,7 +50,18 @@ type MainButton = {
|
|
|
60
50
|
callback?: () => void;
|
|
61
51
|
page: string;
|
|
62
52
|
};
|
|
63
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Компонент Footer
|
|
55
|
+
*
|
|
56
|
+
* @param {TAction[]} [actions] - Массив действий для отображения в футере
|
|
57
|
+
* @param {React.ReactNode} [children] - Дополнительные дочерние элементы
|
|
58
|
+
* @param {string} [className] - Пользовательский CSS-класс
|
|
59
|
+
* @param {string} [page] - Текущая страница для определения активного действия
|
|
60
|
+
* @param {"row"|"column"} [direction="row"] - Направление расположения элементов футера
|
|
61
|
+
* @param {(page: string) => void} [onPageChange] - Функция для обработки смены страницы
|
|
62
|
+
*/
|
|
63
|
+
export declare const Footer: ({ actions, children, className, page, onPageChange, direction, }: import('./Footer').TFooter) => import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare const Header: () => import("react/jsx-runtime").JSX.Element, toggleBottomSheet: () => void, Modal: typeof _Modal, MainButton: {
|
|
64
65
|
callback: never[];
|
|
65
66
|
set: (j: MainButton | boolean) => void;
|
|
66
67
|
}, BackButton: {
|
package/dist/index.es.js
CHANGED
|
@@ -188,7 +188,7 @@ function zt() {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
var se = F.ReactCurrentDispatcher, ue;
|
|
191
|
-
function
|
|
191
|
+
function G(e, t, n) {
|
|
192
192
|
{
|
|
193
193
|
if (ue === void 0)
|
|
194
194
|
try {
|
|
@@ -201,16 +201,16 @@ function zt() {
|
|
|
201
201
|
` + ue + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var le = !1,
|
|
204
|
+
var le = !1, Z;
|
|
205
205
|
{
|
|
206
206
|
var tt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
-
|
|
207
|
+
Z = new tt();
|
|
208
208
|
}
|
|
209
209
|
function Ce(e, t) {
|
|
210
210
|
if (!e || le)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
|
-
var n =
|
|
213
|
+
var n = Z.get(e);
|
|
214
214
|
if (n !== void 0)
|
|
215
215
|
return n;
|
|
216
216
|
}
|
|
@@ -265,7 +265,7 @@ function zt() {
|
|
|
265
265
|
if (g--, b--, b < 0 || s[g] !== x[b]) {
|
|
266
266
|
var A = `
|
|
267
267
|
` + s[g].replace(" at new ", " at ");
|
|
268
|
-
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
268
|
+
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, A), A;
|
|
269
269
|
}
|
|
270
270
|
while (g >= 1 && b >= 0);
|
|
271
271
|
break;
|
|
@@ -274,8 +274,8 @@ function zt() {
|
|
|
274
274
|
} finally {
|
|
275
275
|
le = !1, se.current = p, et(), Error.prepareStackTrace = f;
|
|
276
276
|
}
|
|
277
|
-
var U = e ? e.displayName || e.name : "", M = U ?
|
|
278
|
-
return typeof e == "function" &&
|
|
277
|
+
var U = e ? e.displayName || e.name : "", M = U ? G(U) : "";
|
|
278
|
+
return typeof e == "function" && Z.set(e, M), M;
|
|
279
279
|
}
|
|
280
280
|
function rt(e, t, n) {
|
|
281
281
|
return Ce(e, !1);
|
|
@@ -284,29 +284,29 @@ function zt() {
|
|
|
284
284
|
var t = e.prototype;
|
|
285
285
|
return !!(t && t.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function X(e, t, n) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
291
|
return Ce(e, nt(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
|
-
return
|
|
293
|
+
return G(e);
|
|
294
294
|
switch (e) {
|
|
295
295
|
case E:
|
|
296
|
-
return
|
|
296
|
+
return G("Suspense");
|
|
297
297
|
case d:
|
|
298
|
-
return
|
|
298
|
+
return G("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
302
|
case h:
|
|
303
303
|
return rt(e.render);
|
|
304
304
|
case R:
|
|
305
|
-
return
|
|
305
|
+
return X(e.type, t, n);
|
|
306
306
|
case C: {
|
|
307
307
|
var a = e, f = a._payload, p = a._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return X(p(f), t, n);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
@@ -314,9 +314,9 @@ function zt() {
|
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
316
|
var Y = Object.prototype.hasOwnProperty, Ae = {}, Pe = F.ReactDebugCurrentFrame;
|
|
317
|
-
function
|
|
317
|
+
function Q(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var t = e._owner, n =
|
|
319
|
+
var t = e._owner, n = X(e.type, e._source, t ? t.type : null);
|
|
320
320
|
Pe.setExtraStackFrame(n);
|
|
321
321
|
} else
|
|
322
322
|
Pe.setExtraStackFrame(null);
|
|
@@ -336,7 +336,7 @@ function zt() {
|
|
|
336
336
|
} catch (g) {
|
|
337
337
|
s = g;
|
|
338
338
|
}
|
|
339
|
-
s && !(s instanceof Error) && (
|
|
339
|
+
s && !(s instanceof Error) && (Q(f), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, u, typeof s), Q(null)), s instanceof Error && !(s.message in Ae) && (Ae[s.message] = !0, Q(f), S("Failed %s type: %s", n, s.message), Q(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -461,7 +461,7 @@ function zt() {
|
|
|
461
461
|
var fe = F.ReactCurrentOwner, Fe = F.ReactDebugCurrentFrame;
|
|
462
462
|
function L(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var t = e._owner, n =
|
|
464
|
+
var t = e._owner, n = X(e.type, e._source, t ? t.type : null);
|
|
465
465
|
Fe.setExtraStackFrame(n);
|
|
466
466
|
} else
|
|
467
467
|
Fe.setExtraStackFrame(null);
|
|
@@ -631,11 +631,11 @@ var Ct;
|
|
|
631
631
|
function o({ children: _ }) {
|
|
632
632
|
const [h, E] = Ot(!1), [d, R] = Ot(!1);
|
|
633
633
|
if (H.onClose = () => {
|
|
634
|
-
|
|
634
|
+
K.BackButton.set(!1), R(!0), setTimeout(() => {
|
|
635
635
|
E(!1), R(!1);
|
|
636
636
|
}, 300);
|
|
637
637
|
}, jt(() => {
|
|
638
|
-
h ? H.onClose() : (
|
|
638
|
+
h ? H.onClose() : (K.BackButton.set({
|
|
639
639
|
callback: () => H.onClose()
|
|
640
640
|
}), E(!0));
|
|
641
641
|
}, []), !!h)
|
|
@@ -976,7 +976,7 @@ function Qt() {
|
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
var se = F.ReactCurrentDispatcher, ue;
|
|
979
|
-
function
|
|
979
|
+
function G(e, t, n) {
|
|
980
980
|
{
|
|
981
981
|
if (ue === void 0)
|
|
982
982
|
try {
|
|
@@ -989,16 +989,16 @@ function Qt() {
|
|
|
989
989
|
` + ue + e;
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
|
-
var le = !1,
|
|
992
|
+
var le = !1, Z;
|
|
993
993
|
{
|
|
994
994
|
var tt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
995
|
-
|
|
995
|
+
Z = new tt();
|
|
996
996
|
}
|
|
997
997
|
function Ce(e, t) {
|
|
998
998
|
if (!e || le)
|
|
999
999
|
return "";
|
|
1000
1000
|
{
|
|
1001
|
-
var n =
|
|
1001
|
+
var n = Z.get(e);
|
|
1002
1002
|
if (n !== void 0)
|
|
1003
1003
|
return n;
|
|
1004
1004
|
}
|
|
@@ -1053,7 +1053,7 @@ function Qt() {
|
|
|
1053
1053
|
if (g--, b--, b < 0 || s[g] !== x[b]) {
|
|
1054
1054
|
var A = `
|
|
1055
1055
|
` + s[g].replace(" at new ", " at ");
|
|
1056
|
-
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
1056
|
+
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, A), A;
|
|
1057
1057
|
}
|
|
1058
1058
|
while (g >= 1 && b >= 0);
|
|
1059
1059
|
break;
|
|
@@ -1062,8 +1062,8 @@ function Qt() {
|
|
|
1062
1062
|
} finally {
|
|
1063
1063
|
le = !1, se.current = p, et(), Error.prepareStackTrace = f;
|
|
1064
1064
|
}
|
|
1065
|
-
var U = e ? e.displayName || e.name : "", M = U ?
|
|
1066
|
-
return typeof e == "function" &&
|
|
1065
|
+
var U = e ? e.displayName || e.name : "", M = U ? G(U) : "";
|
|
1066
|
+
return typeof e == "function" && Z.set(e, M), M;
|
|
1067
1067
|
}
|
|
1068
1068
|
function rt(e, t, n) {
|
|
1069
1069
|
return Ce(e, !1);
|
|
@@ -1072,29 +1072,29 @@ function Qt() {
|
|
|
1072
1072
|
var t = e.prototype;
|
|
1073
1073
|
return !!(t && t.isReactComponent);
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function X(e, t, n) {
|
|
1076
1076
|
if (e == null)
|
|
1077
1077
|
return "";
|
|
1078
1078
|
if (typeof e == "function")
|
|
1079
1079
|
return Ce(e, nt(e));
|
|
1080
1080
|
if (typeof e == "string")
|
|
1081
|
-
return
|
|
1081
|
+
return G(e);
|
|
1082
1082
|
switch (e) {
|
|
1083
1083
|
case E:
|
|
1084
|
-
return
|
|
1084
|
+
return G("Suspense");
|
|
1085
1085
|
case d:
|
|
1086
|
-
return
|
|
1086
|
+
return G("SuspenseList");
|
|
1087
1087
|
}
|
|
1088
1088
|
if (typeof e == "object")
|
|
1089
1089
|
switch (e.$$typeof) {
|
|
1090
1090
|
case h:
|
|
1091
1091
|
return rt(e.render);
|
|
1092
1092
|
case R:
|
|
1093
|
-
return
|
|
1093
|
+
return X(e.type, t, n);
|
|
1094
1094
|
case C: {
|
|
1095
1095
|
var a = e, f = a._payload, p = a._init;
|
|
1096
1096
|
try {
|
|
1097
|
-
return
|
|
1097
|
+
return X(p(f), t, n);
|
|
1098
1098
|
} catch {
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
@@ -1102,9 +1102,9 @@ function Qt() {
|
|
|
1102
1102
|
return "";
|
|
1103
1103
|
}
|
|
1104
1104
|
var Y = Object.prototype.hasOwnProperty, Ae = {}, Pe = F.ReactDebugCurrentFrame;
|
|
1105
|
-
function
|
|
1105
|
+
function Q(e) {
|
|
1106
1106
|
if (e) {
|
|
1107
|
-
var t = e._owner, n =
|
|
1107
|
+
var t = e._owner, n = X(e.type, e._source, t ? t.type : null);
|
|
1108
1108
|
Pe.setExtraStackFrame(n);
|
|
1109
1109
|
} else
|
|
1110
1110
|
Pe.setExtraStackFrame(null);
|
|
@@ -1124,7 +1124,7 @@ function Qt() {
|
|
|
1124
1124
|
} catch (g) {
|
|
1125
1125
|
s = g;
|
|
1126
1126
|
}
|
|
1127
|
-
s && !(s instanceof Error) && (
|
|
1127
|
+
s && !(s instanceof Error) && (Q(f), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", n, u, typeof s), Q(null)), s instanceof Error && !(s.message in Ae) && (Ae[s.message] = !0, Q(f), S("Failed %s type: %s", n, s.message), Q(null));
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
@@ -1249,7 +1249,7 @@ function Qt() {
|
|
|
1249
1249
|
var fe = F.ReactCurrentOwner, Fe = F.ReactDebugCurrentFrame;
|
|
1250
1250
|
function L(e) {
|
|
1251
1251
|
if (e) {
|
|
1252
|
-
var t = e._owner, n =
|
|
1252
|
+
var t = e._owner, n = X(e.type, e._source, t ? t.type : null);
|
|
1253
1253
|
Fe.setExtraStackFrame(n);
|
|
1254
1254
|
} else
|
|
1255
1255
|
Fe.setExtraStackFrame(null);
|
|
@@ -1414,7 +1414,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
1414
1414
|
process.env.NODE_ENV === "production" ? Xt() : Qt();
|
|
1415
1415
|
const er = "0.0.37", Ut = {
|
|
1416
1416
|
version: er
|
|
1417
|
-
},
|
|
1417
|
+
}, ee = {}, At = {
|
|
1418
1418
|
module: "",
|
|
1419
1419
|
v: Ut.version,
|
|
1420
1420
|
page: "Main",
|
|
@@ -1427,7 +1427,7 @@ function ye() {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
ye().elcrm || (ye().elcrm = {});
|
|
1429
1429
|
Object.assign(ye().elcrm, { router: Ut.version });
|
|
1430
|
-
function
|
|
1430
|
+
function te(r) {
|
|
1431
1431
|
const o = ye();
|
|
1432
1432
|
o.ROUTER_PARAMS ? o.ROUTER_PARAMS = { ...o.ROUTER_PARAMS, ...r } : o.ROUTER_PARAMS = { ...At, ...r };
|
|
1433
1433
|
}
|
|
@@ -1441,7 +1441,7 @@ function ge(r) {
|
|
|
1441
1441
|
...r
|
|
1442
1442
|
} : o.ROUTER_PARAMS.LISTENER = { ...r };
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1444
|
+
function re() {
|
|
1445
1445
|
return ye().ROUTER_PARAMS.LISTENER || At.LISTENER;
|
|
1446
1446
|
}
|
|
1447
1447
|
var be;
|
|
@@ -1451,7 +1451,7 @@ var be;
|
|
|
1451
1451
|
let k = sessionStorage.getItem("f");
|
|
1452
1452
|
if (k) {
|
|
1453
1453
|
if (k = ie.deCode(k), !k) return !1;
|
|
1454
|
-
|
|
1454
|
+
te({
|
|
1455
1455
|
id: k.id,
|
|
1456
1456
|
tab: k.tab,
|
|
1457
1457
|
page: k.page,
|
|
@@ -1461,7 +1461,7 @@ var be;
|
|
|
1461
1461
|
module_admin: k.module_admin
|
|
1462
1462
|
});
|
|
1463
1463
|
} else
|
|
1464
|
-
|
|
1464
|
+
te({
|
|
1465
1465
|
id: 0,
|
|
1466
1466
|
tab: "",
|
|
1467
1467
|
page: (m = localStorage.getItem("d")) != null && m.length ? w().page : w().auth,
|
|
@@ -1470,7 +1470,7 @@ var be;
|
|
|
1470
1470
|
return !0;
|
|
1471
1471
|
}
|
|
1472
1472
|
function i() {
|
|
1473
|
-
|
|
1473
|
+
ee.id = 0, ee.tab = "", ee.page = w().page, ee.module = w().module;
|
|
1474
1474
|
}
|
|
1475
1475
|
r.Reset = i;
|
|
1476
1476
|
function c({
|
|
@@ -1478,11 +1478,11 @@ var be;
|
|
|
1478
1478
|
page: k = w().page,
|
|
1479
1479
|
auth: B = w().auth
|
|
1480
1480
|
}) {
|
|
1481
|
-
|
|
1481
|
+
te({ page: k, module: m, auth: B }), o();
|
|
1482
1482
|
}
|
|
1483
1483
|
r.Default = c;
|
|
1484
1484
|
function v(m) {
|
|
1485
|
-
let k = (W) => (
|
|
1485
|
+
let k = (W) => (te({ page: W }), W);
|
|
1486
1486
|
const [B, $] = P.useState(
|
|
1487
1487
|
j() || m && k(m) || w().page
|
|
1488
1488
|
);
|
|
@@ -1492,10 +1492,10 @@ var be;
|
|
|
1492
1492
|
}
|
|
1493
1493
|
r.usePage = v;
|
|
1494
1494
|
function y(m, k = !0, B = {}) {
|
|
1495
|
-
|
|
1495
|
+
te({ page: m, ...B }), sessionStorage.setItem(
|
|
1496
1496
|
w().STORAGE,
|
|
1497
1497
|
ie.enCode(w())
|
|
1498
|
-
), k &&
|
|
1498
|
+
), k && re().page(m);
|
|
1499
1499
|
}
|
|
1500
1500
|
r.setPage = y;
|
|
1501
1501
|
function j() {
|
|
@@ -1514,10 +1514,10 @@ var be;
|
|
|
1514
1514
|
}
|
|
1515
1515
|
r.useModule = h;
|
|
1516
1516
|
function E(m, k = !0) {
|
|
1517
|
-
|
|
1517
|
+
te({ module: m }), sessionStorage.setItem(
|
|
1518
1518
|
w().STORAGE,
|
|
1519
1519
|
ie.enCode(w())
|
|
1520
|
-
), k &&
|
|
1520
|
+
), k && re().module(m);
|
|
1521
1521
|
}
|
|
1522
1522
|
r.setModule = E;
|
|
1523
1523
|
function d() {
|
|
@@ -1539,10 +1539,10 @@ var be;
|
|
|
1539
1539
|
}
|
|
1540
1540
|
r.useTabs = C;
|
|
1541
1541
|
async function N(m, k = !0) {
|
|
1542
|
-
|
|
1542
|
+
te({ tab: m }), sessionStorage.setItem(
|
|
1543
1543
|
w().STORAGE,
|
|
1544
1544
|
ie.enCode(w())
|
|
1545
|
-
), k && (
|
|
1545
|
+
), k && (re().tabs && re().tabs(m));
|
|
1546
1546
|
}
|
|
1547
1547
|
r.setTabs = N;
|
|
1548
1548
|
function ne() {
|
|
@@ -1567,10 +1567,10 @@ var be;
|
|
|
1567
1567
|
}
|
|
1568
1568
|
r.subId = F;
|
|
1569
1569
|
async function S(m, k = !0) {
|
|
1570
|
-
|
|
1570
|
+
te({ id: m }), sessionStorage.setItem(
|
|
1571
1571
|
w().STORAGE,
|
|
1572
1572
|
ie.enCode(w())
|
|
1573
|
-
), k &&
|
|
1573
|
+
), k && re().id(m);
|
|
1574
1574
|
}
|
|
1575
1575
|
r.setId = S;
|
|
1576
1576
|
function me() {
|
|
@@ -1584,7 +1584,7 @@ var be;
|
|
|
1584
1584
|
async function Ee(m) {
|
|
1585
1585
|
var k, B, $, W, oe, ae, T, I;
|
|
1586
1586
|
const { page: D, module: z, tab: J, id: q } = m;
|
|
1587
|
-
D !== void 0 && (
|
|
1587
|
+
D !== void 0 && (ee.page = D), z !== void 0 && (ee.module = z), J !== void 0 && (ee.tab = J), q !== void 0 && (ee.id = q), te({ ...ee }), q !== void 0 && ((B = (k = re()).id) == null || B.call(k, q)), J !== void 0 && ((W = ($ = re()).tabs) == null || W.call($, J)), z !== void 0 && ((ae = (oe = re()).module) == null || ae.call(oe, z)), D !== void 0 && ((I = (T = re()).page) == null || I.call(T, D)), sessionStorage.setItem(
|
|
1588
1588
|
w().STORAGE,
|
|
1589
1589
|
ie.enCode(w())
|
|
1590
1590
|
);
|
|
@@ -1793,7 +1793,7 @@ const lr = () => {
|
|
|
1793
1793
|
C,
|
|
1794
1794
|
V[v][C]
|
|
1795
1795
|
);
|
|
1796
|
-
|
|
1796
|
+
K.WebApp.safeAreaInset.bottom === 0 && document.documentElement.style.setProperty(
|
|
1797
1797
|
"--tg-safe-area-inset-bottom",
|
|
1798
1798
|
"16px"
|
|
1799
1799
|
);
|
|
@@ -1871,17 +1871,17 @@ const lr = () => {
|
|
|
1871
1871
|
return P.useEffect(() => {
|
|
1872
1872
|
document.documentElement.style.setProperty(
|
|
1873
1873
|
"--tg-theme-secondary-bg-color-alpha",
|
|
1874
|
-
|
|
1874
|
+
K.WebApp.themeParams.secondary_bg_color + "d3"
|
|
1875
1875
|
), document.documentElement.style.setProperty(
|
|
1876
1876
|
"--tg-theme-bg-color-alpha",
|
|
1877
|
-
|
|
1878
|
-
),
|
|
1877
|
+
K.WebApp.themeParams.bg_color + "b3"
|
|
1878
|
+
), K.WebApp.safeAreaInset.bottom === 0 && document.documentElement.style.setProperty(
|
|
1879
1879
|
"--tg-safe-area-inset-bottom",
|
|
1880
1880
|
"16px"
|
|
1881
1881
|
);
|
|
1882
1882
|
}, []), /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Xe.Init, {}) });
|
|
1883
1883
|
};
|
|
1884
|
-
var
|
|
1884
|
+
var K;
|
|
1885
1885
|
((r) => {
|
|
1886
1886
|
r.WebApp = window.Telegram.WebApp, r.getUser = () => {
|
|
1887
1887
|
var o;
|
|
@@ -1921,7 +1921,7 @@ var re;
|
|
|
1921
1921
|
he.is ? he.BackButton.set(o) : (r.BackButton.state.push(o), r.BackButton.router(o));
|
|
1922
1922
|
}
|
|
1923
1923
|
};
|
|
1924
|
-
})(
|
|
1924
|
+
})(K || (K = {}));
|
|
1925
1925
|
const cr = ({ setAuthorization: r }) => {
|
|
1926
1926
|
let o = {}, i = () => {
|
|
1927
1927
|
localStorage.setItem("auth", o);
|
|
@@ -1930,9 +1930,8 @@ const cr = ({ setAuthorization: r }) => {
|
|
|
1930
1930
|
/* @__PURE__ */ l.jsx("fieldset", {}),
|
|
1931
1931
|
/* @__PURE__ */ l.jsx("div", { onClick: i, children: " Сохранить " })
|
|
1932
1932
|
] }) });
|
|
1933
|
-
}, {
|
|
1934
|
-
Header:
|
|
1935
|
-
Footer: pr,
|
|
1933
|
+
}, dr = K.Footer, {
|
|
1934
|
+
Header: pr,
|
|
1936
1935
|
toggleBottomSheet: vr,
|
|
1937
1936
|
Modal: hr,
|
|
1938
1937
|
MainButton: yr,
|
|
@@ -1941,17 +1940,17 @@ const cr = ({ setAuthorization: r }) => {
|
|
|
1941
1940
|
WebApp: br,
|
|
1942
1941
|
getUser: _r,
|
|
1943
1942
|
Notice: Rr
|
|
1944
|
-
} =
|
|
1943
|
+
} = K;
|
|
1945
1944
|
export {
|
|
1946
1945
|
mr as BackButton,
|
|
1947
1946
|
gr as BottomSheet,
|
|
1948
|
-
|
|
1949
|
-
|
|
1947
|
+
dr as Footer,
|
|
1948
|
+
pr as Header,
|
|
1950
1949
|
yr as MainButton,
|
|
1951
1950
|
hr as Modal,
|
|
1952
1951
|
Rr as Notice,
|
|
1953
1952
|
br as WebApp,
|
|
1954
|
-
|
|
1953
|
+
K as default,
|
|
1955
1954
|
_r as getUser,
|
|
1956
1955
|
vr as toggleBottomSheet
|
|
1957
1956
|
};
|
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(O,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(O=typeof globalThis<"u"?globalThis:O||self,w((O.elCRM=O.elCRM||{},O.elCRM.components={}),O.React))})(this,function(O,w){"use strict";var Ct=document.createElement("style");Ct.textContent=`*{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;box-sizing:border-box;padding:0;margin:0}html{height:-webkit-fill-available}body{background-color:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);-webkit-font-smoothing:antialiased;font-family:sans-serif;font-variant:no-common-ligatures;text-rendering:optimizeLegibility;padding:0;margin:0}body{overflow:hidden!important}body::-webkit-scrollbar{width:0px;height:0px;display:none!important;-ms-overflow-style:none;scrollbar-width:none}body:has(.debug){--tg-viewport-height: calc(100dvh - 50px) }.debug{height:50px;font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;background:var(--tg-theme-header-bg-color);color:var(--tg-theme-text-color);display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--tg-theme-bg-color);z-index:222;position:sticky;top:0}.debug .b,.debug .o{padding:0 15px;cursor:pointer}.mb{bottom:0;position:fixed;left:0;right:0;padding:10px}.mb button{width:100%}.tm{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;display:flex;flex-direction:column;background-color:var(--tg-theme-bg-color);border-radius:10px;box-shadow:0 10px 20px #40404026;width:200px;position:absolute;right:5px;z-index:999;border:1px solid var(--tg-theme-hint-color)}.tm ul{list-style-type:none;margin:0;display:block;width:100%;padding:8px;border-top:1px solid var(--tg-theme-hint-color)}.tm ul:first-child{border-top:0}.tm ol{list-style-type:none;display:none;padding:8px;background-color:var(--tg-theme-bg-color);border-radius:10px;box-shadow:0 10px 20px #40404026;position:absolute;right:100%;left:-180px;z-index:100;width:100%;top:0;flex-direction:column;border:1px solid var(--tg-theme-hint-color)}.tm ol:hover{display:flex}.tm li{position:relative}.tm button{font:inherit;border:0;padding:8px 36px 8px 8px;width:100%;border-radius:8px;text-align:left;display:flex;align-items:center;position:relative;color:var(--tg-theme-text-color);background-color:var(--tg-theme-bg-color)}.tm button:hover{background-color:var(--tg-theme-button-color)}.tm button:hover+ol{display:flex}.ta{margin:0;width:100vw;height:100vh;display:-webkit-flex;display:flex;justify-content:center;align-items:center;background-color:#0006}.ta .--body{font-family:-apple-system,BlinkMacSystemFont;-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;box-sizing:border-box;font-size:17px;overflow:hidden;width:270px;height:auto;background-color:#ffffff73;border-radius:12px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:var(--tg-theme-bg-color-alpha);z-index:11;display:flex;align-items:flex-end;justify-content:center;animation:fadeIn .3s ease}.modal-overlay.closing{animation:fadeOut .3s ease}.modal-popup{position:relative;width:100%;min-height:var(--modal-height);max-width:500px;max-height:var(--modal-height);overflow:hidden;animation:slideUp .3s ease;background:var(--tg-theme-bg-color)}.modal-popup.closing{animation:slideDown .3s ease}.notice{position:fixed;top:0;z-index:999;max-height:0px}.notice .item{display:block;color:#fff;overflow:hidden;cursor:pointer;display:flex;margin:20px 20px 10px;border-radius:10px;padding-left:10px;gap:10px;width:calc(100vw - 40px)}.notice svg{margin-top:7px}.notice .text{padding:9px 0;flex:1}.notice .error{background:#f44336}.notice .success{background:#4caf50}.notice .warning{background:#ff9800}.notice .item.thema{background:var(--tg-theme-secondary-bg-color);color:var(--tg-theme-text-color)}.notice .item.error.thema svg{color:#f44336}.notice .item.success.thema svg{color:#4caf50}.notice .item.warning.thema svg{color:#ff9800}.footer-menu-overlay{position:fixed;top:auto;left:0;right:0;bottom:0;z-index:10;display:flex;align-items:flex-end;justify-content:center;transition:opacity .5s ease-out;opacity:1}.footer-menu-overlay.is-overlay{background:var(--tg-theme-bg-color-alpha);top:0}.footer-menu-overlay.closing{opacity:0}.footer-menu-popup-book{position:relative;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px);border-radius:20px 20px 0 0;width:100%;max-width:500px;max-height:70vh;overflow:hidden;animation:slideUp .3s ease;box-shadow:0 -10px 30px #00000080;box-shadow:0 -.5px #0000001a;background:var(--tg-theme-secondary-bg-color-alpha);margin-bottom:calc(var(--tg-safe-area-inset-bottom) + 40px);border-bottom:1px solid var(--tg-theme-section-separator-color)}.footer-menu-popup-book.closing{animation:slideDown .3s ease}.footer-menu-header{position:relative;display:flex;opacity:.8;justify-content:space-between;align-items:center;padding:20px;border-bottom:1px solid var(--tg-theme-section-separator-color);z-index:1}.footer-menu-header h3{margin:0;color:var(--tg-theme-text-color);font-size:18px;font-weight:600}.footer-menu-close-btn{background:none;border:none;color:var(--tg-theme-text-color);font-size:20px;cursor:pointer;padding:5px;border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,transform .15s ease-in-out}.footer-menu-close-btn:active{transform:scale(1.1)}.chapters-list{position:relative;max-height:60vh;overflow-y:auto;overflow-x:hidden;padding:10px 0 20px;z-index:1}.chapter-item{display:flex;justify-content:space-between;align-items:center;padding:15px 20px;cursor:pointer;transition:background-color .2s ease,transform .15s ease-in-out;border-bottom:1px solid var(--tg-theme-section-separator-color)}.chapter-item:active{transform:scale(1.02)}.chapter-item:hover{background-color:#ffffff0d}.chapter-item.active{background-color:#ffffff1a}.chapter-info-item{display:flex;align-items:center;gap:12px}.chapter-number{background:var(--tg-theme-bg-color);color:var(--tg-theme-text-color);min-width:24px;min-height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600}.chapter-item.active .chapter-number{background:var(--tg-theme-button-color);color:var(--tg-theme-button-text-color)}.chapter-title{color:var(--tg-theme-text-color);font-size:16px;font-weight:400}.chapter-title p{font-size:10px;color:var(--tg-subtitle_text_color);font-weight:400}.chapter-title b{font-size:16px;font-weight:400}.chapter-duration{color:var(--tg-theme-text-color);opacity:.8;font-size:14px;font-weight:400}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideDown{0%{transform:translateY(0)}to{transform:translateY(100%)}}.chapters-list::-webkit-scrollbar{width:6px}.chapters-list::-webkit-scrollbar-track{background:#333}.chapters-list::-webkit-scrollbar-thumb{background:#666;border-radius:3px}.chapters-list::-webkit-scrollbar-thumb:hover{background:#888}@media (max-width: 375px){.chapter-progress{padding:15px 10px 5px}.chapters-popup{max-height:80vh}.chapter-item{padding:12px 15px}.chapter-title{font-size:14px}.chapter-duration{font-size:12px}}._h_rl5ga_1{z-index:2;position:fixed;bottom:0;left:0;right:0;display:flex;padding:5px 16px 0;gap:10px;background-color:var(--tg-theme-footer-bg);padding-bottom:calc(var(--tg-safe-area-inset-bottom) + var(--tg-content-safe-area-inset-bottom, 0px))}._h_rl5ga_1._row_rl5ga_14{flex-direction:row}._h_rl5ga_1._column_rl5ga_17{flex-direction:column}._h_rl5ga_1 div[data-active]{flex:1;text-align:center;padding:10px 0 0}._h_rl5ga_1 div[data-active=true]{color:var(--tg-theme-button-color)}._h_rl5ga_1 button{flex:1}
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(Ct);var Qe={exports:{}},xe={};/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.production.min.js
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
* This source code is licensed under the MIT license found in the
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
18
|
*/var Pt;function Yt(){return Pt||(Pt=1,process.env.NODE_ENV!=="production"&&function(){var r=w,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),ne=Symbol.iterator,Se="@@iterator";function Ee(e){if(e===null||typeof e!="object")return null;var t=ne&&e[ne]||e[Se];return typeof t=="function"?t:null}var F=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var t=arguments.length,o=new Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];ye("error",e,o)}}function ye(e,t,o){{var a=F.ReactDebugCurrentFrame,f=a.getStackAddendum();f!==""&&(t+="%s",o=o.concat([f]));var p=o.map(function(l){return String(l)});p.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,p)}}var Re=!1,Oe=!1,b=!1,_=!1,I=!1,D;D=Symbol.for("react.module.reference");function U(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===m||I||e===h||e===S||e===d||_||e===W||Re||Oe||b||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===k||e.$$typeof===A||e.$$typeof===x||e.$$typeof===g||e.$$typeof===D||e.getModuleId!==void 0))}function ae(e,t,o){var a=e.displayName;if(a)return a;var f=t.displayName||t.name||"";return f!==""?o+"("+f+")":o}function ie(e){return e.displayName||"Context"}function B(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case i:return"Portal";case m:return"Profiler";case h:return"StrictMode";case S:return"Suspense";case d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var t=e;return ie(t)+".Consumer";case A:var o=e;return ie(o._context)+".Provider";case g:return ae(e,e.render,"ForwardRef");case k:var a=e.displayName||null;return a!==null?a:B(e.type)||"Memo";case P:{var f=e,p=f._payload,l=f._init;try{return B(l(p))}catch{return null}}}return null}var M=Object.assign,$=0,H,q,K,je,Ce,Ae,Pe;function Te(){}Te.__reactDisabledLog=!0;function rt(){{if($===0){H=console.log,q=console.info,K=console.warn,je=console.error,Ce=console.group,Ae=console.groupCollapsed,Pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function ot(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:H}),info:M({},e,{value:q}),warn:M({},e,{value:K}),error:M({},e,{value:je}),group:M({},e,{value:Ce}),groupCollapsed:M({},e,{value:Ae}),groupEnd:M({},e,{value:Pe})})}$<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=F.ReactCurrentDispatcher,ue;function Q(e,t,o){{if(ue===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);ue=a&&a[1]||""}return`
|
|
19
|
-
`+ue+e}}var fe=!1,ee;{var nt=typeof WeakMap=="function"?WeakMap:Map;ee=new nt}function Be(e,t){if(!e||fe)return"";{var o=ee.get(e);if(o!==void 0)return o}var a;fe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=ce.current,ce.current=null,rt();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(
|
|
19
|
+
`+ue+e}}var fe=!1,ee;{var nt=typeof WeakMap=="function"?WeakMap:Map;ee=new nt}function Be(e,t){if(!e||fe)return"";{var o=ee.get(e);if(o!==void 0)return o}var a;fe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=ce.current,ce.current=null,rt();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(j){a=j}Reflect.construct(e,[],l)}else{try{l.call()}catch(j){a=j}e.call(l.prototype)}}else{try{throw Error()}catch(j){a=j}e()}}catch(j){if(j&&a&&typeof j.stack=="string"){for(var s=j.stack.split(`
|
|
20
20
|
`),R=a.stack.split(`
|
|
21
21
|
`),v=s.length-1,y=R.length-1;v>=1&&y>=0&&s[v]!==R[y];)y--;for(;v>=1&&y>=0;v--,y--)if(s[v]!==R[y]){if(v!==1||y!==1)do if(v--,y--,y<0||s[v]!==R[y]){var T=`
|
|
22
22
|
`+s[v].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,T),T}while(v>=1&&y>=0);break}}}finally{fe=!1,ce.current=p,ot(),Error.prepareStackTrace=f}var z=e?e.displayName||e.name:"",N=z?Q(z):"";return typeof e=="function"&&ee.set(e,N),N}function at(e,t,o){return Be(e,!1)}function it(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function te(e,t,o){if(e==null)return"";if(typeof e=="function")return Be(e,it(e));if(typeof e=="string")return Q(e);switch(e){case S:return Q("Suspense");case d:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return at(e.render);case k:return te(e.type,t,o);case P:{var a=e,f=a._payload,p=a._init;try{return te(p(f),t,o)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,Ie={},Me=F.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,o=te(e.type,e._source,t?t.type:null);Me.setExtraStackFrame(o)}else Me.setExtraStackFrame(null)}function st(e,t,o,a,f){{var p=Function.call.bind(V);for(var l in e)if(p(e,l)){var s=void 0;try{if(typeof e[l]!="function"){var R=Error((a||"React class")+": "+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}s=e[l](t,l,a,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){s=v}s&&!(s instanceof Error)&&(re(f),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",o,l,typeof s),re(null)),s instanceof Error&&!(s.message in Ie)&&(Ie[s.message]=!0,re(f),E("Failed %s type: %s",o,s.message),re(null))}}}var lt=Array.isArray;function de(e){return lt(e)}function ct(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function ut(e){try{return De(e),!1}catch{return!0}}function De(e){return""+e}function $e(e){if(ut(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ct(e)),De(e)}var Fe=F.ReactCurrentOwner,ft={key:!0,ref:!0,__self:!0,__source:!0},Ne,We;function dt(e){if(V.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function pt(e){if(V.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function ht(e,t){typeof e.ref=="string"&&Fe.current}function gt(e,t){{var o=function(){Ne||(Ne=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function mt(e,t){{var o=function(){We||(We=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var bt=function(e,t,o,a,f,p,l){var s={$$typeof:n,type:e,key:t,ref:o,props:l,_owner:p};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function vt(e,t,o,a,f){{var p,l={},s=null,R=null;o!==void 0&&($e(o),s=""+o),pt(t)&&($e(t.key),s=""+t.key),dt(t)&&(R=t.ref,ht(t,f));for(p in t)V.call(t,p)&&!ft.hasOwnProperty(p)&&(l[p]=t[p]);if(e&&e.defaultProps){var v=e.defaultProps;for(p in v)l[p]===void 0&&(l[p]=v[p])}if(s||R){var y=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&>(l,y),R&&mt(l,y)}return bt(e,s,R,f,a,Fe.current,l)}}var pe=F.ReactCurrentOwner,Ue=F.ReactDebugCurrentFrame;function L(e){if(e){var t=e._owner,o=te(e.type,e._source,t?t.type:null);Ue.setExtraStackFrame(o)}else Ue.setExtraStackFrame(null)}var he;he=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Le(){{if(pe.current){var e=B(pe.current.type);if(e)return`
|
|
23
23
|
|
|
24
24
|
Check the render method of \``+e+"`."}return""}}function yt(e){return""}var ze={};function xt(e){{var t=Le();if(!t){var o=typeof e=="string"?e:e.displayName||e.name;o&&(t=`
|
|
25
25
|
|
|
26
|
-
Check the top-level render call using <`+o+">.")}return t}}function Ye(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=xt(t);if(ze[o])return;ze[o]=!0;var a="";e&&e._owner&&e._owner!==pe.current&&(a=" It was passed a child from "+B(e._owner.type)+"."),L(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,a),L(null)}}function Ve(e,t){{if(typeof e!="object")return;if(de(e))for(var o=0;o<e.length;o++){var a=e[o];ge(a)&&Ye(a,t)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var f=Ee(e);if(typeof f=="function"&&f!==e.entries)for(var p=f.call(e),l;!(l=p.next()).done;)ge(l.value)&&Ye(l.value,t)}}}function kt(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===g||t.$$typeof===k))o=t.propTypes;else return;if(o){var a=B(t);st(o,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!he){he=!0;var f=B(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _t(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var a=t[o];if(a!=="children"&&a!=="key"){L(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Je={};function He(e,t,o,a,f,p){{var l=U(e);if(!l){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=yt();R?s+=R:s+=Le();var v;e===null?v="null":de(e)?v="array":e!==void 0&&e.$$typeof===n?(v="<"+(B(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,s)}var y=vt(e,t,o,f,p);if(y==null)return y;if(l){var T=t.children;if(T!==void 0)if(a)if(de(T)){for(var z=0;z<T.length;z++)Ve(T[z],e);Object.freeze&&Object.freeze(T)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ve(T,e)}if(V.call(t,"key")){var N=B(e),
|
|
26
|
+
Check the top-level render call using <`+o+">.")}return t}}function Ye(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=xt(t);if(ze[o])return;ze[o]=!0;var a="";e&&e._owner&&e._owner!==pe.current&&(a=" It was passed a child from "+B(e._owner.type)+"."),L(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,a),L(null)}}function Ve(e,t){{if(typeof e!="object")return;if(de(e))for(var o=0;o<e.length;o++){var a=e[o];ge(a)&&Ye(a,t)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var f=Ee(e);if(typeof f=="function"&&f!==e.entries)for(var p=f.call(e),l;!(l=p.next()).done;)ge(l.value)&&Ye(l.value,t)}}}function kt(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===g||t.$$typeof===k))o=t.propTypes;else return;if(o){var a=B(t);st(o,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!he){he=!0;var f=B(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _t(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var a=t[o];if(a!=="children"&&a!=="key"){L(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Je={};function He(e,t,o,a,f,p){{var l=U(e);if(!l){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=yt();R?s+=R:s+=Le();var v;e===null?v="null":de(e)?v="array":e!==void 0&&e.$$typeof===n?(v="<"+(B(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,s)}var y=vt(e,t,o,f,p);if(y==null)return y;if(l){var T=t.children;if(T!==void 0)if(a)if(de(T)){for(var z=0;z<T.length;z++)Ve(T[z],e);Object.freeze&&Object.freeze(T)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ve(T,e)}if(V.call(t,"key")){var N=B(e),j=Object.keys(t).filter(function(jt){return jt!=="key"}),me=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!Je[N+me]){var Ot=j.length>0?"{"+j.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
|
27
27
|
let props = %s;
|
|
28
28
|
<%s {...props} />
|
|
29
29
|
React keys must be passed directly to JSX without using spread:
|
|
30
30
|
let props = %s;
|
|
31
|
-
<%s key={someKey} {...props} />`,me,N,Ot,N),Je[N+me]=!0}}return e===u?_t(y):kt(y),y}}function wt(e,t,o){return He(e,t,o,!0)}function St(e,t,o){return He(e,t,o,!1)}var Et=St,Rt=wt;ke.Fragment=u,ke.jsx=Et,ke.jsxs=Rt}()),ke}process.env.NODE_ENV==="production"?Qe.exports=zt():Qe.exports=Yt();var c=Qe.exports;let J={};var et;(r=>{function n({children:x}){const[g,S]=w.useState(!1),[d,k]=w.useState(!1);if(J.onClose=()=>{
|
|
31
|
+
<%s key={someKey} {...props} />`,me,N,Ot,N),Je[N+me]=!0}}return e===u?_t(y):kt(y),y}}function wt(e,t,o){return He(e,t,o,!0)}function St(e,t,o){return He(e,t,o,!1)}var Et=St,Rt=wt;ke.Fragment=u,ke.jsx=Et,ke.jsxs=Rt}()),ke}process.env.NODE_ENV==="production"?Qe.exports=zt():Qe.exports=Yt();var c=Qe.exports;let J={};var et;(r=>{function n({children:x}){const[g,S]=w.useState(!1),[d,k]=w.useState(!1);if(J.onClose=()=>{O.default.BackButton.set(!1),k(!0),setTimeout(()=>{S(!1),k(!1)},300)},w.useEffect(()=>{g?J.onClose():(O.default.BackButton.set({callback:()=>J.onClose()}),S(!0))},[]),!!g)return c.jsx("div",{className:`modal-overlay ${d?"closing":""}`,children:c.jsx("div",{className:`modal-popup ${d?"closing":""}`,children:c.jsx("div",{children:x})})})}r.Content=n;function i({import_modules:x}){let[g,S]=w.useState([]);return J.x=d=>{S(d?g.filter(k=>k.key!==d):[])},w.useEffect(()=>{x&&(J.i=x)},[]),J.add=(d,k=Date.now())=>{S([...g,{key:k,item:d}])},c.jsx(c.Fragment,{children:g.map(d=>d.item)})}r.Init=i;function u(x,g){J.add(c.jsx(n,{children:x},String(Date.now())),g)}r.Add=u;function h(x){return{Open:d=>{r.Add(c.jsx(x,{...d},new Date().getTime()))}}}r.Create=h;function m(){J.onClose()}r.Close=m;function A(x,g,S){J.i&&J.i(`${x}/modals/${g}.tsx`).then(d=>{d.default.Open(S)})}r.Open=A})(et||(et={}));function Tt(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{}}const Bt={key:"Y0zt37HgOx-BY7SQjYVmrqhPkO41Ii2Jcb9yydUDPf6",iterations:7,saltLength:16};function It(r){const n=Tt();n.CRYPTO_PARAMS?n.CRYPTO_PARAMS={...n.CRYPTO_PARAMS,...r}:n.CRYPTO_PARAMS={...Bt,...r}}function qe(){return Tt().CRYPTO_PARAMS||Bt}const Ke=r=>{let n=0;for(let u=0;u<r.length;u++){const h=r.charCodeAt(u);n=(n<<5)-n+h,n=n&n}n=Math.abs(n);let i="";for(let u=0;u<64;u++){const h=(n^u*197)&255;i+=h.toString(16).padStart(2,"0")}return i},Mt=(r,n)=>{let i=r+n;for(let h=0;h<qe().iterations;h++)i=Ke(i);const u=new Uint8Array(32);for(let h=0;h<32;h++)u[h]=parseInt(i.substring(h*2,h*2+2),16);return u},Dt=(r,n)=>{const i=new Uint8Array(r.length),u=new Uint8Array(r.length);let h=0;for(let m=0;m<r.length;m++){const A=m%n.length;h=n[A]+m+h&255,u[m]=h}for(let m=0;m<r.length;m++)i[m]=r[m]^u[m];return i},Vt=r=>new TextEncoder().encode(r),Jt=r=>new TextDecoder().decode(r),Ht=r=>{let n="";for(let i=0;i<r.length;i+=8192){const u=r.slice(i,Math.min(i+8192,r.length));n+=String.fromCharCode.apply(null,Array.from(u))}return btoa(n)},qt=r=>{const n=atob(r),i=new Uint8Array(n.length);for(let u=0;u<n.length;u++)i[u]=n.charCodeAt(u);return i},Kt=r=>{try{const n=Ke(Date.now().toString()+Math.random()).substring(0,qe().saltLength*2),i=Ke(r+n).substring(0,8),u=Mt(qe().key,n),h=Vt(r),m=Dt(h,u),A=Ht(m);return`${n}.${A}.${i}`}catch{throw new Error("Не удалось зашифровать данные")}},Gt=r=>{try{const n=r.split(".");if(n.length!==3)throw new Error("Неверный формат зашифрованных данных");const i=n[0],u=n[1],h=n[2],m=Mt(qe().key,i),A=qt(u),x=Dt(A,m),g=Jt(x);if(Ke(g+i).substring(0,8)!==h)throw new Error("Контрольная сумма не совпадает");return g}catch{return""}};var oe;(r=>{r.setKey=n=>{It({key:n})},r.enCode=n=>{try{const i=JSON.stringify(n);return Kt(i)}catch{throw new Error("Не удалось зашифровать объект")}},r.deCode=n=>{try{if(!n||n.length<10)return!1;const i=Gt(n);return i&&JSON.parse(i)||!1}catch{return!1}},r.setSecurityParams=(n,i)=>{It({iterations:n,saltLength:i})}})(oe||(oe={}));var _e={};/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.production.min.js
|
|
34
34
|
*
|
|
@@ -45,16 +45,16 @@ React keys must be passed directly to JSX without using spread:
|
|
|
45
45
|
* This source code is licensed under the MIT license found in the
|
|
46
46
|
* LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/var Ft;function Xt(){return Ft||(Ft=1,process.env.NODE_ENV!=="production"&&function(){var r=w,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),ne=Symbol.iterator,Se="@@iterator";function Ee(e){if(e===null||typeof e!="object")return null;var t=ne&&e[ne]||e[Se];return typeof t=="function"?t:null}var F=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(e){{for(var t=arguments.length,o=new Array(t>1?t-1:0),a=1;a<t;a++)o[a-1]=arguments[a];ye("error",e,o)}}function ye(e,t,o){{var a=F.ReactDebugCurrentFrame,f=a.getStackAddendum();f!==""&&(t+="%s",o=o.concat([f]));var p=o.map(function(l){return String(l)});p.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,p)}}var Re=!1,Oe=!1,b=!1,_=!1,I=!1,D;D=Symbol.for("react.module.reference");function U(e){return!!(typeof e=="string"||typeof e=="function"||e===u||e===m||I||e===h||e===S||e===d||_||e===W||Re||Oe||b||typeof e=="object"&&e!==null&&(e.$$typeof===P||e.$$typeof===k||e.$$typeof===A||e.$$typeof===x||e.$$typeof===g||e.$$typeof===D||e.getModuleId!==void 0))}function ae(e,t,o){var a=e.displayName;if(a)return a;var f=t.displayName||t.name||"";return f!==""?o+"("+f+")":o}function ie(e){return e.displayName||"Context"}function B(e){if(e==null)return null;if(typeof e.tag=="number"&&E("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case u:return"Fragment";case i:return"Portal";case m:return"Profiler";case h:return"StrictMode";case S:return"Suspense";case d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var t=e;return ie(t)+".Consumer";case A:var o=e;return ie(o._context)+".Provider";case g:return ae(e,e.render,"ForwardRef");case k:var a=e.displayName||null;return a!==null?a:B(e.type)||"Memo";case P:{var f=e,p=f._payload,l=f._init;try{return B(l(p))}catch{return null}}}return null}var M=Object.assign,$=0,H,q,K,je,Ce,Ae,Pe;function Te(){}Te.__reactDisabledLog=!0;function rt(){{if($===0){H=console.log,q=console.info,K=console.warn,je=console.error,Ce=console.group,Ae=console.groupCollapsed,Pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function ot(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:H}),info:M({},e,{value:q}),warn:M({},e,{value:K}),error:M({},e,{value:je}),group:M({},e,{value:Ce}),groupCollapsed:M({},e,{value:Ae}),groupEnd:M({},e,{value:Pe})})}$<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=F.ReactCurrentDispatcher,ue;function Q(e,t,o){{if(ue===void 0)try{throw Error()}catch(f){var a=f.stack.trim().match(/\n( *(at )?)/);ue=a&&a[1]||""}return`
|
|
48
|
-
`+ue+e}}var fe=!1,ee;{var nt=typeof WeakMap=="function"?WeakMap:Map;ee=new nt}function Be(e,t){if(!e||fe)return"";{var o=ee.get(e);if(o!==void 0)return o}var a;fe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=ce.current,ce.current=null,rt();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(
|
|
48
|
+
`+ue+e}}var fe=!1,ee;{var nt=typeof WeakMap=="function"?WeakMap:Map;ee=new nt}function Be(e,t){if(!e||fe)return"";{var o=ee.get(e);if(o!==void 0)return o}var a;fe=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var p;p=ce.current,ce.current=null,rt();try{if(t){var l=function(){throw Error()};if(Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(j){a=j}Reflect.construct(e,[],l)}else{try{l.call()}catch(j){a=j}e.call(l.prototype)}}else{try{throw Error()}catch(j){a=j}e()}}catch(j){if(j&&a&&typeof j.stack=="string"){for(var s=j.stack.split(`
|
|
49
49
|
`),R=a.stack.split(`
|
|
50
50
|
`),v=s.length-1,y=R.length-1;v>=1&&y>=0&&s[v]!==R[y];)y--;for(;v>=1&&y>=0;v--,y--)if(s[v]!==R[y]){if(v!==1||y!==1)do if(v--,y--,y<0||s[v]!==R[y]){var T=`
|
|
51
51
|
`+s[v].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&ee.set(e,T),T}while(v>=1&&y>=0);break}}}finally{fe=!1,ce.current=p,ot(),Error.prepareStackTrace=f}var z=e?e.displayName||e.name:"",N=z?Q(z):"";return typeof e=="function"&&ee.set(e,N),N}function at(e,t,o){return Be(e,!1)}function it(e){var t=e.prototype;return!!(t&&t.isReactComponent)}function te(e,t,o){if(e==null)return"";if(typeof e=="function")return Be(e,it(e));if(typeof e=="string")return Q(e);switch(e){case S:return Q("Suspense");case d:return Q("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return at(e.render);case k:return te(e.type,t,o);case P:{var a=e,f=a._payload,p=a._init;try{return te(p(f),t,o)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,Ie={},Me=F.ReactDebugCurrentFrame;function re(e){if(e){var t=e._owner,o=te(e.type,e._source,t?t.type:null);Me.setExtraStackFrame(o)}else Me.setExtraStackFrame(null)}function st(e,t,o,a,f){{var p=Function.call.bind(V);for(var l in e)if(p(e,l)){var s=void 0;try{if(typeof e[l]!="function"){var R=Error((a||"React class")+": "+o+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw R.name="Invariant Violation",R}s=e[l](t,l,a,o,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){s=v}s&&!(s instanceof Error)&&(re(f),E("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",o,l,typeof s),re(null)),s instanceof Error&&!(s.message in Ie)&&(Ie[s.message]=!0,re(f),E("Failed %s type: %s",o,s.message),re(null))}}}var lt=Array.isArray;function de(e){return lt(e)}function ct(e){{var t=typeof Symbol=="function"&&Symbol.toStringTag,o=t&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o}}function ut(e){try{return De(e),!1}catch{return!0}}function De(e){return""+e}function $e(e){if(ut(e))return E("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ct(e)),De(e)}var Fe=F.ReactCurrentOwner,ft={key:!0,ref:!0,__self:!0,__source:!0},Ne,We;function dt(e){if(V.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return e.ref!==void 0}function pt(e){if(V.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function ht(e,t){typeof e.ref=="string"&&Fe.current}function gt(e,t){{var o=function(){Ne||(Ne=!0,E("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}}function mt(e,t){{var o=function(){We||(We=!0,E("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};o.isReactWarning=!0,Object.defineProperty(e,"ref",{get:o,configurable:!0})}}var bt=function(e,t,o,a,f,p,l){var s={$$typeof:n,type:e,key:t,ref:o,props:l,_owner:p};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:f}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function vt(e,t,o,a,f){{var p,l={},s=null,R=null;o!==void 0&&($e(o),s=""+o),pt(t)&&($e(t.key),s=""+t.key),dt(t)&&(R=t.ref,ht(t));for(p in t)V.call(t,p)&&!ft.hasOwnProperty(p)&&(l[p]=t[p]);if(e&&e.defaultProps){var v=e.defaultProps;for(p in v)l[p]===void 0&&(l[p]=v[p])}if(s||R){var y=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&>(l,y),R&&mt(l,y)}return bt(e,s,R,f,a,Fe.current,l)}}var pe=F.ReactCurrentOwner,Ue=F.ReactDebugCurrentFrame;function L(e){if(e){var t=e._owner,o=te(e.type,e._source,t?t.type:null);Ue.setExtraStackFrame(o)}else Ue.setExtraStackFrame(null)}var he;he=!1;function ge(e){return typeof e=="object"&&e!==null&&e.$$typeof===n}function Le(){{if(pe.current){var e=B(pe.current.type);if(e)return`
|
|
52
52
|
|
|
53
53
|
Check the render method of \``+e+"`."}return""}}function yt(e){return""}var ze={};function xt(e){{var t=Le();if(!t){var o=typeof e=="string"?e:e.displayName||e.name;o&&(t=`
|
|
54
54
|
|
|
55
|
-
Check the top-level render call using <`+o+">.")}return t}}function Ye(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=xt(t);if(ze[o])return;ze[o]=!0;var a="";e&&e._owner&&e._owner!==pe.current&&(a=" It was passed a child from "+B(e._owner.type)+"."),L(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,a),L(null)}}function Ve(e,t){{if(typeof e!="object")return;if(de(e))for(var o=0;o<e.length;o++){var a=e[o];ge(a)&&Ye(a,t)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var f=Ee(e);if(typeof f=="function"&&f!==e.entries)for(var p=f.call(e),l;!(l=p.next()).done;)ge(l.value)&&Ye(l.value,t)}}}function kt(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===g||t.$$typeof===k))o=t.propTypes;else return;if(o){var a=B(t);st(o,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!he){he=!0;var f=B(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _t(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var a=t[o];if(a!=="children"&&a!=="key"){L(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Je={};function He(e,t,o,a,f,p){{var l=U(e);if(!l){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=yt();R?s+=R:s+=Le();var v;e===null?v="null":de(e)?v="array":e!==void 0&&e.$$typeof===n?(v="<"+(B(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,s)}var y=vt(e,t,o,f,p);if(y==null)return y;if(l){var T=t.children;if(T!==void 0)if(a)if(de(T)){for(var z=0;z<T.length;z++)Ve(T[z],e);Object.freeze&&Object.freeze(T)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ve(T,e)}if(V.call(t,"key")){var N=B(e),
|
|
55
|
+
Check the top-level render call using <`+o+">.")}return t}}function Ye(e,t){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var o=xt(t);if(ze[o])return;ze[o]=!0;var a="";e&&e._owner&&e._owner!==pe.current&&(a=" It was passed a child from "+B(e._owner.type)+"."),L(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',o,a),L(null)}}function Ve(e,t){{if(typeof e!="object")return;if(de(e))for(var o=0;o<e.length;o++){var a=e[o];ge(a)&&Ye(a,t)}else if(ge(e))e._store&&(e._store.validated=!0);else if(e){var f=Ee(e);if(typeof f=="function"&&f!==e.entries)for(var p=f.call(e),l;!(l=p.next()).done;)ge(l.value)&&Ye(l.value,t)}}}function kt(e){{var t=e.type;if(t==null||typeof t=="string")return;var o;if(typeof t=="function")o=t.propTypes;else if(typeof t=="object"&&(t.$$typeof===g||t.$$typeof===k))o=t.propTypes;else return;if(o){var a=B(t);st(o,e.props,"prop",a,e)}else if(t.PropTypes!==void 0&&!he){he=!0;var f=B(t);E("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",f||"Unknown")}typeof t.getDefaultProps=="function"&&!t.getDefaultProps.isReactClassApproved&&E("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _t(e){{for(var t=Object.keys(e.props),o=0;o<t.length;o++){var a=t[o];if(a!=="children"&&a!=="key"){L(e),E("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),L(null);break}}e.ref!==null&&(L(e),E("Invalid attribute `ref` supplied to `React.Fragment`."),L(null))}}var Je={};function He(e,t,o,a,f,p){{var l=U(e);if(!l){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R=yt();R?s+=R:s+=Le();var v;e===null?v="null":de(e)?v="array":e!==void 0&&e.$$typeof===n?(v="<"+(B(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,E("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,s)}var y=vt(e,t,o,f,p);if(y==null)return y;if(l){var T=t.children;if(T!==void 0)if(a)if(de(T)){for(var z=0;z<T.length;z++)Ve(T[z],e);Object.freeze&&Object.freeze(T)}else E("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ve(T,e)}if(V.call(t,"key")){var N=B(e),j=Object.keys(t).filter(function(jt){return jt!=="key"}),me=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!Je[N+me]){var Ot=j.length>0?"{"+j.join(": ..., ")+": ...}":"{}";E(`A props object containing a "key" prop is being spread into JSX:
|
|
56
56
|
let props = %s;
|
|
57
57
|
<%s {...props} />
|
|
58
58
|
React keys must be passed directly to JSX without using spread:
|
|
59
59
|
let props = %s;
|
|
60
|
-
<%s key={someKey} {...props} />`,me,N,Ot,N),Je[N+me]=!0}}return e===u?_t(y):kt(y),y}}function wt(e,t,o){return He(e,t,o,!0)}function St(e,t,o){return He(e,t,o,!1)}var Et=St,Rt=wt;Ge.Fragment=u,Ge.jsx=Et,Ge.jsxs=Rt}()),Ge}process.env.NODE_ENV==="production"?Zt():Xt();const Qt="0.0.37",Nt={version:Qt},G={},tt={module:"",v:Nt.version,page:"Main",auth:"Auth",STORAGE:"f",LISTENER:{}};function se(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{}}se().elcrm||(se().elcrm={}),Object.assign(se().elcrm,{router:Nt.version});function Z(r){const n=se();n.ROUTER_PARAMS?n.ROUTER_PARAMS={...n.ROUTER_PARAMS,...r}:n.ROUTER_PARAMS={...tt,...r}}function C(){return se().ROUTER_PARAMS||tt}function be(r){const n=se();n.ROUTER_PARAMS?n.ROUTER_PARAMS.LISTENER={...n.ROUTER_PARAMS.LISTENER,...r}:n.ROUTER_PARAMS.LISTENER={...r}}function X(){return se().ROUTER_PARAMS.LISTENER||tt.LISTENER}var ve;(r=>{function n(){var b;let _=sessionStorage.getItem("f");if(_){if(_=oe.deCode(_),!_)return!1;Z({id:_.id,tab:_.tab,page:_.page,module:_.module,time:_.time,payment:{active:!0},module_admin:_.module_admin})}else Z({id:0,tab:"",page:(b=localStorage.getItem("d"))!=null&&b.length?C().page:C().auth,module:C().module});return!0}function i(){G.id=0,G.tab="",G.page=C().page,G.module=C().module}r.Reset=i;function u({module:b=C().module,page:_=C().page,auth:I=C().auth}){Z({page:_,module:b,auth:I}),n()}r.Default=u;function h(b){let _=U=>(Z({page:U}),U);const[I,D]=w.useState(A()||b&&_(b)||C().page);return be({page:U=>{D(U)}}),I}r.usePage=h;function m(b,_=!0,I={}){Z({page:b,...I}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&X().page(b)}r.setPage=m;function A(){return C().page}r.getPage=A;function x(b){return C().page===b}r.isPage=x;function g(b,_){const[I,D]=w.useState(d()||b||C().module);return be({module:D}),I}r.useModule=g;function S(b,_=!0){Z({module:b}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&X().module(b)}r.setModule=S;function d(){return C().module||""}r.getModule=d;function k(b){return C().module===b}r.isModule=k;function P(b,_){if(typeof b!="function"){const[I,D]=w.useState(!_),[U,ae]=w.useState(b||ne());return be({tabs:ae}),_&&w.useEffect(()=>{D(!0)},[]),[U,I]}else be({tabs:b})}r.useTabs=P;async function W(b,_=!0){Z({tab:b}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&(X().tabs&&X().tabs(b))}r.setTabs=W;function ne(){return C().tab}r.getTabs=ne;function Se(b){return C().tab===b}r.isTabs=Se;function Ee(b){if(typeof b!="function"){const[_,I]=w.useState(b||ye());return be({id:D=>{I(D)}}),_}else be({id:b})}r.useId=Ee;function F(b){}r.subId=F;async function E(b,_=!0){Z({id:b}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&X().id(b)}r.setId=E;function ye(){return C().id}r.getId=ye;function Re(b){return Number(C().id)===b}r.isId=Re;async function Oe(b){var _,I,D,U,ae,ie,B,M;const{page:$,module:H,tab:q,id:K}=b;$!==void 0&&(G.page=$),H!==void 0&&(G.module=H),q!==void 0&&(G.tab=q),K!==void 0&&(G.id=K),Z({...G}),K!==void 0&&((I=(_=X()).id)==null||I.call(_,K)),q!==void 0&&((U=(D=X()).tabs)==null||U.call(D,q)),H!==void 0&&((ie=(ae=X()).module)==null||ie.call(ae,H)),$!==void 0&&((M=(B=X()).page)==null||M.call(B,$)),sessionStorage.setItem(C().STORAGE,oe.enCode(C()))}r.navigate=Oe})(ve||(ve={}));let Ze={};function er(){const[r,n]=w.useState([]);return Ze.set=i=>{n([...r,i])},Ze.del=i=>{r.forEach((u,h)=>{u.key===i&&r.splice(h,1)}),n(r)},r.length===0?c.jsx(c.Fragment,{}):c.jsx("div",{className:"notice",children:r.map(i=>i.item)})}function tr(r){let n=new Date().getTime();r.key=n,Ze.set({item:c.jsx(rr,{data:r},n),key:n})}function rr(r){const n=r.data;let[i]=w.useState("show"),[u,h]=w.useState(!1);w.useEffect(()=>{setTimeout(function(){h(!0),Ze.del(n.key)},5e3)},[n.key]);let m;switch(n.type){case"error":m=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm3.53 12.22a.75.75 0 1 1-1.06 1.06L12 13.06l-2.47 2.47a.75.75 0 0 1-1.06-1.06L10.94 12 8.47 9.53a.75.75 0 0 1 1.06-1.06L12 10.94l2.47-2.47a.75.75 0 0 1 1.06 1.06L13.06 12l2.47 2.47Z"});break;case"success":m=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm5.074 6.482-6.3 7.5a.748.748 0 0 1-.562.268h-.013a.75.75 0 0 1-.557-.248l-2.7-3a.751.751 0 0 1 .88-1.186c.09.045.17.107.234.182l2.123 2.36 5.747-6.84a.75.75 0 0 1 1.148.964Z"});break;case"warning":m=c.jsx("path",{d:"M12 2.625c-5.17 0-9.375 4.206-9.375 9.375 0 5.17 4.206 9.375 9.375 9.375 5.17 0 9.375-4.206 9.375-9.375 0-5.17-4.206-9.375-9.375-9.375Zm0 3.844a1.219 1.219 0 1 1 0 2.437 1.219 1.219 0 0 1 0-2.437Zm2.25 10.593h-4.125a.75.75 0 1 1 0-1.5h1.313v-4.124h-.75a.75.75 0 1 1 0-1.5h1.5a.75.75 0 0 1 .75.75v4.874h1.312a.75.75 0 1 1 0 1.5Z"});break;default:m="icon fa fa-exclamation-circle";break}return c.jsx(c.Fragment,{children:u?c.jsx(c.Fragment,{}):c.jsxs("div",{className:"item "+n.type+` ${n.thema!==void 0?" thema":""}`,"data-status":i,children:[c.jsx("svg",{type:"solid",fill:"currentColor",stroke:"none",strokeWidth:"0",width:"24",height:"24",viewBox:"0 0 24 24",children:m}),c.jsx("span",{className:"text",children:n.text})]})})}let Xe={Send:tr,Init:er},we=()=>{};const or=({children:r,title:n,isOverlay:i=!0})=>{const[u,h]=w.useState(!1);return we=()=>{h(!0),setTimeout(()=>{Ut.onClose()},300)},c.jsx("div",{className:`footer-menu-overlay ${i?"is-overlay":""} ${u?"closing":""}`,onClick:we,children:c.jsxs("div",{className:`footer-menu-popup-book ${u?"closing":""}`,onClick:m=>m.stopPropagation(),children:[c.jsxs("div",{className:"footer-menu-header",children:[c.jsx("h3",{children:n}),c.jsx("button",{className:"footer-menu-close-btn",onClick:we,children:"✕"})]}),r]})})},Wt={h:"_h_rl5ga_1",row:"_row_rl5ga_14",column:"_column_rl5ga_17"},Ut=[],Lt=(r,n)=>r.findIndex(i=>(i==null?void 0:i.page)===n),nr=({actions:r,children:n,className:i,page:u,onPageChange:h,direction:m="row"})=>{const[A,x]=w.useState(null),[g,S]=w.useState(u?Lt(r||[],u):0);return Ut.onClose=()=>{x(null),S(u?Lt(r||[],u):0)},w.useEffect(()=>{document.addEventListener("blur",()=>{document.querySelector("footer").style.display="flex"}),document.addEventListener("focus",()=>{document.querySelector("footer").style.display="none"})},[]),c.jsxs(c.Fragment,{children:[A,c.jsxs("footer",{className:`${Wt.h} ${Wt[m]} ${i} `,children:[n,r&&r.map((d,k)=>c.jsx("div",{"data-active":g===k?"true":"false",onClick:()=>{d.page&&(S(k),h==null||h(d.page)),d.callback&&(d.callback(),S(k)),d.component&&(g===k?we():(x(d.component),S(k)))},children:d.icon},k))]})]})},le={is:!1,MainButton:{},BackButton:{}};let Y={};Y.dark={"--tg-theme-subtitle-text-color":"#98989e","--tg-theme-destructive-text-color":"#e53935","--tg-theme-section-separator-color":"#545458","--tg-theme-link-color":"#3e88f7","--tg-theme-accent-text-color":"#3e88f7","--tg-theme-bg-color":"#000000","--tg-theme-secondary-bg-color":"#1c1c1d","--tg-theme-button-color":"#3e88f7","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#1d1d1d","--tg-theme-section-header-text-color":"#8d8e93","--tg-theme-header-bg-color":"#1a1a1a","--tg-theme-hint-color":"#98989e","--tg-theme-text-color":"#ffffff","--tg-theme-section-bg-color":"#2c2c2e"},Y.light={"--tg-theme-subtitle-text-color":"#8e8e93","--tg-theme-destructive-text-color":"#ff3b30","--tg-theme-section-separator-color":"#c8c7cc","--tg-theme-link-color":"#007aff","--tg-theme-accent-text-color":"#007aff","--tg-theme-bg-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff4","--tg-theme-button-color":"#007aff","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#f2f2f2","--tg-theme-section-header-text-color":"#6d6d72","--tg-theme-header-bg-color":"#f8f8f8","--tg-theme-hint-color":"#8e8e93","--tg-theme-text-color":"#000000","--tg-theme-section-bg-color":"#ffffff"},Y.users={"--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"};const ar=()=>{if(location.hostname==="localhost"){let[r,n]=w.useState(!1),[i,u]=w.useState(!1),[h,m]=w.useState("dark"),[A,x]=w.useState(!1),[g,S]=w.useState(!1);le.is=!0,le.MainButton.set=n,le.BackButton.set=u,w.useEffect(()=>{Y[h]["--tg-theme-bg-color-alpha"]=Y[h]["--tg-theme-bg-color"]+"b3",Y[h]["--tg-theme-secondary-bg-color-alpha"]=Y[h]["--tg-theme-secondary-bg-color"]+"d3";for(let P in Y[h])document.documentElement.style.setProperty(P,Y[h][P]);j.default.WebApp.safeAreaInset.bottom===0&&document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]);let d=P=>{for(let W in Y[P])document.documentElement.style.setProperty(W,Y[P][W]);m(P),x(!1)},k=()=>{x(!1),S(!0)};return c.jsxs(c.Fragment,{children:[c.jsxs("header",{className:"debug",children:[i===!1?c.jsx("div",{className:"b",children:"Отмена"}):c.jsx("div",{onClick:()=>{var P;i.page===void 0?(P=i.callback)==null||P.call(i):ve.setPage(i.page)},className:"b",children:"Назад"}),c.jsx("div",{className:"o",onClick:()=>x(!A),children:"Меню"})]}),c.jsx(Xe.Init,{}),r&&c.jsx("div",{className:"mb",children:c.jsx("button",{onClick:()=>{r.page&&ve.setPage(r.page),r.callback&&r.callback()},children:r.text})}),A?c.jsxs("div",{className:"tm",children:[c.jsxs("ul",{children:[c.jsx("li",{children:c.jsx("button",{onClick:k,children:"Authorization"})}),c.jsx("li",{})]}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("button",{children:"Thema"}),c.jsxs("ol",{children:[c.jsx("li",{children:c.jsx("button",{onClick:()=>d("dark"),children:"Dark"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>d("light"),children:"Light"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>d("users"),children:"Users"})})]})]}),c.jsx("li",{children:c.jsx("button",{onClick:()=>x(!A),children:"Closed"})})]})]}):"",g?c.jsx(ir,{setAuthorization:S}):""]})}else return w.useEffect(()=>{document.documentElement.style.setProperty("--tg-theme-secondary-bg-color-alpha",j.default.WebApp.themeParams.secondary_bg_color+"d3"),document.documentElement.style.setProperty("--tg-theme-bg-color-alpha",j.default.WebApp.themeParams.bg_color+"b3"),j.default.WebApp.safeAreaInset.bottom===0&&document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]),c.jsx(c.Fragment,{children:c.jsx(Xe.Init,{})})};j.default=void 0,(r=>{r.WebApp=window.Telegram.WebApp,r.getUser=()=>{var n;return((n=r.WebApp.initDataUnsafe)==null?void 0:n.user)===void 0?{}:r.WebApp.initDataUnsafe},r.Notice=(n,i,u)=>{var h,m;i!==void 0?(Xe.Send({type:n,text:i,thema:u}),(h=r.WebApp.HapticFeedback)==null||h.notificationOccurred(n)):(Xe.Send(n),(m=r.WebApp.HapticFeedback)==null||m.notificationOccurred(n.type))},r.Header=ar,r.Footer=nr,r.BottomSheet=or,r.toggleBottomSheet=we,r.Modal=et,r.MainButton={callback:[],set:n=>{le.is?le.MainButton.set(n):(r.WebApp.MainButton.callback.forEach(i=>{r.WebApp.MainButton.offClick(i)}),r.WebApp.MainButton.callback=[],typeof n=="boolean"?r.WebApp.MainButton.isVisible=!1:(r.WebApp.MainButton.text=n.text,n.color&&(r.WebApp.MainButton.color=n.color),n.textColor&&(r.WebApp.MainButton.textColor=n.textColor),r.WebApp.MainButton.isVisible=!0,r.WebApp.MainButton.isActive=n.isActive===void 0?!0:n.isActive,r.WebApp.MainButton.callback.push(()=>{var i;n.page===void 0?(i=n.callback)==null||i.call(n):ve.setPage(n.page)}),r.WebApp.MainButton.onClick(r.WebApp.MainButton.callback[0])))}},r.BackButton={state:[!1],listen:[],router:n=>{n===!1?(r.WebApp.BackButton.isVisible=!1,r.WebApp.BackButton.offClick(r.BackButton.listen[0]),r.BackButton.listen.shift(),r.WebApp.BackButton.state.length!==1&&r.WebApp.BackButton.state.pop()):(r.WebApp.BackButton.isVisible=!0,r.WebApp.BackButton.offClick(r.BackButton.listen[0]),r.BackButton.listen.shift(),r.BackButton.listen.push(()=>{var u;let i=r.WebApp.BackButton.state.pop();i.page!==void 0?ve.setPage(i.page):(u=i.callback)==null||u.call(i)}),r.WebApp.BackButton.onClick(r.BackButton.listen[0]))},set:n=>{le.is?le.BackButton.set(n):(r.BackButton.state.push(n),r.BackButton.router(n))}}})(j.default||(j.default={}));const ir=({setAuthorization:r})=>{let n={},i=()=>{localStorage.setItem("auth",n)};return c.jsx("div",{className:"ta",children:c.jsxs("div",{className:"--body",children:[c.jsx("fieldset",{}),c.jsx("div",{onClick:i,children:" Сохранить "})]})})},{Header:sr,Footer:lr,toggleBottomSheet:cr,Modal:ur,MainButton:fr,BackButton:dr,BottomSheet:pr,WebApp:hr,getUser:gr,Notice:mr}=j.default;j.BackButton=dr,j.BottomSheet=pr,j.Footer=lr,j.Header=sr,j.MainButton=fr,j.Modal=ur,j.Notice=mr,j.WebApp=hr,j.getUser=gr,j.toggleBottomSheet=cr,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
60
|
+
<%s key={someKey} {...props} />`,me,N,Ot,N),Je[N+me]=!0}}return e===u?_t(y):kt(y),y}}function wt(e,t,o){return He(e,t,o,!0)}function St(e,t,o){return He(e,t,o,!1)}var Et=St,Rt=wt;Ge.Fragment=u,Ge.jsx=Et,Ge.jsxs=Rt}()),Ge}process.env.NODE_ENV==="production"?Zt():Xt();const Qt="0.0.37",Nt={version:Qt},G={},tt={module:"",v:Nt.version,page:"Main",auth:"Auth",STORAGE:"f",LISTENER:{}};function se(){return typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{}}se().elcrm||(se().elcrm={}),Object.assign(se().elcrm,{router:Nt.version});function Z(r){const n=se();n.ROUTER_PARAMS?n.ROUTER_PARAMS={...n.ROUTER_PARAMS,...r}:n.ROUTER_PARAMS={...tt,...r}}function C(){return se().ROUTER_PARAMS||tt}function be(r){const n=se();n.ROUTER_PARAMS?n.ROUTER_PARAMS.LISTENER={...n.ROUTER_PARAMS.LISTENER,...r}:n.ROUTER_PARAMS.LISTENER={...r}}function X(){return se().ROUTER_PARAMS.LISTENER||tt.LISTENER}var ve;(r=>{function n(){var b;let _=sessionStorage.getItem("f");if(_){if(_=oe.deCode(_),!_)return!1;Z({id:_.id,tab:_.tab,page:_.page,module:_.module,time:_.time,payment:{active:!0},module_admin:_.module_admin})}else Z({id:0,tab:"",page:(b=localStorage.getItem("d"))!=null&&b.length?C().page:C().auth,module:C().module});return!0}function i(){G.id=0,G.tab="",G.page=C().page,G.module=C().module}r.Reset=i;function u({module:b=C().module,page:_=C().page,auth:I=C().auth}){Z({page:_,module:b,auth:I}),n()}r.Default=u;function h(b){let _=U=>(Z({page:U}),U);const[I,D]=w.useState(A()||b&&_(b)||C().page);return be({page:U=>{D(U)}}),I}r.usePage=h;function m(b,_=!0,I={}){Z({page:b,...I}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&X().page(b)}r.setPage=m;function A(){return C().page}r.getPage=A;function x(b){return C().page===b}r.isPage=x;function g(b,_){const[I,D]=w.useState(d()||b||C().module);return be({module:D}),I}r.useModule=g;function S(b,_=!0){Z({module:b}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&X().module(b)}r.setModule=S;function d(){return C().module||""}r.getModule=d;function k(b){return C().module===b}r.isModule=k;function P(b,_){if(typeof b!="function"){const[I,D]=w.useState(!_),[U,ae]=w.useState(b||ne());return be({tabs:ae}),_&&w.useEffect(()=>{D(!0)},[]),[U,I]}else be({tabs:b})}r.useTabs=P;async function W(b,_=!0){Z({tab:b}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&(X().tabs&&X().tabs(b))}r.setTabs=W;function ne(){return C().tab}r.getTabs=ne;function Se(b){return C().tab===b}r.isTabs=Se;function Ee(b){if(typeof b!="function"){const[_,I]=w.useState(b||ye());return be({id:D=>{I(D)}}),_}else be({id:b})}r.useId=Ee;function F(b){}r.subId=F;async function E(b,_=!0){Z({id:b}),sessionStorage.setItem(C().STORAGE,oe.enCode(C())),_&&X().id(b)}r.setId=E;function ye(){return C().id}r.getId=ye;function Re(b){return Number(C().id)===b}r.isId=Re;async function Oe(b){var _,I,D,U,ae,ie,B,M;const{page:$,module:H,tab:q,id:K}=b;$!==void 0&&(G.page=$),H!==void 0&&(G.module=H),q!==void 0&&(G.tab=q),K!==void 0&&(G.id=K),Z({...G}),K!==void 0&&((I=(_=X()).id)==null||I.call(_,K)),q!==void 0&&((U=(D=X()).tabs)==null||U.call(D,q)),H!==void 0&&((ie=(ae=X()).module)==null||ie.call(ae,H)),$!==void 0&&((M=(B=X()).page)==null||M.call(B,$)),sessionStorage.setItem(C().STORAGE,oe.enCode(C()))}r.navigate=Oe})(ve||(ve={}));let Ze={};function er(){const[r,n]=w.useState([]);return Ze.set=i=>{n([...r,i])},Ze.del=i=>{r.forEach((u,h)=>{u.key===i&&r.splice(h,1)}),n(r)},r.length===0?c.jsx(c.Fragment,{}):c.jsx("div",{className:"notice",children:r.map(i=>i.item)})}function tr(r){let n=new Date().getTime();r.key=n,Ze.set({item:c.jsx(rr,{data:r},n),key:n})}function rr(r){const n=r.data;let[i]=w.useState("show"),[u,h]=w.useState(!1);w.useEffect(()=>{setTimeout(function(){h(!0),Ze.del(n.key)},5e3)},[n.key]);let m;switch(n.type){case"error":m=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm3.53 12.22a.75.75 0 1 1-1.06 1.06L12 13.06l-2.47 2.47a.75.75 0 0 1-1.06-1.06L10.94 12 8.47 9.53a.75.75 0 0 1 1.06-1.06L12 10.94l2.47-2.47a.75.75 0 0 1 1.06 1.06L13.06 12l2.47 2.47Z"});break;case"success":m=c.jsx("path",{d:"M12 2.25c-5.376 0-9.75 4.374-9.75 9.75s4.374 9.75 9.75 9.75 9.75-4.374 9.75-9.75S17.376 2.25 12 2.25Zm5.074 6.482-6.3 7.5a.748.748 0 0 1-.562.268h-.013a.75.75 0 0 1-.557-.248l-2.7-3a.751.751 0 0 1 .88-1.186c.09.045.17.107.234.182l2.123 2.36 5.747-6.84a.75.75 0 0 1 1.148.964Z"});break;case"warning":m=c.jsx("path",{d:"M12 2.625c-5.17 0-9.375 4.206-9.375 9.375 0 5.17 4.206 9.375 9.375 9.375 5.17 0 9.375-4.206 9.375-9.375 0-5.17-4.206-9.375-9.375-9.375Zm0 3.844a1.219 1.219 0 1 1 0 2.437 1.219 1.219 0 0 1 0-2.437Zm2.25 10.593h-4.125a.75.75 0 1 1 0-1.5h1.313v-4.124h-.75a.75.75 0 1 1 0-1.5h1.5a.75.75 0 0 1 .75.75v4.874h1.312a.75.75 0 1 1 0 1.5Z"});break;default:m="icon fa fa-exclamation-circle";break}return c.jsx(c.Fragment,{children:u?c.jsx(c.Fragment,{}):c.jsxs("div",{className:"item "+n.type+` ${n.thema!==void 0?" thema":""}`,"data-status":i,children:[c.jsx("svg",{type:"solid",fill:"currentColor",stroke:"none",strokeWidth:"0",width:"24",height:"24",viewBox:"0 0 24 24",children:m}),c.jsx("span",{className:"text",children:n.text})]})})}let Xe={Send:tr,Init:er},we=()=>{};const or=({children:r,title:n,isOverlay:i=!0})=>{const[u,h]=w.useState(!1);return we=()=>{h(!0),setTimeout(()=>{Ut.onClose()},300)},c.jsx("div",{className:`footer-menu-overlay ${i?"is-overlay":""} ${u?"closing":""}`,onClick:we,children:c.jsxs("div",{className:`footer-menu-popup-book ${u?"closing":""}`,onClick:m=>m.stopPropagation(),children:[c.jsxs("div",{className:"footer-menu-header",children:[c.jsx("h3",{children:n}),c.jsx("button",{className:"footer-menu-close-btn",onClick:we,children:"✕"})]}),r]})})},Wt={h:"_h_rl5ga_1",row:"_row_rl5ga_14",column:"_column_rl5ga_17"},Ut=[],Lt=(r,n)=>r.findIndex(i=>(i==null?void 0:i.page)===n),nr=({actions:r,children:n,className:i,page:u,onPageChange:h,direction:m="row"})=>{const[A,x]=w.useState(null),[g,S]=w.useState(u?Lt(r||[],u):0);return Ut.onClose=()=>{x(null),S(u?Lt(r||[],u):0)},w.useEffect(()=>{document.addEventListener("blur",()=>{document.querySelector("footer").style.display="flex"}),document.addEventListener("focus",()=>{document.querySelector("footer").style.display="none"})},[]),c.jsxs(c.Fragment,{children:[A,c.jsxs("footer",{className:`${Wt.h} ${Wt[m]} ${i} `,children:[n,r&&r.map((d,k)=>c.jsx("div",{"data-active":g===k?"true":"false",onClick:()=>{d.page&&(S(k),h==null||h(d.page)),d.callback&&(d.callback(),S(k)),d.component&&(g===k?we():(x(d.component),S(k)))},children:d.icon},k))]})]})},le={is:!1,MainButton:{},BackButton:{}};let Y={};Y.dark={"--tg-theme-subtitle-text-color":"#98989e","--tg-theme-destructive-text-color":"#e53935","--tg-theme-section-separator-color":"#545458","--tg-theme-link-color":"#3e88f7","--tg-theme-accent-text-color":"#3e88f7","--tg-theme-bg-color":"#000000","--tg-theme-secondary-bg-color":"#1c1c1d","--tg-theme-button-color":"#3e88f7","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#1d1d1d","--tg-theme-section-header-text-color":"#8d8e93","--tg-theme-header-bg-color":"#1a1a1a","--tg-theme-hint-color":"#98989e","--tg-theme-text-color":"#ffffff","--tg-theme-section-bg-color":"#2c2c2e"},Y.light={"--tg-theme-subtitle-text-color":"#8e8e93","--tg-theme-destructive-text-color":"#ff3b30","--tg-theme-section-separator-color":"#c8c7cc","--tg-theme-link-color":"#007aff","--tg-theme-accent-text-color":"#007aff","--tg-theme-bg-color":"#ffffff","--tg-theme-secondary-bg-color":"#efeff4","--tg-theme-button-color":"#007aff","--tg-theme-button-text-color":"#ffffff","--tg-theme-bottom-bar-bg-color":"#f2f2f2","--tg-theme-section-header-text-color":"#6d6d72","--tg-theme-header-bg-color":"#f8f8f8","--tg-theme-hint-color":"#8e8e93","--tg-theme-text-color":"#000000","--tg-theme-section-bg-color":"#ffffff"},Y.users={"--tg-theme-bg-color":"#000000","--tg-theme-text-color":"#ffffff","--tg-theme-hint-color":"#98989e","--tg-theme-link-color":"#ffffff","--tg-theme-button-color":"#ffffff","--tg-theme-button-text-color":"#000000","--tg-theme-secondary-bg-color":"#000000"};const ar=()=>{if(location.hostname==="localhost"){let[r,n]=w.useState(!1),[i,u]=w.useState(!1),[h,m]=w.useState("dark"),[A,x]=w.useState(!1),[g,S]=w.useState(!1);le.is=!0,le.MainButton.set=n,le.BackButton.set=u,w.useEffect(()=>{Y[h]["--tg-theme-bg-color-alpha"]=Y[h]["--tg-theme-bg-color"]+"b3",Y[h]["--tg-theme-secondary-bg-color-alpha"]=Y[h]["--tg-theme-secondary-bg-color"]+"d3";for(let P in Y[h])document.documentElement.style.setProperty(P,Y[h][P]);O.default.WebApp.safeAreaInset.bottom===0&&document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]);let d=P=>{for(let W in Y[P])document.documentElement.style.setProperty(W,Y[P][W]);m(P),x(!1)},k=()=>{x(!1),S(!0)};return c.jsxs(c.Fragment,{children:[c.jsxs("header",{className:"debug",children:[i===!1?c.jsx("div",{className:"b",children:"Отмена"}):c.jsx("div",{onClick:()=>{var P;i.page===void 0?(P=i.callback)==null||P.call(i):ve.setPage(i.page)},className:"b",children:"Назад"}),c.jsx("div",{className:"o",onClick:()=>x(!A),children:"Меню"})]}),c.jsx(Xe.Init,{}),r&&c.jsx("div",{className:"mb",children:c.jsx("button",{onClick:()=>{r.page&&ve.setPage(r.page),r.callback&&r.callback()},children:r.text})}),A?c.jsxs("div",{className:"tm",children:[c.jsxs("ul",{children:[c.jsx("li",{children:c.jsx("button",{onClick:k,children:"Authorization"})}),c.jsx("li",{})]}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("button",{children:"Thema"}),c.jsxs("ol",{children:[c.jsx("li",{children:c.jsx("button",{onClick:()=>d("dark"),children:"Dark"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>d("light"),children:"Light"})}),c.jsx("li",{children:c.jsx("button",{onClick:()=>d("users"),children:"Users"})})]})]}),c.jsx("li",{children:c.jsx("button",{onClick:()=>x(!A),children:"Closed"})})]})]}):"",g?c.jsx(ir,{setAuthorization:S}):""]})}else return w.useEffect(()=>{document.documentElement.style.setProperty("--tg-theme-secondary-bg-color-alpha",O.default.WebApp.themeParams.secondary_bg_color+"d3"),document.documentElement.style.setProperty("--tg-theme-bg-color-alpha",O.default.WebApp.themeParams.bg_color+"b3"),O.default.WebApp.safeAreaInset.bottom===0&&document.documentElement.style.setProperty("--tg-safe-area-inset-bottom","16px")},[]),c.jsx(c.Fragment,{children:c.jsx(Xe.Init,{})})};O.default=void 0,(r=>{r.WebApp=window.Telegram.WebApp,r.getUser=()=>{var n;return((n=r.WebApp.initDataUnsafe)==null?void 0:n.user)===void 0?{}:r.WebApp.initDataUnsafe},r.Notice=(n,i,u)=>{var h,m;i!==void 0?(Xe.Send({type:n,text:i,thema:u}),(h=r.WebApp.HapticFeedback)==null||h.notificationOccurred(n)):(Xe.Send(n),(m=r.WebApp.HapticFeedback)==null||m.notificationOccurred(n.type))},r.Header=ar,r.Footer=nr,r.BottomSheet=or,r.toggleBottomSheet=we,r.Modal=et,r.MainButton={callback:[],set:n=>{le.is?le.MainButton.set(n):(r.WebApp.MainButton.callback.forEach(i=>{r.WebApp.MainButton.offClick(i)}),r.WebApp.MainButton.callback=[],typeof n=="boolean"?r.WebApp.MainButton.isVisible=!1:(r.WebApp.MainButton.text=n.text,n.color&&(r.WebApp.MainButton.color=n.color),n.textColor&&(r.WebApp.MainButton.textColor=n.textColor),r.WebApp.MainButton.isVisible=!0,r.WebApp.MainButton.isActive=n.isActive===void 0?!0:n.isActive,r.WebApp.MainButton.callback.push(()=>{var i;n.page===void 0?(i=n.callback)==null||i.call(n):ve.setPage(n.page)}),r.WebApp.MainButton.onClick(r.WebApp.MainButton.callback[0])))}},r.BackButton={state:[!1],listen:[],router:n=>{n===!1?(r.WebApp.BackButton.isVisible=!1,r.WebApp.BackButton.offClick(r.BackButton.listen[0]),r.BackButton.listen.shift(),r.WebApp.BackButton.state.length!==1&&r.WebApp.BackButton.state.pop()):(r.WebApp.BackButton.isVisible=!0,r.WebApp.BackButton.offClick(r.BackButton.listen[0]),r.BackButton.listen.shift(),r.BackButton.listen.push(()=>{var u;let i=r.WebApp.BackButton.state.pop();i.page!==void 0?ve.setPage(i.page):(u=i.callback)==null||u.call(i)}),r.WebApp.BackButton.onClick(r.BackButton.listen[0]))},set:n=>{le.is?le.BackButton.set(n):(r.BackButton.state.push(n),r.BackButton.router(n))}}})(O.default||(O.default={}));const ir=({setAuthorization:r})=>{let n={},i=()=>{localStorage.setItem("auth",n)};return c.jsx("div",{className:"ta",children:c.jsxs("div",{className:"--body",children:[c.jsx("fieldset",{}),c.jsx("div",{onClick:i,children:" Сохранить "})]})})},sr=O.default.Footer,{Header:lr,toggleBottomSheet:cr,Modal:ur,MainButton:fr,BackButton:dr,BottomSheet:pr,WebApp:hr,getUser:gr,Notice:mr}=O.default;O.BackButton=dr,O.BottomSheet=pr,O.Footer=sr,O.Header=lr,O.MainButton=fr,O.Modal=ur,O.Notice=mr,O.WebApp=hr,O.getUser=gr,O.toggleBottomSheet=cr,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|