@everymatrix/casino-header-controller-nd 1.83.12 → 1.84.1

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