@everymatrix/casino-engagement-suite-jackpot-details 1.45.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.
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-c7ee604a.js";export{s as setNonce}from"./p-c7ee604a.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t([["p-5a599b1a",[[1,"casino-engagement-suite-jackpot-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],jackpot:[16],jackpotChangeStatusRequest:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],limitStylingAppends:[32],timer:[32],disabledStatus:[32],activeTab:[32],visibleGames:[32],enabled:[32],balance:[32],winBalance:[32],showDetails:[32],jackpotEndTime:[32],showTooltip:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{jackpot:["handleJackpotUpdate"]}]]],["p-be66309f",[[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e))));
1
+ import{p as e,b as t}from"./p-c7ee604a.js";export{s as setNonce}from"./p-c7ee604a.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t([["p-33f229da",[[1,"casino-engagement-suite-jackpot-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],jackpot:[16],jackpotChangeStatusRequest:[1040],language:[1],gameSlug:[1,"game-slug"],device:[1],limitStylingAppends:[32],timer:[32],disabledStatus:[32],activeTab:[32],visibleGames:[32],enabled:[32],balance:[32],winBalance:[32],showDetails:[32],jackpotEndTime:[32],tooltip:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{jackpot:["handleJackpotUpdate"]}]]],["p-be66309f",[[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],indeterminate:[4],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as o,g as a}from"./p-c7ee604a.js";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function s(t){n(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===i(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t,e){n(2,arguments);var o=s(t),a=s(e);return o.getTime()<a.getTime()}const r=["en"],l={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",betContribution:"Bet Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot is won!",loadMore:"Load More",jackpotDetails:"Jackpot Details",minBet:"Min Bet",maxBet:"Max Bet",Suspended:"Suspended",Closed:"Closed",betContributionTooltip:"A % of the bet that will be added to jackpot funds (current and next jackpot amounts).",operatorContributionTooltip:"This jackpot is covered by the casino.",partialWins:"Partial wins"}},c=(t,e)=>{const o=e;return l[void 0!==o&&r.includes(o)?o:"en"][t]};function u(t,e,o=99999999){return t=Math.min(t,o),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}const g=class{constructor(o){t(this,o),this.close=e(this,"close",7),this.back=e(this,"back",7),this.maxVisibleGames=0,this.handleTabChange=t=>{this.activeTab=+t.target.getAttribute("data-index"),this.visibleGames=[],this.maxVisibleGames=0},this.handleLoadMore=()=>{this.visibleGames=this.jackpot.GamesInfo.slice(0,this.visibleGames.length+this.maxVisibleGames)},this.toggleShowDetails=()=>{this.showDetails=!this.showDetails},this.toggleTooltip=t=>{if(this.tooltip)this.tooltip="";else{const e=t.currentTarget.getAttribute("data-tooltip");this.tooltip=c(e,this.language)}},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((t=>{console.log("Error ",t)}))},this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()},this.onGameClick=t=>{const e=t.currentTarget.getAttribute("data-slug");e&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e}})},this.clientStyling="",this.clientStylingUrl="",this.jackpot=void 0,this.jackpotChangeStatusRequest=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.enabled=!1,this.balance=void 0,this.winBalance=void 0,this.showDetails=!1,this.jackpotEndTime="",this.tooltip=""}handleEvent(t){const{type:e,data:o}=null==t?void 0:t.data;switch(e){case"UpdateJackpotStatus":this.jackpot.JackpotId===t.data.data.JackpotId&&this.updateJackpotStatus(t.data.data);break;case"JoinJackpotResult":o.Success&&this.jackpot.JackpotId in o.JackpotIds&&(this.enabled=this.jackpot.Enabled=o.JackpotIds[this.jackpot.JackpotId])}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames(),this.tooltip=""}componentWillLoad(){this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance,this.jackpotEndTime=this.jackpot.JackpotEndTime,this.disabledStatus=this.jackpot.Reason||"",this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}setVisibleGames(){const t="Mobile"===this.device?10:12,e="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-t*(e-1))/e/74*40+t))*e,e),this.visibleGames=this.jackpot.GamesInfo.slice(0,this.maxVisibleGames)}updateJackpotStatus(t){t.IsClosed?(this.clearInterval(),this.disabledStatus=t.Reason,this.activeTab=1):(this.disabledStatus="",this.jackpotEndTime=t.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return o("div",{class:"JackpotDetailsNavigation"},o("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),o("div",{class:"JackpotPopupName"},c("jackpots",this.language)),o("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getJackpotBalance(){return u(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{EngagementSuiteButton:!0,Active:this.enabled,Loading:this.jackpot.Pending}}getJackpotDetailsHeaderTemplate(){const t=p(new Date(this.jackpot.JackpotEndTime),new Date)||!!this.disabledStatus;return o("div",{class:"JackpotDetailsHeader"},o("div",null,o("div",{class:"JackpotType"},this.jackpot.Type),o("div",{class:"JackpotBalance"},this.getJackpotBalance())),o("div",{class:"JackpotDetailsHeaderSecondCol"},o("button",{disabled:t,onClick:this.jackpotChangeStatusRequest,class:this.getJoinButtonClasses(),"data-id":this.jackpot.JackpotId},c(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&o("div",{class:"JackpotIsWon"},c("jackpotIsWon",this.language))))}getTabsTemplate(){return o("div",{class:"EngagementSuiteTabs"},o("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},c("info",this.language)),o("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},c("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getJackpotInfoTemplate():this.getGamesTemplate()}getJackpotDetailsTemplate(){return o("div",null,o("div",{class:"JackpotDetailsButton",onClick:this.toggleShowDetails},o("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),o("span",null,c("jackpotDetails",this.language))),this.showDetails&&o("div",{class:"JackpotDetailsContent"},this.jackpot.Description&&o("p",{class:"JackpotDescription"},this.jackpot.Description),this.jackpot.JackpotRulesUrl&&o("a",{class:"TermsAndConditions",href:this.jackpot.JackpotRulesUrl,target:"_blank"},c("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var t,e,a,i;if(this.jackpot.BetLimits){const n=this.jackpot.Currency,s=Object.keys(this.jackpot.BetLimits),p=s.find((t=>t===n))||s[0],r=this.jackpot.BetLimits&&!!(null===(t=this.jackpot.BetLimits[p])||void 0===t?void 0:t.MinBet),l=this.jackpot.BetLimits&&!!(null===(e=this.jackpot.BetLimits[p])||void 0===e?void 0:e.MaxBet),g=u(null===(a=this.jackpot.BetLimits[p])||void 0===a?void 0:a.MinBet,p),h=u(null===(i=this.jackpot.BetLimits[p])||void 0===i?void 0:i.MaxBet,p);return o("div",null,r&&o("div",{class:"JackpotInfoItem"},c("minBet",this.language),": ",o("span",null,g)),l&&o("div",{class:"JackpotInfoItem"},c("maxBet",this.language),": ",o("span",null,h)))}}getPartialWins(){return o("div",{class:"JackpotInfoItem"},c("partialWins",this.language),": ",o("span",null,this.jackpot.PartHits.map((t=>`${t}%`)).join(", ")))}getJackpotInfoTemplate(){var t;return o("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),o("div",{class:"JackpotInfo"},"Static"!==this.jackpot.JackpotTypePresentation&&o("div",{class:"JackpotInfoItem"},c("betContribution",this.language),": ",o("span",null,+this.jackpot.ContributionPercent,"%"),o("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"betContributionTooltip",onClick:this.toggleTooltip})),o("div",{class:"JackpotInfoItem"},c("type",this.language),": ",o("span",null,this.jackpot.JackpotTypePresentation)),o("div",{class:"JackpotInfoItem"},c("winningProbability",this.language),": ",o("span",null,"1:",this.jackpot.Probability)),o("div",{class:"JackpotInfoItem"},c("operatorContribution",this.language),": ",o("span",null,+this.jackpot.OperatorContributionPercent,"%"),o("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"operatorContributionTooltip",onClick:this.toggleTooltip})),this.getBetLimitsRange(),(null===(t=this.jackpot.PartHits)||void 0===t?void 0:t.length)>1&&this.getPartialWins()))}getGamesTemplate(){const t=this.visibleGames.map((t=>o("div",{onClick:this.onGameClick,class:"JackpotGamesListItem "+(t.GameSlug===this.gameSlug?"Disabled":""),key:t.CasinoGameId,"data-slug":t.GameSlug,style:{background:`center / cover url(${t.GameIcon}) no-repeat`},title:t.GameName})));return[o("div",{class:"JackpotGamesListWrapper",ref:t=>this.gamesListWrapperEl=t},o("div",{class:"JackpotGamesList"},t)),this.visibleGames.length<this.jackpot.GamesInfo.length?o("button",{class:"EngagementSuiteButton Active JackpotGamesButton",onClick:this.handleLoadMore},c("loadMore",this.language)):""]}getJackpotCountdown(){const t=c(this.disabledStatus,this.language)||this.timer;return o("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},t)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const t=new Date(this.jackpotEndTime).getTime()-(new Date).getTime();if(t<1)return void this.clearInterval();const{days:e,hours:o,minutes:a,seconds:i}={days:String(Math.floor(t/864e5)).padStart(2,"0"),hours:String(Math.floor(t%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(t%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(t%6e4/1e3)).padStart(2,"0")};this.timer="00"===e?`${o}h:${a}m:${i}s`:`${e}d:${o}h:${a}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus||p(new Date(this.jackpot.JackpotEndTime),new Date),[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}getTooltipTemplate(){return o("div",{class:"EngagementSuiteTooltipBackdrop"},o("div",{class:"EngagementSuiteTooltip"},o("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return o("div",{key:"51a4ce4c19f53b51c8c5156b982a7e3083e53df5",class:this.getPopupClasses()},this.getTopNavigationTemplate(),o("div",{key:"d28760bc584b7d3c7cfee5bf7b3da0bac4688079",class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate()))}get host(){return a(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};g.style=':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}';export{g as casino_engagement_suite_jackpot_details}
@@ -117,7 +117,9 @@ const TRANSLATIONS = {
117
117
  maxBet: 'Max Bet',
118
118
  Suspended: 'Suspended',
119
119
  Closed: 'Closed',
120
- contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
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',
121
123
  }
122
124
  };
123
125
  const translate = (key, customLang) => {
@@ -151,8 +153,14 @@ const CasinoEngagementSuiteJackpotDetails = class {
151
153
  this.toggleShowDetails = () => {
152
154
  this.showDetails = !this.showDetails;
153
155
  };
154
- this.toggleTooltip = () => {
155
- this.showTooltip = !this.showTooltip;
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
+ }
156
164
  };
157
165
  this.setClientStyling = () => {
158
166
  let sheet = document.createElement('style');
@@ -206,7 +214,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
206
214
  this.winBalance = undefined;
207
215
  this.showDetails = false;
208
216
  this.jackpotEndTime = '';
209
- this.showTooltip = false;
217
+ this.tooltip = '';
210
218
  }
211
219
  handleEvent(e) {
212
220
  const { type, data } = e === null || e === void 0 ? void 0 : e.data;
@@ -233,7 +241,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
233
241
  }
234
242
  handleResize() {
235
243
  this.activeTab === 2 && this.setVisibleGames();
236
- this.showTooltip = false;
244
+ this.tooltip = '';
237
245
  }
238
246
  componentWillLoad() {
239
247
  this.enabled = this.jackpot.Enabled;
@@ -329,9 +337,13 @@ const CasinoEngagementSuiteJackpotDetails = class {
329
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)));
330
338
  }
331
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
+ }
332
343
  getJackpotInfoTemplate() {
344
+ var _a;
333
345
  const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
334
- return index.h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), index.h("div", { class: "JackpotInfo" }, index.h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", index.h("span", null, +this.jackpot.ContributionPercent, "%")), 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", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
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()));
335
347
  }
336
348
  getGamesTemplate() {
337
349
  const list = this.visibleGames.map((game) => {
@@ -381,10 +393,10 @@ const CasinoEngagementSuiteJackpotDetails = class {
381
393
  };
382
394
  }
383
395
  getTooltipTemplate() {
384
- return (index.h("div", { class: "EngagementSuiteTooltipBackdrop" }, index.h("div", { class: "EngagementSuiteTooltip" }, index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), translate('contributionTooltip', this.language))));
396
+ return (index.h("div", { class: "EngagementSuiteTooltipBackdrop" }, index.h("div", { class: "EngagementSuiteTooltip" }, index.h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), this.tooltip)));
385
397
  }
386
398
  render() {
387
- return index.h("div", { key: '96e68ef1594d185301719b8c8f4c6cb0c32307e9', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), index.h("div", { key: '8eb282874b1efc99a05dfcf479b8b1be51402caa', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
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()));
388
400
  }
389
401
  get host() { return index.getElement(this); }
390
402
  static get watchers() { return {
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["casino-engagement-suite-jackpot-details.cjs",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"showTooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
22
+ return index.bootstrapLazy([["casino-engagement-suite-jackpot-details.cjs",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"tooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["casino-engagement-suite-jackpot-details.cjs",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"showTooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
11
+ return index.bootstrapLazy([["casino-engagement-suite-jackpot-details.cjs",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"tooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar.cjs",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -17,8 +17,14 @@ export class CasinoEngagementSuiteJackpotDetails {
17
17
  this.toggleShowDetails = () => {
18
18
  this.showDetails = !this.showDetails;
19
19
  };
20
- this.toggleTooltip = () => {
21
- this.showTooltip = !this.showTooltip;
20
+ this.toggleTooltip = (ev) => {
21
+ if (this.tooltip) {
22
+ this.tooltip = '';
23
+ }
24
+ else {
25
+ const key = ev.currentTarget.getAttribute('data-tooltip');
26
+ this.tooltip = translate(key, this.language);
27
+ }
22
28
  };
23
29
  this.setClientStyling = () => {
24
30
  let sheet = document.createElement('style');
@@ -72,7 +78,7 @@ export class CasinoEngagementSuiteJackpotDetails {
72
78
  this.winBalance = undefined;
73
79
  this.showDetails = false;
74
80
  this.jackpotEndTime = '';
75
- this.showTooltip = false;
81
+ this.tooltip = '';
76
82
  }
77
83
  handleEvent(e) {
78
84
  const { type, data } = e === null || e === void 0 ? void 0 : e.data;
@@ -99,7 +105,7 @@ export class CasinoEngagementSuiteJackpotDetails {
99
105
  }
100
106
  handleResize() {
101
107
  this.activeTab === 2 && this.setVisibleGames();
102
- this.showTooltip = false;
108
+ this.tooltip = '';
103
109
  }
104
110
  componentWillLoad() {
105
111
  this.enabled = this.jackpot.Enabled;
@@ -195,9 +201,13 @@ export class CasinoEngagementSuiteJackpotDetails {
195
201
  return h("div", null, showMinBet && h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", h("span", null, formattedMinBet)), showMaxBet && h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", h("span", null, formattedMaxBet)));
196
202
  }
197
203
  }
204
+ getPartialWins() {
205
+ return h("div", { class: "JackpotInfoItem" }, translate('partialWins', this.language), ":\u00A0", h("span", null, this.jackpot.PartHits.map(percent => `${percent}%`).join(', ')));
206
+ }
198
207
  getJackpotInfoTemplate() {
208
+ var _a;
199
209
  const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
200
- return h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.ContributionPercent, "%")), h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", h("span", null, this.jackpot.JackpotTypePresentation)), h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", h("span", null, "1:", this.jackpot.Probability)), h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.OperatorContributionPercent, "%"), h("button", { class: "EngagementSuiteIconButton Help", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
210
+ return h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, this.jackpot.JackpotTypePresentation !== 'Static' && h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.ContributionPercent, "%"), h("button", { class: "EngagementSuiteIconButton Help", "data-tooltip": "betContributionTooltip", onClick: this.toggleTooltip })), h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", h("span", null, this.jackpot.JackpotTypePresentation)), h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", h("span", null, "1:", this.jackpot.Probability)), h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.OperatorContributionPercent, "%"), 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()));
201
211
  }
202
212
  getGamesTemplate() {
203
213
  const list = this.visibleGames.map((game) => {
@@ -247,10 +257,10 @@ export class CasinoEngagementSuiteJackpotDetails {
247
257
  };
248
258
  }
249
259
  getTooltipTemplate() {
250
- return (h("div", { class: "EngagementSuiteTooltipBackdrop" }, h("div", { class: "EngagementSuiteTooltip" }, h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), translate('contributionTooltip', this.language))));
260
+ return (h("div", { class: "EngagementSuiteTooltipBackdrop" }, h("div", { class: "EngagementSuiteTooltip" }, h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), this.tooltip)));
251
261
  }
252
262
  render() {
253
- return h("div", { key: '96e68ef1594d185301719b8c8f4c6cb0c32307e9', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), h("div", { key: '8eb282874b1efc99a05dfcf479b8b1be51402caa', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
263
+ return h("div", { key: '51a4ce4c19f53b51c8c5156b982a7e3083e53df5', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), h("div", { key: 'd28760bc584b7d3c7cfee5bf7b3da0bac4688079', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.tooltip && this.getTooltipTemplate()));
254
264
  }
255
265
  static get is() { return "casino-engagement-suite-jackpot-details"; }
256
266
  static get encapsulation() { return "shadow"; }
@@ -411,7 +421,7 @@ export class CasinoEngagementSuiteJackpotDetails {
411
421
  "winBalance": {},
412
422
  "showDetails": {},
413
423
  "jackpotEndTime": {},
414
- "showTooltip": {}
424
+ "tooltip": {}
415
425
  };
416
426
  }
417
427
  static get events() {
@@ -19,7 +19,9 @@ const TRANSLATIONS = {
19
19
  maxBet: 'Max Bet',
20
20
  Suspended: 'Suspended',
21
21
  Closed: 'Closed',
22
- contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
22
+ betContributionTooltip: 'A % of the bet that will be added to jackpot funds (current and next jackpot amounts).',
23
+ operatorContributionTooltip: 'This jackpot is covered by the casino.',
24
+ partialWins: 'Partial wins',
23
25
  }
24
26
  };
25
27
  export const translate = (key, customLang) => {
@@ -113,7 +113,9 @@ const TRANSLATIONS = {
113
113
  maxBet: 'Max Bet',
114
114
  Suspended: 'Suspended',
115
115
  Closed: 'Closed',
116
- contributionTooltip: 'A % of the bet that will be contributed by the casino to the jackpot amount.'
116
+ betContributionTooltip: 'A % of the bet that will be added to jackpot funds (current and next jackpot amounts).',
117
+ operatorContributionTooltip: 'This jackpot is covered by the casino.',
118
+ partialWins: 'Partial wins',
117
119
  }
118
120
  };
119
121
  const translate = (key, customLang) => {
@@ -147,8 +149,14 @@ const CasinoEngagementSuiteJackpotDetails = class {
147
149
  this.toggleShowDetails = () => {
148
150
  this.showDetails = !this.showDetails;
149
151
  };
150
- this.toggleTooltip = () => {
151
- this.showTooltip = !this.showTooltip;
152
+ this.toggleTooltip = (ev) => {
153
+ if (this.tooltip) {
154
+ this.tooltip = '';
155
+ }
156
+ else {
157
+ const key = ev.currentTarget.getAttribute('data-tooltip');
158
+ this.tooltip = translate(key, this.language);
159
+ }
152
160
  };
153
161
  this.setClientStyling = () => {
154
162
  let sheet = document.createElement('style');
@@ -202,7 +210,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
202
210
  this.winBalance = undefined;
203
211
  this.showDetails = false;
204
212
  this.jackpotEndTime = '';
205
- this.showTooltip = false;
213
+ this.tooltip = '';
206
214
  }
207
215
  handleEvent(e) {
208
216
  const { type, data } = e === null || e === void 0 ? void 0 : e.data;
@@ -229,7 +237,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
229
237
  }
230
238
  handleResize() {
231
239
  this.activeTab === 2 && this.setVisibleGames();
232
- this.showTooltip = false;
240
+ this.tooltip = '';
233
241
  }
234
242
  componentWillLoad() {
235
243
  this.enabled = this.jackpot.Enabled;
@@ -325,9 +333,13 @@ const CasinoEngagementSuiteJackpotDetails = class {
325
333
  return h("div", null, showMinBet && h("div", { class: "JackpotInfoItem" }, translate('minBet', this.language), ":\u00A0", h("span", null, formattedMinBet)), showMaxBet && h("div", { class: "JackpotInfoItem" }, translate('maxBet', this.language), ":\u00A0", h("span", null, formattedMaxBet)));
326
334
  }
327
335
  }
336
+ getPartialWins() {
337
+ return h("div", { class: "JackpotInfoItem" }, translate('partialWins', this.language), ":\u00A0", h("span", null, this.jackpot.PartHits.map(percent => `${percent}%`).join(', ')));
338
+ }
328
339
  getJackpotInfoTemplate() {
340
+ var _a;
329
341
  const showDetails = !!(this.jackpot.Description || this.jackpot.JackpotRulesUrl);
330
- return h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.ContributionPercent, "%")), h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", h("span", null, this.jackpot.JackpotTypePresentation)), h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", h("span", null, "1:", this.jackpot.Probability)), h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.OperatorContributionPercent, "%"), h("button", { class: "EngagementSuiteIconButton Help", onClick: this.toggleTooltip })), this.getBetLimitsRange()));
342
+ return h("div", { class: "JackpotInfoTabContent" }, showDetails && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, this.jackpot.JackpotTypePresentation !== 'Static' && h("div", { class: "JackpotInfoItem" }, translate('betContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.ContributionPercent, "%"), h("button", { class: "EngagementSuiteIconButton Help", "data-tooltip": "betContributionTooltip", onClick: this.toggleTooltip })), h("div", { class: "JackpotInfoItem" }, translate('type', this.language), ":\u00A0", h("span", null, this.jackpot.JackpotTypePresentation)), h("div", { class: "JackpotInfoItem" }, translate('winningProbability', this.language), ":\u00A0", h("span", null, "1:", this.jackpot.Probability)), h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, +this.jackpot.OperatorContributionPercent, "%"), 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()));
331
343
  }
332
344
  getGamesTemplate() {
333
345
  const list = this.visibleGames.map((game) => {
@@ -377,10 +389,10 @@ const CasinoEngagementSuiteJackpotDetails = class {
377
389
  };
378
390
  }
379
391
  getTooltipTemplate() {
380
- return (h("div", { class: "EngagementSuiteTooltipBackdrop" }, h("div", { class: "EngagementSuiteTooltip" }, h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), translate('contributionTooltip', this.language))));
392
+ return (h("div", { class: "EngagementSuiteTooltipBackdrop" }, h("div", { class: "EngagementSuiteTooltip" }, h("button", { class: "EngagementSuiteIconButton Close", onClick: this.toggleTooltip }), this.tooltip)));
381
393
  }
382
394
  render() {
383
- return h("div", { key: '96e68ef1594d185301719b8c8f4c6cb0c32307e9', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), h("div", { key: '8eb282874b1efc99a05dfcf479b8b1be51402caa', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.showTooltip && this.getTooltipTemplate()));
395
+ return h("div", { key: '51a4ce4c19f53b51c8c5156b982a7e3083e53df5', class: this.getPopupClasses() }, this.getTopNavigationTemplate(), h("div", { key: 'd28760bc584b7d3c7cfee5bf7b3da0bac4688079', class: "JackpotDetailsPopupContent" }, this.getJackpotDetailsHeaderTemplate(), this.getJackpotCountdown(), this.getTabsTemplate(), this.getTabsContentTemplate(), this.tooltip && this.getTooltipTemplate()));
384
396
  }
385
397
  get host() { return getElement(this); }
386
398
  static get watchers() { return {
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-engagement-suite-jackpot-details",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"showTooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
19
+ return bootstrapLazy([["casino-engagement-suite-jackpot-details",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"tooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
20
20
  });
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["casino-engagement-suite-jackpot-details",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"showTooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
8
+ return bootstrapLazy([["casino-engagement-suite-jackpot-details",[[1,"casino-engagement-suite-jackpot-details",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"jackpot":[16],"jackpotChangeStatusRequest":[1040],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"enabled":[32],"balance":[32],"winBalance":[32],"showDetails":[32],"jackpotEndTime":[32],"tooltip":[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]],{"jackpot":["handleJackpotUpdate"]}]]],["casino-engagement-suite-progress-bar",[[1,"casino-engagement-suite-progress-bar",{"value":[2],"disabled":[4],"hidePercent":[4,"hide-percent"],"indeterminate":[4],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"limitStylingAppends":[32]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -42,7 +42,7 @@ export declare class CasinoEngagementSuiteJackpotDetails {
42
42
  winBalance: number;
43
43
  showDetails: boolean;
44
44
  jackpotEndTime: string;
45
- showTooltip: boolean;
45
+ tooltip: string;
46
46
  host: HTMLElement;
47
47
  handleEvent(e: any): void;
48
48
  handleJackpotUpdate(): void;
@@ -53,7 +53,7 @@ export declare class CasinoEngagementSuiteJackpotDetails {
53
53
  handleTabChange: (e: MouseEvent) => void;
54
54
  handleLoadMore: () => void;
55
55
  toggleShowDetails: () => void;
56
- toggleTooltip: () => void;
56
+ toggleTooltip: (ev: MouseEvent) => void;
57
57
  componentWillLoad(): void;
58
58
  componentDidRender(): void;
59
59
  disconnectedCallback(): void;
@@ -74,6 +74,7 @@ export declare class CasinoEngagementSuiteJackpotDetails {
74
74
  getTabsContentTemplate(): any;
75
75
  getJackpotDetailsTemplate(): any;
76
76
  getBetLimitsRange(): any;
77
+ getPartialWins(): any;
77
78
  getJackpotInfoTemplate(): any;
78
79
  getGamesTemplate(): any[];
79
80
  getJackpotCountdown(): any;
@@ -43,6 +43,7 @@ export interface Jackpot {
43
43
  GamesInfo: Array<Game>;
44
44
  WinBalance?: number;
45
45
  Reason?: JackpotCloseReasonType;
46
+ PartHits: Array<number>;
46
47
  Pending?: boolean;
47
48
  }
48
49
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-engagement-suite-jackpot-details",
3
- "version": "1.45.0",
3
+ "version": "1.45.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as o,g as a}from"./p-c7ee604a.js";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function s(t){n(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===i(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t,e){n(2,arguments);var o=s(t),a=s(e);return o.getTime()<a.getTime()}const r=["en"],l={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",betContribution:"Bet Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot is won!",loadMore:"Load More",jackpotDetails:"Jackpot Details",minBet:"Min Bet",maxBet:"Max Bet",Suspended:"Suspended",Closed:"Closed",contributionTooltip:"A % of the bet that will be contributed by the casino to the jackpot amount."}},c=(t,e)=>{const o=e;return l[void 0!==o&&r.includes(o)?o:"en"][t]};function u(t,e,o=99999999){return t=Math.min(t,o),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}const g=class{constructor(o){t(this,o),this.close=e(this,"close",7),this.back=e(this,"back",7),this.maxVisibleGames=0,this.handleTabChange=t=>{this.activeTab=+t.target.getAttribute("data-index"),this.visibleGames=[],this.maxVisibleGames=0},this.handleLoadMore=()=>{this.visibleGames=this.jackpot.GamesInfo.slice(0,this.visibleGames.length+this.maxVisibleGames)},this.toggleShowDetails=()=>{this.showDetails=!this.showDetails},this.toggleTooltip=()=>{this.showTooltip=!this.showTooltip},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((t=>{console.log("Error ",t)}))},this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()},this.onGameClick=t=>{const e=t.currentTarget.getAttribute("data-slug");e&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e}})},this.clientStyling="",this.clientStylingUrl="",this.jackpot=void 0,this.jackpotChangeStatusRequest=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.enabled=!1,this.balance=void 0,this.winBalance=void 0,this.showDetails=!1,this.jackpotEndTime="",this.showTooltip=!1}handleEvent(t){const{type:e,data:o}=null==t?void 0:t.data;switch(e){case"UpdateJackpotStatus":this.jackpot.JackpotId===t.data.data.JackpotId&&this.updateJackpotStatus(t.data.data);break;case"JoinJackpotResult":o.Success&&this.jackpot.JackpotId in o.JackpotIds&&(this.enabled=this.jackpot.Enabled=o.JackpotIds[this.jackpot.JackpotId])}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames(),this.showTooltip=!1}componentWillLoad(){this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance,this.jackpotEndTime=this.jackpot.JackpotEndTime,this.disabledStatus=this.jackpot.Reason||"",this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}setVisibleGames(){const t="Mobile"===this.device?10:12,e="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-t*(e-1))/e/74*40+t))*e,e),this.visibleGames=this.jackpot.GamesInfo.slice(0,this.maxVisibleGames)}updateJackpotStatus(t){t.IsClosed?(this.clearInterval(),this.disabledStatus=t.Reason,this.activeTab=1):(this.disabledStatus="",this.jackpotEndTime=t.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return o("div",{class:"JackpotDetailsNavigation"},o("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),o("div",{class:"JackpotPopupName"},c("jackpots",this.language)),o("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getJackpotBalance(){return u(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{EngagementSuiteButton:!0,Active:this.enabled,Loading:this.jackpot.Pending}}getJackpotDetailsHeaderTemplate(){const t=p(new Date(this.jackpot.JackpotEndTime),new Date)||!!this.disabledStatus;return o("div",{class:"JackpotDetailsHeader"},o("div",null,o("div",{class:"JackpotType"},this.jackpot.Type),o("div",{class:"JackpotBalance"},this.getJackpotBalance())),o("div",{class:"JackpotDetailsHeaderSecondCol"},o("button",{disabled:t,onClick:this.jackpotChangeStatusRequest,class:this.getJoinButtonClasses(),"data-id":this.jackpot.JackpotId},c(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&o("div",{class:"JackpotIsWon"},c("jackpotIsWon",this.language))))}getTabsTemplate(){return o("div",{class:"EngagementSuiteTabs"},o("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},c("info",this.language)),o("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},c("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getJackpotInfoTemplate():this.getGamesTemplate()}getJackpotDetailsTemplate(){return o("div",null,o("div",{class:"JackpotDetailsButton",onClick:this.toggleShowDetails},o("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),o("span",null,c("jackpotDetails",this.language))),this.showDetails&&o("div",{class:"JackpotDetailsContent"},this.jackpot.Description&&o("p",{class:"JackpotDescription"},this.jackpot.Description),this.jackpot.JackpotRulesUrl&&o("a",{class:"TermsAndConditions",href:this.jackpot.JackpotRulesUrl,target:"_blank"},c("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var t,e,a,i;if(this.jackpot.BetLimits){const n=this.jackpot.Currency,s=Object.keys(this.jackpot.BetLimits),p=s.find((t=>t===n))||s[0],r=this.jackpot.BetLimits&&!!(null===(t=this.jackpot.BetLimits[p])||void 0===t?void 0:t.MinBet),l=this.jackpot.BetLimits&&!!(null===(e=this.jackpot.BetLimits[p])||void 0===e?void 0:e.MaxBet),g=u(null===(a=this.jackpot.BetLimits[p])||void 0===a?void 0:a.MinBet,p),h=u(null===(i=this.jackpot.BetLimits[p])||void 0===i?void 0:i.MaxBet,p);return o("div",null,r&&o("div",{class:"JackpotInfoItem"},c("minBet",this.language),": ",o("span",null,g)),l&&o("div",{class:"JackpotInfoItem"},c("maxBet",this.language),": ",o("span",null,h)))}}getJackpotInfoTemplate(){return o("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),o("div",{class:"JackpotInfo"},o("div",{class:"JackpotInfoItem"},c("betContribution",this.language),": ",o("span",null,+this.jackpot.ContributionPercent,"%")),o("div",{class:"JackpotInfoItem"},c("type",this.language),": ",o("span",null,this.jackpot.JackpotTypePresentation)),o("div",{class:"JackpotInfoItem"},c("winningProbability",this.language),": ",o("span",null,"1:",this.jackpot.Probability)),o("div",{class:"JackpotInfoItem"},c("operatorContribution",this.language),": ",o("span",null,+this.jackpot.OperatorContributionPercent,"%"),o("button",{class:"EngagementSuiteIconButton Help",onClick:this.toggleTooltip})),this.getBetLimitsRange()))}getGamesTemplate(){const t=this.visibleGames.map((t=>o("div",{onClick:this.onGameClick,class:"JackpotGamesListItem "+(t.GameSlug===this.gameSlug?"Disabled":""),key:t.CasinoGameId,"data-slug":t.GameSlug,style:{background:`center / cover url(${t.GameIcon}) no-repeat`},title:t.GameName})));return[o("div",{class:"JackpotGamesListWrapper",ref:t=>this.gamesListWrapperEl=t},o("div",{class:"JackpotGamesList"},t)),this.visibleGames.length<this.jackpot.GamesInfo.length?o("button",{class:"EngagementSuiteButton Active JackpotGamesButton",onClick:this.handleLoadMore},c("loadMore",this.language)):""]}getJackpotCountdown(){const t=c(this.disabledStatus,this.language)||this.timer;return o("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},t)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const t=new Date(this.jackpotEndTime).getTime()-(new Date).getTime();if(t<1)return void this.clearInterval();const{days:e,hours:o,minutes:a,seconds:i}={days:String(Math.floor(t/864e5)).padStart(2,"0"),hours:String(Math.floor(t%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(t%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(t%6e4/1e3)).padStart(2,"0")};this.timer="00"===e?`${o}h:${a}m:${i}s`:`${e}d:${o}h:${a}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus||p(new Date(this.jackpot.JackpotEndTime),new Date),[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}getTooltipTemplate(){return o("div",{class:"EngagementSuiteTooltipBackdrop"},o("div",{class:"EngagementSuiteTooltip"},o("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),c("contributionTooltip",this.language)))}render(){return o("div",{key:"96e68ef1594d185301719b8c8f4c6cb0c32307e9",class:this.getPopupClasses()},this.getTopNavigationTemplate(),o("div",{key:"8eb282874b1efc99a05dfcf479b8b1be51402caa",class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.showTooltip&&this.getTooltipTemplate()))}get host(){return a(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};g.style=':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}';export{g as casino_engagement_suite_jackpot_details}