@everymatrix/casino-engagement-suite-jackpot-details 1.44.0 → 1.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.esm.js +1 -1
- package/dist/casino-engagement-suite-jackpot-details/p-33f229da.entry.js +1 -0
- package/dist/casino-engagement-suite-jackpot-details/p-be66309f.entry.js +1 -0
- package/dist/casino-engagement-suite-jackpot-details/p-c7ee604a.js +2 -0
- package/dist/casino-engagement-suite-jackpot-details/p-e1255160.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.entry.js +286 -284
- package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.js +17 -11
- package/dist/cjs/casino-engagement-suite-progress-bar.cjs.entry.js +58 -75
- package/dist/cjs/index-d83151b6.js +1331 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.css +95 -104
- package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.js +476 -526
- package/dist/collection/components/casino-engagement-suite-jackpot-details/index.js +1 -0
- package/dist/collection/utils/index.js +3 -3
- package/dist/collection/utils/locale.utils.js +24 -22
- package/dist/collection/utils/utils.js +3 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-engagement-suite-jackpot-details.entry.js +286 -284
- package/dist/esm/casino-engagement-suite-jackpot-details.js +14 -11
- package/dist/esm/casino-engagement-suite-progress-bar.entry.js +58 -75
- package/dist/esm/index-0237d1e2.js +1303 -0
- package/dist/esm/loader.js +7 -13
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-jackpot-details/.stencil/packages/stencil/casino-engagement-suite-jackpot-details/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.d.ts +89 -88
- package/dist/types/components/casino-engagement-suite-jackpot-details/index.d.ts +1 -0
- package/dist/types/components.d.ts +19 -2
- package/dist/types/models/index.d.ts +38 -37
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/utils.d.ts +1 -0
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +12 -2
- package/dist/casino-engagement-suite-jackpot-details/p-0135e830.js +0 -1
- package/dist/casino-engagement-suite-jackpot-details/p-8fee813c.entry.js +0 -1
- package/dist/casino-engagement-suite-jackpot-details/p-b361748c.entry.js +0 -1
- package/dist/cjs/index-84a14c86.js +0 -1349
- package/dist/components/casino-engagement-suite-jackpot-details.d.ts +0 -11
- package/dist/components/casino-engagement-suite-jackpot-details.js +0 -439
- package/dist/components/casino-engagement-suite-progress-bar.js +0 -110
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/esm/index-5707e619.js +0 -1322
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-engagement-suite-jackpot-details/.stencil/packages/casino-engagement-suite-jackpot-details/stencil.config.d.ts +0 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-d83151b6.js');
|
|
6
6
|
|
|
7
7
|
function _typeof(o) {
|
|
8
8
|
"@babel/helpers - typeof";
|
|
@@ -99,308 +99,310 @@ function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
|
99
99
|
const DEFAULT_LANGUAGE = 'en';
|
|
100
100
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
101
101
|
const TRANSLATIONS = {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
102
|
+
en: {
|
|
103
|
+
jackpots: 'Jackpots',
|
|
104
|
+
join: 'Join',
|
|
105
|
+
unjoin: 'Unjoin',
|
|
106
|
+
info: 'Info',
|
|
107
|
+
games: 'Games',
|
|
108
|
+
operatorContribution: 'Operator Contribution',
|
|
109
|
+
betContribution: 'Bet Contribution',
|
|
110
|
+
type: 'Type',
|
|
111
|
+
winningProbability: 'Winning Probability',
|
|
112
|
+
tc: 'Terms & Conditions',
|
|
113
|
+
jackpotIsWon: 'Jackpot is won!',
|
|
114
|
+
loadMore: 'Load More',
|
|
115
|
+
jackpotDetails: 'Jackpot Details',
|
|
116
|
+
minBet: 'Min Bet',
|
|
117
|
+
maxBet: 'Max Bet',
|
|
118
|
+
Suspended: 'Suspended',
|
|
119
|
+
Closed: 'Closed',
|
|
120
|
+
betContributionTooltip: 'A % of the bet that will be added to jackpot funds (current and next jackpot amounts).',
|
|
121
|
+
operatorContributionTooltip: 'This jackpot is covered by the casino.',
|
|
122
|
+
partialWins: 'Partial wins',
|
|
123
|
+
}
|
|
122
124
|
};
|
|
123
125
|
const translate = (key, customLang) => {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
const lang = customLang;
|
|
127
|
+
return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
126
128
|
};
|
|
127
129
|
|
|
128
130
|
function formatBalance(amount, currency, maxAmount = 99999999) {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
131
|
+
amount = Math.min(amount, maxAmount);
|
|
132
|
+
return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
133
|
+
.format(amount)}`;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
const casinoEngagementSuiteJackpotDetailsCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.PopupButton{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:14px;font-weight:700;position:relative;font-family:\"Montserrat\", sans-serif}.PopupButton.Active{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.PopupButton.Active::before{content:\"\";position:absolute;inset:0;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.PopupButton.Loading{opacity:0.5;pointer-events:none}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .JackpotDetailsTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-primary, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotIconButton{width:16px;height:16px;cursor:pointer;display:flex;justify-content:center;align-items:center}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;align-items:center;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:\"Montserrat\", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:Montserrat, sans-serif;font-size:18px;font-weight:var(--emw--font-weight-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:Montserrat, sans-serif;font-weight:var(--emw--font-weight-bold, 700);font-size:12px;line-height:15px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotGamesLoadMore::before,.JackpotJoinButton.Joined::before{content:\"\";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-gray-150, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emfe-w-color-white, #FFF);text-transform:capitalize}.JackpotDetailsTabsWrapper{display:flex;flex-direction:column}.JackpotDetailsTabs{margin-top:20px;display:flex;position:relative}.JackpotDetailsTabs .JackpotDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.JackpotDetailsTabs .JackpotDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.JackpotDetailsTabs::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:14px;line-height:17px;display:flex;align-items:center}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.JackpotGamesListWrapper{overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\")}.JackpotDetailsButton .Open{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-primary, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:12px;position:absolute}.JackpotDetailsPopup.Tablet .JackpotsTooltipBackdrop,.JackpotDetailsPopup.Desktop .JackpotsTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .JackpotsTooltip,.JackpotDetailsPopup.Desktop .JackpotsTooltip{padding:60px 65px;font-size:var(--emw--font-size-small, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotsTooltip .JackpotsIconButton,.JackpotDetailsPopup.Desktop .JackpotsTooltip .JackpotsIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .JackpotContributionTooltipButton,.JackpotDetailsPopup.Tablet .JackpotIconButton,.JackpotDetailsPopup.Desktop .JackpotContributionTooltipButton,.JackpotDetailsPopup.Desktop .JackpotIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:22px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .PopupButton,.JackpotDetailsPopup.Desktop .PopupButton{min-height:36px;font-size:16px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:16px;line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:14px;line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .JackpotDetailsTabs .JackpotDetailsTab,.JackpotDetailsPopup.Desktop .JackpotDetailsTabs .JackpotDetailsTab{font-size:16px;line-height:20px}";
|
|
136
|
+
const casinoEngagementSuiteJackpotDetailsCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:\"\";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.EngagementSuiteButton.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:var(--emw--font-family-secondary, \"Montserrat\", sans-serif);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF);text-transform:capitalize}.EngagementSuiteTabs{margin-top:20px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:\"\";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px;display:flex;align-items:center}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .EngagementSuiteIconButton.Help{margin-left:5px}.JackpotGamesListWrapper{margin-top:12px;overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg\")}.JackpotDetailsButton .Open{background:center/100% url(\"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg\")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-contrast, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton{min-width:98px;min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton.JackpotGamesButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton.JackpotGamesButton{min-width:140px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.JackpotDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotGamesListWrapper,.JackpotDetailsPopup.Desktop .JackpotGamesListWrapper{margin-top:20px}";
|
|
137
|
+
const CasinoEngagementSuiteJackpotDetailsStyle0 = casinoEngagementSuiteJackpotDetailsCss;
|
|
135
138
|
|
|
136
139
|
const CasinoEngagementSuiteJackpotDetails = class {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
140
|
+
constructor(hostRef) {
|
|
141
|
+
index.registerInstance(this, hostRef);
|
|
142
|
+
this.close = index.createEvent(this, "close", 7);
|
|
143
|
+
this.back = index.createEvent(this, "back", 7);
|
|
144
|
+
this.maxVisibleGames = 0;
|
|
145
|
+
this.handleTabChange = (e) => {
|
|
146
|
+
this.activeTab = +(e.target.getAttribute('data-index'));
|
|
147
|
+
this.visibleGames = [];
|
|
148
|
+
this.maxVisibleGames = 0;
|
|
149
|
+
};
|
|
150
|
+
this.handleLoadMore = () => {
|
|
151
|
+
this.visibleGames = this.jackpot.GamesInfo.slice(0, this.visibleGames.length + this.maxVisibleGames);
|
|
152
|
+
};
|
|
153
|
+
this.toggleShowDetails = () => {
|
|
154
|
+
this.showDetails = !this.showDetails;
|
|
155
|
+
};
|
|
156
|
+
this.toggleTooltip = (ev) => {
|
|
157
|
+
if (this.tooltip) {
|
|
158
|
+
this.tooltip = '';
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
const key = ev.currentTarget.getAttribute('data-tooltip');
|
|
162
|
+
this.tooltip = translate(key, this.language);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
this.setClientStyling = () => {
|
|
166
|
+
let sheet = document.createElement('style');
|
|
167
|
+
sheet.innerHTML = this.clientStyling;
|
|
168
|
+
this.host.prepend(sheet);
|
|
169
|
+
};
|
|
170
|
+
this.setClientStylingURL = () => {
|
|
171
|
+
let url = new URL(this.clientStylingUrl);
|
|
172
|
+
let cssFile = document.createElement('style');
|
|
173
|
+
fetch(url.href)
|
|
174
|
+
.then((res) => res.text())
|
|
175
|
+
.then((data) => {
|
|
176
|
+
cssFile.innerHTML = data;
|
|
177
|
+
setTimeout(() => { this.host.prepend(cssFile); }, 1);
|
|
178
|
+
})
|
|
179
|
+
.catch((err) => {
|
|
180
|
+
console.log('Error ', err);
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
this.handleCloseClick = () => {
|
|
184
|
+
this.close.emit();
|
|
185
|
+
};
|
|
186
|
+
this.handleBackClick = () => {
|
|
187
|
+
this.back.emit();
|
|
188
|
+
};
|
|
189
|
+
this.onGameClick = (ev) => {
|
|
190
|
+
const slug = ev.currentTarget.getAttribute('data-slug');
|
|
191
|
+
if (slug) {
|
|
192
|
+
window.postMessage({
|
|
193
|
+
type: 'EngagementSuiteGameRedirect',
|
|
194
|
+
data: {
|
|
195
|
+
Slug: slug
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
this.clientStyling = '';
|
|
201
|
+
this.clientStylingUrl = '';
|
|
202
|
+
this.jackpot = undefined;
|
|
203
|
+
this.jackpotChangeStatusRequest = undefined;
|
|
204
|
+
this.language = 'en';
|
|
205
|
+
this.gameSlug = '';
|
|
206
|
+
this.device = 'Mobile';
|
|
207
|
+
this.limitStylingAppends = false;
|
|
208
|
+
this.timer = '';
|
|
209
|
+
this.disabledStatus = '';
|
|
210
|
+
this.activeTab = 1;
|
|
211
|
+
this.visibleGames = [];
|
|
212
|
+
this.enabled = false;
|
|
213
|
+
this.balance = undefined;
|
|
214
|
+
this.winBalance = undefined;
|
|
215
|
+
this.showDetails = false;
|
|
216
|
+
this.jackpotEndTime = '';
|
|
217
|
+
this.tooltip = '';
|
|
218
|
+
}
|
|
219
|
+
handleEvent(e) {
|
|
220
|
+
const { type, data } = e === null || e === void 0 ? void 0 : e.data;
|
|
221
|
+
switch (type) {
|
|
222
|
+
case 'UpdateJackpotStatus': {
|
|
223
|
+
const data = e.data.data;
|
|
224
|
+
if (this.jackpot.JackpotId === data.JackpotId) {
|
|
225
|
+
this.updateJackpotStatus(e.data.data);
|
|
226
|
+
}
|
|
227
|
+
break;
|
|
228
|
+
}
|
|
229
|
+
case 'JoinJackpotResult': {
|
|
230
|
+
const res = data;
|
|
231
|
+
if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
|
|
232
|
+
this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
|
|
233
|
+
}
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
handleJackpotUpdate() {
|
|
239
|
+
this.balance = this.jackpot.Balance;
|
|
240
|
+
this.winBalance = this.jackpot.WinBalance;
|
|
241
|
+
}
|
|
242
|
+
handleResize() {
|
|
243
|
+
this.activeTab === 2 && this.setVisibleGames();
|
|
244
|
+
this.tooltip = '';
|
|
245
|
+
}
|
|
246
|
+
componentWillLoad() {
|
|
247
|
+
this.enabled = this.jackpot.Enabled;
|
|
248
|
+
this.balance = this.jackpot.Balance;
|
|
249
|
+
this.winBalance = this.jackpot.WinBalance;
|
|
250
|
+
this.jackpotEndTime = this.jackpot.JackpotEndTime;
|
|
251
|
+
this.disabledStatus = this.jackpot.Reason || '';
|
|
252
|
+
this.startCountdown();
|
|
253
|
+
}
|
|
254
|
+
componentDidRender() {
|
|
255
|
+
if (!this.limitStylingAppends && this.host) {
|
|
256
|
+
if (this.clientStyling)
|
|
257
|
+
this.setClientStyling();
|
|
258
|
+
if (this.clientStylingUrl)
|
|
259
|
+
this.setClientStylingURL();
|
|
260
|
+
this.limitStylingAppends = true;
|
|
228
261
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
case 'JoinJackpotResult': {
|
|
232
|
-
const res = data;
|
|
233
|
-
if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
|
|
234
|
-
this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
|
|
262
|
+
if (this.activeTab === 2 && !this.maxVisibleGames) {
|
|
263
|
+
this.setVisibleGames();
|
|
235
264
|
}
|
|
236
|
-
break;
|
|
237
|
-
}
|
|
238
265
|
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
this.balance = this.jackpot.Balance;
|
|
242
|
-
this.winBalance = this.jackpot.WinBalance;
|
|
243
|
-
}
|
|
244
|
-
handleResize() {
|
|
245
|
-
this.activeTab === 2 && this.setVisibleGames();
|
|
246
|
-
this.showTooltip = false;
|
|
247
|
-
}
|
|
248
|
-
componentWillLoad() {
|
|
249
|
-
this.enabled = this.jackpot.Enabled;
|
|
250
|
-
this.balance = this.jackpot.Balance;
|
|
251
|
-
this.winBalance = this.jackpot.WinBalance;
|
|
252
|
-
this.jackpotEndTime = this.jackpot.JackpotEndTime;
|
|
253
|
-
this.disabledStatus = this.jackpot.Reason || '';
|
|
254
|
-
this.startCountdown();
|
|
255
|
-
}
|
|
256
|
-
componentDidRender() {
|
|
257
|
-
if (!this.limitStylingAppends && this.host) {
|
|
258
|
-
if (this.clientStyling)
|
|
259
|
-
this.setClientStyling();
|
|
260
|
-
if (this.clientStylingUrl)
|
|
261
|
-
this.setClientStylingURL();
|
|
262
|
-
this.limitStylingAppends = true;
|
|
266
|
+
disconnectedCallback() {
|
|
267
|
+
this.clearInterval();
|
|
263
268
|
}
|
|
264
|
-
|
|
265
|
-
|
|
269
|
+
clearInterval() {
|
|
270
|
+
if (this.interval) {
|
|
271
|
+
clearInterval(this.interval);
|
|
272
|
+
this.interval = null;
|
|
273
|
+
}
|
|
266
274
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
+
setVisibleGames() {
|
|
276
|
+
const gap = this.device === 'Mobile' ? 10 : 12;
|
|
277
|
+
const gamesPerRow = this.device === 'Mobile' ? 4 : 5;
|
|
278
|
+
const availableWidth = this.gamesListWrapperEl.offsetWidth - (gap * (gamesPerRow - 1));
|
|
279
|
+
const gameElWidth = availableWidth / gamesPerRow;
|
|
280
|
+
const gameElHeight = (gameElWidth / 74 * 40) + gap;
|
|
281
|
+
this.maxVisibleGames = Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight / gameElHeight) * gamesPerRow, gamesPerRow);
|
|
282
|
+
this.visibleGames = this.jackpot.GamesInfo.slice(0, this.maxVisibleGames);
|
|
275
283
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
if (event.IsClosed) {
|
|
288
|
-
this.clearInterval();
|
|
289
|
-
this.disabledStatus = event.Reason;
|
|
290
|
-
this.activeTab = 1;
|
|
284
|
+
updateJackpotStatus(event) {
|
|
285
|
+
if (event.IsClosed) {
|
|
286
|
+
this.clearInterval();
|
|
287
|
+
this.disabledStatus = event.Reason;
|
|
288
|
+
this.activeTab = 1;
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
this.disabledStatus = '';
|
|
292
|
+
this.jackpotEndTime = event.JackpotEndTime;
|
|
293
|
+
this.startCountdown();
|
|
294
|
+
}
|
|
291
295
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
this.jackpotEndTime = event.JackpotEndTime;
|
|
295
|
-
this.startCountdown();
|
|
296
|
+
getTopNavigationTemplate() {
|
|
297
|
+
return (index.h("div", { class: "JackpotDetailsNavigation" }, index.h("button", { class: "EngagementSuiteIconButton Back", onClick: this.handleBackClick }), index.h("div", { class: "JackpotPopupName" }, translate('jackpots', this.language)), index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.handleCloseClick })));
|
|
296
298
|
}
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
return (index.h("div", { class: "JackpotDetailsNavigation" }, index.h("button", { class: "JackpotIconButton", onClick: this.handleBackClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/back.svg", alt: "back" })), index.h("div", { class: "JackpotPopupName" }, translate('jackpots', this.language)), index.h("button", { class: "JackpotIconButton", onClick: this.handleCloseClick }, index.h("img", { src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "close" }))));
|
|
300
|
-
}
|
|
301
|
-
getJackpotBalance() {
|
|
302
|
-
return formatBalance(this.balance, this.jackpot.Currency);
|
|
303
|
-
}
|
|
304
|
-
getJoinButtonClasses() {
|
|
305
|
-
return {
|
|
306
|
-
PopupButton: true,
|
|
307
|
-
Active: this.enabled,
|
|
308
|
-
Loading: this.jackpot.Pending
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
getJackpotDetailsHeaderTemplate() {
|
|
312
|
-
const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
|
|
313
|
-
return (index.h("div", { class: "JackpotDetailsHeader" }, index.h("div", null, index.h("div", { class: "JackpotType" }, this.jackpot.Type), index.h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), index.h("div", { class: "JackpotDetailsHeaderSecondCol" }, index.h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
|
|
314
|
-
? translate('unjoin', this.language)
|
|
315
|
-
: translate('join', this.language)), !!this.winBalance && index.h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
|
|
316
|
-
}
|
|
317
|
-
getTabsTemplate() {
|
|
318
|
-
return index.h("div", { class: "JackpotDetailsTabs" }, index.h("div", { "data-index": "1", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('info', this.language)), index.h("div", { "data-index": "2", onClick: this.handleTabChange, class: `JackpotDetailsTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('games', this.language)));
|
|
319
|
-
}
|
|
320
|
-
getTabsContentTemplate() {
|
|
321
|
-
return this.activeTab === 1
|
|
322
|
-
? this.getJackpotInfoTemplate()
|
|
323
|
-
: this.getGamesTemplate();
|
|
324
|
-
}
|
|
325
|
-
getJackpotDetailsTemplate() {
|
|
326
|
-
return index.h("div", null, index.h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, index.h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), index.h("span", null, translate('jackpotDetails', this.language))), this.showDetails && index.h("div", { class: "JackpotDetailsContent" }, this.jackpot.Description && index.h("p", { class: "JackpotDescription" }, this.jackpot.Description), this.jackpot.JackpotRulesUrl && index.h("a", { class: "TermsAndConditions", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl))));
|
|
327
|
-
}
|
|
328
|
-
getBetLimitsRange() {
|
|
329
|
-
var _a, _b, _c, _d;
|
|
330
|
-
if (this.jackpot.BetLimits) {
|
|
331
|
-
const playerCurrency = this.jackpot.Currency;
|
|
332
|
-
const betCurrencies = Object.keys(this.jackpot.BetLimits);
|
|
333
|
-
const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
|
|
334
|
-
const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
|
|
335
|
-
const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
336
|
-
const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
337
|
-
const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
|
|
338
|
-
const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
|
|
339
|
-
return index.h("div", null, showMinBet && index.h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", index.h("span", null, formattedMinBet)), showMaxBet && index.h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", index.h("span", null, formattedMaxBet)));
|
|
299
|
+
getJackpotBalance() {
|
|
300
|
+
return formatBalance(this.balance, this.jackpot.Currency);
|
|
340
301
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
const list = this.visibleGames.map((game) => {
|
|
348
|
-
return index.h("div", { onClick: this.onGameClick, class: `JackpotGamesListItem ${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, key: game.CasinoGameId, "data-slug": game.GameSlug, style: { background: `center / cover url(${game.GameIcon}) no-repeat` }, title: game.GameName });
|
|
349
|
-
});
|
|
350
|
-
return [
|
|
351
|
-
index.h("div", { class: "JackpotGamesListWrapper", ref: el => this.gamesListWrapperEl = el }, index.h("div", { class: "JackpotGamesList" }, list)),
|
|
352
|
-
this.visibleGames.length < this.jackpot.GamesInfo.length
|
|
353
|
-
? index.h("button", { class: "PopupButton Active JackpotGamesButton", onClick: this.handleLoadMore }, translate('loadMore', this.language))
|
|
354
|
-
: ''
|
|
355
|
-
];
|
|
356
|
-
}
|
|
357
|
-
getJackpotCountdown() {
|
|
358
|
-
const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
|
|
359
|
-
return (index.h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
|
|
360
|
-
}
|
|
361
|
-
startCountdown() {
|
|
362
|
-
this.updateTimer();
|
|
363
|
-
this.interval = setInterval(() => {
|
|
364
|
-
this.updateTimer();
|
|
365
|
-
}, 1000);
|
|
366
|
-
}
|
|
367
|
-
updateTimer() {
|
|
368
|
-
const expirationTime = new Date(this.jackpotEndTime).getTime();
|
|
369
|
-
const now = new Date().getTime();
|
|
370
|
-
const distance = expirationTime - now;
|
|
371
|
-
if (distance < 1) {
|
|
372
|
-
this.clearInterval();
|
|
373
|
-
return;
|
|
302
|
+
getJoinButtonClasses() {
|
|
303
|
+
return {
|
|
304
|
+
EngagementSuiteButton: true,
|
|
305
|
+
Active: this.enabled,
|
|
306
|
+
Loading: this.jackpot.Pending
|
|
307
|
+
};
|
|
374
308
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
309
|
+
getJackpotDetailsHeaderTemplate() {
|
|
310
|
+
const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
|
|
311
|
+
return (index.h("div", { class: "JackpotDetailsHeader" }, index.h("div", null, index.h("div", { class: "JackpotType" }, this.jackpot.Type), index.h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), index.h("div", { class: "JackpotDetailsHeaderSecondCol" }, index.h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
|
|
312
|
+
? translate('unjoin', this.language)
|
|
313
|
+
: translate('join', this.language)), !!this.winBalance && index.h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
|
|
314
|
+
}
|
|
315
|
+
getTabsTemplate() {
|
|
316
|
+
return index.h("div", { class: "EngagementSuiteTabs" }, index.h("div", { "data-index": "1", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 1 ? 'Active' : ''}` }, translate('info', this.language)), index.h("div", { "data-index": "2", onClick: this.handleTabChange, class: `EngagementSuiteTab ${this.activeTab === 2 ? 'Active' : ''}` }, translate('games', this.language)));
|
|
317
|
+
}
|
|
318
|
+
getTabsContentTemplate() {
|
|
319
|
+
return this.activeTab === 1
|
|
320
|
+
? this.getJackpotInfoTemplate()
|
|
321
|
+
: this.getGamesTemplate();
|
|
322
|
+
}
|
|
323
|
+
getJackpotDetailsTemplate() {
|
|
324
|
+
return index.h("div", null, index.h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, index.h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), index.h("span", null, translate('jackpotDetails', this.language))), this.showDetails && index.h("div", { class: "JackpotDetailsContent" }, this.jackpot.Description && index.h("p", { class: "JackpotDescription" }, this.jackpot.Description), this.jackpot.JackpotRulesUrl && index.h("a", { class: "TermsAndConditions", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl))));
|
|
325
|
+
}
|
|
326
|
+
getBetLimitsRange() {
|
|
327
|
+
var _a, _b, _c, _d;
|
|
328
|
+
if (this.jackpot.BetLimits) {
|
|
329
|
+
const playerCurrency = this.jackpot.Currency;
|
|
330
|
+
const betCurrencies = Object.keys(this.jackpot.BetLimits);
|
|
331
|
+
const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
|
|
332
|
+
const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
|
|
333
|
+
const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
334
|
+
const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
335
|
+
const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
|
|
336
|
+
const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
|
|
337
|
+
return index.h("div", null, showMinBet && index.h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", index.h("span", null, formattedMinBet)), showMaxBet && index.h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", index.h("span", null, formattedMaxBet)));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
getPartialWins() {
|
|
341
|
+
return index.h("div", { class: "JackpotInfoItem" }, translate('partialWins', this.language), ":\u00A0", index.h("span", null, this.jackpot.PartHits.map(percent => `${percent}%`).join(', ')));
|
|
342
|
+
}
|
|
343
|
+
getJackpotInfoTemplate() {
|
|
344
|
+
var _a;
|
|
345
|
+
const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
|
|
346
|
+
return index.h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), index.h("div", { class: "JackpotInfo" }, this.jackpot.JackpotTypePresentation !== 'Static' && index.h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", index.h("span", null, +this.jackpot.ContributionPercent, "%"), index.h("button", { class: "EngagementSuiteIconButton Help", "data-tooltip": "betContributionTooltip", onClick: this.toggleTooltip })), index.h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", index.h("span", null, this.jackpot.JackpotTypePresentation)), index.h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", index.h("span", null, "1:", this.jackpot.Probability)), index.h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", index.h("span", null, +this.jackpot.OperatorContributionPercent, "%"), index.h("button", { class: "EngagementSuiteIconButton Help", "data-tooltip": "operatorContributionTooltip", onClick: this.toggleTooltip })), this.getBetLimitsRange(), ((_a = this.jackpot.PartHits) === null || _a === void 0 ? void 0 : _a.length) > 1 && this.getPartialWins()));
|
|
347
|
+
}
|
|
348
|
+
getGamesTemplate() {
|
|
349
|
+
const list = this.visibleGames.map((game) => {
|
|
350
|
+
return index.h("div", { onClick: this.onGameClick, class: `JackpotGamesListItem ${game.GameSlug === this.gameSlug ? 'Disabled' : ''}`, key: game.CasinoGameId, "data-slug": game.GameSlug, style: { background: `center / cover url(${game.GameIcon}) no-repeat` }, title: game.GameName });
|
|
351
|
+
});
|
|
352
|
+
return [
|
|
353
|
+
index.h("div", { class: "JackpotGamesListWrapper", ref: el => this.gamesListWrapperEl = el }, index.h("div", { class: "JackpotGamesList" }, list)),
|
|
354
|
+
this.visibleGames.length < this.jackpot.GamesInfo.length
|
|
355
|
+
? index.h("button", { class: "EngagementSuiteButton Active JackpotGamesButton", onClick: this.handleLoadMore }, translate('loadMore', this.language))
|
|
356
|
+
: ''
|
|
357
|
+
];
|
|
358
|
+
}
|
|
359
|
+
getJackpotCountdown() {
|
|
360
|
+
const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
|
|
361
|
+
return (index.h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
|
|
362
|
+
}
|
|
363
|
+
startCountdown() {
|
|
364
|
+
this.updateTimer();
|
|
365
|
+
this.interval = setInterval(() => {
|
|
366
|
+
this.updateTimer();
|
|
367
|
+
}, 1000);
|
|
368
|
+
}
|
|
369
|
+
updateTimer() {
|
|
370
|
+
const expirationTime = new Date(this.jackpotEndTime).getTime();
|
|
371
|
+
const now = new Date().getTime();
|
|
372
|
+
const distance = expirationTime - now;
|
|
373
|
+
if (distance < 1) {
|
|
374
|
+
this.clearInterval();
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
const { days, hours, minutes, seconds } = {
|
|
378
|
+
days: String(Math.floor(distance / (1000 * 60 * 60 * 24))).padStart(2, '0'),
|
|
379
|
+
hours: String(Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))).padStart(2, '0'),
|
|
380
|
+
minutes: String(Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60))).padStart(2, '0'),
|
|
381
|
+
seconds: String(Math.floor((distance % (1000 * 60)) / 1000)).padStart(2, '0')
|
|
382
|
+
};
|
|
383
|
+
this.timer = days === '00'
|
|
384
|
+
? `${hours}h:${minutes}m:${seconds}s`
|
|
385
|
+
: `${days}d:${hours}h:${minutes}m`;
|
|
386
|
+
}
|
|
387
|
+
getPopupClasses() {
|
|
388
|
+
return {
|
|
389
|
+
JackpotDetailsPopup: true,
|
|
390
|
+
Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
|
|
391
|
+
[this.device]: true,
|
|
392
|
+
[this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
getTooltipTemplate() {
|
|
396
|
+
return (index.h("div", { class: "EngagementSuiteTooltipBackdrop" }, index.h("div", { class: "EngagementSuiteTooltip" }, index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), this.tooltip)));
|
|
397
|
+
}
|
|
398
|
+
render() {
|
|
399
|
+
return index.h("div", { key: '51a4ce4c19f53b51c8c5156b982a7e3083e53df5', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), index.h("div", { key: 'd28760bc584b7d3c7cfee5bf7b3da0bac4688079', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.tooltip && this.getTooltipTemplate()));
|
|
400
|
+
}
|
|
401
|
+
get host() { return index.getElement(this); }
|
|
402
|
+
static get watchers() { return {
|
|
403
|
+
"jackpot": ["handleJackpotUpdate"]
|
|
404
|
+
}; }
|
|
403
405
|
};
|
|
404
|
-
CasinoEngagementSuiteJackpotDetails.style =
|
|
406
|
+
CasinoEngagementSuiteJackpotDetails.style = CasinoEngagementSuiteJackpotDetailsStyle0;
|
|
405
407
|
|
|
406
408
|
exports.casino_engagement_suite_jackpot_details = CasinoEngagementSuiteJackpotDetails;
|