@everymatrix/casino-header-controller 1.64.7 → 1.65.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 (67) hide show
  1. package/components/{CasinoHamburgerMenu-BMkeLxFw.js → CasinoHamburgerMenu-B1dY3jHB.js} +886 -907
  2. package/components/CasinoHamburgerMenu-CaFkIr3d.cjs +21 -0
  3. package/components/{CasinoHamburgerMenu-CTVc2-UF.js → CasinoHamburgerMenu-pBvrxlJy.js} +830 -851
  4. package/components/CasinoHeaderController-B0cFJgaJ.cjs +13 -0
  5. package/components/CasinoHeaderController-Bn2AwIyI.js +3246 -0
  6. package/components/CasinoHeaderController-DOdeXoey.js +3223 -0
  7. package/components/{CasinoSlider-Deb0x84t.js → CasinoSlider-BEx_hpVM.js} +88 -88
  8. package/components/{CasinoSlider-CTcAOyCp.js → CasinoSlider-CKGPxibK.js} +57 -57
  9. package/components/{CasinoSlider-DqTtsMWh.cjs → CasinoSlider-CL_Uac-c.cjs} +1 -1
  10. package/components/PlayerAccountBalanceModal-BKMugmnm.js +1539 -0
  11. package/components/PlayerAccountBalanceModal-CK68FRSV.js +1510 -0
  12. package/components/PlayerAccountBalanceModal-iP2HDeoz.cjs +13 -0
  13. package/components/PlayerDeposit-BsUiL_LS.cjs +1 -0
  14. package/components/{PlayerDeposit-BZuTQSyp.js → PlayerDeposit-Byf7G3yu.js} +72 -72
  15. package/components/{PlayerDeposit-eY_YGhMJ.js → PlayerDeposit-C-Fbg92q.js} +72 -72
  16. package/es2015/casino-header-controller.cjs +1 -1
  17. package/es2015/casino-header-controller.js +1 -1
  18. package/esnext/casino-header-controller.js +1 -1
  19. package/package.json +1 -1
  20. package/stencil/app-globals-0f993ce5-B6nNHmA4.js +7 -0
  21. package/stencil/app-globals-0f993ce5-DgOnOgxM.cjs +1 -0
  22. package/stencil/gamification-dropdown-8eb8a896-BXV0d81L.cjs +1 -0
  23. package/stencil/gamification-dropdown-8eb8a896-CxTBD8Oq.js +144 -0
  24. package/stencil/gamification-dropdown-8eb8a896-DsjvIRRh.js +126 -0
  25. package/stencil/gamification-dropdown-C_xYxEL8.js +7 -0
  26. package/stencil/gamification-dropdown-DG0vAJtO.js +25 -0
  27. package/stencil/gamification-dropdown-DUk8bbFT.cjs +1 -0
  28. package/stencil/gamification-dropdown_4-Be_N4EeF.js +451 -0
  29. package/stencil/gamification-dropdown_4-DuMaGjcI.cjs +192 -0
  30. package/stencil/gamification-dropdown_4-zImC9hF9.js +469 -0
  31. package/stencil/index-1ef3a64c-C31PLQx3.js +572 -0
  32. package/stencil/index-1ef3a64c-CkoGfMtU.cjs +1 -0
  33. package/stencil/index-1ef3a64c-WzZ9mlMM.js +556 -0
  34. package/stencil/index-71b1bdfa-Dm7yvsrK.js +784 -0
  35. package/stencil/index-71b1bdfa-DzyepuUf.js +757 -0
  36. package/stencil/index-71b1bdfa-urw3SgKF.cjs +1 -0
  37. package/stencil/locale-DHn5ZpQu.cjs +1 -0
  38. package/stencil/locale-DuSXBQwH.js +215 -0
  39. package/stencil/player-elevate-card-C6V7VROS.cjs +64 -0
  40. package/stencil/player-elevate-card-Cmxvkrge.js +106 -0
  41. package/stencil/player-elevate-card-DL6XwNnq.js +106 -0
  42. package/stencil/player-elevate-card-items-66be34fb-BUkxBwF8.js +1292 -0
  43. package/stencil/player-elevate-card-items-66be34fb-BjQeJ-p9.js +1292 -0
  44. package/stencil/player-elevate-card-items-66be34fb-DeUY02M2.cjs +1 -0
  45. package/stencil/player-elevate-pointcard-CbCIvh8I.cjs +1 -0
  46. package/stencil/player-elevate-pointcard-DYOUbwi3.js +44 -0
  47. package/stencil/player-elevate-pointcard-dDiPwAiV.js +44 -0
  48. package/stencil/player-rakeback-card-BMHeEc3P.cjs +1 -0
  49. package/stencil/player-rakeback-card-CixEJCwY.js +137 -0
  50. package/stencil/player-rakeback-card-CxD8OOP-.js +111 -0
  51. package/stencil/{user-deposit-withdrawal-4aK-1zzW.js → user-deposit-withdrawal-CXMt1MVo.js} +2 -2
  52. package/stencil/user-deposit-withdrawal-Ck524nr-.cjs +68 -0
  53. package/stencil/{user-deposit-withdrawal-BhsnZiSd.js → user-deposit-withdrawal-DU6VQt9M.js} +2 -2
  54. package/components/CasinoHamburgerMenu-CrZ5l9tM.cjs +0 -21
  55. package/components/CasinoHeaderController-BIefUWQL.js +0 -3114
  56. package/components/CasinoHeaderController-DSyglpDF.cjs +0 -13
  57. package/components/CasinoHeaderController-KfLekr0Q.js +0 -3137
  58. package/components/PlayerAccountBalanceModal-BFDpI9Sy.cjs +0 -13
  59. package/components/PlayerAccountBalanceModal-CNXuqjqU.js +0 -1539
  60. package/components/PlayerAccountBalanceModal-DbULiu-f.js +0 -1510
  61. package/components/PlayerDeposit-BXwT7NVp.cjs +0 -1
  62. package/stencil/app-globals-0f993ce5-D-kw1sls.js +0 -5
  63. package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +0 -1
  64. package/stencil/index-1ef3a64c-B6t9gkO1.js +0 -556
  65. package/stencil/index-1ef3a64c-BdrVNGQe.cjs +0 -1
  66. package/stencil/index-1ef3a64c-BfGbBN_r.js +0 -572
  67. package/stencil/user-deposit-withdrawal-HQmDGKFu.cjs +0 -68
@@ -0,0 +1,7 @@
1
+ import { b as a, p as l } from "./index-71b1bdfa-DzyepuUf.js";
2
+ import { g as t } from "./app-globals-0f993ce5-B6nNHmA4.js";
3
+ var r = () => {
4
+ const e = import.meta.url, n = {};
5
+ return e !== "" && (n.resourcesUrl = new URL(".", e).href), l(n);
6
+ };
7
+ r().then(async (e) => (await t(), a([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], translationUrl: [1, "translation-url"], targetTranslations: [16] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-rakeback-card", [[1, "player-rakeback-card", { endpoint: [513], theme: [513], session: [513], language: [513], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], show: [516], rakebackInfo: [32], isLoading: [32], coolingOffPeriod: [32], showTheWidget: [32] }, [[8, "message", "handleMessage"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"], show: ["onShowOrHasRakebackWalletChange"], rakebackInfo: ["onShowOrHasRakebackWalletChange"] }]]]], e)));
@@ -0,0 +1,25 @@
1
+ var o = (n, a, l) => new Promise((s, i) => {
2
+ var g = (e) => {
3
+ try {
4
+ t(l.next(e));
5
+ } catch (r) {
6
+ i(r);
7
+ }
8
+ }, p = (e) => {
9
+ try {
10
+ t(l.throw(e));
11
+ } catch (r) {
12
+ i(r);
13
+ }
14
+ }, t = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(g, p);
15
+ t((l = l.apply(n, a)).next());
16
+ });
17
+ import { b as d, p as y } from "./index-71b1bdfa-Dm7yvsrK.js";
18
+ import { g as c } from "./app-globals-0f993ce5-B6nNHmA4.js";
19
+ var v = () => {
20
+ const n = import.meta.url, a = {};
21
+ return n !== "" && (a.resourcesUrl = new URL(".", n).href), y(a);
22
+ };
23
+ v().then((n) => o(void 0, null, function* () {
24
+ return yield c(), d([["gamification-dropdown_4", [[1, "gamification-dropdown", { endpoint: [513], language: [513], session: [513], mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], isOpen: [32], isLoading: [32], loyaltyPoints: [32] }, null, { translationUrl: ["handleNewTranslations"], clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }], [1, "player-elevate-loyaltycard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], mbSource: [1, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }], [0, "player-elevate-card-data", { params: [8], playerElevateLevel: [32], pointExpireString: [32] }, [[9, "resize", "handleWindowResizs"], [8, "redeemGiftButton", "redeemGiftButtonHandler"]], { params: ["onParamsChanged"] }], [4, "general-styling-wrapper", { clientStyling: [1, "client-styling"], clientStylingUrl: [1, "client-styling-url"], translationUrl: [1, "translation-url"], targetTranslations: [16] }]]], ["player-elevate-card", [[1, "player-elevate-card", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerLevelFlag: [32], playerElevateLevel: [32], elevateWalletTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-elevate-pointcard", [[1, "player-elevate-pointcard", { endpoint: [513], theme: [513], session: [513], playerAvatarUrl: [513, "player-avatar-url"], language: [513], playerName: [513, "player-name"], cardTitle: [513, "card-title"], buttonType: [513, "button-type"], dateFormat: [513, "date-format"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], pointExpireString: [32], playerElevateLevel: [32], elevateWalletTotal: [32], elevateSPTotal: [32] }, [[0, "playerElevateLeveLoaded", "playerElevateLeveLoadedHandler"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"] }]]], ["player-rakeback-card", [[1, "player-rakeback-card", { endpoint: [513], theme: [513], session: [513], language: [513], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], show: [516], rakebackInfo: [32], isLoading: [32], coolingOffPeriod: [32], showTheWidget: [32] }, [[8, "message", "handleMessage"]], { session: ["onSessionOrEndpointChange"], endpoint: ["onSessionOrEndpointChange"], language: ["onSessionOrEndpointChange"], show: ["onShowOrHasRakebackWalletChange"], rakebackInfo: ["onShowOrHasRakebackWalletChange"] }]]]], n);
25
+ }));
@@ -0,0 +1 @@
1
+ "use strict";var s=(n,a,t)=>new Promise((d,o)=>{var g=e=>{try{l(t.next(e))}catch(r){o(r)}},c=e=>{try{l(t.throw(e))}catch(r){o(r)}},l=e=>e.done?d(e.value):Promise.resolve(e.value).then(g,c);l((t=t.apply(n,a)).next())});const p=require("./index-71b1bdfa-urw3SgKF.cjs"),y=require("./app-globals-0f993ce5-DgOnOgxM.cjs");var i=typeof document!="undefined"?document.currentScript:null,u=()=>{const n=typeof document=="undefined"?require("url").pathToFileURL(__filename).href:i&&i.tagName.toUpperCase()==="SCRIPT"&&i.src||new URL("stencil/gamification-dropdown-DUk8bbFT.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),p.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield y.globalScripts(),p.bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],n)}));
@@ -0,0 +1,451 @@
1
+ import { G as ce } from "./gamification-dropdown-8eb8a896-DsjvIRRh.js";
2
+ import { r as u, h as i, g as I, c as M, a as m, F as O } from "./index-71b1bdfa-DzyepuUf.js";
3
+ import { t as P, T as N } from "./locale-DuSXBQwH.js";
4
+ import { P as $, a as W, b, c as z, r as c, g as L, t as p } from "./player-elevate-card-items-66be34fb-BjQeJ-p9.js";
5
+ const U = (e, t) => new Promise((a) => {
6
+ fetch(e).then((n) => n.json()).then((n) => {
7
+ Object.keys(n).forEach((r) => {
8
+ t[r] = t[r] ? t[r] : {};
9
+ for (let l in n[r])
10
+ t[r][l] = n[r][l];
11
+ }), a(!0);
12
+ });
13
+ }), q = ":host{display:block}", F = q, H = class {
14
+ constructor(e) {
15
+ u(this, e), this.stylingAppends = !1, this.setClientStyling = () => {
16
+ let t = document.createElement("style");
17
+ t.innerHTML = this.clientStyling, this.el.prepend(t);
18
+ }, this.setClientStylingURL = () => {
19
+ let t = new URL(this.clientStylingUrl), a = document.createElement("style");
20
+ fetch(t.href).then((n) => n.text()).then((n) => {
21
+ a.innerHTML = n, setTimeout(() => {
22
+ this.el.prepend(a);
23
+ }, 1);
24
+ }).catch((n) => {
25
+ console.log("error ", n);
26
+ });
27
+ }, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.targetTranslations = void 0;
28
+ }
29
+ componentDidRender() {
30
+ this.stylingAppends || (this.clientStyling && this.setClientStyling(), this.clientStylingUrl && this.setClientStylingURL(), this.stylingAppends = !0);
31
+ }
32
+ async componentWillLoad() {
33
+ const e = [];
34
+ if (this.translationUrl) {
35
+ const t = U(this.translationUrl, this.targetTranslations);
36
+ e.push(t);
37
+ }
38
+ return await Promise.all(e);
39
+ }
40
+ render() {
41
+ return i("div", { key: "4d3414408c7662f88331dbe655966237f74d6958", class: "StyleShell" }, i("slot", { key: "1d004644d84602c4314bdf5dfc26b55b160f57df", name: "mainContent" }));
42
+ }
43
+ get el() {
44
+ return I(this);
45
+ }
46
+ };
47
+ H.style = F;
48
+ function E(e) {
49
+ c(1, arguments);
50
+ var t = p(e);
51
+ return t.setHours(0, 0, 0, 0), t;
52
+ }
53
+ var j = 864e5;
54
+ function G(e, t) {
55
+ c(2, arguments);
56
+ var a = E(e), n = E(t), r = a.getTime() - L(a), l = n.getTime() - L(n);
57
+ return Math.round((r - l) / j);
58
+ }
59
+ var X = 6e4, K = 36e5;
60
+ function k(e, t) {
61
+ return c(2, arguments), p(e).getTime() - p(t).getTime();
62
+ }
63
+ var w = {
64
+ ceil: Math.ceil,
65
+ round: Math.round,
66
+ floor: Math.floor,
67
+ trunc: function(t) {
68
+ return t < 0 ? Math.ceil(t) : Math.floor(t);
69
+ }
70
+ // Math.trunc is not supported by IE
71
+ }, Y = "trunc";
72
+ function C(e) {
73
+ return e ? w[e] : w[Y];
74
+ }
75
+ function J(e, t, a) {
76
+ c(2, arguments);
77
+ var n = k(e, t) / K;
78
+ return C(a?.roundingMethod)(n);
79
+ }
80
+ function Q(e, t, a) {
81
+ c(2, arguments);
82
+ var n = k(e, t) / X;
83
+ return C(a?.roundingMethod)(n);
84
+ }
85
+ function V(e, t) {
86
+ c(2, arguments);
87
+ var a = p(e), n = p(t);
88
+ return a.getTime() < n.getTime();
89
+ }
90
+ function Z(e, t) {
91
+ const a = e.querySelector("#total_level"), n = 17, r = 6.5, l = a.getBBox().width, s = t > 1 ? 1 : t, d = s * l - n < 0 ? 0 : s * l - n, v = e.querySelector("#current_level"), h = e.querySelector("#filter_current_level"), g = e.querySelector("#circle_current_level");
92
+ a.setAttribute("viewbox", `0 0 ${d} 28`), v.setAttribute("width", `${d}`), g.setAttribute("cx", `${d < r ? r : d}`), h.setAttribute("x", `${d - 8}`);
93
+ const y = e.querySelector("#lock"), S = e.querySelector("#filter_heart_ball"), T = e.querySelector("#filter_ball"), A = e.querySelector("#filter_heart"), B = e.querySelector("#filter_lock"), f = e.querySelector("#paint0_linear_ball"), x = e.querySelector("#paint1_linear_lock"), D = e.querySelector("#lock_box"), _ = e.querySelector("#heart_box"), R = 10, o = l - R;
94
+ y.setAttribute("cx", `${o}`), x.setAttribute("x1", `${o}`), x.setAttribute("x2", `${o}`), f.setAttribute("x1", `${o - 6}`), f.setAttribute("x2", `${o - 6 + 11.2}`), B.setAttribute("x", `${o - 6}`), A.setAttribute("x", `${o - 6 - 2}`), T.setAttribute("x", `${o - 6 - 2 - 2}`), S.setAttribute("x", `${o - 6 - 2 - 2 - 4}`), D.setAttribute("x", `${o - 6}`), _.setAttribute("x", `${o - 6}`), a.parentElement.style.opacity = "1";
95
+ }
96
+ const ee = `:host {
97
+ display: block;
98
+ width: 360px;
99
+ height: 230px;
100
+ }
101
+
102
+ .ElevateCardWrapper {
103
+ contain: layout inline-size;
104
+ width: 100%;
105
+ height: fit-content;
106
+ min-height: 218px;
107
+ }
108
+
109
+ .Outer {
110
+ container-type: inline-size;
111
+ font-size: 12px;
112
+ background-size: cover;
113
+ background-repeat: no-repeat;
114
+ line-height: initial;
115
+ width: 100%;
116
+ height: 100%;
117
+ }
118
+
119
+ .Dark {
120
+ color: var(--emw--color-gray150, #efefef);
121
+ }
122
+
123
+ .Light {
124
+ color: var(--emw--color-black, #0e0e0e);
125
+ }
126
+
127
+ @container (min-width: 381px) {
128
+ .Outer {
129
+ background-size: cover;
130
+ }
131
+ .Outer .OuterCover {
132
+ min-height: 190px;
133
+ }
134
+ }
135
+ @container (min-width: 260px) {
136
+ .Outer {
137
+ background-size: contain;
138
+ }
139
+ }
140
+ .OuterCover {
141
+ width: 100%;
142
+ height: 100%;
143
+ content: "";
144
+ background-repeat: no-repeat;
145
+ background-size: cover;
146
+ border-radius: 15px;
147
+ }
148
+
149
+ .Inner {
150
+ display: flex;
151
+ flex-direction: column;
152
+ min-height: 158px;
153
+ }
154
+ .Inner .Content {
155
+ padding: 15px;
156
+ flex-wrap: wrap;
157
+ gap: 8px;
158
+ }
159
+ .Inner .Row {
160
+ display: flex;
161
+ flex-direction: row;
162
+ }
163
+ .Inner .CardCell {
164
+ display: flex;
165
+ }
166
+ .Inner .LevelProgress svg {
167
+ transition: opacity 0.4s;
168
+ }
169
+ .Inner .LevelInfo {
170
+ display: flex;
171
+ flex-direction: column;
172
+ }
173
+ .Inner .LevelInfo .ElevateLevel .LevelName {
174
+ height: 28px;
175
+ border-radius: 5px;
176
+ line-height: 28px;
177
+ overflow: hidden;
178
+ text-overflow: ellipsis;
179
+ white-space: nowrap;
180
+ }
181
+ .Inner .LevelInfo.Level0 .ElevateLevel .LevelName {
182
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));
183
+ background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);
184
+ }
185
+ .Inner .LevelInfo.Level1 .ElevateLevel .LevelName {
186
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));
187
+ background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);
188
+ }
189
+ .Inner .LevelInfo.Level2 .ElevateLevel .LevelName {
190
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));
191
+ background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);
192
+ }
193
+ .Inner .LevelInfo.Level3 .ElevateLevel .LevelName {
194
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));
195
+ background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);
196
+ }
197
+ .Inner .LevelInfo.Level4 .ElevateLevel .LevelName {
198
+ box-shadow: -2px -2px 7px 0px var(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));
199
+ background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);
200
+ }
201
+ .Inner .LevelInfo .ElevateLevel {
202
+ display: flex;
203
+ }
204
+ .Inner .LevelInfo {
205
+ flex: 1;
206
+ flex-grow: 1;
207
+ min-width: 150px;
208
+ }
209
+ .Inner .PlayerImg {
210
+ width: 29%;
211
+ margin: auto;
212
+ max-width: 100px;
213
+ min-width: 30px;
214
+ order: 0;
215
+ }
216
+ .Inner .PlayerAvatar {
217
+ max-width: 100px;
218
+ flex-basis: 100px;
219
+ height: auto;
220
+ margin: auto;
221
+ padding-top: 10px;
222
+ }
223
+ .Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {
224
+ width: 100%;
225
+ height: 100%;
226
+ }
227
+ .Inner .PlayerAvatar .Avatar {
228
+ border-radius: 50%;
229
+ background-size: contain;
230
+ background-repeat: no-repeat;
231
+ }
232
+ .Inner .ElevateLevel .ExpirationDate {
233
+ max-width: 138px;
234
+ min-width: 118px;
235
+ }
236
+ .Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {
237
+ text-transform: capitalize;
238
+ width: 100%;
239
+ }
240
+ .Inner .PlayerName {
241
+ font-size: 16px;
242
+ }
243
+ .Inner .Row .PointsInfo {
244
+ display: table;
245
+ font-weight: 600;
246
+ }
247
+ .Inner .Row .Redeem {
248
+ justify-content: flex-end;
249
+ margin-left: auto;
250
+ }
251
+ .Inner .Row .Redeem:hover {
252
+ color: var(--emw--elevate-color-redeem-hover, #00ABA4);
253
+ cursor: pointer;
254
+ }
255
+ .Inner .Row .RedeemButton:hover span {
256
+ color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);
257
+ font-weight: bold;
258
+ }
259
+ .Inner .Row .RedeemButton {
260
+ width: 95px;
261
+ height: 35px;
262
+ display: flex;
263
+ align-items: center;
264
+ border-radius: var(--emw--border-radius-medium, 10px);
265
+ 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%);
266
+ box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);
267
+ }
268
+ .Inner .Row .RedeemButton span {
269
+ color: var(--emw--color-white, #fff);
270
+ line-height: 18px;
271
+ font-size: 15px;
272
+ text-align: center;
273
+ width: 100%;
274
+ }
275
+ .Inner .Row .Points {
276
+ font-size: large;
277
+ vertical-align: middle;
278
+ }
279
+ .Inner .Row .Points .XP {
280
+ font-size: x-small;
281
+ }
282
+ .Inner .Row .ExpirationPoints {
283
+ font-size: small;
284
+ text-align: right;
285
+ font-weight: bold;
286
+ color: var(--emw--color-red, #9e595f);
287
+ }`, te = ee, ne = class {
288
+ constructor(e) {
289
+ u(this, e), this.playerElevateLeveLoaded = M(this, "playerElevateLeveLoaded", 7), this.params = void 0, this.playerElevateLevel = void 0, this.pointExpireString = void 0;
290
+ }
291
+ handleWindowResizs() {
292
+ this.initLevelProgressbar();
293
+ }
294
+ onParamsChanged() {
295
+ this.loadElevateInfo();
296
+ }
297
+ redeemGiftButtonHandler() {
298
+ this.loadElevateInfo();
299
+ }
300
+ onRedeemClick() {
301
+ window.postMessage({ type: "BEERedeemClicked" }, window.location.href);
302
+ }
303
+ loadLevels() {
304
+ let e = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
305
+ return new Promise((t, a) => fetch(e.href, {
306
+ method: "GET"
307
+ }).then((n) => n.json()).then((n) => {
308
+ this.levels = n.data, t(!0);
309
+ }).catch((n) => {
310
+ a(n);
311
+ }));
312
+ }
313
+ calcuatePointsToBeExpired(e) {
314
+ let t = "";
315
+ if (!e || !e.aboutToExpire || e.aboutToExpire.length == 0 || e.aboutToExpire[0].points <= 0)
316
+ return t;
317
+ e.aboutToExpire.sort((d, v) => V(new Date(d.expireTime), new Date(v.expireTime)) ? -1 : 1);
318
+ const a = e.aboutToExpire[0], n = G(new Date(a.expireTime), /* @__PURE__ */ new Date());
319
+ let r = 0, l = 0, s = n === 0 ? "pointsToBeExpiredDay" : "pointsToBeExpired";
320
+ return n <= 0 && (r = J(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), s = r > 1 ? "pointsToBeExpiredHours" : "pointsToBeExpiredHour", r <= 0 && (l = Q(new Date(a.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), s = l > 1 ? "pointsToBeExpiredMinutes" : "pointsToBeExpiredMinute")), t = P(s, {
321
+ expirationPoints: a.points,
322
+ expireDay: Math.max(n, r, l)
323
+ }), t;
324
+ }
325
+ loadPlayerLevelInfo() {
326
+ let e = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
327
+ return new Promise((t, a) => fetch(e.href, {
328
+ method: "GET",
329
+ headers: {
330
+ "X-Sessionid": this.params.session,
331
+ "Content-Type": "application/json"
332
+ }
333
+ }).then((n) => n.json()).then((n) => {
334
+ var r, l, s;
335
+ if (!n.success) {
336
+ console.error("Exception when fetch user elevateinfo, ", n.errorCode, n.errorMessage), a(!0);
337
+ return;
338
+ }
339
+ let d = n.data;
340
+ this.playerElevateLevel = d.level, this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name, this.playerElevateLevel.spendablePoints = ((r = d.spendableWallet) === null || r === void 0 ? void 0 : r.total.points) || 0, this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
341
+ const v = (l = n.data.spendableWallet) === null || l === void 0 ? void 0 : l.total, h = (s = n.data.loyaltyWallet) === null || s === void 0 ? void 0 : s.total;
342
+ this.playerElevateLeveLoaded.emit({
343
+ elevateLevelWalletTotal: v,
344
+ loyaltyWalletTotal: h
345
+ });
346
+ let g = this.calcuatePointsToBeExpired(v), y = this.calcuatePointsToBeExpired(h);
347
+ (g || y) && this.playerElevateLeveLoaded.emit({
348
+ pointExpireString: g,
349
+ xpExpireString: y
350
+ }), t(this.playerElevateLevel);
351
+ }).catch((n) => {
352
+ console.log("error ", n), a(!0);
353
+ }));
354
+ }
355
+ setLoyaltyProgress(e) {
356
+ Z(this.loyaltyProgressEle, e);
357
+ }
358
+ initLevelProgressbar() {
359
+ setTimeout(() => {
360
+ 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);
361
+ }, 80);
362
+ }
363
+ componentDidRender() {
364
+ this.initLevelProgressbar();
365
+ }
366
+ loadElevateInfo() {
367
+ if (!this.params.endpoint || !this.params.session)
368
+ return;
369
+ const e = [];
370
+ e.push(this.loadPlayerLevelInfo()), this.params.calculateLevelFlag && e.push(this.loadLevels()), Promise.all(e).then((t) => {
371
+ if (console.log("elevate-init", t), this.initLevelProgressbar(), !this.levels)
372
+ return;
373
+ this.levels.sort((r, l) => r.firstEntryPoints > l.firstEntryPoints ? 1 : -1);
374
+ const a = this.playerElevateLevel.loyaltyPoints;
375
+ let n = 0;
376
+ this.levels.forEach((r, l) => {
377
+ a > r.firstEntryPoints && (n = l);
378
+ }), this.playerElevateLeveLoaded.emit({
379
+ calculatedLevelFlag: n
380
+ });
381
+ });
382
+ }
383
+ componentWillLoad() {
384
+ this.loadElevateInfo();
385
+ }
386
+ get elevateCardRef() {
387
+ return I(this);
388
+ }
389
+ static get watchers() {
390
+ return {
391
+ params: ["onParamsChanged"]
392
+ };
393
+ }
394
+ };
395
+ ne.style = te;
396
+ const ae = ":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}", re = ae, le = class {
397
+ constructor(e) {
398
+ u(this, e), this.endpoint = void 0, this.theme = "Dark", this.session = void 0, this.playerAvatarUrl = void 0, this.language = "en", this.playerName = void 0, this.dateFormat = "yyyy-MM-dd", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.pointExpireString = void 0, this.playerElevateLevel = void 0, this.elevateWalletTotal = void 0;
399
+ }
400
+ onSessionOrEndpointChange() {
401
+ this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
402
+ }
403
+ playerElevateLeveLoadedHandler(e) {
404
+ 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));
405
+ }
406
+ onRedeemClick() {
407
+ window.postMessage({ type: "BEERedeemClicked" }, window.location.href);
408
+ }
409
+ componentWillLoad() {
410
+ this.paramProxy = {
411
+ endpoint: this.endpoint,
412
+ session: this.session,
413
+ language: this.language
414
+ };
415
+ }
416
+ getNextLevelPoints() {
417
+ var e, t;
418
+ return !((e = this.playerElevateLevel) === null || e === void 0) && e.nextLevel ? (t = this.playerElevateLevel) === null || t === void 0 ? void 0 : t.nextLevel.entryPoints : -1;
419
+ }
420
+ getNextLevelTips() {
421
+ var e;
422
+ let t = (e = this.playerElevateLevel) === null || e === void 0 ? void 0 : e.nextLevel;
423
+ if (this.playerElevateLevel && t) {
424
+ const a = (t.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
425
+ return P("tipsForNextLevel", {
426
+ pointsToReach: a,
427
+ levelName: t.name,
428
+ lang: this.language
429
+ });
430
+ }
431
+ return "";
432
+ }
433
+ render() {
434
+ const e = m("../static/card-ground.svg"), t = m("../static/card-ground-over.svg");
435
+ return i("div", { key: "39295a651da66747a20554699bba5f96b8ad5c35", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "78c34fe054fc2459f8af3354116cd21a68ce01be", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: N, translationUrl: this.translationUrl }), i("player-elevate-card-data", { key: "b53e4b59d4ee55a2f567efa09afab3d72969e6e4", params: this.paramProxy }), i("div", { key: "1f3e504440bab2df3a181058fad7149c85c48c14", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1", class: "Content Row" }, this.playerElevateLevel && i(O, { key: "5c104f5ba1a018219c6ed5f6e50af99b035a0344" }, i("div", { key: "bd94591e6ab9298ab7c769fa48efaf314dc1a63b", class: "PlayerImg" }, i($, { key: "928849ce86d8c7a483eba7850efc83f8149bae43", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "37192c9b8502eb3c7d93914369df2d784c17e9f7", class: `LevelInfo ${this.playerElevateLevel.name}` }, i(W, { key: "2684a177f4bb1053c4587fd4158666fb35ca23f4", hideInfo: !0, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), i("div", { key: "173a37c63868f2d900c12af3ffc2d9a4a57550e4", class: "PointsRange" }, i(b, { key: "a7111154f7dc547e0b05c70d24508bdd75c5d882", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(b, { key: "ad31574e7db81a7ecb7a06b28b1d4968cbcab93e", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(z, { key: "88ddfdb326edfb1de9519da6b3d0e5b514725e27" }), i("div", { key: "b9c79555a8001bd2c754d7573df04016da235c84", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "02da725060c9db4a8c1c2e8bad3426894d7f8f2c", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " ")))))));
436
+ }
437
+ static get watchers() {
438
+ return {
439
+ session: ["onSessionOrEndpointChange"],
440
+ endpoint: ["onSessionOrEndpointChange"],
441
+ language: ["onSessionOrEndpointChange"]
442
+ };
443
+ }
444
+ };
445
+ le.style = re;
446
+ export {
447
+ ce as gamification_dropdown,
448
+ H as general_styling_wrapper,
449
+ ne as player_elevate_card_data,
450
+ le as player_elevate_loyaltycard
451
+ };