@everymatrix/casino-header-controller 1.52.4 → 1.52.5

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,597 +0,0 @@
1
- var Q = (s, p, d) => new Promise((h, m) => {
2
- var T = (u) => {
3
- try {
4
- y(d.next(u));
5
- } catch (M) {
6
- m(M);
7
- }
8
- }, w = (u) => {
9
- try {
10
- y(d.throw(u));
11
- } catch (M) {
12
- m(M);
13
- }
14
- }, y = (u) => u.done ? h(u.value) : Promise.resolve(u.value).then(T, w);
15
- y((d = d.apply(s, p)).next());
16
- });
17
- import { b as it, p as nt, r as st, h as C, H as ot } from "./index-657e7a14-DDXA_k23.js";
18
- import { g as at } from "./app-globals-0f993ce5-D-kw1sls.js";
19
- var ct = () => {
20
- const s = import.meta.url, p = {};
21
- return s !== "" && (p.resourcesUrl = new URL(".", s).href), nt(p);
22
- };
23
- ct().then((s) => Q(void 0, null, function* () {
24
- return yield at(), it([["user-deposit-withdrawal", [[1, "user-deposit-withdrawal", { clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], endpoint: [513], type: [513], channel: [513], language: [513], productType: [513, "product-type"], userId: [513, "user-id"], session: [513], successUrl: [513, "success-url"], cancelUrl: [513, "cancel-url"], failUrl: [513, "fail-url"], sportsUrl: [513, "sports-url"], casinoUrl: [513, "casino-url"], contactUrl: [513, "contact-url"], depositUrl: [513, "deposit-url"], currency: [513], showBonusSelectionInput: [513, "show-bonus-selection-input"], isShortCashier: [516, "is-short-cashier"], homeUrl: [513, "home-url"], beforeRedirect: [16], limitStylingAppends: [32], dynamicHeight: [32], cashierInfoUrl: [32] }, null, { session: ["watchLoadWidget"], userId: ["watchLoadWidget"], isShortCashier: ["watchLoadWidget"], currency: ["watchLoadWidget"], showBonusSelectionInput: ["watchLoadWidget"] }]]]], s);
25
- }));
26
- const ut = "en", dt = ["ro", "en", "fr", "hr"], lt = {
27
- en: {
28
- Deposit: "Deposit",
29
- Withdraw: "Withdraw",
30
- denyDeposit: "Please be informed that currently you are not allowed to initiate depost transactions.",
31
- denyWithdrawal: "Please be informed that currently you are not allowed to initiate withdrawal transactions.",
32
- notFoundErrorCode: "Not found error code",
33
- errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
34
- errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
35
- },
36
- ro: {
37
- Deposit: "Depozit",
38
- Withdraw: "Retragere",
39
- denyDeposit: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",
40
- denyWithdrawal: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",
41
- notFoundErrorCode: "Not found error code",
42
- errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
43
- errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
44
- },
45
- fr: {
46
- Deposit: "Deposit",
47
- Withdraw: "Withdraw",
48
- denyDeposit: "Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de dépôt.",
49
- denyWithdrawal: "Veuillez être informé que vous n'êtes actuellement pas autorisé à initier des transactions de retrait.",
50
- notFoundErrorCode: "Not found error code",
51
- errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
52
- errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
53
- },
54
- hr: {
55
- Deposit: "Uplata",
56
- Withdraw: "Isplata",
57
- denyDeposit: "Obavještavamo Vas da trenutno nemate mogućnost uplata.",
58
- denyWithdrawal: "Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",
59
- notFoundErrorCode: "Not found error code",
60
- errorCode21122: "Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",
61
- errorCode21123: "Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"
62
- }
63
- }, I = (s, p) => {
64
- const d = p;
65
- return lt[d !== void 0 && dt.includes(d) ? d : ut][s];
66
- }, ht = (s) => !!(s.toLowerCase().match(/android/i) || s.toLowerCase().match(/blackberry|bb/i) || s.toLowerCase().match(/iphone|ipad|ipod/i) || s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
67
- var K = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, tt = { exports: {} };
68
- (function(s, p) {
69
- (function(d, h) {
70
- s.exports = h();
71
- })(K, function() {
72
- var d = 1e3, h = 6e4, m = 36e5, T = "millisecond", w = "second", y = "minute", u = "hour", M = "day", P = "week", b = "month", G = "quarter", L = "year", k = "date", o = "Invalid Date", U = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, F = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, R = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(n) {
73
- var r = ["th", "st", "nd", "rd"], t = n % 100;
74
- return "[" + n + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
75
- } }, W = function(n, r, t) {
76
- var i = String(n);
77
- return !i || i.length >= r ? n : "" + Array(r + 1 - i.length).join(t) + n;
78
- }, q = { s: W, z: function(n) {
79
- var r = -n.utcOffset(), t = Math.abs(r), i = Math.floor(t / 60), e = t % 60;
80
- return (r <= 0 ? "+" : "-") + W(i, 2, "0") + ":" + W(e, 2, "0");
81
- }, m: function n(r, t) {
82
- if (r.date() < t.date()) return -n(t, r);
83
- var i = 12 * (t.year() - r.year()) + (t.month() - r.month()), e = r.clone().add(i, b), a = t - e < 0, c = r.clone().add(i + (a ? -1 : 1), b);
84
- return +(-(i + (t - e) / (a ? e - c : c - e)) || 0);
85
- }, a: function(n) {
86
- return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
87
- }, p: function(n) {
88
- return { M: b, y: L, w: P, d: M, D: k, h: u, m: y, s: w, ms: T, Q: G }[n] || String(n || "").toLowerCase().replace(/s$/, "");
89
- }, u: function(n) {
90
- return n === void 0;
91
- } }, H = "en", x = {};
92
- x[H] = R;
93
- var z = "$isDayjsObject", B = function(n) {
94
- return n instanceof Z || !(!n || !n[z]);
95
- }, _ = function n(r, t, i) {
96
- var e;
97
- if (!r) return H;
98
- if (typeof r == "string") {
99
- var a = r.toLowerCase();
100
- x[a] && (e = a), t && (x[a] = t, e = a);
101
- var c = r.split("-");
102
- if (!e && c.length > 1) return n(c[0]);
103
- } else {
104
- var f = r.name;
105
- x[f] = r, e = f;
106
- }
107
- return !i && e && (H = e), e || !i && H;
108
- }, $ = function(n, r) {
109
- if (B(n)) return n.clone();
110
- var t = typeof r == "object" ? r : {};
111
- return t.date = n, t.args = arguments, new Z(t);
112
- }, l = q;
113
- l.l = _, l.i = B, l.w = function(n, r) {
114
- return $(n, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
115
- };
116
- var Z = function() {
117
- function n(t) {
118
- this.$L = _(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[z] = !0;
119
- }
120
- var r = n.prototype;
121
- return r.parse = function(t) {
122
- this.$d = function(i) {
123
- var e = i.date, a = i.utc;
124
- if (e === null) return /* @__PURE__ */ new Date(NaN);
125
- if (l.u(e)) return /* @__PURE__ */ new Date();
126
- if (e instanceof Date) return new Date(e);
127
- if (typeof e == "string" && !/Z$/i.test(e)) {
128
- var c = e.match(U);
129
- if (c) {
130
- var f = c[2] - 1 || 0, g = (c[7] || "0").substring(0, 3);
131
- return a ? new Date(Date.UTC(c[1], f, c[3] || 1, c[4] || 0, c[5] || 0, c[6] || 0, g)) : new Date(c[1], f, c[3] || 1, c[4] || 0, c[5] || 0, c[6] || 0, g);
132
- }
133
- }
134
- return new Date(e);
135
- }(t), this.init();
136
- }, r.init = function() {
137
- var t = this.$d;
138
- this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
139
- }, r.$utils = function() {
140
- return l;
141
- }, r.isValid = function() {
142
- return this.$d.toString() !== o;
143
- }, r.isSame = function(t, i) {
144
- var e = $(t);
145
- return this.startOf(i) <= e && e <= this.endOf(i);
146
- }, r.isAfter = function(t, i) {
147
- return $(t) < this.startOf(i);
148
- }, r.isBefore = function(t, i) {
149
- return this.endOf(i) < $(t);
150
- }, r.$g = function(t, i, e) {
151
- return l.u(t) ? this[i] : this.set(e, t);
152
- }, r.unix = function() {
153
- return Math.floor(this.valueOf() / 1e3);
154
- }, r.valueOf = function() {
155
- return this.$d.getTime();
156
- }, r.startOf = function(t, i) {
157
- var e = this, a = !!l.u(i) || i, c = l.p(t), f = function(A, D) {
158
- var E = l.w(e.$u ? Date.UTC(e.$y, D, A) : new Date(e.$y, D, A), e);
159
- return a ? E : E.endOf(M);
160
- }, g = function(A, D) {
161
- return l.w(e.toDate()[A].apply(e.toDate("s"), (a ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(D)), e);
162
- }, v = this.$W, S = this.$M, O = this.$D, j = "set" + (this.$u ? "UTC" : "");
163
- switch (c) {
164
- case L:
165
- return a ? f(1, 0) : f(31, 11);
166
- case b:
167
- return a ? f(1, S) : f(0, S + 1);
168
- case P:
169
- var Y = this.$locale().weekStart || 0, N = (v < Y ? v + 7 : v) - Y;
170
- return f(a ? O - N : O + (6 - N), S);
171
- case M:
172
- case k:
173
- return g(j + "Hours", 0);
174
- case u:
175
- return g(j + "Minutes", 1);
176
- case y:
177
- return g(j + "Seconds", 2);
178
- case w:
179
- return g(j + "Milliseconds", 3);
180
- default:
181
- return this.clone();
182
- }
183
- }, r.endOf = function(t) {
184
- return this.startOf(t, !1);
185
- }, r.$set = function(t, i) {
186
- var e, a = l.p(t), c = "set" + (this.$u ? "UTC" : ""), f = (e = {}, e[M] = c + "Date", e[k] = c + "Date", e[b] = c + "Month", e[L] = c + "FullYear", e[u] = c + "Hours", e[y] = c + "Minutes", e[w] = c + "Seconds", e[T] = c + "Milliseconds", e)[a], g = a === M ? this.$D + (i - this.$W) : i;
187
- if (a === b || a === L) {
188
- var v = this.clone().set(k, 1);
189
- v.$d[f](g), v.init(), this.$d = v.set(k, Math.min(this.$D, v.daysInMonth())).$d;
190
- } else f && this.$d[f](g);
191
- return this.init(), this;
192
- }, r.set = function(t, i) {
193
- return this.clone().$set(t, i);
194
- }, r.get = function(t) {
195
- return this[l.p(t)]();
196
- }, r.add = function(t, i) {
197
- var e, a = this;
198
- t = Number(t);
199
- var c = l.p(i), f = function(S) {
200
- var O = $(a);
201
- return l.w(O.date(O.date() + Math.round(S * t)), a);
202
- };
203
- if (c === b) return this.set(b, this.$M + t);
204
- if (c === L) return this.set(L, this.$y + t);
205
- if (c === M) return f(1);
206
- if (c === P) return f(7);
207
- var g = (e = {}, e[y] = h, e[u] = m, e[w] = d, e)[c] || 1, v = this.$d.getTime() + t * g;
208
- return l.w(v, this);
209
- }, r.subtract = function(t, i) {
210
- return this.add(-1 * t, i);
211
- }, r.format = function(t) {
212
- var i = this, e = this.$locale();
213
- if (!this.isValid()) return e.invalidDate || o;
214
- var a = t || "YYYY-MM-DDTHH:mm:ssZ", c = l.z(this), f = this.$H, g = this.$m, v = this.$M, S = e.weekdays, O = e.months, j = e.meridiem, Y = function(D, E, V, J) {
215
- return D && (D[E] || D(i, a)) || V[E].slice(0, J);
216
- }, N = function(D) {
217
- return l.s(f % 12 || 12, D, "0");
218
- }, A = j || function(D, E, V) {
219
- var J = D < 12 ? "AM" : "PM";
220
- return V ? J.toLowerCase() : J;
221
- };
222
- return a.replace(F, function(D, E) {
223
- return E || function(V) {
224
- switch (V) {
225
- case "YY":
226
- return String(i.$y).slice(-2);
227
- case "YYYY":
228
- return l.s(i.$y, 4, "0");
229
- case "M":
230
- return v + 1;
231
- case "MM":
232
- return l.s(v + 1, 2, "0");
233
- case "MMM":
234
- return Y(e.monthsShort, v, O, 3);
235
- case "MMMM":
236
- return Y(O, v);
237
- case "D":
238
- return i.$D;
239
- case "DD":
240
- return l.s(i.$D, 2, "0");
241
- case "d":
242
- return String(i.$W);
243
- case "dd":
244
- return Y(e.weekdaysMin, i.$W, S, 2);
245
- case "ddd":
246
- return Y(e.weekdaysShort, i.$W, S, 3);
247
- case "dddd":
248
- return S[i.$W];
249
- case "H":
250
- return String(f);
251
- case "HH":
252
- return l.s(f, 2, "0");
253
- case "h":
254
- return N(1);
255
- case "hh":
256
- return N(2);
257
- case "a":
258
- return A(f, g, !0);
259
- case "A":
260
- return A(f, g, !1);
261
- case "m":
262
- return String(g);
263
- case "mm":
264
- return l.s(g, 2, "0");
265
- case "s":
266
- return String(i.$s);
267
- case "ss":
268
- return l.s(i.$s, 2, "0");
269
- case "SSS":
270
- return l.s(i.$ms, 3, "0");
271
- case "Z":
272
- return c;
273
- }
274
- return null;
275
- }(D) || c.replace(":", "");
276
- });
277
- }, r.utcOffset = function() {
278
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
279
- }, r.diff = function(t, i, e) {
280
- var a, c = this, f = l.p(i), g = $(t), v = (g.utcOffset() - this.utcOffset()) * h, S = this - g, O = function() {
281
- return l.m(c, g);
282
- };
283
- switch (f) {
284
- case L:
285
- a = O() / 12;
286
- break;
287
- case b:
288
- a = O();
289
- break;
290
- case G:
291
- a = O() / 3;
292
- break;
293
- case P:
294
- a = (S - v) / 6048e5;
295
- break;
296
- case M:
297
- a = (S - v) / 864e5;
298
- break;
299
- case u:
300
- a = S / m;
301
- break;
302
- case y:
303
- a = S / h;
304
- break;
305
- case w:
306
- a = S / d;
307
- break;
308
- default:
309
- a = S;
310
- }
311
- return e ? a : l.a(a);
312
- }, r.daysInMonth = function() {
313
- return this.endOf(b).$D;
314
- }, r.$locale = function() {
315
- return x[this.$L];
316
- }, r.locale = function(t, i) {
317
- if (!t) return this.$L;
318
- var e = this.clone(), a = _(t, i, !0);
319
- return a && (e.$L = a), e;
320
- }, r.clone = function() {
321
- return l.w(this.$d, this);
322
- }, r.toDate = function() {
323
- return new Date(this.valueOf());
324
- }, r.toJSON = function() {
325
- return this.isValid() ? this.toISOString() : null;
326
- }, r.toISOString = function() {
327
- return this.$d.toISOString();
328
- }, r.toString = function() {
329
- return this.$d.toUTCString();
330
- }, n;
331
- }(), X = Z.prototype;
332
- return $.prototype = X, [["$ms", T], ["$s", w], ["$m", y], ["$H", u], ["$W", M], ["$M", b], ["$y", L], ["$D", k]].forEach(function(n) {
333
- X[n[1]] = function(r) {
334
- return this.$g(r, n[0], n[1]);
335
- };
336
- }), $.extend = function(n, r) {
337
- return n.$i || (n(r, Z, $), n.$i = !0), $;
338
- }, $.locale = _, $.isDayjs = B, $.unix = function(n) {
339
- return $(1e3 * n);
340
- }, $.en = x[H], $.Ls = x, $.p = {}, $;
341
- });
342
- })(tt);
343
- const et = tt.exports;
344
- var rt = { exports: {} };
345
- (function(s, p) {
346
- (function(d, h) {
347
- s.exports = h();
348
- })(K, function() {
349
- var d = "minute", h = /[+-]\d\d(?::?\d\d)?/g, m = /([+-]|\d\d)/g;
350
- return function(T, w, y) {
351
- var u = w.prototype;
352
- y.utc = function(o) {
353
- var U = { date: o, utc: !0, args: arguments };
354
- return new w(U);
355
- }, u.utc = function(o) {
356
- var U = y(this.toDate(), { locale: this.$L, utc: !0 });
357
- return o ? U.add(this.utcOffset(), d) : U;
358
- }, u.local = function() {
359
- return y(this.toDate(), { locale: this.$L, utc: !1 });
360
- };
361
- var M = u.parse;
362
- u.parse = function(o) {
363
- o.utc && (this.$u = !0), this.$utils().u(o.$offset) || (this.$offset = o.$offset), M.call(this, o);
364
- };
365
- var P = u.init;
366
- u.init = function() {
367
- if (this.$u) {
368
- var o = this.$d;
369
- this.$y = o.getUTCFullYear(), this.$M = o.getUTCMonth(), this.$D = o.getUTCDate(), this.$W = o.getUTCDay(), this.$H = o.getUTCHours(), this.$m = o.getUTCMinutes(), this.$s = o.getUTCSeconds(), this.$ms = o.getUTCMilliseconds();
370
- } else P.call(this);
371
- };
372
- var b = u.utcOffset;
373
- u.utcOffset = function(o, U) {
374
- var F = this.$utils().u;
375
- if (F(o)) return this.$u ? 0 : F(this.$offset) ? b.call(this) : this.$offset;
376
- if (typeof o == "string" && (o = function(H) {
377
- H === void 0 && (H = "");
378
- var x = H.match(h);
379
- if (!x) return null;
380
- var z = ("" + x[0]).match(m) || ["-", 0, 0], B = z[0], _ = 60 * +z[1] + +z[2];
381
- return _ === 0 ? 0 : B === "+" ? _ : -_;
382
- }(o), o === null)) return this;
383
- var R = Math.abs(o) <= 16 ? 60 * o : o, W = this;
384
- if (U) return W.$offset = R, W.$u = o === 0, W;
385
- if (o !== 0) {
386
- var q = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
387
- (W = this.local().add(R + q, d)).$offset = R, W.$x.$localOffset = q;
388
- } else W = this.utc();
389
- return W;
390
- };
391
- var G = u.format;
392
- u.format = function(o) {
393
- var U = o || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
394
- return G.call(this, U);
395
- }, u.valueOf = function() {
396
- var o = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
397
- return this.$d.valueOf() - 6e4 * o;
398
- }, u.isUTC = function() {
399
- return !!this.$u;
400
- }, u.toISOString = function() {
401
- return this.toDate().toISOString();
402
- }, u.toString = function() {
403
- return this.toDate().toUTCString();
404
- };
405
- var L = u.toDate;
406
- u.toDate = function(o) {
407
- return o === "s" && this.$offset ? y(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : L.call(this);
408
- };
409
- var k = u.diff;
410
- u.diff = function(o, U, F) {
411
- if (o && this.$u === o.$u) return k.call(this, o, U, F);
412
- var R = this.local(), W = y(o).local();
413
- return k.call(R, W, U, F);
414
- };
415
- };
416
- });
417
- })(rt);
418
- const ft = rt.exports, pt = `:host {
419
- font: inherit;
420
- display: block;
421
- height: 100%;
422
- overflow: hidden;
423
- }
424
-
425
- .CategoryTitle {
426
- font-size: var(--emw--font-size-x-large, 26px);
427
- color: var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));
428
- }
429
-
430
- .MenuReturnButton {
431
- font: inherit;
432
- color: var(--emw--color-gray-300, #58586B);
433
- display: inline-flex;
434
- align-items: center;
435
- column-gap: 10px;
436
- margin-bottom: 10px;
437
- }
438
- .MenuReturnButton svg {
439
- fill: var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));
440
- }
441
- .MenuReturnButton h2.CategoryTitleMobile {
442
- font-size: 16px;
443
- color: var(--emw--pam-color-primary, var(--emw--color-primary, #D0046C));
444
- }
445
-
446
- .ErrorMessage {
447
- color: var(--emw--pam-color-typography, var(--emw--color-typography, #FFFFFF));
448
- }
449
-
450
- .DepositWithdrawalWrapper {
451
- width: 100%;
452
- padding: 0;
453
- margin: 0;
454
- height: 100vh;
455
- }
456
-
457
- @container (max-width: 475px) {
458
- .DepositWithdrawalWrapper {
459
- height: 100vh;
460
- }
461
- }
462
- .ShortCashier.DepositWithdrawalWrapper {
463
- height: 500px;
464
- }
465
- .ShortCashier.CategoryTitle.CategoryTitle {
466
- margin-right: 20px;
467
- padding-top: 20px;
468
- color: ar(--emw--color-black, #000000);
469
- }
470
- .ShortCashier .ErrorMessage {
471
- margin: auto;
472
- width: 90%;
473
- margin-top: 70px;
474
- text-align: center;
475
- color: var(--emw--color-black, #000000);
476
- }`, yt = pt;
477
- et.extend(ft);
478
- const gt = () => {
479
- }, mt = class {
480
- constructor(s) {
481
- st(this, s), this.bindedHandler = this.handleMessage.bind(this), this.userAgent = window.navigator.userAgent, this.isMobile = ht(this.userAgent), this.errorCodes = ["21123", "21122"], this.setClientStyling = () => {
482
- let p = document.createElement("style");
483
- p.innerHTML = this.clientStyling, this.stylingContainer.prepend(p);
484
- }, this.setClientStylingURL = () => {
485
- let p = new URL(this.clientStylingUrl), d = document.createElement("style");
486
- fetch(p.href).then((h) => h.text()).then((h) => {
487
- d.innerHTML = h, setTimeout(() => {
488
- this.stylingContainer.prepend(d);
489
- }, 1);
490
- }).catch((h) => {
491
- console.log("error ", h);
492
- });
493
- }, this.clientStyling = "", this.clientStylingUrl = "", this.endpoint = void 0, this.type = void 0, this.channel = void 0, this.language = void 0, this.productType = void 0, this.userId = void 0, this.session = void 0, this.successUrl = void 0, this.cancelUrl = void 0, this.failUrl = void 0, this.sportsUrl = void 0, this.casinoUrl = void 0, this.contactUrl = void 0, this.depositUrl = void 0, this.currency = "", this.showBonusSelectionInput = "true", this.isShortCashier = !1, this.homeUrl = void 0, this.beforeRedirect = gt, this.limitStylingAppends = !1, this.dynamicHeight = void 0, this.cashierInfoUrl = void 0;
494
- }
495
- get typeParameter() {
496
- if (this.type === "deposit")
497
- return "Deposit";
498
- if (this.type === "withdraw")
499
- return "Withdraw";
500
- }
501
- watchLoadWidget() {
502
- this.loadWidget();
503
- }
504
- componentWillLoad() {
505
- return Q(this, null, function* () {
506
- yield this.loadWidget();
507
- });
508
- }
509
- toggleScreen(s) {
510
- window.postMessage({ type: "PlayerAccountMenuActive", isMobile: s }, window.location.href);
511
- }
512
- componentDidLoad() {
513
- window.addEventListener("message", this.bindedHandler, !1);
514
- }
515
- disconnectedCallback() {
516
- window.removeEventListener("message", this.bindedHandler, !1);
517
- }
518
- componentDidRender() {
519
- !this.limitStylingAppends && this.stylingContainer && (this.clientStyling && this.setClientStyling(), this.clientStylingUrl && this.setClientStylingURL(), this.limitStylingAppends = !0);
520
- }
521
- render() {
522
- return C(ot, { key: "1f639ee63c3d7973e2c800bb313338c7b9496b81" }, C("div", { key: "2102e30049f5ec4fae2ad67d151bafddfe0bd2e9", ref: (s) => this.stylingContainer = s }, !(this.isMobile && !this.isShortCashier) && C("h2", { key: "58f7fe9cfe649cfb0ca835fd51eed8e1ba25ab8a", class: "CategoryTitle" }, I(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language)), C("div", { key: "8a8cdeec14cfb847ed49cd452e201c20ff143b33", class: `DepositWithdrawalWrapper ${this.isShortCashier ? "ShortCashier" : ""}`, style: { height: this.dynamicHeight, marginTop: this.isShortCashier ? "30px" : "0" } }, C("div", { key: "5bc1b8cc97fbe3d73f04f9159a813e9dc6705e52" }, this.isMobile && !this.isShortCashier ? C("div", { class: "MenuReturnButton", onClick: () => this.toggleScreen(this.isMobile) }, C("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, C("defs", null), C("g", { transform: "translate(-20 -158)" }, C("g", { transform: "translate(20 158)" }, C("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), C("h2", { class: "CategoryTitleMobile" }, I(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language))) : null), this.cashierInfoUrl ? C("iframe", { width: "100%", height: "100%", src: this.cashierInfoUrl }) : C("h3", { class: "ErrorMessage" }, this.type === "deposit" ? I("denyDeposit", this.language) : I("denyWithdrawal", this.language)))));
523
- }
524
- loadWidget() {
525
- return Q(this, null, function* () {
526
- const s = {
527
- Channel: this.channel,
528
- Type: this.typeParameter,
529
- SuccessUrl: this.successUrl,
530
- CancelUrl: this.cancelUrl,
531
- FailUrl: this.failUrl,
532
- Language: this.language,
533
- productType: this.productType,
534
- isShortCashier: this.isShortCashier,
535
- currency: this.currency,
536
- showBonusSelectionInput: this.showBonusSelectionInput
537
- };
538
- try {
539
- const p = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`, d = yield fetch(p, {
540
- method: "POST",
541
- headers: {
542
- "X-Sessionid": this.session,
543
- "Content-Type": "application/json",
544
- "X-Client-Request-Timestamp": et.utc().format("YYYY-MM-DD HH:mm:ss.SSS")
545
- },
546
- body: JSON.stringify(s)
547
- });
548
- if (!d.ok) {
549
- const m = yield d.text();
550
- throw new Error(m);
551
- }
552
- const h = yield d.json();
553
- if (h.CashierInfo)
554
- this.cashierInfoUrl = h.CashierInfo.Url;
555
- else {
556
- let m;
557
- if (h.ResponseMessage) {
558
- let w = this.errorCodes.find((y) => h.ResponseMessage.includes(y)) || null;
559
- w ? m = I(`errorCode${w}`, this.language) : m = I("notFoundErrorCode", this.language);
560
- } else
561
- m = this.type === "deposit" ? I("denyDeposit", this.language) : I("denyWithdrawal", this.language);
562
- const T = { type: "error", message: m };
563
- window.postMessage({ type: "DenyDepositOrWithdrawal", data: T }, window.location.href);
564
- }
565
- } catch (p) {
566
- console.error(p);
567
- }
568
- });
569
- }
570
- handleMessage(s) {
571
- var p, d, h, m, T, w, y, u;
572
- s.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), s.data["MMFE:setQuickDepositHeight"] && this.isShortCashier && (this.dynamicHeight = s.data["MMFE:setQuickDepositHeight"].toString() + "px"), s.data["MMFE:setIFrameHeight"] && this.isShortCashier && (this.dynamicHeight = s.data["MMFE:setIFrameHeight"].toString() + "px"), ((p = s.data) === null || p === void 0 ? void 0 : p.type) === "mm-hcback-to-merchant" && this.doRedirect(s.data.type, this.homeUrl), ((d = s.data) === null || d === void 0 ? void 0 : d.redirect) === "mm-hc-back-tomerchant" && this.doRedirect(s.data.redirect, this.homeUrl), ((h = s.data) === null || h === void 0 ? void 0 : h.redirect) === "mm-hc-sports" && this.doRedirect((m = s.data) === null || m === void 0 ? void 0 : m.redirect, this.sportsUrl), ((T = s.data) === null || T === void 0 ? void 0 : T.redirect) === "mm-hc-casino" && this.doRedirect(window.location.href, this.casinoUrl), ((w = s.data) === null || w === void 0 ? void 0 : w.redirect) === "mm-hc-contact" && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.contactUrl)), (((y = s.data) === null || y === void 0 ? void 0 : y.redirect) === "mm-wm-hc-init-deposit" || ((u = s.data) === null || u === void 0 ? void 0 : u.redirect) === "mm-wm-hc-init-deposit-quick") && (window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.doRedirect(window.location.href, this.depositUrl));
573
- }
574
- doRedirect(s, p) {
575
- const d = { reason: s, url: p, cancel: !1 };
576
- if (this.beforeRedirect(d), !d.cancel) {
577
- if (!d.url) {
578
- window.location.href = "/";
579
- return;
580
- }
581
- window.location.href = d.url;
582
- }
583
- }
584
- static get watchers() {
585
- return {
586
- session: ["watchLoadWidget"],
587
- userId: ["watchLoadWidget"],
588
- isShortCashier: ["watchLoadWidget"],
589
- currency: ["watchLoadWidget"],
590
- showBonusSelectionInput: ["watchLoadWidget"]
591
- };
592
- }
593
- };
594
- mt.style = yt;
595
- export {
596
- mt as user_deposit_withdrawal
597
- };