@everymatrix/casino-header-controller 1.73.1 → 1.74.0

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.
@@ -1,1409 +0,0 @@
1
- var ut = Object.defineProperty, ft = Object.defineProperties;
2
- var pt = Object.getOwnPropertyDescriptors;
3
- var Ye = Object.getOwnPropertySymbols;
4
- var ht = Object.prototype.hasOwnProperty, mt = Object.prototype.propertyIsEnumerable;
5
- var Xe = Math.pow, Je = (l, t, n) => t in l ? ut(l, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[t] = n, Qe = (l, t) => {
6
- for (var n in t || (t = {}))
7
- ht.call(t, n) && Je(l, n, t[n]);
8
- if (Ye)
9
- for (var n of Ye(t))
10
- mt.call(t, n) && Je(l, n, t[n]);
11
- return l;
12
- }, Ze = (l, t) => ft(l, pt(t));
13
- var $e = (l, t, n) => new Promise((h, f) => {
14
- var c = (y) => {
15
- try {
16
- p(n.next(y));
17
- } catch (C) {
18
- f(C);
19
- }
20
- }, g = (y) => {
21
- try {
22
- p(n.throw(y));
23
- } catch (C) {
24
- f(C);
25
- }
26
- }, p = (y) => y.done ? h(y.value) : Promise.resolve(y.value).then(c, g);
27
- p((n = n.apply(l, t)).next());
28
- });
29
- import { b as gt, $ as yt, O as vt, S as bt, i as wt, s as Bt, f as z, d as Tt, n as Ke, e as ue, h as fe, x as D, k as N, j as pe, v as U, l as Ct, o as St, y as Ne, p as At, w as we, A as Be, r as _t, B as je, C as lt, t as Rt, J as xt, K as Et, L as Dt, c as Lt, I as Ft } from "./CasinoHamburgerMenu-CGX_L0rr.js";
30
- function et(l, t) {
31
- gt(l, t);
32
- }
33
- function Mt(l) {
34
- yt.set(l);
35
- }
36
- const tt = {
37
- en: {
38
- Title: "Your Balance",
39
- Total: "Total Balance",
40
- Real: "Cash Balance",
41
- Bonus: "Bonus Balance",
42
- Credit: "Credit Balance",
43
- Casino: "Casino",
44
- Sports: "Sports",
45
- DepositButton: "Deposit",
46
- Loading: "Loading ..."
47
- },
48
- "zh-hk": {
49
- Title: "您的結餘",
50
- Total: "總結餘",
51
- Real: "現金結餘",
52
- Bonus: "紅利結餘",
53
- Credit: "信用結餘",
54
- Casino: "賭場",
55
- Sports: "體育",
56
- DepositButton: "存款",
57
- Loading: "載入中 ..."
58
- },
59
- de: {
60
- Title: "Ihr Guthaben",
61
- Total: "Gesamtguthaben",
62
- Real: "Barguthaben",
63
- Bonus: "Bonusguthaben",
64
- Credit: "Kreditguthaben",
65
- Casino: "Casino",
66
- Sports: "Sport",
67
- DepositButton: "Einzahlen",
68
- Loading: "Wird geladen ..."
69
- },
70
- it: {
71
- Title: "Il tuo saldo",
72
- Total: "Saldo totale",
73
- Real: "Saldo in contanti",
74
- Bonus: "Saldo bonus",
75
- Credit: "Saldo di credito",
76
- Casino: "Casinò",
77
- Sports: "Sport",
78
- DepositButton: "Deposita",
79
- Loading: "Caricamento ..."
80
- },
81
- fr: {
82
- Title: "Votre solde",
83
- Total: "Solde total",
84
- Real: "Solde en espèces",
85
- Bonus: "Solde bonus",
86
- Credit: "Solde de crédit",
87
- Casino: "Casino",
88
- Sports: "Sports",
89
- DepositButton: "Dépôt",
90
- Loading: "Chargement ..."
91
- },
92
- es: {
93
- Title: "Tu saldo",
94
- Total: "Saldo total",
95
- Real: "Saldo en efectivo",
96
- Bonus: "Saldo de bono",
97
- Credit: "Saldo de crédito",
98
- Casino: "Casino",
99
- Sports: "Deportes",
100
- DepositButton: "Depósito",
101
- Loading: "Cargando ..."
102
- },
103
- tr: {
104
- Title: "Bakiyeniz",
105
- Total: "Toplam Bakiye",
106
- Real: "Nakit Bakiye",
107
- Bonus: "Bonus Bakiyesi",
108
- Credit: "Kredi Bakiyesi",
109
- Casino: "Kumarhane",
110
- Sports: "Spor",
111
- DepositButton: "Yatır",
112
- Loading: "Yükleniyor ..."
113
- },
114
- ru: {
115
- Title: "Ваш баланс",
116
- Total: "Общий баланс",
117
- Real: "Денежный баланс",
118
- Bonus: "Бонусный баланс",
119
- Credit: "Кредитный баланс",
120
- Casino: "Казино",
121
- Sports: "Спорт",
122
- DepositButton: "Депозит",
123
- Loading: "Загружается ..."
124
- },
125
- ro: {
126
- Title: "Soldul tău",
127
- Total: "Sold total",
128
- Real: "Sold în numerar",
129
- Bonus: "Sold bonus",
130
- Credit: "Sold credit",
131
- Casino: "Cazinou",
132
- Sports: "Sporturi",
133
- DepositButton: "Depozit",
134
- Loading: "Se încarcă ..."
135
- },
136
- hr: {
137
- Title: "Vaš saldo",
138
- Total: "Ukupni saldo",
139
- Real: "Gotovinski saldo",
140
- Bonus: "Bonus saldo",
141
- Credit: "Kreditni saldo",
142
- Casino: "Casino",
143
- Sports: "Sportovi",
144
- DepositButton: "Depozit",
145
- Loading: "Učitavanje ..."
146
- },
147
- hu: {
148
- Title: "Az egyenleged",
149
- Total: "Teljes egyenleg",
150
- Real: "Készpénz egyenleg",
151
- Bonus: "Bónusz egyenleg",
152
- Credit: "Hitel egyenleg",
153
- Casino: "Kaszinó",
154
- Sports: "Sport",
155
- DepositButton: "Befizetés",
156
- Loading: "Betöltés ..."
157
- },
158
- pl: {
159
- Title: "Twoje saldo",
160
- Total: "Całkowite saldo",
161
- Real: "Saldo gotówkowe",
162
- Bonus: "Saldo bonusowe",
163
- Credit: "Saldo kredytowe",
164
- Casino: "Kasyno",
165
- Sports: "Sport",
166
- DepositButton: "Wpłać",
167
- Loading: "Ładowanie ..."
168
- },
169
- pt: {
170
- Title: "Seu Saldo",
171
- Total: "Saldo Total",
172
- Real: "Saldo em Dinheiro",
173
- Bonus: "Saldo de Bônus",
174
- Credit: "Saldo de Crédito",
175
- Casino: "Cassino",
176
- Sports: "Esportes",
177
- DepositButton: "Depositar",
178
- Loading: "Carregando ..."
179
- },
180
- sl: {
181
- Title: "Vaš saldo",
182
- Total: "Skupni saldo",
183
- Real: "Gotovinski saldo",
184
- Bonus: "Bonus saldo",
185
- Credit: "Kreditni saldo",
186
- Casino: "Kasino",
187
- Sports: "Šport",
188
- DepositButton: "Depozit",
189
- Loading: "Nalaganje ..."
190
- },
191
- sr: {
192
- Title: "Vaš saldo",
193
- Total: "Ukupan saldo",
194
- Real: "Gotovinski saldo",
195
- Bonus: "Bonus saldo",
196
- Credit: "Kreditni saldo",
197
- Casino: "Kasino",
198
- Sports: "Sport",
199
- DepositButton: "Depozit",
200
- Loading: "Učitavanje ..."
201
- },
202
- "pt-br": {
203
- Title: "Seu Saldo",
204
- Total: "Saldo Total",
205
- Real: "Saldo em Dinheiro",
206
- Bonus: "Saldo de Bônus",
207
- Credit: "Saldo de Crédito",
208
- Casino: "Cassino",
209
- Sports: "Esportes",
210
- DepositButton: "Depositar",
211
- Loading: "Carregando ..."
212
- },
213
- "es-mx": {
214
- Title: "Tu saldo",
215
- Total: "Saldo total",
216
- Real: "Saldo en efectivo",
217
- Bonus: "Saldo de bono",
218
- Credit: "Saldo de crédito",
219
- Casino: "Casino",
220
- Sports: "Deportes",
221
- DepositButton: "Depósito",
222
- Loading: "Cargando ..."
223
- },
224
- "en-us": {
225
- Title: "Your Balance",
226
- Total: "Total Balance",
227
- Real: "Cash Balance",
228
- Bonus: "Bonus Balance",
229
- Credit: "Credit Balance",
230
- Casino: "Casino",
231
- Sports: "Sports",
232
- DepositButton: "Deposit",
233
- Loading: "Loading ..."
234
- }
235
- };
236
- var qe = { exports: {} };
237
- /** @license
238
- * eventsource.js
239
- * Available under MIT License (MIT)
240
- * https://github.com/Yaffle/EventSource/
241
- */
242
- (function(l, t) {
243
- (function(n) {
244
- var h = n.setTimeout, f = n.clearTimeout, c = n.XMLHttpRequest, g = n.XDomainRequest, p = n.ActiveXObject, y = n.EventSource, C = n.document, S = n.Promise, A = n.fetch, E = n.Response, R = n.TextDecoder, M = n.TextEncoder, Q = n.AbortController;
245
- if (typeof window != "undefined" && typeof C != "undefined" && !("readyState" in C) && C.body == null && (C.readyState = "loading", window.addEventListener("load", function(e) {
246
- C.readyState = "complete";
247
- }, !1)), c == null && p != null && (c = function() {
248
- return new p("Microsoft.XMLHTTP");
249
- }), Object.create == null && (Object.create = function(e) {
250
- function a() {
251
- }
252
- return a.prototype = e, new a();
253
- }), Date.now || (Date.now = function() {
254
- return (/* @__PURE__ */ new Date()).getTime();
255
- }), Q == null) {
256
- var ae = A;
257
- A = function(e, a) {
258
- var i = a.signal;
259
- return ae(e, { headers: a.headers, credentials: a.credentials, cache: a.cache }).then(function(o) {
260
- var r = o.body.getReader();
261
- return i._reader = r, i._aborted && i._reader.cancel(), {
262
- status: o.status,
263
- statusText: o.statusText,
264
- headers: o.headers,
265
- body: {
266
- getReader: function() {
267
- return r;
268
- }
269
- }
270
- };
271
- });
272
- }, Q = function() {
273
- this.signal = {
274
- _reader: null,
275
- _aborted: !1
276
- }, this.abort = function() {
277
- this.signal._reader != null && this.signal._reader.cancel(), this.signal._aborted = !0;
278
- };
279
- };
280
- }
281
- function Z() {
282
- this.bitsNeeded = 0, this.codePoint = 0;
283
- }
284
- Z.prototype.decode = function(e) {
285
- function a(T, F, v) {
286
- if (v === 1)
287
- return T >= 128 >> F && T << F <= 2047;
288
- if (v === 2)
289
- return T >= 2048 >> F && T << F <= 55295 || T >= 57344 >> F && T << F <= 65535;
290
- if (v === 3)
291
- return T >= 65536 >> F && T << F <= 1114111;
292
- throw new Error();
293
- }
294
- function i(T, F) {
295
- if (T === 6 * 1)
296
- return F >> 6 > 15 ? 3 : F > 31 ? 2 : 1;
297
- if (T === 6 * 2)
298
- return F > 15 ? 3 : 2;
299
- if (T === 6 * 3)
300
- return 3;
301
- throw new Error();
302
- }
303
- for (var o = 65533, r = "", d = this.bitsNeeded, m = this.codePoint, x = 0; x < e.length; x += 1) {
304
- var w = e[x];
305
- d !== 0 && (w < 128 || w > 191 || !a(m << 6 | w & 63, d - 6, i(d, m))) && (d = 0, m = o, r += String.fromCharCode(m)), d === 0 ? (w >= 0 && w <= 127 ? (d = 0, m = w) : w >= 192 && w <= 223 ? (d = 6 * 1, m = w & 31) : w >= 224 && w <= 239 ? (d = 6 * 2, m = w & 15) : w >= 240 && w <= 247 ? (d = 6 * 3, m = w & 7) : (d = 0, m = o), d !== 0 && !a(m, d, i(d, m)) && (d = 0, m = o)) : (d -= 6, m = m << 6 | w & 63), d === 0 && (m <= 65535 ? r += String.fromCharCode(m) : (r += String.fromCharCode(55296 + (m - 65535 - 1 >> 10)), r += String.fromCharCode(56320 + (m - 65535 - 1 & 1023))));
306
- }
307
- return this.bitsNeeded = d, this.codePoint = m, r;
308
- };
309
- var X = function() {
310
- try {
311
- return new R().decode(new M().encode("test"), { stream: !0 }) === "test";
312
- } catch (e) {
313
- console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + e);
314
- }
315
- return !1;
316
- };
317
- (R == null || M == null || !X()) && (R = Z);
318
- var _ = function() {
319
- };
320
- function B(e) {
321
- this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = _, this.onload = _, this.onerror = _, this.onreadystatechange = _, this._contentType = "", this._xhr = e, this._sendTimeout = 0, this._abort = _;
322
- }
323
- B.prototype.open = function(e, a) {
324
- this._abort(!0);
325
- var i = this, o = this._xhr, r = 1, d = 0;
326
- this._abort = function(v) {
327
- i._sendTimeout !== 0 && (f(i._sendTimeout), i._sendTimeout = 0), (r === 1 || r === 2 || r === 3) && (r = 4, o.onload = _, o.onerror = _, o.onabort = _, o.onprogress = _, o.onreadystatechange = _, o.abort(), d !== 0 && (f(d), d = 0), v || (i.readyState = 4, i.onabort(null), i.onreadystatechange())), r = 0;
328
- };
329
- var m = function() {
330
- if (r === 1) {
331
- var v = 0, k = "", se = void 0;
332
- if ("contentType" in o)
333
- v = 200, k = "OK", se = o.contentType;
334
- else
335
- try {
336
- v = o.status, k = o.statusText, se = o.getResponseHeader("Content-Type");
337
- } catch (De) {
338
- v = 0, k = "", se = void 0;
339
- }
340
- v !== 0 && (r = 2, i.readyState = 2, i.status = v, i.statusText = k, i._contentType = se, i.onreadystatechange());
341
- }
342
- }, x = function() {
343
- if (m(), r === 2 || r === 3) {
344
- r = 3;
345
- var v = "";
346
- try {
347
- v = o.responseText;
348
- } catch (k) {
349
- }
350
- i.readyState = 3, i.responseText = v, i.onprogress();
351
- }
352
- }, w = function(v, k) {
353
- if ((k == null || k.preventDefault == null) && (k = {
354
- preventDefault: _
355
- }), x(), r === 1 || r === 2 || r === 3) {
356
- if (r = 4, d !== 0 && (f(d), d = 0), i.readyState = 4, v === "load")
357
- i.onload(k);
358
- else if (v === "error")
359
- i.onerror(k);
360
- else if (v === "abort")
361
- i.onabort(k);
362
- else
363
- throw new TypeError();
364
- i.onreadystatechange();
365
- }
366
- }, T = function(v) {
367
- o != null && (o.readyState === 4 ? (!("onload" in o) || !("onerror" in o) || !("onabort" in o)) && w(o.responseText === "" ? "error" : "load", v) : o.readyState === 3 ? "onprogress" in o || x() : o.readyState === 2 && m());
368
- }, F = function() {
369
- d = h(function() {
370
- F();
371
- }, 500), o.readyState === 3 && x();
372
- };
373
- "onload" in o && (o.onload = function(v) {
374
- w("load", v);
375
- }), "onerror" in o && (o.onerror = function(v) {
376
- w("error", v);
377
- }), "onabort" in o && (o.onabort = function(v) {
378
- w("abort", v);
379
- }), "onprogress" in o && (o.onprogress = x), "onreadystatechange" in o && (o.onreadystatechange = function(v) {
380
- T(v);
381
- }), ("contentType" in o || !("ontimeout" in c.prototype)) && (a += (a.indexOf("?") === -1 ? "?" : "&") + "padding=true"), o.open(e, a, !0), "readyState" in o && (d = h(function() {
382
- F();
383
- }, 0));
384
- }, B.prototype.abort = function() {
385
- this._abort(!1);
386
- }, B.prototype.getResponseHeader = function(e) {
387
- return this._contentType;
388
- }, B.prototype.setRequestHeader = function(e, a) {
389
- var i = this._xhr;
390
- "setRequestHeader" in i && i.setRequestHeader(e, a);
391
- }, B.prototype.getAllResponseHeaders = function() {
392
- return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
393
- }, B.prototype.send = function() {
394
- if ((!("ontimeout" in c.prototype) || !("sendAsBinary" in c.prototype) && !("mozAnon" in c.prototype)) && C != null && C.readyState != null && C.readyState !== "complete") {
395
- var e = this;
396
- e._sendTimeout = h(function() {
397
- e._sendTimeout = 0, e.send();
398
- }, 4);
399
- return;
400
- }
401
- var a = this._xhr;
402
- "withCredentials" in a && (a.withCredentials = this.withCredentials);
403
- try {
404
- a.send(void 0);
405
- } catch (i) {
406
- throw i;
407
- }
408
- };
409
- function I(e) {
410
- return e.replace(/[A-Z]/g, function(a) {
411
- return String.fromCharCode(a.charCodeAt(0) + 32);
412
- });
413
- }
414
- function L(e) {
415
- for (var a = /* @__PURE__ */ Object.create(null), i = e.split(`\r
416
- `), o = 0; o < i.length; o += 1) {
417
- var r = i[o], d = r.split(": "), m = d.shift(), x = d.join(": ");
418
- a[I(m)] = x;
419
- }
420
- this._map = a;
421
- }
422
- L.prototype.get = function(e) {
423
- return this._map[I(e)];
424
- }, c != null && c.HEADERS_RECEIVED == null && (c.HEADERS_RECEIVED = 2);
425
- function $() {
426
- }
427
- $.prototype.open = function(e, a, i, o, r, d, m) {
428
- e.open("GET", r);
429
- var x = 0;
430
- e.onprogress = function() {
431
- var T = e.responseText, F = T.slice(x);
432
- x += F.length, i(F);
433
- }, e.onerror = function(T) {
434
- T.preventDefault(), o(new Error("NetworkError"));
435
- }, e.onload = function() {
436
- o(null);
437
- }, e.onabort = function() {
438
- o(null);
439
- }, e.onreadystatechange = function() {
440
- if (e.readyState === c.HEADERS_RECEIVED) {
441
- var T = e.status, F = e.statusText, v = e.getResponseHeader("Content-Type"), k = e.getAllResponseHeaders();
442
- a(T, F, v, new L(k));
443
- }
444
- }, e.withCredentials = d;
445
- for (var w in m)
446
- Object.prototype.hasOwnProperty.call(m, w) && e.setRequestHeader(w, m[w]);
447
- return e.send(), e;
448
- };
449
- function oe(e) {
450
- this._headers = e;
451
- }
452
- oe.prototype.get = function(e) {
453
- return this._headers.get(e);
454
- };
455
- function re() {
456
- }
457
- re.prototype.open = function(e, a, i, o, r, d, m) {
458
- var x = null, w = new Q(), T = w.signal, F = new R();
459
- return A(r, {
460
- headers: m,
461
- credentials: d ? "include" : "same-origin",
462
- signal: T,
463
- cache: "no-store"
464
- }).then(function(v) {
465
- return x = v.body.getReader(), a(v.status, v.statusText, v.headers.get("Content-Type"), new oe(v.headers)), new S(function(k, se) {
466
- var De = function() {
467
- x.read().then(function(W) {
468
- if (W.done)
469
- k(void 0);
470
- else {
471
- var P = F.decode(W.value, { stream: !0 });
472
- i(P), De();
473
- }
474
- }).catch(function(W) {
475
- se(W);
476
- });
477
- };
478
- De();
479
- });
480
- }).catch(function(v) {
481
- if (v.name !== "AbortError")
482
- return v;
483
- }).then(function(v) {
484
- o(v);
485
- }), {
486
- abort: function() {
487
- x != null && x.cancel(), w.abort();
488
- }
489
- };
490
- };
491
- function K() {
492
- this._listeners = /* @__PURE__ */ Object.create(null);
493
- }
494
- function he(e) {
495
- h(function() {
496
- throw e;
497
- }, 0);
498
- }
499
- K.prototype.dispatchEvent = function(e) {
500
- e.target = this;
501
- var a = this._listeners[e.type];
502
- if (a != null)
503
- for (var i = a.length, o = 0; o < i; o += 1) {
504
- var r = a[o];
505
- try {
506
- typeof r.handleEvent == "function" ? r.handleEvent(e) : r.call(this, e);
507
- } catch (d) {
508
- he(d);
509
- }
510
- }
511
- }, K.prototype.addEventListener = function(e, a) {
512
- e = String(e);
513
- var i = this._listeners, o = i[e];
514
- o == null && (o = [], i[e] = o);
515
- for (var r = !1, d = 0; d < o.length; d += 1)
516
- o[d] === a && (r = !0);
517
- r || o.push(a);
518
- }, K.prototype.removeEventListener = function(e, a) {
519
- e = String(e);
520
- var i = this._listeners, o = i[e];
521
- if (o != null) {
522
- for (var r = [], d = 0; d < o.length; d += 1)
523
- o[d] !== a && r.push(o[d]);
524
- r.length === 0 ? delete i[e] : i[e] = r;
525
- }
526
- };
527
- function u(e) {
528
- this.type = e, this.target = void 0;
529
- }
530
- function me(e, a) {
531
- u.call(this, e), this.data = a.data, this.lastEventId = a.lastEventId;
532
- }
533
- me.prototype = Object.create(u.prototype);
534
- function _e(e, a) {
535
- u.call(this, e), this.status = a.status, this.statusText = a.statusText, this.headers = a.headers;
536
- }
537
- _e.prototype = Object.create(u.prototype);
538
- function Fe(e, a) {
539
- u.call(this, e), this.error = a.error;
540
- }
541
- Fe.prototype = Object.create(u.prototype);
542
- var Re = -1, te = 0, ge = 1, ie = 2, Te = -1, ne = 0, ve = 1, xe = 2, Ie = 3, Me = /^text\/event\-stream(;.*)?$/i, He = 1e3, ze = 18e6, Ce = function(e, a) {
543
- var i = e == null ? a : parseInt(e, 10);
544
- return i !== i && (i = a), Ee(i);
545
- }, Ee = function(e) {
546
- return Math.min(Math.max(e, He), ze);
547
- }, ye = function(e, a, i) {
548
- try {
549
- typeof a == "function" && a.call(e, i);
550
- } catch (o) {
551
- he(o);
552
- }
553
- };
554
- function q(e, a) {
555
- K.call(this), a = a || {}, 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, s(this, e, a);
556
- }
557
- function Ue() {
558
- return c != null && "withCredentials" in c.prototype || g == null ? new c() : new g();
559
- }
560
- var Pe = A != null && E != null && "body" in E.prototype;
561
- function s(e, a, i) {
562
- a = String(a);
563
- var o = !!i.withCredentials, r = i.lastEventIdQueryParameterName || "lastEventId", d = Ee(1e3), m = Ce(i.heartbeatTimeout, 45e3), x = "", w = d, T = !1, F = 0, v = i.headers || {}, k = i.Transport, se = Pe && k == null ? void 0 : new B(k != null ? new k() : Ue()), De = k != null && typeof k != "string" ? new k() : se == null ? new re() : new $(), W = void 0, P = 0, ee = Re, Se = "", ke = "", le = "", Oe = "", V = ne, Ve = 0, be = 0, ct = function(j, O, Y, J) {
564
- if (ee === te)
565
- if (j === 200 && Y != null && Me.test(Y)) {
566
- ee = ge, T = Date.now(), w = d, e.readyState = ge;
567
- var G = new _e("open", {
568
- status: j,
569
- statusText: O,
570
- headers: J
571
- });
572
- e.dispatchEvent(G), ye(e, e.onopen, G);
573
- } else {
574
- var H = "";
575
- j !== 200 ? (O && (O = O.replace(/\s+/g, " ")), H = "EventSource's response has a status " + j + " " + O + " that is not 200. Aborting the connection.") : H = "EventSource's response has a Content-Type specifying an unsupported type: " + (Y == null ? "-" : Y.replace(/\s+/g, " ")) + ". Aborting the connection.", Ge();
576
- var G = new _e("error", {
577
- status: j,
578
- statusText: O,
579
- headers: J
580
- });
581
- e.dispatchEvent(G), ye(e, e.onerror, G), console.error(H);
582
- }
583
- }, dt = function(j) {
584
- if (ee === ge) {
585
- for (var O = -1, Y = 0; Y < j.length; Y += 1) {
586
- var J = j.charCodeAt(Y);
587
- (J === 10 || J === 13) && (O = Y);
588
- }
589
- var G = (O !== -1 ? Oe : "") + j.slice(0, O + 1);
590
- Oe = (O === -1 ? Oe : "") + j.slice(O + 1), j !== "" && (T = Date.now(), F += j.length);
591
- for (var H = 0; H < G.length; H += 1) {
592
- var J = G.charCodeAt(H);
593
- if (V === Te && J === 10)
594
- V = ne;
595
- else if (V === Te && (V = ne), J === 13 || J === 10) {
596
- if (V !== ne) {
597
- V === ve && (be = H + 1);
598
- var ce = G.slice(Ve, be - 1), de = G.slice(be + (be < H && G.charCodeAt(be) === 32 ? 1 : 0), H);
599
- ce === "data" ? (Se += `
600
- `, Se += de) : ce === "id" ? ke = de : ce === "event" ? le = de : ce === "retry" ? (d = Ce(de, d), w = d) : ce === "heartbeatTimeout" && (m = Ce(de, m), P !== 0 && (f(P), P = h(function() {
601
- Le();
602
- }, m)));
603
- }
604
- if (V === ne) {
605
- if (Se !== "") {
606
- x = ke, le === "" && (le = "message");
607
- var Ae = new me(le, {
608
- data: Se.slice(1),
609
- lastEventId: ke
610
- });
611
- if (e.dispatchEvent(Ae), le === "open" ? ye(e, e.onopen, Ae) : le === "message" ? ye(e, e.onmessage, Ae) : le === "error" && ye(e, e.onerror, Ae), ee === ie)
612
- return;
613
- }
614
- Se = "", le = "";
615
- }
616
- V = J === 13 ? Te : ne;
617
- } else
618
- V === ne && (Ve = H, V = ve), V === ve ? J === 58 && (be = H + 1, V = xe) : V === xe && (V = Ie);
619
- }
620
- }
621
- }, We = function(j) {
622
- if (ee === ge || ee === te) {
623
- ee = Re, P !== 0 && (f(P), P = 0), P = h(function() {
624
- Le();
625
- }, w), w = Ee(Math.min(d * 16, w * 2)), e.readyState = te;
626
- var O = new Fe("error", { error: j });
627
- e.dispatchEvent(O), ye(e, e.onerror, O), j != null && console.error(j);
628
- }
629
- }, Ge = function() {
630
- ee = ie, W != null && (W.abort(), W = void 0), P !== 0 && (f(P), P = 0), e.readyState = ie;
631
- }, Le = function() {
632
- if (P = 0, ee !== Re) {
633
- if (!T && W != null)
634
- We(new Error("No activity within " + m + " milliseconds. " + (ee === te ? "No response received." : F + " chars received.") + " Reconnecting.")), W != null && (W.abort(), W = void 0);
635
- else {
636
- var j = Math.max((T || Date.now()) + m - Date.now(), 1);
637
- T = !1, P = h(function() {
638
- Le();
639
- }, j);
640
- }
641
- return;
642
- }
643
- T = !1, F = 0, P = h(function() {
644
- Le();
645
- }, m), ee = te, Se = "", le = "", ke = x, Oe = "", Ve = 0, be = 0, V = ne;
646
- var O = a;
647
- if (a.slice(0, 5) !== "data:" && a.slice(0, 5) !== "blob:" && x !== "") {
648
- var Y = a.indexOf("?");
649
- O = Y === -1 ? a : a.slice(0, Y + 1) + a.slice(Y + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(de, Ae) {
650
- return Ae === r ? "" : de;
651
- }), O += (a.indexOf("?") === -1 ? "?" : "&") + r + "=" + encodeURIComponent(x);
652
- }
653
- var J = e.withCredentials, G = {};
654
- G.Accept = "text/event-stream";
655
- var H = e.headers;
656
- if (H != null)
657
- for (var ce in H)
658
- Object.prototype.hasOwnProperty.call(H, ce) && (G[ce] = H[ce]);
659
- try {
660
- W = De.open(se, ct, dt, We, O, J, G);
661
- } catch (de) {
662
- throw Ge(), de;
663
- }
664
- };
665
- e.url = a, e.readyState = te, e.withCredentials = o, e.headers = v, e._close = Ge, Le();
666
- }
667
- q.prototype = Object.create(K.prototype), q.prototype.CONNECTING = te, q.prototype.OPEN = ge, q.prototype.CLOSED = ie, q.prototype.close = function() {
668
- this._close();
669
- }, q.CONNECTING = te, q.OPEN = ge, q.CLOSED = ie, q.prototype.withCredentials = void 0;
670
- var b = y;
671
- c != null && (y == null || !("withCredentials" in y.prototype)) && (b = q), function(e) {
672
- {
673
- var a = e(t);
674
- a !== void 0 && (l.exports = a);
675
- }
676
- }(function(e) {
677
- e.EventSourcePolyfill = q, e.NativeEventSource = y, e.EventSource = b;
678
- });
679
- })(typeof globalThis == "undefined" ? typeof window != "undefined" ? window : typeof self != "undefined" ? self : vt : globalThis);
680
- })(qe, qe.exports);
681
- var kt = qe.exports;
682
- function Ot(l) {
683
- Tt(l, "svelte-gv6dm2", '*,*::before,*::after{font-family:inherit}:host{font-family:inherit}input,textarea,button{font-family:inherit}p{padding:0;margin:0}.ShowBalance{position:relative}.ShowBalance .Loading{font-size:14px;white-space:nowrap;padding-right:10px}.ShowBalance .BalanceValue{font-size:14px;cursor:pointer;display:flex;flex-wrap:nowrap;white-space:nowrap;background:transparent;border:none;font:inherit;color:inherit}.ShowBalance .BalanceValue svg{width:16px}.ShowBalance .BalanceValue span{padding-left:8px}@media only screen and (max-width: 360px){.ShowBalance .BalanceValue{font-size:12px}.ShowBalance .BalanceValue svg{width:12px}}.BalanceModalWrapper{background-color:var(--emw--color-white, #FFFFFF);position:absolute;top:45px;left:50%;transform:translateX(-60%);padding:10px;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}.BalanceModalWrapper:before{content:"";background:var(--emw--color-white, #FFFFFF);clip-path:polygon(50% 0, 0% 100%, 100% 100%);position:absolute;top:-8px;left:60%;width:25px;height:10px;transform:translateX(-50%);z-index:1}.BalanceModalClose{position:absolute;top:5px;right:5px;width:20px;height:20px;z-index:1;cursor:pointer;font:inherit}.BalanceModalClose:before{content:"";background:var(--emw--color-secondary, var(--emw--color-secondary, #FD2839));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, #FD2839));position:absolute;top:8px;left:0;width:20px;height:2px;transform:rotate(-45deg)}.BalanceModal{position:relative;width:280px}.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, #07072A))}.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, #07072A));font-size:14px;text-transform:capitalize}.BalanceModalRowBoth .BalanceModalValue{font-size:14px;font-weight:bold;color:var(--emw--header-contrast, var(--emw--color-contrast, #07072A))}.BalanceModalFooter{display:flex;align-items:center;padding:20px 0 10px}.BalanceModalFooter .BalanceModalAction{background:var(--emw--header-color-primary, var(--emw--color-primary, #22B04E));font-size:12px;color:white;text-transform:uppercase;width:100%;border-radius:5px;border:none;padding:10px 0;cursor:pointer}.BalanceModalFooter .BalanceModalAction:hover,.BalanceModalFooter .BalanceModalActionactive{background:var(--emw--header-contrast, var(--emw--color-background, #07072A))}.ShowBalanceModalOverlay{background-color:rgba(0, 0, 0, 0.7);position:fixed;top:0;bottom:0;left:0;right:0;z-index:16}');
684
- }
685
- function nt(l, t, n) {
686
- const h = l.slice();
687
- return h[48] = t[n], h;
688
- }
689
- function at(l, t, n) {
690
- const h = l.slice();
691
- return h[51] = t[n], h;
692
- }
693
- function Nt(l) {
694
- let t, n = (
695
- /*balances*/
696
- (l[3].Total ? (
697
- /*formatBalance*/
698
- l[5](
699
- /*balances*/
700
- l[3].Total[0].amount
701
- )
702
- ) : "0") + ""
703
- ), h, f, c, g, p, y, C, S = (
704
- /*isModalDisplayed*/
705
- l[2] && ot(l)
706
- );
707
- return {
708
- c() {
709
- t = N("button"), h = Be(n), f = pe(), c = N("span"), c.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 11.435"><defs><style>.a{fill:var(--emw--color-white, #FFFFFF);}</style></defs><path class="a" d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z" transform="translate(-6.188 -11.246)"></path></svg>', g = pe(), S && S.c(), p = _t(), U(t, "class", "BalanceValue");
710
- },
711
- m(A, E) {
712
- fe(A, t, E), D(t, h), D(t, f), D(t, c), fe(A, g, E), S && S.m(A, E), fe(A, p, E), y || (C = Ne(
713
- t,
714
- "click",
715
- /*click_handler*/
716
- l[23]
717
- ), y = !0);
718
- },
719
- p(A, E) {
720
- E[0] & /*balances*/
721
- 8 && n !== (n = /*balances*/
722
- (A[3].Total ? (
723
- /*formatBalance*/
724
- A[5](
725
- /*balances*/
726
- A[3].Total[0].amount
727
- )
728
- ) : "0") + "") && we(h, n), /*isModalDisplayed*/
729
- A[2] ? S ? S.p(A, E) : (S = ot(A), S.c(), S.m(p.parentNode, p)) : S && (S.d(1), S = null);
730
- },
731
- d(A) {
732
- A && (ue(t), ue(g), ue(p)), S && S.d(A), y = !1, C();
733
- }
734
- };
735
- }
736
- function jt(l) {
737
- let t, n = (
738
- /*$_*/
739
- l[4]("Loading") + ""
740
- ), h;
741
- return {
742
- c() {
743
- t = N("p"), h = Be(n);
744
- },
745
- m(f, c) {
746
- fe(f, t, c), D(t, h);
747
- },
748
- p(f, c) {
749
- c[0] & /*$_*/
750
- 16 && n !== (n = /*$_*/
751
- f[4]("Loading") + "") && we(h, n);
752
- },
753
- d(f) {
754
- f && ue(t);
755
- }
756
- };
757
- }
758
- function ot(l) {
759
- let t, n, h, f, c, g, p = (
760
- /*$_*/
761
- l[4]("Title") + ""
762
- ), y, C, S, A, E, R, M = (
763
- /*$_*/
764
- l[4]("DepositButton") + ""
765
- ), Q, ae, Z, X = je(Object.keys(
766
- /*balances*/
767
- l[3]
768
- )), _ = [];
769
- for (let B = 0; B < X.length; B += 1)
770
- _[B] = it(nt(l, X, B));
771
- return {
772
- c() {
773
- t = N("div"), n = N("button"), h = pe(), f = N("div"), c = N("div"), g = N("p"), y = Be(p), C = pe(), S = N("div");
774
- for (let B = 0; B < _.length; B += 1)
775
- _[B].c();
776
- A = pe(), E = N("div"), R = N("button"), Q = Be(M), U(n, "class", "BalanceModalClose"), U(g, "class", "BalanceModalTitle"), U(c, "class", "BalanceModalHeader"), U(S, "class", "BalanceModalBody"), U(R, "class", "BalanceModalAction"), U(E, "class", "BalanceModalFooter"), U(f, "class", "BalanceModal"), U(t, "class", "BalanceModalWrapper");
777
- },
778
- m(B, I) {
779
- fe(B, t, I), D(t, n), D(t, h), D(t, f), D(f, c), D(c, g), D(g, y), D(f, C), D(f, S);
780
- for (let L = 0; L < _.length; L += 1)
781
- _[L] && _[L].m(S, null);
782
- D(f, A), D(f, E), D(E, R), D(R, Q), ae || (Z = [
783
- Ne(
784
- n,
785
- "click",
786
- /*click_handler_1*/
787
- l[24]
788
- ),
789
- Ne(
790
- R,
791
- "click",
792
- /*click_handler_2*/
793
- l[25]
794
- )
795
- ], ae = !0);
796
- },
797
- p(B, I) {
798
- if (I[0] & /*$_*/
799
- 16 && p !== (p = /*$_*/
800
- B[4]("Title") + "") && we(y, p), I[0] & /*balances, formatBalance, $_*/
801
- 56) {
802
- X = je(Object.keys(
803
- /*balances*/
804
- B[3]
805
- ));
806
- let L;
807
- for (L = 0; L < X.length; L += 1) {
808
- const $ = nt(B, X, L);
809
- _[L] ? _[L].p($, I) : (_[L] = it($), _[L].c(), _[L].m(S, null));
810
- }
811
- for (; L < _.length; L += 1)
812
- _[L].d(1);
813
- _.length = X.length;
814
- }
815
- I[0] & /*$_*/
816
- 16 && M !== (M = /*$_*/
817
- B[4]("DepositButton") + "") && we(Q, M);
818
- },
819
- d(B) {
820
- B && ue(t), lt(_, B), ae = !1, Rt(Z);
821
- }
822
- };
823
- }
824
- function rt(l) {
825
- let t, n, h = (
826
- /*$_*/
827
- l[4](
828
- /*k*/
829
- l[48]
830
- ) + ""
831
- ), f, c, g = (
832
- /*b*/
833
- (l[51].productType ? (
834
- /*$_*/
835
- l[4](
836
- /*b*/
837
- l[51].productType
838
- )
839
- ) : "") + ""
840
- ), p, y, C, S, A = (
841
- /*formatBalance*/
842
- l[5](
843
- /*b*/
844
- l[51].amount
845
- ) + ""
846
- ), E;
847
- return {
848
- c() {
849
- t = N("div"), n = N("p"), f = Be(h), c = pe(), p = Be(g), y = pe(), C = N("p"), S = N("span"), E = Be(A), U(n, "class", "BalanceModalText"), U(S, "class", "BalanceModalAmount"), U(C, "class", "BalanceModalValue"), U(t, "class", "BalanceModalRowLine");
850
- },
851
- m(R, M) {
852
- fe(R, t, M), D(t, n), D(n, f), D(n, c), D(n, p), D(t, y), D(t, C), D(C, S), D(S, E);
853
- },
854
- p(R, M) {
855
- M[0] & /*$_, balances*/
856
- 24 && h !== (h = /*$_*/
857
- R[4](
858
- /*k*/
859
- R[48]
860
- ) + "") && we(f, h), M[0] & /*balances, $_*/
861
- 24 && g !== (g = /*b*/
862
- (R[51].productType ? (
863
- /*$_*/
864
- R[4](
865
- /*b*/
866
- R[51].productType
867
- )
868
- ) : "") + "") && we(p, g), M[0] & /*balances*/
869
- 8 && A !== (A = /*formatBalance*/
870
- R[5](
871
- /*b*/
872
- R[51].amount
873
- ) + "") && we(E, A);
874
- },
875
- d(R) {
876
- R && ue(t);
877
- }
878
- };
879
- }
880
- function it(l) {
881
- let t, n, h = je(
882
- /*balances*/
883
- l[3][
884
- /*k*/
885
- l[48]
886
- ]
887
- ), f = [];
888
- for (let c = 0; c < h.length; c += 1)
889
- f[c] = rt(at(l, h, c));
890
- return {
891
- c() {
892
- t = N("div");
893
- for (let c = 0; c < f.length; c += 1)
894
- f[c].c();
895
- n = pe(), U(t, "class", "BalanceModalRowBoth");
896
- },
897
- m(c, g) {
898
- fe(c, t, g);
899
- for (let p = 0; p < f.length; p += 1)
900
- f[p] && f[p].m(t, null);
901
- D(t, n);
902
- },
903
- p(c, g) {
904
- if (g[0] & /*formatBalance, balances, $_*/
905
- 56) {
906
- h = je(
907
- /*balances*/
908
- c[3][
909
- /*k*/
910
- c[48]
911
- ]
912
- );
913
- let p;
914
- for (p = 0; p < h.length; p += 1) {
915
- const y = at(c, h, p);
916
- f[p] ? f[p].p(y, g) : (f[p] = rt(y), f[p].c(), f[p].m(t, n));
917
- }
918
- for (; p < f.length; p += 1)
919
- f[p].d(1);
920
- f.length = h.length;
921
- }
922
- },
923
- d(c) {
924
- c && ue(t), lt(f, c);
925
- }
926
- };
927
- }
928
- function st(l) {
929
- let t, n, h;
930
- return {
931
- c() {
932
- t = N("button"), U(t, "class", "ShowBalanceModalOverlay");
933
- },
934
- m(f, c) {
935
- fe(f, t, c), n || (h = Ne(
936
- t,
937
- "click",
938
- /*click_handler_3*/
939
- l[26]
940
- ), n = !0);
941
- },
942
- p: Ke,
943
- d(f) {
944
- f && ue(t), n = !1, h();
945
- }
946
- };
947
- }
948
- function It(l) {
949
- let t, n, h;
950
- function f(y, C) {
951
- return (
952
- /*isLoading*/
953
- y[1] ? jt : Nt
954
- );
955
- }
956
- let c = f(l), g = c(l), p = (
957
- /*isModalDisplayed*/
958
- l[2] && st(l)
959
- );
960
- return {
961
- c() {
962
- t = N("div"), n = N("div"), g.c(), h = pe(), p && p.c(), U(n, "class", "ShowBalance");
963
- },
964
- m(y, C) {
965
- fe(y, t, C), D(t, n), g.m(n, null), D(t, h), p && p.m(t, null), l[27](t);
966
- },
967
- p(y, C) {
968
- c === (c = f(y)) && g ? g.p(y, C) : (g.d(1), g = c(y), g && (g.c(), g.m(n, null))), /*isModalDisplayed*/
969
- y[2] ? p ? p.p(y, C) : (p = st(y), p.c(), p.m(t, null)) : p && (p.d(1), p = null);
970
- },
971
- i: Ke,
972
- o: Ke,
973
- d(y) {
974
- y && ue(t), g.d(), p && p.d(), l[27](null);
975
- }
976
- };
977
- }
978
- function Ht(l, t, n) {
979
- let h;
980
- Ct(l, Ft, (s) => n(4, h = s));
981
- let { userid: f = "" } = t, { session: c = "" } = t, { endpoint: g = "" } = t, { lang: p = "en" } = t, { mbsource: y } = t, { clientstyling: C = "" } = t, { clientstylingurl: S = "" } = t, { translationurl: A = "" } = t, { gmversion: E = "gm16" } = t, { displaybalanceoption: R = "All" } = t, { totalcalculationmode: M = "totalCashAmount" } = t, { currencylocale: Q = "en" } = t, { currencydisplay: ae = "symbol" } = t, { maximumfractiondigits: Z = "2" } = t, { minimumfractiondigits: X = "0" } = t, { customdisplayformat: _ = "" } = t, B, I = !0, L = !1, $ = !1, oe, re = "", K = [], he;
982
- const u = {}, me = ["totalCashAmount", "totalRealAmount"], _e = () => {
983
- fetch(A).then((s) => s.json()).then((s) => Object.keys(s).forEach((b) => et(b, s[b]))).catch((s) => console.log(s));
984
- };
985
- Object.keys(tt).forEach((s) => et(s, tt[s]));
986
- const Fe = (s) => {
987
- if (_)
988
- return Re(s);
989
- const b = Q || p, e = {
990
- style: "currency",
991
- currency: re,
992
- useGrouping: !0,
993
- currencyDisplay: ae || "code",
994
- maximumFractionDigits: Z === "" || isNaN(Number(Z)) ? 2 : Number(Z),
995
- minimumFractionDigits: X === "" || isNaN(Number(X)) ? 0 : Number(X)
996
- };
997
- return new Intl.NumberFormat(b, e).format(s);
998
- }, Re = (s) => {
999
- const b = [];
1000
- let e = "";
1001
- for (const a of _)
1002
- switch (a) {
1003
- default:
1004
- e += a;
1005
- break;
1006
- case "{":
1007
- e && b.push(e), e = "";
1008
- break;
1009
- case "}":
1010
- const [i, o] = e.split("|");
1011
- if (e = "", i.toLowerCase() === "currency")
1012
- e = re;
1013
- else if (i.toLowerCase() === "amount") {
1014
- let r = ",", d = ".", m = 2;
1015
- o && (o[0] !== " " && (r = o[0]), o[1] !== " " && (d = o[1]), o[2] !== " " && !isNaN(Number(o[2])) && (m = Number(o[2])));
1016
- let [x, w] = String(Math.floor(s * Xe(10, m)) / Xe(10, m)).split(".");
1017
- e += x[0];
1018
- for (let T = 1; T < x.length; ++T)
1019
- (x.length - T) % 3 === 0 ? e += r + x[T] : e += x[T];
1020
- w && (e += d + w);
1021
- }
1022
- e && b.push(e), e = "";
1023
- break;
1024
- }
1025
- return b.push(e), b.join("");
1026
- }, te = () => $e(this, null, function* () {
1027
- var b, e, a;
1028
- n(1, I = !0);
1029
- const s = new URL(`${g}/v1/player/${f}/account`);
1030
- try {
1031
- const i = yield fetch(s, {
1032
- method: "GET",
1033
- headers: { "X-SessionID": c }
1034
- }), o = yield i.json();
1035
- if (i.ok)
1036
- K = o.items, re = (b = K.find((r) => r.displayName === "Casino")) == null ? void 0 : b.currency, n(3, u.Total = [{ amount: o.totalAmount[re] }], u), n(
1037
- 3,
1038
- u.Real = [
1039
- {
1040
- amount: (e = K.find((r) => r.displayName === "Casino")) == null ? void 0 : e.balanceAmount
1041
- }
1042
- ],
1043
- u
1044
- ), n(
1045
- 3,
1046
- u.Bonus = [
1047
- {
1048
- amount: (a = K.find((r) => r.displayName === "UBS")) == null ? void 0 : a.balanceAmount
1049
- }
1050
- ],
1051
- u
1052
- );
1053
- else
1054
- throw new Error("Failed to fetch balance data !");
1055
- } catch (i) {
1056
- console.log("Balance error: ", i);
1057
- } finally {
1058
- n(1, I = !1);
1059
- }
1060
- }), ge = () => {
1061
- n(1, I = !0);
1062
- const s = new URL(`${g}/v2/player/${f}/balance`), b = new Headers();
1063
- b.append("X-SessionID", c), fetch(s, { method: "GET", headers: b }).then((a) => a.json()).then((a) => {
1064
- a[M] || n(7, M = me[0]);
1065
- const i = a.items.find((r) => r.type === "Real" && r.walletAccountType === "Ordinary");
1066
- if (re = i.currency, $ = !!i.productType, n(3, u.Total = [{ amount: 0 }], u), n(3, u.Real = [], u), n(3, u.Bonus = [], u), n(3, u.Credit = [], u), !$) {
1067
- he = {
1068
- lastOrdinaryAfterAmount: 0,
1069
- showCreditLineAfterAmount: !1
1070
- }, n(3, u.Total[0].amount = a[M][re], u);
1071
- for (const r of a.items)
1072
- switch (r.type) {
1073
- case "Bonus":
1074
- u.Bonus.length === 0 ? u.Bonus.push({ amount: r.amount }) : n(3, u.Bonus[0].amount += r.amount, u);
1075
- break;
1076
- case "Real":
1077
- if (r.creditLine && u.Credit.length === 0 && u.Credit.push({ amount: r.creditLine }), M === "totalRealAmount")
1078
- continue;
1079
- u.Real.length === 0 ? u.Real.push({ amount: r.amount }) : n(3, u.Real[0].amount += r.amount, u);
1080
- break;
1081
- }
1082
- for (const [r, d] of Object.entries(u))
1083
- d.length < 1 && delete u[r];
1084
- n(1, I = !1);
1085
- return;
1086
- }
1087
- he = {
1088
- Casino: {
1089
- lastOrdinaryAfterAmount: 0,
1090
- showCreditLineAfterAmount: !1
1091
- },
1092
- Sports: {
1093
- lastOrdinaryAfterAmount: 0,
1094
- showCreditLineAfterAmount: !1
1095
- }
1096
- };
1097
- let o = a.items;
1098
- R && R !== "All" && (o = a.items.filter((r) => r.productType === R));
1099
- for (const r of o) {
1100
- let d;
1101
- switch (r.type) {
1102
- case "Bonus":
1103
- d = u.Bonus.findIndex((m) => m.productType === r.productType), d > 0 ? n(3, u.Bonus[d].amount += r.amount, u) : u.Bonus.push({
1104
- amount: r.amount,
1105
- productType: r.productType
1106
- });
1107
- break;
1108
- case "Real":
1109
- r.creditLine && u.Credit.push({
1110
- amount: r.creditLine,
1111
- productType: r.productType
1112
- }), d = u.Real.findIndex((m) => m.productType === r.productType), d > 0 ? n(3, u.Real[d].amount += r.amount, u) : u.Real.push({
1113
- amount: r.amount,
1114
- productType: r.productType
1115
- });
1116
- break;
1117
- }
1118
- }
1119
- xe();
1120
- for (const [r, d] of Object.entries(u))
1121
- d.length < 1 && delete u[r];
1122
- n(1, I = !1);
1123
- }).catch(() => {
1124
- throw n(1, I = !1), new Error("Failed to fetch balance data !");
1125
- });
1126
- }, ie = () => {
1127
- if (oe && oe.close(), c.length < 1)
1128
- return;
1129
- let s, b;
1130
- switch (E) {
1131
- case "gm16":
1132
- s = new URL(`${g}/v2/player/${f}/information/updates`), b = (i) => Ie(i);
1133
- break;
1134
- case "gmcore":
1135
- s = new URL(`${g}/v1/player/${f}/balance/updates`), b = (i) => ne(i);
1136
- break;
1137
- }
1138
- const e = {
1139
- accept: "text/event-stream",
1140
- "X-SessionId": c
1141
- }, a = new kt.EventSourcePolyfill(s, { headers: e });
1142
- oe = a, a.addEventListener("message", b);
1143
- }, Te = (s) => {
1144
- let b;
1145
- try {
1146
- b = JSON.parse(s);
1147
- } catch (e) {
1148
- console.log("Balance stream failed: ", e);
1149
- return;
1150
- }
1151
- return b;
1152
- }, ne = (s) => {
1153
- var i, o;
1154
- const b = Te(s.data);
1155
- if (!b) {
1156
- ie();
1157
- return;
1158
- }
1159
- let e = "0";
1160
- const a = b.balanceChange;
1161
- K = K.map((r) => (a && a[r.id] && (r = Ze(Qe({}, r), {
1162
- balanceAmount: a[r.id].afterAmount
1163
- })), e = (parseFloat(r == null ? void 0 : r.balanceAmount) + parseFloat(e)).toString(), r)), n(3, u.Real = [{ amount: (i = K[0]) == null ? void 0 : i.balanceAmount }], u), n(3, u.Bonus = [{ amount: (o = K[1]) == null ? void 0 : o.balanceAmount }], u), n(3, u.Total = [{ amount: Number(e) }], u);
1164
- }, ve = (s, b, e) => {
1165
- let a = null;
1166
- switch (e.walletAccountType) {
1167
- case "Ordinary":
1168
- (e.afterAmount !== e.affectedAmount || b.lastOrdinaryAfterAmount === 0) && (b.lastOrdinaryAfterAmount = e.afterAmount, b.showCreditLineAfterAmount || (a = e.afterAmount));
1169
- break;
1170
- case "CreditLine":
1171
- e.afterAmount !== 0 ? (a = e.afterAmount, b.showCreditLineAfterAmount = !0) : (a = b.lastOrdinaryAfterAmount, b.showCreditLineAfterAmount = !1);
1172
- break;
1173
- default:
1174
- a = e.afterAmount;
1175
- }
1176
- return a === null ? s : a;
1177
- }, xe = () => {
1178
- switch (M) {
1179
- case "totalCashAmount":
1180
- let s = 0;
1181
- for (const e of ["Real", "Bonus"])
1182
- for (const a of u[e])
1183
- s += Math.max(a.amount, 0);
1184
- n(3, u.Total[0].amount = s, u);
1185
- break;
1186
- case "totalRealAmount":
1187
- if (!$)
1188
- return;
1189
- let b = 0;
1190
- for (const e of u.Real)
1191
- b += e.amount;
1192
- n(3, u.Total[0].amount = b, u);
1193
- }
1194
- }, Ie = (s) => {
1195
- const b = Te(s.data);
1196
- if (!b) {
1197
- ie();
1198
- return;
1199
- }
1200
- if (b.type !== "BALANCE_UPDATE_V2")
1201
- return;
1202
- const e = b.body.balanceChange;
1203
- for (const [a, i] of Object.entries(e))
1204
- if (M === "totalRealAmount" && a === "Real" && !$ && n(3, u.Total[0].amount = ve(u.Total[0].amount, he, i), u), !!u[a])
1205
- for (const o of u[a]) {
1206
- if (!$) {
1207
- o.amount = a === "Real" ? ve(o.amount, he, i) : i.afterAmount;
1208
- continue;
1209
- }
1210
- i.productType === o.productType && (o.amount = a === "Real" ? ve(o.amount, he[o.productType], i) : i.afterAmount);
1211
- }
1212
- xe();
1213
- }, Me = () => {
1214
- n(2, L = !1), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
1215
- }, He = () => {
1216
- me.includes(M) || (console.error(`Unsupported value ('${M}') for totalcalculationmode parameter. Only the following values are supported ${me}. Using default value ('${me[0]}').`), n(7, M = me[0]));
1217
- }, ze = () => {
1218
- switch (Mt(p), He(), E) {
1219
- case "gmcore":
1220
- te();
1221
- break;
1222
- case "gm16":
1223
- ge();
1224
- break;
1225
- default:
1226
- throw Error(`Invalid apiversion attribute: ${E}`);
1227
- }
1228
- }, Ce = (s) => s.data && s.data.type === "LogoutSuccessfull" && oe.close();
1229
- St(() => (window.addEventListener("message", Ce, !1), () => {
1230
- window.removeEventListener("message", Ce), oe && oe.close();
1231
- }));
1232
- const Ee = () => n(2, L = !0), ye = () => n(2, L = !1), q = () => Me(), Ue = () => n(2, L = !1);
1233
- function Pe(s) {
1234
- At[s ? "unshift" : "push"](() => {
1235
- B = s, n(0, B);
1236
- });
1237
- }
1238
- return l.$$set = (s) => {
1239
- "userid" in s && n(8, f = s.userid), "session" in s && n(9, c = s.session), "endpoint" in s && n(10, g = s.endpoint), "lang" in s && n(11, p = s.lang), "mbsource" in s && n(12, y = s.mbsource), "clientstyling" in s && n(13, C = s.clientstyling), "clientstylingurl" in s && n(14, S = s.clientstylingurl), "translationurl" in s && n(15, A = s.translationurl), "gmversion" in s && n(16, E = s.gmversion), "displaybalanceoption" in s && n(17, R = s.displaybalanceoption), "totalcalculationmode" in s && n(7, M = s.totalcalculationmode), "currencylocale" in s && n(18, Q = s.currencylocale), "currencydisplay" in s && n(19, ae = s.currencydisplay), "maximumfractiondigits" in s && n(20, Z = s.maximumfractiondigits), "minimumfractiondigits" in s && n(21, X = s.minimumfractiondigits), "customdisplayformat" in s && n(22, _ = s.customdisplayformat);
1240
- }, l.$$.update = () => {
1241
- l.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
1242
- 200448 && g && f && c && p && E && R && ze(), l.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
1243
- 67328 && g && f && c && E && ie(), l.$$.dirty[0] & /*clientstyling, customStylingContainer*/
1244
- 8193 && C && B && xt(B, C), l.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
1245
- 16385 && S && B && Et(B, S), l.$$.dirty[0] & /*customStylingContainer, mbsource*/
1246
- 4097 && B && Dt(B, `${y}.Style`), l.$$.dirty[0] & /*translationurl*/
1247
- 32768 && A && _e();
1248
- }, [
1249
- B,
1250
- I,
1251
- L,
1252
- u,
1253
- h,
1254
- Fe,
1255
- Me,
1256
- M,
1257
- f,
1258
- c,
1259
- g,
1260
- p,
1261
- y,
1262
- C,
1263
- S,
1264
- A,
1265
- E,
1266
- R,
1267
- Q,
1268
- ae,
1269
- Z,
1270
- X,
1271
- _,
1272
- Ee,
1273
- ye,
1274
- q,
1275
- Ue,
1276
- Pe
1277
- ];
1278
- }
1279
- class zt extends bt {
1280
- constructor(t) {
1281
- super(), wt(
1282
- this,
1283
- t,
1284
- Ht,
1285
- It,
1286
- Bt,
1287
- {
1288
- userid: 8,
1289
- session: 9,
1290
- endpoint: 10,
1291
- lang: 11,
1292
- mbsource: 12,
1293
- clientstyling: 13,
1294
- clientstylingurl: 14,
1295
- translationurl: 15,
1296
- gmversion: 16,
1297
- displaybalanceoption: 17,
1298
- totalcalculationmode: 7,
1299
- currencylocale: 18,
1300
- currencydisplay: 19,
1301
- maximumfractiondigits: 20,
1302
- minimumfractiondigits: 21,
1303
- customdisplayformat: 22
1304
- },
1305
- Ot,
1306
- [-1, -1]
1307
- );
1308
- }
1309
- get userid() {
1310
- return this.$$.ctx[8];
1311
- }
1312
- set userid(t) {
1313
- this.$$set({ userid: t }), z();
1314
- }
1315
- get session() {
1316
- return this.$$.ctx[9];
1317
- }
1318
- set session(t) {
1319
- this.$$set({ session: t }), z();
1320
- }
1321
- get endpoint() {
1322
- return this.$$.ctx[10];
1323
- }
1324
- set endpoint(t) {
1325
- this.$$set({ endpoint: t }), z();
1326
- }
1327
- get lang() {
1328
- return this.$$.ctx[11];
1329
- }
1330
- set lang(t) {
1331
- this.$$set({ lang: t }), z();
1332
- }
1333
- get mbsource() {
1334
- return this.$$.ctx[12];
1335
- }
1336
- set mbsource(t) {
1337
- this.$$set({ mbsource: t }), z();
1338
- }
1339
- get clientstyling() {
1340
- return this.$$.ctx[13];
1341
- }
1342
- set clientstyling(t) {
1343
- this.$$set({ clientstyling: t }), z();
1344
- }
1345
- get clientstylingurl() {
1346
- return this.$$.ctx[14];
1347
- }
1348
- set clientstylingurl(t) {
1349
- this.$$set({ clientstylingurl: t }), z();
1350
- }
1351
- get translationurl() {
1352
- return this.$$.ctx[15];
1353
- }
1354
- set translationurl(t) {
1355
- this.$$set({ translationurl: t }), z();
1356
- }
1357
- get gmversion() {
1358
- return this.$$.ctx[16];
1359
- }
1360
- set gmversion(t) {
1361
- this.$$set({ gmversion: t }), z();
1362
- }
1363
- get displaybalanceoption() {
1364
- return this.$$.ctx[17];
1365
- }
1366
- set displaybalanceoption(t) {
1367
- this.$$set({ displaybalanceoption: t }), z();
1368
- }
1369
- get totalcalculationmode() {
1370
- return this.$$.ctx[7];
1371
- }
1372
- set totalcalculationmode(t) {
1373
- this.$$set({ totalcalculationmode: t }), z();
1374
- }
1375
- get currencylocale() {
1376
- return this.$$.ctx[18];
1377
- }
1378
- set currencylocale(t) {
1379
- this.$$set({ currencylocale: t }), z();
1380
- }
1381
- get currencydisplay() {
1382
- return this.$$.ctx[19];
1383
- }
1384
- set currencydisplay(t) {
1385
- this.$$set({ currencydisplay: t }), z();
1386
- }
1387
- get maximumfractiondigits() {
1388
- return this.$$.ctx[20];
1389
- }
1390
- set maximumfractiondigits(t) {
1391
- this.$$set({ maximumfractiondigits: t }), z();
1392
- }
1393
- get minimumfractiondigits() {
1394
- return this.$$.ctx[21];
1395
- }
1396
- set minimumfractiondigits(t) {
1397
- this.$$set({ minimumfractiondigits: t }), z();
1398
- }
1399
- get customdisplayformat() {
1400
- return this.$$.ctx[22];
1401
- }
1402
- set customdisplayformat(t) {
1403
- this.$$set({ customdisplayformat: t }), z();
1404
- }
1405
- }
1406
- Lt(zt, { userid: {}, session: {}, endpoint: {}, lang: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, currencylocale: {}, currencydisplay: {}, maximumfractiondigits: {}, minimumfractiondigits: {}, customdisplayformat: {} }, [], [], !0);
1407
- export {
1408
- zt as default
1409
- };