@everymatrix/casino-header-controller-nd 1.83.9 → 1.83.11
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/components/{CasinoHeaderControllerNd-KHl1lTAb.cjs → CasinoHeaderControllerNd-ClL-p2I1.cjs} +1 -1
- package/components/{CasinoHeaderControllerNd-eNCc5jtP.js → CasinoHeaderControllerNd-DIOpuptV.js} +2 -2
- package/components/{CasinoHeaderControllerNd-BrmiywCE.js → CasinoHeaderControllerNd-nGf5Fo6G.js} +2 -2
- package/components/{PlayerAccountBalanceModalNd-BwZJYIER.js → PlayerAccountBalanceModalNd-BoSGIXIA.js} +145 -145
- package/components/{PlayerAccountBalanceModalNd-DIChIdF5.js → PlayerAccountBalanceModalNd-BrvRNp2P.js} +53 -53
- package/components/{PlayerAccountBalanceModalNd-CPMg0fLp.cjs → PlayerAccountBalanceModalNd-_NylOeXH.cjs} +4 -4
- package/es2015/casino-header-controller-nd.cjs +1 -1
- package/es2015/casino-header-controller-nd.js +1 -1
- package/esnext/casino-header-controller-nd.js +1 -1
- package/lazy/{player-account-balance-modal-nd-qM3CtjmE.js → player-account-balance-modal-nd-BkWWbuol.js} +1 -1
- package/lazy/{player-account-balance-modal-nd-D8_H_A_T.js → player-account-balance-modal-nd-DKgMc489.js} +1 -1
- package/lazy/{player-account-balance-modal-nd-BGBgcWIO.cjs → player-account-balance-modal-nd-T8GZ-Ham.cjs} +1 -1
- package/package.json +1 -1
|
@@ -454,15 +454,15 @@ var Ke = { exports: {} };
|
|
|
454
454
|
}).then(function(o) {
|
|
455
455
|
return O = o.body.getReader(), s(o.status, o.statusText, o.headers.get("Content-Type"), new te(o.headers)), new k(function(v, E) {
|
|
456
456
|
var C = function() {
|
|
457
|
-
O.read().then(function(
|
|
458
|
-
if (
|
|
457
|
+
O.read().then(function(D) {
|
|
458
|
+
if (D.done)
|
|
459
459
|
v(void 0);
|
|
460
460
|
else {
|
|
461
|
-
var H = l.decode(
|
|
461
|
+
var H = l.decode(D.value, { stream: !0 });
|
|
462
462
|
f(H), C();
|
|
463
463
|
}
|
|
464
|
-
}).catch(function(
|
|
465
|
-
E(
|
|
464
|
+
}).catch(function(D) {
|
|
465
|
+
E(D);
|
|
466
466
|
});
|
|
467
467
|
};
|
|
468
468
|
C();
|
|
@@ -517,10 +517,10 @@ var Ke = { exports: {} };
|
|
|
517
517
|
function U(n) {
|
|
518
518
|
this.type = n, this.target = void 0;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function M(n, s) {
|
|
521
521
|
U.call(this, n), this.data = s.data, this.lastEventId = s.lastEventId;
|
|
522
522
|
}
|
|
523
|
-
|
|
523
|
+
M.prototype = Object.create(U.prototype);
|
|
524
524
|
function ne(n, s) {
|
|
525
525
|
U.call(this, n), this.status = s.status, this.statusText = s.statusText, this.headers = s.headers;
|
|
526
526
|
}
|
|
@@ -550,7 +550,7 @@ var Ke = { exports: {} };
|
|
|
550
550
|
var Ve = j != null && N != null && "body" in N.prototype;
|
|
551
551
|
function Ue(n, s, f) {
|
|
552
552
|
s = String(s);
|
|
553
|
-
var i = !!f.withCredentials, b = f.lastEventIdQueryParameterName || "lastEventId", g = Le(1e3), S = _e(f.heartbeatTimeout, 45e3), O = "", t = g, r = !1, l = 0, o = f.headers || {}, v = f.Transport, E = Ve && v == null ? void 0 : new X(v != null ? new v() : ze()), C = v != null && typeof v != "string" ? new v() : E == null ? new F() : new ee(),
|
|
553
|
+
var i = !!f.withCredentials, b = f.lastEventIdQueryParameterName || "lastEventId", g = Le(1e3), S = _e(f.heartbeatTimeout, 45e3), O = "", t = g, r = !1, l = 0, o = f.headers || {}, v = f.Transport, E = Ve && v == null ? void 0 : new X(v != null ? new v() : ze()), C = v != null && typeof v != "string" ? new v() : E == null ? new F() : new ee(), D = void 0, H = 0, W = me, ge = "", de = "", ye = "", Fe = "", Z = ue, Pe = 0, Ae = 0, it = function(K, G, ae, oe) {
|
|
554
554
|
if (W === u)
|
|
555
555
|
if (K === 200 && ae != null && Ee.test(ae)) {
|
|
556
556
|
W = re, r = Date.now(), t = g, n.readyState = re;
|
|
@@ -588,13 +588,13 @@ var Ke = { exports: {} };
|
|
|
588
588
|
var ve = $.slice(Pe, Ae - 1), be = $.slice(Ae + (Ae < Y && $.charCodeAt(Ae) === 32 ? 1 : 0), Y);
|
|
589
589
|
ve === "data" ? (ge += `
|
|
590
590
|
`, ge += be) : ve === "id" ? de = be : ve === "event" ? ye = be : ve === "retry" ? (g = _e(be, g), t = g) : ve === "heartbeatTimeout" && (S = _e(be, S), H !== 0 && (p(H), H = m(function() {
|
|
591
|
-
|
|
591
|
+
De();
|
|
592
592
|
}, S)));
|
|
593
593
|
}
|
|
594
594
|
if (Z === ue) {
|
|
595
595
|
if (ge !== "") {
|
|
596
596
|
O = de, ye === "" && (ye = "message");
|
|
597
|
-
var Re = new
|
|
597
|
+
var Re = new M(ye, {
|
|
598
598
|
data: ge.slice(1),
|
|
599
599
|
lastEventId: de
|
|
600
600
|
});
|
|
@@ -611,27 +611,27 @@ var Ke = { exports: {} };
|
|
|
611
611
|
}, qe = function(K) {
|
|
612
612
|
if (W === re || W === u) {
|
|
613
613
|
W = me, H !== 0 && (p(H), H = 0), H = m(function() {
|
|
614
|
-
|
|
614
|
+
De();
|
|
615
615
|
}, t), t = Le(Math.min(g * 16, t * 2)), n.readyState = u;
|
|
616
616
|
var G = new se("error", { error: K });
|
|
617
617
|
n.dispatchEvent(G), Be(n, n.onerror, G), K != null && console.error(K);
|
|
618
618
|
}
|
|
619
619
|
}, Ge = function() {
|
|
620
|
-
W = Ce,
|
|
621
|
-
},
|
|
620
|
+
W = Ce, D != null && (D.abort(), D = void 0), H !== 0 && (p(H), H = 0), n.readyState = Ce;
|
|
621
|
+
}, De = function() {
|
|
622
622
|
if (H = 0, W !== me) {
|
|
623
|
-
if (!r &&
|
|
624
|
-
qe(new Error("No activity within " + S + " milliseconds. " + (W === u ? "No response received." : l + " chars received.") + " Reconnecting.")),
|
|
623
|
+
if (!r && D != null)
|
|
624
|
+
qe(new Error("No activity within " + S + " milliseconds. " + (W === u ? "No response received." : l + " chars received.") + " Reconnecting.")), D != null && (D.abort(), D = void 0);
|
|
625
625
|
else {
|
|
626
626
|
var K = Math.max((r || Date.now()) + S - Date.now(), 1);
|
|
627
627
|
r = !1, H = m(function() {
|
|
628
|
-
|
|
628
|
+
De();
|
|
629
629
|
}, K);
|
|
630
630
|
}
|
|
631
631
|
return;
|
|
632
632
|
}
|
|
633
633
|
r = !1, l = 0, H = m(function() {
|
|
634
|
-
|
|
634
|
+
De();
|
|
635
635
|
}, S), W = u, ge = "", ye = "", de = O, Fe = "", Pe = 0, Ae = 0, Z = ue;
|
|
636
636
|
var G = s;
|
|
637
637
|
if (s.slice(0, 5) !== "data:" && s.slice(0, 5) !== "blob:" && O !== "") {
|
|
@@ -647,24 +647,24 @@ var Ke = { exports: {} };
|
|
|
647
647
|
for (var ve in Y)
|
|
648
648
|
Object.prototype.hasOwnProperty.call(Y, ve) && ($[ve] = Y[ve]);
|
|
649
649
|
try {
|
|
650
|
-
|
|
650
|
+
D = C.open(E, it, rt, qe, G, oe, $);
|
|
651
651
|
} catch (be) {
|
|
652
652
|
throw Ge(), be;
|
|
653
653
|
}
|
|
654
654
|
};
|
|
655
|
-
n.url = s, n.readyState = u, n.withCredentials = i, n.headers = o, n._close = Ge,
|
|
655
|
+
n.url = s, n.readyState = u, n.withCredentials = i, n.headers = o, n._close = Ge, De();
|
|
656
656
|
}
|
|
657
657
|
J.prototype = Object.create(I.prototype), J.prototype.CONNECTING = u, J.prototype.OPEN = re, J.prototype.CLOSED = Ce, J.prototype.close = function() {
|
|
658
658
|
this._close();
|
|
659
659
|
}, J.CONNECTING = u, J.OPEN = re, J.CLOSED = Ce, J.prototype.withCredentials = void 0;
|
|
660
|
-
var
|
|
661
|
-
d != null && (B == null || !("withCredentials" in B.prototype)) && (
|
|
660
|
+
var Me = B;
|
|
661
|
+
d != null && (B == null || !("withCredentials" in B.prototype)) && (Me = J), function(n) {
|
|
662
662
|
{
|
|
663
663
|
var s = n(e);
|
|
664
664
|
s !== void 0 && (c.exports = s);
|
|
665
665
|
}
|
|
666
666
|
}(function(n) {
|
|
667
|
-
n.EventSourcePolyfill = J, n.NativeEventSource = B, n.EventSource =
|
|
667
|
+
n.EventSourcePolyfill = J, n.NativeEventSource = B, n.EventSource = Me;
|
|
668
668
|
});
|
|
669
669
|
})(typeof globalThis > "u" ? typeof window < "u" ? window : typeof self < "u" ? self : ct : globalThis);
|
|
670
670
|
})(Ke, Ke.exports);
|
|
@@ -778,8 +778,8 @@ function $e(c) {
|
|
|
778
778
|
},
|
|
779
779
|
m(L, U) {
|
|
780
780
|
he(L, e, U), A(e, a), A(e, p), A(e, d), A(d, y), A(y, h), A(h, B), A(B, k), A(y, j), A(y, N);
|
|
781
|
-
for (let
|
|
782
|
-
F[
|
|
781
|
+
for (let M = 0; M < F.length; M += 1)
|
|
782
|
+
F[M] && F[M].m(N, null);
|
|
783
783
|
A(y, R), A(y, w), A(w, x), A(x, le), A(w, we), I && I.m(w, null), Q || (ee = [
|
|
784
784
|
ke(
|
|
785
785
|
a,
|
|
@@ -806,13 +806,13 @@ function $e(c) {
|
|
|
806
806
|
/*balances*/
|
|
807
807
|
L[2]
|
|
808
808
|
));
|
|
809
|
-
let
|
|
810
|
-
for (
|
|
811
|
-
const ne = Je(L, te,
|
|
812
|
-
F[
|
|
809
|
+
let M;
|
|
810
|
+
for (M = 0; M < te.length; M += 1) {
|
|
811
|
+
const ne = Je(L, te, M);
|
|
812
|
+
F[M] ? F[M].p(ne, U) : (F[M] = tt(ne), F[M].c(), F[M].m(N, null));
|
|
813
813
|
}
|
|
814
|
-
for (;
|
|
815
|
-
F[
|
|
814
|
+
for (; M < F.length; M += 1)
|
|
815
|
+
F[M].d(1);
|
|
816
816
|
F.length = te.length;
|
|
817
817
|
}
|
|
818
818
|
U[0] & /*$_*/
|
|
@@ -1009,10 +1009,10 @@ function Et(c) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
};
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Mt(c, e, a) {
|
|
1013
1013
|
let m;
|
|
1014
1014
|
ht(c, mt, (t) => a(7, m = t));
|
|
1015
|
-
let { userid: p = "" } = e, { session: d = "" } = e, { endpoint: y = "" } = e, { lang: h = "en" } = e, { mbsource: B } = e, { clientstyling: T = "" } = e, { clientstylingurl: k = "" } = e, { translationurl: j = "" } = e, { gmversion: N = "gm16" } = e, { displaybalanceoption: R = "All" } = e, { totalcalculationmode: w = "totalCashAmount" } = e, { balancelimitsbutton: x = "false" } = e, { hideproducttype: P } = e, { currencylocale: le = "en" } = e, { currencydisplay: we = "symbol" } = e, { maximumfractiondigits: z = "2" } = e, { minimumfractiondigits: X = "0" } = e, { customdisplayformat: ie = "" } = e, Q, ee = !0, te = !1, F = !1, I = !1, L = !1, U = window.navigator.userAgent,
|
|
1015
|
+
let { userid: p = "" } = e, { session: d = "" } = e, { endpoint: y = "" } = e, { lang: h = "en" } = e, { mbsource: B = "" } = e, { clientstyling: T = "" } = e, { clientstylingurl: k = "" } = e, { translationurl: j = "" } = e, { gmversion: N = "gm16" } = e, { displaybalanceoption: R = "All" } = e, { totalcalculationmode: w = "totalCashAmount" } = e, { balancelimitsbutton: x = "false" } = e, { hideproducttype: P = "" } = e, { currencylocale: le = "en" } = e, { currencydisplay: we = "symbol" } = e, { maximumfractiondigits: z = "2" } = e, { minimumfractiondigits: X = "0" } = e, { customdisplayformat: ie = "" } = e, Q, ee = !0, te = !1, F = !1, I = !1, L = !1, U = window.navigator.userAgent, M, ne = "", se = [], me;
|
|
1016
1016
|
const u = {}, re = ["totalCashAmount", "totalRealAmount"], Ce = () => {
|
|
1017
1017
|
fetch(j).then((t) => t.json()).then((t) => Object.keys(t).forEach((r) => Ye(r, t[r]))).catch((t) => console.log(t));
|
|
1018
1018
|
};
|
|
@@ -1071,13 +1071,13 @@ function Dt(c, e, a) {
|
|
|
1071
1071
|
if (l = "", v.toLowerCase() === "currency")
|
|
1072
1072
|
l = ne;
|
|
1073
1073
|
else if (v.toLowerCase() === "amount") {
|
|
1074
|
-
let C = ",",
|
|
1075
|
-
E && (E[0] !== " " && (C = E[0]), E[1] !== " " && (
|
|
1074
|
+
let C = ",", D = ".", H = 2;
|
|
1075
|
+
E && (E[0] !== " " && (C = E[0]), E[1] !== " " && (D = E[1]), E[2] !== " " && !isNaN(Number(E[2])) && (H = Number(E[2])));
|
|
1076
1076
|
let [W, ge] = String(Math.floor(t * 10 ** H) / 10 ** H).split(".");
|
|
1077
1077
|
l += W[0];
|
|
1078
1078
|
for (let de = 1; de < W.length; ++de)
|
|
1079
1079
|
(W.length - de) % 3 === 0 ? l += C + W[de] : l += W[de];
|
|
1080
|
-
ge && (l +=
|
|
1080
|
+
ge && (l += D + ge);
|
|
1081
1081
|
}
|
|
1082
1082
|
l && r.push(l), l = "";
|
|
1083
1083
|
break;
|
|
@@ -1138,8 +1138,8 @@ function Dt(c, e, a) {
|
|
|
1138
1138
|
u.Real.length === 0 ? u.Real.push({ amount: C.amount }) : a(2, u.Real[0].amount += C.amount, u);
|
|
1139
1139
|
break;
|
|
1140
1140
|
}
|
|
1141
|
-
for (const [C,
|
|
1142
|
-
|
|
1141
|
+
for (const [C, D] of Object.entries(u))
|
|
1142
|
+
D.length < 1 && delete u[C];
|
|
1143
1143
|
a(3, ee = !1);
|
|
1144
1144
|
return;
|
|
1145
1145
|
}
|
|
@@ -1156,10 +1156,10 @@ function Dt(c, e, a) {
|
|
|
1156
1156
|
let E = o.items;
|
|
1157
1157
|
R && R !== "All" && (E = o.items.filter((C) => C.productType === R));
|
|
1158
1158
|
for (const C of E) {
|
|
1159
|
-
let
|
|
1159
|
+
let D;
|
|
1160
1160
|
switch (C.type) {
|
|
1161
1161
|
case "Bonus":
|
|
1162
|
-
|
|
1162
|
+
D = u.Bonus.findIndex((H) => H.productType === C.productType), D > 0 ? a(2, u.Bonus[D].amount += C.amount, u) : u.Bonus.push({
|
|
1163
1163
|
amount: C.amount,
|
|
1164
1164
|
productType: C.productType
|
|
1165
1165
|
});
|
|
@@ -1168,7 +1168,7 @@ function Dt(c, e, a) {
|
|
|
1168
1168
|
C.creditLine && u.Credit.push({
|
|
1169
1169
|
amount: C.creditLine,
|
|
1170
1170
|
productType: C.productType
|
|
1171
|
-
}),
|
|
1171
|
+
}), D = u.Real.findIndex((H) => H.productType === C.productType), D > 0 ? a(2, u.Real[D].amount += C.amount, u) : u.Real.push({
|
|
1172
1172
|
amount: C.amount,
|
|
1173
1173
|
productType: C.productType
|
|
1174
1174
|
});
|
|
@@ -1176,14 +1176,14 @@ function Dt(c, e, a) {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
1178
|
Le();
|
|
1179
|
-
for (const [C,
|
|
1180
|
-
|
|
1181
|
-
a(3, ee = !1);
|
|
1179
|
+
for (const [C, D] of Object.entries(u))
|
|
1180
|
+
D.length < 1 && delete u[C];
|
|
1181
|
+
window.postMessage({ type: "playerBalanceInfo", balance: o }, window.location.href), a(3, ee = !1);
|
|
1182
1182
|
}).catch((o) => {
|
|
1183
1183
|
throw a(3, ee = !1), console.log("Balance fetch error", o), new Error("Failed to fetch balance data!");
|
|
1184
1184
|
});
|
|
1185
1185
|
}, Ee = () => {
|
|
1186
|
-
if (
|
|
1186
|
+
if (M && M.close(), d.length < 1)
|
|
1187
1187
|
return;
|
|
1188
1188
|
let t, r;
|
|
1189
1189
|
switch (N) {
|
|
@@ -1198,7 +1198,7 @@ function Dt(c, e, a) {
|
|
|
1198
1198
|
accept: "text/event-stream",
|
|
1199
1199
|
"X-SessionId": d
|
|
1200
1200
|
}, o = new At.EventSourcePolyfill(t, { headers: l });
|
|
1201
|
-
|
|
1201
|
+
M = o, o.addEventListener("message", r);
|
|
1202
1202
|
}, Ne = (t) => {
|
|
1203
1203
|
let r;
|
|
1204
1204
|
try {
|
|
@@ -1292,11 +1292,11 @@ function Dt(c, e, a) {
|
|
|
1292
1292
|
default:
|
|
1293
1293
|
throw Error(`Invalid apiversion attribute: ${N}`);
|
|
1294
1294
|
}
|
|
1295
|
-
},
|
|
1295
|
+
}, Me = (t) => {
|
|
1296
1296
|
const { data: { type: r } = {} } = t || {};
|
|
1297
1297
|
switch (r) {
|
|
1298
1298
|
case "LogoutSuccessfull":
|
|
1299
|
-
|
|
1299
|
+
M.close();
|
|
1300
1300
|
break;
|
|
1301
1301
|
case "CloseBalance":
|
|
1302
1302
|
ce("closebalance");
|
|
@@ -1308,8 +1308,8 @@ function Dt(c, e, a) {
|
|
|
1308
1308
|
const r = P.split(",").map((l) => l.trim());
|
|
1309
1309
|
return !t.productType || r.includes(t.productType) ? "" : m(t.productType);
|
|
1310
1310
|
};
|
|
1311
|
-
gt(() => (window.addEventListener("message",
|
|
1312
|
-
window.removeEventListener("message",
|
|
1311
|
+
gt(() => (window.addEventListener("message", Me, !1), a(6, L = yt(U)), () => {
|
|
1312
|
+
window.removeEventListener("message", Me), M && M.close();
|
|
1313
1313
|
}));
|
|
1314
1314
|
const f = () => ce("balance"), i = () => ce("closebalance"), b = () => J("deposit"), g = () => J("limits"), S = () => ce("closebalance");
|
|
1315
1315
|
function O(t) {
|
|
@@ -1366,12 +1366,12 @@ function Dt(c, e, a) {
|
|
|
1366
1366
|
O
|
|
1367
1367
|
];
|
|
1368
1368
|
}
|
|
1369
|
-
class
|
|
1369
|
+
class Dt extends ut {
|
|
1370
1370
|
constructor(e) {
|
|
1371
1371
|
super(), dt(
|
|
1372
1372
|
this,
|
|
1373
1373
|
e,
|
|
1374
|
-
|
|
1374
|
+
Mt,
|
|
1375
1375
|
Et,
|
|
1376
1376
|
ft,
|
|
1377
1377
|
{
|
|
@@ -1507,7 +1507,7 @@ class Mt extends ut {
|
|
|
1507
1507
|
this.$$set({ customdisplayformat: e }), q();
|
|
1508
1508
|
}
|
|
1509
1509
|
}
|
|
1510
|
-
Ct(
|
|
1510
|
+
Ct(Dt, { userid: {}, session: {}, endpoint: {}, lang: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, balancelimitsbutton: {}, hideproducttype: {}, currencylocale: {}, currencydisplay: {}, maximumfractiondigits: {}, minimumfractiondigits: {}, customdisplayformat: {} }, [], [], !0);
|
|
1511
1511
|
export {
|
|
1512
|
-
|
|
1512
|
+
Dt as default
|
|
1513
1513
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var tt=Object.defineProperty,nt=Object.defineProperties;var at=Object.getOwnPropertyDescriptors;var je=Object.getOwnPropertySymbols;var ot=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var Ne=Math.pow,He=(
|
|
1
|
+
"use strict";var tt=Object.defineProperty,nt=Object.defineProperties;var at=Object.getOwnPropertyDescriptors;var je=Object.getOwnPropertySymbols;var ot=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var Ne=Math.pow,He=(i,t,n)=>t in i?tt(i,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[t]=n,ze=(i,t)=>{for(var n in t||(t={}))ot.call(t,n)&&He(i,n,t[n]);if(je)for(var n of je(t))rt.call(t,n)&&He(i,n,t[n]);return i},Ve=(i,t)=>nt(i,at(t));var Ue=(i,t,n)=>new Promise((g,p)=>{var u=w=>{try{h(n.next(w))}catch(T){p(T)}},b=w=>{try{h(n.throw(w))}catch(T){p(T)}},h=w=>w.done?g(w.value):Promise.resolve(w.value).then(u,b);h((n=n.apply(i,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenuNd-XIy2IhVU.cjs");function Pe(i,t){e.addMessages(i,t)}function it(i){e.$locale.set(i)}const Ge={en:{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",LimitsButton:"Limits",DepositButton:"Deposit",Loading:"Loading ..."},"zh-hk":{Title:"您的結餘",Total:"總結餘",Real:"現金結餘",Bonus:"紅利結餘",Credit:"信用結餘",Casino:"賭場",Sports:"體育",LimitsButton:"Limits",DepositButton:"存款",Loading:"載入中 ..."},de:{Title:"Ihr Guthaben",Total:"Gesamtguthaben",Real:"Barguthaben",Bonus:"Bonusguthaben",Credit:"Kreditguthaben",Casino:"Casino",Sports:"Sport",LimitsButton:"Limits",DepositButton:"Einzahlen",Loading:"Wird geladen ..."},it:{Title:"Il tuo saldo",Total:"Saldo totale",Real:"Saldo in contanti",Bonus:"Saldo bonus",Credit:"Saldo di credito",Casino:"Casinò",Sports:"Sport",LimitsButton:"Limits",DepositButton:"Deposita",Loading:"Caricamento ..."},fr:{Title:"Votre solde",Total:"Solde total",Real:"Solde en espèces",Bonus:"Solde bonus",Credit:"Solde de crédit",Casino:"Casino",Sports:"Sports",LimitsButton:"Limits",DepositButton:"Dépôt",Loading:"Chargement ..."},es:{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",LimitsButton:"Limits",DepositButton:"Depósito",Loading:"Cargando ..."},tr:{Title:"Bakiyeniz",Total:"Toplam Bakiye",Real:"Nakit Bakiye",Bonus:"Bonus Bakiyesi",Credit:"Kredi Bakiyesi",Casino:"Kumarhane",Sports:"Spor",LimitsButton:"Limits",DepositButton:"Yatır",Loading:"Yükleniyor ..."},ru:{Title:"Ваш баланс",Total:"Общий баланс",Real:"Денежный баланс",Bonus:"Бонусный баланс",Credit:"Кредитный баланс",Casino:"Казино",Sports:"Спорт",LimitsButton:"Limits",DepositButton:"Депозит",Loading:"Загружается ..."},ro:{Title:"Soldul tău",Total:"Sold total",Real:"Sold în numerar",Bonus:"Sold bonus",Credit:"Sold credit",Casino:"Cazinou",Sports:"Sporturi",LimitsButton:"Limits",DepositButton:"Depozit",Loading:"Se încarcă ..."},hr:{Title:"Vaš saldo",Total:"Ukupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Casino",Sports:"Sportovi",LimitsButton:"Limits",DepositButton:"Depozit",Loading:"Učitavanje ..."},hu:{Title:"Az egyenleged",Total:"Teljes egyenleg",Real:"Készpénz egyenleg",Bonus:"Bónusz egyenleg",Credit:"Hitel egyenleg",Casino:"Kaszinó",Sports:"Sport",LimitsButton:"Limits",DepositButton:"Befizetés",Loading:"Betöltés ..."},pl:{Title:"Twoje saldo",Total:"Całkowite saldo",Real:"Saldo gotówkowe",Bonus:"Saldo bonusowe",Credit:"Saldo kredytowe",Casino:"Kasyno",Sports:"Sport",LimitsButton:"Limits",DepositButton:"Wpłać",Loading:"Ładowanie ..."},pt:{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",LimitsButton:"Limits",DepositButton:"Depositar",Loading:"Carregando ..."},sl:{Title:"Vaš saldo",Total:"Skupni saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Šport",LimitsButton:"Limits",DepositButton:"Depozit",Loading:"Nalaganje ..."},sr:{Title:"Vaš saldo",Total:"Ukupan saldo",Real:"Gotovinski saldo",Bonus:"Bonus saldo",Credit:"Kreditni saldo",Casino:"Kasino",Sports:"Sport",LimitsButton:"Limits",DepositButton:"Depozit",Loading:"Učitavanje ..."},"pt-br":{Title:"Seu Saldo",Total:"Saldo Total",Real:"Saldo em Dinheiro",Bonus:"Saldo de Bônus",Credit:"Saldo de Crédito",Casino:"Cassino",Sports:"Esportes",LimitsButton:"Limits",DepositButton:"Depositar",Loading:"Carregando ..."},"es-mx":{Title:"Tu saldo",Total:"Saldo total",Real:"Saldo en efectivo",Bonus:"Saldo de bono",Credit:"Saldo de crédito",Casino:"Casino",Sports:"Deportes",LimitsButton:"Limits",DepositButton:"Depósito",Loading:"Cargando ..."},"en-us":{Title:"Your Balance",Total:"Total Balance",Real:"Cash Balance",Bonus:"Bonus Balance",Credit:"Credit Balance",Casino:"Casino",Sports:"Sports",LimitsButton:"Limits",DepositButton:"Deposit",Loading:"Loading ..."}};var Fe={exports:{}};/** @license
|
|
2
2
|
* eventsource.js
|
|
3
3
|
* Available under MIT License (MIT)
|
|
4
4
|
* https://github.com/Yaffle/EventSource/
|
|
5
|
-
*/(function(
|
|
6
|
-
`),l=0;l<m.length;l+=1){var S=m[l],y=S.split(": "),_=y.shift(),k=y.join(": ");c[ne(_)]=k}this._map=c}K.prototype.get=function(o){return this._map[ne(o)]},u!=null&&u.HEADERS_RECEIVED==null&&(u.HEADERS_RECEIVED=2);function Z(){}Z.prototype.open=function(o,c,m,l,S,y,_){o.open("GET",S);var k=0;o.onprogress=function(){var s=o.responseText,d=s.slice(k);k+=d.length,m(d)},o.onerror=function(s){s.preventDefault(),l(new Error("NetworkError"))},o.onload=function(){l(null)},o.onabort=function(){l(null)},o.onreadystatechange=function(){if(o.readyState===u.HEADERS_RECEIVED){var s=o.status,d=o.statusText,
|
|
7
|
-
`,de+=pe):fe==="id"?se=pe:fe==="event"?ue=pe:fe==="retry"?(y=ye(pe,y),a=y):fe==="heartbeatTimeout"&&(_=ye(pe,_),j!==0&&(p(j),j=g(function(){Ce()},_)))}if(Y===le){if(de!==""){k=se,ue===""&&(ue="message");var we=new E(ue,{data:de.slice(1),lastEventId:se});if(o.dispatchEvent(we),ue==="open"?me(o,o.onopen,we):ue==="message"?me(o,o.onmessage,we):ue==="error"&&me(o,o.onerror,we),X===ge)return}de="",ue=""}Y=te===13?ie:le}else Y===le&&(ke=q,Y=Be),Y===Be?te===58&&(ve=q+1,Y=_e):Y===_e&&(Y=xe)}}},Ie=function(G){if(X===ae||X===f){X=ce,j!==0&&(p(j),j=0),j=g(function(){Ce()},a),a=be(Math.min(y*16,a*2)),o.readyState=f;var U=new oe("error",{error:G});o.dispatchEvent(U),me(o,o.onerror,U),G!=null&&console.error(G)}},Oe=function(){X=ge,M!=null&&(M.abort(),M=void 0),j!==0&&(p(j),j=0),o.readyState=ge},Ce=function(){if(j=0,X!==ce){if(!s&&M!=null)Ie(new Error("No activity within "+_+" milliseconds. "+(X===f?"No response received.":d+" chars received.")+" Reconnecting.")),M!=null&&(M.abort(),M=void 0);else{var G=Math.max((s||Date.now())+_-Date.now(),1);s=!1,j=g(function(){Ce()},G)}return}s=!1,d=0,j=g(function(){Ce()},_),X=f,de="",ue="",se=k,Le="",ke=0,ve=0,Y=le;var U=c;if(c.slice(0,5)!=="data:"&&c.slice(0,5)!=="blob:"&&k!==""){var ee=c.indexOf("?");U=ee===-1?c:c.slice(0,ee+1)+c.slice(ee+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(pe,we){return we===S?"":pe}),U+=(c.indexOf("?")===-1?"?":"&")+S+"="+encodeURIComponent(k)}var te=o.withCredentials,Q={};Q.Accept="text/event-stream";var q=o.headers;if(q!=null)for(var fe in q)Object.prototype.hasOwnProperty.call(q,fe)&&(Q[fe]=q[fe]);try{M=v.open(A,$e,et,Ie,U,te,Q)}catch(pe){throw Oe(),pe}};o.url=c,o.readyState=f,o.withCredentials=l,o.headers=i,o._close=Oe,Ce()}W.prototype=Object.create(F.prototype),W.prototype.CONNECTING=f,W.prototype.OPEN=ae,W.prototype.CLOSED=ge,W.prototype.close=function(){this._close()},W.CONNECTING=f,W.OPEN=ae,W.CLOSED=ge,W.prototype.withCredentials=void 0;var Se=w;u!=null&&(w==null||!("withCredentials"in w.prototype))&&(Se=W),function(o){{var c=o(t);c!==void 0&&(r.exports=c)}}(function(o){o.EventSourcePolyfill=W,o.NativeEventSource=w,o.EventSource=Se})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Fe,Fe.exports);var lt=Fe.exports;function st(r){e.append_styles(r,"svelte-15fwckg",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}@keyframes growWidthPercent{from{height:0}to{height:100%}}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px;fill:black}.ShowBalance .BalanceValue span{padding-left:5px}.ShowBalance .BalanceValue .TriangleActive,.ShowBalance .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance .BalanceValue .TriangleActive:hover,.ShowBalance .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.ShowBalance .BalanceValue .TriangleActive svg,.ShowBalance .BalanceValue .TriangleInactive svg{margin:2px 0px}.ShowBalance .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open{opacity:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit;opacity:0}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose:hover{transform:scale(1.1)}.BalanceModalClose.Open{opacity:1}.BalanceModal{transition:all 0.2s ease-in;width:270px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px;gap:5px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary);font-size:14px}.BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open{opacity:1}')}function Xe(r,t,n){const g=r.slice();return g[58]=t[n],g}function qe(r,t,n){const g=r.slice();return g[61]=t[n],g}function ct(r){let t,n,g=(r[2].Total?r[9](r[2].Total[0].amount):"0")+"",p,u,b,h,w,T,D,I,O,x,C=r[5]&&Ke(r);return{c(){t=e.element("button"),n=e.element("p"),p=e.text(g),u=e.space(),b=e.element("span"),h=e.svg_element("svg"),w=e.svg_element("path"),D=e.space(),C&&C.c(),I=e.empty(),e.attr(w,"id","arrow"),e.attr(w,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),e.attr(w,"transform","translate(-274.511 -441.088)"),e.attr(w,"fill","#d1d1d1"),e.attr(h,"xmlns","http://www.w3.org/2000/svg"),e.attr(h,"width","14"),e.attr(h,"height","6.835"),e.attr(h,"viewBox","0 0 14 6.835"),e.attr(b,"class",T=r[4]?"TriangleActive":"TriangleInactive"),e.attr(t,"class","BalanceValue")},m(R,V){e.insert(R,t,V),e.append(t,n),e.append(n,p),e.append(t,u),e.append(t,b),e.append(b,h),e.append(h,w),e.insert(R,D,V),C&&C.m(R,V),e.insert(R,I,V),O||(x=e.listen(t,"click",r[29]),O=!0)},p(R,V){V[0]&4&&g!==(g=(R[2].Total?R[9](R[2].Total[0].amount):"0")+"")&&e.set_data(p,g),V[0]&16&&T!==(T=R[4]?"TriangleActive":"TriangleInactive")&&e.attr(b,"class",T),R[5]?C?C.p(R,V):(C=Ke(R),C.c(),C.m(I.parentNode,I)):C&&(C.d(1),C=null)},d(R){R&&(e.detach(t),e.detach(D),e.detach(I)),C&&C.d(R),O=!1,x()}}}function dt(r){let t,n=r[7]("Loading")+"",g;return{c(){t=e.element("p"),g=e.text(n),e.attr(t,"class","Loading")},m(p,u){e.insert(p,t,u),e.append(t,g)},p(p,u){u[0]&128&&n!==(n=p[7]("Loading")+"")&&e.set_data(g,n)},d(p){p&&e.detach(t)}}}function Ke(r){let t,n,g,p,u,b,h,w,T=r[7]("Title")+"",D,I,O,x,C,R,V=r[7]("DepositButton")+"",re,he,H,P,ne,K,Z,J=e.ensure_array_like(Object.keys(r[2])),N=[];for(let L=0;L<J.length;L+=1)N[L]=Ye(Xe(r,J,L));let F=r[0]==="true"&&Qe(r);return{c(){t=e.element("div"),n=e.element("button"),p=e.space(),u=e.element("div"),b=e.element("div"),h=e.element("div"),w=e.element("p"),D=e.text(T),I=e.space(),O=e.element("div");for(let L=0;L<N.length;L+=1)N[L].c();x=e.space(),C=e.element("div"),R=e.element("button"),re=e.text(V),he=e.space(),F&&F.c(),e.attr(n,"class",g="BalanceModalClose "+(r[4]?"Open":"")),e.attr(w,"class","BalanceModalTitle"),e.attr(h,"class","BalanceModalHeader"),e.attr(O,"class","BalanceModalBody"),e.attr(R,"class","BalanceModalAction DepositButton"),e.attr(C,"class","BalanceModalFooter"),e.attr(b,"class",H="ModalContent "+(r[4]?"Open":"")),e.attr(u,"class",P="BalanceModal "+(r[4]?"Open":"")),e.attr(t,"class",ne="BalanceModalWrapper "+(r[4]?"Open":""))},m(L,z){e.insert(L,t,z),e.append(t,n),e.append(t,p),e.append(t,u),e.append(u,b),e.append(b,h),e.append(h,w),e.append(w,D),e.append(b,I),e.append(b,O);for(let E=0;E<N.length;E+=1)N[E]&&N[E].m(O,null);e.append(b,x),e.append(b,C),e.append(C,R),e.append(R,re),e.append(C,he),F&&F.m(C,null),K||(Z=[e.listen(n,"click",r[30]),e.listen(R,"click",r[31])],K=!0)},p(L,z){if(z[0]&16&&g!==(g="BalanceModalClose "+(L[4]?"Open":""))&&e.attr(n,"class",g),z[0]&128&&T!==(T=L[7]("Title")+"")&&e.set_data(D,T),z[0]&2692){J=e.ensure_array_like(Object.keys(L[2]));let E;for(E=0;E<J.length;E+=1){const $=Xe(L,J,E);N[E]?N[E].p($,z):(N[E]=Ye($),N[E].c(),N[E].m(O,null))}for(;E<N.length;E+=1)N[E].d(1);N.length=J.length}z[0]&128&&V!==(V=L[7]("DepositButton")+"")&&e.set_data(re,V),L[0]==="true"?F?F.p(L,z):(F=Qe(L),F.c(),F.m(C,null)):F&&(F.d(1),F=null),z[0]&16&&H!==(H="ModalContent "+(L[4]?"Open":""))&&e.attr(b,"class",H),z[0]&16&&P!==(P="BalanceModal "+(L[4]?"Open":""))&&e.attr(u,"class",P),z[0]&16&&ne!==(ne="BalanceModalWrapper "+(L[4]?"Open":""))&&e.attr(t,"class",ne)},d(L){L&&e.detach(t),e.destroy_each(N,L),F&&F.d(),K=!1,e.run_all(Z)}}}function We(r){let t,n,g=r[7](r[58])+"",p,u,b=r[11](r[61])+"",h,w,T,D,I=r[9](r[61].amount)+"",O;return{c(){t=e.element("div"),n=e.element("p"),p=e.text(g),u=e.space(),h=e.text(b),w=e.space(),T=e.element("p"),D=e.element("span"),O=e.text(I),e.attr(n,"class","BalanceModalText"),e.attr(D,"class","BalanceModalAmount"),e.attr(T,"class","BalanceModalValue"),e.attr(t,"class","BalanceModalRowLine")},m(x,C){e.insert(x,t,C),e.append(t,n),e.append(n,p),e.append(n,u),e.append(n,h),e.append(t,w),e.append(t,T),e.append(T,D),e.append(D,O)},p(x,C){C[0]&132&&g!==(g=x[7](x[58])+"")&&e.set_data(p,g),C[0]&4&&b!==(b=x[11](x[61])+"")&&e.set_data(h,b),C[0]&4&&I!==(I=x[9](x[61].amount)+"")&&e.set_data(O,I)},d(x){x&&e.detach(t)}}}function Ye(r){let t,n,g=e.ensure_array_like(r[2][r[58]]),p=[];for(let u=0;u<g.length;u+=1)p[u]=We(qe(r,g,u));return{c(){t=e.element("div");for(let u=0;u<p.length;u+=1)p[u].c();n=e.space(),e.attr(t,"class","BalanceModalRowBoth")},m(u,b){e.insert(u,t,b);for(let h=0;h<p.length;h+=1)p[h]&&p[h].m(t,null);e.append(t,n)},p(u,b){if(b[0]&2692){g=e.ensure_array_like(u[2][u[58]]);let h;for(h=0;h<g.length;h+=1){const w=qe(u,g,h);p[h]?p[h].p(w,b):(p[h]=We(w),p[h].c(),p[h].m(t,n))}for(;h<p.length;h+=1)p[h].d(1);p.length=g.length}},d(u){u&&e.detach(t),e.destroy_each(p,u)}}}function Qe(r){let t,n=r[7]("LimitsButton")+"",g,p,u;return{c(){t=e.element("button"),g=e.text(n),e.attr(t,"class","BalanceModalAction LimitsButton")},m(b,h){e.insert(b,t,h),e.append(t,g),p||(u=e.listen(t,"click",r[32]),p=!0)},p(b,h){h[0]&128&&n!==(n=b[7]("LimitsButton")+"")&&e.set_data(g,n)},d(b){b&&e.detach(t),p=!1,u()}}}function Ze(r){let t,n,g;return{c(){t=e.element("button"),e.attr(t,"class","ShowBalanceModalOverlay")},m(p,u){e.insert(p,t,u),n||(g=e.listen(t,"click",r[33]),n=!0)},p:e.noop,d(p){p&&e.detach(t),n=!1,g()}}}function ut(r){let t,n,g,p;function u(T,D){return T[3]?dt:ct}let b=u(r),h=b(r),w=r[5]&&Ze(r);return{c(){t=e.element("div"),n=e.element("div"),h.c(),p=e.space(),w&&w.c(),e.attr(n,"class",g="ShowBalance "+(r[6]?"Mobile":""))},m(T,D){e.insert(T,t,D),e.append(t,n),h.m(n,null),e.append(t,p),w&&w.m(t,null),r[34](t)},p(T,D){b===(b=u(T))&&h?h.p(T,D):(h.d(1),h=b(T),h&&(h.c(),h.m(n,null))),D[0]&64&&g!==(g="ShowBalance "+(T[6]?"Mobile":""))&&e.attr(n,"class",g),T[5]?w?w.p(T,D):(w=Ze(T),w.c(),w.m(t,null)):w&&(w.d(1),w=null)},i:e.noop,o:e.noop,d(T){T&&e.detach(t),h.d(),w&&w.d(),r[34](null)}}}function ft(r,t,n){let g;e.component_subscribe(r,e.$format,a=>n(7,g=a));let{userid:p=""}=t,{session:u=""}=t,{endpoint:b=""}=t,{lang:h="en"}=t,{mbsource:w}=t,{clientstyling:T=""}=t,{clientstylingurl:D=""}=t,{translationurl:I=""}=t,{gmversion:O="gm16"}=t,{displaybalanceoption:x="All"}=t,{totalcalculationmode:C="totalCashAmount"}=t,{balancelimitsbutton:R="false"}=t,{hideproducttype:V}=t,{currencylocale:re="en"}=t,{currencydisplay:he="symbol"}=t,{maximumfractiondigits:H="2"}=t,{minimumfractiondigits:P="0"}=t,{customdisplayformat:ne=""}=t,K,Z=!0,J=!1,N=!1,F=!1,L=!1,z=window.navigator.userAgent,E,$="",oe=[],ce;const f={},ae=["totalCashAmount","totalRealAmount"],ge=()=>{fetch(I).then(a=>a.json()).then(a=>Object.keys(a).forEach(s=>Pe(s,a[s]))).catch(a=>console.log(a))};Object.keys(Ge).forEach(a=>Pe(a,Ge[a]));const ie=a=>{switch(a){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),n(5,F=!0),setTimeout(()=>n(4,J=!0),150);break;case"closebalance":n(4,J=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{n(5,F=!1)},150);break}},le=a=>{if(ne)return Be(a);const s=re||h,d={style:"currency",currency:$,useGrouping:!0,currencyDisplay:he||"code",maximumFractionDigits:H===""||isNaN(Number(H))?2:Number(H),minimumFractionDigits:P===""||isNaN(Number(P))?0:Number(P)};return new Intl.NumberFormat(s,d).format(a)},Be=a=>{const s=[];let d="";for(const i of ne)switch(i){default:d+=i;break;case"{":d&&s.push(d),d="";break;case"}":const[B,A]=d.split("|");if(d="",B.toLowerCase()==="currency")d=$;else if(B.toLowerCase()==="amount"){let v=",",M=".",j=2;A&&(A[0]!==" "&&(v=A[0]),A[1]!==" "&&(M=A[1]),A[2]!==" "&&!isNaN(Number(A[2]))&&(j=Number(A[2])));let[X,de]=String(Math.floor(a*Ne(10,j))/Ne(10,j)).split(".");d+=X[0];for(let se=1;se<X.length;++se)(X.length-se)%3===0?d+=v+X[se]:d+=X[se];de&&(d+=M+de)}d&&s.push(d),d="";break}return s.push(d),s.join("")},_e=()=>Ue(this,null,function*(){var s,d,i;n(3,Z=!0);const a=new URL(`${b}/v1/player/${p}/account`);try{const B=yield fetch(a,{method:"GET",headers:{"X-SessionID":u}}),A=yield B.json();if(B.ok)window.postMessage({type:"BalancedFetched"},window.location.href),oe=A.items,$=(s=oe.find(v=>v.displayName==="Casino"))==null?void 0:s.currency,n(2,f.Total=[{amount:A.totalAmount[$]}],f),n(2,f.Real=[{amount:(d=oe.find(v=>v.displayName==="Casino"))==null?void 0:d.balanceAmount}],f),n(2,f.Bonus=[{amount:(i=oe.find(v=>v.displayName==="UBS"))==null?void 0:i.balanceAmount}],f);else throw new Error("Failed to fetch balance data !")}catch(B){console.log("Balance error: ",B)}finally{n(3,Z=!1)}}),xe=()=>{n(3,Z=!0);const a=new URL(`${b}/v2/player/${p}/balance`),s=new Headers;s.append("X-SessionID",u),fetch(a,{method:"GET",headers:s}).then(i=>i.json()).then(i=>{i[C]||n(12,C=ae[0]);const B=i.items.find(v=>v.type==="Real"&&v.walletAccountType==="Ordinary");if($=B.currency,N=!!B.productType,n(2,f.Total=[{amount:0}],f),n(2,f.Real=[],f),n(2,f.Bonus=[],f),n(2,f.Credit=[],f),!N){ce={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(2,f.Total[0].amount=i[C][$],f);for(const v of i.items)switch(v.type){case"Bonus":f.Bonus.length===0?f.Bonus.push({amount:v.amount}):n(2,f.Bonus[0].amount+=v.amount,f);break;case"Real":if(v.creditLine&&f.Credit.length===0&&f.Credit.push({amount:v.creditLine}),C==="totalRealAmount")continue;f.Real.length===0?f.Real.push({amount:v.amount}):n(2,f.Real[0].amount+=v.amount,f);break}for(const[v,M]of Object.entries(f))M.length<1&&delete f[v];n(3,Z=!1);return}ce={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let A=i.items;x&&x!=="All"&&(A=i.items.filter(v=>v.productType===x));for(const v of A){let M;switch(v.type){case"Bonus":M=f.Bonus.findIndex(j=>j.productType===v.productType),M>0?n(2,f.Bonus[M].amount+=v.amount,f):f.Bonus.push({amount:v.amount,productType:v.productType});break;case"Real":v.creditLine&&f.Credit.push({amount:v.creditLine,productType:v.productType}),M=f.Real.findIndex(j=>j.productType===v.productType),M>0?n(2,f.Real[M].amount+=v.amount,f):f.Real.push({amount:v.amount,productType:v.productType});break}}be();for(const[v,M]of Object.entries(f))M.length<1&&delete f[v];n(3,Z=!1)}).catch(i=>{throw n(3,Z=!1),console.log("Balance fetch error",i),new Error("Failed to fetch balance data!")})},Te=()=>{if(E&&E.close(),u.length<1)return;let a,s;switch(O){case"gm16":a=new URL(`${b}/v2/player/${p}/information/updates`),s=B=>me(B);break;case"gmcore":a=new URL(`${b}/v1/player/${p}/balance/updates`),s=B=>Re(B);break}const d={accept:"text/event-stream","X-SessionId":u},i=new lt.EventSourcePolyfill(a,{headers:d});E=i,i.addEventListener("message",s)},Ae=a=>{let s;try{s=JSON.parse(a)}catch(d){console.log("Balance stream failed: ",d);return}return s},Re=a=>{var B,A;const s=Ae(a.data);if(!s){Te();return}let d="0";const i=s.balanceChange;oe=oe.map(v=>(i&&i[v.id]&&(v=Ve(ze({},v),{balanceAmount:i[v.id].afterAmount})),d=(parseFloat(v==null?void 0:v.balanceAmount)+parseFloat(d)).toString(),v)),n(2,f.Real=[{amount:(B=oe[0])==null?void 0:B.balanceAmount}],f),n(2,f.Bonus=[{amount:(A=oe[1])==null?void 0:A.balanceAmount}],f),n(2,f.Total=[{amount:Number(d)}],f)},ye=(a,s,d)=>{let i=null;switch(d.walletAccountType){case"Ordinary":(d.afterAmount!==d.affectedAmount||s.lastOrdinaryAfterAmount===0)&&(s.lastOrdinaryAfterAmount=d.afterAmount,s.showCreditLineAfterAmount||(i=d.afterAmount));break;case"CreditLine":d.afterAmount!==0?(i=d.afterAmount,s.showCreditLineAfterAmount=!0):(i=s.lastOrdinaryAfterAmount,s.showCreditLineAfterAmount=!1);break;default:i=d.afterAmount}return i===null?a:i},be=()=>{switch(C){case"totalCashAmount":let a=0;for(const d of["Real","Bonus"])for(const i of f[d])a+=Math.max(i.amount,0);n(2,f.Total[0].amount=a,f);break;case"totalRealAmount":if(!N)return;let s=0;for(const d of f.Real)s+=d.amount;n(2,f.Total[0].amount=s,f)}},me=a=>{const s=Ae(a.data);if(!s){Te();return}if(Ee(s==null?void 0:s.type)||s.type!=="BALANCE_UPDATE_V2")return;const d=s.body.balanceChange;for(const[i,B]of Object.entries(d))if(C==="totalRealAmount"&&i==="Real"&&!N&&n(2,f.Total[0].amount=ye(f.Total[0].amount,ce,B),f),!!f[i])for(const A of f[i]){if(!N){A.amount=i==="Real"?ye(A.amount,ce,B):B.afterAmount;continue}B.productType===A.productType&&(A.amount=i==="Real"?ye(A.amount,ce[A.productType],B):B.afterAmount)}be()},W=a=>{switch(ie("closebalance"),a){case"deposit":window.postMessage({type:"GoToDeposit"},window.location.href);break;case"limits":window.postMessage({type:"GoToLimits"},window.location.href);break}typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Ee=a=>a==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Me=()=>{ae.includes(C)||(console.error(`Unsupported value ('${C}') for totalcalculationmode parameter. Only the following values are supported ${ae}. Using default value ('${ae[0]}').`),n(12,C=ae[0]))},De=()=>{switch(it(h),Me(),O){case"gmcore":_e();break;case"gm16":xe();break;default:throw Error(`Invalid apiversion attribute: ${O}`)}},Se=a=>{const{data:{type:s}={}}=a||{};switch(s){case"LogoutSuccessfull":E.close();break;case"CloseBalance":ie("closebalance");break}},o=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)},c=a=>{const s=V.split(",").map(d=>d.trim());return!a.productType||s.includes(a.productType)?"":g(a.productType)};e.onMount(()=>(window.addEventListener("message",Se,!1),n(6,L=e.isMobile(z)),()=>{window.removeEventListener("message",Se),E&&E.close()}));const m=()=>ie("balance"),l=()=>ie("closebalance"),S=()=>W("deposit"),y=()=>W("limits"),_=()=>ie("closebalance");function k(a){e.binding_callbacks[a?"unshift":"push"](()=>{K=a,n(1,K)})}return r.$$set=a=>{"userid"in a&&n(13,p=a.userid),"session"in a&&n(14,u=a.session),"endpoint"in a&&n(15,b=a.endpoint),"lang"in a&&n(16,h=a.lang),"mbsource"in a&&n(17,w=a.mbsource),"clientstyling"in a&&n(18,T=a.clientstyling),"clientstylingurl"in a&&n(19,D=a.clientstylingurl),"translationurl"in a&&n(20,I=a.translationurl),"gmversion"in a&&n(21,O=a.gmversion),"displaybalanceoption"in a&&n(22,x=a.displaybalanceoption),"totalcalculationmode"in a&&n(12,C=a.totalcalculationmode),"balancelimitsbutton"in a&&n(0,R=a.balancelimitsbutton),"hideproducttype"in a&&n(23,V=a.hideproducttype),"currencylocale"in a&&n(24,re=a.currencylocale),"currencydisplay"in a&&n(25,he=a.currencydisplay),"maximumfractiondigits"in a&&n(26,H=a.maximumfractiondigits),"minimumfractiondigits"in a&&n(27,P=a.minimumfractiondigits),"customdisplayformat"in a&&n(28,ne=a.customdisplayformat)},r.$$.update=()=>{r.$$.dirty[0]&6414336&&b&&p&&u&&h&&O&&x&&De(),r.$$.dirty[0]&2154496&&b&&p&&u&&O&&Te(),r.$$.dirty[0]&1048576&&I&&ge(),r.$$.dirty[0]&4&&f.Total&&o(),r.$$.dirty[0]&262146&&T&&K&&e.setClientStyling(K,T),r.$$.dirty[0]&524290&&D&&K&&e.setClientStylingURL(K,D),r.$$.dirty[0]&131074&&w&&K&&e.setStreamStyling(K,`${w}.Style`)},[R,K,f,Z,J,F,L,g,ie,le,W,c,C,p,u,b,h,w,T,D,I,O,x,V,re,he,H,P,ne,m,l,S,y,_,k]}class Je extends e.SvelteComponent{constructor(t){super(),e.init(this,t,ft,ut,e.safe_not_equal,{userid:13,session:14,endpoint:15,lang:16,mbsource:17,clientstyling:18,clientstylingurl:19,translationurl:20,gmversion:21,displaybalanceoption:22,totalcalculationmode:12,balancelimitsbutton:0,hideproducttype:23,currencylocale:24,currencydisplay:25,maximumfractiondigits:26,minimumfractiondigits:27,customdisplayformat:28},st,[-1,-1,-1])}get userid(){return this.$$.ctx[13]}set userid(t){this.$$set({userid:t}),e.flush()}get session(){return this.$$.ctx[14]}set session(t){this.$$set({session:t}),e.flush()}get endpoint(){return this.$$.ctx[15]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get lang(){return this.$$.ctx[16]}set lang(t){this.$$set({lang:t}),e.flush()}get mbsource(){return this.$$.ctx[17]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[18]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[19]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[20]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get gmversion(){return this.$$.ctx[21]}set gmversion(t){this.$$set({gmversion:t}),e.flush()}get displaybalanceoption(){return this.$$.ctx[22]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),e.flush()}get totalcalculationmode(){return this.$$.ctx[12]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),e.flush()}get balancelimitsbutton(){return this.$$.ctx[0]}set balancelimitsbutton(t){this.$$set({balancelimitsbutton:t}),e.flush()}get hideproducttype(){return this.$$.ctx[23]}set hideproducttype(t){this.$$set({hideproducttype:t}),e.flush()}get currencylocale(){return this.$$.ctx[24]}set currencylocale(t){this.$$set({currencylocale:t}),e.flush()}get currencydisplay(){return this.$$.ctx[25]}set currencydisplay(t){this.$$set({currencydisplay:t}),e.flush()}get maximumfractiondigits(){return this.$$.ctx[26]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),e.flush()}get minimumfractiondigits(){return this.$$.ctx[27]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),e.flush()}get customdisplayformat(){return this.$$.ctx[28]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),e.flush()}}e.create_custom_element(Je,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},balancelimitsbutton:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Je;
|
|
5
|
+
*/(function(i,t){(function(n){var g=n.setTimeout,p=n.clearTimeout,u=n.XMLHttpRequest,b=n.XDomainRequest,h=n.ActiveXObject,w=n.EventSource,T=n.document,D=n.Promise,I=n.fetch,O=n.Response,x=n.TextDecoder,C=n.TextEncoder,R=n.AbortController;if(typeof window!="undefined"&&typeof T!="undefined"&&!("readyState"in T)&&T.body==null&&(T.readyState="loading",window.addEventListener("load",function(o){T.readyState="complete"},!1)),u==null&&h!=null&&(u=function(){return new h("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(o){function c(){}return c.prototype=o,new c}),Date.now||(Date.now=function(){return new Date().getTime()}),R==null){var V=I;I=function(o,c){var m=c.signal;return V(o,{headers:c.headers,credentials:c.credentials,cache:c.cache}).then(function(l){var S=l.body.getReader();return m._reader=S,m._aborted&&m._reader.cancel(),{status:l.status,statusText:l.statusText,headers:l.headers,body:{getReader:function(){return S}}}})},R=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function re(){this.bitsNeeded=0,this.codePoint=0}re.prototype.decode=function(o){function c(s,d,r){if(r===1)return s>=128>>d&&s<<d<=2047;if(r===2)return s>=2048>>d&&s<<d<=55295||s>=57344>>d&&s<<d<=65535;if(r===3)return s>=65536>>d&&s<<d<=1114111;throw new Error}function m(s,d){if(s===6*1)return d>>6>15?3:d>31?2:1;if(s===6*2)return d>15?3:2;if(s===6*3)return 3;throw new Error}for(var l=65533,S="",y=this.bitsNeeded,_=this.codePoint,k=0;k<o.length;k+=1){var a=o[k];y!==0&&(a<128||a>191||!c(_<<6|a&63,y-6,m(y,_)))&&(y=0,_=l,S+=String.fromCharCode(_)),y===0?(a>=0&&a<=127?(y=0,_=a):a>=192&&a<=223?(y=6*1,_=a&31):a>=224&&a<=239?(y=6*2,_=a&15):a>=240&&a<=247?(y=6*3,_=a&7):(y=0,_=l),y!==0&&!c(_,y,m(y,_))&&(y=0,_=l)):(y-=6,_=_<<6|a&63),y===0&&(_<=65535?S+=String.fromCharCode(_):(S+=String.fromCharCode(55296+(_-65535-1>>10)),S+=String.fromCharCode(56320+(_-65535-1&1023))))}return this.bitsNeeded=y,this.codePoint=_,S};var he=function(){try{return new x().decode(new C().encode("test"),{stream:!0})==="test"}catch(o){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+o)}return!1};(x==null||C==null||!he())&&(x=re);var H=function(){};function P(o){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=H,this.onload=H,this.onerror=H,this.onreadystatechange=H,this._contentType="",this._xhr=o,this._sendTimeout=0,this._abort=H}P.prototype.open=function(o,c){this._abort(!0);var m=this,l=this._xhr,S=1,y=0;this._abort=function(r){m._sendTimeout!==0&&(p(m._sendTimeout),m._sendTimeout=0),(S===1||S===2||S===3)&&(S=4,l.onload=H,l.onerror=H,l.onabort=H,l.onprogress=H,l.onreadystatechange=H,l.abort(),y!==0&&(p(y),y=0),r||(m.readyState=4,m.onabort(null),m.onreadystatechange())),S=0};var _=function(){if(S===1){var r=0,B="",A=void 0;if("contentType"in l)r=200,B="OK",A=l.contentType;else try{r=l.status,B=l.statusText,A=l.getResponseHeader("Content-Type")}catch(v){r=0,B="",A=void 0}r!==0&&(S=2,m.readyState=2,m.status=r,m.statusText=B,m._contentType=A,m.onreadystatechange())}},k=function(){if(_(),S===2||S===3){S=3;var r="";try{r=l.responseText}catch(B){}m.readyState=3,m.responseText=r,m.onprogress()}},a=function(r,B){if((B==null||B.preventDefault==null)&&(B={preventDefault:H}),k(),S===1||S===2||S===3){if(S=4,y!==0&&(p(y),y=0),m.readyState=4,r==="load")m.onload(B);else if(r==="error")m.onerror(B);else if(r==="abort")m.onabort(B);else throw new TypeError;m.onreadystatechange()}},s=function(r){l!=null&&(l.readyState===4?(!("onload"in l)||!("onerror"in l)||!("onabort"in l))&&a(l.responseText===""?"error":"load",r):l.readyState===3?"onprogress"in l||k():l.readyState===2&&_())},d=function(){y=g(function(){d()},500),l.readyState===3&&k()};"onload"in l&&(l.onload=function(r){a("load",r)}),"onerror"in l&&(l.onerror=function(r){a("error",r)}),"onabort"in l&&(l.onabort=function(r){a("abort",r)}),"onprogress"in l&&(l.onprogress=k),"onreadystatechange"in l&&(l.onreadystatechange=function(r){s(r)}),("contentType"in l||!("ontimeout"in u.prototype))&&(c+=(c.indexOf("?")===-1?"?":"&")+"padding=true"),l.open(o,c,!0),"readyState"in l&&(y=g(function(){d()},0))},P.prototype.abort=function(){this._abort(!1)},P.prototype.getResponseHeader=function(o){return this._contentType},P.prototype.setRequestHeader=function(o,c){var m=this._xhr;"setRequestHeader"in m&&m.setRequestHeader(o,c)},P.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},P.prototype.send=function(){if((!("ontimeout"in u.prototype)||!("sendAsBinary"in u.prototype)&&!("mozAnon"in u.prototype))&&T!=null&&T.readyState!=null&&T.readyState!=="complete"){var o=this;o._sendTimeout=g(function(){o._sendTimeout=0,o.send()},4);return}var c=this._xhr;"withCredentials"in c&&(c.withCredentials=this.withCredentials);try{c.send(void 0)}catch(m){throw m}};function ne(o){return o.replace(/[A-Z]/g,function(c){return String.fromCharCode(c.charCodeAt(0)+32)})}function K(o){for(var c=Object.create(null),m=o.split(`\r
|
|
6
|
+
`),l=0;l<m.length;l+=1){var S=m[l],y=S.split(": "),_=y.shift(),k=y.join(": ");c[ne(_)]=k}this._map=c}K.prototype.get=function(o){return this._map[ne(o)]},u!=null&&u.HEADERS_RECEIVED==null&&(u.HEADERS_RECEIVED=2);function Z(){}Z.prototype.open=function(o,c,m,l,S,y,_){o.open("GET",S);var k=0;o.onprogress=function(){var s=o.responseText,d=s.slice(k);k+=d.length,m(d)},o.onerror=function(s){s.preventDefault(),l(new Error("NetworkError"))},o.onload=function(){l(null)},o.onabort=function(){l(null)},o.onreadystatechange=function(){if(o.readyState===u.HEADERS_RECEIVED){var s=o.status,d=o.statusText,r=o.getResponseHeader("Content-Type"),B=o.getAllResponseHeaders();c(s,d,r,new K(B))}},o.withCredentials=y;for(var a in _)Object.prototype.hasOwnProperty.call(_,a)&&o.setRequestHeader(a,_[a]);return o.send(),o};function J(o){this._headers=o}J.prototype.get=function(o){return this._headers.get(o)};function N(){}N.prototype.open=function(o,c,m,l,S,y,_){var k=null,a=new R,s=a.signal,d=new x;return I(S,{headers:_,credentials:y?"include":"same-origin",signal:s,cache:"no-store"}).then(function(r){return k=r.body.getReader(),c(r.status,r.statusText,r.headers.get("Content-Type"),new J(r.headers)),new D(function(B,A){var v=function(){k.read().then(function(M){if(M.done)B(void 0);else{var j=d.decode(M.value,{stream:!0});m(j),v()}}).catch(function(M){A(M)})};v()})}).catch(function(r){if(r.name!=="AbortError")return r}).then(function(r){l(r)}),{abort:function(){k!=null&&k.cancel(),a.abort()}}};function F(){this._listeners=Object.create(null)}function L(o){g(function(){throw o},0)}F.prototype.dispatchEvent=function(o){o.target=this;var c=this._listeners[o.type];if(c!=null)for(var m=c.length,l=0;l<m;l+=1){var S=c[l];try{typeof S.handleEvent=="function"?S.handleEvent(o):S.call(this,o)}catch(y){L(y)}}},F.prototype.addEventListener=function(o,c){o=String(o);var m=this._listeners,l=m[o];l==null&&(l=[],m[o]=l);for(var S=!1,y=0;y<l.length;y+=1)l[y]===c&&(S=!0);S||l.push(c)},F.prototype.removeEventListener=function(o,c){o=String(o);var m=this._listeners,l=m[o];if(l!=null){for(var S=[],y=0;y<l.length;y+=1)l[y]!==c&&S.push(l[y]);S.length===0?delete m[o]:m[o]=S}};function z(o){this.type=o,this.target=void 0}function E(o,c){z.call(this,o),this.data=c.data,this.lastEventId=c.lastEventId}E.prototype=Object.create(z.prototype);function $(o,c){z.call(this,o),this.status=c.status,this.statusText=c.statusText,this.headers=c.headers}$.prototype=Object.create(z.prototype);function oe(o,c){z.call(this,o),this.error=c.error}oe.prototype=Object.create(z.prototype);var ce=-1,f=0,ae=1,ge=2,ie=-1,le=0,Be=1,_e=2,xe=3,Te=/^text\/event\-stream(;.*)?$/i,Ae=1e3,Re=18e6,ye=function(o,c){var m=o==null?c:parseInt(o,10);return m!==m&&(m=c),be(m)},be=function(o){return Math.min(Math.max(o,Ae),Re)},me=function(o,c,m){try{typeof c=="function"&&c.call(o,m)}catch(l){L(l)}};function W(o,c){F.call(this),c=c||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,De(this,o,c)}function Ee(){return u!=null&&"withCredentials"in u.prototype||b==null?new u:new b}var Me=I!=null&&O!=null&&"body"in O.prototype;function De(o,c,m){c=String(c);var l=!!m.withCredentials,S=m.lastEventIdQueryParameterName||"lastEventId",y=be(1e3),_=ye(m.heartbeatTimeout,45e3),k="",a=y,s=!1,d=0,r=m.headers||{},B=m.Transport,A=Me&&B==null?void 0:new P(B!=null?new B:Ee()),v=B!=null&&typeof B!="string"?new B:A==null?new N:new Z,M=void 0,j=0,X=ce,de="",se="",ue="",Le="",Y=le,ke=0,ve=0,$e=function(G,U,ee,te){if(X===f)if(G===200&&ee!=null&&Te.test(ee)){X=ae,s=Date.now(),a=y,o.readyState=ae;var Q=new $("open",{status:G,statusText:U,headers:te});o.dispatchEvent(Q),me(o,o.onopen,Q)}else{var q="";G!==200?(U&&(U=U.replace(/\s+/g," ")),q="EventSource's response has a status "+G+" "+U+" that is not 200. Aborting the connection."):q="EventSource's response has a Content-Type specifying an unsupported type: "+(ee==null?"-":ee.replace(/\s+/g," "))+". Aborting the connection.",Oe();var Q=new $("error",{status:G,statusText:U,headers:te});o.dispatchEvent(Q),me(o,o.onerror,Q),console.error(q)}},et=function(G){if(X===ae){for(var U=-1,ee=0;ee<G.length;ee+=1){var te=G.charCodeAt(ee);(te===10||te===13)&&(U=ee)}var Q=(U!==-1?Le:"")+G.slice(0,U+1);Le=(U===-1?Le:"")+G.slice(U+1),G!==""&&(s=Date.now(),d+=G.length);for(var q=0;q<Q.length;q+=1){var te=Q.charCodeAt(q);if(Y===ie&&te===10)Y=le;else if(Y===ie&&(Y=le),te===13||te===10){if(Y!==le){Y===Be&&(ve=q+1);var fe=Q.slice(ke,ve-1),pe=Q.slice(ve+(ve<q&&Q.charCodeAt(ve)===32?1:0),q);fe==="data"?(de+=`
|
|
7
|
+
`,de+=pe):fe==="id"?se=pe:fe==="event"?ue=pe:fe==="retry"?(y=ye(pe,y),a=y):fe==="heartbeatTimeout"&&(_=ye(pe,_),j!==0&&(p(j),j=g(function(){Ce()},_)))}if(Y===le){if(de!==""){k=se,ue===""&&(ue="message");var we=new E(ue,{data:de.slice(1),lastEventId:se});if(o.dispatchEvent(we),ue==="open"?me(o,o.onopen,we):ue==="message"?me(o,o.onmessage,we):ue==="error"&&me(o,o.onerror,we),X===ge)return}de="",ue=""}Y=te===13?ie:le}else Y===le&&(ke=q,Y=Be),Y===Be?te===58&&(ve=q+1,Y=_e):Y===_e&&(Y=xe)}}},Ie=function(G){if(X===ae||X===f){X=ce,j!==0&&(p(j),j=0),j=g(function(){Ce()},a),a=be(Math.min(y*16,a*2)),o.readyState=f;var U=new oe("error",{error:G});o.dispatchEvent(U),me(o,o.onerror,U),G!=null&&console.error(G)}},Oe=function(){X=ge,M!=null&&(M.abort(),M=void 0),j!==0&&(p(j),j=0),o.readyState=ge},Ce=function(){if(j=0,X!==ce){if(!s&&M!=null)Ie(new Error("No activity within "+_+" milliseconds. "+(X===f?"No response received.":d+" chars received.")+" Reconnecting.")),M!=null&&(M.abort(),M=void 0);else{var G=Math.max((s||Date.now())+_-Date.now(),1);s=!1,j=g(function(){Ce()},G)}return}s=!1,d=0,j=g(function(){Ce()},_),X=f,de="",ue="",se=k,Le="",ke=0,ve=0,Y=le;var U=c;if(c.slice(0,5)!=="data:"&&c.slice(0,5)!=="blob:"&&k!==""){var ee=c.indexOf("?");U=ee===-1?c:c.slice(0,ee+1)+c.slice(ee+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(pe,we){return we===S?"":pe}),U+=(c.indexOf("?")===-1?"?":"&")+S+"="+encodeURIComponent(k)}var te=o.withCredentials,Q={};Q.Accept="text/event-stream";var q=o.headers;if(q!=null)for(var fe in q)Object.prototype.hasOwnProperty.call(q,fe)&&(Q[fe]=q[fe]);try{M=v.open(A,$e,et,Ie,U,te,Q)}catch(pe){throw Oe(),pe}};o.url=c,o.readyState=f,o.withCredentials=l,o.headers=r,o._close=Oe,Ce()}W.prototype=Object.create(F.prototype),W.prototype.CONNECTING=f,W.prototype.OPEN=ae,W.prototype.CLOSED=ge,W.prototype.close=function(){this._close()},W.CONNECTING=f,W.OPEN=ae,W.CLOSED=ge,W.prototype.withCredentials=void 0;var Se=w;u!=null&&(w==null||!("withCredentials"in w.prototype))&&(Se=W),function(o){{var c=o(t);c!==void 0&&(i.exports=c)}}(function(o){o.EventSourcePolyfill=W,o.NativeEventSource=w,o.EventSource=Se})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Fe,Fe.exports);var lt=Fe.exports;function st(i){e.append_styles(i,"svelte-15fwckg",'*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}@keyframes growWidthPercent{from{height:0}to{height:100%}}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;background:transparent;border:none;font:inherit;color:inherit;display:flex;flex-wrap:nowrap;white-space:nowrap}.ShowBalance .BalanceValue svg{width:16px;fill:black}.ShowBalance .BalanceValue span{padding-left:5px}.ShowBalance .BalanceValue .TriangleActive,.ShowBalance .BalanceValue .TriangleInactive{display:block;margin:0 3px;transition:all 0.2s}.ShowBalance .BalanceValue .TriangleActive:hover,.ShowBalance .BalanceValue .TriangleInactive:hover{transform:scale(1.2)}.ShowBalance .BalanceValue .TriangleActive svg,.ShowBalance .BalanceValue .TriangleInactive svg{margin:2px 0px}.ShowBalance .BalanceValue .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px)}.ShowBalance .BalanceValue .TriangleActive:hover{transform:scale(1.1) rotateX(180deg) translateY(3px)}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);position:absolute;top:40px;padding:10px;transform:translateX(-45%);box-shadow:0px 30px 30px var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));border-radius:5px;z-index:17;box-shadow:0px 5px 20px 0px #191919;transition:all 0.2s ease-in;opacity:0}.BalanceModalWrapper:before{content:"";background:linear-gradient(90deg, rgb(42, 79, 55) 0%, rgb(0, 61, 92) 100%);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:50%;width:25px;height:10px;z-index:1}.BalanceModalWrapper.Open{opacity:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;transition:all 0.3s ease;background:transparent;border:none;font:inherit;opacity:0}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(45deg)}.BalanceModalClose:after{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, white));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModalClose:hover{transform:scale(1.1)}.BalanceModalClose.Open{opacity:1}.BalanceModal{transition:all 0.2s ease-in;width:270px}.BalanceModalHeader{display:flex;align-items:center;justify-content:center;padding:20px 0}.BalanceModalHeader .BalanceModalTitle{font-size:16px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalRowBoth{display:flex;flex-direction:column;gap:5px;padding:20px 0;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.BalanceModalRowBoth:last-child{border-bottom:none}.BalanceModalRowBoth .BalanceModalRowLine{display:flex;width:100%;justify-content:space-between}.BalanceModalRowBoth .BalanceModalText{color:var(--emw--header-contrast, var(--emw--color-contrast, white));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, white))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px;gap:5px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--color-primary);font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:30px;border:none;padding:10px 0;cursor:pointer;transition:all 0.2s ease-in;box-shadow:0px 3px 7px 0px rgba(0, 0, 0, 0.2)}.BalanceModalFooter .BalanceModalAction:hover{background:rgba(255, 255, 255, 0.1);color:var(--emw--color-primary);box-shadow:0px 0px 0px 2px inset var(--emw--color-primary);font-size:14px}.BalanceModalFooter .BalanceModalAction:active{background:rgba(255, 255, 255, 0.5)}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16;opacity:0;transition:all 0.2s linear}.ShowBalanceModalOverlay.Open{opacity:1}')}function Xe(i,t,n){const g=i.slice();return g[58]=t[n],g}function qe(i,t,n){const g=i.slice();return g[61]=t[n],g}function ct(i){let t,n,g=(i[2].Total?i[9](i[2].Total[0].amount):"0")+"",p,u,b,h,w,T,D,I,O,x,C=i[5]&&Ke(i);return{c(){t=e.element("button"),n=e.element("p"),p=e.text(g),u=e.space(),b=e.element("span"),h=e.svg_element("svg"),w=e.svg_element("path"),D=e.space(),C&&C.c(),I=e.empty(),e.attr(w,"id","arrow"),e.attr(w,"d","M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z"),e.attr(w,"transform","translate(-274.511 -441.088)"),e.attr(w,"fill","#d1d1d1"),e.attr(h,"xmlns","http://www.w3.org/2000/svg"),e.attr(h,"width","14"),e.attr(h,"height","6.835"),e.attr(h,"viewBox","0 0 14 6.835"),e.attr(b,"class",T=i[4]?"TriangleActive":"TriangleInactive"),e.attr(t,"class","BalanceValue")},m(R,V){e.insert(R,t,V),e.append(t,n),e.append(n,p),e.append(t,u),e.append(t,b),e.append(b,h),e.append(h,w),e.insert(R,D,V),C&&C.m(R,V),e.insert(R,I,V),O||(x=e.listen(t,"click",i[29]),O=!0)},p(R,V){V[0]&4&&g!==(g=(R[2].Total?R[9](R[2].Total[0].amount):"0")+"")&&e.set_data(p,g),V[0]&16&&T!==(T=R[4]?"TriangleActive":"TriangleInactive")&&e.attr(b,"class",T),R[5]?C?C.p(R,V):(C=Ke(R),C.c(),C.m(I.parentNode,I)):C&&(C.d(1),C=null)},d(R){R&&(e.detach(t),e.detach(D),e.detach(I)),C&&C.d(R),O=!1,x()}}}function dt(i){let t,n=i[7]("Loading")+"",g;return{c(){t=e.element("p"),g=e.text(n),e.attr(t,"class","Loading")},m(p,u){e.insert(p,t,u),e.append(t,g)},p(p,u){u[0]&128&&n!==(n=p[7]("Loading")+"")&&e.set_data(g,n)},d(p){p&&e.detach(t)}}}function Ke(i){let t,n,g,p,u,b,h,w,T=i[7]("Title")+"",D,I,O,x,C,R,V=i[7]("DepositButton")+"",re,he,H,P,ne,K,Z,J=e.ensure_array_like(Object.keys(i[2])),N=[];for(let L=0;L<J.length;L+=1)N[L]=Ye(Xe(i,J,L));let F=i[0]==="true"&&Qe(i);return{c(){t=e.element("div"),n=e.element("button"),p=e.space(),u=e.element("div"),b=e.element("div"),h=e.element("div"),w=e.element("p"),D=e.text(T),I=e.space(),O=e.element("div");for(let L=0;L<N.length;L+=1)N[L].c();x=e.space(),C=e.element("div"),R=e.element("button"),re=e.text(V),he=e.space(),F&&F.c(),e.attr(n,"class",g="BalanceModalClose "+(i[4]?"Open":"")),e.attr(w,"class","BalanceModalTitle"),e.attr(h,"class","BalanceModalHeader"),e.attr(O,"class","BalanceModalBody"),e.attr(R,"class","BalanceModalAction DepositButton"),e.attr(C,"class","BalanceModalFooter"),e.attr(b,"class",H="ModalContent "+(i[4]?"Open":"")),e.attr(u,"class",P="BalanceModal "+(i[4]?"Open":"")),e.attr(t,"class",ne="BalanceModalWrapper "+(i[4]?"Open":""))},m(L,z){e.insert(L,t,z),e.append(t,n),e.append(t,p),e.append(t,u),e.append(u,b),e.append(b,h),e.append(h,w),e.append(w,D),e.append(b,I),e.append(b,O);for(let E=0;E<N.length;E+=1)N[E]&&N[E].m(O,null);e.append(b,x),e.append(b,C),e.append(C,R),e.append(R,re),e.append(C,he),F&&F.m(C,null),K||(Z=[e.listen(n,"click",i[30]),e.listen(R,"click",i[31])],K=!0)},p(L,z){if(z[0]&16&&g!==(g="BalanceModalClose "+(L[4]?"Open":""))&&e.attr(n,"class",g),z[0]&128&&T!==(T=L[7]("Title")+"")&&e.set_data(D,T),z[0]&2692){J=e.ensure_array_like(Object.keys(L[2]));let E;for(E=0;E<J.length;E+=1){const $=Xe(L,J,E);N[E]?N[E].p($,z):(N[E]=Ye($),N[E].c(),N[E].m(O,null))}for(;E<N.length;E+=1)N[E].d(1);N.length=J.length}z[0]&128&&V!==(V=L[7]("DepositButton")+"")&&e.set_data(re,V),L[0]==="true"?F?F.p(L,z):(F=Qe(L),F.c(),F.m(C,null)):F&&(F.d(1),F=null),z[0]&16&&H!==(H="ModalContent "+(L[4]?"Open":""))&&e.attr(b,"class",H),z[0]&16&&P!==(P="BalanceModal "+(L[4]?"Open":""))&&e.attr(u,"class",P),z[0]&16&&ne!==(ne="BalanceModalWrapper "+(L[4]?"Open":""))&&e.attr(t,"class",ne)},d(L){L&&e.detach(t),e.destroy_each(N,L),F&&F.d(),K=!1,e.run_all(Z)}}}function We(i){let t,n,g=i[7](i[58])+"",p,u,b=i[11](i[61])+"",h,w,T,D,I=i[9](i[61].amount)+"",O;return{c(){t=e.element("div"),n=e.element("p"),p=e.text(g),u=e.space(),h=e.text(b),w=e.space(),T=e.element("p"),D=e.element("span"),O=e.text(I),e.attr(n,"class","BalanceModalText"),e.attr(D,"class","BalanceModalAmount"),e.attr(T,"class","BalanceModalValue"),e.attr(t,"class","BalanceModalRowLine")},m(x,C){e.insert(x,t,C),e.append(t,n),e.append(n,p),e.append(n,u),e.append(n,h),e.append(t,w),e.append(t,T),e.append(T,D),e.append(D,O)},p(x,C){C[0]&132&&g!==(g=x[7](x[58])+"")&&e.set_data(p,g),C[0]&4&&b!==(b=x[11](x[61])+"")&&e.set_data(h,b),C[0]&4&&I!==(I=x[9](x[61].amount)+"")&&e.set_data(O,I)},d(x){x&&e.detach(t)}}}function Ye(i){let t,n,g=e.ensure_array_like(i[2][i[58]]),p=[];for(let u=0;u<g.length;u+=1)p[u]=We(qe(i,g,u));return{c(){t=e.element("div");for(let u=0;u<p.length;u+=1)p[u].c();n=e.space(),e.attr(t,"class","BalanceModalRowBoth")},m(u,b){e.insert(u,t,b);for(let h=0;h<p.length;h+=1)p[h]&&p[h].m(t,null);e.append(t,n)},p(u,b){if(b[0]&2692){g=e.ensure_array_like(u[2][u[58]]);let h;for(h=0;h<g.length;h+=1){const w=qe(u,g,h);p[h]?p[h].p(w,b):(p[h]=We(w),p[h].c(),p[h].m(t,n))}for(;h<p.length;h+=1)p[h].d(1);p.length=g.length}},d(u){u&&e.detach(t),e.destroy_each(p,u)}}}function Qe(i){let t,n=i[7]("LimitsButton")+"",g,p,u;return{c(){t=e.element("button"),g=e.text(n),e.attr(t,"class","BalanceModalAction LimitsButton")},m(b,h){e.insert(b,t,h),e.append(t,g),p||(u=e.listen(t,"click",i[32]),p=!0)},p(b,h){h[0]&128&&n!==(n=b[7]("LimitsButton")+"")&&e.set_data(g,n)},d(b){b&&e.detach(t),p=!1,u()}}}function Ze(i){let t,n,g;return{c(){t=e.element("button"),e.attr(t,"class","ShowBalanceModalOverlay")},m(p,u){e.insert(p,t,u),n||(g=e.listen(t,"click",i[33]),n=!0)},p:e.noop,d(p){p&&e.detach(t),n=!1,g()}}}function ut(i){let t,n,g,p;function u(T,D){return T[3]?dt:ct}let b=u(i),h=b(i),w=i[5]&&Ze(i);return{c(){t=e.element("div"),n=e.element("div"),h.c(),p=e.space(),w&&w.c(),e.attr(n,"class",g="ShowBalance "+(i[6]?"Mobile":""))},m(T,D){e.insert(T,t,D),e.append(t,n),h.m(n,null),e.append(t,p),w&&w.m(t,null),i[34](t)},p(T,D){b===(b=u(T))&&h?h.p(T,D):(h.d(1),h=b(T),h&&(h.c(),h.m(n,null))),D[0]&64&&g!==(g="ShowBalance "+(T[6]?"Mobile":""))&&e.attr(n,"class",g),T[5]?w?w.p(T,D):(w=Ze(T),w.c(),w.m(t,null)):w&&(w.d(1),w=null)},i:e.noop,o:e.noop,d(T){T&&e.detach(t),h.d(),w&&w.d(),i[34](null)}}}function ft(i,t,n){let g;e.component_subscribe(i,e.$format,a=>n(7,g=a));let{userid:p=""}=t,{session:u=""}=t,{endpoint:b=""}=t,{lang:h="en"}=t,{mbsource:w=""}=t,{clientstyling:T=""}=t,{clientstylingurl:D=""}=t,{translationurl:I=""}=t,{gmversion:O="gm16"}=t,{displaybalanceoption:x="All"}=t,{totalcalculationmode:C="totalCashAmount"}=t,{balancelimitsbutton:R="false"}=t,{hideproducttype:V=""}=t,{currencylocale:re="en"}=t,{currencydisplay:he="symbol"}=t,{maximumfractiondigits:H="2"}=t,{minimumfractiondigits:P="0"}=t,{customdisplayformat:ne=""}=t,K,Z=!0,J=!1,N=!1,F=!1,L=!1,z=window.navigator.userAgent,E,$="",oe=[],ce;const f={},ae=["totalCashAmount","totalRealAmount"],ge=()=>{fetch(I).then(a=>a.json()).then(a=>Object.keys(a).forEach(s=>Pe(s,a[s]))).catch(a=>console.log(a))};Object.keys(Ge).forEach(a=>Pe(a,Ge[a]));const ie=a=>{switch(a){case"balance":window.postMessage({type:"BalanceModalStatus",status:"open"},window.location.href),n(5,F=!0),setTimeout(()=>n(4,J=!0),150);break;case"closebalance":n(4,J=!1),window.postMessage({type:"BalanceModalStatus",status:"close"},window.location.href),setTimeout(()=>{n(5,F=!1)},150);break}},le=a=>{if(ne)return Be(a);const s=re||h,d={style:"currency",currency:$,useGrouping:!0,currencyDisplay:he||"code",maximumFractionDigits:H===""||isNaN(Number(H))?2:Number(H),minimumFractionDigits:P===""||isNaN(Number(P))?0:Number(P)};return new Intl.NumberFormat(s,d).format(a)},Be=a=>{const s=[];let d="";for(const r of ne)switch(r){default:d+=r;break;case"{":d&&s.push(d),d="";break;case"}":const[B,A]=d.split("|");if(d="",B.toLowerCase()==="currency")d=$;else if(B.toLowerCase()==="amount"){let v=",",M=".",j=2;A&&(A[0]!==" "&&(v=A[0]),A[1]!==" "&&(M=A[1]),A[2]!==" "&&!isNaN(Number(A[2]))&&(j=Number(A[2])));let[X,de]=String(Math.floor(a*Ne(10,j))/Ne(10,j)).split(".");d+=X[0];for(let se=1;se<X.length;++se)(X.length-se)%3===0?d+=v+X[se]:d+=X[se];de&&(d+=M+de)}d&&s.push(d),d="";break}return s.push(d),s.join("")},_e=()=>Ue(this,null,function*(){var s,d,r;n(3,Z=!0);const a=new URL(`${b}/v1/player/${p}/account`);try{const B=yield fetch(a,{method:"GET",headers:{"X-SessionID":u}}),A=yield B.json();if(B.ok)window.postMessage({type:"BalancedFetched"},window.location.href),oe=A.items,$=(s=oe.find(v=>v.displayName==="Casino"))==null?void 0:s.currency,n(2,f.Total=[{amount:A.totalAmount[$]}],f),n(2,f.Real=[{amount:(d=oe.find(v=>v.displayName==="Casino"))==null?void 0:d.balanceAmount}],f),n(2,f.Bonus=[{amount:(r=oe.find(v=>v.displayName==="UBS"))==null?void 0:r.balanceAmount}],f);else throw new Error("Failed to fetch balance data !")}catch(B){console.log("Balance error: ",B)}finally{n(3,Z=!1)}}),xe=()=>{n(3,Z=!0);const a=new URL(`${b}/v2/player/${p}/balance`),s=new Headers;s.append("X-SessionID",u),fetch(a,{method:"GET",headers:s}).then(r=>r.json()).then(r=>{r[C]||n(12,C=ae[0]);const B=r.items.find(v=>v.type==="Real"&&v.walletAccountType==="Ordinary");if($=B.currency,N=!!B.productType,n(2,f.Total=[{amount:0}],f),n(2,f.Real=[],f),n(2,f.Bonus=[],f),n(2,f.Credit=[],f),!N){ce={lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},n(2,f.Total[0].amount=r[C][$],f);for(const v of r.items)switch(v.type){case"Bonus":f.Bonus.length===0?f.Bonus.push({amount:v.amount}):n(2,f.Bonus[0].amount+=v.amount,f);break;case"Real":if(v.creditLine&&f.Credit.length===0&&f.Credit.push({amount:v.creditLine}),C==="totalRealAmount")continue;f.Real.length===0?f.Real.push({amount:v.amount}):n(2,f.Real[0].amount+=v.amount,f);break}for(const[v,M]of Object.entries(f))M.length<1&&delete f[v];n(3,Z=!1);return}ce={Casino:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1},Sports:{lastOrdinaryAfterAmount:0,showCreditLineAfterAmount:!1}};let A=r.items;x&&x!=="All"&&(A=r.items.filter(v=>v.productType===x));for(const v of A){let M;switch(v.type){case"Bonus":M=f.Bonus.findIndex(j=>j.productType===v.productType),M>0?n(2,f.Bonus[M].amount+=v.amount,f):f.Bonus.push({amount:v.amount,productType:v.productType});break;case"Real":v.creditLine&&f.Credit.push({amount:v.creditLine,productType:v.productType}),M=f.Real.findIndex(j=>j.productType===v.productType),M>0?n(2,f.Real[M].amount+=v.amount,f):f.Real.push({amount:v.amount,productType:v.productType});break}}be();for(const[v,M]of Object.entries(f))M.length<1&&delete f[v];window.postMessage({type:"playerBalanceInfo",balance:r},window.location.href),n(3,Z=!1)}).catch(r=>{throw n(3,Z=!1),console.log("Balance fetch error",r),new Error("Failed to fetch balance data!")})},Te=()=>{if(E&&E.close(),u.length<1)return;let a,s;switch(O){case"gm16":a=new URL(`${b}/v2/player/${p}/information/updates`),s=B=>me(B);break;case"gmcore":a=new URL(`${b}/v1/player/${p}/balance/updates`),s=B=>Re(B);break}const d={accept:"text/event-stream","X-SessionId":u},r=new lt.EventSourcePolyfill(a,{headers:d});E=r,r.addEventListener("message",s)},Ae=a=>{let s;try{s=JSON.parse(a)}catch(d){console.log("Balance stream failed: ",d);return}return s},Re=a=>{var B,A;const s=Ae(a.data);if(!s){Te();return}let d="0";const r=s.balanceChange;oe=oe.map(v=>(r&&r[v.id]&&(v=Ve(ze({},v),{balanceAmount:r[v.id].afterAmount})),d=(parseFloat(v==null?void 0:v.balanceAmount)+parseFloat(d)).toString(),v)),n(2,f.Real=[{amount:(B=oe[0])==null?void 0:B.balanceAmount}],f),n(2,f.Bonus=[{amount:(A=oe[1])==null?void 0:A.balanceAmount}],f),n(2,f.Total=[{amount:Number(d)}],f)},ye=(a,s,d)=>{let r=null;switch(d.walletAccountType){case"Ordinary":(d.afterAmount!==d.affectedAmount||s.lastOrdinaryAfterAmount===0)&&(s.lastOrdinaryAfterAmount=d.afterAmount,s.showCreditLineAfterAmount||(r=d.afterAmount));break;case"CreditLine":d.afterAmount!==0?(r=d.afterAmount,s.showCreditLineAfterAmount=!0):(r=s.lastOrdinaryAfterAmount,s.showCreditLineAfterAmount=!1);break;default:r=d.afterAmount}return r===null?a:r},be=()=>{switch(C){case"totalCashAmount":let a=0;for(const d of["Real","Bonus"])for(const r of f[d])a+=Math.max(r.amount,0);n(2,f.Total[0].amount=a,f);break;case"totalRealAmount":if(!N)return;let s=0;for(const d of f.Real)s+=d.amount;n(2,f.Total[0].amount=s,f)}},me=a=>{const s=Ae(a.data);if(!s){Te();return}if(Ee(s==null?void 0:s.type)||s.type!=="BALANCE_UPDATE_V2")return;const d=s.body.balanceChange;for(const[r,B]of Object.entries(d))if(C==="totalRealAmount"&&r==="Real"&&!N&&n(2,f.Total[0].amount=ye(f.Total[0].amount,ce,B),f),!!f[r])for(const A of f[r]){if(!N){A.amount=r==="Real"?ye(A.amount,ce,B):B.afterAmount;continue}B.productType===A.productType&&(A.amount=r==="Real"?ye(A.amount,ce[A.productType],B):B.afterAmount)}be()},W=a=>{switch(ie("closebalance"),a){case"deposit":window.postMessage({type:"GoToDeposit"},window.location.href);break;case"limits":window.postMessage({type:"GoToLimits"},window.location.href);break}typeof gtag=="function"&>ag("event","GoToDeposit",{context:"PlayerAccountBalanceModal"})},Ee=a=>a==="SESSION_EXPIRATION"?(window.postMessage({type:"SessionExpiration"},window.location.href),!0):!1,Me=()=>{ae.includes(C)||(console.error(`Unsupported value ('${C}') for totalcalculationmode parameter. Only the following values are supported ${ae}. Using default value ('${ae[0]}').`),n(12,C=ae[0]))},De=()=>{switch(it(h),Me(),O){case"gmcore":_e();break;case"gm16":xe();break;default:throw Error(`Invalid apiversion attribute: ${O}`)}},Se=a=>{const{data:{type:s}={}}=a||{};switch(s){case"LogoutSuccessfull":E.close();break;case"CloseBalance":ie("closebalance");break}},o=()=>{window.postMessage({type:"UpdateBalanceBackground"},window.location.href)},c=a=>{const s=V.split(",").map(d=>d.trim());return!a.productType||s.includes(a.productType)?"":g(a.productType)};e.onMount(()=>(window.addEventListener("message",Se,!1),n(6,L=e.isMobile(z)),()=>{window.removeEventListener("message",Se),E&&E.close()}));const m=()=>ie("balance"),l=()=>ie("closebalance"),S=()=>W("deposit"),y=()=>W("limits"),_=()=>ie("closebalance");function k(a){e.binding_callbacks[a?"unshift":"push"](()=>{K=a,n(1,K)})}return i.$$set=a=>{"userid"in a&&n(13,p=a.userid),"session"in a&&n(14,u=a.session),"endpoint"in a&&n(15,b=a.endpoint),"lang"in a&&n(16,h=a.lang),"mbsource"in a&&n(17,w=a.mbsource),"clientstyling"in a&&n(18,T=a.clientstyling),"clientstylingurl"in a&&n(19,D=a.clientstylingurl),"translationurl"in a&&n(20,I=a.translationurl),"gmversion"in a&&n(21,O=a.gmversion),"displaybalanceoption"in a&&n(22,x=a.displaybalanceoption),"totalcalculationmode"in a&&n(12,C=a.totalcalculationmode),"balancelimitsbutton"in a&&n(0,R=a.balancelimitsbutton),"hideproducttype"in a&&n(23,V=a.hideproducttype),"currencylocale"in a&&n(24,re=a.currencylocale),"currencydisplay"in a&&n(25,he=a.currencydisplay),"maximumfractiondigits"in a&&n(26,H=a.maximumfractiondigits),"minimumfractiondigits"in a&&n(27,P=a.minimumfractiondigits),"customdisplayformat"in a&&n(28,ne=a.customdisplayformat)},i.$$.update=()=>{i.$$.dirty[0]&6414336&&b&&p&&u&&h&&O&&x&&De(),i.$$.dirty[0]&2154496&&b&&p&&u&&O&&Te(),i.$$.dirty[0]&1048576&&I&&ge(),i.$$.dirty[0]&4&&f.Total&&o(),i.$$.dirty[0]&262146&&T&&K&&e.setClientStyling(K,T),i.$$.dirty[0]&524290&&D&&K&&e.setClientStylingURL(K,D),i.$$.dirty[0]&131074&&w&&K&&e.setStreamStyling(K,`${w}.Style`)},[R,K,f,Z,J,F,L,g,ie,le,W,c,C,p,u,b,h,w,T,D,I,O,x,V,re,he,H,P,ne,m,l,S,y,_,k]}class Je extends e.SvelteComponent{constructor(t){super(),e.init(this,t,ft,ut,e.safe_not_equal,{userid:13,session:14,endpoint:15,lang:16,mbsource:17,clientstyling:18,clientstylingurl:19,translationurl:20,gmversion:21,displaybalanceoption:22,totalcalculationmode:12,balancelimitsbutton:0,hideproducttype:23,currencylocale:24,currencydisplay:25,maximumfractiondigits:26,minimumfractiondigits:27,customdisplayformat:28},st,[-1,-1,-1])}get userid(){return this.$$.ctx[13]}set userid(t){this.$$set({userid:t}),e.flush()}get session(){return this.$$.ctx[14]}set session(t){this.$$set({session:t}),e.flush()}get endpoint(){return this.$$.ctx[15]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get lang(){return this.$$.ctx[16]}set lang(t){this.$$set({lang:t}),e.flush()}get mbsource(){return this.$$.ctx[17]}set mbsource(t){this.$$set({mbsource:t}),e.flush()}get clientstyling(){return this.$$.ctx[18]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[19]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[20]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get gmversion(){return this.$$.ctx[21]}set gmversion(t){this.$$set({gmversion:t}),e.flush()}get displaybalanceoption(){return this.$$.ctx[22]}set displaybalanceoption(t){this.$$set({displaybalanceoption:t}),e.flush()}get totalcalculationmode(){return this.$$.ctx[12]}set totalcalculationmode(t){this.$$set({totalcalculationmode:t}),e.flush()}get balancelimitsbutton(){return this.$$.ctx[0]}set balancelimitsbutton(t){this.$$set({balancelimitsbutton:t}),e.flush()}get hideproducttype(){return this.$$.ctx[23]}set hideproducttype(t){this.$$set({hideproducttype:t}),e.flush()}get currencylocale(){return this.$$.ctx[24]}set currencylocale(t){this.$$set({currencylocale:t}),e.flush()}get currencydisplay(){return this.$$.ctx[25]}set currencydisplay(t){this.$$set({currencydisplay:t}),e.flush()}get maximumfractiondigits(){return this.$$.ctx[26]}set maximumfractiondigits(t){this.$$set({maximumfractiondigits:t}),e.flush()}get minimumfractiondigits(){return this.$$.ctx[27]}set minimumfractiondigits(t){this.$$set({minimumfractiondigits:t}),e.flush()}get customdisplayformat(){return this.$$.ctx[28]}set customdisplayformat(t){this.$$set({customdisplayformat:t}),e.flush()}}e.create_custom_element(Je,{userid:{},session:{},endpoint:{},lang:{},mbsource:{},clientstyling:{},clientstylingurl:{},translationurl:{},gmversion:{},displaybalanceoption:{},totalcalculationmode:{},balancelimitsbutton:{},hideproducttype:{},currencylocale:{},currencydisplay:{},maximumfractiondigits:{},minimumfractiondigits:{},customdisplayformat:{}},[],[],!0);exports.default=Je;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderControllerNd-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoHeaderControllerNd-ClL-p2I1.cjs")).then(({default:t})=>{!customElements.get("casino-header-controller-nd")&&customElements.define("casino-header-controller-nd",t.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/CasinoHeaderControllerNd-nGf5Fo6G.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("casino-header-controller-nd") && customElements.define("casino-header-controller-nd", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModalNd-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModalNd-BoSGIXIA.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("player-account-balance-modal-nd") && customElements.define("player-account-balance-modal-nd", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -10,7 +10,7 @@ if (typeof window < "u") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModalNd-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/PlayerAccountBalanceModalNd-BrvRNp2P.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("player-account-balance-modal-nd") && customElements.define("player-account-balance-modal-nd", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModalNd-
|
|
1
|
+
"use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/PlayerAccountBalanceModalNd-_NylOeXH.cjs")).then(({default:t})=>{!customElements.get("player-account-balance-modal-nd")&&customElements.define("player-account-balance-modal-nd",t.element)})}
|