@obb871001/api-integration-sdk 1.0.131 → 1.0.133

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,5 +1,5 @@
1
1
  import Le, { createContext as mi, useContext as ri, useCallback as V, useMemo as ia, useEffect as De, useRef as Ga } from "react";
2
- import { useQuery as ie, QueryClient as at, QueryClientProvider as it, useQueries as oi, useMutation as na } from "@tanstack/react-query";
2
+ import { useQuery as le, QueryClient as at, QueryClientProvider as it, useQueries as oi, useMutation as na } from "@tanstack/react-query";
3
3
  import tt from "axios";
4
4
  import { find as ma, isEmpty as O, isObject as Ve, flatMap as Ae, isArray as ne, map as Ie, entries as lt, values as nt, keys as Ma, get as we, replace as Ra, includes as mt } from "lodash";
5
5
  import rt from "react-dom";
@@ -11,13 +11,13 @@ var Pa;
11
11
  function st() {
12
12
  if (Pa) return he;
13
13
  Pa = 1;
14
- var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
14
+ var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
15
15
  function f(_, p, g) {
16
- var o, t = {}, d = null, l = null;
16
+ var r, t = {}, d = null, l = null;
17
17
  g !== void 0 && (d = "" + g), p.key !== void 0 && (d = "" + p.key), p.ref !== void 0 && (l = p.ref);
18
- for (o in p) n.call(p, o) && !u.hasOwnProperty(o) && (t[o] = p[o]);
19
- if (_ && _.defaultProps) for (o in p = _.defaultProps, p) t[o] === void 0 && (t[o] = p[o]);
20
- return { $$typeof: i, type: _, key: d, ref: l, props: t, _owner: r.current };
18
+ for (r in p) n.call(p, r) && !u.hasOwnProperty(r) && (t[r] = p[r]);
19
+ if (_ && _.defaultProps) for (r in p = _.defaultProps, p) t[r] === void 0 && (t[r] = p[r]);
20
+ return { $$typeof: i, type: _, key: d, ref: l, props: t, _owner: s.current };
21
21
  }
22
22
  return he.Fragment = m, he.jsx = f, he.jsxs = f, he;
23
23
  }
@@ -25,11 +25,11 @@ var ke = {};
25
25
  var xa;
26
26
  function ut() {
27
27
  return xa || (xa = 1, process.env.NODE_ENV !== "production" && (function() {
28
- var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), o = Symbol.for("react.suspense_list"), t = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), s = Symbol.iterator, y = "@@iterator";
28
+ var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), r = Symbol.for("react.suspense_list"), t = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), o = Symbol.iterator, y = "@@iterator";
29
29
  function b(a) {
30
30
  if (a === null || typeof a != "object")
31
31
  return null;
32
- var U = s && a[s] || a[y];
32
+ var U = o && a[o] || a[y];
33
33
  return typeof U == "function" ? U : null;
34
34
  }
35
35
  var c = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -53,7 +53,7 @@ function ut() {
53
53
  var E = !1, v = !1, D = !1, L = !1, I = !1, Q;
54
54
  Q = Symbol.for("react.module.reference");
55
55
  function Te(a) {
56
- return !!(typeof a == "string" || typeof a == "function" || a === n || a === u || I || a === r || a === g || a === o || L || a === l || E || v || D || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === t || a.$$typeof === f || a.$$typeof === _ || a.$$typeof === p || // This needs to include all possible module reference object
56
+ return !!(typeof a == "string" || typeof a == "function" || a === n || a === u || I || a === s || a === g || a === r || L || a === l || E || v || D || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === t || a.$$typeof === f || a.$$typeof === _ || a.$$typeof === p || // 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.
@@ -83,11 +83,11 @@ function ut() {
83
83
  return "Portal";
84
84
  case u:
85
85
  return "Profiler";
86
- case r:
86
+ case s:
87
87
  return "StrictMode";
88
88
  case g:
89
89
  return "Suspense";
90
- case o:
90
+ case r:
91
91
  return "SuspenseList";
92
92
  }
93
93
  if (typeof a == "object")
@@ -114,18 +114,18 @@ function ut() {
114
114
  }
115
115
  return null;
116
116
  }
117
- var A = Object.assign, re = 0, q, Me, Re, x, F, Y, Ce;
118
- function oe() {
117
+ var A = Object.assign, me = 0, q, Me, Re, x, F, Y, Ce;
118
+ function re() {
119
119
  }
120
- oe.__reactDisabledLog = !0;
121
- function le() {
120
+ re.__reactDisabledLog = !0;
121
+ function te() {
122
122
  {
123
- if (re === 0) {
123
+ if (me === 0) {
124
124
  q = console.log, Me = console.info, Re = console.warn, x = console.error, F = console.group, Y = console.groupCollapsed, Ce = console.groupEnd;
125
125
  var a = {
126
126
  configurable: !0,
127
127
  enumerable: !0,
128
- value: oe,
128
+ value: re,
129
129
  writable: !0
130
130
  };
131
131
  Object.defineProperties(console, {
@@ -138,12 +138,12 @@ function ut() {
138
138
  groupEnd: a
139
139
  });
140
140
  }
141
- re++;
141
+ me++;
142
142
  }
143
143
  }
144
144
  function Pe() {
145
145
  {
146
- if (re--, re === 0) {
146
+ if (me--, me === 0) {
147
147
  var a = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
@@ -173,7 +173,7 @@ function ut() {
173
173
  })
174
174
  });
175
175
  }
176
- re < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
176
+ me < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
177
177
  }
178
178
  }
179
179
  var ce = c.ReactCurrentDispatcher, X;
@@ -190,13 +190,13 @@ function ut() {
190
190
  ` + X + a;
191
191
  }
192
192
  }
193
- var se = !1, xe;
193
+ var oe = !1, xe;
194
194
  {
195
195
  var Gi = typeof WeakMap == "function" ? WeakMap : Map;
196
196
  xe = new Gi();
197
197
  }
198
198
  function _a(a, U) {
199
- if (!a || se)
199
+ if (!a || oe)
200
200
  return "";
201
201
  {
202
202
  var C = xe.get(a);
@@ -204,11 +204,11 @@ function ut() {
204
204
  return C;
205
205
  }
206
206
  var h;
207
- se = !0;
207
+ oe = !0;
208
208
  var G = Error.prepareStackTrace;
209
209
  Error.prepareStackTrace = void 0;
210
210
  var M;
211
- M = ce.current, ce.current = null, le();
211
+ M = ce.current, ce.current = null, te();
212
212
  try {
213
213
  if (U) {
214
214
  var N = function() {
@@ -261,10 +261,10 @@ function ut() {
261
261
  }
262
262
  }
263
263
  } finally {
264
- se = !1, ce.current = M, Pe(), Error.prepareStackTrace = G;
264
+ oe = !1, ce.current = M, Pe(), Error.prepareStackTrace = G;
265
265
  }
266
- var Ue = a ? a.displayName || a.name : "", ue = Ue ? _e(Ue) : "";
267
- return typeof a == "function" && xe.set(a, ue), ue;
266
+ var Ue = a ? a.displayName || a.name : "", se = Ue ? _e(Ue) : "";
267
+ return typeof a == "function" && xe.set(a, se), se;
268
268
  }
269
269
  function Mi(a, U, C) {
270
270
  return _a(a, !1);
@@ -283,7 +283,7 @@ function ut() {
283
283
  switch (a) {
284
284
  case g:
285
285
  return _e("Suspense");
286
- case o:
286
+ case r:
287
287
  return _e("SuspenseList");
288
288
  }
289
289
  if (typeof a == "object")
@@ -586,17 +586,17 @@ Check the top-level render call using <` + C + ">.");
586
586
  Da(Z, a);
587
587
  }
588
588
  if (ve.call(U, "key")) {
589
- var ue = w(a), J = Object.keys(U).filter(function(et) {
589
+ var se = w(a), J = Object.keys(U).filter(function(et) {
590
590
  return et !== "key";
591
591
  }), qe = J.length > 0 ? "{key: someKey, " + J.join(": ..., ") + ": ...}" : "{key: someKey}";
592
- if (!Ea[ue + qe]) {
592
+ if (!Ea[se + qe]) {
593
593
  var $i = J.length > 0 ? "{" + J.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} />`, qe, ue, $i, ue), Ea[ue + qe] = !0;
599
+ <%s key={someKey} {...props} />`, qe, se, $i, se), Ea[se + qe] = !0;
600
600
  }
601
601
  }
602
602
  return a === n ? ji(P) : Ki(P), P;
@@ -617,7 +617,7 @@ function pt() {
617
617
  return Oa || (Oa = 1, process.env.NODE_ENV === "production" ? Fe.exports = st() : Fe.exports = ut()), Fe.exports;
618
618
  }
619
619
  var ze = pt();
620
- const si = mi(null), te = () => {
620
+ const si = mi(null), ie = () => {
621
621
  const e = ri(si);
622
622
  if (!e)
623
623
  throw new Error("useApiContext must be used within ApiProvider");
@@ -628,7 +628,7 @@ function gt({
628
628
  getToken: i,
629
629
  timeoutMs: m = 15e3,
630
630
  lng: n = "tw",
631
- store: r,
631
+ store: s,
632
632
  onError: u
633
633
  } = {}) {
634
634
  const f = tt.create({
@@ -641,35 +641,35 @@ function gt({
641
641
  const g = await i();
642
642
  g && (_.headers.Authorization = `Bearer ${g}`);
643
643
  }
644
- const p = r?.getState()?.isWalletCurrency || r?.getState()?.currency?.currentCurrency || "TWD";
644
+ const p = s?.getState()?.isWalletCurrency || s?.getState()?.currency?.currentCurrency || "TWD";
645
645
  return _.headers.Currency = p, _.headers["currency-code"] = p, _.headers.lang = n, _;
646
646
  }), f.interceptors.response.use(
647
647
  (_) => _.data,
648
648
  (_) => u ? u(_, { instance: f }) : Promise.reject(_)
649
649
  ), f;
650
650
  }
651
- const ui = mi(null), ul = () => {
651
+ const ui = mi(null), sl = () => {
652
652
  const e = ri(ui);
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 = () => {
659
- const e = (n, r) => !n && !r, i = (n) => n.startsWith("pc.");
658
+ }, ul = () => {
659
+ const e = (n, s) => !n && !s, i = (n) => n.startsWith("pc.");
660
660
  return {
661
661
  executeLogout: ({
662
662
  isCallBackInvalid: n = !1,
663
- hostname: r = "",
663
+ hostname: s = "",
664
664
  shouldRedirect: u,
665
665
  onShowError: f,
666
666
  onCleanup: _,
667
667
  onRemoveToken: p,
668
668
  onRedirect: g,
669
- onGoogleLogout: o
669
+ onGoogleLogout: r
670
670
  }) => {
671
- const t = i(r);
672
- e(n, t) && f?.(), _?.(), p?.(), u && g?.("/"), o?.();
671
+ const t = i(s);
672
+ e(n, t) && f?.(), _?.(), p?.(), u && g?.("/"), r?.();
673
673
  },
674
674
  shouldShowErrorNotice: e,
675
675
  isMachineDomain: i
@@ -682,12 +682,12 @@ const ui = mi(null), ul = () => {
682
682
  platforms: i,
683
683
  gameList: m,
684
684
  allGameTypes: n,
685
- allPlatforms: r
685
+ allPlatforms: s
686
686
  }) => {
687
687
  const u = pi(n, e);
688
688
  return u ? i.reduce((f, _) => {
689
- const p = gi(r, _), g = di(r, _), o = m[u] || [], t = ci(
690
- o,
689
+ const p = gi(s, _), g = di(s, _), r = m[u] || [], t = ci(
690
+ r,
691
691
  p,
692
692
  g
693
693
  );
@@ -698,60 +698,60 @@ const ui = mi(null), ul = () => {
698
698
  gamesOfType: i = [],
699
699
  allPlatforms: m = []
700
700
  }) => {
701
- const n = gi(m, e), r = di(m, e), u = ci(
701
+ const n = gi(m, e), s = di(m, e), u = ci(
702
702
  i,
703
703
  n,
704
- r
704
+ s
705
705
  );
706
706
  return dt(u);
707
707
  }, ft = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Ha = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "platform"), Ut = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "gameTypeName"), yt = (e = []) => !ne(e) || O(e) ? [] : Ie(e, "game_subtype"), bt = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Tt = (e = [], i = []) => !ne(e) || O(e) ? {} : !ne(i) || O(i) ? {} : e.reduce((m, n) => {
708
- const r = i.map((u) => u.game_subtype);
709
- return r.forEach((u) => {
708
+ const s = i.map((u) => u.game_subtype);
709
+ return s.forEach((u) => {
710
710
  m[u] = m[u] || [];
711
- }), r.includes(n.game_subtype) && m[n.game_subtype].push(n), m;
711
+ }), s.includes(n.game_subtype) && m[n.game_subtype].push(n), m;
712
712
  }, {}), Ct = ({
713
713
  gameTypes: e = [],
714
714
  platforms: i = [],
715
715
  gameList: m = {},
716
716
  allGameTypes: n = [],
717
- allPlatforms: r = []
717
+ allPlatforms: s = []
718
718
  }) => !ne(e) || !ne(i) ? {} : O(m) ? {} : e.reduce((u, f) => {
719
719
  const _ = ct({
720
720
  gameTypeName: f,
721
721
  platforms: i,
722
722
  gameList: m,
723
723
  allGameTypes: n,
724
- allPlatforms: r
724
+ allPlatforms: s
725
725
  });
726
726
  return O(_) || (u[f] = _), u;
727
- }, {}), gl = ({
727
+ }, {}), pl = ({
728
728
  types: e = [],
729
729
  platforms: i = [],
730
730
  allGameType: m = [],
731
731
  allGamePlatform: n = [],
732
- allGameList: r = {}
732
+ allGameList: s = {}
733
733
  } = {}) => !Array.isArray(e) || !Array.isArray(i) ? {} : e.reduce((u, f) => {
734
734
  const _ = pi(m, f);
735
735
  if (!_) return u;
736
- const p = r[_] || [], g = i.reduce((o, t) => {
736
+ const p = s[_] || [], g = i.reduce((r, t) => {
737
737
  const d = _t({
738
738
  platformName: t,
739
739
  gamesOfType: p,
740
740
  allPlatforms: n
741
741
  });
742
- return O(d) ? o : { ...o, [t]: d };
742
+ return O(d) ? r : { ...r, [t]: d };
743
743
  }, {});
744
744
  return O(g) || (u[f] = g), u;
745
- }, {}), vt = (e = {}) => !Ve(e) || O(e) ? {} : Object.values(e).reduce((m, n) => (Object.entries(n).forEach(([r, u]) => {
746
- m[r] ? m[r] = [...m[r], ...u] : m[r] = u;
745
+ }, {}), vt = (e = {}) => !Ve(e) || O(e) ? {} : Object.values(e).reduce((m, n) => (Object.entries(n).forEach(([s, u]) => {
746
+ m[s] ? m[s] = [...m[s], ...u] : m[s] = u;
747
747
  }), m), {}), ht = (e = {}) => {
748
748
  if (!Ve(e) || O(e)) return {};
749
749
  const i = {};
750
750
  for (const [m, n] of Object.entries(e)) {
751
751
  i[m] = {};
752
- for (const r of n) {
753
- const u = r.game_subtype;
754
- i[m][u] || (i[m][u] = []), i[m][u].push(r);
752
+ for (const s of n) {
753
+ const u = s.game_subtype;
754
+ i[m][u] || (i[m][u] = []), i[m][u].push(s);
755
755
  }
756
756
  }
757
757
  return i;
@@ -760,15 +760,15 @@ const ui = mi(null), ul = () => {
760
760
  allGamePlatform: i = [],
761
761
  allGameType: m = [],
762
762
  allGame_subtype: n = [],
763
- allNewGameList: r = [],
763
+ allNewGameList: s = [],
764
764
  allTopGameList: u = [],
765
765
  randomlySelectedGames: f = [],
766
766
  userFavoriteGame: _ = {},
767
767
  exclusiveBrandGames: p = [],
768
768
  highlightGames: g = [],
769
- originPlatform: o = []
769
+ originPlatform: r = []
770
770
  }) => {
771
- const t = ft(e), d = Ha(i), l = Ut(m), s = yt(n), y = Ha(o), b = bt(_), c = Ct({
771
+ const t = ft(e), d = Ha(i), l = Ut(m), o = yt(n), y = Ha(r), b = bt(_), c = Ct({
772
772
  gameTypes: l,
773
773
  platforms: d,
774
774
  gameList: e,
@@ -793,13 +793,13 @@ const ui = mi(null), ul = () => {
793
793
  },
794
794
  type: {
795
795
  main: l,
796
- sub: s,
796
+ sub: o,
797
797
  originMain: m,
798
798
  originSub: n
799
799
  },
800
800
  gameList: {
801
801
  all: t,
802
- new: r,
802
+ new: s,
803
803
  top: u,
804
804
  favorite: b,
805
805
  highlight: g,
@@ -817,7 +817,7 @@ const ui = mi(null), ul = () => {
817
817
  favorite: b
818
818
  }
819
819
  };
820
- }, dl = (e = []) => !ne(e) || O(e) ? [] : Ae(e, (i) => O(i.SubPlatformEnum) ? i : i.SubPlatformEnum.map((m) => ({
820
+ }, gl = (e = []) => !ne(e) || O(e) ? [] : Ae(e, (i) => O(i.SubPlatformEnum) ? i : i.SubPlatformEnum.map((m) => ({
821
821
  ...i,
822
822
  ...m,
823
823
  platform: m.SubPlatformEnum,
@@ -841,20 +841,20 @@ const ui = mi(null), ul = () => {
841
841
  default:
842
842
  return e;
843
843
  }
844
- }, me = () => {
845
- const { client: e } = te(), i = V(
846
- async (o) => {
847
- const { mac_address: t = "", app_version: d = "", anydesk_id: l = "" } = o, { data: s } = await e.post("/cash-register/login", {
844
+ }, de = () => {
845
+ const { client: e } = ie(), i = V(
846
+ async (r) => {
847
+ const { mac_address: t = "", app_version: d = "", anydesk_id: l = "" } = r, { data: o } = await e.post("/cash-register/login", {
848
848
  mac_address: t,
849
849
  app_version: d,
850
850
  anydesk_id: l
851
851
  });
852
- return s;
852
+ return o;
853
853
  },
854
854
  [e]
855
- ), m = V(async () => e.get("/member/getMemberInfo"), [e]), n = V(async () => await e.get("/member/getGameList"), [e]), r = V(async () => await e.get("/member/getNowCurrencyExchange"), [e]), u = V(async () => await e.get("member/getFavoriteGame"), [e]), f = V(
856
- async (o) => {
857
- const { account: t, password: d, trans_code: l } = o;
855
+ ), m = V(async () => e.get("/member/getMemberInfo"), [e]), n = V(async () => await e.get("/member/getGameList"), [e]), s = V(async () => await e.get("/member/getNowCurrencyExchange"), [e]), u = V(async () => await e.get("member/getFavoriteGame"), [e]), f = V(
856
+ async (r) => {
857
+ const { account: t, password: d, trans_code: l } = r;
858
858
  return await e.post("/login", {
859
859
  memId: t,
860
860
  passwd: d,
@@ -863,8 +863,8 @@ const ui = mi(null), ul = () => {
863
863
  },
864
864
  [e]
865
865
  ), _ = V(async () => await e.post("/logout"), [e]), p = V(
866
- async (o) => {
867
- const { gameUid: t = "", status: d = 0 } = o;
866
+ async (r) => {
867
+ const { gameUid: t = "", status: d = 0 } = r;
868
868
  return await e.put(`/member/toggleFavoriteGame/${t}`, {
869
869
  status: d
870
870
  });
@@ -876,7 +876,7 @@ const ui = mi(null), ul = () => {
876
876
  userInfoApi: m,
877
877
  userGameListApi: n,
878
878
  userFavoriteGameApi: u,
879
- userCurrencyExchangeApi: r,
879
+ userCurrencyExchangeApi: s,
880
880
  userLoginApi: f,
881
881
  userLogoutApi: _,
882
882
  addOrRemoveFavoriteGameApi: p,
@@ -903,14 +903,14 @@ const ui = mi(null), ul = () => {
903
903
  },
904
904
  user: { favorite: [] }
905
905
  }, Nt = ({ enabled: e = !0 } = {}) => {
906
- const { getToken: i } = te(), { userFavoriteGameApi: m, userGameListApi: n } = me(), { data: r, isLoading: u, error: f, refetch: _ } = ie({
906
+ const { getToken: i } = ie(), { userFavoriteGameApi: m, userGameListApi: n } = de(), { data: s, isLoading: u, error: f, refetch: _ } = le({
907
907
  queryKey: ["gamesInfo"],
908
908
  queryFn: async () => {
909
909
  let p = {}, g = {};
910
910
  try {
911
911
  await i?.() && (g = await n(), p = await m());
912
- } catch (o) {
913
- console.warn("Failed to fetch favorite games:", o);
912
+ } catch (r) {
913
+ console.warn("Failed to fetch favorite games:", r);
914
914
  }
915
915
  return kt({
916
916
  allGameList: g.gameTypeGroup || window.gameTypeGroup || {},
@@ -935,7 +935,7 @@ const ui = mi(null), ul = () => {
935
935
  refetchOnWindowFocus: !1
936
936
  });
937
937
  return {
938
- gamesInfo: r || St,
938
+ gamesInfo: s || St,
939
939
  isLoading: u,
940
940
  error: f,
941
941
  refetch: _
@@ -27478,14 +27478,14 @@ const ui = mi(null), ul = () => {
27478
27478
  const n = Nt({ enabled: i });
27479
27479
  return /* @__PURE__ */ ze.jsx(ui.Provider, { value: n, children: e });
27480
27480
  };
27481
- function cl({
27481
+ function dl({
27482
27482
  children: e,
27483
27483
  autoFetchGamesInfo: i = !1,
27484
27484
  useMockData: m = !1,
27485
27485
  queryClient: n,
27486
- ...r
27486
+ ...s
27487
27487
  }) {
27488
- const u = ia(() => gt(r), [r]), f = ia(
27488
+ const u = ia(() => gt(s), [s]), f = ia(
27489
27489
  () => new at({
27490
27490
  defaultOptions: {
27491
27491
  queries: {
@@ -27496,10 +27496,10 @@ function cl({
27496
27496
  }),
27497
27497
  []
27498
27498
  ), _ = n || f;
27499
- return /* @__PURE__ */ ze.jsx(it, { client: _, children: /* @__PURE__ */ ze.jsx(si.Provider, { value: { client: u, ...r }, children: /* @__PURE__ */ ze.jsx(Et, { autoFetch: i, mockData: m, children: e }) }) });
27499
+ return /* @__PURE__ */ ze.jsx(it, { client: _, children: /* @__PURE__ */ ze.jsx(si.Provider, { value: { client: u, ...s }, children: /* @__PURE__ */ ze.jsx(Et, { autoFetch: i, mockData: m, children: e }) }) });
27500
27500
  }
27501
- const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
27502
- const { userCurrencyExchangeApi: m } = me(), { getToken: n } = te(), { enabled: r, ...u } = i, _ = !!n?.() && (r ? r.every((p) => p) : !0);
27501
+ const cl = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
27502
+ const { userCurrencyExchangeApi: m } = de(), { getToken: n } = ie(), { enabled: s, ...u } = i, _ = !!n?.() && (s ? s.every((p) => p) : !0);
27503
27503
  return oi({
27504
27504
  queries: [
27505
27505
  {
@@ -27512,43 +27512,43 @@ const _l = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
27512
27512
  }
27513
27513
  ]
27514
27514
  });
27515
- }, fl = ({
27515
+ }, _l = ({
27516
27516
  refetchInterval: e = 5e4,
27517
27517
  trigger: i = [],
27518
27518
  enabled: m = !0
27519
27519
  } = {}) => {
27520
- const { getToken: n } = te(), r = n?.(), { userInfoApi: u } = me();
27520
+ const { getToken: n } = ie(), s = n?.(), { userInfoApi: u } = de();
27521
27521
  return oi({
27522
27522
  queries: [
27523
27523
  {
27524
27524
  queryKey: ["getMemberInfo", ...i],
27525
27525
  queryFn: async () => await u(),
27526
27526
  refetchInterval: e,
27527
- enabled: !!r && m
27527
+ enabled: !!s && m
27528
27528
  }
27529
27529
  ]
27530
27530
  });
27531
- }, Ul = ({ enabled: e = !0 } = {}) => {
27531
+ }, fl = ({ enabled: e = !0 } = {}) => {
27532
27532
  const {
27533
27533
  userInfoApi: i,
27534
27534
  userFavoriteGameApi: m,
27535
27535
  userGameListApi: n,
27536
- userCurrencyExchangeApi: r
27537
- } = me(), u = ie({
27536
+ userCurrencyExchangeApi: s
27537
+ } = de(), u = le({
27538
27538
  queryKey: ["getMemInfo"],
27539
27539
  queryFn: async () => i(),
27540
27540
  enabled: e
27541
- }), f = ie({
27541
+ }), f = le({
27542
27542
  queryKey: ["getFavoriteGame"],
27543
27543
  queryFn: async () => m(),
27544
27544
  enabled: e && u.isSuccess
27545
- }), _ = ie({
27545
+ }), _ = le({
27546
27546
  queryKey: ["getUserGameList"],
27547
27547
  queryFn: async () => n(),
27548
27548
  enabled: e && u.isSuccess && f.isSuccess
27549
- }), p = ie({
27549
+ }), p = le({
27550
27550
  queryKey: ["getUserCurrencyExchange"],
27551
- queryFn: async () => r(),
27551
+ queryFn: async () => s(),
27552
27552
  enabled: e && u.isSuccess && f.isSuccess && _.isSuccess
27553
27553
  });
27554
27554
  return [
@@ -27575,14 +27575,14 @@ function j() {
27575
27575
  (function(u) {
27576
27576
  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";
27577
27577
  })(n || (e.ReadyState = n = {}));
27578
- var r = function() {
27578
+ var s = function() {
27579
27579
  try {
27580
27580
  return "EventSource" in globalThis;
27581
27581
  } catch {
27582
27582
  return !1;
27583
27583
  }
27584
27584
  };
27585
- e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && r();
27585
+ e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && s();
27586
27586
  })(Xe)), Xe;
27587
27587
  }
27588
27588
  var Se = {}, $e = {}, Fa;
@@ -27599,34 +27599,34 @@ function oa() {
27599
27599
  e.resetWebSockets = i;
27600
27600
  })($e)), $e;
27601
27601
  }
27602
- var pe = {}, $ = {}, Wa;
27602
+ var ue = {}, $ = {}, Wa;
27603
27603
  function sa() {
27604
27604
  if (Wa) return $;
27605
27605
  Wa = 1, Object.defineProperty($, "__esModule", { value: !0 }), $.setUpSocketIOPing = $.appendQueryParams = $.parseSocketIOUrl = void 0;
27606
- var e = j(), i = function(r) {
27607
- if (r) {
27608
- var u = /^https|wss/.test(r), f = r.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = f.replace(/\/$/, ""), p = u ? "wss" : "ws";
27606
+ var e = j(), i = function(s) {
27607
+ if (s) {
27608
+ var u = /^https|wss/.test(s), f = s.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = f.replace(/\/$/, ""), p = u ? "wss" : "ws";
27609
27609
  return "".concat(p, "://").concat(_).concat(e.SOCKET_IO_PATH);
27610
- } else if (r === "") {
27610
+ } else if (s === "") {
27611
27611
  var u = /^https/.test(window.location.protocol), p = u ? "wss" : "ws", g = window.location.port ? ":".concat(window.location.port) : "";
27612
27612
  return "".concat(p, "://").concat(window.location.hostname).concat(g).concat(e.SOCKET_IO_PATH);
27613
27613
  }
27614
- return r;
27614
+ return s;
27615
27615
  };
27616
27616
  $.parseSocketIOUrl = i;
27617
- var m = function(r, u) {
27617
+ var m = function(s, u) {
27618
27618
  u === void 0 && (u = {});
27619
- var f = /\?([\w]+=[\w]+)/, _ = f.test(r), p = "".concat(Object.entries(u).reduce(function(g, o) {
27620
- var t = o[0], d = o[1];
27619
+ var f = /\?([\w]+=[\w]+)/, _ = f.test(s), p = "".concat(Object.entries(u).reduce(function(g, r) {
27620
+ var t = r[0], d = r[1];
27621
27621
  return g + "".concat(t, "=").concat(d, "&");
27622
27622
  }, "").slice(0, -1));
27623
- return "".concat(r).concat(_ ? "&" : "?").concat(p);
27623
+ return "".concat(s).concat(_ ? "&" : "?").concat(p);
27624
27624
  };
27625
27625
  $.appendQueryParams = m;
27626
- var n = function(r, u) {
27626
+ var n = function(s, u) {
27627
27627
  u === void 0 && (u = e.SOCKET_IO_PING_INTERVAL);
27628
27628
  var f = function() {
27629
- return r(e.SOCKET_IO_PING_CODE);
27629
+ return s(e.SOCKET_IO_PING_CODE);
27630
27630
  };
27631
27631
  return window.setInterval(f, u);
27632
27632
  };
@@ -27638,18 +27638,18 @@ function _i() {
27638
27638
  Ja = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.heartbeat = m;
27639
27639
  var e = j();
27640
27640
  function i(n) {
27641
- return Array.isArray(n) ? n.reduce(function(r, u) {
27642
- return r.current > u.current ? r : u;
27641
+ return Array.isArray(n) ? n.reduce(function(s, u) {
27642
+ return s.current > u.current ? s : u;
27643
27643
  }).current : n.current;
27644
27644
  }
27645
- function m(n, r, u) {
27646
- var f = u || {}, _ = f.interval, p = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, g = f.timeout, o = g === void 0 ? e.DEFAULT_HEARTBEAT.timeout : g, t = f.message, d = t === void 0 ? e.DEFAULT_HEARTBEAT.message : t, l = Math.max(100, p / 10), s = Date.now(), y = setInterval(function() {
27647
- var b = Date.now(), c = i(r);
27648
- if (c + o <= b)
27649
- console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - s, "ms ago")), n.close();
27650
- else if (c + p <= b && s + p <= b)
27645
+ function m(n, s, u) {
27646
+ var f = u || {}, _ = f.interval, p = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, g = f.timeout, r = g === void 0 ? e.DEFAULT_HEARTBEAT.timeout : g, t = f.message, d = t === void 0 ? e.DEFAULT_HEARTBEAT.message : t, l = Math.max(100, p / 10), o = Date.now(), y = setInterval(function() {
27647
+ var b = Date.now(), c = i(s);
27648
+ if (c + r <= b)
27649
+ console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - o, "ms ago")), n.close();
27650
+ else if (c + p <= b && o + p <= b)
27651
27651
  try {
27652
- typeof d == "function" ? n.send(d()) : n.send(d), s = b;
27652
+ typeof d == "function" ? n.send(d()) : n.send(d), o = b;
27653
27653
  } catch (T) {
27654
27654
  console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), n.close();
27655
27655
  }
@@ -27669,11 +27669,11 @@ function ua() {
27669
27669
  return (0, e.hasSubscribers)(p) ? Array.from(i[p]) : m;
27670
27670
  };
27671
27671
  e.getSubscribers = n;
27672
- var r = function(p) {
27672
+ var s = function(p) {
27673
27673
  var g;
27674
27674
  return ((g = i[p]) === null || g === void 0 ? void 0 : g.size) > 0;
27675
27675
  };
27676
- e.hasSubscribers = r;
27676
+ e.hasSubscribers = s;
27677
27677
  var u = function(p, g) {
27678
27678
  i[p] = i[p] || /* @__PURE__ */ new Set(), i[p].add(g);
27679
27679
  };
@@ -27697,55 +27697,55 @@ function pa() {
27697
27697
  if (Za) return Ne;
27698
27698
  Za = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assertIsWebSocket = m, Ne.resetGlobalState = n;
27699
27699
  var e = oa(), i = ua();
27700
- function m(r, u) {
27701
- if (!u && !(r instanceof WebSocket))
27700
+ function m(s, u) {
27701
+ if (!u && !(s instanceof WebSocket))
27702
27702
  throw new Error("");
27703
27703
  }
27704
- function n(r) {
27705
- (0, i.resetSubscribers)(r), (0, e.resetWebSockets)(r);
27704
+ function n(s) {
27705
+ (0, i.resetSubscribers)(s), (0, e.resetWebSockets)(s);
27706
27706
  }
27707
27707
  return Ne;
27708
27708
  }
27709
27709
  var Va;
27710
27710
  function Lt() {
27711
- if (Va) return pe;
27711
+ if (Va) return ue;
27712
27712
  Va = 1;
27713
- var e = pe && pe.__assign || function() {
27714
- return e = Object.assign || function(o) {
27713
+ var e = ue && ue.__assign || function() {
27714
+ return e = Object.assign || function(r) {
27715
27715
  for (var t, d = 1, l = arguments.length; d < l; d++) {
27716
27716
  t = arguments[d];
27717
- for (var s in t) Object.prototype.hasOwnProperty.call(t, s) && (o[s] = t[s]);
27717
+ for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (r[o] = t[o]);
27718
27718
  }
27719
- return o;
27719
+ return r;
27720
27720
  }, e.apply(this, arguments);
27721
27721
  };
27722
- Object.defineProperty(pe, "__esModule", { value: !0 }), pe.attachListeners = void 0;
27723
- var i = sa(), m = _i(), n = j(), r = pa(), u = function(o, t, d, l) {
27724
- o.onmessage = function(s) {
27722
+ Object.defineProperty(ue, "__esModule", { value: !0 }), ue.attachListeners = void 0;
27723
+ var i = sa(), m = _i(), n = j(), s = pa(), u = function(r, t, d, l) {
27724
+ r.onmessage = function(o) {
27725
27725
  var y;
27726
- t.current.onMessage && t.current.onMessage(s), typeof l?.current == "number" && (l.current = Date.now()), !(typeof t.current.filter == "function" && t.current.filter(s) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((y = t.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === s.data || d(s));
27726
+ t.current.onMessage && t.current.onMessage(o), typeof l?.current == "number" && (l.current = Date.now()), !(typeof t.current.filter == "function" && t.current.filter(o) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((y = t.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === o.data || d(o));
27727
27727
  };
27728
- }, f = function(o, t, d, l, s) {
27729
- o.onopen = function(y) {
27730
- if (t.current.onOpen && t.current.onOpen(y), l.current = 0, d(n.ReadyState.OPEN), t.current.heartbeat && o instanceof WebSocket) {
27728
+ }, f = function(r, t, d, l, o) {
27729
+ r.onopen = function(y) {
27730
+ if (t.current.onOpen && t.current.onOpen(y), l.current = 0, d(n.ReadyState.OPEN), t.current.heartbeat && r instanceof WebSocket) {
27731
27731
  var b = typeof t.current.heartbeat == "boolean" ? void 0 : t.current.heartbeat;
27732
- s.current = Date.now(), (0, m.heartbeat)(o, s, b);
27732
+ o.current = Date.now(), (0, m.heartbeat)(r, o, b);
27733
27733
  }
27734
27734
  };
27735
- }, _ = function(o, t, d, l, s) {
27736
- if (n.isEventSourceSupported && o instanceof EventSource)
27735
+ }, _ = function(r, t, d, l, o) {
27736
+ if (n.isEventSourceSupported && r instanceof EventSource)
27737
27737
  return function() {
27738
27738
  };
27739
- (0, r.assertIsWebSocket)(o, t.current.skipAssert);
27739
+ (0, s.assertIsWebSocket)(r, t.current.skipAssert);
27740
27740
  var y;
27741
- return o.onclose = function(b) {
27741
+ return r.onclose = function(b) {
27742
27742
  var c;
27743
27743
  if (t.current.onClose && t.current.onClose(b), d(n.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(b)) {
27744
27744
  var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT;
27745
- if (s.current < T) {
27746
- var S = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(s.current) : t.current.reconnectInterval;
27745
+ if (o.current < T) {
27746
+ var S = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(o.current) : t.current.reconnectInterval;
27747
27747
  y = window.setTimeout(function() {
27748
- s.current++, l();
27748
+ o.current++, l();
27749
27749
  }, S ?? n.DEFAULT_RECONNECT_INTERVAL_MS);
27750
27750
  } else
27751
27751
  t.current.onReconnectStop && t.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
@@ -27753,130 +27753,130 @@ function Lt() {
27753
27753
  }, function() {
27754
27754
  return y && window.clearTimeout(y);
27755
27755
  };
27756
- }, p = function(o, t, d, l, s) {
27756
+ }, p = function(r, t, d, l, o) {
27757
27757
  var y;
27758
- return o.onerror = function(b) {
27758
+ return r.onerror = function(b) {
27759
27759
  var c;
27760
- if (t.current.onError && t.current.onError(b), n.isEventSourceSupported && o instanceof EventSource && (t.current.onClose && t.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(n.ReadyState.CLOSED), o.close()), t.current.retryOnError)
27761
- if (s.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT)) {
27762
- var T = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(s.current) : t.current.reconnectInterval;
27760
+ if (t.current.onError && t.current.onError(b), n.isEventSourceSupported && r instanceof EventSource && (t.current.onClose && t.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(n.ReadyState.CLOSED), r.close()), t.current.retryOnError)
27761
+ if (o.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT)) {
27762
+ var T = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(o.current) : t.current.reconnectInterval;
27763
27763
  y = window.setTimeout(function() {
27764
- s.current++, l();
27764
+ o.current++, l();
27765
27765
  }, T ?? n.DEFAULT_RECONNECT_INTERVAL_MS);
27766
27766
  } else
27767
27767
  t.current.onReconnectStop && t.current.onReconnectStop(t.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(t.current.reconnectAttempts, " exceeded"));
27768
27768
  }, function() {
27769
27769
  return y && window.clearTimeout(y);
27770
27770
  };
27771
- }, g = function(o, t, d, l, s, y, b) {
27771
+ }, g = function(r, t, d, l, o, y, b) {
27772
27772
  var c = t.setLastMessage, T = t.setReadyState, S, E, v;
27773
- return d.current.fromSocketIO && (S = (0, i.setUpSocketIOPing)(b)), u(o, d, c, y), f(o, d, T, s, y), E = _(o, d, T, l, s), v = p(o, d, T, l, s), function() {
27774
- T(n.ReadyState.CLOSING), E(), v(), o.close(), S && clearInterval(S);
27773
+ return d.current.fromSocketIO && (S = (0, i.setUpSocketIOPing)(b)), u(r, d, c, y), f(r, d, T, o, y), E = _(r, d, T, l, o), v = p(r, d, T, l, o), function() {
27774
+ T(n.ReadyState.CLOSING), E(), v(), r.close(), S && clearInterval(S);
27775
27775
  };
27776
27776
  };
27777
- return pe.attachListeners = g, pe;
27777
+ return ue.attachListeners = g, ue;
27778
27778
  }
27779
- var ge = {}, Aa;
27779
+ var pe = {}, Aa;
27780
27780
  function Gt() {
27781
- if (Aa) return ge;
27781
+ if (Aa) return pe;
27782
27782
  Aa = 1;
27783
- var e = ge && ge.__assign || function() {
27783
+ var e = pe && pe.__assign || function() {
27784
27784
  return e = Object.assign || function(t) {
27785
- for (var d, l = 1, s = arguments.length; l < s; l++) {
27785
+ for (var d, l = 1, o = arguments.length; l < o; l++) {
27786
27786
  d = arguments[l];
27787
27787
  for (var y in d) Object.prototype.hasOwnProperty.call(d, y) && (t[y] = d[y]);
27788
27788
  }
27789
27789
  return t;
27790
27790
  }, e.apply(this, arguments);
27791
27791
  };
27792
- Object.defineProperty(ge, "__esModule", { value: !0 }), ge.attachSharedListeners = void 0;
27793
- var i = oa(), m = j(), n = ua(), r = sa(), u = _i(), f = function(t, d, l) {
27794
- t.onmessage = function(s) {
27792
+ Object.defineProperty(pe, "__esModule", { value: !0 }), pe.attachSharedListeners = void 0;
27793
+ var i = oa(), m = j(), n = ua(), s = sa(), u = _i(), f = function(t, d, l) {
27794
+ t.onmessage = function(o) {
27795
27795
  (0, n.getSubscribers)(d).forEach(function(y) {
27796
27796
  var b;
27797
- y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(s), 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(s) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === s.data || y.setLastMessage(s));
27797
+ y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(o), 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(o) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === o.data || y.setLastMessage(o));
27798
27798
  });
27799
27799
  };
27800
27800
  }, _ = function(t, d, l) {
27801
- t.onopen = function(s) {
27801
+ t.onopen = function(o) {
27802
27802
  var y = (0, n.getSubscribers)(d);
27803
27803
  y.forEach(function(b) {
27804
- b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(s), b.setReadyState(m.ReadyState.OPEN), l && t instanceof WebSocket && (b.lastMessageTime.current = Date.now());
27804
+ b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(o), b.setReadyState(m.ReadyState.OPEN), l && t instanceof WebSocket && (b.lastMessageTime.current = Date.now());
27805
27805
  }), l && t instanceof WebSocket && (0, u.heartbeat)(t, y.map(function(b) {
27806
27806
  return b.lastMessageTime;
27807
27807
  }), typeof l == "boolean" ? void 0 : l);
27808
27808
  };
27809
27809
  }, p = function(t, d) {
27810
27810
  t instanceof WebSocket && (t.onclose = function(l) {
27811
- (0, n.getSubscribers)(d).forEach(function(s) {
27812
- s.optionsRef.current.onClose && s.optionsRef.current.onClose(l), s.setReadyState(m.ReadyState.CLOSED);
27813
- }), delete i.sharedWebSockets[d], (0, n.getSubscribers)(d).forEach(function(s) {
27811
+ (0, n.getSubscribers)(d).forEach(function(o) {
27812
+ o.optionsRef.current.onClose && o.optionsRef.current.onClose(l), o.setReadyState(m.ReadyState.CLOSED);
27813
+ }), delete i.sharedWebSockets[d], (0, n.getSubscribers)(d).forEach(function(o) {
27814
27814
  var y;
27815
- if (s.optionsRef.current.shouldReconnect && s.optionsRef.current.shouldReconnect(l)) {
27816
- var b = (y = s.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : m.DEFAULT_RECONNECT_LIMIT;
27817
- if (s.reconnectCount.current < b) {
27818
- var c = typeof s.optionsRef.current.reconnectInterval == "function" ? s.optionsRef.current.reconnectInterval(s.reconnectCount.current) : s.optionsRef.current.reconnectInterval;
27815
+ if (o.optionsRef.current.shouldReconnect && o.optionsRef.current.shouldReconnect(l)) {
27816
+ var b = (y = o.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : m.DEFAULT_RECONNECT_LIMIT;
27817
+ if (o.reconnectCount.current < b) {
27818
+ var c = typeof o.optionsRef.current.reconnectInterval == "function" ? o.optionsRef.current.reconnectInterval(o.reconnectCount.current) : o.optionsRef.current.reconnectInterval;
27819
27819
  setTimeout(function() {
27820
- s.reconnectCount.current++, s.reconnect.current();
27820
+ o.reconnectCount.current++, o.reconnect.current();
27821
27821
  }, c ?? m.DEFAULT_RECONNECT_INTERVAL_MS);
27822
27822
  } else
27823
- s.optionsRef.current.onReconnectStop && s.optionsRef.current.onReconnectStop(s.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
27823
+ o.optionsRef.current.onReconnectStop && o.optionsRef.current.onReconnectStop(o.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
27824
27824
  }
27825
27825
  });
27826
27826
  });
27827
27827
  }, g = function(t, d) {
27828
27828
  t.onerror = function(l) {
27829
- (0, n.getSubscribers)(d).forEach(function(s) {
27830
- s.optionsRef.current.onError && s.optionsRef.current.onError(l), m.isEventSourceSupported && t instanceof EventSource && (s.optionsRef.current.onClose && s.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), s.setReadyState(m.ReadyState.CLOSED));
27829
+ (0, n.getSubscribers)(d).forEach(function(o) {
27830
+ o.optionsRef.current.onError && o.optionsRef.current.onError(l), m.isEventSourceSupported && t instanceof EventSource && (o.optionsRef.current.onClose && o.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), o.setReadyState(m.ReadyState.CLOSED));
27831
27831
  }), m.isEventSourceSupported && t instanceof EventSource && t.close();
27832
27832
  };
27833
- }, o = function(t, d, l, s) {
27833
+ }, r = function(t, d, l, o) {
27834
27834
  var y;
27835
- return l.current.fromSocketIO && (y = (0, r.setUpSocketIOPing)(s)), f(t, d, l.current.heartbeat), p(t, d), _(t, d, l.current.heartbeat), g(t, d), function() {
27835
+ return l.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(o)), f(t, d, l.current.heartbeat), p(t, d), _(t, d, l.current.heartbeat), g(t, d), function() {
27836
27836
  y && clearInterval(y);
27837
27837
  };
27838
27838
  };
27839
- return ge.attachSharedListeners = o, ge;
27839
+ return pe.attachSharedListeners = r, pe;
27840
27840
  }
27841
27841
  var Ia;
27842
27842
  function Mt() {
27843
27843
  if (Ia) return Se;
27844
27844
  Ia = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.createOrJoinSocket = void 0;
27845
- var e = oa(), i = j(), m = Lt(), n = Gt(), r = ua(), u = function(_, p, g, o, t) {
27845
+ var e = oa(), i = j(), m = Lt(), n = Gt(), s = ua(), u = function(_, p, g, r, t) {
27846
27846
  return function() {
27847
- if ((0, r.removeSubscriber)(_, p), !(0, r.hasSubscribers)(_)) {
27847
+ if ((0, s.removeSubscriber)(_, p), !(0, s.hasSubscribers)(_)) {
27848
27848
  try {
27849
27849
  var d = e.sharedWebSockets[_];
27850
27850
  d instanceof WebSocket && (d.onclose = function(l) {
27851
- g.current.onClose && g.current.onClose(l), o(i.ReadyState.CLOSED);
27851
+ g.current.onClose && g.current.onClose(l), r(i.ReadyState.CLOSED);
27852
27852
  }), d.close();
27853
27853
  } catch {
27854
27854
  }
27855
27855
  t && t(), delete e.sharedWebSockets[_];
27856
27856
  }
27857
27857
  };
27858
- }, f = function(_, p, g, o, t, d, l, s, y) {
27859
- if (!i.isEventSourceSupported && o.current.eventSourceOptions)
27858
+ }, f = function(_, p, g, r, t, d, l, o, y) {
27859
+ if (!i.isEventSourceSupported && r.current.eventSourceOptions)
27860
27860
  throw i.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
27861
- if (o.current.share) {
27861
+ if (r.current.share) {
27862
27862
  var b = null;
27863
- e.sharedWebSockets[p] === void 0 ? (e.sharedWebSockets[p] = o.current.eventSourceOptions ? new EventSource(p, o.current.eventSourceOptions) : new WebSocket(p, o.current.protocols), _.current = e.sharedWebSockets[p], g(i.ReadyState.CONNECTING), b = (0, n.attachSharedListeners)(e.sharedWebSockets[p], p, o, y)) : (_.current = e.sharedWebSockets[p], g(e.sharedWebSockets[p].readyState));
27863
+ e.sharedWebSockets[p] === void 0 ? (e.sharedWebSockets[p] = r.current.eventSourceOptions ? new EventSource(p, r.current.eventSourceOptions) : new WebSocket(p, r.current.protocols), _.current = e.sharedWebSockets[p], g(i.ReadyState.CONNECTING), b = (0, n.attachSharedListeners)(e.sharedWebSockets[p], p, r, y)) : (_.current = e.sharedWebSockets[p], g(e.sharedWebSockets[p].readyState));
27864
27864
  var c = {
27865
27865
  setLastMessage: t,
27866
27866
  setReadyState: g,
27867
- optionsRef: o,
27867
+ optionsRef: r,
27868
27868
  reconnectCount: l,
27869
- lastMessageTime: s,
27869
+ lastMessageTime: o,
27870
27870
  reconnect: d
27871
27871
  };
27872
- return (0, r.addSubscriber)(p, c), u(p, c, o, g, b);
27872
+ return (0, s.addSubscriber)(p, c), u(p, c, r, g, b);
27873
27873
  } else {
27874
- if (_.current = o.current.eventSourceOptions ? new EventSource(p, o.current.eventSourceOptions) : new WebSocket(p, o.current.protocols), g(i.ReadyState.CONNECTING), !_.current)
27874
+ if (_.current = r.current.eventSourceOptions ? new EventSource(p, r.current.eventSourceOptions) : new WebSocket(p, r.current.protocols), g(i.ReadyState.CONNECTING), !_.current)
27875
27875
  throw new Error("WebSocket failed to be created");
27876
27876
  return (0, m.attachListeners)(_.current, {
27877
27877
  setLastMessage: t,
27878
27878
  setReadyState: g
27879
- }, o, d.current, l, s, y);
27879
+ }, r, d.current, l, o, y);
27880
27880
  }
27881
27881
  };
27882
27882
  return Se.createOrJoinSocket = f, Se;
@@ -27884,25 +27884,25 @@ function Mt() {
27884
27884
  var ee = {}, Ba;
27885
27885
  function Rt() {
27886
27886
  return Ba || (Ba = 1, (function(e) {
27887
- var i = ee && ee.__awaiter || function(p, g, o, t) {
27887
+ var i = ee && ee.__awaiter || function(p, g, r, t) {
27888
27888
  function d(l) {
27889
- return l instanceof o ? l : new o(function(s) {
27890
- s(l);
27889
+ return l instanceof r ? l : new r(function(o) {
27890
+ o(l);
27891
27891
  });
27892
27892
  }
27893
- return new (o || (o = Promise))(function(l, s) {
27893
+ return new (r || (r = Promise))(function(l, o) {
27894
27894
  function y(T) {
27895
27895
  try {
27896
27896
  c(t.next(T));
27897
27897
  } catch (S) {
27898
- s(S);
27898
+ o(S);
27899
27899
  }
27900
27900
  }
27901
27901
  function b(T) {
27902
27902
  try {
27903
27903
  c(t.throw(T));
27904
27904
  } catch (S) {
27905
- s(S);
27905
+ o(S);
27906
27906
  }
27907
27907
  }
27908
27908
  function c(T) {
@@ -27911,13 +27911,13 @@ function Rt() {
27911
27911
  c((t = t.apply(p, g || [])).next());
27912
27912
  });
27913
27913
  }, m = ee && ee.__generator || function(p, g) {
27914
- var o = { label: 0, sent: function() {
27914
+ var r = { label: 0, sent: function() {
27915
27915
  if (l[0] & 1) throw l[1];
27916
27916
  return l[1];
27917
- }, trys: [], ops: [] }, t, d, l, s = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27918
- return s.next = y(0), s.throw = y(1), s.return = y(2), typeof Symbol == "function" && (s[Symbol.iterator] = function() {
27917
+ }, trys: [], ops: [] }, t, d, l, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27918
+ return o.next = y(0), o.throw = y(1), o.return = y(2), typeof Symbol == "function" && (o[Symbol.iterator] = function() {
27919
27919
  return this;
27920
- }), s;
27920
+ }), o;
27921
27921
  function y(c) {
27922
27922
  return function(T) {
27923
27923
  return b([c, T]);
@@ -27925,7 +27925,7 @@ function Rt() {
27925
27925
  }
27926
27926
  function b(c) {
27927
27927
  if (t) throw new TypeError("Generator is already executing.");
27928
- for (; s && (s = 0, c[0] && (o = 0)), o; ) try {
27928
+ for (; o && (o = 0, c[0] && (r = 0)), r; ) try {
27929
27929
  if (t = 1, d && (l = c[0] & 2 ? d.return : c[0] ? d.throw || ((l = d.return) && l.call(d), 0) : d.next) && !(l = l.call(d, c[1])).done) return l;
27930
27930
  switch (d = 0, l && (c = [c[0] & 2, l.value]), c[0]) {
27931
27931
  case 0:
@@ -27933,34 +27933,34 @@ function Rt() {
27933
27933
  l = c;
27934
27934
  break;
27935
27935
  case 4:
27936
- return o.label++, { value: c[1], done: !1 };
27936
+ return r.label++, { value: c[1], done: !1 };
27937
27937
  case 5:
27938
- o.label++, d = c[1], c = [0];
27938
+ r.label++, d = c[1], c = [0];
27939
27939
  continue;
27940
27940
  case 7:
27941
- c = o.ops.pop(), o.trys.pop();
27941
+ c = r.ops.pop(), r.trys.pop();
27942
27942
  continue;
27943
27943
  default:
27944
- if (l = o.trys, !(l = l.length > 0 && l[l.length - 1]) && (c[0] === 6 || c[0] === 2)) {
27945
- o = 0;
27944
+ if (l = r.trys, !(l = l.length > 0 && l[l.length - 1]) && (c[0] === 6 || c[0] === 2)) {
27945
+ r = 0;
27946
27946
  continue;
27947
27947
  }
27948
27948
  if (c[0] === 3 && (!l || c[1] > l[0] && c[1] < l[3])) {
27949
- o.label = c[1];
27949
+ r.label = c[1];
27950
27950
  break;
27951
27951
  }
27952
- if (c[0] === 6 && o.label < l[1]) {
27953
- o.label = l[1], l = c;
27952
+ if (c[0] === 6 && r.label < l[1]) {
27953
+ r.label = l[1], l = c;
27954
27954
  break;
27955
27955
  }
27956
- if (l && o.label < l[2]) {
27957
- o.label = l[2], o.ops.push(c);
27956
+ if (l && r.label < l[2]) {
27957
+ r.label = l[2], r.ops.push(c);
27958
27958
  break;
27959
27959
  }
27960
- l[2] && o.ops.pop(), o.trys.pop();
27960
+ l[2] && r.ops.pop(), r.trys.pop();
27961
27961
  continue;
27962
27962
  }
27963
- c = g.call(p, o);
27963
+ c = g.call(p, r);
27964
27964
  } catch (T) {
27965
27965
  c = [6, T], d = 0;
27966
27966
  } finally {
@@ -27969,22 +27969,22 @@ function Rt() {
27969
27969
  if (c[0] & 5) throw c[1];
27970
27970
  return { value: c[0] ? c[1] : void 0, done: !0 };
27971
27971
  }
27972
- }, n = ee && ee.__spreadArray || function(p, g, o) {
27973
- if (o || arguments.length === 2) for (var t = 0, d = g.length, l; t < d; t++)
27972
+ }, n = ee && ee.__spreadArray || function(p, g, r) {
27973
+ if (r || arguments.length === 2) for (var t = 0, d = g.length, l; t < d; t++)
27974
27974
  (l || !(t in g)) && (l || (l = Array.prototype.slice.call(g, 0, t)), l[t] = g[t]);
27975
27975
  return p.concat(l || Array.prototype.slice.call(g));
27976
27976
  };
27977
27977
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
27978
- var r = sa(), u = j(), f = function(p) {
27978
+ var s = sa(), u = j(), f = function(p) {
27979
27979
  return new Promise(function(g) {
27980
27980
  return window.setTimeout(g, p);
27981
27981
  });
27982
27982
  }, _ = function(p, g) {
27983
- for (var o = [], t = 2; t < arguments.length; t++)
27984
- o[t - 2] = arguments[t];
27985
- return i(void 0, n([p, g], o, !0), void 0, function(d, l, s) {
27983
+ for (var r = [], t = 2; t < arguments.length; t++)
27984
+ r[t - 2] = arguments[t];
27985
+ return i(void 0, n([p, g], r, !0), void 0, function(d, l, o) {
27986
27986
  var y, b, c, T, S, E, v, D;
27987
- return s === void 0 && (s = 0), m(this, function(L) {
27987
+ return o === void 0 && (o = 0), m(this, function(L) {
27988
27988
  switch (L.label) {
27989
27989
  case 0:
27990
27990
  if (typeof d != "function") return [3, 10];
@@ -27994,11 +27994,11 @@ function Rt() {
27994
27994
  case 2:
27995
27995
  return y = L.sent(), [3, 9];
27996
27996
  case 3:
27997
- return L.sent(), l.current.retryOnError ? (b = (E = l.current.reconnectAttempts) !== null && E !== void 0 ? E : u.DEFAULT_RECONNECT_LIMIT, s < b ? (c = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(s) : l.current.reconnectInterval, [4, f(c ?? u.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27997
+ return L.sent(), l.current.retryOnError ? (b = (E = l.current.reconnectAttempts) !== null && E !== void 0 ? E : u.DEFAULT_RECONNECT_LIMIT, o < b ? (c = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(o) : l.current.reconnectInterval, [4, f(c ?? u.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27998
27998
  case 4:
27999
- return L.sent(), [2, (0, e.getUrl)(d, l, s + 1)];
27999
+ return L.sent(), [2, (0, e.getUrl)(d, l, o + 1)];
28000
28000
  case 5:
28001
- return (D = (v = l.current).onReconnectStop) === null || D === void 0 || D.call(v, s), [2, null];
28001
+ return (D = (v = l.current).onReconnectStop) === null || D === void 0 || D.call(v, o), [2, null];
28002
28002
  case 6:
28003
28003
  return [3, 8];
28004
28004
  case 7:
@@ -28010,7 +28010,7 @@ function Rt() {
28010
28010
  case 10:
28011
28011
  y = d, L.label = 11;
28012
28012
  case 11:
28013
- return T = l.current.fromSocketIO ? (0, r.parseSocketIOUrl)(y) : y, S = l.current.queryParams ? (0, r.appendQueryParams)(T, l.current.queryParams) : T, [2, S];
28013
+ return T = l.current.fromSocketIO ? (0, s.parseSocketIOUrl)(y) : y, S = l.current.queryParams ? (0, s.appendQueryParams)(T, l.current.queryParams) : T, [2, S];
28014
28014
  }
28015
28015
  });
28016
28016
  });
@@ -28024,13 +28024,13 @@ function Pt() {
28024
28024
  Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
28025
28025
  var i = function(m, n) {
28026
28026
  return new Proxy(m, {
28027
- get: function(r, u) {
28028
- var f = r[u];
28027
+ get: function(s, u) {
28028
+ var f = s[u];
28029
28029
  return u === "reconnect" ? n : typeof f == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
28030
28030
  }) : f;
28031
28031
  },
28032
- set: function(r, u, f) {
28033
- return /^on/.test(u) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (r[u] = f, !0);
28032
+ set: function(s, u, f) {
28033
+ return /^on/.test(u) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (s[u] = f, !0);
28034
28034
  }
28035
28035
  });
28036
28036
  };
@@ -28043,19 +28043,19 @@ function ga() {
28043
28043
  ja = 1;
28044
28044
  var e = z && z.__assign || function() {
28045
28045
  return e = Object.assign || function(d) {
28046
- for (var l, s = 1, y = arguments.length; s < y; s++) {
28047
- l = arguments[s];
28046
+ for (var l, o = 1, y = arguments.length; o < y; o++) {
28047
+ l = arguments[o];
28048
28048
  for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (d[b] = l[b]);
28049
28049
  }
28050
28050
  return d;
28051
28051
  }, e.apply(this, arguments);
28052
- }, i = z && z.__awaiter || function(d, l, s, y) {
28052
+ }, i = z && z.__awaiter || function(d, l, o, y) {
28053
28053
  function b(c) {
28054
- return c instanceof s ? c : new s(function(T) {
28054
+ return c instanceof o ? c : new o(function(T) {
28055
28055
  T(c);
28056
28056
  });
28057
28057
  }
28058
- return new (s || (s = Promise))(function(c, T) {
28058
+ return new (o || (o = Promise))(function(c, T) {
28059
28059
  function S(D) {
28060
28060
  try {
28061
28061
  v(y.next(D));
@@ -28076,7 +28076,7 @@ function ga() {
28076
28076
  v((y = y.apply(d, l || [])).next());
28077
28077
  });
28078
28078
  }, m = z && z.__generator || function(d, l) {
28079
- var s = { label: 0, sent: function() {
28079
+ var o = { label: 0, sent: function() {
28080
28080
  if (c[0] & 1) throw c[1];
28081
28081
  return c[1];
28082
28082
  }, trys: [], ops: [] }, y, b, c, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
@@ -28090,7 +28090,7 @@ function ga() {
28090
28090
  }
28091
28091
  function E(v) {
28092
28092
  if (y) throw new TypeError("Generator is already executing.");
28093
- for (; T && (T = 0, v[0] && (s = 0)), s; ) try {
28093
+ for (; T && (T = 0, v[0] && (o = 0)), o; ) try {
28094
28094
  if (y = 1, b && (c = v[0] & 2 ? b.return : v[0] ? b.throw || ((c = b.return) && c.call(b), 0) : b.next) && !(c = c.call(b, v[1])).done) return c;
28095
28095
  switch (b = 0, c && (v = [v[0] & 2, c.value]), v[0]) {
28096
28096
  case 0:
@@ -28098,34 +28098,34 @@ function ga() {
28098
28098
  c = v;
28099
28099
  break;
28100
28100
  case 4:
28101
- return s.label++, { value: v[1], done: !1 };
28101
+ return o.label++, { value: v[1], done: !1 };
28102
28102
  case 5:
28103
- s.label++, b = v[1], v = [0];
28103
+ o.label++, b = v[1], v = [0];
28104
28104
  continue;
28105
28105
  case 7:
28106
- v = s.ops.pop(), s.trys.pop();
28106
+ v = o.ops.pop(), o.trys.pop();
28107
28107
  continue;
28108
28108
  default:
28109
- if (c = s.trys, !(c = c.length > 0 && c[c.length - 1]) && (v[0] === 6 || v[0] === 2)) {
28110
- s = 0;
28109
+ if (c = o.trys, !(c = c.length > 0 && c[c.length - 1]) && (v[0] === 6 || v[0] === 2)) {
28110
+ o = 0;
28111
28111
  continue;
28112
28112
  }
28113
28113
  if (v[0] === 3 && (!c || v[1] > c[0] && v[1] < c[3])) {
28114
- s.label = v[1];
28114
+ o.label = v[1];
28115
28115
  break;
28116
28116
  }
28117
- if (v[0] === 6 && s.label < c[1]) {
28118
- s.label = c[1], c = v;
28117
+ if (v[0] === 6 && o.label < c[1]) {
28118
+ o.label = c[1], c = v;
28119
28119
  break;
28120
28120
  }
28121
- if (c && s.label < c[2]) {
28122
- s.label = c[2], s.ops.push(v);
28121
+ if (c && o.label < c[2]) {
28122
+ o.label = c[2], o.ops.push(v);
28123
28123
  break;
28124
28124
  }
28125
- c[2] && s.ops.pop(), s.trys.pop();
28125
+ c[2] && o.ops.pop(), o.trys.pop();
28126
28126
  continue;
28127
28127
  }
28128
- v = l.call(d, s);
28128
+ v = l.call(d, o);
28129
28129
  } catch (D) {
28130
28130
  v = [6, D], b = 0;
28131
28131
  } finally {
@@ -28138,9 +28138,9 @@ function ga() {
28138
28138
  return d && d.__esModule ? d : { default: d };
28139
28139
  };
28140
28140
  Object.defineProperty(z, "__esModule", { value: !0 }), z.useWebSocket = void 0;
28141
- var r = Le, u = rt, f = j(), _ = Mt(), p = Rt(), g = n(Pt()), o = pa(), t = function(d, l, s) {
28142
- l === void 0 && (l = f.DEFAULT_OPTIONS), s === void 0 && (s = !0);
28143
- var y = (0, r.useState)(null), b = y[0], c = y[1], T = (0, r.useState)({}), S = T[0], E = T[1], v = (0, r.useMemo)(function() {
28141
+ var s = Le, u = rt, f = j(), _ = Mt(), p = Rt(), g = n(Pt()), r = pa(), t = function(d, l, o) {
28142
+ l === void 0 && (l = f.DEFAULT_OPTIONS), o === void 0 && (o = !0);
28143
+ var y = (0, s.useState)(null), b = y[0], c = y[1], T = (0, s.useState)({}), S = T[0], E = T[1], v = (0, s.useMemo)(function() {
28144
28144
  if (!l.disableJson && b)
28145
28145
  try {
28146
28146
  return JSON.parse(b.data);
@@ -28148,50 +28148,50 @@ function ga() {
28148
28148
  return f.UNPARSABLE_JSON_OBJECT;
28149
28149
  }
28150
28150
  return null;
28151
- }, [b, l.disableJson]), D = (0, r.useRef)(null), L = (0, r.useRef)(null), I = (0, r.useRef)(function() {
28152
- }), Q = (0, r.useRef)(0), Te = (0, r.useRef)(Date.now()), Ge = (0, r.useRef)([]), B = (0, r.useRef)(null), w = (0, r.useRef)(l);
28151
+ }, [b, l.disableJson]), D = (0, s.useRef)(null), L = (0, s.useRef)(null), I = (0, s.useRef)(function() {
28152
+ }), Q = (0, s.useRef)(0), Te = (0, s.useRef)(Date.now()), Ge = (0, s.useRef)([]), B = (0, s.useRef)(null), w = (0, s.useRef)(l);
28153
28153
  w.current = l;
28154
- var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && s === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, re = l.queryParams ? JSON.stringify(l.queryParams) : null, q = (0, r.useCallback)(function(x, F) {
28154
+ var A = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && o === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, me = l.queryParams ? JSON.stringify(l.queryParams) : null, q = (0, s.useCallback)(function(x, F) {
28155
28155
  var Y;
28156
28156
  if (F === void 0 && (F = !0), f.isEventSourceSupported && L.current instanceof EventSource) {
28157
28157
  console.warn("Unable to send a message from an eventSource");
28158
28158
  return;
28159
28159
  }
28160
- ((Y = L.current) === null || Y === void 0 ? void 0 : Y.readyState) === f.ReadyState.OPEN ? ((0, o.assertIsWebSocket)(L.current, w.current.skipAssert), L.current.send(x)) : F && Ge.current.push(x);
28161
- }, []), Me = (0, r.useCallback)(function(x, F) {
28160
+ ((Y = L.current) === null || Y === void 0 ? void 0 : Y.readyState) === f.ReadyState.OPEN ? ((0, r.assertIsWebSocket)(L.current, w.current.skipAssert), L.current.send(x)) : F && Ge.current.push(x);
28161
+ }, []), Me = (0, s.useCallback)(function(x, F) {
28162
28162
  F === void 0 && (F = !0), q(JSON.stringify(x), F);
28163
- }, [q]), Re = (0, r.useCallback)(function() {
28164
- return w.current.share !== !0 || f.isEventSourceSupported && L.current instanceof EventSource ? L.current : (B.current === null && L.current && ((0, o.assertIsWebSocket)(L.current, w.current.skipAssert), B.current = (0, g.default)(L.current, I)), B.current);
28163
+ }, [q]), Re = (0, s.useCallback)(function() {
28164
+ return w.current.share !== !0 || f.isEventSourceSupported && L.current instanceof EventSource ? L.current : (B.current === null && L.current && ((0, r.assertIsWebSocket)(L.current, w.current.skipAssert), B.current = (0, g.default)(L.current, I)), B.current);
28165
28165
  }, []);
28166
- return (0, r.useEffect)(function() {
28167
- if (d !== null && s === !0) {
28166
+ return (0, s.useEffect)(function() {
28167
+ if (d !== null && o === !0) {
28168
28168
  var x, F = !1, Y = !0, Ce = function() {
28169
28169
  return i(void 0, void 0, void 0, function() {
28170
- var oe, le, Pe;
28170
+ var re, te, Pe;
28171
28171
  return m(this, function(ce) {
28172
28172
  switch (ce.label) {
28173
28173
  case 0:
28174
- return oe = D, [4, (0, p.getUrl)(d, w)];
28174
+ return re = D, [4, (0, p.getUrl)(d, w)];
28175
28175
  case 1:
28176
- return oe.current = ce.sent(), D.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), D.current = "ABORTED", (0, u.flushSync)(function() {
28176
+ return re.current = ce.sent(), D.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), D.current = "ABORTED", (0, u.flushSync)(function() {
28177
28177
  return E(function(X) {
28178
28178
  return e(e({}, X), { ABORTED: f.ReadyState.CLOSED });
28179
28179
  });
28180
28180
  }), [
28181
28181
  2
28182
28182
  /*return*/
28183
- ]) : (le = function(X) {
28183
+ ]) : (te = function(X) {
28184
28184
  F || (0, u.flushSync)(function() {
28185
28185
  return c(X);
28186
28186
  });
28187
28187
  }, Pe = function(X) {
28188
28188
  F || (0, u.flushSync)(function() {
28189
28189
  return E(function(_e) {
28190
- var se;
28191
- return e(e({}, _e), D.current && (se = {}, se[D.current] = X, se));
28190
+ var oe;
28191
+ return e(e({}, _e), D.current && (oe = {}, oe[D.current] = X, oe));
28192
28192
  });
28193
28193
  });
28194
- }, Y && (x = (0, _.createOrJoinSocket)(L, D.current, Pe, w, le, I, Q, Te, q)), [
28194
+ }, Y && (x = (0, _.createOrJoinSocket)(L, D.current, Pe, w, te, I, Q, Te, q)), [
28195
28195
  2
28196
28196
  /*return*/
28197
28197
  ]);
@@ -28204,11 +28204,11 @@ function ga() {
28204
28204
  }, Ce(), function() {
28205
28205
  F = !0, Y = !1, B.current && (B.current = null), x?.(), c(null);
28206
28206
  };
28207
- } else (d === null || s === !1) && (Q.current = 0, E(function(oe) {
28208
- var le;
28209
- return e(e({}, oe), D.current && (le = {}, le[D.current] = f.ReadyState.CLOSED, le));
28207
+ } else (d === null || o === !1) && (Q.current = 0, E(function(re) {
28208
+ var te;
28209
+ return e(e({}, re), D.current && (te = {}, te[D.current] = f.ReadyState.CLOSED, te));
28210
28210
  }));
28211
- }, [d, s, re, q]), (0, r.useEffect)(function() {
28211
+ }, [d, o, me, q]), (0, s.useEffect)(function() {
28212
28212
  A === f.ReadyState.OPEN && Ge.current.splice(0).forEach(function(x) {
28213
28213
  q(x);
28214
28214
  });
@@ -28223,41 +28223,41 @@ function ga() {
28223
28223
  };
28224
28224
  return z.useWebSocket = t, z;
28225
28225
  }
28226
- var de = {}, Qa;
28226
+ var ge = {}, Qa;
28227
28227
  function xt() {
28228
- if (Qa) return de;
28228
+ if (Qa) return ge;
28229
28229
  Qa = 1;
28230
- var e = de && de.__assign || function() {
28230
+ var e = ge && ge.__assign || function() {
28231
28231
  return e = Object.assign || function(_) {
28232
- for (var p, g = 1, o = arguments.length; g < o; g++) {
28232
+ for (var p, g = 1, r = arguments.length; g < r; g++) {
28233
28233
  p = arguments[g];
28234
28234
  for (var t in p) Object.prototype.hasOwnProperty.call(p, t) && (_[t] = p[t]);
28235
28235
  }
28236
28236
  return _;
28237
28237
  }, e.apply(this, arguments);
28238
28238
  };
28239
- Object.defineProperty(de, "__esModule", { value: !0 }), de.useSocketIO = void 0;
28240
- var i = Le, m = ga(), n = j(), r = {
28239
+ Object.defineProperty(ge, "__esModule", { value: !0 }), ge.useSocketIO = void 0;
28240
+ var i = Le, m = ga(), n = j(), s = {
28241
28241
  type: "empty",
28242
28242
  payload: null
28243
28243
  }, u = function(_) {
28244
28244
  if (!_ || !_.data)
28245
- return r;
28245
+ return s;
28246
28246
  var p = _.data.match(/\[.*]/);
28247
28247
  if (!p)
28248
- return r;
28248
+ return s;
28249
28249
  var g = JSON.parse(p);
28250
- return !Array.isArray(g) || !g[1] ? r : {
28250
+ return !Array.isArray(g) || !g[1] ? s : {
28251
28251
  type: g[0],
28252
28252
  payload: g[1]
28253
28253
  };
28254
28254
  }, f = function(_, p, g) {
28255
28255
  p === void 0 && (p = n.DEFAULT_OPTIONS), g === void 0 && (g = !0);
28256
- var o = (0, i.useMemo)(function() {
28256
+ var r = (0, i.useMemo)(function() {
28257
28257
  return e(e({}, p), { fromSocketIO: !0 });
28258
- }, []), t = (0, m.useWebSocket)(_, o, g), d = t.sendMessage, l = t.sendJsonMessage, s = t.lastMessage, y = t.readyState, b = t.getWebSocket, c = (0, i.useMemo)(function() {
28259
- return u(s);
28260
- }, [s]);
28258
+ }, []), t = (0, m.useWebSocket)(_, r, g), d = t.sendMessage, l = t.sendJsonMessage, o = t.lastMessage, y = t.readyState, b = t.getWebSocket, c = (0, i.useMemo)(function() {
28259
+ return u(o);
28260
+ }, [o]);
28261
28261
  return {
28262
28262
  sendMessage: d,
28263
28263
  sendJsonMessage: l,
@@ -28267,7 +28267,7 @@ function xt() {
28267
28267
  getWebSocket: b
28268
28268
  };
28269
28269
  };
28270
- return de.useSocketIO = f, de;
28270
+ return ge.useSocketIO = f, ge;
28271
28271
  }
28272
28272
  var ae = {}, qa;
28273
28273
  function Ot() {
@@ -28277,7 +28277,7 @@ function Ot() {
28277
28277
  return e = Object.assign || function(f) {
28278
28278
  for (var _, p = 1, g = arguments.length; p < g; p++) {
28279
28279
  _ = arguments[p];
28280
- for (var o in _) Object.prototype.hasOwnProperty.call(_, o) && (f[o] = _[o]);
28280
+ for (var r in _) Object.prototype.hasOwnProperty.call(_, r) && (f[r] = _[r]);
28281
28281
  }
28282
28282
  return f;
28283
28283
  }, e.apply(this, arguments);
@@ -28285,20 +28285,20 @@ function Ot() {
28285
28285
  var p = {};
28286
28286
  for (var g in f) Object.prototype.hasOwnProperty.call(f, g) && _.indexOf(g) < 0 && (p[g] = f[g]);
28287
28287
  if (f != null && typeof Object.getOwnPropertySymbols == "function")
28288
- for (var o = 0, g = Object.getOwnPropertySymbols(f); o < g.length; o++)
28289
- _.indexOf(g[o]) < 0 && Object.prototype.propertyIsEnumerable.call(f, g[o]) && (p[g[o]] = f[g[o]]);
28288
+ for (var r = 0, g = Object.getOwnPropertySymbols(f); r < g.length; r++)
28289
+ _.indexOf(g[r]) < 0 && Object.prototype.propertyIsEnumerable.call(f, g[r]) && (p[g[r]] = f[g[r]]);
28290
28290
  return p;
28291
28291
  };
28292
28292
  Object.defineProperty(ae, "__esModule", { value: !0 }), ae.useEventSource = void 0;
28293
- var m = Le, n = ga(), r = j(), u = function(f, _, p) {
28294
- _ === void 0 && (_ = r.DEFAULT_EVENT_SOURCE_OPTIONS);
28295
- var g = _.withCredentials, o = _.events, t = i(_, ["withCredentials", "events"]);
28293
+ var m = Le, n = ga(), s = j(), u = function(f, _, p) {
28294
+ _ === void 0 && (_ = s.DEFAULT_EVENT_SOURCE_OPTIONS);
28295
+ var g = _.withCredentials, r = _.events, t = i(_, ["withCredentials", "events"]);
28296
28296
  p === void 0 && (p = !0);
28297
28297
  var d = e(e({}, t), { eventSourceOptions: {
28298
28298
  withCredentials: g
28299
- } }), l = (0, m.useRef)(r.EMPTY_EVENT_HANDLERS);
28300
- o && (l.current = o);
28301
- var s = (0, n.useWebSocket)(f, d, p), y = s.lastMessage, b = s.readyState, c = s.getWebSocket;
28299
+ } }), l = (0, m.useRef)(s.EMPTY_EVENT_HANDLERS);
28300
+ r && (l.current = r);
28301
+ var o = (0, n.useWebSocket)(f, d, p), y = o.lastMessage, b = o.readyState, c = o.getWebSocket;
28302
28302
  return (0, m.useEffect)(function() {
28303
28303
  y?.type && Object.entries(l.current).forEach(function(T) {
28304
28304
  var S = T[0], E = T[1];
@@ -28328,9 +28328,9 @@ function Ht() {
28328
28328
  Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
28329
28329
  return n.ReadyState;
28330
28330
  } });
28331
- var r = Ot();
28331
+ var s = Ot();
28332
28332
  Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
28333
- return r.useEventSource;
28333
+ return s.useEventSource;
28334
28334
  } });
28335
28335
  var u = pa();
28336
28336
  Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
@@ -28350,12 +28350,12 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28350
28350
  TRANSFER_IN_GAME: "transfer_in_game",
28351
28351
  CHECK_REQUEST: "CHECK_RREQUEST",
28352
28352
  CASH_REGISTER_LIMIT: "cash_register_limit"
28353
- }, Wt = 3e4, yl = ({
28353
+ }, Wt = 3e4, Ul = ({
28354
28354
  socketUrl: e,
28355
28355
  socketHandlers: i = {},
28356
28356
  options: m = {}
28357
28357
  }) => {
28358
- const n = Ga(!1), r = Ga(i), {
28358
+ const n = Ga(!1), s = Ga(i), {
28359
28359
  sendMessage: u,
28360
28360
  // 發送普通訊息
28361
28361
  sendJsonMessage: f,
@@ -28381,33 +28381,33 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28381
28381
  }
28382
28382
  }, [_?.data]);
28383
28383
  return De(() => {
28384
- const o = setInterval(
28384
+ const r = setInterval(
28385
28385
  () => u("ping"),
28386
28386
  Wt
28387
28387
  );
28388
- return () => clearInterval(o);
28388
+ return () => clearInterval(r);
28389
28389
  }, [u]), De(() => {
28390
- r.current = i;
28390
+ s.current = i;
28391
28391
  }, [i]), De(() => {
28392
28392
  if (!g) return;
28393
28393
  const {
28394
- onDeposit: o,
28394
+ onDeposit: r,
28395
28395
  onTransCode: t,
28396
28396
  onError: d,
28397
28397
  onUpdateMember: l,
28398
- onMaintainNotice: s,
28398
+ onMaintainNotice: o,
28399
28399
  onMaintainNoticeMember: y,
28400
28400
  onReload: b,
28401
28401
  onTransferInGame: c,
28402
28402
  onCashRegisterLimit: T
28403
- } = r.current, S = we(g, "type", ""), E = {
28403
+ } = s.current, S = we(g, "type", ""), E = {
28404
28404
  memberInfoUid: we(g, "member_info_uid", null),
28405
28405
  data: we(g, "data", null),
28406
28406
  memo: we(g, "memo", null)
28407
28407
  };
28408
28408
  switch (S) {
28409
28409
  case K.DEPOSIT:
28410
- o?.(E);
28410
+ r?.(E);
28411
28411
  break;
28412
28412
  case K.TRANS_CODE:
28413
28413
  t?.(E);
@@ -28419,7 +28419,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28419
28419
  l?.(E);
28420
28420
  break;
28421
28421
  case K.MAINTAIN_NOTICE:
28422
- s?.(E);
28422
+ o?.(E);
28423
28423
  break;
28424
28424
  case K.MAINTAIN_NOTICE_MEMBER:
28425
28425
  y?.(E);
@@ -28445,41 +28445,38 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28445
28445
  // WebSocket 連線狀態
28446
28446
  };
28447
28447
  }, fi = () => {
28448
- const { client: e } = te(), i = V(async () => {
28448
+ const { client: e } = ie(), i = V(async () => {
28449
28449
  const { data: n } = await e.get("/carousels");
28450
28450
  return n;
28451
28451
  }, [e]), m = V(async () => await e.get("/marquees"), [e]);
28452
28452
  return { commonCarouselApi: i, commonMarqueeApi: m };
28453
- }, bl = () => {
28454
- const { lng: e } = te(), { commonCarouselApi: i } = fi(), m = ra(e);
28455
- return ie({
28453
+ }, yl = () => {
28454
+ const { lng: e } = ie(), { commonCarouselApi: i } = fi(), m = ra(e);
28455
+ return le({
28456
28456
  queryKey: ["getCarouselList"],
28457
28457
  queryFn: async () => await i(),
28458
- select: (n) => {
28459
- const { data: r } = n, u = r.map((f) => {
28460
- const { carousels_lang: _ } = f;
28461
- return {
28462
- ...f,
28463
- carousel_current_language: _?.find((p) => p.lang === m) || {}
28464
- };
28465
- });
28466
- return console.log(u, r), u;
28467
- }
28458
+ select: (n) => n.map((u) => {
28459
+ const { carousels_lang: f } = u;
28460
+ return {
28461
+ ...u,
28462
+ carousel_current_language: f?.find((_) => _.lang === m) || {}
28463
+ };
28464
+ })
28468
28465
  });
28469
- }, Tl = () => {
28470
- const { lng: e } = te(), { commonMarqueeApi: i } = fi(), m = ra(e);
28471
- return ie({
28466
+ }, bl = () => {
28467
+ const { lng: e } = ie(), { commonMarqueeApi: i } = fi(), m = ra(e);
28468
+ return le({
28472
28469
  queryKey: ["getMarqueeList"],
28473
28470
  queryFn: async () => i(),
28474
28471
  select: (n) => {
28475
- const r = n.Marquees;
28476
- return Ie(r, (f) => f[m] || f["en-US"]);
28472
+ const s = n.Marquees;
28473
+ return Ie(s, (f) => f[m] || f["en-US"]);
28477
28474
  }
28478
28475
  });
28479
28476
  }, Jt = () => {
28480
- const { client: e, lng: i } = te(), m = ra(i || "tw");
28477
+ const { client: e, lng: i } = ie(), m = ra(i || "tw");
28481
28478
  return { playGameApi: V(
28482
- async (r) => {
28479
+ async (s) => {
28483
28480
  const {
28484
28481
  gameUid: u = "",
28485
28482
  // 遊戲唯一標識
@@ -28491,7 +28488,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28491
28488
  // 遊戲幣別
28492
28489
  currentCurrency: g = ""
28493
28490
  // 目前使用的幣別
28494
- } = r;
28491
+ } = s;
28495
28492
  return await e.post("/game/go", {
28496
28493
  gameUid: u,
28497
28494
  gameCode: f,
@@ -28508,17 +28505,17 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28508
28505
  let i = {};
28509
28506
  return e.forEach((m, n) => i[m] = n), i;
28510
28507
  })(Ee), Vt = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, H = String.fromCharCode.bind(String), ei = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), yi = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (i) => i == "+" ? "-" : "_"), bi = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), Ti = (e) => {
28511
- let i, m, n, r, u = "";
28508
+ let i, m, n, s, u = "";
28512
28509
  const f = e.length % 3;
28513
28510
  for (let _ = 0; _ < e.length; ) {
28514
- if ((m = e.charCodeAt(_++)) > 255 || (n = e.charCodeAt(_++)) > 255 || (r = e.charCodeAt(_++)) > 255)
28511
+ if ((m = e.charCodeAt(_++)) > 255 || (n = e.charCodeAt(_++)) > 255 || (s = e.charCodeAt(_++)) > 255)
28515
28512
  throw new TypeError("invalid character found");
28516
- i = m << 16 | n << 8 | r, u += Ee[i >> 18 & 63] + Ee[i >> 12 & 63] + Ee[i >> 6 & 63] + Ee[i & 63];
28513
+ i = m << 16 | n << 8 | s, u += Ee[i >> 18 & 63] + Ee[i >> 12 & 63] + Ee[i >> 6 & 63] + Ee[i & 63];
28517
28514
  }
28518
28515
  return f ? u.slice(0, f - 3) + "===".substring(f) : u;
28519
28516
  }, da = typeof btoa == "function" ? (e) => btoa(e) : be ? (e) => Buffer.from(e, "binary").toString("base64") : Ti, ta = be ? (e) => Buffer.from(e).toString("base64") : (e) => {
28520
28517
  let m = [];
28521
- for (let n = 0, r = e.length; n < r; n += 4096)
28518
+ for (let n = 0, s = e.length; n < s; n += 4096)
28522
28519
  m.push(H.apply(null, e.subarray(n, n + 4096)));
28523
28520
  return da(m.join(""));
28524
28521
  }, Ze = (e, i = !1) => i ? yi(ta(e)) : ta(e), At = (e) => {
@@ -28543,10 +28540,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28543
28540
  if (e = e.replace(/\s+/g, ""), !Vt.test(e))
28544
28541
  throw new TypeError("malformed base64.");
28545
28542
  e += "==".slice(2 - (e.length & 3));
28546
- let i, m, n, r = [];
28543
+ let i, m, n, s = [];
28547
28544
  for (let u = 0; u < e.length; )
28548
- i = Je[e.charAt(u++)] << 18 | Je[e.charAt(u++)] << 12 | (m = Je[e.charAt(u++)]) << 6 | (n = Je[e.charAt(u++)]), m === 64 ? r.push(H(i >> 16 & 255)) : n === 64 ? r.push(H(i >> 16 & 255, i >> 8 & 255)) : r.push(H(i >> 16 & 255, i >> 8 & 255, i & 255));
28549
- return r.join("");
28545
+ i = Je[e.charAt(u++)] << 18 | Je[e.charAt(u++)] << 12 | (m = Je[e.charAt(u++)]) << 6 | (n = Je[e.charAt(u++)]), m === 64 ? s.push(H(i >> 16 & 255)) : n === 64 ? s.push(H(i >> 16 & 255, i >> 8 & 255)) : s.push(H(i >> 16 & 255, i >> 8 & 255, i & 255));
28546
+ return s.join("");
28550
28547
  }, ca = typeof atob == "function" ? (e) => atob(bi(e)) : be ? (e) => Buffer.from(e, "base64").toString("binary") : hi, ki = be ? (e) => ei(Buffer.from(e, "base64")) : (e) => ei(ca(e).split("").map((i) => i.charCodeAt(0))), Si = (e) => ki(Ni(e)), jt = be ? (e) => Buffer.from(e, "base64").toString("utf8") : Xa ? (e) => Xa.decode(ki(e)) : (e) => vi(ca(e)), Ni = (e) => bi(e.replace(/[-_]/g, (i) => i == "-" ? "+" : "/")), la = (e) => jt(Ni(e)), Qt = (e) => {
28551
28548
  if (typeof e != "string")
28552
28549
  return !1;
@@ -28602,32 +28599,32 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28602
28599
  extendString: Ei,
28603
28600
  extendUint8Array: Li,
28604
28601
  extendBuiltins: qt
28605
- }, Cl = (e, i) => {
28602
+ }, Tl = (e, i) => {
28606
28603
  const { playGameApi: m } = Jt();
28607
- return ie({
28604
+ return le({
28608
28605
  queryKey: ["playGame"],
28609
28606
  queryFn: async () => {
28610
- const { gameUid: n, gameCode: r, isMobile: u, gameCurrency: f, currentCurrency: _ } = e || {}, p = await m({
28607
+ const { gameUid: n, gameCode: s, isMobile: u, gameCurrency: f, currentCurrency: _ } = e || {}, p = await m({
28611
28608
  gameUid: n,
28612
- gameCode: r,
28609
+ gameCode: s,
28613
28610
  isMobile: u,
28614
28611
  gameCurrency: f,
28615
28612
  currentCurrency: _
28616
28613
  }), {
28617
28614
  game_currency: g,
28618
- lang: o,
28615
+ lang: r,
28619
28616
  not_support_iframe: t,
28620
28617
  portrait: d,
28621
28618
  url: l,
28622
- is_html_code: s,
28619
+ is_html_code: o,
28623
28620
  message: y
28624
28621
  } = p;
28625
28622
  return {
28626
28623
  gameCurrency: g,
28627
- lang: o,
28624
+ lang: r,
28628
28625
  supportIframe: !t,
28629
28626
  supportPortrait: d,
28630
- isHtmlCode: s,
28627
+ isHtmlCode: o,
28631
28628
  gameUrl: l,
28632
28629
  decodeGameUrl: Yt.decode(l),
28633
28630
  message: y
@@ -28637,48 +28634,37 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28637
28634
  ...i
28638
28635
  });
28639
28636
  }, Xt = ({ options: e } = {}) => {
28640
- const { userLoginApi: i } = me();
28637
+ const { userLoginApi: i } = de();
28641
28638
  return na({
28642
28639
  mutationKey: ["userLogin"],
28643
28640
  mutationFn: async (m) => i(m),
28644
28641
  ...e
28645
28642
  });
28646
28643
  }, $t = ({ options: e } = {}) => {
28647
- const { userLogoutApi: i } = me();
28644
+ const { userLogoutApi: i } = de();
28648
28645
  return na({
28649
28646
  mutationKey: ["userLogout"],
28650
28647
  mutationFn: async () => i(),
28651
28648
  ...e
28652
28649
  });
28653
28650
  }, el = ({ options: e } = {}) => {
28654
- const { addOrRemoveFavoriteGameApi: i } = me();
28651
+ const { addOrRemoveFavoriteGameApi: i } = de();
28655
28652
  return na({
28656
28653
  mutationKey: ["toggleFavoriteGame"],
28657
28654
  mutationFn: async (m) => i(m),
28658
28655
  ...e
28659
28656
  });
28660
- }, al = ({ options: e } = {}) => {
28661
- const { rankingGameApi: i } = me();
28662
- return ie({
28663
- queryKey: ["rankingGame"],
28664
- queryFn: async () => i(),
28665
- enabled: window.profit_ranking_status !== 1,
28666
- ...e
28667
- });
28668
- }, vl = ({
28657
+ }, Cl = ({
28669
28658
  options: e = {
28670
28659
  login: {},
28671
28660
  logout: {},
28672
- toggleFavoriteGame: {},
28673
- rankingGame: {}
28661
+ toggleFavoriteGame: {}
28674
28662
  }
28675
28663
  } = {}) => {
28676
28664
  const i = Xt({ options: e.login }), m = $t({ options: e.logout }), n = el({
28677
28665
  options: e.toggleFavoriteGame
28678
- }), r = al({
28679
- options: e.rankingGame
28680
28666
  });
28681
- return { login: i, logout: m, toggleFavoriteGame: n, rankingGame: r };
28667
+ return { login: i, logout: m, toggleFavoriteGame: n };
28682
28668
  }, ti = (e) => {
28683
28669
  switch (e) {
28684
28670
  case "tw":
@@ -28698,11 +28684,11 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28698
28684
  default:
28699
28685
  return "En";
28700
28686
  }
28701
- }, il = "https://d1h3qe8voog6w4.cloudfront.net", li = "https://d3jx2uvukujuvn.cloudfront.net", ni = "game-icon-ds88", hl = ({ gameData: e = {} } = {}) => {
28702
- const { lng: i } = te(), m = ti(i), {
28687
+ }, al = "https://d1h3qe8voog6w4.cloudfront.net", li = "https://d3jx2uvukujuvn.cloudfront.net", ni = "game-icon-ds88", vl = ({ gameData: e = {} } = {}) => {
28688
+ const { lng: i } = ie(), m = ti(i), {
28703
28689
  gameCode: n,
28704
28690
  // 遊戲代碼
28705
- gameUid: r,
28691
+ gameUid: s,
28706
28692
  // 遊戲唯一標識符
28707
28693
  gameTypeUid: u,
28708
28694
  // 遊戲類型唯一標識符
@@ -28715,7 +28701,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28715
28701
  // 進入大廳模式
28716
28702
  game_platform: g,
28717
28703
  // 遊戲平台
28718
- game_subtype: o,
28704
+ game_subtype: r,
28719
28705
  // 遊戲子類型
28720
28706
  game_type: t,
28721
28707
  // 遊戲類型
@@ -28723,7 +28709,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28723
28709
  // 遊戲標籤
28724
28710
  isUnderMaintenance: l,
28725
28711
  // 是否維護中
28726
- support_vertical: s,
28712
+ support_vertical: o,
28727
28713
  // 是否支援直向
28728
28714
  support_horizontal: y,
28729
28715
  // 是否支援橫向
@@ -28740,17 +28726,17 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28740
28726
  } = e, v = e?.[`gameName${ti(m)}`], D = `${li}/${ni}/en/${g}/${Ra(n, / /g, "_")}.webp`, L = `${li}/${ni}/en/${g}/${Ra(n, / /g, "_")}.gif`;
28741
28727
  return {
28742
28728
  gameCode: n,
28743
- gameUid: r,
28729
+ gameUid: s,
28744
28730
  gameTypeUid: u,
28745
28731
  providerUid: f,
28746
28732
  supportCurrency: _,
28747
28733
  enterLobbyMode: p,
28748
28734
  gamePlatform: g,
28749
- gameSubType: o,
28735
+ gameSubType: r,
28750
28736
  gameType: t,
28751
28737
  gameTags: d,
28752
28738
  isUnderMaintenance: l,
28753
- supportVertical: s,
28739
+ supportVertical: o,
28754
28740
  supportHorizontal: y,
28755
28741
  userClickCount: b,
28756
28742
  gameNameEn: c,
@@ -28761,7 +28747,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28761
28747
  gameImageUrl: D,
28762
28748
  gameImageUrlAnimated: L
28763
28749
  };
28764
- }, tl = "ds88platformIcon", ll = (e, i = !1) => mt([
28750
+ }, il = "ds88platformIcon", tl = (e, i = !1) => mt([
28765
28751
  "EVO",
28766
28752
  "IMSPRIBE",
28767
28753
  "SABA",
@@ -28772,13 +28758,13 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28772
28758
  "HACK",
28773
28759
  "NAGA",
28774
28760
  "RSG"
28775
- ], e) && i ? `${e}_dark` : e, kl = ({ platformData: e, darkMode: i } = {}) => {
28761
+ ], e) && i ? `${e}_dark` : e, hl = ({ platformData: e, darkMode: i } = {}) => {
28776
28762
  const {
28777
28763
  SubPlatformEnum: m,
28778
28764
  // 子平台枚舉
28779
28765
  platformEnum: n,
28780
28766
  // 平台枚舉
28781
- isUnderMaintenance: r,
28767
+ isUnderMaintenance: s,
28782
28768
  // 是否維護中
28783
28769
  maintenanceStartTime: u,
28784
28770
  // 維護開始時間
@@ -28790,36 +28776,36 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
28790
28776
  // 平台唯一標識符
28791
28777
  platformMode: g,
28792
28778
  // 平台模式
28793
- temp_maintenance_start_time: o,
28779
+ temp_maintenance_start_time: r,
28794
28780
  // 臨時維護開始時間
28795
28781
  temp_maintenance_end_time: t
28796
28782
  // 臨時維護結束時間
28797
- } = e || {}, d = `${il}/${tl}/${ll(n, i)}.png`;
28783
+ } = e || {}, d = `${al}/${il}/${tl(n, i)}.png`;
28798
28784
  return {
28799
28785
  subPlatformEnum: m,
28800
28786
  platformEnum: n,
28801
- isUnderMaintenance: r,
28787
+ isUnderMaintenance: s,
28802
28788
  maintenanceStartTime: u,
28803
28789
  maintenanceEndTime: f,
28804
28790
  platform: _,
28805
28791
  platformUid: p,
28806
28792
  platformMode: g,
28807
- tempMaintenanceStartTime: o,
28793
+ tempMaintenanceStartTime: r,
28808
28794
  tempMaintenanceEndTime: t,
28809
28795
  platformImageUrl: d
28810
28796
  };
28811
28797
  };
28812
28798
  export {
28813
28799
  si as ApiCtx,
28814
- cl as ApiProvider,
28800
+ dl as ApiProvider,
28815
28801
  ui as GamesInfoCtx,
28816
28802
  Ct as buildMultiTypes,
28817
- gl as buildMultiTypesWithSubTypes,
28803
+ pl as buildMultiTypesWithSubTypes,
28818
28804
  _t as buildSinglePlatformWithSubTypes,
28819
28805
  ct as buildSingleType,
28820
28806
  Tt as categorizeGames,
28821
28807
  ra as convertLanguageCode,
28822
- pl as createLogoutHandler,
28808
+ ul as createLogoutHandler,
28823
28809
  yt as extractGameSubTypeNames,
28824
28810
  Ut as extractGameTypeNames,
28825
28811
  Ha as extractPlatformNames,
@@ -28834,22 +28820,21 @@ export {
28834
28820
  dt as groupGamesBySubType,
28835
28821
  Dt as initMockWindowData,
28836
28822
  kt as processGameInfo,
28837
- dl as processPlatformData,
28838
- te as useApiContext,
28839
- _l as useBalanceGetter,
28840
- yl as useClientWebSocket,
28841
- hl as useGameConfig,
28842
- ul as useGameInfoContext,
28823
+ gl as processPlatformData,
28824
+ ie as useApiContext,
28825
+ cl as useBalanceGetter,
28826
+ Ul as useClientWebSocket,
28827
+ vl as useGameConfig,
28828
+ sl as useGameInfoContext,
28843
28829
  Nt as useGamesInfo,
28844
- bl as useGetCarouseList,
28845
- Tl as useGetMarquee,
28846
- fl as useGetMemberInfo,
28847
- Ul as useInitializeWithToken,
28830
+ yl as useGetCarouseList,
28831
+ bl as useGetMarquee,
28832
+ _l as useGetMemberInfo,
28833
+ fl as useInitializeWithToken,
28848
28834
  Xt as useLogin,
28849
28835
  $t as useLogout,
28850
- kl as usePlatformConfig,
28851
- Cl as usePlayGame,
28852
- al as useRankingGame,
28836
+ hl as usePlatformConfig,
28837
+ Tl as usePlayGame,
28853
28838
  el as useToggleFavoriteGame,
28854
- vl as useUser
28839
+ Cl as useUser
28855
28840
  };