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