@everymatrix/casino-header-controller 1.45.2 → 1.45.4

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