@obb871001/api-integration-sdk 1.0.81 → 1.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
- import he, { createContext as Fa, useContext as Wa, useCallback as X, useMemo as je, useEffect as ve, useRef as ya } from "react";
1
+ import he, { createContext as Fa, useContext as Wa, useCallback as X, useMemo as Qe, useEffect as ve, useRef as ya } from "react";
2
2
  import { useQuery as oe, QueryClient as Ci, QueryClientProvider as vi, useQueries as Ja, useMutation as za } from "@tanstack/react-query";
3
3
  import hi from "axios";
4
- import { find as Qe, isEmpty as O, isObject as Oe, flatMap as Ye, isArray as ee, map as qe, get as Me } from "lodash";
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
5
  import ki from "react-dom";
6
6
  function Si(e) {
7
7
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
8
8
  }
9
- var Re = { exports: {} }, ye = {};
9
+ var Pe = { exports: {} }, ye = {};
10
10
  var ba;
11
11
  function Ni() {
12
12
  if (ba) return ye;
13
13
  ba = 1;
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, p = { key: !0, ref: !0, __self: !0, __source: !0 };
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
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 (m in r) s.call(r, m) && !p.hasOwnProperty(m) && (i[m] = r[m]);
18
+ for (m in r) s.call(r, m) && !u.hasOwnProperty(m) && (i[m] = r[m]);
19
19
  if (_ && _.defaultProps) for (m in r = _.defaultProps, r) i[m] === void 0 && (i[m] = r[m]);
20
20
  return { $$typeof: n, type: _, key: g, ref: l, props: i, _owner: o.current };
21
21
  }
@@ -25,14 +25,14 @@ var be = {};
25
25
  var Ta;
26
26
  function Di() {
27
27
  return Ta || (Ta = 1, process.env.NODE_ENV !== "production" && (function() {
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"), p = 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";
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 u = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
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 Di() {
42
42
  }
43
43
  function N(a, f, C) {
44
44
  {
45
- var v = u.ReactDebugCurrentFrame, E = v.getStackAddendum();
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);
@@ -52,14 +52,14 @@ function Di() {
52
52
  }
53
53
  var D = !1, h = !1, L = !1, M = !1, ce = !1, _e;
54
54
  _e = Symbol.for("react.module.reference");
55
- function we(a) {
56
- return !!(typeof a == "string" || typeof a == "function" || a === s || a === p || 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
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
60
  a.$$typeof === _e || a.getModuleId !== void 0));
61
61
  }
62
- function ke(a, f, C) {
62
+ function Se(a, f, C) {
63
63
  var v = a.displayName;
64
64
  if (v)
65
65
  return v;
@@ -81,7 +81,7 @@ function Di() {
81
81
  return "Fragment";
82
82
  case d:
83
83
  return "Portal";
84
- case p:
84
+ case u:
85
85
  return "Profiler";
86
86
  case o:
87
87
  return "StrictMode";
@@ -99,7 +99,7 @@ function Di() {
99
99
  var C = a;
100
100
  return V(C._context) + ".Provider";
101
101
  case r:
102
- return ke(a, a.render, "ForwardRef");
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,14 +114,14 @@ function Di() {
114
114
  }
115
115
  return null;
116
116
  }
117
- var Z = Object.assign, ae = 0, B, Se, Ne, x, w, K, fe;
117
+ var Z = Object.assign, ae = 0, B, Ne, De, x, w, K, fe;
118
118
  function ie() {
119
119
  }
120
120
  ie.__reactDisabledLog = !0;
121
121
  function $() {
122
122
  {
123
123
  if (ae === 0) {
124
- B = console.log, Se = console.info, Ne = console.warn, x = console.error, w = console.group, K = console.groupCollapsed, fe = console.groupEnd;
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,
@@ -141,7 +141,7 @@ function Di() {
141
141
  ae++;
142
142
  }
143
143
  }
144
- function De() {
144
+ function Ee() {
145
145
  {
146
146
  if (ae--, ae === 0) {
147
147
  var a = {
@@ -154,10 +154,10 @@ function Di() {
154
154
  value: B
155
155
  }),
156
156
  info: Z({}, a, {
157
- value: Se
157
+ value: Ne
158
158
  }),
159
159
  warn: Z({}, a, {
160
- value: Ne
160
+ value: De
161
161
  }),
162
162
  error: Z({}, a, {
163
163
  value: x
@@ -176,7 +176,7 @@ function Di() {
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 = u.ReactCurrentDispatcher, j;
179
+ var se = p.ReactCurrentDispatcher, j;
180
180
  function ue(a, f, C) {
181
181
  {
182
182
  if (j === void 0)
@@ -190,16 +190,16 @@ function Di() {
190
190
  ` + j + a;
191
191
  }
192
192
  }
193
- var le = !1, Ee;
193
+ var le = !1, Le;
194
194
  {
195
195
  var Ya = typeof WeakMap == "function" ? WeakMap : Map;
196
- Ee = new Ya();
196
+ Le = new Ya();
197
197
  }
198
198
  function la(a, f) {
199
199
  if (!a || le)
200
200
  return "";
201
201
  {
202
- var C = Ee.get(a);
202
+ var C = Le.get(a);
203
203
  if (C !== void 0)
204
204
  return C;
205
205
  }
@@ -254,17 +254,17 @@ function Di() {
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" && Ee.set(a, z), z;
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
- le = !1, se.current = G, De(), Error.prepareStackTrace = E;
264
+ le = !1, se.current = G, Ee(), Error.prepareStackTrace = E;
265
265
  }
266
266
  var ge = a ? a.displayName || a.name : "", te = ge ? ue(ge) : "";
267
- return typeof a == "function" && Ee.set(a, te), te;
267
+ return typeof a == "function" && Le.set(a, te), te;
268
268
  }
269
269
  function qa(a, f, C) {
270
270
  return la(a, !1);
@@ -273,7 +273,7 @@ function Di() {
273
273
  var f = a.prototype;
274
274
  return !!(f && f.isReactComponent);
275
275
  }
276
- function Le(a, f, C) {
276
+ function Ge(a, f, C) {
277
277
  if (a == null)
278
278
  return "";
279
279
  if (typeof a == "function")
@@ -291,21 +291,21 @@ function Di() {
291
291
  case r:
292
292
  return qa(a.render);
293
293
  case i:
294
- return Le(a.type, f, C);
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 Le(G(E), f, C);
298
+ return Ge(G(E), f, C);
299
299
  } catch {
300
300
  }
301
301
  }
302
302
  }
303
303
  return "";
304
304
  }
305
- var Ue = Object.prototype.hasOwnProperty, ta = {}, na = u.ReactDebugCurrentFrame;
306
- function Ge(a) {
305
+ var Ue = Object.prototype.hasOwnProperty, ta = {}, na = p.ReactDebugCurrentFrame;
306
+ function Me(a) {
307
307
  if (a) {
308
- var f = a._owner, C = Le(a.type, a._source, f ? f.type : null);
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);
@@ -325,12 +325,12 @@ function Di() {
325
325
  } catch (R) {
326
326
  k = R;
327
327
  }
328
- k && !(k instanceof Error) && (Ge(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), Ge(null)), k instanceof Error && !(k.message in ta) && (ta[k.message] = !0, Ge(E), T("Failed %s type: %s", C, k.message), Ge(null));
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
332
  var ei = Array.isArray;
333
- function Fe(a) {
333
+ function We(a) {
334
334
  return ei(a);
335
335
  }
336
336
  function ai(a) {
@@ -353,7 +353,7 @@ function Di() {
353
353
  if (ii(a))
354
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 = u.ReactCurrentOwner, li = {
356
+ var oa = p.ReactCurrentOwner, li = {
357
357
  key: !0,
358
358
  ref: !0,
359
359
  __self: !0,
@@ -447,23 +447,23 @@ function Di() {
447
447
  return si(a, k, F, E, v, oa.current, S);
448
448
  }
449
449
  }
450
- var We = u.ReactCurrentOwner, pa = u.ReactDebugCurrentFrame;
450
+ var Je = p.ReactCurrentOwner, pa = p.ReactDebugCurrentFrame;
451
451
  function pe(a) {
452
452
  if (a) {
453
- var f = a._owner, C = Le(a.type, a._source, f ? f.type : null);
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 Je;
459
- Je = !1;
460
- function ze(a) {
458
+ var ze;
459
+ ze = !1;
460
+ function Ze(a) {
461
461
  return typeof a == "object" && a !== null && a.$$typeof === n;
462
462
  }
463
463
  function ga() {
464
464
  {
465
- if (We.current) {
466
- var a = H(We.current.type);
465
+ if (Je.current) {
466
+ var a = H(Je.current.type);
467
467
  if (a)
468
468
  return `
469
469
 
@@ -498,25 +498,25 @@ Check the top-level render call using <` + C + ">.");
498
498
  return;
499
499
  da[C] = !0;
500
500
  var v = "";
501
- a && a._owner && a._owner !== We.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);
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 (Fe(a))
508
+ if (We(a))
509
509
  for (var C = 0; C < a.length; C++) {
510
510
  var v = a[C];
511
- ze(v) && ca(v, f);
511
+ Ze(v) && ca(v, f);
512
512
  }
513
- else if (ze(a))
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
- ze(S.value) && ca(S.value, f);
519
+ Ze(S.value) && ca(S.value, f);
520
520
  }
521
521
  }
522
522
  }
@@ -537,8 +537,8 @@ Check the top-level render call using <` + C + ">.");
537
537
  if (C) {
538
538
  var v = H(f);
539
539
  $a(C, a.props, "prop", v, a);
540
- } else if (f.PropTypes !== void 0 && !Je) {
541
- Je = !0;
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
  }
@@ -560,14 +560,14 @@ 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 = we(a);
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
567
  var F = pi();
568
568
  F ? k += F : k += ga();
569
569
  var R;
570
- a === null ? R = "null" : Fe(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);
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
572
  var P = ui(a, f, C, E, G);
573
573
  if (P == null)
@@ -576,7 +576,7 @@ Check the top-level render call using <` + C + ">.");
576
576
  var z = f.children;
577
577
  if (z !== void 0)
578
578
  if (v)
579
- if (Fe(z)) {
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);
@@ -588,15 +588,15 @@ Check the top-level render call using <` + C + ">.");
588
588
  if (Ue.call(f, "key")) {
589
589
  var te = H(a), W = Object.keys(f).filter(function(Ti) {
590
590
  return Ti !== "key";
591
- }), Ze = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
592
- if (!fa[te + Ze]) {
591
+ }), Ve = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
592
+ if (!fa[te + Ve]) {
593
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} />`, Ze, te, bi, te), fa[te + Ze] = !0;
599
+ <%s key={someKey} {...props} />`, Ve, te, bi, te), fa[te + Ve] = !0;
600
600
  }
601
601
  }
602
602
  return a === s ? ci(P) : di(P), P;
@@ -614,10 +614,10 @@ React keys must be passed directly to JSX without using spread:
614
614
  }
615
615
  var Ca;
616
616
  function Ei() {
617
- return Ca || (Ca = 1, process.env.NODE_ENV === "production" ? Re.exports = Ni() : Re.exports = Di()), Re.exports;
617
+ return Ca || (Ca = 1, process.env.NODE_ENV === "production" ? Pe.exports = Ni() : Pe.exports = Di()), Pe.exports;
618
618
  }
619
- var xe = Ei();
620
- const Za = Fa(null), He = () => {
619
+ var Oe = Ei();
620
+ const Za = Fa(null), ke = () => {
621
621
  const e = Wa(Za);
622
622
  if (!e)
623
623
  throw new Error("useApiContext must be used within ApiProvider");
@@ -629,7 +629,7 @@ function Li({
629
629
  timeoutMs: d = 15e3,
630
630
  lng: s = "tw",
631
631
  store: o,
632
- onError: p
632
+ onError: u
633
633
  } = {}) {
634
634
  const U = hi.create({
635
635
  baseURL: e,
@@ -645,23 +645,23 @@ function Li({
645
645
  return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang = s, _;
646
646
  }), U.interceptors.response.use(
647
647
  (_) => _.data,
648
- (_) => p ? p(_, { instance: U }) : Promise.reject(_)
648
+ (_) => u ? u(_, { instance: U }) : Promise.reject(_)
649
649
  ), U;
650
650
  }
651
- const Va = Fa(null), ul = () => {
651
+ const Va = Fa(null), pl = () => {
652
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
- }, pl = () => {
658
+ }, gl = () => {
659
659
  const e = (s, o) => !s && !o, n = (s) => s.startsWith("pc.");
660
660
  return {
661
661
  executeLogout: ({
662
662
  isCallBackInvalid: s = !1,
663
663
  hostname: o = "",
664
- shouldRedirect: p,
664
+ shouldRedirect: u,
665
665
  onShowError: U,
666
666
  onCleanup: _,
667
667
  onRemoveToken: r,
@@ -669,12 +669,12 @@ const Va = Fa(null), ul = () => {
669
669
  onGoogleLogout: m
670
670
  }) => {
671
671
  const i = n(o);
672
- e(s, i) && U?.(), _?.(), r?.(), p && c?.("/"), m?.();
672
+ e(s, i) && U?.(), _?.(), r?.(), u && c?.("/"), m?.();
673
673
  },
674
674
  shouldShowErrorNotice: e,
675
675
  isMachineDomain: n
676
676
  };
677
- }, Ia = (e = [], n) => Qe(e, { gameTypeName: n })?.gameTypeUid, Aa = (e = [], n) => Qe(e, { platform: n })?.platformUid, Ba = (e = [], n) => Qe(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) => {
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
678
  const s = d?.game_subtype || "UNKNOWN";
679
679
  return n[s] || (n[s] = []), n[s].push(d), n;
680
680
  }, {}), Mi = ({
@@ -684,9 +684,9 @@ const Va = Fa(null), ul = () => {
684
684
  allGameTypes: s,
685
685
  allPlatforms: o
686
686
  }) => {
687
- const p = Ia(s, e);
688
- return p ? n.reduce((U, _) => {
689
- const r = Aa(o, _), c = Ba(o, _), m = d[p] || [], i = Ka(
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
690
  m,
691
691
  r,
692
692
  c
@@ -698,16 +698,16 @@ const Va = Fa(null), ul = () => {
698
698
  gamesOfType: n = [],
699
699
  allPlatforms: d = []
700
700
  }) => {
701
- const s = Aa(d, e), o = Ba(d, e), p = Ka(
701
+ const s = Aa(d, e), o = Ba(d, e), u = Ka(
702
702
  n,
703
703
  s,
704
704
  o
705
705
  );
706
- return Gi(p);
707
- }, Pi = (e = {}) => !Oe(e) || O(e) ? [] : Ye(e), va = (e = []) => !ee(e) || O(e) ? [] : qe(e, "platform"), xi = (e = []) => !ee(e) || O(e) ? [] : qe(e, "gameTypeName"), Oi = (e = []) => !ee(e) || O(e) ? [] : qe(e, "game_subtype"), Hi = (e = {}) => !Oe(e) || O(e) ? [] : Ye(e), wi = (e = [], n = []) => !ee(e) || O(e) ? {} : !ee(n) || O(n) ? {} : e.reduce((d, s) => {
708
- const o = n.map((p) => p.game_subtype);
709
- return o.forEach((p) => {
710
- d[p] = d[p] || [];
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
711
  }), o.includes(s.game_subtype) && d[s.game_subtype].push(s), d;
712
712
  }, {}), Fi = ({
713
713
  gameTypes: e = [],
@@ -715,7 +715,7 @@ const Va = Fa(null), ul = () => {
715
715
  gameList: d = {},
716
716
  allGameTypes: s = [],
717
717
  allPlatforms: o = []
718
- }) => !ee(e) || !ee(n) ? {} : O(d) ? {} : e.reduce((p, U) => {
718
+ }) => !ee(e) || !ee(n) ? {} : O(d) ? {} : e.reduce((u, U) => {
719
719
  const _ = Mi({
720
720
  gameTypeName: U,
721
721
  platforms: n,
@@ -723,16 +723,16 @@ const Va = Fa(null), ul = () => {
723
723
  allGameTypes: s,
724
724
  allPlatforms: o
725
725
  });
726
- return O(_) || (p[U] = _), p;
727
- }, {}), gl = ({
726
+ return O(_) || (u[U] = _), u;
727
+ }, {}), dl = ({
728
728
  types: e = [],
729
729
  platforms: n = [],
730
730
  allGameType: d = [],
731
731
  allGamePlatform: s = [],
732
732
  allGameList: o = {}
733
- } = {}) => !Array.isArray(e) || !Array.isArray(n) ? {} : e.reduce((p, U) => {
733
+ } = {}) => !Array.isArray(e) || !Array.isArray(n) ? {} : e.reduce((u, U) => {
734
734
  const _ = Ia(d, U);
735
- if (!_) return p;
735
+ if (!_) return u;
736
736
  const r = o[_] || [], c = n.reduce((m, i) => {
737
737
  const g = Ri({
738
738
  platformName: i,
@@ -741,17 +741,17 @@ const Va = Fa(null), ul = () => {
741
741
  });
742
742
  return O(g) ? m : { ...m, [i]: g };
743
743
  }, {});
744
- return O(c) || (p[U] = c), p;
745
- }, {}), Wi = (e = {}) => !Oe(e) || O(e) ? {} : Object.values(e).reduce((d, s) => (Object.entries(s).forEach(([o, p]) => {
746
- d[o] ? d[o] = [...d[o], ...p] : d[o] = p;
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
747
  }), d), {}), Ji = (e = {}) => {
748
- if (!Oe(e) || O(e)) return {};
748
+ if (!He(e) || O(e)) return {};
749
749
  const n = {};
750
750
  for (const [d, s] of Object.entries(e)) {
751
751
  n[d] = {};
752
752
  for (const o of s) {
753
- const p = o.game_subtype;
754
- n[d][p] || (n[d][p] = []), n[d][p].push(o);
753
+ const u = o.game_subtype;
754
+ n[d][u] || (n[d][u] = []), n[d][u].push(o);
755
755
  }
756
756
  }
757
757
  return n;
@@ -761,20 +761,20 @@ const Va = Fa(null), ul = () => {
761
761
  allGameType: d = [],
762
762
  allGame_subtype: s = [],
763
763
  allNewGameList: o = [],
764
- allTopGameList: p = [],
764
+ allTopGameList: u = [],
765
765
  randomlySelectedGames: U = [],
766
766
  userFavoriteGame: _ = {},
767
767
  exclusiveBrandGames: r = [],
768
768
  highlightGames: c = [],
769
769
  originPlatform: m = []
770
770
  }) => {
771
- const i = Pi(e), g = va(n), l = xi(d), t = Oi(s), y = va(m), b = Hi(_), u = Fi({
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
776
  allPlatforms: n
777
- }), T = wi(i, s), N = Wi(u), D = Ji(N);
777
+ }), T = wi(i, s), N = Wi(p), D = Ji(N);
778
778
  return {
779
779
  platform: {
780
780
  all: g,
@@ -787,7 +787,7 @@ const Va = Fa(null), ul = () => {
787
787
  gameList: {
788
788
  all: i,
789
789
  new: o,
790
- top: p,
790
+ top: u,
791
791
  favorite: b,
792
792
  highlight: c,
793
793
  exclusiveBrand: r,
@@ -802,13 +802,32 @@ const Va = Fa(null), ul = () => {
802
802
  favorite: b
803
803
  }
804
804
  };
805
- }, dl = (e = []) => !ee(e) || O(e) ? [] : Ye(e, (n) => O(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((d) => ({
805
+ }, cl = (e = []) => !ee(e) || O(e) ? [] : qe(e, (n) => O(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((d) => ({
806
806
  ...n,
807
807
  ...d,
808
808
  platform: d.SubPlatformEnum,
809
809
  platformEnum: d.SubPlatformEnum
810
- }))), de = () => {
811
- const { client: e } = He(), n = X(
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(
812
831
  async (r) => {
813
832
  const { mac_address: c = "", app_version: m = "", anydesk_id: i = "" } = r, { data: g } = await e.post("/cash-register/login", {
814
833
  mac_address: c,
@@ -818,7 +837,7 @@ const Va = Fa(null), ul = () => {
818
837
  return g;
819
838
  },
820
839
  [e]
821
- ), 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]), p = X(async () => await e.get("member/getFavoriteGame"), [e]), U = X(
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(
822
841
  async (r) => {
823
842
  const { account: c, password: m, trans_code: i } = r;
824
843
  return await e.post("/login", {
@@ -833,12 +852,12 @@ const Va = Fa(null), ul = () => {
833
852
  machineLoginApi: n,
834
853
  userInfoApi: d,
835
854
  userGameListApi: s,
836
- userFavoriteGameApi: p,
855
+ userFavoriteGameApi: u,
837
856
  userCurrencyExchangeApi: o,
838
857
  userLoginApi: U,
839
858
  userLogoutApi: _
840
859
  };
841
- }, Zi = {
860
+ }, Vi = {
842
861
  platform: { all: [], origin: [] },
843
862
  type: { main: [], sub: [] },
844
863
  gameList: {
@@ -856,8 +875,8 @@ const Va = Fa(null), ul = () => {
856
875
  byPlatformAndCategory: {}
857
876
  },
858
877
  user: { favorite: [] }
859
- }, Vi = ({ enabled: e = !0 } = {}) => {
860
- const { userFavoriteGameApi: n } = de(), { data: d, isLoading: s, error: o, refetch: p } = oe({
878
+ }, Ii = ({ enabled: e = !0 } = {}) => {
879
+ const { userFavoriteGameApi: n } = de(), { data: d, isLoading: s, error: o, refetch: u } = oe({
861
880
  queryKey: ["gamesInfo"],
862
881
  queryFn: async () => {
863
882
  const U = await n();
@@ -884,12 +903,12 @@ const Va = Fa(null), ul = () => {
884
903
  refetchOnWindowFocus: !1
885
904
  });
886
905
  return {
887
- gamesInfo: d || Zi,
906
+ gamesInfo: d || Vi,
888
907
  isLoading: s,
889
908
  error: o,
890
- refetch: p
909
+ refetch: u
891
910
  };
892
- }, Ii = (e = !1) => {
911
+ }, Ai = (e = !1) => {
893
912
  !e && window.gameTypeGroup || (e || !window.gameTypeGroup) && (window.gameTypeGroup = window.gameTypeGroup || {
894
913
  1: [
895
914
  {
@@ -27412,25 +27431,25 @@ const Va = Fa(null), ul = () => {
27412
27431
  is_invalid_bet: 0
27413
27432
  }
27414
27433
  });
27415
- }, Ai = ({
27434
+ }, Bi = ({
27416
27435
  children: e,
27417
27436
  autoFetch: n = !1,
27418
27437
  mockData: d = !1
27419
27438
  }) => {
27420
27439
  ve(() => {
27421
- d && Ii(!0);
27440
+ d && Ai(!0);
27422
27441
  }, [d]);
27423
- const s = Vi({ enabled: n });
27424
- return /* @__PURE__ */ xe.jsx(Va.Provider, { value: s, children: e });
27442
+ const s = Ii({ enabled: n });
27443
+ return /* @__PURE__ */ Oe.jsx(Va.Provider, { value: s, children: e });
27425
27444
  };
27426
- function cl({
27445
+ function _l({
27427
27446
  children: e,
27428
27447
  autoFetchGamesInfo: n = !1,
27429
27448
  useMockData: d = !1,
27430
27449
  queryClient: s,
27431
27450
  ...o
27432
27451
  }) {
27433
- const p = je(() => Li(o), [o]), U = je(
27452
+ const u = Qe(() => Li(o), [o]), U = Qe(
27434
27453
  () => new Ci({
27435
27454
  defaultOptions: {
27436
27455
  queries: {
@@ -27441,10 +27460,10 @@ function cl({
27441
27460
  }),
27442
27461
  []
27443
27462
  ), _ = s || U;
27444
- return /* @__PURE__ */ xe.jsx(vi, { client: _, children: /* @__PURE__ */ xe.jsx(Za.Provider, { value: { client: p, ...o }, children: /* @__PURE__ */ xe.jsx(Ai, { autoFetch: n, mockData: d, children: e }) }) });
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 }) }) });
27445
27464
  }
27446
- const _l = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
27447
- const { userCurrencyExchangeApi: d } = de(), { getToken: s } = He(), { enabled: o, ...p } = n, U = !!s && (o ? o.every((_) => _) : !0);
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);
27448
27467
  return Ja({
27449
27468
  queries: [
27450
27469
  {
@@ -27452,17 +27471,17 @@ const _l = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
27452
27471
  queryFn: () => d(),
27453
27472
  enabled: U,
27454
27473
  // ← 使用合併後的條件
27455
- ...p
27474
+ ...u
27456
27475
  // ← 不包含 enabled
27457
27476
  }
27458
27477
  ]
27459
27478
  });
27460
- }, fl = ({
27479
+ }, Ul = ({
27461
27480
  refetchInterval: e = 5e4,
27462
27481
  trigger: n = [],
27463
27482
  enabled: d = !0
27464
27483
  } = {}) => {
27465
- const { getToken: s } = He(), { userInfoApi: o } = de(), p = Ja({
27484
+ const { getToken: s } = ke(), { userInfoApi: o } = de(), u = Ja({
27466
27485
  queries: [
27467
27486
  {
27468
27487
  queryKey: ["getMemberInfo", ...n],
@@ -27471,39 +27490,39 @@ const _l = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
27471
27490
  enabled: !!s && d
27472
27491
  }
27473
27492
  ]
27474
- }), { data: U, isFetching: _, error: r } = p[0] || {};
27493
+ }), { data: U, isFetching: _, error: r } = u[0] || {};
27475
27494
  return { data: U, isFetching: _, error: r };
27476
- }, Ul = ({ enabled: e = !0 } = {}) => {
27495
+ }, yl = ({ enabled: e = !0 } = {}) => {
27477
27496
  const {
27478
27497
  userInfoApi: n,
27479
27498
  userFavoriteGameApi: d,
27480
27499
  userGameListApi: s,
27481
27500
  userCurrencyExchangeApi: o
27482
- } = de(), p = oe({
27501
+ } = de(), u = oe({
27483
27502
  queryKey: ["getMemInfo"],
27484
27503
  queryFn: async () => n(),
27485
27504
  enabled: e
27486
27505
  }), U = oe({
27487
27506
  queryKey: ["getFavoriteGame"],
27488
27507
  queryFn: async () => d(),
27489
- enabled: e && p.isSuccess
27508
+ enabled: e && u.isSuccess
27490
27509
  }), _ = oe({
27491
27510
  queryKey: ["getUserGameList"],
27492
27511
  queryFn: async () => s(),
27493
- enabled: e && p.isSuccess && U.isSuccess
27512
+ enabled: e && u.isSuccess && U.isSuccess
27494
27513
  }), r = oe({
27495
27514
  queryKey: ["getUserCurrencyExchange"],
27496
27515
  queryFn: async () => o(),
27497
- enabled: e && p.isSuccess && U.isSuccess && _.isSuccess
27516
+ enabled: e && u.isSuccess && U.isSuccess && _.isSuccess
27498
27517
  });
27499
27518
  return [
27500
- p,
27519
+ u,
27501
27520
  U,
27502
27521
  _,
27503
27522
  r
27504
27523
  ];
27505
27524
  };
27506
- var Ve = {}, J = {}, Ie = {}, ha;
27525
+ var Ie = {}, J = {}, Ae = {}, ha;
27507
27526
  function A() {
27508
27527
  return ha || (ha = 1, (function(e) {
27509
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;
@@ -27517,8 +27536,8 @@ function A() {
27517
27536
  interval: 25e3
27518
27537
  };
27519
27538
  var s;
27520
- (function(p) {
27521
- p[p.UNINSTANTIATED = -1] = "UNINSTANTIATED", p[p.CONNECTING = 0] = "CONNECTING", p[p.OPEN = 1] = "OPEN", p[p.CLOSING = 2] = "CLOSING", p[p.CLOSED = 3] = "CLOSED";
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";
27522
27541
  })(s || (e.ReadyState = s = {}));
27523
27542
  var o = function() {
27524
27543
  try {
@@ -27528,9 +27547,9 @@ function A() {
27528
27547
  }
27529
27548
  };
27530
27549
  e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && o();
27531
- })(Ie)), Ie;
27550
+ })(Ae)), Ae;
27532
27551
  }
27533
- var Te = {}, Ae = {}, ka;
27552
+ var Te = {}, Be = {}, ka;
27534
27553
  function Xe() {
27535
27554
  return ka || (ka = 1, (function(e) {
27536
27555
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
@@ -27542,7 +27561,7 @@ function Xe() {
27542
27561
  e.sharedWebSockets.hasOwnProperty(s) && delete e.sharedWebSockets[s];
27543
27562
  };
27544
27563
  e.resetWebSockets = n;
27545
- })(Ae)), Ae;
27564
+ })(Be)), Be;
27546
27565
  }
27547
27566
  var ne = {}, Q = {}, Sa;
27548
27567
  function $e() {
@@ -27550,49 +27569,49 @@ function $e() {
27550
27569
  Sa = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.setUpSocketIOPing = Q.appendQueryParams = Q.parseSocketIOUrl = void 0;
27551
27570
  var e = A(), n = function(o) {
27552
27571
  if (o) {
27553
- var p = /^https|wss/.test(o), U = o.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), r = p ? "wss" : "ws";
27572
+ var u = /^https|wss/.test(o), U = o.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), r = u ? "wss" : "ws";
27554
27573
  return "".concat(r, "://").concat(_).concat(e.SOCKET_IO_PATH);
27555
27574
  } else if (o === "") {
27556
- var p = /^https/.test(window.location.protocol), r = p ? "wss" : "ws", c = window.location.port ? ":".concat(window.location.port) : "";
27575
+ var u = /^https/.test(window.location.protocol), r = u ? "wss" : "ws", c = window.location.port ? ":".concat(window.location.port) : "";
27557
27576
  return "".concat(r, "://").concat(window.location.hostname).concat(c).concat(e.SOCKET_IO_PATH);
27558
27577
  }
27559
27578
  return o;
27560
27579
  };
27561
27580
  Q.parseSocketIOUrl = n;
27562
- var d = function(o, p) {
27563
- p === void 0 && (p = {});
27564
- var U = /\?([\w]+=[\w]+)/, _ = U.test(o), r = "".concat(Object.entries(p).reduce(function(c, m) {
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) {
27565
27584
  var i = m[0], g = m[1];
27566
27585
  return c + "".concat(i, "=").concat(g, "&");
27567
27586
  }, "").slice(0, -1));
27568
27587
  return "".concat(o).concat(_ ? "&" : "?").concat(r);
27569
27588
  };
27570
27589
  Q.appendQueryParams = d;
27571
- var s = function(o, p) {
27572
- p === void 0 && (p = e.SOCKET_IO_PING_INTERVAL);
27590
+ var s = function(o, u) {
27591
+ u === void 0 && (u = e.SOCKET_IO_PING_INTERVAL);
27573
27592
  var U = function() {
27574
27593
  return o(e.SOCKET_IO_PING_CODE);
27575
27594
  };
27576
- return window.setInterval(U, p);
27595
+ return window.setInterval(U, u);
27577
27596
  };
27578
27597
  return Q.setUpSocketIOPing = s, Q;
27579
27598
  }
27580
- var Pe = {}, Na;
27599
+ var xe = {}, Na;
27581
27600
  function ja() {
27582
- if (Na) return Pe;
27583
- Na = 1, Object.defineProperty(Pe, "__esModule", { value: !0 }), Pe.heartbeat = d;
27601
+ if (Na) return xe;
27602
+ Na = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.heartbeat = d;
27584
27603
  var e = A();
27585
27604
  function n(s) {
27586
- return Array.isArray(s) ? s.reduce(function(o, p) {
27587
- return o.current > p.current ? o : p;
27605
+ return Array.isArray(s) ? s.reduce(function(o, u) {
27606
+ return o.current > u.current ? o : u;
27588
27607
  }).current : s.current;
27589
27608
  }
27590
- function d(s, o, p) {
27591
- var U = p || {}, _ = 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() {
27592
- var b = Date.now(), u = n(o);
27593
- if (u + m <= b)
27594
- console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - u, "ms ago, last ping sent ").concat(b - t, "ms ago")), s.close();
27595
- else if (u + r <= b && t + r <= b)
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)
27596
27615
  try {
27597
27616
  typeof g == "function" ? s.send(g()) : s.send(g), t = b;
27598
27617
  } catch (T) {
@@ -27604,9 +27623,9 @@ function ja() {
27604
27623
  }), function() {
27605
27624
  };
27606
27625
  }
27607
- return Pe;
27626
+ return xe;
27608
27627
  }
27609
- var Ce = {}, Be = {}, Da;
27628
+ var Ce = {}, Ke = {}, Da;
27610
27629
  function ea() {
27611
27630
  return Da || (Da = 1, (function(e) {
27612
27631
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
@@ -27619,10 +27638,10 @@ function ea() {
27619
27638
  return ((c = n[r]) === null || c === void 0 ? void 0 : c.size) > 0;
27620
27639
  };
27621
27640
  e.hasSubscribers = o;
27622
- var p = function(r, c) {
27641
+ var u = function(r, c) {
27623
27642
  n[r] = n[r] || /* @__PURE__ */ new Set(), n[r].add(c);
27624
27643
  };
27625
- e.addSubscriber = p;
27644
+ e.addSubscriber = u;
27626
27645
  var U = function(r, c) {
27627
27646
  n[r].delete(c);
27628
27647
  };
@@ -27635,15 +27654,15 @@ function ea() {
27635
27654
  n.hasOwnProperty(c) && delete n[c];
27636
27655
  };
27637
27656
  e.resetSubscribers = _;
27638
- })(Be)), Be;
27657
+ })(Ke)), Ke;
27639
27658
  }
27640
27659
  var Ea;
27641
27660
  function aa() {
27642
27661
  if (Ea) return Ce;
27643
27662
  Ea = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.assertIsWebSocket = d, Ce.resetGlobalState = s;
27644
27663
  var e = Xe(), n = ea();
27645
- function d(o, p) {
27646
- if (!p && !(o instanceof WebSocket))
27664
+ function d(o, u) {
27665
+ if (!u && !(o instanceof WebSocket))
27647
27666
  throw new Error("");
27648
27667
  }
27649
27668
  function s(o) {
@@ -27652,7 +27671,7 @@ function aa() {
27652
27671
  return Ce;
27653
27672
  }
27654
27673
  var La;
27655
- function Bi() {
27674
+ function Ki() {
27656
27675
  if (La) return ne;
27657
27676
  La = 1;
27658
27677
  var e = ne && ne.__assign || function() {
@@ -27665,7 +27684,7 @@ function Bi() {
27665
27684
  }, e.apply(this, arguments);
27666
27685
  };
27667
27686
  Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachListeners = void 0;
27668
- var n = $e(), d = ja(), s = A(), o = aa(), p = function(m, i, g, l) {
27687
+ var n = $e(), d = ja(), s = A(), o = aa(), u = function(m, i, g, l) {
27669
27688
  m.onmessage = function(t) {
27670
27689
  var y;
27671
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));
@@ -27684,9 +27703,9 @@ function Bi() {
27684
27703
  (0, o.assertIsWebSocket)(m, i.current.skipAssert);
27685
27704
  var y;
27686
27705
  return m.onclose = function(b) {
27687
- var u;
27706
+ var p;
27688
27707
  if (i.current.onClose && i.current.onClose(b), g(s.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
27689
- var T = (u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : s.DEFAULT_RECONNECT_LIMIT;
27708
+ var T = (p = i.current.reconnectAttempts) !== null && p !== void 0 ? p : s.DEFAULT_RECONNECT_LIMIT;
27690
27709
  if (t.current < T) {
27691
27710
  var N = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27692
27711
  y = window.setTimeout(function() {
@@ -27701,9 +27720,9 @@ function Bi() {
27701
27720
  }, r = function(m, i, g, l, t) {
27702
27721
  var y;
27703
27722
  return m.onerror = function(b) {
27704
- var u;
27723
+ var p;
27705
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)
27706
- if (t.current < ((u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : s.DEFAULT_RECONNECT_LIMIT)) {
27725
+ if (t.current < ((p = i.current.reconnectAttempts) !== null && p !== void 0 ? p : s.DEFAULT_RECONNECT_LIMIT)) {
27707
27726
  var T = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27708
27727
  y = window.setTimeout(function() {
27709
27728
  t.current++, l();
@@ -27714,15 +27733,15 @@ function Bi() {
27714
27733
  return y && window.clearTimeout(y);
27715
27734
  };
27716
27735
  }, c = function(m, i, g, l, t, y, b) {
27717
- var u = i.setLastMessage, T = i.setReadyState, N, D, h;
27718
- return g.current.fromSocketIO && (N = (0, n.setUpSocketIOPing)(b)), p(m, g, u, y), U(m, g, T, t, y), D = _(m, g, T, l, t), h = r(m, g, T, l, t), function() {
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() {
27719
27738
  T(s.ReadyState.CLOSING), D(), h(), m.close(), N && clearInterval(N);
27720
27739
  };
27721
27740
  };
27722
27741
  return ne.attachListeners = c, ne;
27723
27742
  }
27724
27743
  var me = {}, Ga;
27725
- function Ki() {
27744
+ function ji() {
27726
27745
  if (Ga) return me;
27727
27746
  Ga = 1;
27728
27747
  var e = me && me.__assign || function() {
@@ -27735,7 +27754,7 @@ function Ki() {
27735
27754
  }, e.apply(this, arguments);
27736
27755
  };
27737
27756
  Object.defineProperty(me, "__esModule", { value: !0 }), me.attachSharedListeners = void 0;
27738
- var n = Xe(), d = A(), s = ea(), o = $e(), p = ja(), U = function(i, g, l) {
27757
+ var n = Xe(), d = A(), s = ea(), o = $e(), u = ja(), U = function(i, g, l) {
27739
27758
  i.onmessage = function(t) {
27740
27759
  (0, s.getSubscribers)(g).forEach(function(y) {
27741
27760
  var b;
@@ -27747,7 +27766,7 @@ function Ki() {
27747
27766
  var y = (0, s.getSubscribers)(g);
27748
27767
  y.forEach(function(b) {
27749
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());
27750
- }), l && i instanceof WebSocket && (0, p.heartbeat)(i, y.map(function(b) {
27769
+ }), l && i instanceof WebSocket && (0, u.heartbeat)(i, y.map(function(b) {
27751
27770
  return b.lastMessageTime;
27752
27771
  }), typeof l == "boolean" ? void 0 : l);
27753
27772
  };
@@ -27760,10 +27779,10 @@ function Ki() {
27760
27779
  if (t.optionsRef.current.shouldReconnect && t.optionsRef.current.shouldReconnect(l)) {
27761
27780
  var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : d.DEFAULT_RECONNECT_LIMIT;
27762
27781
  if (t.reconnectCount.current < b) {
27763
- var u = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
27782
+ var p = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
27764
27783
  setTimeout(function() {
27765
27784
  t.reconnectCount.current++, t.reconnect.current();
27766
- }, u ?? d.DEFAULT_RECONNECT_INTERVAL_MS);
27785
+ }, p ?? d.DEFAULT_RECONNECT_INTERVAL_MS);
27767
27786
  } else
27768
27787
  t.optionsRef.current.onReconnectStop && t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
27769
27788
  }
@@ -27784,10 +27803,10 @@ function Ki() {
27784
27803
  return me.attachSharedListeners = m, me;
27785
27804
  }
27786
27805
  var Ma;
27787
- function ji() {
27806
+ function Qi() {
27788
27807
  if (Ma) return Te;
27789
27808
  Ma = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.createOrJoinSocket = void 0;
27790
- var e = Xe(), n = A(), d = Bi(), s = Ki(), o = ea(), p = function(_, r, c, m, i) {
27809
+ var e = Xe(), n = A(), d = Ki(), s = ji(), o = ea(), u = function(_, r, c, m, i) {
27791
27810
  return function() {
27792
27811
  if ((0, o.removeSubscriber)(_, r), !(0, o.hasSubscribers)(_)) {
27793
27812
  try {
@@ -27806,7 +27825,7 @@ function ji() {
27806
27825
  if (m.current.share) {
27807
27826
  var b = null;
27808
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));
27809
- var u = {
27828
+ var p = {
27810
27829
  setLastMessage: i,
27811
27830
  setReadyState: c,
27812
27831
  optionsRef: m,
@@ -27814,7 +27833,7 @@ function ji() {
27814
27833
  lastMessageTime: t,
27815
27834
  reconnect: g
27816
27835
  };
27817
- return (0, o.addSubscriber)(r, u), p(r, u, m, c, b);
27836
+ return (0, o.addSubscriber)(r, p), u(r, p, m, c, b);
27818
27837
  } else {
27819
27838
  if (_.current = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), c(n.ReadyState.CONNECTING), !_.current)
27820
27839
  throw new Error("WebSocket failed to be created");
@@ -27827,7 +27846,7 @@ function ji() {
27827
27846
  return Te.createOrJoinSocket = U, Te;
27828
27847
  }
27829
27848
  var Y = {}, Ra;
27830
- function Qi() {
27849
+ function Yi() {
27831
27850
  return Ra || (Ra = 1, (function(e) {
27832
27851
  var n = Y && Y.__awaiter || function(r, c, m, i) {
27833
27852
  function g(l) {
@@ -27838,22 +27857,22 @@ function Qi() {
27838
27857
  return new (m || (m = Promise))(function(l, t) {
27839
27858
  function y(T) {
27840
27859
  try {
27841
- u(i.next(T));
27860
+ p(i.next(T));
27842
27861
  } catch (N) {
27843
27862
  t(N);
27844
27863
  }
27845
27864
  }
27846
27865
  function b(T) {
27847
27866
  try {
27848
- u(i.throw(T));
27867
+ p(i.throw(T));
27849
27868
  } catch (N) {
27850
27869
  t(N);
27851
27870
  }
27852
27871
  }
27853
- function u(T) {
27872
+ function p(T) {
27854
27873
  T.done ? l(T.value) : g(T.value).then(y, b);
27855
27874
  }
27856
- u((i = i.apply(r, c || [])).next());
27875
+ p((i = i.apply(r, c || [])).next());
27857
27876
  });
27858
27877
  }, d = Y && Y.__generator || function(r, c) {
27859
27878
  var m = { label: 0, sent: function() {
@@ -27863,56 +27882,56 @@ function Qi() {
27863
27882
  return t.next = y(0), t.throw = y(1), t.return = y(2), typeof Symbol == "function" && (t[Symbol.iterator] = function() {
27864
27883
  return this;
27865
27884
  }), t;
27866
- function y(u) {
27885
+ function y(p) {
27867
27886
  return function(T) {
27868
- return b([u, T]);
27887
+ return b([p, T]);
27869
27888
  };
27870
27889
  }
27871
- function b(u) {
27890
+ function b(p) {
27872
27891
  if (i) throw new TypeError("Generator is already executing.");
27873
- for (; t && (t = 0, u[0] && (m = 0)), m; ) try {
27874
- if (i = 1, g && (l = u[0] & 2 ? g.return : u[0] ? g.throw || ((l = g.return) && l.call(g), 0) : g.next) && !(l = l.call(g, u[1])).done) return l;
27875
- switch (g = 0, l && (u = [u[0] & 2, l.value]), u[0]) {
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]) {
27876
27895
  case 0:
27877
27896
  case 1:
27878
- l = u;
27897
+ l = p;
27879
27898
  break;
27880
27899
  case 4:
27881
- return m.label++, { value: u[1], done: !1 };
27900
+ return m.label++, { value: p[1], done: !1 };
27882
27901
  case 5:
27883
- m.label++, g = u[1], u = [0];
27902
+ m.label++, g = p[1], p = [0];
27884
27903
  continue;
27885
27904
  case 7:
27886
- u = m.ops.pop(), m.trys.pop();
27905
+ p = m.ops.pop(), m.trys.pop();
27887
27906
  continue;
27888
27907
  default:
27889
- if (l = m.trys, !(l = l.length > 0 && l[l.length - 1]) && (u[0] === 6 || u[0] === 2)) {
27908
+ if (l = m.trys, !(l = l.length > 0 && l[l.length - 1]) && (p[0] === 6 || p[0] === 2)) {
27890
27909
  m = 0;
27891
27910
  continue;
27892
27911
  }
27893
- if (u[0] === 3 && (!l || u[1] > l[0] && u[1] < l[3])) {
27894
- m.label = u[1];
27912
+ if (p[0] === 3 && (!l || p[1] > l[0] && p[1] < l[3])) {
27913
+ m.label = p[1];
27895
27914
  break;
27896
27915
  }
27897
- if (u[0] === 6 && m.label < l[1]) {
27898
- m.label = l[1], l = u;
27916
+ if (p[0] === 6 && m.label < l[1]) {
27917
+ m.label = l[1], l = p;
27899
27918
  break;
27900
27919
  }
27901
27920
  if (l && m.label < l[2]) {
27902
- m.label = l[2], m.ops.push(u);
27921
+ m.label = l[2], m.ops.push(p);
27903
27922
  break;
27904
27923
  }
27905
27924
  l[2] && m.ops.pop(), m.trys.pop();
27906
27925
  continue;
27907
27926
  }
27908
- u = c.call(r, m);
27927
+ p = c.call(r, m);
27909
27928
  } catch (T) {
27910
- u = [6, T], g = 0;
27929
+ p = [6, T], g = 0;
27911
27930
  } finally {
27912
27931
  i = l = 0;
27913
27932
  }
27914
- if (u[0] & 5) throw u[1];
27915
- return { value: u[0] ? u[1] : void 0, done: !0 };
27933
+ if (p[0] & 5) throw p[1];
27934
+ return { value: p[0] ? p[1] : void 0, done: !0 };
27916
27935
  }
27917
27936
  }, s = Y && Y.__spreadArray || function(r, c, m) {
27918
27937
  if (m || arguments.length === 2) for (var i = 0, g = c.length, l; i < g; i++)
@@ -27920,7 +27939,7 @@ function Qi() {
27920
27939
  return r.concat(l || Array.prototype.slice.call(c));
27921
27940
  };
27922
27941
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
27923
- var o = $e(), p = A(), U = function(r) {
27942
+ var o = $e(), u = A(), U = function(r) {
27924
27943
  return new Promise(function(c) {
27925
27944
  return window.setTimeout(c, r);
27926
27945
  });
@@ -27928,7 +27947,7 @@ function Qi() {
27928
27947
  for (var m = [], i = 2; i < arguments.length; i++)
27929
27948
  m[i - 2] = arguments[i];
27930
27949
  return n(void 0, s([r, c], m, !0), void 0, function(g, l, t) {
27931
- var y, b, u, T, N, D, h, L;
27950
+ var y, b, p, T, N, D, h, L;
27932
27951
  return t === void 0 && (t = 0), d(this, function(M) {
27933
27952
  switch (M.label) {
27934
27953
  case 0:
@@ -27939,7 +27958,7 @@ function Qi() {
27939
27958
  case 2:
27940
27959
  return y = M.sent(), [3, 9];
27941
27960
  case 3:
27942
- return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : p.DEFAULT_RECONNECT_LIMIT, t < b ? (u = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, U(u ?? p.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
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];
27943
27962
  case 4:
27944
27963
  return M.sent(), [2, (0, e.getUrl)(g, l, t + 1)];
27945
27964
  case 5:
@@ -27963,24 +27982,24 @@ function Qi() {
27963
27982
  e.getUrl = _;
27964
27983
  })(Y)), Y;
27965
27984
  }
27966
- var Ke = {}, Pa;
27967
- function Yi() {
27985
+ var je = {}, Pa;
27986
+ function qi() {
27968
27987
  return Pa || (Pa = 1, (function(e) {
27969
27988
  Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
27970
27989
  var n = function(d, s) {
27971
27990
  return new Proxy(d, {
27972
- get: function(o, p) {
27973
- var U = o[p];
27974
- return p === "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() {
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() {
27975
27994
  }) : U;
27976
27995
  },
27977
- set: function(o, p, U) {
27978
- return /^on/.test(p) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (o[p] = U, !0);
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);
27979
27998
  }
27980
27999
  });
27981
28000
  };
27982
28001
  e.websocketWrapper = n, e.default = e.websocketWrapper;
27983
- })(Ke)), Ke;
28002
+ })(je)), je;
27984
28003
  }
27985
28004
  var xa;
27986
28005
  function ia() {
@@ -27995,12 +28014,12 @@ function ia() {
27995
28014
  return g;
27996
28015
  }, e.apply(this, arguments);
27997
28016
  }, n = J && J.__awaiter || function(g, l, t, y) {
27998
- function b(u) {
27999
- return u instanceof t ? u : new t(function(T) {
28000
- T(u);
28017
+ function b(p) {
28018
+ return p instanceof t ? p : new t(function(T) {
28019
+ T(p);
28001
28020
  });
28002
28021
  }
28003
- return new (t || (t = Promise))(function(u, T) {
28022
+ return new (t || (t = Promise))(function(p, T) {
28004
28023
  function N(L) {
28005
28024
  try {
28006
28025
  h(y.next(L));
@@ -28016,15 +28035,15 @@ function ia() {
28016
28035
  }
28017
28036
  }
28018
28037
  function h(L) {
28019
- L.done ? u(L.value) : b(L.value).then(N, D);
28038
+ L.done ? p(L.value) : b(L.value).then(N, D);
28020
28039
  }
28021
28040
  h((y = y.apply(g, l || [])).next());
28022
28041
  });
28023
28042
  }, d = J && J.__generator || function(g, l) {
28024
28043
  var t = { label: 0, sent: function() {
28025
- if (u[0] & 1) throw u[1];
28026
- return u[1];
28027
- }, trys: [], ops: [] }, y, b, u, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
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);
28028
28047
  return T.next = N(0), T.throw = N(1), T.return = N(2), typeof Symbol == "function" && (T[Symbol.iterator] = function() {
28029
28048
  return this;
28030
28049
  }), T;
@@ -28036,11 +28055,11 @@ function ia() {
28036
28055
  function D(h) {
28037
28056
  if (y) throw new TypeError("Generator is already executing.");
28038
28057
  for (; T && (T = 0, h[0] && (t = 0)), t; ) try {
28039
- if (y = 1, b && (u = h[0] & 2 ? b.return : h[0] ? b.throw || ((u = b.return) && u.call(b), 0) : b.next) && !(u = u.call(b, h[1])).done) return u;
28040
- switch (b = 0, u && (h = [h[0] & 2, u.value]), h[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]) {
28041
28060
  case 0:
28042
28061
  case 1:
28043
- u = h;
28062
+ p = h;
28044
28063
  break;
28045
28064
  case 4:
28046
28065
  return t.label++, { value: h[1], done: !1 };
@@ -28051,30 +28070,30 @@ function ia() {
28051
28070
  h = t.ops.pop(), t.trys.pop();
28052
28071
  continue;
28053
28072
  default:
28054
- if (u = t.trys, !(u = u.length > 0 && u[u.length - 1]) && (h[0] === 6 || h[0] === 2)) {
28073
+ if (p = t.trys, !(p = p.length > 0 && p[p.length - 1]) && (h[0] === 6 || h[0] === 2)) {
28055
28074
  t = 0;
28056
28075
  continue;
28057
28076
  }
28058
- if (h[0] === 3 && (!u || h[1] > u[0] && h[1] < u[3])) {
28077
+ if (h[0] === 3 && (!p || h[1] > p[0] && h[1] < p[3])) {
28059
28078
  t.label = h[1];
28060
28079
  break;
28061
28080
  }
28062
- if (h[0] === 6 && t.label < u[1]) {
28063
- t.label = u[1], u = h;
28081
+ if (h[0] === 6 && t.label < p[1]) {
28082
+ t.label = p[1], p = h;
28064
28083
  break;
28065
28084
  }
28066
- if (u && t.label < u[2]) {
28067
- t.label = u[2], t.ops.push(h);
28085
+ if (p && t.label < p[2]) {
28086
+ t.label = p[2], t.ops.push(h);
28068
28087
  break;
28069
28088
  }
28070
- u[2] && t.ops.pop(), t.trys.pop();
28089
+ p[2] && t.ops.pop(), t.trys.pop();
28071
28090
  continue;
28072
28091
  }
28073
28092
  h = l.call(g, t);
28074
28093
  } catch (L) {
28075
28094
  h = [6, L], b = 0;
28076
28095
  } finally {
28077
- y = u = 0;
28096
+ y = p = 0;
28078
28097
  }
28079
28098
  if (h[0] & 5) throw h[1];
28080
28099
  return { value: h[0] ? h[1] : void 0, done: !0 };
@@ -28083,9 +28102,9 @@ function ia() {
28083
28102
  return g && g.__esModule ? g : { default: g };
28084
28103
  };
28085
28104
  Object.defineProperty(J, "__esModule", { value: !0 }), J.useWebSocket = void 0;
28086
- var o = he, p = ki, U = A(), _ = ji(), r = Qi(), c = s(Yi()), m = aa(), i = function(g, l, t) {
28105
+ var o = he, u = ki, U = A(), _ = Qi(), r = Yi(), c = s(qi()), m = aa(), i = function(g, l, t) {
28087
28106
  l === void 0 && (l = U.DEFAULT_OPTIONS), t === void 0 && (t = !0);
28088
- var y = (0, o.useState)(null), b = y[0], u = y[1], T = (0, o.useState)({}), N = T[0], D = T[1], h = (0, o.useMemo)(function() {
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() {
28089
28108
  if (!l.disableJson && b)
28090
28109
  try {
28091
28110
  return JSON.parse(b.data);
@@ -28094,7 +28113,7 @@ function ia() {
28094
28113
  }
28095
28114
  return null;
28096
28115
  }, [b, l.disableJson]), L = (0, o.useRef)(null), M = (0, o.useRef)(null), ce = (0, o.useRef)(function() {
28097
- }), _e = (0, o.useRef)(0), we = (0, o.useRef)(Date.now()), ke = (0, o.useRef)([]), V = (0, o.useRef)(null), H = (0, o.useRef)(l);
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);
28098
28117
  H.current = l;
28099
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) {
28100
28119
  var K;
@@ -28102,23 +28121,23 @@ function ia() {
28102
28121
  console.warn("Unable to send a message from an eventSource");
28103
28122
  return;
28104
28123
  }
28105
- ((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 && ke.current.push(x);
28106
- }, []), Se = (0, o.useCallback)(function(x, w) {
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) {
28107
28126
  w === void 0 && (w = !0), B(JSON.stringify(x), w);
28108
- }, [B]), Ne = (0, o.useCallback)(function() {
28127
+ }, [B]), De = (0, o.useCallback)(function() {
28109
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);
28110
28129
  }, []);
28111
28130
  return (0, o.useEffect)(function() {
28112
28131
  if (g !== null && t === !0) {
28113
28132
  var x, w = !1, K = !0, fe = function() {
28114
28133
  return n(void 0, void 0, void 0, function() {
28115
- var ie, $, De;
28134
+ var ie, $, Ee;
28116
28135
  return d(this, function(se) {
28117
28136
  switch (se.label) {
28118
28137
  case 0:
28119
28138
  return ie = L, [4, (0, r.getUrl)(g, H)];
28120
28139
  case 1:
28121
- return ie.current = se.sent(), L.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), L.current = "ABORTED", (0, p.flushSync)(function() {
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() {
28122
28141
  return D(function(j) {
28123
28142
  return e(e({}, j), { ABORTED: U.ReadyState.CLOSED });
28124
28143
  });
@@ -28126,17 +28145,17 @@ function ia() {
28126
28145
  2
28127
28146
  /*return*/
28128
28147
  ]) : ($ = function(j) {
28129
- w || (0, p.flushSync)(function() {
28130
- return u(j);
28148
+ w || (0, u.flushSync)(function() {
28149
+ return p(j);
28131
28150
  });
28132
- }, De = function(j) {
28133
- w || (0, p.flushSync)(function() {
28151
+ }, Ee = function(j) {
28152
+ w || (0, u.flushSync)(function() {
28134
28153
  return D(function(ue) {
28135
28154
  var le;
28136
28155
  return e(e({}, ue), L.current && (le = {}, le[L.current] = j, le));
28137
28156
  });
28138
28157
  });
28139
- }, K && (x = (0, _.createOrJoinSocket)(M, L.current, De, H, $, ce, _e, we, B)), [
28158
+ }, K && (x = (0, _.createOrJoinSocket)(M, L.current, Ee, H, $, ce, _e, Fe, B)), [
28140
28159
  2
28141
28160
  /*return*/
28142
28161
  ]);
@@ -28147,29 +28166,29 @@ function ia() {
28147
28166
  return ce.current = function() {
28148
28167
  w || (V.current && (V.current = null), x?.(), fe());
28149
28168
  }, fe(), function() {
28150
- w = !0, K = !1, V.current && (V.current = null), x?.(), u(null);
28169
+ w = !0, K = !1, V.current && (V.current = null), x?.(), p(null);
28151
28170
  };
28152
28171
  } else (g === null || t === !1) && (_e.current = 0, D(function(ie) {
28153
28172
  var $;
28154
28173
  return e(e({}, ie), L.current && ($ = {}, $[L.current] = U.ReadyState.CLOSED, $));
28155
28174
  }));
28156
28175
  }, [g, t, ae, B]), (0, o.useEffect)(function() {
28157
- Z === U.ReadyState.OPEN && ke.current.splice(0).forEach(function(x) {
28176
+ Z === U.ReadyState.OPEN && Se.current.splice(0).forEach(function(x) {
28158
28177
  B(x);
28159
28178
  });
28160
28179
  }, [Z]), {
28161
28180
  sendMessage: B,
28162
- sendJsonMessage: Se,
28181
+ sendJsonMessage: Ne,
28163
28182
  lastMessage: b,
28164
28183
  lastJsonMessage: h,
28165
28184
  readyState: Z,
28166
- getWebSocket: Ne
28185
+ getWebSocket: De
28167
28186
  };
28168
28187
  };
28169
28188
  return J.useWebSocket = i, J;
28170
28189
  }
28171
28190
  var re = {}, Oa;
28172
- function qi() {
28191
+ function Xi() {
28173
28192
  if (Oa) return re;
28174
28193
  Oa = 1;
28175
28194
  var e = re && re.__assign || function() {
@@ -28185,7 +28204,7 @@ function qi() {
28185
28204
  var n = he, d = ia(), s = A(), o = {
28186
28205
  type: "empty",
28187
28206
  payload: null
28188
- }, p = function(_) {
28207
+ }, u = function(_) {
28189
28208
  if (!_ || !_.data)
28190
28209
  return o;
28191
28210
  var r = _.data.match(/\[.*]/);
@@ -28200,14 +28219,14 @@ function qi() {
28200
28219
  r === void 0 && (r = s.DEFAULT_OPTIONS), c === void 0 && (c = !0);
28201
28220
  var m = (0, n.useMemo)(function() {
28202
28221
  return e(e({}, r), { fromSocketIO: !0 });
28203
- }, []), i = (0, d.useWebSocket)(_, m, c), g = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, u = (0, n.useMemo)(function() {
28204
- return p(t);
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);
28205
28224
  }, [t]);
28206
28225
  return {
28207
28226
  sendMessage: g,
28208
28227
  sendJsonMessage: l,
28209
- lastMessage: u,
28210
- lastJsonMessage: u,
28228
+ lastMessage: p,
28229
+ lastJsonMessage: p,
28211
28230
  readyState: y,
28212
28231
  getWebSocket: b
28213
28232
  };
@@ -28215,7 +28234,7 @@ function qi() {
28215
28234
  return re.useSocketIO = U, re;
28216
28235
  }
28217
28236
  var q = {}, Ha;
28218
- function Xi() {
28237
+ function $i() {
28219
28238
  if (Ha) return q;
28220
28239
  Ha = 1;
28221
28240
  var e = q && q.__assign || function() {
@@ -28235,7 +28254,7 @@ function Xi() {
28235
28254
  return r;
28236
28255
  };
28237
28256
  Object.defineProperty(q, "__esModule", { value: !0 }), q.useEventSource = void 0;
28238
- var d = he, s = ia(), o = A(), p = function(U, _, r) {
28257
+ var d = he, s = ia(), o = A(), u = function(U, _, r) {
28239
28258
  _ === void 0 && (_ = o.DEFAULT_EVENT_SOURCE_OPTIONS);
28240
28259
  var c = _.withCredentials, m = _.events, i = n(_, ["withCredentials", "events"]);
28241
28260
  r === void 0 && (r = !0);
@@ -28243,7 +28262,7 @@ function Xi() {
28243
28262
  withCredentials: c
28244
28263
  } }), l = (0, d.useRef)(o.EMPTY_EVENT_HANDLERS);
28245
28264
  m && (l.current = m);
28246
- var t = (0, s.useWebSocket)(U, g, r), y = t.lastMessage, b = t.readyState, u = t.getWebSocket;
28265
+ var t = (0, s.useWebSocket)(U, g, r), y = t.lastMessage, b = t.readyState, p = t.getWebSocket;
28247
28266
  return (0, d.useEffect)(function() {
28248
28267
  y?.type && Object.entries(l.current).forEach(function(T) {
28249
28268
  var N = T[0], D = T[1];
@@ -28252,20 +28271,20 @@ function Xi() {
28252
28271
  }, [y]), {
28253
28272
  lastEvent: y,
28254
28273
  readyState: b,
28255
- getEventSource: u
28274
+ getEventSource: p
28256
28275
  };
28257
28276
  };
28258
- return q.useEventSource = p, q;
28277
+ return q.useEventSource = u, q;
28259
28278
  }
28260
28279
  var wa;
28261
- function $i() {
28280
+ function el() {
28262
28281
  return wa || (wa = 1, (function(e) {
28263
28282
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
28264
28283
  var n = ia();
28265
28284
  Object.defineProperty(e, "default", { enumerable: !0, get: function() {
28266
28285
  return n.useWebSocket;
28267
28286
  } });
28268
- var d = qi();
28287
+ var d = Xi();
28269
28288
  Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
28270
28289
  return d.useSocketIO;
28271
28290
  } });
@@ -28273,18 +28292,18 @@ function $i() {
28273
28292
  Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
28274
28293
  return s.ReadyState;
28275
28294
  } });
28276
- var o = Xi();
28295
+ var o = $i();
28277
28296
  Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
28278
28297
  return o.useEventSource;
28279
28298
  } });
28280
- var p = aa();
28299
+ var u = aa();
28281
28300
  Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
28282
- return p.resetGlobalState;
28301
+ return u.resetGlobalState;
28283
28302
  } });
28284
- })(Ve)), Ve;
28303
+ })(Ie)), Ie;
28285
28304
  }
28286
- var el = $i();
28287
- const al = /* @__PURE__ */ Si(el), I = {
28305
+ var al = el();
28306
+ const il = /* @__PURE__ */ Si(al), I = {
28288
28307
  DEPOSIT: "deposit",
28289
28308
  TRANS_CODE: "transCode",
28290
28309
  ERROR: "error",
@@ -28295,13 +28314,13 @@ const al = /* @__PURE__ */ Si(el), I = {
28295
28314
  TRANSFER_IN_GAME: "transfer_in_game",
28296
28315
  CHECK_REQUEST: "CHECK_RREQUEST",
28297
28316
  CASH_REGISTER_LIMIT: "cash_register_limit"
28298
- }, il = 3e4, yl = ({
28317
+ }, ll = 3e4, bl = ({
28299
28318
  socketUrl: e,
28300
28319
  socketHandlers: n = {},
28301
28320
  options: d = {}
28302
28321
  }) => {
28303
28322
  const s = ya(!1), o = ya(n), {
28304
- sendMessage: p,
28323
+ sendMessage: u,
28305
28324
  // 發送普通訊息
28306
28325
  sendJsonMessage: U,
28307
28326
  // 發送 JSON 訊息
@@ -28311,14 +28330,14 @@ const al = /* @__PURE__ */ Si(el), I = {
28311
28330
  readyState: r
28312
28331
  // WebSocket 連線狀態
28313
28332
  // getWebSocket, // 獲取 WebSocket 實例
28314
- } = al(e, {
28333
+ } = il(e, {
28315
28334
  queryParams: { key: "wsky" },
28316
28335
  onOpen: () => console.log("連線成功"),
28317
28336
  shouldReconnect: () => s.current === !1,
28318
28337
  reconnectAttempts: 9999,
28319
28338
  reconnectInterval: 1e3,
28320
28339
  ...d
28321
- }), c = je(() => {
28340
+ }), c = Qe(() => {
28322
28341
  try {
28323
28342
  return JSON.parse(_?.data);
28324
28343
  } catch {
@@ -28327,11 +28346,11 @@ const al = /* @__PURE__ */ Si(el), I = {
28327
28346
  }, [_?.data]);
28328
28347
  return ve(() => {
28329
28348
  const m = setInterval(
28330
- () => p("ping"),
28331
- il
28349
+ () => u("ping"),
28350
+ ll
28332
28351
  );
28333
28352
  return () => clearInterval(m);
28334
- }, [p]), ve(() => {
28353
+ }, [u]), ve(() => {
28335
28354
  o.current = n;
28336
28355
  }, [n]), ve(() => {
28337
28356
  if (!c) return;
@@ -28343,12 +28362,12 @@ const al = /* @__PURE__ */ Si(el), I = {
28343
28362
  onMaintainNotice: t,
28344
28363
  onMaintainNoticeMember: y,
28345
28364
  onReload: b,
28346
- onTransferInGame: u,
28365
+ onTransferInGame: p,
28347
28366
  onCashRegisterLimit: T
28348
- } = o.current, N = Me(c, "type", ""), D = {
28349
- memberInfoUid: Me(c, "member_info_uid", null),
28350
- data: Me(c, "data", null),
28351
- memo: Me(c, "memo", null)
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)
28352
28371
  };
28353
28372
  switch (N) {
28354
28373
  case I.DEPOSIT:
@@ -28374,7 +28393,7 @@ const al = /* @__PURE__ */ Si(el), I = {
28374
28393
  break;
28375
28394
  case I.TRANSFER_IN_GAME:
28376
28395
  case I.CHECK_REQUEST:
28377
- u?.(D);
28396
+ p?.(D);
28378
28397
  break;
28379
28398
  case I.CASH_REGISTER_LIMIT:
28380
28399
  T?.(D);
@@ -28384,63 +28403,67 @@ const al = /* @__PURE__ */ Si(el), I = {
28384
28403
  break;
28385
28404
  }
28386
28405
  }, [c]), ve(() => () => s.current = !0, []), {
28387
- sendMessage: p,
28406
+ sendMessage: u,
28388
28407
  sendJsonMessage: U,
28389
28408
  readyState: r
28390
28409
  // WebSocket 連線狀態
28391
28410
  };
28392
28411
  }, Qa = () => {
28393
- const { client: e } = He(), n = X(async () => {
28412
+ const { client: e } = ke(), n = X(async () => {
28394
28413
  const { data: s } = await e.get("/carousels");
28395
28414
  return s;
28396
28415
  }, [e]), d = X(async () => await e.get("/marquees"), [e]);
28397
28416
  return { commonCarouselApi: n, commonMarqueeApi: d };
28398
- }, bl = () => {
28417
+ }, Tl = () => {
28399
28418
  const { commonCarouselApi: e } = Qa();
28400
28419
  return oe({
28401
28420
  queryKey: ["getCarouselList"],
28402
28421
  queryFn: async () => await e()
28403
28422
  });
28404
- }, Tl = () => {
28405
- const { commonMarqueeApi: e } = Qa();
28423
+ }, Cl = () => {
28424
+ const { lng: e } = ke(), { commonMarqueeApi: n } = Qa(), d = Zi(e);
28406
28425
  return oe({
28407
28426
  queryKey: ["getMarqueeList"],
28408
- queryFn: async () => e(),
28409
- select: (n) => n.Marquees
28427
+ queryFn: async () => n(),
28428
+ select: (s) => {
28429
+ const o = s.Marquees;
28430
+ return we(o, (U) => U[d] || U["en-US"]);
28431
+ }
28410
28432
  });
28411
- }, ll = ({ options: e } = {}) => {
28433
+ }, tl = ({ options: e } = {}) => {
28412
28434
  const { userLoginApi: n } = de();
28413
28435
  return za({
28414
28436
  mutationKey: ["userLogin"],
28415
28437
  mutationFn: async (d) => n(d),
28416
28438
  ...e
28417
28439
  });
28418
- }, tl = ({ options: e } = {}) => {
28440
+ }, nl = ({ options: e } = {}) => {
28419
28441
  const { userLogoutApi: n } = de();
28420
28442
  return za({
28421
28443
  mutationKey: ["userLogout"],
28422
28444
  mutationFn: async () => n(),
28423
28445
  ...e
28424
28446
  });
28425
- }, Cl = ({
28447
+ }, vl = ({
28426
28448
  options: e = {
28427
28449
  login: {},
28428
28450
  logout: {}
28429
28451
  }
28430
28452
  } = {}) => {
28431
- const n = ll({ options: e.login }), d = tl({ options: e.logout });
28453
+ const n = tl({ options: e.login }), d = nl({ options: e.logout });
28432
28454
  return { login: n, logout: d };
28433
28455
  };
28434
28456
  export {
28435
28457
  Za as ApiCtx,
28436
- cl as ApiProvider,
28458
+ _l as ApiProvider,
28437
28459
  Va as GamesInfoCtx,
28438
28460
  Fi as buildMultiTypes,
28439
- gl as buildMultiTypesWithSubTypes,
28461
+ dl as buildMultiTypesWithSubTypes,
28440
28462
  Ri as buildSinglePlatformWithSubTypes,
28441
28463
  Mi as buildSingleType,
28442
28464
  wi as categorizeGames,
28443
- pl as createLogoutHandler,
28465
+ Zi as convertLanguageCode,
28466
+ gl as createLogoutHandler,
28444
28467
  Oi as extractGameSubTypeNames,
28445
28468
  xi as extractGameTypeNames,
28446
28469
  va as extractPlatformNames,
@@ -28453,19 +28476,19 @@ export {
28453
28476
  Wi as groupGamesByPlatform,
28454
28477
  Ji as groupGamesByPlatformAndSubType,
28455
28478
  Gi as groupGamesBySubType,
28456
- Ii as initMockWindowData,
28479
+ Ai as initMockWindowData,
28457
28480
  zi as processGameInfo,
28458
- dl as processPlatformData,
28459
- He as useApiContext,
28460
- _l as useBalanceGetter,
28461
- yl as useClientWebSocket,
28462
- ul as useGameInfoContext,
28463
- Vi as useGamesInfo,
28464
- bl as useGetCarouseList,
28465
- Tl as useGetMarquee,
28466
- fl as useGetMemberInfo,
28467
- Ul as useInitializeWithToken,
28468
- ll as useLogin,
28469
- tl as useLogout,
28470
- Cl as useUser
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
28471
28494
  };