@everymatrix/casino-engagement-suite-jackpot-details 1.37.8 → 1.37.9

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 i}from"./p-0135e830.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-3568c087",[[1,"casino-engagement-suite-jackpot-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],jackpot:[16],language:[1],gameSlug:[1,"game-slug"],device:[1],limitStylingAppends:[32],timer:[32],disabledStatus:[32],activeTab:[32],visibleGames:[32],loading:[32],enabled:[32],balance:[32],winBalance:[32],showDetails:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]]]],["p-58f6d008",[[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],limitStylingAppends:[32]}]]]],e)));
1
+ import{p as e,b as i}from"./p-0135e830.js";(()=>{const i=import.meta.url,n={};return""!==i&&(n.resourcesUrl=new URL(".",i).href),e(n)})().then((e=>i([["p-b4512ef8",[[1,"casino-engagement-suite-jackpot-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],jackpot:[16],language:[1],gameSlug:[1,"game-slug"],device:[1],limitStylingAppends:[32],timer:[32],disabledStatus:[32],activeTab:[32],visibleGames:[32],loading:[32],enabled:[32],balance:[32],winBalance:[32],showDetails:[32]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]]]],["p-58f6d008",[[1,"casino-engagement-suite-progress-bar",{value:[2],disabled:[4],hidePercent:[4,"hide-percent"],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 a,g as o}from"./p-0135e830.js";const i=["en"],s={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot’s won!",loadMore:"Load More",jackpotDetails:"Jackpot Details",minBet:"Min Bet",maxBet:"Max Bet"}},p=(t,e)=>{const a=e;return s[void 0!==a&&i.includes(a)?a:"en"][t]};function n(t,e,a=99999999){return t=Math.min(t,a),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}const c=class{constructor(a){t(this,a),this.close=e(this,"close",7),this.back=e(this,"back",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.loading=!1,this.enabled=!1,this.showDetails=!1,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.changeJackpotStatus=t=>{t.stopPropagation(),window.postMessage({type:"JackpotChangeStatusRequest",data:{[this.jackpot.JackpotId]:!this.jackpot.Enabled}}),this.loading=!0},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}})}}handleEvent(t){const{type:e,data:a}=null==t?void 0:t.data;switch(e){case"UpdateJackpotStatus":this.updateJackpotStatus(t.data.data);break;case"JoinJackpotResult":{const t=a;t.Success&&this.jackpot.JackpotId in t.JackpotIds&&(this.enabled=this.jackpot.Enabled=t.JackpotIds[this.jackpot.JackpotId]),this.loading=!1;break}}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames()}componentWillLoad(){this.startCountdown(),this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}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.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-t*(e-1))/e/74*40+t))*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.jackpot.JackpotEndTime=t.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return a("div",{class:"JackpotDetailsNavigation"},a("button",{class:"JackpotIconButton",onClick:this.handleBackClick},a("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),a("div",{class:"JackpotPopupName"},p("jackpots",this.language)),a("button",{class:"JackpotIconButton",onClick:this.handleCloseClick},a("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getJackpotBalance(){return n(this.winBalance||this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{PopupButton:!0,Active:this.enabled,Loading:this.loading}}getJackpotDetailsHeaderTemplate(){return a("div",{class:"JackpotDetailsHeader"},a("div",null,a("div",{class:"JackpotType"},this.jackpot.Type),a("div",{class:"JackpotBalance"},this.getJackpotBalance())),a("div",{class:"JackpotDetailsHeaderSecondCol"},a("button",{disabled:!!this.disabledStatus,onClick:this.changeJackpotStatus,class:this.getJoinButtonClasses()},p(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&a("div",{class:"JackpotIsWon"},p("jackpotIsWon",this.language))))}getTabsTemplate(){return a("div",{class:"JackpotDetailsTabs"},a("div",{"data-index":"1",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(1===this.activeTab?"Active":"")},p("info",this.language)),a("div",{"data-index":"2",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(2===this.activeTab?"Active":"")},p("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getJackpotInfoTemplate():this.getGamesTemplate()}getJackpotDetailsTemplate(){return a("div",null,a("div",{class:"JackpotDetailsButton",onClick:this.toggleShowDetails},a("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),a("span",null,p("jackpotDetails",this.language))),this.showDetails&&a("p",{class:"JackpotDescription"},this.jackpot.Description))}getBetLimitsRange(){var t,e,o,i;if(this.jackpot.BetLimits){const s=this.jackpot.Currency,c=Object.keys(this.jackpot.BetLimits),l=c.find((t=>t===s))||c[0],r=this.jackpot.BetLimits&&(null===(t=this.jackpot.BetLimits[l])||void 0===t?void 0:t.MinBet),h=this.jackpot.BetLimits&&(null===(e=this.jackpot.BetLimits[l])||void 0===e?void 0:e.MaxBet),k=n(null===(o=this.jackpot.BetLimits[l])||void 0===o?void 0:o.MinBet,l),d=n(null===(i=this.jackpot.BetLimits[l])||void 0===i?void 0:i.MaxBet,l);return a("div",null,r&&a("div",{class:"JackpotInfoItem"},p("minBet",this.language),": ",a("span",null,k)),h&&a("div",{class:"JackpotInfoItem"},p("maxBet",this.language),": ",a("span",null,d)))}}getJackpotInfoTemplate(){return a("div",{class:"JackpotInfoTabContent"},this.jackpot.Description&&this.getJackpotDetailsTemplate(),a("div",{class:"JackpotInfo"},a("div",{class:"JackpotInfoItem"},p("operatorContribution",this.language),": ",a("span",null,this.jackpot.OperatorContributionPercent,"%")),a("div",{class:"JackpotInfoItem"},p("type",this.language),": ",a("span",null,this.jackpot.JackpotTypePresentation)),a("div",{class:"JackpotInfoItem"},p("winningProbability",this.language),": ",a("span",null,"1:",this.jackpot.Probability)),this.getBetLimitsRange(),this.jackpot.JackpotRulesUrl&&a("div",{class:"JackpotInfoItem"},a("a",{class:"tc",href:this.jackpot.JackpotRulesUrl,target:"_blank"},p("tc",this.jackpot.JackpotRulesUrl)))))}getGamesTemplate(){const t=this.visibleGames.map((t=>a("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[a("div",{class:"JackpotGamesListWrapper",ref:t=>this.gamesListWrapperEl=t},a("div",{class:"JackpotGamesList"},t)),this.visibleGames.length<this.jackpot.GamesInfo.length?a("button",{class:"PopupButton Active JackpotGamesButton",onClick:this.handleLoadMore},p("loadMore",this.language)):""]}getJackpotCountdown(){return a("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},this.disabledStatus||this.timer)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const t=new Date(this.jackpot.JackpotEndTime).getTime()-(new Date).getTime();if(t<1)return void this.clearInterval();const{days:e,hours:a,minutes:o,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?`${a}h:${o}m:${i}s`:`${e}d:${a}h:${o}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus,[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}render(){return a("div",{class:this.getPopupClasses()},this.getTopNavigationTemplate(),a("div",{class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate()))}get host(){return o(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};c.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none}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 .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:20px 0 12px;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}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .tc{color:var(--emw--color-primary, #59D1FF)}.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-bottom: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")}.JackpotDescription{margin-bottom:20px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-bottom: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 .JackpotIconButton,.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 .JackpotDetailsTabs,.JackpotDetailsPopup.Desktop .JackpotDetailsTabs{margin-bottom:20px}.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}';export{c as casino_engagement_suite_jackpot_details}
@@ -20,6 +20,8 @@ const TRANSLATIONS = {
20
20
  jackpotIsWon: 'Jackpot’s won!',
21
21
  loadMore: 'Load More',
22
22
  jackpotDetails: 'Jackpot Details',
23
+ minBet: 'Min Bet',
24
+ maxBet: 'Max Bet'
23
25
  }
24
26
  };
25
27
  const translate = (key, customLang) => {
@@ -227,8 +229,22 @@ const CasinoEngagementSuiteJackpotDetails = class {
227
229
  getJackpotDetailsTemplate() {
228
230
  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("p", { class: "JackpotDescription" }, this.jackpot.Description));
229
231
  }
232
+ getBetLimitsRange() {
233
+ var _a, _b, _c, _d;
234
+ if (this.jackpot.BetLimits) {
235
+ const playerCurrency = this.jackpot.Currency;
236
+ const betCurrencies = Object.keys(this.jackpot.BetLimits);
237
+ const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
238
+ const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
239
+ const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
240
+ const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
241
+ const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
242
+ const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
243
+ 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)));
244
+ }
245
+ }
230
246
  getJackpotInfoTemplate() {
231
- return index.h("div", { class: "JackpotInfoTabContent" }, this.jackpot.Description && this.getJackpotDetailsTemplate(), index.h("div", { class: "JackpotInfo" }, index.h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", index.h("span", null, this.jackpot.OperatorContributionPercent, "%")), 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)), this.jackpot.JackpotRulesUrl && index.h("div", { class: "JackpotInfoItem" }, index.h("a", { class: "tc", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl)))));
247
+ return index.h("div", { class: "JackpotInfoTabContent" }, this.jackpot.Description && this.getJackpotDetailsTemplate(), index.h("div", { class: "JackpotInfo" }, index.h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", index.h("span", null, this.jackpot.OperatorContributionPercent, "%")), 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)), this.getBetLimitsRange(), this.jackpot.JackpotRulesUrl && index.h("div", { class: "JackpotInfoItem" }, index.h("a", { class: "tc", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl)))));
232
248
  }
233
249
  getGamesTemplate() {
234
250
  const list = this.visibleGames.map((game) => {
@@ -208,6 +208,28 @@ export class CasinoEngagementSuiteJackpotDetails {
208
208
  h("span", null, translate('jackpotDetails', this.language))),
209
209
  this.showDetails && h("p", { class: "JackpotDescription" }, this.jackpot.Description));
210
210
  }
211
+ getBetLimitsRange() {
212
+ var _a, _b, _c, _d;
213
+ if (this.jackpot.BetLimits) {
214
+ const playerCurrency = this.jackpot.Currency;
215
+ const betCurrencies = Object.keys(this.jackpot.BetLimits);
216
+ const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
217
+ const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
218
+ const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
219
+ const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
220
+ const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
221
+ const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
222
+ return h("div", null,
223
+ showMinBet && h("div", { class: "JackpotInfoItem" },
224
+ translate('minBet', this.language),
225
+ ":\u00A0",
226
+ h("span", null, formattedMinBet)),
227
+ showMaxBet && h("div", { class: "JackpotInfoItem" },
228
+ translate('maxBet', this.language),
229
+ ":\u00A0",
230
+ h("span", null, formattedMaxBet)));
231
+ }
232
+ }
211
233
  getJackpotInfoTemplate() {
212
234
  return h("div", { class: "JackpotInfoTabContent" },
213
235
  this.jackpot.Description && this.getJackpotDetailsTemplate(),
@@ -228,6 +250,7 @@ export class CasinoEngagementSuiteJackpotDetails {
228
250
  h("span", null,
229
251
  "1:",
230
252
  this.jackpot.Probability)),
253
+ this.getBetLimitsRange(),
231
254
  this.jackpot.JackpotRulesUrl && h("div", { class: "JackpotInfoItem" },
232
255
  h("a", { class: "tc", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl)))));
233
256
  }
@@ -14,6 +14,8 @@ const TRANSLATIONS = {
14
14
  jackpotIsWon: 'Jackpot’s won!',
15
15
  loadMore: 'Load More',
16
16
  jackpotDetails: 'Jackpot Details',
17
+ minBet: 'Min Bet',
18
+ maxBet: 'Max Bet'
17
19
  }
18
20
  };
19
21
  export const translate = (key, customLang) => {
@@ -16,6 +16,8 @@ const TRANSLATIONS = {
16
16
  jackpotIsWon: 'Jackpot’s won!',
17
17
  loadMore: 'Load More',
18
18
  jackpotDetails: 'Jackpot Details',
19
+ minBet: 'Min Bet',
20
+ maxBet: 'Max Bet'
19
21
  }
20
22
  };
21
23
  const translate = (key, customLang) => {
@@ -225,8 +227,22 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
225
227
  getJackpotDetailsTemplate() {
226
228
  return h("div", null, h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('jackpotDetails', this.language))), this.showDetails && h("p", { class: "JackpotDescription" }, this.jackpot.Description));
227
229
  }
230
+ getBetLimitsRange() {
231
+ var _a, _b, _c, _d;
232
+ if (this.jackpot.BetLimits) {
233
+ const playerCurrency = this.jackpot.Currency;
234
+ const betCurrencies = Object.keys(this.jackpot.BetLimits);
235
+ const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
236
+ const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
237
+ const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
238
+ const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
239
+ const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
240
+ const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
241
+ 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)));
242
+ }
243
+ }
228
244
  getJackpotInfoTemplate() {
229
- return h("div", { class: "JackpotInfoTabContent" }, this.jackpot.Description && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, this.jackpot.OperatorContributionPercent, "%")), 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)), this.jackpot.JackpotRulesUrl && h("div", { class: "JackpotInfoItem" }, h("a", { class: "tc", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl)))));
245
+ return h("div", { class: "JackpotInfoTabContent" }, this.jackpot.Description && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, this.jackpot.OperatorContributionPercent, "%")), 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)), this.getBetLimitsRange(), this.jackpot.JackpotRulesUrl && h("div", { class: "JackpotInfoItem" }, h("a", { class: "tc", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl)))));
230
246
  }
231
247
  getGamesTemplate() {
232
248
  const list = this.visibleGames.map((game) => {
@@ -16,6 +16,8 @@ const TRANSLATIONS = {
16
16
  jackpotIsWon: 'Jackpot’s won!',
17
17
  loadMore: 'Load More',
18
18
  jackpotDetails: 'Jackpot Details',
19
+ minBet: 'Min Bet',
20
+ maxBet: 'Max Bet'
19
21
  }
20
22
  };
21
23
  const translate = (key, customLang) => {
@@ -223,8 +225,22 @@ const CasinoEngagementSuiteJackpotDetails = class {
223
225
  getJackpotDetailsTemplate() {
224
226
  return h("div", null, h("div", { class: "JackpotDetailsButton", onClick: this.toggleShowDetails }, h("div", { class: `Toggle ${this.showDetails ? 'Closed' : 'Open'}` }), h("span", null, translate('jackpotDetails', this.language))), this.showDetails && h("p", { class: "JackpotDescription" }, this.jackpot.Description));
225
227
  }
228
+ getBetLimitsRange() {
229
+ var _a, _b, _c, _d;
230
+ if (this.jackpot.BetLimits) {
231
+ const playerCurrency = this.jackpot.Currency;
232
+ const betCurrencies = Object.keys(this.jackpot.BetLimits);
233
+ const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
234
+ const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
235
+ const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
236
+ const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
237
+ const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
238
+ const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
239
+ 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)));
240
+ }
241
+ }
226
242
  getJackpotInfoTemplate() {
227
- return h("div", { class: "JackpotInfoTabContent" }, this.jackpot.Description && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, this.jackpot.OperatorContributionPercent, "%")), 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)), this.jackpot.JackpotRulesUrl && h("div", { class: "JackpotInfoItem" }, h("a", { class: "tc", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl)))));
243
+ return h("div", { class: "JackpotInfoTabContent" }, this.jackpot.Description && this.getJackpotDetailsTemplate(), h("div", { class: "JackpotInfo" }, h("div", { class: "JackpotInfoItem" }, translate('operatorContribution', this.language), ":\u00A0", h("span", null, this.jackpot.OperatorContributionPercent, "%")), 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)), this.getBetLimitsRange(), this.jackpot.JackpotRulesUrl && h("div", { class: "JackpotInfoItem" }, h("a", { class: "tc", href: this.jackpot.JackpotRulesUrl, target: "_blank" }, translate('tc', this.jackpot.JackpotRulesUrl)))));
228
244
  }
229
245
  getGamesTemplate() {
230
246
  const list = this.visibleGames.map((game) => {
@@ -68,6 +68,7 @@ export declare class CasinoEngagementSuiteJackpotDetails {
68
68
  getTabsTemplate(): any;
69
69
  getTabsContentTemplate(): any;
70
70
  getJackpotDetailsTemplate(): any;
71
+ getBetLimitsRange(): any;
71
72
  getJackpotInfoTemplate(): any;
72
73
  getGamesTemplate(): any[];
73
74
  getJackpotCountdown(): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-engagement-suite-jackpot-details",
3
- "version": "1.37.8",
3
+ "version": "1.37.9",
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 a,g as o}from"./p-0135e830.js";const i=["en"],s={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot’s won!",loadMore:"Load More",jackpotDetails:"Jackpot Details"}},p=(t,e)=>{const a=e;return s[void 0!==a&&i.includes(a)?a:"en"][t]},n=class{constructor(a){t(this,a),this.close=e(this,"close",7),this.back=e(this,"back",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.loading=!1,this.enabled=!1,this.showDetails=!1,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.changeJackpotStatus=t=>{t.stopPropagation(),window.postMessage({type:"JackpotChangeStatusRequest",data:{[this.jackpot.JackpotId]:!this.jackpot.Enabled}}),this.loading=!0},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}})}}handleEvent(t){const{type:e,data:a}=null==t?void 0:t.data;switch(e){case"UpdateJackpotStatus":this.updateJackpotStatus(t.data.data);break;case"JoinJackpotResult":{const t=a;t.Success&&this.jackpot.JackpotId in t.JackpotIds&&(this.enabled=this.jackpot.Enabled=t.JackpotIds[this.jackpot.JackpotId]),this.loading=!1;break}}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames()}componentWillLoad(){this.startCountdown(),this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}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.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-t*(e-1))/e/74*40+t))*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.jackpot.JackpotEndTime=t.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return a("div",{class:"JackpotDetailsNavigation"},a("button",{class:"JackpotIconButton",onClick:this.handleBackClick},a("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),a("div",{class:"JackpotPopupName"},p("jackpots",this.language)),a("button",{class:"JackpotIconButton",onClick:this.handleCloseClick},a("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getJackpotBalance(){return function(t,e,a=99999999){return t=Math.min(t,a),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}(this.winBalance||this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{PopupButton:!0,Active:this.enabled,Loading:this.loading}}getJackpotDetailsHeaderTemplate(){return a("div",{class:"JackpotDetailsHeader"},a("div",null,a("div",{class:"JackpotType"},this.jackpot.Type),a("div",{class:"JackpotBalance"},this.getJackpotBalance())),a("div",{class:"JackpotDetailsHeaderSecondCol"},a("button",{disabled:!!this.disabledStatus,onClick:this.changeJackpotStatus,class:this.getJoinButtonClasses()},p(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&a("div",{class:"JackpotIsWon"},p("jackpotIsWon",this.language))))}getTabsTemplate(){return a("div",{class:"JackpotDetailsTabs"},a("div",{"data-index":"1",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(1===this.activeTab?"Active":"")},p("info",this.language)),a("div",{"data-index":"2",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(2===this.activeTab?"Active":"")},p("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getJackpotInfoTemplate():this.getGamesTemplate()}getJackpotDetailsTemplate(){return a("div",null,a("div",{class:"JackpotDetailsButton",onClick:this.toggleShowDetails},a("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),a("span",null,p("jackpotDetails",this.language))),this.showDetails&&a("p",{class:"JackpotDescription"},this.jackpot.Description))}getJackpotInfoTemplate(){return a("div",{class:"JackpotInfoTabContent"},this.jackpot.Description&&this.getJackpotDetailsTemplate(),a("div",{class:"JackpotInfo"},a("div",{class:"JackpotInfoItem"},p("operatorContribution",this.language),": ",a("span",null,this.jackpot.OperatorContributionPercent,"%")),a("div",{class:"JackpotInfoItem"},p("type",this.language),": ",a("span",null,this.jackpot.JackpotTypePresentation)),a("div",{class:"JackpotInfoItem"},p("winningProbability",this.language),": ",a("span",null,"1:",this.jackpot.Probability)),this.jackpot.JackpotRulesUrl&&a("div",{class:"JackpotInfoItem"},a("a",{class:"tc",href:this.jackpot.JackpotRulesUrl,target:"_blank"},p("tc",this.jackpot.JackpotRulesUrl)))))}getGamesTemplate(){const t=this.visibleGames.map((t=>a("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[a("div",{class:"JackpotGamesListWrapper",ref:t=>this.gamesListWrapperEl=t},a("div",{class:"JackpotGamesList"},t)),this.visibleGames.length<this.jackpot.GamesInfo.length?a("button",{class:"PopupButton Active JackpotGamesButton",onClick:this.handleLoadMore},p("loadMore",this.language)):""]}getJackpotCountdown(){return a("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},this.disabledStatus||this.timer)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const t=new Date(this.jackpot.JackpotEndTime).getTime()-(new Date).getTime();if(t<1)return void this.clearInterval();const{days:e,hours:a,minutes:o,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?`${a}h:${o}m:${i}s`:`${e}d:${a}h:${o}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus,[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}render(){return a("div",{class:this.getPopupClasses()},this.getTopNavigationTemplate(),a("div",{class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate()))}get host(){return o(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};n.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none}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 .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:20px 0 12px;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}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .tc{color:var(--emw--color-primary, #59D1FF)}.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-bottom: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")}.JackpotDescription{margin-bottom:20px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-bottom: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 .JackpotIconButton,.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 .JackpotDetailsTabs,.JackpotDetailsPopup.Desktop .JackpotDetailsTabs{margin-bottom:20px}.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}';export{n as casino_engagement_suite_jackpot_details}