@everymatrix/player-elevate-card 1.44.0 → 1.45.2
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/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/general-styling-wrapper_5.cjs.entry.js +649 -785
- package/dist/cjs/index-b1cf5517.js +1634 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/player-elevate-card.cjs.js +17 -11
- package/dist/collection/collection-manifest.json +6 -6
- package/dist/collection/components/player-elevate-card/index.js +1 -0
- package/dist/collection/components/player-elevate-card/player-elevate-card-items.js +17 -38
- package/dist/collection/components/player-elevate-card/player-elevate-card.css +0 -1
- package/dist/collection/components/player-elevate-card/player-elevate-card.js +271 -287
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.css +1 -1
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.js +224 -215
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.css +0 -7
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.js +277 -297
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +309 -329
- package/dist/collection/utils/locale.utils.js +133 -133
- package/dist/collection/utils/utils.js +49 -49
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/general-styling-wrapper_5.entry.js +649 -785
- package/dist/esm/index-cd7a4beb.js +1604 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/player-elevate-card.js +14 -11
- package/dist/player-elevate-card/p-37a424ba.entry.js +1 -0
- package/dist/player-elevate-card/p-ba534fa2.js +2 -0
- package/dist/player-elevate-card/p-e1255160.js +1 -0
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -1
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -27
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-elevate-card/index.d.ts +1 -0
- package/dist/types/components/player-elevate-card/player-elevate-card-items.d.ts +6 -6
- package/dist/types/components/player-elevate-card/player-elevate-card.d.ts +51 -51
- package/dist/types/components/player-elevate-card-data/player-elevate-card-data.d.ts +19 -20
- package/dist/types/components/player-elevate-loyaltycard/player-elevate-loyaltycard.d.ts +51 -51
- package/dist/types/components/player-elevate-pointcard/player-elevate-pointcard.d.ts +64 -64
- package/dist/types/components.d.ts +16 -1
- package/dist/types/models/player-elevate.d.ts +26 -26
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/locale.utils.d.ts +6 -6
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -6
- package/dist/cjs/index-b6d0684c.js +0 -1674
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -103
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/player-elevate-card-data.d.ts +0 -11
- package/dist/components/player-elevate-card-data.js +0 -6
- package/dist/components/player-elevate-card-data2.js +0 -635
- package/dist/components/player-elevate-card-items.js +0 -2250
- package/dist/components/player-elevate-card.d.ts +0 -11
- package/dist/components/player-elevate-card.js +0 -126
- package/dist/components/player-elevate-loyaltycard.d.ts +0 -11
- package/dist/components/player-elevate-loyaltycard.js +0 -132
- package/dist/components/player-elevate-pointcard.d.ts +0 -11
- package/dist/components/player-elevate-pointcard.js +0 -135
- package/dist/components/static/button-default.svg +0 -42
- package/dist/components/static/button-disabled.svg +0 -4
- package/dist/components/static/button-hover.svg +0 -4
- package/dist/components/static/button-level.svg +0 -27
- package/dist/components/static/button-pressed.svg +0 -18
- package/dist/components/static/button-redeem.svg +0 -36
- package/dist/components/static/card-ground-over.png +0 -0
- package/dist/components/static/card-ground-over.svg +0 -903
- package/dist/components/static/card-ground.png +0 -0
- package/dist/components/static/card-ground.svg +0 -34
- package/dist/components/static/info.svg +0 -4
- package/dist/components/static/level-badge.png +0 -0
- package/dist/components/static/level-percent.svg +0 -80
- package/dist/components/static/tips-info.svg +0 -21
- package/dist/components/static/user.svg +0 -3
- package/dist/esm/index-6beb1563.js +0 -1645
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/player-elevate-card/p-10bf1b0e.entry.js +0 -1
- package/dist/player-elevate-card/p-523c2803.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/player-elevate-card/.stencil/packages/player-elevate-card/stencil.config.d.ts +0 -2
|
@@ -2,300 +2,213 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-b1cf5517.js');
|
|
6
6
|
|
|
7
7
|
const mergeTranslations = (url, target) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
return new Promise((resolve) => {
|
|
9
|
+
fetch(url)
|
|
10
|
+
.then((res) => res.json())
|
|
11
|
+
.then((data) => {
|
|
12
|
+
Object.keys(data).forEach((item) => {
|
|
13
|
+
target[item] = target[item] ? target[item] : {};
|
|
14
|
+
for (let key in data[item]) {
|
|
15
|
+
target[item][key] = data[item][key];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
resolve(true);
|
|
19
|
+
});
|
|
19
20
|
});
|
|
20
|
-
});
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
24
|
+
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
24
25
|
|
|
25
26
|
const GeneralStylingWrapper = class {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
.
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (!this.stylingAppends) {
|
|
65
|
-
if (this.clientStyling)
|
|
66
|
-
this.setClientStyling();
|
|
67
|
-
if (this.clientStylingUrl)
|
|
68
|
-
this.setClientStylingURL();
|
|
69
|
-
this.stylingAppends = true;
|
|
70
|
-
}
|
|
71
|
-
// end custom styling area
|
|
72
|
-
}
|
|
73
|
-
async componentWillLoad() {
|
|
74
|
-
const promises = [];
|
|
75
|
-
if (this.translationUrl) {
|
|
76
|
-
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
77
|
-
promises.push(translationPromise);
|
|
27
|
+
constructor(hostRef) {
|
|
28
|
+
index.registerInstance(this, hostRef);
|
|
29
|
+
this.stylingAppends = false;
|
|
30
|
+
this.setClientStyling = () => {
|
|
31
|
+
let sheet = document.createElement('style');
|
|
32
|
+
sheet.innerHTML = this.clientStyling;
|
|
33
|
+
this.el.prepend(sheet);
|
|
34
|
+
};
|
|
35
|
+
this.setClientStylingURL = () => {
|
|
36
|
+
let url = new URL(this.clientStylingUrl);
|
|
37
|
+
let cssFile = document.createElement('style');
|
|
38
|
+
fetch(url.href)
|
|
39
|
+
.then((res) => res.text())
|
|
40
|
+
.then((data) => {
|
|
41
|
+
cssFile.innerHTML = data;
|
|
42
|
+
setTimeout(() => {
|
|
43
|
+
this.el.prepend(cssFile);
|
|
44
|
+
}, 1);
|
|
45
|
+
})
|
|
46
|
+
.catch((err) => {
|
|
47
|
+
console.log('error ', err);
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
this.clientStyling = '';
|
|
51
|
+
this.clientStylingUrl = '';
|
|
52
|
+
this.translationUrl = '';
|
|
53
|
+
this.targetTranslations = undefined;
|
|
54
|
+
}
|
|
55
|
+
componentDidRender() {
|
|
56
|
+
// start custom styling area
|
|
57
|
+
if (!this.stylingAppends) {
|
|
58
|
+
if (this.clientStyling)
|
|
59
|
+
this.setClientStyling();
|
|
60
|
+
if (this.clientStylingUrl)
|
|
61
|
+
this.setClientStylingURL();
|
|
62
|
+
this.stylingAppends = true;
|
|
63
|
+
}
|
|
64
|
+
// end custom styling area
|
|
78
65
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
async componentWillLoad() {
|
|
67
|
+
const promises = [];
|
|
68
|
+
if (this.translationUrl) {
|
|
69
|
+
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
70
|
+
promises.push(translationPromise);
|
|
71
|
+
}
|
|
72
|
+
return await Promise.all(promises);
|
|
73
|
+
}
|
|
74
|
+
render() {
|
|
75
|
+
return (index.h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, index.h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
|
|
76
|
+
}
|
|
77
|
+
get el() { return index.getElement(this); }
|
|
85
78
|
};
|
|
86
|
-
GeneralStylingWrapper.style =
|
|
87
|
-
|
|
88
|
-
const LoyaltyProgress = `<svg width="100%" height="28" style="opacity: 0" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
89
|
-
<rect y="12" x="2" width="100%" id="total_level" height="5" rx="2.5" fill="white" fill-opacity="0.5"/>
|
|
90
|
-
<rect y="12" x="2" id="current_level" width="64" height="5" rx="2.5" fill="white"/>
|
|
91
|
-
<g filter="url(#filter_current_level)">
|
|
92
|
-
<circle id="circle_current_level" cx="74.5" cy="14.5" r="6.5" fill="white"/>
|
|
93
|
-
</g>
|
|
94
|
-
<g filter="url(#filter_heart_ball)">
|
|
95
|
-
<g filter="url(#filter_ball)">
|
|
96
|
-
<circle cx="169" cy="14" r="10" id="lock" fill="url(#paint0_linear_ball)"/>
|
|
97
|
-
</g>
|
|
98
|
-
<g filter="url(#filter_heart)">
|
|
99
|
-
<svg x="0" y="4" id="lock_box">
|
|
100
|
-
<path d="M10.217 6.42442c-0.713,-0.574,-1.304,-1.083,-1.928,-1.622c-0.348,-0.299,-0.707,-0.611,-1.101,-0.943l-0.013,-0.01c0,0,-0.023,-0.017,-0.04,-0.027l-0.167,-0.095l-0.15,0.12c0,0,-0.015,0.012,-0.024,0.02c-0.391,0.33,-0.749,0.64,-1.094,0.939c-0.622,0.539,-1.211,1.048,-1.924,1.624c-1.816,1.463,-3.598,3.263,-3.033,5.506c0.404,1.601,2.104,2.905,3.789,2.905c0.211,0,0.423,-0.02,0.626,-0.061c0.286,-0.058,0.572,-0.145,0.864,-0.265c-0.079,0.962,-0.413,1.864,-0.881,2.369l-0.423,0.459h0.633c0.633,0,1.018,-0.007,1.356,-0.013c0.248,-0.004,0.462,-0.008,0.72,-0.008c0.335,0,0.709,0.006,1.215,0.021l0.686,0.02l-0.474,-0.483c-0.504,-0.514,-0.847,-1.403,-0.923,-2.385c0.311,0.132,0.616,0.227,0.916,0.287c0.204,0.039,0.411,0.059,0.623,0.059c1.687,0,3.386,-1.304,3.789,-2.909c0.56,-2.243,-1.224,-4.041,-3.042,-5.504v-0.004z" fill="#933CBF"/>
|
|
101
|
-
<path d="M9.727,6.98459c-1.004,-0.83,-1.741,-1.515,-2.723,-2.365c-0.002,0,-0.004,-0.004,-0.007,-0.006c-0.002,0,-0.004,0.004,-0.006,0.006c-0.98,0.85,-1.715,1.537,-2.721,2.367c-1.455,1.202,-3.126,2.821,-2.638,4.81c0.37,1.511,2.091,2.751,3.665,2.43c0.389,-0.08,0.75,-0.224,1.094,-0.402c0,0.116,-0.004,0.233,-0.012,0.353c-0.064,0.991,-0.398,1.892,-0.86,2.401c1.481,0,1.481,-0.043,2.961,0c-0.481,-0.503,-0.834,-1.382,-0.9,-2.401c-0.008,-0.127,-0.012,-0.253,-0.012,-0.378c0.357,0.19,0.733,0.342,1.14,0.425c1.574,0.319,3.292,-0.922,3.661,-2.433c0.486,-1.992,-1.189,-3.609,-2.644,
|
|
102
|
-
-4.809l0.002,0.002z" fill="url(#paint1_linear_lock)"/>
|
|
103
|
-
<path d="M9.255,7.551c-0.844,-0.716,-1.462,-1.309,-2.286,-2.045c-0.002,0,-0.004,-0.004,-0.006,-0.006c0,0,-0.004,0.004,-0.006,0.006c-0.824,0.736,-1.44,1.329,-2.284,2.047c-0.919,0.782,-1.94,1.769,-2.214,2.943c-0.115,0.021,-0.914,0.044,-0.914,0.044l0.887,0.083c-0.039,0.206,-0.055,0.418,-0.041,0.638c0.087,-1.371,1.25,-2.507,2.282,-3.384c0.844,-0.718,1.462,-1.313,2.284,-2.047c0.002,-0.002,0.004,-0.004,0.006,-0.006c0.002,0,0.004,0.004,0.006,0.004c0.824,0.734,1.442,1.329,2.286,2.045c1.034,0.879,2.198,2.013,2.286,3.386c0.093,-1.517,-1.173,-2.761,-2.286,-3.708z" fill="#9040C9"/>
|
|
104
|
-
</svg>
|
|
105
|
-
</g>
|
|
106
|
-
</g>
|
|
107
|
-
<g filter="url(#filter_lock)">
|
|
108
|
-
<svg x="100%" y="9" id="heart_box">
|
|
109
|
-
<path d="M7,6c-0.19,-0.002,-0.377,0.052,-0.534,0.154c-0.158,0.103,-0.278,0.25,-0.346,0.42c-0.069,0.171,-0.081,0.357,-0.035,0.535c0.046,0.177,0.147,0.337,0.29,0.457v0.834c0,0.159,0.066,0.312,0.183,0.424c0.117,0.113,0.276,0.176,0.442,0.176c0.166,0,0.325,-0.063,0.442,-0.176c0.117,-0.112,0.183,-0.265,0.183,-0.424v-0.834c0.143,-0.12,0.244,-0.28,0.29,-0.457c0.046,-0.178,0.034,-0.364,-0.035,-0.535c-0.068,-0.17,-0.188,-0.317,-0.346,-0.42c-0.157,-0.102,-0.344,-0.156,-0.534,-0.154zm3.125,-2.4v-1.2c0,-0.796,-0.329,-1.559,-0.915,-2.121c-0.586,-0.563,-1.381,-0.879,-2.21,-0.879c-0.829,0,-1.624,0.316,-2.21,0.879c-0.586,0.562,-0.915,1.325,-0.915,2.121v1.2c-0.497,0,-0.974,0.19,-1.326,0.527c-0.351,0.338,-0.549,0.796,-0.549,1.273v4.2c0,0.477,0.198,0.935,0.549,1.273c0.352,0.337,0.829,0.527,1.326,0.527h6.25c0.497,0,0.974,-0.19,1.326,-0.527c0.351,-0.338,0.549,-0.796,0.549,-1.273v-4.2c0,-0.477,-0.198,-0.935,-0.549,-1.273c-0.352,-0.337,-0.829,-0.527,-1.326,-0.527zm-5,-1.2c0,-0.477,0.198,-0.935,0.549,-1.273c0.352,-0.337,0.829,-0.527,1.326,-0.527c0.497,0,0.974,0.19,1.326,0.527c0.351,0.338,0.549,0.796,0.549,1.273v1.2h-3.75v-1.2zm5.625,7.2c0,0.159,-0.066,0.312,-0.183,0.424c-0.117,0.113,-0.276,0.176,-0.442,0.176h-6.25c-0.166,0,-0.325,-0.063,-0.442,-0.176c-0.117,-0.112,-0.183,-0.265,-0.183,-0.424v-4.2c0,-0.159,0.066,-0.312,0.183,-0.424c0.117,-0.113,0.276,-0.176,0.442,-0.176h6.25c0.166,0,0.325,0.063,0.442,0.176c0.117,0.112,0.183,0.265,0.183,0.424v4.2z" fill="white"/>
|
|
110
|
-
</svg>
|
|
111
|
-
</g>
|
|
112
|
-
<defs>
|
|
113
|
-
<filter id="filter_current_level" x="64" y="4" width="21" height="21" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
114
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
115
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
116
|
-
<feGaussianBlur stdDeviation="2" result="effect1_foregroundBlur_305_23"/>
|
|
117
|
-
</filter>
|
|
118
|
-
<filter id="filter_heart_ball" x="155" y="0" width="28" height="28" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
119
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
120
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
121
|
-
<feOffset/>
|
|
122
|
-
<feGaussianBlur stdDeviation="2"/>
|
|
123
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
124
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
125
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_305_23"/>
|
|
126
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_305_23" result="shape"/>
|
|
127
|
-
</filter>
|
|
128
|
-
<filter id="filter_ball" x="159" y="4" width="20" height="21" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
129
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
130
|
-
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
|
131
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
132
|
-
<feOffset dy="1"/>
|
|
133
|
-
<feGaussianBlur stdDeviation="1"/>
|
|
134
|
-
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
|
|
135
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.55 0"/>
|
|
136
|
-
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_305_23"/>
|
|
137
|
-
</filter>
|
|
138
|
-
<filter id="filter_heart" x="161.636" y="5.72727" width="14.7271" height="15.6364" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
139
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
140
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
141
|
-
<feOffset/>
|
|
142
|
-
<feGaussianBlur stdDeviation="0.5"/>
|
|
143
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
144
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
145
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_305_23"/>
|
|
146
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_305_23" result="shape"/>
|
|
147
|
-
</filter>
|
|
148
|
-
<filter id="filter_lock" x="50" y="7" width="12" height="14" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
149
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
150
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
151
|
-
<feOffset/>
|
|
152
|
-
<feGaussianBlur stdDeviation="0.5"/>
|
|
153
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
154
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
155
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_305_23"/>
|
|
156
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_305_23" result="shape"/>
|
|
157
|
-
</filter>
|
|
158
|
-
<linearGradient id="paint0_linear_ball" x1="163" y1="6" x2="174.2" y2="22.6" gradientUnits="userSpaceOnUse">
|
|
159
|
-
<stop stop-color="#946AD7"/>
|
|
160
|
-
<stop offset="1" stop-color="#EFABEB"/>
|
|
161
|
-
</linearGradient>
|
|
162
|
-
<linearGradient id="paint1_linear_lock" x1="100%" y1="18.4056" x2="169.002" y2="10.2845" gradientUnits="userSpaceOnUse">
|
|
163
|
-
<stop stop-color="#814FD6"/>
|
|
164
|
-
<stop offset="1" stop-color="#D679D8"/>
|
|
165
|
-
</linearGradient>
|
|
166
|
-
</defs>
|
|
167
|
-
</svg>
|
|
168
|
-
`;
|
|
79
|
+
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
80
|
+
|
|
81
|
+
const levelPercentSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIyOCIgc3R5bGU9Im9wYWNpdHk6IDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8cmVjdCB5PSIxMiIgeD0iMiIgd2lkdGg9IjEwMCUiIGlkPSJ0b3RhbF9sZXZlbCIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjUiLz4KICAgIDxyZWN0IHk9IjEyIiAgeD0iMiIgaWQ9ImN1cnJlbnRfbGV2ZWwiIHdpZHRoPSI2NCIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSJ3aGl0ZSIvPgogICAgPGcgZmlsdGV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VyU3BhY2VPblVzZSI+CiAgICAgICAgICAgIDxzdG9wIHN0b3AtY29sb3I9IiM4MTRGRDYiLz4KICAgICAgICAgICAgPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjRDY3OUQ4Ii8+CiAgICAgICAgPC9saW5lYXJHcmFkaWVudD4KICAgIDwvZGVmcz4KPC9zdmc+Cg==';
|
|
169
82
|
|
|
170
83
|
const DEFAULT_LANGUAGE = 'en';
|
|
171
84
|
const SUPPORTED_LANGUAGES = ['ro', 'en'];
|
|
172
85
|
const TRANSLATIONS = {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
86
|
+
en: {
|
|
87
|
+
redeem: 'Redeem',
|
|
88
|
+
expireOn: 'Expire on ',
|
|
89
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
90
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
91
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
92
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
93
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
94
|
+
spendablePoints: 'Spendable Points:',
|
|
95
|
+
details: 'Details',
|
|
96
|
+
earningRules: 'Earning Rules',
|
|
97
|
+
xp: 'XP',
|
|
98
|
+
sp: 'Coins',
|
|
99
|
+
termAndConditions: 'Term & Conditions',
|
|
100
|
+
},
|
|
101
|
+
'zh-hk': {
|
|
102
|
+
redeem: '兑奖',
|
|
103
|
+
expireOn: 'Expire on ',
|
|
104
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
105
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
106
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
107
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
108
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
109
|
+
spendablePoints: 'Spendable Points:',
|
|
110
|
+
details: '明细',
|
|
111
|
+
earningRules: 'Earning Rules',
|
|
112
|
+
xp: 'XP',
|
|
113
|
+
sp: 'Coins',
|
|
114
|
+
termAndConditions: 'Term & Conditions',
|
|
115
|
+
},
|
|
116
|
+
de: {
|
|
117
|
+
redeem: 'Redeem',
|
|
118
|
+
expireOn: 'Expire on ',
|
|
119
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
120
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
121
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
122
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
123
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
124
|
+
spendablePoints: 'Spendable Points:',
|
|
125
|
+
details: 'Details',
|
|
126
|
+
earningRules: 'Earning Rules',
|
|
127
|
+
xp: 'XP',
|
|
128
|
+
sp: 'Coins',
|
|
129
|
+
termAndConditions: 'Term & Conditions',
|
|
130
|
+
},
|
|
131
|
+
it: {
|
|
132
|
+
redeem: 'Redeem',
|
|
133
|
+
expireOn: 'Expire on ',
|
|
134
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
135
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
136
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
137
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
138
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
139
|
+
spendablePoints: 'Spendable Points:',
|
|
140
|
+
details: 'Details',
|
|
141
|
+
earningRules: 'Earning Rules',
|
|
142
|
+
xp: 'XP',
|
|
143
|
+
sp: 'Coins',
|
|
144
|
+
termAndConditions: 'Term & Conditions',
|
|
145
|
+
},
|
|
146
|
+
fr: {
|
|
147
|
+
redeem: 'Redeem',
|
|
148
|
+
expireOn: 'Expire on ',
|
|
149
|
+
pointsToBeExpired: '${expirationPoints} points to expire in ${expireDay} days',
|
|
150
|
+
pointsToBeExpiredDay: '${expirationPoints} points to expire in ${expireDay} day',
|
|
151
|
+
pointsToBeExpiredHours: '${expirationPoints} points to expire in ${expireDay} hours',
|
|
152
|
+
pointsToBeExpiredHour: '${expirationPoints} points to expire in ${expireDay} hour',
|
|
153
|
+
tipsForNextLevel: 'Need ${pointsToReach} to reach ${levelName}',
|
|
154
|
+
spendablePoints: 'Spendable Points:',
|
|
155
|
+
details: 'Details',
|
|
156
|
+
earningRules: 'Earning Rules',
|
|
157
|
+
xp: 'XP',
|
|
158
|
+
sp: 'Coins',
|
|
159
|
+
termAndConditions: 'Term & Conditions',
|
|
160
|
+
},
|
|
161
|
+
es: {
|
|
162
|
+
redeem: 'Redeem'
|
|
163
|
+
},
|
|
164
|
+
tr: {
|
|
165
|
+
redeem: 'Redeem'
|
|
166
|
+
},
|
|
167
|
+
ru: {
|
|
168
|
+
redeem: 'Redeem'
|
|
169
|
+
},
|
|
170
|
+
ro: {
|
|
171
|
+
redeem: 'Redeem'
|
|
172
|
+
},
|
|
173
|
+
hr: {
|
|
174
|
+
redeem: 'Otkupiti',
|
|
175
|
+
expireOn: 'Istječe',
|
|
176
|
+
pointsToBeExpired: '${expirationPoints} bodova ističe za ${expireDay} dana',
|
|
177
|
+
tipsForNextLevel: 'Trebate ${pointsToReach} da dosegnete razinu ${levelName}',
|
|
178
|
+
spendablePoints: 'Bodovi za potrošit:',
|
|
179
|
+
details: 'Detalji',
|
|
180
|
+
xp: 'XP',
|
|
181
|
+
},
|
|
182
|
+
hu: {
|
|
183
|
+
redeem: 'Redeem'
|
|
184
|
+
},
|
|
185
|
+
pl: {
|
|
186
|
+
redeem: 'Redeem'
|
|
187
|
+
},
|
|
188
|
+
pt: {
|
|
189
|
+
redeem: 'Redeem'
|
|
190
|
+
},
|
|
191
|
+
sl: {
|
|
192
|
+
redeem: 'Redeem'
|
|
193
|
+
},
|
|
194
|
+
sr: {
|
|
195
|
+
redeem: 'Redeem'
|
|
196
|
+
}
|
|
284
197
|
};
|
|
285
198
|
const translate = (key, customLang) => {
|
|
286
|
-
|
|
287
|
-
|
|
199
|
+
const lang = customLang;
|
|
200
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
288
201
|
};
|
|
289
202
|
const translateWithParams = (key, params) => {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
203
|
+
const lang = params['lang'];
|
|
204
|
+
let templateString = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
205
|
+
if (!params) {
|
|
206
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
207
|
+
}
|
|
208
|
+
Object.keys(params).forEach((paramName) => {
|
|
209
|
+
templateString = templateString.replace(new RegExp('\\$\{' + paramName + '\}', 'gm'), params[paramName]);
|
|
210
|
+
});
|
|
211
|
+
return templateString;
|
|
299
212
|
};
|
|
300
213
|
|
|
301
214
|
function _typeof(o) {
|
|
@@ -666,7 +579,7 @@ function addLeadingZeros(number, targetLength) {
|
|
|
666
579
|
*
|
|
667
580
|
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
668
581
|
*/
|
|
669
|
-
var formatters$
|
|
582
|
+
var formatters$2 = {
|
|
670
583
|
// Year
|
|
671
584
|
y: function y(date, token) {
|
|
672
585
|
// From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens
|
|
@@ -732,6 +645,7 @@ var formatters$1 = {
|
|
|
732
645
|
return addLeadingZeros(fractionalSeconds, token.length);
|
|
733
646
|
}
|
|
734
647
|
};
|
|
648
|
+
const formatters$3 = formatters$2;
|
|
735
649
|
|
|
736
650
|
var dayPeriodEnum = {
|
|
737
651
|
am: 'am',
|
|
@@ -825,7 +739,7 @@ var formatters = {
|
|
|
825
739
|
unit: 'year'
|
|
826
740
|
});
|
|
827
741
|
}
|
|
828
|
-
return formatters$
|
|
742
|
+
return formatters$3.y(date, token);
|
|
829
743
|
},
|
|
830
744
|
// Local week-numbering year
|
|
831
745
|
Y: function Y(date, token, localize, options) {
|
|
@@ -947,7 +861,7 @@ var formatters = {
|
|
|
947
861
|
switch (token) {
|
|
948
862
|
case 'M':
|
|
949
863
|
case 'MM':
|
|
950
|
-
return formatters$
|
|
864
|
+
return formatters$3.M(date, token);
|
|
951
865
|
// 1st, 2nd, ..., 12th
|
|
952
866
|
case 'Mo':
|
|
953
867
|
return localize.ordinalNumber(month + 1, {
|
|
@@ -1037,7 +951,7 @@ var formatters = {
|
|
|
1037
951
|
unit: 'date'
|
|
1038
952
|
});
|
|
1039
953
|
}
|
|
1040
|
-
return formatters$
|
|
954
|
+
return formatters$3.d(date, token);
|
|
1041
955
|
},
|
|
1042
956
|
// Day of year
|
|
1043
957
|
D: function D(date, token, localize) {
|
|
@@ -1317,7 +1231,7 @@ var formatters = {
|
|
|
1317
1231
|
unit: 'hour'
|
|
1318
1232
|
});
|
|
1319
1233
|
}
|
|
1320
|
-
return formatters$
|
|
1234
|
+
return formatters$3.h(date, token);
|
|
1321
1235
|
},
|
|
1322
1236
|
// Hour [0-23]
|
|
1323
1237
|
H: function H(date, token, localize) {
|
|
@@ -1326,7 +1240,7 @@ var formatters = {
|
|
|
1326
1240
|
unit: 'hour'
|
|
1327
1241
|
});
|
|
1328
1242
|
}
|
|
1329
|
-
return formatters$
|
|
1243
|
+
return formatters$3.H(date, token);
|
|
1330
1244
|
},
|
|
1331
1245
|
// Hour [0-11]
|
|
1332
1246
|
K: function K(date, token, localize) {
|
|
@@ -1356,7 +1270,7 @@ var formatters = {
|
|
|
1356
1270
|
unit: 'minute'
|
|
1357
1271
|
});
|
|
1358
1272
|
}
|
|
1359
|
-
return formatters$
|
|
1273
|
+
return formatters$3.m(date, token);
|
|
1360
1274
|
},
|
|
1361
1275
|
// Second
|
|
1362
1276
|
s: function s(date, token, localize) {
|
|
@@ -1365,11 +1279,11 @@ var formatters = {
|
|
|
1365
1279
|
unit: 'second'
|
|
1366
1280
|
});
|
|
1367
1281
|
}
|
|
1368
|
-
return formatters$
|
|
1282
|
+
return formatters$3.s(date, token);
|
|
1369
1283
|
},
|
|
1370
1284
|
// Fraction of second
|
|
1371
1285
|
S: function S(date, token) {
|
|
1372
|
-
return formatters$
|
|
1286
|
+
return formatters$3.S(date, token);
|
|
1373
1287
|
},
|
|
1374
1288
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
1375
1289
|
X: function X(date, token, _localize, options) {
|
|
@@ -1497,6 +1411,7 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
1497
1411
|
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
1498
1412
|
return sign + hours + delimiter + minutes;
|
|
1499
1413
|
}
|
|
1414
|
+
const formatters$1 = formatters;
|
|
1500
1415
|
|
|
1501
1416
|
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
1502
1417
|
switch (pattern) {
|
|
@@ -1577,6 +1492,7 @@ var longFormatters = {
|
|
|
1577
1492
|
p: timeLongFormatter,
|
|
1578
1493
|
P: dateTimeLongFormatter
|
|
1579
1494
|
};
|
|
1495
|
+
const longFormatters$1 = longFormatters;
|
|
1580
1496
|
|
|
1581
1497
|
/**
|
|
1582
1498
|
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
@@ -1697,6 +1613,7 @@ var formatDistance = function formatDistance(token, count, options) {
|
|
|
1697
1613
|
}
|
|
1698
1614
|
return result;
|
|
1699
1615
|
};
|
|
1616
|
+
const formatDistance$1 = formatDistance;
|
|
1700
1617
|
|
|
1701
1618
|
function buildFormatLongFn(args) {
|
|
1702
1619
|
return function () {
|
|
@@ -1740,6 +1657,7 @@ var formatLong = {
|
|
|
1740
1657
|
defaultWidth: 'full'
|
|
1741
1658
|
})
|
|
1742
1659
|
};
|
|
1660
|
+
const formatLong$1 = formatLong;
|
|
1743
1661
|
|
|
1744
1662
|
var formatRelativeLocale = {
|
|
1745
1663
|
lastWeek: "'last' eeee 'at' p",
|
|
@@ -1752,6 +1670,7 @@ var formatRelativeLocale = {
|
|
|
1752
1670
|
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
|
|
1753
1671
|
return formatRelativeLocale[token];
|
|
1754
1672
|
};
|
|
1673
|
+
const formatRelative$1 = formatRelative;
|
|
1755
1674
|
|
|
1756
1675
|
function buildLocalizeFn(args) {
|
|
1757
1676
|
return function (dirtyIndex, options) {
|
|
@@ -1913,6 +1832,7 @@ var localize = {
|
|
|
1913
1832
|
defaultFormattingWidth: 'wide'
|
|
1914
1833
|
})
|
|
1915
1834
|
};
|
|
1835
|
+
const localize$1 = localize;
|
|
1916
1836
|
|
|
1917
1837
|
function buildMatchFn(args) {
|
|
1918
1838
|
return function (string) {
|
|
@@ -2070,6 +1990,7 @@ var match = {
|
|
|
2070
1990
|
defaultParseWidth: 'any'
|
|
2071
1991
|
})
|
|
2072
1992
|
};
|
|
1993
|
+
const match$1 = match;
|
|
2073
1994
|
|
|
2074
1995
|
/**
|
|
2075
1996
|
* @type {Locale}
|
|
@@ -2082,16 +2003,17 @@ var match = {
|
|
|
2082
2003
|
*/
|
|
2083
2004
|
var locale = {
|
|
2084
2005
|
code: 'en-US',
|
|
2085
|
-
formatDistance: formatDistance,
|
|
2086
|
-
formatLong: formatLong,
|
|
2087
|
-
formatRelative: formatRelative,
|
|
2088
|
-
localize: localize,
|
|
2089
|
-
match: match,
|
|
2006
|
+
formatDistance: formatDistance$1,
|
|
2007
|
+
formatLong: formatLong$1,
|
|
2008
|
+
formatRelative: formatRelative$1,
|
|
2009
|
+
localize: localize$1,
|
|
2010
|
+
match: match$1,
|
|
2090
2011
|
options: {
|
|
2091
2012
|
weekStartsOn: 0 /* Sunday */,
|
|
2092
2013
|
firstWeekContainsDate: 1
|
|
2093
2014
|
}
|
|
2094
2015
|
};
|
|
2016
|
+
const defaultLocale = locale;
|
|
2095
2017
|
|
|
2096
2018
|
// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token
|
|
2097
2019
|
// (one of the certain letters followed by `o`)
|
|
@@ -2409,7 +2331,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2409
2331
|
requiredArgs(2, arguments);
|
|
2410
2332
|
var formatStr = String(dirtyFormatStr);
|
|
2411
2333
|
var defaultOptions = getDefaultOptions();
|
|
2412
|
-
var locale
|
|
2334
|
+
var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
|
|
2413
2335
|
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
2414
2336
|
|
|
2415
2337
|
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
@@ -2422,10 +2344,10 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2422
2344
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
2423
2345
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
2424
2346
|
}
|
|
2425
|
-
if (!locale
|
|
2347
|
+
if (!locale.localize) {
|
|
2426
2348
|
throw new RangeError('locale must contain localize property');
|
|
2427
2349
|
}
|
|
2428
|
-
if (!locale
|
|
2350
|
+
if (!locale.formatLong) {
|
|
2429
2351
|
throw new RangeError('locale must contain formatLong property');
|
|
2430
2352
|
}
|
|
2431
2353
|
var originalDate = toDate(dirtyDate);
|
|
@@ -2441,14 +2363,14 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2441
2363
|
var formatterOptions = {
|
|
2442
2364
|
firstWeekContainsDate: firstWeekContainsDate,
|
|
2443
2365
|
weekStartsOn: weekStartsOn,
|
|
2444
|
-
locale: locale
|
|
2366
|
+
locale: locale,
|
|
2445
2367
|
_originalDate: originalDate
|
|
2446
2368
|
};
|
|
2447
2369
|
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
2448
2370
|
var firstCharacter = substring[0];
|
|
2449
2371
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
2450
|
-
var longFormatter = longFormatters[firstCharacter];
|
|
2451
|
-
return longFormatter(substring, locale
|
|
2372
|
+
var longFormatter = longFormatters$1[firstCharacter];
|
|
2373
|
+
return longFormatter(substring, locale.formatLong);
|
|
2452
2374
|
}
|
|
2453
2375
|
return substring;
|
|
2454
2376
|
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
@@ -2460,7 +2382,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2460
2382
|
if (firstCharacter === "'") {
|
|
2461
2383
|
return cleanEscapedString(substring);
|
|
2462
2384
|
}
|
|
2463
|
-
var formatter = formatters[firstCharacter];
|
|
2385
|
+
var formatter = formatters$1[firstCharacter];
|
|
2464
2386
|
if (formatter) {
|
|
2465
2387
|
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
2466
2388
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
@@ -2468,7 +2390,7 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
2468
2390
|
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
2469
2391
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
2470
2392
|
}
|
|
2471
|
-
return formatter(utcDate, substring, locale
|
|
2393
|
+
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
2472
2394
|
}
|
|
2473
2395
|
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
2474
2396
|
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
@@ -2485,143 +2407,111 @@ function cleanEscapedString(input) {
|
|
|
2485
2407
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
2486
2408
|
}
|
|
2487
2409
|
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
<path d="M24 24C24 21.7909 25.7909 20 28 20H64V56H28C25.7909 56 24 54.2091 24 52V24Z" fill="#464646"/>
|
|
2492
|
-
<path d="M51 56H37L43.2474 63.1399C43.6458 63.5952 44.3542 63.5952 44.7526 63.1399L51 56Z" fill="#464646"/>
|
|
2493
|
-
<circle cx="44" cy="38" r="7" fill="white"/>
|
|
2494
|
-
<path d="M43.9405 34C44.5456 34 45.0362 34.4906 45.0362 35.0957C45.0362 35.7009 44.5456 36.1915 43.9405 36.1915C43.3353 36.1915 42.8447 35.7009 42.8447 35.0957C42.8447 34.4906 43.3353 34 43.9405 34Z" fill="#464646"/>
|
|
2495
|
-
<path d="M45.8801 41.3737C45.8801 41.7617 45.5626 42.0791 45.1746 42.0791H44.3233H43.551H42.7055C42.3175 42.0791 42 41.7617 42 41.3737V41.3575C42 40.9695 42.3175 40.6521 42.7055 40.6521H42.8455V37.8714H42.3528C42.1588 37.8714 42 37.7127 42 37.5187V37.4936C42 37.2996 42.1588 37.1409 42.3528 37.1409H43.551H44.031H44.3233C44.7113 37.1409 45.0287 37.4583 45.0287 37.8463V40.6521H45.1746C45.5626 40.6521 45.8801 40.9696 45.8801 41.3576V41.3737Z" fill="#464646"/>
|
|
2496
|
-
</g>
|
|
2497
|
-
<defs>
|
|
2498
|
-
<filter id="filter0_d_242_4231" x="0" y="0" width="126" height="91.4814" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
2499
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
2500
|
-
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
2501
|
-
<feOffset dy="4"/>
|
|
2502
|
-
<feGaussianBlur stdDeviation="12"/>
|
|
2503
|
-
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
|
|
2504
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_242_4231"/>
|
|
2505
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_242_4231" result="shape"/>
|
|
2506
|
-
</filter>
|
|
2507
|
-
</defs>
|
|
2508
|
-
</svg>
|
|
2509
|
-
`;
|
|
2510
|
-
|
|
2511
|
-
const PlayerLoyaltyProcess = () => (index.h("span", { class: "LevelProgress", id: 'LevelProgress', innerHTML: LoyaltyProgress }));
|
|
2410
|
+
const tipsInfoSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI2IiBoZWlnaHQ9IjkyIiB2aWV3Qm94PSIwI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gMCAwIDAgMC4yNSAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzI0Ml80MjMxIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzI0Ml80MjMxIiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo=';
|
|
2411
|
+
|
|
2412
|
+
const PlayerLoyaltyProcess = () => (index.h("span", { class: "LevelProgress", id: 'LevelProgress', innerHTML: levelPercentSvg }));
|
|
2512
2413
|
const PlayerPoints = ({ loyaltyPoints, spendablePoints, pointExpireString, language, }) => (index.h("div", { class: "PointsInfo" },
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2414
|
+
loyaltyPoints &&
|
|
2415
|
+
index.h("div", { class: 'Points' },
|
|
2416
|
+
loyaltyPoints,
|
|
2417
|
+
" ",
|
|
2418
|
+
index.h("sub", { class: "XP" }, translate('xp', language))),
|
|
2419
|
+
spendablePoints &&
|
|
2420
|
+
index.h("div", { class: 'Points' },
|
|
2421
|
+
spendablePoints,
|
|
2422
|
+
" ",
|
|
2423
|
+
index.h("sub", { class: "XP" }, translate('sp', language))),
|
|
2424
|
+
pointExpireString && (index.h("div", { class: 'ExpirationPoints' },
|
|
2425
|
+
pointExpireString,
|
|
2426
|
+
" "))));
|
|
2526
2427
|
const PlayerElevateCardRedeem = ({ language, onRedeemClick }) => (index.h("div", { class: "CardCell Redeem" },
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2428
|
+
index.h("div", { class: "RedeemButton", onClick: () => {
|
|
2429
|
+
onRedeemClick();
|
|
2430
|
+
} },
|
|
2431
|
+
index.h("span", null, translate('redeem', language)))));
|
|
2531
2432
|
const PlayerNameDiv = (props) => (index.h("div", { class: 'CardCell PlayerName Txt' }, props.playerName));
|
|
2532
2433
|
const PlayerElevateLoyaltyLevel = (props) => (index.h("div", { class: 'CardCell ElevateLevel' },
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2434
|
+
index.h("span", { class: "LevelName", title: props.level }, props.level),
|
|
2435
|
+
props.expireTime && (index.h("div", { class: "CardCell ExpirationDate Txt" },
|
|
2436
|
+
translate('expireOn', props.language),
|
|
2437
|
+
index.h("span", { class: "ExpireTime" }, format(new Date(props.expireTime), props.dateFormat || 'yyyy-MM-dd')),
|
|
2438
|
+
!props.hideInfo && (index.h("span", { class: "fa Info", style: { 'background': `url(${index.getAssetPath('../static/info.svg')})` } },
|
|
2439
|
+
index.h("span", { class: "InfoTips", innerHTML: tipsInfoSvg })))))));
|
|
2539
2440
|
const PlayerAvatar = (props) => {
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2441
|
+
const badge = props.loyaltyIconUrl
|
|
2442
|
+
? index.h("img", { class: "Badge", src: props.loyaltyIconUrl })
|
|
2443
|
+
: props.hideIfNull ? '' : index.h("div", { class: "Badge" });
|
|
2444
|
+
const avatarSrc = props.playerAvatarUrl || index.getAssetPath('../static/user.svg');
|
|
2445
|
+
return index.h("div", { class: "PlayerAvatar", style: { 'position': `${props.onlyBadge ? '' : 'relative'}` } },
|
|
2446
|
+
!props.onlyBadge && index.h("img", { class: "Avatar", src: avatarSrc }),
|
|
2447
|
+
badge);
|
|
2547
2448
|
};
|
|
2548
2449
|
|
|
2549
|
-
const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n
|
|
2450
|
+
const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n .Inner .Row .ExpirationPoints {\n order: 1;\n }\n}\n.Card .PlayerImg {\n order: 0;\n}\n.Card .ExpirationPoints {\n order: 3;\n}\n.Card .LevelInfo {\n order: 2;\n}\n.Card .Inner .Row .PlayerImg {\n flex-direction: column;\n}\n.Card .Inner .Row .PointsInfo {\n width: 100%;\n text-align: center;\n display: flex;\n flex-direction: column;\n max-height: 50%;\n}\n.Card .Inner .PlayerAvatar .Badge {\n background-size: contain;\n background-repeat: no-repeat;\n position: absolute;\n right: 5px;\n bottom: -5px;\n width: 40%;\n height: 40%;\n overflow: visible;\n}\n.Card .Inner .Row .ExpirationPoints {\n text-align: left;\n color: var(--emfe-w-color-red, red);\n}\n.Card .Inner .Row .Points {\n text-wrap: nowrap;\n}\n.Card .Inner .LevelInfo .ElevateLevel {\n flex-direction: column;\n}\n.Card .Inner .LevelInfo .ElevateLevel .LevelName {\n width: calc(100% - 20px);\n text-align: left;\n font-size: 13px;\n padding-left: 20px;\n margin: 10px 0;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpirationDate {\n text-align: center;\n font-size: smaller;\n}\n.Card .Inner .LevelInfo .ElevateLevel .ExpireTime {\n margin-left: 5px;\n}";
|
|
2451
|
+
const PlayerElevateCardStyle0 = playerElevateCardCss;
|
|
2550
2452
|
|
|
2551
2453
|
const PlayerElevateCard = class {
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
if (event.detail['elevateLevelWalletTotal']) {
|
|
2589
|
-
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
2590
|
-
}
|
|
2591
|
-
if (event.detail['elevateLevel']) {
|
|
2592
|
-
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
2593
|
-
}
|
|
2594
|
-
if (event.detail['pointExpireString']) {
|
|
2595
|
-
this.pointExpireString = event.detail.xpExpireString;
|
|
2596
|
-
}
|
|
2597
|
-
if (event.detail.calculatedLevelFlag) {
|
|
2598
|
-
this.playerLevelFlag = event.detail.calculatedLevelFlag;
|
|
2454
|
+
constructor(hostRef) {
|
|
2455
|
+
index.registerInstance(this, hostRef);
|
|
2456
|
+
this.endpoint = undefined;
|
|
2457
|
+
this.theme = 'Dark';
|
|
2458
|
+
this.session = undefined;
|
|
2459
|
+
this.playerAvatarUrl = undefined;
|
|
2460
|
+
this.language = 'en';
|
|
2461
|
+
this.playerName = undefined;
|
|
2462
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
2463
|
+
this.clientStyling = '';
|
|
2464
|
+
this.clientStylingUrl = '';
|
|
2465
|
+
this.translationUrl = '';
|
|
2466
|
+
this.pointExpireString = undefined;
|
|
2467
|
+
this.playerLevelFlag = 0;
|
|
2468
|
+
this.playerElevateLevel = undefined;
|
|
2469
|
+
this.elevateWalletTotal = undefined;
|
|
2470
|
+
}
|
|
2471
|
+
onSessionOrEndpointChange() {
|
|
2472
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
2473
|
+
}
|
|
2474
|
+
playerElevateLeveLoadedHandler(event) {
|
|
2475
|
+
if (!event.detail) {
|
|
2476
|
+
return;
|
|
2477
|
+
}
|
|
2478
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
2479
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
2480
|
+
}
|
|
2481
|
+
if (event.detail['elevateLevel']) {
|
|
2482
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
2483
|
+
}
|
|
2484
|
+
if (event.detail['pointExpireString']) {
|
|
2485
|
+
this.pointExpireString = event.detail.xpExpireString;
|
|
2486
|
+
}
|
|
2487
|
+
if (event.detail.calculatedLevelFlag) {
|
|
2488
|
+
this.playerLevelFlag = event.detail.calculatedLevelFlag;
|
|
2489
|
+
}
|
|
2599
2490
|
}
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
}
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
}; }
|
|
2491
|
+
onRedeemClick() {
|
|
2492
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
2493
|
+
}
|
|
2494
|
+
componentWillLoad() {
|
|
2495
|
+
this.paramProxy = {
|
|
2496
|
+
endpoint: this.endpoint,
|
|
2497
|
+
session: this.session,
|
|
2498
|
+
language: this.language,
|
|
2499
|
+
calculateLevelFlag: true,
|
|
2500
|
+
};
|
|
2501
|
+
}
|
|
2502
|
+
render() {
|
|
2503
|
+
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
2504
|
+
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
2505
|
+
return (index.h("div", { key: '278a328dd084ee73b2707b93a57bccae64a2c9c7', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '68c885baf533447a7c77fd887bbec11e53768277', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '4066253a70cdd5e712ca244a708e7c1600c83071', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '64cda2a267c752056b3c7e3134cc324fa96bc261', params: this.paramProxy }), index.h("div", { key: 'c63ae83b401a35f5a78acd83dc3d7296c25141d7', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (index.h(index.Fragment, { key: 'ba16e5bb54259c17fd9e5aa0e3c03c2ec5d4263c' }, index.h("div", { key: 'fa1bf74f45e28318c95266cc42c54541bde92718', class: 'Content Row' }, index.h("div", { key: '7ede46f91bcc0d894b2b633627a4ca97d15fbe90', class: "PlayerImg" }, index.h(PlayerAvatar, { key: 'b6d0bac085e0178512b8a63ba8fccae7d4cc8399', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), index.h(PlayerPoints, { key: '88c445dbcd7dbe426a8de18beea02aecc03e26f3', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (index.h("div", { key: '4d985e486ecb74a6c916b28e619de83cb3d77ac1', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h("div", { key: '34e051ee1ff79b825fca57db958e1e5684a0aca1', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, index.h(PlayerNameDiv, { key: 'fa1b1f16e0b25c6adfba4c215e4ed377e05699b2', playerName: this.playerName }), index.h(PlayerElevateLoyaltyLevel, { key: '6d18b1422db202363ebcd56cc56946e0e071937b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(PlayerLoyaltyProcess, { key: '7dae355c4a5a9e28c70dced0ac061608f1753020' }), index.h(PlayerElevateCardRedeem, { key: '7e5f830b612c962a828c58f20a88dc97d315c910', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
2506
|
+
}
|
|
2507
|
+
static get assetsDirs() { return ["../static"]; }
|
|
2508
|
+
static get watchers() { return {
|
|
2509
|
+
"session": ["onSessionOrEndpointChange"],
|
|
2510
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
2511
|
+
"language": ["onSessionOrEndpointChange"]
|
|
2512
|
+
}; }
|
|
2623
2513
|
};
|
|
2624
|
-
PlayerElevateCard.style =
|
|
2514
|
+
PlayerElevateCard.style = PlayerElevateCardStyle0;
|
|
2625
2515
|
|
|
2626
2516
|
/**
|
|
2627
2517
|
* @name startOfDay
|
|
@@ -2808,387 +2698,361 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
2808
2698
|
}
|
|
2809
2699
|
|
|
2810
2700
|
function updateProgressSvg(progressElementRef, percent) {
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2701
|
+
const svgElement = progressElementRef.querySelector('#total_level');
|
|
2702
|
+
const endLockWidth = 17, pointR = 6.5;
|
|
2703
|
+
//Total Widget of the progress
|
|
2704
|
+
const barWidth = svgElement.getBBox().width;
|
|
2705
|
+
//The filled width according to current progress
|
|
2706
|
+
const levelPercent = percent > 1 ? 1 : percent;
|
|
2707
|
+
const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
|
|
2708
|
+
//update bar's width, widthOnBar
|
|
2709
|
+
const levelBar = progressElementRef.querySelector('#current_level');
|
|
2710
|
+
//update filters, x = widthOnBar
|
|
2711
|
+
const levelFilter = progressElementRef.querySelector('#filter_current_level');
|
|
2712
|
+
//update circle, widthOnBar+10
|
|
2713
|
+
const levelCircle = progressElementRef.querySelector('#circle_current_level');
|
|
2714
|
+
svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
|
|
2715
|
+
levelBar.setAttribute('width', `${widthOnBar}`);
|
|
2716
|
+
levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
|
|
2717
|
+
levelFilter.setAttribute('x', `${widthOnBar - 8}`);
|
|
2718
|
+
//update lock location
|
|
2719
|
+
const endLockElement = progressElementRef.querySelector('#lock');
|
|
2720
|
+
// wrapper of endLock, include ball and heatfilter1_d_305_23
|
|
2721
|
+
const filter1 = progressElementRef.querySelector('#filter_heart_ball');
|
|
2722
|
+
// ball in endlockfilter2_i_305_23
|
|
2723
|
+
const filter2 = progressElementRef.querySelector('#filter_ball');
|
|
2724
|
+
// heart in endlockfilter3_d_305_23
|
|
2725
|
+
const filter3 = progressElementRef.querySelector('#filter_heart');
|
|
2726
|
+
//wrapper of lockfilter4_d_305_23
|
|
2727
|
+
const filterLock = progressElementRef.querySelector('#filter_lock');
|
|
2728
|
+
// shadow of ball paint0_linear_305_23
|
|
2729
|
+
const paint0 = progressElementRef.querySelector('#paint0_linear_ball');
|
|
2730
|
+
//paint in lockpaint1_linear_305_23
|
|
2731
|
+
const paint1 = progressElementRef.querySelector('#paint1_linear_lock');
|
|
2732
|
+
// box of lock and heart, for move position dynamically
|
|
2733
|
+
const lockBox = progressElementRef.querySelector('#lock_box');
|
|
2734
|
+
const heartBox = progressElementRef.querySelector('#heart_box');
|
|
2735
|
+
const rightPaddingOfLockWidth = 10, cxOfEndLockEle = barWidth - rightPaddingOfLockWidth;
|
|
2736
|
+
//set cx of lockElement
|
|
2737
|
+
endLockElement.setAttribute('cx', `${cxOfEndLockEle}`);
|
|
2738
|
+
//set cx of sub Elements
|
|
2739
|
+
paint1.setAttribute('x1', `${cxOfEndLockEle}`);
|
|
2740
|
+
paint1.setAttribute('x2', `${cxOfEndLockEle}`);
|
|
2741
|
+
paint0.setAttribute('x1', `${cxOfEndLockEle - 6}`);
|
|
2742
|
+
paint0.setAttribute('x2', `${cxOfEndLockEle - 6 + 11.2}`);
|
|
2743
|
+
filterLock.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
2744
|
+
filter3.setAttribute('x', `${cxOfEndLockEle - 6 - 2}`);
|
|
2745
|
+
filter2.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2}`);
|
|
2746
|
+
filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
|
|
2747
|
+
lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
2748
|
+
heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
2749
|
+
svgElement.parentElement.style.opacity = '1';
|
|
2860
2750
|
}
|
|
2861
2751
|
|
|
2862
|
-
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-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%);\n box-shadow: 0px 4px 4px 0px
|
|
2752
|
+
const playerElevateCardDataCss = ":host {\n display: block;\n width: 360px;\n height: 230px;\n}\n\n.ElevateCardWrapper {\n contain: layout inline-size;\n width: 100%;\n height: fit-content;\n min-height: 218px;\n}\n\n.Outer {\n container-type: inline-size;\n font-size: 12px;\n background-size: cover;\n background-repeat: no-repeat;\n line-height: initial;\n width: 100%;\n height: 100%;\n}\n\n.Dark {\n color: var(--emfe-w-color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emfe-w-color-black, #0e0e0e);\n}\n\n@container (min-width: 381px) {\n .Outer {\n background-size: cover;\n }\n .Outer .OuterCover {\n min-height: 190px;\n }\n}\n@container (min-width: 260px) {\n .Outer {\n background-size: contain;\n }\n}\n.OuterCover {\n width: 100%;\n height: 100%;\n content: \"\";\n background-repeat: no-repeat;\n background-size: cover;\n border-radius: 15px;\n}\n\n.Inner {\n display: flex;\n flex-direction: column;\n min-height: 158px;\n}\n.Inner .Content {\n padding: 15px;\n flex-wrap: wrap;\n gap: 8px;\n}\n.Inner .Row {\n display: flex;\n flex-direction: row;\n}\n.Inner .CardCell {\n display: flex;\n}\n.Inner .LevelProgress svg {\n transition: opacity 0.4s;\n}\n.Inner .LevelInfo {\n display: flex;\n flex-direction: column;\n}\n.Inner .LevelInfo .ElevateLevel .LevelName {\n height: 28px;\n border-radius: 5px;\n line-height: 28px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.Inner .LevelInfo.Level0 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level0-bg0, #E2792C) 0%, var(--emfe-w-elevate-color-level0-bg1, rgba(242, 151, 99, 0)) 100%);\n}\n.Inner .LevelInfo.Level1 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level1-bg0, #BEBFED) 0%, var(--emfe-w-elevate-color-level1-bg1, rgba(216, 217, 233, 0)) 100%);\n}\n.Inner .LevelInfo.Level2 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level2-bg0, #FCC410) 0%, var(--emfe-w-elevate-color-level2-bg1, rgba(255, 189, 43, 0)) 100%);\n}\n.Inner .LevelInfo.Level3 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level3-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level3-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo.Level4 .ElevateLevel .LevelName {\n box-shadow: -2px -2px 7px 0px var(--emfe-w-elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emfe-w-elevate-color-level4-bg0, #B1A2DB) 0%, var(--emfe-w-elevate-color-level4-bg1, rgba(203, 202, 245, 0)) 100%);\n}\n.Inner .LevelInfo .ElevateLevel {\n display: flex;\n}\n.Inner .LevelInfo {\n flex: 1;\n flex-grow: 1;\n min-width: 150px;\n}\n.Inner .PlayerImg {\n width: 29%;\n margin: auto;\n max-width: 100px;\n min-width: 30px;\n order: 0;\n}\n.Inner .PlayerAvatar {\n max-width: 100px;\n flex-basis: 100px;\n height: auto;\n margin: auto;\n padding-top: 10px;\n}\n.Inner .PlayerAvatar .Avatar, .Inner .PlayerAvatar .Badge {\n width: 100%;\n height: 100%;\n}\n.Inner .PlayerAvatar .Avatar {\n border-radius: 50%;\n background-size: contain;\n background-repeat: no-repeat;\n}\n.Inner .ElevateLevel .ExpirationDate {\n max-width: 138px;\n min-width: 118px;\n}\n.Inner .PlayerName, .Inner .RedeemButton, .Inner .ElevateLevel {\n text-transform: capitalize;\n width: 100%;\n}\n.Inner .PlayerName {\n font-size: 16px;\n}\n.Inner .Row .PointsInfo {\n display: table;\n font-weight: 600;\n}\n.Inner .Row .Redeem {\n justify-content: flex-end;\n margin-left: auto;\n}\n.Inner .Row .Redeem:hover {\n color: var(--emfe-w-elevate-color-redeem-hover, #00ABA4);\n cursor: pointer;\n}\n.Inner .Row .RedeemButton:hover span {\n color: var(emfe-w-elevate-color-redeem-text-hover, #f1f1f1);\n font-weight: bold;\n}\n.Inner .Row .RedeemButton {\n width: 95px;\n height: 35px;\n display: flex;\n align-items: center;\n border-radius: 10px;\n background: var(--emfe-w-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%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emfe-w-color-white, #fff);\n line-height: 18px;\n font-size: 15px;\n text-align: center;\n width: 100%;\n}\n.Inner .Row .Points {\n font-size: large;\n vertical-align: middle;\n}\n.Inner .Row .Points .XP {\n font-size: x-small;\n}\n.Inner .Row .ExpirationPoints {\n font-size: small;\n text-align: right;\n font-weight: bold;\n color: var(--emfe-w-color-red, #9e595f);\n}";
|
|
2753
|
+
const PlayerElevateCardDataStyle0 = playerElevateCardDataCss;
|
|
2863
2754
|
|
|
2864
2755
|
const PlayerElevateCardData = class {
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
}
|
|
2904
|
-
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
2905
|
-
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
2906
|
-
? -1
|
|
2907
|
-
: 1;
|
|
2908
|
-
});
|
|
2909
|
-
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
2910
|
-
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
2911
|
-
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
2912
|
-
if (daysToExpried == 0) {
|
|
2913
|
-
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
2914
|
-
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
2915
|
-
}
|
|
2916
|
-
pointExpireInfoAsString = translateWithParams(expiredTranslationKey, {
|
|
2917
|
-
expirationPoints: aboutToExpire.points,
|
|
2918
|
-
expireDay: daysToExpried,
|
|
2919
|
-
});
|
|
2920
|
-
return pointExpireInfoAsString;
|
|
2921
|
-
}
|
|
2922
|
-
loadPlayerLevelInfo() {
|
|
2923
|
-
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
2924
|
-
return new Promise((resolve, reject) => {
|
|
2925
|
-
return fetch(url.href, {
|
|
2926
|
-
method: 'GET',
|
|
2927
|
-
headers: {
|
|
2928
|
-
'X-Sessionid': this.params.session,
|
|
2929
|
-
'Content-Type': 'application/json',
|
|
2930
|
-
},
|
|
2931
|
-
})
|
|
2932
|
-
.then((res) => res.json())
|
|
2933
|
-
.then((res) => {
|
|
2934
|
-
var _a, _b, _c;
|
|
2935
|
-
if (!res.success) {
|
|
2936
|
-
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
2937
|
-
reject(true);
|
|
2938
|
-
return;
|
|
2756
|
+
constructor(hostRef) {
|
|
2757
|
+
index.registerInstance(this, hostRef);
|
|
2758
|
+
this.playerElevateLeveLoaded = index.createEvent(this, "playerElevateLeveLoaded", 7);
|
|
2759
|
+
this.params = undefined;
|
|
2760
|
+
this.playerElevateLevel = undefined;
|
|
2761
|
+
this.pointExpireString = undefined;
|
|
2762
|
+
}
|
|
2763
|
+
handleWindowResizs() {
|
|
2764
|
+
this.initLevelProgressbar();
|
|
2765
|
+
}
|
|
2766
|
+
onParamsChanged() {
|
|
2767
|
+
this.loadElevateInfo();
|
|
2768
|
+
}
|
|
2769
|
+
onRedeemClick() {
|
|
2770
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
2771
|
+
}
|
|
2772
|
+
loadLevels() {
|
|
2773
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
|
|
2774
|
+
return new Promise((resolve, reject) => {
|
|
2775
|
+
return fetch(url.href, {
|
|
2776
|
+
method: 'GET',
|
|
2777
|
+
})
|
|
2778
|
+
.then((res) => res.json())
|
|
2779
|
+
.then((res) => {
|
|
2780
|
+
this.levels = res.data;
|
|
2781
|
+
resolve(true);
|
|
2782
|
+
})
|
|
2783
|
+
.catch((err) => {
|
|
2784
|
+
reject(err);
|
|
2785
|
+
});
|
|
2786
|
+
});
|
|
2787
|
+
}
|
|
2788
|
+
calcuatePointsToBeExpired(walletTotalInfo) {
|
|
2789
|
+
let pointExpireInfoAsString = '';
|
|
2790
|
+
if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
|
|
2791
|
+
walletTotalInfo.aboutToExpire.length == 0 ||
|
|
2792
|
+
walletTotalInfo.aboutToExpire[0].points <= 0) {
|
|
2793
|
+
return pointExpireInfoAsString;
|
|
2939
2794
|
}
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
2945
|
-
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
2946
|
-
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
2947
|
-
this.playerElevateLeveLoaded.emit({
|
|
2948
|
-
elevateLevelWalletTotal: spendableTotal,
|
|
2949
|
-
loyaltyWalletTotal
|
|
2795
|
+
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
2796
|
+
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
2797
|
+
? -1
|
|
2798
|
+
: 1;
|
|
2950
2799
|
});
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
});
|
|
2800
|
+
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
2801
|
+
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
2802
|
+
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
2803
|
+
if (daysToExpried == 0) {
|
|
2804
|
+
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
2805
|
+
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
2958
2806
|
}
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
2807
|
+
pointExpireInfoAsString = translateWithParams(expiredTranslationKey, {
|
|
2808
|
+
expirationPoints: aboutToExpire.points,
|
|
2809
|
+
expireDay: daysToExpried,
|
|
2810
|
+
});
|
|
2811
|
+
return pointExpireInfoAsString;
|
|
2812
|
+
}
|
|
2813
|
+
loadPlayerLevelInfo() {
|
|
2814
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
2815
|
+
return new Promise((resolve, reject) => {
|
|
2816
|
+
return fetch(url.href, {
|
|
2817
|
+
method: 'GET',
|
|
2818
|
+
headers: {
|
|
2819
|
+
'X-Sessionid': this.params.session,
|
|
2820
|
+
'Content-Type': 'application/json',
|
|
2821
|
+
},
|
|
2822
|
+
})
|
|
2823
|
+
.then((res) => res.json())
|
|
2824
|
+
.then((res) => {
|
|
2825
|
+
var _a, _b, _c;
|
|
2826
|
+
if (!res.success) {
|
|
2827
|
+
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
2828
|
+
reject(true);
|
|
2829
|
+
return;
|
|
2830
|
+
}
|
|
2831
|
+
let playerElevateInfo = res.data;
|
|
2832
|
+
this.playerElevateLevel = playerElevateInfo.level;
|
|
2833
|
+
this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name;
|
|
2834
|
+
this.playerElevateLevel.spendablePoints = ((_a = playerElevateInfo.spendableWallet) === null || _a === void 0 ? void 0 : _a.total.points) || 0;
|
|
2835
|
+
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
2836
|
+
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
2837
|
+
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
2838
|
+
this.playerElevateLeveLoaded.emit({
|
|
2839
|
+
elevateLevelWalletTotal: spendableTotal,
|
|
2840
|
+
loyaltyWalletTotal
|
|
2841
|
+
});
|
|
2842
|
+
let spExpireInfoAsString = this.calcuatePointsToBeExpired(spendableTotal);
|
|
2843
|
+
let xpExpireInfoAsString = this.calcuatePointsToBeExpired(loyaltyWalletTotal);
|
|
2844
|
+
if (spExpireInfoAsString || xpExpireInfoAsString) {
|
|
2845
|
+
this.playerElevateLeveLoaded.emit({
|
|
2846
|
+
pointExpireString: spExpireInfoAsString,
|
|
2847
|
+
xpExpireString: xpExpireInfoAsString
|
|
2848
|
+
});
|
|
2849
|
+
}
|
|
2850
|
+
resolve(this.playerElevateLevel);
|
|
2851
|
+
})
|
|
2852
|
+
.catch((err) => {
|
|
2853
|
+
console.log('error ', err);
|
|
2854
|
+
reject(true);
|
|
2855
|
+
});
|
|
2856
|
+
});
|
|
2857
|
+
}
|
|
2858
|
+
setLoyaltyProgress(percent) {
|
|
2859
|
+
updateProgressSvg(this.loyaltyProgressEle, percent);
|
|
2860
|
+
}
|
|
2861
|
+
initLevelProgressbar() {
|
|
2862
|
+
setTimeout(() => {
|
|
2863
|
+
this.loyaltyProgressEle =
|
|
2864
|
+
this.elevateCardRef.parentElement.querySelector('#LevelProgress');
|
|
2865
|
+
if (!this.loyaltyProgressEle) {
|
|
2866
|
+
return;
|
|
2867
|
+
}
|
|
2868
|
+
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
2869
|
+
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
2870
|
+
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
2871
|
+
}, 80);
|
|
2872
|
+
}
|
|
2873
|
+
componentDidRender() {
|
|
2874
|
+
this.initLevelProgressbar();
|
|
2875
|
+
}
|
|
2876
|
+
loadElevateInfo() {
|
|
2877
|
+
if (!this.params.endpoint || !this.params.session) {
|
|
2878
|
+
return;
|
|
3008
2879
|
}
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
2880
|
+
const promises = [];
|
|
2881
|
+
promises.push(this.loadPlayerLevelInfo());
|
|
2882
|
+
if (this.params.calculateLevelFlag) {
|
|
2883
|
+
promises.push(this.loadLevels());
|
|
2884
|
+
}
|
|
2885
|
+
Promise.all(promises).then((res) => {
|
|
2886
|
+
console.log('elevate-init', res);
|
|
2887
|
+
this.initLevelProgressbar();
|
|
2888
|
+
if (!this.levels) {
|
|
2889
|
+
return;
|
|
2890
|
+
}
|
|
2891
|
+
this.levels.sort((level1, level2) => {
|
|
2892
|
+
return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
|
|
2893
|
+
});
|
|
2894
|
+
const playerPoints = this.playerElevateLevel.loyaltyPoints;
|
|
2895
|
+
let playerLevelNumber = 0;
|
|
2896
|
+
this.levels.forEach((elevateLevel, idx) => {
|
|
2897
|
+
if (playerPoints > elevateLevel.firstEntryPoints) {
|
|
2898
|
+
playerLevelNumber = idx;
|
|
2899
|
+
}
|
|
2900
|
+
});
|
|
2901
|
+
this.playerElevateLeveLoaded.emit({
|
|
2902
|
+
calculatedLevelFlag: playerLevelNumber,
|
|
2903
|
+
});
|
|
2904
|
+
});
|
|
2905
|
+
}
|
|
2906
|
+
componentWillLoad() {
|
|
2907
|
+
this.loadElevateInfo();
|
|
2908
|
+
}
|
|
2909
|
+
get elevateCardRef() { return index.getElement(this); }
|
|
2910
|
+
static get watchers() { return {
|
|
2911
|
+
"params": ["onParamsChanged"]
|
|
2912
|
+
}; }
|
|
3022
2913
|
};
|
|
3023
|
-
PlayerElevateCardData.style =
|
|
2914
|
+
PlayerElevateCardData.style = PlayerElevateCardDataStyle0;
|
|
3024
2915
|
|
|
3025
|
-
const playerElevateLoyaltycardCss = ":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{width:100%}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emfe-w-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(--emfe-w-elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emfe-w-elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .
|
|
2916
|
+
const playerElevateLoyaltycardCss = ":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{width:100%}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emfe-w-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(--emfe-w-elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emfe-w-elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emfe-w-color-black, #000);opacity:0.8;font-weight:bold}";
|
|
2917
|
+
const PlayerElevateLoyaltycardStyle0 = playerElevateLoyaltycardCss;
|
|
3026
2918
|
|
|
3027
2919
|
const PlayerElevateLoyaltycard = class {
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
if (!event.detail) {
|
|
3061
|
-
return;
|
|
3062
|
-
}
|
|
3063
|
-
if (event.detail['elevateLevelWalletTotal']) {
|
|
3064
|
-
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
3065
|
-
}
|
|
3066
|
-
if (event.detail['elevateLevel']) {
|
|
3067
|
-
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
3068
|
-
}
|
|
3069
|
-
if (event.detail['pointExpireString']) {
|
|
3070
|
-
this.pointExpireString = event.detail.xpExpireString;
|
|
3071
|
-
}
|
|
3072
|
-
}
|
|
3073
|
-
onRedeemClick() {
|
|
3074
|
-
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
3075
|
-
}
|
|
3076
|
-
componentWillLoad() {
|
|
3077
|
-
this.paramProxy = {
|
|
3078
|
-
endpoint: this.endpoint,
|
|
3079
|
-
session: this.session,
|
|
3080
|
-
language: this.language,
|
|
3081
|
-
};
|
|
3082
|
-
}
|
|
3083
|
-
getNextLevelTips() {
|
|
3084
|
-
var _a;
|
|
3085
|
-
//need xx to reach Diamond
|
|
3086
|
-
let nextLevel = (_a = this.playerElevateLevel) === null || _a === void 0 ? void 0 : _a.nextLevel;
|
|
3087
|
-
if (this.playerElevateLevel && nextLevel) {
|
|
3088
|
-
const pointsToReach = (nextLevel.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
|
|
3089
|
-
return translateWithParams('tipsForNextLevel', {
|
|
3090
|
-
pointsToReach,
|
|
3091
|
-
levelName: nextLevel.name,
|
|
3092
|
-
});
|
|
2920
|
+
constructor(hostRef) {
|
|
2921
|
+
index.registerInstance(this, hostRef);
|
|
2922
|
+
this.endpoint = undefined;
|
|
2923
|
+
this.theme = 'Dark';
|
|
2924
|
+
this.session = undefined;
|
|
2925
|
+
this.playerAvatarUrl = undefined;
|
|
2926
|
+
this.language = 'en';
|
|
2927
|
+
this.playerName = undefined;
|
|
2928
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
2929
|
+
this.clientStyling = '';
|
|
2930
|
+
this.clientStylingUrl = '';
|
|
2931
|
+
this.translationUrl = '';
|
|
2932
|
+
this.pointExpireString = undefined;
|
|
2933
|
+
this.playerElevateLevel = undefined;
|
|
2934
|
+
this.elevateWalletTotal = undefined;
|
|
2935
|
+
}
|
|
2936
|
+
onSessionOrEndpointChange() {
|
|
2937
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
2938
|
+
}
|
|
2939
|
+
playerElevateLeveLoadedHandler(event) {
|
|
2940
|
+
if (!event.detail) {
|
|
2941
|
+
return;
|
|
2942
|
+
}
|
|
2943
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
2944
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
2945
|
+
}
|
|
2946
|
+
if (event.detail['elevateLevel']) {
|
|
2947
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
2948
|
+
}
|
|
2949
|
+
if (event.detail['pointExpireString']) {
|
|
2950
|
+
this.pointExpireString = event.detail.xpExpireString;
|
|
2951
|
+
}
|
|
3093
2952
|
}
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
2953
|
+
onRedeemClick() {
|
|
2954
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
2955
|
+
}
|
|
2956
|
+
componentWillLoad() {
|
|
2957
|
+
this.paramProxy = {
|
|
2958
|
+
endpoint: this.endpoint,
|
|
2959
|
+
session: this.session,
|
|
2960
|
+
language: this.language,
|
|
2961
|
+
};
|
|
2962
|
+
}
|
|
2963
|
+
getNextLevelTips() {
|
|
2964
|
+
var _a;
|
|
2965
|
+
//need xx to reach Diamond
|
|
2966
|
+
let nextLevel = (_a = this.playerElevateLevel) === null || _a === void 0 ? void 0 : _a.nextLevel;
|
|
2967
|
+
if (this.playerElevateLevel && nextLevel) {
|
|
2968
|
+
const pointsToReach = (nextLevel.entryPoints - this.playerElevateLevel.loyaltyPoints).toFixed(2);
|
|
2969
|
+
return translateWithParams('tipsForNextLevel', {
|
|
2970
|
+
pointsToReach,
|
|
2971
|
+
levelName: nextLevel.name,
|
|
2972
|
+
});
|
|
2973
|
+
}
|
|
2974
|
+
return '';
|
|
2975
|
+
}
|
|
2976
|
+
render() {
|
|
2977
|
+
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
2978
|
+
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
2979
|
+
return (index.h("div", { key: 'd32d09786bf66e0abef026482e7ea04a53c051b1', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: 'dd2685eb840341b8823f24db9b72d0f6b7d340ae', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '3e2a00d1697c89441a8254cb81c6dc72e5b9f534', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '56221e6d50df3b09c4269000637818009807c994', params: this.paramProxy }), index.h("div", { key: 'f11201024b280d6beb2ce1978ebfa7f2c7c59678', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: '948a023268fad3945b5069686eb29312111042a2', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: 'de7c52faa07386949ce1ca728968534922e9d880' }, index.h("div", { key: '7c1a0c6ea5dbe7ee2375813b3819efa61e283232', class: "PlayerImg" }, index.h(PlayerAvatar, { key: '70ae13ee168c6de7bf4618f6ab8761462c8812b2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: 'c11f916999b52e43e04ee472b0f54691012409a5', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h(PlayerElevateLoyaltyLevel, { key: '6aa61d117b24f9abbee9c5d33e882d6f023f205b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(PlayerPoints, { key: '7cc02e34d4682c25095dbf6a3077b314410d8093', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), this.pointExpireString && (index.h("div", { key: '793e388644891e15b32e003ac8914e57e758e86b', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h(PlayerLoyaltyProcess, { key: 'a4f6c3b9f9cd5e8c6a025c26154702f9495bbe5b' }), index.h("div", { key: 'd91eda0f963ba9ffd481237f4b16bd4ef638d25e', class: "NextLevelTip" }, this.getNextLevelTips())))))))));
|
|
2980
|
+
}
|
|
2981
|
+
static get watchers() { return {
|
|
2982
|
+
"session": ["onSessionOrEndpointChange"],
|
|
2983
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
2984
|
+
"language": ["onSessionOrEndpointChange"]
|
|
2985
|
+
}; }
|
|
3106
2986
|
};
|
|
3107
|
-
PlayerElevateLoyaltycard.style =
|
|
2987
|
+
PlayerElevateLoyaltycard.style = PlayerElevateLoyaltycardStyle0;
|
|
3108
2988
|
|
|
3109
2989
|
const playerElevatePointcardCss = ":host{display:block}.PointsCard .Inner .Row .ExpirationPoints{text-align:left}.PointsCard .Inner .PlayerAvatar .Avatar{display:none}.PointsCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%;position:inherit}.PointsCard .Inner .PointsTxt{display:flex;flex-direction:row;justify-content:space-between}.PointsCard .Inner .DetailButton{background:linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%), linear-gradient(0deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6));border-radius:5px;box-shadow:0px 4px 4px 0px rgba(0, 0, 0, 0.25);border:2px solid;font-size:11px;width:108px;padding:4px;cursor:pointer;margin-top:5px;height:16px;min-width:45px;text-align:center}.PointsCard .Inner .DetailButton span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emfe-w-color-gray-150, #6D6D6D)}.PointsCard .Inner .LevelInfo{gap:15px;width:70%}.PointsCard .Inner .LevelInfo .PointsTxt{font-size:15px}.PointsCard .Inner .LevelInfo .PointsTxt.Label{display:none}.PointsCard .Inner .LevelInfo .PointsTxt.SPPoints{padding-top:15px}.PointsCard .Inner .LevelInfo .PointsTxt .TC{font-size:x-small;color:var(--emw--color-gray-300, #58586B);display:flex;align-content:center;height:100%;flex-wrap:wrap;text-decoration:underline;cursor:pointer;display:none}";
|
|
2990
|
+
const PlayerElevatePointcardStyle0 = playerElevatePointcardCss;
|
|
3110
2991
|
|
|
3111
2992
|
const PlayerElevatePointcard = class {
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
onSessionOrEndpointChange() {
|
|
3150
|
-
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
3151
|
-
}
|
|
3152
|
-
playerElevateLeveLoadedHandler(event) {
|
|
3153
|
-
if (!event.detail) {
|
|
3154
|
-
return;
|
|
3155
|
-
}
|
|
3156
|
-
if (event.detail['elevateLevelWalletTotal']) {
|
|
3157
|
-
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
3158
|
-
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
3159
|
-
}
|
|
3160
|
-
if (event.detail['elevateLevel']) {
|
|
3161
|
-
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
3162
|
-
}
|
|
3163
|
-
if (event.detail['pointExpireString']) {
|
|
3164
|
-
this.pointExpireString = event.detail.pointExpireString;
|
|
2993
|
+
constructor(hostRef) {
|
|
2994
|
+
index.registerInstance(this, hostRef);
|
|
2995
|
+
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
2996
|
+
this.endpoint = undefined;
|
|
2997
|
+
this.theme = 'Dark';
|
|
2998
|
+
this.session = undefined;
|
|
2999
|
+
this.playerAvatarUrl = undefined;
|
|
3000
|
+
this.language = 'en';
|
|
3001
|
+
this.playerName = undefined;
|
|
3002
|
+
this.cardTitle = undefined;
|
|
3003
|
+
this.buttonType = 'earningRule';
|
|
3004
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
3005
|
+
this.clientStyling = '';
|
|
3006
|
+
this.clientStylingUrl = '';
|
|
3007
|
+
this.translationUrl = '';
|
|
3008
|
+
this.pointExpireString = undefined;
|
|
3009
|
+
this.playerElevateLevel = undefined;
|
|
3010
|
+
this.elevateWalletTotal = undefined;
|
|
3011
|
+
this.elevateSPTotal = undefined;
|
|
3012
|
+
}
|
|
3013
|
+
onSessionOrEndpointChange() {
|
|
3014
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
3015
|
+
}
|
|
3016
|
+
playerElevateLeveLoadedHandler(event) {
|
|
3017
|
+
if (!event.detail) {
|
|
3018
|
+
return;
|
|
3019
|
+
}
|
|
3020
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
3021
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
3022
|
+
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
3023
|
+
}
|
|
3024
|
+
if (event.detail['elevateLevel']) {
|
|
3025
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
3026
|
+
}
|
|
3027
|
+
if (event.detail['pointExpireString']) {
|
|
3028
|
+
this.pointExpireString = event.detail.pointExpireString;
|
|
3029
|
+
}
|
|
3165
3030
|
}
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
}
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
}; }
|
|
3031
|
+
onDetailsClick() {
|
|
3032
|
+
window.postMessage({ type: this.isPointDetailCard ? 'BEEPointRulesClicked' : 'BEEDetailsClicked',
|
|
3033
|
+
path: this.isPointDetailCard ? 'player-elevate-level' : 'player-elevate-point-details' }, window.location.href);
|
|
3034
|
+
}
|
|
3035
|
+
componentWillLoad() {
|
|
3036
|
+
this.paramProxy = {
|
|
3037
|
+
endpoint: this.endpoint,
|
|
3038
|
+
session: this.session,
|
|
3039
|
+
language: this.language,
|
|
3040
|
+
};
|
|
3041
|
+
}
|
|
3042
|
+
render() {
|
|
3043
|
+
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
3044
|
+
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
3045
|
+
return (index.h("div", { key: '13461fc9cf8b777337a539c15da4bb2781f5a837', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '526e72c0ada871f74ba4a07f0a125bc25840c09c', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '95e358ceb8fa3c247660f7ca15a4684b132874be', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '24c765d743446ac597a9dcc9cd22515e7e39e6db', params: this.paramProxy }), index.h("div", { key: '309db4bbfc244a7fb97827774d9d4383109ca0d7', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: '9d5614ded2f73b505e60900675a7d95b3cfbcbc6', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '9a17e809083e61aad19f7ffef5d5ee5885ae8b4d' }, index.h("div", { key: '47068df3c0070ee2785b0d0201b08766fe0d71e8', class: "PlayerImg" }, index.h(PlayerAvatar, { key: '40115f8b190d871c85f9531fbf0bafb8fbd739e2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '278cd70c23ecb48655e90810af570ce5366d13d5', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: 'ce682ff881c5b12ed0b736ffcc67ad07b3713999', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate('spendablePoints')), index.h("div", { key: 'eeebc5c468cf6e3d566f708fd47a19956ad9defe', class: 'PointsTxt SPPoints' }, index.h(PlayerPoints, { key: 'ad58990b7fa789cf2d5c524191447196e97c8a16', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: '0dbdd6cd84e1cb43dac4485f4e3eec3130d6c65c', class: "TC", onClick: () => {
|
|
3046
|
+
this.onDetailsClick();
|
|
3047
|
+
} }, translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '45c3267d390995fabe34974913adf97b112cf8c2', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
3048
|
+
}
|
|
3049
|
+
static get watchers() { return {
|
|
3050
|
+
"session": ["onSessionOrEndpointChange"],
|
|
3051
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
3052
|
+
"language": ["onSessionOrEndpointChange"]
|
|
3053
|
+
}; }
|
|
3190
3054
|
};
|
|
3191
|
-
PlayerElevatePointcard.style =
|
|
3055
|
+
PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
|
|
3192
3056
|
|
|
3193
3057
|
exports.general_styling_wrapper = GeneralStylingWrapper;
|
|
3194
3058
|
exports.player_elevate_card = PlayerElevateCard;
|