@everymatrix/gamification-dropdown 1.69.2 → 1.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/cjs/{gamification-dropdown-bacd4b01.js → gamification-dropdown-bacd3407.js} +4 -1
  2. package/dist/cjs/gamification-dropdown.cjs.js +1 -1
  3. package/dist/cjs/gamification-dropdown_4.cjs.entry.js +39 -26
  4. package/dist/cjs/index.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/player-elevate-card.cjs.entry.js +2 -1
  7. package/dist/cjs/player-elevate-pointcard.cjs.entry.js +3 -2
  8. package/dist/cjs/player-rakeback-card.cjs.entry.js +2 -1
  9. package/dist/collection/components/gamification-dropdown/gamification-dropdown.js +1 -1
  10. package/dist/esm/{gamification-dropdown-8eb8a896.js → gamification-dropdown-343647b2.js} +2 -2
  11. package/dist/esm/gamification-dropdown.js +1 -1
  12. package/dist/esm/gamification-dropdown_4.entry.js +40 -26
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/player-elevate-card.entry.js +2 -1
  16. package/dist/esm/player-elevate-pointcard.entry.js +3 -2
  17. package/dist/esm/player-rakeback-card.entry.js +2 -1
  18. package/dist/gamification-dropdown/gamification-dropdown-343647b2.js +1 -0
  19. package/dist/gamification-dropdown/gamification-dropdown.esm.js +1 -1
  20. package/dist/gamification-dropdown/gamification-dropdown_4.entry.js +1 -1
  21. package/dist/gamification-dropdown/index.esm.js +1 -1
  22. package/dist/gamification-dropdown/player-elevate-card.entry.js +1 -1
  23. package/dist/gamification-dropdown/player-elevate-pointcard.entry.js +1 -1
  24. package/dist/gamification-dropdown/player-rakeback-card.entry.js +1 -1
  25. package/package.json +1 -1
  26. package/dist/gamification-dropdown/gamification-dropdown-8eb8a896.js +0 -1
@@ -215,7 +215,7 @@ const GamificationDropdown = class {
215
215
  ? String(this.loyaltyPoints)
216
216
  : translate('gamificationNoPoints', this.language) }, typeof this.loyaltyPoints === 'number'
217
217
  ? `${this.loyaltyPoints} XP`
218
- : '...', index.h("span", { class: this.isOpen ? 'TriangleActive' : 'TriangleInactive' }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, index.h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && (index.h("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, index.h("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })))));
218
+ : '...', index.h("span", { class: this.isOpen ? 'TriangleActive' : 'TriangleInactive' }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, index.h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && (index.h("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, index.h("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "mb-source": this.mbSource })))));
219
219
  }
220
220
  }
221
221
  get el() { return index.getElement(this); }
@@ -228,3 +228,6 @@ const GamificationDropdown = class {
228
228
  GamificationDropdown.style = GamificationDropdownStyle0;
229
229
 
230
230
  exports.GamificationDropdown = GamificationDropdown;
231
+ exports.setClientStyling = setClientStyling;
232
+ exports.setClientStylingURL = setClientStylingURL;
233
+ exports.setStreamStyling = setStreamStyling;
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["gamification-dropdown_4.cjs",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card.cjs",[[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.cjs",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
22
+ return index.bootstrapLazy([["gamification-dropdown_4.cjs",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard.cjs",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const gamificationDropdown = require('./gamification-dropdown-bacd4b01.js');
5
+ const gamificationDropdown = require('./gamification-dropdown-bacd3407.js');
6
6
  const index = require('./index-43105bc3.js');
7
7
  const locale_utils = require('./locale.utils-6b4c0dbd.js');
8
8
  const playerElevateCardItems = require('./player-elevate-card-items-a02cb413.js');
@@ -47,38 +47,47 @@ const GeneralStylingWrapper = class {
47
47
  constructor(hostRef) {
48
48
  index.registerInstance(this, hostRef);
49
49
  this.stylingAppends = false;
50
- this.setClientStyling = () => {
51
- let sheet = document.createElement('style');
52
- sheet.innerHTML = this.clientStyling;
53
- this.el.prepend(sheet);
54
- };
55
- this.setClientStylingURL = () => {
56
- let url = new URL(this.clientStylingUrl);
57
- let cssFile = document.createElement('style');
58
- fetch(url.href)
59
- .then((res) => res.text())
60
- .then((data) => {
61
- cssFile.innerHTML = data;
62
- setTimeout(() => {
63
- this.el.prepend(cssFile);
64
- }, 1);
65
- })
66
- .catch((err) => {
67
- console.log('error ', err);
68
- });
69
- };
70
50
  this.clientStyling = '';
71
51
  this.clientStylingUrl = '';
52
+ this.mbSource = undefined;
72
53
  this.translationUrl = '';
73
54
  this.targetTranslations = undefined;
74
55
  }
56
+ componentDidLoad() {
57
+ if (this.el) {
58
+ if (window.emMessageBus != undefined) {
59
+ gamificationDropdown.setStreamStyling(this.el, `${this.mbSource}.Style`);
60
+ }
61
+ else {
62
+ if (this.clientStyling)
63
+ gamificationDropdown.setClientStyling(this.el, this.clientStyling);
64
+ if (this.clientStylingUrl)
65
+ gamificationDropdown.setClientStylingURL(this.el, this.clientStylingUrl);
66
+ this.stylingAppends = true;
67
+ }
68
+ }
69
+ }
70
+ disconnectedCallback() {
71
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
72
+ }
73
+ handleClientStylingChange(newValue, oldValue) {
74
+ if (newValue != oldValue) {
75
+ gamificationDropdown.setClientStyling(this.el, this.clientStyling);
76
+ }
77
+ }
78
+ handleClientStylingUrlChange(newValue, oldValue) {
79
+ if (newValue != oldValue) {
80
+ if (this.clientStylingUrl)
81
+ gamificationDropdown.setClientStylingURL(this.el, this.clientStylingUrl);
82
+ }
83
+ }
75
84
  componentDidRender() {
76
85
  // start custom styling area
77
86
  if (!this.stylingAppends) {
78
87
  if (this.clientStyling)
79
- this.setClientStyling();
88
+ gamificationDropdown.setClientStyling(this.el, this.clientStyling);
80
89
  if (this.clientStylingUrl)
81
- this.setClientStylingURL();
90
+ gamificationDropdown.setClientStylingURL(this.el, this.clientStylingUrl);
82
91
  this.stylingAppends = true;
83
92
  }
84
93
  // end custom styling area
@@ -92,9 +101,13 @@ const GeneralStylingWrapper = class {
92
101
  return await Promise.all(promises);
93
102
  }
94
103
  render() {
95
- return (index.h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, index.h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
104
+ return (index.h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, index.h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
96
105
  }
97
106
  get el() { return index.getElement(this); }
107
+ static get watchers() { return {
108
+ "clientStyling": ["handleClientStylingChange"],
109
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
110
+ }; }
98
111
  };
99
112
  GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
100
113
 
@@ -622,8 +635,8 @@ const PlayerElevateLoyaltycard = class {
622
635
  render() {
623
636
  const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
624
637
  const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
625
- return (index.h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '24dc58d3f4f6026b113239d1cc9ccfd316142ff9', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '0cbffe246628e3927bf76ce5b125b7419cafc25d', params: this.paramProxy }), index.h("div", { key: '36253daeadefe0b3ee2eb2eccb361e5033364202', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: '49f97f2c1cafa39556c34432557e000690698105', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '4eab6948bc49da8f28acd5d85364246495f81af5' }, index.h("div", { key: '5f95c9bbafc6f20df602adf279cfcbd069ab2319', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '53c37a7676b053ea9447e833053aa13fb67e0392', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: 'ce9b24f9bf2b87878edd04ac75ec64545fa62711', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: '79ab8fc735a7ddeb9b8786e3f832ec4188d5942f', class: 'CardCell ElevateLevel' }, index.h("span", { key: 'e7cf27215748ce93683ce95dde701dd991e6854b', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), index.h("div", { key: '0c4bfe25c728722d5e97e9728b642e3503940908', class: 'PointsRange' }, index.h(playerElevateCardItems.PlayerPoints, { key: 'f2fba862e377beafb8e7a682503cfce682fb863f', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), index.h(playerElevateCardItems.PlayerPoints, { key: 'a6fa3560bfb9acf7abc3bdb23acb6cb1f51ff0df', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: 'c185c3ac46e10ec9715fb081a05f9a8d4d8007f9' }), index.h("div", { key: 'd0f85005176bd8acc499cd8e5efe53b9ec2a3b80', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (index.h("div", { key: '763be6168567973ad3df88d116a97dd00d53a6d8', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
626
- index.h(playerElevateCardItems.LoyaltyLevelExpireDay, { key: '662982c38dd920149566a87503b5de1b123ee414', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
638
+ return (index.h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '3648821972ac115a1c33705463cdc2cdb427a95b', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: '7b36c46a869bd4b014d1f04dbb718445b23ec964', params: this.paramProxy }), index.h("div", { key: 'f4e5aa453459f693e07c166028aec9b0b696c907', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'd5f1894120cba3e7cf3c54b838a025f469bc445e', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '112ee04598b23dda6911f043101c0c1631454d7f' }, index.h("div", { key: '7af4b6e937bbe73cc00aae0f27f8c93da47bb626', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '1b5037bfa196063f56cccd947c988a3aca0781b0', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '7b714e446f4e01edd4f4aefcc035d070b7d6a47b', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: '37ad8ce5dae374685e74f6772d28e79d251932e3', class: 'CardCell ElevateLevel' }, index.h("span", { key: '2d9dcf4b08fcecc927d3e8bdca74c75ff4336480', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), index.h("div", { key: 'cc89cbaa70d9583b9626da15e98f9fd61d82f81f', class: 'PointsRange' }, index.h(playerElevateCardItems.PlayerPoints, { key: '32de4cac05a4fd5610af857b25e096a7cb9ba34d', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), index.h(playerElevateCardItems.PlayerPoints, { key: '298f492c8991384547c31396fc930b5c21f41501', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: 'aca4f5642c41db1c4b7fa04411331a5c25c655dd' }), index.h("div", { key: 'd841c5df319de105376c6eee24bc685757916aae', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (index.h("div", { key: '774279829f3f52ee5696550a855a833b39df8c81', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
639
+ index.h(playerElevateCardItems.LoyaltyLevelExpireDay, { key: '3a4319e502e85b26cb220942492b161ad842be82', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
627
640
  }
628
641
  static get watchers() { return {
629
642
  "session": ["onSessionOrEndpointChange"],
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const gamificationDropdown = require('./gamification-dropdown-bacd4b01.js');
5
+ const gamificationDropdown = require('./gamification-dropdown-bacd3407.js');
6
6
  require('./index-43105bc3.js');
7
7
 
8
8
 
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["gamification-dropdown_4.cjs",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card.cjs",[[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.cjs",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
11
+ return index.bootstrapLazy([["gamification-dropdown_4.cjs",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card.cjs",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard.cjs",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card.cjs",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -19,6 +19,7 @@ const PlayerElevateCard = class {
19
19
  this.language = 'en';
20
20
  this.playerName = undefined;
21
21
  this.dateFormat = 'yyyy-MM-dd';
22
+ this.mbSource = undefined;
22
23
  this.clientStyling = '';
23
24
  this.clientStylingUrl = '';
24
25
  this.translationUrl = '';
@@ -61,7 +62,7 @@ const PlayerElevateCard = class {
61
62
  render() {
62
63
  const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
63
64
  const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
64
- return (index.h("div", { key: '278a328dd084ee73b2707b93a57bccae64a2c9c7', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '68c885baf533447a7c77fd887bbec11e53768277', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '4066253a70cdd5e712ca244a708e7c1600c83071', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '64cda2a267c752056b3c7e3134cc324fa96bc261', params: this.paramProxy }), index.h("div", { key: 'c63ae83b401a35f5a78acd83dc3d7296c25141d7', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (index.h(index.Fragment, { key: 'ba16e5bb54259c17fd9e5aa0e3c03c2ec5d4263c' }, index.h("div", { key: 'fa1bf74f45e28318c95266cc42c54541bde92718', class: 'Content Row' }, index.h("div", { key: '7ede46f91bcc0d894b2b633627a4ca97d15fbe90', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: 'b6d0bac085e0178512b8a63ba8fccae7d4cc8399', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), index.h(playerElevateCardItems.PlayerPoints, { key: '88c445dbcd7dbe426a8de18beea02aecc03e26f3', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (index.h("div", { key: '4d985e486ecb74a6c916b28e619de83cb3d77ac1', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h("div", { key: '34e051ee1ff79b825fca57db958e1e5684a0aca1', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, index.h(playerElevateCardItems.PlayerNameDiv, { key: 'fa1b1f16e0b25c6adfba4c215e4ed377e05699b2', playerName: this.playerName }), index.h(playerElevateCardItems.PlayerElevateLoyaltyLevel, { key: '6d18b1422db202363ebcd56cc56946e0e071937b', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: '7dae355c4a5a9e28c70dced0ac061608f1753020' }), index.h(playerElevateCardItems.PlayerElevateCardRedeem, { key: '7e5f830b612c962a828c58f20a88dc97d315c910', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
65
+ return (index.h("div", { key: 'e976417483a756b8f67d70feb09afb544efb3802', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '5de2dbc7d093bbcbe7b415122effa691c058ddb6', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: '1a5b13640d37efab6dacee24e27f9f2bdc83cd0c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: 'e80389984932f77408c772ad9cb130de99e88504', params: this.paramProxy }), index.h("div", { key: 'fec6145e06a300bc044fec2f96e61dfe86f44d6c', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (index.h(index.Fragment, { key: '90b1f057c5d1d5ae286a75c3d30182c16593bbe6' }, index.h("div", { key: 'cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91', class: 'Content Row' }, index.h("div", { key: 'f3348ba8eb7bcb08085ab49ce2059c7fd86f862f', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '8fa96d942ee70d43ea0231b87f5d5de0b72198df', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), index.h(playerElevateCardItems.PlayerPoints, { key: 'f774e833169326404d44dd8c2361bd89f0e5a9e6', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (index.h("div", { key: 'c85b28e71be4e13df275f2ae74f5b0c9538b3cda', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), index.h("div", { key: '63ef752d5e25c3a65e5af7977b9e9f4846b8ba45', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, index.h(playerElevateCardItems.PlayerNameDiv, { key: '7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4', playerName: this.playerName }), index.h(playerElevateCardItems.PlayerElevateLoyaltyLevel, { key: '38d7c5aed410c9bf55e9640a98f6f74fc2d38291', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: '2e1305ff3bea4cb2f432f1187c40bb36a1464627' }), index.h(playerElevateCardItems.PlayerElevateCardRedeem, { key: '427405f246bec7a028b5164fc70292b769ea609b', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
65
66
  }
66
67
  static get assetsDirs() { return ["../static"]; }
67
68
  static get watchers() { return {
@@ -18,6 +18,7 @@ const PlayerElevatePointcard = class {
18
18
  this.session = undefined;
19
19
  this.playerAvatarUrl = undefined;
20
20
  this.language = 'en';
21
+ this.mbSource = undefined;
21
22
  this.playerName = undefined;
22
23
  this.cardTitle = undefined;
23
24
  this.buttonType = 'earningRule';
@@ -62,9 +63,9 @@ const PlayerElevatePointcard = class {
62
63
  render() {
63
64
  const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
64
65
  const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
65
- return (index.h("div", { key: 'ab47a39fc8fa5562e2843755b6b935296f6952fd', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '8b9ce754eb082af8005b40915e9b2e861ec99287', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'f7d660116db83ce86b36a558441bf02bf74592e6', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: 'f42375d3631031e7ef8041ccabe62659858e6ac0', params: this.paramProxy }), index.h("div", { key: '0b5eb08baa589ed85c96e0c5731ea7d93c76d398', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: '3b66d8f8baa7c510c04a6ebe73ba87fc1ba33426', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: 'fa0f8a796e0d08f18bd37ab193f1e6a49d6138b5' }, index.h("div", { key: 'ffe65be1e5d9f04a2c3711e9f61f56c95818244b', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '4947af0ebd6978f938d5f3f0185f8700a3506b75', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '2f0a7c4ef826f16472313cca974b4c208c33e83a', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: '118eabd6511b72fbb7c78a0ee2d190b719d708ae', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : locale_utils.translate('spendablePoints', this.language)), index.h("div", { key: '5a15d9630c51f23024ddd5967ef8753bac746936', class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { key: '7994e6b898d69a62ec8c4aeb0892a1c718104d7e', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: '8d25c48516245dc067676278cd861193ca4863bd', class: "TC", onClick: () => {
66
+ return (index.h("div", { key: '45aa5be359b46d5503a8310daa4db2029a8c59b8', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '0d1773bd9eb0913ede4eeedfc93f22967aa133d6', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'cfb35c5220633e39e25b11f0be5b6fc5cc73df5c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("player-elevate-card-data", { key: '25206c4deb6e51e3ea60259d4fee3452df8253d6', params: this.paramProxy }), index.h("div", { key: 'c14ee3498a1a584b7f484fe2ef6a204c337d2b27', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'dd7e0528034013d889f1f9bfbacf7928d2b4d1e9', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '20b36f112f735446a6219b61e012e4568f199717' }, index.h("div", { key: '3705136c1ee509484f43b7268b23cfbe273f727c', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: 'b81cbcff0528acd3253a676e0a64141c6414fc2a', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: 'ba1744b3b9cee03a424093df96454ff68d04aec1', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : locale_utils.translate('spendablePoints', this.language)), index.h("div", { key: '6b554d17a0f74684e23549365fb06f6079ba7239', class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { key: '6c9f812eccea99cd94095c252ba552816f800447', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: 'eb79d25c2ccce8c542a192c1ca07265649dbd1bc', class: "TC", onClick: () => {
66
67
  this.onDetailsClick();
67
- } }, locale_utils.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '6c221bd9a75643bce76e493addbb45cee6edf8b9', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
68
+ } }, locale_utils.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: 'e64127c87c4c4a3e5253606e2c4c472e9b728103', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
68
69
  }
69
70
  static get watchers() { return {
70
71
  "session": ["onSessionOrEndpointChange"],
@@ -31,6 +31,7 @@ const PlayerRakebackCard = class {
31
31
  this.theme = 'Dark';
32
32
  this.session = undefined;
33
33
  this.language = 'en';
34
+ this.mbSource = undefined;
34
35
  this.clientStyling = '';
35
36
  this.clientStylingUrl = '';
36
37
  this.translationUrl = '';
@@ -144,7 +145,7 @@ const PlayerRakebackCard = class {
144
145
  await this.onShowOrHasRakebackWalletChange();
145
146
  }
146
147
  render() {
147
- return this.showTheWidget ? (index.h("div", { class: "RakebackCard" }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("div", { class: "RakebackCardContent" }, index.h("div", { class: "RakebackTitle" }, locale_utils.translate('rakebackTitle', this.language)), index.h("div", { class: "RakebackDetails" }, index.h("div", { class: "RakebackInfo" }, index.h("div", { class: "RakebackNumContainer" }, index.h("span", { class: "RakebackNum" }, this.rakebackInfo.points), index.h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), index.h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, locale_utils.translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (index.h("div", { class: "RakebackCoolOff" }, locale_utils.translateWithParams('minutesCanClaim', {
148
+ return this.showTheWidget ? (index.h("div", { class: "RakebackCard" }, index.h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), index.h("div", { class: "RakebackCardContent" }, index.h("div", { class: "RakebackTitle" }, locale_utils.translate('rakebackTitle', this.language)), index.h("div", { class: "RakebackDetails" }, index.h("div", { class: "RakebackInfo" }, index.h("div", { class: "RakebackNumContainer" }, index.h("span", { class: "RakebackNum" }, this.rakebackInfo.points), index.h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), index.h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, locale_utils.translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (index.h("div", { class: "RakebackCoolOff" }, locale_utils.translateWithParams('minutesCanClaim', {
148
149
  lang: this.language,
149
150
  minutes: this.rakebackInfo.minutesCanClaim
150
151
  })))))) : null;
@@ -111,7 +111,7 @@ export class GamificationDropdown {
111
111
  ? String(this.loyaltyPoints)
112
112
  : translate('gamificationNoPoints', this.language) }, typeof this.loyaltyPoints === 'number'
113
113
  ? `${this.loyaltyPoints} XP`
114
- : '...', h("span", { class: this.isOpen ? 'TriangleActive' : 'TriangleInactive' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && (h("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, h("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })))));
114
+ : '...', h("span", { class: this.isOpen ? 'TriangleActive' : 'TriangleInactive' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && (h("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, h("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "mb-source": this.mbSource })))));
115
115
  }
116
116
  }
117
117
  static get is() { return "gamification-dropdown"; }
@@ -213,7 +213,7 @@ const GamificationDropdown = class {
213
213
  ? String(this.loyaltyPoints)
214
214
  : translate('gamificationNoPoints', this.language) }, typeof this.loyaltyPoints === 'number'
215
215
  ? `${this.loyaltyPoints} XP`
216
- : '...', h("span", { class: this.isOpen ? 'TriangleActive' : 'TriangleInactive' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && (h("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, h("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling })))));
216
+ : '...', h("span", { class: this.isOpen ? 'TriangleActive' : 'TriangleInactive' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "6.835", viewBox: "0 0 14 6.835" }, h("path", { id: "arrow", d: "M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z", transform: "translate(-274.511 -441.088)" })))), this.isOpen && (h("div", { class: "GamificationDropdown", onClick: this.navigateToGamification }, h("player-elevate-loyaltycard", { endpoint: this.endpoint, session: this.session, language: this.language, "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling, "mb-source": this.mbSource })))));
217
217
  }
218
218
  }
219
219
  get el() { return getElement(this); }
@@ -225,4 +225,4 @@ const GamificationDropdown = class {
225
225
  };
226
226
  GamificationDropdown.style = GamificationDropdownStyle0;
227
227
 
228
- export { GamificationDropdown as G };
228
+ export { GamificationDropdown as G, setClientStyling as a, setClientStylingURL as b, setStreamStyling as s };
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
19
+ return bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
20
20
  });
@@ -1,4 +1,5 @@
1
- export { G as gamification_dropdown } from './gamification-dropdown-8eb8a896.js';
1
+ import { s as setStreamStyling, a as setClientStyling, b as setClientStylingURL } from './gamification-dropdown-343647b2.js';
2
+ export { G as gamification_dropdown } from './gamification-dropdown-343647b2.js';
2
3
  import { r as registerInstance, h, g as getElement, c as createEvent, a as getAssetPath, F as Fragment } from './index-71b1bdfa.js';
3
4
  import { t as translateWithParams, T as TRANSLATIONS } from './locale.utils-34e6f004.js';
4
5
  import { r as requiredArgs, t as toDate, g as getTimezoneOffsetInMilliseconds, P as PlayerAvatar, a as PlayerPoints, b as PlayerLoyaltyProcess, L as LoyaltyLevelExpireDay } from './player-elevate-card-items-08c6fbd8.js';
@@ -43,38 +44,47 @@ const GeneralStylingWrapper = class {
43
44
  constructor(hostRef) {
44
45
  registerInstance(this, hostRef);
45
46
  this.stylingAppends = false;
46
- this.setClientStyling = () => {
47
- let sheet = document.createElement('style');
48
- sheet.innerHTML = this.clientStyling;
49
- this.el.prepend(sheet);
50
- };
51
- this.setClientStylingURL = () => {
52
- let url = new URL(this.clientStylingUrl);
53
- let cssFile = document.createElement('style');
54
- fetch(url.href)
55
- .then((res) => res.text())
56
- .then((data) => {
57
- cssFile.innerHTML = data;
58
- setTimeout(() => {
59
- this.el.prepend(cssFile);
60
- }, 1);
61
- })
62
- .catch((err) => {
63
- console.log('error ', err);
64
- });
65
- };
66
47
  this.clientStyling = '';
67
48
  this.clientStylingUrl = '';
49
+ this.mbSource = undefined;
68
50
  this.translationUrl = '';
69
51
  this.targetTranslations = undefined;
70
52
  }
53
+ componentDidLoad() {
54
+ if (this.el) {
55
+ if (window.emMessageBus != undefined) {
56
+ setStreamStyling(this.el, `${this.mbSource}.Style`);
57
+ }
58
+ else {
59
+ if (this.clientStyling)
60
+ setClientStyling(this.el, this.clientStyling);
61
+ if (this.clientStylingUrl)
62
+ setClientStylingURL(this.el, this.clientStylingUrl);
63
+ this.stylingAppends = true;
64
+ }
65
+ }
66
+ }
67
+ disconnectedCallback() {
68
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
69
+ }
70
+ handleClientStylingChange(newValue, oldValue) {
71
+ if (newValue != oldValue) {
72
+ setClientStyling(this.el, this.clientStyling);
73
+ }
74
+ }
75
+ handleClientStylingUrlChange(newValue, oldValue) {
76
+ if (newValue != oldValue) {
77
+ if (this.clientStylingUrl)
78
+ setClientStylingURL(this.el, this.clientStylingUrl);
79
+ }
80
+ }
71
81
  componentDidRender() {
72
82
  // start custom styling area
73
83
  if (!this.stylingAppends) {
74
84
  if (this.clientStyling)
75
- this.setClientStyling();
85
+ setClientStyling(this.el, this.clientStyling);
76
86
  if (this.clientStylingUrl)
77
- this.setClientStylingURL();
87
+ setClientStylingURL(this.el, this.clientStylingUrl);
78
88
  this.stylingAppends = true;
79
89
  }
80
90
  // end custom styling area
@@ -88,9 +98,13 @@ const GeneralStylingWrapper = class {
88
98
  return await Promise.all(promises);
89
99
  }
90
100
  render() {
91
- return (h("div", { key: '4d3414408c7662f88331dbe655966237f74d6958', class: "StyleShell" }, h("slot", { key: '1d004644d84602c4314bdf5dfc26b55b160f57df', name: "mainContent" })));
101
+ return (h("div", { key: '09ad83748bbad518743c8671b986c541c52bf3f0', class: "StyleShell" }, h("slot", { key: '3b28b776d3944410c717b002b70946d274a4e8e7', name: "mainContent" })));
92
102
  }
93
103
  get el() { return getElement(this); }
104
+ static get watchers() { return {
105
+ "clientStyling": ["handleClientStylingChange"],
106
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
107
+ }; }
94
108
  };
95
109
  GeneralStylingWrapper.style = GeneralStylingWrapperStyle0;
96
110
 
@@ -618,8 +632,8 @@ const PlayerElevateLoyaltycard = class {
618
632
  render() {
619
633
  const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
620
634
  const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
621
- return (h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '24dc58d3f4f6026b113239d1cc9ccfd316142ff9', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '0cbffe246628e3927bf76ce5b125b7419cafc25d', params: this.paramProxy }), h("div", { key: '36253daeadefe0b3ee2eb2eccb361e5033364202', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '49f97f2c1cafa39556c34432557e000690698105', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '4eab6948bc49da8f28acd5d85364246495f81af5' }, h("div", { key: '5f95c9bbafc6f20df602adf279cfcbd069ab2319', class: "PlayerImg" }, h(PlayerAvatar, { key: '53c37a7676b053ea9447e833053aa13fb67e0392', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: 'ce9b24f9bf2b87878edd04ac75ec64545fa62711', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: '79ab8fc735a7ddeb9b8786e3f832ec4188d5942f', class: 'CardCell ElevateLevel' }, h("span", { key: 'e7cf27215748ce93683ce95dde701dd991e6854b', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), h("div", { key: '0c4bfe25c728722d5e97e9728b642e3503940908', class: 'PointsRange' }, h(PlayerPoints, { key: 'f2fba862e377beafb8e7a682503cfce682fb863f', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), h(PlayerPoints, { key: 'a6fa3560bfb9acf7abc3bdb23acb6cb1f51ff0df', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), h(PlayerLoyaltyProcess, { key: 'c185c3ac46e10ec9715fb081a05f9a8d4d8007f9' }), h("div", { key: 'd0f85005176bd8acc499cd8e5efe53b9ec2a3b80', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (h("div", { key: '763be6168567973ad3df88d116a97dd00d53a6d8', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
622
- h(LoyaltyLevelExpireDay, { key: '662982c38dd920149566a87503b5de1b123ee414', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
635
+ return (h("div", { key: 'aa8f0d13a1e1d26ea7307d05fc50cda507172949', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '485075740ced316bf89f69359bdc8642dbb2af8f', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '3648821972ac115a1c33705463cdc2cdb427a95b', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: '7b36c46a869bd4b014d1f04dbb718445b23ec964', params: this.paramProxy }), h("div", { key: 'f4e5aa453459f693e07c166028aec9b0b696c907', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'd5f1894120cba3e7cf3c54b838a025f469bc445e', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '112ee04598b23dda6911f043101c0c1631454d7f' }, h("div", { key: '7af4b6e937bbe73cc00aae0f27f8c93da47bb626', class: "PlayerImg" }, h(PlayerAvatar, { key: '1b5037bfa196063f56cccd947c988a3aca0781b0', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '7b714e446f4e01edd4f4aefcc035d070b7d6a47b', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: '37ad8ce5dae374685e74f6772d28e79d251932e3', class: 'CardCell ElevateLevel' }, h("span", { key: '2d9dcf4b08fcecc927d3e8bdca74c75ff4336480', class: "LevelName", title: this.playerElevateLevel.name }, this.playerElevateLevel.name)), h("div", { key: 'cc89cbaa70d9583b9626da15e98f9fd61d82f81f', class: 'PointsRange' }, h(PlayerPoints, { key: '32de4cac05a4fd5610af857b25e096a7cb9ba34d', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), h(PlayerPoints, { key: '298f492c8991384547c31396fc930b5c21f41501', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), h(PlayerLoyaltyProcess, { key: 'aca4f5642c41db1c4b7fa04411331a5c25c655dd' }), h("div", { key: 'd841c5df319de105376c6eee24bc685757916aae', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (h("div", { key: '774279829f3f52ee5696550a855a833b39df8c81', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), this.playerElevateLevel.expireTime &&
636
+ h(LoyaltyLevelExpireDay, { key: '3a4319e502e85b26cb220942492b161ad842be82', expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language })))))))));
623
637
  }
624
638
  static get watchers() { return {
625
639
  "session": ["onSessionOrEndpointChange"],
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { G as GamificationDropdown } from './gamification-dropdown-8eb8a896.js';
1
+ export { G as GamificationDropdown } from './gamification-dropdown-343647b2.js';
2
2
  import './index-71b1bdfa.js';
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
8
+ return bootstrapLazy([["gamification-dropdown_4",[[1,"gamification-dropdown",{"endpoint":[513],"language":[513],"session":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"isOpen":[32],"isLoading":[32],"loyaltyPoints":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[1,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{"params":[8],"playerElevateLevel":[32],"pointExpireString":[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{"params":["onParamsChanged"]}],[4,"general-styling-wrapper",{"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"targetTranslations":[16]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"playerName":[513,"player-name"],"dateFormat":[513,"date-format"],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerLevelFlag":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{"endpoint":[513],"theme":[513],"session":[513],"playerAvatarUrl":[513,"player-avatar-url"],"language":[513],"mbSource":[513,"mb-source"],"playerName":[513,"player-name"],"cardTitle":[513,"card-title"],"buttonType":[513,"button-type"],"dateFormat":[513,"date-format"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"pointExpireString":[32],"playerElevateLevel":[32],"elevateWalletTotal":[32],"elevateSPTotal":[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{"endpoint":[513],"theme":[513],"session":[513],"language":[513],"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"show":[516],"rakebackInfo":[32],"isLoading":[32],"coolingOffPeriod":[32],"showTheWidget":[32]},[[8,"message","handleMessage"]],{"session":["onSessionOrEndpointChange"],"endpoint":["onSessionOrEndpointChange"],"language":["onSessionOrEndpointChange"],"show":["onShowOrHasRakebackWalletChange"],"rakebackInfo":["onShowOrHasRakebackWalletChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -15,6 +15,7 @@ const PlayerElevateCard = class {
15
15
  this.language = 'en';
16
16
  this.playerName = undefined;
17
17
  this.dateFormat = 'yyyy-MM-dd';
18
+ this.mbSource = undefined;
18
19
  this.clientStyling = '';
19
20
  this.clientStylingUrl = '';
20
21
  this.translationUrl = '';
@@ -57,7 +58,7 @@ const PlayerElevateCard = class {
57
58
  render() {
58
59
  const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
59
60
  const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
60
- 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 })))))))));
61
+ return (h("div", { key: 'e976417483a756b8f67d70feb09afb544efb3802', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '5de2dbc7d093bbcbe7b415122effa691c058ddb6', class: "Card Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: '1a5b13640d37efab6dacee24e27f9f2bdc83cd0c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: 'e80389984932f77408c772ad9cb130de99e88504', params: this.paramProxy }), h("div", { key: 'fec6145e06a300bc044fec2f96e61dfe86f44d6c', class: "OuterCover Inner", style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, this.playerElevateLevel && (h(Fragment, { key: '90b1f057c5d1d5ae286a75c3d30182c16593bbe6' }, h("div", { key: 'cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91', class: 'Content Row' }, h("div", { key: 'f3348ba8eb7bcb08085ab49ce2059c7fd86f862f', class: "PlayerImg" }, h(PlayerAvatar, { key: '8fa96d942ee70d43ea0231b87f5d5de0b72198df', playerAvatarUrl: this.playerAvatarUrl, loyaltyIconUrl: this.playerElevateLevel.presentation.asset }), h(PlayerPoints, { key: 'f774e833169326404d44dd8c2361bd89f0e5a9e6', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language })), this.pointExpireString && (h("div", { key: 'c85b28e71be4e13df275f2ae74f5b0c9538b3cda', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " ")), h("div", { key: '63ef752d5e25c3a65e5af7977b9e9f4846b8ba45', class: `LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}` }, h(PlayerNameDiv, { key: '7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4', playerName: this.playerName }), h(PlayerElevateLoyaltyLevel, { key: '38d7c5aed410c9bf55e9640a98f6f74fc2d38291', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h(PlayerLoyaltyProcess, { key: '2e1305ff3bea4cb2f432f1187c40bb36a1464627' }), h(PlayerElevateCardRedeem, { key: '427405f246bec7a028b5164fc70292b769ea609b', onRedeemClick: this.onRedeemClick, language: this.language })))))))));
61
62
  }
62
63
  static get assetsDirs() { return ["../static"]; }
63
64
  static get watchers() { return {
@@ -14,6 +14,7 @@ const PlayerElevatePointcard = class {
14
14
  this.session = undefined;
15
15
  this.playerAvatarUrl = undefined;
16
16
  this.language = 'en';
17
+ this.mbSource = undefined;
17
18
  this.playerName = undefined;
18
19
  this.cardTitle = undefined;
19
20
  this.buttonType = 'earningRule';
@@ -58,9 +59,9 @@ const PlayerElevatePointcard = class {
58
59
  render() {
59
60
  const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
60
61
  const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
61
- return (h("div", { key: 'ab47a39fc8fa5562e2843755b6b935296f6952fd', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '8b9ce754eb082af8005b40915e9b2e861ec99287', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'f7d660116db83ce86b36a558441bf02bf74592e6', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: 'f42375d3631031e7ef8041ccabe62659858e6ac0', params: this.paramProxy }), h("div", { key: '0b5eb08baa589ed85c96e0c5731ea7d93c76d398', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '3b66d8f8baa7c510c04a6ebe73ba87fc1ba33426', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: 'fa0f8a796e0d08f18bd37ab193f1e6a49d6138b5' }, h("div", { key: 'ffe65be1e5d9f04a2c3711e9f61f56c95818244b', class: "PlayerImg" }, h(PlayerAvatar, { key: '4947af0ebd6978f938d5f3f0185f8700a3506b75', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '2f0a7c4ef826f16472313cca974b4c208c33e83a', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: '118eabd6511b72fbb7c78a0ee2d190b719d708ae', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate('spendablePoints', this.language)), h("div", { key: '5a15d9630c51f23024ddd5967ef8753bac746936', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: '7994e6b898d69a62ec8c4aeb0892a1c718104d7e', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: '8d25c48516245dc067676278cd861193ca4863bd', class: "TC", onClick: () => {
62
+ return (h("div", { key: '45aa5be359b46d5503a8310daa4db2029a8c59b8', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '0d1773bd9eb0913ede4eeedfc93f22967aa133d6', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'cfb35c5220633e39e25b11f0be5b6fc5cc73df5c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-card-data", { key: '25206c4deb6e51e3ea60259d4fee3452df8253d6', params: this.paramProxy }), h("div", { key: 'c14ee3498a1a584b7f484fe2ef6a204c337d2b27', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'dd7e0528034013d889f1f9bfbacf7928d2b4d1e9', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '20b36f112f735446a6219b61e012e4568f199717' }, h("div", { key: '3705136c1ee509484f43b7268b23cfbe273f727c', class: "PlayerImg" }, h(PlayerAvatar, { key: 'b81cbcff0528acd3253a676e0a64141c6414fc2a', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: 'ba1744b3b9cee03a424093df96454ff68d04aec1', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate('spendablePoints', this.language)), h("div", { key: '6b554d17a0f74684e23549365fb06f6079ba7239', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: '6c9f812eccea99cd94095c252ba552816f800447', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: 'eb79d25c2ccce8c542a192c1ca07265649dbd1bc', class: "TC", onClick: () => {
62
63
  this.onDetailsClick();
63
- } }, translate('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '6c221bd9a75643bce76e493addbb45cee6edf8b9', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
64
+ } }, translate('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: 'e64127c87c4c4a3e5253606e2c4c472e9b728103', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
64
65
  }
65
66
  static get watchers() { return {
66
67
  "session": ["onSessionOrEndpointChange"],
@@ -27,6 +27,7 @@ const PlayerRakebackCard = class {
27
27
  this.theme = 'Dark';
28
28
  this.session = undefined;
29
29
  this.language = 'en';
30
+ this.mbSource = undefined;
30
31
  this.clientStyling = '';
31
32
  this.clientStylingUrl = '';
32
33
  this.translationUrl = '';
@@ -140,7 +141,7 @@ const PlayerRakebackCard = class {
140
141
  await this.onShowOrHasRakebackWalletChange();
141
142
  }
142
143
  render() {
143
- return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
144
+ return this.showTheWidget ? (h("div", { class: "RakebackCard" }, h("general-styling-wrapper", { clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("div", { class: "RakebackCardContent" }, h("div", { class: "RakebackTitle" }, translate('rakebackTitle', this.language)), h("div", { class: "RakebackDetails" }, h("div", { class: "RakebackInfo" }, h("div", { class: "RakebackNumContainer" }, h("span", { class: "RakebackNum" }, this.rakebackInfo.points), h("span", { class: "RakebackCurrency" }, this.rakebackInfo.currency))), h("div", { class: `RakebackButton ${this.isLoading || !this.rakebackInfo.claimable ? 'disabled' : ''}`, onClick: this.sendRakebackClaimedEvent }, translate('claim', this.language))), !this.rakebackInfo.claimable && this.rakebackInfo.showCanClaim && (h("div", { class: "RakebackCoolOff" }, translateWithParams('minutesCanClaim', {
144
145
  lang: this.language,
145
146
  minutes: this.rakebackInfo.minutesCanClaim
146
147
  })))))) : null;
@@ -0,0 +1 @@
1
+ import{r as i,h as t,g as o}from"./index-71b1bdfa.js";let n={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const s=i=>new Promise((t=>{fetch(i).then((i=>i.json())).then((i=>{Object.keys(i).forEach((t=>{n[t]||(n[t]={});for(let o in i[t])n[t][o]=i[t][o]})),t(!0)}))}));function e(i,t){if(i){const o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}}function a(i,t){const o=new URL(t);fetch(o.href).then((i=>i.text())).then((t=>{const o=document.createElement("style");o.innerHTML=t,i&&i.appendChild(o)})).catch((i=>{console.error("There was an error while trying to load client styling from URL",i)}))}function r(i,t){if(window.emMessageBus){const o=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{o.innerHTML=t,i&&i.appendChild(o)}))}}const l=class{constructor(t){i(this,t),this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=i=>{i.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=i=>{i.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)},this.endpoint=void 0,this.language="en",this.session="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,s(this.translationUrl).then((()=>{this.isLoading=!1}))}handleClientStylingChange(i,t){i!=t&&e(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,t){i!=t&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){if(this.translationUrl.length>2&&await s(this.translationUrl),this.endpoint&&this.language)return this.fetchPointsData()}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?r(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&e(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchPointsData(){let i=new URL(`${this.endpoint}/v1/elevate/playerInfo`);i.searchParams.append("language",this.language);const t=new Headers;t.append("X-SessionId",this.session);const o={method:"GET",headers:t};return new Promise(((t,n)=>{this.isLoading=!0,fetch(i.href,o).then((i=>i.json())).then((i=>{var o,n;this.loyaltyPoints=null===(n=null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.level)||void 0===n?void 0:n.loyaltyPoints,t(!0)})).catch((i=>{console.error(i),n(i)})).finally((()=>{this.isLoading=!1}))}))}render(){return this.isLoading?null:t("div",{ref:i=>this.stylingContainer=i,class:"GamificationDropdownContainer"},t("button",{class:"GamificationDropdownButton "+(this.isOpen?"IsOpen":""),type:"button",onClick:i=>this.handleDropdownClick(i),title:"number"==typeof this.loyaltyPoints?String(this.loyaltyPoints):(i=this.language,n[void 0!==i&&i in n?i:"en"].gamificationNoPoints)},"number"==typeof this.loyaltyPoints?`${this.loyaltyPoints} XP`:"...",t("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},t("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&t("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},t("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling,"mb-source":this.mbSource})));var i}get el(){return o(this)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};l.style=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}";export{l as G,e as a,a as b,r as s}
@@ -1 +1 @@
1
- import{p as e,b as n}from"./index-71b1bdfa.js";export{s as setNonce}from"./index-71b1bdfa.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,a={};return""!==n&&(a.resourcesUrl=new URL(".",n).href),e(a)})().then((async e=>(await a(),n([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],e))));
1
+ import{p as e,b as n}from"./index-71b1bdfa.js";export{s as setNonce}from"./index-71b1bdfa.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,a={};return""!==n&&(a.resourcesUrl=new URL(".",n).href),e(a)})().then((async e=>(await a(),n([["gamification-dropdown_4",[[1,"gamification-dropdown",{endpoint:[513],language:[513],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isOpen:[32],isLoading:[32],loyaltyPoints:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}],[1,"player-elevate-loyaltycard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[1,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"player-elevate-card-data",{params:[8],playerElevateLevel:[32],pointExpireString:[32]},[[9,"resize","handleWindowResizs"],[8,"redeemGiftButton","redeemGiftButtonHandler"]],{params:["onParamsChanged"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],targetTranslations:[16]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]],["player-elevate-card",[[1,"player-elevate-card",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],playerName:[513,"player-name"],dateFormat:[513,"date-format"],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerLevelFlag:[32],playerElevateLevel:[32],elevateWalletTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-elevate-pointcard",[[1,"player-elevate-pointcard",{endpoint:[513],theme:[513],session:[513],playerAvatarUrl:[513,"player-avatar-url"],language:[513],mbSource:[513,"mb-source"],playerName:[513,"player-name"],cardTitle:[513,"card-title"],buttonType:[513,"button-type"],dateFormat:[513,"date-format"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],pointExpireString:[32],playerElevateLevel:[32],elevateWalletTotal:[32],elevateSPTotal:[32]},[[0,"playerElevateLeveLoaded","playerElevateLeveLoadedHandler"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}]]],["player-rakeback-card",[[1,"player-rakeback-card",{endpoint:[513],theme:[513],session:[513],language:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],show:[516],rakebackInfo:[32],isLoading:[32],coolingOffPeriod:[32],showTheWidget:[32]},[[8,"message","handleMessage"]],{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}]]]],e))));
@@ -1 +1 @@
1
- export{G as gamification_dropdown}from"./gamification-dropdown-8eb8a896.js";import{r as e,h as n,g as t,c as a,a as i,F as r}from"./index-71b1bdfa.js";import{t as o,T as l}from"./locale.utils-34e6f004.js";import{r as s,t as d,g as c,P as v,a as h,b as f,L as p}from"./player-elevate-card-items-08c6fbd8.js";const g=class{constructor(n){e(this,n),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),n=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{n.innerHTML=e,setTimeout((()=>{this.el.prepend(n)}),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 a=(n=this.translationUrl,t=this.targetTranslations,new Promise((e=>{fetch(n).then((e=>e.json())).then((n=>{Object.keys(n).forEach((e=>{t[e]=t[e]||t.en,Object.keys(n[e]).forEach((a=>{t.en[a]&&(t[e][a]=t[e][a]||t.en[a],"object"==typeof n[e][a]?Object.keys(n[e][a]).forEach((i=>{t[e][a][i]=n[e][a][i]})):t[e][a]=n[e][a])}))})),e(!0)})).catch((n=>{console.error("Failed to load translations:",n),e(!1)}))})));e.push(a)}var n,t;return await Promise.all(e)}render(){return n("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},n("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return t(this)}};function x(e){s(1,arguments);var n=d(e);return n.setHours(0,0,0,0),n}function b(e,n){return s(2,arguments),d(e).getTime()-d(n).getTime()}g.style=":host{display:block}";var u={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function m(e){return e?u[e]:u.trunc}const w=class{constructor(n){e(this,n),this.playerElevateLeveLoaded=a(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){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(((n,t)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,n(!0)})).catch((e=>{t(e)}))))}calcuatePointsToBeExpired(e,n){let t="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort(((e,n)=>function(e,n){s(2,arguments);var t=d(e),a=d(n);return t.getTime()<a.getTime()}(new Date(e.expireTime),new Date(n.expireTime))?-1:1));const a=e.aboutToExpire[0],i=function(e,n){s(2,arguments);var t=x(e),a=x(n),i=t.getTime()-c(t),r=a.getTime()-c(a);return Math.round((i-r)/864e5)}(new Date(a.expireTime),new Date);let r=0,l=0,v=0===i?`${n}Day`:n;return i<=0&&(r=function(e,n,t){s(2,arguments);var a=b(e,n)/36e5;return m(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),v=r>1?`${n}Hours`:`${n}Hour`,r<=0&&(l=function(e,n,t){s(2,arguments);var a=b(e,n)/6e4;return m(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),v=l>1?`${n}Minutes`:`${n}Minute`)),t=o(v,{expirationPoints:a.points,expireDay:Math.max(i,r,l),lang:this.params.language}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((n,t)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var a,i,r;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void t(!0);let o=e.data;this.playerElevateLevel=o.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(a=o.spendableWallet)||void 0===a?void 0:a.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const l=null===(i=e.data.spendableWallet)||void 0===i?void 0:i.total,s=null===(r=e.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:l,loyaltyWalletTotal:s});let d=this.calcuatePointsToBeExpired(l,"coinsToBeExpired"),c=this.calcuatePointsToBeExpired(s,"pointsToBeExpired");(d||c)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:c}),n(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),t(!0)}))))}setLoyaltyProgress(e){!function(e,n){const t=e.querySelector("#total_level"),a=t.getBBox().width,i=n>1?1:n,r=i*a-17<0?0:i*a-17,o=e.querySelector("#current_level"),l=e.querySelector("#filter_current_level"),s=e.querySelector("#circle_current_level");t.setAttribute("viewbox",`0 0 ${r} 28`),o.setAttribute("width",`${r}`),s.setAttribute("cx",`${r<6.5?6.5:r}`),l.setAttribute("x",""+(r-8));const d=e.querySelector("#lock"),c=e.querySelector("#filter_heart_ball"),v=e.querySelector("#filter_ball"),h=e.querySelector("#filter_heart"),f=e.querySelector("#filter_lock"),p=e.querySelector("#paint0_linear_ball"),g=e.querySelector("#paint1_linear_lock"),x=e.querySelector("#lock_box"),b=e.querySelector("#heart_box"),u=a-10;d.setAttribute("cx",`${u}`),g.setAttribute("x1",`${u}`),g.setAttribute("x2",`${u}`),p.setAttribute("x1",""+(u-6)),p.setAttribute("x2",""+(u-6+11.2)),f.setAttribute("x",""+(u-6)),h.setAttribute("x",""+(u-6-2)),v.setAttribute("x",""+(u-6-2-2)),c.setAttribute("x",""+(u-6-2-2-4)),x.setAttribute("x",""+(u-6)),b.setAttribute("x",""+(u-6)),t.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,n)=>e.firstEntryPoints>n.firstEntryPoints?1:-1));const n=this.playerElevateLevel.loyaltyPoints;let t=0;this.levels.forEach(((e,a)=>{n>e.firstEntryPoints&&(t=a)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:t})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return t(this)}static get watchers(){return{params:["onParamsChanged"]}}};w.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(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--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(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--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(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--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(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--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(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--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(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--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(--emw--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: var(--emw--border-radius-medium, 10px);\n background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emw--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(--emw--color-red, #9e595f);\n}';const y=class{constructor(n){e(this,n),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}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}}getNextLevelPoints(){var e,n;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(n=this.playerElevateLevel)||void 0===n?void 0:n.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let n=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&n){const e=(n.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return o("tipsForNextLevel",{pointsToReach:e,levelName:n.name,lang:this.language})}return""}render(){const e=i("../static/card-ground.svg"),t=i("../static/card-ground-over.svg");return n("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},n("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},n("general-styling-wrapper",{key:"24dc58d3f4f6026b113239d1cc9ccfd316142ff9",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:l,translationUrl:this.translationUrl}),n("player-elevate-card-data",{key:"0cbffe246628e3927bf76ce5b125b7419cafc25d",params:this.paramProxy}),n("div",{key:"36253daeadefe0b3ee2eb2eccb361e5033364202",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},n("div",{key:"49f97f2c1cafa39556c34432557e000690698105",class:"Content Row"},this.playerElevateLevel&&n(r,{key:"4eab6948bc49da8f28acd5d85364246495f81af5"},n("div",{key:"5f95c9bbafc6f20df602adf279cfcbd069ab2319",class:"PlayerImg"},n(v,{key:"53c37a7676b053ea9447e833053aa13fb67e0392",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),n("div",{key:"ce9b24f9bf2b87878edd04ac75ec64545fa62711",class:`LevelInfo ${this.playerElevateLevel.name}`},n("div",{key:"79ab8fc735a7ddeb9b8786e3f832ec4188d5942f",class:"CardCell ElevateLevel"},n("span",{key:"e7cf27215748ce93683ce95dde701dd991e6854b",class:"LevelName",title:this.playerElevateLevel.name},this.playerElevateLevel.name)),n("div",{key:"0c4bfe25c728722d5e97e9728b642e3503940908",class:"PointsRange"},n(h,{key:"f2fba862e377beafb8e7a682503cfce682fb863f",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),n(h,{key:"a6fa3560bfb9acf7abc3bdb23acb6cb1f51ff0df",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),n(f,{key:"c185c3ac46e10ec9715fb081a05f9a8d4d8007f9"}),n("div",{key:"d0f85005176bd8acc499cd8e5efe53b9ec2a3b80",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&n("div",{key:"763be6168567973ad3df88d116a97dd00d53a6d8",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),this.playerElevateLevel.expireTime&&n(p,{key:"662982c38dd920149566a87503b5de1b123ee414",expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language})))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};y.style=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}";export{g as general_styling_wrapper,w as player_elevate_card_data,y as player_elevate_loyaltycard}
1
+ import{s as e,a as n,b as t}from"./gamification-dropdown-343647b2.js";export{G as gamification_dropdown}from"./gamification-dropdown-343647b2.js";import{r as a,h as i,g as r,c as l,a as o,F as s}from"./index-71b1bdfa.js";import{t as d,T as c}from"./locale.utils-34e6f004.js";import{r as h,t as v,g,P as p,a as f,b,L as x}from"./player-elevate-card-items-08c6fbd8.js";const u=class{constructor(e){a(this,e),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?e(this.el,`${this.mbSource}.Style`):(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&t(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&n(this.el,this.clientStyling)}handleClientStylingUrlChange(e,n){e!=n&&this.clientStylingUrl&&t(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&t(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const a=(n=this.translationUrl,t=this.targetTranslations,new Promise((e=>{fetch(n).then((e=>e.json())).then((n=>{Object.keys(n).forEach((e=>{t[e]=t[e]||t.en,Object.keys(n[e]).forEach((a=>{t.en[a]&&(t[e][a]=t[e][a]||t.en[a],"object"==typeof n[e][a]?Object.keys(n[e][a]).forEach((i=>{t[e][a][i]=n[e][a][i]})):t[e][a]=n[e][a])}))})),e(!0)})).catch((n=>{console.error("Failed to load translations:",n),e(!1)}))})));e.push(a)}var n,t;return await Promise.all(e)}render(){return i("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},i("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};function y(e){h(1,arguments);var n=v(e);return n.setHours(0,0,0,0),n}function w(e,n){return h(2,arguments),v(e).getTime()-v(n).getTime()}u.style=":host{display:block}";var m={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function L(e){return e?m[e]:m.trunc}const I=class{constructor(e){a(this,e),this.playerElevateLeveLoaded=l(this,"playerElevateLeveLoaded",7),this.params=void 0,this.playerElevateLevel=void 0,this.pointExpireString=void 0}handleWindowResizs(){this.initLevelProgressbar()}onParamsChanged(){this.loadElevateInfo()}redeemGiftButtonHandler(){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(((n,t)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,n(!0)})).catch((e=>{t(e)}))))}calcuatePointsToBeExpired(e,n){let t="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return t;e.aboutToExpire.sort(((e,n)=>function(e,n){h(2,arguments);var t=v(e),a=v(n);return t.getTime()<a.getTime()}(new Date(e.expireTime),new Date(n.expireTime))?-1:1));const a=e.aboutToExpire[0],i=function(e,n){h(2,arguments);var t=y(e),a=y(n),i=t.getTime()-g(t),r=a.getTime()-g(a);return Math.round((i-r)/864e5)}(new Date(a.expireTime),new Date);let r=0,l=0,o=0===i?`${n}Day`:n;return i<=0&&(r=function(e,n,t){h(2,arguments);var a=w(e,n)/36e5;return L(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),o=r>1?`${n}Hours`:`${n}Hour`,r<=0&&(l=function(e,n,t){h(2,arguments);var a=w(e,n)/6e4;return L(null==t?void 0:t.roundingMethod)(a)}(new Date(a.expireTime),new Date,{roundingMethod:"floor"}),o=l>1?`${n}Minutes`:`${n}Minute`)),t=d(o,{expirationPoints:a.points,expireDay:Math.max(i,r,l),lang:this.params.language}),t}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((n,t)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var a,i,r;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void t(!0);let l=e.data;this.playerElevateLevel=l.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(a=l.spendableWallet)||void 0===a?void 0:a.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(i=e.data.spendableWallet)||void 0===i?void 0:i.total,s=null===(r=e.data.loyaltyWallet)||void 0===r?void 0:r.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:s});let d=this.calcuatePointsToBeExpired(o,"coinsToBeExpired"),c=this.calcuatePointsToBeExpired(s,"pointsToBeExpired");(d||c)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:c}),n(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),t(!0)}))))}setLoyaltyProgress(e){!function(e,n){const t=e.querySelector("#total_level"),a=t.getBBox().width,i=n>1?1:n,r=i*a-17<0?0:i*a-17,l=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),s=e.querySelector("#circle_current_level");t.setAttribute("viewbox",`0 0 ${r} 28`),l.setAttribute("width",`${r}`),s.setAttribute("cx",`${r<6.5?6.5:r}`),o.setAttribute("x",""+(r-8));const d=e.querySelector("#lock"),c=e.querySelector("#filter_heart_ball"),h=e.querySelector("#filter_ball"),v=e.querySelector("#filter_heart"),g=e.querySelector("#filter_lock"),p=e.querySelector("#paint0_linear_ball"),f=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),x=e.querySelector("#heart_box"),u=a-10;d.setAttribute("cx",`${u}`),f.setAttribute("x1",`${u}`),f.setAttribute("x2",`${u}`),p.setAttribute("x1",""+(u-6)),p.setAttribute("x2",""+(u-6+11.2)),g.setAttribute("x",""+(u-6)),v.setAttribute("x",""+(u-6-2)),h.setAttribute("x",""+(u-6-2-2)),c.setAttribute("x",""+(u-6-2-2-4)),b.setAttribute("x",""+(u-6)),x.setAttribute("x",""+(u-6)),t.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,n)=>e.firstEntryPoints>n.firstEntryPoints?1:-1));const n=this.playerElevateLevel.loyaltyPoints;let t=0;this.levels.forEach(((e,a)=>{n>e.firstEntryPoints&&(t=a)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:t})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return r(this)}static get watchers(){return{params:["onParamsChanged"]}}};I.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(--emw--color-gray150, #efefef);\n}\n\n.Light {\n color: var(--emw--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(--emw--elevate-color-level0button-shadow, rgba(191, 84, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level0-bg0, #E2792C) 0%, var(--emw--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(--emw--elevate-color-level1button-shadow, rgba(151, 151, 151, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level1-bg0, #BEBFED) 0%, var(--emw--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(--emw--elevate-color-level2button-shadow, rgba(191, 120, 6, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level2-bg0, #FCC410) 0%, var(--emw--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(--emw--elevate-color-level3button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level3-bg0, #B1A2DB) 0%, var(--emw--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(--emw--elevate-color-level4button-shadow, rgba(65, 6, 191, 0.75));\n background: linear-gradient(180deg, var(--emw--elevate-color-level4-bg0, #B1A2DB) 0%, var(--emw--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(--emw--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: var(--emw--border-radius-medium, 10px);\n background: var(--emw--elevate-color-redeem-bg, linear-gradient(0deg, #26CC37, #26CC37)), linear-gradient(117.99deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.89%), linear-gradient(283.85deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 33.47%), linear-gradient(268.18deg, rgba(255, 255, 255, 0.6) -17.36%, rgba(239, 239, 239, 0) 15.78%);\n box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2509803922);\n}\n.Inner .Row .RedeemButton span {\n color: var(--emw--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(--emw--color-red, #9e595f);\n}';const C=class{constructor(e){a(this,e),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0}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}}getNextLevelPoints(){var e,n;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(n=this.playerElevateLevel)||void 0===n?void 0:n.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let n=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&n){const e=(n.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return d("tipsForNextLevel",{pointsToReach:e,levelName:n.name,lang:this.language})}return""}render(){const e=o("../static/card-ground.svg"),n=o("../static/card-ground-over.svg");return i("div",{key:"aa8f0d13a1e1d26ea7307d05fc50cda507172949",class:`ElevateCardWrapper ${this.theme}`},i("div",{key:"485075740ced316bf89f69359bdc8642dbb2af8f",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},i("general-styling-wrapper",{key:"3648821972ac115a1c33705463cdc2cdb427a95b",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:c,translationUrl:this.translationUrl,mbSource:this.mbSource}),i("player-elevate-card-data",{key:"7b36c46a869bd4b014d1f04dbb718445b23ec964",params:this.paramProxy}),i("div",{key:"f4e5aa453459f693e07c166028aec9b0b696c907",class:"OuterCover Inner",style:{backgroundImage:`url(${n}`}},i("div",{key:"d5f1894120cba3e7cf3c54b838a025f469bc445e",class:"Content Row"},this.playerElevateLevel&&i(s,{key:"112ee04598b23dda6911f043101c0c1631454d7f"},i("div",{key:"7af4b6e937bbe73cc00aae0f27f8c93da47bb626",class:"PlayerImg"},i(p,{key:"1b5037bfa196063f56cccd947c988a3aca0781b0",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i("div",{key:"7b714e446f4e01edd4f4aefcc035d070b7d6a47b",class:`LevelInfo ${this.playerElevateLevel.name}`},i("div",{key:"37ad8ce5dae374685e74f6772d28e79d251932e3",class:"CardCell ElevateLevel"},i("span",{key:"2d9dcf4b08fcecc927d3e8bdca74c75ff4336480",class:"LevelName",title:this.playerElevateLevel.name},this.playerElevateLevel.name)),i("div",{key:"cc89cbaa70d9583b9626da15e98f9fd61d82f81f",class:"PointsRange"},i(f,{key:"32de4cac05a4fd5610af857b25e096a7cb9ba34d",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),i(f,{key:"298f492c8991384547c31396fc930b5c21f41501",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),i(b,{key:"aca4f5642c41db1c4b7fa04411331a5c25c655dd"}),i("div",{key:"d841c5df319de105376c6eee24bc685757916aae",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&i("div",{key:"774279829f3f52ee5696550a855a833b39df8c81",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),this.playerElevateLevel.expireTime&&i(x,{key:"3a4319e502e85b26cb220942492b161ad842be82",expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language})))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};C.style=":host{display:block}@media screen and (min-width: 501px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:nowrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:6px;margin-left:0px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.ExpirationPoints{text-align:left;color:var(--emw--color-red-50, red)}.LoyaltyCard .Inner .PlayerAvatar .Avatar{display:none}.LoyaltyCard .Inner .PlayerAvatar .Badge{border-radius:50%;background-size:contain;width:100%;height:100%}.LoyaltyCard .Inner .LevelInfo .ElevateLevel{display:flex;flex:1;align-items:center}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{position:relative;padding-left:0px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate .ExpireTime{margin-left:5px}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .LevelName{padding-left:0;font-size:var(--emw--elevate-fontsize-2xlarge, 21px);position:relative;width:auto;color:var(--emw--elevate-color-levelname, #FFBD2B);font-weight:bold}.LoyaltyCard .PointsRange{display:flex;justify-content:space-between}.LoyaltyCard .PointsRange .PointsInfo{width:auto}.LoyaltyCard .NextLevelTip{text-align:right;font-size:11px;color:var(--emw--color-black, #000);opacity:0.8;font-weight:bold}";export{u as general_styling_wrapper,I as player_elevate_card_data,C as player_elevate_loyaltycard}
@@ -1 +1 @@
1
- export{G as GamificationDropdown}from"./gamification-dropdown-8eb8a896.js";import"./index-71b1bdfa.js";
1
+ export{G as GamificationDropdown}from"./gamification-dropdown-343647b2.js";import"./index-71b1bdfa.js";
@@ -1 +1 @@
1
- import{r as e,a as n,h as a,F as t}from"./index-71b1bdfa.js";import{P as i,a as s,c as r,d,b as c,e as o}from"./player-elevate-card-items-08c6fbd8.js";import{T as l}from"./locale.utils-34e6f004.js";const h=class{constructor(n){e(this,n),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.playerLevelFlag=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),e.detail.calculatedLevelFlag&&(this.playerLevelFlag=e.detail.calculatedLevelFlag))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language,calculateLevelFlag:!0}}render(){const e=n("../static/card-ground.svg"),h=n("../static/card-ground-over.svg");return a("div",{key:"278a328dd084ee73b2707b93a57bccae64a2c9c7",class:`ElevateCardWrapper ${this.theme}`},a("div",{key:"68c885baf533447a7c77fd887bbec11e53768277",class:"Card Outer",style:{backgroundImage:`url(${e}`}},a("general-styling-wrapper",{key:"4066253a70cdd5e712ca244a708e7c1600c83071",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:l,translationUrl:this.translationUrl}),a("player-elevate-card-data",{key:"64cda2a267c752056b3c7e3134cc324fa96bc261",params:this.paramProxy}),a("div",{key:"c63ae83b401a35f5a78acd83dc3d7296c25141d7",class:"OuterCover Inner",style:{backgroundImage:`url(${h}`}},this.playerElevateLevel&&a(t,{key:"ba16e5bb54259c17fd9e5aa0e3c03c2ec5d4263c"},a("div",{key:"fa1bf74f45e28318c95266cc42c54541bde92718",class:"Content Row"},a("div",{key:"7ede46f91bcc0d894b2b633627a4ca97d15fbe90",class:"PlayerImg"},a(i,{key:"b6d0bac085e0178512b8a63ba8fccae7d4cc8399",playerAvatarUrl:this.playerAvatarUrl,loyaltyIconUrl:this.playerElevateLevel.presentation.asset}),a(s,{key:"88c445dbcd7dbe426a8de18beea02aecc03e26f3",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language})),this.pointExpireString&&a("div",{key:"4d985e486ecb74a6c916b28e619de83cb3d77ac1",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),a("div",{key:"34e051ee1ff79b825fca57db958e1e5684a0aca1",class:`LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}`},a(r,{key:"fa1b1f16e0b25c6adfba4c215e4ed377e05699b2",playerName:this.playerName}),a(d,{key:"6d18b1422db202363ebcd56cc56946e0e071937b",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),a(c,{key:"7dae355c4a5a9e28c70dced0ac061608f1753020"}),a(o,{key:"7e5f830b612c962a828c58f20a88dc97d315c910",onRedeemClick:this.onRedeemClick,language:this.language})))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};h.style="@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(--emw--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}";export{h as player_elevate_card}
1
+ import{r as e,a as n,h as a,F as t}from"./index-71b1bdfa.js";import{P as i,a as s,c as r,d,b as o,e as l}from"./player-elevate-card-items-08c6fbd8.js";import{T as c}from"./locale.utils-34e6f004.js";const f=class{constructor(n){e(this,n),this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.dateFormat="yyyy-MM-dd",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerLevelFlag=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),e.detail.calculatedLevelFlag&&(this.playerLevelFlag=e.detail.calculatedLevelFlag))}onRedeemClick(){window.postMessage({type:"BEERedeemClicked"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language,calculateLevelFlag:!0}}render(){const e=n("../static/card-ground.svg"),f=n("../static/card-ground-over.svg");return a("div",{key:"e976417483a756b8f67d70feb09afb544efb3802",class:`ElevateCardWrapper ${this.theme}`},a("div",{key:"5de2dbc7d093bbcbe7b415122effa691c058ddb6",class:"Card Outer",style:{backgroundImage:`url(${e}`}},a("general-styling-wrapper",{key:"1a5b13640d37efab6dacee24e27f9f2bdc83cd0c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:c,translationUrl:this.translationUrl,mbSource:this.mbSource}),a("player-elevate-card-data",{key:"e80389984932f77408c772ad9cb130de99e88504",params:this.paramProxy}),a("div",{key:"fec6145e06a300bc044fec2f96e61dfe86f44d6c",class:"OuterCover Inner",style:{backgroundImage:`url(${f}`}},this.playerElevateLevel&&a(t,{key:"90b1f057c5d1d5ae286a75c3d30182c16593bbe6"},a("div",{key:"cf5a0cc332fc6beafe079a2b500ebbc1f8d21b91",class:"Content Row"},a("div",{key:"f3348ba8eb7bcb08085ab49ce2059c7fd86f862f",class:"PlayerImg"},a(i,{key:"8fa96d942ee70d43ea0231b87f5d5de0b72198df",playerAvatarUrl:this.playerAvatarUrl,loyaltyIconUrl:this.playerElevateLevel.presentation.asset}),a(s,{key:"f774e833169326404d44dd8c2361bd89f0e5a9e6",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language})),this.pointExpireString&&a("div",{key:"c85b28e71be4e13df275f2ae74f5b0c9538b3cda",class:"PointsInfo ExpirationPoints"},this.pointExpireString," "),a("div",{key:"63ef752d5e25c3a65e5af7977b9e9f4846b8ba45",class:`LevelInfo Level${this.playerLevelFlag} ${this.playerElevateLevel.presentation.displayName}`},a(r,{key:"7cc0d416fe0aadc1b7406b95b31d23ad2ca45ba4",playerName:this.playerName}),a(d,{key:"38d7c5aed410c9bf55e9640a98f6f74fc2d38291",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),a(o,{key:"2e1305ff3bea4cb2f432f1187c40bb36a1464627"}),a(l,{key:"427405f246bec7a028b5164fc70292b769ea609b",onRedeemClick:this.onRedeemClick,language:this.language})))))))}static get assetsDirs(){return["../static"]}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};f.style="@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(--emw--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}";export{f as player_elevate_card}
@@ -1 +1 @@
1
- import{r as e,a,h as t,F as i}from"./index-71b1bdfa.js";import{T as n,a as s}from"./locale.utils-34e6f004.js";import{P as r,a as o}from"./player-elevate-card-items-08c6fbd8.js";const d=class{constructor(a){e(this,a),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=a("../static/card-ground.svg"),d=a("../static/card-ground-over.svg");return t("div",{key:"ab47a39fc8fa5562e2843755b6b935296f6952fd",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"8b9ce754eb082af8005b40915e9b2e861ec99287",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"f7d660116db83ce86b36a558441bf02bf74592e6",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl}),t("player-elevate-card-data",{key:"f42375d3631031e7ef8041ccabe62659858e6ac0",params:this.paramProxy}),t("div",{key:"0b5eb08baa589ed85c96e0c5731ea7d93c76d398",class:"OuterCover Inner",style:{backgroundImage:`url(${d}`}},t("div",{key:"3b66d8f8baa7c510c04a6ebe73ba87fc1ba33426",class:"Content Row"},this.playerElevateLevel&&t(i,{key:"fa0f8a796e0d08f18bd37ab193f1e6a49d6138b5"},t("div",{key:"ffe65be1e5d9f04a2c3711e9f61f56c95818244b",class:"PlayerImg"},t(r,{key:"4947af0ebd6978f938d5f3f0185f8700a3506b75",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),t("div",{key:"2f0a7c4ef826f16472313cca974b4c208c33e83a",class:`LevelInfo ${this.playerElevateLevel.name}`},t("div",{key:"118eabd6511b72fbb7c78a0ee2d190b719d708ae",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:s("spendablePoints",this.language)),t("div",{key:"5a15d9630c51f23024ddd5967ef8753bac746936",class:"PointsTxt SPPoints"},t(o,{key:"7994e6b898d69a62ec8c4aeb0892a1c718104d7e",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),t("a",{key:"8d25c48516245dc067676278cd861193ca4863bd",class:"TC",onClick:()=>{this.onDetailsClick()}},s("termAndConditions",this.language))),this.pointExpireString&&t("div",{key:"6c221bd9a75643bce76e493addbb45cee6edf8b9",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(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--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}
1
+ import{r as e,a as t,h as i,F as a}from"./index-71b1bdfa.js";import{T as n,a as s}from"./locale.utils-34e6f004.js";import{P as r,a as o}from"./player-elevate-card-items-08c6fbd8.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.mbSource=void 0,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 i("div",{key:"45aa5be359b46d5503a8310daa4db2029a8c59b8",class:`ElevateCardWrapper ${this.theme}`},i("div",{key:"0d1773bd9eb0913ede4eeedfc93f22967aa133d6",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},i("general-styling-wrapper",{key:"cfb35c5220633e39e25b11f0be5b6fc5cc73df5c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl,mbSource:this.mbSource}),i("player-elevate-card-data",{key:"25206c4deb6e51e3ea60259d4fee3452df8253d6",params:this.paramProxy}),i("div",{key:"c14ee3498a1a584b7f484fe2ef6a204c337d2b27",class:"OuterCover Inner",style:{backgroundImage:`url(${d}`}},i("div",{key:"dd7e0528034013d889f1f9bfbacf7928d2b4d1e9",class:"Content Row"},this.playerElevateLevel&&i(a,{key:"20b36f112f735446a6219b61e012e4568f199717"},i("div",{key:"3705136c1ee509484f43b7268b23cfbe273f727c",class:"PlayerImg"},i(r,{key:"b81cbcff0528acd3253a676e0a64141c6414fc2a",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i("div",{key:"311b3ffcdf8a3ffe4b609fd0f1d9dee83424ca58",class:`LevelInfo ${this.playerElevateLevel.name}`},i("div",{key:"ba1744b3b9cee03a424093df96454ff68d04aec1",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:s("spendablePoints",this.language)),i("div",{key:"6b554d17a0f74684e23549365fb06f6079ba7239",class:"PointsTxt SPPoints"},i(o,{key:"6c9f812eccea99cd94095c252ba552816f800447",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),i("a",{key:"eb79d25c2ccce8c542a192c1ca07265649dbd1bc",class:"TC",onClick:()=>{this.onDetailsClick()}},s("termAndConditions",this.language))),this.pointExpireString&&i("div",{key:"e64127c87c4c4a3e5253606e2c4c472e9b728103",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(--emw--color-gray-150, #6D6D6D)}.PointsCard .Inner .DetailButton span{display:inline-block;vertical-align:middle}.PointsCard .Inner .DetailButton:hover span{color:var(--emw--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}
@@ -1 +1 @@
1
- import{r as a,h as e}from"./index-71b1bdfa.js";import{a as t,t as i,T as n}from"./locale.utils-34e6f004.js";const r=class{constructor(e){a(this,e),this.truncateNumber=(a,e=2)=>{const t=a.toString(),[i,n=""]=t.split(".");return e>0?`${i}.${n?n.slice(0,e):"00"}`:`${i}`},this.sendRakebackClaimedEvent=()=>{this.endpoint&&this.session&&this.rakebackInfo.claimable&&!this.isLoading&&window.postMessage({type:"RakebackClaimTrigger",points:this.rakebackInfo.points},window.location.href)},this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.show=!0,this.rakebackInfo={hasRakebackWallet:!1,points:0,currency:"TRY",claimable:!1,minutesCanClaim:0,showCanClaim:!1},this.isLoading=!1,this.coolingOffPeriod=!1,this.showTheWidget=!1}async onSessionOrEndpointChange(){await this.loadRakebackInfo()}async onShowOrHasRakebackWalletChange(){this.showTheWidget=this.show&&this.rakebackInfo.hasRakebackWallet}handleMessage(a){const{type:e}=null==a?void 0:a.data;"RakebackClaimConfirmed"===e&&this.claimRakeback()}async loadRakebackInfo(){if(this.endpoint&&this.session){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`),e=await fetch(a.href,{method:"GET",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to load rakeback info");const{rakebackWallet:i}=null==t?void 0:t.data;if(!i)return void window.postMessage({type:"RakebackWalletMissing"},window.location.href);const{total:n,claimable:r,currency:o,minutesCanClaim:s}=i||{};this.rakebackInfo={hasRakebackWallet:!0,points:(null==n?void 0:n.points)?this.truncateNumber(n.points,2):"0.00",currency:o||"",claimable:r||!1,showCanClaim:Boolean(s&&s>0),minutesCanClaim:s?s<=1&&s>0?1:this.truncateNumber(s,0):0}}catch(a){console.error("Error loading rakeback info:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}}async claimRakeback(){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/rakeback/claim`),e=await fetch(a.href,{method:"PUT",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to claim rakeback");await this.loadRakebackInfo(),window.postMessage({type:"RakebackClaimed",points:this.rakebackInfo.points},window.location.href)}catch(a){console.error("Error claiming rakeback:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}async componentWillLoad(){await this.loadRakebackInfo(),await this.onShowOrHasRakebackWalletChange()}render(){return this.showTheWidget?e("div",{class:"RakebackCard"},e("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl}),e("div",{class:"RakebackCardContent"},e("div",{class:"RakebackTitle"},t("rakebackTitle",this.language)),e("div",{class:"RakebackDetails"},e("div",{class:"RakebackInfo"},e("div",{class:"RakebackNumContainer"},e("span",{class:"RakebackNum"},this.rakebackInfo.points),e("span",{class:"RakebackCurrency"},this.rakebackInfo.currency))),e("div",{class:"RakebackButton "+(this.isLoading||!this.rakebackInfo.claimable?"disabled":""),onClick:this.sendRakebackClaimedEvent},t("claim",this.language))),!this.rakebackInfo.claimable&&this.rakebackInfo.showCanClaim&&e("div",{class:"RakebackCoolOff"},i("minutesCanClaim",{lang:this.language,minutes:this.rakebackInfo.minutesCanClaim})))):null}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}}};r.style=":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}";export{r as player_rakeback_card}
1
+ import{r as a,h as e}from"./index-71b1bdfa.js";import{a as t,t as i,T as n}from"./locale.utils-34e6f004.js";const r=class{constructor(e){a(this,e),this.truncateNumber=(a,e=2)=>{const t=a.toString(),[i,n=""]=t.split(".");return e>0?`${i}.${n?n.slice(0,e):"00"}`:`${i}`},this.sendRakebackClaimedEvent=()=>{this.endpoint&&this.session&&this.rakebackInfo.claimable&&!this.isLoading&&window.postMessage({type:"RakebackClaimTrigger",points:this.rakebackInfo.points},window.location.href)},this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.language="en",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.show=!0,this.rakebackInfo={hasRakebackWallet:!1,points:0,currency:"TRY",claimable:!1,minutesCanClaim:0,showCanClaim:!1},this.isLoading=!1,this.coolingOffPeriod=!1,this.showTheWidget=!1}async onSessionOrEndpointChange(){await this.loadRakebackInfo()}async onShowOrHasRakebackWalletChange(){this.showTheWidget=this.show&&this.rakebackInfo.hasRakebackWallet}handleMessage(a){const{type:e}=null==a?void 0:a.data;"RakebackClaimConfirmed"===e&&this.claimRakeback()}async loadRakebackInfo(){if(this.endpoint&&this.session){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/playerInfo?language=${this.language}`),e=await fetch(a.href,{method:"GET",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to load rakeback info");const{rakebackWallet:i}=null==t?void 0:t.data;if(!i)return void window.postMessage({type:"RakebackWalletMissing"},window.location.href);const{total:n,claimable:r,currency:o,minutesCanClaim:s}=i||{};this.rakebackInfo={hasRakebackWallet:!0,points:(null==n?void 0:n.points)?this.truncateNumber(n.points,2):"0.00",currency:o||"",claimable:r||!1,showCanClaim:Boolean(s&&s>0),minutesCanClaim:s?s<=1&&s>0?1:this.truncateNumber(s,0):0}}catch(a){console.error("Error loading rakeback info:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}}async claimRakeback(){this.isLoading=!0;try{const a=new URL(`${this.endpoint}/v1/elevate/rakeback/claim`),e=await fetch(a.href,{method:"PUT",headers:{"X-Sessionid":this.session,"Content-Type":"application/json"},body:JSON.stringify({})});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();if(!t.success)throw new Error(t.errorMessage||"Failed to claim rakeback");await this.loadRakebackInfo(),window.postMessage({type:"RakebackClaimed",points:this.rakebackInfo.points},window.location.href)}catch(a){console.error("Error claiming rakeback:",a),window.postMessage({type:"RakebackClaimError",message:a.message},window.location.href)}finally{this.isLoading=!1}}async componentWillLoad(){await this.loadRakebackInfo(),await this.onShowOrHasRakebackWalletChange()}render(){return this.showTheWidget?e("div",{class:"RakebackCard"},e("general-styling-wrapper",{clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl,mbSource:this.mbSource}),e("div",{class:"RakebackCardContent"},e("div",{class:"RakebackTitle"},t("rakebackTitle",this.language)),e("div",{class:"RakebackDetails"},e("div",{class:"RakebackInfo"},e("div",{class:"RakebackNumContainer"},e("span",{class:"RakebackNum"},this.rakebackInfo.points),e("span",{class:"RakebackCurrency"},this.rakebackInfo.currency))),e("div",{class:"RakebackButton "+(this.isLoading||!this.rakebackInfo.claimable?"disabled":""),onClick:this.sendRakebackClaimedEvent},t("claim",this.language))),!this.rakebackInfo.claimable&&this.rakebackInfo.showCanClaim&&e("div",{class:"RakebackCoolOff"},i("minutesCanClaim",{lang:this.language,minutes:this.rakebackInfo.minutesCanClaim})))):null}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"],show:["onShowOrHasRakebackWalletChange"],rakebackInfo:["onShowOrHasRakebackWalletChange"]}}};r.style=":host{display:block}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0deg)}}.RakebackCard{border:2px solid var(--em-color-border-primary, #003E5C);padding:32px;border-radius:var(--emw--border-radius-medium, 12px);overflow:hidden;font-family:inherit}.RakebackCard .RakebackCardContent .RakebackTitle{font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--em-color-text-secondary, #727672)}.RakebackCard .RakebackCardContent .RakebackDetails{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;margin-top:17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo{display:flex;flex-wrap:wrap;align-items:center;gap:0 17px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh{width:52px;height:52px;cursor:pointer}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackRefresh.RakebackLoading{animation:rotate 0.5s linear infinite}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer{color:var(--em-color-text-primary, #fff);display:flex;align-items:center;gap:8px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackNum{display:inline-block;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-2x-large, 36px)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackInfo .RakebackNumContainer .RakebackCurrency{display:inline-block;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-small, 14px);margin-top:14px}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton{font-family:inherit;cursor:pointer;width:90px;height:34px;border-radius:var(--emw--border-radius-large, 99px);border:2px solid var(--em-color-border-success, #083B17);display:flex;justify-content:center;align-items:center;color:var(--em-color-text-primary, #fff);background:linear-gradient(180deg, var(--em-color-gradient-1, #24B24E) 0%, var(--em-color-gradient-1, #24B24E) 100%)}.RakebackCard .RakebackCardContent .RakebackDetails .RakebackButton.disabled{cursor:not-allowed;opacity:0.4}.RakebackCard .RakebackCardContent .RakebackCoolOff,.RakebackCard .RakebackCardContent .RakebackError{margin-top:8px;font-weight:var(--emw--font-weight-semibold, 500);font-size:var(--emw--font-size-x-small, 12px);color:var(--em-color-text-error, #FF7A73);text-align:center}";export{r as player_rakeback_card}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/gamification-dropdown",
3
- "version": "1.69.2",
3
+ "version": "1.70.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as i,h as t,g as o}from"./index-71b1bdfa.js";let n={en:{gamificationNoPoints:"No points"},de:{gamificationNoPoints:"No points"},ro:{gamificationNoPoints:"No points"},fr:{gamificationNoPoints:"No points"},ar:{gamificationNoPoints:"No points"},hr:{gamificationNoPoints:"No points"}};const s=i=>new Promise((t=>{fetch(i).then((i=>i.json())).then((i=>{Object.keys(i).forEach((t=>{n[t]||(n[t]={});for(let o in i[t])n[t][o]=i[t][o]})),t(!0)}))}));function e(i,t){if(i){const o=document.createElement("style");o.innerHTML=t,i.appendChild(o)}}function a(i,t){const o=new URL(t);fetch(o.href).then((i=>i.text())).then((t=>{const o=document.createElement("style");o.innerHTML=t,i&&i.appendChild(o)})).catch((i=>{console.error("There was an error while trying to load client styling from URL",i)}))}const r=class{constructor(t){i(this,t),this.navigateToGamification=()=>{window.postMessage({type:"NavigateToGamification"},window.location.href),this.isOpen=!1},this.handleOutsideClick=i=>{i.composedPath().includes(this.el)||(this.isOpen=!1,document.removeEventListener("click",this.handleOutsideClick))},this.handleDropdownClick=i=>{i.stopPropagation(),this.isOpen=!this.isOpen,this.isOpen?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)},this.endpoint=void 0,this.language="en",this.session="",this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.isOpen=!1,this.isLoading=!1,this.loyaltyPoints=void 0}handleNewTranslations(){this.isLoading=!0,s(this.translationUrl).then((()=>{this.isLoading=!1}))}handleClientStylingChange(i,t){i!=t&&e(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(i,t){i!=t&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){if(this.translationUrl.length>2&&await s(this.translationUrl),this.endpoint&&this.language)return this.fetchPointsData()}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(i,t){if(window.emMessageBus){const o=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{o.innerHTML=t,i&&i.appendChild(o)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&e(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}fetchPointsData(){let i=new URL(`${this.endpoint}/v1/elevate/playerInfo`);i.searchParams.append("language",this.language);const t=new Headers;t.append("X-SessionId",this.session);const o={method:"GET",headers:t};return new Promise(((t,n)=>{this.isLoading=!0,fetch(i.href,o).then((i=>i.json())).then((i=>{var o,n;this.loyaltyPoints=null===(n=null===(o=null==i?void 0:i.data)||void 0===o?void 0:o.level)||void 0===n?void 0:n.loyaltyPoints,t(!0)})).catch((i=>{console.error(i),n(i)})).finally((()=>{this.isLoading=!1}))}))}render(){return this.isLoading?null:t("div",{ref:i=>this.stylingContainer=i,class:"GamificationDropdownContainer"},t("button",{class:"GamificationDropdownButton "+(this.isOpen?"IsOpen":""),type:"button",onClick:i=>this.handleDropdownClick(i),title:"number"==typeof this.loyaltyPoints?String(this.loyaltyPoints):(i=this.language,n[void 0!==i&&i in n?i:"en"].gamificationNoPoints)},"number"==typeof this.loyaltyPoints?`${this.loyaltyPoints} XP`:"...",t("span",{class:this.isOpen?"TriangleActive":"TriangleInactive"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},t("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),this.isOpen&&t("div",{class:"GamificationDropdown",onClick:this.navigateToGamification},t("player-elevate-loyaltycard",{endpoint:this.endpoint,session:this.session,language:this.language,"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling})));var i}get el(){return o(this)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};r.style=":host{display:block}.GamificationDropdownContainer{position:relative}.GamificationDropdownContainer .GamificationDropdown{position:absolute;left:0;z-index:200;overflow:hidden;cursor:pointer}.GamificationDropdownButton{cursor:pointer;font-size:14px;height:20px;background-color:unset;color:var(--emw--color-typography, #FFFFFF);padding:0;border:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;align-items:center;justify-content:center;line-height:0}.GamificationDropdownButton:hover{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton:hover svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen{color:var(--emw--color-primary, #52d004)}.GamificationDropdownButton.IsOpen svg{fill:var(--emw--color-primary, #52d004)}.GamificationDropdownButton .TriangleActive,.GamificationDropdownButton .TriangleInactive{display:block;transition:all 0.2s}.GamificationDropdownButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:4px}.GamificationDropdownButton svg{fill:var(--emw--color-typography, #FFFFFF);margin-left:8px;width:16px}";export{r as G}