@everymatrix/casino-header-controller 1.70.0 → 1.70.1

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