@ethora/chat-component 26.10.6 → 26.10.8
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/README.md +102 -3
- package/dist/ChatProfileModal-83t5BRkI.js +2298 -0
- package/dist/{FilePreviewModal-DwNUEHei.js → FilePreviewModal-DxUGjSHe.js} +135 -135
- package/dist/{ManageDataModal-CaQ2VBPn.js → ManageDataModal-DFE_Wegj.js} +24 -24
- package/dist/{MarkdownBody-BeoG2cpo.js → MarkdownBody-uFITrPjT.js} +1 -1
- package/dist/{MessageSearchModal-DMw9o49-.js → MessageSearchModal-CsbTWgNm.js} +46 -46
- package/dist/{PublicChatsModal-CWdYILv_.js → PublicChatsModal-bDOp3IL9.js} +18 -18
- package/dist/{SideDrawer-Cl-vbuIG.js → SideDrawer-A_1ECqD2.js} +29 -29
- package/dist/UserProfileModal-Ca5wHYvr.js +639 -0
- package/dist/{UserSettingsModal-DgCAHmNh.js → UserSettingsModal-CAyyQGV6.js} +4 -4
- package/dist/{VideoCallOverlay-Cq2cECWj.js → VideoCallOverlay-BMiQh8kI.js} +6605 -4726
- package/dist/{VisibilityModal-D7vqGbrA.js → VisibilityModal-BXyIy7_J.js} +12 -12
- package/dist/assets/icons.d.ts +4 -0
- package/dist/calls/callDisplay.d.ts +22 -0
- package/dist/calls/callMode.d.ts +105 -0
- package/dist/calls/openScheduledCall.d.ts +20 -0
- package/dist/calls/p2p/P2PCallController.d.ts +160 -0
- package/dist/calls/p2p/icePolicy.d.ts +36 -0
- package/dist/calls/p2p/negotiator.d.ts +56 -0
- package/dist/calls/p2p/p2pRuntime.d.ts +35 -0
- package/dist/calls/p2p/signalInbox.d.ts +34 -0
- package/dist/calls/p2p/signalStanza.d.ts +51 -0
- package/dist/calls/placeCall.d.ts +20 -0
- package/dist/calls/scheduledCall.d.ts +101 -0
- package/dist/calls/scheduledCallActions.d.ts +12 -0
- package/dist/calls/scheduledCallFormat.d.ts +13 -0
- package/dist/calls/scheduledCallsConfig.d.ts +27 -0
- package/dist/calls/senderTrust.d.ts +7 -0
- package/dist/calls/startCall.d.ts +16 -0
- package/dist/components/MainComponents/ChatWrapper.d.ts +1 -0
- package/dist/components/MainComponents/LoginWrapper.d.ts +1 -0
- package/dist/components/MainComponents/ProfileImagePlaceholder.d.ts +1 -0
- package/dist/components/MainComponents/ReduxWrapper.d.ts +6 -0
- package/dist/components/MenuRoom/MenuRoom.d.ts +1 -0
- package/dist/components/Modals/NewChatModal/styledNewChatComponents.d.ts +27 -0
- package/dist/components/Modals/styledModalComponents.d.ts +25 -4
- package/dist/components/ScheduledCalls/ScheduleCallModal.d.ts +3 -0
- package/dist/components/ScheduledCalls/ScheduledCallCancelConfirm.d.ts +8 -0
- package/dist/components/ScheduledCalls/ScheduledCallCard.d.ts +7 -0
- package/dist/components/ScheduledCalls/ScheduledCallLayer.d.ts +15 -0
- package/dist/components/ScheduledCalls/ScheduledCallPreJoin.d.ts +3 -0
- package/dist/components/VideoCalls/P2PCallRunner.d.ts +1 -0
- package/dist/components/VideoCalls/P2PCallSession.d.ts +14 -0
- package/dist/components/VideoCalls/VideoCallSession.d.ts +39 -0
- package/dist/firebase-messaging-sw.js +918 -96
- package/dist/{handleCopyClick-Crn2jEEu.js → handleCopyClick-BX1fcFGN.js} +1 -1
- package/dist/helpers/callClaim.d.ts +17 -0
- package/dist/helpers/callOutcomeSync.d.ts +23 -0
- package/dist/helpers/callPush.d.ts +25 -0
- package/dist/helpers/canLeaveRoom.d.ts +3 -0
- package/dist/helpers/chatComponentConfigEvents.d.ts +16 -0
- package/dist/helpers/incomingCallPush.d.ts +89 -0
- package/dist/helpers/liveConfig.d.ts +46 -0
- package/dist/helpers/pushRoomHandoff.d.ts +13 -0
- package/dist/helpers/reportRoom.d.ts +18 -0
- package/dist/helpers/scheduledCallMessage.d.ts +23 -0
- package/dist/helpers/storeConsole.d.ts +1 -0
- package/dist/hooks/useChatSettingState.d.ts +1 -0
- package/dist/hooks/useNow.d.ts +6 -0
- package/dist/hooks/usePushNotifications.d.ts +2 -0
- package/dist/hooks/useRemoteAppearance.d.ts +21 -0
- package/dist/hooks/useTypography.d.ts +4 -0
- package/dist/{main-36gqdbJ8.js → main-B25iFKAC.js} +16623 -13399
- package/dist/main.d.ts +3 -1
- package/dist/main.js +25 -23
- package/dist/networking/api-requests/callState.api.d.ts +24 -0
- package/dist/networking/api-requests/remoteAppearance.api.d.ts +20 -0
- package/dist/networking/api-requests/rooms.api.d.ts +11 -1
- package/dist/networking/api-requests/scheduledCalls.api.d.ts +19 -0
- package/dist/networking/ethoraEvents.d.ts +14 -1
- package/dist/networking/xmpp/notifyXmppEvent.d.ts +6 -0
- package/dist/networking/xmpp/sendMessageReaction.xmpp.d.ts +13 -1
- package/dist/networking/xmppClient.d.ts +2 -1
- package/dist/roomStore/Middleware/blockedHydrationMiddleware.d.ts +2 -0
- package/dist/roomStore/callSlice.d.ts +23 -1
- package/dist/roomStore/chatSettingsSlice.d.ts +11 -2
- package/dist/roomStore/index.d.ts +4 -0
- package/dist/roomStore/scheduledCallSlice.d.ts +47 -0
- package/dist/types/models/config.model.d.ts +78 -1
- package/dist/types/models/message.model.d.ts +2 -0
- package/dist/types/models/room.model.d.ts +2 -0
- package/dist/types/models/scheduledCall.model.d.ts +116 -0
- package/dist/types/models/xmpp.model.d.ts +2 -1
- package/dist/utils/callAuthMirror.d.ts +1 -0
- package/dist/utils/callBroadcast.d.ts +12 -0
- package/dist/utils/callNotifications.d.ts +67 -0
- package/dist/utils/firebasePushNotifications.d.ts +14 -0
- package/dist/utils/handledCalls.d.ts +5 -0
- package/dist/utils/pushServiceWorkerBridge.d.ts +19 -0
- package/dist/utils/webLock.d.ts +13 -0
- package/package.json +1 -1
- package/public/firebase-messaging-sw.js +918 -96
- package/dist/ChatProfileModal-OJCKwdNp.js +0 -2168
- package/dist/UserProfileModal-B8KtGnwZ.js +0 -594
|
@@ -1,2168 +0,0 @@
|
|
|
1
|
-
import { jsx as T, jsxs as j, Fragment as Pt } from "react/jsx-runtime";
|
|
2
|
-
import Ue, { useRef as xt, useState as ee, useMemo as se } from "react";
|
|
3
|
-
import { w as nr, b as St, x as he, a9 as or, B as te, E as Y, a as qe, u as ue, aa as Fe, N as _t, F as Mt, ab as At, ac as Dt, ad as Ot, ae as ar, af as Ne, ag as ir, ah as sr, a7 as lr, Q as Lt, a2 as ur, ai as cr, aj as $e, ak as fr, al as be, am as It, an as Bt, P as kt, $ as Nt, D as dr, ao as hr, ap as pr, aq as vr, ar as mr, as as gr, at as yr, au as We, av as br, y as Te, aw as Er, ax as Tr, ay as Cr, az as wr, M as Ge, aA as Rr, aB as Pr, aC as xr, aD as Ke, aE as Sr, aF as _r, a0 as Mr, aG as Ar, aH as Xe, aI as Dr, R as Or, aJ as Je } from "./main-36gqdbJ8.js";
|
|
4
|
-
import { S as $t, f as Lr, b as je, D as de, a as ve, d as Ir, e as Br, g as Ve, h as Ze, i as kr, j as Nr, k as $r, l as et } from "./SideDrawer-Cl-vbuIG.js";
|
|
5
|
-
import { h as jr, P as Ur, a as qr, c as Fr, D as zr, d as Qr, e as tt, f as rt } from "./handleCopyClick-Crn2jEEu.js";
|
|
6
|
-
var le = {}, me = { exports: {} }, ge = { exports: {} }, k = {};
|
|
7
|
-
var nt;
|
|
8
|
-
function Hr() {
|
|
9
|
-
if (nt) return k;
|
|
10
|
-
nt = 1;
|
|
11
|
-
var n = typeof Symbol == "function" && Symbol.for, d = n ? /* @__PURE__ */ Symbol.for("react.element") : 60103, a = n ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, u = n ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, c = n ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, r = n ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = n ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, o = n ? /* @__PURE__ */ Symbol.for("react.context") : 60110, t = n ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, e = n ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, s = n ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, i = n ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, f = n ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = n ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, v = n ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = n ? /* @__PURE__ */ Symbol.for("react.block") : 60121, R = n ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, y = n ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, I = n ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
12
|
-
function D(p) {
|
|
13
|
-
if (typeof p == "object" && p !== null) {
|
|
14
|
-
var w = p.$$typeof;
|
|
15
|
-
switch (w) {
|
|
16
|
-
case d:
|
|
17
|
-
switch (p = p.type, p) {
|
|
18
|
-
case t:
|
|
19
|
-
case e:
|
|
20
|
-
case u:
|
|
21
|
-
case r:
|
|
22
|
-
case c:
|
|
23
|
-
case i:
|
|
24
|
-
return p;
|
|
25
|
-
default:
|
|
26
|
-
switch (p = p && p.$$typeof, p) {
|
|
27
|
-
case o:
|
|
28
|
-
case s:
|
|
29
|
-
case v:
|
|
30
|
-
case m:
|
|
31
|
-
case l:
|
|
32
|
-
return p;
|
|
33
|
-
default:
|
|
34
|
-
return w;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
case a:
|
|
38
|
-
return w;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function $(p) {
|
|
43
|
-
return D(p) === e;
|
|
44
|
-
}
|
|
45
|
-
return k.AsyncMode = t, k.ConcurrentMode = e, k.ContextConsumer = o, k.ContextProvider = l, k.Element = d, k.ForwardRef = s, k.Fragment = u, k.Lazy = v, k.Memo = m, k.Portal = a, k.Profiler = r, k.StrictMode = c, k.Suspense = i, k.isAsyncMode = function(p) {
|
|
46
|
-
return $(p) || D(p) === t;
|
|
47
|
-
}, k.isConcurrentMode = $, k.isContextConsumer = function(p) {
|
|
48
|
-
return D(p) === o;
|
|
49
|
-
}, k.isContextProvider = function(p) {
|
|
50
|
-
return D(p) === l;
|
|
51
|
-
}, k.isElement = function(p) {
|
|
52
|
-
return typeof p == "object" && p !== null && p.$$typeof === d;
|
|
53
|
-
}, k.isForwardRef = function(p) {
|
|
54
|
-
return D(p) === s;
|
|
55
|
-
}, k.isFragment = function(p) {
|
|
56
|
-
return D(p) === u;
|
|
57
|
-
}, k.isLazy = function(p) {
|
|
58
|
-
return D(p) === v;
|
|
59
|
-
}, k.isMemo = function(p) {
|
|
60
|
-
return D(p) === m;
|
|
61
|
-
}, k.isPortal = function(p) {
|
|
62
|
-
return D(p) === a;
|
|
63
|
-
}, k.isProfiler = function(p) {
|
|
64
|
-
return D(p) === r;
|
|
65
|
-
}, k.isStrictMode = function(p) {
|
|
66
|
-
return D(p) === c;
|
|
67
|
-
}, k.isSuspense = function(p) {
|
|
68
|
-
return D(p) === i;
|
|
69
|
-
}, k.isValidElementType = function(p) {
|
|
70
|
-
return typeof p == "string" || typeof p == "function" || p === u || p === e || p === r || p === c || p === i || p === f || typeof p == "object" && p !== null && (p.$$typeof === v || p.$$typeof === m || p.$$typeof === l || p.$$typeof === o || p.$$typeof === s || p.$$typeof === R || p.$$typeof === y || p.$$typeof === I || p.$$typeof === g);
|
|
71
|
-
}, k.typeOf = D, k;
|
|
72
|
-
}
|
|
73
|
-
var N = {};
|
|
74
|
-
var ot;
|
|
75
|
-
function Yr() {
|
|
76
|
-
return ot || (ot = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
77
|
-
var n = typeof Symbol == "function" && Symbol.for, d = n ? /* @__PURE__ */ Symbol.for("react.element") : 60103, a = n ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, u = n ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, c = n ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, r = n ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, l = n ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, o = n ? /* @__PURE__ */ Symbol.for("react.context") : 60110, t = n ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, e = n ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, s = n ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, i = n ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, f = n ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = n ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, v = n ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = n ? /* @__PURE__ */ Symbol.for("react.block") : 60121, R = n ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, y = n ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, I = n ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
78
|
-
function D(b) {
|
|
79
|
-
return typeof b == "string" || typeof b == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
80
|
-
b === u || b === e || b === r || b === c || b === i || b === f || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === m || b.$$typeof === l || b.$$typeof === o || b.$$typeof === s || b.$$typeof === R || b.$$typeof === y || b.$$typeof === I || b.$$typeof === g);
|
|
81
|
-
}
|
|
82
|
-
function $(b) {
|
|
83
|
-
if (typeof b == "object" && b !== null) {
|
|
84
|
-
var H = b.$$typeof;
|
|
85
|
-
switch (H) {
|
|
86
|
-
case d:
|
|
87
|
-
var ie = b.type;
|
|
88
|
-
switch (ie) {
|
|
89
|
-
case t:
|
|
90
|
-
case e:
|
|
91
|
-
case u:
|
|
92
|
-
case r:
|
|
93
|
-
case c:
|
|
94
|
-
case i:
|
|
95
|
-
return ie;
|
|
96
|
-
default:
|
|
97
|
-
var pe = ie && ie.$$typeof;
|
|
98
|
-
switch (pe) {
|
|
99
|
-
case o:
|
|
100
|
-
case s:
|
|
101
|
-
case v:
|
|
102
|
-
case m:
|
|
103
|
-
case l:
|
|
104
|
-
return pe;
|
|
105
|
-
default:
|
|
106
|
-
return H;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
case a:
|
|
110
|
-
return H;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
var p = t, w = e, z = o, G = l, re = d, ne = s, W = u, K = v, V = m, Q = a, X = r, F = c, Z = i, ae = !1;
|
|
115
|
-
function ce(b) {
|
|
116
|
-
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), h(b) || $(b) === t;
|
|
117
|
-
}
|
|
118
|
-
function h(b) {
|
|
119
|
-
return $(b) === e;
|
|
120
|
-
}
|
|
121
|
-
function E(b) {
|
|
122
|
-
return $(b) === o;
|
|
123
|
-
}
|
|
124
|
-
function S(b) {
|
|
125
|
-
return $(b) === l;
|
|
126
|
-
}
|
|
127
|
-
function _(b) {
|
|
128
|
-
return typeof b == "object" && b !== null && b.$$typeof === d;
|
|
129
|
-
}
|
|
130
|
-
function P(b) {
|
|
131
|
-
return $(b) === s;
|
|
132
|
-
}
|
|
133
|
-
function A(b) {
|
|
134
|
-
return $(b) === u;
|
|
135
|
-
}
|
|
136
|
-
function x(b) {
|
|
137
|
-
return $(b) === v;
|
|
138
|
-
}
|
|
139
|
-
function M(b) {
|
|
140
|
-
return $(b) === m;
|
|
141
|
-
}
|
|
142
|
-
function O(b) {
|
|
143
|
-
return $(b) === a;
|
|
144
|
-
}
|
|
145
|
-
function B(b) {
|
|
146
|
-
return $(b) === r;
|
|
147
|
-
}
|
|
148
|
-
function L(b) {
|
|
149
|
-
return $(b) === c;
|
|
150
|
-
}
|
|
151
|
-
function q(b) {
|
|
152
|
-
return $(b) === i;
|
|
153
|
-
}
|
|
154
|
-
N.AsyncMode = p, N.ConcurrentMode = w, N.ContextConsumer = z, N.ContextProvider = G, N.Element = re, N.ForwardRef = ne, N.Fragment = W, N.Lazy = K, N.Memo = V, N.Portal = Q, N.Profiler = X, N.StrictMode = F, N.Suspense = Z, N.isAsyncMode = ce, N.isConcurrentMode = h, N.isContextConsumer = E, N.isContextProvider = S, N.isElement = _, N.isForwardRef = P, N.isFragment = A, N.isLazy = x, N.isMemo = M, N.isPortal = O, N.isProfiler = B, N.isStrictMode = L, N.isSuspense = q, N.isValidElementType = D, N.typeOf = $;
|
|
155
|
-
})()), N;
|
|
156
|
-
}
|
|
157
|
-
var at;
|
|
158
|
-
function jt() {
|
|
159
|
-
return at || (at = 1, process.env.NODE_ENV === "production" ? ge.exports = Hr() : ge.exports = Yr()), ge.exports;
|
|
160
|
-
}
|
|
161
|
-
var Ce, it;
|
|
162
|
-
function Wr() {
|
|
163
|
-
if (it) return Ce;
|
|
164
|
-
it = 1;
|
|
165
|
-
var n = Object.getOwnPropertySymbols, d = Object.prototype.hasOwnProperty, a = Object.prototype.propertyIsEnumerable;
|
|
166
|
-
function u(r) {
|
|
167
|
-
if (r == null)
|
|
168
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
169
|
-
return Object(r);
|
|
170
|
-
}
|
|
171
|
-
function c() {
|
|
172
|
-
try {
|
|
173
|
-
if (!Object.assign)
|
|
174
|
-
return !1;
|
|
175
|
-
var r = new String("abc");
|
|
176
|
-
if (r[5] = "de", Object.getOwnPropertyNames(r)[0] === "5")
|
|
177
|
-
return !1;
|
|
178
|
-
for (var l = {}, o = 0; o < 10; o++)
|
|
179
|
-
l["_" + String.fromCharCode(o)] = o;
|
|
180
|
-
var t = Object.getOwnPropertyNames(l).map(function(s) {
|
|
181
|
-
return l[s];
|
|
182
|
-
});
|
|
183
|
-
if (t.join("") !== "0123456789")
|
|
184
|
-
return !1;
|
|
185
|
-
var e = {};
|
|
186
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(s) {
|
|
187
|
-
e[s] = s;
|
|
188
|
-
}), Object.keys(Object.assign({}, e)).join("") === "abcdefghijklmnopqrst";
|
|
189
|
-
} catch {
|
|
190
|
-
return !1;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
return Ce = c() ? Object.assign : function(r, l) {
|
|
194
|
-
for (var o, t = u(r), e, s = 1; s < arguments.length; s++) {
|
|
195
|
-
o = Object(arguments[s]);
|
|
196
|
-
for (var i in o)
|
|
197
|
-
d.call(o, i) && (t[i] = o[i]);
|
|
198
|
-
if (n) {
|
|
199
|
-
e = n(o);
|
|
200
|
-
for (var f = 0; f < e.length; f++)
|
|
201
|
-
a.call(o, e[f]) && (t[e[f]] = o[e[f]]);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return t;
|
|
205
|
-
}, Ce;
|
|
206
|
-
}
|
|
207
|
-
var we, st;
|
|
208
|
-
function ze() {
|
|
209
|
-
if (st) return we;
|
|
210
|
-
st = 1;
|
|
211
|
-
var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
212
|
-
return we = n, we;
|
|
213
|
-
}
|
|
214
|
-
var Re, lt;
|
|
215
|
-
function Ut() {
|
|
216
|
-
return lt || (lt = 1, Re = Function.call.bind(Object.prototype.hasOwnProperty)), Re;
|
|
217
|
-
}
|
|
218
|
-
var Pe, ut;
|
|
219
|
-
function Gr() {
|
|
220
|
-
if (ut) return Pe;
|
|
221
|
-
ut = 1;
|
|
222
|
-
var n = function() {
|
|
223
|
-
};
|
|
224
|
-
if (process.env.NODE_ENV !== "production") {
|
|
225
|
-
var d = /* @__PURE__ */ ze(), a = {}, u = /* @__PURE__ */ Ut();
|
|
226
|
-
n = function(r) {
|
|
227
|
-
var l = "Warning: " + r;
|
|
228
|
-
typeof console < "u" && console.error(l);
|
|
229
|
-
try {
|
|
230
|
-
throw new Error(l);
|
|
231
|
-
} catch {
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
function c(r, l, o, t, e) {
|
|
236
|
-
if (process.env.NODE_ENV !== "production") {
|
|
237
|
-
for (var s in r)
|
|
238
|
-
if (u(r, s)) {
|
|
239
|
-
var i;
|
|
240
|
-
try {
|
|
241
|
-
if (typeof r[s] != "function") {
|
|
242
|
-
var f = Error(
|
|
243
|
-
(t || "React class") + ": " + o + " type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[s] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
244
|
-
);
|
|
245
|
-
throw f.name = "Invariant Violation", f;
|
|
246
|
-
}
|
|
247
|
-
i = r[s](l, s, t, o, null, d);
|
|
248
|
-
} catch (v) {
|
|
249
|
-
i = v;
|
|
250
|
-
}
|
|
251
|
-
if (i && !(i instanceof Error) && n(
|
|
252
|
-
(t || "React class") + ": type specification of " + o + " `" + s + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof i + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
253
|
-
), i instanceof Error && !(i.message in a)) {
|
|
254
|
-
a[i.message] = !0;
|
|
255
|
-
var m = e ? e() : "";
|
|
256
|
-
n(
|
|
257
|
-
"Failed " + o + " type: " + i.message + (m ?? "")
|
|
258
|
-
);
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
return c.resetWarningCache = function() {
|
|
264
|
-
process.env.NODE_ENV !== "production" && (a = {});
|
|
265
|
-
}, Pe = c, Pe;
|
|
266
|
-
}
|
|
267
|
-
var xe, ct;
|
|
268
|
-
function Kr() {
|
|
269
|
-
if (ct) return xe;
|
|
270
|
-
ct = 1;
|
|
271
|
-
var n = jt(), d = Wr(), a = /* @__PURE__ */ ze(), u = /* @__PURE__ */ Ut(), c = /* @__PURE__ */ Gr(), r = function() {
|
|
272
|
-
};
|
|
273
|
-
process.env.NODE_ENV !== "production" && (r = function(o) {
|
|
274
|
-
var t = "Warning: " + o;
|
|
275
|
-
typeof console < "u" && console.error(t);
|
|
276
|
-
try {
|
|
277
|
-
throw new Error(t);
|
|
278
|
-
} catch {
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
function l() {
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
return xe = function(o, t) {
|
|
285
|
-
var e = typeof Symbol == "function" && Symbol.iterator, s = "@@iterator";
|
|
286
|
-
function i(h) {
|
|
287
|
-
var E = h && (e && h[e] || h[s]);
|
|
288
|
-
if (typeof E == "function")
|
|
289
|
-
return E;
|
|
290
|
-
}
|
|
291
|
-
var f = "<<anonymous>>", m = {
|
|
292
|
-
array: y("array"),
|
|
293
|
-
bigint: y("bigint"),
|
|
294
|
-
bool: y("boolean"),
|
|
295
|
-
func: y("function"),
|
|
296
|
-
number: y("number"),
|
|
297
|
-
object: y("object"),
|
|
298
|
-
string: y("string"),
|
|
299
|
-
symbol: y("symbol"),
|
|
300
|
-
any: I(),
|
|
301
|
-
arrayOf: D,
|
|
302
|
-
element: $(),
|
|
303
|
-
elementType: p(),
|
|
304
|
-
instanceOf: w,
|
|
305
|
-
node: ne(),
|
|
306
|
-
objectOf: G,
|
|
307
|
-
oneOf: z,
|
|
308
|
-
oneOfType: re,
|
|
309
|
-
shape: K,
|
|
310
|
-
exact: V
|
|
311
|
-
};
|
|
312
|
-
function v(h, E) {
|
|
313
|
-
return h === E ? h !== 0 || 1 / h === 1 / E : h !== h && E !== E;
|
|
314
|
-
}
|
|
315
|
-
function g(h, E) {
|
|
316
|
-
this.message = h, this.data = E && typeof E == "object" ? E : {}, this.stack = "";
|
|
317
|
-
}
|
|
318
|
-
g.prototype = Error.prototype;
|
|
319
|
-
function R(h) {
|
|
320
|
-
if (process.env.NODE_ENV !== "production")
|
|
321
|
-
var E = {}, S = 0;
|
|
322
|
-
function _(A, x, M, O, B, L, q) {
|
|
323
|
-
if (O = O || f, L = L || M, q !== a) {
|
|
324
|
-
if (t) {
|
|
325
|
-
var b = new Error(
|
|
326
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
327
|
-
);
|
|
328
|
-
throw b.name = "Invariant Violation", b;
|
|
329
|
-
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
330
|
-
var H = O + ":" + M;
|
|
331
|
-
!E[H] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
332
|
-
S < 3 && (r(
|
|
333
|
-
"You are manually calling a React.PropTypes validation function for the `" + L + "` prop on `" + O + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
334
|
-
), E[H] = !0, S++);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
return x[M] == null ? A ? x[M] === null ? new g("The " + B + " `" + L + "` is marked as required " + ("in `" + O + "`, but its value is `null`.")) : new g("The " + B + " `" + L + "` is marked as required in " + ("`" + O + "`, but its value is `undefined`.")) : null : h(x, M, O, B, L);
|
|
338
|
-
}
|
|
339
|
-
var P = _.bind(null, !1);
|
|
340
|
-
return P.isRequired = _.bind(null, !0), P;
|
|
341
|
-
}
|
|
342
|
-
function y(h) {
|
|
343
|
-
function E(S, _, P, A, x, M) {
|
|
344
|
-
var O = S[_], B = F(O);
|
|
345
|
-
if (B !== h) {
|
|
346
|
-
var L = Z(O);
|
|
347
|
-
return new g(
|
|
348
|
-
"Invalid " + A + " `" + x + "` of type " + ("`" + L + "` supplied to `" + P + "`, expected ") + ("`" + h + "`."),
|
|
349
|
-
{ expectedType: h }
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
return null;
|
|
353
|
-
}
|
|
354
|
-
return R(E);
|
|
355
|
-
}
|
|
356
|
-
function I() {
|
|
357
|
-
return R(l);
|
|
358
|
-
}
|
|
359
|
-
function D(h) {
|
|
360
|
-
function E(S, _, P, A, x) {
|
|
361
|
-
if (typeof h != "function")
|
|
362
|
-
return new g("Property `" + x + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
363
|
-
var M = S[_];
|
|
364
|
-
if (!Array.isArray(M)) {
|
|
365
|
-
var O = F(M);
|
|
366
|
-
return new g("Invalid " + A + " `" + x + "` of type " + ("`" + O + "` supplied to `" + P + "`, expected an array."));
|
|
367
|
-
}
|
|
368
|
-
for (var B = 0; B < M.length; B++) {
|
|
369
|
-
var L = h(M, B, P, A, x + "[" + B + "]", a);
|
|
370
|
-
if (L instanceof Error)
|
|
371
|
-
return L;
|
|
372
|
-
}
|
|
373
|
-
return null;
|
|
374
|
-
}
|
|
375
|
-
return R(E);
|
|
376
|
-
}
|
|
377
|
-
function $() {
|
|
378
|
-
function h(E, S, _, P, A) {
|
|
379
|
-
var x = E[S];
|
|
380
|
-
if (!o(x)) {
|
|
381
|
-
var M = F(x);
|
|
382
|
-
return new g("Invalid " + P + " `" + A + "` of type " + ("`" + M + "` supplied to `" + _ + "`, expected a single ReactElement."));
|
|
383
|
-
}
|
|
384
|
-
return null;
|
|
385
|
-
}
|
|
386
|
-
return R(h);
|
|
387
|
-
}
|
|
388
|
-
function p() {
|
|
389
|
-
function h(E, S, _, P, A) {
|
|
390
|
-
var x = E[S];
|
|
391
|
-
if (!n.isValidElementType(x)) {
|
|
392
|
-
var M = F(x);
|
|
393
|
-
return new g("Invalid " + P + " `" + A + "` of type " + ("`" + M + "` supplied to `" + _ + "`, expected a single ReactElement type."));
|
|
394
|
-
}
|
|
395
|
-
return null;
|
|
396
|
-
}
|
|
397
|
-
return R(h);
|
|
398
|
-
}
|
|
399
|
-
function w(h) {
|
|
400
|
-
function E(S, _, P, A, x) {
|
|
401
|
-
if (!(S[_] instanceof h)) {
|
|
402
|
-
var M = h.name || f, O = ce(S[_]);
|
|
403
|
-
return new g("Invalid " + A + " `" + x + "` of type " + ("`" + O + "` supplied to `" + P + "`, expected ") + ("instance of `" + M + "`."));
|
|
404
|
-
}
|
|
405
|
-
return null;
|
|
406
|
-
}
|
|
407
|
-
return R(E);
|
|
408
|
-
}
|
|
409
|
-
function z(h) {
|
|
410
|
-
if (!Array.isArray(h))
|
|
411
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? r(
|
|
412
|
-
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
413
|
-
) : r("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
414
|
-
function E(S, _, P, A, x) {
|
|
415
|
-
for (var M = S[_], O = 0; O < h.length; O++)
|
|
416
|
-
if (v(M, h[O]))
|
|
417
|
-
return null;
|
|
418
|
-
var B = JSON.stringify(h, function(q, b) {
|
|
419
|
-
var H = Z(b);
|
|
420
|
-
return H === "symbol" ? String(b) : b;
|
|
421
|
-
});
|
|
422
|
-
return new g("Invalid " + A + " `" + x + "` of value `" + String(M) + "` " + ("supplied to `" + P + "`, expected one of " + B + "."));
|
|
423
|
-
}
|
|
424
|
-
return R(E);
|
|
425
|
-
}
|
|
426
|
-
function G(h) {
|
|
427
|
-
function E(S, _, P, A, x) {
|
|
428
|
-
if (typeof h != "function")
|
|
429
|
-
return new g("Property `" + x + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
430
|
-
var M = S[_], O = F(M);
|
|
431
|
-
if (O !== "object")
|
|
432
|
-
return new g("Invalid " + A + " `" + x + "` of type " + ("`" + O + "` supplied to `" + P + "`, expected an object."));
|
|
433
|
-
for (var B in M)
|
|
434
|
-
if (u(M, B)) {
|
|
435
|
-
var L = h(M, B, P, A, x + "." + B, a);
|
|
436
|
-
if (L instanceof Error)
|
|
437
|
-
return L;
|
|
438
|
-
}
|
|
439
|
-
return null;
|
|
440
|
-
}
|
|
441
|
-
return R(E);
|
|
442
|
-
}
|
|
443
|
-
function re(h) {
|
|
444
|
-
if (!Array.isArray(h))
|
|
445
|
-
return process.env.NODE_ENV !== "production" && r("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
446
|
-
for (var E = 0; E < h.length; E++) {
|
|
447
|
-
var S = h[E];
|
|
448
|
-
if (typeof S != "function")
|
|
449
|
-
return r(
|
|
450
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(S) + " at index " + E + "."
|
|
451
|
-
), l;
|
|
452
|
-
}
|
|
453
|
-
function _(P, A, x, M, O) {
|
|
454
|
-
for (var B = [], L = 0; L < h.length; L++) {
|
|
455
|
-
var q = h[L], b = q(P, A, x, M, O, a);
|
|
456
|
-
if (b == null)
|
|
457
|
-
return null;
|
|
458
|
-
b.data && u(b.data, "expectedType") && B.push(b.data.expectedType);
|
|
459
|
-
}
|
|
460
|
-
var H = B.length > 0 ? ", expected one of type [" + B.join(", ") + "]" : "";
|
|
461
|
-
return new g("Invalid " + M + " `" + O + "` supplied to " + ("`" + x + "`" + H + "."));
|
|
462
|
-
}
|
|
463
|
-
return R(_);
|
|
464
|
-
}
|
|
465
|
-
function ne() {
|
|
466
|
-
function h(E, S, _, P, A) {
|
|
467
|
-
return Q(E[S]) ? null : new g("Invalid " + P + " `" + A + "` supplied to " + ("`" + _ + "`, expected a ReactNode."));
|
|
468
|
-
}
|
|
469
|
-
return R(h);
|
|
470
|
-
}
|
|
471
|
-
function W(h, E, S, _, P) {
|
|
472
|
-
return new g(
|
|
473
|
-
(h || "React class") + ": " + E + " type `" + S + "." + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
|
|
474
|
-
);
|
|
475
|
-
}
|
|
476
|
-
function K(h) {
|
|
477
|
-
function E(S, _, P, A, x) {
|
|
478
|
-
var M = S[_], O = F(M);
|
|
479
|
-
if (O !== "object")
|
|
480
|
-
return new g("Invalid " + A + " `" + x + "` of type `" + O + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
481
|
-
for (var B in h) {
|
|
482
|
-
var L = h[B];
|
|
483
|
-
if (typeof L != "function")
|
|
484
|
-
return W(P, A, x, B, Z(L));
|
|
485
|
-
var q = L(M, B, P, A, x + "." + B, a);
|
|
486
|
-
if (q)
|
|
487
|
-
return q;
|
|
488
|
-
}
|
|
489
|
-
return null;
|
|
490
|
-
}
|
|
491
|
-
return R(E);
|
|
492
|
-
}
|
|
493
|
-
function V(h) {
|
|
494
|
-
function E(S, _, P, A, x) {
|
|
495
|
-
var M = S[_], O = F(M);
|
|
496
|
-
if (O !== "object")
|
|
497
|
-
return new g("Invalid " + A + " `" + x + "` of type `" + O + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
498
|
-
var B = d({}, S[_], h);
|
|
499
|
-
for (var L in B) {
|
|
500
|
-
var q = h[L];
|
|
501
|
-
if (u(h, L) && typeof q != "function")
|
|
502
|
-
return W(P, A, x, L, Z(q));
|
|
503
|
-
if (!q)
|
|
504
|
-
return new g(
|
|
505
|
-
"Invalid " + A + " `" + x + "` key `" + L + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(S[_], null, " ") + `
|
|
506
|
-
Valid keys: ` + JSON.stringify(Object.keys(h), null, " ")
|
|
507
|
-
);
|
|
508
|
-
var b = q(M, L, P, A, x + "." + L, a);
|
|
509
|
-
if (b)
|
|
510
|
-
return b;
|
|
511
|
-
}
|
|
512
|
-
return null;
|
|
513
|
-
}
|
|
514
|
-
return R(E);
|
|
515
|
-
}
|
|
516
|
-
function Q(h) {
|
|
517
|
-
switch (typeof h) {
|
|
518
|
-
case "number":
|
|
519
|
-
case "string":
|
|
520
|
-
case "undefined":
|
|
521
|
-
return !0;
|
|
522
|
-
case "boolean":
|
|
523
|
-
return !h;
|
|
524
|
-
case "object":
|
|
525
|
-
if (Array.isArray(h))
|
|
526
|
-
return h.every(Q);
|
|
527
|
-
if (h === null || o(h))
|
|
528
|
-
return !0;
|
|
529
|
-
var E = i(h);
|
|
530
|
-
if (E) {
|
|
531
|
-
var S = E.call(h), _;
|
|
532
|
-
if (E !== h.entries) {
|
|
533
|
-
for (; !(_ = S.next()).done; )
|
|
534
|
-
if (!Q(_.value))
|
|
535
|
-
return !1;
|
|
536
|
-
} else
|
|
537
|
-
for (; !(_ = S.next()).done; ) {
|
|
538
|
-
var P = _.value;
|
|
539
|
-
if (P && !Q(P[1]))
|
|
540
|
-
return !1;
|
|
541
|
-
}
|
|
542
|
-
} else
|
|
543
|
-
return !1;
|
|
544
|
-
return !0;
|
|
545
|
-
default:
|
|
546
|
-
return !1;
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
function X(h, E) {
|
|
550
|
-
return h === "symbol" ? !0 : E ? E["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && E instanceof Symbol : !1;
|
|
551
|
-
}
|
|
552
|
-
function F(h) {
|
|
553
|
-
var E = typeof h;
|
|
554
|
-
return Array.isArray(h) ? "array" : h instanceof RegExp ? "object" : X(E, h) ? "symbol" : E;
|
|
555
|
-
}
|
|
556
|
-
function Z(h) {
|
|
557
|
-
if (typeof h > "u" || h === null)
|
|
558
|
-
return "" + h;
|
|
559
|
-
var E = F(h);
|
|
560
|
-
if (E === "object") {
|
|
561
|
-
if (h instanceof Date)
|
|
562
|
-
return "date";
|
|
563
|
-
if (h instanceof RegExp)
|
|
564
|
-
return "regexp";
|
|
565
|
-
}
|
|
566
|
-
return E;
|
|
567
|
-
}
|
|
568
|
-
function ae(h) {
|
|
569
|
-
var E = Z(h);
|
|
570
|
-
switch (E) {
|
|
571
|
-
case "array":
|
|
572
|
-
case "object":
|
|
573
|
-
return "an " + E;
|
|
574
|
-
case "boolean":
|
|
575
|
-
case "date":
|
|
576
|
-
case "regexp":
|
|
577
|
-
return "a " + E;
|
|
578
|
-
default:
|
|
579
|
-
return E;
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
function ce(h) {
|
|
583
|
-
return !h.constructor || !h.constructor.name ? f : h.constructor.name;
|
|
584
|
-
}
|
|
585
|
-
return m.checkPropTypes = c, m.resetWarningCache = c.resetWarningCache, m.PropTypes = m, m;
|
|
586
|
-
}, xe;
|
|
587
|
-
}
|
|
588
|
-
var Se, ft;
|
|
589
|
-
function Xr() {
|
|
590
|
-
if (ft) return Se;
|
|
591
|
-
ft = 1;
|
|
592
|
-
var n = /* @__PURE__ */ ze();
|
|
593
|
-
function d() {
|
|
594
|
-
}
|
|
595
|
-
function a() {
|
|
596
|
-
}
|
|
597
|
-
return a.resetWarningCache = d, Se = function() {
|
|
598
|
-
function u(l, o, t, e, s, i) {
|
|
599
|
-
if (i !== n) {
|
|
600
|
-
var f = new Error(
|
|
601
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
602
|
-
);
|
|
603
|
-
throw f.name = "Invariant Violation", f;
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
u.isRequired = u;
|
|
607
|
-
function c() {
|
|
608
|
-
return u;
|
|
609
|
-
}
|
|
610
|
-
var r = {
|
|
611
|
-
array: u,
|
|
612
|
-
bigint: u,
|
|
613
|
-
bool: u,
|
|
614
|
-
func: u,
|
|
615
|
-
number: u,
|
|
616
|
-
object: u,
|
|
617
|
-
string: u,
|
|
618
|
-
symbol: u,
|
|
619
|
-
any: u,
|
|
620
|
-
arrayOf: c,
|
|
621
|
-
element: u,
|
|
622
|
-
elementType: u,
|
|
623
|
-
instanceOf: c,
|
|
624
|
-
node: u,
|
|
625
|
-
objectOf: c,
|
|
626
|
-
oneOf: c,
|
|
627
|
-
oneOfType: c,
|
|
628
|
-
shape: c,
|
|
629
|
-
exact: c,
|
|
630
|
-
checkPropTypes: a,
|
|
631
|
-
resetWarningCache: d
|
|
632
|
-
};
|
|
633
|
-
return r.PropTypes = r, r;
|
|
634
|
-
}, Se;
|
|
635
|
-
}
|
|
636
|
-
var dt;
|
|
637
|
-
function qt() {
|
|
638
|
-
if (dt) return me.exports;
|
|
639
|
-
if (dt = 1, process.env.NODE_ENV !== "production") {
|
|
640
|
-
var n = jt(), d = !0;
|
|
641
|
-
me.exports = /* @__PURE__ */ Kr()(n.isElement, d);
|
|
642
|
-
} else
|
|
643
|
-
me.exports = /* @__PURE__ */ Xr()();
|
|
644
|
-
return me.exports;
|
|
645
|
-
}
|
|
646
|
-
var _e, ht;
|
|
647
|
-
function Ft() {
|
|
648
|
-
return ht || (ht = 1, _e = {
|
|
649
|
-
L: 1,
|
|
650
|
-
M: 0,
|
|
651
|
-
Q: 3,
|
|
652
|
-
H: 2
|
|
653
|
-
}), _e;
|
|
654
|
-
}
|
|
655
|
-
var Me, pt;
|
|
656
|
-
function zt() {
|
|
657
|
-
return pt || (pt = 1, Me = {
|
|
658
|
-
MODE_NUMBER: 1,
|
|
659
|
-
MODE_ALPHA_NUM: 2,
|
|
660
|
-
MODE_8BIT_BYTE: 4,
|
|
661
|
-
MODE_KANJI: 8
|
|
662
|
-
}), Me;
|
|
663
|
-
}
|
|
664
|
-
var Ae, vt;
|
|
665
|
-
function Jr() {
|
|
666
|
-
if (vt) return Ae;
|
|
667
|
-
vt = 1;
|
|
668
|
-
var n = zt();
|
|
669
|
-
function d(a) {
|
|
670
|
-
this.mode = n.MODE_8BIT_BYTE, this.data = a;
|
|
671
|
-
}
|
|
672
|
-
return d.prototype = {
|
|
673
|
-
getLength: function(a) {
|
|
674
|
-
return this.data.length;
|
|
675
|
-
},
|
|
676
|
-
write: function(a) {
|
|
677
|
-
for (var u = 0; u < this.data.length; u++)
|
|
678
|
-
a.put(this.data.charCodeAt(u), 8);
|
|
679
|
-
}
|
|
680
|
-
}, Ae = d, Ae;
|
|
681
|
-
}
|
|
682
|
-
var De, mt;
|
|
683
|
-
function Vr() {
|
|
684
|
-
if (mt) return De;
|
|
685
|
-
mt = 1;
|
|
686
|
-
var n = Ft();
|
|
687
|
-
function d(a, u) {
|
|
688
|
-
this.totalCount = a, this.dataCount = u;
|
|
689
|
-
}
|
|
690
|
-
return d.RS_BLOCK_TABLE = [
|
|
691
|
-
// L
|
|
692
|
-
// M
|
|
693
|
-
// Q
|
|
694
|
-
// H
|
|
695
|
-
// 1
|
|
696
|
-
[1, 26, 19],
|
|
697
|
-
[1, 26, 16],
|
|
698
|
-
[1, 26, 13],
|
|
699
|
-
[1, 26, 9],
|
|
700
|
-
// 2
|
|
701
|
-
[1, 44, 34],
|
|
702
|
-
[1, 44, 28],
|
|
703
|
-
[1, 44, 22],
|
|
704
|
-
[1, 44, 16],
|
|
705
|
-
// 3
|
|
706
|
-
[1, 70, 55],
|
|
707
|
-
[1, 70, 44],
|
|
708
|
-
[2, 35, 17],
|
|
709
|
-
[2, 35, 13],
|
|
710
|
-
// 4
|
|
711
|
-
[1, 100, 80],
|
|
712
|
-
[2, 50, 32],
|
|
713
|
-
[2, 50, 24],
|
|
714
|
-
[4, 25, 9],
|
|
715
|
-
// 5
|
|
716
|
-
[1, 134, 108],
|
|
717
|
-
[2, 67, 43],
|
|
718
|
-
[2, 33, 15, 2, 34, 16],
|
|
719
|
-
[2, 33, 11, 2, 34, 12],
|
|
720
|
-
// 6
|
|
721
|
-
[2, 86, 68],
|
|
722
|
-
[4, 43, 27],
|
|
723
|
-
[4, 43, 19],
|
|
724
|
-
[4, 43, 15],
|
|
725
|
-
// 7
|
|
726
|
-
[2, 98, 78],
|
|
727
|
-
[4, 49, 31],
|
|
728
|
-
[2, 32, 14, 4, 33, 15],
|
|
729
|
-
[4, 39, 13, 1, 40, 14],
|
|
730
|
-
// 8
|
|
731
|
-
[2, 121, 97],
|
|
732
|
-
[2, 60, 38, 2, 61, 39],
|
|
733
|
-
[4, 40, 18, 2, 41, 19],
|
|
734
|
-
[4, 40, 14, 2, 41, 15],
|
|
735
|
-
// 9
|
|
736
|
-
[2, 146, 116],
|
|
737
|
-
[3, 58, 36, 2, 59, 37],
|
|
738
|
-
[4, 36, 16, 4, 37, 17],
|
|
739
|
-
[4, 36, 12, 4, 37, 13],
|
|
740
|
-
// 10
|
|
741
|
-
[2, 86, 68, 2, 87, 69],
|
|
742
|
-
[4, 69, 43, 1, 70, 44],
|
|
743
|
-
[6, 43, 19, 2, 44, 20],
|
|
744
|
-
[6, 43, 15, 2, 44, 16],
|
|
745
|
-
// 11
|
|
746
|
-
[4, 101, 81],
|
|
747
|
-
[1, 80, 50, 4, 81, 51],
|
|
748
|
-
[4, 50, 22, 4, 51, 23],
|
|
749
|
-
[3, 36, 12, 8, 37, 13],
|
|
750
|
-
// 12
|
|
751
|
-
[2, 116, 92, 2, 117, 93],
|
|
752
|
-
[6, 58, 36, 2, 59, 37],
|
|
753
|
-
[4, 46, 20, 6, 47, 21],
|
|
754
|
-
[7, 42, 14, 4, 43, 15],
|
|
755
|
-
// 13
|
|
756
|
-
[4, 133, 107],
|
|
757
|
-
[8, 59, 37, 1, 60, 38],
|
|
758
|
-
[8, 44, 20, 4, 45, 21],
|
|
759
|
-
[12, 33, 11, 4, 34, 12],
|
|
760
|
-
// 14
|
|
761
|
-
[3, 145, 115, 1, 146, 116],
|
|
762
|
-
[4, 64, 40, 5, 65, 41],
|
|
763
|
-
[11, 36, 16, 5, 37, 17],
|
|
764
|
-
[11, 36, 12, 5, 37, 13],
|
|
765
|
-
// 15
|
|
766
|
-
[5, 109, 87, 1, 110, 88],
|
|
767
|
-
[5, 65, 41, 5, 66, 42],
|
|
768
|
-
[5, 54, 24, 7, 55, 25],
|
|
769
|
-
[11, 36, 12],
|
|
770
|
-
// 16
|
|
771
|
-
[5, 122, 98, 1, 123, 99],
|
|
772
|
-
[7, 73, 45, 3, 74, 46],
|
|
773
|
-
[15, 43, 19, 2, 44, 20],
|
|
774
|
-
[3, 45, 15, 13, 46, 16],
|
|
775
|
-
// 17
|
|
776
|
-
[1, 135, 107, 5, 136, 108],
|
|
777
|
-
[10, 74, 46, 1, 75, 47],
|
|
778
|
-
[1, 50, 22, 15, 51, 23],
|
|
779
|
-
[2, 42, 14, 17, 43, 15],
|
|
780
|
-
// 18
|
|
781
|
-
[5, 150, 120, 1, 151, 121],
|
|
782
|
-
[9, 69, 43, 4, 70, 44],
|
|
783
|
-
[17, 50, 22, 1, 51, 23],
|
|
784
|
-
[2, 42, 14, 19, 43, 15],
|
|
785
|
-
// 19
|
|
786
|
-
[3, 141, 113, 4, 142, 114],
|
|
787
|
-
[3, 70, 44, 11, 71, 45],
|
|
788
|
-
[17, 47, 21, 4, 48, 22],
|
|
789
|
-
[9, 39, 13, 16, 40, 14],
|
|
790
|
-
// 20
|
|
791
|
-
[3, 135, 107, 5, 136, 108],
|
|
792
|
-
[3, 67, 41, 13, 68, 42],
|
|
793
|
-
[15, 54, 24, 5, 55, 25],
|
|
794
|
-
[15, 43, 15, 10, 44, 16],
|
|
795
|
-
// 21
|
|
796
|
-
[4, 144, 116, 4, 145, 117],
|
|
797
|
-
[17, 68, 42],
|
|
798
|
-
[17, 50, 22, 6, 51, 23],
|
|
799
|
-
[19, 46, 16, 6, 47, 17],
|
|
800
|
-
// 22
|
|
801
|
-
[2, 139, 111, 7, 140, 112],
|
|
802
|
-
[17, 74, 46],
|
|
803
|
-
[7, 54, 24, 16, 55, 25],
|
|
804
|
-
[34, 37, 13],
|
|
805
|
-
// 23
|
|
806
|
-
[4, 151, 121, 5, 152, 122],
|
|
807
|
-
[4, 75, 47, 14, 76, 48],
|
|
808
|
-
[11, 54, 24, 14, 55, 25],
|
|
809
|
-
[16, 45, 15, 14, 46, 16],
|
|
810
|
-
// 24
|
|
811
|
-
[6, 147, 117, 4, 148, 118],
|
|
812
|
-
[6, 73, 45, 14, 74, 46],
|
|
813
|
-
[11, 54, 24, 16, 55, 25],
|
|
814
|
-
[30, 46, 16, 2, 47, 17],
|
|
815
|
-
// 25
|
|
816
|
-
[8, 132, 106, 4, 133, 107],
|
|
817
|
-
[8, 75, 47, 13, 76, 48],
|
|
818
|
-
[7, 54, 24, 22, 55, 25],
|
|
819
|
-
[22, 45, 15, 13, 46, 16],
|
|
820
|
-
// 26
|
|
821
|
-
[10, 142, 114, 2, 143, 115],
|
|
822
|
-
[19, 74, 46, 4, 75, 47],
|
|
823
|
-
[28, 50, 22, 6, 51, 23],
|
|
824
|
-
[33, 46, 16, 4, 47, 17],
|
|
825
|
-
// 27
|
|
826
|
-
[8, 152, 122, 4, 153, 123],
|
|
827
|
-
[22, 73, 45, 3, 74, 46],
|
|
828
|
-
[8, 53, 23, 26, 54, 24],
|
|
829
|
-
[12, 45, 15, 28, 46, 16],
|
|
830
|
-
// 28
|
|
831
|
-
[3, 147, 117, 10, 148, 118],
|
|
832
|
-
[3, 73, 45, 23, 74, 46],
|
|
833
|
-
[4, 54, 24, 31, 55, 25],
|
|
834
|
-
[11, 45, 15, 31, 46, 16],
|
|
835
|
-
// 29
|
|
836
|
-
[7, 146, 116, 7, 147, 117],
|
|
837
|
-
[21, 73, 45, 7, 74, 46],
|
|
838
|
-
[1, 53, 23, 37, 54, 24],
|
|
839
|
-
[19, 45, 15, 26, 46, 16],
|
|
840
|
-
// 30
|
|
841
|
-
[5, 145, 115, 10, 146, 116],
|
|
842
|
-
[19, 75, 47, 10, 76, 48],
|
|
843
|
-
[15, 54, 24, 25, 55, 25],
|
|
844
|
-
[23, 45, 15, 25, 46, 16],
|
|
845
|
-
// 31
|
|
846
|
-
[13, 145, 115, 3, 146, 116],
|
|
847
|
-
[2, 74, 46, 29, 75, 47],
|
|
848
|
-
[42, 54, 24, 1, 55, 25],
|
|
849
|
-
[23, 45, 15, 28, 46, 16],
|
|
850
|
-
// 32
|
|
851
|
-
[17, 145, 115],
|
|
852
|
-
[10, 74, 46, 23, 75, 47],
|
|
853
|
-
[10, 54, 24, 35, 55, 25],
|
|
854
|
-
[19, 45, 15, 35, 46, 16],
|
|
855
|
-
// 33
|
|
856
|
-
[17, 145, 115, 1, 146, 116],
|
|
857
|
-
[14, 74, 46, 21, 75, 47],
|
|
858
|
-
[29, 54, 24, 19, 55, 25],
|
|
859
|
-
[11, 45, 15, 46, 46, 16],
|
|
860
|
-
// 34
|
|
861
|
-
[13, 145, 115, 6, 146, 116],
|
|
862
|
-
[14, 74, 46, 23, 75, 47],
|
|
863
|
-
[44, 54, 24, 7, 55, 25],
|
|
864
|
-
[59, 46, 16, 1, 47, 17],
|
|
865
|
-
// 35
|
|
866
|
-
[12, 151, 121, 7, 152, 122],
|
|
867
|
-
[12, 75, 47, 26, 76, 48],
|
|
868
|
-
[39, 54, 24, 14, 55, 25],
|
|
869
|
-
[22, 45, 15, 41, 46, 16],
|
|
870
|
-
// 36
|
|
871
|
-
[6, 151, 121, 14, 152, 122],
|
|
872
|
-
[6, 75, 47, 34, 76, 48],
|
|
873
|
-
[46, 54, 24, 10, 55, 25],
|
|
874
|
-
[2, 45, 15, 64, 46, 16],
|
|
875
|
-
// 37
|
|
876
|
-
[17, 152, 122, 4, 153, 123],
|
|
877
|
-
[29, 74, 46, 14, 75, 47],
|
|
878
|
-
[49, 54, 24, 10, 55, 25],
|
|
879
|
-
[24, 45, 15, 46, 46, 16],
|
|
880
|
-
// 38
|
|
881
|
-
[4, 152, 122, 18, 153, 123],
|
|
882
|
-
[13, 74, 46, 32, 75, 47],
|
|
883
|
-
[48, 54, 24, 14, 55, 25],
|
|
884
|
-
[42, 45, 15, 32, 46, 16],
|
|
885
|
-
// 39
|
|
886
|
-
[20, 147, 117, 4, 148, 118],
|
|
887
|
-
[40, 75, 47, 7, 76, 48],
|
|
888
|
-
[43, 54, 24, 22, 55, 25],
|
|
889
|
-
[10, 45, 15, 67, 46, 16],
|
|
890
|
-
// 40
|
|
891
|
-
[19, 148, 118, 6, 149, 119],
|
|
892
|
-
[18, 75, 47, 31, 76, 48],
|
|
893
|
-
[34, 54, 24, 34, 55, 25],
|
|
894
|
-
[20, 45, 15, 61, 46, 16]
|
|
895
|
-
], d.getRSBlocks = function(a, u) {
|
|
896
|
-
var c = d.getRsBlockTable(a, u);
|
|
897
|
-
if (c == null)
|
|
898
|
-
throw new Error("bad rs block @ typeNumber:" + a + "/errorCorrectLevel:" + u);
|
|
899
|
-
for (var r = c.length / 3, l = new Array(), o = 0; o < r; o++)
|
|
900
|
-
for (var t = c[o * 3 + 0], e = c[o * 3 + 1], s = c[o * 3 + 2], i = 0; i < t; i++)
|
|
901
|
-
l.push(new d(e, s));
|
|
902
|
-
return l;
|
|
903
|
-
}, d.getRsBlockTable = function(a, u) {
|
|
904
|
-
switch (u) {
|
|
905
|
-
case n.L:
|
|
906
|
-
return d.RS_BLOCK_TABLE[(a - 1) * 4 + 0];
|
|
907
|
-
case n.M:
|
|
908
|
-
return d.RS_BLOCK_TABLE[(a - 1) * 4 + 1];
|
|
909
|
-
case n.Q:
|
|
910
|
-
return d.RS_BLOCK_TABLE[(a - 1) * 4 + 2];
|
|
911
|
-
case n.H:
|
|
912
|
-
return d.RS_BLOCK_TABLE[(a - 1) * 4 + 3];
|
|
913
|
-
default:
|
|
914
|
-
return;
|
|
915
|
-
}
|
|
916
|
-
}, De = d, De;
|
|
917
|
-
}
|
|
918
|
-
var Oe, gt;
|
|
919
|
-
function Zr() {
|
|
920
|
-
if (gt) return Oe;
|
|
921
|
-
gt = 1;
|
|
922
|
-
function n() {
|
|
923
|
-
this.buffer = new Array(), this.length = 0;
|
|
924
|
-
}
|
|
925
|
-
return n.prototype = {
|
|
926
|
-
get: function(d) {
|
|
927
|
-
var a = Math.floor(d / 8);
|
|
928
|
-
return (this.buffer[a] >>> 7 - d % 8 & 1) == 1;
|
|
929
|
-
},
|
|
930
|
-
put: function(d, a) {
|
|
931
|
-
for (var u = 0; u < a; u++)
|
|
932
|
-
this.putBit((d >>> a - u - 1 & 1) == 1);
|
|
933
|
-
},
|
|
934
|
-
getLengthInBits: function() {
|
|
935
|
-
return this.length;
|
|
936
|
-
},
|
|
937
|
-
putBit: function(d) {
|
|
938
|
-
var a = Math.floor(this.length / 8);
|
|
939
|
-
this.buffer.length <= a && this.buffer.push(0), d && (this.buffer[a] |= 128 >>> this.length % 8), this.length++;
|
|
940
|
-
}
|
|
941
|
-
}, Oe = n, Oe;
|
|
942
|
-
}
|
|
943
|
-
var Le, yt;
|
|
944
|
-
function Qt() {
|
|
945
|
-
if (yt) return Le;
|
|
946
|
-
yt = 1;
|
|
947
|
-
for (var n = {
|
|
948
|
-
glog: function(a) {
|
|
949
|
-
if (a < 1)
|
|
950
|
-
throw new Error("glog(" + a + ")");
|
|
951
|
-
return n.LOG_TABLE[a];
|
|
952
|
-
},
|
|
953
|
-
gexp: function(a) {
|
|
954
|
-
for (; a < 0; )
|
|
955
|
-
a += 255;
|
|
956
|
-
for (; a >= 256; )
|
|
957
|
-
a -= 255;
|
|
958
|
-
return n.EXP_TABLE[a];
|
|
959
|
-
},
|
|
960
|
-
EXP_TABLE: new Array(256),
|
|
961
|
-
LOG_TABLE: new Array(256)
|
|
962
|
-
}, d = 0; d < 8; d++)
|
|
963
|
-
n.EXP_TABLE[d] = 1 << d;
|
|
964
|
-
for (var d = 8; d < 256; d++)
|
|
965
|
-
n.EXP_TABLE[d] = n.EXP_TABLE[d - 4] ^ n.EXP_TABLE[d - 5] ^ n.EXP_TABLE[d - 6] ^ n.EXP_TABLE[d - 8];
|
|
966
|
-
for (var d = 0; d < 255; d++)
|
|
967
|
-
n.LOG_TABLE[n.EXP_TABLE[d]] = d;
|
|
968
|
-
return Le = n, Le;
|
|
969
|
-
}
|
|
970
|
-
var Ie, bt;
|
|
971
|
-
function Ht() {
|
|
972
|
-
if (bt) return Ie;
|
|
973
|
-
bt = 1;
|
|
974
|
-
var n = Qt();
|
|
975
|
-
function d(a, u) {
|
|
976
|
-
if (a.length == null)
|
|
977
|
-
throw new Error(a.length + "/" + u);
|
|
978
|
-
for (var c = 0; c < a.length && a[c] == 0; )
|
|
979
|
-
c++;
|
|
980
|
-
this.num = new Array(a.length - c + u);
|
|
981
|
-
for (var r = 0; r < a.length - c; r++)
|
|
982
|
-
this.num[r] = a[r + c];
|
|
983
|
-
}
|
|
984
|
-
return d.prototype = {
|
|
985
|
-
get: function(a) {
|
|
986
|
-
return this.num[a];
|
|
987
|
-
},
|
|
988
|
-
getLength: function() {
|
|
989
|
-
return this.num.length;
|
|
990
|
-
},
|
|
991
|
-
multiply: function(a) {
|
|
992
|
-
for (var u = new Array(this.getLength() + a.getLength() - 1), c = 0; c < this.getLength(); c++)
|
|
993
|
-
for (var r = 0; r < a.getLength(); r++)
|
|
994
|
-
u[c + r] ^= n.gexp(n.glog(this.get(c)) + n.glog(a.get(r)));
|
|
995
|
-
return new d(u, 0);
|
|
996
|
-
},
|
|
997
|
-
mod: function(a) {
|
|
998
|
-
if (this.getLength() - a.getLength() < 0)
|
|
999
|
-
return this;
|
|
1000
|
-
for (var u = n.glog(this.get(0)) - n.glog(a.get(0)), c = new Array(this.getLength()), r = 0; r < this.getLength(); r++)
|
|
1001
|
-
c[r] = this.get(r);
|
|
1002
|
-
for (var r = 0; r < a.getLength(); r++)
|
|
1003
|
-
c[r] ^= n.gexp(n.glog(a.get(r)) + u);
|
|
1004
|
-
return new d(c, 0).mod(a);
|
|
1005
|
-
}
|
|
1006
|
-
}, Ie = d, Ie;
|
|
1007
|
-
}
|
|
1008
|
-
var Be, Et;
|
|
1009
|
-
function en() {
|
|
1010
|
-
if (Et) return Be;
|
|
1011
|
-
Et = 1;
|
|
1012
|
-
var n = zt(), d = Ht(), a = Qt(), u = {
|
|
1013
|
-
PATTERN000: 0,
|
|
1014
|
-
PATTERN001: 1,
|
|
1015
|
-
PATTERN010: 2,
|
|
1016
|
-
PATTERN011: 3,
|
|
1017
|
-
PATTERN100: 4,
|
|
1018
|
-
PATTERN101: 5,
|
|
1019
|
-
PATTERN110: 6,
|
|
1020
|
-
PATTERN111: 7
|
|
1021
|
-
}, c = {
|
|
1022
|
-
PATTERN_POSITION_TABLE: [
|
|
1023
|
-
[],
|
|
1024
|
-
[6, 18],
|
|
1025
|
-
[6, 22],
|
|
1026
|
-
[6, 26],
|
|
1027
|
-
[6, 30],
|
|
1028
|
-
[6, 34],
|
|
1029
|
-
[6, 22, 38],
|
|
1030
|
-
[6, 24, 42],
|
|
1031
|
-
[6, 26, 46],
|
|
1032
|
-
[6, 28, 50],
|
|
1033
|
-
[6, 30, 54],
|
|
1034
|
-
[6, 32, 58],
|
|
1035
|
-
[6, 34, 62],
|
|
1036
|
-
[6, 26, 46, 66],
|
|
1037
|
-
[6, 26, 48, 70],
|
|
1038
|
-
[6, 26, 50, 74],
|
|
1039
|
-
[6, 30, 54, 78],
|
|
1040
|
-
[6, 30, 56, 82],
|
|
1041
|
-
[6, 30, 58, 86],
|
|
1042
|
-
[6, 34, 62, 90],
|
|
1043
|
-
[6, 28, 50, 72, 94],
|
|
1044
|
-
[6, 26, 50, 74, 98],
|
|
1045
|
-
[6, 30, 54, 78, 102],
|
|
1046
|
-
[6, 28, 54, 80, 106],
|
|
1047
|
-
[6, 32, 58, 84, 110],
|
|
1048
|
-
[6, 30, 58, 86, 114],
|
|
1049
|
-
[6, 34, 62, 90, 118],
|
|
1050
|
-
[6, 26, 50, 74, 98, 122],
|
|
1051
|
-
[6, 30, 54, 78, 102, 126],
|
|
1052
|
-
[6, 26, 52, 78, 104, 130],
|
|
1053
|
-
[6, 30, 56, 82, 108, 134],
|
|
1054
|
-
[6, 34, 60, 86, 112, 138],
|
|
1055
|
-
[6, 30, 58, 86, 114, 142],
|
|
1056
|
-
[6, 34, 62, 90, 118, 146],
|
|
1057
|
-
[6, 30, 54, 78, 102, 126, 150],
|
|
1058
|
-
[6, 24, 50, 76, 102, 128, 154],
|
|
1059
|
-
[6, 28, 54, 80, 106, 132, 158],
|
|
1060
|
-
[6, 32, 58, 84, 110, 136, 162],
|
|
1061
|
-
[6, 26, 54, 82, 110, 138, 166],
|
|
1062
|
-
[6, 30, 58, 86, 114, 142, 170]
|
|
1063
|
-
],
|
|
1064
|
-
G15: 1335,
|
|
1065
|
-
G18: 7973,
|
|
1066
|
-
G15_MASK: 21522,
|
|
1067
|
-
getBCHTypeInfo: function(r) {
|
|
1068
|
-
for (var l = r << 10; c.getBCHDigit(l) - c.getBCHDigit(c.G15) >= 0; )
|
|
1069
|
-
l ^= c.G15 << c.getBCHDigit(l) - c.getBCHDigit(c.G15);
|
|
1070
|
-
return (r << 10 | l) ^ c.G15_MASK;
|
|
1071
|
-
},
|
|
1072
|
-
getBCHTypeNumber: function(r) {
|
|
1073
|
-
for (var l = r << 12; c.getBCHDigit(l) - c.getBCHDigit(c.G18) >= 0; )
|
|
1074
|
-
l ^= c.G18 << c.getBCHDigit(l) - c.getBCHDigit(c.G18);
|
|
1075
|
-
return r << 12 | l;
|
|
1076
|
-
},
|
|
1077
|
-
getBCHDigit: function(r) {
|
|
1078
|
-
for (var l = 0; r != 0; )
|
|
1079
|
-
l++, r >>>= 1;
|
|
1080
|
-
return l;
|
|
1081
|
-
},
|
|
1082
|
-
getPatternPosition: function(r) {
|
|
1083
|
-
return c.PATTERN_POSITION_TABLE[r - 1];
|
|
1084
|
-
},
|
|
1085
|
-
getMask: function(r, l, o) {
|
|
1086
|
-
switch (r) {
|
|
1087
|
-
case u.PATTERN000:
|
|
1088
|
-
return (l + o) % 2 == 0;
|
|
1089
|
-
case u.PATTERN001:
|
|
1090
|
-
return l % 2 == 0;
|
|
1091
|
-
case u.PATTERN010:
|
|
1092
|
-
return o % 3 == 0;
|
|
1093
|
-
case u.PATTERN011:
|
|
1094
|
-
return (l + o) % 3 == 0;
|
|
1095
|
-
case u.PATTERN100:
|
|
1096
|
-
return (Math.floor(l / 2) + Math.floor(o / 3)) % 2 == 0;
|
|
1097
|
-
case u.PATTERN101:
|
|
1098
|
-
return l * o % 2 + l * o % 3 == 0;
|
|
1099
|
-
case u.PATTERN110:
|
|
1100
|
-
return (l * o % 2 + l * o % 3) % 2 == 0;
|
|
1101
|
-
case u.PATTERN111:
|
|
1102
|
-
return (l * o % 3 + (l + o) % 2) % 2 == 0;
|
|
1103
|
-
default:
|
|
1104
|
-
throw new Error("bad maskPattern:" + r);
|
|
1105
|
-
}
|
|
1106
|
-
},
|
|
1107
|
-
getErrorCorrectPolynomial: function(r) {
|
|
1108
|
-
for (var l = new d([1], 0), o = 0; o < r; o++)
|
|
1109
|
-
l = l.multiply(new d([1, a.gexp(o)], 0));
|
|
1110
|
-
return l;
|
|
1111
|
-
},
|
|
1112
|
-
getLengthInBits: function(r, l) {
|
|
1113
|
-
if (1 <= l && l < 10)
|
|
1114
|
-
switch (r) {
|
|
1115
|
-
case n.MODE_NUMBER:
|
|
1116
|
-
return 10;
|
|
1117
|
-
case n.MODE_ALPHA_NUM:
|
|
1118
|
-
return 9;
|
|
1119
|
-
case n.MODE_8BIT_BYTE:
|
|
1120
|
-
return 8;
|
|
1121
|
-
case n.MODE_KANJI:
|
|
1122
|
-
return 8;
|
|
1123
|
-
default:
|
|
1124
|
-
throw new Error("mode:" + r);
|
|
1125
|
-
}
|
|
1126
|
-
else if (l < 27)
|
|
1127
|
-
switch (r) {
|
|
1128
|
-
case n.MODE_NUMBER:
|
|
1129
|
-
return 12;
|
|
1130
|
-
case n.MODE_ALPHA_NUM:
|
|
1131
|
-
return 11;
|
|
1132
|
-
case n.MODE_8BIT_BYTE:
|
|
1133
|
-
return 16;
|
|
1134
|
-
case n.MODE_KANJI:
|
|
1135
|
-
return 10;
|
|
1136
|
-
default:
|
|
1137
|
-
throw new Error("mode:" + r);
|
|
1138
|
-
}
|
|
1139
|
-
else if (l < 41)
|
|
1140
|
-
switch (r) {
|
|
1141
|
-
case n.MODE_NUMBER:
|
|
1142
|
-
return 14;
|
|
1143
|
-
case n.MODE_ALPHA_NUM:
|
|
1144
|
-
return 13;
|
|
1145
|
-
case n.MODE_8BIT_BYTE:
|
|
1146
|
-
return 16;
|
|
1147
|
-
case n.MODE_KANJI:
|
|
1148
|
-
return 12;
|
|
1149
|
-
default:
|
|
1150
|
-
throw new Error("mode:" + r);
|
|
1151
|
-
}
|
|
1152
|
-
else
|
|
1153
|
-
throw new Error("type:" + l);
|
|
1154
|
-
},
|
|
1155
|
-
getLostPoint: function(r) {
|
|
1156
|
-
for (var l = r.getModuleCount(), o = 0, t = 0; t < l; t++)
|
|
1157
|
-
for (var e = 0; e < l; e++) {
|
|
1158
|
-
for (var s = 0, i = r.isDark(t, e), f = -1; f <= 1; f++)
|
|
1159
|
-
if (!(t + f < 0 || l <= t + f))
|
|
1160
|
-
for (var m = -1; m <= 1; m++)
|
|
1161
|
-
e + m < 0 || l <= e + m || f == 0 && m == 0 || i == r.isDark(t + f, e + m) && s++;
|
|
1162
|
-
s > 5 && (o += 3 + s - 5);
|
|
1163
|
-
}
|
|
1164
|
-
for (var t = 0; t < l - 1; t++)
|
|
1165
|
-
for (var e = 0; e < l - 1; e++) {
|
|
1166
|
-
var v = 0;
|
|
1167
|
-
r.isDark(t, e) && v++, r.isDark(t + 1, e) && v++, r.isDark(t, e + 1) && v++, r.isDark(t + 1, e + 1) && v++, (v == 0 || v == 4) && (o += 3);
|
|
1168
|
-
}
|
|
1169
|
-
for (var t = 0; t < l; t++)
|
|
1170
|
-
for (var e = 0; e < l - 6; e++)
|
|
1171
|
-
r.isDark(t, e) && !r.isDark(t, e + 1) && r.isDark(t, e + 2) && r.isDark(t, e + 3) && r.isDark(t, e + 4) && !r.isDark(t, e + 5) && r.isDark(t, e + 6) && (o += 40);
|
|
1172
|
-
for (var e = 0; e < l; e++)
|
|
1173
|
-
for (var t = 0; t < l - 6; t++)
|
|
1174
|
-
r.isDark(t, e) && !r.isDark(t + 1, e) && r.isDark(t + 2, e) && r.isDark(t + 3, e) && r.isDark(t + 4, e) && !r.isDark(t + 5, e) && r.isDark(t + 6, e) && (o += 40);
|
|
1175
|
-
for (var g = 0, e = 0; e < l; e++)
|
|
1176
|
-
for (var t = 0; t < l; t++)
|
|
1177
|
-
r.isDark(t, e) && g++;
|
|
1178
|
-
var R = Math.abs(100 * g / l / l - 50) / 5;
|
|
1179
|
-
return o += R * 10, o;
|
|
1180
|
-
}
|
|
1181
|
-
};
|
|
1182
|
-
return Be = c, Be;
|
|
1183
|
-
}
|
|
1184
|
-
var ke, Tt;
|
|
1185
|
-
function tn() {
|
|
1186
|
-
if (Tt) return ke;
|
|
1187
|
-
Tt = 1;
|
|
1188
|
-
var n = Jr(), d = Vr(), a = Zr(), u = en(), c = Ht();
|
|
1189
|
-
function r(o, t) {
|
|
1190
|
-
this.typeNumber = o, this.errorCorrectLevel = t, this.modules = null, this.moduleCount = 0, this.dataCache = null, this.dataList = [];
|
|
1191
|
-
}
|
|
1192
|
-
var l = r.prototype;
|
|
1193
|
-
return l.addData = function(o) {
|
|
1194
|
-
var t = new n(o);
|
|
1195
|
-
this.dataList.push(t), this.dataCache = null;
|
|
1196
|
-
}, l.isDark = function(o, t) {
|
|
1197
|
-
if (o < 0 || this.moduleCount <= o || t < 0 || this.moduleCount <= t)
|
|
1198
|
-
throw new Error(o + "," + t);
|
|
1199
|
-
return this.modules[o][t];
|
|
1200
|
-
}, l.getModuleCount = function() {
|
|
1201
|
-
return this.moduleCount;
|
|
1202
|
-
}, l.make = function() {
|
|
1203
|
-
if (this.typeNumber < 1) {
|
|
1204
|
-
var o = 1;
|
|
1205
|
-
for (o = 1; o < 40; o++) {
|
|
1206
|
-
for (var t = d.getRSBlocks(o, this.errorCorrectLevel), e = new a(), s = 0, i = 0; i < t.length; i++)
|
|
1207
|
-
s += t[i].dataCount;
|
|
1208
|
-
for (var i = 0; i < this.dataList.length; i++) {
|
|
1209
|
-
var f = this.dataList[i];
|
|
1210
|
-
e.put(f.mode, 4), e.put(f.getLength(), u.getLengthInBits(f.mode, o)), f.write(e);
|
|
1211
|
-
}
|
|
1212
|
-
if (e.getLengthInBits() <= s * 8)
|
|
1213
|
-
break;
|
|
1214
|
-
}
|
|
1215
|
-
this.typeNumber = o;
|
|
1216
|
-
}
|
|
1217
|
-
this.makeImpl(!1, this.getBestMaskPattern());
|
|
1218
|
-
}, l.makeImpl = function(o, t) {
|
|
1219
|
-
this.moduleCount = this.typeNumber * 4 + 17, this.modules = new Array(this.moduleCount);
|
|
1220
|
-
for (var e = 0; e < this.moduleCount; e++) {
|
|
1221
|
-
this.modules[e] = new Array(this.moduleCount);
|
|
1222
|
-
for (var s = 0; s < this.moduleCount; s++)
|
|
1223
|
-
this.modules[e][s] = null;
|
|
1224
|
-
}
|
|
1225
|
-
this.setupPositionProbePattern(0, 0), this.setupPositionProbePattern(this.moduleCount - 7, 0), this.setupPositionProbePattern(0, this.moduleCount - 7), this.setupPositionAdjustPattern(), this.setupTimingPattern(), this.setupTypeInfo(o, t), this.typeNumber >= 7 && this.setupTypeNumber(o), this.dataCache == null && (this.dataCache = r.createData(this.typeNumber, this.errorCorrectLevel, this.dataList)), this.mapData(this.dataCache, t);
|
|
1226
|
-
}, l.setupPositionProbePattern = function(o, t) {
|
|
1227
|
-
for (var e = -1; e <= 7; e++)
|
|
1228
|
-
if (!(o + e <= -1 || this.moduleCount <= o + e))
|
|
1229
|
-
for (var s = -1; s <= 7; s++)
|
|
1230
|
-
t + s <= -1 || this.moduleCount <= t + s || (0 <= e && e <= 6 && (s == 0 || s == 6) || 0 <= s && s <= 6 && (e == 0 || e == 6) || 2 <= e && e <= 4 && 2 <= s && s <= 4 ? this.modules[o + e][t + s] = !0 : this.modules[o + e][t + s] = !1);
|
|
1231
|
-
}, l.getBestMaskPattern = function() {
|
|
1232
|
-
for (var o = 0, t = 0, e = 0; e < 8; e++) {
|
|
1233
|
-
this.makeImpl(!0, e);
|
|
1234
|
-
var s = u.getLostPoint(this);
|
|
1235
|
-
(e == 0 || o > s) && (o = s, t = e);
|
|
1236
|
-
}
|
|
1237
|
-
return t;
|
|
1238
|
-
}, l.createMovieClip = function(o, t, e) {
|
|
1239
|
-
var s = o.createEmptyMovieClip(t, e), i = 1;
|
|
1240
|
-
this.make();
|
|
1241
|
-
for (var f = 0; f < this.modules.length; f++)
|
|
1242
|
-
for (var m = f * i, v = 0; v < this.modules[f].length; v++) {
|
|
1243
|
-
var g = v * i, R = this.modules[f][v];
|
|
1244
|
-
R && (s.beginFill(0, 100), s.moveTo(g, m), s.lineTo(g + i, m), s.lineTo(g + i, m + i), s.lineTo(g, m + i), s.endFill());
|
|
1245
|
-
}
|
|
1246
|
-
return s;
|
|
1247
|
-
}, l.setupTimingPattern = function() {
|
|
1248
|
-
for (var o = 8; o < this.moduleCount - 8; o++)
|
|
1249
|
-
this.modules[o][6] == null && (this.modules[o][6] = o % 2 == 0);
|
|
1250
|
-
for (var t = 8; t < this.moduleCount - 8; t++)
|
|
1251
|
-
this.modules[6][t] == null && (this.modules[6][t] = t % 2 == 0);
|
|
1252
|
-
}, l.setupPositionAdjustPattern = function() {
|
|
1253
|
-
for (var o = u.getPatternPosition(this.typeNumber), t = 0; t < o.length; t++)
|
|
1254
|
-
for (var e = 0; e < o.length; e++) {
|
|
1255
|
-
var s = o[t], i = o[e];
|
|
1256
|
-
if (this.modules[s][i] == null)
|
|
1257
|
-
for (var f = -2; f <= 2; f++)
|
|
1258
|
-
for (var m = -2; m <= 2; m++)
|
|
1259
|
-
f == -2 || f == 2 || m == -2 || m == 2 || f == 0 && m == 0 ? this.modules[s + f][i + m] = !0 : this.modules[s + f][i + m] = !1;
|
|
1260
|
-
}
|
|
1261
|
-
}, l.setupTypeNumber = function(o) {
|
|
1262
|
-
for (var t = u.getBCHTypeNumber(this.typeNumber), e = 0; e < 18; e++) {
|
|
1263
|
-
var s = !o && (t >> e & 1) == 1;
|
|
1264
|
-
this.modules[Math.floor(e / 3)][e % 3 + this.moduleCount - 8 - 3] = s;
|
|
1265
|
-
}
|
|
1266
|
-
for (var e = 0; e < 18; e++) {
|
|
1267
|
-
var s = !o && (t >> e & 1) == 1;
|
|
1268
|
-
this.modules[e % 3 + this.moduleCount - 8 - 3][Math.floor(e / 3)] = s;
|
|
1269
|
-
}
|
|
1270
|
-
}, l.setupTypeInfo = function(o, t) {
|
|
1271
|
-
for (var e = this.errorCorrectLevel << 3 | t, s = u.getBCHTypeInfo(e), i = 0; i < 15; i++) {
|
|
1272
|
-
var f = !o && (s >> i & 1) == 1;
|
|
1273
|
-
i < 6 ? this.modules[i][8] = f : i < 8 ? this.modules[i + 1][8] = f : this.modules[this.moduleCount - 15 + i][8] = f;
|
|
1274
|
-
}
|
|
1275
|
-
for (var i = 0; i < 15; i++) {
|
|
1276
|
-
var f = !o && (s >> i & 1) == 1;
|
|
1277
|
-
i < 8 ? this.modules[8][this.moduleCount - i - 1] = f : i < 9 ? this.modules[8][15 - i - 1 + 1] = f : this.modules[8][15 - i - 1] = f;
|
|
1278
|
-
}
|
|
1279
|
-
this.modules[this.moduleCount - 8][8] = !o;
|
|
1280
|
-
}, l.mapData = function(o, t) {
|
|
1281
|
-
for (var e = -1, s = this.moduleCount - 1, i = 7, f = 0, m = this.moduleCount - 1; m > 0; m -= 2)
|
|
1282
|
-
for (m == 6 && m--; ; ) {
|
|
1283
|
-
for (var v = 0; v < 2; v++)
|
|
1284
|
-
if (this.modules[s][m - v] == null) {
|
|
1285
|
-
var g = !1;
|
|
1286
|
-
f < o.length && (g = (o[f] >>> i & 1) == 1);
|
|
1287
|
-
var R = u.getMask(t, s, m - v);
|
|
1288
|
-
R && (g = !g), this.modules[s][m - v] = g, i--, i == -1 && (f++, i = 7);
|
|
1289
|
-
}
|
|
1290
|
-
if (s += e, s < 0 || this.moduleCount <= s) {
|
|
1291
|
-
s -= e, e = -e;
|
|
1292
|
-
break;
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
}, r.PAD0 = 236, r.PAD1 = 17, r.createData = function(o, t, e) {
|
|
1296
|
-
for (var s = d.getRSBlocks(o, t), i = new a(), f = 0; f < e.length; f++) {
|
|
1297
|
-
var m = e[f];
|
|
1298
|
-
i.put(m.mode, 4), i.put(m.getLength(), u.getLengthInBits(m.mode, o)), m.write(i);
|
|
1299
|
-
}
|
|
1300
|
-
for (var v = 0, f = 0; f < s.length; f++)
|
|
1301
|
-
v += s[f].dataCount;
|
|
1302
|
-
if (i.getLengthInBits() > v * 8)
|
|
1303
|
-
throw new Error("code length overflow. (" + i.getLengthInBits() + ">" + v * 8 + ")");
|
|
1304
|
-
for (i.getLengthInBits() + 4 <= v * 8 && i.put(0, 4); i.getLengthInBits() % 8 != 0; )
|
|
1305
|
-
i.putBit(!1);
|
|
1306
|
-
for (; !(i.getLengthInBits() >= v * 8 || (i.put(r.PAD0, 8), i.getLengthInBits() >= v * 8)); )
|
|
1307
|
-
i.put(r.PAD1, 8);
|
|
1308
|
-
return r.createBytes(i, s);
|
|
1309
|
-
}, r.createBytes = function(o, t) {
|
|
1310
|
-
for (var e = 0, s = 0, i = 0, f = new Array(t.length), m = new Array(t.length), v = 0; v < t.length; v++) {
|
|
1311
|
-
var g = t[v].dataCount, R = t[v].totalCount - g;
|
|
1312
|
-
s = Math.max(s, g), i = Math.max(i, R), f[v] = new Array(g);
|
|
1313
|
-
for (var y = 0; y < f[v].length; y++)
|
|
1314
|
-
f[v][y] = 255 & o.buffer[y + e];
|
|
1315
|
-
e += g;
|
|
1316
|
-
var I = u.getErrorCorrectPolynomial(R), D = new c(f[v], I.getLength() - 1), $ = D.mod(I);
|
|
1317
|
-
m[v] = new Array(I.getLength() - 1);
|
|
1318
|
-
for (var y = 0; y < m[v].length; y++) {
|
|
1319
|
-
var p = y + $.getLength() - m[v].length;
|
|
1320
|
-
m[v][y] = p >= 0 ? $.get(p) : 0;
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
for (var w = 0, y = 0; y < t.length; y++)
|
|
1324
|
-
w += t[y].totalCount;
|
|
1325
|
-
for (var z = new Array(w), G = 0, y = 0; y < s; y++)
|
|
1326
|
-
for (var v = 0; v < t.length; v++)
|
|
1327
|
-
y < f[v].length && (z[G++] = f[v][y]);
|
|
1328
|
-
for (var y = 0; y < i; y++)
|
|
1329
|
-
for (var v = 0; v < t.length; v++)
|
|
1330
|
-
y < m[v].length && (z[G++] = m[v][y]);
|
|
1331
|
-
return z;
|
|
1332
|
-
}, ke = r, ke;
|
|
1333
|
-
}
|
|
1334
|
-
var ye = {}, Ct;
|
|
1335
|
-
function rn() {
|
|
1336
|
-
if (Ct) return ye;
|
|
1337
|
-
Ct = 1, Object.defineProperty(ye, "__esModule", {
|
|
1338
|
-
value: !0
|
|
1339
|
-
});
|
|
1340
|
-
var n = Object.assign || function(e) {
|
|
1341
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
1342
|
-
var i = arguments[s];
|
|
1343
|
-
for (var f in i)
|
|
1344
|
-
Object.prototype.hasOwnProperty.call(i, f) && (e[f] = i[f]);
|
|
1345
|
-
}
|
|
1346
|
-
return e;
|
|
1347
|
-
}, d = /* @__PURE__ */ qt(), a = r(d), u = Ue, c = r(u);
|
|
1348
|
-
function r(e) {
|
|
1349
|
-
return e && e.__esModule ? e : { default: e };
|
|
1350
|
-
}
|
|
1351
|
-
function l(e, s) {
|
|
1352
|
-
var i = {};
|
|
1353
|
-
for (var f in e)
|
|
1354
|
-
s.indexOf(f) >= 0 || Object.prototype.hasOwnProperty.call(e, f) && (i[f] = e[f]);
|
|
1355
|
-
return i;
|
|
1356
|
-
}
|
|
1357
|
-
var o = {
|
|
1358
|
-
bgColor: a.default.oneOfType([a.default.object, a.default.string]).isRequired,
|
|
1359
|
-
bgD: a.default.string.isRequired,
|
|
1360
|
-
fgColor: a.default.oneOfType([a.default.object, a.default.string]).isRequired,
|
|
1361
|
-
fgD: a.default.string.isRequired,
|
|
1362
|
-
size: a.default.number.isRequired,
|
|
1363
|
-
title: a.default.string,
|
|
1364
|
-
viewBoxSize: a.default.number.isRequired,
|
|
1365
|
-
xmlns: a.default.string
|
|
1366
|
-
}, t = (0, u.forwardRef)(function(e, s) {
|
|
1367
|
-
var i = e.bgColor, f = e.bgD, m = e.fgD, v = e.fgColor, g = e.size, R = e.title, y = e.viewBoxSize, I = e.xmlns, D = I === void 0 ? "http://www.w3.org/2000/svg" : I, $ = l(e, ["bgColor", "bgD", "fgD", "fgColor", "size", "title", "viewBoxSize", "xmlns"]);
|
|
1368
|
-
return c.default.createElement(
|
|
1369
|
-
"svg",
|
|
1370
|
-
n({}, $, { height: g, ref: s, viewBox: "0 0 " + y + " " + y, width: g, xmlns: D }),
|
|
1371
|
-
R ? c.default.createElement(
|
|
1372
|
-
"title",
|
|
1373
|
-
null,
|
|
1374
|
-
R
|
|
1375
|
-
) : null,
|
|
1376
|
-
c.default.createElement("path", { d: f, fill: i }),
|
|
1377
|
-
c.default.createElement("path", { d: m, fill: v })
|
|
1378
|
-
);
|
|
1379
|
-
});
|
|
1380
|
-
return t.displayName = "QRCodeSvg", t.propTypes = o, ye.default = t, ye;
|
|
1381
|
-
}
|
|
1382
|
-
var wt;
|
|
1383
|
-
function nn() {
|
|
1384
|
-
if (wt) return le;
|
|
1385
|
-
wt = 1, Object.defineProperty(le, "__esModule", {
|
|
1386
|
-
value: !0
|
|
1387
|
-
}), le.QRCode = void 0;
|
|
1388
|
-
var n = Object.assign || function(g) {
|
|
1389
|
-
for (var R = 1; R < arguments.length; R++) {
|
|
1390
|
-
var y = arguments[R];
|
|
1391
|
-
for (var I in y)
|
|
1392
|
-
Object.prototype.hasOwnProperty.call(y, I) && (g[I] = y[I]);
|
|
1393
|
-
}
|
|
1394
|
-
return g;
|
|
1395
|
-
}, d = /* @__PURE__ */ qt(), a = i(d), u = Ft(), c = i(u), r = tn(), l = i(r), o = Ue, t = i(o), e = rn(), s = i(e);
|
|
1396
|
-
function i(g) {
|
|
1397
|
-
return g && g.__esModule ? g : { default: g };
|
|
1398
|
-
}
|
|
1399
|
-
function f(g, R) {
|
|
1400
|
-
var y = {};
|
|
1401
|
-
for (var I in g)
|
|
1402
|
-
R.indexOf(I) >= 0 || Object.prototype.hasOwnProperty.call(g, I) && (y[I] = g[I]);
|
|
1403
|
-
return y;
|
|
1404
|
-
}
|
|
1405
|
-
var m = {
|
|
1406
|
-
bgColor: a.default.oneOfType([a.default.object, a.default.string]),
|
|
1407
|
-
fgColor: a.default.oneOfType([a.default.object, a.default.string]),
|
|
1408
|
-
level: a.default.string,
|
|
1409
|
-
size: a.default.number,
|
|
1410
|
-
value: a.default.string.isRequired
|
|
1411
|
-
}, v = (0, o.forwardRef)(function(g, R) {
|
|
1412
|
-
var y = g.bgColor, I = y === void 0 ? "#FFFFFF" : y, D = g.fgColor, $ = D === void 0 ? "#000000" : D, p = g.level, w = p === void 0 ? "L" : p, z = g.size, G = z === void 0 ? 256 : z, re = g.value, ne = f(g, ["bgColor", "fgColor", "level", "size", "value"]), W = new l.default(-1, c.default[w]);
|
|
1413
|
-
W.addData(re), W.make();
|
|
1414
|
-
var K = W.modules;
|
|
1415
|
-
return t.default.createElement(s.default, n({}, ne, {
|
|
1416
|
-
bgColor: I,
|
|
1417
|
-
bgD: K.map(function(V, Q) {
|
|
1418
|
-
return V.map(function(X, F) {
|
|
1419
|
-
return X ? "" : "M " + F + " " + Q + " l 1 0 0 1 -1 0 Z";
|
|
1420
|
-
}).join(" ");
|
|
1421
|
-
}).join(" "),
|
|
1422
|
-
fgColor: $,
|
|
1423
|
-
fgD: K.map(function(V, Q) {
|
|
1424
|
-
return V.map(function(X, F) {
|
|
1425
|
-
return X ? "M " + F + " " + Q + " l 1 0 0 1 -1 0 Z" : "";
|
|
1426
|
-
}).join(" ");
|
|
1427
|
-
}).join(" "),
|
|
1428
|
-
ref: R,
|
|
1429
|
-
size: G,
|
|
1430
|
-
viewBoxSize: K.length
|
|
1431
|
-
}));
|
|
1432
|
-
});
|
|
1433
|
-
return le.QRCode = v, v.displayName = "QRCode", v.propTypes = m, le.default = v, le;
|
|
1434
|
-
}
|
|
1435
|
-
var on = nn();
|
|
1436
|
-
const an = /* @__PURE__ */ nr(on), sn = "chatId", ln = (n, d, a) => {
|
|
1437
|
-
const u = String(n || "").split("@")[0];
|
|
1438
|
-
if (!u) return "";
|
|
1439
|
-
if (d) return `${d}${u}`;
|
|
1440
|
-
const c = typeof window < "u" ? window.location.href : "";
|
|
1441
|
-
if (!c) return "";
|
|
1442
|
-
try {
|
|
1443
|
-
const r = new URL(c);
|
|
1444
|
-
return r.hash = "", r.searchParams.set(sn, u), r.toString();
|
|
1445
|
-
} catch {
|
|
1446
|
-
return "";
|
|
1447
|
-
}
|
|
1448
|
-
}, un = Y.div`
|
|
1449
|
-
position: absolute;
|
|
1450
|
-
inset: 0;
|
|
1451
|
-
z-index: 2;
|
|
1452
|
-
display: flex;
|
|
1453
|
-
`, cn = Y.div`
|
|
1454
|
-
display: flex;
|
|
1455
|
-
flex-direction: column;
|
|
1456
|
-
align-items: center;
|
|
1457
|
-
width: 100%;
|
|
1458
|
-
margin: auto 0;
|
|
1459
|
-
gap: var(--ethora-space-5, 20px);
|
|
1460
|
-
`, fn = Y(je)`
|
|
1461
|
-
width: 100%;
|
|
1462
|
-
`, dn = Y.div`
|
|
1463
|
-
display: flex;
|
|
1464
|
-
justify-content: center;
|
|
1465
|
-
padding: var(--ethora-space-6, 24px) var(--ethora-space-5, 20px);
|
|
1466
|
-
`, hn = Y.div`
|
|
1467
|
-
width: 176px;
|
|
1468
|
-
`, pn = Y.div`
|
|
1469
|
-
box-sizing: border-box;
|
|
1470
|
-
display: flex;
|
|
1471
|
-
flex-direction: column;
|
|
1472
|
-
width: 100%;
|
|
1473
|
-
gap: var(--ethora-space-3, 12px);
|
|
1474
|
-
padding: var(--ethora-space-4, 16px) var(--ethora-space-5, 20px);
|
|
1475
|
-
border-top: 1px solid var(--ethora-color-border, #e6e8ec);
|
|
1476
|
-
`, vn = ({
|
|
1477
|
-
isVisible: n,
|
|
1478
|
-
chatJid: d,
|
|
1479
|
-
setVisible: a
|
|
1480
|
-
}) => {
|
|
1481
|
-
const { config: u } = St(), c = he();
|
|
1482
|
-
if (!n) return null;
|
|
1483
|
-
const r = ln(d, u?.qrUrl);
|
|
1484
|
-
return /* @__PURE__ */ T(un, { children: /* @__PURE__ */ T(
|
|
1485
|
-
$t,
|
|
1486
|
-
{
|
|
1487
|
-
title: c("modal.qr.title"),
|
|
1488
|
-
onClose: () => a(!1),
|
|
1489
|
-
backLabel: c("action.close"),
|
|
1490
|
-
children: /* @__PURE__ */ j(cn, { children: [
|
|
1491
|
-
/* @__PURE__ */ j(fn, { children: [
|
|
1492
|
-
/* @__PURE__ */ T(dn, { children: /* @__PURE__ */ T(hn, { children: /* @__PURE__ */ T(
|
|
1493
|
-
an,
|
|
1494
|
-
{
|
|
1495
|
-
size: 176,
|
|
1496
|
-
style: { width: "100%", height: "auto" },
|
|
1497
|
-
value: r,
|
|
1498
|
-
viewBox: "0 0 176 176"
|
|
1499
|
-
}
|
|
1500
|
-
) }) }),
|
|
1501
|
-
/* @__PURE__ */ j(pn, { children: [
|
|
1502
|
-
/* @__PURE__ */ T(
|
|
1503
|
-
or,
|
|
1504
|
-
{
|
|
1505
|
-
$colorBg: u?.colors?.colorInput,
|
|
1506
|
-
value: r,
|
|
1507
|
-
readOnly: !0,
|
|
1508
|
-
"aria-label": c("modal.qr.title"),
|
|
1509
|
-
style: { width: "100%" }
|
|
1510
|
-
}
|
|
1511
|
-
),
|
|
1512
|
-
/* @__PURE__ */ T(
|
|
1513
|
-
te,
|
|
1514
|
-
{
|
|
1515
|
-
text: c("action.copyLink"),
|
|
1516
|
-
onClick: () => jr(r),
|
|
1517
|
-
variant: "filled",
|
|
1518
|
-
style: { width: "100%" }
|
|
1519
|
-
}
|
|
1520
|
-
)
|
|
1521
|
-
] })
|
|
1522
|
-
] }),
|
|
1523
|
-
/* @__PURE__ */ T(Lr, { style: { textAlign: "center" }, children: c("modal.qr.hint") })
|
|
1524
|
-
] })
|
|
1525
|
-
}
|
|
1526
|
-
) });
|
|
1527
|
-
}, mn = ({
|
|
1528
|
-
isModalOpen: n,
|
|
1529
|
-
setIsModalOpen: d
|
|
1530
|
-
}) => {
|
|
1531
|
-
const a = qe(), u = ue((e) => Fe(e)), { client: c } = _t(), r = he(), l = () => d(!1), o = xt(null);
|
|
1532
|
-
Mt({
|
|
1533
|
-
enabled: n,
|
|
1534
|
-
onClose: l,
|
|
1535
|
-
containerRef: o
|
|
1536
|
-
});
|
|
1537
|
-
const t = async () => {
|
|
1538
|
-
try {
|
|
1539
|
-
await ir(u.jid.split("@")[0]), c?.leaveTheRoomStanza?.(u.jid), a(sr({ jid: u.jid })), a(lr({ roomJID: null })), l();
|
|
1540
|
-
} catch (e) {
|
|
1541
|
-
console.error("Failed to delete chat:", e);
|
|
1542
|
-
}
|
|
1543
|
-
};
|
|
1544
|
-
return n && /* @__PURE__ */ T(At, { children: /* @__PURE__ */ j(Dt, { ref: o, children: [
|
|
1545
|
-
/* @__PURE__ */ T(
|
|
1546
|
-
Ot,
|
|
1547
|
-
{
|
|
1548
|
-
onClick: l,
|
|
1549
|
-
style: { fontSize: 24 },
|
|
1550
|
-
"aria-label": r("action.close"),
|
|
1551
|
-
children: "×"
|
|
1552
|
-
}
|
|
1553
|
-
),
|
|
1554
|
-
/* @__PURE__ */ T(ar, { children: r("modal.deleteChat.title") }),
|
|
1555
|
-
/* @__PURE__ */ j(Ne, { children: [
|
|
1556
|
-
/* @__PURE__ */ T(
|
|
1557
|
-
te,
|
|
1558
|
-
{
|
|
1559
|
-
onClick: l,
|
|
1560
|
-
text: r("action.cancel"),
|
|
1561
|
-
style: { width: "100%" },
|
|
1562
|
-
unstyled: !0,
|
|
1563
|
-
variant: "outlined"
|
|
1564
|
-
}
|
|
1565
|
-
),
|
|
1566
|
-
/* @__PURE__ */ T(
|
|
1567
|
-
te,
|
|
1568
|
-
{
|
|
1569
|
-
onClick: t,
|
|
1570
|
-
text: r("action.delete"),
|
|
1571
|
-
style: { width: "100%" },
|
|
1572
|
-
unstyled: !0,
|
|
1573
|
-
variant: "filled",
|
|
1574
|
-
tone: "danger"
|
|
1575
|
-
}
|
|
1576
|
-
)
|
|
1577
|
-
] })
|
|
1578
|
-
] }) });
|
|
1579
|
-
}, gn = () => {
|
|
1580
|
-
const { showToast: n } = Lt(), d = qe(), a = he(), [u, c] = ee(!1), [r, l] = ee(!1), [o, t] = ee([]), e = ue((v) => Fe(v)), s = () => l(!0), i = () => {
|
|
1581
|
-
l(!1), t([]);
|
|
1582
|
-
}, f = xt(null);
|
|
1583
|
-
Mt({
|
|
1584
|
-
enabled: r,
|
|
1585
|
-
onClose: i,
|
|
1586
|
-
containerRef: f
|
|
1587
|
-
});
|
|
1588
|
-
const m = async () => {
|
|
1589
|
-
c(!0);
|
|
1590
|
-
const v = Array.isArray(e?.members) ? e.members : [], g = v.map(
|
|
1591
|
-
(y) => y.xmppUsername
|
|
1592
|
-
), R = o.filter((y) => !g.includes(y.xmppUsername)).map((y) => y.xmppUsername);
|
|
1593
|
-
try {
|
|
1594
|
-
const y = await fr({
|
|
1595
|
-
chatName: e.jid.split("@")[0],
|
|
1596
|
-
members: R
|
|
1597
|
-
});
|
|
1598
|
-
d(
|
|
1599
|
-
be({
|
|
1600
|
-
jid: e.jid,
|
|
1601
|
-
updates: {
|
|
1602
|
-
members: [...y, ...v],
|
|
1603
|
-
usersCnt: It(e) + y.length
|
|
1604
|
-
}
|
|
1605
|
-
})
|
|
1606
|
-
), n({
|
|
1607
|
-
id: Date.now().toString(),
|
|
1608
|
-
title: a("toast.success"),
|
|
1609
|
-
// This is the "add users to an existing room" flow, not room
|
|
1610
|
-
// creation - the old copy here literally said "Room created
|
|
1611
|
-
// succusfully!" (typo and all), copy-pasted from NewChatModal.
|
|
1612
|
-
message: a("toast.usersAddedSuccess"),
|
|
1613
|
-
type: "success",
|
|
1614
|
-
duration: 3e3
|
|
1615
|
-
});
|
|
1616
|
-
} catch (y) {
|
|
1617
|
-
console.error("Error adding users:", y), c(!1);
|
|
1618
|
-
}
|
|
1619
|
-
i(), c(!1);
|
|
1620
|
-
};
|
|
1621
|
-
return /* @__PURE__ */ j(Pt, { children: [
|
|
1622
|
-
/* @__PURE__ */ T(ur, { variant: "filled", unstyled: !0, onClick: s, children: a("action.addMoreUsers") }),
|
|
1623
|
-
r && /* @__PURE__ */ T(At, { children: /* @__PURE__ */ j(Dt, { ref: f, children: [
|
|
1624
|
-
/* @__PURE__ */ T(
|
|
1625
|
-
Ot,
|
|
1626
|
-
{
|
|
1627
|
-
onClick: i,
|
|
1628
|
-
style: { fontSize: 24 },
|
|
1629
|
-
"aria-label": a("action.close"),
|
|
1630
|
-
children: "×"
|
|
1631
|
-
}
|
|
1632
|
-
),
|
|
1633
|
-
/* @__PURE__ */ T(
|
|
1634
|
-
Ne,
|
|
1635
|
-
{
|
|
1636
|
-
style: {
|
|
1637
|
-
flexDirection: "column",
|
|
1638
|
-
position: "relative",
|
|
1639
|
-
boxSizing: "border-box",
|
|
1640
|
-
width: "100%",
|
|
1641
|
-
minHeight: "400px"
|
|
1642
|
-
},
|
|
1643
|
-
children: /* @__PURE__ */ T(
|
|
1644
|
-
cr,
|
|
1645
|
-
{
|
|
1646
|
-
selectedUsers: o,
|
|
1647
|
-
setSelectedUsers: t,
|
|
1648
|
-
style: {
|
|
1649
|
-
minWidth: "100%",
|
|
1650
|
-
width: "100%",
|
|
1651
|
-
maxHeight: "340px"
|
|
1652
|
-
},
|
|
1653
|
-
headerElement: !1
|
|
1654
|
-
}
|
|
1655
|
-
)
|
|
1656
|
-
}
|
|
1657
|
-
),
|
|
1658
|
-
/* @__PURE__ */ j(Ne, { children: [
|
|
1659
|
-
/* @__PURE__ */ T(
|
|
1660
|
-
te,
|
|
1661
|
-
{
|
|
1662
|
-
onClick: i,
|
|
1663
|
-
text: a("action.cancel"),
|
|
1664
|
-
style: { width: "100%" },
|
|
1665
|
-
unstyled: !0,
|
|
1666
|
-
variant: "outlined"
|
|
1667
|
-
}
|
|
1668
|
-
),
|
|
1669
|
-
u ? /* @__PURE__ */ T($e, {}) : /* @__PURE__ */ T(
|
|
1670
|
-
te,
|
|
1671
|
-
{
|
|
1672
|
-
onClick: m,
|
|
1673
|
-
text: a("action.add"),
|
|
1674
|
-
style: { width: "100%" },
|
|
1675
|
-
unstyled: !0,
|
|
1676
|
-
variant: "filled"
|
|
1677
|
-
}
|
|
1678
|
-
)
|
|
1679
|
-
] })
|
|
1680
|
-
] }) })
|
|
1681
|
-
] });
|
|
1682
|
-
}, yn = Y.div`
|
|
1683
|
-
display: flex;
|
|
1684
|
-
align-items: center;
|
|
1685
|
-
gap: var(--ethora-space-3, 12px);
|
|
1686
|
-
min-height: 60px;
|
|
1687
|
-
border-radius: var(--ethora-radius-md, 12px);
|
|
1688
|
-
padding: var(--ethora-space-2, 8px);
|
|
1689
|
-
transition: background-color var(--ethora-motion-fast, 150ms)
|
|
1690
|
-
var(--ethora-motion-ease, ease);
|
|
1691
|
-
|
|
1692
|
-
&:hover {
|
|
1693
|
-
background-color: var(--ethora-color-bg-hover, #f0f2f5);
|
|
1694
|
-
}
|
|
1695
|
-
|
|
1696
|
-
@media (prefers-reduced-motion: reduce) {
|
|
1697
|
-
transition: none;
|
|
1698
|
-
}
|
|
1699
|
-
`, bn = Y.div`
|
|
1700
|
-
display: flex;
|
|
1701
|
-
align-items: center;
|
|
1702
|
-
gap: var(--ethora-space-3, 12px);
|
|
1703
|
-
min-width: 0;
|
|
1704
|
-
flex: 1 1 auto;
|
|
1705
|
-
cursor: ${({ $clickable: n }) => n ? "pointer" : "default"};
|
|
1706
|
-
|
|
1707
|
-
&:focus-visible {
|
|
1708
|
-
outline: 2px solid var(--ethora-color-primary, #0052cd);
|
|
1709
|
-
outline-offset: 2px;
|
|
1710
|
-
border-radius: var(--ethora-radius-sm, 8px);
|
|
1711
|
-
}
|
|
1712
|
-
`, En = Y.div`
|
|
1713
|
-
display: flex;
|
|
1714
|
-
flex-direction: column;
|
|
1715
|
-
gap: 2px;
|
|
1716
|
-
min-width: 0;
|
|
1717
|
-
`, Tn = Y.span`
|
|
1718
|
-
font-size: var(--ethora-font-size-sm, 14px);
|
|
1719
|
-
font-weight: var(--ethora-font-weight-semibold, 600);
|
|
1720
|
-
color: var(--ethora-color-text, #141414);
|
|
1721
|
-
overflow: hidden;
|
|
1722
|
-
text-overflow: ellipsis;
|
|
1723
|
-
white-space: nowrap;
|
|
1724
|
-
`, Cn = Y.span`
|
|
1725
|
-
font-size: var(--ethora-font-size-xs, 12px);
|
|
1726
|
-
color: ${({ $online: n }) => n ? "var(--ethora-color-online, #12b76a)" : "var(--ethora-color-text-muted, #8c8c8c)"};
|
|
1727
|
-
overflow: hidden;
|
|
1728
|
-
text-overflow: ellipsis;
|
|
1729
|
-
white-space: nowrap;
|
|
1730
|
-
`, wn = Y.span`
|
|
1731
|
-
flex: 0 0 auto;
|
|
1732
|
-
background-color: ${({ $banned: n }) => n ? "rgba(217, 45, 32, 0.1)" : "var(--ethora-color-primary-soft, #e7edf9)"};
|
|
1733
|
-
color: ${({ $banned: n }) => n ? "var(--ethora-color-danger, #d92d20)" : "var(--ethora-color-primary, #0052cd)"};
|
|
1734
|
-
padding: var(--ethora-space-1, 4px) var(--ethora-space-2, 8px);
|
|
1735
|
-
border-radius: var(--ethora-radius-full, 999px);
|
|
1736
|
-
font-size: var(--ethora-font-size-xs, 12px);
|
|
1737
|
-
font-weight: var(--ethora-font-weight-medium, 500);
|
|
1738
|
-
text-transform: capitalize;
|
|
1739
|
-
[data-ethora-color-scheme='dark'] & {
|
|
1740
|
-
${({ $banned: n }) => n ? "background-color: rgba(242, 118, 107, 0.15);" : ""}
|
|
1741
|
-
}
|
|
1742
|
-
`, Rn = ({
|
|
1743
|
-
member: n,
|
|
1744
|
-
disableClick: d,
|
|
1745
|
-
online: a,
|
|
1746
|
-
showMenu: u,
|
|
1747
|
-
menuOptions: c,
|
|
1748
|
-
moreOptionsLabel: r,
|
|
1749
|
-
onAvatarClick: l
|
|
1750
|
-
}) => {
|
|
1751
|
-
const o = he(), t = Bt(), e = String(n?.xmppUsername || ""), s = e.split("@")[0], i = ue(
|
|
1752
|
-
(D) => D.rooms.usersSet?.[e] ?? D.rooms.usersSet?.[s]
|
|
1753
|
-
), f = n.firstName || i?.firstName || "", m = n.lastName || i?.lastName || "", v = n.profileImage || i?.profileImage || i?.photoURL || "", g = {
|
|
1754
|
-
...n,
|
|
1755
|
-
firstName: f,
|
|
1756
|
-
lastName: m,
|
|
1757
|
-
profileImage: v
|
|
1758
|
-
}, R = !!n.role && n.role !== "none", y = n.ban_status === "banned";
|
|
1759
|
-
let I = "";
|
|
1760
|
-
if (a)
|
|
1761
|
-
I = o("presence.online");
|
|
1762
|
-
else if (n.last_active)
|
|
1763
|
-
try {
|
|
1764
|
-
I = new Intl.DateTimeFormat(t, {
|
|
1765
|
-
dateStyle: "medium"
|
|
1766
|
-
}).format(new Date(n.last_active * 1e3));
|
|
1767
|
-
} catch {
|
|
1768
|
-
I = "";
|
|
1769
|
-
}
|
|
1770
|
-
else R && (I = n.role);
|
|
1771
|
-
return /* @__PURE__ */ j(yn, { children: [
|
|
1772
|
-
/* @__PURE__ */ j(
|
|
1773
|
-
bn,
|
|
1774
|
-
{
|
|
1775
|
-
$clickable: !d,
|
|
1776
|
-
role: d ? void 0 : "button",
|
|
1777
|
-
tabIndex: d ? void 0 : 0,
|
|
1778
|
-
onClick: d ? void 0 : () => l(g),
|
|
1779
|
-
onKeyDown: d ? void 0 : (D) => {
|
|
1780
|
-
(D.key === "Enter" || D.key === " ") && (D.preventDefault(), l(g));
|
|
1781
|
-
},
|
|
1782
|
-
children: [
|
|
1783
|
-
/* @__PURE__ */ T(
|
|
1784
|
-
kt,
|
|
1785
|
-
{
|
|
1786
|
-
name: `${f} ${m}`,
|
|
1787
|
-
icon: v,
|
|
1788
|
-
size: 40,
|
|
1789
|
-
online: a
|
|
1790
|
-
}
|
|
1791
|
-
),
|
|
1792
|
-
/* @__PURE__ */ j(En, { children: [
|
|
1793
|
-
/* @__PURE__ */ j(Tn, { children: [
|
|
1794
|
-
f,
|
|
1795
|
-
" ",
|
|
1796
|
-
m
|
|
1797
|
-
] }),
|
|
1798
|
-
I && /* @__PURE__ */ T(Cn, { $online: a, children: I })
|
|
1799
|
-
] })
|
|
1800
|
-
]
|
|
1801
|
-
}
|
|
1802
|
-
),
|
|
1803
|
-
R && /* @__PURE__ */ T(wn, { $banned: y, children: n.role }),
|
|
1804
|
-
u && /* @__PURE__ */ T(
|
|
1805
|
-
Nt,
|
|
1806
|
-
{
|
|
1807
|
-
options: c,
|
|
1808
|
-
openButton: /* @__PURE__ */ T(
|
|
1809
|
-
te,
|
|
1810
|
-
{
|
|
1811
|
-
onClick: (D) => {
|
|
1812
|
-
D.preventDefault();
|
|
1813
|
-
},
|
|
1814
|
-
"aria-label": r,
|
|
1815
|
-
children: r
|
|
1816
|
-
}
|
|
1817
|
-
),
|
|
1818
|
-
onClose: () => dr.log("Dropdown closed")
|
|
1819
|
-
}
|
|
1820
|
-
)
|
|
1821
|
-
] });
|
|
1822
|
-
}, Pn = Ue.memo(Rn), Rt = 150, xn = 150, On = ({
|
|
1823
|
-
handleCloseModal: n
|
|
1824
|
-
}) => {
|
|
1825
|
-
const [d, a] = ee(!1), [u, c] = ee(!1), [r, l] = ee(!1), { showToast: o } = Lt(), t = he(), e = Bt(), s = se(
|
|
1826
|
-
() => [
|
|
1827
|
-
{
|
|
1828
|
-
label: t("action.deleteChat"),
|
|
1829
|
-
icon: /* @__PURE__ */ T(hr, {}),
|
|
1830
|
-
onClick: () => {
|
|
1831
|
-
l(!0);
|
|
1832
|
-
},
|
|
1833
|
-
styles: { color: "var(--ethora-color-danger, #D92D20)" }
|
|
1834
|
-
}
|
|
1835
|
-
],
|
|
1836
|
-
[t]
|
|
1837
|
-
), [i, f] = ee(!1), [m, v] = ee(
|
|
1838
|
-
Rt
|
|
1839
|
-
), [g, R] = ee(""), y = qe(), I = pr(), { client: D } = _t(), { user: $, config: p } = St(), w = ue((C) => Fe(C)), {
|
|
1840
|
-
muted: z,
|
|
1841
|
-
isSupported: G,
|
|
1842
|
-
setMuted: re
|
|
1843
|
-
} = vr(w?.jid), ne = G && !p?.disableRoomMute, W = mr(w?.jid), K = ue(
|
|
1844
|
-
(C) => C.chatSettingStore.user?.fileToken || ""
|
|
1845
|
-
), V = $?.xmppUsername || "", Q = w?.type === "private", X = Q ? (w?.members || []).find(
|
|
1846
|
-
(C) => C.xmppUsername && C.xmppUsername !== V
|
|
1847
|
-
) : void 0, F = X?.xmppUsername || "", Z = F.split("@")[0], ae = ue(
|
|
1848
|
-
(C) => F ? C.rooms.usersSet?.[F] ?? C.rooms.usersSet?.[Z] : void 0
|
|
1849
|
-
), ce = X?.profileImage || ae?.profileImage || "", h = se(() => new Set(W), [W]), E = gr(w), { members: S, state: _ } = yr(w?.jid, E), P = E && _ === "loading", A = se(() => {
|
|
1850
|
-
const C = Array.isArray(w?.members) ? w.members : [];
|
|
1851
|
-
return !E || S.length === 0 ? We(C) : We([...C, ...S]);
|
|
1852
|
-
}, [w?.members, E, S]), x = se(() => {
|
|
1853
|
-
const C = g.trim().toLowerCase();
|
|
1854
|
-
if (!C) return A;
|
|
1855
|
-
const U = I.getState().rooms.usersSet;
|
|
1856
|
-
return A.filter((J) => {
|
|
1857
|
-
const oe = String(J?.xmppUsername || ""), Ee = oe.split("@")[0], Ye = U?.[oe] || U?.[Ee], tr = J.firstName || Ye?.firstName || "", rr = J.lastName || Ye?.lastName || "";
|
|
1858
|
-
return `${tr} ${rr}`.toLowerCase().includes(C);
|
|
1859
|
-
});
|
|
1860
|
-
}, [A, g, I]), M = se(
|
|
1861
|
-
() => x.slice(0, m),
|
|
1862
|
-
[x, m]
|
|
1863
|
-
), O = m < x.length, B = (C) => {
|
|
1864
|
-
R(C.target.value), v(Rt);
|
|
1865
|
-
}, L = w?.jid ? w.jid.split("@")[0] : void 0, {
|
|
1866
|
-
items: q,
|
|
1867
|
-
loading: b,
|
|
1868
|
-
error: H,
|
|
1869
|
-
remove: ie
|
|
1870
|
-
} = br({ roomName: L }), pe = i ? q : q.slice(0, 6), Yt = (C) => {
|
|
1871
|
-
const U = Je(C.location);
|
|
1872
|
-
U && typeof window < "u" && window.open(U, "_blank", "noopener,noreferrer");
|
|
1873
|
-
}, Wt = (C) => {
|
|
1874
|
-
const U = Je(C.location);
|
|
1875
|
-
if (!U || typeof document > "u") return;
|
|
1876
|
-
const J = document.createElement("a");
|
|
1877
|
-
J.href = U, J.download = C.originalname || "file", document.body.appendChild(J), J.click(), J.remove();
|
|
1878
|
-
}, Gt = (C) => {
|
|
1879
|
-
ie(C._id).catch(() => {
|
|
1880
|
-
});
|
|
1881
|
-
}, Kt = async (C) => {
|
|
1882
|
-
try {
|
|
1883
|
-
let U = new FormData();
|
|
1884
|
-
U.append("files", C);
|
|
1885
|
-
const oe = (await Dr(U, w.jid))?.data?.results?.[0]?.location;
|
|
1886
|
-
if (oe) {
|
|
1887
|
-
try {
|
|
1888
|
-
await Xe(w.jid.split("@")[0], { picture: oe });
|
|
1889
|
-
} catch (Ee) {
|
|
1890
|
-
console.warn("Chat picture persistence failed:", Ee);
|
|
1891
|
-
}
|
|
1892
|
-
D.setRoomImageStanza(w.jid, oe, "icon", "none"), y(
|
|
1893
|
-
be({ jid: w.jid, updates: { icon: oe } })
|
|
1894
|
-
);
|
|
1895
|
-
}
|
|
1896
|
-
} catch (U) {
|
|
1897
|
-
console.error("File upload failed or location is missing:", U);
|
|
1898
|
-
}
|
|
1899
|
-
}, Xt = async (C) => {
|
|
1900
|
-
try {
|
|
1901
|
-
await Ar({
|
|
1902
|
-
roomId: w.jid.split("@")[0],
|
|
1903
|
-
members: [C]
|
|
1904
|
-
}), y(
|
|
1905
|
-
be({
|
|
1906
|
-
jid: w.jid,
|
|
1907
|
-
updates: {
|
|
1908
|
-
members: (Array.isArray(w.members) ? w.members : []).filter((U) => U.xmppUsername !== C)
|
|
1909
|
-
}
|
|
1910
|
-
})
|
|
1911
|
-
), o({
|
|
1912
|
-
id: Date.now().toString(),
|
|
1913
|
-
title: t("toast.success"),
|
|
1914
|
-
message: t("toast.userRemovedFromRoom", { userId: C }),
|
|
1915
|
-
type: "success"
|
|
1916
|
-
});
|
|
1917
|
-
} catch (U) {
|
|
1918
|
-
console.error("Failed to delete user:", U), o({
|
|
1919
|
-
id: Date.now().toString(),
|
|
1920
|
-
title: t("toast.error"),
|
|
1921
|
-
message: t("toast.failedToDeleteUser"),
|
|
1922
|
-
type: "error"
|
|
1923
|
-
});
|
|
1924
|
-
}
|
|
1925
|
-
}, fe = p?.disableRoomConfig === !0, Jt = async () => {
|
|
1926
|
-
try {
|
|
1927
|
-
await Xe(w.jid.split("@")[0], { picture: "" });
|
|
1928
|
-
} catch (C) {
|
|
1929
|
-
console.warn("Chat picture clear failed:", C);
|
|
1930
|
-
}
|
|
1931
|
-
D.setRoomImageStanza(w.jid, null, "icon", "none"), y(be({ jid: w.jid, updates: { icon: null } }));
|
|
1932
|
-
}, Vt = (C) => {
|
|
1933
|
-
y(Te(Ge.PROFILE)), y(
|
|
1934
|
-
Or({
|
|
1935
|
-
id: C._id,
|
|
1936
|
-
firstName: C.firstName,
|
|
1937
|
-
lastName: C.lastName,
|
|
1938
|
-
name: `${C.firstName} ${C.lastName}`,
|
|
1939
|
-
userJID: C?.xmppUsername
|
|
1940
|
-
})
|
|
1941
|
-
);
|
|
1942
|
-
}, Zt = se(
|
|
1943
|
-
() => (C) => [
|
|
1944
|
-
{
|
|
1945
|
-
label: t("action.delete"),
|
|
1946
|
-
icon: null,
|
|
1947
|
-
onClick: (U) => {
|
|
1948
|
-
U?.preventDefault(), Xt(C);
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
],
|
|
1952
|
-
[t]
|
|
1953
|
-
);
|
|
1954
|
-
if (!w)
|
|
1955
|
-
return y(Te()), null;
|
|
1956
|
-
const er = (() => {
|
|
1957
|
-
const C = It(w), U = Er(C, e);
|
|
1958
|
-
return C === 1 ? t("modal.chatProfile.memberCountSingular", { count: U }) : t("modal.chatProfile.memberCountPlural", { count: U });
|
|
1959
|
-
})(), Qe = !p?.disableChatInfo?.disableDescription, He = !p?.disableChatInfo?.disableType;
|
|
1960
|
-
return /* @__PURE__ */ j(
|
|
1961
|
-
$t,
|
|
1962
|
-
{
|
|
1963
|
-
title: t("modal.chatProfile.title"),
|
|
1964
|
-
onClose: n,
|
|
1965
|
-
headerActions: /* @__PURE__ */ j(Pt, { children: [
|
|
1966
|
-
w?.type === "public" && /* @__PURE__ */ T(
|
|
1967
|
-
te,
|
|
1968
|
-
{
|
|
1969
|
-
EndIcon: /* @__PURE__ */ T(_r, {}),
|
|
1970
|
-
onClick: () => c(!0),
|
|
1971
|
-
"aria-label": t("action.showQr")
|
|
1972
|
-
}
|
|
1973
|
-
),
|
|
1974
|
-
w.role === "moderator" && w.type !== "private" && !fe && !p?.disableChatInfo?.disableChatHeaderMenu && /* @__PURE__ */ T(
|
|
1975
|
-
Nt,
|
|
1976
|
-
{
|
|
1977
|
-
position: "left",
|
|
1978
|
-
options: s,
|
|
1979
|
-
openButton: /* @__PURE__ */ T(
|
|
1980
|
-
te,
|
|
1981
|
-
{
|
|
1982
|
-
style: { padding: 8, maxHeight: "40px" },
|
|
1983
|
-
EndIcon: /* @__PURE__ */ T(Mr, {}),
|
|
1984
|
-
unstyled: !0,
|
|
1985
|
-
"aria-label": t("action.moreOptions")
|
|
1986
|
-
}
|
|
1987
|
-
)
|
|
1988
|
-
}
|
|
1989
|
-
)
|
|
1990
|
-
] }),
|
|
1991
|
-
children: [
|
|
1992
|
-
/* @__PURE__ */ j(Ur, { children: [
|
|
1993
|
-
/* @__PURE__ */ T(
|
|
1994
|
-
kt,
|
|
1995
|
-
{
|
|
1996
|
-
name: w.name,
|
|
1997
|
-
icon: Tr(
|
|
1998
|
-
w.icon || (Q ? ce : ""),
|
|
1999
|
-
K
|
|
2000
|
-
),
|
|
2001
|
-
upload: {
|
|
2002
|
-
onUpload: Kt,
|
|
2003
|
-
active: !fe && w?.role !== "participant"
|
|
2004
|
-
},
|
|
2005
|
-
remove: fe ? void 0 : { enabled: !0, onRemoveClick: Jt },
|
|
2006
|
-
role: w?.role,
|
|
2007
|
-
size: 96
|
|
2008
|
-
}
|
|
2009
|
-
),
|
|
2010
|
-
/* @__PURE__ */ j("div", { children: [
|
|
2011
|
-
/* @__PURE__ */ T(qr, { children: w.name }),
|
|
2012
|
-
/* @__PURE__ */ T(Fr, { children: er })
|
|
2013
|
-
] })
|
|
2014
|
-
] }),
|
|
2015
|
-
w.role === "moderator" && w.type === "group" && !fe && /* @__PURE__ */ T(gn, {}),
|
|
2016
|
-
(Qe || He) && /* @__PURE__ */ j(de, { children: [
|
|
2017
|
-
/* @__PURE__ */ T(ve, { children: t("modal.chatProfile.aboutSection") }),
|
|
2018
|
-
Qe && /* @__PURE__ */ T(zr, { $empty: !w?.description, children: w?.description || t("modal.profile.noDescription") }),
|
|
2019
|
-
He && /* @__PURE__ */ j(Qr, { children: [
|
|
2020
|
-
/* @__PURE__ */ T(Cr, { color: "currentColor" }),
|
|
2021
|
-
t(
|
|
2022
|
-
w.type === "private" ? "modal.chatProfile.typePrivate" : w.type === "group" ? "modal.chatProfile.typeGroup" : "modal.chatProfile.typePublic"
|
|
2023
|
-
)
|
|
2024
|
-
] })
|
|
2025
|
-
] }),
|
|
2026
|
-
wr(p) && /* @__PURE__ */ T(de, { children: /* @__PURE__ */ T(je, { children: /* @__PURE__ */ T(
|
|
2027
|
-
Ir,
|
|
2028
|
-
{
|
|
2029
|
-
label: t("search.messages.title"),
|
|
2030
|
-
onClick: () => y(Te(Ge.MESSAGE_SEARCH))
|
|
2031
|
-
}
|
|
2032
|
-
) }) }),
|
|
2033
|
-
ne && /* @__PURE__ */ j(de, { children: [
|
|
2034
|
-
/* @__PURE__ */ T(ve, { children: t("modal.chatProfile.notifications") }),
|
|
2035
|
-
/* @__PURE__ */ T(je, { children: /* @__PURE__ */ j(
|
|
2036
|
-
Br,
|
|
2037
|
-
{
|
|
2038
|
-
style: {
|
|
2039
|
-
flexDirection: "row",
|
|
2040
|
-
justifyContent: "space-between",
|
|
2041
|
-
alignItems: "center"
|
|
2042
|
-
},
|
|
2043
|
-
children: [
|
|
2044
|
-
/* @__PURE__ */ T(Ve, { children: t(z ? "action.unmute" : "action.mute") }),
|
|
2045
|
-
/* @__PURE__ */ T(
|
|
2046
|
-
Rr,
|
|
2047
|
-
{
|
|
2048
|
-
checked: z,
|
|
2049
|
-
onToggle: (C) => {
|
|
2050
|
-
re(C);
|
|
2051
|
-
},
|
|
2052
|
-
bgColor: p?.colors?.primary
|
|
2053
|
-
}
|
|
2054
|
-
)
|
|
2055
|
-
]
|
|
2056
|
-
}
|
|
2057
|
-
) })
|
|
2058
|
-
] }),
|
|
2059
|
-
!p?.disableChatInfo?.hideMembers && /* @__PURE__ */ j(de, { children: [
|
|
2060
|
-
/* @__PURE__ */ T(Ze, { children: /* @__PURE__ */ T(ve, { children: t("modal.chatProfile.membersSection") }) }),
|
|
2061
|
-
A.length > 0 && /* @__PURE__ */ j(kr, { children: [
|
|
2062
|
-
/* @__PURE__ */ T(Pr, { color: "currentColor", height: "18px" }),
|
|
2063
|
-
/* @__PURE__ */ T(
|
|
2064
|
-
Nr,
|
|
2065
|
-
{
|
|
2066
|
-
type: "text",
|
|
2067
|
-
value: g,
|
|
2068
|
-
onChange: B,
|
|
2069
|
-
placeholder: t("modal.chatProfile.searchMembers"),
|
|
2070
|
-
"aria-label": t("modal.chatProfile.searchMembers")
|
|
2071
|
-
}
|
|
2072
|
-
)
|
|
2073
|
-
] }),
|
|
2074
|
-
d ? /* @__PURE__ */ T($e, {}) : /* @__PURE__ */ j($r, { children: [
|
|
2075
|
-
M.map((C) => /* @__PURE__ */ T(
|
|
2076
|
-
Pn,
|
|
2077
|
-
{
|
|
2078
|
-
member: C,
|
|
2079
|
-
isLast: !0,
|
|
2080
|
-
disableClick: !!p?.disableChatInfo?.disableMembers,
|
|
2081
|
-
online: h.has(C.xmppUsername),
|
|
2082
|
-
showMenu: $.xmppUsername !== C.xmppUsername && w.role === "moderator" && w.type !== "private" && !fe,
|
|
2083
|
-
menuOptions: Zt(C.xmppUsername),
|
|
2084
|
-
moreOptionsLabel: t("action.moreOptions"),
|
|
2085
|
-
onAvatarClick: Vt
|
|
2086
|
-
},
|
|
2087
|
-
xr(C) || C._id
|
|
2088
|
-
)),
|
|
2089
|
-
P && /* @__PURE__ */ T(Ve, { children: t("modal.chatProfile.membersLoadingAll") }),
|
|
2090
|
-
O && /* @__PURE__ */ T(
|
|
2091
|
-
et,
|
|
2092
|
-
{
|
|
2093
|
-
type: "button",
|
|
2094
|
-
onClick: () => v(
|
|
2095
|
-
(C) => C + xn
|
|
2096
|
-
),
|
|
2097
|
-
children: t("modal.chatProfile.membersShowMore", {
|
|
2098
|
-
count: x.length - m
|
|
2099
|
-
})
|
|
2100
|
-
}
|
|
2101
|
-
)
|
|
2102
|
-
] })
|
|
2103
|
-
] }),
|
|
2104
|
-
/* @__PURE__ */ j(de, { children: [
|
|
2105
|
-
/* @__PURE__ */ j(Ze, { children: [
|
|
2106
|
-
/* @__PURE__ */ T(ve, { children: t("modal.chatProfile.filesTitle") }),
|
|
2107
|
-
q.length > 6 && /* @__PURE__ */ T(
|
|
2108
|
-
et,
|
|
2109
|
-
{
|
|
2110
|
-
type: "button",
|
|
2111
|
-
onClick: () => f((C) => !C),
|
|
2112
|
-
"aria-expanded": i,
|
|
2113
|
-
children: t(i ? "modal.chatProfile.filesShowLess" : "modal.chatProfile.filesShowAll")
|
|
2114
|
-
}
|
|
2115
|
-
)
|
|
2116
|
-
] }),
|
|
2117
|
-
b && q.length === 0 ? /* @__PURE__ */ T($e, {}) : H && q.length === 0 ? /* @__PURE__ */ j(tt, { $compact: !0, children: [
|
|
2118
|
-
/* @__PURE__ */ T(
|
|
2119
|
-
Ke,
|
|
2120
|
-
{
|
|
2121
|
-
color: "var(--ethora-color-text-muted, #8c8c8c)",
|
|
2122
|
-
fill: "var(--ethora-color-bg-subtle, #f5f7fa)"
|
|
2123
|
-
}
|
|
2124
|
-
),
|
|
2125
|
-
/* @__PURE__ */ T(rt, { children: t("files.error.title") })
|
|
2126
|
-
] }) : q.length === 0 ? /* @__PURE__ */ j(tt, { $compact: !0, children: [
|
|
2127
|
-
/* @__PURE__ */ T(
|
|
2128
|
-
Ke,
|
|
2129
|
-
{
|
|
2130
|
-
color: "var(--ethora-color-text-muted, #8c8c8c)",
|
|
2131
|
-
fill: "var(--ethora-color-bg-subtle, #f5f7fa)"
|
|
2132
|
-
}
|
|
2133
|
-
),
|
|
2134
|
-
/* @__PURE__ */ T(rt, { children: t("modal.chatProfile.filesEmpty") })
|
|
2135
|
-
] }) : /* @__PURE__ */ T(
|
|
2136
|
-
Sr,
|
|
2137
|
-
{
|
|
2138
|
-
items: pe,
|
|
2139
|
-
fileToken: K,
|
|
2140
|
-
onPreview: Yt,
|
|
2141
|
-
onDownload: Wt,
|
|
2142
|
-
onDelete: Gt,
|
|
2143
|
-
compact: !0
|
|
2144
|
-
}
|
|
2145
|
-
)
|
|
2146
|
-
] }),
|
|
2147
|
-
/* @__PURE__ */ T(
|
|
2148
|
-
vn,
|
|
2149
|
-
{
|
|
2150
|
-
isVisible: u,
|
|
2151
|
-
setVisible: c,
|
|
2152
|
-
chatJid: w.jid
|
|
2153
|
-
}
|
|
2154
|
-
),
|
|
2155
|
-
/* @__PURE__ */ T(
|
|
2156
|
-
mn,
|
|
2157
|
-
{
|
|
2158
|
-
isModalOpen: r,
|
|
2159
|
-
setIsModalOpen: l
|
|
2160
|
-
}
|
|
2161
|
-
)
|
|
2162
|
-
]
|
|
2163
|
-
}
|
|
2164
|
-
);
|
|
2165
|
-
};
|
|
2166
|
-
export {
|
|
2167
|
-
On as default
|
|
2168
|
-
};
|