@everymatrix/casino-engagement-suite-jackpot-details 1.39.1 → 1.39.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.esm.js +1 -1
- package/dist/casino-engagement-suite-jackpot-details/p-f619a270.entry.js +1 -0
- package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.entry.js +103 -20
- package/dist/cjs/casino-engagement-suite-jackpot-details.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.js +27 -19
- package/dist/collection/utils/locale.utils.js +4 -2
- package/dist/components/casino-engagement-suite-jackpot-details.js +104 -21
- package/dist/esm/casino-engagement-suite-jackpot-details.entry.js +103 -20
- package/dist/esm/casino-engagement-suite-jackpot-details.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.d.ts +4 -2
- package/dist/types/components.d.ts +8 -0
- package/dist/types/models/index.d.ts +4 -1
- package/package.json +1 -1
- package/dist/casino-engagement-suite-jackpot-details/p-f92587a5.entry.js +0 -1
package/dist/casino-engagement-suite-jackpot-details/casino-engagement-suite-jackpot-details.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as
|
|
1
|
+
import{p as e,b as t}from"./p-0135e830.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((e=>t([["p-f619a270",[[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]},[[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 o,g as a}from"./p-0135e830.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})(t)}function s(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function n(t){s(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){s(2,arguments);var o=n(t),a=n(e);return o.getTime()<a.getTime()}const c=["en"],l={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator 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"}},r=(t,e)=>{const o=e;return l[void 0!==o&&c.includes(o)?o:"en"][t]};function h(t,e,o=99999999){return t=Math.min(t,o),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}const d=class{constructor(o){t(this,o),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.enabled=!1,this.showDetails=!1,this.jackpotEndTime="",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.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:o}=null==t?void 0:t.data;switch(e){case"UpdateJackpotStatus":this.updateJackpotStatus(t.data.data);break;case"JoinJackpotResult":{const t=o;t.Success&&this.jackpot.JackpotId in t.JackpotIds&&(this.enabled=this.jackpot.Enabled=t.JackpotIds[this.jackpot.JackpotId]);break}}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames()}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:"JackpotIconButton",onClick:this.handleBackClick},o("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),o("div",{class:"JackpotPopupName"},r("jackpots",this.language)),o("button",{class:"JackpotIconButton",onClick:this.handleCloseClick},o("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getJackpotBalance(){return h(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{PopupButton:!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},r(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&o("div",{class:"JackpotIsWon"},r("jackpotIsWon",this.language))))}getTabsTemplate(){return o("div",{class:"JackpotDetailsTabs"},o("div",{"data-index":"1",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(1===this.activeTab?"Active":"")},r("info",this.language)),o("div",{"data-index":"2",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(2===this.activeTab?"Active":"")},r("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,r("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"},r("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var t,e,a,i;if(this.jackpot.BetLimits){const s=this.jackpot.Currency,n=Object.keys(this.jackpot.BetLimits),p=n.find((t=>t===s))||n[0],c=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),d=h(null===(a=this.jackpot.BetLimits[p])||void 0===a?void 0:a.MinBet,p),k=h(null===(i=this.jackpot.BetLimits[p])||void 0===i?void 0:i.MaxBet,p);return o("div",null,c&&o("div",{class:"JackpotInfoItem"},r("minBet",this.language),": ",o("span",null,d)),l&&o("div",{class:"JackpotInfoItem"},r("maxBet",this.language),": ",o("span",null,k)))}}getJackpotInfoTemplate(){return o("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),o("div",{class:"JackpotInfo"},o("div",{class:"JackpotInfoItem"},r("operatorContribution",this.language),": ",o("span",null,+this.jackpot.OperatorContributionPercent,"%")),o("div",{class:"JackpotInfoItem"},r("type",this.language),": ",o("span",null,this.jackpot.JackpotTypePresentation)),o("div",{class:"JackpotInfoItem"},r("winningProbability",this.language),": ",o("span",null,"1:",this.jackpot.Probability)),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:"PopupButton Active JackpotGamesButton",onClick:this.handleLoadMore},r("loadMore",this.language)):""]}getJackpotCountdown(){const t=r(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}}render(){return o("div",{class:this.getPopupClasses()},this.getTopNavigationTemplate(),o("div",{class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate()))}get host(){return a(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};d.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}.PopupButton{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.PopupButton.Active{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.PopupButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.PopupButton.Loading{opacity:0.5;pointer-events:none}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .JackpotDetailsTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-primary, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotIconButton{width:16px;height:16px;cursor:pointer;display:flex;justify-content:center;align-items:center}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;align-items:center;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:"Montserrat", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:Montserrat, sans-serif;font-size:18px;font-weight:var(--emw--font-weight-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:Montserrat, sans-serif;font-weight:var(--emw--font-weight-bold, 700);font-size:12px;line-height:15px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotGamesLoadMore::before,.JackpotJoinButton.Joined::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-gray-150, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emfe-w-color-white, #FFF);text-transform:capitalize}.JackpotDetailsTabsWrapper{display:flex;flex-direction:column}.JackpotDetailsTabs{margin-top:20px;display:flex;position:relative}.JackpotDetailsTabs .JackpotDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.JackpotDetailsTabs .JackpotDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.JackpotDetailsTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:14px;line-height:17px}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotGamesListWrapper{overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg")}.JackpotDetailsButton .Open{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-primary, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.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 .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 .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{d as casino_engagement_suite_jackpot_details}
|
|
@@ -4,6 +4,98 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
const index = require('./index-84a14c86.js');
|
|
6
6
|
|
|
7
|
+
function _typeof(o) {
|
|
8
|
+
"@babel/helpers - typeof";
|
|
9
|
+
|
|
10
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
11
|
+
return typeof o;
|
|
12
|
+
} : function (o) {
|
|
13
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
14
|
+
}, _typeof(o);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function requiredArgs(required, args) {
|
|
18
|
+
if (args.length < required) {
|
|
19
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @name toDate
|
|
25
|
+
* @category Common Helpers
|
|
26
|
+
* @summary Convert the given argument to an instance of Date.
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* Convert the given argument to an instance of Date.
|
|
30
|
+
*
|
|
31
|
+
* If the argument is an instance of Date, the function returns its clone.
|
|
32
|
+
*
|
|
33
|
+
* If the argument is a number, it is treated as a timestamp.
|
|
34
|
+
*
|
|
35
|
+
* If the argument is none of the above, the function returns Invalid Date.
|
|
36
|
+
*
|
|
37
|
+
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
38
|
+
*
|
|
39
|
+
* @param {Date|Number} argument - the value to convert
|
|
40
|
+
* @returns {Date} the parsed date in the local time zone
|
|
41
|
+
* @throws {TypeError} 1 argument required
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Clone the date:
|
|
45
|
+
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
46
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* // Convert the timestamp to date:
|
|
50
|
+
* const result = toDate(1392098430000)
|
|
51
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
52
|
+
*/
|
|
53
|
+
function toDate(argument) {
|
|
54
|
+
requiredArgs(1, arguments);
|
|
55
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
56
|
+
|
|
57
|
+
// Clone the date
|
|
58
|
+
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
59
|
+
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
60
|
+
return new Date(argument.getTime());
|
|
61
|
+
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
62
|
+
return new Date(argument);
|
|
63
|
+
} else {
|
|
64
|
+
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
65
|
+
// eslint-disable-next-line no-console
|
|
66
|
+
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");
|
|
67
|
+
// eslint-disable-next-line no-console
|
|
68
|
+
console.warn(new Error().stack);
|
|
69
|
+
}
|
|
70
|
+
return new Date(NaN);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @name isBefore
|
|
76
|
+
* @category Common Helpers
|
|
77
|
+
* @summary Is the first date before the second one?
|
|
78
|
+
*
|
|
79
|
+
* @description
|
|
80
|
+
* Is the first date before the second one?
|
|
81
|
+
*
|
|
82
|
+
* @param {Date|Number} date - the date that should be before the other one to return true
|
|
83
|
+
* @param {Date|Number} dateToCompare - the date to compare with
|
|
84
|
+
* @returns {Boolean} the first date is before the second date
|
|
85
|
+
* @throws {TypeError} 2 arguments required
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* // Is 10 July 1989 before 11 February 1987?
|
|
89
|
+
* const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
|
|
90
|
+
* //=> false
|
|
91
|
+
*/
|
|
92
|
+
function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
93
|
+
requiredArgs(2, arguments);
|
|
94
|
+
var date = toDate(dirtyDate);
|
|
95
|
+
var dateToCompare = toDate(dirtyDateToCompare);
|
|
96
|
+
return date.getTime() < dateToCompare.getTime();
|
|
97
|
+
}
|
|
98
|
+
|
|
7
99
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
100
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
9
101
|
const TRANSLATIONS = {
|
|
@@ -17,11 +109,13 @@ const TRANSLATIONS = {
|
|
|
17
109
|
type: 'Type',
|
|
18
110
|
winningProbability: 'Winning Probability',
|
|
19
111
|
tc: 'Terms & Conditions',
|
|
20
|
-
jackpotIsWon: 'Jackpot
|
|
112
|
+
jackpotIsWon: 'Jackpot is won!',
|
|
21
113
|
loadMore: 'Load More',
|
|
22
114
|
jackpotDetails: 'Jackpot Details',
|
|
23
115
|
minBet: 'Min Bet',
|
|
24
|
-
maxBet: 'Max Bet'
|
|
116
|
+
maxBet: 'Max Bet',
|
|
117
|
+
Suspended: 'Suspended',
|
|
118
|
+
Closed: 'Closed'
|
|
25
119
|
}
|
|
26
120
|
};
|
|
27
121
|
const translate = (key, customLang) => {
|
|
@@ -67,7 +161,6 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
67
161
|
this.disabledStatus = '';
|
|
68
162
|
this.activeTab = 1;
|
|
69
163
|
this.visibleGames = [];
|
|
70
|
-
this.loading = false;
|
|
71
164
|
this.enabled = false;
|
|
72
165
|
this.showDetails = false;
|
|
73
166
|
this.jackpotEndTime = '';
|
|
@@ -83,16 +176,6 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
83
176
|
this.toggleShowDetails = () => {
|
|
84
177
|
this.showDetails = !this.showDetails;
|
|
85
178
|
};
|
|
86
|
-
this.changeJackpotStatus = (ev) => {
|
|
87
|
-
ev.stopPropagation();
|
|
88
|
-
window.postMessage({
|
|
89
|
-
type: 'JackpotChangeStatusRequest',
|
|
90
|
-
data: {
|
|
91
|
-
[this.jackpot.JackpotId]: !this.jackpot.Enabled,
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
this.loading = true;
|
|
95
|
-
};
|
|
96
179
|
this.setClientStyling = () => {
|
|
97
180
|
let sheet = document.createElement('style');
|
|
98
181
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -141,7 +224,6 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
141
224
|
if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
|
|
142
225
|
this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
|
|
143
226
|
}
|
|
144
|
-
this.loading = false;
|
|
145
227
|
break;
|
|
146
228
|
}
|
|
147
229
|
}
|
|
@@ -213,11 +295,12 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
213
295
|
return {
|
|
214
296
|
PopupButton: true,
|
|
215
297
|
Active: this.enabled,
|
|
216
|
-
Loading: this.
|
|
298
|
+
Loading: this.jackpot.Pending
|
|
217
299
|
};
|
|
218
300
|
}
|
|
219
301
|
getJackpotDetailsHeaderTemplate() {
|
|
220
|
-
|
|
302
|
+
const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
|
|
303
|
+
return (index.h("div", { class: "JackpotDetailsHeader" }, index.h("div", null, index.h("div", { class: "JackpotType" }, this.jackpot.Type), index.h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), index.h("div", { class: "JackpotDetailsHeaderSecondCol" }, index.h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
|
|
221
304
|
? translate('unjoin', this.language)
|
|
222
305
|
: translate('join', this.language)), !!this.winBalance && index.h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
|
|
223
306
|
}
|
|
@@ -239,8 +322,8 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
239
322
|
const betCurrencies = Object.keys(this.jackpot.BetLimits);
|
|
240
323
|
const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
|
|
241
324
|
const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
|
|
242
|
-
const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
243
|
-
const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
325
|
+
const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
326
|
+
const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
244
327
|
const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
|
|
245
328
|
const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
|
|
246
329
|
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)));
|
|
@@ -262,7 +345,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
262
345
|
];
|
|
263
346
|
}
|
|
264
347
|
getJackpotCountdown() {
|
|
265
|
-
const timerMessage = this.disabledStatus || this.timer;
|
|
348
|
+
const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
|
|
266
349
|
return (index.h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
|
|
267
350
|
}
|
|
268
351
|
startCountdown() {
|
|
@@ -292,7 +375,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
292
375
|
getPopupClasses() {
|
|
293
376
|
return {
|
|
294
377
|
JackpotDetailsPopup: true,
|
|
295
|
-
Disabled: !!this.disabledStatus,
|
|
378
|
+
Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
|
|
296
379
|
[this.device]: true,
|
|
297
380
|
[this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
|
|
298
381
|
};
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
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],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"
|
|
18
|
+
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]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]]]],["casino-engagement-suite-progress-bar.cjs",[[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]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
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],"language":[1],"gameSlug":[1,"game-slug"],"device":[1],"limitStylingAppends":[32],"timer":[32],"disabledStatus":[32],"activeTab":[32],"visibleGames":[32],"
|
|
17
|
+
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]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]]]],["casino-engagement-suite-progress-bar.cjs",[[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]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component, Element, Event, h, Listen, Prop, State, Watch } from '@stencil/core';
|
|
2
|
+
import { isBefore } from 'date-fns';
|
|
2
3
|
import { translate } from '../../utils/locale.utils';
|
|
3
4
|
import '@everymatrix/casino-engagement-suite-progress-bar';
|
|
4
5
|
import { formatBalance } from '../../utils';
|
|
@@ -29,7 +30,6 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
29
30
|
this.disabledStatus = '';
|
|
30
31
|
this.activeTab = 1;
|
|
31
32
|
this.visibleGames = [];
|
|
32
|
-
this.loading = false;
|
|
33
33
|
this.enabled = false;
|
|
34
34
|
this.showDetails = false;
|
|
35
35
|
this.jackpotEndTime = '';
|
|
@@ -45,16 +45,6 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
45
45
|
this.toggleShowDetails = () => {
|
|
46
46
|
this.showDetails = !this.showDetails;
|
|
47
47
|
};
|
|
48
|
-
this.changeJackpotStatus = (ev) => {
|
|
49
|
-
ev.stopPropagation();
|
|
50
|
-
window.postMessage({
|
|
51
|
-
type: 'JackpotChangeStatusRequest',
|
|
52
|
-
data: {
|
|
53
|
-
[this.jackpot.JackpotId]: !this.jackpot.Enabled,
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
this.loading = true;
|
|
57
|
-
};
|
|
58
48
|
this.setClientStyling = () => {
|
|
59
49
|
let sheet = document.createElement('style');
|
|
60
50
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -103,7 +93,6 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
103
93
|
if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
|
|
104
94
|
this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
|
|
105
95
|
}
|
|
106
|
-
this.loading = false;
|
|
107
96
|
break;
|
|
108
97
|
}
|
|
109
98
|
}
|
|
@@ -180,16 +169,17 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
180
169
|
return {
|
|
181
170
|
PopupButton: true,
|
|
182
171
|
Active: this.enabled,
|
|
183
|
-
Loading: this.
|
|
172
|
+
Loading: this.jackpot.Pending
|
|
184
173
|
};
|
|
185
174
|
}
|
|
186
175
|
getJackpotDetailsHeaderTemplate() {
|
|
176
|
+
const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
|
|
187
177
|
return (h("div", { class: "JackpotDetailsHeader" },
|
|
188
178
|
h("div", null,
|
|
189
179
|
h("div", { class: "JackpotType" }, this.jackpot.Type),
|
|
190
180
|
h("div", { class: "JackpotBalance" }, this.getJackpotBalance())),
|
|
191
181
|
h("div", { class: "JackpotDetailsHeaderSecondCol" },
|
|
192
|
-
h("button", { disabled:
|
|
182
|
+
h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
|
|
193
183
|
? translate('unjoin', this.language)
|
|
194
184
|
: translate('join', this.language)),
|
|
195
185
|
!!this.winBalance && h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
|
|
@@ -220,8 +210,8 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
220
210
|
const betCurrencies = Object.keys(this.jackpot.BetLimits);
|
|
221
211
|
const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
|
|
222
212
|
const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
|
|
223
|
-
const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
224
|
-
const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
213
|
+
const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
214
|
+
const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
225
215
|
const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
|
|
226
216
|
const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
|
|
227
217
|
return h("div", null,
|
|
@@ -271,7 +261,7 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
271
261
|
];
|
|
272
262
|
}
|
|
273
263
|
getJackpotCountdown() {
|
|
274
|
-
const timerMessage = this.disabledStatus || this.timer;
|
|
264
|
+
const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
|
|
275
265
|
return (h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
|
|
276
266
|
}
|
|
277
267
|
startCountdown() {
|
|
@@ -301,7 +291,7 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
301
291
|
getPopupClasses() {
|
|
302
292
|
return {
|
|
303
293
|
JackpotDetailsPopup: true,
|
|
304
|
-
Disabled: !!this.disabledStatus,
|
|
294
|
+
Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
|
|
305
295
|
[this.device]: true,
|
|
306
296
|
[this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
|
|
307
297
|
};
|
|
@@ -380,6 +370,25 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
380
370
|
"text": "Selected jackpot"
|
|
381
371
|
}
|
|
382
372
|
},
|
|
373
|
+
"jackpotChangeStatusRequest": {
|
|
374
|
+
"type": "unknown",
|
|
375
|
+
"mutable": true,
|
|
376
|
+
"complexType": {
|
|
377
|
+
"original": "(event: MouseEvent) => void",
|
|
378
|
+
"resolved": "(event: MouseEvent) => void",
|
|
379
|
+
"references": {
|
|
380
|
+
"MouseEvent": {
|
|
381
|
+
"location": "global"
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"required": false,
|
|
386
|
+
"optional": false,
|
|
387
|
+
"docs": {
|
|
388
|
+
"tags": [],
|
|
389
|
+
"text": "Change jackpot status"
|
|
390
|
+
}
|
|
391
|
+
},
|
|
383
392
|
"language": {
|
|
384
393
|
"type": "string",
|
|
385
394
|
"mutable": false,
|
|
@@ -441,7 +450,6 @@ export class CasinoEngagementSuiteJackpotDetails {
|
|
|
441
450
|
"disabledStatus": {},
|
|
442
451
|
"activeTab": {},
|
|
443
452
|
"visibleGames": {},
|
|
444
|
-
"loading": {},
|
|
445
453
|
"enabled": {},
|
|
446
454
|
"balance": {},
|
|
447
455
|
"winBalance": {},
|
|
@@ -11,11 +11,13 @@ const TRANSLATIONS = {
|
|
|
11
11
|
type: 'Type',
|
|
12
12
|
winningProbability: 'Winning Probability',
|
|
13
13
|
tc: 'Terms & Conditions',
|
|
14
|
-
jackpotIsWon: 'Jackpot
|
|
14
|
+
jackpotIsWon: 'Jackpot is won!',
|
|
15
15
|
loadMore: 'Load More',
|
|
16
16
|
jackpotDetails: 'Jackpot Details',
|
|
17
17
|
minBet: 'Min Bet',
|
|
18
|
-
maxBet: 'Max Bet'
|
|
18
|
+
maxBet: 'Max Bet',
|
|
19
|
+
Suspended: 'Suspended',
|
|
20
|
+
Closed: 'Closed'
|
|
19
21
|
}
|
|
20
22
|
};
|
|
21
23
|
export const translate = (key, customLang) => {
|
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
+
function _typeof(o) {
|
|
4
|
+
"@babel/helpers - typeof";
|
|
5
|
+
|
|
6
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
+
return typeof o;
|
|
8
|
+
} : function (o) {
|
|
9
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
+
}, _typeof(o);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function requiredArgs(required, args) {
|
|
14
|
+
if (args.length < required) {
|
|
15
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @name toDate
|
|
21
|
+
* @category Common Helpers
|
|
22
|
+
* @summary Convert the given argument to an instance of Date.
|
|
23
|
+
*
|
|
24
|
+
* @description
|
|
25
|
+
* Convert the given argument to an instance of Date.
|
|
26
|
+
*
|
|
27
|
+
* If the argument is an instance of Date, the function returns its clone.
|
|
28
|
+
*
|
|
29
|
+
* If the argument is a number, it is treated as a timestamp.
|
|
30
|
+
*
|
|
31
|
+
* If the argument is none of the above, the function returns Invalid Date.
|
|
32
|
+
*
|
|
33
|
+
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
34
|
+
*
|
|
35
|
+
* @param {Date|Number} argument - the value to convert
|
|
36
|
+
* @returns {Date} the parsed date in the local time zone
|
|
37
|
+
* @throws {TypeError} 1 argument required
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Clone the date:
|
|
41
|
+
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
42
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* // Convert the timestamp to date:
|
|
46
|
+
* const result = toDate(1392098430000)
|
|
47
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
48
|
+
*/
|
|
49
|
+
function toDate(argument) {
|
|
50
|
+
requiredArgs(1, arguments);
|
|
51
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
52
|
+
|
|
53
|
+
// Clone the date
|
|
54
|
+
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
55
|
+
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
56
|
+
return new Date(argument.getTime());
|
|
57
|
+
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
58
|
+
return new Date(argument);
|
|
59
|
+
} else {
|
|
60
|
+
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
61
|
+
// eslint-disable-next-line no-console
|
|
62
|
+
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");
|
|
63
|
+
// eslint-disable-next-line no-console
|
|
64
|
+
console.warn(new Error().stack);
|
|
65
|
+
}
|
|
66
|
+
return new Date(NaN);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @name isBefore
|
|
72
|
+
* @category Common Helpers
|
|
73
|
+
* @summary Is the first date before the second one?
|
|
74
|
+
*
|
|
75
|
+
* @description
|
|
76
|
+
* Is the first date before the second one?
|
|
77
|
+
*
|
|
78
|
+
* @param {Date|Number} date - the date that should be before the other one to return true
|
|
79
|
+
* @param {Date|Number} dateToCompare - the date to compare with
|
|
80
|
+
* @returns {Boolean} the first date is before the second date
|
|
81
|
+
* @throws {TypeError} 2 arguments required
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* // Is 10 July 1989 before 11 February 1987?
|
|
85
|
+
* const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
|
|
86
|
+
* //=> false
|
|
87
|
+
*/
|
|
88
|
+
function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
89
|
+
requiredArgs(2, arguments);
|
|
90
|
+
var date = toDate(dirtyDate);
|
|
91
|
+
var dateToCompare = toDate(dirtyDateToCompare);
|
|
92
|
+
return date.getTime() < dateToCompare.getTime();
|
|
93
|
+
}
|
|
94
|
+
|
|
3
95
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
96
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
5
97
|
const TRANSLATIONS = {
|
|
@@ -13,11 +105,13 @@ const TRANSLATIONS = {
|
|
|
13
105
|
type: 'Type',
|
|
14
106
|
winningProbability: 'Winning Probability',
|
|
15
107
|
tc: 'Terms & Conditions',
|
|
16
|
-
jackpotIsWon: 'Jackpot
|
|
108
|
+
jackpotIsWon: 'Jackpot is won!',
|
|
17
109
|
loadMore: 'Load More',
|
|
18
110
|
jackpotDetails: 'Jackpot Details',
|
|
19
111
|
minBet: 'Min Bet',
|
|
20
|
-
maxBet: 'Max Bet'
|
|
112
|
+
maxBet: 'Max Bet',
|
|
113
|
+
Suspended: 'Suspended',
|
|
114
|
+
Closed: 'Closed'
|
|
21
115
|
}
|
|
22
116
|
};
|
|
23
117
|
const translate = (key, customLang) => {
|
|
@@ -65,7 +159,6 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
65
159
|
this.disabledStatus = '';
|
|
66
160
|
this.activeTab = 1;
|
|
67
161
|
this.visibleGames = [];
|
|
68
|
-
this.loading = false;
|
|
69
162
|
this.enabled = false;
|
|
70
163
|
this.showDetails = false;
|
|
71
164
|
this.jackpotEndTime = '';
|
|
@@ -81,16 +174,6 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
81
174
|
this.toggleShowDetails = () => {
|
|
82
175
|
this.showDetails = !this.showDetails;
|
|
83
176
|
};
|
|
84
|
-
this.changeJackpotStatus = (ev) => {
|
|
85
|
-
ev.stopPropagation();
|
|
86
|
-
window.postMessage({
|
|
87
|
-
type: 'JackpotChangeStatusRequest',
|
|
88
|
-
data: {
|
|
89
|
-
[this.jackpot.JackpotId]: !this.jackpot.Enabled,
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
this.loading = true;
|
|
93
|
-
};
|
|
94
177
|
this.setClientStyling = () => {
|
|
95
178
|
let sheet = document.createElement('style');
|
|
96
179
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -139,7 +222,6 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
139
222
|
if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
|
|
140
223
|
this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
|
|
141
224
|
}
|
|
142
|
-
this.loading = false;
|
|
143
225
|
break;
|
|
144
226
|
}
|
|
145
227
|
}
|
|
@@ -211,11 +293,12 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
211
293
|
return {
|
|
212
294
|
PopupButton: true,
|
|
213
295
|
Active: this.enabled,
|
|
214
|
-
Loading: this.
|
|
296
|
+
Loading: this.jackpot.Pending
|
|
215
297
|
};
|
|
216
298
|
}
|
|
217
299
|
getJackpotDetailsHeaderTemplate() {
|
|
218
|
-
|
|
300
|
+
const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
|
|
301
|
+
return (h("div", { class: "JackpotDetailsHeader" }, h("div", null, h("div", { class: "JackpotType" }, this.jackpot.Type), h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), h("div", { class: "JackpotDetailsHeaderSecondCol" }, h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
|
|
219
302
|
? translate('unjoin', this.language)
|
|
220
303
|
: translate('join', this.language)), !!this.winBalance && h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
|
|
221
304
|
}
|
|
@@ -237,8 +320,8 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
237
320
|
const betCurrencies = Object.keys(this.jackpot.BetLimits);
|
|
238
321
|
const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
|
|
239
322
|
const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
|
|
240
|
-
const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
241
|
-
const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
323
|
+
const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
324
|
+
const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
242
325
|
const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
|
|
243
326
|
const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
|
|
244
327
|
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)));
|
|
@@ -260,7 +343,7 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
260
343
|
];
|
|
261
344
|
}
|
|
262
345
|
getJackpotCountdown() {
|
|
263
|
-
const timerMessage = this.disabledStatus || this.timer;
|
|
346
|
+
const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
|
|
264
347
|
return (h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
|
|
265
348
|
}
|
|
266
349
|
startCountdown() {
|
|
@@ -290,7 +373,7 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
290
373
|
getPopupClasses() {
|
|
291
374
|
return {
|
|
292
375
|
JackpotDetailsPopup: true,
|
|
293
|
-
Disabled: !!this.disabledStatus,
|
|
376
|
+
Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
|
|
294
377
|
[this.device]: true,
|
|
295
378
|
[this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
|
|
296
379
|
};
|
|
@@ -307,6 +390,7 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
307
390
|
"clientStyling": [513, "client-styling"],
|
|
308
391
|
"clientStylingUrl": [513, "client-styling-url"],
|
|
309
392
|
"jackpot": [16],
|
|
393
|
+
"jackpotChangeStatusRequest": [1040],
|
|
310
394
|
"language": [1],
|
|
311
395
|
"gameSlug": [1, "game-slug"],
|
|
312
396
|
"device": [1],
|
|
@@ -315,7 +399,6 @@ const CasinoEngagementSuiteJackpotDetails$1 = /*@__PURE__*/ proxyCustomElement(c
|
|
|
315
399
|
"disabledStatus": [32],
|
|
316
400
|
"activeTab": [32],
|
|
317
401
|
"visibleGames": [32],
|
|
318
|
-
"loading": [32],
|
|
319
402
|
"enabled": [32],
|
|
320
403
|
"balance": [32],
|
|
321
404
|
"winBalance": [32],
|
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-5707e619.js';
|
|
2
2
|
|
|
3
|
+
function _typeof(o) {
|
|
4
|
+
"@babel/helpers - typeof";
|
|
5
|
+
|
|
6
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
7
|
+
return typeof o;
|
|
8
|
+
} : function (o) {
|
|
9
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
10
|
+
}, _typeof(o);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function requiredArgs(required, args) {
|
|
14
|
+
if (args.length < required) {
|
|
15
|
+
throw new TypeError(required + ' argument' + (required > 1 ? 's' : '') + ' required, but only ' + args.length + ' present');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @name toDate
|
|
21
|
+
* @category Common Helpers
|
|
22
|
+
* @summary Convert the given argument to an instance of Date.
|
|
23
|
+
*
|
|
24
|
+
* @description
|
|
25
|
+
* Convert the given argument to an instance of Date.
|
|
26
|
+
*
|
|
27
|
+
* If the argument is an instance of Date, the function returns its clone.
|
|
28
|
+
*
|
|
29
|
+
* If the argument is a number, it is treated as a timestamp.
|
|
30
|
+
*
|
|
31
|
+
* If the argument is none of the above, the function returns Invalid Date.
|
|
32
|
+
*
|
|
33
|
+
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
34
|
+
*
|
|
35
|
+
* @param {Date|Number} argument - the value to convert
|
|
36
|
+
* @returns {Date} the parsed date in the local time zone
|
|
37
|
+
* @throws {TypeError} 1 argument required
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // Clone the date:
|
|
41
|
+
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
42
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* // Convert the timestamp to date:
|
|
46
|
+
* const result = toDate(1392098430000)
|
|
47
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
48
|
+
*/
|
|
49
|
+
function toDate(argument) {
|
|
50
|
+
requiredArgs(1, arguments);
|
|
51
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
52
|
+
|
|
53
|
+
// Clone the date
|
|
54
|
+
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
55
|
+
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
56
|
+
return new Date(argument.getTime());
|
|
57
|
+
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
58
|
+
return new Date(argument);
|
|
59
|
+
} else {
|
|
60
|
+
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
61
|
+
// eslint-disable-next-line no-console
|
|
62
|
+
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");
|
|
63
|
+
// eslint-disable-next-line no-console
|
|
64
|
+
console.warn(new Error().stack);
|
|
65
|
+
}
|
|
66
|
+
return new Date(NaN);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @name isBefore
|
|
72
|
+
* @category Common Helpers
|
|
73
|
+
* @summary Is the first date before the second one?
|
|
74
|
+
*
|
|
75
|
+
* @description
|
|
76
|
+
* Is the first date before the second one?
|
|
77
|
+
*
|
|
78
|
+
* @param {Date|Number} date - the date that should be before the other one to return true
|
|
79
|
+
* @param {Date|Number} dateToCompare - the date to compare with
|
|
80
|
+
* @returns {Boolean} the first date is before the second date
|
|
81
|
+
* @throws {TypeError} 2 arguments required
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* // Is 10 July 1989 before 11 February 1987?
|
|
85
|
+
* const result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
|
|
86
|
+
* //=> false
|
|
87
|
+
*/
|
|
88
|
+
function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
89
|
+
requiredArgs(2, arguments);
|
|
90
|
+
var date = toDate(dirtyDate);
|
|
91
|
+
var dateToCompare = toDate(dirtyDateToCompare);
|
|
92
|
+
return date.getTime() < dateToCompare.getTime();
|
|
93
|
+
}
|
|
94
|
+
|
|
3
95
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
96
|
const SUPPORTED_LANGUAGES = ['en'];
|
|
5
97
|
const TRANSLATIONS = {
|
|
@@ -13,11 +105,13 @@ const TRANSLATIONS = {
|
|
|
13
105
|
type: 'Type',
|
|
14
106
|
winningProbability: 'Winning Probability',
|
|
15
107
|
tc: 'Terms & Conditions',
|
|
16
|
-
jackpotIsWon: 'Jackpot
|
|
108
|
+
jackpotIsWon: 'Jackpot is won!',
|
|
17
109
|
loadMore: 'Load More',
|
|
18
110
|
jackpotDetails: 'Jackpot Details',
|
|
19
111
|
minBet: 'Min Bet',
|
|
20
|
-
maxBet: 'Max Bet'
|
|
112
|
+
maxBet: 'Max Bet',
|
|
113
|
+
Suspended: 'Suspended',
|
|
114
|
+
Closed: 'Closed'
|
|
21
115
|
}
|
|
22
116
|
};
|
|
23
117
|
const translate = (key, customLang) => {
|
|
@@ -63,7 +157,6 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
63
157
|
this.disabledStatus = '';
|
|
64
158
|
this.activeTab = 1;
|
|
65
159
|
this.visibleGames = [];
|
|
66
|
-
this.loading = false;
|
|
67
160
|
this.enabled = false;
|
|
68
161
|
this.showDetails = false;
|
|
69
162
|
this.jackpotEndTime = '';
|
|
@@ -79,16 +172,6 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
79
172
|
this.toggleShowDetails = () => {
|
|
80
173
|
this.showDetails = !this.showDetails;
|
|
81
174
|
};
|
|
82
|
-
this.changeJackpotStatus = (ev) => {
|
|
83
|
-
ev.stopPropagation();
|
|
84
|
-
window.postMessage({
|
|
85
|
-
type: 'JackpotChangeStatusRequest',
|
|
86
|
-
data: {
|
|
87
|
-
[this.jackpot.JackpotId]: !this.jackpot.Enabled,
|
|
88
|
-
},
|
|
89
|
-
});
|
|
90
|
-
this.loading = true;
|
|
91
|
-
};
|
|
92
175
|
this.setClientStyling = () => {
|
|
93
176
|
let sheet = document.createElement('style');
|
|
94
177
|
sheet.innerHTML = this.clientStyling;
|
|
@@ -137,7 +220,6 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
137
220
|
if (res.Success && this.jackpot.JackpotId in res.JackpotIds) {
|
|
138
221
|
this.enabled = this.jackpot.Enabled = res.JackpotIds[this.jackpot.JackpotId];
|
|
139
222
|
}
|
|
140
|
-
this.loading = false;
|
|
141
223
|
break;
|
|
142
224
|
}
|
|
143
225
|
}
|
|
@@ -209,11 +291,12 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
209
291
|
return {
|
|
210
292
|
PopupButton: true,
|
|
211
293
|
Active: this.enabled,
|
|
212
|
-
Loading: this.
|
|
294
|
+
Loading: this.jackpot.Pending
|
|
213
295
|
};
|
|
214
296
|
}
|
|
215
297
|
getJackpotDetailsHeaderTemplate() {
|
|
216
|
-
|
|
298
|
+
const joinButtonDisabled = isBefore(new Date(this.jackpot.JackpotEndTime), new Date()) || !!this.disabledStatus;
|
|
299
|
+
return (h("div", { class: "JackpotDetailsHeader" }, h("div", null, h("div", { class: "JackpotType" }, this.jackpot.Type), h("div", { class: "JackpotBalance" }, this.getJackpotBalance())), h("div", { class: "JackpotDetailsHeaderSecondCol" }, h("button", { disabled: joinButtonDisabled, onClick: this.jackpotChangeStatusRequest, class: this.getJoinButtonClasses(), "data-id": this.jackpot.JackpotId }, this.enabled
|
|
217
300
|
? translate('unjoin', this.language)
|
|
218
301
|
: translate('join', this.language)), !!this.winBalance && h("div", { class: "JackpotIsWon" }, translate('jackpotIsWon', this.language)))));
|
|
219
302
|
}
|
|
@@ -235,8 +318,8 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
235
318
|
const betCurrencies = Object.keys(this.jackpot.BetLimits);
|
|
236
319
|
const matchedCurrency = betCurrencies.find(currency => currency === playerCurrency);
|
|
237
320
|
const betCurrency = matchedCurrency ? matchedCurrency : betCurrencies[0];
|
|
238
|
-
const showMinBet = this.jackpot.BetLimits && ((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
239
|
-
const showMaxBet = this.jackpot.BetLimits && ((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
321
|
+
const showMinBet = this.jackpot.BetLimits && !!((_a = this.jackpot.BetLimits[betCurrency]) === null || _a === void 0 ? void 0 : _a.MinBet);
|
|
322
|
+
const showMaxBet = this.jackpot.BetLimits && !!((_b = this.jackpot.BetLimits[betCurrency]) === null || _b === void 0 ? void 0 : _b.MaxBet);
|
|
240
323
|
const formattedMinBet = formatBalance((_c = this.jackpot.BetLimits[betCurrency]) === null || _c === void 0 ? void 0 : _c.MinBet, betCurrency);
|
|
241
324
|
const formattedMaxBet = formatBalance((_d = this.jackpot.BetLimits[betCurrency]) === null || _d === void 0 ? void 0 : _d.MaxBet, betCurrency);
|
|
242
325
|
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)));
|
|
@@ -258,7 +341,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
258
341
|
];
|
|
259
342
|
}
|
|
260
343
|
getJackpotCountdown() {
|
|
261
|
-
const timerMessage = this.disabledStatus || this.timer;
|
|
344
|
+
const timerMessage = translate(this.disabledStatus, this.language) || this.timer;
|
|
262
345
|
return (h("div", { class: `JackpotCountdown ${this.disabledStatus ? 'Suspended' : ''}` }, timerMessage));
|
|
263
346
|
}
|
|
264
347
|
startCountdown() {
|
|
@@ -288,7 +371,7 @@ const CasinoEngagementSuiteJackpotDetails = class {
|
|
|
288
371
|
getPopupClasses() {
|
|
289
372
|
return {
|
|
290
373
|
JackpotDetailsPopup: true,
|
|
291
|
-
Disabled: !!this.disabledStatus,
|
|
374
|
+
Disabled: !!this.disabledStatus || isBefore(new Date(this.jackpot.JackpotEndTime), new Date()),
|
|
292
375
|
[this.device]: true,
|
|
293
376
|
[this.jackpot.Type.charAt(0).toUpperCase() + this.jackpot.Type.slice(1)]: true
|
|
294
377
|
};
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["casino-engagement-suite-jackpot-details",[[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],"
|
|
16
|
+
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]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]]]],["casino-engagement-suite-progress-bar",[[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]}]]]], options);
|
|
17
17
|
});
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["casino-engagement-suite-jackpot-details",[[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],"
|
|
13
|
+
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]},[[8,"message","handleEvent"],[9,"resize","handleResize"]]]]],["casino-engagement-suite-progress-bar",[[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]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -15,6 +15,10 @@ export declare class CasinoEngagementSuiteJackpotDetails {
|
|
|
15
15
|
*/
|
|
16
16
|
jackpot: Jackpot;
|
|
17
17
|
/**
|
|
18
|
+
* Change jackpot status
|
|
19
|
+
*/
|
|
20
|
+
jackpotChangeStatusRequest: (event: MouseEvent) => void;
|
|
21
|
+
/**
|
|
18
22
|
* Language of the widget
|
|
19
23
|
*/
|
|
20
24
|
language: string;
|
|
@@ -33,7 +37,6 @@ export declare class CasinoEngagementSuiteJackpotDetails {
|
|
|
33
37
|
disabledStatus: string;
|
|
34
38
|
activeTab: number;
|
|
35
39
|
visibleGames: Game[];
|
|
36
|
-
loading: boolean;
|
|
37
40
|
enabled: boolean;
|
|
38
41
|
balance: number;
|
|
39
42
|
winBalance: number;
|
|
@@ -49,7 +52,6 @@ export declare class CasinoEngagementSuiteJackpotDetails {
|
|
|
49
52
|
handleTabChange: (e: MouseEvent) => void;
|
|
50
53
|
handleLoadMore: () => void;
|
|
51
54
|
toggleShowDetails: () => void;
|
|
52
|
-
changeJackpotStatus: (ev: MouseEvent) => void;
|
|
53
55
|
componentWillLoad(): void;
|
|
54
56
|
componentDidRender(): void;
|
|
55
57
|
disconnectedCallback(): void;
|
|
@@ -28,6 +28,10 @@ export namespace Components {
|
|
|
28
28
|
* Selected jackpot
|
|
29
29
|
*/
|
|
30
30
|
"jackpot": Jackpot;
|
|
31
|
+
/**
|
|
32
|
+
* Change jackpot status
|
|
33
|
+
*/
|
|
34
|
+
"jackpotChangeStatusRequest": (event: MouseEvent) => void;
|
|
31
35
|
/**
|
|
32
36
|
* Language of the widget
|
|
33
37
|
*/
|
|
@@ -67,6 +71,10 @@ declare namespace LocalJSX {
|
|
|
67
71
|
* Selected jackpot
|
|
68
72
|
*/
|
|
69
73
|
"jackpot"?: Jackpot;
|
|
74
|
+
/**
|
|
75
|
+
* Change jackpot status
|
|
76
|
+
*/
|
|
77
|
+
"jackpotChangeStatusRequest"?: (event: MouseEvent) => void;
|
|
70
78
|
/**
|
|
71
79
|
* Language of the widget
|
|
72
80
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
declare type JackpotCloseReasonType = 'Closed' | 'Suspended';
|
|
1
2
|
export interface JoinJackpotResult {
|
|
2
3
|
Success: boolean;
|
|
3
4
|
JackpotIds: {
|
|
@@ -41,5 +42,7 @@ export interface Jackpot {
|
|
|
41
42
|
JackpotEndTime: string;
|
|
42
43
|
GamesInfo: Array<Game>;
|
|
43
44
|
WinBalance?: number;
|
|
44
|
-
Reason?:
|
|
45
|
+
Reason?: JackpotCloseReasonType;
|
|
46
|
+
Pending?: boolean;
|
|
45
47
|
}
|
|
48
|
+
export {};
|
package/package.json
CHANGED
|
@@ -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",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.jackpotEndTime="",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.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 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.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("div",{class:"JackpotDetailsContent"},this.jackpot.Description&&a("p",{class:"JackpotDescription"},this.jackpot.Description),this.jackpot.JackpotRulesUrl&&a("a",{class:"TermsAndConditions",href:this.jackpot.JackpotRulesUrl,target:"_blank"},p("tc",this.jackpot.JackpotRulesUrl))))}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.jackpot.JackpotRulesUrl)&&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()))}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.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;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.PopupButton{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.PopupButton.Active{background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.PopupButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.PopupButton.Loading{opacity:0.5;pointer-events:none}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .JackpotDetailsTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-primary, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotIconButton{width:16px;height:16px;cursor:pointer;display:flex;justify-content:center;align-items:center}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;align-items:center;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:"Montserrat", sans-serif;font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emfe-w-color-white, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:Montserrat, sans-serif;font-size:18px;font-weight:var(--emw--font-weight-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:Montserrat, sans-serif;font-weight:var(--emw--font-weight-bold, 700);font-size:12px;line-height:15px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%);-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotGamesLoadMore::before,.JackpotJoinButton.Joined::before{content:"";position:absolute;inset:0;border-radius:var(--emw--button-border-radius, 4px);padding:1px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-gray-150, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emfe-w-color-white, #FFF);text-transform:capitalize}.JackpotDetailsTabsWrapper{display:flex;flex-direction:column}.JackpotDetailsTabs{margin-top:20px;display:flex;position:relative}.JackpotDetailsTabs .JackpotDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:12px;line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.JackpotDetailsTabs .JackpotDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.JackpotDetailsTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:14px;line-height:17px}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotGamesListWrapper{overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg")}.JackpotDetailsButton .Open{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-primary, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.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 .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 .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}
|