@obb871001/api-integration-sdk 1.0.82 → 1.0.84
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.cjs +7 -7
- package/dist/index.js +712 -660
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useQuery as oe, QueryClient as
|
|
3
|
-
import
|
|
4
|
-
import { find as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
1
|
+
import he, { createContext as Fa, useContext as Wa, useCallback as X, useMemo as Qe, useEffect as ve, useRef as ya } from "react";
|
|
2
|
+
import { useQuery as oe, QueryClient as Ci, QueryClientProvider as vi, useQueries as Ja, useMutation as za } from "@tanstack/react-query";
|
|
3
|
+
import hi from "axios";
|
|
4
|
+
import { find as Ye, isEmpty as O, isObject as He, flatMap as qe, isArray as ee, map as we, get as Re } from "lodash";
|
|
5
|
+
import ki from "react-dom";
|
|
6
|
+
function Si(e) {
|
|
7
7
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
8
8
|
}
|
|
9
|
-
var
|
|
9
|
+
var Pe = { exports: {} }, ye = {};
|
|
10
10
|
var ba;
|
|
11
|
-
function
|
|
12
|
-
if (ba) return
|
|
11
|
+
function Ni() {
|
|
12
|
+
if (ba) return ye;
|
|
13
13
|
ba = 1;
|
|
14
|
-
var e =
|
|
14
|
+
var e = he, n = Symbol.for("react.element"), d = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
15
15
|
function U(_, r, c) {
|
|
16
|
-
var
|
|
16
|
+
var m, i = {}, g = null, l = null;
|
|
17
17
|
c !== void 0 && (g = "" + c), r.key !== void 0 && (g = "" + r.key), r.ref !== void 0 && (l = r.ref);
|
|
18
|
-
for (
|
|
19
|
-
if (_ && _.defaultProps) for (
|
|
20
|
-
return { $$typeof:
|
|
18
|
+
for (m in r) s.call(r, m) && !u.hasOwnProperty(m) && (i[m] = r[m]);
|
|
19
|
+
if (_ && _.defaultProps) for (m in r = _.defaultProps, r) i[m] === void 0 && (i[m] = r[m]);
|
|
20
|
+
return { $$typeof: n, type: _, key: g, ref: l, props: i, _owner: o.current };
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return ye.Fragment = d, ye.jsx = U, ye.jsxs = U, ye;
|
|
23
23
|
}
|
|
24
|
-
var
|
|
24
|
+
var be = {};
|
|
25
25
|
var Ta;
|
|
26
|
-
function
|
|
26
|
+
function Di() {
|
|
27
27
|
return Ta || (Ta = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
28
|
-
var e =
|
|
28
|
+
var e = he, n = Symbol.for("react.element"), d = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), _ = Symbol.for("react.context"), r = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), t = Symbol.iterator, y = "@@iterator";
|
|
29
29
|
function b(a) {
|
|
30
30
|
if (a === null || typeof a != "object")
|
|
31
31
|
return null;
|
|
32
32
|
var f = t && a[t] || a[y];
|
|
33
33
|
return typeof f == "function" ? f : null;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var p = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
36
36
|
function T(a) {
|
|
37
37
|
{
|
|
38
38
|
for (var f = arguments.length, C = new Array(f > 1 ? f - 1 : 0), v = 1; v < f; v++)
|
|
@@ -42,7 +42,7 @@ function Ni() {
|
|
|
42
42
|
}
|
|
43
43
|
function N(a, f, C) {
|
|
44
44
|
{
|
|
45
|
-
var v =
|
|
45
|
+
var v = p.ReactDebugCurrentFrame, E = v.getStackAddendum();
|
|
46
46
|
E !== "" && (f += "%s", C = C.concat([E]));
|
|
47
47
|
var G = C.map(function(S) {
|
|
48
48
|
return String(S);
|
|
@@ -50,16 +50,16 @@ function Ni() {
|
|
|
50
50
|
G.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, G);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
var D = !1, h = !1, L = !1, M = !1,
|
|
54
|
-
|
|
55
|
-
function
|
|
56
|
-
return !!(typeof a == "string" || typeof a == "function" || a ===
|
|
53
|
+
var D = !1, h = !1, L = !1, M = !1, ce = !1, _e;
|
|
54
|
+
_e = Symbol.for("react.module.reference");
|
|
55
|
+
function Fe(a) {
|
|
56
|
+
return !!(typeof a == "string" || typeof a == "function" || a === s || a === u || ce || a === o || a === c || a === m || M || a === l || D || h || L || typeof a == "object" && a !== null && (a.$$typeof === g || a.$$typeof === i || a.$$typeof === U || a.$$typeof === _ || a.$$typeof === r || // This needs to include all possible module reference object
|
|
57
57
|
// types supported by any Flight configuration anywhere since
|
|
58
58
|
// we don't know which Flight build this will end up being used
|
|
59
59
|
// with.
|
|
60
|
-
a.$$typeof ===
|
|
60
|
+
a.$$typeof === _e || a.getModuleId !== void 0));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Se(a, f, C) {
|
|
63
63
|
var v = a.displayName;
|
|
64
64
|
if (v)
|
|
65
65
|
return v;
|
|
@@ -77,17 +77,17 @@ function Ni() {
|
|
|
77
77
|
if (typeof a == "string")
|
|
78
78
|
return a;
|
|
79
79
|
switch (a) {
|
|
80
|
-
case
|
|
80
|
+
case s:
|
|
81
81
|
return "Fragment";
|
|
82
82
|
case d:
|
|
83
83
|
return "Portal";
|
|
84
|
-
case
|
|
84
|
+
case u:
|
|
85
85
|
return "Profiler";
|
|
86
|
-
case
|
|
86
|
+
case o:
|
|
87
87
|
return "StrictMode";
|
|
88
88
|
case c:
|
|
89
89
|
return "Suspense";
|
|
90
|
-
case
|
|
90
|
+
case m:
|
|
91
91
|
return "SuspenseList";
|
|
92
92
|
}
|
|
93
93
|
if (typeof a == "object")
|
|
@@ -99,7 +99,7 @@ function Ni() {
|
|
|
99
99
|
var C = a;
|
|
100
100
|
return V(C._context) + ".Provider";
|
|
101
101
|
case r:
|
|
102
|
-
return
|
|
102
|
+
return Se(a, a.render, "ForwardRef");
|
|
103
103
|
case i:
|
|
104
104
|
var v = a.displayName || null;
|
|
105
105
|
return v !== null ? v : H(a.type) || "Memo";
|
|
@@ -114,18 +114,18 @@ function Ni() {
|
|
|
114
114
|
}
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
var Z = Object.assign,
|
|
118
|
-
function
|
|
117
|
+
var Z = Object.assign, ae = 0, B, Ne, De, x, w, K, fe;
|
|
118
|
+
function ie() {
|
|
119
119
|
}
|
|
120
|
-
|
|
121
|
-
function
|
|
120
|
+
ie.__reactDisabledLog = !0;
|
|
121
|
+
function $() {
|
|
122
122
|
{
|
|
123
|
-
if (
|
|
124
|
-
B = console.log,
|
|
123
|
+
if (ae === 0) {
|
|
124
|
+
B = console.log, Ne = console.info, De = console.warn, x = console.error, w = console.group, K = console.groupCollapsed, fe = console.groupEnd;
|
|
125
125
|
var a = {
|
|
126
126
|
configurable: !0,
|
|
127
127
|
enumerable: !0,
|
|
128
|
-
value:
|
|
128
|
+
value: ie,
|
|
129
129
|
writable: !0
|
|
130
130
|
};
|
|
131
131
|
Object.defineProperties(console, {
|
|
@@ -138,12 +138,12 @@ function Ni() {
|
|
|
138
138
|
groupEnd: a
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
ae++;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Ee() {
|
|
145
145
|
{
|
|
146
|
-
if (
|
|
146
|
+
if (ae--, ae === 0) {
|
|
147
147
|
var a = {
|
|
148
148
|
configurable: !0,
|
|
149
149
|
enumerable: !0,
|
|
@@ -154,10 +154,10 @@ function Ni() {
|
|
|
154
154
|
value: B
|
|
155
155
|
}),
|
|
156
156
|
info: Z({}, a, {
|
|
157
|
-
value:
|
|
157
|
+
value: Ne
|
|
158
158
|
}),
|
|
159
159
|
warn: Z({}, a, {
|
|
160
|
-
value:
|
|
160
|
+
value: De
|
|
161
161
|
}),
|
|
162
162
|
error: Z({}, a, {
|
|
163
163
|
value: x
|
|
@@ -169,46 +169,46 @@ function Ni() {
|
|
|
169
169
|
value: K
|
|
170
170
|
}),
|
|
171
171
|
groupEnd: Z({}, a, {
|
|
172
|
-
value:
|
|
172
|
+
value: fe
|
|
173
173
|
})
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
ae < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
var se =
|
|
179
|
+
var se = p.ReactCurrentDispatcher, j;
|
|
180
180
|
function ue(a, f, C) {
|
|
181
181
|
{
|
|
182
|
-
if (
|
|
182
|
+
if (j === void 0)
|
|
183
183
|
try {
|
|
184
184
|
throw Error();
|
|
185
185
|
} catch (E) {
|
|
186
186
|
var v = E.stack.trim().match(/\n( *(at )?)/);
|
|
187
|
-
|
|
187
|
+
j = v && v[1] || "";
|
|
188
188
|
}
|
|
189
189
|
return `
|
|
190
|
-
` +
|
|
190
|
+
` + j + a;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
var
|
|
193
|
+
var le = !1, Le;
|
|
194
194
|
{
|
|
195
|
-
var
|
|
196
|
-
|
|
195
|
+
var Ya = typeof WeakMap == "function" ? WeakMap : Map;
|
|
196
|
+
Le = new Ya();
|
|
197
197
|
}
|
|
198
198
|
function la(a, f) {
|
|
199
|
-
if (!a ||
|
|
199
|
+
if (!a || le)
|
|
200
200
|
return "";
|
|
201
201
|
{
|
|
202
|
-
var C =
|
|
202
|
+
var C = Le.get(a);
|
|
203
203
|
if (C !== void 0)
|
|
204
204
|
return C;
|
|
205
205
|
}
|
|
206
206
|
var v;
|
|
207
|
-
|
|
207
|
+
le = !0;
|
|
208
208
|
var E = Error.prepareStackTrace;
|
|
209
209
|
Error.prepareStackTrace = void 0;
|
|
210
210
|
var G;
|
|
211
|
-
G = se.current, se.current = null,
|
|
211
|
+
G = se.current, se.current = null, $();
|
|
212
212
|
try {
|
|
213
213
|
if (f) {
|
|
214
214
|
var S = function() {
|
|
@@ -254,65 +254,65 @@ function Ni() {
|
|
|
254
254
|
if (R--, P--, P < 0 || k[R] !== F[P]) {
|
|
255
255
|
var z = `
|
|
256
256
|
` + k[R].replace(" at new ", " at ");
|
|
257
|
-
return a.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", a.displayName)), typeof a == "function" &&
|
|
257
|
+
return a.displayName && z.includes("<anonymous>") && (z = z.replace("<anonymous>", a.displayName)), typeof a == "function" && Le.set(a, z), z;
|
|
258
258
|
}
|
|
259
259
|
while (R >= 1 && P >= 0);
|
|
260
260
|
break;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
} finally {
|
|
264
|
-
|
|
264
|
+
le = !1, se.current = G, Ee(), Error.prepareStackTrace = E;
|
|
265
265
|
}
|
|
266
|
-
var ge = a ? a.displayName || a.name : "",
|
|
267
|
-
return typeof a == "function" &&
|
|
266
|
+
var ge = a ? a.displayName || a.name : "", te = ge ? ue(ge) : "";
|
|
267
|
+
return typeof a == "function" && Le.set(a, te), te;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function qa(a, f, C) {
|
|
270
270
|
return la(a, !1);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Xa(a) {
|
|
273
273
|
var f = a.prototype;
|
|
274
274
|
return !!(f && f.isReactComponent);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Ge(a, f, C) {
|
|
277
277
|
if (a == null)
|
|
278
278
|
return "";
|
|
279
279
|
if (typeof a == "function")
|
|
280
|
-
return la(a,
|
|
280
|
+
return la(a, Xa(a));
|
|
281
281
|
if (typeof a == "string")
|
|
282
282
|
return ue(a);
|
|
283
283
|
switch (a) {
|
|
284
284
|
case c:
|
|
285
285
|
return ue("Suspense");
|
|
286
|
-
case
|
|
286
|
+
case m:
|
|
287
287
|
return ue("SuspenseList");
|
|
288
288
|
}
|
|
289
289
|
if (typeof a == "object")
|
|
290
290
|
switch (a.$$typeof) {
|
|
291
291
|
case r:
|
|
292
|
-
return
|
|
292
|
+
return qa(a.render);
|
|
293
293
|
case i:
|
|
294
|
-
return
|
|
294
|
+
return Ge(a.type, f, C);
|
|
295
295
|
case g: {
|
|
296
296
|
var v = a, E = v._payload, G = v._init;
|
|
297
297
|
try {
|
|
298
|
-
return
|
|
298
|
+
return Ge(G(E), f, C);
|
|
299
299
|
} catch {
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
return "";
|
|
304
304
|
}
|
|
305
|
-
var
|
|
306
|
-
function
|
|
305
|
+
var Ue = Object.prototype.hasOwnProperty, ta = {}, na = p.ReactDebugCurrentFrame;
|
|
306
|
+
function Me(a) {
|
|
307
307
|
if (a) {
|
|
308
|
-
var f = a._owner, C =
|
|
308
|
+
var f = a._owner, C = Ge(a.type, a._source, f ? f.type : null);
|
|
309
309
|
na.setExtraStackFrame(C);
|
|
310
310
|
} else
|
|
311
311
|
na.setExtraStackFrame(null);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function $a(a, f, C, v, E) {
|
|
314
314
|
{
|
|
315
|
-
var G = Function.call.bind(
|
|
315
|
+
var G = Function.call.bind(Ue);
|
|
316
316
|
for (var S in a)
|
|
317
317
|
if (G(a, S)) {
|
|
318
318
|
var k = void 0;
|
|
@@ -325,21 +325,21 @@ function Ni() {
|
|
|
325
325
|
} catch (R) {
|
|
326
326
|
k = R;
|
|
327
327
|
}
|
|
328
|
-
k && !(k instanceof Error) && (
|
|
328
|
+
k && !(k instanceof Error) && (Me(E), T("%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).", v || "React class", C, S, typeof k), Me(null)), k instanceof Error && !(k.message in ta) && (ta[k.message] = !0, Me(E), T("Failed %s type: %s", C, k.message), Me(null));
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
var
|
|
333
|
-
function
|
|
334
|
-
return
|
|
332
|
+
var ei = Array.isArray;
|
|
333
|
+
function We(a) {
|
|
334
|
+
return ei(a);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function ai(a) {
|
|
337
337
|
{
|
|
338
338
|
var f = typeof Symbol == "function" && Symbol.toStringTag, C = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
|
339
339
|
return C;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function ii(a) {
|
|
343
343
|
try {
|
|
344
344
|
return ma(a), !1;
|
|
345
345
|
} catch {
|
|
@@ -350,35 +350,35 @@ function Ni() {
|
|
|
350
350
|
return "" + a;
|
|
351
351
|
}
|
|
352
352
|
function ra(a) {
|
|
353
|
-
if (
|
|
354
|
-
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
353
|
+
if (ii(a))
|
|
354
|
+
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ai(a)), ma(a);
|
|
355
355
|
}
|
|
356
|
-
var oa =
|
|
356
|
+
var oa = p.ReactCurrentOwner, li = {
|
|
357
357
|
key: !0,
|
|
358
358
|
ref: !0,
|
|
359
359
|
__self: !0,
|
|
360
360
|
__source: !0
|
|
361
361
|
}, sa, ua;
|
|
362
|
-
function
|
|
363
|
-
if (
|
|
362
|
+
function ti(a) {
|
|
363
|
+
if (Ue.call(a, "ref")) {
|
|
364
364
|
var f = Object.getOwnPropertyDescriptor(a, "ref").get;
|
|
365
365
|
if (f && f.isReactWarning)
|
|
366
366
|
return !1;
|
|
367
367
|
}
|
|
368
368
|
return a.ref !== void 0;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
if (
|
|
370
|
+
function ni(a) {
|
|
371
|
+
if (Ue.call(a, "key")) {
|
|
372
372
|
var f = Object.getOwnPropertyDescriptor(a, "key").get;
|
|
373
373
|
if (f && f.isReactWarning)
|
|
374
374
|
return !1;
|
|
375
375
|
}
|
|
376
376
|
return a.key !== void 0;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function mi(a, f) {
|
|
379
379
|
typeof a.ref == "string" && oa.current;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function ri(a, f) {
|
|
382
382
|
{
|
|
383
383
|
var C = function() {
|
|
384
384
|
sa || (sa = !0, T("%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)", f));
|
|
@@ -389,7 +389,7 @@ function Ni() {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function oi(a, f) {
|
|
393
393
|
{
|
|
394
394
|
var C = function() {
|
|
395
395
|
ua || (ua = !0, T("%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)", f));
|
|
@@ -400,10 +400,10 @@ function Ni() {
|
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
var
|
|
403
|
+
var si = function(a, f, C, v, E, G, S) {
|
|
404
404
|
var k = {
|
|
405
405
|
// This tag allows us to uniquely identify this as a React Element
|
|
406
|
-
$$typeof:
|
|
406
|
+
$$typeof: n,
|
|
407
407
|
// Built-in properties that belong on the element
|
|
408
408
|
type: a,
|
|
409
409
|
key: f,
|
|
@@ -429,12 +429,12 @@ function Ni() {
|
|
|
429
429
|
value: E
|
|
430
430
|
}), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
|
|
431
431
|
};
|
|
432
|
-
function
|
|
432
|
+
function ui(a, f, C, v, E) {
|
|
433
433
|
{
|
|
434
434
|
var G, S = {}, k = null, F = null;
|
|
435
|
-
C !== void 0 && (ra(C), k = "" + C),
|
|
435
|
+
C !== void 0 && (ra(C), k = "" + C), ni(f) && (ra(f.key), k = "" + f.key), ti(f) && (F = f.ref, mi(f, E));
|
|
436
436
|
for (G in f)
|
|
437
|
-
|
|
437
|
+
Ue.call(f, G) && !li.hasOwnProperty(G) && (S[G] = f[G]);
|
|
438
438
|
if (a && a.defaultProps) {
|
|
439
439
|
var R = a.defaultProps;
|
|
440
440
|
for (G in R)
|
|
@@ -442,28 +442,28 @@ function Ni() {
|
|
|
442
442
|
}
|
|
443
443
|
if (k || F) {
|
|
444
444
|
var P = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
|
445
|
-
k &&
|
|
445
|
+
k && ri(S, P), F && oi(S, P);
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return si(a, k, F, E, v, oa.current, S);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
var
|
|
450
|
+
var Je = p.ReactCurrentOwner, pa = p.ReactDebugCurrentFrame;
|
|
451
451
|
function pe(a) {
|
|
452
452
|
if (a) {
|
|
453
|
-
var f = a._owner, C =
|
|
453
|
+
var f = a._owner, C = Ge(a.type, a._source, f ? f.type : null);
|
|
454
454
|
pa.setExtraStackFrame(C);
|
|
455
455
|
} else
|
|
456
456
|
pa.setExtraStackFrame(null);
|
|
457
457
|
}
|
|
458
|
-
var
|
|
459
|
-
|
|
460
|
-
function
|
|
461
|
-
return typeof a == "object" && a !== null && a.$$typeof ===
|
|
458
|
+
var ze;
|
|
459
|
+
ze = !1;
|
|
460
|
+
function Ze(a) {
|
|
461
|
+
return typeof a == "object" && a !== null && a.$$typeof === n;
|
|
462
462
|
}
|
|
463
463
|
function ga() {
|
|
464
464
|
{
|
|
465
|
-
if (
|
|
466
|
-
var a = H(
|
|
465
|
+
if (Je.current) {
|
|
466
|
+
var a = H(Je.current.type);
|
|
467
467
|
if (a)
|
|
468
468
|
return `
|
|
469
469
|
|
|
@@ -472,11 +472,11 @@ Check the render method of \`` + a + "`.";
|
|
|
472
472
|
return "";
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function pi(a) {
|
|
476
476
|
return "";
|
|
477
477
|
}
|
|
478
478
|
var da = {};
|
|
479
|
-
function
|
|
479
|
+
function gi(a) {
|
|
480
480
|
{
|
|
481
481
|
var f = ga();
|
|
482
482
|
if (!f) {
|
|
@@ -493,34 +493,34 @@ Check the top-level render call using <` + C + ">.");
|
|
|
493
493
|
if (!a._store || a._store.validated || a.key != null)
|
|
494
494
|
return;
|
|
495
495
|
a._store.validated = !0;
|
|
496
|
-
var C =
|
|
496
|
+
var C = gi(f);
|
|
497
497
|
if (da[C])
|
|
498
498
|
return;
|
|
499
499
|
da[C] = !0;
|
|
500
500
|
var v = "";
|
|
501
|
-
a && a._owner && a._owner !==
|
|
501
|
+
a && a._owner && a._owner !== Je.current && (v = " It was passed a child from " + H(a._owner.type) + "."), pe(a), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, v), pe(null);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
504
|
function _a(a, f) {
|
|
505
505
|
{
|
|
506
506
|
if (typeof a != "object")
|
|
507
507
|
return;
|
|
508
|
-
if (
|
|
508
|
+
if (We(a))
|
|
509
509
|
for (var C = 0; C < a.length; C++) {
|
|
510
510
|
var v = a[C];
|
|
511
|
-
|
|
511
|
+
Ze(v) && ca(v, f);
|
|
512
512
|
}
|
|
513
|
-
else if (
|
|
513
|
+
else if (Ze(a))
|
|
514
514
|
a._store && (a._store.validated = !0);
|
|
515
515
|
else if (a) {
|
|
516
516
|
var E = b(a);
|
|
517
517
|
if (typeof E == "function" && E !== a.entries)
|
|
518
518
|
for (var G = E.call(a), S; !(S = G.next()).done; )
|
|
519
|
-
|
|
519
|
+
Ze(S.value) && ca(S.value, f);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function di(a) {
|
|
524
524
|
{
|
|
525
525
|
var f = a.type;
|
|
526
526
|
if (f == null || typeof f == "string")
|
|
@@ -536,16 +536,16 @@ Check the top-level render call using <` + C + ">.");
|
|
|
536
536
|
return;
|
|
537
537
|
if (C) {
|
|
538
538
|
var v = H(f);
|
|
539
|
-
|
|
540
|
-
} else if (f.PropTypes !== void 0 && !
|
|
541
|
-
|
|
539
|
+
$a(C, a.props, "prop", v, a);
|
|
540
|
+
} else if (f.PropTypes !== void 0 && !ze) {
|
|
541
|
+
ze = !0;
|
|
542
542
|
var E = H(f);
|
|
543
543
|
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
|
|
544
544
|
}
|
|
545
545
|
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function ci(a) {
|
|
549
549
|
{
|
|
550
550
|
for (var f = Object.keys(a.props), C = 0; C < f.length; C++) {
|
|
551
551
|
var v = f[C];
|
|
@@ -560,23 +560,23 @@ Check the top-level render call using <` + C + ">.");
|
|
|
560
560
|
var fa = {};
|
|
561
561
|
function Ua(a, f, C, v, E, G) {
|
|
562
562
|
{
|
|
563
|
-
var S =
|
|
563
|
+
var S = Fe(a);
|
|
564
564
|
if (!S) {
|
|
565
565
|
var k = "";
|
|
566
566
|
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
567
|
-
var F =
|
|
567
|
+
var F = pi();
|
|
568
568
|
F ? k += F : k += ga();
|
|
569
569
|
var R;
|
|
570
|
-
a === null ? R = "null" :
|
|
570
|
+
a === null ? R = "null" : We(a) ? R = "array" : a !== void 0 && a.$$typeof === n ? (R = "<" + (H(a.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : R = typeof a, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, k);
|
|
571
571
|
}
|
|
572
|
-
var P =
|
|
572
|
+
var P = ui(a, f, C, E, G);
|
|
573
573
|
if (P == null)
|
|
574
574
|
return P;
|
|
575
575
|
if (S) {
|
|
576
576
|
var z = f.children;
|
|
577
577
|
if (z !== void 0)
|
|
578
578
|
if (v)
|
|
579
|
-
if (
|
|
579
|
+
if (We(z)) {
|
|
580
580
|
for (var ge = 0; ge < z.length; ge++)
|
|
581
581
|
_a(z[ge], a);
|
|
582
582
|
Object.freeze && Object.freeze(z);
|
|
@@ -585,196 +585,196 @@ Check the top-level render call using <` + C + ">.");
|
|
|
585
585
|
else
|
|
586
586
|
_a(z, a);
|
|
587
587
|
}
|
|
588
|
-
if (
|
|
589
|
-
var
|
|
590
|
-
return
|
|
591
|
-
}),
|
|
592
|
-
if (!fa[
|
|
593
|
-
var
|
|
588
|
+
if (Ue.call(f, "key")) {
|
|
589
|
+
var te = H(a), W = Object.keys(f).filter(function(Ti) {
|
|
590
|
+
return Ti !== "key";
|
|
591
|
+
}), Ve = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
592
|
+
if (!fa[te + Ve]) {
|
|
593
|
+
var bi = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
|
594
594
|
T(`A props object containing a "key" prop is being spread into JSX:
|
|
595
595
|
let props = %s;
|
|
596
596
|
<%s {...props} />
|
|
597
597
|
React keys must be passed directly to JSX without using spread:
|
|
598
598
|
let props = %s;
|
|
599
|
-
<%s key={someKey} {...props} />`,
|
|
599
|
+
<%s key={someKey} {...props} />`, Ve, te, bi, te), fa[te + Ve] = !0;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return a ===
|
|
602
|
+
return a === s ? ci(P) : di(P), P;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function _i(a, f, C) {
|
|
606
606
|
return Ua(a, f, C, !0);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
608
|
+
function fi(a, f, C) {
|
|
609
609
|
return Ua(a, f, C, !1);
|
|
610
610
|
}
|
|
611
|
-
var
|
|
612
|
-
|
|
613
|
-
})()),
|
|
611
|
+
var Ui = fi, yi = _i;
|
|
612
|
+
be.Fragment = s, be.jsx = Ui, be.jsxs = yi;
|
|
613
|
+
})()), be;
|
|
614
614
|
}
|
|
615
615
|
var Ca;
|
|
616
|
-
function
|
|
617
|
-
return Ca || (Ca = 1, process.env.NODE_ENV === "production" ?
|
|
616
|
+
function Ei() {
|
|
617
|
+
return Ca || (Ca = 1, process.env.NODE_ENV === "production" ? Pe.exports = Ni() : Pe.exports = Di()), Pe.exports;
|
|
618
618
|
}
|
|
619
|
-
var
|
|
620
|
-
const
|
|
621
|
-
const e = Wa(
|
|
619
|
+
var Oe = Ei();
|
|
620
|
+
const Za = Fa(null), ke = () => {
|
|
621
|
+
const e = Wa(Za);
|
|
622
622
|
if (!e)
|
|
623
623
|
throw new Error("useApiContext must be used within ApiProvider");
|
|
624
624
|
return e;
|
|
625
625
|
};
|
|
626
|
-
function
|
|
626
|
+
function Li({
|
|
627
627
|
baseURL: e,
|
|
628
|
-
getToken:
|
|
628
|
+
getToken: n,
|
|
629
629
|
timeoutMs: d = 15e3,
|
|
630
|
-
lng:
|
|
631
|
-
store:
|
|
632
|
-
onError:
|
|
630
|
+
lng: s = "tw",
|
|
631
|
+
store: o,
|
|
632
|
+
onError: u
|
|
633
633
|
} = {}) {
|
|
634
|
-
const U =
|
|
634
|
+
const U = hi.create({
|
|
635
635
|
baseURL: e,
|
|
636
636
|
timeout: d,
|
|
637
637
|
headers: { "Content-Type": "application/json" }
|
|
638
638
|
});
|
|
639
639
|
return U.interceptors.request.use(async (_) => {
|
|
640
|
-
if (_.headers = _.headers || {},
|
|
641
|
-
const c = await
|
|
640
|
+
if (_.headers = _.headers || {}, n) {
|
|
641
|
+
const c = await n();
|
|
642
642
|
c && (_.headers.Authorization = `Bearer ${c}`);
|
|
643
643
|
}
|
|
644
|
-
const r =
|
|
645
|
-
return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang =
|
|
644
|
+
const r = o?.getState()?.isWalletCurrency || "TWD";
|
|
645
|
+
return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang = s, _;
|
|
646
646
|
}), U.interceptors.response.use(
|
|
647
647
|
(_) => _.data,
|
|
648
|
-
(_) =>
|
|
648
|
+
(_) => u ? u(_, { instance: U }) : Promise.reject(_)
|
|
649
649
|
), U;
|
|
650
650
|
}
|
|
651
|
-
const
|
|
652
|
-
const e = Wa(
|
|
651
|
+
const Va = Fa(null), pl = () => {
|
|
652
|
+
const e = Wa(Va);
|
|
653
653
|
if (!e)
|
|
654
654
|
throw new Error(
|
|
655
655
|
"useGameInfoContext must be used within a GameInfoCtx.Provider"
|
|
656
656
|
);
|
|
657
657
|
return e;
|
|
658
|
-
},
|
|
659
|
-
const e = (
|
|
658
|
+
}, gl = () => {
|
|
659
|
+
const e = (s, o) => !s && !o, n = (s) => s.startsWith("pc.");
|
|
660
660
|
return {
|
|
661
661
|
executeLogout: ({
|
|
662
|
-
isCallBackInvalid:
|
|
663
|
-
hostname:
|
|
664
|
-
shouldRedirect:
|
|
662
|
+
isCallBackInvalid: s = !1,
|
|
663
|
+
hostname: o = "",
|
|
664
|
+
shouldRedirect: u,
|
|
665
665
|
onShowError: U,
|
|
666
666
|
onCleanup: _,
|
|
667
667
|
onRemoveToken: r,
|
|
668
668
|
onRedirect: c,
|
|
669
|
-
onGoogleLogout:
|
|
669
|
+
onGoogleLogout: m
|
|
670
670
|
}) => {
|
|
671
|
-
const i =
|
|
672
|
-
e(
|
|
671
|
+
const i = n(o);
|
|
672
|
+
e(s, i) && U?.(), _?.(), r?.(), u && c?.("/"), m?.();
|
|
673
673
|
},
|
|
674
674
|
shouldShowErrorNotice: e,
|
|
675
|
-
isMachineDomain:
|
|
675
|
+
isMachineDomain: n
|
|
676
676
|
};
|
|
677
|
-
},
|
|
678
|
-
const
|
|
679
|
-
return
|
|
680
|
-
}, {}),
|
|
677
|
+
}, Ia = (e = [], n) => Ye(e, { gameTypeName: n })?.gameTypeUid, Aa = (e = [], n) => Ye(e, { platform: n })?.platformUid, Ba = (e = [], n) => Ye(e, { SubPlatformEnum: n }), Ka = (e = [], n, d) => O(e) ? [] : e.filter((s) => d ? String(s?.SubPlatformEnumUid) === String(d?.SubPlatformEnumUid) : String(s.platformUid) === String(n)), Gi = (e = []) => O(e) ? {} : e.reduce((n, d) => {
|
|
678
|
+
const s = d?.game_subtype || "UNKNOWN";
|
|
679
|
+
return n[s] || (n[s] = []), n[s].push(d), n;
|
|
680
|
+
}, {}), Mi = ({
|
|
681
681
|
gameTypeName: e,
|
|
682
|
-
platforms:
|
|
682
|
+
platforms: n,
|
|
683
683
|
gameList: d,
|
|
684
|
-
allGameTypes:
|
|
685
|
-
allPlatforms:
|
|
684
|
+
allGameTypes: s,
|
|
685
|
+
allPlatforms: o
|
|
686
686
|
}) => {
|
|
687
|
-
const
|
|
688
|
-
return
|
|
689
|
-
const r =
|
|
690
|
-
|
|
687
|
+
const u = Ia(s, e);
|
|
688
|
+
return u ? n.reduce((U, _) => {
|
|
689
|
+
const r = Aa(o, _), c = Ba(o, _), m = d[u] || [], i = Ka(
|
|
690
|
+
m,
|
|
691
691
|
r,
|
|
692
692
|
c
|
|
693
693
|
);
|
|
694
694
|
return O(i) || (U[_] = i), U;
|
|
695
695
|
}, {}) : {};
|
|
696
|
-
},
|
|
696
|
+
}, Ri = ({
|
|
697
697
|
platformName: e,
|
|
698
|
-
gamesOfType:
|
|
698
|
+
gamesOfType: n = [],
|
|
699
699
|
allPlatforms: d = []
|
|
700
700
|
}) => {
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
701
|
+
const s = Aa(d, e), o = Ba(d, e), u = Ka(
|
|
702
|
+
n,
|
|
703
|
+
s,
|
|
704
|
+
o
|
|
705
705
|
);
|
|
706
|
-
return
|
|
707
|
-
},
|
|
708
|
-
const
|
|
709
|
-
return
|
|
710
|
-
d[
|
|
711
|
-
}),
|
|
712
|
-
}, {}),
|
|
706
|
+
return Gi(u);
|
|
707
|
+
}, Pi = (e = {}) => !He(e) || O(e) ? [] : qe(e), va = (e = []) => !ee(e) || O(e) ? [] : we(e, "platform"), xi = (e = []) => !ee(e) || O(e) ? [] : we(e, "gameTypeName"), Oi = (e = []) => !ee(e) || O(e) ? [] : we(e, "game_subtype"), Hi = (e = {}) => !He(e) || O(e) ? [] : qe(e), wi = (e = [], n = []) => !ee(e) || O(e) ? {} : !ee(n) || O(n) ? {} : e.reduce((d, s) => {
|
|
708
|
+
const o = n.map((u) => u.game_subtype);
|
|
709
|
+
return o.forEach((u) => {
|
|
710
|
+
d[u] = d[u] || [];
|
|
711
|
+
}), o.includes(s.game_subtype) && d[s.game_subtype].push(s), d;
|
|
712
|
+
}, {}), Fi = ({
|
|
713
713
|
gameTypes: e = [],
|
|
714
|
-
platforms:
|
|
714
|
+
platforms: n = [],
|
|
715
715
|
gameList: d = {},
|
|
716
|
-
allGameTypes:
|
|
717
|
-
allPlatforms:
|
|
718
|
-
}) =>
|
|
719
|
-
const _ =
|
|
716
|
+
allGameTypes: s = [],
|
|
717
|
+
allPlatforms: o = []
|
|
718
|
+
}) => !ee(e) || !ee(n) ? {} : O(d) ? {} : e.reduce((u, U) => {
|
|
719
|
+
const _ = Mi({
|
|
720
720
|
gameTypeName: U,
|
|
721
|
-
platforms:
|
|
721
|
+
platforms: n,
|
|
722
722
|
gameList: d,
|
|
723
|
-
allGameTypes:
|
|
724
|
-
allPlatforms:
|
|
723
|
+
allGameTypes: s,
|
|
724
|
+
allPlatforms: o
|
|
725
725
|
});
|
|
726
|
-
return O(_) || (
|
|
727
|
-
}, {}),
|
|
726
|
+
return O(_) || (u[U] = _), u;
|
|
727
|
+
}, {}), dl = ({
|
|
728
728
|
types: e = [],
|
|
729
|
-
platforms:
|
|
729
|
+
platforms: n = [],
|
|
730
730
|
allGameType: d = [],
|
|
731
|
-
allGamePlatform:
|
|
732
|
-
allGameList:
|
|
733
|
-
} = {}) => !Array.isArray(e) || !Array.isArray(
|
|
734
|
-
const _ =
|
|
735
|
-
if (!_) return
|
|
736
|
-
const r =
|
|
737
|
-
const g =
|
|
731
|
+
allGamePlatform: s = [],
|
|
732
|
+
allGameList: o = {}
|
|
733
|
+
} = {}) => !Array.isArray(e) || !Array.isArray(n) ? {} : e.reduce((u, U) => {
|
|
734
|
+
const _ = Ia(d, U);
|
|
735
|
+
if (!_) return u;
|
|
736
|
+
const r = o[_] || [], c = n.reduce((m, i) => {
|
|
737
|
+
const g = Ri({
|
|
738
738
|
platformName: i,
|
|
739
739
|
gamesOfType: r,
|
|
740
|
-
allPlatforms:
|
|
740
|
+
allPlatforms: s
|
|
741
741
|
});
|
|
742
|
-
return O(g) ?
|
|
742
|
+
return O(g) ? m : { ...m, [i]: g };
|
|
743
743
|
}, {});
|
|
744
|
-
return O(c) || (
|
|
745
|
-
}, {}),
|
|
746
|
-
d[
|
|
747
|
-
}), d), {}),
|
|
748
|
-
if (!
|
|
749
|
-
const
|
|
750
|
-
for (const [d,
|
|
751
|
-
|
|
752
|
-
for (const
|
|
753
|
-
const
|
|
754
|
-
|
|
744
|
+
return O(c) || (u[U] = c), u;
|
|
745
|
+
}, {}), Wi = (e = {}) => !He(e) || O(e) ? {} : Object.values(e).reduce((d, s) => (Object.entries(s).forEach(([o, u]) => {
|
|
746
|
+
d[o] ? d[o] = [...d[o], ...u] : d[o] = u;
|
|
747
|
+
}), d), {}), Ji = (e = {}) => {
|
|
748
|
+
if (!He(e) || O(e)) return {};
|
|
749
|
+
const n = {};
|
|
750
|
+
for (const [d, s] of Object.entries(e)) {
|
|
751
|
+
n[d] = {};
|
|
752
|
+
for (const o of s) {
|
|
753
|
+
const u = o.game_subtype;
|
|
754
|
+
n[d][u] || (n[d][u] = []), n[d][u].push(o);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
return
|
|
758
|
-
},
|
|
757
|
+
return n;
|
|
758
|
+
}, zi = ({
|
|
759
759
|
allGameList: e = {},
|
|
760
|
-
allGamePlatform:
|
|
760
|
+
allGamePlatform: n = [],
|
|
761
761
|
allGameType: d = [],
|
|
762
|
-
allGame_subtype:
|
|
763
|
-
allNewGameList:
|
|
764
|
-
allTopGameList:
|
|
762
|
+
allGame_subtype: s = [],
|
|
763
|
+
allNewGameList: o = [],
|
|
764
|
+
allTopGameList: u = [],
|
|
765
765
|
randomlySelectedGames: U = [],
|
|
766
766
|
userFavoriteGame: _ = {},
|
|
767
767
|
exclusiveBrandGames: r = [],
|
|
768
768
|
highlightGames: c = [],
|
|
769
|
-
originPlatform:
|
|
769
|
+
originPlatform: m = []
|
|
770
770
|
}) => {
|
|
771
|
-
const i =
|
|
771
|
+
const i = Pi(e), g = va(n), l = xi(d), t = Oi(s), y = va(m), b = Hi(_), p = Fi({
|
|
772
772
|
gameTypes: l,
|
|
773
773
|
platforms: g,
|
|
774
774
|
gameList: e,
|
|
775
775
|
allGameTypes: d,
|
|
776
|
-
allPlatforms:
|
|
777
|
-
}), T =
|
|
776
|
+
allPlatforms: n
|
|
777
|
+
}), T = wi(i, s), N = Wi(p), D = Ji(N);
|
|
778
778
|
return {
|
|
779
779
|
platform: {
|
|
780
780
|
all: g,
|
|
@@ -786,8 +786,8 @@ const Za = Fa(null), rl = () => {
|
|
|
786
786
|
},
|
|
787
787
|
gameList: {
|
|
788
788
|
all: i,
|
|
789
|
-
new:
|
|
790
|
-
top:
|
|
789
|
+
new: o,
|
|
790
|
+
top: u,
|
|
791
791
|
favorite: b,
|
|
792
792
|
highlight: c,
|
|
793
793
|
exclusiveBrand: r,
|
|
@@ -802,31 +802,62 @@ const Za = Fa(null), rl = () => {
|
|
|
802
802
|
favorite: b
|
|
803
803
|
}
|
|
804
804
|
};
|
|
805
|
-
},
|
|
806
|
-
...
|
|
805
|
+
}, cl = (e = []) => !ee(e) || O(e) ? [] : qe(e, (n) => O(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((d) => ({
|
|
806
|
+
...n,
|
|
807
807
|
...d,
|
|
808
808
|
platform: d.SubPlatformEnum,
|
|
809
809
|
platformEnum: d.SubPlatformEnum
|
|
810
|
-
}))),
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
810
|
+
}))), Zi = (e) => {
|
|
811
|
+
switch (e) {
|
|
812
|
+
case "tw":
|
|
813
|
+
return "zh_TW";
|
|
814
|
+
case "en":
|
|
815
|
+
return "en_US";
|
|
816
|
+
case "cn":
|
|
817
|
+
return "zh_CN";
|
|
818
|
+
case "th":
|
|
819
|
+
return "th_TH";
|
|
820
|
+
case "id":
|
|
821
|
+
return "id_ID";
|
|
822
|
+
case "vi":
|
|
823
|
+
return "vi_VN";
|
|
824
|
+
case "jp":
|
|
825
|
+
return "ja_JP";
|
|
826
|
+
default:
|
|
827
|
+
return e;
|
|
828
|
+
}
|
|
829
|
+
}, de = () => {
|
|
830
|
+
const { client: e } = ke(), n = X(
|
|
831
|
+
async (r) => {
|
|
832
|
+
const { mac_address: c = "", app_version: m = "", anydesk_id: i = "" } = r, { data: g } = await e.post("/cash-register/login", {
|
|
833
|
+
mac_address: c,
|
|
834
|
+
app_version: m,
|
|
835
|
+
anydesk_id: i
|
|
817
836
|
});
|
|
818
|
-
return
|
|
837
|
+
return g;
|
|
819
838
|
},
|
|
820
839
|
[e]
|
|
821
|
-
), d =
|
|
840
|
+
), d = X(async () => e.get("/member/getMemberInfo"), [e]), s = X(async () => await e.get("member/getGameList"), [e]), o = X(async () => await e.get("/member/getNowCurrencyExchange"), [e]), u = X(async () => await e.get("member/getFavoriteGame"), [e]), U = X(
|
|
841
|
+
async (r) => {
|
|
842
|
+
const { account: c, password: m, trans_code: i } = r;
|
|
843
|
+
return await e.post("/login", {
|
|
844
|
+
memId: c,
|
|
845
|
+
passwd: m,
|
|
846
|
+
trans_code: i
|
|
847
|
+
});
|
|
848
|
+
},
|
|
849
|
+
[e]
|
|
850
|
+
), _ = X(async () => await e.post("/logout"), [e]);
|
|
822
851
|
return {
|
|
823
|
-
machineLoginApi:
|
|
852
|
+
machineLoginApi: n,
|
|
824
853
|
userInfoApi: d,
|
|
825
|
-
userGameListApi:
|
|
826
|
-
userFavoriteGameApi:
|
|
827
|
-
userCurrencyExchangeApi:
|
|
854
|
+
userGameListApi: s,
|
|
855
|
+
userFavoriteGameApi: u,
|
|
856
|
+
userCurrencyExchangeApi: o,
|
|
857
|
+
userLoginApi: U,
|
|
858
|
+
userLogoutApi: _
|
|
828
859
|
};
|
|
829
|
-
},
|
|
860
|
+
}, Vi = {
|
|
830
861
|
platform: { all: [], origin: [] },
|
|
831
862
|
type: { main: [], sub: [] },
|
|
832
863
|
gameList: {
|
|
@@ -844,24 +875,19 @@ const Za = Fa(null), rl = () => {
|
|
|
844
875
|
byPlatformAndCategory: {}
|
|
845
876
|
},
|
|
846
877
|
user: { favorite: [] }
|
|
847
|
-
},
|
|
848
|
-
const {
|
|
878
|
+
}, Ii = ({ enabled: e = !0 } = {}) => {
|
|
879
|
+
const { userFavoriteGameApi: n } = de(), { data: d, isLoading: s, error: o, refetch: u } = oe({
|
|
849
880
|
queryKey: ["gamesInfo"],
|
|
850
881
|
queryFn: async () => {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
await m?.() && (_ = await d());
|
|
854
|
-
} catch (r) {
|
|
855
|
-
console.warn("Failed to fetch favorite games:", r);
|
|
856
|
-
}
|
|
857
|
-
return Ji({
|
|
882
|
+
const U = await n();
|
|
883
|
+
return zi({
|
|
858
884
|
allGameList: window.gameTypeGroup || {},
|
|
859
885
|
allGamePlatform: window.platforms || [],
|
|
860
886
|
allGameType: window.gameType || [],
|
|
861
887
|
allGame_subtype: window.gameSubType || [],
|
|
862
888
|
allNewGameList: window.newGames || [],
|
|
863
889
|
allTopGameList: window.topGames || [],
|
|
864
|
-
userFavoriteGame:
|
|
890
|
+
userFavoriteGame: U || {},
|
|
865
891
|
randomlySelectedGames: window.randomlySelectedGames || [],
|
|
866
892
|
exclusiveBrandGames: window.exclusiveBrandGames || [],
|
|
867
893
|
highlightGames: window.highlightGames || [],
|
|
@@ -877,17 +903,13 @@ const Za = Fa(null), rl = () => {
|
|
|
877
903
|
refetchOnWindowFocus: !1
|
|
878
904
|
});
|
|
879
905
|
return {
|
|
880
|
-
gamesInfo:
|
|
906
|
+
gamesInfo: d || Vi,
|
|
881
907
|
isLoading: s,
|
|
882
|
-
error:
|
|
883
|
-
refetch:
|
|
908
|
+
error: o,
|
|
909
|
+
refetch: u
|
|
884
910
|
};
|
|
885
|
-
},
|
|
886
|
-
|
|
887
|
-
console.log("window.gameTypeGroup 已存在,跳過初始化 mock 資料");
|
|
888
|
-
return;
|
|
889
|
-
}
|
|
890
|
-
(e || !window.gameTypeGroup) && (window.gameTypeGroup = window.gameTypeGroup || {
|
|
911
|
+
}, Ai = (e = !1) => {
|
|
912
|
+
!e && window.gameTypeGroup || (e || !window.gameTypeGroup) && (window.gameTypeGroup = window.gameTypeGroup || {
|
|
891
913
|
1: [
|
|
892
914
|
{
|
|
893
915
|
gameUid: 8499,
|
|
@@ -27409,25 +27431,26 @@ const Za = Fa(null), rl = () => {
|
|
|
27409
27431
|
is_invalid_bet: 0
|
|
27410
27432
|
}
|
|
27411
27433
|
});
|
|
27412
|
-
},
|
|
27434
|
+
}, Bi = ({
|
|
27413
27435
|
children: e,
|
|
27414
|
-
autoFetch:
|
|
27436
|
+
autoFetch: n = !1,
|
|
27415
27437
|
mockData: d = !1
|
|
27416
27438
|
}) => {
|
|
27417
|
-
|
|
27418
|
-
d &&
|
|
27439
|
+
ve(() => {
|
|
27440
|
+
d && Ai(!0);
|
|
27419
27441
|
}, [d]);
|
|
27420
|
-
const
|
|
27421
|
-
return /* @__PURE__ */
|
|
27442
|
+
const s = Ii({ enabled: n });
|
|
27443
|
+
return /* @__PURE__ */ Oe.jsx(Va.Provider, { value: s, children: e });
|
|
27422
27444
|
};
|
|
27423
|
-
function
|
|
27445
|
+
function _l({
|
|
27424
27446
|
children: e,
|
|
27425
|
-
autoFetchGamesInfo:
|
|
27447
|
+
autoFetchGamesInfo: n = !1,
|
|
27426
27448
|
useMockData: d = !1,
|
|
27449
|
+
queryClient: s,
|
|
27427
27450
|
...o
|
|
27428
27451
|
}) {
|
|
27429
|
-
const
|
|
27430
|
-
() => new
|
|
27452
|
+
const u = Qe(() => Li(o), [o]), U = Qe(
|
|
27453
|
+
() => new Ci({
|
|
27431
27454
|
defaultOptions: {
|
|
27432
27455
|
queries: {
|
|
27433
27456
|
refetchOnWindowFocus: !1,
|
|
@@ -27436,11 +27459,11 @@ function pl({
|
|
|
27436
27459
|
}
|
|
27437
27460
|
}),
|
|
27438
27461
|
[]
|
|
27439
|
-
);
|
|
27440
|
-
return /* @__PURE__ */
|
|
27462
|
+
), _ = s || U;
|
|
27463
|
+
return /* @__PURE__ */ Oe.jsx(vi, { client: _, children: /* @__PURE__ */ Oe.jsx(Za.Provider, { value: { client: u, ...o }, children: /* @__PURE__ */ Oe.jsx(Bi, { autoFetch: n, mockData: d, children: e }) }) });
|
|
27441
27464
|
}
|
|
27442
|
-
const
|
|
27443
|
-
const { userCurrencyExchangeApi: d } =
|
|
27465
|
+
const fl = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
|
|
27466
|
+
const { userCurrencyExchangeApi: d } = de(), { getToken: s } = ke(), { enabled: o, ...u } = n, U = !!s && (o ? o.every((_) => _) : !0);
|
|
27444
27467
|
return Ja({
|
|
27445
27468
|
queries: [
|
|
27446
27469
|
{
|
|
@@ -27448,62 +27471,62 @@ const gl = ({ otherQueryKey: e = [], options: m = {} } = {}) => {
|
|
|
27448
27471
|
queryFn: () => d(),
|
|
27449
27472
|
enabled: U,
|
|
27450
27473
|
// ← 使用合併後的條件
|
|
27451
|
-
...
|
|
27474
|
+
...u
|
|
27452
27475
|
// ← 不包含 enabled
|
|
27453
27476
|
}
|
|
27454
27477
|
]
|
|
27455
27478
|
});
|
|
27456
|
-
},
|
|
27479
|
+
}, Ul = ({
|
|
27457
27480
|
refetchInterval: e = 5e4,
|
|
27458
|
-
trigger:
|
|
27481
|
+
trigger: n = [],
|
|
27459
27482
|
enabled: d = !0
|
|
27460
27483
|
} = {}) => {
|
|
27461
|
-
const { getToken:
|
|
27484
|
+
const { getToken: s } = ke(), { userInfoApi: o } = de(), u = Ja({
|
|
27462
27485
|
queries: [
|
|
27463
27486
|
{
|
|
27464
|
-
queryKey: ["getMemberInfo", ...
|
|
27465
|
-
queryFn: async () => await
|
|
27487
|
+
queryKey: ["getMemberInfo", ...n],
|
|
27488
|
+
queryFn: async () => await o(),
|
|
27466
27489
|
refetchInterval: e,
|
|
27467
|
-
enabled: !!
|
|
27490
|
+
enabled: !!s && d
|
|
27468
27491
|
}
|
|
27469
27492
|
]
|
|
27470
|
-
}), { data: U, isFetching: _, error: r } =
|
|
27493
|
+
}), { data: U, isFetching: _, error: r } = u[0] || {};
|
|
27471
27494
|
return { data: U, isFetching: _, error: r };
|
|
27472
|
-
},
|
|
27495
|
+
}, yl = ({ enabled: e = !0 } = {}) => {
|
|
27473
27496
|
const {
|
|
27474
|
-
userInfoApi:
|
|
27497
|
+
userInfoApi: n,
|
|
27475
27498
|
userFavoriteGameApi: d,
|
|
27476
|
-
userGameListApi:
|
|
27477
|
-
userCurrencyExchangeApi:
|
|
27478
|
-
} =
|
|
27499
|
+
userGameListApi: s,
|
|
27500
|
+
userCurrencyExchangeApi: o
|
|
27501
|
+
} = de(), u = oe({
|
|
27479
27502
|
queryKey: ["getMemInfo"],
|
|
27480
|
-
queryFn: async () =>
|
|
27503
|
+
queryFn: async () => n(),
|
|
27481
27504
|
enabled: e
|
|
27482
27505
|
}), U = oe({
|
|
27483
27506
|
queryKey: ["getFavoriteGame"],
|
|
27484
27507
|
queryFn: async () => d(),
|
|
27485
|
-
enabled: e &&
|
|
27508
|
+
enabled: e && u.isSuccess
|
|
27486
27509
|
}), _ = oe({
|
|
27487
27510
|
queryKey: ["getUserGameList"],
|
|
27488
|
-
queryFn: async () =>
|
|
27489
|
-
enabled: e &&
|
|
27511
|
+
queryFn: async () => s(),
|
|
27512
|
+
enabled: e && u.isSuccess && U.isSuccess
|
|
27490
27513
|
}), r = oe({
|
|
27491
27514
|
queryKey: ["getUserCurrencyExchange"],
|
|
27492
|
-
queryFn: async () =>
|
|
27493
|
-
enabled: e &&
|
|
27515
|
+
queryFn: async () => o(),
|
|
27516
|
+
enabled: e && u.isSuccess && U.isSuccess && _.isSuccess
|
|
27494
27517
|
});
|
|
27495
27518
|
return [
|
|
27496
|
-
|
|
27519
|
+
u,
|
|
27497
27520
|
U,
|
|
27498
27521
|
_,
|
|
27499
27522
|
r
|
|
27500
27523
|
];
|
|
27501
27524
|
};
|
|
27502
|
-
var
|
|
27525
|
+
var Ie = {}, J = {}, Ae = {}, ha;
|
|
27503
27526
|
function A() {
|
|
27504
27527
|
return ha || (ha = 1, (function(e) {
|
|
27505
27528
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isEventSourceSupported = e.isReactNative = e.ReadyState = e.DEFAULT_HEARTBEAT = e.UNPARSABLE_JSON_OBJECT = e.DEFAULT_RECONNECT_INTERVAL_MS = e.DEFAULT_RECONNECT_LIMIT = e.SOCKET_IO_PING_CODE = e.SOCKET_IO_PATH = e.SOCKET_IO_PING_INTERVAL = e.DEFAULT_EVENT_SOURCE_OPTIONS = e.EMPTY_EVENT_HANDLERS = e.DEFAULT_OPTIONS = void 0;
|
|
27506
|
-
var
|
|
27529
|
+
var n = 1, d = 1e3 * n;
|
|
27507
27530
|
e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
|
|
27508
27531
|
withCredentials: !1,
|
|
27509
27532
|
events: e.EMPTY_EVENT_HANDLERS
|
|
@@ -27512,216 +27535,216 @@ function A() {
|
|
|
27512
27535
|
timeout: 6e4,
|
|
27513
27536
|
interval: 25e3
|
|
27514
27537
|
};
|
|
27515
|
-
var
|
|
27516
|
-
(function(
|
|
27517
|
-
|
|
27518
|
-
})(
|
|
27519
|
-
var
|
|
27538
|
+
var s;
|
|
27539
|
+
(function(u) {
|
|
27540
|
+
u[u.UNINSTANTIATED = -1] = "UNINSTANTIATED", u[u.CONNECTING = 0] = "CONNECTING", u[u.OPEN = 1] = "OPEN", u[u.CLOSING = 2] = "CLOSING", u[u.CLOSED = 3] = "CLOSED";
|
|
27541
|
+
})(s || (e.ReadyState = s = {}));
|
|
27542
|
+
var o = function() {
|
|
27520
27543
|
try {
|
|
27521
27544
|
return "EventSource" in globalThis;
|
|
27522
27545
|
} catch {
|
|
27523
27546
|
return !1;
|
|
27524
27547
|
}
|
|
27525
27548
|
};
|
|
27526
|
-
e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative &&
|
|
27527
|
-
})(
|
|
27549
|
+
e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && o();
|
|
27550
|
+
})(Ae)), Ae;
|
|
27528
27551
|
}
|
|
27529
|
-
var
|
|
27552
|
+
var Te = {}, Be = {}, ka;
|
|
27530
27553
|
function Xe() {
|
|
27531
27554
|
return ka || (ka = 1, (function(e) {
|
|
27532
27555
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
|
|
27533
|
-
var
|
|
27556
|
+
var n = function(d) {
|
|
27534
27557
|
if (d && e.sharedWebSockets.hasOwnProperty(d))
|
|
27535
27558
|
delete e.sharedWebSockets[d];
|
|
27536
27559
|
else
|
|
27537
|
-
for (var
|
|
27538
|
-
e.sharedWebSockets.hasOwnProperty(
|
|
27560
|
+
for (var s in e.sharedWebSockets)
|
|
27561
|
+
e.sharedWebSockets.hasOwnProperty(s) && delete e.sharedWebSockets[s];
|
|
27539
27562
|
};
|
|
27540
|
-
e.resetWebSockets =
|
|
27541
|
-
})(
|
|
27563
|
+
e.resetWebSockets = n;
|
|
27564
|
+
})(Be)), Be;
|
|
27542
27565
|
}
|
|
27543
|
-
var
|
|
27566
|
+
var ne = {}, Q = {}, Sa;
|
|
27544
27567
|
function $e() {
|
|
27545
|
-
if (Sa) return
|
|
27546
|
-
Sa = 1, Object.defineProperty(
|
|
27547
|
-
var e = A(),
|
|
27548
|
-
if (
|
|
27549
|
-
var
|
|
27568
|
+
if (Sa) return Q;
|
|
27569
|
+
Sa = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.setUpSocketIOPing = Q.appendQueryParams = Q.parseSocketIOUrl = void 0;
|
|
27570
|
+
var e = A(), n = function(o) {
|
|
27571
|
+
if (o) {
|
|
27572
|
+
var u = /^https|wss/.test(o), U = o.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), r = u ? "wss" : "ws";
|
|
27550
27573
|
return "".concat(r, "://").concat(_).concat(e.SOCKET_IO_PATH);
|
|
27551
|
-
} else if (
|
|
27552
|
-
var
|
|
27574
|
+
} else if (o === "") {
|
|
27575
|
+
var u = /^https/.test(window.location.protocol), r = u ? "wss" : "ws", c = window.location.port ? ":".concat(window.location.port) : "";
|
|
27553
27576
|
return "".concat(r, "://").concat(window.location.hostname).concat(c).concat(e.SOCKET_IO_PATH);
|
|
27554
27577
|
}
|
|
27555
|
-
return
|
|
27578
|
+
return o;
|
|
27556
27579
|
};
|
|
27557
|
-
|
|
27558
|
-
var d = function(
|
|
27559
|
-
|
|
27560
|
-
var U = /\?([\w]+=[\w]+)/, _ = U.test(
|
|
27561
|
-
var i =
|
|
27580
|
+
Q.parseSocketIOUrl = n;
|
|
27581
|
+
var d = function(o, u) {
|
|
27582
|
+
u === void 0 && (u = {});
|
|
27583
|
+
var U = /\?([\w]+=[\w]+)/, _ = U.test(o), r = "".concat(Object.entries(u).reduce(function(c, m) {
|
|
27584
|
+
var i = m[0], g = m[1];
|
|
27562
27585
|
return c + "".concat(i, "=").concat(g, "&");
|
|
27563
27586
|
}, "").slice(0, -1));
|
|
27564
|
-
return "".concat(
|
|
27587
|
+
return "".concat(o).concat(_ ? "&" : "?").concat(r);
|
|
27565
27588
|
};
|
|
27566
|
-
|
|
27567
|
-
var
|
|
27568
|
-
|
|
27589
|
+
Q.appendQueryParams = d;
|
|
27590
|
+
var s = function(o, u) {
|
|
27591
|
+
u === void 0 && (u = e.SOCKET_IO_PING_INTERVAL);
|
|
27569
27592
|
var U = function() {
|
|
27570
|
-
return
|
|
27593
|
+
return o(e.SOCKET_IO_PING_CODE);
|
|
27571
27594
|
};
|
|
27572
|
-
return window.setInterval(U,
|
|
27595
|
+
return window.setInterval(U, u);
|
|
27573
27596
|
};
|
|
27574
|
-
return
|
|
27597
|
+
return Q.setUpSocketIOPing = s, Q;
|
|
27575
27598
|
}
|
|
27576
|
-
var
|
|
27577
|
-
function
|
|
27578
|
-
if (Na) return
|
|
27579
|
-
Na = 1, Object.defineProperty(
|
|
27599
|
+
var xe = {}, Na;
|
|
27600
|
+
function ja() {
|
|
27601
|
+
if (Na) return xe;
|
|
27602
|
+
Na = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.heartbeat = d;
|
|
27580
27603
|
var e = A();
|
|
27581
|
-
function
|
|
27582
|
-
return Array.isArray(
|
|
27583
|
-
return
|
|
27584
|
-
}).current :
|
|
27604
|
+
function n(s) {
|
|
27605
|
+
return Array.isArray(s) ? s.reduce(function(o, u) {
|
|
27606
|
+
return o.current > u.current ? o : u;
|
|
27607
|
+
}).current : s.current;
|
|
27585
27608
|
}
|
|
27586
|
-
function d(
|
|
27587
|
-
var U =
|
|
27588
|
-
var b = Date.now(),
|
|
27589
|
-
if (
|
|
27590
|
-
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b -
|
|
27591
|
-
else if (
|
|
27609
|
+
function d(s, o, u) {
|
|
27610
|
+
var U = u || {}, _ = U.interval, r = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, c = U.timeout, m = c === void 0 ? e.DEFAULT_HEARTBEAT.timeout : c, i = U.message, g = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, r / 10), t = Date.now(), y = setInterval(function() {
|
|
27611
|
+
var b = Date.now(), p = n(o);
|
|
27612
|
+
if (p + m <= b)
|
|
27613
|
+
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - p, "ms ago, last ping sent ").concat(b - t, "ms ago")), s.close();
|
|
27614
|
+
else if (p + r <= b && t + r <= b)
|
|
27592
27615
|
try {
|
|
27593
|
-
typeof g == "function" ?
|
|
27616
|
+
typeof g == "function" ? s.send(g()) : s.send(g), t = b;
|
|
27594
27617
|
} catch (T) {
|
|
27595
|
-
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T),
|
|
27618
|
+
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), s.close();
|
|
27596
27619
|
}
|
|
27597
27620
|
}, l);
|
|
27598
|
-
return
|
|
27621
|
+
return s.addEventListener("close", function() {
|
|
27599
27622
|
clearInterval(y);
|
|
27600
27623
|
}), function() {
|
|
27601
27624
|
};
|
|
27602
27625
|
}
|
|
27603
|
-
return
|
|
27626
|
+
return xe;
|
|
27604
27627
|
}
|
|
27605
|
-
var
|
|
27628
|
+
var Ce = {}, Ke = {}, Da;
|
|
27606
27629
|
function ea() {
|
|
27607
27630
|
return Da || (Da = 1, (function(e) {
|
|
27608
27631
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
|
|
27609
|
-
var
|
|
27610
|
-
return (0, e.hasSubscribers)(r) ? Array.from(
|
|
27632
|
+
var n = {}, d = [], s = function(r) {
|
|
27633
|
+
return (0, e.hasSubscribers)(r) ? Array.from(n[r]) : d;
|
|
27611
27634
|
};
|
|
27612
|
-
e.getSubscribers =
|
|
27613
|
-
var
|
|
27635
|
+
e.getSubscribers = s;
|
|
27636
|
+
var o = function(r) {
|
|
27614
27637
|
var c;
|
|
27615
|
-
return ((c =
|
|
27638
|
+
return ((c = n[r]) === null || c === void 0 ? void 0 : c.size) > 0;
|
|
27616
27639
|
};
|
|
27617
|
-
e.hasSubscribers =
|
|
27618
|
-
var
|
|
27619
|
-
|
|
27640
|
+
e.hasSubscribers = o;
|
|
27641
|
+
var u = function(r, c) {
|
|
27642
|
+
n[r] = n[r] || /* @__PURE__ */ new Set(), n[r].add(c);
|
|
27620
27643
|
};
|
|
27621
|
-
e.addSubscriber =
|
|
27644
|
+
e.addSubscriber = u;
|
|
27622
27645
|
var U = function(r, c) {
|
|
27623
|
-
|
|
27646
|
+
n[r].delete(c);
|
|
27624
27647
|
};
|
|
27625
27648
|
e.removeSubscriber = U;
|
|
27626
27649
|
var _ = function(r) {
|
|
27627
|
-
if (r &&
|
|
27628
|
-
delete
|
|
27650
|
+
if (r && n.hasOwnProperty(r))
|
|
27651
|
+
delete n[r];
|
|
27629
27652
|
else
|
|
27630
|
-
for (var c in
|
|
27631
|
-
|
|
27653
|
+
for (var c in n)
|
|
27654
|
+
n.hasOwnProperty(c) && delete n[c];
|
|
27632
27655
|
};
|
|
27633
27656
|
e.resetSubscribers = _;
|
|
27634
|
-
})(
|
|
27657
|
+
})(Ke)), Ke;
|
|
27635
27658
|
}
|
|
27636
27659
|
var Ea;
|
|
27637
27660
|
function aa() {
|
|
27638
|
-
if (Ea) return
|
|
27639
|
-
Ea = 1, Object.defineProperty(
|
|
27640
|
-
var e = Xe(),
|
|
27641
|
-
function d(
|
|
27642
|
-
if (!
|
|
27661
|
+
if (Ea) return Ce;
|
|
27662
|
+
Ea = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.assertIsWebSocket = d, Ce.resetGlobalState = s;
|
|
27663
|
+
var e = Xe(), n = ea();
|
|
27664
|
+
function d(o, u) {
|
|
27665
|
+
if (!u && !(o instanceof WebSocket))
|
|
27643
27666
|
throw new Error("");
|
|
27644
27667
|
}
|
|
27645
|
-
function o
|
|
27646
|
-
(0,
|
|
27668
|
+
function s(o) {
|
|
27669
|
+
(0, n.resetSubscribers)(o), (0, e.resetWebSockets)(o);
|
|
27647
27670
|
}
|
|
27648
|
-
return
|
|
27671
|
+
return Ce;
|
|
27649
27672
|
}
|
|
27650
27673
|
var La;
|
|
27651
|
-
function
|
|
27652
|
-
if (La) return
|
|
27674
|
+
function Ki() {
|
|
27675
|
+
if (La) return ne;
|
|
27653
27676
|
La = 1;
|
|
27654
|
-
var e =
|
|
27655
|
-
return e = Object.assign || function(
|
|
27677
|
+
var e = ne && ne.__assign || function() {
|
|
27678
|
+
return e = Object.assign || function(m) {
|
|
27656
27679
|
for (var i, g = 1, l = arguments.length; g < l; g++) {
|
|
27657
27680
|
i = arguments[g];
|
|
27658
|
-
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (
|
|
27681
|
+
for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (m[t] = i[t]);
|
|
27659
27682
|
}
|
|
27660
|
-
return
|
|
27683
|
+
return m;
|
|
27661
27684
|
}, e.apply(this, arguments);
|
|
27662
27685
|
};
|
|
27663
|
-
Object.defineProperty(
|
|
27664
|
-
var
|
|
27665
|
-
|
|
27686
|
+
Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachListeners = void 0;
|
|
27687
|
+
var n = $e(), d = ja(), s = A(), o = aa(), u = function(m, i, g, l) {
|
|
27688
|
+
m.onmessage = function(t) {
|
|
27666
27689
|
var y;
|
|
27667
27690
|
i.current.onMessage && i.current.onMessage(t), typeof l?.current == "number" && (l.current = Date.now()), !(typeof i.current.filter == "function" && i.current.filter(t) !== !0) && (i.current.heartbeat && typeof i.current.heartbeat != "boolean" && ((y = i.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === t.data || g(t));
|
|
27668
27691
|
};
|
|
27669
|
-
}, U = function(
|
|
27670
|
-
|
|
27671
|
-
if (i.current.onOpen && i.current.onOpen(y), l.current = 0, g(
|
|
27692
|
+
}, U = function(m, i, g, l, t) {
|
|
27693
|
+
m.onopen = function(y) {
|
|
27694
|
+
if (i.current.onOpen && i.current.onOpen(y), l.current = 0, g(s.ReadyState.OPEN), i.current.heartbeat && m instanceof WebSocket) {
|
|
27672
27695
|
var b = typeof i.current.heartbeat == "boolean" ? void 0 : i.current.heartbeat;
|
|
27673
|
-
t.current = Date.now(), (0, d.heartbeat)(
|
|
27696
|
+
t.current = Date.now(), (0, d.heartbeat)(m, t, b);
|
|
27674
27697
|
}
|
|
27675
27698
|
};
|
|
27676
|
-
}, _ = function(
|
|
27677
|
-
if (
|
|
27699
|
+
}, _ = function(m, i, g, l, t) {
|
|
27700
|
+
if (s.isEventSourceSupported && m instanceof EventSource)
|
|
27678
27701
|
return function() {
|
|
27679
27702
|
};
|
|
27680
|
-
(0,
|
|
27703
|
+
(0, o.assertIsWebSocket)(m, i.current.skipAssert);
|
|
27681
27704
|
var y;
|
|
27682
|
-
return
|
|
27683
|
-
var
|
|
27684
|
-
if (i.current.onClose && i.current.onClose(b), g(
|
|
27685
|
-
var T = (
|
|
27705
|
+
return m.onclose = function(b) {
|
|
27706
|
+
var p;
|
|
27707
|
+
if (i.current.onClose && i.current.onClose(b), g(s.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
|
|
27708
|
+
var T = (p = i.current.reconnectAttempts) !== null && p !== void 0 ? p : s.DEFAULT_RECONNECT_LIMIT;
|
|
27686
27709
|
if (t.current < T) {
|
|
27687
27710
|
var N = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
|
|
27688
27711
|
y = window.setTimeout(function() {
|
|
27689
27712
|
t.current++, l();
|
|
27690
|
-
}, N ??
|
|
27713
|
+
}, N ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27691
27714
|
} else
|
|
27692
27715
|
i.current.onReconnectStop && i.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
|
|
27693
27716
|
}
|
|
27694
27717
|
}, function() {
|
|
27695
27718
|
return y && window.clearTimeout(y);
|
|
27696
27719
|
};
|
|
27697
|
-
}, r = function(
|
|
27720
|
+
}, r = function(m, i, g, l, t) {
|
|
27698
27721
|
var y;
|
|
27699
|
-
return
|
|
27700
|
-
var
|
|
27701
|
-
if (i.current.onError && i.current.onError(b),
|
|
27702
|
-
if (t.current < ((
|
|
27722
|
+
return m.onerror = function(b) {
|
|
27723
|
+
var p;
|
|
27724
|
+
if (i.current.onError && i.current.onError(b), s.isEventSourceSupported && m instanceof EventSource && (i.current.onClose && i.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), g(s.ReadyState.CLOSED), m.close()), i.current.retryOnError)
|
|
27725
|
+
if (t.current < ((p = i.current.reconnectAttempts) !== null && p !== void 0 ? p : s.DEFAULT_RECONNECT_LIMIT)) {
|
|
27703
27726
|
var T = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
|
|
27704
27727
|
y = window.setTimeout(function() {
|
|
27705
27728
|
t.current++, l();
|
|
27706
|
-
}, T ??
|
|
27729
|
+
}, T ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27707
27730
|
} else
|
|
27708
27731
|
i.current.onReconnectStop && i.current.onReconnectStop(i.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(i.current.reconnectAttempts, " exceeded"));
|
|
27709
27732
|
}, function() {
|
|
27710
27733
|
return y && window.clearTimeout(y);
|
|
27711
27734
|
};
|
|
27712
|
-
}, c = function(
|
|
27713
|
-
var
|
|
27714
|
-
return g.current.fromSocketIO && (N = (0,
|
|
27715
|
-
T(
|
|
27735
|
+
}, c = function(m, i, g, l, t, y, b) {
|
|
27736
|
+
var p = i.setLastMessage, T = i.setReadyState, N, D, h;
|
|
27737
|
+
return g.current.fromSocketIO && (N = (0, n.setUpSocketIOPing)(b)), u(m, g, p, y), U(m, g, T, t, y), D = _(m, g, T, l, t), h = r(m, g, T, l, t), function() {
|
|
27738
|
+
T(s.ReadyState.CLOSING), D(), h(), m.close(), N && clearInterval(N);
|
|
27716
27739
|
};
|
|
27717
27740
|
};
|
|
27718
|
-
return
|
|
27741
|
+
return ne.attachListeners = c, ne;
|
|
27719
27742
|
}
|
|
27720
|
-
var
|
|
27721
|
-
function
|
|
27722
|
-
if (Ga) return
|
|
27743
|
+
var me = {}, Ga;
|
|
27744
|
+
function ji() {
|
|
27745
|
+
if (Ga) return me;
|
|
27723
27746
|
Ga = 1;
|
|
27724
|
-
var e =
|
|
27747
|
+
var e = me && me.__assign || function() {
|
|
27725
27748
|
return e = Object.assign || function(i) {
|
|
27726
27749
|
for (var g, l = 1, t = arguments.length; l < t; l++) {
|
|
27727
27750
|
g = arguments[l];
|
|
@@ -27730,36 +27753,36 @@ function Bi() {
|
|
|
27730
27753
|
return i;
|
|
27731
27754
|
}, e.apply(this, arguments);
|
|
27732
27755
|
};
|
|
27733
|
-
Object.defineProperty(
|
|
27734
|
-
var
|
|
27756
|
+
Object.defineProperty(me, "__esModule", { value: !0 }), me.attachSharedListeners = void 0;
|
|
27757
|
+
var n = Xe(), d = A(), s = ea(), o = $e(), u = ja(), U = function(i, g, l) {
|
|
27735
27758
|
i.onmessage = function(t) {
|
|
27736
|
-
(0,
|
|
27759
|
+
(0, s.getSubscribers)(g).forEach(function(y) {
|
|
27737
27760
|
var b;
|
|
27738
27761
|
y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(t), typeof ((b = y?.lastMessageTime) === null || b === void 0 ? void 0 : b.current) == "number" && (y.lastMessageTime.current = Date.now()), !(typeof y.optionsRef.current.filter == "function" && y.optionsRef.current.filter(t) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === t.data || y.setLastMessage(t));
|
|
27739
27762
|
});
|
|
27740
27763
|
};
|
|
27741
27764
|
}, _ = function(i, g, l) {
|
|
27742
27765
|
i.onopen = function(t) {
|
|
27743
|
-
var y = (0,
|
|
27766
|
+
var y = (0, s.getSubscribers)(g);
|
|
27744
27767
|
y.forEach(function(b) {
|
|
27745
27768
|
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(t), b.setReadyState(d.ReadyState.OPEN), l && i instanceof WebSocket && (b.lastMessageTime.current = Date.now());
|
|
27746
|
-
}), l && i instanceof WebSocket && (0,
|
|
27769
|
+
}), l && i instanceof WebSocket && (0, u.heartbeat)(i, y.map(function(b) {
|
|
27747
27770
|
return b.lastMessageTime;
|
|
27748
27771
|
}), typeof l == "boolean" ? void 0 : l);
|
|
27749
27772
|
};
|
|
27750
27773
|
}, r = function(i, g) {
|
|
27751
27774
|
i instanceof WebSocket && (i.onclose = function(l) {
|
|
27752
|
-
(0,
|
|
27775
|
+
(0, s.getSubscribers)(g).forEach(function(t) {
|
|
27753
27776
|
t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(d.ReadyState.CLOSED);
|
|
27754
|
-
}), delete
|
|
27777
|
+
}), delete n.sharedWebSockets[g], (0, s.getSubscribers)(g).forEach(function(t) {
|
|
27755
27778
|
var y;
|
|
27756
27779
|
if (t.optionsRef.current.shouldReconnect && t.optionsRef.current.shouldReconnect(l)) {
|
|
27757
27780
|
var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : d.DEFAULT_RECONNECT_LIMIT;
|
|
27758
27781
|
if (t.reconnectCount.current < b) {
|
|
27759
|
-
var
|
|
27782
|
+
var p = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
|
|
27760
27783
|
setTimeout(function() {
|
|
27761
27784
|
t.reconnectCount.current++, t.reconnect.current();
|
|
27762
|
-
},
|
|
27785
|
+
}, p ?? d.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27763
27786
|
} else
|
|
27764
27787
|
t.optionsRef.current.onReconnectStop && t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
|
|
27765
27788
|
}
|
|
@@ -27767,164 +27790,164 @@ function Bi() {
|
|
|
27767
27790
|
});
|
|
27768
27791
|
}, c = function(i, g) {
|
|
27769
27792
|
i.onerror = function(l) {
|
|
27770
|
-
(0,
|
|
27793
|
+
(0, s.getSubscribers)(g).forEach(function(t) {
|
|
27771
27794
|
t.optionsRef.current.onError && t.optionsRef.current.onError(l), d.isEventSourceSupported && i instanceof EventSource && (t.optionsRef.current.onClose && t.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), t.setReadyState(d.ReadyState.CLOSED));
|
|
27772
27795
|
}), d.isEventSourceSupported && i instanceof EventSource && i.close();
|
|
27773
27796
|
};
|
|
27774
|
-
},
|
|
27797
|
+
}, m = function(i, g, l, t) {
|
|
27775
27798
|
var y;
|
|
27776
|
-
return l.current.fromSocketIO && (y = (0,
|
|
27799
|
+
return l.current.fromSocketIO && (y = (0, o.setUpSocketIOPing)(t)), U(i, g, l.current.heartbeat), r(i, g), _(i, g, l.current.heartbeat), c(i, g), function() {
|
|
27777
27800
|
y && clearInterval(y);
|
|
27778
27801
|
};
|
|
27779
27802
|
};
|
|
27780
|
-
return
|
|
27803
|
+
return me.attachSharedListeners = m, me;
|
|
27781
27804
|
}
|
|
27782
27805
|
var Ma;
|
|
27783
|
-
function
|
|
27784
|
-
if (Ma) return
|
|
27785
|
-
Ma = 1, Object.defineProperty(
|
|
27786
|
-
var e = Xe(),
|
|
27806
|
+
function Qi() {
|
|
27807
|
+
if (Ma) return Te;
|
|
27808
|
+
Ma = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.createOrJoinSocket = void 0;
|
|
27809
|
+
var e = Xe(), n = A(), d = Ki(), s = ji(), o = ea(), u = function(_, r, c, m, i) {
|
|
27787
27810
|
return function() {
|
|
27788
|
-
if ((0,
|
|
27811
|
+
if ((0, o.removeSubscriber)(_, r), !(0, o.hasSubscribers)(_)) {
|
|
27789
27812
|
try {
|
|
27790
27813
|
var g = e.sharedWebSockets[_];
|
|
27791
27814
|
g instanceof WebSocket && (g.onclose = function(l) {
|
|
27792
|
-
c.current.onClose && c.current.onClose(l), n
|
|
27815
|
+
c.current.onClose && c.current.onClose(l), m(n.ReadyState.CLOSED);
|
|
27793
27816
|
}), g.close();
|
|
27794
27817
|
} catch {
|
|
27795
27818
|
}
|
|
27796
27819
|
i && i(), delete e.sharedWebSockets[_];
|
|
27797
27820
|
}
|
|
27798
27821
|
};
|
|
27799
|
-
}, U = function(_, r, c,
|
|
27800
|
-
if (!
|
|
27801
|
-
throw
|
|
27802
|
-
if (
|
|
27822
|
+
}, U = function(_, r, c, m, i, g, l, t, y) {
|
|
27823
|
+
if (!n.isEventSourceSupported && m.current.eventSourceOptions)
|
|
27824
|
+
throw n.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
|
|
27825
|
+
if (m.current.share) {
|
|
27803
27826
|
var b = null;
|
|
27804
|
-
e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] =
|
|
27805
|
-
var
|
|
27827
|
+
e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), _.current = e.sharedWebSockets[r], c(n.ReadyState.CONNECTING), b = (0, s.attachSharedListeners)(e.sharedWebSockets[r], r, m, y)) : (_.current = e.sharedWebSockets[r], c(e.sharedWebSockets[r].readyState));
|
|
27828
|
+
var p = {
|
|
27806
27829
|
setLastMessage: i,
|
|
27807
27830
|
setReadyState: c,
|
|
27808
|
-
optionsRef:
|
|
27831
|
+
optionsRef: m,
|
|
27809
27832
|
reconnectCount: l,
|
|
27810
27833
|
lastMessageTime: t,
|
|
27811
27834
|
reconnect: g
|
|
27812
27835
|
};
|
|
27813
|
-
return (0,
|
|
27836
|
+
return (0, o.addSubscriber)(r, p), u(r, p, m, c, b);
|
|
27814
27837
|
} else {
|
|
27815
|
-
if (_.current =
|
|
27838
|
+
if (_.current = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), c(n.ReadyState.CONNECTING), !_.current)
|
|
27816
27839
|
throw new Error("WebSocket failed to be created");
|
|
27817
27840
|
return (0, d.attachListeners)(_.current, {
|
|
27818
27841
|
setLastMessage: i,
|
|
27819
27842
|
setReadyState: c
|
|
27820
|
-
},
|
|
27843
|
+
}, m, g.current, l, t, y);
|
|
27821
27844
|
}
|
|
27822
27845
|
};
|
|
27823
|
-
return
|
|
27846
|
+
return Te.createOrJoinSocket = U, Te;
|
|
27824
27847
|
}
|
|
27825
27848
|
var Y = {}, Ra;
|
|
27826
|
-
function
|
|
27849
|
+
function Yi() {
|
|
27827
27850
|
return Ra || (Ra = 1, (function(e) {
|
|
27828
|
-
var
|
|
27851
|
+
var n = Y && Y.__awaiter || function(r, c, m, i) {
|
|
27829
27852
|
function g(l) {
|
|
27830
|
-
return l instanceof
|
|
27853
|
+
return l instanceof m ? l : new m(function(t) {
|
|
27831
27854
|
t(l);
|
|
27832
27855
|
});
|
|
27833
27856
|
}
|
|
27834
|
-
return new (
|
|
27857
|
+
return new (m || (m = Promise))(function(l, t) {
|
|
27835
27858
|
function y(T) {
|
|
27836
27859
|
try {
|
|
27837
|
-
|
|
27860
|
+
p(i.next(T));
|
|
27838
27861
|
} catch (N) {
|
|
27839
27862
|
t(N);
|
|
27840
27863
|
}
|
|
27841
27864
|
}
|
|
27842
27865
|
function b(T) {
|
|
27843
27866
|
try {
|
|
27844
|
-
|
|
27867
|
+
p(i.throw(T));
|
|
27845
27868
|
} catch (N) {
|
|
27846
27869
|
t(N);
|
|
27847
27870
|
}
|
|
27848
27871
|
}
|
|
27849
|
-
function
|
|
27872
|
+
function p(T) {
|
|
27850
27873
|
T.done ? l(T.value) : g(T.value).then(y, b);
|
|
27851
27874
|
}
|
|
27852
|
-
|
|
27875
|
+
p((i = i.apply(r, c || [])).next());
|
|
27853
27876
|
});
|
|
27854
27877
|
}, d = Y && Y.__generator || function(r, c) {
|
|
27855
|
-
var
|
|
27878
|
+
var m = { label: 0, sent: function() {
|
|
27856
27879
|
if (l[0] & 1) throw l[1];
|
|
27857
27880
|
return l[1];
|
|
27858
27881
|
}, trys: [], ops: [] }, i, g, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
27859
27882
|
return t.next = y(0), t.throw = y(1), t.return = y(2), typeof Symbol == "function" && (t[Symbol.iterator] = function() {
|
|
27860
27883
|
return this;
|
|
27861
27884
|
}), t;
|
|
27862
|
-
function y(
|
|
27885
|
+
function y(p) {
|
|
27863
27886
|
return function(T) {
|
|
27864
|
-
return b([
|
|
27887
|
+
return b([p, T]);
|
|
27865
27888
|
};
|
|
27866
27889
|
}
|
|
27867
|
-
function b(
|
|
27890
|
+
function b(p) {
|
|
27868
27891
|
if (i) throw new TypeError("Generator is already executing.");
|
|
27869
|
-
for (; t && (t = 0,
|
|
27870
|
-
if (i = 1, g && (l =
|
|
27871
|
-
switch (g = 0, l && (
|
|
27892
|
+
for (; t && (t = 0, p[0] && (m = 0)), m; ) try {
|
|
27893
|
+
if (i = 1, g && (l = p[0] & 2 ? g.return : p[0] ? g.throw || ((l = g.return) && l.call(g), 0) : g.next) && !(l = l.call(g, p[1])).done) return l;
|
|
27894
|
+
switch (g = 0, l && (p = [p[0] & 2, l.value]), p[0]) {
|
|
27872
27895
|
case 0:
|
|
27873
27896
|
case 1:
|
|
27874
|
-
l =
|
|
27897
|
+
l = p;
|
|
27875
27898
|
break;
|
|
27876
27899
|
case 4:
|
|
27877
|
-
return
|
|
27900
|
+
return m.label++, { value: p[1], done: !1 };
|
|
27878
27901
|
case 5:
|
|
27879
|
-
|
|
27902
|
+
m.label++, g = p[1], p = [0];
|
|
27880
27903
|
continue;
|
|
27881
27904
|
case 7:
|
|
27882
|
-
|
|
27905
|
+
p = m.ops.pop(), m.trys.pop();
|
|
27883
27906
|
continue;
|
|
27884
27907
|
default:
|
|
27885
|
-
if (l =
|
|
27886
|
-
|
|
27908
|
+
if (l = m.trys, !(l = l.length > 0 && l[l.length - 1]) && (p[0] === 6 || p[0] === 2)) {
|
|
27909
|
+
m = 0;
|
|
27887
27910
|
continue;
|
|
27888
27911
|
}
|
|
27889
|
-
if (
|
|
27890
|
-
|
|
27912
|
+
if (p[0] === 3 && (!l || p[1] > l[0] && p[1] < l[3])) {
|
|
27913
|
+
m.label = p[1];
|
|
27891
27914
|
break;
|
|
27892
27915
|
}
|
|
27893
|
-
if (
|
|
27894
|
-
|
|
27916
|
+
if (p[0] === 6 && m.label < l[1]) {
|
|
27917
|
+
m.label = l[1], l = p;
|
|
27895
27918
|
break;
|
|
27896
27919
|
}
|
|
27897
|
-
if (l &&
|
|
27898
|
-
|
|
27920
|
+
if (l && m.label < l[2]) {
|
|
27921
|
+
m.label = l[2], m.ops.push(p);
|
|
27899
27922
|
break;
|
|
27900
27923
|
}
|
|
27901
|
-
l[2] &&
|
|
27924
|
+
l[2] && m.ops.pop(), m.trys.pop();
|
|
27902
27925
|
continue;
|
|
27903
27926
|
}
|
|
27904
|
-
|
|
27927
|
+
p = c.call(r, m);
|
|
27905
27928
|
} catch (T) {
|
|
27906
|
-
|
|
27929
|
+
p = [6, T], g = 0;
|
|
27907
27930
|
} finally {
|
|
27908
27931
|
i = l = 0;
|
|
27909
27932
|
}
|
|
27910
|
-
if (
|
|
27911
|
-
return { value:
|
|
27933
|
+
if (p[0] & 5) throw p[1];
|
|
27934
|
+
return { value: p[0] ? p[1] : void 0, done: !0 };
|
|
27912
27935
|
}
|
|
27913
|
-
},
|
|
27914
|
-
if (
|
|
27936
|
+
}, s = Y && Y.__spreadArray || function(r, c, m) {
|
|
27937
|
+
if (m || arguments.length === 2) for (var i = 0, g = c.length, l; i < g; i++)
|
|
27915
27938
|
(l || !(i in c)) && (l || (l = Array.prototype.slice.call(c, 0, i)), l[i] = c[i]);
|
|
27916
27939
|
return r.concat(l || Array.prototype.slice.call(c));
|
|
27917
27940
|
};
|
|
27918
27941
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
|
|
27919
|
-
var
|
|
27942
|
+
var o = $e(), u = A(), U = function(r) {
|
|
27920
27943
|
return new Promise(function(c) {
|
|
27921
27944
|
return window.setTimeout(c, r);
|
|
27922
27945
|
});
|
|
27923
27946
|
}, _ = function(r, c) {
|
|
27924
|
-
for (var
|
|
27925
|
-
|
|
27926
|
-
return
|
|
27927
|
-
var y, b,
|
|
27947
|
+
for (var m = [], i = 2; i < arguments.length; i++)
|
|
27948
|
+
m[i - 2] = arguments[i];
|
|
27949
|
+
return n(void 0, s([r, c], m, !0), void 0, function(g, l, t) {
|
|
27950
|
+
var y, b, p, T, N, D, h, L;
|
|
27928
27951
|
return t === void 0 && (t = 0), d(this, function(M) {
|
|
27929
27952
|
switch (M.label) {
|
|
27930
27953
|
case 0:
|
|
@@ -27935,7 +27958,7 @@ function Qi() {
|
|
|
27935
27958
|
case 2:
|
|
27936
27959
|
return y = M.sent(), [3, 9];
|
|
27937
27960
|
case 3:
|
|
27938
|
-
return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D :
|
|
27961
|
+
return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : u.DEFAULT_RECONNECT_LIMIT, t < b ? (p = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, U(p ?? u.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
|
|
27939
27962
|
case 4:
|
|
27940
27963
|
return M.sent(), [2, (0, e.getUrl)(g, l, t + 1)];
|
|
27941
27964
|
case 5:
|
|
@@ -27951,7 +27974,7 @@ function Qi() {
|
|
|
27951
27974
|
case 10:
|
|
27952
27975
|
y = g, M.label = 11;
|
|
27953
27976
|
case 11:
|
|
27954
|
-
return T = l.current.fromSocketIO ? (0,
|
|
27977
|
+
return T = l.current.fromSocketIO ? (0, o.parseSocketIOUrl)(y) : y, N = l.current.queryParams ? (0, o.appendQueryParams)(T, l.current.queryParams) : T, [2, N];
|
|
27955
27978
|
}
|
|
27956
27979
|
});
|
|
27957
27980
|
});
|
|
@@ -27959,24 +27982,24 @@ function Qi() {
|
|
|
27959
27982
|
e.getUrl = _;
|
|
27960
27983
|
})(Y)), Y;
|
|
27961
27984
|
}
|
|
27962
|
-
var
|
|
27963
|
-
function
|
|
27985
|
+
var je = {}, Pa;
|
|
27986
|
+
function qi() {
|
|
27964
27987
|
return Pa || (Pa = 1, (function(e) {
|
|
27965
27988
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
|
|
27966
|
-
var
|
|
27989
|
+
var n = function(d, s) {
|
|
27967
27990
|
return new Proxy(d, {
|
|
27968
|
-
get: function(
|
|
27969
|
-
var U =
|
|
27970
|
-
return
|
|
27991
|
+
get: function(o, u) {
|
|
27992
|
+
var U = o[u];
|
|
27993
|
+
return u === "reconnect" ? s : typeof U == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
|
|
27971
27994
|
}) : U;
|
|
27972
27995
|
},
|
|
27973
|
-
set: function(
|
|
27974
|
-
return /^on/.test(
|
|
27996
|
+
set: function(o, u, U) {
|
|
27997
|
+
return /^on/.test(u) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (o[u] = U, !0);
|
|
27975
27998
|
}
|
|
27976
27999
|
});
|
|
27977
28000
|
};
|
|
27978
|
-
e.websocketWrapper =
|
|
27979
|
-
})(
|
|
28001
|
+
e.websocketWrapper = n, e.default = e.websocketWrapper;
|
|
28002
|
+
})(je)), je;
|
|
27980
28003
|
}
|
|
27981
28004
|
var xa;
|
|
27982
28005
|
function ia() {
|
|
@@ -27990,13 +28013,13 @@ function ia() {
|
|
|
27990
28013
|
}
|
|
27991
28014
|
return g;
|
|
27992
28015
|
}, e.apply(this, arguments);
|
|
27993
|
-
},
|
|
27994
|
-
function b(
|
|
27995
|
-
return
|
|
27996
|
-
T(
|
|
28016
|
+
}, n = J && J.__awaiter || function(g, l, t, y) {
|
|
28017
|
+
function b(p) {
|
|
28018
|
+
return p instanceof t ? p : new t(function(T) {
|
|
28019
|
+
T(p);
|
|
27997
28020
|
});
|
|
27998
28021
|
}
|
|
27999
|
-
return new (t || (t = Promise))(function(
|
|
28022
|
+
return new (t || (t = Promise))(function(p, T) {
|
|
28000
28023
|
function N(L) {
|
|
28001
28024
|
try {
|
|
28002
28025
|
h(y.next(L));
|
|
@@ -28012,15 +28035,15 @@ function ia() {
|
|
|
28012
28035
|
}
|
|
28013
28036
|
}
|
|
28014
28037
|
function h(L) {
|
|
28015
|
-
L.done ?
|
|
28038
|
+
L.done ? p(L.value) : b(L.value).then(N, D);
|
|
28016
28039
|
}
|
|
28017
28040
|
h((y = y.apply(g, l || [])).next());
|
|
28018
28041
|
});
|
|
28019
28042
|
}, d = J && J.__generator || function(g, l) {
|
|
28020
28043
|
var t = { label: 0, sent: function() {
|
|
28021
|
-
if (
|
|
28022
|
-
return
|
|
28023
|
-
}, trys: [], ops: [] }, y, b,
|
|
28044
|
+
if (p[0] & 1) throw p[1];
|
|
28045
|
+
return p[1];
|
|
28046
|
+
}, trys: [], ops: [] }, y, b, p, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
28024
28047
|
return T.next = N(0), T.throw = N(1), T.return = N(2), typeof Symbol == "function" && (T[Symbol.iterator] = function() {
|
|
28025
28048
|
return this;
|
|
28026
28049
|
}), T;
|
|
@@ -28032,11 +28055,11 @@ function ia() {
|
|
|
28032
28055
|
function D(h) {
|
|
28033
28056
|
if (y) throw new TypeError("Generator is already executing.");
|
|
28034
28057
|
for (; T && (T = 0, h[0] && (t = 0)), t; ) try {
|
|
28035
|
-
if (y = 1, b && (
|
|
28036
|
-
switch (b = 0,
|
|
28058
|
+
if (y = 1, b && (p = h[0] & 2 ? b.return : h[0] ? b.throw || ((p = b.return) && p.call(b), 0) : b.next) && !(p = p.call(b, h[1])).done) return p;
|
|
28059
|
+
switch (b = 0, p && (h = [h[0] & 2, p.value]), h[0]) {
|
|
28037
28060
|
case 0:
|
|
28038
28061
|
case 1:
|
|
28039
|
-
|
|
28062
|
+
p = h;
|
|
28040
28063
|
break;
|
|
28041
28064
|
case 4:
|
|
28042
28065
|
return t.label++, { value: h[1], done: !1 };
|
|
@@ -28047,41 +28070,41 @@ function ia() {
|
|
|
28047
28070
|
h = t.ops.pop(), t.trys.pop();
|
|
28048
28071
|
continue;
|
|
28049
28072
|
default:
|
|
28050
|
-
if (
|
|
28073
|
+
if (p = t.trys, !(p = p.length > 0 && p[p.length - 1]) && (h[0] === 6 || h[0] === 2)) {
|
|
28051
28074
|
t = 0;
|
|
28052
28075
|
continue;
|
|
28053
28076
|
}
|
|
28054
|
-
if (h[0] === 3 && (!
|
|
28077
|
+
if (h[0] === 3 && (!p || h[1] > p[0] && h[1] < p[3])) {
|
|
28055
28078
|
t.label = h[1];
|
|
28056
28079
|
break;
|
|
28057
28080
|
}
|
|
28058
|
-
if (h[0] === 6 && t.label <
|
|
28059
|
-
t.label =
|
|
28081
|
+
if (h[0] === 6 && t.label < p[1]) {
|
|
28082
|
+
t.label = p[1], p = h;
|
|
28060
28083
|
break;
|
|
28061
28084
|
}
|
|
28062
|
-
if (
|
|
28063
|
-
t.label =
|
|
28085
|
+
if (p && t.label < p[2]) {
|
|
28086
|
+
t.label = p[2], t.ops.push(h);
|
|
28064
28087
|
break;
|
|
28065
28088
|
}
|
|
28066
|
-
|
|
28089
|
+
p[2] && t.ops.pop(), t.trys.pop();
|
|
28067
28090
|
continue;
|
|
28068
28091
|
}
|
|
28069
28092
|
h = l.call(g, t);
|
|
28070
28093
|
} catch (L) {
|
|
28071
28094
|
h = [6, L], b = 0;
|
|
28072
28095
|
} finally {
|
|
28073
|
-
y =
|
|
28096
|
+
y = p = 0;
|
|
28074
28097
|
}
|
|
28075
28098
|
if (h[0] & 5) throw h[1];
|
|
28076
28099
|
return { value: h[0] ? h[1] : void 0, done: !0 };
|
|
28077
28100
|
}
|
|
28078
|
-
},
|
|
28101
|
+
}, s = J && J.__importDefault || function(g) {
|
|
28079
28102
|
return g && g.__esModule ? g : { default: g };
|
|
28080
28103
|
};
|
|
28081
28104
|
Object.defineProperty(J, "__esModule", { value: !0 }), J.useWebSocket = void 0;
|
|
28082
|
-
var
|
|
28105
|
+
var o = he, u = ki, U = A(), _ = Qi(), r = Yi(), c = s(qi()), m = aa(), i = function(g, l, t) {
|
|
28083
28106
|
l === void 0 && (l = U.DEFAULT_OPTIONS), t === void 0 && (t = !0);
|
|
28084
|
-
var y = (0,
|
|
28107
|
+
var y = (0, o.useState)(null), b = y[0], p = y[1], T = (0, o.useState)({}), N = T[0], D = T[1], h = (0, o.useMemo)(function() {
|
|
28085
28108
|
if (!l.disableJson && b)
|
|
28086
28109
|
try {
|
|
28087
28110
|
return JSON.parse(b.data);
|
|
@@ -28089,50 +28112,50 @@ function ia() {
|
|
|
28089
28112
|
return U.UNPARSABLE_JSON_OBJECT;
|
|
28090
28113
|
}
|
|
28091
28114
|
return null;
|
|
28092
|
-
}, [b, l.disableJson]), L = (0,
|
|
28093
|
-
}),
|
|
28115
|
+
}, [b, l.disableJson]), L = (0, o.useRef)(null), M = (0, o.useRef)(null), ce = (0, o.useRef)(function() {
|
|
28116
|
+
}), _e = (0, o.useRef)(0), Fe = (0, o.useRef)(Date.now()), Se = (0, o.useRef)([]), V = (0, o.useRef)(null), H = (0, o.useRef)(l);
|
|
28094
28117
|
H.current = l;
|
|
28095
|
-
var Z = L.current && N[L.current] !== void 0 ? N[L.current] : g !== null && t === !0 ? U.ReadyState.CONNECTING : U.ReadyState.UNINSTANTIATED,
|
|
28118
|
+
var Z = L.current && N[L.current] !== void 0 ? N[L.current] : g !== null && t === !0 ? U.ReadyState.CONNECTING : U.ReadyState.UNINSTANTIATED, ae = l.queryParams ? JSON.stringify(l.queryParams) : null, B = (0, o.useCallback)(function(x, w) {
|
|
28096
28119
|
var K;
|
|
28097
28120
|
if (w === void 0 && (w = !0), U.isEventSourceSupported && M.current instanceof EventSource) {
|
|
28098
28121
|
console.warn("Unable to send a message from an eventSource");
|
|
28099
28122
|
return;
|
|
28100
28123
|
}
|
|
28101
|
-
((K = M.current) === null || K === void 0 ? void 0 : K.readyState) === U.ReadyState.OPEN ? ((0,
|
|
28102
|
-
}, []),
|
|
28124
|
+
((K = M.current) === null || K === void 0 ? void 0 : K.readyState) === U.ReadyState.OPEN ? ((0, m.assertIsWebSocket)(M.current, H.current.skipAssert), M.current.send(x)) : w && Se.current.push(x);
|
|
28125
|
+
}, []), Ne = (0, o.useCallback)(function(x, w) {
|
|
28103
28126
|
w === void 0 && (w = !0), B(JSON.stringify(x), w);
|
|
28104
|
-
}, [B]),
|
|
28105
|
-
return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0,
|
|
28127
|
+
}, [B]), De = (0, o.useCallback)(function() {
|
|
28128
|
+
return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, m.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, c.default)(M.current, ce)), V.current);
|
|
28106
28129
|
}, []);
|
|
28107
|
-
return (0,
|
|
28130
|
+
return (0, o.useEffect)(function() {
|
|
28108
28131
|
if (g !== null && t === !0) {
|
|
28109
|
-
var x, w = !1, K = !0,
|
|
28110
|
-
return
|
|
28111
|
-
var
|
|
28132
|
+
var x, w = !1, K = !0, fe = function() {
|
|
28133
|
+
return n(void 0, void 0, void 0, function() {
|
|
28134
|
+
var ie, $, Ee;
|
|
28112
28135
|
return d(this, function(se) {
|
|
28113
28136
|
switch (se.label) {
|
|
28114
28137
|
case 0:
|
|
28115
|
-
return
|
|
28138
|
+
return ie = L, [4, (0, r.getUrl)(g, H)];
|
|
28116
28139
|
case 1:
|
|
28117
|
-
return
|
|
28118
|
-
return D(function(
|
|
28119
|
-
return e(e({},
|
|
28140
|
+
return ie.current = se.sent(), L.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), L.current = "ABORTED", (0, u.flushSync)(function() {
|
|
28141
|
+
return D(function(j) {
|
|
28142
|
+
return e(e({}, j), { ABORTED: U.ReadyState.CLOSED });
|
|
28120
28143
|
});
|
|
28121
28144
|
}), [
|
|
28122
28145
|
2
|
|
28123
28146
|
/*return*/
|
|
28124
|
-
]) : (
|
|
28125
|
-
w || (0,
|
|
28126
|
-
return
|
|
28147
|
+
]) : ($ = function(j) {
|
|
28148
|
+
w || (0, u.flushSync)(function() {
|
|
28149
|
+
return p(j);
|
|
28127
28150
|
});
|
|
28128
|
-
},
|
|
28129
|
-
w || (0,
|
|
28151
|
+
}, Ee = function(j) {
|
|
28152
|
+
w || (0, u.flushSync)(function() {
|
|
28130
28153
|
return D(function(ue) {
|
|
28131
|
-
var
|
|
28132
|
-
return e(e({}, ue), L.current && (
|
|
28154
|
+
var le;
|
|
28155
|
+
return e(e({}, ue), L.current && (le = {}, le[L.current] = j, le));
|
|
28133
28156
|
});
|
|
28134
28157
|
});
|
|
28135
|
-
}, K && (x = (0, _.createOrJoinSocket)(M, L.current,
|
|
28158
|
+
}, K && (x = (0, _.createOrJoinSocket)(M, L.current, Ee, H, $, ce, _e, Fe, B)), [
|
|
28136
28159
|
2
|
|
28137
28160
|
/*return*/
|
|
28138
28161
|
]);
|
|
@@ -28140,106 +28163,106 @@ function ia() {
|
|
|
28140
28163
|
});
|
|
28141
28164
|
});
|
|
28142
28165
|
};
|
|
28143
|
-
return
|
|
28144
|
-
w || (V.current && (V.current = null), x?.(),
|
|
28145
|
-
},
|
|
28146
|
-
w = !0, K = !1, V.current && (V.current = null), x?.(),
|
|
28166
|
+
return ce.current = function() {
|
|
28167
|
+
w || (V.current && (V.current = null), x?.(), fe());
|
|
28168
|
+
}, fe(), function() {
|
|
28169
|
+
w = !0, K = !1, V.current && (V.current = null), x?.(), p(null);
|
|
28147
28170
|
};
|
|
28148
|
-
} else (g === null || t === !1) && (
|
|
28149
|
-
var
|
|
28150
|
-
return e(e({},
|
|
28171
|
+
} else (g === null || t === !1) && (_e.current = 0, D(function(ie) {
|
|
28172
|
+
var $;
|
|
28173
|
+
return e(e({}, ie), L.current && ($ = {}, $[L.current] = U.ReadyState.CLOSED, $));
|
|
28151
28174
|
}));
|
|
28152
|
-
}, [g, t,
|
|
28153
|
-
Z === U.ReadyState.OPEN &&
|
|
28175
|
+
}, [g, t, ae, B]), (0, o.useEffect)(function() {
|
|
28176
|
+
Z === U.ReadyState.OPEN && Se.current.splice(0).forEach(function(x) {
|
|
28154
28177
|
B(x);
|
|
28155
28178
|
});
|
|
28156
28179
|
}, [Z]), {
|
|
28157
28180
|
sendMessage: B,
|
|
28158
|
-
sendJsonMessage:
|
|
28181
|
+
sendJsonMessage: Ne,
|
|
28159
28182
|
lastMessage: b,
|
|
28160
28183
|
lastJsonMessage: h,
|
|
28161
28184
|
readyState: Z,
|
|
28162
|
-
getWebSocket:
|
|
28185
|
+
getWebSocket: De
|
|
28163
28186
|
};
|
|
28164
28187
|
};
|
|
28165
28188
|
return J.useWebSocket = i, J;
|
|
28166
28189
|
}
|
|
28167
|
-
var
|
|
28168
|
-
function
|
|
28169
|
-
if (Oa) return
|
|
28190
|
+
var re = {}, Oa;
|
|
28191
|
+
function Xi() {
|
|
28192
|
+
if (Oa) return re;
|
|
28170
28193
|
Oa = 1;
|
|
28171
|
-
var e =
|
|
28194
|
+
var e = re && re.__assign || function() {
|
|
28172
28195
|
return e = Object.assign || function(_) {
|
|
28173
|
-
for (var r, c = 1,
|
|
28196
|
+
for (var r, c = 1, m = arguments.length; c < m; c++) {
|
|
28174
28197
|
r = arguments[c];
|
|
28175
28198
|
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (_[i] = r[i]);
|
|
28176
28199
|
}
|
|
28177
28200
|
return _;
|
|
28178
28201
|
}, e.apply(this, arguments);
|
|
28179
28202
|
};
|
|
28180
|
-
Object.defineProperty(
|
|
28181
|
-
var
|
|
28203
|
+
Object.defineProperty(re, "__esModule", { value: !0 }), re.useSocketIO = void 0;
|
|
28204
|
+
var n = he, d = ia(), s = A(), o = {
|
|
28182
28205
|
type: "empty",
|
|
28183
28206
|
payload: null
|
|
28184
|
-
},
|
|
28207
|
+
}, u = function(_) {
|
|
28185
28208
|
if (!_ || !_.data)
|
|
28186
|
-
return
|
|
28209
|
+
return o;
|
|
28187
28210
|
var r = _.data.match(/\[.*]/);
|
|
28188
28211
|
if (!r)
|
|
28189
|
-
return
|
|
28212
|
+
return o;
|
|
28190
28213
|
var c = JSON.parse(r);
|
|
28191
|
-
return !Array.isArray(c) || !c[1] ?
|
|
28214
|
+
return !Array.isArray(c) || !c[1] ? o : {
|
|
28192
28215
|
type: c[0],
|
|
28193
28216
|
payload: c[1]
|
|
28194
28217
|
};
|
|
28195
28218
|
}, U = function(_, r, c) {
|
|
28196
|
-
r === void 0 && (r =
|
|
28197
|
-
var
|
|
28219
|
+
r === void 0 && (r = s.DEFAULT_OPTIONS), c === void 0 && (c = !0);
|
|
28220
|
+
var m = (0, n.useMemo)(function() {
|
|
28198
28221
|
return e(e({}, r), { fromSocketIO: !0 });
|
|
28199
|
-
}, []), i = (0, d.useWebSocket)(_,
|
|
28200
|
-
return
|
|
28222
|
+
}, []), i = (0, d.useWebSocket)(_, m, c), g = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, p = (0, n.useMemo)(function() {
|
|
28223
|
+
return u(t);
|
|
28201
28224
|
}, [t]);
|
|
28202
28225
|
return {
|
|
28203
28226
|
sendMessage: g,
|
|
28204
28227
|
sendJsonMessage: l,
|
|
28205
|
-
lastMessage:
|
|
28206
|
-
lastJsonMessage:
|
|
28228
|
+
lastMessage: p,
|
|
28229
|
+
lastJsonMessage: p,
|
|
28207
28230
|
readyState: y,
|
|
28208
28231
|
getWebSocket: b
|
|
28209
28232
|
};
|
|
28210
28233
|
};
|
|
28211
|
-
return
|
|
28234
|
+
return re.useSocketIO = U, re;
|
|
28212
28235
|
}
|
|
28213
28236
|
var q = {}, Ha;
|
|
28214
|
-
function
|
|
28237
|
+
function $i() {
|
|
28215
28238
|
if (Ha) return q;
|
|
28216
28239
|
Ha = 1;
|
|
28217
28240
|
var e = q && q.__assign || function() {
|
|
28218
28241
|
return e = Object.assign || function(U) {
|
|
28219
28242
|
for (var _, r = 1, c = arguments.length; r < c; r++) {
|
|
28220
28243
|
_ = arguments[r];
|
|
28221
|
-
for (var
|
|
28244
|
+
for (var m in _) Object.prototype.hasOwnProperty.call(_, m) && (U[m] = _[m]);
|
|
28222
28245
|
}
|
|
28223
28246
|
return U;
|
|
28224
28247
|
}, e.apply(this, arguments);
|
|
28225
|
-
},
|
|
28248
|
+
}, n = q && q.__rest || function(U, _) {
|
|
28226
28249
|
var r = {};
|
|
28227
28250
|
for (var c in U) Object.prototype.hasOwnProperty.call(U, c) && _.indexOf(c) < 0 && (r[c] = U[c]);
|
|
28228
28251
|
if (U != null && typeof Object.getOwnPropertySymbols == "function")
|
|
28229
|
-
for (var
|
|
28230
|
-
_.indexOf(c[
|
|
28252
|
+
for (var m = 0, c = Object.getOwnPropertySymbols(U); m < c.length; m++)
|
|
28253
|
+
_.indexOf(c[m]) < 0 && Object.prototype.propertyIsEnumerable.call(U, c[m]) && (r[c[m]] = U[c[m]]);
|
|
28231
28254
|
return r;
|
|
28232
28255
|
};
|
|
28233
28256
|
Object.defineProperty(q, "__esModule", { value: !0 }), q.useEventSource = void 0;
|
|
28234
|
-
var d =
|
|
28235
|
-
_ === void 0 && (_ =
|
|
28236
|
-
var c = _.withCredentials,
|
|
28257
|
+
var d = he, s = ia(), o = A(), u = function(U, _, r) {
|
|
28258
|
+
_ === void 0 && (_ = o.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
28259
|
+
var c = _.withCredentials, m = _.events, i = n(_, ["withCredentials", "events"]);
|
|
28237
28260
|
r === void 0 && (r = !0);
|
|
28238
28261
|
var g = e(e({}, i), { eventSourceOptions: {
|
|
28239
28262
|
withCredentials: c
|
|
28240
|
-
} }), l = (0, d.useRef)(
|
|
28241
|
-
|
|
28242
|
-
var t = (0,
|
|
28263
|
+
} }), l = (0, d.useRef)(o.EMPTY_EVENT_HANDLERS);
|
|
28264
|
+
m && (l.current = m);
|
|
28265
|
+
var t = (0, s.useWebSocket)(U, g, r), y = t.lastMessage, b = t.readyState, p = t.getWebSocket;
|
|
28243
28266
|
return (0, d.useEffect)(function() {
|
|
28244
28267
|
y?.type && Object.entries(l.current).forEach(function(T) {
|
|
28245
28268
|
var N = T[0], D = T[1];
|
|
@@ -28248,39 +28271,39 @@ function qi() {
|
|
|
28248
28271
|
}, [y]), {
|
|
28249
28272
|
lastEvent: y,
|
|
28250
28273
|
readyState: b,
|
|
28251
|
-
getEventSource:
|
|
28274
|
+
getEventSource: p
|
|
28252
28275
|
};
|
|
28253
28276
|
};
|
|
28254
|
-
return q.useEventSource =
|
|
28277
|
+
return q.useEventSource = u, q;
|
|
28255
28278
|
}
|
|
28256
28279
|
var wa;
|
|
28257
|
-
function
|
|
28280
|
+
function el() {
|
|
28258
28281
|
return wa || (wa = 1, (function(e) {
|
|
28259
28282
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
|
|
28260
|
-
var
|
|
28283
|
+
var n = ia();
|
|
28261
28284
|
Object.defineProperty(e, "default", { enumerable: !0, get: function() {
|
|
28262
|
-
return
|
|
28285
|
+
return n.useWebSocket;
|
|
28263
28286
|
} });
|
|
28264
|
-
var d =
|
|
28287
|
+
var d = Xi();
|
|
28265
28288
|
Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
|
|
28266
28289
|
return d.useSocketIO;
|
|
28267
28290
|
} });
|
|
28268
|
-
var
|
|
28291
|
+
var s = A();
|
|
28269
28292
|
Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
|
|
28270
|
-
return
|
|
28293
|
+
return s.ReadyState;
|
|
28271
28294
|
} });
|
|
28272
|
-
var
|
|
28295
|
+
var o = $i();
|
|
28273
28296
|
Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
|
|
28274
|
-
return
|
|
28297
|
+
return o.useEventSource;
|
|
28275
28298
|
} });
|
|
28276
|
-
var
|
|
28299
|
+
var u = aa();
|
|
28277
28300
|
Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
|
|
28278
|
-
return
|
|
28301
|
+
return u.resetGlobalState;
|
|
28279
28302
|
} });
|
|
28280
|
-
})(
|
|
28303
|
+
})(Ie)), Ie;
|
|
28281
28304
|
}
|
|
28282
|
-
var
|
|
28283
|
-
const
|
|
28305
|
+
var al = el();
|
|
28306
|
+
const il = /* @__PURE__ */ Si(al), I = {
|
|
28284
28307
|
DEPOSIT: "deposit",
|
|
28285
28308
|
TRANS_CODE: "transCode",
|
|
28286
28309
|
ERROR: "error",
|
|
@@ -28291,13 +28314,13 @@ const el = /* @__PURE__ */ ki($i), I = {
|
|
|
28291
28314
|
TRANSFER_IN_GAME: "transfer_in_game",
|
|
28292
28315
|
CHECK_REQUEST: "CHECK_RREQUEST",
|
|
28293
28316
|
CASH_REGISTER_LIMIT: "cash_register_limit"
|
|
28294
|
-
},
|
|
28317
|
+
}, ll = 3e4, bl = ({
|
|
28295
28318
|
socketUrl: e,
|
|
28296
|
-
socketHandlers:
|
|
28319
|
+
socketHandlers: n = {},
|
|
28297
28320
|
options: d = {}
|
|
28298
28321
|
}) => {
|
|
28299
|
-
const
|
|
28300
|
-
sendMessage:
|
|
28322
|
+
const s = ya(!1), o = ya(n), {
|
|
28323
|
+
sendMessage: u,
|
|
28301
28324
|
// 發送普通訊息
|
|
28302
28325
|
sendJsonMessage: U,
|
|
28303
28326
|
// 發送 JSON 訊息
|
|
@@ -28307,10 +28330,10 @@ const el = /* @__PURE__ */ ki($i), I = {
|
|
|
28307
28330
|
readyState: r
|
|
28308
28331
|
// WebSocket 連線狀態
|
|
28309
28332
|
// getWebSocket, // 獲取 WebSocket 實例
|
|
28310
|
-
} =
|
|
28333
|
+
} = il(e, {
|
|
28311
28334
|
queryParams: { key: "wsky" },
|
|
28312
28335
|
onOpen: () => console.log("連線成功"),
|
|
28313
|
-
shouldReconnect: () =>
|
|
28336
|
+
shouldReconnect: () => s.current === !1,
|
|
28314
28337
|
reconnectAttempts: 9999,
|
|
28315
28338
|
reconnectInterval: 1e3,
|
|
28316
28339
|
...d
|
|
@@ -28321,34 +28344,34 @@ const el = /* @__PURE__ */ ki($i), I = {
|
|
|
28321
28344
|
return null;
|
|
28322
28345
|
}
|
|
28323
28346
|
}, [_?.data]);
|
|
28324
|
-
return
|
|
28325
|
-
const
|
|
28326
|
-
() =>
|
|
28327
|
-
|
|
28347
|
+
return ve(() => {
|
|
28348
|
+
const m = setInterval(
|
|
28349
|
+
() => u("ping"),
|
|
28350
|
+
ll
|
|
28328
28351
|
);
|
|
28329
|
-
return () => clearInterval(
|
|
28330
|
-
}, [
|
|
28331
|
-
|
|
28332
|
-
}, [
|
|
28352
|
+
return () => clearInterval(m);
|
|
28353
|
+
}, [u]), ve(() => {
|
|
28354
|
+
o.current = n;
|
|
28355
|
+
}, [n]), ve(() => {
|
|
28333
28356
|
if (!c) return;
|
|
28334
28357
|
const {
|
|
28335
|
-
onDeposit:
|
|
28358
|
+
onDeposit: m,
|
|
28336
28359
|
onTransCode: i,
|
|
28337
28360
|
onError: g,
|
|
28338
28361
|
onUpdateMember: l,
|
|
28339
28362
|
onMaintainNotice: t,
|
|
28340
28363
|
onMaintainNoticeMember: y,
|
|
28341
28364
|
onReload: b,
|
|
28342
|
-
onTransferInGame:
|
|
28365
|
+
onTransferInGame: p,
|
|
28343
28366
|
onCashRegisterLimit: T
|
|
28344
|
-
} =
|
|
28345
|
-
memberInfoUid:
|
|
28346
|
-
data:
|
|
28347
|
-
memo:
|
|
28367
|
+
} = o.current, N = Re(c, "type", ""), D = {
|
|
28368
|
+
memberInfoUid: Re(c, "member_info_uid", null),
|
|
28369
|
+
data: Re(c, "data", null),
|
|
28370
|
+
memo: Re(c, "memo", null)
|
|
28348
28371
|
};
|
|
28349
28372
|
switch (N) {
|
|
28350
28373
|
case I.DEPOSIT:
|
|
28351
|
-
|
|
28374
|
+
m?.(D);
|
|
28352
28375
|
break;
|
|
28353
28376
|
case I.TRANS_CODE:
|
|
28354
28377
|
i?.(D);
|
|
@@ -28370,7 +28393,7 @@ const el = /* @__PURE__ */ ki($i), I = {
|
|
|
28370
28393
|
break;
|
|
28371
28394
|
case I.TRANSFER_IN_GAME:
|
|
28372
28395
|
case I.CHECK_REQUEST:
|
|
28373
|
-
|
|
28396
|
+
p?.(D);
|
|
28374
28397
|
break;
|
|
28375
28398
|
case I.CASH_REGISTER_LIMIT:
|
|
28376
28399
|
T?.(D);
|
|
@@ -28379,64 +28402,93 @@ const el = /* @__PURE__ */ ki($i), I = {
|
|
|
28379
28402
|
console.warn("Unknown socket type:", N);
|
|
28380
28403
|
break;
|
|
28381
28404
|
}
|
|
28382
|
-
}, [c]),
|
|
28383
|
-
sendMessage:
|
|
28405
|
+
}, [c]), ve(() => () => s.current = !0, []), {
|
|
28406
|
+
sendMessage: u,
|
|
28384
28407
|
sendJsonMessage: U,
|
|
28385
28408
|
readyState: r
|
|
28386
28409
|
// WebSocket 連線狀態
|
|
28387
28410
|
};
|
|
28388
28411
|
}, Qa = () => {
|
|
28389
|
-
const { client: e } =
|
|
28390
|
-
const { data:
|
|
28391
|
-
return
|
|
28392
|
-
}, [e]), d =
|
|
28393
|
-
return { commonCarouselApi:
|
|
28394
|
-
},
|
|
28412
|
+
const { client: e } = ke(), n = X(async () => {
|
|
28413
|
+
const { data: s } = await e.get("/carousels");
|
|
28414
|
+
return s;
|
|
28415
|
+
}, [e]), d = X(async () => await e.get("/marquees"), [e]);
|
|
28416
|
+
return { commonCarouselApi: n, commonMarqueeApi: d };
|
|
28417
|
+
}, Tl = () => {
|
|
28395
28418
|
const { commonCarouselApi: e } = Qa();
|
|
28396
28419
|
return oe({
|
|
28397
28420
|
queryKey: ["getCarouselList"],
|
|
28398
28421
|
queryFn: async () => await e()
|
|
28399
28422
|
});
|
|
28400
|
-
},
|
|
28401
|
-
const {
|
|
28423
|
+
}, Cl = () => {
|
|
28424
|
+
const { lng: e } = ke(), { commonMarqueeApi: n } = Qa(), d = Zi(e);
|
|
28402
28425
|
return oe({
|
|
28403
28426
|
queryKey: ["getMarqueeList"],
|
|
28404
|
-
queryFn: async () =>
|
|
28405
|
-
select: (
|
|
28427
|
+
queryFn: async () => n(),
|
|
28428
|
+
select: (s) => {
|
|
28429
|
+
const o = s.Marquees;
|
|
28430
|
+
return we(o, (U) => U[d] || U["en-US"]);
|
|
28431
|
+
}
|
|
28406
28432
|
});
|
|
28433
|
+
}, tl = ({ options: e } = {}) => {
|
|
28434
|
+
const { userLoginApi: n } = de();
|
|
28435
|
+
return za({
|
|
28436
|
+
mutationKey: ["userLogin"],
|
|
28437
|
+
mutationFn: async (d) => n(d),
|
|
28438
|
+
...e
|
|
28439
|
+
});
|
|
28440
|
+
}, nl = ({ options: e } = {}) => {
|
|
28441
|
+
const { userLogoutApi: n } = de();
|
|
28442
|
+
return za({
|
|
28443
|
+
mutationKey: ["userLogout"],
|
|
28444
|
+
mutationFn: async () => n(),
|
|
28445
|
+
...e
|
|
28446
|
+
});
|
|
28447
|
+
}, vl = ({
|
|
28448
|
+
options: e = {
|
|
28449
|
+
login: {},
|
|
28450
|
+
logout: {}
|
|
28451
|
+
}
|
|
28452
|
+
} = {}) => {
|
|
28453
|
+
const n = tl({ options: e.login }), d = nl({ options: e.logout });
|
|
28454
|
+
return { login: n, logout: d };
|
|
28407
28455
|
};
|
|
28408
28456
|
export {
|
|
28409
|
-
|
|
28410
|
-
|
|
28411
|
-
|
|
28412
|
-
|
|
28413
|
-
|
|
28414
|
-
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
|
|
28418
|
-
|
|
28419
|
-
|
|
28457
|
+
Za as ApiCtx,
|
|
28458
|
+
_l as ApiProvider,
|
|
28459
|
+
Va as GamesInfoCtx,
|
|
28460
|
+
Fi as buildMultiTypes,
|
|
28461
|
+
dl as buildMultiTypesWithSubTypes,
|
|
28462
|
+
Ri as buildSinglePlatformWithSubTypes,
|
|
28463
|
+
Mi as buildSingleType,
|
|
28464
|
+
wi as categorizeGames,
|
|
28465
|
+
Zi as convertLanguageCode,
|
|
28466
|
+
gl as createLogoutHandler,
|
|
28467
|
+
Oi as extractGameSubTypeNames,
|
|
28468
|
+
xi as extractGameTypeNames,
|
|
28420
28469
|
va as extractPlatformNames,
|
|
28421
|
-
|
|
28422
|
-
|
|
28423
|
-
|
|
28424
|
-
|
|
28425
|
-
|
|
28426
|
-
|
|
28427
|
-
|
|
28428
|
-
|
|
28429
|
-
|
|
28430
|
-
|
|
28431
|
-
|
|
28432
|
-
|
|
28433
|
-
|
|
28434
|
-
|
|
28435
|
-
|
|
28436
|
-
|
|
28437
|
-
|
|
28438
|
-
|
|
28439
|
-
|
|
28440
|
-
|
|
28441
|
-
|
|
28470
|
+
Ka as filterGamesByPlatform,
|
|
28471
|
+
Ia as findGameTypeUid,
|
|
28472
|
+
Aa as findPlatformUid,
|
|
28473
|
+
Ba as findSubPlatform,
|
|
28474
|
+
Pi as flattenAllGames,
|
|
28475
|
+
Hi as flattenFavoriteGames,
|
|
28476
|
+
Wi as groupGamesByPlatform,
|
|
28477
|
+
Ji as groupGamesByPlatformAndSubType,
|
|
28478
|
+
Gi as groupGamesBySubType,
|
|
28479
|
+
Ai as initMockWindowData,
|
|
28480
|
+
zi as processGameInfo,
|
|
28481
|
+
cl as processPlatformData,
|
|
28482
|
+
ke as useApiContext,
|
|
28483
|
+
fl as useBalanceGetter,
|
|
28484
|
+
bl as useClientWebSocket,
|
|
28485
|
+
pl as useGameInfoContext,
|
|
28486
|
+
Ii as useGamesInfo,
|
|
28487
|
+
Tl as useGetCarouseList,
|
|
28488
|
+
Cl as useGetMarquee,
|
|
28489
|
+
Ul as useGetMemberInfo,
|
|
28490
|
+
yl as useInitializeWithToken,
|
|
28491
|
+
tl as useLogin,
|
|
28492
|
+
nl as useLogout,
|
|
28493
|
+
vl as useUser
|
|
28442
28494
|
};
|