@everymatrix/player-elevate-level 1.43.4 → 1.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/bonus-elevate-levels_8.cjs.entry.js +644 -674
- package/dist/cjs/index-91eb0bf0.js +1682 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/{player-elevate-card-items-9e7a9a23.js → player-elevate-card-items-ae20c19f.js} +171 -285
- package/dist/cjs/player-elevate-card.cjs.entry.js +59 -70
- package/dist/cjs/player-elevate-level.cjs.js +17 -11
- package/dist/cjs/player-elevate-pointcard.cjs.entry.js +61 -77
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/player-elevate-level/index.js +1 -0
- package/dist/collection/components/player-elevate-level/player-elevate-level.js +208 -209
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/bonus-elevate-levels_8.entry.js +644 -674
- package/dist/esm/index-32ed7fbd.js +1651 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/{player-elevate-card-items-08ee8fab.js → player-elevate-card-items-2eccd763.js} +172 -285
- package/dist/esm/player-elevate-card.entry.js +59 -70
- package/dist/esm/player-elevate-level.js +14 -11
- package/dist/esm/player-elevate-pointcard.entry.js +61 -77
- package/dist/player-elevate-level/p-5f93600c.entry.js +1 -0
- package/dist/player-elevate-level/p-6d39391e.js +2 -0
- package/dist/player-elevate-level/p-73e5a291.entry.js +1 -0
- package/dist/player-elevate-level/p-a622755e.js +1 -0
- package/dist/player-elevate-level/p-acd808d7.entry.js +1 -0
- package/dist/player-elevate-level/p-e1255160.js +1 -0
- package/dist/player-elevate-level/player-elevate-level.esm.js +1 -1
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -22
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/player-elevate-level/index.d.ts +1 -0
- package/dist/types/components/player-elevate-level/player-elevate-level.d.ts +41 -41
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- 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 -6
- package/dist/cjs/index-c706b0d2.js +0 -1726
- package/dist/components/bonus-elevate-levels.js +0 -6
- package/dist/components/bonus-elevate-levels2.js +0 -138
- package/dist/components/elevate-level-list.js +0 -6
- package/dist/components/elevate-level-list2.js +0 -198
- package/dist/components/elevate-level-presentation.js +0 -6
- package/dist/components/elevate-level-presentation2.js +0 -31
- package/dist/components/elevate-levels-data.js +0 -6
- package/dist/components/elevate-levels-data2.js +0 -102
- 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.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.js +0 -126
- package/dist/components/player-elevate-level.d.ts +0 -11
- package/dist/components/player-elevate-level.js +0 -107
- package/dist/components/player-elevate-loyaltycard.js +0 -6
- package/dist/components/player-elevate-loyaltycard2.js +0 -129
- package/dist/components/player-elevate-pointcard.js +0 -135
- package/dist/esm/index-104132db.js +0 -1696
- 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-level/p-04a5ef33.entry.js +0 -1
- package/dist/player-elevate-level/p-46fd6f51.js +0 -1
- package/dist/player-elevate-level/p-6766466f.js +0 -1
- package/dist/player-elevate-level/p-d5d234f8.entry.js +0 -1
- package/dist/player-elevate-level/p-d8ae2452.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/player-elevate-level/.stencil/packages/player-elevate-level/stencil.config.d.ts +0 -2
|
@@ -1,81 +1,70 @@
|
|
|
1
|
-
import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-
|
|
2
|
-
import { T as TRANSLATIONS, P as PlayerAvatar,
|
|
1
|
+
import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-32ed7fbd.js';
|
|
2
|
+
import { T as TRANSLATIONS, P as PlayerAvatar, c as PlayerPoints, e as PlayerNameDiv, b as PlayerElevateLoyaltyLevel, d as PlayerLoyaltyProcess, f as PlayerElevateCardRedeem } from './player-elevate-card-items-2eccd763.js';
|
|
3
3
|
|
|
4
|
-
const playerElevateCardCss = "@container (max-width: 270px) {\n .Card .Inner {\n flex-direction: column;\n }\n .Card .Inner .Content {\n padding: 9px;\n }\n
|
|
4
|
+
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}";
|
|
5
|
+
const PlayerElevateCardStyle0 = playerElevateCardCss;
|
|
5
6
|
|
|
6
7
|
const PlayerElevateCard = class {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
* Client custom styling via inline styles
|
|
24
|
-
*/
|
|
25
|
-
this.clientStyling = '';
|
|
26
|
-
/**
|
|
27
|
-
* Client custom styling via url
|
|
28
|
-
*/
|
|
29
|
-
this.clientStylingUrl = '';
|
|
30
|
-
/**
|
|
31
|
-
* Translation via url
|
|
32
|
-
*/
|
|
33
|
-
this.translationUrl = '';
|
|
34
|
-
this.playerLevelFlag = 0;
|
|
35
|
-
}
|
|
36
|
-
onSessionOrEndpointChange() {
|
|
37
|
-
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
38
|
-
}
|
|
39
|
-
playerElevateLeveLoadedHandler(event) {
|
|
40
|
-
if (!event.detail) {
|
|
41
|
-
return;
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.endpoint = undefined;
|
|
11
|
+
this.theme = 'Dark';
|
|
12
|
+
this.session = undefined;
|
|
13
|
+
this.playerAvatarUrl = undefined;
|
|
14
|
+
this.language = 'en';
|
|
15
|
+
this.playerName = undefined;
|
|
16
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
17
|
+
this.clientStyling = '';
|
|
18
|
+
this.clientStylingUrl = '';
|
|
19
|
+
this.translationUrl = '';
|
|
20
|
+
this.pointExpireString = undefined;
|
|
21
|
+
this.playerLevelFlag = 0;
|
|
22
|
+
this.playerElevateLevel = undefined;
|
|
23
|
+
this.elevateWalletTotal = undefined;
|
|
42
24
|
}
|
|
43
|
-
|
|
44
|
-
|
|
25
|
+
onSessionOrEndpointChange() {
|
|
26
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
45
27
|
}
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
playerElevateLeveLoadedHandler(event) {
|
|
29
|
+
if (!event.detail) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
33
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
34
|
+
}
|
|
35
|
+
if (event.detail['elevateLevel']) {
|
|
36
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
37
|
+
}
|
|
38
|
+
if (event.detail['pointExpireString']) {
|
|
39
|
+
this.pointExpireString = event.detail.xpExpireString;
|
|
40
|
+
}
|
|
41
|
+
if (event.detail.calculatedLevelFlag) {
|
|
42
|
+
this.playerLevelFlag = event.detail.calculatedLevelFlag;
|
|
43
|
+
}
|
|
48
44
|
}
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
onRedeemClick() {
|
|
46
|
+
window.postMessage({ type: 'BEERedeemClicked' }, window.location.href);
|
|
51
47
|
}
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
componentWillLoad() {
|
|
49
|
+
this.paramProxy = {
|
|
50
|
+
endpoint: this.endpoint,
|
|
51
|
+
session: this.session,
|
|
52
|
+
language: this.language,
|
|
53
|
+
calculateLevelFlag: true,
|
|
54
|
+
};
|
|
54
55
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
69
|
-
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
70
|
-
return (h("div", { class: `ElevateCardWrapper ${this.theme}` }, h("div", { class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { params: this.paramProxy }), h("div", { class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, null, h("div", { class: 'Content Row' }, h("div", { class: "PlayerImg" }, h(PlayerAvatar, { playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, null), h(PlayerElevateCardRedeem, { onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
71
|
-
}
|
|
72
|
-
static get assetsDirs() { return ["../static"]; }
|
|
73
|
-
static get watchers() { return {
|
|
74
|
-
"session": ["onSessionOrEndpointChange"],
|
|
75
|
-
"endpoint": ["onSessionOrEndpointChange"],
|
|
76
|
-
"language": ["onSessionOrEndpointChange"]
|
|
77
|
-
}; }
|
|
56
|
+
render() {
|
|
57
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
58
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
59
|
+
return (h("div", { key: '278a328dd084ee73b2707b93a57bccae64a2c9c7', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '68c885baf533447a7c77fd887bbec11e53768277', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '4066253a70cdd5e712ca244a708e7c1600c83071', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '64cda2a267c752056b3c7e3134cc324fa96bc261', params: this.paramProxy }), h("div", { key: 'c63ae83b401a35f5a78acd83dc3d7296c25141d7', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, { key: 'ba16e5bb54259c17fd9e5aa0e3c03c2ec5d4263c' }, h("div", { key: 'fa1bf74f45e28318c95266cc42c54541bde92718', class: 'Content Row' }, h("div", { key: '7ede46f91bcc0d894b2b633627a4ca97d15fbe90', class: "PlayerImg" }, h(PlayerAvatar, { key: 'b6d0bac085e0178512b8a63ba8fccae7d4cc8399', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { key: '88c445dbcd7dbe426a8de18beea02aecc03e26f3', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { key: '4d985e486ecb74a6c916b28e619de83cb3d77ac1', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { key: '34e051ee1ff79b825fca57db958e1e5684a0aca1', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { key: 'fa1b1f16e0b25c6adfba4c215e4ed377e05699b2', playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { key: '6d18b1422db202363ebcd56cc56946e0e071937b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, { key: '7dae355c4a5a9e28c70dced0ac061608f1753020' }), h(PlayerElevateCardRedeem, { key: '7e5f830b612c962a828c58f20a88dc97d315c910', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
|
|
60
|
+
}
|
|
61
|
+
static get assetsDirs() { return ["../static"]; }
|
|
62
|
+
static get watchers() { return {
|
|
63
|
+
"session": ["onSessionOrEndpointChange"],
|
|
64
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
65
|
+
"language": ["onSessionOrEndpointChange"]
|
|
66
|
+
}; }
|
|
78
67
|
};
|
|
79
|
-
PlayerElevateCard.style =
|
|
68
|
+
PlayerElevateCard.style = PlayerElevateCardStyle0;
|
|
80
69
|
|
|
81
70
|
export { PlayerElevateCard as player_elevate_card };
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-32ed7fbd.js';
|
|
2
|
+
export { s as setNonce } from './index-32ed7fbd.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
2
4
|
|
|
3
5
|
/*
|
|
4
|
-
Stencil Client Patch Browser
|
|
6
|
+
Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
|
|
5
7
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
var patchBrowser = () => {
|
|
9
|
+
const importMeta = import.meta.url;
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== "") {
|
|
12
|
+
opts.resourcesUrl = new URL(".", importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return promiseResolve(opts);
|
|
13
15
|
};
|
|
14
16
|
|
|
15
|
-
patchBrowser().then(options => {
|
|
16
|
-
|
|
17
|
+
patchBrowser().then(async (options) => {
|
|
18
|
+
await globalScripts();
|
|
19
|
+
return bootstrapLazy([["bonus-elevate-levels_8",[[1,"player-elevate-level",{"endpoint":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"userLevelId":[32]},[[0,"playerElevateLeveLoaded","setPlayerElevateLevelInfo"]]],[1,"bonus-elevate-levels",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"endpoint":[513],"language":[513],"translationUrl":[513,"translation-url"],"selectedLevelId":[1537,"selected-level-id"],"showDefault":[4,"show-default"],"elevateLevelParamProxy":[32],"elevateLevels":[32],"currentLevel":[32],"errorMessage":[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{"selectedLevelId":["selectedLevelIdChangedHandler"],"elevateLevels":["selectedLevelIdChangedHandler"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{"levels":[16],"language":[1],"selectedLevelId":[1537,"selected-level-id"],"isShowSliderButton":[32],"touchPosStart":[32],"touchPosEnd":[32],"offset":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{"selectedLevelId":["levelsChangedHandler"]}],[0,"elevate-level-presentation",{"elevateLevel":[16]}],[0,"elevate-levels-data",{"scopeParams":[1544,"scope-params"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]]], options);
|
|
17
20
|
});
|
|
@@ -1,88 +1,72 @@
|
|
|
1
|
-
import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-
|
|
2
|
-
import { T as TRANSLATIONS, P as PlayerAvatar,
|
|
1
|
+
import { r as registerInstance, a as getAssetPath, h, F as Fragment } from './index-32ed7fbd.js';
|
|
2
|
+
import { T as TRANSLATIONS, P as PlayerAvatar, h as translate, c as PlayerPoints } from './player-elevate-card-items-2eccd763.js';
|
|
3
3
|
|
|
4
4
|
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}";
|
|
5
|
+
const PlayerElevatePointcardStyle0 = playerElevatePointcardCss;
|
|
5
6
|
|
|
6
7
|
const PlayerElevatePointcard = class {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* datePattern
|
|
28
|
-
*/
|
|
29
|
-
this.dateFormat = 'yyyy-MM-dd';
|
|
30
|
-
/**
|
|
31
|
-
* Client custom styling via inline styles
|
|
32
|
-
*/
|
|
33
|
-
this.clientStyling = '';
|
|
34
|
-
/**
|
|
35
|
-
* Client custom styling via url
|
|
36
|
-
*/
|
|
37
|
-
this.clientStylingUrl = '';
|
|
38
|
-
/**
|
|
39
|
-
* Translation via url
|
|
40
|
-
*/
|
|
41
|
-
this.translationUrl = '';
|
|
42
|
-
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
43
|
-
}
|
|
44
|
-
onSessionOrEndpointChange() {
|
|
45
|
-
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
46
|
-
}
|
|
47
|
-
playerElevateLeveLoadedHandler(event) {
|
|
48
|
-
if (!event.detail) {
|
|
49
|
-
return;
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.isPointDetailCard = this.buttonType === 'earningRule';
|
|
11
|
+
this.endpoint = undefined;
|
|
12
|
+
this.theme = 'Dark';
|
|
13
|
+
this.session = undefined;
|
|
14
|
+
this.playerAvatarUrl = undefined;
|
|
15
|
+
this.language = 'en';
|
|
16
|
+
this.playerName = undefined;
|
|
17
|
+
this.cardTitle = undefined;
|
|
18
|
+
this.buttonType = 'earningRule';
|
|
19
|
+
this.dateFormat = 'yyyy-MM-dd';
|
|
20
|
+
this.clientStyling = '';
|
|
21
|
+
this.clientStylingUrl = '';
|
|
22
|
+
this.translationUrl = '';
|
|
23
|
+
this.pointExpireString = undefined;
|
|
24
|
+
this.playerElevateLevel = undefined;
|
|
25
|
+
this.elevateWalletTotal = undefined;
|
|
26
|
+
this.elevateSPTotal = undefined;
|
|
50
27
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
28
|
+
onSessionOrEndpointChange() {
|
|
29
|
+
this.paramProxy = Object.assign(Object.assign({}, this.paramProxy), { session: this.session, endpoint: this.endpoint, language: this.language });
|
|
54
30
|
}
|
|
55
|
-
|
|
56
|
-
|
|
31
|
+
playerElevateLeveLoadedHandler(event) {
|
|
32
|
+
if (!event.detail) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (event.detail['elevateLevelWalletTotal']) {
|
|
36
|
+
this.elevateWalletTotal = event.detail['elevateLevelWalletTotal'];
|
|
37
|
+
this.elevateSPTotal = event.detail['loyaltyWalletTotal'];
|
|
38
|
+
}
|
|
39
|
+
if (event.detail['elevateLevel']) {
|
|
40
|
+
this.playerElevateLevel = event.detail['elevateLevel'];
|
|
41
|
+
}
|
|
42
|
+
if (event.detail['pointExpireString']) {
|
|
43
|
+
this.pointExpireString = event.detail.pointExpireString;
|
|
44
|
+
}
|
|
57
45
|
}
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
onDetailsClick() {
|
|
47
|
+
window.postMessage({ type: this.isPointDetailCard ? 'BEEPointRulesClicked' : 'BEEDetailsClicked',
|
|
48
|
+
path: this.isPointDetailCard ? 'player-elevate-level' : 'player-elevate-point-details' }, window.location.href);
|
|
60
49
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
static get watchers() { return {
|
|
81
|
-
"session": ["onSessionOrEndpointChange"],
|
|
82
|
-
"endpoint": ["onSessionOrEndpointChange"],
|
|
83
|
-
"language": ["onSessionOrEndpointChange"]
|
|
84
|
-
}; }
|
|
50
|
+
componentWillLoad() {
|
|
51
|
+
this.paramProxy = {
|
|
52
|
+
endpoint: this.endpoint,
|
|
53
|
+
session: this.session,
|
|
54
|
+
language: this.language,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
render() {
|
|
58
|
+
const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
|
|
59
|
+
const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
|
|
60
|
+
return (h("div", { key: '13461fc9cf8b777337a539c15da4bb2781f5a837', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '526e72c0ada871f74ba4a07f0a125bc25840c09c', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '95e358ceb8fa3c247660f7ca15a4684b132874be', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '24c765d743446ac597a9dcc9cd22515e7e39e6db', params: this.paramProxy }), h("div", { key: '309db4bbfc244a7fb97827774d9d4383109ca0d7', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '9d5614ded2f73b505e60900675a7d95b3cfbcbc6', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '9a17e809083e61aad19f7ffef5d5ee5885ae8b4d' }, h("div", { key: '47068df3c0070ee2785b0d0201b08766fe0d71e8', class: "PlayerImg" }, h(PlayerAvatar, { key: '40115f8b190d871c85f9531fbf0bafb8fbd739e2', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '278cd70c23ecb48655e90810af570ce5366d13d5', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: 'ce682ff881c5b12ed0b736ffcc67ad07b3713999', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate('spendablePoints')), h("div", { key: 'eeebc5c468cf6e3d566f708fd47a19956ad9defe', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: 'ad58990b7fa789cf2d5c524191447196e97c8a16', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: '0dbdd6cd84e1cb43dac4485f4e3eec3130d6c65c', class: "TC", onClick: () => {
|
|
61
|
+
this.onDetailsClick();
|
|
62
|
+
} }, translate('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '45c3267d390995fabe34974913adf97b112cf8c2', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
|
|
63
|
+
}
|
|
64
|
+
static get watchers() { return {
|
|
65
|
+
"session": ["onSessionOrEndpointChange"],
|
|
66
|
+
"endpoint": ["onSessionOrEndpointChange"],
|
|
67
|
+
"language": ["onSessionOrEndpointChange"]
|
|
68
|
+
}; }
|
|
85
69
|
};
|
|
86
|
-
PlayerElevatePointcard.style =
|
|
70
|
+
PlayerElevatePointcard.style = PlayerElevatePointcardStyle0;
|
|
87
71
|
|
|
88
72
|
export { PlayerElevatePointcard as player_elevate_pointcard };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,c as n,H as i,g as l,a,F as s}from"./p-6d39391e.js";import{r as o,t as r,g as d,a as h,T as v,P as c,b as p,c as f,d as g}from"./p-a622755e.js";const b=["ro","en","fr","hr","tr"],x={en:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},fr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set",points:"Points"},ro:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},tr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"}},y=(e,t)=>{const n=t;return x[void 0!==n&&(b.includes(n)||x[n])?n:"en"][e]},w=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.endpoint=void 0,this.language="en",this.translationUrl="",this.selectedLevelId=void 0,this.showDefault=void 0,this.elevateLevelParamProxy=void 0,this.elevateLevels=[],this.currentLevel=void 0,this.errorMessage=void 0}selectedLevelChangedHandler(e){e.detail&&(this.currentLevel=Object.assign({},e.detail.level))}selectedLevelIdChangedHandler(){if(this.selectedLevelId&&this.elevateLevels){const e=this.elevateLevels.filter((e=>e.id==this.selectedLevelId))[0];this.currentLevel=Object.assign({},e)}}onSessionOrEndpointChange(){this.elevateLevelParamProxy=Object.assign(Object.assign({},this.elevateLevelParamProxy),{endpoint:this.endpoint,language:this.language})}elevateLevelsDataChangeHandler(e){e.detail&&(e.detail.currentLevel&&(this.currentLevel=Object.assign({},e.detail.currentLevel)),e.detail.elevateLevels&&(this.elevateLevels=[...e.detail.elevateLevels]),e.detail.clearError&&(this.errorMessage=null),e.detail.errorMessage&&e.detail.errorMessage.errorWhenLoadElevateLevels&&(this.errorMessage=y("loadElevateLevelErrorMessage",this.language)))}onTCClick(){window.postMessage({type:"termAndConditionClicked"},window.location.href)}componentWillLoad(){this.elevateLevelParamProxy={endpoint:this.endpoint,language:this.language,selectedLevelId:this.selectedLevelId,showDefault:this.showDefault}}render(){return t("div",{key:"327b5cd6a3bc756ce0696a0f2a4081f35bad7316",class:"ElevateLevelContent"},t("elevate-levels-data",{key:"cf1ab9a55cdaf9eba688bd524cb4a83d63563e77",scopeParams:this.elevateLevelParamProxy}),t("div",{key:"9c85b9a805712db07c7c99ac2db843062997f667",class:"LevelContent"},this.elevateLevels?t("elevate-level-list",{language:this.language,selectedLevelId:this.selectedLevelId,levels:this.elevateLevels}):y("noLevelsSet",this.language),this.currentLevel&&t("elevate-level-presentation",{key:"0fecb2a451caeef4512dc6f2af4fd3406610cc72",elevateLevel:this.currentLevel})),this.errorMessage&&t("div",{key:"ef746907148df80338fd2300322cd8eea9342f51"},this.errorMessage),t("general-styling-wrapper",{key:"e3d82ef1b7e5986354e18d875f9e3c547ff8adba",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:x,translationUrl:this.translationUrl}))}static get watchers(){return{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var u;w.style=":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}",function(e){e[e.slideToRight=1]="slideToRight",e[e.slideToLeft=-1]="slideToLeft"}(u||(u={}));const m=class{constructor(t){var i;e(this,t),this.selectedLevelChanged=n(this,"selectedLevelChanged",7),this.minOffset=0,this.isMobile=!!((i=window.navigator.userAgent).toLowerCase().match(/android/i)||i.toLowerCase().match(/blackberry|bb/i)||i.toLowerCase().match(/iphone|ipad|ipod/i)||i.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.levels=void 0,this.language=void 0,this.selectedLevelId=void 0,this.isShowSliderButton=!1,this.touchPosStart=void 0,this.touchPosEnd=void 0,this.offset=0}onLevelClicked(e){this.selectedLevelChanged.emit({level:e}),this.selectedLevelId=e.id}levelsChangedHandler(){this.initOffsetOfLevelItems()}initOffsetOfLevelItems(){if(!this.levels||0==this.levels.length||!this.selectedLevelId)return;const e=this.levels.findIndex((e=>this.selectedLevelId==e.id));if(this.onLevelClicked(this.levels[-1==e?0:e]),this.levels.length<=this.moveCountForOneTouch)return;let t=Math.floor((-1==e?1:e+1)/this.moveCountForOneTouch)*this.moveCountForOneTouch*this.childElementWidth*-1;this.offset=t<=this.minOffset?this.minOffset:t>=0?0:t}onTouchStart(e){this.touchPosStart={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}onTouchMove(e){this.touchPosEnd={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};const t=this.touchPosEnd.clientX-this.touchPosStart.clientX,n=this.touchPosEnd.clientY-this.touchPosStart.clientY;Math.abs(t)>Math.abs(n)&&this.slideTo(t>0?u.slideToRight:u.slideToLeft)}slideTo(e){let t=this.levelsElement.offsetLeft+this.childElementWidth*this.moveCountForOneTouch*e;if(t%this.childElementWidth!=0){const n=Math.floor(t/this.childElementWidth)*this.childElementWidth,i=Math.ceil(t/this.childElementWidth)*this.childElementWidth;t=e==u.slideToRight?n:i}this.offset=t<this.minOffset?this.minOffset:t>=0?0:t}initLevelSlider(){var e;if(!(null===(e=this.levelsElement)||void 0===e?void 0:e.firstElementChild))return void console.log("Widget[elevate-level-list] DOM is not ready.");this.isShowSliderButton=!this.isMobile&&this.levelsElement.clientWidth>this.levelsElement.parentElement.clientWidth,this.minOffset=this.levelsElement.parentElement.clientWidth-this.levelsElement.clientWidth,this.childElementWidth=this.levelsElement.firstElementChild.clientWidth,this.moveCountForOneTouch=Math.ceil(this.levelsElement.parentElement.clientWidth/this.childElementWidth)-1;const t=this.levelsElement.childElementCount;this.childElementWidth+=(this.levelsElement.clientWidth-this.childElementWidth*t)/(t-1)}debounce(e,t){{let n;return()=>{clearTimeout(n),n=setTimeout((()=>{e()}),t)}}}handleResize(){this.debounce(this.initLevelSlider.bind(this),200)()}componentDidRender(){this.host.componentOnReady().then((()=>{this.initLevelSlider()}))}render(){return t(i,{key:"d88d3434af89a0f8fd20a97735121fdf297905ab"},this.levels&&[t("div",{key:"cff36ba584e2474a65a1b95545b00937ecd06c8c",class:`SliderButton LeftButton ${0==this.offset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(u.slideToRight)},t("svg",{key:"640b4dd9b26b4097d15623f3e9c6b14b9a60b37e",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"0a50ffc9319ad33ed61e4696c37a0bfe6090518c","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"314c5b4c5bbc0d50041a66fdf474441ea418345a",class:"LevelItemsWrapper"},t("div",{key:"ff1fb084aeb20319c36a3420e9eb8693ea81b144",style:{left:`${this.offset}px`},class:"LevelItems "+(this.isMobile?"Mobile":""),id:"levelItems",ref:e=>{this.levelsElement=e}},this.levels.map(((e,n)=>t("div",{class:"Item "+(this.selectedLevelId==e.id?"Active":""),onClick:this.onLevelClicked.bind(this,e)},t("img",{alt:`Presentation Icon for ${e.presentation.displayName}`,class:"LevelImg",src:e.presentation.asset}),t("span",{class:"LevelName",title:e.presentation.displayName},e.presentation.displayName),t("span",{class:"LevelPoints"},0==n?"":">",e.firstEntryPoints," ",y("points",this.language))))))),t("div",{key:"8dae638ca436c7e747a0f737028588ee5d040edd",class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(u.slideToLeft)},t("svg",{key:"bba16b49668567aaa41beedd9ea461d256c6812d",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"36a0b6f3ffe8b50ebea9a4ec1c01e3341c440949","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))])}get host(){return l(this)}static get watchers(){return{selectedLevelId:["levelsChangedHandler"]}}};m.style="elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emfe-w-color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emfe-w-color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emfe-w-color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";const L=class{constructor(t){e(this,t),this.elevateLevel=void 0}render(){return t(i,{key:"16d128717e716f7ca7d3bb77fc3a2e67209318b6"},t("div",{key:"658657abdfc64844bd2af40562efe40385e1735a",class:"Row Desc"},t("h3",{key:"ec5871c2f810c8c120bf99510717381175bc1ef4"},this.elevateLevel.presentation.displayName),t("p",{key:"865915c6eea90295238fb47eaa91c8f968199ca5"},t("span",{key:"2b90c6c5d6957b73fc4a0f53d53da0ca023a4f0a",class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};L.style=":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";var I,k,C,E={exports:{}};I=E,k=E.exports,C=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==C)return C;throw new Error("unable to locate global object")}(),I.exports=k=C.fetch,C.fetch&&(k.default=C.fetch.bind(C)),k.Headers=C.Headers,k.Request=C.Request,k.Response=C.Response;const P=E.exports,T=class{constructor(t){e(this,t),this.elevateLevelsDataChange=n(this,"elevateLevelsDataChange",7),this.scopeParams=void 0}async componentWillRender(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await P(e.href).then((e=>e.json())).then((e=>{const t=e.data.sort(((e,t)=>e.firstEntryPoints<t.firstEntryPoints?-1:1));let n=this.scopeParams.selectedLevelId;if(!n&&this.scopeParams.showDefault&&t.length>0&&(n=t[0].id),n){const e=t.filter((e=>e.id==n))[0];this.elevateLevelsDataChange.emit({currentLevel:e})}this.elevateLevelsDataChange.emit({clearError:!0}),this.elevateLevelsDataChange.emit({elevateLevels:t})})).catch((e=>{this.elevateLevelsDataChange.emit({errorMessage:{type:"errorWhenLoadElevateLevels",err:e}}),console.error(e)}))}};T.style=":host{display:block}";const R=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const i=(t=this.translationUrl,n=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{n[e]=n[e]?n[e]:{};for(let i in t[e])n[e][i]=t[e][i]})),e(!0)}))})));e.push(i)}var t,n;return await Promise.all(e)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return l(this)}};function S(e){o(1,arguments);var t=r(e);return t.setHours(0,0,0,0),t}R.style=":host{display:block}";var _={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};const B=class{constructor(t){e(this,t),this.playerElevateLeveLoaded=n(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}loadLevels(){let e=new URL(`${this.params.endpoint}/v1/elevate/levels?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{n(e)}))))}calcuatePointsToBeExpired(e){let t="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort(((e,t)=>function(e,t){o(2,arguments);var n=r(e),i=r(t);return n.getTime()<i.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const n=e.aboutToExpire[0],i=function(e,t){o(2,arguments);var n=S(e),i=S(t),l=n.getTime()-d(n),a=i.getTime()-d(i);return Math.round((l-a)/864e5)}(new Date(n.expireTime),new Date);let l=0,a=0===i?"pointsToBeExpiredDay":"pointsToBeExpired";return 0==i&&(l=function(e,t,n){o(2,arguments);var i,l=function(e,t){return o(2,arguments),r(e).getTime()-r(t).getTime()}(e,t)/36e5;return((i=null==n?void 0:n.roundingMethod)?_[i]:_.trunc)(l)}(new Date(n.expireTime),new Date),a=l>1?"pointsToBeExpiredHours":"pointsToBeExpiredHour"),t=h(a,{expirationPoints:n.points,expireDay:i}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,n)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var i,l,a;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void n(!0);let s=e.data;this.playerElevateLevel=s.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(i=s.spendableWallet)||void 0===i?void 0:i.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(l=e.data.spendableWallet)||void 0===l?void 0:l.total,r=null===(a=e.data.loyaltyWallet)||void 0===a?void 0:a.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:r});let d=this.calcuatePointsToBeExpired(o),h=this.calcuatePointsToBeExpired(r);(d||h)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:h}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),n(!0)}))))}setLoyaltyProgress(e){!function(e,t){const n=e.querySelector("#total_level"),i=n.getBBox().width,l=t>1?1:t,a=l*i-17<0?0:l*i-17,s=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),r=e.querySelector("#circle_current_level");n.setAttribute("viewbox",`0 0 ${a} 28`),s.setAttribute("width",`${a}`),r.setAttribute("cx",`${a<6.5?6.5:a}`),o.setAttribute("x",""+(a-8));const d=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),v=e.querySelector("#filter_ball"),c=e.querySelector("#filter_heart"),p=e.querySelector("#filter_lock"),f=e.querySelector("#paint0_linear_ball"),g=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),x=e.querySelector("#heart_box"),y=i-10;d.setAttribute("cx",`${y}`),g.setAttribute("x1",`${y}`),g.setAttribute("x2",`${y}`),f.setAttribute("x1",""+(y-6)),f.setAttribute("x2",""+(y-6+11.2)),p.setAttribute("x",""+(y-6)),c.setAttribute("x",""+(y-6-2)),v.setAttribute("x",""+(y-6-2-2)),h.setAttribute("x",""+(y-6-2-2-4)),b.setAttribute("x",""+(y-6)),x.setAttribute("x",""+(y-6)),n.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let n=0;this.levels.forEach(((e,i)=>{t>e.firstEntryPoints&&(n=i)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:n})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return l(this)}static get watchers(){return{params:["onParamsChanged"]}}};B.style=':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}';const D=class{constructor(t){e(this,t),this.endpoint=void 0,this.session=void 0,this.playerAvatarUrl=void 0,this.language=void 0,this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.userLevelId=void 0}async setPlayerElevateLevelInfo(e){"playerElevateLeveLoaded"==e.type&&e.detail.elevateLevel&&(this.userLevelId=e.detail.elevateLevel.id)}render(){return t(i,{key:"8ff544f13c2709a4f5314e0c4e190ca70d9732ff"},t("div",{key:"90c75c6283ab1b7b83f5b9af8b163853852a5636",class:"PlayerElevateCard"},t("player-elevate-loyaltycard",{key:"be1ab26bc44443547364a64cc31e6bac42e8ba8e",playerName:this.playerName,dateFormat:this.dateFormat,clientStylingUrl:this.clientStylingUrl,translationUrl:this.translationUrl,clientStyling:`${this.clientStyling} .Outer{height: 185px}`,endpoint:this.endpoint,language:this.language,session:this.session})),t("div",{key:"d868908d61b3320a4c3751eab8cf8cdbd98c41c4",class:"ElevateLevelsInfo"},t("bonus-elevate-levels",{key:"715bc9c3d15e1ac07f4fc75217beeaa48875ec63",selectedLevelId:this.userLevelId,clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,translationUrl:this.translationUrl,language:this.language,endpoint:this.endpoint})),t("general-styling-wrapper",{key:"0e40a6825499a6c44e04dadce2079d995ecb2702",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl}))}};D.style=":host{display:block}.PlayerElevateCard{height:160px;width:100%;overflow:hidden}.ElevateLevelsInfo{background-color:var(--emw--color-background, #e6e8ea)}";const A=class{constructor(t){e(this,t),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.xpExpireString))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}getNextLevelTips(){var e;let t=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&t){const e=(t.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return h("tipsForNextLevel",{pointsToReach:e,levelName:t.name})}return""}render(){const e=a("../static/card-ground.svg"),n=a("../static/card-ground-over.svg");return t("div",{key:"d32d09786bf66e0abef026482e7ea04a53c051b1",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"dd2685eb840341b8823f24db9b72d0f6b7d340ae",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"3e2a00d1697c89441a8254cb81c6dc72e5b9f534",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:v,translationUrl:this.translationUrl}),t("player-elevate-card-data",{key:"56221e6d50df3b09c4269000637818009807c994",params:this.paramProxy}),t("div",{key:"f11201024b280d6beb2ce1978ebfa7f2c7c59678",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},t("div",{key:"948a023268fad3945b5069686eb29312111042a2",class:"Content Row"},this.playerElevateLevel&&t(s,{key:"de7c52faa07386949ce1ca728968534922e9d880"},t("div",{key:"7c1a0c6ea5dbe7ee2375813b3819efa61e283232",class:"PlayerImg"},t(c,{key:"70ae13ee168c6de7bf4618f6ab8761462c8812b2",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),t("div",{key:"c11f916999b52e43e04ee472b0f54691012409a5",class:`LevelInfo ${this.playerElevateLevel.name}`},t(p,{key:"6aa61d117b24f9abbee9c5d33e882d6f023f205b",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),t(f,{key:"7cc02e34d4682c25095dbf6a3077b314410d8093",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),this.pointExpireString&&t("div",{key:"793e388644891e15b32e003ac8914e57e758e86b",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),t(g,{key:"a4f6c3b9f9cd5e8c6a025c26154702f9495bbe5b"}),t("div",{key:"d91eda0f963ba9ffd481237f4b16bd4ef638d25e",class:"NextLevelTip"},this.getNextLevelTips())))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};A.style=":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}";export{w as bonus_elevate_levels,m as elevate_level_list,L as elevate_level_presentation,T as elevate_levels_data,R as general_styling_wrapper,B as player_elevate_card_data,D as player_elevate_level,A as player_elevate_loyaltycard}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),o=(e,n)=>t.set(n.t=e,n),l=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",f="undefined"!=typeof window?window:{},u=f.document||{head:{}},a={o:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},d=e=>Promise.resolve(e),h=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],y=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&a.o?b(w):a.raf(w))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{$(m),$(v),(p=m.length>0)&&a.raf(w)},b=e=>d().then(e),g=y(v,!0),S=e=>{const t=new URL(e,a.l);return t.origin!==f.location.origin?t.href:t.pathname},j={},k=e=>"object"==(e=typeof e)||"function"===e;function O(e){var t,n,o;return null!=(o=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((t,n)=>{for(var o in n)e(t,o,{get:n[o],enumerable:!0})})({},{err:()=>C,map:()=>M,ok:()=>E,unwrap:()=>T,unwrapErr:()=>A});var E=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function M(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>E(e))):E(n)}if(e.isErr)return C(e.value);throw"should never get here"}var R,x,P,T=e=>{if(e.isOk)return e.value;throw e.value},A=e=>{if(e.isErr)return e.value;throw e.value},H=(e,t,...n)=>{let o=null,l=null,s=null,r=!1,i=!1;const c=[],f=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof e&&!k(o))&&(o+=""),r&&i?c[c.length-1].i+=o:c.push(r?L(null,o):o),i=r)};if(f(n),t){t.key&&(l=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,U);const u=L(e,null);return u.u=t,c.length>0&&(u.h=c),u.p=l,u.m=s,u},L=(e,t)=>({o:0,v:e,i:t,$:null,h:null,u:null,p:null,m:null}),N={},U={forEach:(e,t)=>e.map(W).forEach(t),map:(e,t)=>e.map(W).map(t).map(D)},W=e=>({vattrs:e.u,vchildren:e.h,vkey:e.p,vname:e.m,vtag:e.v,vtext:e.i}),D=e=>{if("function"==typeof e.vtag){const t={...e.vattrs};return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),H(e.vtag,t,...e.vchildren||[])}const t=L(e.vtag,e.vtext);return t.u=e.vattrs,t.h=e.vchildren,t.p=e.vkey,t.m=e.vname,t},F=e=>n(e).$hostElement$,q=(e,t,n)=>{const o=F(e);return{emit:e=>G(o,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},G=(e,t,n)=>{const o=a.ce(t,n);return e.dispatchEvent(o),o},I=new WeakMap,V=e=>"sc-"+e.S,_=(e,t,n,o,s,r)=>{if(n!==o){let i=l(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,l=B(n),s=B(o);t.remove(...l.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!l.includes(e))))}else if("style"===t){for(const t in n)o&&null!=o[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in o)n&&o[t]===n[t]||(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"===t);else if("ref"===t)o&&o(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=k(o);if((i||l&&null!==o)&&!s)try{if(e.tagName.includes("-"))e[t]=o;else{const l=null==o?"":o;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==o||!1===o?!1===o&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!l&&e.setAttribute(t,o=!0===o?"":o)}else if(t="-"===t[2]?t.slice(3):l(f,c)?c.slice(2):c[2]+t.slice(3),n||o){const l=t.endsWith(J);t=t.replace(K,""),n&&a.rel(e,t,n,l),o&&a.ael(e,t,o,l)}}},z=/\s/,B=e=>e?e.split(z):[],J="Capture",K=RegExp(J+"$"),Q=(e,t,n)=>{const o=11===t.$.nodeType&&t.$.host?t.$.host:t.$,l=e&&e.u||j,s=t.u||j;for(const e of X(Object.keys(l)))e in s||_(o,e,l[e],void 0,n,t.o);for(const e of X(Object.keys(s)))_(o,e,l[e],s[e],n,t.o)};function X(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var Y=!1,Z=!1,ee=!1,te=!1,ne=(e,t,n,o)=>{var l;const s=t.h[n];let r,i,c,f=0;if(Y||(ee=!0,"slot"===s.v&&(R&&o.classList.add(R+"-s"),s.o|=s.h?2:1)),null!==s.i)r=s.$=u.createTextNode(s.i);else if(1&s.o)r=s.$=u.createTextNode("");else{if(te||(te="svg"===s.v),r=s.$=u.createElementNS(te?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!Y&&2&s.o?"slot-fb":s.v),te&&"foreignObject"===s.v&&(te=!1),Q(null,s,te),r.getRootNode().querySelector("body"),s.h)for(f=0;f<s.h.length;++f)i=ne(e,s,f,r),i&&r.appendChild(i);"svg"===s.v?te=!1:"foreignObject"===r.tagName&&(te=!0)}return r["s-hn"]=P,3&s.o&&(r["s-sr"]=!0,r["s-cr"]=x,r["s-sn"]=s.m||"",r["s-rf"]=null==(l=s.u)?void 0:l.ref,c=e&&e.h&&e.h[n],c&&c.v===s.v&&e.$&&oe(e.$,!1)),r},oe=(e,t)=>{a.o|=1;const n=Array.from(e.childNodes);for(let e=n.length-1;e>=0;e--){const o=n[e];o["s-hn"]!==P&&o["s-ol"]&&(me(ce(o),o,ie(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,ee=!0),t&&oe(o,t)}a.o&=-2},le=(e,t,n,o,l,s)=>{let r,i=e["s-cr"]&&e["s-cr"].parentNode||e;for(i.shadowRoot&&i.tagName===P&&(i=i.shadowRoot);l<=s;++l)o[l]&&(r=ne(null,n,l,e),r&&(o[l].$=r,me(i,r,ie(t))))},se=(e,t,n)=>{for(let o=t;o<=n;++o){const t=e[o];if(t){const e=t.$;pe(t),e&&(Z=!0,e["s-ol"]?e["s-ol"].remove():oe(e,!0),e.remove())}}},re=(e,t,n=!1)=>!(e.v!==t.v||("slot"===e.v?"j"in e&&n&&8!==e.$.nodeType||e.m!==t.m:!n&&e.p!==t.p)),ie=e=>e&&e["s-ol"]||e,ce=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,fe=(e,t,n=!1)=>{const o=t.$=e.$,l=e.h,s=t.h,r=t.v,i=t.i;let c;null===i?(te="svg"===r||"foreignObject"!==r&&te,("slot"!==r||Y)&&Q(e,t,te),null!==l&&null!==s?((e,t,n,o,l=!1)=>{let s,r,i=0,c=0,f=0,u=0,a=t.length-1,d=t[0],h=t[a],p=o.length-1,m=o[0],v=o[p];for(;i<=a&&c<=p;)if(null==d)d=t[++i];else if(null==h)h=t[--a];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(re(d,m,l))fe(d,m,l),d=t[++i],m=o[++c];else if(re(h,v,l))fe(h,v,l),h=t[--a],v=o[--p];else if(re(d,v,l))"slot"!==d.v&&"slot"!==v.v||oe(d.$.parentNode,!1),fe(d,v,l),me(e,d.$,h.$.nextSibling),d=t[++i],v=o[--p];else if(re(h,m,l))"slot"!==d.v&&"slot"!==v.v||oe(h.$.parentNode,!1),fe(h,m,l),me(e,h.$,d.$),h=t[--a],m=o[++c];else{for(f=-1,u=i;u<=a;++u)if(t[u]&&null!==t[u].p&&t[u].p===m.p){f=u;break}f>=0?(r=t[f],r.v!==m.v?s=ne(t&&t[c],n,f,e):(fe(r,m,l),t[f]=void 0,s=r.$),m=o[++c]):(s=ne(t&&t[c],n,c,e),m=o[++c]),s&&me(ce(d.$),s,ie(d.$))}i>a?le(e,null==o[p+1]?null:o[p+1].$,n,o,c,p):c>p&&se(t,i,a)})(o,l,t,s,n):null!==s?(null!==e.i&&(o.textContent=""),le(o,null,t,s,0,s.length-1)):!n&&null!==l&&se(l,0,l.length-1),te&&"svg"===r&&(te=!1)):(c=o["s-cr"])?c.parentNode.textContent=i:e.i!==i&&(o.data=i)},ue=e=>{const t=e.childNodes;for(const e of t)if(1===e.nodeType){if(e["s-sr"]){const n=e["s-sn"];e.hidden=!1;for(const o of t)if(o!==e)if(o["s-hn"]!==e["s-hn"]||""!==n){if(1===o.nodeType&&(n===o.getAttribute("slot")||n===o["s-sn"])||3===o.nodeType&&n===o["s-sn"]){e.hidden=!0;break}}else if(1===o.nodeType||3===o.nodeType&&""!==o.textContent.trim()){e.hidden=!0;break}}ue(e)}},ae=[],de=e=>{let t,n,o;for(const l of e.childNodes){if(l["s-sr"]&&(t=l["s-cr"])&&t.parentNode){n=t.parentNode.childNodes;const e=l["s-sn"];for(o=n.length-1;o>=0;o--)if(t=n[o],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==l["s-hn"])if(he(t,e)){let n=ae.find((e=>e.k===t));Z=!0,t["s-sn"]=t["s-sn"]||e,n?(n.k["s-sh"]=l["s-hn"],n.O=l):(t["s-sh"]=l["s-hn"],ae.push({O:l,k:t})),t["s-sr"]&&ae.map((e=>{he(e.k,t["s-sn"])&&(n=ae.find((e=>e.k===t)),n&&!e.O&&(e.O=n.O))}))}else ae.some((e=>e.k===t))||ae.push({k:t})}1===l.nodeType&&de(l)}},he=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,pe=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(pe)},me=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ve=(e,t)=>{t&&!e.C&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.C=t)))},ye=(e,t)=>{if(e.o|=16,!(4&e.o))return ve(e,e.M),g((()=>$e(e,t)));e.o|=512},$e=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return t&&(e.o|=256,e.R&&(e.R.map((([e,t])=>Oe(n,e,t))),e.R=void 0),o=Oe(n,"componentWillLoad")),o=we(o,(()=>Oe(n,"componentWillRender"))),we(o,(()=>ge(e,n,t)))},we=(e,t)=>be(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),be=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ge=async(e,t,n)=>{var o;const l=e.$hostElement$,s=l["s-rc"];n&&(e=>{const t=e.P,n=e.$hostElement$,o=t.o,l=((e,t)=>{var n;const o=V(t),l=i.get(o);if(e=11===e.nodeType?e:u,l)if("string"==typeof l){let s,r=I.get(e=e.head||e);if(r||I.set(e,r=new Set),!r.has(o)){{s=u.createElement("style"),s.innerHTML=l;const o=null!=(n=a.T)?n:O(u);null!=o&&s.setAttribute("nonce",o),(!(1&t.o)||1&t.o&&"HEAD"!==e.nodeName)&&e.insertBefore(s,e.querySelector("link"))}4&t.o&&(s.innerHTML+=c),r&&r.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&2&o&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(e);Se(e,t,l,n),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=null!=(o=l["s-p"])?o:[],n=()=>je(e);0===t.length?n():(Promise.all(t).then(n),e.o|=4,t.length=0)}},Se=(e,t,n,o)=>{try{t=t.render&&t.render(),e.o&=-17,e.o|=2,((e,t,n=!1)=>{var o,l,s,r;const i=e.$hostElement$,c=e.P,f=e.A||L(null,null),d=(e=>e&&e.v===N)(t)?t:H(null,null,t);if(P=i.tagName,c.H&&(d.u=d.u||{},c.H.map((([e,t])=>d.u[t]=i[e]))),n&&d.u)for(const e of Object.keys(d.u))i.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(d.u[e]=i[e]);if(d.v=null,d.o|=4,e.A=d,d.$=f.$=i.shadowRoot||i,R=i["s-sc"],Y=!!(1&c.o),x=i["s-cr"],Z=!1,fe(f,d,n),a.o|=1,ee){de(d.$);for(const e of ae){const t=e.k;if(!t["s-ol"]){const e=u.createTextNode("");e["s-nr"]=t,me(t.parentNode,t["s-ol"]=e,t)}}for(const e of ae){const t=e.k,i=e.O;if(i){const e=i.parentNode;let n=i.nextSibling;{let s=null==(o=t["s-ol"])?void 0:o.previousSibling;for(;s;){let o=null!=(l=s["s-nr"])?l:null;if(o&&o["s-sn"]===t["s-sn"]&&e===o.parentNode){for(o=o.nextSibling;o===t||(null==o?void 0:o["s-sr"]);)o=null==o?void 0:o.nextSibling;if(!o||!o["s-nr"]){n=o;break}}s=s.previousSibling}}(!n&&e!==t.parentNode||t.nextSibling!==n)&&t!==n&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),me(e,t,n),1===t.nodeType&&(t.hidden=null!=(s=t["s-ih"])&&s)),t&&"function"==typeof i["s-rf"]&&i["s-rf"](t)}else 1===t.nodeType&&(n&&(t["s-ih"]=null!=(r=t.hidden)&&r),t.hidden=!0)}}Z&&ue(d.$),a.o&=-2,ae.length=0,x=void 0})(e,t,o)}catch(t){s(t,e.$hostElement$)}return null},je=e=>{const t=e.$hostElement$,n=e.M;Oe(e.t,"componentDidRender"),64&e.o||(e.o|=64,Ee(t),e.L(t),n||ke()),e.C&&(e.C(),e.C=void 0),512&e.o&&b((()=>ye(e,!1))),e.o&=-517},ke=()=>{Ee(u.documentElement),b((()=>G(f,"appload",{detail:{namespace:"player-elevate-level"}})))},Oe=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},Ee=e=>e.classList.add("hydrated"),Ce=(e,t,o)=>{var l,r;const i=e.prototype;if(t.N||t.U||e.watchers){e.watchers&&!t.U&&(t.U=e.watchers);const c=Object.entries(null!=(l=t.N)?l:{});if(c.map((([e,[l]])=>{(31&l||2&o&&32&l)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).W.get(t))(0,e)},set(o){((e,t,o,l)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${l.S}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.W.get(t),f=r.o,u=r.t;if(o=((e,t)=>null==e||k(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(o,l.N[t][0]),(!(8&f)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(r.W.set(t,o),u)){if(l.U&&128&f){const e=l.U[t];e&&e.map((e=>{try{u[e](o,c,t)}catch(e){s(e,i)}}))}2==(18&f)&&ye(r,!1)}})(this,e,o,t)},configurable:!0,enumerable:!0})})),1&o){const o=new Map;i.attributeChangedCallback=function(e,l,s){a.jmp((()=>{var r;const c=o.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=t.U)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,l,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.U)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var l;const s=n[1]||e;return o.set(s,e),512&n[0]&&(null==(l=t.H)||l.push([e,s])),s}))]))}}return e},Me=(e,o={})=>{var l;const d=[],p=o.exclude||[],m=f.customElements,v=u.head,y=v.querySelector("meta[charset]"),$=u.createElement("style"),w=[];let b,g=!0;Object.assign(a,o),a.l=new URL(o.resourcesUrl||"./",u.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((o=>{var l;const c={o:o[0],S:o[1],N:o[2],D:o[3]};4&c.o&&(S=!0),c.N=o[2],c.D=o[3],c.H=[],c.U=null!=(l=o[4])?l:{};const f=c.S,v=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const o={o:0,$hostElement$:e,P:n,W:new Map};o.F=new Promise((e=>o.L=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,o)})(e=this,c),1&c.o)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.S}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,xe(this,e,c.D)),b&&(clearTimeout(b),b=null),g?w.push(this):a.jmp((()=>(e=>{if(!(1&a.o)){const t=n(e),o=t.P,l=()=>{};if(1&t.o)xe(e,t,o.D),(null==t?void 0:t.t)||(null==t?void 0:t.F)&&t.F.then((()=>{}));else{t.o|=1,12&o.o&&(e=>{const t=e["s-cr"]=u.createComment("");t["s-cn"]=!0,me(e,t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ve(t,t.M=n);break}}o.N&&Object.entries(o.N).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let o;if(!(32&t.o)){if(t.o|=32,n.q){const e=(e=>{const t=e.S.replace(/-/g,"_"),n=e.q;if(!n)return;const o=r.get(n);return o?o[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};o=await e,t()}else o=e;if(!o)throw Error(`Constructor for "${n.S}#${t.G}" was not found`);o.isProxied||(n.U=o.watchers,Ce(o,n,2),o.isProxied=!0);const l=()=>{};t.o|=8;try{new o(t)}catch(e){s(e)}t.o&=-9,t.o|=128,l()}else o=e.constructor,customElements.whenDefined(e.localName).then((()=>t.o|=128));if(o&&o.style){let e;"string"==typeof o.style&&(e=o.style);const t=V(n);if(!i.has(t)){const o=()=>{};((e,t,n)=>{let o=i.get(e);h&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,i.set(e,o)})(t,e,!!(1&n.o)),o()}}}const l=t.M,c=()=>ye(t,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(e,t,o)}l()}})(this)))}disconnectedCallback(){a.jmp((()=>(async()=>{if(!(1&a.o)){const e=n(this);e.I&&(e.I.map((e=>e())),e.I=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.F)&&e.F.then((()=>{}))}})()))}componentOnReady(){return n(this).F}};c.q=e[0],p.includes(f)||m.get(f)||(d.push(f),m.define(f,Ce(v,c,1)))}))})),d.length>0&&(S&&($.textContent+=c),$.textContent+=d.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(l=a.T)?l:O(u);null!=e&&$.setAttribute("nonce",e),v.insertBefore($,y?y.nextSibling:v.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):a.jmp((()=>b=setTimeout(ke,30)))},Re=(e,t)=>t,xe=(e,t,n)=>{n&&n.map((([n,o,l])=>{const s=Te(e,n),r=Pe(t,l),i=Ae(n);a.ael(s,o,r,i),(t.I=t.I||[]).push((()=>a.rel(s,o,r,i)))}))},Pe=(e,t)=>n=>{var o;try{256&e.o?null==(o=e.t)||o[t](n):(e.R=e.R||[]).push([t,n])}catch(e){s(e)}},Te=(e,t)=>8&t?f:e,Ae=e=>({passive:!!(1&e),capture:!!(2&e)}),He=e=>a.T=e;export{Re as F,N as H,S as a,Me as b,q as c,F as g,H as h,d as p,o as r,He as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,a as t,h as a,F as i}from"./p-6d39391e.js";import{T as n,P as s,h as r,c as o}from"./p-a622755e.js";const d=class{constructor(t){e(this,t),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=t("../static/card-ground.svg"),d=t("../static/card-ground-over.svg");return a("div",{key:"13461fc9cf8b777337a539c15da4bb2781f5a837",class:`ElevateCardWrapper ${this.theme}`},a("div",{key:"526e72c0ada871f74ba4a07f0a125bc25840c09c",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},a("general-styling-wrapper",{key:"95e358ceb8fa3c247660f7ca15a4684b132874be",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl}),a("player-elevate-card-data",{key:"24c765d743446ac597a9dcc9cd22515e7e39e6db",params:this.paramProxy}),a("div",{key:"309db4bbfc244a7fb97827774d9d4383109ca0d7",class:"OuterCover Inner",style:{backgroundImage:`url(${d}`}},a("div",{key:"9d5614ded2f73b505e60900675a7d95b3cfbcbc6",class:"Content Row"},this.playerElevateLevel&&a(i,{key:"9a17e809083e61aad19f7ffef5d5ee5885ae8b4d"},a("div",{key:"47068df3c0070ee2785b0d0201b08766fe0d71e8",class:"PlayerImg"},a(s,{key:"40115f8b190d871c85f9531fbf0bafb8fbd739e2",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),a("div",{key:"278cd70c23ecb48655e90810af570ce5366d13d5",class:`LevelInfo ${this.playerElevateLevel.name}`},a("div",{key:"ce682ff881c5b12ed0b736ffcc67ad07b3713999",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:r("spendablePoints")),a("div",{key:"eeebc5c468cf6e3d566f708fd47a19956ad9defe",class:"PointsTxt SPPoints"},a(o,{key:"ad58990b7fa789cf2d5c524191447196e97c8a16",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),a("a",{key:"0dbdd6cd84e1cb43dac4485f4e3eec3130d6c65c",class:"TC",onClick:()=>{this.onDetailsClick()}},r("termAndConditions",this.language))),this.pointExpireString&&a("div",{key:"45c3267d390995fabe34974913adf97b112cf8c2",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};d.style=":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}";export{d as player_elevate_pointcard}
|