@everymatrix/casino-header-controller-nd 1.74.3 → 1.74.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.
- package/components/{CasinoHamburgerMenuNd-DEThSzp-.js → CasinoHamburgerMenuNd-B3kzqSeI.js} +834 -809
- package/components/{CasinoHamburgerMenuNd-DCIbJETO.js → CasinoHamburgerMenuNd-CRjQ2_wf.js} +869 -844
- package/components/CasinoHamburgerMenuNd-DdmjydJw.cjs +18 -0
- package/components/CasinoHeaderControllerNd-C4rJozDI.cjs +1 -0
- package/components/{CasinoHeaderControllerNd-GtZBzdJH.js → CasinoHeaderControllerNd-SiVYamdZ.js} +727 -666
- package/components/{CasinoHeaderControllerNd-Dwwd_aNY.js → CasinoHeaderControllerNd-TmmdW4np.js} +694 -634
- package/components/PlayerAccountBalanceModalNd-B-Jgjgws.js +1459 -0
- package/components/PlayerAccountBalanceModalNd-Bgxwmzji.cjs +7 -0
- package/components/PlayerAccountBalanceModalNd-DgV97DUx.js +1430 -0
- package/components/{PlayerDeposit-D3SlvMgE.js → PlayerDeposit-B6zBCCUy.js} +68 -68
- package/components/{PlayerDeposit-FdBU0eKT.js → PlayerDeposit-BaE0GWl1.js} +68 -68
- package/components/PlayerDeposit-Wsc-kD3R.cjs +1 -0
- package/es2015/casino-header-controller-nd.cjs +1 -1
- package/es2015/casino-header-controller-nd.js +1 -1
- package/esnext/casino-header-controller-nd.js +1 -1
- package/package.json +1 -1
- package/stencil/gamification-dropdown-60536faa-CkmaCt3Q.cjs +1 -0
- package/stencil/{gamification-dropdown-343647b2-CzD-SLIz.js → gamification-dropdown-60536faa-b2-gKj-C.js} +11 -9
- package/stencil/{gamification-dropdown-343647b2-B2iPgMxf.js → gamification-dropdown-60536faa-fBm4KcQa.js} +47 -45
- package/stencil/{gamification-dropdown-ZCYedZa7.js → gamification-dropdown-C_RDYH6X.js} +1 -1
- package/stencil/{gamification-dropdown-Cc01Up1v.js → gamification-dropdown-DCbrhONR.js} +1 -1
- package/stencil/{gamification-dropdown-LvA_48BC.cjs → gamification-dropdown-DVpJIyrY.cjs} +1 -1
- package/stencil/{gamification-dropdown_4-xBVux7NE.js → gamification-dropdown_4-C-ULhaax.js} +48 -47
- package/stencil/gamification-dropdown_4-CNSh1h1d.cjs +192 -0
- package/stencil/{gamification-dropdown_4-DL1cnnR5.js → gamification-dropdown_4-vZb_TDYi.js} +45 -44
- package/stencil/index-71b1bdfa-3q2dUmkJ.js +757 -0
- package/stencil/index-71b1bdfa-BwU-ZobY.js +784 -0
- package/stencil/index-71b1bdfa-S-HUlbq9.cjs +1 -0
- package/stencil/{player-elevate-card-CbLaEjY4.js → player-elevate-card-BjqJ00gW.js} +2 -2
- package/stencil/{player-elevate-card-BB5pZCk-.js → player-elevate-card-D2SUJfQQ.js} +2 -2
- package/stencil/{player-elevate-card-CKK8SqIG.cjs → player-elevate-card-DouGzeSQ.cjs} +1 -1
- package/stencil/{player-elevate-card-items-08c6fbd8-CxS3i_Tk.cjs → player-elevate-card-items-08c6fbd8-B17ziILA.cjs} +3 -3
- package/stencil/{player-elevate-card-items-08c6fbd8-BdwzqbIt.js → player-elevate-card-items-08c6fbd8-DCezar0T.js} +82 -82
- package/stencil/{player-elevate-card-items-08c6fbd8-D4NYTRjn.js → player-elevate-card-items-08c6fbd8-Xsq6w4LE.js} +82 -82
- package/stencil/{player-elevate-pointcard-YG_JS6s5.js → player-elevate-pointcard-B1bT9eUy.js} +2 -2
- package/stencil/{player-elevate-pointcard-D5nTLaWf.cjs → player-elevate-pointcard-CGFluXIm.cjs} +1 -1
- package/stencil/{player-elevate-pointcard-DVNYxgd0.js → player-elevate-pointcard-Dh7dRbip.js} +2 -2
- package/stencil/{player-rakeback-card-BzpdZUG1.js → player-rakeback-card-BfD7gcGR.js} +1 -1
- package/stencil/{player-rakeback-card-BuGLD8w-.js → player-rakeback-card-DRZs6TNO.js} +1 -1
- package/stencil/{player-rakeback-card-DU_y15t2.cjs → player-rakeback-card-Dm2Xwe4V.cjs} +1 -1
- package/components/CasinoHamburgerMenuNd-DVkwoQLy.cjs +0 -18
- package/components/CasinoHeaderControllerNd-BjNQ4Vo8.cjs +0 -1
- package/components/PlayerAccountBalanceModalNd-BcXw4NET.cjs +0 -7
- package/components/PlayerAccountBalanceModalNd-Bw9rjTo4.js +0 -1459
- package/components/PlayerAccountBalanceModalNd-Dx2mKpxh.js +0 -1430
- package/components/PlayerDeposit-CJU-i6Vq.cjs +0 -1
- package/stencil/gamification-dropdown-343647b2-CMaCXQz4.cjs +0 -1
- package/stencil/gamification-dropdown_4-BX_M5-3b.cjs +0 -192
- package/stencil/index-71b1bdfa-B7YYI4Ij.js +0 -780
- package/stencil/index-71b1bdfa-Dtlgkwlr.cjs +0 -1
- package/stencil/index-71b1bdfa-udB106Ku.js +0 -753
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var f=(i,t,n)=>new Promise((e,o)=>{var s=r=>{try{l(n.next(r))}catch(d){o(d)}},c=r=>{try{l(n.throw(r))}catch(d){o(d)}},l=r=>r.done?e(r.value):Promise.resolve(r.value).then(s,c);l((n=n.apply(i,t)).next())});const a=require("./index-71b1bdfa-S-HUlbq9.cjs"),w="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 m=i=>new Promise(t=>{fetch(i).then(n=>n.json()).then(n=>{Object.keys(n).forEach(e=>{h[e]||(h[e]={});for(let o in n[e])h[e][o]=n[e][o]}),t(!0)})}),v=(i,t)=>{const n=t;return h[n!==void 0&&n in h?n:w][i]};function p(i,t){if(i){const n=document.createElement("style");n.innerHTML=t,i.appendChild(n)}}function g(i,t){const n=new URL(t);fetch(n.href).then(e=>e.text()).then(e=>{const o=document.createElement("style");o.innerHTML=e,i&&i.appendChild(o)}).catch(e=>{console.error("There was an error while trying to load client styling from URL",e)})}function u(i,t,n){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(t,o=>{e.innerHTML=o,i&&i.appendChild(e)})}}const S=":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}",C=S,y=class{constructor(i){a.registerInstance(this,i),this.messageHandler=t=>{t.data&&t.data.type==="UpdateGamificationXp"&&(this.loyaltyPoints=t.data.points)},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)},this.endpoint=void 0,this.language="en",this.session="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,m(this.translationUrl).then(()=>{this.isLoading=!1})}handleClientStylingChange(i,t){i!=t&&p(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,t){i!=t&&this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){return f(this,null,function*(){if(this.translationUrl.length>2&&(yield m(this.translationUrl)),this.endpoint&&this.language)return this.fetchPointsData()})}componentDidLoad(){window.addEventListener("message",this.messageHandler),this.stylingContainer&&(window.emMessageBus!=null?u(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&p(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&g(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),window.removeEventListener("message",this.messageHandler)}fetchPointsData(){let i=new URL(`${this.endpoint}/v1/elevate/playerInfo`);i.searchParams.append("language",this.language);const t=new Headers;t.append("X-SessionId",this.session);const n={method:"GET",headers:t};return new Promise((e,o)=>{this.isLoading=!0,fetch(i.href,n).then(s=>s.json()).then(s=>{var c,l;this.loyaltyPoints=(l=(c=s==null?void 0:s.data)===null||c===void 0?void 0:c.level)===null||l===void 0?void 0:l.loyaltyPoints,e(!0)}).catch(s=>{console.error(s),o(s)}).finally(()=>{this.isLoading=!1})})}render(){return this.isLoading?null:a.h("div",{ref:i=>this.stylingContainer=i,class:"GamificationDropdownContainer"},a.h("button",{class:`GamificationDropdownButton ${this.isOpen?"IsOpen":""}`,type:"button",onClick:i=>this.handleDropdownClick(i),title:typeof this.loyaltyPoints=="number"?String(this.loyaltyPoints):v("gamificationNoPoints",this.language)},typeof this.loyaltyPoints=="number"?`${this.loyaltyPoints} XP`:"...",a.h("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},a.h("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},a.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&&a.h("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},a.h("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling,"mb-source":this.mbSource})))}get el(){return a.getElement(this)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};y.style=C;exports.GamificationDropdown=y;exports.setClientStyling=p;exports.setClientStylingURL=g;exports.setStreamStyling=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
const
|
|
1
|
+
import { r as g, h as a, g as f } from "./index-71b1bdfa-3q2dUmkJ.js";
|
|
2
|
+
const m = "en";
|
|
3
3
|
let l = {
|
|
4
4
|
en: {
|
|
5
5
|
gamificationNoPoints: "No points"
|
|
@@ -28,9 +28,9 @@ const h = (i) => new Promise((t) => {
|
|
|
28
28
|
l[e][o] = n[e][o];
|
|
29
29
|
}), t(!0);
|
|
30
30
|
});
|
|
31
|
-
}),
|
|
31
|
+
}), u = (i, t) => {
|
|
32
32
|
const n = t;
|
|
33
|
-
return l[n !== void 0 && n in l ? n :
|
|
33
|
+
return l[n !== void 0 && n in l ? n : m][i];
|
|
34
34
|
};
|
|
35
35
|
function d(i, t) {
|
|
36
36
|
if (i) {
|
|
@@ -57,7 +57,9 @@ function y(i, t, n) {
|
|
|
57
57
|
}
|
|
58
58
|
const w = ":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}", v = w, S = class {
|
|
59
59
|
constructor(i) {
|
|
60
|
-
|
|
60
|
+
g(this, i), this.messageHandler = (t) => {
|
|
61
|
+
t.data && t.data.type === "UpdateGamificationXp" && (this.loyaltyPoints = t.data.points);
|
|
62
|
+
}, this.navigateToGamification = () => {
|
|
61
63
|
window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
|
|
62
64
|
}, this.handleOutsideClick = (t) => {
|
|
63
65
|
t.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
|
|
@@ -81,10 +83,10 @@ const w = ":host{display:block}.GamificationDropdownContainer{position:relative}
|
|
|
81
83
|
return this.fetchPointsData();
|
|
82
84
|
}
|
|
83
85
|
componentDidLoad() {
|
|
84
|
-
this.stylingContainer && (window.emMessageBus != null ? y(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && d(this.stylingContainer, this.clientStyling), this.clientStylingUrl && p(this.stylingContainer, this.clientStylingUrl)));
|
|
86
|
+
window.addEventListener("message", this.messageHandler), this.stylingContainer && (window.emMessageBus != null ? y(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && d(this.stylingContainer, this.clientStyling), this.clientStylingUrl && p(this.stylingContainer, this.clientStylingUrl)));
|
|
85
87
|
}
|
|
86
88
|
disconnectedCallback() {
|
|
87
|
-
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
89
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe(), window.removeEventListener("message", this.messageHandler);
|
|
88
90
|
}
|
|
89
91
|
fetchPointsData() {
|
|
90
92
|
let i = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
|
|
@@ -107,10 +109,10 @@ const w = ":host{display:block}.GamificationDropdownContainer{position:relative}
|
|
|
107
109
|
});
|
|
108
110
|
}
|
|
109
111
|
render() {
|
|
110
|
-
return this.isLoading ? null : a("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, a("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) :
|
|
112
|
+
return this.isLoading ? null : a("div", { ref: (i) => this.stylingContainer = i, class: "GamificationDropdownContainer" }, a("button", { class: `GamificationDropdownButton ${this.isOpen ? "IsOpen" : ""}`, type: "button", onClick: (i) => this.handleDropdownClick(i), title: typeof this.loyaltyPoints == "number" ? String(this.loyaltyPoints) : u("gamificationNoPoints", this.language) }, typeof this.loyaltyPoints == "number" ? `${this.loyaltyPoints} XP` : "...", a("span", { class: this.isOpen ? "TriangleActive" : "TriangleInactive" }, a("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, a("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 && a("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, a("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "mb-source": this.mbSource })));
|
|
111
113
|
}
|
|
112
114
|
get el() {
|
|
113
|
-
return
|
|
115
|
+
return f(this);
|
|
114
116
|
}
|
|
115
117
|
static get watchers() {
|
|
116
118
|
return {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var p = (i,
|
|
1
|
+
var p = (i, t, n) => new Promise((e, o) => {
|
|
2
2
|
var s = (l) => {
|
|
3
3
|
try {
|
|
4
|
-
a(
|
|
4
|
+
a(n.next(l));
|
|
5
5
|
} catch (d) {
|
|
6
6
|
o(d);
|
|
7
7
|
}
|
|
8
8
|
}, c = (l) => {
|
|
9
9
|
try {
|
|
10
|
-
a(
|
|
10
|
+
a(n.throw(l));
|
|
11
11
|
} catch (d) {
|
|
12
12
|
o(d);
|
|
13
13
|
}
|
|
14
14
|
}, a = (l) => l.done ? e(l.value) : Promise.resolve(l.value).then(s, c);
|
|
15
|
-
a((
|
|
15
|
+
a((n = n.apply(i, t)).next());
|
|
16
16
|
});
|
|
17
|
-
import { r as
|
|
17
|
+
import { r as u, h as r, g as y } from "./index-71b1bdfa-BwU-ZobY.js";
|
|
18
18
|
const w = "en";
|
|
19
19
|
let h = {
|
|
20
20
|
en: {
|
|
@@ -36,85 +36,87 @@ let h = {
|
|
|
36
36
|
gamificationNoPoints: "No points"
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
const
|
|
40
|
-
fetch(i).then((
|
|
41
|
-
Object.keys(
|
|
39
|
+
const g = (i) => new Promise((t) => {
|
|
40
|
+
fetch(i).then((n) => n.json()).then((n) => {
|
|
41
|
+
Object.keys(n).forEach((e) => {
|
|
42
42
|
h[e] || (h[e] = {});
|
|
43
|
-
for (let o in
|
|
44
|
-
h[e][o] =
|
|
45
|
-
}),
|
|
43
|
+
for (let o in n[e])
|
|
44
|
+
h[e][o] = n[e][o];
|
|
45
|
+
}), t(!0);
|
|
46
46
|
});
|
|
47
|
-
}), v = (i,
|
|
48
|
-
const
|
|
49
|
-
return h[
|
|
47
|
+
}), v = (i, t) => {
|
|
48
|
+
const n = t;
|
|
49
|
+
return h[n !== void 0 && n in h ? n : w][i];
|
|
50
50
|
};
|
|
51
|
-
function
|
|
51
|
+
function f(i, t) {
|
|
52
52
|
if (i) {
|
|
53
|
-
const
|
|
54
|
-
|
|
53
|
+
const n = document.createElement("style");
|
|
54
|
+
n.innerHTML = t, i.appendChild(n);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
fetch(
|
|
57
|
+
function m(i, t) {
|
|
58
|
+
const n = new URL(t);
|
|
59
|
+
fetch(n.href).then((e) => e.text()).then((e) => {
|
|
60
60
|
const o = document.createElement("style");
|
|
61
61
|
o.innerHTML = e, i && i.appendChild(o);
|
|
62
62
|
}).catch((e) => {
|
|
63
63
|
console.error("There was an error while trying to load client styling from URL", e);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function S(i,
|
|
66
|
+
function S(i, t, n) {
|
|
67
67
|
if (window.emMessageBus) {
|
|
68
68
|
const e = document.createElement("style");
|
|
69
|
-
window.emMessageBus.subscribe(
|
|
69
|
+
window.emMessageBus.subscribe(t, (o) => {
|
|
70
70
|
e.innerHTML = o, i && i.appendChild(e);
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
const C = ":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}",
|
|
74
|
+
const C = ":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}", G = C, L = class {
|
|
75
75
|
constructor(i) {
|
|
76
|
-
|
|
76
|
+
u(this, i), this.messageHandler = (t) => {
|
|
77
|
+
t.data && t.data.type === "UpdateGamificationXp" && (this.loyaltyPoints = t.data.points);
|
|
78
|
+
}, this.navigateToGamification = () => {
|
|
77
79
|
window.postMessage({ type: "NavigateToGamification" }, window.location.href), this.isOpen = !1;
|
|
78
|
-
}, this.handleOutsideClick = (
|
|
79
|
-
|
|
80
|
-
}, this.handleDropdownClick = (
|
|
81
|
-
|
|
80
|
+
}, this.handleOutsideClick = (t) => {
|
|
81
|
+
t.composedPath().includes(this.el) || (this.isOpen = !1, document.removeEventListener("click", this.handleOutsideClick));
|
|
82
|
+
}, this.handleDropdownClick = (t) => {
|
|
83
|
+
t.stopPropagation(), this.isOpen = !this.isOpen, this.isOpen ? document.addEventListener("click", this.handleOutsideClick) : document.removeEventListener("click", this.handleOutsideClick);
|
|
82
84
|
}, this.endpoint = void 0, this.language = "en", this.session = "", this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.isOpen = !1, this.isLoading = !1, this.loyaltyPoints = void 0;
|
|
83
85
|
}
|
|
84
86
|
handleNewTranslations() {
|
|
85
|
-
this.isLoading = !0,
|
|
87
|
+
this.isLoading = !0, g(this.translationUrl).then(() => {
|
|
86
88
|
this.isLoading = !1;
|
|
87
89
|
});
|
|
88
90
|
}
|
|
89
|
-
handleClientStylingChange(i,
|
|
90
|
-
i !=
|
|
91
|
+
handleClientStylingChange(i, t) {
|
|
92
|
+
i != t && f(this.stylingContainer, this.clientStyling);
|
|
91
93
|
}
|
|
92
|
-
handleClientStylingChangeURL(i,
|
|
93
|
-
i !=
|
|
94
|
+
handleClientStylingChangeURL(i, t) {
|
|
95
|
+
i != t && this.clientStylingUrl && m(this.stylingContainer, this.clientStylingUrl);
|
|
94
96
|
}
|
|
95
97
|
componentWillLoad() {
|
|
96
98
|
return p(this, null, function* () {
|
|
97
|
-
if (this.translationUrl.length > 2 && (yield
|
|
99
|
+
if (this.translationUrl.length > 2 && (yield g(this.translationUrl)), this.endpoint && this.language)
|
|
98
100
|
return this.fetchPointsData();
|
|
99
101
|
});
|
|
100
102
|
}
|
|
101
103
|
componentDidLoad() {
|
|
102
|
-
this.stylingContainer && (window.emMessageBus != null ? S(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling &&
|
|
104
|
+
window.addEventListener("message", this.messageHandler), this.stylingContainer && (window.emMessageBus != null ? S(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && f(this.stylingContainer, this.clientStyling), this.clientStylingUrl && m(this.stylingContainer, this.clientStylingUrl)));
|
|
103
105
|
}
|
|
104
106
|
disconnectedCallback() {
|
|
105
|
-
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
107
|
+
this.stylingSubscription && this.stylingSubscription.unsubscribe(), window.removeEventListener("message", this.messageHandler);
|
|
106
108
|
}
|
|
107
109
|
fetchPointsData() {
|
|
108
110
|
let i = new URL(`${this.endpoint}/v1/elevate/playerInfo`);
|
|
109
111
|
i.searchParams.append("language", this.language);
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
const
|
|
112
|
+
const t = new Headers();
|
|
113
|
+
t.append("X-SessionId", this.session);
|
|
114
|
+
const n = {
|
|
113
115
|
method: "GET",
|
|
114
|
-
headers:
|
|
116
|
+
headers: t
|
|
115
117
|
};
|
|
116
118
|
return new Promise((e, o) => {
|
|
117
|
-
this.isLoading = !0, fetch(i.href,
|
|
119
|
+
this.isLoading = !0, fetch(i.href, n).then((s) => s.json()).then((s) => {
|
|
118
120
|
var c, a;
|
|
119
121
|
this.loyaltyPoints = (a = (c = s == null ? void 0 : s.data) === null || c === void 0 ? void 0 : c.level) === null || a === void 0 ? void 0 : a.loyaltyPoints, e(!0);
|
|
120
122
|
}).catch((s) => {
|
|
@@ -138,10 +140,10 @@ const C = ":host{display:block}.GamificationDropdownContainer{position:relative}
|
|
|
138
140
|
};
|
|
139
141
|
}
|
|
140
142
|
};
|
|
141
|
-
|
|
143
|
+
L.style = G;
|
|
142
144
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
L as G,
|
|
146
|
+
f as a,
|
|
147
|
+
m as b,
|
|
146
148
|
S as s
|
|
147
149
|
};
|
|
@@ -14,7 +14,7 @@ var o = (n, a, l) => new Promise((s, i) => {
|
|
|
14
14
|
}, t = (e) => e.done ? s(e.value) : Promise.resolve(e.value).then(g, p);
|
|
15
15
|
t((l = l.apply(n, a)).next());
|
|
16
16
|
});
|
|
17
|
-
import { b as d, p as y } from "./index-71b1bdfa-
|
|
17
|
+
import { b as d, p as y } from "./index-71b1bdfa-BwU-ZobY.js";
|
|
18
18
|
import { g as c } from "./app-globals-0f993ce5-D-kw1sls.js";
|
|
19
19
|
var u = () => {
|
|
20
20
|
const n = import.meta.url, a = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var s=(n,a,t)=>new Promise((d,o)=>{var p=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(p,c);l((t=t.apply(n,a)).next())});const g=require("./index-71b1bdfa-
|
|
1
|
+
"use strict";var s=(n,a,t)=>new Promise((d,o)=>{var p=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(p,c);l((t=t.apply(n,a)).next())});const g=require("./index-71b1bdfa-S-HUlbq9.cjs"),y=require("./app-globals-0f993ce5-sCt45RkC.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-DVpJIyrY.cjs",document.baseURI).href,a={};return n!==""&&(a.resourcesUrl=new URL(".",n).href),g.promiseResolve(a)};u().then(n=>s(exports,null,function*(){return yield y.globalScripts(),g.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"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],targetTranslations:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]],["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"],mbSource:[513,"mb-source"],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],mbSource:[513,"mb-source"],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],mbSource:[513,"mb-source"],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)}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var E = (e, t, a) => new Promise((n, l) => {
|
|
2
2
|
var r = (d) => {
|
|
3
3
|
try {
|
|
4
4
|
o(a.next(d));
|
|
@@ -14,50 +14,50 @@ var L = (e, t, a) => new Promise((n, l) => {
|
|
|
14
14
|
}, o = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(r, s);
|
|
15
15
|
o((a = a.apply(e, t)).next());
|
|
16
16
|
});
|
|
17
|
-
import { s as N, a as
|
|
18
|
-
import { G as fe } from "./gamification-dropdown-
|
|
19
|
-
import { r as
|
|
20
|
-
import { t as
|
|
21
|
-
import { P as q, a as
|
|
22
|
-
const
|
|
17
|
+
import { s as N, a as x, b } from "./gamification-dropdown-60536faa-fBm4KcQa.js";
|
|
18
|
+
import { G as fe } from "./gamification-dropdown-60536faa-fBm4KcQa.js";
|
|
19
|
+
import { r as m, h as i, g as T, c as U, a as I, F as W } from "./index-71b1bdfa-BwU-ZobY.js";
|
|
20
|
+
import { t as A, T as z } from "./locale-TxlOHoKi.js";
|
|
21
|
+
import { P as q, a as P, b as F, L as j, r as p, g as S, t as h } from "./player-elevate-card-items-08c6fbd8-DCezar0T.js";
|
|
22
|
+
const G = (e, t) => new Promise((a) => {
|
|
23
23
|
fetch(e).then((n) => n.json()).then((n) => {
|
|
24
24
|
Object.keys(n).forEach((l) => {
|
|
25
|
-
t[l] = t[l] ||
|
|
25
|
+
t[l] = t[l] || {}, Object.keys(n[l]).forEach((r) => {
|
|
26
26
|
if (!t.en[r])
|
|
27
27
|
return;
|
|
28
28
|
const s = t.en[r];
|
|
29
29
|
typeof n[l][r] == "object" ? (t[l][r] = t[l][r] || Object.assign({}, s), Object.keys(n[l][r]).forEach((o) => {
|
|
30
30
|
t[l][r][o] = n[l][r][o];
|
|
31
|
-
})) : t[l][r] = n[l][r] || s;
|
|
31
|
+
})) : t[l][r] = n[l][r] || Object.assign({}, s);
|
|
32
32
|
});
|
|
33
33
|
}), a(!0);
|
|
34
34
|
}).catch((n) => {
|
|
35
35
|
console.error("Failed to load translations:", n), a(!1);
|
|
36
36
|
});
|
|
37
|
-
}),
|
|
37
|
+
}), H = ":host{display:block}", X = H, Y = class {
|
|
38
38
|
constructor(e) {
|
|
39
|
-
|
|
39
|
+
m(this, e), this.stylingAppends = !1, this.clientStyling = "", this.clientStylingUrl = "", this.mbSource = void 0, this.translationUrl = "", this.targetTranslations = void 0;
|
|
40
40
|
}
|
|
41
41
|
componentDidLoad() {
|
|
42
|
-
this.el && (window.emMessageBus != null ? N(this.el, `${this.mbSource}.Style`) : (this.clientStyling &&
|
|
42
|
+
this.el && (window.emMessageBus != null ? N(this.el, `${this.mbSource}.Style`) : (this.clientStyling && x(this.el, this.clientStyling), this.clientStylingUrl && b(this.el, this.clientStylingUrl), this.stylingAppends = !0));
|
|
43
43
|
}
|
|
44
44
|
disconnectedCallback() {
|
|
45
45
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
46
46
|
}
|
|
47
47
|
handleClientStylingChange(e, t) {
|
|
48
|
-
e != t &&
|
|
48
|
+
e != t && x(this.el, this.clientStyling);
|
|
49
49
|
}
|
|
50
50
|
handleClientStylingUrlChange(e, t) {
|
|
51
|
-
e != t && this.clientStylingUrl &&
|
|
51
|
+
e != t && this.clientStylingUrl && b(this.el, this.clientStylingUrl);
|
|
52
52
|
}
|
|
53
53
|
componentDidRender() {
|
|
54
|
-
this.stylingAppends || (this.clientStyling &&
|
|
54
|
+
this.stylingAppends || (this.clientStyling && x(this.el, this.clientStyling), this.clientStylingUrl && b(this.el, this.clientStylingUrl), this.stylingAppends = !0);
|
|
55
55
|
}
|
|
56
56
|
componentWillLoad() {
|
|
57
|
-
return
|
|
57
|
+
return E(this, null, function* () {
|
|
58
58
|
const e = [];
|
|
59
59
|
if (this.translationUrl) {
|
|
60
|
-
const t =
|
|
60
|
+
const t = G(this.translationUrl, this.targetTranslations);
|
|
61
61
|
e.push(t);
|
|
62
62
|
}
|
|
63
63
|
return yield Promise.all(e);
|
|
@@ -67,7 +67,7 @@ const H = (e, t) => new Promise((a) => {
|
|
|
67
67
|
return i("div", { key: "09ad83748bbad518743c8671b986c541c52bf3f0", class: "StyleShell" }, i("slot", { key: "3b28b776d3944410c717b002b70946d274a4e8e7", name: "mainContent" }));
|
|
68
68
|
}
|
|
69
69
|
get el() {
|
|
70
|
-
return
|
|
70
|
+
return T(this);
|
|
71
71
|
}
|
|
72
72
|
static get watchers() {
|
|
73
73
|
return {
|
|
@@ -77,7 +77,7 @@ const H = (e, t) => new Promise((a) => {
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
Y.style = X;
|
|
80
|
-
function
|
|
80
|
+
function C(e) {
|
|
81
81
|
p(1, arguments);
|
|
82
82
|
var t = h(e);
|
|
83
83
|
return t.setHours(0, 0, 0, 0), t;
|
|
@@ -85,14 +85,14 @@ function P(e) {
|
|
|
85
85
|
var J = 864e5;
|
|
86
86
|
function K(e, t) {
|
|
87
87
|
p(2, arguments);
|
|
88
|
-
var a =
|
|
88
|
+
var a = C(e), n = C(t), l = a.getTime() - S(a), r = n.getTime() - S(n);
|
|
89
89
|
return Math.round((l - r) / J);
|
|
90
90
|
}
|
|
91
91
|
var Q = 6e4, V = 36e5;
|
|
92
|
-
function
|
|
92
|
+
function D(e, t) {
|
|
93
93
|
return p(2, arguments), h(e).getTime() - h(t).getTime();
|
|
94
94
|
}
|
|
95
|
-
var
|
|
95
|
+
var k = {
|
|
96
96
|
ceil: Math.ceil,
|
|
97
97
|
round: Math.round,
|
|
98
98
|
floor: Math.floor,
|
|
@@ -101,18 +101,18 @@ var S = {
|
|
|
101
101
|
}
|
|
102
102
|
// Math.trunc is not supported by IE
|
|
103
103
|
}, Z = "trunc";
|
|
104
|
-
function
|
|
105
|
-
return e ?
|
|
104
|
+
function _(e) {
|
|
105
|
+
return e ? k[e] : k[Z];
|
|
106
106
|
}
|
|
107
107
|
function ee(e, t, a) {
|
|
108
108
|
p(2, arguments);
|
|
109
|
-
var n =
|
|
110
|
-
return
|
|
109
|
+
var n = D(e, t) / V;
|
|
110
|
+
return _(a == null ? void 0 : a.roundingMethod)(n);
|
|
111
111
|
}
|
|
112
112
|
function te(e, t, a) {
|
|
113
113
|
p(2, arguments);
|
|
114
|
-
var n =
|
|
115
|
-
return
|
|
114
|
+
var n = D(e, t) / Q;
|
|
115
|
+
return _(a == null ? void 0 : a.roundingMethod)(n);
|
|
116
116
|
}
|
|
117
117
|
function ne(e, t) {
|
|
118
118
|
p(2, arguments);
|
|
@@ -122,8 +122,8 @@ function ne(e, t) {
|
|
|
122
122
|
function ae(e, t) {
|
|
123
123
|
const a = e.querySelector("#total_level"), n = 17, l = 6.5, r = a.getBBox().width, s = t > 1 ? 1 : t, o = s * r - n < 0 ? 0 : s * r - n, d = e.querySelector("#current_level"), v = e.querySelector("#filter_current_level"), g = e.querySelector("#circle_current_level");
|
|
124
124
|
a.setAttribute("viewbox", `0 0 ${o} 28`), d.setAttribute("width", `${o}`), g.setAttribute("cx", `${o < l ? l : o}`), v.setAttribute("x", `${o - 8}`);
|
|
125
|
-
const y = e.querySelector("#lock"),
|
|
126
|
-
y.setAttribute("cx", `${c}`),
|
|
125
|
+
const y = e.querySelector("#lock"), u = e.querySelector("#filter_heart_ball"), f = e.querySelector("#filter_ball"), B = e.querySelector("#filter_heart"), O = e.querySelector("#filter_lock"), L = e.querySelector("#paint0_linear_ball"), w = e.querySelector("#paint1_linear_lock"), $ = e.querySelector("#lock_box"), M = e.querySelector("#heart_box"), R = 10, c = r - R;
|
|
126
|
+
y.setAttribute("cx", `${c}`), w.setAttribute("x1", `${c}`), w.setAttribute("x2", `${c}`), L.setAttribute("x1", `${c - 6}`), L.setAttribute("x2", `${c - 6 + 11.2}`), O.setAttribute("x", `${c - 6}`), B.setAttribute("x", `${c - 6 - 2}`), f.setAttribute("x", `${c - 6 - 2 - 2}`), u.setAttribute("x", `${c - 6 - 2 - 2 - 4}`), $.setAttribute("x", `${c - 6}`), M.setAttribute("x", `${c - 6}`), a.parentElement.style.opacity = "1";
|
|
127
127
|
}
|
|
128
128
|
const le = `:host {
|
|
129
129
|
display: block;
|
|
@@ -318,7 +318,7 @@ const le = `:host {
|
|
|
318
318
|
color: var(--emw--color-red, #9e595f);
|
|
319
319
|
}`, re = le, ie = class {
|
|
320
320
|
constructor(e) {
|
|
321
|
-
|
|
321
|
+
m(this, e), this.playerElevateLeveLoaded = U(this, "playerElevateLeveLoaded", 7), this.params = void 0, this.playerElevateLevel = void 0, this.pointExpireString = void 0;
|
|
322
322
|
}
|
|
323
323
|
handleWindowResizs() {
|
|
324
324
|
this.initLevelProgressbar();
|
|
@@ -349,7 +349,7 @@ const le = `:host {
|
|
|
349
349
|
e.aboutToExpire.sort((d, v) => ne(new Date(d.expireTime), new Date(v.expireTime)) ? -1 : 1);
|
|
350
350
|
const n = e.aboutToExpire[0], l = K(new Date(n.expireTime), /* @__PURE__ */ new Date());
|
|
351
351
|
let r = 0, s = 0, o = l === 0 ? `${t}Day` : t;
|
|
352
|
-
return l <= 0 && (r = ee(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), o = r > 1 ? `${t}Hours` : `${t}Hour`, r <= 0 && (s = te(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), o = s > 1 ? `${t}Minutes` : `${t}Minute`)), a =
|
|
352
|
+
return l <= 0 && (r = ee(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), o = r > 1 ? `${t}Hours` : `${t}Hour`, r <= 0 && (s = te(new Date(n.expireTime), /* @__PURE__ */ new Date(), { roundingMethod: "floor" }), o = s > 1 ? `${t}Minutes` : `${t}Minute`)), a = A(o, {
|
|
353
353
|
expirationPoints: n.points,
|
|
354
354
|
expireDay: Math.max(l, r, s),
|
|
355
355
|
lang: this.params.language
|
|
@@ -364,22 +364,23 @@ const le = `:host {
|
|
|
364
364
|
"Content-Type": "application/json"
|
|
365
365
|
}
|
|
366
366
|
}).then((n) => n.json()).then((n) => {
|
|
367
|
-
var l, r, s;
|
|
367
|
+
var l, r, s, o, d;
|
|
368
368
|
if (!n.success) {
|
|
369
369
|
console.error("Exception when fetch user elevateinfo, ", n.errorCode, n.errorMessage), a(!0);
|
|
370
370
|
return;
|
|
371
371
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
window.postMessage({ type: "UpdateGamificationXp", points: (r = (l = n.data) === null || l === void 0 ? void 0 : l.level) === null || r === void 0 ? void 0 : r.loyaltyPoints }, window.location.href);
|
|
373
|
+
let v = n.data;
|
|
374
|
+
this.playerElevateLevel = v.level, this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name, this.playerElevateLevel.spendablePoints = ((s = v.spendableWallet) === null || s === void 0 ? void 0 : s.total.points) || 0, this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
375
|
+
const g = (o = n.data.spendableWallet) === null || o === void 0 ? void 0 : o.total, y = (d = n.data.loyaltyWallet) === null || d === void 0 ? void 0 : d.total;
|
|
375
376
|
this.playerElevateLeveLoaded.emit({
|
|
376
|
-
elevateLevelWalletTotal:
|
|
377
|
-
loyaltyWalletTotal:
|
|
377
|
+
elevateLevelWalletTotal: g,
|
|
378
|
+
loyaltyWalletTotal: y
|
|
378
379
|
});
|
|
379
|
-
let
|
|
380
|
-
(
|
|
381
|
-
pointExpireString:
|
|
382
|
-
xpExpireString:
|
|
380
|
+
let u = this.calcuatePointsToBeExpired(g, "coinsToBeExpired"), f = this.calcuatePointsToBeExpired(y, "pointsToBeExpired");
|
|
381
|
+
(u || f) && this.playerElevateLeveLoaded.emit({
|
|
382
|
+
pointExpireString: u,
|
|
383
|
+
xpExpireString: f
|
|
383
384
|
}), t(this.playerElevateLevel);
|
|
384
385
|
}).catch((n) => {
|
|
385
386
|
console.log("error ", n), a(!0);
|
|
@@ -417,7 +418,7 @@ const le = `:host {
|
|
|
417
418
|
this.loadElevateInfo();
|
|
418
419
|
}
|
|
419
420
|
get elevateCardRef() {
|
|
420
|
-
return
|
|
421
|
+
return T(this);
|
|
421
422
|
}
|
|
422
423
|
static get watchers() {
|
|
423
424
|
return {
|
|
@@ -428,7 +429,7 @@ const le = `:host {
|
|
|
428
429
|
ie.style = re;
|
|
429
430
|
const oe = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@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:0px}.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}", se = oe, de = class {
|
|
430
431
|
constructor(e) {
|
|
431
|
-
|
|
432
|
+
m(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;
|
|
432
433
|
}
|
|
433
434
|
onSessionOrEndpointChange() {
|
|
434
435
|
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
@@ -455,7 +456,7 @@ const oe = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
|
455
456
|
let t = (e = this.playerElevateLevel) === null || e === void 0 ? void 0 : e.nextLevel;
|
|
456
457
|
if (this.playerElevateLevel && t) {
|
|
457
458
|
const a = (t.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
|
|
458
|
-
return
|
|
459
|
+
return A("tipsForNextLevel", {
|
|
459
460
|
pointsToReach: a,
|
|
460
461
|
levelName: t.name,
|
|
461
462
|
lang: this.language
|
|
@@ -464,8 +465,8 @@ const oe = ":host{display:block}@media screen and (min-width: 501px){.LoyaltyCar
|
|
|
464
465
|
return "";
|
|
465
466
|
}
|
|
466
467
|
render() {
|
|
467
|
-
const e =
|
|
468
|
-
return i("div", { key: "aa8f0d13a1e1d26ea7307d05fc50cda507172949", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "485075740ced316bf89f69359bdc8642dbb2af8f", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "3648821972ac115a1c33705463cdc2cdb427a95b", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: z, translationUrl: this.translationUrl, mbSource: this.mbSource }), i("player-elevate-card-data", { key: "7b36c46a869bd4b014d1f04dbb718445b23ec964", params: this.paramProxy }), i("div", { key: "f4e5aa453459f693e07c166028aec9b0b696c907", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "d5f1894120cba3e7cf3c54b838a025f469bc445e", class: "Content Row" }, this.playerElevateLevel && i(W, { key: "112ee04598b23dda6911f043101c0c1631454d7f" }, i("div", { key: "7af4b6e937bbe73cc00aae0f27f8c93da47bb626", class: "PlayerImg" }, i(q, { key: "1b5037bfa196063f56cccd947c988a3aca0781b0", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "7b714e446f4e01edd4f4aefcc035d070b7d6a47b", class: `LevelInfo ${this.playerElevateLevel.name}` }, i("div", { key: "37ad8ce5dae374685e74f6772d28e79d251932e3", class: "CardCell ElevateLevel" }, i("span", { key: "2d9dcf4b08fcecc927d3e8bdca74c75ff4336480", class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), i("div", { key: "cc89cbaa70d9583b9626da15e98f9fd61d82f81f", class: "PointsRange" }, i(
|
|
468
|
+
const e = I("../static/card-ground.svg"), t = I("../static/card-ground-over.svg");
|
|
469
|
+
return i("div", { key: "aa8f0d13a1e1d26ea7307d05fc50cda507172949", class: `ElevateCardWrapper ${this.theme}` }, i("div", { key: "485075740ced316bf89f69359bdc8642dbb2af8f", class: "LoyaltyCard Outer", style: { backgroundImage: `url(${e}` } }, i("general-styling-wrapper", { key: "3648821972ac115a1c33705463cdc2cdb427a95b", clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: z, translationUrl: this.translationUrl, mbSource: this.mbSource }), i("player-elevate-card-data", { key: "7b36c46a869bd4b014d1f04dbb718445b23ec964", params: this.paramProxy }), i("div", { key: "f4e5aa453459f693e07c166028aec9b0b696c907", class: "OuterCover Inner", style: { backgroundImage: `url(${t}` } }, i("div", { key: "d5f1894120cba3e7cf3c54b838a025f469bc445e", class: "Content Row" }, this.playerElevateLevel && i(W, { key: "112ee04598b23dda6911f043101c0c1631454d7f" }, i("div", { key: "7af4b6e937bbe73cc00aae0f27f8c93da47bb626", class: "PlayerImg" }, i(q, { key: "1b5037bfa196063f56cccd947c988a3aca0781b0", onlyBadge: !0, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), i("div", { key: "7b714e446f4e01edd4f4aefcc035d070b7d6a47b", class: `LevelInfo ${this.playerElevateLevel.name}` }, i("div", { key: "37ad8ce5dae374685e74f6772d28e79d251932e3", class: "CardCell ElevateLevel" }, i("span", { key: "2d9dcf4b08fcecc927d3e8bdca74c75ff4336480", class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), i("div", { key: "cc89cbaa70d9583b9626da15e98f9fd61d82f81f", class: "PointsRange" }, i(P, { key: "32de4cac05a4fd5610af857b25e096a7cb9ba34d", loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), i(P, { key: "298f492c8991384547c31396fc930b5c21f41501", loyaltyPoints: this.getNextLevelPoints(), language: this.language })), i(F, { key: "aca4f5642c41db1c4b7fa04411331a5c25c655dd" }), i("div", { key: "d841c5df319de105376c6eee24bc685757916aae", class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && i("div", { key: "774279829f3f52ee5696550a855a833b39df8c81", class: "PointsInfo ExpirationPoints" }, this.pointExpireString, " "), this.playerElevateLevel.expireTime && i(j, { key: "3a4319e502e85b26cb220942492b161ad842be82", expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))));
|
|
469
470
|
}
|
|
470
471
|
static get watchers() {
|
|
471
472
|
return {
|