@everymatrix/casino-header-controller-nd 1.73.2 → 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,1459 +0,0 @@
1
- var ft = Object.defineProperty, pt = Object.defineProperties;
2
- var ht = Object.getOwnPropertyDescriptors;
3
- var Ye = Object.getOwnPropertySymbols;
4
- var mt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable;
5
- var Xe = Math.pow, Je = (i, t, a) => t in i ? ft(i, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : i[t] = a, Qe = (i, t) => {
6
- for (var a in t || (t = {}))
7
- mt.call(t, a) && Je(i, a, t[a]);
8
- if (Ye)
9
- for (var a of Ye(t))
10
- gt.call(t, a) && Je(i, a, t[a]);
11
- return i;
12
- }, Ze = (i, t) => pt(i, ht(t));
13
- var $e = (i, t, a) => new Promise((g, h) => {
14
- var d = (v) => {
15
- try {
16
- m(a.next(v));
17
- } catch (b) {
18
- h(b);
19
- }
20
- }, B = (v) => {
21
- try {
22
- m(a.throw(v));
23
- } catch (b) {
24
- h(b);
25
- }
26
- }, m = (v) => v.done ? g(v.value) : Promise.resolve(v.value).then(d, B);
27
- m((a = a.apply(i, t)).next());
28
- });
29
- import { b as yt, $ as vt, N as wt, S as bt, i as Bt, s as Tt, f as G, d as St, A as Ke, g as me, k as C, o as ge, p as _, r as I, v as ye, w as Ct, x as _t, y as At, q as je, B as xt, D as Be, E as Te, F as et, z as Rt, G as He, H as ct, C as Et, K as Dt, L as Mt, M as Lt, c as kt, J as Ot } from "./CasinoHamburgerMenuNd-D5qHcIAM.js";
30
- function tt(i, t) {
31
- yt(i, t);
32
- }
33
- function Nt(i) {
34
- vt.set(i);
35
- }
36
- const at = {
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(i, t) {
243
- (function(a) {
244
- var g = a.setTimeout, h = a.clearTimeout, d = a.XMLHttpRequest, B = a.XDomainRequest, m = a.ActiveXObject, v = a.EventSource, b = a.document, M = a.Promise, k = a.fetch, L = a.Response, A = a.TextDecoder, T = a.TextEncoder, x = a.AbortController;
245
- if (typeof window != "undefined" && typeof b != "undefined" && !("readyState" in b) && b.body == null && (b.readyState = "loading", window.addEventListener("load", function(n) {
246
- b.readyState = "complete";
247
- }, !1)), d == null && m != null && (d = function() {
248
- return new m("Microsoft.XMLHTTP");
249
- }), Object.create == null && (Object.create = function(n) {
250
- function c() {
251
- }
252
- return c.prototype = n, new c();
253
- }), Date.now || (Date.now = function() {
254
- return (/* @__PURE__ */ new Date()).getTime();
255
- }), x == null) {
256
- var j = k;
257
- k = function(n, c) {
258
- var u = c.signal;
259
- return j(n, { headers: c.headers, credentials: c.credentials, cache: c.cache }).then(function(e) {
260
- var r = e.body.getReader();
261
- return u._reader = r, u._aborted && u._reader.cancel(), {
262
- status: e.status,
263
- statusText: e.statusText,
264
- headers: e.headers,
265
- body: {
266
- getReader: function() {
267
- return r;
268
- }
269
- }
270
- };
271
- });
272
- }, x = 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 ee() {
282
- this.bitsNeeded = 0, this.codePoint = 0;
283
- }
284
- ee.prototype.decode = function(n) {
285
- function c(l, S, y) {
286
- if (y === 1)
287
- return l >= 128 >> S && l << S <= 2047;
288
- if (y === 2)
289
- return l >= 2048 >> S && l << S <= 55295 || l >= 57344 >> S && l << S <= 65535;
290
- if (y === 3)
291
- return l >= 65536 >> S && l << S <= 1114111;
292
- throw new Error();
293
- }
294
- function u(l, S) {
295
- if (l === 6 * 1)
296
- return S >> 6 > 15 ? 3 : S > 31 ? 2 : 1;
297
- if (l === 6 * 2)
298
- return S > 15 ? 3 : 2;
299
- if (l === 6 * 3)
300
- return 3;
301
- throw new Error();
302
- }
303
- for (var e = 65533, r = "", o = this.bitsNeeded, s = this.codePoint, w = 0; w < n.length; w += 1) {
304
- var p = n[w];
305
- o !== 0 && (p < 128 || p > 191 || !c(s << 6 | p & 63, o - 6, u(o, s))) && (o = 0, s = e, r += String.fromCharCode(s)), o === 0 ? (p >= 0 && p <= 127 ? (o = 0, s = p) : p >= 192 && p <= 223 ? (o = 6 * 1, s = p & 31) : p >= 224 && p <= 239 ? (o = 6 * 2, s = p & 15) : p >= 240 && p <= 247 ? (o = 6 * 3, s = p & 7) : (o = 0, s = e), o !== 0 && !c(s, o, u(o, s)) && (o = 0, s = e)) : (o -= 6, s = s << 6 | p & 63), o === 0 && (s <= 65535 ? r += String.fromCharCode(s) : (r += String.fromCharCode(55296 + (s - 65535 - 1 >> 10)), r += String.fromCharCode(56320 + (s - 65535 - 1 & 1023))));
306
- }
307
- return this.bitsNeeded = o, this.codePoint = s, r;
308
- };
309
- var te = function() {
310
- try {
311
- return new A().decode(new T().encode("test"), { stream: !0 }) === "test";
312
- } catch (n) {
313
- console.debug("TextDecoder does not support streaming option. Using polyfill instead: " + n);
314
- }
315
- return !1;
316
- };
317
- (A == null || T == null || !te()) && (A = ee);
318
- var F = function() {
319
- };
320
- function O(n) {
321
- this.withCredentials = !1, this.readyState = 0, this.status = 0, this.statusText = "", this.responseText = "", this.onprogress = F, this.onload = F, this.onerror = F, this.onreadystatechange = F, this._contentType = "", this._xhr = n, this._sendTimeout = 0, this._abort = F;
322
- }
323
- O.prototype.open = function(n, c) {
324
- this._abort(!0);
325
- var u = this, e = this._xhr, r = 1, o = 0;
326
- this._abort = function(y) {
327
- u._sendTimeout !== 0 && (h(u._sendTimeout), u._sendTimeout = 0), (r === 1 || r === 2 || r === 3) && (r = 4, e.onload = F, e.onerror = F, e.onabort = F, e.onprogress = F, e.onreadystatechange = F, e.abort(), o !== 0 && (h(o), o = 0), y || (u.readyState = 4, u.onabort(null), u.onreadystatechange())), r = 0;
328
- };
329
- var s = function() {
330
- if (r === 1) {
331
- var y = 0, R = "", ne = void 0;
332
- if ("contentType" in e)
333
- y = 200, R = "OK", ne = e.contentType;
334
- else
335
- try {
336
- y = e.status, R = e.statusText, ne = e.getResponseHeader("Content-Type");
337
- } catch (re) {
338
- y = 0, R = "", ne = void 0;
339
- }
340
- y !== 0 && (r = 2, u.readyState = 2, u.status = y, u.statusText = R, u._contentType = ne, u.onreadystatechange());
341
- }
342
- }, w = function() {
343
- if (s(), r === 2 || r === 3) {
344
- r = 3;
345
- var y = "";
346
- try {
347
- y = e.responseText;
348
- } catch (R) {
349
- }
350
- u.readyState = 3, u.responseText = y, u.onprogress();
351
- }
352
- }, p = function(y, R) {
353
- if ((R == null || R.preventDefault == null) && (R = {
354
- preventDefault: F
355
- }), w(), r === 1 || r === 2 || r === 3) {
356
- if (r = 4, o !== 0 && (h(o), o = 0), u.readyState = 4, y === "load")
357
- u.onload(R);
358
- else if (y === "error")
359
- u.onerror(R);
360
- else if (y === "abort")
361
- u.onabort(R);
362
- else
363
- throw new TypeError();
364
- u.onreadystatechange();
365
- }
366
- }, l = function(y) {
367
- e != null && (e.readyState === 4 ? (!("onload" in e) || !("onerror" in e) || !("onabort" in e)) && p(e.responseText === "" ? "error" : "load", y) : e.readyState === 3 ? "onprogress" in e || w() : e.readyState === 2 && s());
368
- }, S = function() {
369
- o = g(function() {
370
- S();
371
- }, 500), e.readyState === 3 && w();
372
- };
373
- "onload" in e && (e.onload = function(y) {
374
- p("load", y);
375
- }), "onerror" in e && (e.onerror = function(y) {
376
- p("error", y);
377
- }), "onabort" in e && (e.onabort = function(y) {
378
- p("abort", y);
379
- }), "onprogress" in e && (e.onprogress = w), "onreadystatechange" in e && (e.onreadystatechange = function(y) {
380
- l(y);
381
- }), ("contentType" in e || !("ontimeout" in d.prototype)) && (c += (c.indexOf("?") === -1 ? "?" : "&") + "padding=true"), e.open(n, c, !0), "readyState" in e && (o = g(function() {
382
- S();
383
- }, 0));
384
- }, O.prototype.abort = function() {
385
- this._abort(!1);
386
- }, O.prototype.getResponseHeader = function(n) {
387
- return this._contentType;
388
- }, O.prototype.setRequestHeader = function(n, c) {
389
- var u = this._xhr;
390
- "setRequestHeader" in u && u.setRequestHeader(n, c);
391
- }, O.prototype.getAllResponseHeaders = function() {
392
- return this._xhr.getAllResponseHeaders != null && this._xhr.getAllResponseHeaders() || "";
393
- }, O.prototype.send = function() {
394
- if ((!("ontimeout" in d.prototype) || !("sendAsBinary" in d.prototype) && !("mozAnon" in d.prototype)) && b != null && b.readyState != null && b.readyState !== "complete") {
395
- var n = this;
396
- n._sendTimeout = g(function() {
397
- n._sendTimeout = 0, n.send();
398
- }, 4);
399
- return;
400
- }
401
- var c = this._xhr;
402
- "withCredentials" in c && (c.withCredentials = this.withCredentials);
403
- try {
404
- c.send(void 0);
405
- } catch (u) {
406
- throw u;
407
- }
408
- };
409
- function Y(n) {
410
- return n.replace(/[A-Z]/g, function(c) {
411
- return String.fromCharCode(c.charCodeAt(0) + 32);
412
- });
413
- }
414
- function ce(n) {
415
- for (var c = /* @__PURE__ */ Object.create(null), u = n.split(`\r
416
- `), e = 0; e < u.length; e += 1) {
417
- var r = u[e], o = r.split(": "), s = o.shift(), w = o.join(": ");
418
- c[Y(s)] = w;
419
- }
420
- this._map = c;
421
- }
422
- ce.prototype.get = function(n) {
423
- return this._map[Y(n)];
424
- }, d != null && d.HEADERS_RECEIVED == null && (d.HEADERS_RECEIVED = 2);
425
- function X() {
426
- }
427
- X.prototype.open = function(n, c, u, e, r, o, s) {
428
- n.open("GET", r);
429
- var w = 0;
430
- n.onprogress = function() {
431
- var l = n.responseText, S = l.slice(w);
432
- w += S.length, u(S);
433
- }, n.onerror = function(l) {
434
- l.preventDefault(), e(new Error("NetworkError"));
435
- }, n.onload = function() {
436
- e(null);
437
- }, n.onabort = function() {
438
- e(null);
439
- }, n.onreadystatechange = function() {
440
- if (n.readyState === d.HEADERS_RECEIVED) {
441
- var l = n.status, S = n.statusText, y = n.getResponseHeader("Content-Type"), R = n.getAllResponseHeaders();
442
- c(l, S, y, new ce(R));
443
- }
444
- }, n.withCredentials = o;
445
- for (var p in s)
446
- Object.prototype.hasOwnProperty.call(s, p) && n.setRequestHeader(p, s[p]);
447
- return n.send(), n;
448
- };
449
- function N(n) {
450
- this._headers = n;
451
- }
452
- N.prototype.get = function(n) {
453
- return this._headers.get(n);
454
- };
455
- function E() {
456
- }
457
- E.prototype.open = function(n, c, u, e, r, o, s) {
458
- var w = null, p = new x(), l = p.signal, S = new A();
459
- return k(r, {
460
- headers: s,
461
- credentials: o ? "include" : "same-origin",
462
- signal: l,
463
- cache: "no-store"
464
- }).then(function(y) {
465
- return w = y.body.getReader(), c(y.status, y.statusText, y.headers.get("Content-Type"), new N(y.headers)), new M(function(R, ne) {
466
- var re = function() {
467
- w.read().then(function(Q) {
468
- if (Q.done)
469
- R(void 0);
470
- else {
471
- var K = S.decode(Q.value, { stream: !0 });
472
- u(K), re();
473
- }
474
- }).catch(function(Q) {
475
- ne(Q);
476
- });
477
- };
478
- re();
479
- });
480
- }).catch(function(y) {
481
- if (y.name !== "AbortError")
482
- return y;
483
- }).then(function(y) {
484
- e(y);
485
- }), {
486
- abort: function() {
487
- w != null && w.cancel(), p.abort();
488
- }
489
- };
490
- };
491
- function z() {
492
- this._listeners = /* @__PURE__ */ Object.create(null);
493
- }
494
- function D(n) {
495
- g(function() {
496
- throw n;
497
- }, 0);
498
- }
499
- z.prototype.dispatchEvent = function(n) {
500
- n.target = this;
501
- var c = this._listeners[n.type];
502
- if (c != null)
503
- for (var u = c.length, e = 0; e < u; e += 1) {
504
- var r = c[e];
505
- try {
506
- typeof r.handleEvent == "function" ? r.handleEvent(n) : r.call(this, n);
507
- } catch (o) {
508
- D(o);
509
- }
510
- }
511
- }, z.prototype.addEventListener = function(n, c) {
512
- n = String(n);
513
- var u = this._listeners, e = u[n];
514
- e == null && (e = [], u[n] = e);
515
- for (var r = !1, o = 0; o < e.length; o += 1)
516
- e[o] === c && (r = !0);
517
- r || e.push(c);
518
- }, z.prototype.removeEventListener = function(n, c) {
519
- n = String(n);
520
- var u = this._listeners, e = u[n];
521
- if (e != null) {
522
- for (var r = [], o = 0; o < e.length; o += 1)
523
- e[o] !== c && r.push(e[o]);
524
- r.length === 0 ? delete u[n] : u[n] = r;
525
- }
526
- };
527
- function P(n) {
528
- this.type = n, this.target = void 0;
529
- }
530
- function oe(n, c) {
531
- P.call(this, n), this.data = c.data, this.lastEventId = c.lastEventId;
532
- }
533
- oe.prototype = Object.create(P.prototype);
534
- function de(n, c) {
535
- P.call(this, n), this.status = c.status, this.statusText = c.statusText, this.headers = c.headers;
536
- }
537
- de.prototype = Object.create(P.prototype);
538
- function f(n, c) {
539
- P.call(this, n), this.error = c.error;
540
- }
541
- f.prototype = Object.create(P.prototype);
542
- var ue = -1, le = 0, ae = 1, we = 2, xe = -1, se = 0, Re = 1, Se = 2, Le = 3, ze = /^text\/event\-stream(;.*)?$/i, Ee = 1e3, ke = 18e6, De = function(n, c) {
543
- var u = n == null ? c : parseInt(n, 10);
544
- return u !== u && (u = c), Ce(u);
545
- }, Ce = function(n) {
546
- return Math.min(Math.max(n, Ee), ke);
547
- }, ve = function(n, c, u) {
548
- try {
549
- typeof c == "function" && c.call(n, u);
550
- } catch (e) {
551
- D(e);
552
- }
553
- };
554
- function J(n, c) {
555
- z.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, Ue(this, n, c);
556
- }
557
- function Oe() {
558
- return d != null && "withCredentials" in d.prototype || B == null ? new d() : new B();
559
- }
560
- var Ve = k != null && L != null && "body" in L.prototype;
561
- function Ue(n, c, u) {
562
- c = String(c);
563
- var e = !!u.withCredentials, r = u.lastEventIdQueryParameterName || "lastEventId", o = Ce(1e3), s = De(u.heartbeatTimeout, 45e3), w = "", p = o, l = !1, S = 0, y = u.headers || {}, R = u.Transport, ne = Ve && R == null ? void 0 : new O(R != null ? new R() : Oe()), re = R != null && typeof R != "string" ? new R() : ne == null ? new E() : new X(), Q = void 0, K = 0, ie = ue, _e = "", Fe = "", fe = "", Ie = "", q = se, Pe = 0, be = 0, dt = function(V, H, Z, $) {
564
- if (ie === le)
565
- if (V === 200 && Z != null && ze.test(Z)) {
566
- ie = ae, l = Date.now(), p = o, n.readyState = ae;
567
- var W = new de("open", {
568
- status: V,
569
- statusText: H,
570
- headers: $
571
- });
572
- n.dispatchEvent(W), ve(n, n.onopen, W);
573
- } else {
574
- var U = "";
575
- V !== 200 ? (H && (H = H.replace(/\s+/g, " ")), U = "EventSource's response has a status " + V + " " + H + " that is not 200. Aborting the connection.") : U = "EventSource's response has a Content-Type specifying an unsupported type: " + (Z == null ? "-" : Z.replace(/\s+/g, " ")) + ". Aborting the connection.", Ge();
576
- var W = new de("error", {
577
- status: V,
578
- statusText: H,
579
- headers: $
580
- });
581
- n.dispatchEvent(W), ve(n, n.onerror, W), console.error(U);
582
- }
583
- }, ut = function(V) {
584
- if (ie === ae) {
585
- for (var H = -1, Z = 0; Z < V.length; Z += 1) {
586
- var $ = V.charCodeAt(Z);
587
- ($ === 10 || $ === 13) && (H = Z);
588
- }
589
- var W = (H !== -1 ? Ie : "") + V.slice(0, H + 1);
590
- Ie = (H === -1 ? Ie : "") + V.slice(H + 1), V !== "" && (l = Date.now(), S += V.length);
591
- for (var U = 0; U < W.length; U += 1) {
592
- var $ = W.charCodeAt(U);
593
- if (q === xe && $ === 10)
594
- q = se;
595
- else if (q === xe && (q = se), $ === 13 || $ === 10) {
596
- if (q !== se) {
597
- q === Re && (be = U + 1);
598
- var pe = W.slice(Pe, be - 1), he = W.slice(be + (be < U && W.charCodeAt(be) === 32 ? 1 : 0), U);
599
- pe === "data" ? (_e += `
600
- `, _e += he) : pe === "id" ? Fe = he : pe === "event" ? fe = he : pe === "retry" ? (o = De(he, o), p = o) : pe === "heartbeatTimeout" && (s = De(he, s), K !== 0 && (h(K), K = g(function() {
601
- Me();
602
- }, s)));
603
- }
604
- if (q === se) {
605
- if (_e !== "") {
606
- w = Fe, fe === "" && (fe = "message");
607
- var Ae = new oe(fe, {
608
- data: _e.slice(1),
609
- lastEventId: Fe
610
- });
611
- if (n.dispatchEvent(Ae), fe === "open" ? ve(n, n.onopen, Ae) : fe === "message" ? ve(n, n.onmessage, Ae) : fe === "error" && ve(n, n.onerror, Ae), ie === we)
612
- return;
613
- }
614
- _e = "", fe = "";
615
- }
616
- q = $ === 13 ? xe : se;
617
- } else
618
- q === se && (Pe = U, q = Re), q === Re ? $ === 58 && (be = U + 1, q = Se) : q === Se && (q = Le);
619
- }
620
- }
621
- }, We = function(V) {
622
- if (ie === ae || ie === le) {
623
- ie = ue, K !== 0 && (h(K), K = 0), K = g(function() {
624
- Me();
625
- }, p), p = Ce(Math.min(o * 16, p * 2)), n.readyState = le;
626
- var H = new f("error", { error: V });
627
- n.dispatchEvent(H), ve(n, n.onerror, H), V != null && console.error(V);
628
- }
629
- }, Ge = function() {
630
- ie = we, Q != null && (Q.abort(), Q = void 0), K !== 0 && (h(K), K = 0), n.readyState = we;
631
- }, Me = function() {
632
- if (K = 0, ie !== ue) {
633
- if (!l && Q != null)
634
- We(new Error("No activity within " + s + " milliseconds. " + (ie === le ? "No response received." : S + " chars received.") + " Reconnecting.")), Q != null && (Q.abort(), Q = void 0);
635
- else {
636
- var V = Math.max((l || Date.now()) + s - Date.now(), 1);
637
- l = !1, K = g(function() {
638
- Me();
639
- }, V);
640
- }
641
- return;
642
- }
643
- l = !1, S = 0, K = g(function() {
644
- Me();
645
- }, s), ie = le, _e = "", fe = "", Fe = w, Ie = "", Pe = 0, be = 0, q = se;
646
- var H = c;
647
- if (c.slice(0, 5) !== "data:" && c.slice(0, 5) !== "blob:" && w !== "") {
648
- var Z = c.indexOf("?");
649
- H = Z === -1 ? c : c.slice(0, Z + 1) + c.slice(Z + 1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g, function(he, Ae) {
650
- return Ae === r ? "" : he;
651
- }), H += (c.indexOf("?") === -1 ? "?" : "&") + r + "=" + encodeURIComponent(w);
652
- }
653
- var $ = n.withCredentials, W = {};
654
- W.Accept = "text/event-stream";
655
- var U = n.headers;
656
- if (U != null)
657
- for (var pe in U)
658
- Object.prototype.hasOwnProperty.call(U, pe) && (W[pe] = U[pe]);
659
- try {
660
- Q = re.open(ne, dt, ut, We, H, $, W);
661
- } catch (he) {
662
- throw Ge(), he;
663
- }
664
- };
665
- n.url = c, n.readyState = le, n.withCredentials = e, n.headers = y, n._close = Ge, Me();
666
- }
667
- J.prototype = Object.create(z.prototype), J.prototype.CONNECTING = le, J.prototype.OPEN = ae, J.prototype.CLOSED = we, J.prototype.close = function() {
668
- this._close();
669
- }, J.CONNECTING = le, J.OPEN = ae, J.CLOSED = we, J.prototype.withCredentials = void 0;
670
- var Ne = v;
671
- d != null && (v == null || !("withCredentials" in v.prototype)) && (Ne = J), function(n) {
672
- {
673
- var c = n(t);
674
- c !== void 0 && (i.exports = c);
675
- }
676
- }(function(n) {
677
- n.EventSourcePolyfill = J, n.NativeEventSource = v, n.EventSource = Ne;
678
- });
679
- })(typeof globalThis == "undefined" ? typeof window != "undefined" ? window : typeof self != "undefined" ? self : wt : globalThis);
680
- })(qe, qe.exports);
681
- var Ft = qe.exports;
682
- function It(i) {
683
- St(i, "svelte-lfsn3o", '*,*::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}.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}');
684
- }
685
- function nt(i, t, a) {
686
- const g = i.slice();
687
- return g[53] = t[a], g;
688
- }
689
- function ot(i, t, a) {
690
- const g = i.slice();
691
- return g[56] = t[a], g;
692
- }
693
- function jt(i) {
694
- let t, a, g = (
695
- /*balances*/
696
- (i[1].Total ? (
697
- /*formatBalance*/
698
- i[8](
699
- /*balances*/
700
- i[1].Total[0].amount
701
- )
702
- ) : "0") + ""
703
- ), h, d, B, m, v, b, M, k, L, A, T = (
704
- /*showBalance*/
705
- i[4] && rt(i)
706
- );
707
- return {
708
- c() {
709
- t = I("button"), a = I("p"), h = Te(g), d = ye(), B = I("span"), m = et("svg"), v = et("path"), M = ye(), T && T.c(), k = Rt(), C(v, "id", "arrow"), C(v, "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"), C(v, "transform", "translate(-274.511 -441.088)"), C(v, "fill", "#d1d1d1"), C(m, "xmlns", "http://www.w3.org/2000/svg"), C(m, "width", "14"), C(m, "height", "6.835"), C(m, "viewBox", "0 0 14 6.835"), C(B, "class", b = /*isModalDisplayed*/
710
- i[3] ? "TriangleActive" : "TriangleInactive"), C(t, "class", "BalanceValue");
711
- },
712
- m(x, j) {
713
- ge(x, t, j), _(t, a), _(a, h), _(t, d), _(t, B), _(B, m), _(m, v), ge(x, M, j), T && T.m(x, j), ge(x, k, j), L || (A = je(
714
- t,
715
- "click",
716
- /*click_handler*/
717
- i[26]
718
- ), L = !0);
719
- },
720
- p(x, j) {
721
- j[0] & /*balances*/
722
- 2 && g !== (g = /*balances*/
723
- (x[1].Total ? (
724
- /*formatBalance*/
725
- x[8](
726
- /*balances*/
727
- x[1].Total[0].amount
728
- )
729
- ) : "0") + "") && Be(h, g), j[0] & /*isModalDisplayed*/
730
- 8 && b !== (b = /*isModalDisplayed*/
731
- x[3] ? "TriangleActive" : "TriangleInactive") && C(B, "class", b), /*showBalance*/
732
- x[4] ? T ? T.p(x, j) : (T = rt(x), T.c(), T.m(k.parentNode, k)) : T && (T.d(1), T = null);
733
- },
734
- d(x) {
735
- x && (me(t), me(M), me(k)), T && T.d(x), L = !1, A();
736
- }
737
- };
738
- }
739
- function Ht(i) {
740
- let t, a = (
741
- /*$_*/
742
- i[6]("Loading") + ""
743
- ), g;
744
- return {
745
- c() {
746
- t = I("p"), g = Te(a), C(t, "class", "Loading");
747
- },
748
- m(h, d) {
749
- ge(h, t, d), _(t, g);
750
- },
751
- p(h, d) {
752
- d[0] & /*$_*/
753
- 64 && a !== (a = /*$_*/
754
- h[6]("Loading") + "") && Be(g, a);
755
- },
756
- d(h) {
757
- h && me(t);
758
- }
759
- };
760
- }
761
- function rt(i) {
762
- let t, a, g, h, d, B, m, v, b = (
763
- /*$_*/
764
- i[6]("Title") + ""
765
- ), M, k, L, A, T, x, j = (
766
- /*$_*/
767
- i[6]("DepositButton") + ""
768
- ), ee, te, F, O, Y, ce, X = He(Object.keys(
769
- /*balances*/
770
- i[1]
771
- )), N = [];
772
- for (let E = 0; E < X.length; E += 1)
773
- N[E] = lt(nt(i, X, E));
774
- return {
775
- c() {
776
- t = I("div"), a = I("button"), h = ye(), d = I("div"), B = I("div"), m = I("div"), v = I("p"), M = Te(b), k = ye(), L = I("div");
777
- for (let E = 0; E < N.length; E += 1)
778
- N[E].c();
779
- A = ye(), T = I("div"), x = I("button"), ee = Te(j), C(a, "class", g = "BalanceModalClose " + /*isModalDisplayed*/
780
- (i[3] ? "Open" : "")), C(v, "class", "BalanceModalTitle"), C(m, "class", "BalanceModalHeader"), C(L, "class", "BalanceModalBody"), C(x, "class", "BalanceModalAction"), C(T, "class", "BalanceModalFooter"), C(B, "class", te = "ModalContent " + /*isModalDisplayed*/
781
- (i[3] ? "Open" : "")), C(d, "class", F = "BalanceModal " + /*isModalDisplayed*/
782
- (i[3] ? "Open" : "")), C(t, "class", O = "BalanceModalWrapper " + /*isModalDisplayed*/
783
- (i[3] ? "Open" : ""));
784
- },
785
- m(E, z) {
786
- ge(E, t, z), _(t, a), _(t, h), _(t, d), _(d, B), _(B, m), _(m, v), _(v, M), _(B, k), _(B, L);
787
- for (let D = 0; D < N.length; D += 1)
788
- N[D] && N[D].m(L, null);
789
- _(B, A), _(B, T), _(T, x), _(x, ee), Y || (ce = [
790
- je(
791
- a,
792
- "click",
793
- /*click_handler_1*/
794
- i[27]
795
- ),
796
- je(
797
- x,
798
- "click",
799
- /*click_handler_2*/
800
- i[28]
801
- )
802
- ], Y = !0);
803
- },
804
- p(E, z) {
805
- if (z[0] & /*isModalDisplayed*/
806
- 8 && g !== (g = "BalanceModalClose " + /*isModalDisplayed*/
807
- (E[3] ? "Open" : "")) && C(a, "class", g), z[0] & /*$_*/
808
- 64 && b !== (b = /*$_*/
809
- E[6]("Title") + "") && Be(M, b), z[0] & /*balances, formatBalance, $_*/
810
- 322) {
811
- X = He(Object.keys(
812
- /*balances*/
813
- E[1]
814
- ));
815
- let D;
816
- for (D = 0; D < X.length; D += 1) {
817
- const P = nt(E, X, D);
818
- N[D] ? N[D].p(P, z) : (N[D] = lt(P), N[D].c(), N[D].m(L, null));
819
- }
820
- for (; D < N.length; D += 1)
821
- N[D].d(1);
822
- N.length = X.length;
823
- }
824
- z[0] & /*$_*/
825
- 64 && j !== (j = /*$_*/
826
- E[6]("DepositButton") + "") && Be(ee, j), z[0] & /*isModalDisplayed*/
827
- 8 && te !== (te = "ModalContent " + /*isModalDisplayed*/
828
- (E[3] ? "Open" : "")) && C(B, "class", te), z[0] & /*isModalDisplayed*/
829
- 8 && F !== (F = "BalanceModal " + /*isModalDisplayed*/
830
- (E[3] ? "Open" : "")) && C(d, "class", F), z[0] & /*isModalDisplayed*/
831
- 8 && O !== (O = "BalanceModalWrapper " + /*isModalDisplayed*/
832
- (E[3] ? "Open" : "")) && C(t, "class", O);
833
- },
834
- d(E) {
835
- E && me(t), ct(N, E), Y = !1, Et(ce);
836
- }
837
- };
838
- }
839
- function it(i) {
840
- let t, a, g = (
841
- /*$_*/
842
- i[6](
843
- /*k*/
844
- i[53]
845
- ) + ""
846
- ), h, d, B = (
847
- /*b*/
848
- (i[56].productType ? (
849
- /*$_*/
850
- i[6](
851
- /*b*/
852
- i[56].productType
853
- )
854
- ) : "") + ""
855
- ), m, v, b, M, k = (
856
- /*formatBalance*/
857
- i[8](
858
- /*b*/
859
- i[56].amount
860
- ) + ""
861
- ), L;
862
- return {
863
- c() {
864
- t = I("div"), a = I("p"), h = Te(g), d = ye(), m = Te(B), v = ye(), b = I("p"), M = I("span"), L = Te(k), C(a, "class", "BalanceModalText"), C(M, "class", "BalanceModalAmount"), C(b, "class", "BalanceModalValue"), C(t, "class", "BalanceModalRowLine");
865
- },
866
- m(A, T) {
867
- ge(A, t, T), _(t, a), _(a, h), _(a, d), _(a, m), _(t, v), _(t, b), _(b, M), _(M, L);
868
- },
869
- p(A, T) {
870
- T[0] & /*$_, balances*/
871
- 66 && g !== (g = /*$_*/
872
- A[6](
873
- /*k*/
874
- A[53]
875
- ) + "") && Be(h, g), T[0] & /*balances, $_*/
876
- 66 && B !== (B = /*b*/
877
- (A[56].productType ? (
878
- /*$_*/
879
- A[6](
880
- /*b*/
881
- A[56].productType
882
- )
883
- ) : "") + "") && Be(m, B), T[0] & /*balances*/
884
- 2 && k !== (k = /*formatBalance*/
885
- A[8](
886
- /*b*/
887
- A[56].amount
888
- ) + "") && Be(L, k);
889
- },
890
- d(A) {
891
- A && me(t);
892
- }
893
- };
894
- }
895
- function lt(i) {
896
- let t, a, g = He(
897
- /*balances*/
898
- i[1][
899
- /*k*/
900
- i[53]
901
- ]
902
- ), h = [];
903
- for (let d = 0; d < g.length; d += 1)
904
- h[d] = it(ot(i, g, d));
905
- return {
906
- c() {
907
- t = I("div");
908
- for (let d = 0; d < h.length; d += 1)
909
- h[d].c();
910
- a = ye(), C(t, "class", "BalanceModalRowBoth");
911
- },
912
- m(d, B) {
913
- ge(d, t, B);
914
- for (let m = 0; m < h.length; m += 1)
915
- h[m] && h[m].m(t, null);
916
- _(t, a);
917
- },
918
- p(d, B) {
919
- if (B[0] & /*formatBalance, balances, $_*/
920
- 322) {
921
- g = He(
922
- /*balances*/
923
- d[1][
924
- /*k*/
925
- d[53]
926
- ]
927
- );
928
- let m;
929
- for (m = 0; m < g.length; m += 1) {
930
- const v = ot(d, g, m);
931
- h[m] ? h[m].p(v, B) : (h[m] = it(v), h[m].c(), h[m].m(t, a));
932
- }
933
- for (; m < h.length; m += 1)
934
- h[m].d(1);
935
- h.length = g.length;
936
- }
937
- },
938
- d(d) {
939
- d && me(t), ct(h, d);
940
- }
941
- };
942
- }
943
- function st(i) {
944
- let t, a, g;
945
- return {
946
- c() {
947
- t = I("button"), C(t, "class", "ShowBalanceModalOverlay");
948
- },
949
- m(h, d) {
950
- ge(h, t, d), a || (g = je(
951
- t,
952
- "click",
953
- /*click_handler_3*/
954
- i[29]
955
- ), a = !0);
956
- },
957
- p: Ke,
958
- d(h) {
959
- h && me(t), a = !1, g();
960
- }
961
- };
962
- }
963
- function zt(i) {
964
- let t, a, g, h;
965
- function d(b, M) {
966
- return (
967
- /*isLoading*/
968
- b[2] ? Ht : jt
969
- );
970
- }
971
- let B = d(i), m = B(i), v = (
972
- /*showBalance*/
973
- i[4] && st(i)
974
- );
975
- return {
976
- c() {
977
- t = I("div"), a = I("div"), m.c(), h = ye(), v && v.c(), C(a, "class", g = "ShowBalance " + /*mobileView*/
978
- (i[5] ? "Mobile" : ""));
979
- },
980
- m(b, M) {
981
- ge(b, t, M), _(t, a), m.m(a, null), _(t, h), v && v.m(t, null), i[30](t);
982
- },
983
- p(b, M) {
984
- B === (B = d(b)) && m ? m.p(b, M) : (m.d(1), m = B(b), m && (m.c(), m.m(a, null))), M[0] & /*mobileView*/
985
- 32 && g !== (g = "ShowBalance " + /*mobileView*/
986
- (b[5] ? "Mobile" : "")) && C(a, "class", g), /*showBalance*/
987
- b[4] ? v ? v.p(b, M) : (v = st(b), v.c(), v.m(t, null)) : v && (v.d(1), v = null);
988
- },
989
- i: Ke,
990
- o: Ke,
991
- d(b) {
992
- b && me(t), m.d(), v && v.d(), i[30](null);
993
- }
994
- };
995
- }
996
- function Vt(i, t, a) {
997
- let g;
998
- Ct(i, Ot, (e) => a(6, g = e));
999
- let { userid: h = "" } = t, { session: d = "" } = t, { endpoint: B = "" } = t, { lang: m = "en" } = t, { mbsource: v } = t, { clientstyling: b = "" } = t, { clientstylingurl: M = "" } = t, { translationurl: k = "" } = t, { gmversion: L = "gm16" } = t, { displaybalanceoption: A = "All" } = t, { totalcalculationmode: T = "totalCashAmount" } = t, { currencylocale: x = "en" } = t, { currencydisplay: j = "symbol" } = t, { maximumfractiondigits: ee = "2" } = t, { minimumfractiondigits: te = "0" } = t, { customdisplayformat: F = "" } = t, O, Y = !0, ce = !1, X = !1, N = !1, E = !1, z = window.navigator.userAgent, D, P = "", oe = [], de;
1000
- const f = {}, ue = ["totalCashAmount", "totalRealAmount"], le = () => {
1001
- fetch(k).then((e) => e.json()).then((e) => Object.keys(e).forEach((r) => tt(r, e[r]))).catch((e) => console.log(e));
1002
- };
1003
- Object.keys(at).forEach((e) => tt(e, at[e]));
1004
- const ae = (e) => {
1005
- switch (e) {
1006
- case "balance":
1007
- window.postMessage(
1008
- {
1009
- type: "BalanceModalStatus",
1010
- status: "open"
1011
- },
1012
- window.location.href
1013
- ), a(4, N = !0), setTimeout(() => a(3, ce = !0), 150);
1014
- break;
1015
- case "closebalance":
1016
- a(3, ce = !1), window.postMessage(
1017
- {
1018
- type: "BalanceModalStatus",
1019
- status: "close"
1020
- },
1021
- window.location.href
1022
- ), setTimeout(
1023
- () => {
1024
- a(4, N = !1);
1025
- },
1026
- 150
1027
- );
1028
- break;
1029
- }
1030
- }, we = (e) => {
1031
- if (F)
1032
- return xe(e);
1033
- const r = x || m, o = {
1034
- style: "currency",
1035
- currency: P,
1036
- useGrouping: !0,
1037
- currencyDisplay: j || "code",
1038
- maximumFractionDigits: ee === "" || isNaN(Number(ee)) ? 2 : Number(ee),
1039
- minimumFractionDigits: te === "" || isNaN(Number(te)) ? 0 : Number(te)
1040
- };
1041
- return new Intl.NumberFormat(r, o).format(e);
1042
- }, xe = (e) => {
1043
- const r = [];
1044
- let o = "";
1045
- for (const s of F)
1046
- switch (s) {
1047
- default:
1048
- o += s;
1049
- break;
1050
- case "{":
1051
- o && r.push(o), o = "";
1052
- break;
1053
- case "}":
1054
- const [w, p] = o.split("|");
1055
- if (o = "", w.toLowerCase() === "currency")
1056
- o = P;
1057
- else if (w.toLowerCase() === "amount") {
1058
- let l = ",", S = ".", y = 2;
1059
- p && (p[0] !== " " && (l = p[0]), p[1] !== " " && (S = p[1]), p[2] !== " " && !isNaN(Number(p[2])) && (y = Number(p[2])));
1060
- let [R, ne] = String(Math.floor(e * Xe(10, y)) / Xe(10, y)).split(".");
1061
- o += R[0];
1062
- for (let re = 1; re < R.length; ++re)
1063
- (R.length - re) % 3 === 0 ? o += l + R[re] : o += R[re];
1064
- ne && (o += S + ne);
1065
- }
1066
- o && r.push(o), o = "";
1067
- break;
1068
- }
1069
- return r.push(o), r.join("");
1070
- }, se = () => $e(this, null, function* () {
1071
- var r, o, s;
1072
- a(2, Y = !0);
1073
- const e = new URL(`${B}/v1/player/${h}/account`);
1074
- try {
1075
- const w = yield fetch(e, {
1076
- method: "GET",
1077
- headers: { "X-SessionID": d }
1078
- }), p = yield w.json();
1079
- if (w.ok)
1080
- window.postMessage({ type: "BalancedFetched" }, window.location.href), oe = p.items, P = (r = oe.find((l) => l.displayName === "Casino")) == null ? void 0 : r.currency, a(1, f.Total = [{ amount: p.totalAmount[P] }], f), a(
1081
- 1,
1082
- f.Real = [
1083
- {
1084
- amount: (o = oe.find((l) => l.displayName === "Casino")) == null ? void 0 : o.balanceAmount
1085
- }
1086
- ],
1087
- f
1088
- ), a(
1089
- 1,
1090
- f.Bonus = [
1091
- {
1092
- amount: (s = oe.find((l) => l.displayName === "UBS")) == null ? void 0 : s.balanceAmount
1093
- }
1094
- ],
1095
- f
1096
- );
1097
- else
1098
- throw new Error("Failed to fetch balance data !");
1099
- } catch (w) {
1100
- console.log("Balance error: ", w);
1101
- } finally {
1102
- a(2, Y = !1);
1103
- }
1104
- }), Re = () => {
1105
- a(2, Y = !0);
1106
- const e = new URL(`${B}/v2/player/${h}/balance`), r = new Headers();
1107
- r.append("X-SessionID", d), fetch(e, { method: "GET", headers: r }).then((s) => s.json()).then((s) => {
1108
- s[T] || a(10, T = ue[0]);
1109
- const w = s.items.find((l) => l.type === "Real" && l.walletAccountType === "Ordinary");
1110
- if (P = w.currency, X = !!w.productType, a(1, f.Total = [{ amount: 0 }], f), a(1, f.Real = [], f), a(1, f.Bonus = [], f), a(1, f.Credit = [], f), !X) {
1111
- de = {
1112
- lastOrdinaryAfterAmount: 0,
1113
- showCreditLineAfterAmount: !1
1114
- }, a(1, f.Total[0].amount = s[T][P], f);
1115
- for (const l of s.items)
1116
- switch (l.type) {
1117
- case "Bonus":
1118
- f.Bonus.length === 0 ? f.Bonus.push({ amount: l.amount }) : a(1, f.Bonus[0].amount += l.amount, f);
1119
- break;
1120
- case "Real":
1121
- if (l.creditLine && f.Credit.length === 0 && f.Credit.push({ amount: l.creditLine }), T === "totalRealAmount")
1122
- continue;
1123
- f.Real.length === 0 ? f.Real.push({ amount: l.amount }) : a(1, f.Real[0].amount += l.amount, f);
1124
- break;
1125
- }
1126
- for (const [l, S] of Object.entries(f))
1127
- S.length < 1 && delete f[l];
1128
- a(2, Y = !1);
1129
- return;
1130
- }
1131
- de = {
1132
- Casino: {
1133
- lastOrdinaryAfterAmount: 0,
1134
- showCreditLineAfterAmount: !1
1135
- },
1136
- Sports: {
1137
- lastOrdinaryAfterAmount: 0,
1138
- showCreditLineAfterAmount: !1
1139
- }
1140
- };
1141
- let p = s.items;
1142
- A && A !== "All" && (p = s.items.filter((l) => l.productType === A));
1143
- for (const l of p) {
1144
- let S;
1145
- switch (l.type) {
1146
- case "Bonus":
1147
- S = f.Bonus.findIndex((y) => y.productType === l.productType), S > 0 ? a(1, f.Bonus[S].amount += l.amount, f) : f.Bonus.push({
1148
- amount: l.amount,
1149
- productType: l.productType
1150
- });
1151
- break;
1152
- case "Real":
1153
- l.creditLine && f.Credit.push({
1154
- amount: l.creditLine,
1155
- productType: l.productType
1156
- }), S = f.Real.findIndex((y) => y.productType === l.productType), S > 0 ? a(1, f.Real[S].amount += l.amount, f) : f.Real.push({
1157
- amount: l.amount,
1158
- productType: l.productType
1159
- });
1160
- break;
1161
- }
1162
- }
1163
- ke();
1164
- for (const [l, S] of Object.entries(f))
1165
- S.length < 1 && delete f[l];
1166
- a(2, Y = !1);
1167
- }).catch((s) => {
1168
- throw a(2, Y = !1), console.log("Balance fetch error", s), new Error("Failed to fetch balance data!");
1169
- });
1170
- }, Se = () => {
1171
- if (D && D.close(), d.length < 1)
1172
- return;
1173
- let e, r;
1174
- switch (L) {
1175
- case "gm16":
1176
- e = new URL(`${B}/v2/player/${h}/information/updates`), r = (w) => De(w);
1177
- break;
1178
- case "gmcore":
1179
- e = new URL(`${B}/v1/player/${h}/balance/updates`), r = (w) => ze(w);
1180
- break;
1181
- }
1182
- const o = {
1183
- accept: "text/event-stream",
1184
- "X-SessionId": d
1185
- }, s = new Ft.EventSourcePolyfill(e, { headers: o });
1186
- D = s, s.addEventListener("message", r);
1187
- }, Le = (e) => {
1188
- let r;
1189
- try {
1190
- r = JSON.parse(e);
1191
- } catch (o) {
1192
- console.log("Balance stream failed: ", o);
1193
- return;
1194
- }
1195
- return r;
1196
- }, ze = (e) => {
1197
- var w, p;
1198
- const r = Le(e.data);
1199
- if (!r) {
1200
- Se();
1201
- return;
1202
- }
1203
- let o = "0";
1204
- const s = r.balanceChange;
1205
- oe = oe.map((l) => (s && s[l.id] && (l = Ze(Qe({}, l), {
1206
- balanceAmount: s[l.id].afterAmount
1207
- })), o = (parseFloat(l == null ? void 0 : l.balanceAmount) + parseFloat(o)).toString(), l)), a(1, f.Real = [{ amount: (w = oe[0]) == null ? void 0 : w.balanceAmount }], f), a(1, f.Bonus = [{ amount: (p = oe[1]) == null ? void 0 : p.balanceAmount }], f), a(1, f.Total = [{ amount: Number(o) }], f);
1208
- }, Ee = (e, r, o) => {
1209
- let s = null;
1210
- switch (o.walletAccountType) {
1211
- case "Ordinary":
1212
- (o.afterAmount !== o.affectedAmount || r.lastOrdinaryAfterAmount === 0) && (r.lastOrdinaryAfterAmount = o.afterAmount, r.showCreditLineAfterAmount || (s = o.afterAmount));
1213
- break;
1214
- case "CreditLine":
1215
- o.afterAmount !== 0 ? (s = o.afterAmount, r.showCreditLineAfterAmount = !0) : (s = r.lastOrdinaryAfterAmount, r.showCreditLineAfterAmount = !1);
1216
- break;
1217
- default:
1218
- s = o.afterAmount;
1219
- }
1220
- return s === null ? e : s;
1221
- }, ke = () => {
1222
- switch (T) {
1223
- case "totalCashAmount":
1224
- let e = 0;
1225
- for (const o of ["Real", "Bonus"])
1226
- for (const s of f[o])
1227
- e += Math.max(s.amount, 0);
1228
- a(1, f.Total[0].amount = e, f);
1229
- break;
1230
- case "totalRealAmount":
1231
- if (!X)
1232
- return;
1233
- let r = 0;
1234
- for (const o of f.Real)
1235
- r += o.amount;
1236
- a(1, f.Total[0].amount = r, f);
1237
- }
1238
- }, De = (e) => {
1239
- const r = Le(e.data);
1240
- if (!r) {
1241
- Se();
1242
- return;
1243
- }
1244
- if (r.type !== "BALANCE_UPDATE_V2")
1245
- return;
1246
- const o = r.body.balanceChange;
1247
- for (const [s, w] of Object.entries(o))
1248
- if (T === "totalRealAmount" && s === "Real" && !X && a(1, f.Total[0].amount = Ee(f.Total[0].amount, de, w), f), !!f[s])
1249
- for (const p of f[s]) {
1250
- if (!X) {
1251
- p.amount = s === "Real" ? Ee(p.amount, de, w) : w.afterAmount;
1252
- continue;
1253
- }
1254
- w.productType === p.productType && (p.amount = s === "Real" ? Ee(p.amount, de[p.productType], w) : w.afterAmount);
1255
- }
1256
- ke();
1257
- }, Ce = () => {
1258
- ae("closebalance"), window.postMessage({ type: "GoToDeposit" }, window.location.href), typeof gtag == "function" && gtag("event", "GoToDeposit", { context: "PlayerAccountBalanceModal" });
1259
- }, ve = () => {
1260
- ue.includes(T) || (console.error(`Unsupported value ('${T}') for totalcalculationmode parameter. Only the following values are supported ${ue}. Using default value ('${ue[0]}').`), a(10, T = ue[0]));
1261
- }, J = () => {
1262
- switch (Nt(m), ve(), L) {
1263
- case "gmcore":
1264
- se();
1265
- break;
1266
- case "gm16":
1267
- Re();
1268
- break;
1269
- default:
1270
- throw Error(`Invalid apiversion attribute: ${L}`);
1271
- }
1272
- }, Oe = (e) => e.data && e.data.type === "LogoutSuccessfull" && D.close(), Ve = () => {
1273
- window.postMessage({ type: "UpdateBalanceBackground" }, window.location.href);
1274
- };
1275
- _t(() => (window.addEventListener("message", Oe, !1), a(5, E = At(z)), () => {
1276
- window.removeEventListener("message", Oe), D && D.close();
1277
- }));
1278
- const Ue = () => ae("balance"), Ne = () => ae("closebalance"), n = () => Ce(), c = () => ae("closebalance");
1279
- function u(e) {
1280
- xt[e ? "unshift" : "push"](() => {
1281
- O = e, a(0, O);
1282
- });
1283
- }
1284
- return i.$$set = (e) => {
1285
- "userid" in e && a(11, h = e.userid), "session" in e && a(12, d = e.session), "endpoint" in e && a(13, B = e.endpoint), "lang" in e && a(14, m = e.lang), "mbsource" in e && a(15, v = e.mbsource), "clientstyling" in e && a(16, b = e.clientstyling), "clientstylingurl" in e && a(17, M = e.clientstylingurl), "translationurl" in e && a(18, k = e.translationurl), "gmversion" in e && a(19, L = e.gmversion), "displaybalanceoption" in e && a(20, A = e.displaybalanceoption), "totalcalculationmode" in e && a(10, T = e.totalcalculationmode), "currencylocale" in e && a(21, x = e.currencylocale), "currencydisplay" in e && a(22, j = e.currencydisplay), "maximumfractiondigits" in e && a(23, ee = e.maximumfractiondigits), "minimumfractiondigits" in e && a(24, te = e.minimumfractiondigits), "customdisplayformat" in e && a(25, F = e.customdisplayformat);
1286
- }, i.$$.update = () => {
1287
- i.$$.dirty[0] & /*endpoint, userid, session, lang, gmversion, displaybalanceoption*/
1288
- 1603584 && B && h && d && m && L && A && J(), i.$$.dirty[0] & /*endpoint, userid, session, gmversion*/
1289
- 538624 && B && h && d && L && Se(), i.$$.dirty[0] & /*translationurl*/
1290
- 262144 && k && le(), i.$$.dirty[0] & /*balances*/
1291
- 2 && f.Total && Ve(), i.$$.dirty[0] & /*clientstyling, customStylingContainer*/
1292
- 65537 && b && O && Dt(O, b), i.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
1293
- 131073 && M && O && Mt(O, M), i.$$.dirty[0] & /*mbsource, customStylingContainer*/
1294
- 32769 && v && O && Lt(O, `${v}.Style`);
1295
- }, [
1296
- O,
1297
- f,
1298
- Y,
1299
- ce,
1300
- N,
1301
- E,
1302
- g,
1303
- ae,
1304
- we,
1305
- Ce,
1306
- T,
1307
- h,
1308
- d,
1309
- B,
1310
- m,
1311
- v,
1312
- b,
1313
- M,
1314
- k,
1315
- L,
1316
- A,
1317
- x,
1318
- j,
1319
- ee,
1320
- te,
1321
- F,
1322
- Ue,
1323
- Ne,
1324
- n,
1325
- c,
1326
- u
1327
- ];
1328
- }
1329
- class Ut extends bt {
1330
- constructor(t) {
1331
- super(), Bt(
1332
- this,
1333
- t,
1334
- Vt,
1335
- zt,
1336
- Tt,
1337
- {
1338
- userid: 11,
1339
- session: 12,
1340
- endpoint: 13,
1341
- lang: 14,
1342
- mbsource: 15,
1343
- clientstyling: 16,
1344
- clientstylingurl: 17,
1345
- translationurl: 18,
1346
- gmversion: 19,
1347
- displaybalanceoption: 20,
1348
- totalcalculationmode: 10,
1349
- currencylocale: 21,
1350
- currencydisplay: 22,
1351
- maximumfractiondigits: 23,
1352
- minimumfractiondigits: 24,
1353
- customdisplayformat: 25
1354
- },
1355
- It,
1356
- [-1, -1]
1357
- );
1358
- }
1359
- get userid() {
1360
- return this.$$.ctx[11];
1361
- }
1362
- set userid(t) {
1363
- this.$$set({ userid: t }), G();
1364
- }
1365
- get session() {
1366
- return this.$$.ctx[12];
1367
- }
1368
- set session(t) {
1369
- this.$$set({ session: t }), G();
1370
- }
1371
- get endpoint() {
1372
- return this.$$.ctx[13];
1373
- }
1374
- set endpoint(t) {
1375
- this.$$set({ endpoint: t }), G();
1376
- }
1377
- get lang() {
1378
- return this.$$.ctx[14];
1379
- }
1380
- set lang(t) {
1381
- this.$$set({ lang: t }), G();
1382
- }
1383
- get mbsource() {
1384
- return this.$$.ctx[15];
1385
- }
1386
- set mbsource(t) {
1387
- this.$$set({ mbsource: t }), G();
1388
- }
1389
- get clientstyling() {
1390
- return this.$$.ctx[16];
1391
- }
1392
- set clientstyling(t) {
1393
- this.$$set({ clientstyling: t }), G();
1394
- }
1395
- get clientstylingurl() {
1396
- return this.$$.ctx[17];
1397
- }
1398
- set clientstylingurl(t) {
1399
- this.$$set({ clientstylingurl: t }), G();
1400
- }
1401
- get translationurl() {
1402
- return this.$$.ctx[18];
1403
- }
1404
- set translationurl(t) {
1405
- this.$$set({ translationurl: t }), G();
1406
- }
1407
- get gmversion() {
1408
- return this.$$.ctx[19];
1409
- }
1410
- set gmversion(t) {
1411
- this.$$set({ gmversion: t }), G();
1412
- }
1413
- get displaybalanceoption() {
1414
- return this.$$.ctx[20];
1415
- }
1416
- set displaybalanceoption(t) {
1417
- this.$$set({ displaybalanceoption: t }), G();
1418
- }
1419
- get totalcalculationmode() {
1420
- return this.$$.ctx[10];
1421
- }
1422
- set totalcalculationmode(t) {
1423
- this.$$set({ totalcalculationmode: t }), G();
1424
- }
1425
- get currencylocale() {
1426
- return this.$$.ctx[21];
1427
- }
1428
- set currencylocale(t) {
1429
- this.$$set({ currencylocale: t }), G();
1430
- }
1431
- get currencydisplay() {
1432
- return this.$$.ctx[22];
1433
- }
1434
- set currencydisplay(t) {
1435
- this.$$set({ currencydisplay: t }), G();
1436
- }
1437
- get maximumfractiondigits() {
1438
- return this.$$.ctx[23];
1439
- }
1440
- set maximumfractiondigits(t) {
1441
- this.$$set({ maximumfractiondigits: t }), G();
1442
- }
1443
- get minimumfractiondigits() {
1444
- return this.$$.ctx[24];
1445
- }
1446
- set minimumfractiondigits(t) {
1447
- this.$$set({ minimumfractiondigits: t }), G();
1448
- }
1449
- get customdisplayformat() {
1450
- return this.$$.ctx[25];
1451
- }
1452
- set customdisplayformat(t) {
1453
- this.$$set({ customdisplayformat: t }), G();
1454
- }
1455
- }
1456
- kt(Ut, { userid: {}, session: {}, endpoint: {}, lang: {}, mbsource: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, gmversion: {}, displaybalanceoption: {}, totalcalculationmode: {}, currencylocale: {}, currencydisplay: {}, maximumfractiondigits: {}, minimumfractiondigits: {}, customdisplayformat: {} }, [], [], !0);
1457
- export {
1458
- Ut as default
1459
- };