@everymatrix/bonus-elevate-shop 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/bonus-elevate-shop/bonus-elevate-shop.esm.js +1 -1
- package/dist/bonus-elevate-shop/p-0b8ef56a.entry.js +1 -0
- package/dist/bonus-elevate-shop/p-248310cb.js +2 -0
- package/dist/bonus-elevate-shop/p-3feb3345.entry.js +1 -0
- package/dist/bonus-elevate-shop/p-e1255160.js +1 -0
- package/dist/bonus-elevate-shop/p-e5a4fd7f.js +1 -0
- package/dist/bonus-elevate-shop/p-ed3b625c.entry.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-elevate-shop.cjs.js +17 -11
- package/dist/cjs/bonus-elevate-shop_4.cjs.entry.js +489 -699
- package/dist/cjs/index-950597be.js +1650 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/{player-elevate-card-items-9d57b9ca.js → player-elevate-card-items-94136a9c.js} +171 -285
- package/dist/cjs/player-elevate-card.cjs.entry.js +59 -70
- package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +66 -77
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.css +2 -2
- package/dist/collection/components/bonus-elevate-shop/bonus-elevate-shop.js +237 -237
- package/dist/collection/components/bonus-elevate-shop/index.js +1 -0
- package/dist/collection/renders/renderGifts.js +25 -36
- package/dist/collection/utils/fetch.js +23 -23
- package/dist/collection/utils/translation.js +5 -5
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-elevate-shop.js +14 -11
- package/dist/esm/bonus-elevate-shop_4.entry.js +488 -698
- package/dist/esm/index-a343bbd8.js +1620 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/{player-elevate-card-items-10b0ac7c.js → player-elevate-card-items-ea0abf0a.js} +172 -285
- package/dist/esm/player-elevate-card.entry.js +59 -70
- package/dist/esm/player-elevate-loyaltycard.entry.js +66 -77
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -29
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop/.stencil/packages/stencil/bonus-elevate-shop/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop/.stencil/packages/stencil/bonus-elevate-shop/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/bonus-elevate-shop/bonus-elevate-shop.d.ts +40 -40
- package/dist/types/components/bonus-elevate-shop/index.d.ts +1 -0
- package/dist/types/components.d.ts +16 -1
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/translation.d.ts +6 -6
- package/dist/types/utils/types.d.ts +9 -9
- package/dist/types/utils/utils.d.ts +1 -0
- 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 +12 -9
- package/dist/assets/avaliable.false.svg +0 -47
- package/dist/assets/avaliable.true.svg +0 -47
- package/dist/bonus-elevate-shop/p-28f6db7c.js +0 -1
- package/dist/bonus-elevate-shop/p-65a44369.entry.js +0 -1
- package/dist/bonus-elevate-shop/p-699ed8ff.entry.js +0 -1
- package/dist/bonus-elevate-shop/p-ae2ac1de.entry.js +0 -1
- package/dist/bonus-elevate-shop/p-ebc6df3b.js +0 -1
- package/dist/cjs/index-6ed3151f.js +0 -1681
- package/dist/components/bonus-elevate-shop.d.ts +0 -11
- package/dist/components/bonus-elevate-shop.js +0 -415
- package/dist/components/general-styling-wrapper.js +0 -6
- package/dist/components/general-styling-wrapper2.js +0 -104
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/player-elevate-card-data.js +0 -6
- package/dist/components/player-elevate-card-data2.js +0 -636
- package/dist/components/player-elevate-card-items.js +0 -2250
- package/dist/components/player-elevate-card.js +0 -127
- package/dist/components/player-elevate-loyaltycard.js +0 -133
- package/dist/components/player-elevate-pointcard.js +0 -6
- package/dist/components/player-elevate-pointcard2.js +0 -133
- package/dist/esm/index-95550f9f.js +0 -1652
- 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/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/bonus-elevate-shop/.stencil/packages/bonus-elevate-shop/stencil.config.d.ts +0 -2
|
@@ -2,454 +2,259 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
6
|
-
const playerElevateCardItems = require('./player-elevate-card-items-
|
|
5
|
+
const index = require('./index-950597be.js');
|
|
6
|
+
const playerElevateCardItems = require('./player-elevate-card-items-94136a9c.js');
|
|
7
7
|
|
|
8
8
|
const getUrl = (path, params = {}) => {
|
|
9
|
-
|
|
9
|
+
return path + '?' + Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
|
|
10
10
|
};
|
|
11
11
|
const fetcher = async (input, init = {}) => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
let res;
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
res = await fetch(input, init);
|
|
15
|
+
res = await res.text();
|
|
16
|
+
try {
|
|
17
|
+
res = JSON.parse(res);
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
console.error(e);
|
|
21
|
+
}
|
|
22
|
+
return res;
|
|
23
23
|
};
|
|
24
24
|
async function fetchNorwayApi(path, params = {}, init = {}) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
const { endpoint, language, session } = this;
|
|
26
|
+
const fetchParams = params;
|
|
27
|
+
if (!init.method || init.method === 'GET') {
|
|
28
|
+
fetchParams.language = language;
|
|
29
|
+
}
|
|
30
|
+
const url = getUrl(`${endpoint}${path}`, fetchParams);
|
|
31
|
+
if (!init.headers)
|
|
32
|
+
init.headers = {};
|
|
33
|
+
init.headers['x-SessionId'] = session;
|
|
34
|
+
const res = await fetcher(url, init);
|
|
35
|
+
return res;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const translation = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
en: {
|
|
40
|
+
Points: 'Points',
|
|
41
|
+
Point: 'Point',
|
|
42
|
+
noContent: 'No Content',
|
|
43
|
+
}
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
const avaliableTrueSvg =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<circle cx="23" cy="19" r="18" stroke="url(#paint0_linear_179_6145)" stroke-opacity="0.6" stroke-width="2"/>
|
|
50
|
-
<circle cx="23" cy="19" r="18" stroke="url(#paint1_linear_179_6145)" stroke-width="2"/>
|
|
51
|
-
<circle cx="23" cy="19" r="18" stroke="url(#paint2_linear_179_6145)" stroke-width="2"/>
|
|
52
|
-
</g>
|
|
53
|
-
<g filter="url(#filter1_d_179_6145)">
|
|
54
|
-
<path d="M31.1977 11C31.7015 11 32.1279 11.1777 32.4767 11.5332C32.8256 11.8887 33 12.3203 33 12.8281V18.9102C33 20.2852 32.7364 21.5977 32.2093 22.8477C31.6822 24.0977 30.9748 25.1719 30.0872 26.0703C29.1996 26.9688 28.1376 27.6816 26.9012 28.209C25.6647 28.7363 24.3682 29 23.0116 29C21.6473 29 20.3469 28.7363 19.1105 28.209C17.874 27.6816 16.8101 26.9688 15.9186 26.0703C15.0271 25.1719 14.3178 24.0977 13.7907 22.8477C13.2636 21.5977 13 20.2852 13 18.9102V12.8281C13 12.3281 13.1783 11.8984 13.5349 11.5391C13.8915 11.1797 14.3178 11 14.814 11H31.1977ZM23.0116 23.4688C23.376 23.4688 23.6938 23.3398 23.9651 23.082L28.6628 18.5352C28.9496 18.2617 29.093 17.9297 29.093 17.5391C29.093 17.1562 28.9593 16.8301 28.6919 16.5605C28.4244 16.291 28.1008 16.1562 27.7209 16.1562C27.3566 16.1562 27.0388 16.2852 26.7674 16.543L23.0116 20.1758L19.2558 16.543C18.9845 16.2852 18.6705 16.1562 18.314 16.1562C17.9341 16.1562 17.6105 16.291 17.343 16.5605C17.0756 16.8301 16.9419 17.1562 16.9419 17.5391C16.9419 17.9375 17.0814 18.2695 17.3605 18.5352L22.0698 23.082C22.3256 23.3398 22.6395 23.4688 23.0116 23.4688Z" fill="white"/>
|
|
55
|
-
</g>
|
|
56
|
-
<defs>
|
|
57
|
-
<filter id="filter0_bd_179_6145" x="-36" y="-40" width="118" height="118" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
58
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
59
|
-
<feGaussianBlur in="BackgroundImageFix" stdDeviation="20"/>
|
|
60
|
-
<feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_179_6145"/>
|
|
61
|
-
<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"/>
|
|
62
|
-
<feOffset dy="4"/>
|
|
63
|
-
<feGaussianBlur stdDeviation="2"/>
|
|
64
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
65
|
-
<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"/>
|
|
66
|
-
<feBlend mode="normal" in2="effect1_backgroundBlur_179_6145" result="effect2_dropShadow_179_6145"/>
|
|
67
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_179_6145" result="shape"/>
|
|
68
|
-
</filter>
|
|
69
|
-
<filter id="filter1_d_179_6145" x="11" y="10" width="24" height="22" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
70
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
71
|
-
<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"/>
|
|
72
|
-
<feOffset dy="1"/>
|
|
73
|
-
<feGaussianBlur stdDeviation="1"/>
|
|
74
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
75
|
-
<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"/>
|
|
76
|
-
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_179_6145"/>
|
|
77
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_179_6145" result="shape"/>
|
|
78
|
-
</filter>
|
|
79
|
-
<linearGradient id="paint0_linear_179_6145" x1="49.2869" y1="15.1911" x2="36.3103" y2="15.603" gradientUnits="userSpaceOnUse">
|
|
80
|
-
<stop stop-color="white"/>
|
|
81
|
-
<stop offset="1" stop-color="#EFEFEF" stop-opacity="0"/>
|
|
82
|
-
</linearGradient>
|
|
83
|
-
<linearGradient id="paint1_linear_179_6145" x1="4" y1="0" x2="19.3776" y2="8.17396" gradientUnits="userSpaceOnUse">
|
|
84
|
-
<stop stop-color="white" stop-opacity="0.5"/>
|
|
85
|
-
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
|
86
|
-
</linearGradient>
|
|
87
|
-
<linearGradient id="paint2_linear_179_6145" x1="42" y1="38" x2="27.0558" y2="34.3156" gradientUnits="userSpaceOnUse">
|
|
88
|
-
<stop stop-color="white" stop-opacity="0.5"/>
|
|
89
|
-
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
|
90
|
-
</linearGradient>
|
|
91
|
-
</defs>
|
|
92
|
-
</svg>
|
|
93
|
-
`;
|
|
94
|
-
|
|
95
|
-
const avaliableFalseSvg = `<svg width="46" height="46" viewBox="0 0 46 46" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
96
|
-
<g filter="url(#filter0_bd_183_6497)">
|
|
97
|
-
<circle cx="23" cy="19" r="19" style="fill: var(--emfe-w-elevate-avaliable-button-disabled-color, #B7B7B7);" />
|
|
98
|
-
<circle cx="23" cy="19" r="18" stroke="url(#paint0_linear_183_6497)" stroke-opacity="0.6" stroke-width="2"/>
|
|
99
|
-
<circle cx="23" cy="19" r="18" stroke="url(#paint1_linear_183_6497)" stroke-width="2"/>
|
|
100
|
-
<circle cx="23" cy="19" r="18" stroke="url(#paint2_linear_183_6497)" stroke-width="2"/>
|
|
101
|
-
</g>
|
|
102
|
-
<g filter="url(#filter1_d_183_6497)">
|
|
103
|
-
<path d="M31.1977 11C31.7015 11 32.1279 11.1777 32.4767 11.5332C32.8256 11.8887 33 12.3203 33 12.8281V18.9102C33 20.2852 32.7364 21.5977 32.2093 22.8477C31.6822 24.0977 30.9748 25.1719 30.0872 26.0703C29.1996 26.9688 28.1376 27.6816 26.9012 28.209C25.6647 28.7363 24.3682 29 23.0116 29C21.6473 29 20.3469 28.7363 19.1105 28.209C17.874 27.6816 16.8101 26.9688 15.9186 26.0703C15.0271 25.1719 14.3178 24.0977 13.7907 22.8477C13.2636 21.5977 13 20.2852 13 18.9102V12.8281C13 12.3281 13.1783 11.8984 13.5349 11.5391C13.8915 11.1797 14.3178 11 14.814 11H31.1977ZM23.0116 23.4688C23.376 23.4688 23.6938 23.3398 23.9651 23.082L28.6628 18.5352C28.9496 18.2617 29.093 17.9297 29.093 17.5391C29.093 17.1562 28.9593 16.8301 28.6919 16.5605C28.4244 16.291 28.1008 16.1562 27.7209 16.1562C27.3566 16.1562 27.0388 16.2852 26.7674 16.543L23.0116 20.1758L19.2558 16.543C18.9845 16.2852 18.6705 16.1562 18.314 16.1562C17.9341 16.1562 17.6105 16.291 17.343 16.5605C17.0756 16.8301 16.9419 17.1562 16.9419 17.5391C16.9419 17.9375 17.0814 18.2695 17.3605 18.5352L22.0698 23.082C22.3256 23.3398 22.6395 23.4688 23.0116 23.4688Z" fill="#F0F0F0"/>
|
|
104
|
-
</g>
|
|
105
|
-
<defs>
|
|
106
|
-
<filter id="filter0_bd_183_6497" x="-36" y="-40" width="118" height="118" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
107
|
-
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
108
|
-
<feGaussianBlur in="BackgroundImageFix" stdDeviation="20"/>
|
|
109
|
-
<feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_183_6497"/>
|
|
110
|
-
<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"/>
|
|
111
|
-
<feOffset dy="4"/>
|
|
112
|
-
<feGaussianBlur stdDeviation="2"/>
|
|
113
|
-
<feComposite in2="hardAlpha" operator="out"/>
|
|
114
|
-
<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"/>
|
|
115
|
-
<feBlend mode="normal" in2="effect1_backgroundBlur_183_6497" result="effect2_dropShadow_183_6497"/>
|
|
116
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_183_6497" result="shape"/>
|
|
117
|
-
</filter>
|
|
118
|
-
<filter id="filter1_d_183_6497" x="11" y="10" width="24" height="22" 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 dy="1"/>
|
|
122
|
-
<feGaussianBlur stdDeviation="1"/>
|
|
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_183_6497"/>
|
|
126
|
-
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_183_6497" result="shape"/>
|
|
127
|
-
</filter>
|
|
128
|
-
<linearGradient id="paint0_linear_183_6497" x1="49.2869" y1="15.1911" x2="36.3103" y2="15.603" gradientUnits="userSpaceOnUse">
|
|
129
|
-
<stop stop-color="white"/>
|
|
130
|
-
<stop offset="1" stop-color="#EFEFEF" stop-opacity="0"/>
|
|
131
|
-
</linearGradient>
|
|
132
|
-
<linearGradient id="paint1_linear_183_6497" x1="4" y1="0" x2="19.3776" y2="8.17396" gradientUnits="userSpaceOnUse">
|
|
133
|
-
<stop stop-color="white" stop-opacity="0.5"/>
|
|
134
|
-
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
|
135
|
-
</linearGradient>
|
|
136
|
-
<linearGradient id="paint2_linear_183_6497" x1="42" y1="38" x2="27.0558" y2="34.3156" gradientUnits="userSpaceOnUse">
|
|
137
|
-
<stop stop-color="white" stop-opacity="0.5"/>
|
|
138
|
-
<stop offset="1" stop-color="white" stop-opacity="0"/>
|
|
139
|
-
</linearGradient>
|
|
140
|
-
</defs>
|
|
141
|
-
</svg>
|
|
142
|
-
`;
|
|
46
|
+
const avaliableTrueSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNDYiIHZpZXdCb3g9IjAgMCA0NiA0NiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3Zn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DE9IjQyIiB5MT0iMzgiIHgyPSIyNy4wNTU4IiB5Mj0iMzQuMzE1NiIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgo8c3RvcCBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwLjUiLz4KPHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSJ3aGl0ZSIgc3RvcC1vcGFjaXR5PSIwIi8+CjwvbGluZWFyR3JhZGllbnQ+CjwvZGVmcz4KPC9zdmc+Cg==';
|
|
143
49
|
|
|
144
50
|
const getStatusData = (gift, redeem) => {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
51
|
+
switch (gift.available) {
|
|
52
|
+
case "true":
|
|
53
|
+
return {
|
|
54
|
+
extraClass: ' active',
|
|
55
|
+
onClick: () => redeem(gift.id),
|
|
56
|
+
icon: avaliableTrueSvg
|
|
57
|
+
};
|
|
58
|
+
case "false":
|
|
59
|
+
return {
|
|
60
|
+
extraClass: ' deactive',
|
|
61
|
+
onClick: () => { },
|
|
62
|
+
icon: avaliableFalseSvg
|
|
63
|
+
};
|
|
64
|
+
}
|
|
159
65
|
};
|
|
160
66
|
const renderGifts = (gifts, locale, redeem) => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
67
|
+
return (index.h("div", { class: "Gifts FlexLayout" }, gifts.map(gift => {
|
|
68
|
+
var _a;
|
|
69
|
+
const statusData = getStatusData(gift, redeem);
|
|
70
|
+
const presentation = gift.presentation;
|
|
71
|
+
const getPropForBackgroundImage = (asset) => asset ?
|
|
72
|
+
{ backgroundImage: `url('${asset}')` } :
|
|
73
|
+
{};
|
|
74
|
+
return (index.h("div", { class: "Gift" },
|
|
75
|
+
index.h("div", { class: "ImgContainer", onClick: () => window.postMessage({ type: 'BEEShopImgClicked', itemId: gift.id }, window.location.href), style: Object.assign({}, getPropForBackgroundImage(((_a = presentation.assets) === null || _a === void 0 ? void 0 : _a.length) > 0 ? presentation.assets[0] : '')) }),
|
|
76
|
+
index.h("div", { class: "InfoContainer" },
|
|
77
|
+
index.h("div", null,
|
|
78
|
+
index.h("div", { class: "Point" },
|
|
79
|
+
gift.points,
|
|
80
|
+
" ",
|
|
81
|
+
gift.points === 1 ? locale.Point : locale.Points),
|
|
82
|
+
index.h("div", { class: "Title" }, (presentation === null || presentation === void 0 ? void 0 : presentation.displayName) || gift.displayName),
|
|
83
|
+
index.h("div", { class: "Description" }, (presentation === null || presentation === void 0 ? void 0 : presentation.description) || '')),
|
|
84
|
+
index.h("div", { class: "AvaliableWrap" + statusData.extraClass, onClick: () => statusData.onClick() },
|
|
85
|
+
index.h("span", { innerHTML: statusData.icon })))));
|
|
86
|
+
})));
|
|
181
87
|
};
|
|
182
88
|
|
|
183
|
-
var
|
|
89
|
+
var GeneralAnimationLoadingCczQRHih = {};
|
|
184
90
|
|
|
185
|
-
function
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
exports: {},
|
|
189
|
-
require: function (path, base) {
|
|
190
|
-
return commonjsRequire();
|
|
191
|
-
}
|
|
192
|
-
}, fn(module, module.exports), module.exports;
|
|
193
|
-
}
|
|
91
|
+
(function (exports) {
|
|
92
|
+
var V=Object.defineProperty,z=Object.defineProperties;var F=Object.getOwnPropertyDescriptors;var N=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable;var x=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t)=>{for(var n in t||(t={}))G.call(t,n)&&x(e,n,t[n]);if(N)for(var n of N(t))q.call(t,n)&&x(e,n,t[n]);return e},M=(e,t)=>z(e,F(t));var $=(e,t,n)=>x(e,typeof t!="symbol"?t+"":t,n);var T=(e,t,n)=>new Promise((s,l)=>{var i=o=>{try{u(n.next(o));}catch(r){l(r);}},c=o=>{try{u(n.throw(o));}catch(r){l(r);}},u=o=>o.done?s(o.value):Promise.resolve(o.value).then(i,c);u((n=n.apply(e,t)).next());});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function _(){}function H(e){return e()}function B(){return Object.create(null)}function b(e){e.forEach(H);}function I(e){return typeof e=="function"}function K(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Q(e){return Object.keys(e).length===0}function W(e,t){e.appendChild(t);}function X(e,t,n){const s=Y(e);if(!s.getElementById(t)){const l=L("style");l.id=t,l.textContent=n,Z(s,l);}}function Y(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Z(e,t){return W(e.head||e,t),t.sheet}function U(e,t,n){e.insertBefore(t,n||null);}function C(e){e.parentNode&&e.parentNode.removeChild(e);}function L(e){return document.createElement(e)}function tt(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n);}function et(e){return Array.from(e.childNodes)}function nt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0;}),t}let j;function g(e){j=e;}const h=[],k=[];let p=[];const R=[],it=Promise.resolve();let v=!1;function st(){v||(v=!0,it.then(y));}function E(e){p.push(e);}const w=new Set;let a=0;function y(){if(a!==0)return;const e=j;do{try{for(;a<h.length;){const t=h[a];a++,g(t),rt(t.$$);}}catch(t){throw h.length=0,a=0,t}for(g(null),h.length=0,a=0;k.length;)k.pop()();for(let t=0;t<p.length;t+=1){const n=p[t];w.has(n)||(w.add(n),n());}p.length=0;}while(h.length);for(;R.length;)R.pop()();v=!1,w.clear(),g(e);}function rt(e){if(e.fragment!==null){e.update(),b(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(E);}}function lt(e){const t=[],n=[];p.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),p=t;}const ct=new Set;function ot(e,t){e&&e.i&&(ct.delete(e),e.i(t));}function ut(e,t,n){const{fragment:s,after_update:l}=e.$$;s&&s.m(t,n),E(()=>{const i=e.$$.on_mount.map(H).filter(I);e.$$.on_destroy?e.$$.on_destroy.push(...i):b(i),e.$$.on_mount=[];}),l.forEach(E);}function dt(e,t){const n=e.$$;n.fragment!==null&&(lt(n.after_update),b(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[]);}function $t(e,t){e.$$.dirty[0]===-1&&(h.push(e),st(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31;}function ft(e,t,n,s,l,i,c=null,u=[-1]){const o=j;g(e);const r=e.$$={fragment:null,ctx:[],props:i,update:_,not_equal:l,bound:B(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(o?o.$$.context:[])),callbacks:B(),dirty:u,skip_bound:!1,root:t.target||o.$$.root};c&&c(r.root);let f=!1;if(r.ctx=n?n(e,t.props||{},(d,O,...S)=>{const A=S.length?S[0]:O;return r.ctx&&l(r.ctx[d],r.ctx[d]=A)&&(!r.skip_bound&&r.bound[d]&&r.bound[d](A),f&&$t(e,d)),O}):[],r.update(),f=!0,b(r.before_update),r.fragment=s?s(r.ctx):!1,t.target){if(t.hydrate){const d=et(t.target);r.fragment&&r.fragment.l(d),d.forEach(C);}else r.fragment&&r.fragment.c();t.intro&&ot(e.$$.fragment),ut(e,t.target,t.anchor),y();}g(o);}let D;typeof HTMLElement=="function"&&(D=class extends HTMLElement{constructor(t,n,s){super();$(this,"$$ctor");$(this,"$$s");$(this,"$$c");$(this,"$$cn",!1);$(this,"$$d",{});$(this,"$$r",!1);$(this,"$$p_d",{});$(this,"$$l",{});$(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,s&&this.attachShadow({mode:"open"});}addEventListener(t,n,s){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const l=this.$$c.$on(t,n);this.$$l_u.set(n,l);}super.addEventListener(t,n,s);}removeEventListener(t,n,s){if(super.removeEventListener(t,n,s),this.$$c){const l=this.$$l_u.get(n);l&&(l(),this.$$l_u.delete(n));}}connectedCallback(){return T(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return ()=>{let c;return {c:function(){c=L("slot"),i!=="default"&&tt(c,"name",i);},m:function(r,f){U(r,c,f);},d:function(r){r&&C(c);}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=nt(this);for(const i of this.$$s)i in s&&(n[i]=[t(i)]);for(const i of this.attributes){const c=this.$$g_p(i.name);c in this.$$d||(this.$$d[c]=m(c,i.value,this.$$p_d,"toProp"));}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:M(P({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const l=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const c=m(i,this.$$d[i],this.$$p_d,"toAttribute");c==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,c);}this.$$r=!1;};this.$$c.$$.after_update.push(l),l();for(const i in this.$$l)for(const c of this.$$l[i]){const u=this.$$c.$on(i,c);this.$$l_u.set(c,u);}this.$$l={};}})}attributeChangedCallback(t,n,s){var l;this.$$r||(t=this.$$g_p(t),this.$$d[t]=m(t,s,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[t]:this.$$d[t]}));}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0);});}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function m(e,t,n,s){var i;const l=(i=n[e])==null?void 0:i.type;if(t=l==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[e])return t;if(s==="toAttribute")switch(l){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(l){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function at(e,t,n,s,l,i){let c=class extends D{constructor(){super(e,n,l),this.$$p_d=t;}static get observedAttributes(){return Object.keys(t).map(u=>(t[u].attribute||u).toLowerCase())}};return Object.keys(t).forEach(u=>{Object.defineProperty(c.prototype,u,{get(){return this.$$c&&u in this.$$c?this.$$c[u]:this.$$d[u]},set(o){var r;o=m(u,o,t),this.$$d[u]=o,(r=this.$$c)==null||r.$set({[u]:o});}});}),s.forEach(u=>{Object.defineProperty(c.prototype,u,{get(){var o;return (o=this.$$c)==null?void 0:o[u]}});}),e.element=c,c}class ht{constructor(){$(this,"$$");$(this,"$$set");}$destroy(){dt(this,1),this.$destroy=_;}$on(t,n){if(!I(n))return _;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const l=s.indexOf(n);l!==-1&&s.splice(l,1);}}$set(t){this.$$set&&!Q(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}}const _t="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(_t);function pt(e){X(e,"svelte-gnt082",".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}");}function gt(e){let t;return {c(){t=L("div"),t.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>';},m(n,s){U(n,t,s),e[3](t);},p:_,i:_,o:_,d(n){n&&C(t),e[3](null);}}}function mt(e,t,n){let{clientstyling:s=""}=t,{clientstylingurl:l=""}=t,i;const c=()=>{let r=document.createElement("style");r.innerHTML=s,i.appendChild(r);},u=()=>{let r=new URL(l),f=document.createElement("style");fetch(r.href).then(d=>d.text()).then(d=>{f.innerHTML=d,setTimeout(()=>{i.appendChild(f);},1),setTimeout(()=>{},500);});};function o(r){k[r?"unshift":"push"](()=>{i=r,n(0,i);});}return e.$$set=r=>{"clientstyling"in r&&n(1,s=r.clientstyling),"clientstylingurl"in r&&n(2,l=r.clientstylingurl);},e.$$.update=()=>{e.$$.dirty&3&&s&&i&&c(),e.$$.dirty&5&&l&&i&&u();},[i,s,l,o]}class J extends ht{constructor(t){super(),ft(this,t,mt,gt,K,{clientstyling:1,clientstylingurl:2},pt);}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),y();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),y();}}at(J,{clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=J;
|
|
93
|
+
}(GeneralAnimationLoadingCczQRHih));
|
|
194
94
|
|
|
195
|
-
function
|
|
196
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
197
|
-
}
|
|
95
|
+
if(typeof window!="undefined"){let n=function(t){return function(...i){try{return t.apply(this,i)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return !1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>GeneralAnimationLoadingCczQRHih).then(({default:t})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",t.element);});}
|
|
198
96
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
// flush() calls callbacks in this order:
|
|
202
|
-
// 1. All beforeUpdate callbacks, in order: parents before children
|
|
203
|
-
// 2. All bind:this callbacks, in reverse order: children before parents.
|
|
204
|
-
// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT
|
|
205
|
-
// for afterUpdates called during the initial onMount, which are called in
|
|
206
|
-
// reverse order: children before parents.
|
|
207
|
-
// Since callbacks might update component values, which could trigger another
|
|
208
|
-
// call to flush(), the following steps guard against this:
|
|
209
|
-
// 1. During beforeUpdate, any updated components will be added to the
|
|
210
|
-
// dirty_components array and will cause a reentrant call to flush(). Because
|
|
211
|
-
// the flush index is kept outside the function, the reentrant call will pick
|
|
212
|
-
// up where the earlier call left off and go through all dirty components. The
|
|
213
|
-
// current_component value is saved and restored so that the reentrant call will
|
|
214
|
-
// not interfere with the "parent" flush() call.
|
|
215
|
-
// 2. bind:this callbacks cannot trigger new flush() calls.
|
|
216
|
-
// 3. During afterUpdate, any updated components will NOT have their afterUpdate
|
|
217
|
-
// callback called a second time; the seen_callbacks set, outside the flush()
|
|
218
|
-
// function, guarantees this behavior.
|
|
219
|
-
const y=new Set;let b=0;// Do *not* move this inside the flush() function
|
|
220
|
-
function x(){
|
|
221
|
-
// Do not reenter flush while dirty components are updated, as this can
|
|
222
|
-
// result in an infinite loop. Instead, let the inner flush handle it.
|
|
223
|
-
// Reentrancy is ok afterwards for bindings etc.
|
|
224
|
-
if(0!==b)return;const t=a;do{
|
|
225
|
-
// first, call beforeUpdate functions
|
|
226
|
-
// and update components
|
|
227
|
-
try{for(;b<u.length;){const t=u[b];b++,d(t),v(t.$$);}}catch(t){
|
|
228
|
-
// reset dirty state to not end up in a deadlocked state and then rethrow
|
|
229
|
-
throw u.length=0,b=0,t}for(d(null),u.length=0,b=0;f.length;)f.pop()();
|
|
230
|
-
// then, once components are updated, call
|
|
231
|
-
// afterUpdate functions. This may cause
|
|
232
|
-
// subsequent updates...
|
|
233
|
-
for(let t=0;t<p.length;t+=1){const e=p[t];y.has(e)||(
|
|
234
|
-
// ...so guard against infinite loops
|
|
235
|
-
y.add(e),e());}p.length=0;}while(u.length);for(;h.length;)h.pop()();m=!1,y.clear(),d(t);}function v(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(g);}}
|
|
236
|
-
/**
|
|
237
|
-
* Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.
|
|
238
|
-
*/const _=new Set;function k(t,e){const n=t.$$;null!==n.fragment&&(!function(t){const e=[],n=[];p.forEach((i=>-1===t.indexOf(i)?e.push(i):n.push(i))),n.forEach((t=>t())),p=e;}(n.after_update),i(n.on_destroy),n.fragment&&n.fragment.d(e),
|
|
239
|
-
// TODO null out other refs, including component.$$ (but need to
|
|
240
|
-
// preserve final state?)
|
|
241
|
-
n.on_destroy=n.fragment=null,n.ctx=[]);}function E(t,e){-1===t.$$.dirty[0]&&(u.push(t),m||(m=!0,$.then(x)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31;}function C(o,l,c,u,f,p,h,$=[-1]){const m=a;d(o);const y=o.$$={fragment:null,ctx:[],
|
|
242
|
-
// state
|
|
243
|
-
props:p,update:t,not_equal:f,bound:n(),
|
|
244
|
-
// lifecycle
|
|
245
|
-
on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(l.context||(m?m.$$.context:[])),
|
|
246
|
-
// everything else
|
|
247
|
-
callbacks:n(),dirty:$,skip_bound:!1,root:l.target||m.$$.root};h&&h(y.root);let b=!1;if(y.ctx=c?c(o,l.props||{},((t,e,...n)=>{const i=n.length?n[0]:e;return y.ctx&&f(y.ctx[t],y.ctx[t]=i)&&(!y.skip_bound&&y.bound[t]&&y.bound[t](i),b&&E(o,t)),e})):[],y.update(),b=!0,i(y.before_update),
|
|
248
|
-
// `false` as a special case of no DOM component
|
|
249
|
-
y.fragment=!!u&&u(y.ctx),l.target){if(l.hydrate){const t=function(t){return Array.from(t.childNodes)}(l.target);
|
|
250
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
251
|
-
y.fragment&&y.fragment.l(t),t.forEach(r);}else
|
|
252
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
253
|
-
y.fragment&&y.fragment.c();l.intro&&((v=o.$$.fragment)&&v.i&&(_.delete(v),v.i(k))),function(t,n,o,l){const{fragment:r,after_update:c}=t.$$;r&&r.m(n,o),l||
|
|
254
|
-
// onMount happens before the initial afterUpdate
|
|
255
|
-
g((()=>{const n=t.$$.on_mount.map(e).filter(s);
|
|
256
|
-
// if the component was destroyed immediately
|
|
257
|
-
// it will update the `$$.on_destroy` reference to `null`.
|
|
258
|
-
// the destructured on_destroy may still reference to the old array
|
|
259
|
-
t.$$.on_destroy?t.$$.on_destroy.push(...n):
|
|
260
|
-
// Edge case - component was destroyed immediately,
|
|
261
|
-
// most likely as a result of a binding initialising
|
|
262
|
-
i(n),t.$$.on_mount=[];})),c.forEach(g);}(o,l.target,l.anchor,l.customElement),x();}var v,k;d(m);}let w;
|
|
263
|
-
/* src/GeneralAnimationLoading.svelte generated by Svelte v3.59.2 */
|
|
264
|
-
function L(e){let n;return {c(){var e;e="div",n=document.createElement(e),n.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=t;},m(t,i){l(t,n,i),
|
|
265
|
-
/*div5_binding*/e[3](n);},p:t,i:t,o:t,d(t){t&&r(n)
|
|
266
|
-
/*div5_binding*/,e[3](null);}}}function T(t,e,n){let i,{clientstyling:s=""}=e,{clientstylingurl:o=""}=e;return t.$$set=t=>{"clientstyling"in t&&n(1,s=t.clientstyling),"clientstylingurl"in t&&n(2,o=t.clientstylingurl);},t.$$.update=()=>{/*clientstyling, customStylingContainer*/3&t.$$.dirty&&s&&i&&(()=>{let t=document.createElement("style");t.innerHTML=s,i.appendChild(t);})(),/*clientstylingurl, customStylingContainer*/5&t.$$.dirty&&o&&i&&(()=>{let t=new URL(o),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{i.appendChild(e);}),1),setTimeout((()=>{}),500);}));})();},[i,s,o,function(t){f[t?"unshift":"push"]((()=>{i=t,n(0,i);}));}]}"function"==typeof HTMLElement&&(w=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(s);
|
|
267
|
-
// @ts-ignore todo: improve typings
|
|
268
|
-
for(const t in this.$$.slotted)
|
|
269
|
-
// @ts-ignore todo: improve typings
|
|
270
|
-
this.appendChild(this.$$.slotted[t]);}attributeChangedCallback(t,e,n){this[t]=n;}disconnectedCallback(){i(this.$$.on_disconnect);}$destroy(){k(this,1),this.$destroy=t;}$on(e,n){
|
|
271
|
-
// TODO should this delegate to addEventListener?
|
|
272
|
-
if(!s(n))return t;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1);}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1);}});class M extends w{constructor(t){super();const e=document.createElement("style");e.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(e),C(this,{target:this.shadowRoot,props:c(this.attributes),customElement:!0},T,L,o,{clientstyling:1,clientstylingurl:2},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),x()));}static get observedAttributes(){return ["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(t){this.$$set({clientstyling:t}),x();}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),x();}}return !customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",M),M}));
|
|
273
|
-
//# sourceMappingURL=general-animation-loading.js.map
|
|
274
|
-
});
|
|
275
|
-
|
|
276
|
-
const bonusElevateShopCss = ":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emfe-w-color-black-150, #A7A7A733);border-radius:11px;background:var(--emfe-w-color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emfe-w-color-black-200, #00000040);cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emfe-w-color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emfe-w-elevate-avaliable-button-size, 46px)}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
|
|
97
|
+
const bonusElevateShopCss = ":host{display:block}svg circle{shape-rendering:crispEdges}.MainContainer{max-width:420px}.MainContainer player-elevate-pointcard{width:100%;height:220px}.Gifts{display:flex;justify-content:space-between;padding:15px;padding-left:-8px;padding-right:-8px;flex:0 0 45.1282051282%;flex-wrap:wrap;justify-content:flex-start;background:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black-150, #000000);font-weight:500;gap:10px;margin-top:-100px;position:relative;min-height:200px}.InfoContainer{display:flex;margin-top:17px;justify-content:space-between}.Gift{display:block;margin-bottom:10px;padding:8px;box-shadow:0px 18px 45px 0px var(--emfe-w-color-black-150, rgba(167, 167, 167, 0.2));border-radius:11px;background:var(--emfe-w-color-white, #FFFFFF)}.Gift .ImgContainer{width:160px;height:107px;border-radius:11px;box-shadow:0px 2px 6px 0px var(--emfe-w-color-black-200, rgba(0, 0, 0, 0.2509803922));cursor:pointer;background-size:cover;background-position:center center;background-repeat:no-repeat}.Gift .Point{font-size:20px}.Gift .Title,.Gift .Description{padding-left:3px}.Gift .Title{font-size:14px;margin-top:10px}.Gift .Description{font-size:12px;color:var(--emfe-w-color-black-100, #767171)}.Gift .AvaliableWrap{align-self:self-end}.Gift .AvaliableWrap.active{cursor:pointer}.Gift .AvaliableWrap.deactive{cursor:not-allowed}.Gift .AvaliableWrap span svg{width:var(--emfe-w-elevate-avaliable-button-size, 46px)}.NoContent{font-size:16px;color:var(--emfe-w-color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";
|
|
98
|
+
const BonusElevateShopStyle0 = bonusElevateShopCss;
|
|
277
99
|
|
|
278
100
|
const BonusElevateShop = class {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
async componentDidLoad() {
|
|
361
|
-
this.updateGifts();
|
|
362
|
-
window.addEventListener('message', this.bindedHandler, false);
|
|
363
|
-
}
|
|
364
|
-
static get assetsDirs() { return ["static"]; }
|
|
365
|
-
static get watchers() { return {
|
|
366
|
-
"endpoint": ["updateGifts"],
|
|
367
|
-
"language": ["updateGifts"],
|
|
368
|
-
"session": ["updateGifts"]
|
|
369
|
-
}; }
|
|
101
|
+
constructor(hostRef) {
|
|
102
|
+
index.registerInstance(this, hostRef);
|
|
103
|
+
this.redeemGiftButton = index.createEvent(this, "redeemGiftButton", 7);
|
|
104
|
+
this.bindedHandler = this.handleMessage.bind(this);
|
|
105
|
+
this.session = undefined;
|
|
106
|
+
this.endpoint = undefined;
|
|
107
|
+
this.language = 'en';
|
|
108
|
+
this.clientStyling = '';
|
|
109
|
+
this.clientStylingUrl = '';
|
|
110
|
+
this.translationUrl = '';
|
|
111
|
+
this.locale = translation['en'];
|
|
112
|
+
this.gifts = [];
|
|
113
|
+
this.isLoading = true;
|
|
114
|
+
}
|
|
115
|
+
async updateGifts() {
|
|
116
|
+
this.isLoading = true;
|
|
117
|
+
if (this.session) {
|
|
118
|
+
const res = await fetchNorwayApi.bind(this, '/v1/elevate/shop', {}).call();
|
|
119
|
+
this.gifts = res.data || [];
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
this.gifts = [];
|
|
123
|
+
}
|
|
124
|
+
this.isLoading = false;
|
|
125
|
+
}
|
|
126
|
+
redeemGiftConfirm(id) {
|
|
127
|
+
const shopItem = this.gifts.filter((gift) => {
|
|
128
|
+
return gift.id === id;
|
|
129
|
+
})[0];
|
|
130
|
+
window.postMessage({ type: 'BEERedeemConfirm', shopItem }, window.location.href);
|
|
131
|
+
}
|
|
132
|
+
disconnectedCallback() {
|
|
133
|
+
window.removeEventListener('message', this.bindedHandler, false);
|
|
134
|
+
}
|
|
135
|
+
async redeemGift(id) {
|
|
136
|
+
const res = await fetchNorwayApi.bind(this, '/v1/elevate/redeem', {}, {
|
|
137
|
+
method: 'PUT',
|
|
138
|
+
body: JSON.stringify({ giftID: id }),
|
|
139
|
+
headers: {
|
|
140
|
+
'Content-Type': 'application/json-patch+json',
|
|
141
|
+
}
|
|
142
|
+
}).call();
|
|
143
|
+
if (res.success) {
|
|
144
|
+
this.redeemGiftButton.emit();
|
|
145
|
+
window.postMessage({ type: 'BEEGiftRedeem', itemId: id }, window.location.href);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
window.postMessage({ type: 'BEEGiftRedeemFailed', itemId: id, err: res }, window.location.href);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
loadGifts(renderer) {
|
|
152
|
+
if (this.isLoading) {
|
|
153
|
+
return index.h("general-animation-loading", null);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
if (this.gifts.length === 0) {
|
|
157
|
+
return (index.h("div", { class: "NoContent" }, this.locale.noContent));
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
return renderer();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
render() {
|
|
165
|
+
return (index.h("main", { key: 'd659585662c983efd2eeb69a3880ec8328ad8351', class: "MainContainer" }, index.h("general-styling-wrapper", { key: 'a9b2650455ecd27849e55553eb1679dddce7b7cd', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: translation, translationUrl: this.translationUrl }), index.h("player-elevate-pointcard", { key: 'f042fb5c3fcb5d5c03059507a1201d1e56dfd5d4', endpoint: this.endpoint, session: this.session, language: this.language, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), this.loadGifts(renderGifts.bind(this, this.gifts, this.locale, this.redeemGiftConfirm.bind(this)))));
|
|
166
|
+
}
|
|
167
|
+
handleMessage(message) {
|
|
168
|
+
if (message.data.type === "bee-redeem-confirmed" && message.data.id) {
|
|
169
|
+
this.redeemGift(message.data.id);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
async componentDidLoad() {
|
|
173
|
+
this.updateGifts();
|
|
174
|
+
window.addEventListener('message', this.bindedHandler, false);
|
|
175
|
+
}
|
|
176
|
+
static get assetsDirs() { return ["static"]; }
|
|
177
|
+
static get watchers() { return {
|
|
178
|
+
"endpoint": ["updateGifts"],
|
|
179
|
+
"language": ["updateGifts"],
|
|
180
|
+
"session": ["updateGifts"]
|
|
181
|
+
}; }
|
|
370
182
|
};
|
|
371
|
-
BonusElevateShop.style =
|
|
183
|
+
BonusElevateShop.style = BonusElevateShopStyle0;
|
|
372
184
|
|
|
373
185
|
const mergeTranslations = (url, target) => {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
186
|
+
return new Promise((resolve) => {
|
|
187
|
+
fetch(url)
|
|
188
|
+
.then((res) => res.json())
|
|
189
|
+
.then((data) => {
|
|
190
|
+
Object.keys(data).forEach((item) => {
|
|
191
|
+
target[item] = target[item] ? target[item] : {};
|
|
192
|
+
for (let key in data[item]) {
|
|
193
|
+
target[item][key] = data[item][key];
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
resolve(true);
|
|
197
|
+
});
|
|
385
198
|
});
|
|
386
|
-
});
|
|
387
199
|
};
|
|
388
200
|
|
|
389
201
|
const generalStylingWrapperCss = ":host{display:block}";
|
|
202
|
+
const GeneralStylingWrapperStyle0 = generalStylingWrapperCss;
|
|
390
203
|
|
|
391
204
|
const GeneralStylingWrapper = class {
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
.
|
|
417
|
-
.
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
promises.push(translationPromise);
|
|
444
|
-
}
|
|
445
|
-
return await Promise.all(promises);
|
|
446
|
-
}
|
|
447
|
-
render() {
|
|
448
|
-
return (index.h("div", { class: "StyleShell" }, index.h("slot", { name: "mainContent" })));
|
|
449
|
-
}
|
|
450
|
-
get el() { return index.getElement(this); }
|
|
205
|
+
constructor(hostRef) {
|
|
206
|
+
index.registerInstance(this, hostRef);
|
|
207
|
+
this.stylingAppends = false;
|
|
208
|
+
this.setClientStyling = () => {
|
|
209
|
+
let sheet = document.createElement('style');
|
|
210
|
+
sheet.innerHTML = this.clientStyling;
|
|
211
|
+
this.el.prepend(sheet);
|
|
212
|
+
};
|
|
213
|
+
this.setClientStylingURL = () => {
|
|
214
|
+
let url = new URL(this.clientStylingUrl);
|
|
215
|
+
let cssFile = document.createElement('style');
|
|
216
|
+
fetch(url.href)
|
|
217
|
+
.then((res) => res.text())
|
|
218
|
+
.then((data) => {
|
|
219
|
+
cssFile.innerHTML = data;
|
|
220
|
+
setTimeout(() => {
|
|
221
|
+
this.el.prepend(cssFile);
|
|
222
|
+
}, 1);
|
|
223
|
+
})
|
|
224
|
+
.catch((err) => {
|
|
225
|
+
console.log('error ', err);
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
this.clientStyling = '';
|
|
229
|
+
this.clientStylingUrl = '';
|
|
230
|
+
this.translationUrl = '';
|
|
231
|
+
this.targetTranslations = undefined;
|
|
232
|
+
}
|
|
233
|
+
componentDidRender() {
|
|
234
|
+
// start custom styling area
|
|
235
|
+
if (!this.stylingAppends) {
|
|
236
|
+
if (this.clientStyling)
|
|
237
|
+
this.setClientStyling();
|
|
238
|
+
if (this.clientStylingUrl)
|
|
239
|
+
this.setClientStylingURL();
|
|
240
|
+
this.stylingAppends = true;
|
|
241
|
+
}
|
|
242
|
+
// end custom styling area
|
|
243
|
+
}
|
|
244
|
+
async componentWillLoad() {
|
|
245
|
+
const promises = [];
|
|
246
|
+
if (this.translationUrl) {
|
|
247
|
+
const translationPromise = mergeTranslations(this.translationUrl, this.targetTranslations);
|
|
248
|
+
promises.push(translationPromise);
|
|
249
|
+
}
|
|
250
|
+
return await Promise.all(promises);
|
|
251
|
+
}
|
|
252
|
+
render() {
|
|
253
|
+
return (index.h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, index.h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
|
|
254
|
+
}
|
|
255
|
+
get el() { return index.getElement(this); }
|
|
451
256
|
};
|
|
452
|
-
GeneralStylingWrapper.style =
|
|
257
|
+
GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
|
|
453
258
|
|
|
454
259
|
/**
|
|
455
260
|
* @name startOfDay
|
|
@@ -636,303 +441,288 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
636
441
|
}
|
|
637
442
|
|
|
638
443
|
function updateProgressSvg(progressElementRef, percent) {
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
444
|
+
const svgElement = progressElementRef.querySelector('#total_level');
|
|
445
|
+
const endLockWidth = 17, pointR = 6.5;
|
|
446
|
+
//Total Widget of the progress
|
|
447
|
+
const barWidth = svgElement.getBBox().width;
|
|
448
|
+
//The filled width according to current progress
|
|
449
|
+
const levelPercent = percent > 1 ? 1 : percent;
|
|
450
|
+
const widthOnBar = (levelPercent * barWidth - endLockWidth) < 0 ? 0 : levelPercent * barWidth - endLockWidth;
|
|
451
|
+
//update bar's width, widthOnBar
|
|
452
|
+
const levelBar = progressElementRef.querySelector('#current_level');
|
|
453
|
+
//update filters, x = widthOnBar
|
|
454
|
+
const levelFilter = progressElementRef.querySelector('#filter_current_level');
|
|
455
|
+
//update circle, widthOnBar+10
|
|
456
|
+
const levelCircle = progressElementRef.querySelector('#circle_current_level');
|
|
457
|
+
svgElement.setAttribute('viewbox', `0 0 ${widthOnBar} 28`);
|
|
458
|
+
levelBar.setAttribute('width', `${widthOnBar}`);
|
|
459
|
+
levelCircle.setAttribute('cx', `${(widthOnBar < pointR ? pointR : widthOnBar)}`);
|
|
460
|
+
levelFilter.setAttribute('x', `${widthOnBar - 8}`);
|
|
461
|
+
//update lock location
|
|
462
|
+
const endLockElement = progressElementRef.querySelector('#lock');
|
|
463
|
+
// wrapper of endLock, include ball and heatfilter1_d_305_23
|
|
464
|
+
const filter1 = progressElementRef.querySelector('#filter_heart_ball');
|
|
465
|
+
// ball in endlockfilter2_i_305_23
|
|
466
|
+
const filter2 = progressElementRef.querySelector('#filter_ball');
|
|
467
|
+
// heart in endlockfilter3_d_305_23
|
|
468
|
+
const filter3 = progressElementRef.querySelector('#filter_heart');
|
|
469
|
+
//wrapper of lockfilter4_d_305_23
|
|
470
|
+
const filterLock = progressElementRef.querySelector('#filter_lock');
|
|
471
|
+
// shadow of ball paint0_linear_305_23
|
|
472
|
+
const paint0 = progressElementRef.querySelector('#paint0_linear_ball');
|
|
473
|
+
//paint in lockpaint1_linear_305_23
|
|
474
|
+
const paint1 = progressElementRef.querySelector('#paint1_linear_lock');
|
|
475
|
+
// box of lock and heart, for move position dynamically
|
|
476
|
+
const lockBox = progressElementRef.querySelector('#lock_box');
|
|
477
|
+
const heartBox = progressElementRef.querySelector('#heart_box');
|
|
478
|
+
const rightPaddingOfLockWidth = 10, cxOfEndLockEle = barWidth - rightPaddingOfLockWidth;
|
|
479
|
+
//set cx of lockElement
|
|
480
|
+
endLockElement.setAttribute('cx', `${cxOfEndLockEle}`);
|
|
481
|
+
//set cx of sub Elements
|
|
482
|
+
paint1.setAttribute('x1', `${cxOfEndLockEle}`);
|
|
483
|
+
paint1.setAttribute('x2', `${cxOfEndLockEle}`);
|
|
484
|
+
paint0.setAttribute('x1', `${cxOfEndLockEle - 6}`);
|
|
485
|
+
paint0.setAttribute('x2', `${cxOfEndLockEle - 6 + 11.2}`);
|
|
486
|
+
filterLock.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
487
|
+
filter3.setAttribute('x', `${cxOfEndLockEle - 6 - 2}`);
|
|
488
|
+
filter2.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2}`);
|
|
489
|
+
filter1.setAttribute('x', `${cxOfEndLockEle - 6 - 2 - 2 - 4}`);
|
|
490
|
+
lockBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
491
|
+
heartBox.setAttribute('x', `${cxOfEndLockEle - 6}`);
|
|
492
|
+
svgElement.parentElement.style.opacity = '1';
|
|
688
493
|
}
|
|
689
494
|
|
|
690
|
-
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
|
|
495
|
+
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}";
|
|
496
|
+
const PlayerElevateCardDataStyle0 = playerElevateCardDataCss;
|
|
691
497
|
|
|
692
498
|
const PlayerElevateCardData = class {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
}
|
|
732
|
-
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
733
|
-
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
734
|
-
? -1
|
|
735
|
-
: 1;
|
|
736
|
-
});
|
|
737
|
-
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
738
|
-
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
739
|
-
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
740
|
-
if (daysToExpried == 0) {
|
|
741
|
-
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
742
|
-
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
743
|
-
}
|
|
744
|
-
pointExpireInfoAsString = playerElevateCardItems.translateWithParams(expiredTranslationKey, {
|
|
745
|
-
expirationPoints: aboutToExpire.points,
|
|
746
|
-
expireDay: daysToExpried,
|
|
747
|
-
});
|
|
748
|
-
return pointExpireInfoAsString;
|
|
749
|
-
}
|
|
750
|
-
loadPlayerLevelInfo() {
|
|
751
|
-
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
752
|
-
return new Promise((resolve, reject) => {
|
|
753
|
-
return fetch(url.href, {
|
|
754
|
-
method: 'GET',
|
|
755
|
-
headers: {
|
|
756
|
-
'X-Sessionid': this.params.session,
|
|
757
|
-
'Content-Type': 'application/json',
|
|
758
|
-
},
|
|
759
|
-
})
|
|
760
|
-
.then((res) => res.json())
|
|
761
|
-
.then((res) => {
|
|
762
|
-
var _a, _b, _c;
|
|
763
|
-
if (!res.success) {
|
|
764
|
-
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
765
|
-
reject(true);
|
|
766
|
-
return;
|
|
499
|
+
constructor(hostRef) {
|
|
500
|
+
index.registerInstance(this, hostRef);
|
|
501
|
+
this.playerElevateLeveLoaded = index.createEvent(this, "playerElevateLeveLoaded", 7);
|
|
502
|
+
this.params = undefined;
|
|
503
|
+
this.playerElevateLevel = undefined;
|
|
504
|
+
this.pointExpireString = undefined;
|
|
505
|
+
}
|
|
506
|
+
handleWindowResizs() {
|
|
507
|
+
this.initLevelProgressbar();
|
|
508
|
+
}
|
|
509
|
+
onParamsChanged() {
|
|
510
|
+
this.loadElevateInfo();
|
|
511
|
+
}
|
|
512
|
+
onRedeemClick() {
|
|
513
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
514
|
+
}
|
|
515
|
+
loadLevels() {
|
|
516
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);
|
|
517
|
+
return new Promise((resolve, reject) => {
|
|
518
|
+
return fetch(url.href, {
|
|
519
|
+
method: 'GET',
|
|
520
|
+
})
|
|
521
|
+
.then((res) => res.json())
|
|
522
|
+
.then((res) => {
|
|
523
|
+
this.levels = res.data;
|
|
524
|
+
resolve(true);
|
|
525
|
+
})
|
|
526
|
+
.catch((err) => {
|
|
527
|
+
reject(err);
|
|
528
|
+
});
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
calcuatePointsToBeExpired(walletTotalInfo) {
|
|
532
|
+
let pointExpireInfoAsString = '';
|
|
533
|
+
if (!walletTotalInfo || !walletTotalInfo.aboutToExpire ||
|
|
534
|
+
walletTotalInfo.aboutToExpire.length == 0 ||
|
|
535
|
+
walletTotalInfo.aboutToExpire[0].points <= 0) {
|
|
536
|
+
return pointExpireInfoAsString;
|
|
767
537
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
773
|
-
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
774
|
-
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
775
|
-
this.playerElevateLeveLoaded.emit({
|
|
776
|
-
elevateLevelWalletTotal: spendableTotal,
|
|
777
|
-
loyaltyWalletTotal
|
|
538
|
+
walletTotalInfo.aboutToExpire.sort((expire1, expire2) => {
|
|
539
|
+
return isBefore(new Date(expire1.expireTime), new Date(expire2.expireTime))
|
|
540
|
+
? -1
|
|
541
|
+
: 1;
|
|
778
542
|
});
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
});
|
|
543
|
+
const aboutToExpire = walletTotalInfo.aboutToExpire[0];
|
|
544
|
+
const daysToExpried = differenceInCalendarDays(new Date(aboutToExpire.expireTime), new Date());
|
|
545
|
+
let hoursToExpired = 0, expiredTranslationKey = daysToExpried === 0 ? 'pointsToBeExpiredDay' : 'pointsToBeExpired';
|
|
546
|
+
if (daysToExpried == 0) {
|
|
547
|
+
hoursToExpired = differenceInHours(new Date(aboutToExpire.expireTime), new Date());
|
|
548
|
+
expiredTranslationKey = hoursToExpired > 1 ? 'pointsToBeExpiredHours' : 'pointsToBeExpiredHour';
|
|
786
549
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
550
|
+
pointExpireInfoAsString = playerElevateCardItems.translateWithParams(expiredTranslationKey, {
|
|
551
|
+
expirationPoints: aboutToExpire.points,
|
|
552
|
+
expireDay: daysToExpried,
|
|
553
|
+
});
|
|
554
|
+
return pointExpireInfoAsString;
|
|
555
|
+
}
|
|
556
|
+
loadPlayerLevelInfo() {
|
|
557
|
+
let url = new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);
|
|
558
|
+
return new Promise((resolve, reject) => {
|
|
559
|
+
return fetch(url.href, {
|
|
560
|
+
method: 'GET',
|
|
561
|
+
headers: {
|
|
562
|
+
'X-Sessionid': this.params.session,
|
|
563
|
+
'Content-Type': 'application/json',
|
|
564
|
+
},
|
|
565
|
+
})
|
|
566
|
+
.then((res) => res.json())
|
|
567
|
+
.then((res) => {
|
|
568
|
+
var _a, _b, _c;
|
|
569
|
+
if (!res.success) {
|
|
570
|
+
console.error('Exception when fetch user elevateinfo, ', res.errorCode, res.errorMessage);
|
|
571
|
+
reject(true);
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
let playerElevateInfo = res.data;
|
|
575
|
+
this.playerElevateLevel = playerElevateInfo.level;
|
|
576
|
+
this.playerElevateLevel.name = this.playerElevateLevel.presentation.displayName || this.playerElevateLevel.name;
|
|
577
|
+
this.playerElevateLevel.spendablePoints = ((_a = playerElevateInfo.spendableWallet) === null || _a === void 0 ? void 0 : _a.total.points) || 0;
|
|
578
|
+
this.playerElevateLeveLoaded.emit({ elevateLevel: this.playerElevateLevel });
|
|
579
|
+
const spendableTotal = (_b = res.data.spendableWallet) === null || _b === void 0 ? void 0 : _b.total;
|
|
580
|
+
const loyaltyWalletTotal = (_c = res.data.loyaltyWallet) === null || _c === void 0 ? void 0 : _c.total;
|
|
581
|
+
this.playerElevateLeveLoaded.emit({
|
|
582
|
+
elevateLevelWalletTotal: spendableTotal,
|
|
583
|
+
loyaltyWalletTotal
|
|
584
|
+
});
|
|
585
|
+
let spExpireInfoAsString = this.calcuatePointsToBeExpired(spendableTotal);
|
|
586
|
+
let xpExpireInfoAsString = this.calcuatePointsToBeExpired(loyaltyWalletTotal);
|
|
587
|
+
if (spExpireInfoAsString || xpExpireInfoAsString) {
|
|
588
|
+
this.playerElevateLeveLoaded.emit({
|
|
589
|
+
pointExpireString: spExpireInfoAsString,
|
|
590
|
+
xpExpireString: xpExpireInfoAsString
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
resolve(this.playerElevateLevel);
|
|
594
|
+
})
|
|
595
|
+
.catch((err) => {
|
|
596
|
+
console.log('error ', err);
|
|
597
|
+
reject(true);
|
|
598
|
+
});
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
setLoyaltyProgress(percent) {
|
|
602
|
+
updateProgressSvg(this.loyaltyProgressEle, percent);
|
|
603
|
+
}
|
|
604
|
+
initLevelProgressbar() {
|
|
605
|
+
setTimeout(() => {
|
|
606
|
+
this.loyaltyProgressEle =
|
|
607
|
+
this.elevateCardRef.parentElement.querySelector('#LevelProgress');
|
|
608
|
+
if (!this.loyaltyProgressEle) {
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
this.setLoyaltyProgress(!this.playerElevateLevel.nextLevel
|
|
612
|
+
? 1 : (this.playerElevateLevel.loyaltyPoints / this.playerElevateLevel.nextLevel.entryPoints));
|
|
613
|
+
this.params['playerElevateLevel'] = this.playerElevateLevel;
|
|
614
|
+
}, 80);
|
|
615
|
+
}
|
|
616
|
+
componentDidRender() {
|
|
617
|
+
this.initLevelProgressbar();
|
|
618
|
+
}
|
|
619
|
+
loadElevateInfo() {
|
|
620
|
+
if (!this.params.endpoint || !this.params.session) {
|
|
621
|
+
return;
|
|
836
622
|
}
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
623
|
+
const promises = [];
|
|
624
|
+
promises.push(this.loadPlayerLevelInfo());
|
|
625
|
+
if (this.params.calculateLevelFlag) {
|
|
626
|
+
promises.push(this.loadLevels());
|
|
627
|
+
}
|
|
628
|
+
Promise.all(promises).then((res) => {
|
|
629
|
+
console.log('elevate-init', res);
|
|
630
|
+
this.initLevelProgressbar();
|
|
631
|
+
if (!this.levels) {
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
this.levels.sort((level1, level2) => {
|
|
635
|
+
return level1.firstEntryPoints > level2.firstEntryPoints ? 1 : -1;
|
|
636
|
+
});
|
|
637
|
+
const playerPoints = this.playerElevateLevel.loyaltyPoints;
|
|
638
|
+
let playerLevelNumber = 0;
|
|
639
|
+
this.levels.forEach((elevateLevel, idx) => {
|
|
640
|
+
if (playerPoints > elevateLevel.firstEntryPoints) {
|
|
641
|
+
playerLevelNumber = idx;
|
|
642
|
+
}
|
|
643
|
+
});
|
|
644
|
+
this.playerElevateLeveLoaded.emit({
|
|
645
|
+
calculatedLevelFlag: playerLevelNumber,
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
componentWillLoad() {
|
|
650
|
+
this.loadElevateInfo();
|
|
651
|
+
}
|
|
652
|
+
get elevateCardRef() { return index.getElement(this); }
|
|
653
|
+
static get watchers() { return {
|
|
654
|
+
"params": ["onParamsChanged"]
|
|
655
|
+
}; }
|
|
850
656
|
};
|
|
851
|
-
PlayerElevateCardData.style =
|
|
657
|
+
PlayerElevateCardData.style = PlayerElevateCardDataStyle0;
|
|
852
658
|
|
|
853
659
|
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}";
|
|
660
|
+
const PlayerElevatePointcardStyle0 = playerElevatePointcardCss;
|
|
854
661
|
|
|
855
662
|
const PlayerElevatePointcard = class {
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
endpoint: this.endpoint,
|
|
918
|
-
session: this.session,
|
|
919
|
-
language: this.language,
|
|
920
|
-
};
|
|
921
|
-
}
|
|
922
|
-
render() {
|
|
923
|
-
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
924
|
-
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
925
|
-
return (index.h("div", { class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: playerElevateCardItems.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { params: this.paramProxy }), index.h("div", { class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, null, index.h("div", { class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : playerElevateCardItems.translate('spendablePoints')), index.h("div", { class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { class: "TC", onClick: () => {
|
|
926
|
-
this.onDetailsClick();
|
|
927
|
-
} }, playerElevateCardItems.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
928
|
-
}
|
|
929
|
-
static get watchers() { return {
|
|
930
|
-
"session": ["onSessionOrEndpointChange"],
|
|
931
|
-
"endpoint": ["onSessionOrEndpointChange"],
|
|
932
|
-
"language": ["onSessionOrEndpointChange"]
|
|
933
|
-
}; }
|
|
663
|
+
constructor(hostRef) {
|
|
664
|
+
index.registerInstance(this, hostRef);
|
|
665
|
+
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
666
|
+
this.endpoint = undefined;
|
|
667
|
+
this.theme = 'Dark';
|
|
668
|
+
this.session = undefined;
|
|
669
|
+
this.playerAvatarUrl = undefined;
|
|
670
|
+
this.language = 'en';
|
|
671
|
+
this.playerName = undefined;
|
|
672
|
+
this.cardTitle = undefined;
|
|
673
|
+
this.buttonType = 'earningRule';
|
|
674
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
675
|
+
this.clientStyling = '';
|
|
676
|
+
this.clientStylingUrl = '';
|
|
677
|
+
this.translationUrl = '';
|
|
678
|
+
this.pointExpireString = undefined;
|
|
679
|
+
this.playerElevateLevel = undefined;
|
|
680
|
+
this.elevateWalletTotal = undefined;
|
|
681
|
+
this.elevateSPTotal = undefined;
|
|
682
|
+
}
|
|
683
|
+
onSessionOrEndpointChange() {
|
|
684
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
685
|
+
}
|
|
686
|
+
playerElevateLeveLoadedHandler(event) {
|
|
687
|
+
if (!event.detail) {
|
|
688
|
+
return;
|
|
689
|
+
}
|
|
690
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
691
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
692
|
+
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
693
|
+
}
|
|
694
|
+
if (event.detail['elevateLevel']) {
|
|
695
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
696
|
+
}
|
|
697
|
+
if (event.detail['pointExpireString']) {
|
|
698
|
+
this.pointExpireString = event.detail.pointExpireString;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
onDetailsClick() {
|
|
702
|
+
window.postMessage({ type: this.isPointDetailCard ? 'BEEPointRulesClicked' : 'BEEDetailsClicked',
|
|
703
|
+
path: this.isPointDetailCard ? 'player-elevate-level' : 'player-elevate-point-details' }, window.location.href);
|
|
704
|
+
}
|
|
705
|
+
componentWillLoad() {
|
|
706
|
+
this.paramProxy = {
|
|
707
|
+
endpoint: this.endpoint,
|
|
708
|
+
session: this.session,
|
|
709
|
+
language: this.language,
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
render() {
|
|
713
|
+
const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
|
|
714
|
+
const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
|
|
715
|
+
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: playerElevateCardItems.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(playerElevateCardItems.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 : playerElevateCardItems.translate('spendablePoints')), index.h("div", { key: 'eeebc5c468cf6e3d566f708fd47a19956ad9defe', class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { key: 'ad58990b7fa789cf2d5c524191447196e97c8a16', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: '0dbdd6cd84e1cb43dac4485f4e3eec3130d6c65c', class: "TC", onClick: () => {
|
|
716
|
+
this.onDetailsClick();
|
|
717
|
+
} }, playerElevateCardItems.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '45c3267d390995fabe34974913adf97b112cf8c2', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
718
|
+
}
|
|
719
|
+
static get watchers() { return {
|
|
720
|
+
"session": ["onSessionOrEndpointChange"],
|
|
721
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
722
|
+
"language": ["onSessionOrEndpointChange"]
|
|
723
|
+
}; }
|
|
934
724
|
};
|
|
935
|
-
PlayerElevatePointcard.style =
|
|
725
|
+
PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
|
|
936
726
|
|
|
937
727
|
exports.bonus_elevate_shop = BonusElevateShop;
|
|
938
728
|
exports.general_styling_wrapper = GeneralStylingWrapper;
|