@obb871001/api-integration-sdk 1.0.88 → 1.0.89

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
@@ -11,28 +11,28 @@ var ba;
11
11
  function Ni() {
12
12
  if (ba) return be;
13
13
  ba = 1;
14
- var e = ke, 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
- function U(_, m, c) {
16
- var r, i = {}, g = null, l = null;
17
- c !== void 0 && (g = "" + c), m.key !== void 0 && (g = "" + m.key), m.ref !== void 0 && (l = m.ref);
18
- for (r in m) s.call(m, r) && !u.hasOwnProperty(r) && (i[r] = m[r]);
19
- if (_ && _.defaultProps) for (r in m = _.defaultProps, m) i[r] === void 0 && (i[r] = m[r]);
20
- return { $$typeof: n, type: _, key: g, ref: l, props: i, _owner: o.current };
14
+ var e = ke, m = Symbol.for("react.element"), c = Symbol.for("react.fragment"), u = 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 };
15
+ function U(_, r, s) {
16
+ var n, i = {}, d = null, l = null;
17
+ s !== void 0 && (d = "" + s), r.key !== void 0 && (d = "" + r.key), r.ref !== void 0 && (l = r.ref);
18
+ for (n in r) u.call(r, n) && !p.hasOwnProperty(n) && (i[n] = r[n]);
19
+ if (_ && _.defaultProps) for (n in r = _.defaultProps, r) i[n] === void 0 && (i[n] = r[n]);
20
+ return { $$typeof: m, type: _, key: d, ref: l, props: i, _owner: o.current };
21
21
  }
22
- return be.Fragment = d, be.jsx = U, be.jsxs = U, be;
22
+ return be.Fragment = c, be.jsx = U, be.jsxs = U, be;
23
23
  }
24
24
  var Te = {};
25
25
  var Ta;
26
26
  function Di() {
27
27
  return Ta || (Ta = 1, process.env.NODE_ENV !== "production" && (function() {
28
- var e = ke, 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"), m = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), r = 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 = ke, m = Symbol.for("react.element"), c = Symbol.for("react.portal"), u = 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"), s = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), d = 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 p = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
35
+ var g = 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 = p.ReactDebugCurrentFrame, E = v.getStackAddendum();
45
+ var v = g.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);
@@ -53,7 +53,7 @@ function Di() {
53
53
  var D = !1, h = !1, L = !1, M = !1, _e = !1, fe;
54
54
  fe = Symbol.for("react.module.reference");
55
55
  function Fe(a) {
56
- return !!(typeof a == "string" || typeof a == "function" || a === s || a === u || _e || a === o || a === c || a === r || M || a === l || D || h || L || typeof a == "object" && a !== null && (a.$$typeof === g || a.$$typeof === i || a.$$typeof === U || a.$$typeof === _ || a.$$typeof === m || // This needs to include all possible module reference object
56
+ return !!(typeof a == "string" || typeof a == "function" || a === u || a === p || _e || a === o || a === s || a === n || M || a === l || D || h || L || typeof a == "object" && a !== null && (a.$$typeof === d || 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.
@@ -77,17 +77,17 @@ function Di() {
77
77
  if (typeof a == "string")
78
78
  return a;
79
79
  switch (a) {
80
- case s:
80
+ case u:
81
81
  return "Fragment";
82
- case d:
82
+ case c:
83
83
  return "Portal";
84
- case u:
84
+ case p:
85
85
  return "Profiler";
86
86
  case o:
87
87
  return "StrictMode";
88
- case c:
88
+ case s:
89
89
  return "Suspense";
90
- case r:
90
+ case n:
91
91
  return "SuspenseList";
92
92
  }
93
93
  if (typeof a == "object")
@@ -98,12 +98,12 @@ function Di() {
98
98
  case U:
99
99
  var C = a;
100
100
  return V(C._context) + ".Provider";
101
- case m:
101
+ case r:
102
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";
106
- case g: {
106
+ case d: {
107
107
  var E = a, G = E._payload, S = E._init;
108
108
  try {
109
109
  return H(S(G));
@@ -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 = p.ReactCurrentDispatcher, j;
179
+ var se = g.ReactCurrentDispatcher, j;
180
180
  function ue(a, f, C) {
181
181
  {
182
182
  if (j === void 0)
@@ -281,18 +281,18 @@ function Di() {
281
281
  if (typeof a == "string")
282
282
  return ue(a);
283
283
  switch (a) {
284
- case c:
284
+ case s:
285
285
  return ue("Suspense");
286
- case r:
286
+ case n:
287
287
  return ue("SuspenseList");
288
288
  }
289
289
  if (typeof a == "object")
290
290
  switch (a.$$typeof) {
291
- case m:
291
+ case r:
292
292
  return qa(a.render);
293
293
  case i:
294
294
  return Ge(a.type, f, C);
295
- case g: {
295
+ case d: {
296
296
  var v = a, E = v._payload, G = v._init;
297
297
  try {
298
298
  return Ge(G(E), f, C);
@@ -302,7 +302,7 @@ function Di() {
302
302
  }
303
303
  return "";
304
304
  }
305
- var ye = Object.prototype.hasOwnProperty, ta = {}, na = p.ReactDebugCurrentFrame;
305
+ var ye = Object.prototype.hasOwnProperty, ta = {}, na = g.ReactDebugCurrentFrame;
306
306
  function Me(a) {
307
307
  if (a) {
308
308
  var f = a._owner, C = Ge(a.type, a._source, f ? f.type : null);
@@ -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 = p.ReactCurrentOwner, li = {
356
+ var oa = g.ReactCurrentOwner, li = {
357
357
  key: !0,
358
358
  ref: !0,
359
359
  __self: !0,
@@ -403,7 +403,7 @@ function Di() {
403
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: n,
406
+ $$typeof: m,
407
407
  // Built-in properties that belong on the element
408
408
  type: a,
409
409
  key: f,
@@ -447,7 +447,7 @@ function Di() {
447
447
  return si(a, k, F, E, v, oa.current, S);
448
448
  }
449
449
  }
450
- var Je = p.ReactCurrentOwner, pa = p.ReactDebugCurrentFrame;
450
+ var Je = g.ReactCurrentOwner, pa = g.ReactDebugCurrentFrame;
451
451
  function pe(a) {
452
452
  if (a) {
453
453
  var f = a._owner, C = Ge(a.type, a._source, f ? f.type : null);
@@ -458,7 +458,7 @@ function Di() {
458
458
  var ze;
459
459
  ze = !1;
460
460
  function Ze(a) {
461
- return typeof a == "object" && a !== null && a.$$typeof === n;
461
+ return typeof a == "object" && a !== null && a.$$typeof === m;
462
462
  }
463
463
  function ga() {
464
464
  {
@@ -528,7 +528,7 @@ Check the top-level render call using <` + C + ">.");
528
528
  var C;
529
529
  if (typeof f == "function")
530
530
  C = f.propTypes;
531
- else if (typeof f == "object" && (f.$$typeof === m || // Note: Memo only checks outer props here.
531
+ else if (typeof f == "object" && (f.$$typeof === r || // Note: Memo only checks outer props here.
532
532
  // Inner props are checked in the reconciler.
533
533
  f.$$typeof === i))
534
534
  C = f.propTypes;
@@ -567,7 +567,7 @@ Check the top-level render call using <` + C + ">.");
567
567
  var F = pi();
568
568
  F ? k += F : k += ga();
569
569
  var R;
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);
570
+ a === null ? R = "null" : We(a) ? R = "array" : a !== void 0 && a.$$typeof === m ? (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)
@@ -599,7 +599,7 @@ React keys must be passed directly to JSX without using spread:
599
599
  <%s key={someKey} {...props} />`, Ve, te, bi, te), fa[te + Ve] = !0;
600
600
  }
601
601
  }
602
- return a === s ? ci(P) : di(P), P;
602
+ return a === u ? ci(P) : di(P), P;
603
603
  }
604
604
  }
605
605
  function _i(a, f, C) {
@@ -609,7 +609,7 @@ React keys must be passed directly to JSX without using spread:
609
609
  return Ua(a, f, C, !1);
610
610
  }
611
611
  var Ui = fi, yi = _i;
612
- Te.Fragment = s, Te.jsx = Ui, Te.jsxs = yi;
612
+ Te.Fragment = u, Te.jsx = Ui, Te.jsxs = yi;
613
613
  })()), Te;
614
614
  }
615
615
  var Ca;
@@ -625,27 +625,27 @@ const Za = Fa(null), de = () => {
625
625
  };
626
626
  function Li({
627
627
  baseURL: e,
628
- getToken: n,
629
- timeoutMs: d = 15e3,
630
- lng: s = "tw",
628
+ getToken: m,
629
+ timeoutMs: c = 15e3,
630
+ lng: u = "tw",
631
631
  store: o,
632
- onError: u
632
+ onError: p
633
633
  } = {}) {
634
634
  const U = hi.create({
635
635
  baseURL: e,
636
- timeout: d,
636
+ timeout: c,
637
637
  headers: { "Content-Type": "application/json" }
638
638
  });
639
639
  return U.interceptors.request.use(async (_) => {
640
- if (_.headers = _.headers || {}, n) {
641
- const c = await n();
642
- c && (_.headers.Authorization = `Bearer ${c}`);
640
+ if (_.headers = _.headers || {}, m) {
641
+ const s = await m();
642
+ s && (_.headers.Authorization = `Bearer ${s}`);
643
643
  }
644
- const m = o?.getState()?.isWalletCurrency || o?.getState()?.currency?.currentCurrency || "TWD";
645
- return _.headers.Currency = m, _.headers["currency-code"] = m, _.headers.lang = s, _;
644
+ const r = o?.getState()?.isWalletCurrency || o?.getState()?.currency?.currentCurrency || "TWD";
645
+ return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang = u, _;
646
646
  }), U.interceptors.response.use(
647
647
  (_) => _.data,
648
- (_) => u ? u(_, { instance: U }) : Promise.reject(_)
648
+ (_) => p ? p(_, { instance: U }) : Promise.reject(_)
649
649
  ), U;
650
650
  }
651
651
  const Va = Fa(null), pl = () => {
@@ -656,128 +656,128 @@ const Va = Fa(null), pl = () => {
656
656
  );
657
657
  return e;
658
658
  }, gl = () => {
659
- const e = (s, o) => !s && !o, n = (s) => s.startsWith("pc.");
659
+ const e = (u, o) => !u && !o, m = (u) => u.startsWith("pc.");
660
660
  return {
661
661
  executeLogout: ({
662
- isCallBackInvalid: s = !1,
662
+ isCallBackInvalid: u = !1,
663
663
  hostname: o = "",
664
- shouldRedirect: u,
664
+ shouldRedirect: p,
665
665
  onShowError: U,
666
666
  onCleanup: _,
667
- onRemoveToken: m,
668
- onRedirect: c,
669
- onGoogleLogout: r
667
+ onRemoveToken: r,
668
+ onRedirect: s,
669
+ onGoogleLogout: n
670
670
  }) => {
671
- const i = n(o);
672
- e(s, i) && U?.(), _?.(), m?.(), u && c?.("/"), r?.();
671
+ const i = m(o);
672
+ e(u, i) && U?.(), _?.(), r?.(), p && s?.("/"), n?.();
673
673
  },
674
674
  shouldShowErrorNotice: e,
675
- isMachineDomain: n
675
+ isMachineDomain: m
676
676
  };
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;
677
+ }, Ia = (e = [], m) => Ye(e, { gameTypeName: m })?.gameTypeUid, Aa = (e = [], m) => Ye(e, { platform: m })?.platformUid, Ba = (e = [], m) => Ye(e, { SubPlatformEnum: m }), Ka = (e = [], m, c) => O(e) ? [] : e.filter((u) => c ? String(u?.SubPlatformEnumUid) === String(c?.SubPlatformEnumUid) : String(u.platformUid) === String(m)), Gi = (e = []) => O(e) ? {} : e.reduce((m, c) => {
678
+ const u = c?.game_subtype || "UNKNOWN";
679
+ return m[u] || (m[u] = []), m[u].push(c), m;
680
680
  }, {}), Mi = ({
681
681
  gameTypeName: e,
682
- platforms: n,
683
- gameList: d,
684
- allGameTypes: s,
682
+ platforms: m,
683
+ gameList: c,
684
+ allGameTypes: u,
685
685
  allPlatforms: o
686
686
  }) => {
687
- const u = Ia(s, e);
688
- return u ? n.reduce((U, _) => {
689
- const m = Aa(o, _), c = Ba(o, _), r = d[u] || [], i = Ka(
687
+ const p = Ia(u, e);
688
+ return p ? m.reduce((U, _) => {
689
+ const r = Aa(o, _), s = Ba(o, _), n = c[p] || [], i = Ka(
690
+ n,
690
691
  r,
691
- m,
692
- c
692
+ s
693
693
  );
694
694
  return O(i) || (U[_] = i), U;
695
695
  }, {}) : {};
696
696
  }, Ri = ({
697
697
  platformName: e,
698
- gamesOfType: n = [],
699
- allPlatforms: d = []
698
+ gamesOfType: m = [],
699
+ allPlatforms: c = []
700
700
  }) => {
701
- const s = Aa(d, e), o = Ba(d, e), u = Ka(
702
- n,
703
- s,
701
+ const u = Aa(c, e), o = Ba(c, e), p = Ka(
702
+ m,
703
+ u,
704
704
  o
705
705
  );
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;
706
+ return Gi(p);
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 = [], m = []) => !ee(e) || O(e) ? {} : !ee(m) || O(m) ? {} : e.reduce((c, u) => {
708
+ const o = m.map((p) => p.game_subtype);
709
+ return o.forEach((p) => {
710
+ c[p] = c[p] || [];
711
+ }), o.includes(u.game_subtype) && c[u.game_subtype].push(u), c;
712
712
  }, {}), Fi = ({
713
713
  gameTypes: e = [],
714
- platforms: n = [],
715
- gameList: d = {},
716
- allGameTypes: s = [],
714
+ platforms: m = [],
715
+ gameList: c = {},
716
+ allGameTypes: u = [],
717
717
  allPlatforms: o = []
718
- }) => !ee(e) || !ee(n) ? {} : O(d) ? {} : e.reduce((u, U) => {
718
+ }) => !ee(e) || !ee(m) ? {} : O(c) ? {} : e.reduce((p, U) => {
719
719
  const _ = Mi({
720
720
  gameTypeName: U,
721
- platforms: n,
722
- gameList: d,
723
- allGameTypes: s,
721
+ platforms: m,
722
+ gameList: c,
723
+ allGameTypes: u,
724
724
  allPlatforms: o
725
725
  });
726
- return O(_) || (u[U] = _), u;
726
+ return O(_) || (p[U] = _), p;
727
727
  }, {}), dl = ({
728
728
  types: e = [],
729
- platforms: n = [],
730
- allGameType: d = [],
731
- allGamePlatform: s = [],
729
+ platforms: m = [],
730
+ allGameType: c = [],
731
+ allGamePlatform: u = [],
732
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 m = o[_] || [], c = n.reduce((r, i) => {
737
- const g = Ri({
733
+ } = {}) => !Array.isArray(e) || !Array.isArray(m) ? {} : e.reduce((p, U) => {
734
+ const _ = Ia(c, U);
735
+ if (!_) return p;
736
+ const r = o[_] || [], s = m.reduce((n, i) => {
737
+ const d = Ri({
738
738
  platformName: i,
739
- gamesOfType: m,
740
- allPlatforms: s
739
+ gamesOfType: r,
740
+ allPlatforms: u
741
741
  });
742
- return O(g) ? r : { ...r, [i]: g };
742
+ return O(d) ? n : { ...n, [i]: d };
743
743
  }, {});
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 = {}) => {
744
+ return O(s) || (p[U] = s), p;
745
+ }, {}), Wi = (e = {}) => !He(e) || O(e) ? {} : Object.values(e).reduce((c, u) => (Object.entries(u).forEach(([o, p]) => {
746
+ c[o] ? c[o] = [...c[o], ...p] : c[o] = p;
747
+ }), c), {}), Ji = (e = {}) => {
748
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);
749
+ const m = {};
750
+ for (const [c, u] of Object.entries(e)) {
751
+ m[c] = {};
752
+ for (const o of u) {
753
+ const p = o.game_subtype;
754
+ m[c][p] || (m[c][p] = []), m[c][p].push(o);
755
755
  }
756
756
  }
757
- return n;
757
+ return m;
758
758
  }, zi = ({
759
759
  allGameList: e = {},
760
- allGamePlatform: n = [],
761
- allGameType: d = [],
762
- allGame_subtype: s = [],
760
+ allGamePlatform: m = [],
761
+ allGameType: c = [],
762
+ allGame_subtype: u = [],
763
763
  allNewGameList: o = [],
764
- allTopGameList: u = [],
764
+ allTopGameList: p = [],
765
765
  randomlySelectedGames: U = [],
766
766
  userFavoriteGame: _ = {},
767
- exclusiveBrandGames: m = [],
768
- highlightGames: c = [],
769
- originPlatform: r = []
767
+ exclusiveBrandGames: r = [],
768
+ highlightGames: s = [],
769
+ originPlatform: n = []
770
770
  }) => {
771
- const i = Pi(e), g = va(n), l = xi(d), t = Oi(s), y = va(r), b = Hi(_), p = Fi({
771
+ const i = Pi(e), d = va(m), l = xi(c), t = Oi(u), y = va(n), b = Hi(_), g = Fi({
772
772
  gameTypes: l,
773
- platforms: g,
773
+ platforms: d,
774
774
  gameList: e,
775
- allGameTypes: d,
776
- allPlatforms: n
777
- }), T = wi(i, s), N = Wi(p), D = Ji(N);
775
+ allGameTypes: c,
776
+ allPlatforms: m
777
+ }), T = wi(i, u), N = Wi(g), D = Ji(N);
778
778
  return {
779
779
  platform: {
780
- all: g,
780
+ all: d,
781
781
  origin: y
782
782
  },
783
783
  type: {
@@ -787,10 +787,10 @@ const Va = Fa(null), pl = () => {
787
787
  gameList: {
788
788
  all: i,
789
789
  new: o,
790
- top: u,
790
+ top: p,
791
791
  favorite: b,
792
- highlight: c,
793
- exclusiveBrand: m,
792
+ highlight: s,
793
+ exclusiveBrand: r,
794
794
  randomlySelected: U
795
795
  },
796
796
  categorized: {
@@ -802,11 +802,11 @@ const Va = Fa(null), pl = () => {
802
802
  favorite: b
803
803
  }
804
804
  };
805
- }, cl = (e = []) => !ee(e) || O(e) ? [] : qe(e, (n) => O(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((d) => ({
806
- ...n,
807
- ...d,
808
- platform: d.SubPlatformEnum,
809
- platformEnum: d.SubPlatformEnum
805
+ }, cl = (e = []) => !ee(e) || O(e) ? [] : qe(e, (m) => O(m.SubPlatformEnum) ? m : m.SubPlatformEnum.map((c) => ({
806
+ ...m,
807
+ ...c,
808
+ platform: c.SubPlatformEnum,
809
+ platformEnum: c.SubPlatformEnum
810
810
  }))), Zi = (e) => {
811
811
  switch (e) {
812
812
  case "tw":
@@ -827,32 +827,32 @@ const Va = Fa(null), pl = () => {
827
827
  return e;
828
828
  }
829
829
  }, ce = () => {
830
- const { client: e } = de(), n = X(
831
- async (m) => {
832
- const { mac_address: c = "", app_version: r = "", anydesk_id: i = "" } = m, { data: g } = await e.post("/cash-register/login", {
833
- mac_address: c,
834
- app_version: r,
830
+ const { client: e } = de(), m = X(
831
+ async (r) => {
832
+ const { mac_address: s = "", app_version: n = "", anydesk_id: i = "" } = r, { data: d } = await e.post("/cash-register/login", {
833
+ mac_address: s,
834
+ app_version: n,
835
835
  anydesk_id: i
836
836
  });
837
- return g;
837
+ return d;
838
838
  },
839
839
  [e]
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 (m) => {
842
- const { account: c, password: r, trans_code: i } = m;
840
+ ), c = X(async () => e.get("/member/getMemberInfo"), [e]), u = 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(
841
+ async (r) => {
842
+ const { account: s, password: n, trans_code: i } = r;
843
843
  return await e.post("/login", {
844
- memId: c,
845
- passwd: r,
844
+ memId: s,
845
+ passwd: n,
846
846
  trans_code: i
847
847
  });
848
848
  },
849
849
  [e]
850
850
  ), _ = X(async () => await e.post("/logout"), [e]);
851
851
  return {
852
- machineLoginApi: n,
853
- userInfoApi: d,
854
- userGameListApi: s,
855
- userFavoriteGameApi: u,
852
+ machineLoginApi: m,
853
+ userInfoApi: c,
854
+ userGameListApi: u,
855
+ userFavoriteGameApi: p,
856
856
  userCurrencyExchangeApi: o,
857
857
  userLoginApi: U,
858
858
  userLogoutApi: _
@@ -876,26 +876,26 @@ const Va = Fa(null), pl = () => {
876
876
  },
877
877
  user: { favorite: [] }
878
878
  }, Ii = ({ enabled: e = !0 } = {}) => {
879
- const { getToken: n } = de(), { userFavoriteGameApi: d } = ce(), { data: s, isLoading: o, error: u, refetch: U } = oe({
879
+ const { getToken: m } = de(), { userFavoriteGameApi: c, userGameListApi: u } = ce(), { data: o, isLoading: p, error: U, refetch: _ } = oe({
880
880
  queryKey: ["gamesInfo"],
881
881
  queryFn: async () => {
882
- let _ = {};
882
+ let r = {}, s = {};
883
883
  try {
884
- await n?.() && (_ = await d());
885
- } catch (m) {
886
- console.warn("Failed to fetch favorite games:", m);
884
+ await m?.() && (r = await c(), s = await u(), console.log("userGameListApi data:", s));
885
+ } catch (n) {
886
+ console.warn("Failed to fetch favorite games:", n);
887
887
  }
888
888
  return zi({
889
889
  allGameList: window.gameTypeGroup || {},
890
- allGamePlatform: window.platforms || [],
891
- allGameType: window.gameType || [],
892
- allGame_subtype: window.gameSubType || [],
893
- allNewGameList: window.newGames || [],
894
- allTopGameList: window.topGames || [],
895
- userFavoriteGame: _ || {},
896
- randomlySelectedGames: window.randomlySelectedGames || [],
897
- exclusiveBrandGames: window.exclusiveBrandGames || [],
898
- highlightGames: window.highlightGames || [],
890
+ allGamePlatform: s.platforms || window.platforms || [],
891
+ allGameType: s.gameType || window.gameType || [],
892
+ allGame_subtype: s.gameSubType || window.gameSubType || [],
893
+ allNewGameList: s.newGames || window.newGames || [],
894
+ allTopGameList: s.topGames || window.topGames || [],
895
+ userFavoriteGame: r || {},
896
+ randomlySelectedGames: s.randomlySelectedGames || window.randomlySelectedGames || [],
897
+ exclusiveBrandGames: s.exclusiveBrandGames || window.exclusiveBrandGames || [],
898
+ highlightGames: s.highlightGames || window.highlightGames || [],
899
899
  originPlatform: window.originPlatform || []
900
900
  });
901
901
  },
@@ -908,10 +908,10 @@ const Va = Fa(null), pl = () => {
908
908
  refetchOnWindowFocus: !1
909
909
  });
910
910
  return {
911
- gamesInfo: s || Vi,
912
- isLoading: o,
913
- error: u,
914
- refetch: U
911
+ gamesInfo: o || Vi,
912
+ isLoading: p,
913
+ error: U,
914
+ refetch: _
915
915
  };
916
916
  }, Ai = (e = !1) => {
917
917
  if (!e && window.gameTypeGroup) {
@@ -27442,23 +27442,23 @@ const Va = Fa(null), pl = () => {
27442
27442
  });
27443
27443
  }, Bi = ({
27444
27444
  children: e,
27445
- autoFetch: n = !1,
27446
- mockData: d = !1
27445
+ autoFetch: m = !1,
27446
+ mockData: c = !1
27447
27447
  }) => {
27448
27448
  he(() => {
27449
- d && Ai(!0);
27450
- }, [d]);
27451
- const s = Ii({ enabled: n });
27452
- return /* @__PURE__ */ Oe.jsx(Va.Provider, { value: s, children: e });
27449
+ c && Ai(!0);
27450
+ }, [c]);
27451
+ const u = Ii({ enabled: m });
27452
+ return /* @__PURE__ */ Oe.jsx(Va.Provider, { value: u, children: e });
27453
27453
  };
27454
27454
  function _l({
27455
27455
  children: e,
27456
- autoFetchGamesInfo: n = !1,
27457
- useMockData: d = !1,
27458
- queryClient: s,
27456
+ autoFetchGamesInfo: m = !1,
27457
+ useMockData: c = !1,
27458
+ queryClient: u,
27459
27459
  ...o
27460
27460
  }) {
27461
- const u = Qe(() => Li(o), [o]), U = Qe(
27461
+ const p = Qe(() => Li(o), [o]), U = Qe(
27462
27462
  () => new Ci({
27463
27463
  defaultOptions: {
27464
27464
  queries: {
@@ -27468,86 +27468,86 @@ function _l({
27468
27468
  }
27469
27469
  }),
27470
27470
  []
27471
- ), _ = s || U;
27472
- 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 }) }) });
27471
+ ), _ = u || U;
27472
+ return /* @__PURE__ */ Oe.jsx(vi, { client: _, children: /* @__PURE__ */ Oe.jsx(Za.Provider, { value: { client: p, ...o }, children: /* @__PURE__ */ Oe.jsx(Bi, { autoFetch: m, mockData: c, children: e }) }) });
27473
27473
  }
27474
- const fl = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
27475
- const { userCurrencyExchangeApi: d } = ce(), { getToken: s } = de(), { enabled: o, ...u } = n, U = !!s && (o ? o.every((_) => _) : !0);
27474
+ const fl = ({ otherQueryKey: e = [], options: m = {} } = {}) => {
27475
+ const { userCurrencyExchangeApi: c } = ce(), { getToken: u } = de(), { enabled: o, ...p } = m, U = !!u && (o ? o.every((_) => _) : !0);
27476
27476
  return Ja({
27477
27477
  queries: [
27478
27478
  {
27479
27479
  queryKey: ["userCurrencyExchange", ...e],
27480
- queryFn: () => d(),
27480
+ queryFn: () => c(),
27481
27481
  enabled: U,
27482
27482
  // ← 使用合併後的條件
27483
- ...u
27483
+ ...p
27484
27484
  // ← 不包含 enabled
27485
27485
  }
27486
27486
  ]
27487
27487
  });
27488
27488
  }, Ul = ({
27489
27489
  refetchInterval: e = 5e4,
27490
- trigger: n = [],
27491
- enabled: d = !0
27490
+ trigger: m = [],
27491
+ enabled: c = !0
27492
27492
  } = {}) => {
27493
- const { getToken: s } = de(), { userInfoApi: o } = ce(), u = Ja({
27493
+ const { getToken: u } = de(), { userInfoApi: o } = ce(), p = Ja({
27494
27494
  queries: [
27495
27495
  {
27496
- queryKey: ["getMemberInfo", ...n],
27496
+ queryKey: ["getMemberInfo", ...m],
27497
27497
  queryFn: async () => await o(),
27498
27498
  refetchInterval: e,
27499
- enabled: !!s && d
27499
+ enabled: !!u && c
27500
27500
  }
27501
27501
  ]
27502
- }), { data: U, isFetching: _, error: m } = u[0] || {};
27503
- return { data: U, isFetching: _, error: m };
27502
+ }), { data: U, isFetching: _, error: r } = p[0] || {};
27503
+ return { data: U, isFetching: _, error: r };
27504
27504
  }, yl = ({ enabled: e = !0 } = {}) => {
27505
27505
  const {
27506
- userInfoApi: n,
27507
- userFavoriteGameApi: d,
27508
- userGameListApi: s,
27506
+ userInfoApi: m,
27507
+ userFavoriteGameApi: c,
27508
+ userGameListApi: u,
27509
27509
  userCurrencyExchangeApi: o
27510
- } = ce(), u = oe({
27510
+ } = ce(), p = oe({
27511
27511
  queryKey: ["getMemInfo"],
27512
- queryFn: async () => n(),
27512
+ queryFn: async () => m(),
27513
27513
  enabled: e
27514
27514
  }), U = oe({
27515
27515
  queryKey: ["getFavoriteGame"],
27516
- queryFn: async () => d(),
27517
- enabled: e && u.isSuccess
27516
+ queryFn: async () => c(),
27517
+ enabled: e && p.isSuccess
27518
27518
  }), _ = oe({
27519
27519
  queryKey: ["getUserGameList"],
27520
- queryFn: async () => s(),
27521
- enabled: e && u.isSuccess && U.isSuccess
27522
- }), m = oe({
27520
+ queryFn: async () => u(),
27521
+ enabled: e && p.isSuccess && U.isSuccess
27522
+ }), r = oe({
27523
27523
  queryKey: ["getUserCurrencyExchange"],
27524
27524
  queryFn: async () => o(),
27525
- enabled: e && u.isSuccess && U.isSuccess && _.isSuccess
27525
+ enabled: e && p.isSuccess && U.isSuccess && _.isSuccess
27526
27526
  });
27527
27527
  return [
27528
- u,
27528
+ p,
27529
27529
  U,
27530
27530
  _,
27531
- m
27531
+ r
27532
27532
  ];
27533
27533
  };
27534
27534
  var Ie = {}, J = {}, Ae = {}, ha;
27535
27535
  function A() {
27536
27536
  return ha || (ha = 1, (function(e) {
27537
27537
  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;
27538
- var n = 1, d = 1e3 * n;
27538
+ var m = 1, c = 1e3 * m;
27539
27539
  e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
27540
27540
  withCredentials: !1,
27541
27541
  events: e.EMPTY_EVENT_HANDLERS
27542
- }, e.SOCKET_IO_PING_INTERVAL = 25 * d, e.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", e.SOCKET_IO_PING_CODE = "2", e.DEFAULT_RECONNECT_LIMIT = 20, e.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, e.UNPARSABLE_JSON_OBJECT = {}, e.DEFAULT_HEARTBEAT = {
27542
+ }, e.SOCKET_IO_PING_INTERVAL = 25 * c, e.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", e.SOCKET_IO_PING_CODE = "2", e.DEFAULT_RECONNECT_LIMIT = 20, e.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, e.UNPARSABLE_JSON_OBJECT = {}, e.DEFAULT_HEARTBEAT = {
27543
27543
  message: "ping",
27544
27544
  timeout: 6e4,
27545
27545
  interval: 25e3
27546
27546
  };
27547
- var s;
27548
- (function(u) {
27549
- 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";
27550
- })(s || (e.ReadyState = s = {}));
27547
+ var u;
27548
+ (function(p) {
27549
+ 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";
27550
+ })(u || (e.ReadyState = u = {}));
27551
27551
  var o = function() {
27552
27552
  try {
27553
27553
  return "EventSource" in globalThis;
@@ -27562,72 +27562,72 @@ var Ce = {}, Be = {}, ka;
27562
27562
  function Xe() {
27563
27563
  return ka || (ka = 1, (function(e) {
27564
27564
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
27565
- var n = function(d) {
27566
- if (d && e.sharedWebSockets.hasOwnProperty(d))
27567
- delete e.sharedWebSockets[d];
27565
+ var m = function(c) {
27566
+ if (c && e.sharedWebSockets.hasOwnProperty(c))
27567
+ delete e.sharedWebSockets[c];
27568
27568
  else
27569
- for (var s in e.sharedWebSockets)
27570
- e.sharedWebSockets.hasOwnProperty(s) && delete e.sharedWebSockets[s];
27569
+ for (var u in e.sharedWebSockets)
27570
+ e.sharedWebSockets.hasOwnProperty(u) && delete e.sharedWebSockets[u];
27571
27571
  };
27572
- e.resetWebSockets = n;
27572
+ e.resetWebSockets = m;
27573
27573
  })(Be)), Be;
27574
27574
  }
27575
27575
  var ne = {}, Q = {}, Sa;
27576
27576
  function $e() {
27577
27577
  if (Sa) return Q;
27578
27578
  Sa = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.setUpSocketIOPing = Q.appendQueryParams = Q.parseSocketIOUrl = void 0;
27579
- var e = A(), n = function(o) {
27579
+ var e = A(), m = function(o) {
27580
27580
  if (o) {
27581
- var u = /^https|wss/.test(o), U = o.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), m = u ? "wss" : "ws";
27582
- return "".concat(m, "://").concat(_).concat(e.SOCKET_IO_PATH);
27581
+ var p = /^https|wss/.test(o), U = o.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), r = p ? "wss" : "ws";
27582
+ return "".concat(r, "://").concat(_).concat(e.SOCKET_IO_PATH);
27583
27583
  } else if (o === "") {
27584
- var u = /^https/.test(window.location.protocol), m = u ? "wss" : "ws", c = window.location.port ? ":".concat(window.location.port) : "";
27585
- return "".concat(m, "://").concat(window.location.hostname).concat(c).concat(e.SOCKET_IO_PATH);
27584
+ var p = /^https/.test(window.location.protocol), r = p ? "wss" : "ws", s = window.location.port ? ":".concat(window.location.port) : "";
27585
+ return "".concat(r, "://").concat(window.location.hostname).concat(s).concat(e.SOCKET_IO_PATH);
27586
27586
  }
27587
27587
  return o;
27588
27588
  };
27589
- Q.parseSocketIOUrl = n;
27590
- var d = function(o, u) {
27591
- u === void 0 && (u = {});
27592
- var U = /\?([\w]+=[\w]+)/, _ = U.test(o), m = "".concat(Object.entries(u).reduce(function(c, r) {
27593
- var i = r[0], g = r[1];
27594
- return c + "".concat(i, "=").concat(g, "&");
27589
+ Q.parseSocketIOUrl = m;
27590
+ var c = function(o, p) {
27591
+ p === void 0 && (p = {});
27592
+ var U = /\?([\w]+=[\w]+)/, _ = U.test(o), r = "".concat(Object.entries(p).reduce(function(s, n) {
27593
+ var i = n[0], d = n[1];
27594
+ return s + "".concat(i, "=").concat(d, "&");
27595
27595
  }, "").slice(0, -1));
27596
- return "".concat(o).concat(_ ? "&" : "?").concat(m);
27596
+ return "".concat(o).concat(_ ? "&" : "?").concat(r);
27597
27597
  };
27598
- Q.appendQueryParams = d;
27599
- var s = function(o, u) {
27600
- u === void 0 && (u = e.SOCKET_IO_PING_INTERVAL);
27598
+ Q.appendQueryParams = c;
27599
+ var u = function(o, p) {
27600
+ p === void 0 && (p = e.SOCKET_IO_PING_INTERVAL);
27601
27601
  var U = function() {
27602
27602
  return o(e.SOCKET_IO_PING_CODE);
27603
27603
  };
27604
- return window.setInterval(U, u);
27604
+ return window.setInterval(U, p);
27605
27605
  };
27606
- return Q.setUpSocketIOPing = s, Q;
27606
+ return Q.setUpSocketIOPing = u, Q;
27607
27607
  }
27608
27608
  var xe = {}, Na;
27609
27609
  function ja() {
27610
27610
  if (Na) return xe;
27611
- Na = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.heartbeat = d;
27611
+ Na = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.heartbeat = c;
27612
27612
  var e = A();
27613
- function n(s) {
27614
- return Array.isArray(s) ? s.reduce(function(o, u) {
27615
- return o.current > u.current ? o : u;
27616
- }).current : s.current;
27613
+ function m(u) {
27614
+ return Array.isArray(u) ? u.reduce(function(o, p) {
27615
+ return o.current > p.current ? o : p;
27616
+ }).current : u.current;
27617
27617
  }
27618
- function d(s, o, u) {
27619
- var U = u || {}, _ = U.interval, m = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, c = U.timeout, r = c === void 0 ? e.DEFAULT_HEARTBEAT.timeout : c, i = U.message, g = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, m / 10), t = Date.now(), y = setInterval(function() {
27620
- var b = Date.now(), p = n(o);
27621
- if (p + r <= b)
27622
- 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();
27623
- else if (p + m <= b && t + m <= b)
27618
+ function c(u, o, p) {
27619
+ var U = p || {}, _ = U.interval, r = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, s = U.timeout, n = s === void 0 ? e.DEFAULT_HEARTBEAT.timeout : s, i = U.message, d = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, r / 10), t = Date.now(), y = setInterval(function() {
27620
+ var b = Date.now(), g = m(o);
27621
+ if (g + n <= b)
27622
+ console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - g, "ms ago, last ping sent ").concat(b - t, "ms ago")), u.close();
27623
+ else if (g + r <= b && t + r <= b)
27624
27624
  try {
27625
- typeof g == "function" ? s.send(g()) : s.send(g), t = b;
27625
+ typeof d == "function" ? u.send(d()) : u.send(d), t = b;
27626
27626
  } catch (T) {
27627
- console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), s.close();
27627
+ console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), u.close();
27628
27628
  }
27629
27629
  }, l);
27630
- return s.addEventListener("close", function() {
27630
+ return u.addEventListener("close", function() {
27631
27631
  clearInterval(y);
27632
27632
  }), function() {
27633
27633
  };
@@ -27638,29 +27638,29 @@ var ve = {}, Ke = {}, Da;
27638
27638
  function ea() {
27639
27639
  return Da || (Da = 1, (function(e) {
27640
27640
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
27641
- var n = {}, d = [], s = function(m) {
27642
- return (0, e.hasSubscribers)(m) ? Array.from(n[m]) : d;
27641
+ var m = {}, c = [], u = function(r) {
27642
+ return (0, e.hasSubscribers)(r) ? Array.from(m[r]) : c;
27643
27643
  };
27644
- e.getSubscribers = s;
27645
- var o = function(m) {
27646
- var c;
27647
- return ((c = n[m]) === null || c === void 0 ? void 0 : c.size) > 0;
27644
+ e.getSubscribers = u;
27645
+ var o = function(r) {
27646
+ var s;
27647
+ return ((s = m[r]) === null || s === void 0 ? void 0 : s.size) > 0;
27648
27648
  };
27649
27649
  e.hasSubscribers = o;
27650
- var u = function(m, c) {
27651
- n[m] = n[m] || /* @__PURE__ */ new Set(), n[m].add(c);
27650
+ var p = function(r, s) {
27651
+ m[r] = m[r] || /* @__PURE__ */ new Set(), m[r].add(s);
27652
27652
  };
27653
- e.addSubscriber = u;
27654
- var U = function(m, c) {
27655
- n[m].delete(c);
27653
+ e.addSubscriber = p;
27654
+ var U = function(r, s) {
27655
+ m[r].delete(s);
27656
27656
  };
27657
27657
  e.removeSubscriber = U;
27658
- var _ = function(m) {
27659
- if (m && n.hasOwnProperty(m))
27660
- delete n[m];
27658
+ var _ = function(r) {
27659
+ if (r && m.hasOwnProperty(r))
27660
+ delete m[r];
27661
27661
  else
27662
- for (var c in n)
27663
- n.hasOwnProperty(c) && delete n[c];
27662
+ for (var s in m)
27663
+ m.hasOwnProperty(s) && delete m[s];
27664
27664
  };
27665
27665
  e.resetSubscribers = _;
27666
27666
  })(Ke)), Ke;
@@ -27668,14 +27668,14 @@ function ea() {
27668
27668
  var Ea;
27669
27669
  function aa() {
27670
27670
  if (Ea) return ve;
27671
- Ea = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.assertIsWebSocket = d, ve.resetGlobalState = s;
27672
- var e = Xe(), n = ea();
27673
- function d(o, u) {
27674
- if (!u && !(o instanceof WebSocket))
27671
+ Ea = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.assertIsWebSocket = c, ve.resetGlobalState = u;
27672
+ var e = Xe(), m = ea();
27673
+ function c(o, p) {
27674
+ if (!p && !(o instanceof WebSocket))
27675
27675
  throw new Error("");
27676
27676
  }
27677
- function s(o) {
27678
- (0, n.resetSubscribers)(o), (0, e.resetWebSockets)(o);
27677
+ function u(o) {
27678
+ (0, m.resetSubscribers)(o), (0, e.resetWebSockets)(o);
27679
27679
  }
27680
27680
  return ve;
27681
27681
  }
@@ -27684,70 +27684,70 @@ function Ki() {
27684
27684
  if (La) return ne;
27685
27685
  La = 1;
27686
27686
  var e = ne && ne.__assign || function() {
27687
- return e = Object.assign || function(r) {
27688
- for (var i, g = 1, l = arguments.length; g < l; g++) {
27689
- i = arguments[g];
27690
- for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (r[t] = i[t]);
27687
+ return e = Object.assign || function(n) {
27688
+ for (var i, d = 1, l = arguments.length; d < l; d++) {
27689
+ i = arguments[d];
27690
+ for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (n[t] = i[t]);
27691
27691
  }
27692
- return r;
27692
+ return n;
27693
27693
  }, e.apply(this, arguments);
27694
27694
  };
27695
27695
  Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachListeners = void 0;
27696
- var n = $e(), d = ja(), s = A(), o = aa(), u = function(r, i, g, l) {
27697
- r.onmessage = function(t) {
27696
+ var m = $e(), c = ja(), u = A(), o = aa(), p = function(n, i, d, l) {
27697
+ n.onmessage = function(t) {
27698
27698
  var y;
27699
- 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));
27699
+ 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 || d(t));
27700
27700
  };
27701
- }, U = function(r, i, g, l, t) {
27702
- r.onopen = function(y) {
27703
- if (i.current.onOpen && i.current.onOpen(y), l.current = 0, g(s.ReadyState.OPEN), i.current.heartbeat && r instanceof WebSocket) {
27701
+ }, U = function(n, i, d, l, t) {
27702
+ n.onopen = function(y) {
27703
+ if (i.current.onOpen && i.current.onOpen(y), l.current = 0, d(u.ReadyState.OPEN), i.current.heartbeat && n instanceof WebSocket) {
27704
27704
  var b = typeof i.current.heartbeat == "boolean" ? void 0 : i.current.heartbeat;
27705
- t.current = Date.now(), (0, d.heartbeat)(r, t, b);
27705
+ t.current = Date.now(), (0, c.heartbeat)(n, t, b);
27706
27706
  }
27707
27707
  };
27708
- }, _ = function(r, i, g, l, t) {
27709
- if (s.isEventSourceSupported && r instanceof EventSource)
27708
+ }, _ = function(n, i, d, l, t) {
27709
+ if (u.isEventSourceSupported && n instanceof EventSource)
27710
27710
  return function() {
27711
27711
  };
27712
- (0, o.assertIsWebSocket)(r, i.current.skipAssert);
27712
+ (0, o.assertIsWebSocket)(n, i.current.skipAssert);
27713
27713
  var y;
27714
- return r.onclose = function(b) {
27715
- var p;
27716
- if (i.current.onClose && i.current.onClose(b), g(s.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
27717
- var T = (p = i.current.reconnectAttempts) !== null && p !== void 0 ? p : s.DEFAULT_RECONNECT_LIMIT;
27714
+ return n.onclose = function(b) {
27715
+ var g;
27716
+ if (i.current.onClose && i.current.onClose(b), d(u.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
27717
+ var T = (g = i.current.reconnectAttempts) !== null && g !== void 0 ? g : u.DEFAULT_RECONNECT_LIMIT;
27718
27718
  if (t.current < T) {
27719
27719
  var N = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27720
27720
  y = window.setTimeout(function() {
27721
27721
  t.current++, l();
27722
- }, N ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
27722
+ }, N ?? u.DEFAULT_RECONNECT_INTERVAL_MS);
27723
27723
  } else
27724
27724
  i.current.onReconnectStop && i.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
27725
27725
  }
27726
27726
  }, function() {
27727
27727
  return y && window.clearTimeout(y);
27728
27728
  };
27729
- }, m = function(r, i, g, l, t) {
27729
+ }, r = function(n, i, d, l, t) {
27730
27730
  var y;
27731
- return r.onerror = function(b) {
27732
- var p;
27733
- if (i.current.onError && i.current.onError(b), s.isEventSourceSupported && r 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), r.close()), i.current.retryOnError)
27734
- if (t.current < ((p = i.current.reconnectAttempts) !== null && p !== void 0 ? p : s.DEFAULT_RECONNECT_LIMIT)) {
27731
+ return n.onerror = function(b) {
27732
+ var g;
27733
+ if (i.current.onError && i.current.onError(b), u.isEventSourceSupported && n instanceof EventSource && (i.current.onClose && i.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(u.ReadyState.CLOSED), n.close()), i.current.retryOnError)
27734
+ if (t.current < ((g = i.current.reconnectAttempts) !== null && g !== void 0 ? g : u.DEFAULT_RECONNECT_LIMIT)) {
27735
27735
  var T = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27736
27736
  y = window.setTimeout(function() {
27737
27737
  t.current++, l();
27738
- }, T ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
27738
+ }, T ?? u.DEFAULT_RECONNECT_INTERVAL_MS);
27739
27739
  } else
27740
27740
  i.current.onReconnectStop && i.current.onReconnectStop(i.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(i.current.reconnectAttempts, " exceeded"));
27741
27741
  }, function() {
27742
27742
  return y && window.clearTimeout(y);
27743
27743
  };
27744
- }, c = function(r, i, g, l, t, y, b) {
27745
- var p = i.setLastMessage, T = i.setReadyState, N, D, h;
27746
- return g.current.fromSocketIO && (N = (0, n.setUpSocketIOPing)(b)), u(r, g, p, y), U(r, g, T, t, y), D = _(r, g, T, l, t), h = m(r, g, T, l, t), function() {
27747
- T(s.ReadyState.CLOSING), D(), h(), r.close(), N && clearInterval(N);
27744
+ }, s = function(n, i, d, l, t, y, b) {
27745
+ var g = i.setLastMessage, T = i.setReadyState, N, D, h;
27746
+ return d.current.fromSocketIO && (N = (0, m.setUpSocketIOPing)(b)), p(n, d, g, y), U(n, d, T, t, y), D = _(n, d, T, l, t), h = r(n, d, T, l, t), function() {
27747
+ T(u.ReadyState.CLOSING), D(), h(), n.close(), N && clearInterval(N);
27748
27748
  };
27749
27749
  };
27750
- return ne.attachListeners = c, ne;
27750
+ return ne.attachListeners = s, ne;
27751
27751
  }
27752
27752
  var me = {}, Ga;
27753
27753
  function ji() {
@@ -27755,101 +27755,101 @@ function ji() {
27755
27755
  Ga = 1;
27756
27756
  var e = me && me.__assign || function() {
27757
27757
  return e = Object.assign || function(i) {
27758
- for (var g, l = 1, t = arguments.length; l < t; l++) {
27759
- g = arguments[l];
27760
- for (var y in g) Object.prototype.hasOwnProperty.call(g, y) && (i[y] = g[y]);
27758
+ for (var d, l = 1, t = arguments.length; l < t; l++) {
27759
+ d = arguments[l];
27760
+ for (var y in d) Object.prototype.hasOwnProperty.call(d, y) && (i[y] = d[y]);
27761
27761
  }
27762
27762
  return i;
27763
27763
  }, e.apply(this, arguments);
27764
27764
  };
27765
27765
  Object.defineProperty(me, "__esModule", { value: !0 }), me.attachSharedListeners = void 0;
27766
- var n = Xe(), d = A(), s = ea(), o = $e(), u = ja(), U = function(i, g, l) {
27766
+ var m = Xe(), c = A(), u = ea(), o = $e(), p = ja(), U = function(i, d, l) {
27767
27767
  i.onmessage = function(t) {
27768
- (0, s.getSubscribers)(g).forEach(function(y) {
27768
+ (0, u.getSubscribers)(d).forEach(function(y) {
27769
27769
  var b;
27770
27770
  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));
27771
27771
  });
27772
27772
  };
27773
- }, _ = function(i, g, l) {
27773
+ }, _ = function(i, d, l) {
27774
27774
  i.onopen = function(t) {
27775
- var y = (0, s.getSubscribers)(g);
27775
+ var y = (0, u.getSubscribers)(d);
27776
27776
  y.forEach(function(b) {
27777
- 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());
27778
- }), l && i instanceof WebSocket && (0, u.heartbeat)(i, y.map(function(b) {
27777
+ b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(t), b.setReadyState(c.ReadyState.OPEN), l && i instanceof WebSocket && (b.lastMessageTime.current = Date.now());
27778
+ }), l && i instanceof WebSocket && (0, p.heartbeat)(i, y.map(function(b) {
27779
27779
  return b.lastMessageTime;
27780
27780
  }), typeof l == "boolean" ? void 0 : l);
27781
27781
  };
27782
- }, m = function(i, g) {
27782
+ }, r = function(i, d) {
27783
27783
  i instanceof WebSocket && (i.onclose = function(l) {
27784
- (0, s.getSubscribers)(g).forEach(function(t) {
27785
- t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(d.ReadyState.CLOSED);
27786
- }), delete n.sharedWebSockets[g], (0, s.getSubscribers)(g).forEach(function(t) {
27784
+ (0, u.getSubscribers)(d).forEach(function(t) {
27785
+ t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(c.ReadyState.CLOSED);
27786
+ }), delete m.sharedWebSockets[d], (0, u.getSubscribers)(d).forEach(function(t) {
27787
27787
  var y;
27788
27788
  if (t.optionsRef.current.shouldReconnect && t.optionsRef.current.shouldReconnect(l)) {
27789
- var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : d.DEFAULT_RECONNECT_LIMIT;
27789
+ var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : c.DEFAULT_RECONNECT_LIMIT;
27790
27790
  if (t.reconnectCount.current < b) {
27791
- var p = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
27791
+ var g = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
27792
27792
  setTimeout(function() {
27793
27793
  t.reconnectCount.current++, t.reconnect.current();
27794
- }, p ?? d.DEFAULT_RECONNECT_INTERVAL_MS);
27794
+ }, g ?? c.DEFAULT_RECONNECT_INTERVAL_MS);
27795
27795
  } else
27796
27796
  t.optionsRef.current.onReconnectStop && t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
27797
27797
  }
27798
27798
  });
27799
27799
  });
27800
- }, c = function(i, g) {
27800
+ }, s = function(i, d) {
27801
27801
  i.onerror = function(l) {
27802
- (0, s.getSubscribers)(g).forEach(function(t) {
27803
- 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));
27804
- }), d.isEventSourceSupported && i instanceof EventSource && i.close();
27802
+ (0, u.getSubscribers)(d).forEach(function(t) {
27803
+ t.optionsRef.current.onError && t.optionsRef.current.onError(l), c.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(c.ReadyState.CLOSED));
27804
+ }), c.isEventSourceSupported && i instanceof EventSource && i.close();
27805
27805
  };
27806
- }, r = function(i, g, l, t) {
27806
+ }, n = function(i, d, l, t) {
27807
27807
  var y;
27808
- return l.current.fromSocketIO && (y = (0, o.setUpSocketIOPing)(t)), U(i, g, l.current.heartbeat), m(i, g), _(i, g, l.current.heartbeat), c(i, g), function() {
27808
+ return l.current.fromSocketIO && (y = (0, o.setUpSocketIOPing)(t)), U(i, d, l.current.heartbeat), r(i, d), _(i, d, l.current.heartbeat), s(i, d), function() {
27809
27809
  y && clearInterval(y);
27810
27810
  };
27811
27811
  };
27812
- return me.attachSharedListeners = r, me;
27812
+ return me.attachSharedListeners = n, me;
27813
27813
  }
27814
27814
  var Ma;
27815
27815
  function Qi() {
27816
27816
  if (Ma) return Ce;
27817
27817
  Ma = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.createOrJoinSocket = void 0;
27818
- var e = Xe(), n = A(), d = Ki(), s = ji(), o = ea(), u = function(_, m, c, r, i) {
27818
+ var e = Xe(), m = A(), c = Ki(), u = ji(), o = ea(), p = function(_, r, s, n, i) {
27819
27819
  return function() {
27820
- if ((0, o.removeSubscriber)(_, m), !(0, o.hasSubscribers)(_)) {
27820
+ if ((0, o.removeSubscriber)(_, r), !(0, o.hasSubscribers)(_)) {
27821
27821
  try {
27822
- var g = e.sharedWebSockets[_];
27823
- g instanceof WebSocket && (g.onclose = function(l) {
27824
- c.current.onClose && c.current.onClose(l), r(n.ReadyState.CLOSED);
27825
- }), g.close();
27822
+ var d = e.sharedWebSockets[_];
27823
+ d instanceof WebSocket && (d.onclose = function(l) {
27824
+ s.current.onClose && s.current.onClose(l), n(m.ReadyState.CLOSED);
27825
+ }), d.close();
27826
27826
  } catch {
27827
27827
  }
27828
27828
  i && i(), delete e.sharedWebSockets[_];
27829
27829
  }
27830
27830
  };
27831
- }, U = function(_, m, c, r, i, g, l, t, y) {
27832
- if (!n.isEventSourceSupported && r.current.eventSourceOptions)
27833
- throw n.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
27834
- if (r.current.share) {
27831
+ }, U = function(_, r, s, n, i, d, l, t, y) {
27832
+ if (!m.isEventSourceSupported && n.current.eventSourceOptions)
27833
+ throw m.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
27834
+ if (n.current.share) {
27835
27835
  var b = null;
27836
- e.sharedWebSockets[m] === void 0 ? (e.sharedWebSockets[m] = r.current.eventSourceOptions ? new EventSource(m, r.current.eventSourceOptions) : new WebSocket(m, r.current.protocols), _.current = e.sharedWebSockets[m], c(n.ReadyState.CONNECTING), b = (0, s.attachSharedListeners)(e.sharedWebSockets[m], m, r, y)) : (_.current = e.sharedWebSockets[m], c(e.sharedWebSockets[m].readyState));
27837
- var p = {
27836
+ e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] = n.current.eventSourceOptions ? new EventSource(r, n.current.eventSourceOptions) : new WebSocket(r, n.current.protocols), _.current = e.sharedWebSockets[r], s(m.ReadyState.CONNECTING), b = (0, u.attachSharedListeners)(e.sharedWebSockets[r], r, n, y)) : (_.current = e.sharedWebSockets[r], s(e.sharedWebSockets[r].readyState));
27837
+ var g = {
27838
27838
  setLastMessage: i,
27839
- setReadyState: c,
27840
- optionsRef: r,
27839
+ setReadyState: s,
27840
+ optionsRef: n,
27841
27841
  reconnectCount: l,
27842
27842
  lastMessageTime: t,
27843
- reconnect: g
27843
+ reconnect: d
27844
27844
  };
27845
- return (0, o.addSubscriber)(m, p), u(m, p, r, c, b);
27845
+ return (0, o.addSubscriber)(r, g), p(r, g, n, s, b);
27846
27846
  } else {
27847
- if (_.current = r.current.eventSourceOptions ? new EventSource(m, r.current.eventSourceOptions) : new WebSocket(m, r.current.protocols), c(n.ReadyState.CONNECTING), !_.current)
27847
+ if (_.current = n.current.eventSourceOptions ? new EventSource(r, n.current.eventSourceOptions) : new WebSocket(r, n.current.protocols), s(m.ReadyState.CONNECTING), !_.current)
27848
27848
  throw new Error("WebSocket failed to be created");
27849
- return (0, d.attachListeners)(_.current, {
27849
+ return (0, c.attachListeners)(_.current, {
27850
27850
  setLastMessage: i,
27851
- setReadyState: c
27852
- }, r, g.current, l, t, y);
27851
+ setReadyState: s
27852
+ }, n, d.current, l, t, y);
27853
27853
  }
27854
27854
  };
27855
27855
  return Ce.createOrJoinSocket = U, Ce;
@@ -27857,119 +27857,119 @@ function Qi() {
27857
27857
  var Y = {}, Ra;
27858
27858
  function Yi() {
27859
27859
  return Ra || (Ra = 1, (function(e) {
27860
- var n = Y && Y.__awaiter || function(m, c, r, i) {
27861
- function g(l) {
27862
- return l instanceof r ? l : new r(function(t) {
27860
+ var m = Y && Y.__awaiter || function(r, s, n, i) {
27861
+ function d(l) {
27862
+ return l instanceof n ? l : new n(function(t) {
27863
27863
  t(l);
27864
27864
  });
27865
27865
  }
27866
- return new (r || (r = Promise))(function(l, t) {
27866
+ return new (n || (n = Promise))(function(l, t) {
27867
27867
  function y(T) {
27868
27868
  try {
27869
- p(i.next(T));
27869
+ g(i.next(T));
27870
27870
  } catch (N) {
27871
27871
  t(N);
27872
27872
  }
27873
27873
  }
27874
27874
  function b(T) {
27875
27875
  try {
27876
- p(i.throw(T));
27876
+ g(i.throw(T));
27877
27877
  } catch (N) {
27878
27878
  t(N);
27879
27879
  }
27880
27880
  }
27881
- function p(T) {
27882
- T.done ? l(T.value) : g(T.value).then(y, b);
27881
+ function g(T) {
27882
+ T.done ? l(T.value) : d(T.value).then(y, b);
27883
27883
  }
27884
- p((i = i.apply(m, c || [])).next());
27884
+ g((i = i.apply(r, s || [])).next());
27885
27885
  });
27886
- }, d = Y && Y.__generator || function(m, c) {
27887
- var r = { label: 0, sent: function() {
27886
+ }, c = Y && Y.__generator || function(r, s) {
27887
+ var n = { label: 0, sent: function() {
27888
27888
  if (l[0] & 1) throw l[1];
27889
27889
  return l[1];
27890
- }, trys: [], ops: [] }, i, g, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27890
+ }, trys: [], ops: [] }, i, d, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27891
27891
  return t.next = y(0), t.throw = y(1), t.return = y(2), typeof Symbol == "function" && (t[Symbol.iterator] = function() {
27892
27892
  return this;
27893
27893
  }), t;
27894
- function y(p) {
27894
+ function y(g) {
27895
27895
  return function(T) {
27896
- return b([p, T]);
27896
+ return b([g, T]);
27897
27897
  };
27898
27898
  }
27899
- function b(p) {
27899
+ function b(g) {
27900
27900
  if (i) throw new TypeError("Generator is already executing.");
27901
- for (; t && (t = 0, p[0] && (r = 0)), r; ) try {
27902
- 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;
27903
- switch (g = 0, l && (p = [p[0] & 2, l.value]), p[0]) {
27901
+ for (; t && (t = 0, g[0] && (n = 0)), n; ) try {
27902
+ if (i = 1, d && (l = g[0] & 2 ? d.return : g[0] ? d.throw || ((l = d.return) && l.call(d), 0) : d.next) && !(l = l.call(d, g[1])).done) return l;
27903
+ switch (d = 0, l && (g = [g[0] & 2, l.value]), g[0]) {
27904
27904
  case 0:
27905
27905
  case 1:
27906
- l = p;
27906
+ l = g;
27907
27907
  break;
27908
27908
  case 4:
27909
- return r.label++, { value: p[1], done: !1 };
27909
+ return n.label++, { value: g[1], done: !1 };
27910
27910
  case 5:
27911
- r.label++, g = p[1], p = [0];
27911
+ n.label++, d = g[1], g = [0];
27912
27912
  continue;
27913
27913
  case 7:
27914
- p = r.ops.pop(), r.trys.pop();
27914
+ g = n.ops.pop(), n.trys.pop();
27915
27915
  continue;
27916
27916
  default:
27917
- if (l = r.trys, !(l = l.length > 0 && l[l.length - 1]) && (p[0] === 6 || p[0] === 2)) {
27918
- r = 0;
27917
+ if (l = n.trys, !(l = l.length > 0 && l[l.length - 1]) && (g[0] === 6 || g[0] === 2)) {
27918
+ n = 0;
27919
27919
  continue;
27920
27920
  }
27921
- if (p[0] === 3 && (!l || p[1] > l[0] && p[1] < l[3])) {
27922
- r.label = p[1];
27921
+ if (g[0] === 3 && (!l || g[1] > l[0] && g[1] < l[3])) {
27922
+ n.label = g[1];
27923
27923
  break;
27924
27924
  }
27925
- if (p[0] === 6 && r.label < l[1]) {
27926
- r.label = l[1], l = p;
27925
+ if (g[0] === 6 && n.label < l[1]) {
27926
+ n.label = l[1], l = g;
27927
27927
  break;
27928
27928
  }
27929
- if (l && r.label < l[2]) {
27930
- r.label = l[2], r.ops.push(p);
27929
+ if (l && n.label < l[2]) {
27930
+ n.label = l[2], n.ops.push(g);
27931
27931
  break;
27932
27932
  }
27933
- l[2] && r.ops.pop(), r.trys.pop();
27933
+ l[2] && n.ops.pop(), n.trys.pop();
27934
27934
  continue;
27935
27935
  }
27936
- p = c.call(m, r);
27936
+ g = s.call(r, n);
27937
27937
  } catch (T) {
27938
- p = [6, T], g = 0;
27938
+ g = [6, T], d = 0;
27939
27939
  } finally {
27940
27940
  i = l = 0;
27941
27941
  }
27942
- if (p[0] & 5) throw p[1];
27943
- return { value: p[0] ? p[1] : void 0, done: !0 };
27942
+ if (g[0] & 5) throw g[1];
27943
+ return { value: g[0] ? g[1] : void 0, done: !0 };
27944
27944
  }
27945
- }, s = Y && Y.__spreadArray || function(m, c, r) {
27946
- if (r || arguments.length === 2) for (var i = 0, g = c.length, l; i < g; i++)
27947
- (l || !(i in c)) && (l || (l = Array.prototype.slice.call(c, 0, i)), l[i] = c[i]);
27948
- return m.concat(l || Array.prototype.slice.call(c));
27945
+ }, u = Y && Y.__spreadArray || function(r, s, n) {
27946
+ if (n || arguments.length === 2) for (var i = 0, d = s.length, l; i < d; i++)
27947
+ (l || !(i in s)) && (l || (l = Array.prototype.slice.call(s, 0, i)), l[i] = s[i]);
27948
+ return r.concat(l || Array.prototype.slice.call(s));
27949
27949
  };
27950
27950
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
27951
- var o = $e(), u = A(), U = function(m) {
27952
- return new Promise(function(c) {
27953
- return window.setTimeout(c, m);
27951
+ var o = $e(), p = A(), U = function(r) {
27952
+ return new Promise(function(s) {
27953
+ return window.setTimeout(s, r);
27954
27954
  });
27955
- }, _ = function(m, c) {
27956
- for (var r = [], i = 2; i < arguments.length; i++)
27957
- r[i - 2] = arguments[i];
27958
- return n(void 0, s([m, c], r, !0), void 0, function(g, l, t) {
27959
- var y, b, p, T, N, D, h, L;
27960
- return t === void 0 && (t = 0), d(this, function(M) {
27955
+ }, _ = function(r, s) {
27956
+ for (var n = [], i = 2; i < arguments.length; i++)
27957
+ n[i - 2] = arguments[i];
27958
+ return m(void 0, u([r, s], n, !0), void 0, function(d, l, t) {
27959
+ var y, b, g, T, N, D, h, L;
27960
+ return t === void 0 && (t = 0), c(this, function(M) {
27961
27961
  switch (M.label) {
27962
27962
  case 0:
27963
- if (typeof g != "function") return [3, 10];
27963
+ if (typeof d != "function") return [3, 10];
27964
27964
  M.label = 1;
27965
27965
  case 1:
27966
- return M.trys.push([1, 3, , 9]), [4, g()];
27966
+ return M.trys.push([1, 3, , 9]), [4, d()];
27967
27967
  case 2:
27968
27968
  return y = M.sent(), [3, 9];
27969
27969
  case 3:
27970
- 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];
27970
+ return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : p.DEFAULT_RECONNECT_LIMIT, t < b ? (g = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, U(g ?? p.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27971
27971
  case 4:
27972
- return M.sent(), [2, (0, e.getUrl)(g, l, t + 1)];
27972
+ return M.sent(), [2, (0, e.getUrl)(d, l, t + 1)];
27973
27973
  case 5:
27974
27974
  return (L = (h = l.current).onReconnectStop) === null || L === void 0 || L.call(h, t), [2, null];
27975
27975
  case 6:
@@ -27981,7 +27981,7 @@ function Yi() {
27981
27981
  case 9:
27982
27982
  return [3, 11];
27983
27983
  case 10:
27984
- y = g, M.label = 11;
27984
+ y = d, M.label = 11;
27985
27985
  case 11:
27986
27986
  return T = l.current.fromSocketIO ? (0, o.parseSocketIOUrl)(y) : y, N = l.current.queryParams ? (0, o.appendQueryParams)(T, l.current.queryParams) : T, [2, N];
27987
27987
  }
@@ -27995,19 +27995,19 @@ var je = {}, Pa;
27995
27995
  function qi() {
27996
27996
  return Pa || (Pa = 1, (function(e) {
27997
27997
  Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
27998
- var n = function(d, s) {
27999
- return new Proxy(d, {
28000
- get: function(o, u) {
28001
- var U = o[u];
28002
- 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() {
27998
+ var m = function(c, u) {
27999
+ return new Proxy(c, {
28000
+ get: function(o, p) {
28001
+ var U = o[p];
28002
+ return p === "reconnect" ? u : 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() {
28003
28003
  }) : U;
28004
28004
  },
28005
- set: function(o, u, U) {
28006
- 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);
28005
+ set: function(o, p, U) {
28006
+ 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);
28007
28007
  }
28008
28008
  });
28009
28009
  };
28010
- e.websocketWrapper = n, e.default = e.websocketWrapper;
28010
+ e.websocketWrapper = m, e.default = e.websocketWrapper;
28011
28011
  })(je)), je;
28012
28012
  }
28013
28013
  var xa;
@@ -28015,20 +28015,20 @@ function ia() {
28015
28015
  if (xa) return J;
28016
28016
  xa = 1;
28017
28017
  var e = J && J.__assign || function() {
28018
- return e = Object.assign || function(g) {
28018
+ return e = Object.assign || function(d) {
28019
28019
  for (var l, t = 1, y = arguments.length; t < y; t++) {
28020
28020
  l = arguments[t];
28021
- for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (g[b] = l[b]);
28021
+ for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (d[b] = l[b]);
28022
28022
  }
28023
- return g;
28023
+ return d;
28024
28024
  }, e.apply(this, arguments);
28025
- }, n = J && J.__awaiter || function(g, l, t, y) {
28026
- function b(p) {
28027
- return p instanceof t ? p : new t(function(T) {
28028
- T(p);
28025
+ }, m = J && J.__awaiter || function(d, l, t, y) {
28026
+ function b(g) {
28027
+ return g instanceof t ? g : new t(function(T) {
28028
+ T(g);
28029
28029
  });
28030
28030
  }
28031
- return new (t || (t = Promise))(function(p, T) {
28031
+ return new (t || (t = Promise))(function(g, T) {
28032
28032
  function N(L) {
28033
28033
  try {
28034
28034
  h(y.next(L));
@@ -28044,15 +28044,15 @@ function ia() {
28044
28044
  }
28045
28045
  }
28046
28046
  function h(L) {
28047
- L.done ? p(L.value) : b(L.value).then(N, D);
28047
+ L.done ? g(L.value) : b(L.value).then(N, D);
28048
28048
  }
28049
- h((y = y.apply(g, l || [])).next());
28049
+ h((y = y.apply(d, l || [])).next());
28050
28050
  });
28051
- }, d = J && J.__generator || function(g, l) {
28051
+ }, c = J && J.__generator || function(d, l) {
28052
28052
  var t = { label: 0, sent: function() {
28053
- if (p[0] & 1) throw p[1];
28054
- return p[1];
28055
- }, trys: [], ops: [] }, y, b, p, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
28053
+ if (g[0] & 1) throw g[1];
28054
+ return g[1];
28055
+ }, trys: [], ops: [] }, y, b, g, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
28056
28056
  return T.next = N(0), T.throw = N(1), T.return = N(2), typeof Symbol == "function" && (T[Symbol.iterator] = function() {
28057
28057
  return this;
28058
28058
  }), T;
@@ -28064,11 +28064,11 @@ function ia() {
28064
28064
  function D(h) {
28065
28065
  if (y) throw new TypeError("Generator is already executing.");
28066
28066
  for (; T && (T = 0, h[0] && (t = 0)), t; ) try {
28067
- 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;
28068
- switch (b = 0, p && (h = [h[0] & 2, p.value]), h[0]) {
28067
+ if (y = 1, b && (g = h[0] & 2 ? b.return : h[0] ? b.throw || ((g = b.return) && g.call(b), 0) : b.next) && !(g = g.call(b, h[1])).done) return g;
28068
+ switch (b = 0, g && (h = [h[0] & 2, g.value]), h[0]) {
28069
28069
  case 0:
28070
28070
  case 1:
28071
- p = h;
28071
+ g = h;
28072
28072
  break;
28073
28073
  case 4:
28074
28074
  return t.label++, { value: h[1], done: !1 };
@@ -28079,41 +28079,41 @@ function ia() {
28079
28079
  h = t.ops.pop(), t.trys.pop();
28080
28080
  continue;
28081
28081
  default:
28082
- if (p = t.trys, !(p = p.length > 0 && p[p.length - 1]) && (h[0] === 6 || h[0] === 2)) {
28082
+ if (g = t.trys, !(g = g.length > 0 && g[g.length - 1]) && (h[0] === 6 || h[0] === 2)) {
28083
28083
  t = 0;
28084
28084
  continue;
28085
28085
  }
28086
- if (h[0] === 3 && (!p || h[1] > p[0] && h[1] < p[3])) {
28086
+ if (h[0] === 3 && (!g || h[1] > g[0] && h[1] < g[3])) {
28087
28087
  t.label = h[1];
28088
28088
  break;
28089
28089
  }
28090
- if (h[0] === 6 && t.label < p[1]) {
28091
- t.label = p[1], p = h;
28090
+ if (h[0] === 6 && t.label < g[1]) {
28091
+ t.label = g[1], g = h;
28092
28092
  break;
28093
28093
  }
28094
- if (p && t.label < p[2]) {
28095
- t.label = p[2], t.ops.push(h);
28094
+ if (g && t.label < g[2]) {
28095
+ t.label = g[2], t.ops.push(h);
28096
28096
  break;
28097
28097
  }
28098
- p[2] && t.ops.pop(), t.trys.pop();
28098
+ g[2] && t.ops.pop(), t.trys.pop();
28099
28099
  continue;
28100
28100
  }
28101
- h = l.call(g, t);
28101
+ h = l.call(d, t);
28102
28102
  } catch (L) {
28103
28103
  h = [6, L], b = 0;
28104
28104
  } finally {
28105
- y = p = 0;
28105
+ y = g = 0;
28106
28106
  }
28107
28107
  if (h[0] & 5) throw h[1];
28108
28108
  return { value: h[0] ? h[1] : void 0, done: !0 };
28109
28109
  }
28110
- }, s = J && J.__importDefault || function(g) {
28111
- return g && g.__esModule ? g : { default: g };
28110
+ }, u = J && J.__importDefault || function(d) {
28111
+ return d && d.__esModule ? d : { default: d };
28112
28112
  };
28113
28113
  Object.defineProperty(J, "__esModule", { value: !0 }), J.useWebSocket = void 0;
28114
- var o = ke, u = ki, U = A(), _ = Qi(), m = Yi(), c = s(qi()), r = aa(), i = function(g, l, t) {
28114
+ var o = ke, p = ki, U = A(), _ = Qi(), r = Yi(), s = u(qi()), n = aa(), i = function(d, l, t) {
28115
28115
  l === void 0 && (l = U.DEFAULT_OPTIONS), t === void 0 && (t = !0);
28116
- 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() {
28116
+ var y = (0, o.useState)(null), b = y[0], g = y[1], T = (0, o.useState)({}), N = T[0], D = T[1], h = (0, o.useMemo)(function() {
28117
28117
  if (!l.disableJson && b)
28118
28118
  try {
28119
28119
  return JSON.parse(b.data);
@@ -28124,29 +28124,29 @@ function ia() {
28124
28124
  }, [b, l.disableJson]), L = (0, o.useRef)(null), M = (0, o.useRef)(null), _e = (0, o.useRef)(function() {
28125
28125
  }), fe = (0, o.useRef)(0), Fe = (0, o.useRef)(Date.now()), Se = (0, o.useRef)([]), V = (0, o.useRef)(null), H = (0, o.useRef)(l);
28126
28126
  H.current = l;
28127
- 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) {
28127
+ var Z = L.current && N[L.current] !== void 0 ? N[L.current] : d !== null && t === !0 ? U.ReadyState.CONNECTING : U.ReadyState.UNINSTANTIATED, ae = l.queryParams ? JSON.stringify(l.queryParams) : null, B = (0, o.useCallback)(function(x, w) {
28128
28128
  var K;
28129
28129
  if (w === void 0 && (w = !0), U.isEventSourceSupported && M.current instanceof EventSource) {
28130
28130
  console.warn("Unable to send a message from an eventSource");
28131
28131
  return;
28132
28132
  }
28133
- ((K = M.current) === null || K === void 0 ? void 0 : K.readyState) === U.ReadyState.OPEN ? ((0, r.assertIsWebSocket)(M.current, H.current.skipAssert), M.current.send(x)) : w && Se.current.push(x);
28133
+ ((K = M.current) === null || K === void 0 ? void 0 : K.readyState) === U.ReadyState.OPEN ? ((0, n.assertIsWebSocket)(M.current, H.current.skipAssert), M.current.send(x)) : w && Se.current.push(x);
28134
28134
  }, []), Ne = (0, o.useCallback)(function(x, w) {
28135
28135
  w === void 0 && (w = !0), B(JSON.stringify(x), w);
28136
28136
  }, [B]), De = (0, o.useCallback)(function() {
28137
- return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, r.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, c.default)(M.current, _e)), V.current);
28137
+ return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, n.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, s.default)(M.current, _e)), V.current);
28138
28138
  }, []);
28139
28139
  return (0, o.useEffect)(function() {
28140
- if (g !== null && t === !0) {
28140
+ if (d !== null && t === !0) {
28141
28141
  var x, w = !1, K = !0, Ue = function() {
28142
- return n(void 0, void 0, void 0, function() {
28142
+ return m(void 0, void 0, void 0, function() {
28143
28143
  var ie, $, Ee;
28144
- return d(this, function(se) {
28144
+ return c(this, function(se) {
28145
28145
  switch (se.label) {
28146
28146
  case 0:
28147
- return ie = L, [4, (0, m.getUrl)(g, H)];
28147
+ return ie = L, [4, (0, r.getUrl)(d, H)];
28148
28148
  case 1:
28149
- 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() {
28149
+ 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() {
28150
28150
  return D(function(j) {
28151
28151
  return e(e({}, j), { ABORTED: U.ReadyState.CLOSED });
28152
28152
  });
@@ -28154,11 +28154,11 @@ function ia() {
28154
28154
  2
28155
28155
  /*return*/
28156
28156
  ]) : ($ = function(j) {
28157
- w || (0, u.flushSync)(function() {
28158
- return p(j);
28157
+ w || (0, p.flushSync)(function() {
28158
+ return g(j);
28159
28159
  });
28160
28160
  }, Ee = function(j) {
28161
- w || (0, u.flushSync)(function() {
28161
+ w || (0, p.flushSync)(function() {
28162
28162
  return D(function(ue) {
28163
28163
  var le;
28164
28164
  return e(e({}, ue), L.current && (le = {}, le[L.current] = j, le));
@@ -28175,13 +28175,13 @@ function ia() {
28175
28175
  return _e.current = function() {
28176
28176
  w || (V.current && (V.current = null), x?.(), Ue());
28177
28177
  }, Ue(), function() {
28178
- w = !0, K = !1, V.current && (V.current = null), x?.(), p(null);
28178
+ w = !0, K = !1, V.current && (V.current = null), x?.(), g(null);
28179
28179
  };
28180
- } else (g === null || t === !1) && (fe.current = 0, D(function(ie) {
28180
+ } else (d === null || t === !1) && (fe.current = 0, D(function(ie) {
28181
28181
  var $;
28182
28182
  return e(e({}, ie), L.current && ($ = {}, $[L.current] = U.ReadyState.CLOSED, $));
28183
28183
  }));
28184
- }, [g, t, ae, B]), (0, o.useEffect)(function() {
28184
+ }, [d, t, ae, B]), (0, o.useEffect)(function() {
28185
28185
  Z === U.ReadyState.OPEN && Se.current.splice(0).forEach(function(x) {
28186
28186
  B(x);
28187
28187
  });
@@ -28202,40 +28202,40 @@ function Xi() {
28202
28202
  Oa = 1;
28203
28203
  var e = re && re.__assign || function() {
28204
28204
  return e = Object.assign || function(_) {
28205
- for (var m, c = 1, r = arguments.length; c < r; c++) {
28206
- m = arguments[c];
28207
- for (var i in m) Object.prototype.hasOwnProperty.call(m, i) && (_[i] = m[i]);
28205
+ for (var r, s = 1, n = arguments.length; s < n; s++) {
28206
+ r = arguments[s];
28207
+ for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (_[i] = r[i]);
28208
28208
  }
28209
28209
  return _;
28210
28210
  }, e.apply(this, arguments);
28211
28211
  };
28212
28212
  Object.defineProperty(re, "__esModule", { value: !0 }), re.useSocketIO = void 0;
28213
- var n = ke, d = ia(), s = A(), o = {
28213
+ var m = ke, c = ia(), u = A(), o = {
28214
28214
  type: "empty",
28215
28215
  payload: null
28216
- }, u = function(_) {
28216
+ }, p = function(_) {
28217
28217
  if (!_ || !_.data)
28218
28218
  return o;
28219
- var m = _.data.match(/\[.*]/);
28220
- if (!m)
28219
+ var r = _.data.match(/\[.*]/);
28220
+ if (!r)
28221
28221
  return o;
28222
- var c = JSON.parse(m);
28223
- return !Array.isArray(c) || !c[1] ? o : {
28224
- type: c[0],
28225
- payload: c[1]
28222
+ var s = JSON.parse(r);
28223
+ return !Array.isArray(s) || !s[1] ? o : {
28224
+ type: s[0],
28225
+ payload: s[1]
28226
28226
  };
28227
- }, U = function(_, m, c) {
28228
- m === void 0 && (m = s.DEFAULT_OPTIONS), c === void 0 && (c = !0);
28229
- var r = (0, n.useMemo)(function() {
28230
- return e(e({}, m), { fromSocketIO: !0 });
28231
- }, []), i = (0, d.useWebSocket)(_, r, c), g = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, p = (0, n.useMemo)(function() {
28232
- return u(t);
28227
+ }, U = function(_, r, s) {
28228
+ r === void 0 && (r = u.DEFAULT_OPTIONS), s === void 0 && (s = !0);
28229
+ var n = (0, m.useMemo)(function() {
28230
+ return e(e({}, r), { fromSocketIO: !0 });
28231
+ }, []), i = (0, c.useWebSocket)(_, n, s), d = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, g = (0, m.useMemo)(function() {
28232
+ return p(t);
28233
28233
  }, [t]);
28234
28234
  return {
28235
- sendMessage: g,
28235
+ sendMessage: d,
28236
28236
  sendJsonMessage: l,
28237
- lastMessage: p,
28238
- lastJsonMessage: p,
28237
+ lastMessage: g,
28238
+ lastJsonMessage: g,
28239
28239
  readyState: y,
28240
28240
  getWebSocket: b
28241
28241
  };
@@ -28248,31 +28248,31 @@ function $i() {
28248
28248
  Ha = 1;
28249
28249
  var e = q && q.__assign || function() {
28250
28250
  return e = Object.assign || function(U) {
28251
- for (var _, m = 1, c = arguments.length; m < c; m++) {
28252
- _ = arguments[m];
28253
- for (var r in _) Object.prototype.hasOwnProperty.call(_, r) && (U[r] = _[r]);
28251
+ for (var _, r = 1, s = arguments.length; r < s; r++) {
28252
+ _ = arguments[r];
28253
+ for (var n in _) Object.prototype.hasOwnProperty.call(_, n) && (U[n] = _[n]);
28254
28254
  }
28255
28255
  return U;
28256
28256
  }, e.apply(this, arguments);
28257
- }, n = q && q.__rest || function(U, _) {
28258
- var m = {};
28259
- for (var c in U) Object.prototype.hasOwnProperty.call(U, c) && _.indexOf(c) < 0 && (m[c] = U[c]);
28257
+ }, m = q && q.__rest || function(U, _) {
28258
+ var r = {};
28259
+ for (var s in U) Object.prototype.hasOwnProperty.call(U, s) && _.indexOf(s) < 0 && (r[s] = U[s]);
28260
28260
  if (U != null && typeof Object.getOwnPropertySymbols == "function")
28261
- for (var r = 0, c = Object.getOwnPropertySymbols(U); r < c.length; r++)
28262
- _.indexOf(c[r]) < 0 && Object.prototype.propertyIsEnumerable.call(U, c[r]) && (m[c[r]] = U[c[r]]);
28263
- return m;
28261
+ for (var n = 0, s = Object.getOwnPropertySymbols(U); n < s.length; n++)
28262
+ _.indexOf(s[n]) < 0 && Object.prototype.propertyIsEnumerable.call(U, s[n]) && (r[s[n]] = U[s[n]]);
28263
+ return r;
28264
28264
  };
28265
28265
  Object.defineProperty(q, "__esModule", { value: !0 }), q.useEventSource = void 0;
28266
- var d = ke, s = ia(), o = A(), u = function(U, _, m) {
28266
+ var c = ke, u = ia(), o = A(), p = function(U, _, r) {
28267
28267
  _ === void 0 && (_ = o.DEFAULT_EVENT_SOURCE_OPTIONS);
28268
- var c = _.withCredentials, r = _.events, i = n(_, ["withCredentials", "events"]);
28269
- m === void 0 && (m = !0);
28270
- var g = e(e({}, i), { eventSourceOptions: {
28271
- withCredentials: c
28272
- } }), l = (0, d.useRef)(o.EMPTY_EVENT_HANDLERS);
28273
- r && (l.current = r);
28274
- var t = (0, s.useWebSocket)(U, g, m), y = t.lastMessage, b = t.readyState, p = t.getWebSocket;
28275
- return (0, d.useEffect)(function() {
28268
+ var s = _.withCredentials, n = _.events, i = m(_, ["withCredentials", "events"]);
28269
+ r === void 0 && (r = !0);
28270
+ var d = e(e({}, i), { eventSourceOptions: {
28271
+ withCredentials: s
28272
+ } }), l = (0, c.useRef)(o.EMPTY_EVENT_HANDLERS);
28273
+ n && (l.current = n);
28274
+ var t = (0, u.useWebSocket)(U, d, r), y = t.lastMessage, b = t.readyState, g = t.getWebSocket;
28275
+ return (0, c.useEffect)(function() {
28276
28276
  y?.type && Object.entries(l.current).forEach(function(T) {
28277
28277
  var N = T[0], D = T[1];
28278
28278
  N === y.type && D(y);
@@ -28280,34 +28280,34 @@ function $i() {
28280
28280
  }, [y]), {
28281
28281
  lastEvent: y,
28282
28282
  readyState: b,
28283
- getEventSource: p
28283
+ getEventSource: g
28284
28284
  };
28285
28285
  };
28286
- return q.useEventSource = u, q;
28286
+ return q.useEventSource = p, q;
28287
28287
  }
28288
28288
  var wa;
28289
28289
  function el() {
28290
28290
  return wa || (wa = 1, (function(e) {
28291
28291
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
28292
- var n = ia();
28292
+ var m = ia();
28293
28293
  Object.defineProperty(e, "default", { enumerable: !0, get: function() {
28294
- return n.useWebSocket;
28294
+ return m.useWebSocket;
28295
28295
  } });
28296
- var d = Xi();
28296
+ var c = Xi();
28297
28297
  Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
28298
- return d.useSocketIO;
28298
+ return c.useSocketIO;
28299
28299
  } });
28300
- var s = A();
28300
+ var u = A();
28301
28301
  Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
28302
- return s.ReadyState;
28302
+ return u.ReadyState;
28303
28303
  } });
28304
28304
  var o = $i();
28305
28305
  Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
28306
28306
  return o.useEventSource;
28307
28307
  } });
28308
- var u = aa();
28308
+ var p = aa();
28309
28309
  Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
28310
- return u.resetGlobalState;
28310
+ return p.resetGlobalState;
28311
28311
  } });
28312
28312
  })(Ie)), Ie;
28313
28313
  }
@@ -28325,28 +28325,28 @@ const il = /* @__PURE__ */ Si(al), I = {
28325
28325
  CASH_REGISTER_LIMIT: "cash_register_limit"
28326
28326
  }, ll = 3e4, bl = ({
28327
28327
  socketUrl: e,
28328
- socketHandlers: n = {},
28329
- options: d = {}
28328
+ socketHandlers: m = {},
28329
+ options: c = {}
28330
28330
  }) => {
28331
- const s = ya(!1), o = ya(n), {
28332
- sendMessage: u,
28331
+ const u = ya(!1), o = ya(m), {
28332
+ sendMessage: p,
28333
28333
  // 發送普通訊息
28334
28334
  sendJsonMessage: U,
28335
28335
  // 發送 JSON 訊息
28336
28336
  lastMessage: _,
28337
28337
  // 最後接收到的訊息
28338
28338
  // lastJsonMessage, // 最後接收到的 JSON 訊息
28339
- readyState: m
28339
+ readyState: r
28340
28340
  // WebSocket 連線狀態
28341
28341
  // getWebSocket, // 獲取 WebSocket 實例
28342
28342
  } = il(e, {
28343
28343
  queryParams: { key: "wsky" },
28344
28344
  onOpen: () => console.log("連線成功"),
28345
- shouldReconnect: () => s.current === !1,
28345
+ shouldReconnect: () => u.current === !1,
28346
28346
  reconnectAttempts: 9999,
28347
28347
  reconnectInterval: 1e3,
28348
- ...d
28349
- }), c = Qe(() => {
28348
+ ...c
28349
+ }), s = Qe(() => {
28350
28350
  try {
28351
28351
  return JSON.parse(_?.data);
28352
28352
  } catch {
@@ -28354,39 +28354,39 @@ const il = /* @__PURE__ */ Si(al), I = {
28354
28354
  }
28355
28355
  }, [_?.data]);
28356
28356
  return he(() => {
28357
- const r = setInterval(
28358
- () => u("ping"),
28357
+ const n = setInterval(
28358
+ () => p("ping"),
28359
28359
  ll
28360
28360
  );
28361
- return () => clearInterval(r);
28362
- }, [u]), he(() => {
28363
- o.current = n;
28364
- }, [n]), he(() => {
28365
- if (!c) return;
28361
+ return () => clearInterval(n);
28362
+ }, [p]), he(() => {
28363
+ o.current = m;
28364
+ }, [m]), he(() => {
28365
+ if (!s) return;
28366
28366
  const {
28367
- onDeposit: r,
28367
+ onDeposit: n,
28368
28368
  onTransCode: i,
28369
- onError: g,
28369
+ onError: d,
28370
28370
  onUpdateMember: l,
28371
28371
  onMaintainNotice: t,
28372
28372
  onMaintainNoticeMember: y,
28373
28373
  onReload: b,
28374
- onTransferInGame: p,
28374
+ onTransferInGame: g,
28375
28375
  onCashRegisterLimit: T
28376
- } = o.current, N = Re(c, "type", ""), D = {
28377
- memberInfoUid: Re(c, "member_info_uid", null),
28378
- data: Re(c, "data", null),
28379
- memo: Re(c, "memo", null)
28376
+ } = o.current, N = Re(s, "type", ""), D = {
28377
+ memberInfoUid: Re(s, "member_info_uid", null),
28378
+ data: Re(s, "data", null),
28379
+ memo: Re(s, "memo", null)
28380
28380
  };
28381
28381
  switch (N) {
28382
28382
  case I.DEPOSIT:
28383
- r?.(D);
28383
+ n?.(D);
28384
28384
  break;
28385
28385
  case I.TRANS_CODE:
28386
28386
  i?.(D);
28387
28387
  break;
28388
28388
  case I.ERROR:
28389
- g?.(D);
28389
+ d?.(D);
28390
28390
  break;
28391
28391
  case I.UPDATE_MEMBER:
28392
28392
  l?.(D);
@@ -28402,7 +28402,7 @@ const il = /* @__PURE__ */ Si(al), I = {
28402
28402
  break;
28403
28403
  case I.TRANSFER_IN_GAME:
28404
28404
  case I.CHECK_REQUEST:
28405
- p?.(D);
28405
+ g?.(D);
28406
28406
  break;
28407
28407
  case I.CASH_REGISTER_LIMIT:
28408
28408
  T?.(D);
@@ -28411,18 +28411,18 @@ const il = /* @__PURE__ */ Si(al), I = {
28411
28411
  console.warn("Unknown socket type:", N);
28412
28412
  break;
28413
28413
  }
28414
- }, [c]), he(() => () => s.current = !0, []), {
28415
- sendMessage: u,
28414
+ }, [s]), he(() => () => u.current = !0, []), {
28415
+ sendMessage: p,
28416
28416
  sendJsonMessage: U,
28417
- readyState: m
28417
+ readyState: r
28418
28418
  // WebSocket 連線狀態
28419
28419
  };
28420
28420
  }, Qa = () => {
28421
- const { client: e } = de(), n = X(async () => {
28422
- const { data: s } = await e.get("/carousels");
28423
- return s;
28424
- }, [e]), d = X(async () => await e.get("/marquees"), [e]);
28425
- return { commonCarouselApi: n, commonMarqueeApi: d };
28421
+ const { client: e } = de(), m = X(async () => {
28422
+ const { data: u } = await e.get("/carousels");
28423
+ return u;
28424
+ }, [e]), c = X(async () => await e.get("/marquees"), [e]);
28425
+ return { commonCarouselApi: m, commonMarqueeApi: c };
28426
28426
  }, Tl = () => {
28427
28427
  const { commonCarouselApi: e } = Qa();
28428
28428
  return oe({
@@ -28430,27 +28430,27 @@ const il = /* @__PURE__ */ Si(al), I = {
28430
28430
  queryFn: async () => await e()
28431
28431
  });
28432
28432
  }, Cl = () => {
28433
- const { lng: e } = de(), { commonMarqueeApi: n } = Qa(), d = Zi(e);
28433
+ const { lng: e } = de(), { commonMarqueeApi: m } = Qa(), c = Zi(e);
28434
28434
  return oe({
28435
28435
  queryKey: ["getMarqueeList"],
28436
- queryFn: async () => n(),
28437
- select: (s) => {
28438
- const o = s.Marquees;
28439
- return we(o, (U) => U[d] || U["en-US"]);
28436
+ queryFn: async () => m(),
28437
+ select: (u) => {
28438
+ const o = u.Marquees;
28439
+ return we(o, (U) => U[c] || U["en-US"]);
28440
28440
  }
28441
28441
  });
28442
28442
  }, tl = ({ options: e } = {}) => {
28443
- const { userLoginApi: n } = ce();
28443
+ const { userLoginApi: m } = ce();
28444
28444
  return za({
28445
28445
  mutationKey: ["userLogin"],
28446
- mutationFn: async (d) => n(d),
28446
+ mutationFn: async (c) => m(c),
28447
28447
  ...e
28448
28448
  });
28449
28449
  }, nl = ({ options: e } = {}) => {
28450
- const { userLogoutApi: n } = ce();
28450
+ const { userLogoutApi: m } = ce();
28451
28451
  return za({
28452
28452
  mutationKey: ["userLogout"],
28453
- mutationFn: async () => n(),
28453
+ mutationFn: async () => m(),
28454
28454
  ...e
28455
28455
  });
28456
28456
  }, vl = ({
@@ -28459,8 +28459,8 @@ const il = /* @__PURE__ */ Si(al), I = {
28459
28459
  logout: {}
28460
28460
  }
28461
28461
  } = {}) => {
28462
- const n = tl({ options: e.login }), d = nl({ options: e.logout });
28463
- return { login: n, logout: d };
28462
+ const m = tl({ options: e.login }), c = nl({ options: e.logout });
28463
+ return { login: m, logout: c };
28464
28464
  };
28465
28465
  export {
28466
28466
  Za as ApiCtx,