@everymatrix/casino-header-controller-nd 1.54.12 → 1.55.0

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.
Files changed (49) hide show
  1. package/components/{CasinoHamburgerMenuNd-C0vs2463.js → CasinoHamburgerMenuNd-CAV9ARg-.js} +915 -893
  2. package/components/CasinoHamburgerMenuNd-CSCV-5CJ.cjs +5 -0
  3. package/components/{CasinoHamburgerMenuNd-ByOv9WYg.js → CasinoHamburgerMenuNd-DNYzzmAB.js} +904 -882
  4. package/components/{CasinoHeaderControllerNd-DNfULXvS.js → CasinoHeaderControllerNd-B4Hgo5oq.js} +87 -87
  5. package/components/{CasinoHeaderControllerNd-C0iBDw78.cjs → CasinoHeaderControllerNd-Cd6hH1wA.cjs} +1 -1
  6. package/components/{CasinoHeaderControllerNd-Bj0vkyt0.js → CasinoHeaderControllerNd-bGnLcz2g.js} +85 -85
  7. package/components/{PlayerAccountBalanceModalNd-bDU8dGTK.js → PlayerAccountBalanceModalNd-BJJzPbdP.js} +96 -96
  8. package/components/{PlayerAccountBalanceModalNd-B4Yp_9Au.js → PlayerAccountBalanceModalNd-Ca8dF_9M.js} +93 -93
  9. package/components/{PlayerAccountBalanceModalNd-CjlZ6-7s.cjs → PlayerAccountBalanceModalNd-P1iLuuUG.cjs} +1 -1
  10. package/components/PlayerDeposit-B0r58Ypp.js +414 -0
  11. package/components/PlayerDeposit-BkVMpjA9.js +414 -0
  12. package/components/PlayerDeposit-CjEddUaf.cjs +1 -0
  13. package/es2015/casino-header-controller-nd.cjs +1 -1
  14. package/es2015/casino-header-controller-nd.js +1 -1
  15. package/esnext/casino-header-controller-nd.js +1 -1
  16. package/package.json +1 -1
  17. package/stencil/{gamification-dropdown-370424de-CedFjFMQ.js → gamification-dropdown-456bb56a-BJ9kAxaI.js} +4 -4
  18. package/stencil/{gamification-dropdown-370424de-G0GDuoBY.js → gamification-dropdown-456bb56a-CldmfDdk.js} +9 -9
  19. package/stencil/gamification-dropdown-456bb56a-ClnsHPoT.cjs +1 -0
  20. package/stencil/{gamification-dropdown-CnI6W6X-.js → gamification-dropdown-BdMkPvQc.js} +1 -1
  21. package/stencil/{gamification-dropdown-Dy-qtuaZ.cjs → gamification-dropdown-CnrQK1ei.cjs} +1 -1
  22. package/stencil/{gamification-dropdown-BhM9nF9V.js → gamification-dropdown-FVqK4we0.js} +1 -1
  23. package/stencil/{gamification-dropdown_4-DgJc4ulv.js → gamification-dropdown_4-BZffGACN.js} +10 -10
  24. package/stencil/{gamification-dropdown_4-DFXXWsNB.js → gamification-dropdown_4-Cg4EiNTS.js} +9 -9
  25. package/stencil/gamification-dropdown_4-DNV5b4s7.cjs +192 -0
  26. package/stencil/index-171550cf-BY--MwdX.cjs +1 -0
  27. package/stencil/index-171550cf-CVTOm2AV.js +799 -0
  28. package/stencil/index-171550cf-JwZ7TN-k.js +772 -0
  29. package/stencil/{player-elevate-card-l6Kpw4ym.js → player-elevate-card-Bo3fCMU8.js} +4 -4
  30. package/stencil/{player-elevate-card-CdmFcZg6.js → player-elevate-card-CGn57laL.js} +4 -4
  31. package/stencil/player-elevate-card-CW-95gEJ.cjs +64 -0
  32. package/stencil/{player-elevate-card-items-4e46b4c8-CP-E64XG.js → player-elevate-card-items-2078bd83-CUXuMGCR.js} +3 -1
  33. package/stencil/player-elevate-card-items-2078bd83-DSxFMBLz.cjs +1 -0
  34. package/stencil/{player-elevate-card-items-4e46b4c8-BDoQLG1C.js → player-elevate-card-items-2078bd83-DvW50KrW.js} +3 -1
  35. package/stencil/player-elevate-pointcard-DVgy3cq3.cjs +1 -0
  36. package/stencil/{player-elevate-pointcard-D8gCv0PA.js → player-elevate-pointcard-jLOeOCx0.js} +7 -7
  37. package/stencil/{player-elevate-pointcard-DOd_C-CP.js → player-elevate-pointcard-teAW1AOh.js} +7 -7
  38. package/components/CasinoHamburgerMenuNd-C_mDzbID.cjs +0 -5
  39. package/components/PlayerDeposit-C__xk64-.js +0 -395
  40. package/components/PlayerDeposit-CmyD00QS.js +0 -395
  41. package/components/PlayerDeposit-DGMSukDR.cjs +0 -1
  42. package/stencil/gamification-dropdown-370424de-pf_jqgr1.cjs +0 -1
  43. package/stencil/gamification-dropdown_4-BDv_Y1ow.cjs +0 -192
  44. package/stencil/index-1ed44842-Cv2DDELg.js +0 -832
  45. package/stencil/index-1ed44842-Cv7p6OfM.js +0 -859
  46. package/stencil/index-1ed44842-Dr1nsipr.cjs +0 -1
  47. package/stencil/player-elevate-card-Btncg_vx.cjs +0 -64
  48. package/stencil/player-elevate-card-items-4e46b4c8-aapR8B2m.cjs +0 -1
  49. package/stencil/player-elevate-pointcard-CcFdRk9Q.cjs +0 -1
@@ -1,395 +0,0 @@
1
- import { b as V, $ as X, S as Z, i as J, s as $, f as b, d as ee, z as H, g as S, D as L, M as P, m as T, n as p, p as _, q as E, E as C, r as d, v as te, I as ie, w as ae, o as se, F as M, A as re, B as z, c as ne, K as oe } from "./CasinoHamburgerMenuNd-C0vs2463.js";
2
- function W(a, e) {
3
- V(a, e);
4
- }
5
- function le(a) {
6
- X.set(a);
7
- }
8
- const j = {
9
- en: {
10
- titleDeposit: "Deposit",
11
- loading: "Loading, please wait ..."
12
- },
13
- "zh-hk": {
14
- titleDeposit: "訂金",
15
- loading: "加載請稍候…"
16
- },
17
- fr: {
18
- titleDeposit: "Dépôt",
19
- loading: "Chargement, veuillez patienter ..."
20
- },
21
- tr: {
22
- titleDeposit: "PARA YATIR",
23
- loading: "Yükleniyor ..."
24
- },
25
- ro: {
26
- titleDeposit: "Depunere",
27
- loading: "Se încarcă..."
28
- },
29
- es: {
30
- titleDeposit: "Deposita",
31
- loading: "Cargando ..."
32
- },
33
- pt: {
34
- titleDeposit: "Depósito",
35
- loading: "Carregando, por favor espere ..."
36
- },
37
- hr: {
38
- titleDeposit: "Uplata",
39
- loading: "Učitavanje"
40
- },
41
- "pt-br": {
42
- titleDeposit: "Depositar",
43
- Loading: "Carregando, por favor espere..."
44
- },
45
- "es-mx": {
46
- titleDeposit: "Depositar",
47
- Loading: "Cargando, por favor espere..."
48
- }
49
- };
50
- function ce(a) {
51
- ee(a, "svelte-lvm6lo", "button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}");
52
- }
53
- function de(a) {
54
- let e, i, n, s, l, m, c, u, y, o, r = (
55
- /*$_*/
56
- a[4]("titleDeposit") + ""
57
- ), h, D, v;
58
- return {
59
- c() {
60
- e = _("div"), i = M("svg"), n = M("defs"), s = M("style"), l = C(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = M("g"), c = M("g"), u = M("path"), y = E(), o = _("h2"), h = C(r), d(u, "class", "aaa"), d(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(u, "transform", "translate(15 15) rotate(180)"), d(c, "transform", "translate(20 158)"), d(m, "transform", "translate(-20 -158)"), d(i, "xmlns", "http://www.w3.org/2000/svg"), d(i, "width", "15"), d(i, "height", "15"), d(i, "viewBox", "0 0 15 15"), d(o, "class", "DepositTitleMobile"), d(e, "class", "MenuReturnButton");
61
- },
62
- m(g, k) {
63
- T(g, e, k), p(e, i), p(i, n), p(n, s), p(s, l), p(i, m), p(m, c), p(c, u), p(e, y), p(e, o), p(o, h), D || (v = se(
64
- e,
65
- "click",
66
- /*click_handler*/
67
- a[17]
68
- ), D = !0);
69
- },
70
- p(g, k) {
71
- k & /*$_*/
72
- 16 && r !== (r = /*$_*/
73
- g[4]("titleDeposit") + "") && L(h, r);
74
- },
75
- d(g) {
76
- g && S(e), D = !1, v();
77
- }
78
- };
79
- }
80
- function he(a) {
81
- let e, i, n;
82
- return {
83
- c() {
84
- e = _("div"), i = _("iframe"), z(i.src, n = /*iframeUrl*/
85
- a[3]) || d(i, "src", n), d(i, "title", "Deposit Iframe"), d(e, "class", "DepositIframeWrapper");
86
- },
87
- m(s, l) {
88
- T(s, e, l), p(e, i);
89
- },
90
- p(s, l) {
91
- l & /*iframeUrl*/
92
- 8 && !z(i.src, n = /*iframeUrl*/
93
- s[3]) && d(i, "src", n);
94
- },
95
- d(s) {
96
- s && S(e);
97
- }
98
- };
99
- }
100
- function pe(a) {
101
- let e, i = (
102
- /*$_*/
103
- a[4]("loading") + ""
104
- ), n;
105
- return {
106
- c() {
107
- e = _("p"), n = C(i);
108
- },
109
- m(s, l) {
110
- T(s, e, l), p(e, n);
111
- },
112
- p(s, l) {
113
- l & /*$_*/
114
- 16 && i !== (i = /*$_*/
115
- s[4]("loading") + "") && L(n, i);
116
- },
117
- d(s) {
118
- s && S(e);
119
- }
120
- };
121
- }
122
- function ue(a) {
123
- let e, i, n, s = (
124
- /*$_*/
125
- a[4]("titleDeposit") + ""
126
- ), l, m, c = (
127
- /*isMobile*/
128
- a[5] && de(a)
129
- );
130
- function u(r, h) {
131
- return (
132
- /*isLoading*/
133
- r[1] ? pe : he
134
- );
135
- }
136
- let y = u(a), o = y(a);
137
- return {
138
- c() {
139
- e = _("div"), c && c.c(), i = E(), n = _("h2"), l = C(s), m = E(), o.c(), d(n, "class", "DepositTitle " + /*isMobile*/
140
- (a[5] ? "DepositTitleNone" : "")), d(e, "class", "DepositWrapper " + /*isMobile*/
141
- (a[5] ? "DepositWrapperMobile" : "")), P(
142
- e,
143
- "--dynamic-height",
144
- /*dynamicHeight*/
145
- a[2]
146
- );
147
- },
148
- m(r, h) {
149
- T(r, e, h), c && c.m(e, null), p(e, i), p(e, n), p(n, l), p(e, m), o.m(e, null), a[18](e);
150
- },
151
- p(r, [h]) {
152
- /*isMobile*/
153
- r[5] && c.p(r, h), h & /*$_*/
154
- 16 && s !== (s = /*$_*/
155
- r[4]("titleDeposit") + "") && L(l, s), y === (y = u(r)) && o ? o.p(r, h) : (o.d(1), o = y(r), o && (o.c(), o.m(e, null))), h & /*dynamicHeight*/
156
- 4 && P(
157
- e,
158
- "--dynamic-height",
159
- /*dynamicHeight*/
160
- r[2]
161
- );
162
- },
163
- i: H,
164
- o: H,
165
- d(r) {
166
- r && S(e), c && c.d(), o.d(), a[18](null);
167
- }
168
- };
169
- }
170
- function ge(a, e, i) {
171
- let n, s;
172
- te(a, oe, (t) => i(4, s = t));
173
- let { endpoint: l = "" } = e, { session: m = "" } = e, { playerid: c = "" } = e, { lang: u = "en" } = e, { hasdefaultamount: y = "" } = e, { clientstyling: o = "" } = e, { clientstylingurl: r = "" } = e, { translationurl: h = "" } = e, { playercurrency: D = "" } = e, { shortcashierenabled: v = "false" } = e, g, k = window.navigator.userAgent, R = ie(k) !== "PC", B = !0, F, x = 0, I = "";
174
- const G = () => {
175
- fetch(h).then((w) => w.json()).then((w) => {
176
- Object.keys(w).forEach((f) => {
177
- W(f, w[f]);
178
- });
179
- }).catch((w) => {
180
- console.log(w);
181
- });
182
- };
183
- Object.keys(j).forEach((t) => {
184
- W(t, j[t]);
185
- });
186
- const U = () => {
187
- window.postMessage({ type: "GoToPreviousRoute", isMobile: R }, window.location.href);
188
- }, A = (t) => {
189
- if (t.data) {
190
- switch (t.data.type) {
191
- case "ProfileDetailsData":
192
- i(7, D = t.data.profileDetails.currency);
193
- break;
194
- }
195
- switch (t.data["MMFE:setQuickDepositHeight"] && i(2, F = t.data["MMFE:setQuickDepositHeight"].toString() + "px"), t.data["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), t.data.redirect) {
196
- case "mm-hc-casino":
197
- window.postMessage({ type: "GoToCasino" }, window.location.href);
198
- break;
199
- case "mm-hc-sports":
200
- window.postMessage({ type: "GoToSports" }, window.location.href);
201
- break;
202
- case "mm-hc-contact":
203
- window.postMessage({ type: "GoToCustomerSupport" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href);
204
- break;
205
- case "mm-hc-back-to-merchant":
206
- window.postMessage({ type: "GoToHomepage" }, window.location.href);
207
- break;
208
- case "mm-wm-hc-init-deposit":
209
- window.postMessage(
210
- {
211
- type: "RedirectWithdrawDepositCloseModal"
212
- },
213
- window.location.href
214
- );
215
- break;
216
- case "mm-wm-hc-init-deposit-quick":
217
- window.postMessage({ type: "CloseShortCashier" }, window.location.href);
218
- break;
219
- }
220
- }
221
- }, N = () => {
222
- let t = new URL(`${l}/v1/player/${c}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);
223
- if (t.searchParams.append("language", u), n && t.searchParams.append("isShortCashier", v), y)
224
- switch (D) {
225
- case "USD":
226
- x = 0.4;
227
- break;
228
- case "CDF":
229
- x = 1e3;
230
- break;
231
- }
232
- let w = {
233
- method: "POST",
234
- headers: {
235
- "X-SessionId": m,
236
- currency: D || "EUR",
237
- amount: x,
238
- cashierMode: "Default",
239
- IsShortCashier: v,
240
- accept: "application/json"
241
- }
242
- };
243
- fetch(t.href, w).then((f) => f.json()).then(
244
- (f) => {
245
- i(1, B = !1), i(3, I = f.CashierUrl);
246
- },
247
- (f) => {
248
- console.error(f);
249
- }
250
- );
251
- }, q = () => {
252
- le(u);
253
- }, O = () => {
254
- let t = document.createElement("style");
255
- t.innerHTML = o, g.appendChild(t);
256
- }, Q = () => {
257
- let t = new URL(r), w = document.createElement("style");
258
- fetch(t.href).then((f) => f.text()).then((f) => {
259
- w.innerHTML = f, setTimeout(
260
- () => {
261
- g.appendChild(w);
262
- },
263
- 1
264
- );
265
- });
266
- };
267
- ae(() => (window.addEventListener("message", A, !1), () => {
268
- window.removeEventListener("message", A);
269
- }));
270
- const Y = () => U();
271
- function K(t) {
272
- re[t ? "unshift" : "push"](() => {
273
- g = t, i(0, g);
274
- });
275
- }
276
- return a.$$set = (t) => {
277
- "endpoint" in t && i(8, l = t.endpoint), "session" in t && i(9, m = t.session), "playerid" in t && i(10, c = t.playerid), "lang" in t && i(11, u = t.lang), "hasdefaultamount" in t && i(12, y = t.hasdefaultamount), "clientstyling" in t && i(13, o = t.clientstyling), "clientstylingurl" in t && i(14, r = t.clientstylingurl), "translationurl" in t && i(15, h = t.translationurl), "playercurrency" in t && i(7, D = t.playercurrency), "shortcashierenabled" in t && i(16, v = t.shortcashierenabled);
278
- }, a.$$.update = () => {
279
- a.$$.dirty & /*lang*/
280
- 2048 && u && q(), a.$$.dirty & /*shortcashierenabled*/
281
- 65536 && (n = v.toLocaleLowerCase() === "true"), a.$$.dirty & /*clientstylingurl, customStylingContainer*/
282
- 16385 && r && g && Q(), a.$$.dirty & /*clientstyling, customStylingContainer*/
283
- 8193 && o && g && O(), a.$$.dirty & /*translationurl*/
284
- 32768 && h && G(), a.$$.dirty & /*session, playerid, endpoint, playercurrency, lang, shortcashierenabled*/
285
- 69504 && m && c && l && D && u && v && N();
286
- }, [
287
- g,
288
- B,
289
- F,
290
- I,
291
- s,
292
- R,
293
- U,
294
- D,
295
- l,
296
- m,
297
- c,
298
- u,
299
- y,
300
- o,
301
- r,
302
- h,
303
- v,
304
- Y,
305
- K
306
- ];
307
- }
308
- class me extends Z {
309
- constructor(e) {
310
- super(), J(
311
- this,
312
- e,
313
- ge,
314
- ue,
315
- $,
316
- {
317
- endpoint: 8,
318
- session: 9,
319
- playerid: 10,
320
- lang: 11,
321
- hasdefaultamount: 12,
322
- clientstyling: 13,
323
- clientstylingurl: 14,
324
- translationurl: 15,
325
- playercurrency: 7,
326
- shortcashierenabled: 16
327
- },
328
- ce
329
- );
330
- }
331
- get endpoint() {
332
- return this.$$.ctx[8];
333
- }
334
- set endpoint(e) {
335
- this.$$set({ endpoint: e }), b();
336
- }
337
- get session() {
338
- return this.$$.ctx[9];
339
- }
340
- set session(e) {
341
- this.$$set({ session: e }), b();
342
- }
343
- get playerid() {
344
- return this.$$.ctx[10];
345
- }
346
- set playerid(e) {
347
- this.$$set({ playerid: e }), b();
348
- }
349
- get lang() {
350
- return this.$$.ctx[11];
351
- }
352
- set lang(e) {
353
- this.$$set({ lang: e }), b();
354
- }
355
- get hasdefaultamount() {
356
- return this.$$.ctx[12];
357
- }
358
- set hasdefaultamount(e) {
359
- this.$$set({ hasdefaultamount: e }), b();
360
- }
361
- get clientstyling() {
362
- return this.$$.ctx[13];
363
- }
364
- set clientstyling(e) {
365
- this.$$set({ clientstyling: e }), b();
366
- }
367
- get clientstylingurl() {
368
- return this.$$.ctx[14];
369
- }
370
- set clientstylingurl(e) {
371
- this.$$set({ clientstylingurl: e }), b();
372
- }
373
- get translationurl() {
374
- return this.$$.ctx[15];
375
- }
376
- set translationurl(e) {
377
- this.$$set({ translationurl: e }), b();
378
- }
379
- get playercurrency() {
380
- return this.$$.ctx[7];
381
- }
382
- set playercurrency(e) {
383
- this.$$set({ playercurrency: e }), b();
384
- }
385
- get shortcashierenabled() {
386
- return this.$$.ctx[16];
387
- }
388
- set shortcashierenabled(e) {
389
- this.$$set({ shortcashierenabled: e }), b();
390
- }
391
- }
392
- ne(me, { endpoint: {}, session: {}, playerid: {}, lang: {}, hasdefaultamount: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {}, shortcashierenabled: {} }, [], [], !0);
393
- export {
394
- me as default
395
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoHamburgerMenuNd-C_mDzbID.cjs");function x(n,t){e.addMessages(n,t)}function A(n){e.$locale.set(n)}const L={en:{titleDeposit:"Deposit",loading:"Loading, please wait ..."},"zh-hk":{titleDeposit:"訂金",loading:"加載請稍候…"},fr:{titleDeposit:"Dépôt",loading:"Chargement, veuillez patienter ..."},tr:{titleDeposit:"PARA YATIR",loading:"Yükleniyor ..."},ro:{titleDeposit:"Depunere",loading:"Se încarcă..."},es:{titleDeposit:"Deposita",loading:"Cargando ..."},pt:{titleDeposit:"Depósito",loading:"Carregando, por favor espere ..."},hr:{titleDeposit:"Uplata",loading:"Učitavanje"},"pt-br":{titleDeposit:"Depositar",Loading:"Carregando, por favor espere..."},"es-mx":{titleDeposit:"Depositar",Loading:"Cargando, por favor espere..."}};function W(n){e.append_styles(n,"svelte-lvm6lo","button{font-family:var(--emw--button-typography)}input,select,option{font-family:inherit}.DepositWrapper{background-color:var(--emw--color-pale, var(--emw--color-gray-50, #F1F1F1));border-radius:var(--emw--border-radius-large, 20px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));padding:50px 50px 30px 50px;max-width:100%;height:var(--dynamic-height)}.DepositWrapper.DepositWrapperMobile{padding:20px 15px;max-width:unset;height:var(--dynamic-height)}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.DepositTitle{font-size:var(--emw--font-size-x-large, 26px);color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weigh-normal, 400)}.DepositTitleMobile{font-size:var(--emw--size-standard, 16px)}.DepositTitleNone{display:none}.DepositIframeWrapper iframe{border:none;width:100%;height:85vh;border-radius:var(--emw--border-radius-large, 20px)}")}function j(n){let t,a,l,r,c,m,d,h,f,o,s=n[4]("titleDeposit")+"",p,w,b;return{c(){t=e.element("div"),a=e.svg_element("svg"),l=e.svg_element("defs"),r=e.svg_element("style"),c=e.text(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"),m=e.svg_element("g"),d=e.svg_element("g"),h=e.svg_element("path"),f=e.space(),o=e.element("h2"),p=e.text(s),e.attr(h,"class","aaa"),e.attr(h,"d","M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"),e.attr(h,"transform","translate(15 15) rotate(180)"),e.attr(d,"transform","translate(20 158)"),e.attr(m,"transform","translate(-20 -158)"),e.attr(a,"xmlns","http://www.w3.org/2000/svg"),e.attr(a,"width","15"),e.attr(a,"height","15"),e.attr(a,"viewBox","0 0 15 15"),e.attr(o,"class","DepositTitleMobile"),e.attr(t,"class","MenuReturnButton")},m(u,D){e.insert(u,t,D),e.append(t,a),e.append(a,l),e.append(l,r),e.append(r,c),e.append(a,m),e.append(m,d),e.append(d,h),e.append(t,f),e.append(t,o),e.append(o,p),w||(b=e.listen(t,"click",n[17]),w=!0)},p(u,D){D&16&&s!==(s=u[4]("titleDeposit")+"")&&e.set_data(p,s)},d(u){u&&e.detach(t),w=!1,b()}}}function z(n){let t,a,l;return{c(){t=e.element("div"),a=e.element("iframe"),e.src_url_equal(a.src,l=n[3])||e.attr(a,"src",l),e.attr(a,"title","Deposit Iframe"),e.attr(t,"class","DepositIframeWrapper")},m(r,c){e.insert(r,t,c),e.append(t,a)},p(r,c){c&8&&!e.src_url_equal(a.src,l=r[3])&&e.attr(a,"src",l)},d(r){r&&e.detach(t)}}}function G(n){let t,a=n[4]("loading")+"",l;return{c(){t=e.element("p"),l=e.text(a)},m(r,c){e.insert(r,t,c),e.append(t,l)},p(r,c){c&16&&a!==(a=r[4]("loading")+"")&&e.set_data(l,a)},d(r){r&&e.detach(t)}}}function N(n){let t,a,l,r=n[4]("titleDeposit")+"",c,m,d=n[5]&&j(n);function h(s,p){return s[1]?G:z}let f=h(n),o=f(n);return{c(){t=e.element("div"),d&&d.c(),a=e.space(),l=e.element("h2"),c=e.text(r),m=e.space(),o.c(),e.attr(l,"class","DepositTitle "+(n[5]?"DepositTitleNone":"")),e.attr(t,"class","DepositWrapper "+(n[5]?"DepositWrapperMobile":"")),e.set_style(t,"--dynamic-height",n[2])},m(s,p){e.insert(s,t,p),d&&d.m(t,null),e.append(t,a),e.append(t,l),e.append(l,c),e.append(t,m),o.m(t,null),n[18](t)},p(s,[p]){s[5]&&d.p(s,p),p&16&&r!==(r=s[4]("titleDeposit")+"")&&e.set_data(c,r),f===(f=h(s))&&o?o.p(s,p):(o.d(1),o=f(s),o&&(o.c(),o.m(t,null))),p&4&&e.set_style(t,"--dynamic-height",s[2])},i:e.noop,o:e.noop,d(s){s&&e.detach(t),d&&d.d(),o.d(),n[18](null)}}}function q(n,t,a){let l,r;e.component_subscribe(n,e.$format,i=>a(4,r=i));let{endpoint:c=""}=t,{session:m=""}=t,{playerid:d=""}=t,{lang:h="en"}=t,{hasdefaultamount:f=""}=t,{clientstyling:o=""}=t,{clientstylingurl:s=""}=t,{translationurl:p=""}=t,{playercurrency:w=""}=t,{shortcashierenabled:b="false"}=t,u,D=window.navigator.userAgent,v=e.getDevice(D)!=="PC",M=!0,C,_=0,k="";const R=()=>{fetch(p).then(y=>y.json()).then(y=>{Object.keys(y).forEach(g=>{x(g,y[g])})}).catch(y=>{console.log(y)})};Object.keys(L).forEach(i=>{x(i,L[i])});const S=()=>{window.postMessage({type:"GoToPreviousRoute",isMobile:v},window.location.href)},T=i=>{if(i.data){switch(i.data.type){case"ProfileDetailsData":a(7,w=i.data.profileDetails.currency);break}switch(i.data["MMFE:setQuickDepositHeight"]&&a(2,C=i.data["MMFE:setQuickDepositHeight"].toString()+"px"),i.data["MMFE:openFullCashier"]==="true"&&(window.postMessage({type:"GoToDeposit"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href)),i.data.redirect){case"mm-hc-casino":window.postMessage({type:"GoToCasino"},window.location.href);break;case"mm-hc-sports":window.postMessage({type:"GoToSports"},window.location.href);break;case"mm-hc-contact":window.postMessage({type:"GoToCustomerSupport"},window.location.href),window.postMessage({type:"CloseShortCashier"},window.location.href);break;case"mm-hc-back-to-merchant":window.postMessage({type:"GoToHomepage"},window.location.href);break;case"mm-wm-hc-init-deposit":window.postMessage({type:"RedirectWithdrawDepositCloseModal"},window.location.href);break;case"mm-wm-hc-init-deposit-quick":window.postMessage({type:"CloseShortCashier"},window.location.href);break}}},B=()=>{let i=new URL(`${c}/v1/player/${d}/hostedcashier/initializedeposit?showBonusSelectionInput=true`);if(i.searchParams.append("language",h),l&&i.searchParams.append("isShortCashier",b),f)switch(w){case"USD":_=.4;break;case"CDF":_=1e3;break}let y={method:"POST",headers:{"X-SessionId":m,currency:w||"EUR",amount:_,cashierMode:"Default",IsShortCashier:b,accept:"application/json"}};fetch(i.href,y).then(g=>g.json()).then(g=>{a(1,M=!1),a(3,k=g.CashierUrl)},g=>{console.error(g)})},H=()=>{A(h)},P=()=>{let i=document.createElement("style");i.innerHTML=o,u.appendChild(i)},U=()=>{let i=new URL(s),y=document.createElement("style");fetch(i.href).then(g=>g.text()).then(g=>{y.innerHTML=g,setTimeout(()=>{u.appendChild(y)},1)})};e.onMount(()=>(window.addEventListener("message",T,!1),()=>{window.removeEventListener("message",T)}));const F=()=>S();function I(i){e.binding_callbacks[i?"unshift":"push"](()=>{u=i,a(0,u)})}return n.$$set=i=>{"endpoint"in i&&a(8,c=i.endpoint),"session"in i&&a(9,m=i.session),"playerid"in i&&a(10,d=i.playerid),"lang"in i&&a(11,h=i.lang),"hasdefaultamount"in i&&a(12,f=i.hasdefaultamount),"clientstyling"in i&&a(13,o=i.clientstyling),"clientstylingurl"in i&&a(14,s=i.clientstylingurl),"translationurl"in i&&a(15,p=i.translationurl),"playercurrency"in i&&a(7,w=i.playercurrency),"shortcashierenabled"in i&&a(16,b=i.shortcashierenabled)},n.$$.update=()=>{n.$$.dirty&2048&&h&&H(),n.$$.dirty&65536&&(l=b.toLocaleLowerCase()==="true"),n.$$.dirty&16385&&s&&u&&U(),n.$$.dirty&8193&&o&&u&&P(),n.$$.dirty&32768&&p&&R(),n.$$.dirty&69504&&m&&d&&c&&w&&h&&b&&B()},[u,M,C,k,r,v,S,w,c,m,d,h,f,o,s,p,b,F,I]}class E extends e.SvelteComponent{constructor(t){super(),e.init(this,t,q,N,e.safe_not_equal,{endpoint:8,session:9,playerid:10,lang:11,hasdefaultamount:12,clientstyling:13,clientstylingurl:14,translationurl:15,playercurrency:7,shortcashierenabled:16},W)}get endpoint(){return this.$$.ctx[8]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get session(){return this.$$.ctx[9]}set session(t){this.$$set({session:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get lang(){return this.$$.ctx[11]}set lang(t){this.$$set({lang:t}),e.flush()}get hasdefaultamount(){return this.$$.ctx[12]}set hasdefaultamount(t){this.$$set({hasdefaultamount:t}),e.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}get playercurrency(){return this.$$.ctx[7]}set playercurrency(t){this.$$set({playercurrency:t}),e.flush()}get shortcashierenabled(){return this.$$.ctx[16]}set shortcashierenabled(t){this.$$set({shortcashierenabled:t}),e.flush()}}e.create_custom_element(E,{endpoint:{},session:{},playerid:{},lang:{},hasdefaultamount:{},clientstyling:{},clientstylingurl:{},translationurl:{},playercurrency:{},shortcashierenabled:{}},[],[],!0);exports.default=E;
@@ -1 +0,0 @@
1
- "use strict";var p=(e,t,i)=>new Promise((n,a)=>{var o=r=>{try{l(i.next(r))}catch(d){a(d)}},c=r=>{try{l(i.throw(r))}catch(d){a(d)}},l=r=>r.done?n(r.value):Promise.resolve(r.value).then(o,c);l((i=i.apply(e,t)).next())});const s=require("./index-1ed44842-Dr1nsipr.cjs"),m="en";let h={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const g=e=>new Promise(t=>{fetch(e).then(i=>i.json()).then(i=>{Object.keys(i).forEach(n=>{h[n]||(h[n]={});for(let a in i[n])h[n][a]=i[n][a]}),t(!0)})}),u=(e,t)=>{const i=t;return h[i!==void 0&&i in h?i:m][e]},y=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}",w=y,f=class{constructor(e){s.registerInstance(this,e),this.language="en",this.session="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{i.innerHTML=n,setTimeout(()=>{this.stylingContainer.prepend(i)},1)}).catch(n=>{console.log("error ",n)})},this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=t=>{t.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=t=>{t.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}}handleNewTranslations(){this.isLoading=!0,g(this.translationUrl).then(()=>{this.isLoading=!1})}componentWillLoad(){return p(this,null,function*(){if(this.translationUrl.length>2&&(yield g(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}fetchPointsData(){let e=new URL(`${this.endpoint}/v1/elevate/playerInfo`);e.searchParams.append("language",this.language);const t=new Headers;t.append("X-SessionId",this.session);const i={method:"GET",headers:t};return new Promise((n,a)=>{this.isLoading=!0,fetch(e.href,i).then(o=>o.json()).then(o=>{var c,l;this.loyaltyPoints=(l=(c=o==null?void 0:o.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,n(!0)}).catch(o=>{console.error(o),a(o)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:s.h("div",{ref:e=>this.stylingContainer=e,class:"GamificationDropdownContainer"},s.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:e=>this.handleDropdownClick(e),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):u("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",s.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},s.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},s.h("path",{id:"arrow",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",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&s.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},s.h("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling})))}get el(){return s.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};f.style=w;exports.GamificationDropdown=f;
@@ -1,192 +0,0 @@
1
- "use strict";var f=(e,t,a)=>new Promise((n,l)=>{var i=d=>{try{s(a.next(d))}catch(p){l(p)}},c=d=>{try{s(a.throw(d))}catch(p){l(p)}},s=d=>d.done?n(d.value):Promise.resolve(d.value).then(i,c);s((a=a.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./gamification-dropdown-370424de-pf_jqgr1.cjs"),r=require("./index-1ed44842-Dr1nsipr.cjs"),o=require("./player-elevate-card-items-4e46b4c8-aapR8B2m.cjs"),B=(e,t)=>new Promise(a=>{fetch(e).then(n=>n.json()).then(n=>{Object.keys(n).forEach(l=>{t[l]=t[l]?t[l]:{};for(let i in n[l])t[l][i]=n[l][i]}),a(!0)})}),M=":host{display:block}",R=M,m=class{constructor(e){r.registerInstance(this,e),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.el.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),a=document.createElement("style");fetch(t.href).then(n=>n.text()).then(n=>{a.innerHTML=n,setTimeout(()=>{this.el.prepend(a)},1)}).catch(n=>{console.log("error ",n)})}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}componentWillLoad(){return f(this,null,function*(){const e=[];if(this.translationUrl){const t=B(this.translationUrl,this.targetTranslations);e.push(t)}return yield Promise.all(e)})}render(){return r.h("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},r.h("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return r.getElement(this)}};m.style=R;function x(e){o.requiredArgs(1,arguments);var t=o.toDate(e);return t.setHours(0,0,0,0),t}var O=864e5;function q(e,t){o.requiredArgs(2,arguments);var a=x(e),n=x(t),l=a.getTime()-o.getTimezoneOffsetInMilliseconds(a),i=n.getTime()-o.getTimezoneOffsetInMilliseconds(n);return Math.round((l-i)/O)}var N=6e4,$=36e5;function L(e,t){return o.requiredArgs(2,arguments),o.toDate(e).getTime()-o.toDate(t).getTime()}var b={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},W="trunc";function E(e){return e?b[e]:b[W]}function z(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/$;return E(a==null?void 0:a.roundingMethod)(n)}function U(e,t,a){o.requiredArgs(2,arguments);var n=L(e,t)/N;return E(a==null?void 0:a.roundingMethod)(n)}function F(e,t){o.requiredArgs(2,arguments);var a=o.toDate(e),n=o.toDate(t);return a.getTime()<n.getTime()}function j(e,t){const a=e.querySelector("#total_level"),n=17,l=6.5,i=a.getBBox().width,c=t>1?1:t,s=c*i-n<0?0:c*i-n,d=e.querySelector("#current_level"),p=e.querySelector("#filter_current_level"),h=e.querySelector("#circle_current_level");a.setAttribute("viewbox",`0 0 ${s} 28`),d.setAttribute("width",`${s}`),h.setAttribute("cx",`${s<l?l:s}`),p.setAttribute("x",`${s-8}`);const g=e.querySelector("#lock"),P=e.querySelector("#filter_heart_ball"),C=e.querySelector("#filter_ball"),k=e.querySelector("#filter_heart"),S=e.querySelector("#filter_lock"),y=e.querySelector("#paint0_linear_ball"),u=e.querySelector("#paint1_linear_lock"),T=e.querySelector("#lock_box"),A=e.querySelector("#heart_box"),D=10,v=i-D;g.setAttribute("cx",`${v}`),u.setAttribute("x1",`${v}`),u.setAttribute("x2",`${v}`),y.setAttribute("x1",`${v-6}`),y.setAttribute("x2",`${v-6+11.2}`),S.setAttribute("x",`${v-6}`),k.setAttribute("x",`${v-6-2}`),C.setAttribute("x",`${v-6-2-2}`),P.setAttribute("x",`${v-6-2-2-4}`),T.setAttribute("x",`${v-6}`),A.setAttribute("x",`${v-6}`),a.parentElement.style.opacity="1"}const H=`:host {
2
- display: block;
3
- width: 360px;
4
- height: 230px;
5
- }
6
-
7
- .ElevateCardWrapper {
8
- contain: layout inline-size;
9
- width: 100%;
10
- height: fit-content;
11
- min-height: 218px;
12
- }
13
-
14
- .Outer {
15
- container-type: inline-size;
16
- font-size: 12px;
17
- background-size: cover;
18
- background-repeat: no-repeat;
19
- line-height: initial;
20
- width: 100%;
21
- height: 100%;
22
- }
23
-
24
- .Dark {
25
- color: var(--emw--color-gray150, #efefef);
26
- }
27
-
28
- .Light {
29
- color: var(--emw--color-black, #0e0e0e);
30
- }
31
-
32
- @container (min-width: 381px) {
33
- .Outer {
34
- background-size: cover;
35
- }
36
- .Outer .OuterCover {
37
- min-height: 190px;
38
- }
39
- }
40
- @container (min-width: 260px) {
41
- .Outer {
42
- background-size: contain;
43
- }
44
- }
45
- .OuterCover {
46
- width: 100%;
47
- height: 100%;
48
- content: "";
49
- background-repeat: no-repeat;
50
- background-size: cover;
51
- border-radius: 15px;
52
- }
53
-
54
- .Inner {
55
- display: flex;
56
- flex-direction: column;
57
- min-height: 158px;
58
- }
59
- .Inner .Content {
60
- padding: 15px;
61
- flex-wrap: wrap;
62
- gap: 8px;
63
- }
64
- .Inner .Row {
65
- display: flex;
66
- flex-direction: row;
67
- }
68
- .Inner .CardCell {
69
- display: flex;
70
- }
71
- .Inner .LevelProgress svg {
72
- transition: opacity 0.4s;
73
- }
74
- .Inner .LevelInfo {
75
- display: flex;
76
- flex-direction: column;
77
- }
78
- .Inner .LevelInfo .ElevateLevel .LevelName {
79
- height: 28px;
80
- border-radius: 5px;
81
- line-height: 28px;
82
- overflow: hidden;
83
- text-overflow: ellipsis;
84
- white-space: nowrap;
85
- }
86
- .Inner .LevelInfo.Level0 .ElevateLevel .LevelName {
87
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));
88
- background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);
89
- }
90
- .Inner .LevelInfo.Level1 .ElevateLevel .LevelName {
91
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));
92
- background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);
93
- }
94
- .Inner .LevelInfo.Level2 .ElevateLevel .LevelName {
95
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));
96
- background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);
97
- }
98
- .Inner .LevelInfo.Level3 .ElevateLevel .LevelName {
99
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));
100
- background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);
101
- }
102
- .Inner .LevelInfo.Level4 .ElevateLevel .LevelName {
103
- box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));
104
- background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);
105
- }
106
- .Inner .LevelInfo .ElevateLevel {
107
- display: flex;
108
- }
109
- .Inner .LevelInfo {
110
- flex: 1;
111
- flex-grow: 1;
112
- min-width: 150px;
113
- }
114
- .Inner .PlayerImg {
115
- width: 29%;
116
- margin: auto;
117
- max-width: 100px;
118
- min-width: 30px;
119
- order: 0;
120
- }
121
- .Inner .PlayerAvatar {
122
- max-width: 100px;
123
- flex-basis: 100px;
124
- height: auto;
125
- margin: auto;
126
- padding-top: 10px;
127
- }
128
- .Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {
129
- width: 100%;
130
- height: 100%;
131
- }
132
- .Inner .PlayerAvatar .Avatar {
133
- border-radius: 50%;
134
- background-size: contain;
135
- background-repeat: no-repeat;
136
- }
137
- .Inner .ElevateLevel .ExpirationDate {
138
- max-width: 138px;
139
- min-width: 118px;
140
- }
141
- .Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {
142
- text-transform: capitalize;
143
- width: 100%;
144
- }
145
- .Inner .PlayerName {
146
- font-size: 16px;
147
- }
148
- .Inner .Row .PointsInfo {
149
- display: table;
150
- font-weight: 600;
151
- }
152
- .Inner .Row .Redeem {
153
- justify-content: flex-end;
154
- margin-left: auto;
155
- }
156
- .Inner .Row .Redeem:hover {
157
- color: var(--emw--elevate-color-redeem-hover, #00ABA4);
158
- cursor: pointer;
159
- }
160
- .Inner .Row .RedeemButton:hover span {
161
- color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);
162
- font-weight: bold;
163
- }
164
- .Inner .Row .RedeemButton {
165
- width: 95px;
166
- height: 35px;
167
- display: flex;
168
- align-items: center;
169
- border-radius: 10px;
170
- background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);
171
- box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);
172
- }
173
- .Inner .Row .RedeemButton span {
174
- color: var(--emw--color-white, #fff);
175
- line-height: 18px;
176
- font-size: 15px;
177
- text-align: center;
178
- width: 100%;
179
- }
180
- .Inner .Row .Points {
181
- font-size: large;
182
- vertical-align: middle;
183
- }
184
- .Inner .Row .Points .XP {
185
- font-size: x-small;
186
- }
187
- .Inner .Row .ExpirationPoints {
188
- font-size: small;
189
- text-align: right;
190
- font-weight: bold;
191
- color: var(--emw--color-red, #9e595f);
192
- }`,G=H,w=class{constructor(e){r.registerInstance(this,e),this.playerElevateLeveLoaded=r.createEvent(this,"playerElevateLeveLoaded")}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET"}).then(n=>n.json()).then(n=>{this.levels=n.data,t(!0)}).catch(n=>{a(n)}))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||e.aboutToExpire.length==0||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort((s,d)=>F(new Date(s.expireTime),new Date(d.expireTime))?-1:1);const a=e.aboutToExpire[0],n=q(new Date(a.expireTime),new Date);let l=0,i=0,c=n===0?"pointsToBeExpiredDay":"pointsToBeExpired";return n<=0&&(l=z(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=l>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour",l<=0&&(i=U(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),c=i>1?"pointsToBeExpiredMinutes":"pointsToBeExpiredMinute")),t=o.translateWithParams(c,{expirationPoints:a.points,expireDay:Math.max(n,l,i)}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise((t,a)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then(n=>n.json()).then(n=>{var l,i,c;if(!n.success){console.error("Exception when fetch user elevateinfo, ",n.errorCode,n.errorMessage),a(!0);return}let s=n.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=((l=s.spendableWallet)===null||l===void 0?void 0:l.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const d=(i=n.data.spendableWallet)===null||i===void 0?void 0:i.total,p=(c=n.data.loyaltyWallet)===null||c===void 0?void 0:c.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:d,loyaltyWalletTotal:p});let h=this.calcuatePointsToBeExpired(d),g=this.calcuatePointsToBeExpired(p);(h||g)&&this.playerElevateLeveLoaded.emit({pointExpireString:h,xpExpireString:g}),t(this.playerElevateLevel)}).catch(n=>{console.log("error ",n),a(!0)}))}setLoyaltyProgress(e){j(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout(()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)},80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then(t=>{if(console.log("elevate-init",t),this.initLevelProgressbar(),!this.levels)return;this.levels.sort((l,i)=>l.firstEntryPoints>i.firstEntryPoints?1:-1);const a=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach((l,i)=>{a>l.firstEntryPoints&&(n=i)}),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})})}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r.getElement(this)}static get watchers(){return{params:["onParamsChanged"]}}};w.style=G;const X=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}",K=X,I=class{constructor(e){r.registerInstance(this,e),this.theme="Dark",this.language="en",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl=""}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelPoints(){var e,t;return!((e=this.playerElevateLevel)===null||e===void 0)&&e.nextLevel?(t=this.playerElevateLevel)===null||t===void 0?void 0:t.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let t=(e=this.playerElevateLevel)===null||e===void 0?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const a=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return o.translateWithParams("tipsForNextLevel",{pointsToReach:a,levelName:t.name,lang:this.language})}return""}render(){const e=r.getAssetPath("../static/card-ground.svg"),t=r.getAssetPath("../static/card-ground-over.svg");return r.h("div",{key:"2b0944f8317a94621e1bc65bbbb3726654b8963b",class:`ElevateCardWrapper ${this.theme}`},r.h("div",{key:"c6d4dbba143435b4485d7fde91ab0a48a2f6688b",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},r.h("general-styling-wrapper",{key:"e47a4efe925eb35d4449c6ff33a0afef9d284e55",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o.TRANSLATIONS,translationUrl:this.translationUrl}),r.h("player-elevate-card-data",{key:"a560991893305894ddd41756cd7b3c32d0ef9e03",params:this.paramProxy}),r.h("div",{key:"ceb8b71386f84f54518a3694535aa16c2c3d3951",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},r.h("div",{key:"1df9647c3de42e74adee0f8895511442118ae381",class:"Content Row"},this.playerElevateLevel&&r.h(r.Fragment,{key:"569bcd5fc3c578d2e6cc7442d28444e29688660c"},r.h("div",{key:"aa40032bff99c5462b906e4427232ca2d4019017",class:"PlayerImg"},r.h(o.PlayerAvatar,{key:"7a2d535b0c2029c90b9f1c123f9feebafca6bdde",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),r.h("div",{key:"90999da8fc2a3102eac235fcbc8afbec2a2bbdf8",class:`LevelInfo ${this.playerElevateLevel.name}`},r.h(o.PlayerElevateLoyaltyLevel,{key:"67e8bf370b1b77e776fb6d955ae63928fd1338d8",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),r.h("div",{key:"1e0fefc6a23f4aeeef5e19828399fe1229a3fc81",class:"PointsRange"},r.h(o.PlayerPoints,{key:"dd176e624cde3b6f517101d7702a15465305174d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),r.h(o.PlayerPoints,{key:"6cddb64c92545803d08fbbc513cc951b2691a42e",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),r.h(o.PlayerLoyaltyProcess,{key:"08817ca979ea784aeb735579b0d52e5150eb0852"}),r.h("div",{key:"be9a1b40a8145d5e6d329d8e9f047296e84dd24b",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&r.h("div",{key:"f9cbb7d06e34717cb9f74cb8d2e506e49969e775",class:"PointsInfo ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};I.style=K;exports.gamification_dropdown=_.GamificationDropdown;exports.general_styling_wrapper=m;exports.player_elevate_card_data=w;exports.player_elevate_loyaltycard=I;