@everymatrix/player-elevate-points-history 1.67.3 → 1.69.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 (16) hide show
  1. package/dist/cjs/bonus-pagination-limits_6.cjs.entry.js +2 -2
  2. package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +1 -1
  3. package/dist/esm/bonus-pagination-limits_6.entry.js +2 -2
  4. package/dist/esm/player-elevate-loyaltycard.entry.js +1 -1
  5. package/dist/player-elevate-points-history/bonus-pagination-limits_6.entry.js +1 -1
  6. package/dist/player-elevate-points-history/player-elevate-loyaltycard.entry.js +1 -1
  7. package/package.json +1 -1
  8. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  9. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.d.ts +0 -0
  10. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.dev.d.ts +0 -0
  11. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/storybook/main.d.ts +0 -0
  12. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/storybook/preview.d.ts +0 -0
  13. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/index.d.ts +0 -0
  14. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  15. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  16. /package/dist/types/Users/{sebastian.strulea/Documents/work → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -879,9 +879,9 @@ const PlayerElevatePointcard = class {
879
879
  render() {
880
880
  const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
881
881
  const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
882
- return (index.h("div", { key: '4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: 'ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '4371faac6967c5b3eced57f6251064ea4e1d6a65', params: this.paramProxy }), index.h("div", { key: 'c78235a6fdc2aed90df898f007b5ee091cece8dc', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: '025e779223c1c85c11998be8389a8ff836a31e6c', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '68daa6047dc93d2596d8b2309a26f56960737617' }, index.h("div", { key: '6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: 'aeaf35ad8055ad4f7312922c8600ea58d09be74f', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: 'bd51ce868b4d8a547f40ec55548bbf3cfa416534', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: '5f4d77a5b43c8efee850b9813bc1c8e61d27d45d', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : locale_utils.translate('spendablePoints')), index.h("div", { key: 'bae5dc76d00c98aed803601c19fe3bf1aa4418d5', class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { key: '59d51bd37f44ed23108fc4356af41c01668354e3', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: '3a923bea242ae5fa412f4448dca7277b3588621e', class: "TC", onClick: () => {
882
+ return (index.h("div", { key: '4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: 'ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: '4371faac6967c5b3eced57f6251064ea4e1d6a65', params: this.paramProxy }), index.h("div", { key: 'c78235a6fdc2aed90df898f007b5ee091cece8dc', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: '025e779223c1c85c11998be8389a8ff836a31e6c', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '68daa6047dc93d2596d8b2309a26f56960737617' }, index.h("div", { key: '6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: 'aeaf35ad8055ad4f7312922c8600ea58d09be74f', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: 'bd51ce868b4d8a547f40ec55548bbf3cfa416534', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h("div", { key: '5f4d77a5b43c8efee850b9813bc1c8e61d27d45d', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : locale_utils.translate('spendablePoints', this.language)), index.h("div", { key: 'eb83431a73b78eaa1e9384e87492f45a258927c7', class: 'PointsTxt SPPoints' }, index.h(playerElevateCardItems.PlayerPoints, { key: '91e1326134f0417dcbc6a0811739ab906272862c', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), index.h("a", { key: '4333bb9afa6276f62f25acb8042d9df82fe03f40', class: "TC", onClick: () => {
883
883
  this.onDetailsClick();
884
- } }, locale_utils.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '8803ae8d343885da58dfa04b9a4474ff473b5a74', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
884
+ } }, locale_utils.translate('termAndConditions', this.language))), this.pointExpireString && (index.h("div", { key: '77c30ba4c25c810e84bac42199ab4ca78bdbae99', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
885
885
  }
886
886
  static get watchers() { return {
887
887
  "session": ["onSessionOrEndpointChange"],
@@ -75,7 +75,7 @@ const PlayerElevateLoyaltycard = class {
75
75
  render() {
76
76
  const backgroundOuterImagePath = index.getAssetPath('../static/card-ground.svg');
77
77
  const backgroundInnerImagePath = index.getAssetPath('../static/card-ground-over.svg');
78
- return (index.h("div", { key: '39295a651da66747a20554699bba5f96b8ad5c35', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '78c34fe054fc2459f8af3354116cd21a68ce01be', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: 'b53e4b59d4ee55a2f567efa09afab3d72969e6e4', params: this.paramProxy }), index.h("div", { key: '1f3e504440bab2df3a181058fad7149c85c48c14', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '5c104f5ba1a018219c6ed5f6e50af99b035a0344' }, index.h("div", { key: 'bd94591e6ab9298ab7c769fa48efaf314dc1a63b', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '928849ce86d8c7a483eba7850efc83f8149bae43', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '37192c9b8502eb3c7d93914369df2d784c17e9f7', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h(playerElevateCardItems.PlayerElevateLoyaltyLevel, { key: '2684a177f4bb1053c4587fd4158666fb35ca23f4', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), index.h("div", { key: '173a37c63868f2d900c12af3ffc2d9a4a57550e4', class: 'PointsRange' }, index.h(playerElevateCardItems.PlayerPoints, { key: 'a7111154f7dc547e0b05c70d24508bdd75c5d882', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), index.h(playerElevateCardItems.PlayerPoints, { key: 'ad31574e7db81a7ecb7a06b28b1d4968cbcab93e', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: '88ddfdb326edfb1de9519da6b3d0e5b514725e27' }), index.h("div", { key: 'b9c79555a8001bd2c754d7573df04016da235c84', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (index.h("div", { key: '02da725060c9db4a8c1c2e8bad3426894d7f8f2c', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " "))))))))));
78
+ return (index.h("div", { key: '39295a651da66747a20554699bba5f96b8ad5c35', class: `ElevateCardWrapper ${this.theme}` }, index.h("div", { key: '78c34fe054fc2459f8af3354116cd21a68ce01be', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, index.h("general-styling-wrapper", { key: 'be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: locale_utils.TRANSLATIONS, translationUrl: this.translationUrl }), index.h("player-elevate-card-data", { key: 'b53e4b59d4ee55a2f567efa09afab3d72969e6e4', params: this.paramProxy }), index.h("div", { key: '1f3e504440bab2df3a181058fad7149c85c48c14', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, index.h("div", { key: 'a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1', class: 'Content Row' }, this.playerElevateLevel && (index.h(index.Fragment, { key: '5c104f5ba1a018219c6ed5f6e50af99b035a0344' }, index.h("div", { key: 'bd94591e6ab9298ab7c769fa48efaf314dc1a63b', class: "PlayerImg" }, index.h(playerElevateCardItems.PlayerAvatar, { key: '928849ce86d8c7a483eba7850efc83f8149bae43', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), index.h("div", { key: '37192c9b8502eb3c7d93914369df2d784c17e9f7', class: `LevelInfo ${this.playerElevateLevel.name}` }, index.h(playerElevateCardItems.PlayerElevateLoyaltyLevel, { key: '2d1df152fa288291128259c3950ff84e7cb6d8f2', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language }), index.h("div", { key: '798167bf5a4525623008954bd91c241fb1fe6f59', class: 'PointsRange' }, index.h(playerElevateCardItems.PlayerPoints, { key: 'cb88a77677200b0b459900c34781857933e15c26', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), index.h(playerElevateCardItems.PlayerPoints, { key: 'c7958718ca7b423842c7f88808ab69246388b75c', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), index.h(playerElevateCardItems.PlayerLoyaltyProcess, { key: 'e66ef489cbaa28ac60019daa1eba0b0f04309181' }), index.h("div", { key: 'e6ca3ffc781b37bc92be8a264ae44dcbc01d9024', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (index.h("div", { key: '9538973ab5c1d4bdd33f4d532f7041f94a1cb2d7', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " "))))))))));
79
79
  }
80
80
  static get watchers() { return {
81
81
  "session": ["onSessionOrEndpointChange"],
@@ -875,9 +875,9 @@ const PlayerElevatePointcard = class {
875
875
  render() {
876
876
  const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
877
877
  const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
878
- return (h("div", { key: '4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: 'ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS$2, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '4371faac6967c5b3eced57f6251064ea4e1d6a65', params: this.paramProxy }), h("div", { key: 'c78235a6fdc2aed90df898f007b5ee091cece8dc', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '025e779223c1c85c11998be8389a8ff836a31e6c', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '68daa6047dc93d2596d8b2309a26f56960737617' }, h("div", { key: '6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319', class: "PlayerImg" }, h(PlayerAvatar, { key: 'aeaf35ad8055ad4f7312922c8600ea58d09be74f', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: 'bd51ce868b4d8a547f40ec55548bbf3cfa416534', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: '5f4d77a5b43c8efee850b9813bc1c8e61d27d45d', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate$2('spendablePoints')), h("div", { key: 'bae5dc76d00c98aed803601c19fe3bf1aa4418d5', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: '59d51bd37f44ed23108fc4356af41c01668354e3', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: '3a923bea242ae5fa412f4448dca7277b3588621e', class: "TC", onClick: () => {
878
+ return (h("div", { key: '4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: 'ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253', class: "PointsCard Outer ", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS$2, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: '4371faac6967c5b3eced57f6251064ea4e1d6a65', params: this.paramProxy }), h("div", { key: 'c78235a6fdc2aed90df898f007b5ee091cece8dc', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: '025e779223c1c85c11998be8389a8ff836a31e6c', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '68daa6047dc93d2596d8b2309a26f56960737617' }, h("div", { key: '6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319', class: "PlayerImg" }, h(PlayerAvatar, { key: 'aeaf35ad8055ad4f7312922c8600ea58d09be74f', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: 'bd51ce868b4d8a547f40ec55548bbf3cfa416534', class: `LevelInfo ${this.playerElevateLevel.name}` }, h("div", { key: '5f4d77a5b43c8efee850b9813bc1c8e61d27d45d', class: "PointsTxt Label" }, this.cardTitle ? this.cardTitle : translate$2('spendablePoints', this.language)), h("div", { key: 'eb83431a73b78eaa1e9384e87492f45a258927c7', class: 'PointsTxt SPPoints' }, h(PlayerPoints, { key: '91e1326134f0417dcbc6a0811739ab906272862c', spendablePoints: this.playerElevateLevel.spendablePoints, language: this.language }), h("a", { key: '4333bb9afa6276f62f25acb8042d9df82fe03f40', class: "TC", onClick: () => {
879
879
  this.onDetailsClick();
880
- } }, translate$2('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '8803ae8d343885da58dfa04b9a4474ff473b5a74', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
880
+ } }, translate$2('termAndConditions', this.language))), this.pointExpireString && (h("div", { key: '77c30ba4c25c810e84bac42199ab4ca78bdbae99', class: 'ExpirationPoints' }, this.pointExpireString, " "))))))))));
881
881
  }
882
882
  static get watchers() { return {
883
883
  "session": ["onSessionOrEndpointChange"],
@@ -71,7 +71,7 @@ const PlayerElevateLoyaltycard = class {
71
71
  render() {
72
72
  const backgroundOuterImagePath = getAssetPath('../static/card-ground.svg');
73
73
  const backgroundInnerImagePath = getAssetPath('../static/card-ground-over.svg');
74
- return (h("div", { key: '39295a651da66747a20554699bba5f96b8ad5c35', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '78c34fe054fc2459f8af3354116cd21a68ce01be', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: 'b53e4b59d4ee55a2f567efa09afab3d72969e6e4', params: this.paramProxy }), h("div", { key: '1f3e504440bab2df3a181058fad7149c85c48c14', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '5c104f5ba1a018219c6ed5f6e50af99b035a0344' }, h("div", { key: 'bd94591e6ab9298ab7c769fa48efaf314dc1a63b', class: "PlayerImg" }, h(PlayerAvatar, { key: '928849ce86d8c7a483eba7850efc83f8149bae43', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '37192c9b8502eb3c7d93914369df2d784c17e9f7', class: `LevelInfo ${this.playerElevateLevel.name}` }, h(PlayerElevateLoyaltyLevel, { key: '2684a177f4bb1053c4587fd4158666fb35ca23f4', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat }), h("div", { key: '173a37c63868f2d900c12af3ffc2d9a4a57550e4', class: 'PointsRange' }, h(PlayerPoints, { key: 'a7111154f7dc547e0b05c70d24508bdd75c5d882', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), h(PlayerPoints, { key: 'ad31574e7db81a7ecb7a06b28b1d4968cbcab93e', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), h(PlayerLoyaltyProcess, { key: '88ddfdb326edfb1de9519da6b3d0e5b514725e27' }), h("div", { key: 'b9c79555a8001bd2c754d7573df04016da235c84', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (h("div", { key: '02da725060c9db4a8c1c2e8bad3426894d7f8f2c', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " "))))))))));
74
+ return (h("div", { key: '39295a651da66747a20554699bba5f96b8ad5c35', class: `ElevateCardWrapper ${this.theme}` }, h("div", { key: '78c34fe054fc2459f8af3354116cd21a68ce01be', class: "LoyaltyCard Outer", style: { 'backgroundImage': `url(${backgroundOuterImagePath}` } }, h("general-styling-wrapper", { key: 'be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl, targetTranslations: TRANSLATIONS, translationUrl: this.translationUrl }), h("player-elevate-card-data", { key: 'b53e4b59d4ee55a2f567efa09afab3d72969e6e4', params: this.paramProxy }), h("div", { key: '1f3e504440bab2df3a181058fad7149c85c48c14', class: 'OuterCover Inner', style: { 'backgroundImage': `url(${backgroundInnerImagePath}` } }, h("div", { key: 'a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1', class: 'Content Row' }, this.playerElevateLevel && (h(Fragment, { key: '5c104f5ba1a018219c6ed5f6e50af99b035a0344' }, h("div", { key: 'bd94591e6ab9298ab7c769fa48efaf314dc1a63b', class: "PlayerImg" }, h(PlayerAvatar, { key: '928849ce86d8c7a483eba7850efc83f8149bae43', onlyBadge: true, loyaltyIconUrl: this.playerElevateLevel.presentation.asset })), h("div", { key: '37192c9b8502eb3c7d93914369df2d784c17e9f7', class: `LevelInfo ${this.playerElevateLevel.name}` }, h(PlayerElevateLoyaltyLevel, { key: '2d1df152fa288291128259c3950ff84e7cb6d8f2', hideInfo: true, level: this.playerElevateLevel.name, expireTime: this.playerElevateLevel.expireTime, dateFormat: this.dateFormat, language: this.language }), h("div", { key: '798167bf5a4525623008954bd91c241fb1fe6f59', class: 'PointsRange' }, h(PlayerPoints, { key: 'cb88a77677200b0b459900c34781857933e15c26', loyaltyPoints: this.playerElevateLevel.loyaltyPoints, language: this.language }), h(PlayerPoints, { key: 'c7958718ca7b423842c7f88808ab69246388b75c', loyaltyPoints: this.getNextLevelPoints(), language: this.language })), h(PlayerLoyaltyProcess, { key: 'e66ef489cbaa28ac60019daa1eba0b0f04309181' }), h("div", { key: 'e6ca3ffc781b37bc92be8a264ae44dcbc01d9024', class: "NextLevelTip" }, this.getNextLevelTips()), this.pointExpireString && (h("div", { key: '9538973ab5c1d4bdd33f4d532f7041f94a1cb2d7', class: 'PointsInfo ExpirationPoints' }, this.pointExpireString, " "))))))))));
75
75
  }
76
76
  static get watchers() { return {
77
77
  "session": ["onSessionOrEndpointChange"],
@@ -1 +1 @@
1
- import{r as e,c as t,h as i,g as n,a,F as s}from"./index-f02f9189.js";import{t as r,T as o,a as l}from"./locale.utils-34e6f004.js";import{r as d,t as h,g as c,P as g,a as p}from"./player-elevate-card-items-57088733.js";const v=["pt-br","en","es-mx","hu","hr"],x={en:{pageLimitLabel:"Show"},hu:{pageLimitLabel:"Show"},hr:{pageLimitLabel:"Show"},"pt-br":{pageLimitLabel:"Show"},"es-mx":{pageLimitLabel:"Show"}},f=class{constructor(i){e(this,i),this.pageLimitChanged=t(this,"pageLimitChanged",7),this.language="en",this.translationUrl="",this.pageLimitOptions=void 0,this.limit=10,this.pageLimits=[10,25,50]}onPageLimitClicked(e){this.limit=e,this.pageLimitChanged.emit({limit:this.limit})}componentWillLoad(){if(this.pageLimitOptions)try{this.pageLimits=this.pageLimitOptions.split(",").map((e=>parseInt(e))),this.pageLimits.includes(this.limit)||(this.limit=this.pageLimits[0])}catch(e){console.error("Error when parse PageLimitOptions",e)}}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:x,translationUrl:this.translationUrl})}render(){return i("div",{key:"57f5e61ee287f72d0427a2e4f646e37c6b9358b9",class:"PaginationWrapper"},i("span",{key:"5f82b19fcf269086659b3faa475d9967b2af57fa",class:"NoOfItemsToDisplayMessage"},(()=>{const e=this.language;return x[void 0!==e&&v.includes(e)?e:"en"].pageLimitLabel})()),i("ul",{key:"559c2d5378a352691583567579a8e681d092ddd3",class:"PaginationArea"},this.pageLimits.map((e=>i("li",{class:(this.limit==e?"Active":"")+" PageSize Item",onClick:()=>{this.onPageLimitClicked(e)}},e)))),i("general-styling-wrapper",{key:"a8b9632e7421318e330f33b9c1cc9eb7121e35e9",targetTranslations:x,translationUrl:this.translationUrl}),this.renderStylingWrapper())}};f.style=":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emw--color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emw--color-primary, #eaefea);background-color:var(--emw--color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emw--color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";const b=["pt-br","en","es-mx","hu","hr"],u={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},m=(e,t,i)=>{const n=t;let a=u[void 0!==n&&b.includes(n)?n:"en"][e];if(void 0!==i)for(const[e,t]of Object.entries(i.values)){const i=new RegExp(`{${e}}`,"g");a=a.replace(i,t)}return a},y=class{constructor(i){e(this,i),this.reloadPageEmitter=t(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||parseInt(e.toString(),10)>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return i("ul",{class:"PaginationArea"},this.pagesArray.map((e=>i("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:u,translationUrl:this.translationUrl})}generateNavItemsByType(e,t){if(this.endPageIndex<e)return Array.from({length:this.endPageIndex+1},((e,t)=>t+1));let i=[],n=Math.floor(e/2);const a=this.endPageIndex+1;return t?this.currentPage<n||this.currentPage>a-n+1?(i=Array.from({length:n},((e,t)=>t+1)),i.push("..."),i=i.concat(Array.from({length:n},((e,t)=>this.endPageIndex-1+t)))):this.currentPage==n?(i=Array.from({length:n+1},((e,t)=>t+1)),i.push("..."),i=i.concat(Array.from({length:n-1},((e,t)=>this.endPageIndex+t)))):this.currentPage==a-n+1?(i=Array.from({length:n-1},((e,t)=>t+1)),i.push("..."),i=i.concat(Array.from({length:n+1},((e,t)=>this.endPageIndex-2+t)))):(i=[1,"..."],i=i.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),i=i.concat(["...",a])):this.currentPage<n-1?(i=Array.from({length:e-1},((e,t)=>t+1)),i.push("...")):this.endPageIndex-this.currentPage<n+1?(i=Array.from({length:e-1},((e,t)=>this.endPageIndex-n+t)),i.unshift("...")):(i=Array.from({length:n+1},((e,t)=>this.currentPage+t-1)),i.push("..."),i.unshift("...")),i}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return i("div",{key:"aa8d14788833b1b0e13ea20943935b03a3b043ac",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&i("span",{key:"a018261b6c598116829d878b8120aee7ae2576c4",class:"PageOfMessage"},m("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),i("div",{key:"64fc17d0b992b30a4b8d712e47442ee6a2d44b82",class:"PageNavigation"},this.arrowsActive&&i("div",{key:"f5f3b562fbdfb9e4b39ffd9755e5dba41e6231ba",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},m("firstPage",this.language)),this.secondaryArrowsActive&&i("span",{key:"39222e258f6c63502bfd3914c673d804edc96b53",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},m("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&i("span",{key:"d6f9a1394debdae49702713ccc59bea710ccd7ae",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},m("nextPage",this.language)),this.arrowsActive&&i("div",{key:"d2bb76f9d40fcfc3dbc6bb5fbfe6d237e77f0ee6",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",m("lastPage",this.language)," "),this.renderStylingWrapper()))}};y.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const w=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]||i.en,Object.keys(t[e]).forEach((n=>{i.en[n]&&(i[e][n]=i[e][n]||i.en[n],"object"==typeof t[e][n]?Object.keys(t[e][n]).forEach((a=>{i[e][n][a]=t[e][n][a]})):i[e][n]=t[e][n])}))})),e(!0)}))})));e.push(n)}var t,i;return await Promise.all(e)}render(){return i("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},i("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return n(this)}};function P(e){d(1,arguments);var t=h(e);return t.setHours(0,0,0,0),t}function k(e,t){return d(2,arguments),h(e).getTime()-h(t).getTime()}w.style=":host{display:block}";var C={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function R(e){return e?C[e]:C.trunc}const I=class{constructor(i){e(this,i),this.playerElevateLeveLoaded=t(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(((t,i)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{i(e)}))))}calcuatePointsToBeExpired(e,t){let i="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return i;e.aboutToExpire.sort(((e,t)=>function(e,t){d(2,arguments);var i=h(e),n=h(t);return i.getTime()<n.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const n=e.aboutToExpire[0],a=function(e,t){d(2,arguments);var i=P(e),n=P(t),a=i.getTime()-c(i),s=n.getTime()-c(n);return Math.round((a-s)/864e5)}(new Date(n.expireTime),new Date);let s=0,o=0,l=0===a?`${t}Day`:t;return a<=0&&(s=function(e,t,i){d(2,arguments);var n=k(e,t)/36e5;return R(null==i?void 0:i.roundingMethod)(n)}(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),l=s>1?`${t}Hours`:`${t}Hour`,s<=0&&(o=function(e,t,i){d(2,arguments);var n=k(e,t)/6e4;return R(null==i?void 0:i.roundingMethod)(n)}(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${t}Minutes`:`${t}Minute`)),i=r(l,{expirationPoints:n.points,expireDay:Math.max(a,s,o),lang:this.params.language}),i}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,i)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var n,a,s;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void i(!0);let r=e.data;this.playerElevateLevel=r.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(n=r.spendableWallet)||void 0===n?void 0:n.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(a=e.data.spendableWallet)||void 0===a?void 0:a.total,l=null===(s=e.data.loyaltyWallet)||void 0===s?void 0:s.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:l});let d=this.calcuatePointsToBeExpired(o,"coinsToBeExpired"),h=this.calcuatePointsToBeExpired(l,"pointsToBeExpired");(d||h)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:h}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),i(!0)}))))}setLoyaltyProgress(e){!function(e,t){const i=e.querySelector("#total_level"),n=i.getBBox().width,a=t>1?1:t,s=a*n-17<0?0:a*n-17,r=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),l=e.querySelector("#circle_current_level");i.setAttribute("viewbox",`0 0 ${s} 28`),r.setAttribute("width",`${s}`),l.setAttribute("cx",`${s<6.5?6.5:s}`),o.setAttribute("x",""+(s-8));const d=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),c=e.querySelector("#filter_ball"),g=e.querySelector("#filter_heart"),p=e.querySelector("#filter_lock"),v=e.querySelector("#paint0_linear_ball"),x=e.querySelector("#paint1_linear_lock"),f=e.querySelector("#lock_box"),b=e.querySelector("#heart_box"),u=n-10;d.setAttribute("cx",`${u}`),x.setAttribute("x1",`${u}`),x.setAttribute("x2",`${u}`),v.setAttribute("x1",""+(u-6)),v.setAttribute("x2",""+(u-6+11.2)),p.setAttribute("x",""+(u-6)),g.setAttribute("x",""+(u-6-2)),c.setAttribute("x",""+(u-6-2-2)),h.setAttribute("x",""+(u-6-2-2-4)),f.setAttribute("x",""+(u-6)),b.setAttribute("x",""+(u-6)),i.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let i=0;this.levels.forEach(((e,n)=>{t>e.firstEntryPoints&&(i=n)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:i})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return n(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 L=class{constructor(t){e(this,t),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=a("../static/card-ground.svg"),t=a("../static/card-ground-over.svg");return i("div",{key:"4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17",class:`ElevateCardWrapper ${this.theme}`},i("div",{key:"ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},i("general-styling-wrapper",{key:"c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl}),i("player-elevate-card-data",{key:"4371faac6967c5b3eced57f6251064ea4e1d6a65",params:this.paramProxy}),i("div",{key:"c78235a6fdc2aed90df898f007b5ee091cece8dc",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},i("div",{key:"025e779223c1c85c11998be8389a8ff836a31e6c",class:"Content Row"},this.playerElevateLevel&&i(s,{key:"68daa6047dc93d2596d8b2309a26f56960737617"},i("div",{key:"6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319",class:"PlayerImg"},i(g,{key:"aeaf35ad8055ad4f7312922c8600ea58d09be74f",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i("div",{key:"bd51ce868b4d8a547f40ec55548bbf3cfa416534",class:`LevelInfo ${this.playerElevateLevel.name}`},i("div",{key:"5f4d77a5b43c8efee850b9813bc1c8e61d27d45d",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:l("spendablePoints")),i("div",{key:"bae5dc76d00c98aed803601c19fe3bf1aa4418d5",class:"PointsTxt SPPoints"},i(p,{key:"59d51bd37f44ed23108fc4356af41c01668354e3",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),i("a",{key:"3a923bea242ae5fa412f4448dca7277b3588621e",class:"TC",onClick:()=>{this.onDetailsClick()}},l("termAndConditions",this.language))),this.pointExpireString&&i("div",{key:"8803ae8d343885da58dfa04b9a4474ff473b5a74",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var T;L.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}",function(e){e.spendable="spendable",e.loyalty="loyalty",e.history="history",e.rakeback="rakeback"}(T||(T={}));const B={en:{tabTitle:{spendable:"Coins",loyalty:"XP",history:"Shop Purchases",rakeback:"Rakeback"},barTitle:{spendable:"Coins History",loyalty:"Experience Points History",history:"Shop Purchases",rakeback:"Rakebake History"},bonus:"Bonus",coins:"Coins",noContent:"No Content",loading:"Loading",redeem:"Redeem",reload:"Reload",reloadMsgWhenError:"Network Problem, please ",rakebackPointType:{wageringByRealMoney:"Rakeback Casino Real Wager",bonus:"Rakeback Claim",cancelledWageringByRealMoney:"Cancelled Rakeback Casino Real Wager"},pointType:{registration:"Registration",cancelledRegistration:"Cancelled Registration",expiredRegistration:"Expired Registration",manual:"Manual",cancelledManual:"Cancelled Manual",expiredManual:"Expired Manual",wageringByRealMoney:"Real Money Wager",wageringByBonusMoney:"Bonus Money Wager",cancelledWageringByRealMoney:"Cancelled Real Money Wager",cancelledWageringByBonusMoney:"Cancelled Bonus Money Wager",expiredWageringByRealMoney:"Expired Real Money Wager",expiredWageringByBonusMoney:"Expired Bonus Money Wager",levelExpired:"Level Expiration",bonus:"Bonus Redeem",manualByTournament:"Reward from Tournaments",manualByPrizeEngine:"Reward from PrizeEngine",manualByMission:"Reward from Mission",cancelledManualByTournament:"Cancelled Reward from Tournaments",cancelledManualByMission:"Cancelled Reward from Mission",expiredManualByTournament:"Expired Reward from Tournaments",expiredManualByMission:"Expired Reward from Mission",cancelledManualByPrizeEngine:"Cancelled Reward from PrizeEngine",expiredManualByPrizeEngine:"Expired Reward from PrizeEngine",prizeEngine:"PrizeEngine Redeem",tournamentTicket:"Tournament Ticket Redeem",physicalItem:"Custom Reward Redeem",role:"Role Assignment Redeem"}},tr:{}},E=e=>"/v1/elevate/"+(e==T.history?"redeemHistory":"pointsHistory"),M=({locale:e,wallet:t,walletType:n,isRakeback:a})=>n===T.history?i("div",{class:"RecordContainer"},t.payload&&i("div",{class:"Row"},i("div",{class:"Title"},t.payload.displayName),i("div",{class:`Amount ${D(t.points).class}`},i("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),i("div",{class:"Row"},i("div",{class:t.payload?"PointType":"Title"},e.pointType[t.pointType]||t.pointType),!t.payload&&i("div",{class:`Amount ${D(t.points).class}`},i("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),i("div",{class:"Row"},i("div",{class:"DateTime"},W(new Date(t.modified))))):i("div",{class:"RecordContainer"},i("div",{class:`Row ${t.pointType}`},i("div",{class:"Title"},(a?e.rakebackPointType[t.pointType]:e.pointType[t.pointType])||t.pointType),i("div",{class:`Amount ${D(t.points).class}`},i("span",{class:"Points"},D(t.points).symbol," ",a?t.pointAsString:t.points," "),a&&i("span",null," ",t.currency))),i("div",{class:"Row"},i("div",{class:"DateTime"},W(new Date(t.modified))))),A=(e,t,n)=>t&&i(s,null,i("div",{class:"Records"},t.map((t=>i(M,{locale:e,wallet:t,walletType:n.tableId,isRakeback:n.tableId===T.rakeback})))),i("div",{class:"PaginationContainer"},i("bonus-pagination-nav",{offset:n.offset,limit:n.limit,displayPageNumbers:n.displayPageNumbers,tableId:n.tableId,secondaryArrowsActive:n.secondaryArrowsActive,total:n.total}))),D=e=>e>0?{class:"Positive",symbol:"+"}:{class:"Negative",symbol:""},O=e=>e.toString().padStart(2,"0"),W=e=>[e.getFullYear(),O(e.getMonth()+1),O(e.getDate())].join("-")+" "+[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),z=(e,t,n)=>i("div",{class:"TopBarContainer"},i("div",{class:"BackImageContainer"},i("span",{class:"BackImage",innerHTML:'<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'})),i("div",{class:"TitleContainer"},i("div",{class:"Title",title:e.barTitle[t]},e.barTitle[t]),i("div",{class:"Limits"},i("bonus-pagination-limits",{pageLimitOptions:n.pageLimitOptions,limit:n.limit}))),i("div",null,i("span",{class:"MenuImage",innerHTML:'<svg width="30" height="8" viewBox="0 0 30 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="4" cy="4" r="4" fill="black"/>\n<circle cx="15" cy="4" r="4" fill="black"/>\n<circle cx="26" cy="4" r="4" fill="black"/>\n</svg>\n'}))),S=class{constructor(i){e(this,i),this.paginationReset=t(this,"paginationReset",7),this.playerAvatarUrl=void 0,this.session=void 0,this.endpoint=void 0,this.limit=void 0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!1,this.pageLimitOptions="10,25,50",this.currencyPrecision=2,this.enableRakeback=!0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.locale=B.en,this.type=T.spendable,this.pageSetting=void 0,this.pointsWallets={},this.validWallets=[]}switchTab(e){var t,i;this.type=e,!this.pointsWallets[e]&&(null===(t=this.pointsWallets[e])||void 0===t?void 0:t.isLoadFailed)&&this.paginationReset.emit({limit:(null===(i=this.pointsWallets[e])||void 0===i?void 0:i.pageSetting.limit)||this.limit,tableId:this.type})}getPageSettingByType(e){return this.pointsWallets[e]?this.pointsWallets[e].pageSetting:{limit:this.limit,total:0,offset:0,tableId:e,secondaryArrowsActive:this.secondaryArrowsActive,displayPageNumbers:this.displayPageNumbers,pageLimitOptions:this.pageLimitOptions||void 0}}loadWallets(e){return!this.pointsWallets[this.type]||this.pointsWallets[this.type].isLoading?i("div",{class:"Loading"},this.locale.loading):0===this.pointsWallets[this.type].wallets.length?i("div",{class:"NoContent"},this.locale.noContent):e()}componentWillRender(){this.locale=Object.assign(Object.assign({},B.en),B[this.language])}render(){var e,t;const n=this.getPageSettingByType(this.type);return i("main",{key:"59c822ef670d41b2a9cb2001faaf3bcbd54b7eca"},i("general-styling-wrapper",{key:"1e7a029787beffc38f57367c82725b6e350d5aa7",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:B,translationUrl:this.translationUrl}),i("player-elevate-pointcard",{key:"84633fc755744e3816c44207aac091d2d8d08c6c",playerAvatarUrl:this.playerAvatarUrl,endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),i("div",{key:"4374c53cb0932e2e5700d069e1cc55f0e55d5363",class:"PlayerElevatePointsDetaisContainer"},[z(this.locale,this.type,n),i("div",{key:"e78ffe11558d1be2ff646729b17526951be66c91",class:"Tabs Row"},(this.validWallets||[]).map((e=>i("div",{class:"tab"},i("div",{class:"TabText "+(e===this.type?"active":""),onClick:this.switchTab.bind(this,e)},this.locale.tabTitle[e]),i("div",{class:"TabBorderBottom "+(e===this.type?"active":"")}))))),(null===(e=this.pointsWallets[this.type])||void 0===e?void 0:e.isLoadFailed)?i("div",{class:"ReloadMsg"},this.locale.reloadMsgWhenError,i("a",{class:"Reload",onClick:this.updateWallets},this.locale.reload)):this.loadWallets(A.bind(this,this.locale,(null===(t=this.pointsWallets[this.type])||void 0===t?void 0:t.wallets)||[],n))]))}walletTypeChangedHandler(){this.pointsWallets[this.type]||this.updateWallets()}async updateWallets(){if(!this.endpoint||!this.session||"undefined"===this.session)return;let e=this.pointsWallets[this.type]?this.pointsWallets[this.type].pageSetting:this.getPageSettingByType(this.type);try{const t=await(async(e,t,i,n,a)=>{const s={type:i,language:t,pagination:`offset=${a.offset},limit=${a.limit}`},r=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(e+E(s.type),s);return await(async(e,t={})=>{let i;i=await fetch(e,t),i=await i.text();try{i=JSON.parse(i)}catch(e){throw console.error(e),e}return i})(r,{headers:{"x-SessionId":n}})})(this.endpoint,this.language,this.type,this.session,e),i=t.data||[];t.success?(e.total=t.total,this.type===T.rakeback&&this.formatRakebackWalletPoints(i),this.pointsWallets[this.type]=Object.assign(Object.assign({},this.pointsWallets[this.type]),{wallets:i,pageSetting:e}),this.pointsWallets=Object.assign({},this.pointsWallets)):(console.error(t),this.pointsWallets[this.type].isLoadFailed=!0)}catch(e){console.error(e),this.pointsWallets[this.type].isLoadFailed=!0}}formatRakebackWalletPoints(e){const t=Math.pow(10,this.currencyPrecision);e.forEach((e=>{const i=Math.floor((e.points||0)*t)/t;e.pointAsString=new Intl.NumberFormat("en",{minimumFractionDigits:this.currencyPrecision,maximumFractionDigits:this.currencyPrecision}).format(i)}))}reloadPageByTypeHandler(e){if(e.detail.tableId==this.type){if(this.limit!=e.detail.limit)this.pointsWallets={},this.limit=e.detail.limit;else{let t=this.pointsWallets[this.type].pageSetting||this.getPageSettingByType(this.type);t.offset=e.detail.offset,this.pointsWallets[this.type].pageSetting=t}this.updateWallets()}}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}async componentWillLoad(){this.setLimit(),this.updateWallets(),this.validWallets=[T.spendable,T.loyalty,T.history],this.enableRakeback&&this.validWallets.push(T.rakeback)}static get assetsDirs(){return["static"]}static get watchers(){return{type:["walletTypeChangedHandler"],endpoint:["updateWallets"],language:["updateWallets"],session:["updateWallets"]}}};S.style=":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.2509803922);border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px rgba(0, 0, 0, 0.1019607843);border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .HistoryPoints{text-transform:lowercase}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px rgba(0, 0, 0, 0.2509803922)}.NoContent{font-size:16px;color:var(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";export{f as bonus_pagination_limits,y as bonus_pagination_nav,w as general_styling_wrapper,I as player_elevate_card_data,L as player_elevate_pointcard,S as player_elevate_points_history}
1
+ import{r as e,c as t,h as i,g as n,a,F as s}from"./index-f02f9189.js";import{t as r,T as o,a as l}from"./locale.utils-34e6f004.js";import{r as d,t as h,g as c,P as g,a as p}from"./player-elevate-card-items-57088733.js";const v=["pt-br","en","es-mx","hu","hr"],x={en:{pageLimitLabel:"Show"},hu:{pageLimitLabel:"Show"},hr:{pageLimitLabel:"Show"},"pt-br":{pageLimitLabel:"Show"},"es-mx":{pageLimitLabel:"Show"}},b=class{constructor(i){e(this,i),this.pageLimitChanged=t(this,"pageLimitChanged",7),this.language="en",this.translationUrl="",this.pageLimitOptions=void 0,this.limit=10,this.pageLimits=[10,25,50]}onPageLimitClicked(e){this.limit=e,this.pageLimitChanged.emit({limit:this.limit})}componentWillLoad(){if(this.pageLimitOptions)try{this.pageLimits=this.pageLimitOptions.split(",").map((e=>parseInt(e))),this.pageLimits.includes(this.limit)||(this.limit=this.pageLimits[0])}catch(e){console.error("Error when parse PageLimitOptions",e)}}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:x,translationUrl:this.translationUrl})}render(){return i("div",{key:"57f5e61ee287f72d0427a2e4f646e37c6b9358b9",class:"PaginationWrapper"},i("span",{key:"5f82b19fcf269086659b3faa475d9967b2af57fa",class:"NoOfItemsToDisplayMessage"},(()=>{const e=this.language;return x[void 0!==e&&v.includes(e)?e:"en"].pageLimitLabel})()),i("ul",{key:"559c2d5378a352691583567579a8e681d092ddd3",class:"PaginationArea"},this.pageLimits.map((e=>i("li",{class:(this.limit==e?"Active":"")+" PageSize Item",onClick:()=>{this.onPageLimitClicked(e)}},e)))),i("general-styling-wrapper",{key:"a8b9632e7421318e330f33b9c1cc9eb7121e35e9",targetTranslations:x,translationUrl:this.translationUrl}),this.renderStylingWrapper())}};b.style=":host{display:block}.NoOfItemsToDisplayMessage{display:inline-block;margin:0.1rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--emw--color-primary, #191a19);line-height:1.8}.PaginationWrapper{display:flex;flex-direction:row}ul.PaginationArea{margin-block:5px;display:flex;flex-direction:row;padding:0px}ul.PaginationArea li.Item.Active:hover{color:var(--emw--color-primary, #eaefea);background-color:var(--emw--color-secondary, #191a19)}ul.PaginationArea li.Item.Active,ul.PaginationArea li.Item:hover{background-color:var(--emw--color-primary, rgba(169, 171, 169, 0.7));font-weight:bold;border-radius:0.3rem}ul.PaginationArea li.Item{padding-inline-start:0px;list-style:none;padding:5px 6px;margin:2px;cursor:pointer;display:inline-block}";const f=["pt-br","en","es-mx","hu","hr"],u={en:{firstPage:"|<",lastPage:">|",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hu:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},hr:{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"pt-br":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"},"es-mx":{firstPage:"First",lastPage:"Last",prePage:"<",nextPage:">",pageOfTotal:"{start}-{end} of {total}"}},m=(e,t,i)=>{const n=t;let a=u[void 0!==n&&f.includes(n)?n:"en"][e];if(void 0!==i)for(const[e,t]of Object.entries(i.values)){const i=new RegExp(`{${e}}`,"g");a=a.replace(i,t)}return a},y=class{constructor(i){e(this,i),this.reloadPageEmitter=t(this,"reloadPageByType",7),this.total=1,this.limit=10,this.offset=0,this.tableId="default",this.language="en",this.translationUrl="",this.arrowsActive=!0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!0,this.displayRangeOfTotal=void 0,this.navItemAccount=5,this.endPageIndex=0,this.pagesArray=void 0,this.currentPage=1,this.showAsEllipsisMid=!this.arrowsActive}pageLimitChangedHandler(e){this.limit=e.detail.limit?e.detail.limit:this.limit,this.currentPage=1,this.offset=0,this.updatePageStatus(),"pageLimitChanged"==e.type&&this.reloadPageEmitter.emit({offset:0,limit:this.limit,tableId:this.tableId})}goTo(e){"..."==e||0==e||parseInt(e.toString(),10)>this.endPageIndex+1||(this.currentPage=e,this.reloadPageEmitter.emit({offset:(this.currentPage-1)*this.limit,limit:this.limit,tableId:this.tableId}))}renderPageList(){return i("ul",{class:"PaginationArea"},this.pagesArray.map((e=>i("li",{class:"PageItem "+(this.currentPage==e?"Active":""),onClick:()=>{this.goTo(e)}},e))))}renderStylingWrapper(){return i("general-styling-wrapper",{targetTranslations:u,translationUrl:this.translationUrl})}generateNavItemsByType(e,t){if(this.endPageIndex<e)return Array.from({length:this.endPageIndex+1},((e,t)=>t+1));let i=[],n=Math.floor(e/2);const a=this.endPageIndex+1;return t?this.currentPage<n||this.currentPage>a-n+1?(i=Array.from({length:n},((e,t)=>t+1)),i.push("..."),i=i.concat(Array.from({length:n},((e,t)=>this.endPageIndex-1+t)))):this.currentPage==n?(i=Array.from({length:n+1},((e,t)=>t+1)),i.push("..."),i=i.concat(Array.from({length:n-1},((e,t)=>this.endPageIndex+t)))):this.currentPage==a-n+1?(i=Array.from({length:n-1},((e,t)=>t+1)),i.push("..."),i=i.concat(Array.from({length:n+1},((e,t)=>this.endPageIndex-2+t)))):(i=[1,"..."],i=i.concat([this.currentPage-1],[this.currentPage],[this.currentPage+1]),i=i.concat(["...",a])):this.currentPage<n-1?(i=Array.from({length:e-1},((e,t)=>t+1)),i.push("...")):this.endPageIndex-this.currentPage<n+1?(i=Array.from({length:e-1},((e,t)=>this.endPageIndex-n+t)),i.unshift("...")):(i=Array.from({length:n+1},((e,t)=>this.currentPage+t-1)),i.push("..."),i.unshift("...")),i}updatePageStatus(){this.endPageIndex=Math.ceil(this.total/this.limit)-1,this.endPageIndex=this.endPageIndex<0?this.endPageIndex=0:this.endPageIndex,this.pagesArray=this.generateNavItemsByType(this.navItemAccount,this.showAsEllipsisMid)}componentWillRender(){this.currentPage=Math.floor(this.offset/this.limit)+1,this.updatePageStatus()}render(){return i("div",{key:"aa8d14788833b1b0e13ea20943935b03a3b043ac",class:"PageNavigationWrapper"},this.displayRangeOfTotal&&this.total>0&&i("span",{key:"a018261b6c598116829d878b8120aee7ae2576c4",class:"PageOfMessage"},m("pageOfTotal",this.language,{values:{start:(this.currentPage-1)*this.limit+1,end:this.currentPage*this.limit>this.total?this.total:this.currentPage*this.limit,total:this.total}})),i("div",{key:"64fc17d0b992b30a4b8d712e47442ee6a2d44b82",class:"PageNavigation"},this.arrowsActive&&i("div",{key:"f5f3b562fbdfb9e4b39ffd9755e5dba41e6231ba",class:"PageArrow FirstPage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(1)}},m("firstPage",this.language)),this.secondaryArrowsActive&&i("span",{key:"39222e258f6c63502bfd3914c673d804edc96b53",class:"PageArrow PrePage "+(1==this.currentPage?"Disabled":""),onClick:()=>{this.goTo(this.currentPage-1)}},m("prePage",this.language)),this.displayPageNumbers&&this.renderPageList(),this.secondaryArrowsActive&&i("span",{key:"d6f9a1394debdae49702713ccc59bea710ccd7ae",class:"PageArrow NextPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.currentPage+1)}},m("nextPage",this.language)),this.arrowsActive&&i("div",{key:"d2bb76f9d40fcfc3dbc6bb5fbfe6d237e77f0ee6",class:"PageArrow LastPage "+(this.currentPage==this.endPageIndex+1?"Disabled":""),onClick:()=>{this.goTo(this.endPageIndex+1)}}," ",m("lastPage",this.language)," "),this.renderStylingWrapper()))}};y.style=":host{display:block}.PageNavigationWrapper{display:flex;flex-direction:row;height:100%;align-content:center}.PageNavigationWrapper .PageOfMessage{margin:5px;padding:5px 6px;margin:2px}.PageNavigation{display:flex;flex-direction:row;align-items:center}.PageNavigation .PageArrow{color:var(--emw--color-primary, #777676);padding:6px 5px;cursor:pointer;font-weight:bold;width:1.2rem;text-align:center}.PageNavigation .PageArrow.Disabled{color:var(--emw--color-gray-100, #e0e0e0)}ul.PaginationArea{list-style:none;padding:0px;margin:0px;display:flex}ul.PaginationArea li.PageItem{cursor:pointer;padding:5px 6px;margin:2px;width:0.9rem;text-align:center}ul.PaginationArea li.PageItem.Active,ul.PaginationArea li.PageItem:hover{font-weight:bold;color:var(--emw--color-primary, #f5f1f1);background-color:var(--emw--color-secondary, #8c8989);border-radius:0.3rem}";const w=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]||i.en,Object.keys(t[e]).forEach((n=>{i.en[n]&&(i[e][n]=i[e][n]||i.en[n],"object"==typeof t[e][n]?Object.keys(t[e][n]).forEach((a=>{i[e][n][a]=t[e][n][a]})):i[e][n]=t[e][n])}))})),e(!0)}))})));e.push(n)}var t,i;return await Promise.all(e)}render(){return i("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},i("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return n(this)}};function P(e){d(1,arguments);var t=h(e);return t.setHours(0,0,0,0),t}function k(e,t){return d(2,arguments),h(e).getTime()-h(t).getTime()}w.style=":host{display:block}";var C={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function R(e){return e?C[e]:C.trunc}const I=class{constructor(i){e(this,i),this.playerElevateLeveLoaded=t(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(((t,i)=>fetch(e.href,{method:"GET"}).then((e=>e.json())).then((e=>{this.levels=e.data,t(!0)})).catch((e=>{i(e)}))))}calcuatePointsToBeExpired(e,t){let i="";if(!e||!e.aboutToExpire||0==e.aboutToExpire.length||e.aboutToExpire[0].points<=0)return i;e.aboutToExpire.sort(((e,t)=>function(e,t){d(2,arguments);var i=h(e),n=h(t);return i.getTime()<n.getTime()}(new Date(e.expireTime),new Date(t.expireTime))?-1:1));const n=e.aboutToExpire[0],a=function(e,t){d(2,arguments);var i=P(e),n=P(t),a=i.getTime()-c(i),s=n.getTime()-c(n);return Math.round((a-s)/864e5)}(new Date(n.expireTime),new Date);let s=0,o=0,l=0===a?`${t}Day`:t;return a<=0&&(s=function(e,t,i){d(2,arguments);var n=k(e,t)/36e5;return R(null==i?void 0:i.roundingMethod)(n)}(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),l=s>1?`${t}Hours`:`${t}Hour`,s<=0&&(o=function(e,t,i){d(2,arguments);var n=k(e,t)/6e4;return R(null==i?void 0:i.roundingMethod)(n)}(new Date(n.expireTime),new Date,{roundingMethod:"floor"}),l=o>1?`${t}Minutes`:`${t}Minute`)),i=r(l,{expirationPoints:n.points,expireDay:Math.max(a,s,o),lang:this.params.language}),i}loadPlayerLevelInfo(){let e=new URL(`${this.params.endpoint}/v1/elevate/playerInfo?language=${this.params.language}`);return new Promise(((t,i)=>fetch(e.href,{method:"GET",headers:{"X-Sessionid":this.params.session,"Content-Type":"application/json"}}).then((e=>e.json())).then((e=>{var n,a,s;if(!e.success)return console.error("Exception when fetch user elevateinfo, ",e.errorCode,e.errorMessage),void i(!0);let r=e.data;this.playerElevateLevel=r.level,this.playerElevateLevel.name=this.playerElevateLevel.presentation.displayName||this.playerElevateLevel.name,this.playerElevateLevel.spendablePoints=(null===(n=r.spendableWallet)||void 0===n?void 0:n.total.points)||0,this.playerElevateLeveLoaded.emit({elevateLevel:this.playerElevateLevel});const o=null===(a=e.data.spendableWallet)||void 0===a?void 0:a.total,l=null===(s=e.data.loyaltyWallet)||void 0===s?void 0:s.total;this.playerElevateLeveLoaded.emit({elevateLevelWalletTotal:o,loyaltyWalletTotal:l});let d=this.calcuatePointsToBeExpired(o,"coinsToBeExpired"),h=this.calcuatePointsToBeExpired(l,"pointsToBeExpired");(d||h)&&this.playerElevateLeveLoaded.emit({pointExpireString:d,xpExpireString:h}),t(this.playerElevateLevel)})).catch((e=>{console.log("error ",e),i(!0)}))))}setLoyaltyProgress(e){!function(e,t){const i=e.querySelector("#total_level"),n=i.getBBox().width,a=t>1?1:t,s=a*n-17<0?0:a*n-17,r=e.querySelector("#current_level"),o=e.querySelector("#filter_current_level"),l=e.querySelector("#circle_current_level");i.setAttribute("viewbox",`0 0 ${s} 28`),r.setAttribute("width",`${s}`),l.setAttribute("cx",`${s<6.5?6.5:s}`),o.setAttribute("x",""+(s-8));const d=e.querySelector("#lock"),h=e.querySelector("#filter_heart_ball"),c=e.querySelector("#filter_ball"),g=e.querySelector("#filter_heart"),p=e.querySelector("#filter_lock"),v=e.querySelector("#paint0_linear_ball"),x=e.querySelector("#paint1_linear_lock"),b=e.querySelector("#lock_box"),f=e.querySelector("#heart_box"),u=n-10;d.setAttribute("cx",`${u}`),x.setAttribute("x1",`${u}`),x.setAttribute("x2",`${u}`),v.setAttribute("x1",""+(u-6)),v.setAttribute("x2",""+(u-6+11.2)),p.setAttribute("x",""+(u-6)),g.setAttribute("x",""+(u-6-2)),c.setAttribute("x",""+(u-6-2-2)),h.setAttribute("x",""+(u-6-2-2-4)),b.setAttribute("x",""+(u-6)),f.setAttribute("x",""+(u-6)),i.parentElement.style.opacity="1"}(this.loyaltyProgressEle,e)}initLevelProgressbar(){setTimeout((()=>{this.loyaltyProgressEle=this.elevateCardRef.parentElement.querySelector("#LevelProgress"),this.loyaltyProgressEle&&(this.setLoyaltyProgress(this.playerElevateLevel.nextLevel?this.playerElevateLevel.loyaltyPoints/this.playerElevateLevel.nextLevel.entryPoints:1),this.params.playerElevateLevel=this.playerElevateLevel)}),80)}componentDidRender(){this.initLevelProgressbar()}loadElevateInfo(){if(!this.params.endpoint||!this.params.session)return;const e=[];e.push(this.loadPlayerLevelInfo()),this.params.calculateLevelFlag&&e.push(this.loadLevels()),Promise.all(e).then((e=>{if(console.log("elevate-init",e),this.initLevelProgressbar(),!this.levels)return;this.levels.sort(((e,t)=>e.firstEntryPoints>t.firstEntryPoints?1:-1));const t=this.playerElevateLevel.loyaltyPoints;let i=0;this.levels.forEach(((e,n)=>{t>e.firstEntryPoints&&(i=n)})),this.playerElevateLeveLoaded.emit({calculatedLevelFlag:i})}))}componentWillLoad(){this.loadElevateInfo()}get elevateCardRef(){return n(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 L=class{constructor(t){e(this,t),this.isPointDetailCard="earningRule"===this.buttonType,this.endpoint=void 0,this.theme="Dark",this.session=void 0,this.playerAvatarUrl=void 0,this.language="en",this.playerName=void 0,this.cardTitle=void 0,this.buttonType="earningRule",this.dateFormat="yyyy-MM-dd",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.pointExpireString=void 0,this.playerElevateLevel=void 0,this.elevateWalletTotal=void 0,this.elevateSPTotal=void 0}onSessionOrEndpointChange(){this.paramProxy=Object.assign(Object.assign({},this.paramProxy),{session:this.session,endpoint:this.endpoint,language:this.language})}playerElevateLeveLoadedHandler(e){e.detail&&(e.detail.elevateLevelWalletTotal&&(this.elevateWalletTotal=e.detail.elevateLevelWalletTotal,this.elevateSPTotal=e.detail.loyaltyWalletTotal),e.detail.elevateLevel&&(this.playerElevateLevel=e.detail.elevateLevel),e.detail.pointExpireString&&(this.pointExpireString=e.detail.pointExpireString))}onDetailsClick(){window.postMessage({type:this.isPointDetailCard?"BEEPointRulesClicked":"BEEDetailsClicked",path:this.isPointDetailCard?"player-elevate-level":"player-elevate-point-details"},window.location.href)}componentWillLoad(){this.paramProxy={endpoint:this.endpoint,session:this.session,language:this.language}}render(){const e=a("../static/card-ground.svg"),t=a("../static/card-ground-over.svg");return i("div",{key:"4e6e25bdd2a9f795369b39dbfd7e9adbd1523e17",class:`ElevateCardWrapper ${this.theme}`},i("div",{key:"ddeea1e67d51d5c0c8ed56edfd2d8d9c39e85253",class:"PointsCard Outer ",style:{backgroundImage:`url(${e}`}},i("general-styling-wrapper",{key:"c6d6e3a3bc9a54cb99b4268feb3c296527d1ba8c",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:o,translationUrl:this.translationUrl}),i("player-elevate-card-data",{key:"4371faac6967c5b3eced57f6251064ea4e1d6a65",params:this.paramProxy}),i("div",{key:"c78235a6fdc2aed90df898f007b5ee091cece8dc",class:"OuterCover Inner",style:{backgroundImage:`url(${t}`}},i("div",{key:"025e779223c1c85c11998be8389a8ff836a31e6c",class:"Content Row"},this.playerElevateLevel&&i(s,{key:"68daa6047dc93d2596d8b2309a26f56960737617"},i("div",{key:"6a2d2b2e7d234bceaf3d9240c5d4f2eb80395319",class:"PlayerImg"},i(g,{key:"aeaf35ad8055ad4f7312922c8600ea58d09be74f",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),i("div",{key:"bd51ce868b4d8a547f40ec55548bbf3cfa416534",class:`LevelInfo ${this.playerElevateLevel.name}`},i("div",{key:"5f4d77a5b43c8efee850b9813bc1c8e61d27d45d",class:"PointsTxt Label"},this.cardTitle?this.cardTitle:l("spendablePoints",this.language)),i("div",{key:"eb83431a73b78eaa1e9384e87492f45a258927c7",class:"PointsTxt SPPoints"},i(p,{key:"91e1326134f0417dcbc6a0811739ab906272862c",spendablePoints:this.playerElevateLevel.spendablePoints,language:this.language}),i("a",{key:"4333bb9afa6276f62f25acb8042d9df82fe03f40",class:"TC",onClick:()=>{this.onDetailsClick()}},l("termAndConditions",this.language))),this.pointExpireString&&i("div",{key:"77c30ba4c25c810e84bac42199ab4ca78bdbae99",class:"ExpirationPoints"},this.pointExpireString," ")))))))}static get watchers(){return{session:["onSessionOrEndpointChange"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var T;L.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}",function(e){e.spendable="spendable",e.loyalty="loyalty",e.history="history",e.rakeback="rakeback"}(T||(T={}));const B={en:{tabTitle:{spendable:"Coins",loyalty:"XP",history:"Shop Purchases",rakeback:"Rakeback"},barTitle:{spendable:"Coins History",loyalty:"Experience Points History",history:"Shop Purchases",rakeback:"Rakebake History"},bonus:"Bonus",coins:"Coins",noContent:"No Content",loading:"Loading",redeem:"Redeem",reload:"Reload",reloadMsgWhenError:"Network Problem, please ",rakebackPointType:{wageringByRealMoney:"Rakeback Casino Real Wager",bonus:"Rakeback Claim",cancelledWageringByRealMoney:"Cancelled Rakeback Casino Real Wager"},pointType:{registration:"Registration",cancelledRegistration:"Cancelled Registration",expiredRegistration:"Expired Registration",manual:"Manual",cancelledManual:"Cancelled Manual",expiredManual:"Expired Manual",wageringByRealMoney:"Real Money Wager",wageringByBonusMoney:"Bonus Money Wager",cancelledWageringByRealMoney:"Cancelled Real Money Wager",cancelledWageringByBonusMoney:"Cancelled Bonus Money Wager",expiredWageringByRealMoney:"Expired Real Money Wager",expiredWageringByBonusMoney:"Expired Bonus Money Wager",levelExpired:"Level Expiration",bonus:"Bonus Redeem",manualByTournament:"Reward from Tournaments",manualByPrizeEngine:"Reward from PrizeEngine",manualByMission:"Reward from Mission",cancelledManualByTournament:"Cancelled Reward from Tournaments",cancelledManualByMission:"Cancelled Reward from Mission",expiredManualByTournament:"Expired Reward from Tournaments",expiredManualByMission:"Expired Reward from Mission",cancelledManualByPrizeEngine:"Cancelled Reward from PrizeEngine",expiredManualByPrizeEngine:"Expired Reward from PrizeEngine",prizeEngine:"PrizeEngine Redeem",tournamentTicket:"Tournament Ticket Redeem",physicalItem:"Custom Reward Redeem",role:"Role Assignment Redeem"}},tr:{}},E=e=>"/v1/elevate/"+(e==T.history?"redeemHistory":"pointsHistory"),M=({locale:e,wallet:t,walletType:n,isRakeback:a})=>n===T.history?i("div",{class:"RecordContainer"},t.payload&&i("div",{class:"Row"},i("div",{class:"Title"},t.payload.displayName),i("div",{class:`Amount ${D(t.points).class}`},i("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),i("div",{class:"Row"},i("div",{class:t.payload?"PointType":"Title"},e.pointType[t.pointType]||t.pointType),!t.payload&&i("div",{class:`Amount ${D(t.points).class}`},i("span",{class:"HistoryPoints"},Math.abs(t.points)," ",e.coins))),i("div",{class:"Row"},i("div",{class:"DateTime"},W(new Date(t.modified))))):i("div",{class:"RecordContainer"},i("div",{class:`Row ${t.pointType}`},i("div",{class:"Title"},(a?e.rakebackPointType[t.pointType]:e.pointType[t.pointType])||t.pointType),i("div",{class:`Amount ${D(t.points).class}`},i("span",{class:"Points"},D(t.points).symbol," ",a?t.pointAsString:t.points," "),a&&i("span",null," ",t.currency))),i("div",{class:"Row"},i("div",{class:"DateTime"},W(new Date(t.modified))))),A=(e,t,n)=>t&&i(s,null,i("div",{class:"Records"},t.map((t=>i(M,{locale:e,wallet:t,walletType:n.tableId,isRakeback:n.tableId===T.rakeback})))),i("div",{class:"PaginationContainer"},i("bonus-pagination-nav",{offset:n.offset,limit:n.limit,displayPageNumbers:n.displayPageNumbers,tableId:n.tableId,secondaryArrowsActive:n.secondaryArrowsActive,total:n.total}))),D=e=>e>0?{class:"Positive",symbol:"+"}:{class:"Negative",symbol:""},O=e=>e.toString().padStart(2,"0"),W=e=>[e.getFullYear(),O(e.getMonth()+1),O(e.getDate())].join("-")+" "+[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":"),z=(e,t,n)=>i("div",{class:"TopBarContainer"},i("div",{class:"BackImageContainer"},i("span",{class:"BackImage",innerHTML:'<svg width="9" height="15" viewBox="0 0 9 15" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.75 1L1.25 7.5L7.75 14" stroke="#242424" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>\n'})),i("div",{class:"TitleContainer"},i("div",{class:"Title",title:e.barTitle[t]},e.barTitle[t]),i("div",{class:"Limits"},i("bonus-pagination-limits",{pageLimitOptions:n.pageLimitOptions,limit:n.limit}))),i("div",null,i("span",{class:"MenuImage",innerHTML:'<svg width="30" height="8" viewBox="0 0 30 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n<circle cx="4" cy="4" r="4" fill="black"/>\n<circle cx="15" cy="4" r="4" fill="black"/>\n<circle cx="26" cy="4" r="4" fill="black"/>\n</svg>\n'}))),S=class{constructor(i){e(this,i),this.paginationReset=t(this,"paginationReset",7),this.playerAvatarUrl=void 0,this.session=void 0,this.endpoint=void 0,this.limit=void 0,this.secondaryArrowsActive=!0,this.displayPageNumbers=!1,this.pageLimitOptions="10,25,50",this.currencyPrecision=2,this.enableRakeback=!0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.locale=B.en,this.type=T.spendable,this.pageSetting=void 0,this.pointsWallets={},this.validWallets=[]}switchTab(e){var t,i;this.type=e,!this.pointsWallets[e]&&(null===(t=this.pointsWallets[e])||void 0===t?void 0:t.isLoadFailed)&&this.paginationReset.emit({limit:(null===(i=this.pointsWallets[e])||void 0===i?void 0:i.pageSetting.limit)||this.limit,tableId:this.type})}getPageSettingByType(e){return this.pointsWallets[e]?this.pointsWallets[e].pageSetting:{limit:this.limit,total:0,offset:0,tableId:e,secondaryArrowsActive:this.secondaryArrowsActive,displayPageNumbers:this.displayPageNumbers,pageLimitOptions:this.pageLimitOptions||void 0}}loadWallets(e){return!this.pointsWallets[this.type]||this.pointsWallets[this.type].isLoading?i("div",{class:"Loading"},this.locale.loading):0===this.pointsWallets[this.type].wallets.length?i("div",{class:"NoContent"},this.locale.noContent):e()}componentWillRender(){this.locale=Object.assign(Object.assign({},B.en),B[this.language])}render(){var e,t;const n=this.getPageSettingByType(this.type);return i("main",{key:"59c822ef670d41b2a9cb2001faaf3bcbd54b7eca"},i("general-styling-wrapper",{key:"1e7a029787beffc38f57367c82725b6e350d5aa7",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:B,translationUrl:this.translationUrl}),i("player-elevate-pointcard",{key:"84633fc755744e3816c44207aac091d2d8d08c6c",playerAvatarUrl:this.playerAvatarUrl,endpoint:this.endpoint,session:this.session,language:this.language,clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,translationUrl:this.translationUrl}),i("div",{key:"4374c53cb0932e2e5700d069e1cc55f0e55d5363",class:"PlayerElevatePointsDetaisContainer"},[z(this.locale,this.type,n),i("div",{key:"e78ffe11558d1be2ff646729b17526951be66c91",class:"Tabs Row"},(this.validWallets||[]).map((e=>i("div",{class:"tab"},i("div",{class:"TabText "+(e===this.type?"active":""),onClick:this.switchTab.bind(this,e)},this.locale.tabTitle[e]),i("div",{class:"TabBorderBottom "+(e===this.type?"active":"")}))))),(null===(e=this.pointsWallets[this.type])||void 0===e?void 0:e.isLoadFailed)?i("div",{class:"ReloadMsg"},this.locale.reloadMsgWhenError,i("a",{class:"Reload",onClick:this.updateWallets},this.locale.reload)):this.loadWallets(A.bind(this,this.locale,(null===(t=this.pointsWallets[this.type])||void 0===t?void 0:t.wallets)||[],n))]))}walletTypeChangedHandler(){this.pointsWallets[this.type]||this.updateWallets()}async updateWallets(){if(!this.endpoint||!this.session||"undefined"===this.session)return;let e=this.pointsWallets[this.type]?this.pointsWallets[this.type].pageSetting:this.getPageSettingByType(this.type);try{const t=await(async(e,t,i,n,a)=>{const s={type:i,language:t,pagination:`offset=${a.offset},limit=${a.limit}`},r=((e,t={})=>e+"?"+Object.keys(t).map((e=>`${e}=${t[e]}`)).join("&"))(e+E(s.type),s);return await(async(e,t={})=>{let i;i=await fetch(e,t),i=await i.text();try{i=JSON.parse(i)}catch(e){throw console.error(e),e}return i})(r,{headers:{"x-SessionId":n}})})(this.endpoint,this.language,this.type,this.session,e),i=t.data||[];t.success?(e.total=t.total,this.type===T.rakeback&&this.formatRakebackWalletPoints(i),this.pointsWallets[this.type]=Object.assign(Object.assign({},this.pointsWallets[this.type]),{wallets:i,pageSetting:e}),this.pointsWallets=Object.assign({},this.pointsWallets)):(console.error(t),this.pointsWallets[this.type].isLoadFailed=!0)}catch(e){console.error(e),this.pointsWallets[this.type].isLoadFailed=!0}}formatRakebackWalletPoints(e){const t=Math.pow(10,this.currencyPrecision);e.forEach((e=>{const i=Math.floor((e.points||0)*t)/t;e.pointAsString=new Intl.NumberFormat("en",{minimumFractionDigits:this.currencyPrecision,maximumFractionDigits:this.currencyPrecision}).format(i)}))}reloadPageByTypeHandler(e){if(e.detail.tableId==this.type){if(this.limit!=e.detail.limit)this.pointsWallets={},this.limit=e.detail.limit;else{let t=this.pointsWallets[this.type].pageSetting||this.getPageSettingByType(this.type);t.offset=e.detail.offset,this.pointsWallets[this.type].pageSetting=t}this.updateWallets()}}setLimit(){try{const e=this.pageLimitOptions.split(",").map((e=>parseInt(e)));e.includes(this.limit)||(this.limit=e[0])}catch(e){console.error("Error when parse PageLimitOptions",e),this.limit=10}}async componentWillLoad(){this.setLimit(),this.updateWallets(),this.validWallets=[T.spendable,T.loyalty,T.history],this.enableRakeback&&this.validWallets.push(T.rakeback)}static get assetsDirs(){return["static"]}static get watchers(){return{type:["walletTypeChangedHandler"],endpoint:["updateWallets"],language:["updateWallets"],session:["updateWallets"]}}};S.style=":host{display:block}main{max-width:420px}main player-elevate-pointcard{width:100%;height:220px}.PlayerElevatePointsDetaisContainer{background:#FFFFFF;padding:20px 10px 0;margin-top:-100px;position:relative;min-height:360px}.PlayerElevatePointsDetaisContainer .ReloadMsg{padding:20px}.PlayerElevatePointsDetaisContainer .ReloadMsg a.Reload{cursor:pointer}.TitleContainer{font-size:20px;font-weight:500;line-height:25px;letter-spacing:0em;text-align:left;display:flex;justify-content:space-between}.TopBarContainer{display:flex;align-items:center;justify-content:space-between}.TopBarContainer .TitleContainer{width:100%}.TopBarContainer .Title{background:#303030;padding:5px 16px;color:#FFFFFF;box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.2509803922);border-radius:8px;width:fit-content;margin-left:7px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.PaginationContainer{display:flex;justify-content:center}.MonthStat{margin-top:25px;display:none;font-size:16px;font-weight:500;line-height:19px;letter-spacing:0px;text-align:left;color:#242424}.MonthStat .Amount{color:#53B65A}.BackImageContainer{width:35px;height:35px;flex:0 0 35px;border-radius:6px;text-align:center;line-height:35px;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);display:none}.Records{margin-top:16px}.MenuImage,.BackImage{cursor:pointer;display:none}.Row{display:flex;justify-content:space-between;align-items:center}.Row:nth-child(n+2){margin-top:3px}.Tabs.Row{justify-content:space-around;margin-top:20px}.Tabs.Row .TabText{font-size:16px;margin:10px 15px;color:#9C9C9C;cursor:pointer}.Tabs.Row .TabText.active{color:#242424;font-weight:600}.Tabs.Row .TabBorderBottom{height:5px;border-radius:4px;background:transparent}.Tabs.Row .TabBorderBottom.active{background:#242424}.RecordContainer{margin:5px 0;padding:10px;box-shadow:0px 0px 8px 0px rgba(0, 0, 0, 0.1019607843);border-radius:5px}.RecordContainer .Title{color:#242424;font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .HistoryPoints{text-transform:lowercase}.RecordContainer .Amount{font-size:16px;font-weight:600;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Amount.Positive{color:#53B65A}.RecordContainer .Amount.Negative{color:#B41E2D}.RecordContainer .DateTime{color:#9C9C9C;font-size:16px;font-weight:400;line-height:19px;letter-spacing:0px;text-align:left}.RecordContainer .Tag{font-size:12px;font-weight:500;line-height:14px;letter-spacing:0em;text-align:center;color:#767171;padding:8px 30px;border-radius:8px;box-shadow:0px 2px 4px 0px rgba(0, 0, 0, 0.2509803922)}.NoContent{font-size:16px;color:var(--emw--color-black-100, #afafaf);text-align:center;height:120px;line-height:120px}";export{b as bonus_pagination_limits,y as bonus_pagination_nav,w as general_styling_wrapper,I as player_elevate_card_data,L as player_elevate_pointcard,S as player_elevate_points_history}
@@ -1 +1 @@
1
- import{r as e,a,h as t,F as i}from"./index-f02f9189.js";import{P as n,c as o,a as l,d as s}from"./player-elevate-card-items-57088733.js";import{t as d,T as r}from"./locale.utils-34e6f004.js";const c=class{constructor(a){e(this,a),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,a;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(a=this.playerElevateLevel)||void 0===a?void 0:a.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let a=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&a){const e=(a.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return d("tipsForNextLevel",{pointsToReach:e,levelName:a.name,lang:this.language})}return""}render(){const e=a("../static/card-ground.svg"),d=a("../static/card-ground-over.svg");return t("div",{key:"39295a651da66747a20554699bba5f96b8ad5c35",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"78c34fe054fc2459f8af3354116cd21a68ce01be",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:r,translationUrl:this.translationUrl}),t("player-elevate-card-data",{key:"b53e4b59d4ee55a2f567efa09afab3d72969e6e4",params:this.paramProxy}),t("div",{key:"1f3e504440bab2df3a181058fad7149c85c48c14",class:"OuterCover Inner",style:{backgroundImage:`url(${d}`}},t("div",{key:"a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1",class:"Content Row"},this.playerElevateLevel&&t(i,{key:"5c104f5ba1a018219c6ed5f6e50af99b035a0344"},t("div",{key:"bd94591e6ab9298ab7c769fa48efaf314dc1a63b",class:"PlayerImg"},t(n,{key:"928849ce86d8c7a483eba7850efc83f8149bae43",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),t("div",{key:"37192c9b8502eb3c7d93914369df2d784c17e9f7",class:`LevelInfo ${this.playerElevateLevel.name}`},t(o,{key:"2684a177f4bb1053c4587fd4158666fb35ca23f4",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat}),t("div",{key:"173a37c63868f2d900c12af3ffc2d9a4a57550e4",class:"PointsRange"},t(l,{key:"a7111154f7dc547e0b05c70d24508bdd75c5d882",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),t(l,{key:"ad31574e7db81a7ecb7a06b28b1d4968cbcab93e",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),t(s,{key:"88ddfdb326edfb1de9519da6b3d0e5b514725e27"}),t("div",{key:"b9c79555a8001bd2c754d7573df04016da235c84",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&t("div",{key:"02da725060c9db4a8c1c2e8bad3426894d7f8f2c",class:"PointsInfo ExpirationPoints"},this.pointExpireString," ")))))))}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:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.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:5px}.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{c as player_elevate_loyaltycard}
1
+ import{r as e,a,h as t,F as i}from"./index-f02f9189.js";import{P as n,c as l,a as o,d as s}from"./player-elevate-card-items-57088733.js";import{t as r,T as d}from"./locale.utils-34e6f004.js";const c=class{constructor(a){e(this,a),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,a;return(null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel)?null===(a=this.playerElevateLevel)||void 0===a?void 0:a.nextLevel.entryPoints:-1}getNextLevelTips(){var e;let a=null===(e=this.playerElevateLevel)||void 0===e?void 0:e.nextLevel;if(this.playerElevateLevel&&a){const e=(a.entryPoints-this.playerElevateLevel.loyaltyPoints).toFixed(2);return r("tipsForNextLevel",{pointsToReach:e,levelName:a.name,lang:this.language})}return""}render(){const e=a("../static/card-ground.svg"),r=a("../static/card-ground-over.svg");return t("div",{key:"39295a651da66747a20554699bba5f96b8ad5c35",class:`ElevateCardWrapper ${this.theme}`},t("div",{key:"78c34fe054fc2459f8af3354116cd21a68ce01be",class:"LoyaltyCard Outer",style:{backgroundImage:`url(${e}`}},t("general-styling-wrapper",{key:"be6efc6da4c3ccf4cc3ece8ecc73561bae75aa20",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:d,translationUrl:this.translationUrl}),t("player-elevate-card-data",{key:"b53e4b59d4ee55a2f567efa09afab3d72969e6e4",params:this.paramProxy}),t("div",{key:"1f3e504440bab2df3a181058fad7149c85c48c14",class:"OuterCover Inner",style:{backgroundImage:`url(${r}`}},t("div",{key:"a07c6cd95770dc1bfd3da78b1c7cc8e1367321b1",class:"Content Row"},this.playerElevateLevel&&t(i,{key:"5c104f5ba1a018219c6ed5f6e50af99b035a0344"},t("div",{key:"bd94591e6ab9298ab7c769fa48efaf314dc1a63b",class:"PlayerImg"},t(n,{key:"928849ce86d8c7a483eba7850efc83f8149bae43",onlyBadge:!0,loyaltyIconUrl:this.playerElevateLevel.presentation.asset})),t("div",{key:"37192c9b8502eb3c7d93914369df2d784c17e9f7",class:`LevelInfo ${this.playerElevateLevel.name}`},t(l,{key:"2d1df152fa288291128259c3950ff84e7cb6d8f2",hideInfo:!0,level:this.playerElevateLevel.name,expireTime:this.playerElevateLevel.expireTime,dateFormat:this.dateFormat,language:this.language}),t("div",{key:"798167bf5a4525623008954bd91c241fb1fe6f59",class:"PointsRange"},t(o,{key:"cb88a77677200b0b459900c34781857933e15c26",loyaltyPoints:this.playerElevateLevel.loyaltyPoints,language:this.language}),t(o,{key:"c7958718ca7b423842c7f88808ab69246388b75c",loyaltyPoints:this.getNextLevelPoints(),language:this.language})),t(s,{key:"e66ef489cbaa28ac60019daa1eba0b0f04309181"}),t("div",{key:"e6ca3ffc781b37bc92be8a264ae44dcbc01d9024",class:"NextLevelTip"},this.getNextLevelTips()),this.pointExpireString&&t("div",{key:"9538973ab5c1d4bdd33f4d532f7041f94a1cb2d7",class:"PointsInfo ExpirationPoints"},this.pointExpireString," ")))))))}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:11px;margin-left:5px}}@media screen and (max-width: 500px){.LoyaltyCard .Inner .LevelInfo .ElevateLevel{flex-wrap:wrap}.LoyaltyCard .Inner .LevelInfo .ElevateLevel .ExpirationDate{padding-top:0px;margin-left:0px}}.LoyaltyCard .Inner .LevelProgress{margin-left:0px}.LoyaltyCard .Inner .Row .PointsInfo.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:5px}.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{c as player_elevate_loyaltycard}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-elevate-points-history",
3
- "version": "1.67.3",
3
+ "version": "1.69.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",