@everymatrix/casino-header-controller-nd 1.85.0 → 1.85.2

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