@everymatrix/casino-header-controller 1.45.8 → 1.45.9

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