@everymatrix/casino-engagement-suite-container 1.37.10 → 1.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-engagement-suite-container/casino-engagement-suite-container.esm.js +1 -1
- package/dist/casino-engagement-suite-container/p-8e11b64d.entry.js +1 -0
- package/dist/casino-engagement-suite-container/p-9b18d150.js +1 -0
- package/dist/cjs/{casino-engagement-suite-bar_11.cjs.entry.js → casino-engagement-suite-bar_13.cjs.entry.js} +989 -246
- package/dist/cjs/casino-engagement-suite-container.cjs.js +2 -2
- package/dist/cjs/{index-e0f5dbbe.js → index-26e87891.js} +426 -10
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/casino-engagement-suite-container/casino-engagement-suite-container.js +75 -5
- package/dist/collection/utils/utils.js +1 -11
- package/dist/components/casino-engagement-suite-bar2.js +5 -2
- package/dist/components/casino-engagement-suite-challenges-details2.js +17 -9
- package/dist/components/casino-engagement-suite-challenges-list2.js +16 -109
- package/dist/components/casino-engagement-suite-container.js +176 -68
- package/dist/components/casino-engagement-suite-jackpots-list2.js +77 -30
- package/dist/components/casino-engagement-suite-modal-container2.js +1 -1
- package/dist/components/casino-engagement-suite-modal2.js +2 -2
- package/dist/components/casino-engagement-suite-tournament.js +6 -0
- package/dist/components/casino-engagement-suite-tournament2.js +713 -0
- package/dist/components/general-styling-wrapper.js +6 -0
- package/dist/components/general-styling-wrapper2.js +103 -0
- package/dist/esm/{casino-engagement-suite-bar_11.entry.js → casino-engagement-suite-bar_13.entry.js} +988 -247
- package/dist/esm/casino-engagement-suite-container.js +2 -2
- package/dist/esm/{index-eec630f8.js → index-b3a1fb24.js} +425 -11
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/casino-engagement-suite-container/casino-engagement-suite-container.d.ts +6 -0
- package/dist/types/models/casino-engagement-suite-config.d.ts +3 -0
- package/package.json +1 -1
- package/dist/casino-engagement-suite-container/p-38f8acbb.entry.js +0 -1
- package/dist/casino-engagement-suite-container/p-ae874bf6.js +0 -1
- package/dist/components/index2.js +0 -68
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as n}from"./p-
|
|
1
|
+
import{p as e,b as n}from"./p-9b18d150.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((e=>n([["p-8e11b64d",[[1,"casino-engagement-suite-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],orientation:[32],device:[32],showChallengesList:[32],showFreeSpinsList:[32],showJackpotsList:[32],showChallengeDetails:[32],showFreeSpinsDetails:[32],showJackpotDetails:[32],showLeaderboardWidget:[32],challengePercent:[32],limitStylingAppends:[32],activeWidget:[32],challenges:[32],inProgressChallenges:[32],jackpots:[32],freeSpins:[32],leaderboards:[32],gameSlug:[32],pausedChallengeIds:[32],isChallengeLabel:[32],isJoiningToChallenge:[32],selectedChallenge:[32],selectedJackpot:[32],selectedSpin:[32],selectedSpinId:[32],selectedChallengeId:[32],selectedJackpotId:[32],init:[64]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-tournament",{language:[1],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],leaderboardsInit:[16],tab:[32],locale:[32],tournamentItem:[32],tournamentList:[32],leaderboards:[32],isActionJoinPending:[32],isDialogOpen:[32],isShowInfo:[32],page:[32],tournamentInDialog:[32],dialog:[32],time:[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-challenges-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],challenge:[16],inProgressChallenges:[16],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],pausedChallengeIds:[16],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32]}],[1,"casino-engagement-suite-challenges-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],challenges:[1040],isJoiningToChallenge:[1028,"is-joining-to-challenge"],inProgressChallenges:[1040],pausedChallengeIds:[16],tooltip:[32],timers:[32],limitStylingAppends:[32]}],[1,"casino-engagement-suite-modal-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],device:[1],limitStylingAppends:[32],openModals:[32],rewardMessage:[32],hasError:[32],confirmationData:[32],winAmount:[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]],[1,"casino-engagement-suite-bar",{activeWidget:[1537,"active-widget"],challengePercent:[1,"challenge-percent"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],orientation:[1],device:[1],isChallengeLabel:[4,"is-challenge-label"],language:[1],jackpots:[16],freeSpins:[16],limitStylingAppends:[32],activeJackpot:[32]}],[1,"casino-engagement-suite-free-spins-details",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],spin:[1040],inProgressChallenges:[16],language:[1],gameSlug:[1,"game-slug"],device:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],limitStylingAppends:[32],timer:[32],showDetails:[32],isExpiredChallenge:[32],activeTab:[32],visibleGames:[32]}],[1,"casino-engagement-suite-free-spins-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],freeSpins:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32],newSpinIds:[32]}],[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"]]],[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],buttonsLoadingStates:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]},[[8,"message","handleEvent"]]],[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],isLoading:[1028,"is-loading"],header:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],showAnimation:[4,"show-animation"],limitStylingAppends:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}],[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 e,h as t,c as i,g as n,H as s,F as o}from"./p-9b18d150.js";const a=["en"],r={en:{new:"new"}},l=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.orientation="Landscape",this.device="Mobile",this.isChallengeLabel=!1,this.language="en",this.jackpots=[],this.freeSpins={},this.limitStylingAppends=!1,this.activeJackpot="",this.handleTileClick=e=>{const t=e.target.getAttribute("data-app");window.postMessage({type:`Bar${t}Click`}),this.activeWidget=t,"Jackpots"===t&&(this.activeJackpot=e.target.getAttribute("data-type"))},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.engagementSuiteBar.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.engagementSuiteBar.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.engagementSuiteBar&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getChallengeTile(){return t("button",{class:"Tile Reward Challenges "+("Challenges"===this.activeWidget?"Active":""),"data-app":"Challenges",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.challengePercent),t("div",{class:"ChallengeLabel "+(this.isChallengeLabel?"ShowChallengeLabel":"")},t("span",null,(()=>{const e=this.language;return r[void 0!==e&&a.includes(e)?e:"en"].new})())))}getFreeSpinsTile(){const{TotalNumberOfFreeSpins:e,TotalNumberOfUsedFreeSpins:i}=this.freeSpins,n=e-i;return t("button",{class:"Tile Reward FreeSpins "+("FreeSpins"===this.activeWidget?"Active":""),"data-app":"FreeSpins",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,"number"!=typeof n||n<0?"":n))}getJackpotClasses(e){return{Tile:!0,Jackpot:!0,Enabled:e.Enabled,Active:"Jackpots"===this.activeWidget&&this.activeJackpot===e.Type,[e.Type.charAt(0).toUpperCase()+e.Type.slice(1)]:!0}}getJackpotsTemplate(){return this.jackpots.map((e=>{const i=function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(e.WinBalance||e.Balance,e.Currency);return t("div",{class:this.getJackpotClasses(e),"data-app":"Jackpots","data-type":e.Type,onClick:this.handleTileClick},t("div",{class:"JackpotType"},e.Type),t("span",{class:"JackpotBalance"},i))}))}getLeaderboardsTile(){return t("button",{class:"Tile Reward Leaderboard "+("Leaderboards"===this.activeWidget?"Active":""),"data-app":"Leaderboards",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,"-"))}render(){return t("div",{class:`CasinoEngagementSuiteBar ${this.orientation} ${this.device}`,ref:e=>this.engagementSuiteBar=e},t("div",{class:"EngagementSuiteContainer"},!!this.jackpots.length&&this.getJackpotsTemplate(),this.getLeaderboardsTile(),this.challengePercent&&this.getChallengeTile(),this.freeSpins&&this.getFreeSpinsTile()))}};l.style=':host{display:block}*{box-sizing:border-box}.CasinoEngagementSuiteBar{height:100vh;background-color:var(--emw--color-background, #1E1638);color:var(--emw--color-typography, #FFF);display:flex;justify-content:center;position:relative;z-index:1}.CasinoEngagementSuiteBar .EngagementSuiteContainer{display:flex;align-items:center;gap:4px;scrollbar-gutter:stable;overflow-x:auto;padding:5px 9px 0;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar{width:3px;background:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar-thumb{border-radius:4px;background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{cursor:pointer;background-color:var(--emw--color-primary, #251D3E);border-radius:var(--emw--border-radius-medium, 4px);display:flex;flex-direction:row;align-items:center;justify-content:center;position:relative;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-x-small, 12px);font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFF)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile.Active::before{background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #2D2545 82.77%)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-medium, 4px);padding:1px;background:linear-gradient(0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 100%);-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{padding:14px 8px;flex-direction:column}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotType{display:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot .JackpotBalance{font-weight:var(--emw--font-weight-semibold, 600);line-height:12px;font-size:12px;color:var(--emw--color-typography, #fff)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.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}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.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}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.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}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled .JackpotBalance{font-weight:var(--emw--font-weight-bold, 800)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{justify-content:space-between;padding:8px;border:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer .RewardIcon{width:24px;height:24px;background-size:100%;background-position:center}.Tile.Leaderboard .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard.svg")}.Tile.Leaderboard.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/leaderboard-pressed.svg")}.Tile.Challenges .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge.svg")}.Tile.Challenges.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/challenge-pressed.svg")}.Tile.Luckywheel .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel.svg")}.Tile.Luckywheel.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel-pressed.svg")}.Tile.FreeSpins .RewardIcon{background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins.svg")}.Tile.FreeSpins.Active .RewardIcon{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/freespins-pressed.svg")}.ChallengeLabel{min-width:23px;height:11px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-4px;right:4px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:7px;line-height:7px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.Landscape.CasinoEngagementSuiteBar{width:152px;padding-top:11px;box-shadow:0 4px 4px 0 #00000040, 8px 0 10px 0 #0000004D}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer{flex-direction:column}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{width:120px;height:40px}.Portrait.CasinoEngagementSuiteBar{border-radius:0 0 var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px);height:auto;padding:5px 10px 10px;box-shadow:0 4px 4px 0 #00000040, 8px 0 10px 0 #0000004D}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer{gap:8px;flex-wrap:wrap}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{flex:1 1 0px;height:32px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{min-width:30%;padding:10px 8px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{min-width:20%;padding:4px 8px}.CasinoEngagementSuiteBar.Desktop.Landscape{width:252px}.CasinoEngagementSuiteBar.Desktop.Landscape .EngagementSuiteContainer{gap:12px}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward{padding:8px 20px;height:64px;font-size:var(--emw--font-size-medium, 16px)}.CasinoEngagementSuiteBar.Desktop.Landscape .Reward .RewardIcon{width:48px;height:48px}.CasinoEngagementSuiteBar.Desktop.Landscape .Tile{width:212px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot{padding-top:35px;min-height:133px;background:center/contain url("https://static.everymatrix.com/gic/img/engagement-suite/bar/jackpot-bg-stars.svg")}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType{display:block;font-weight:var(--emw--font-weight-bold, 800);margin-bottom:12px;text-transform:uppercase}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotBalance{font-size:var(--emw--size-large, 24px);line-height:24px}';const p=["en"],c={en:{challenges:"Challenges",join:"Join",unjoin:"Unjoin",new:"new",details:"Challenge Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution"}},h=(e,t)=>{const i=t;return c[void 0!==i&&p.includes(i)?i:"en"][e]};var d,g;function u(e,t){return`${t}${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}!function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(d||(d={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(g||(g={}));const m=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.resetNewLabel(),this.close.emit()},this.handleBackClick=()=>{this.resetNewLabel(),this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.changeChallengeStatus=e=>{var t,i;const n=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(n))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:n}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:n,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:n}})},this.toggle=()=>{this.showDetails=!this.showDetails}}challengePropHandler(e){!this.interval&&e&&(this.updateTimer(),this.startCountdown()),this.interval&&!e&&clearInterval(this.interval)}componentWillLoad(){this.challengePropHandler(this.challenge)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getActionsTemplate(){return t("header",{class:"ChallengeActions"},t("button",{class:"ChallengeIconButton",onClick:this.handleBackClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),"Mobile"!==this.device&&t("div",{class:"ChallengePopupName"},h("challenges",this.language)),t("button",{class:"ChallengeIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getChallengeHeader(){const e=this.challenge.Status===g.InProgress||this.challenge.Status===g.PendingLevelReward;return t("div",{class:"ChallengeDetailsHeader"},t("span",{class:"ChallengeName"},this.challenge.ChallengePresentation.PresentationName),t("button",{onClick:this.changeChallengeStatus,class:`ChallengeJoinButton ${e?"Joined":""}\n ${this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId)||this.challenge.Status===g.Completed?"Disabled":""}`,"data-id":this.challenge.Id},h(e?"unjoin":"join",this.language)),t("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},t("span",null,h("new",this.language))))}getChallengeCountdown(){return t("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer)}getChallengeDetails(){const e=this.challenge.ChallengePresentation.Description,i=this.challenge.ChallengePresentation.Url,n=this.challenge.Games;return t("div",{class:"CollapseDetails "+(this.showDetails?"ShowDetails":"")},e&&t("div",{class:"ChallengeDescription"},e),i&&t("div",{class:"TC"},t("a",{href:i,target:"_blank"},h("tc",this.language))),(null==n?void 0:n.length)&&t("div",{class:"ChallengeGames"},n.map((e=>t("div",{class:"Game",key:e.CasinoGameId},t("img",{src:e.GameIcon,alt:e.GameName,onClick:this.onGameClick,class:e.GameSlug===this.gameSlug?"Disabled":"","data-slug":e.GameSlug}))))))}resetNewLabel(){this.resetNewChallengeLabel.emit(this.challenge.Id)}startCountdown(){this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.challenge.ExpirationTime).getTime()-(new Date).getTime();if(e<1)return clearInterval(this.interval),this.timer="",void(this.isExpiredChallenge=!0);const{days:t,hours:i,minutes:n,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${s}s`:`${t}d:${i}h:${n}m`}getLevelTarget(e){const i=u(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let n=`${h("place",this.language)} ${i}`;return 1===e.LevelTargetType?n+=` ${h("bet",this.language)}`:2===e.LevelTargetType&&(n+=` ${h("bets",this.language)} X ${e.TargetBetCount}`),t("span",{class:"ChallengeLevelTarget"},n)}getLevelBetRangesDetails(e){var i,n,s,o;if(0===e.LevelTargetType){const a=u(null===(i=e.BetRange)||void 0===i?void 0:i.MinBet,this.challenge.CurrencySymbol),r=u(null===(n=e.BetRange)||void 0===n?void 0:n.MaxBet,this.challenge.CurrencySymbol),l=e.LevelContributionPercent+"%",p=!!(null===(s=e.BetRange)||void 0===s?void 0:s.MinBet),c=!!(null===(o=e.BetRange)||void 0===o?void 0:o.MaxBet),d=100!==e.LevelContributionPercent;if(p||c||d)return t("div",{class:"ChallengeLevelBetDetails"},p&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,h("minBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},a)),c&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,h("maxBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},r)),d&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,h("contribution",this.language),": "),t("span",{class:"ChallengeLevelBetContribution"},l)))}}getChallengeLevels(){const e=this.pausedChallengeIds.includes(this.challenge.ChallengeId),i=t=>1===t.ProgressStatus&&!this.isExpiredChallenge&&!e;return t("div",{class:"ChallengeLevels"},this.challenge.LevelProgresses.map(((n,s)=>t("div",{class:"ChallengeLevelCard "+(i(n)?"InProgress":"")},t("casino-engagement-suite-progress-bar",{class:this.device,value:n.ProgressPercentage,"hide-percent":0===n.ProgressPercentage&&!i(n)||100===n.ProgressPercentage,disabled:this.isExpiredChallenge||e},t("span",{slot:"Title",class:"ChallengeLevelTitle"},t("span",null,"Level ",s+1,": "),this.getLevelTarget(n))),t("div",{class:"ChallengeRewardMessage"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg",alt:"win"}),t("span",null,h("win",this.language),": "),t("span",{class:"CustomRewardMessage"},n.CustomRewardMessage)),this.getLevelBetRangesDetails(n)))))}getToggleButton(){return t("div",{class:"ChallengeCollapseButton",onClick:this.toggle},t("span",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,h("details",this.language)))}render(){return t("div",{class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{class:"ChallengeDetails"},this.getChallengeHeader(),this.getChallengeCountdown(),this.getToggleButton(),this.getChallengeDetails(),this.getChallengeLevels()))}get host(){return n(this)}static get watchers(){return{challenge:["challengePropHandler"]}}};var b,x;m.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;900&display=swap"); :host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 2px}.ChallengeActions .ChallengeIconButton{width:16px;height:16px;cursor:pointer}.ChallengeActions .ChallengeIconButton img{width:100%;height:100%}.ChallengeActions .ChallengePopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:16px;font-weight:500;line-height:16px}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-10px;right:0px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:11px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{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-word}.ChallengeJoinButton.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}.ChallengeJoinButton{transition:all 0.5s ease-out;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;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{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}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengeCountdown{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin:12px 0 24px;color:var(--emw--color-gray-150, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-normal, 700);color:var(--emfe-w-color-white, #FFF)}.ChallengeCollapseButton{margin-bottom:14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.ChallengeCollapseButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.ChallengeCollapseButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.ChallengeCollapseButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.CollapseDetails{display:none;font-size:var(--emw--font-size-small, 14px);line-height:17px;font-weight:var(--emw--font-weight-normal, 400)}.CollapseDetails .ChallengeDescription{color:var(--emfe-w-color-white, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px}.CollapseDetails .ChallengeGames{width:100%;overflow-y:auto;display:flex;gap:4px}.CollapseDetails .ChallengeGames::-webkit-scrollbar{height:2px;background:none}.CollapseDetails .ChallengeGames::-webkit-scrollbar-thumb{border-radius:4px;background-color:var(--emw--color-background, #666178)}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:2px;cursor:pointer}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-primary, #8F8B9C);font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-normal, 400);line-height:12px}.ChallengeLevels .ChallengeLevelCard{border:1px solid var(--emw--button-border-color, #403956);padding:16px;border-radius:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetails{margin-top:25px;display:flex;flex-wrap:wrap;gap:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetDetail:not(:last-of-type){margin-right:8px}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetRange,.ChallengeLevels .ChallengeLevelCard .ChallengeLevelBetContribution{font-weight:var(--emw--font-weight-semibold, 600)}.ChallengeLevels .ChallengeLevelCard .ChallengeLevelTitle{margin-bottom:2px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage{margin-top:10px;line-height:15px;display:flex;flex-direction:row;align-items:center;gap:4px}.ChallengeLevels .ChallengeLevelCard .ChallengeRewardMessage .CustomRewardMessage{font-weight:var(--emw--font-weight-semibold, 600);word-break:break-word}.ChallengeLevels .InProgress{position:relative;border:none}.ChallengeLevels .InProgress .ChallengeLevelTarget,.ChallengeLevels .InProgress .CustomRewardMessage{color:var(--emfe-w-color-white, #FFF)}.ChallengeLevels .InProgress::before{content:"";position:absolute;inset:0;border-radius:8px;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}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding:16px 8px 8px}.ChallengeDetailsPopup.Tablet .ChallengeIconButton,.ChallengeDetailsPopup.Desktop .ChallengeIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengeDetailsPopup.Tablet .ChallengeJoinButton,.ChallengeDetailsPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengeDetailsPopup.Tablet .ChallengeCountdown,.ChallengeDetailsPopup.Tablet .ChallengeLevels,.ChallengeDetailsPopup.Desktop .ChallengeCountdown,.ChallengeDetailsPopup.Desktop .ChallengeLevels{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengeDetailsPopup.Tablet .ChallengeCollapseButton,.ChallengeDetailsPopup.Desktop .ChallengeCollapseButton{margin-bottom:12px}.ChallengeDetailsPopup.Tablet .CollapseDetails .ChallengeDescription,.ChallengeDetailsPopup.Desktop .CollapseDetails .ChallengeDescription{font-size:var(--emw--font-size-medium, 16px);line-height:19px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeLevelTitle,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeLevelTitle{margin-bottom:4px}.ChallengeDetailsPopup.Tablet .ChallengeLevels .ChallengeRewardMessage,.ChallengeDetailsPopup.Desktop .ChallengeLevels .ChallengeRewardMessage{margin-top:12px;line-height:17px}',function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(b||(b={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(x||(x={}));const f=["en"],k={en:{challenges:"Challenges",join:"Join",unjoin:"Unjoin",new:"new",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward"}},w=(e,t)=>{const i=t;return k[void 0!==i&&f.includes(i)?i:"en"][e]},v=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.pausedChallengeIds=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1,this.resetNewChallengeLabel.emit("list")},this.handleChallengeClick=e=>{const t=e.currentTarget.getAttribute("data-id");window.postMessage({type:"ChallengeClick",id:t})},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.changeChallengeStatus=e=>{var t,i;e.stopPropagation();const n=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(n))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:n}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:n,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:n}})}}challengesPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.challengesPropHandler(this.challenges)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.challenges.filter((e=>e.Status!==x.Expired)).reduce(((t,i)=>{const n=new Date(i.ExpirationTime).getTime()-e;let s="00h:00m:00s";if(n<1)this.removeChallenge(i.Id);else{const{days:e,hours:t,minutes:i,seconds:o}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};s="00"===e?`${t}h:${i}m:${o}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:s})}),{})}removeChallenge(e){const t=this.challenges.findIndex((t=>t.Id===e));t>-1&&(this.challenges.splice(t,1),window.postMessage({type:"ChallengeHasExpired",id:e}))}getChallengeClasses(e){return{ChallengeCard:!0,InProgress:e.Status===x.InProgress&&!this.pausedChallengeIds.includes(e.ChallengeId),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===x.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.ChallengeId)}isChallengeCompleted(e){return e.Status===x.Completed||e.Status===x.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===x.Completed)return 100;if(this.isChallengePaused(e)||e.Status===x.PendingLevelReward||e.Status===x.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===b.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===b.Fillup||e.ProgressStatus===b.Completed)).slice(-1)[0];return t?t.ProgressPercentage:i?i.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:i}=e,n=e.Status===x.InProgress||e.Status===x.PendingLevelReward;return t("div",{class:"ChallengeCardHeader"},t("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),t("button",{class:`${n?"ChallengeJoinButton Joined":"ChallengeJoinButton"} ${this.isJoiningToChallenge||e.Status===x.Completed||this.isChallengePaused(e)?"Disabled":""}`,onClick:this.changeChallengeStatus,"data-id":i},w(n?"unjoin":"join",this.language)))}getChallengeTemplate(e){const i=this.getChallengeProgress(e),n=this.timers[e.Id],s=i>-1?t("casino-engagement-suite-progress-bar",{class:this.device,value:i,disabled:this.isChallengePaused(e)},t("span",{slot:"Title",class:"ChallengeCountdown"},n)):t("span",{class:"ChallengeCountdown"},n);return t("div",{class:this.getChallengeClasses(e),onClick:this.handleChallengeClick,key:e.Id,"data-id":e.Id},this.getChallengeHeaderTemplate(e),s,t("div",{class:"ChallengeLabel "+(e.IsNew?"ShowChallengeLabel":"")},t("span",null,w("new",this.language))))}getHeaderTemplate(){return t("header",{class:"ChallengesListPopupHeader"},t("button",{onClick:this.showTooltip,class:"ChallengesIconButton"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),t("div",{class:"ChallengesListPopupHeaderName"},w("challenges",this.language)),t("button",{class:"ChallengesIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close challenges list"})))}getListTemplate(){return this.challenges.length?t("div",{class:"ChallengesListWrapper"},t("div",{class:"ChallengesList"},this.challenges.map((e=>this.getChallengeTemplate(e))))):t("div",{class:"ChallengesListEmpty"},t("h2",null,w("noChallenges",this.language)),t("p",null,w("tryOtherGames",this.language)))}getTooltipTemplate(){return t("div",{class:"ChallengesTooltipBackdrop"},t("div",{class:"ChallengesTooltip"},t("button",{class:"ChallengesIconButton",onClick:this.hideTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),w("tooltip",this.language)))}render(){return t("div",{class:`ChallengesListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{challenges:["challengesPropHandler"]}}};function C(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]])}return i}var F,y;function D(){return window.screen.orientation.type.includes("portrait")?"Portrait":"Landscape"}v.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:8px}.ChallengesIconButton{width:16px;height:16px;cursor:pointer}.ChallengesIconButton img{width:100%;height:100%}.ChallengesListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengesListWrapper::-webkit-scrollbar{display:none}.ChallengesList{display:flex;flex-direction:column;row-gap:12px;padding:12px 19px 0}.ChallengeCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.ChallengeJoinButton.Joined::before,.ChallengeCard.InProgress::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}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word}.ChallengeJoinButton{transition:all 0.5s ease-out;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;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.ChallengeJoinButton.Joined{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}.ChallengeJoinButton.Joined::before{border-radius:99px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ChallengesListEmpty{padding:20px 32px}.ChallengesListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:20px;line-height:24px;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:12px;line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.ChallengeLabel span{display:inline-block;text-transform:uppercase;font-size:10px;line-height:10px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengesTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.ChallengesTooltipBackdrop .ChallengesTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.ChallengesTooltipBackdrop .ChallengesTooltip .ChallengesIconButton{top:12px;right:6px;position:absolute}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:16px;line-height:16px}.ChallengesListPopup.Tablet .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesIconButton{width:24px;height:24px}.ChallengesListPopup.Tablet .ChallengesList,.ChallengesListPopup.Desktop .ChallengesList{padding:20px 24px 0;row-gap:20px}.ChallengesListPopup.Tablet .ChallengesListEmpty,.ChallengesListPopup.Desktop .ChallengesListEmpty{padding:40px 65px}.ChallengesListPopup.Tablet .ChallengesListEmpty h2,.ChallengesListPopup.Desktop .ChallengesListEmpty h2{margin-bottom:32px;font-size:var(--emw--size-large, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-small, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Desktop .ChallengeName{line-height:27px;font-size:22px}.ChallengesListPopup.Tablet .ChallengeJoinButton,.ChallengesListPopup.Desktop .ChallengeJoinButton{min-width:100px;height:36px;font-size:16px}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:14px;line-height:14px}.ChallengesListPopup.Tablet .ChallengesTooltip,.ChallengesListPopup.Desktop .ChallengesTooltip{padding:60px 65px;font-size:16px;line-height:20px}.ChallengesListPopup.Tablet .ChallengesTooltip .ChallengesIconButton,.ChallengesListPopup.Desktop .ChallengesTooltip .ChallengesIconButton{top:24px;right:24px}',"function"==typeof SuppressedError&&SuppressedError,function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(F||(F={})),function(e){e[e.Started=0]="Started",e[e.InProgress=1]="InProgress",e[e.PendingLevelReward=2]="PendingLevelReward",e[e.Completed=3]="Completed",e[e.Expired=4]="Expired"}(y||(y={}));function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function B(e){J(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===S(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"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 L(e,t){return J(2,arguments),B(e).getTime()-B(t).getTime()}var T={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function P(e){return e?T[e]:T.trunc}const E=class{constructor(t){e(this,t),this.openModal=i(this,"openModal",7),this.closeModal=i(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.orientation="Landscape",this.device="Mobile",this.showChallengesList=!1,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showFreeSpinsDetails=!1,this.showJackpotDetails=!1,this.showLeaderboardWidget=!1,this.limitStylingAppends=!1,this.jackpots=[],this.leaderboards=[],this.gameSlug="",this.pausedChallengeIds=[],this.isChallengeLabel=!1,this.isJoiningToChallenge=!1,this.handlePopupClose=(e,t)=>()=>{this[e]=!1,this[t]=!1,this.activeWidget=""},this.handleJackpotsPopupClose=()=>{this.showJackpotsList=!1,this.showJackpotDetails=!1,this.activeWidget=""},this.handleChallengePopupBack=()=>{this.showChallengeDetails=!1,this.showChallengesList=!0},this.handleResetNewChallengeLabel=e=>{if(this.challenges){if("list"===e.detail)this.challenges.forEach((e=>e.IsNew=!1)),this.isChallengeLabel=!1;else{const t=this.challenges.find((t=>t.Id===e.detail));t&&(t.IsNew=!1)}this.challenges=[...this.challenges]}},this.handleJackpotPopupBack=()=>{this.showJackpotDetails=!1,this.showJackpotsList=!0},this.barHeight=0,this.orientationChangeHandler=()=>{this.orientation=D()},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.onLeaderboardsClose=()=>{this.showLeaderboardWidget=!1,this.activeWidget=""}}handleEvent(e){const t=null==e?void 0:e.data,{type:i}=t,n=C(t,["type"]);switch(i){case"ChallengeGrant":{const t=e.data.data.challengeProgressData[0],i=this.challenges.findIndex((e=>function(e,t,i){J(2,arguments);var n=L(e,t)/1e3;return P(null==i?void 0:i.roundingMethod)(n)}(new Date(e.ExpirationTime),new Date(t.ExpirationTime))>0));i>-1?this.challenges.splice(i,0,t):this.challenges.push(t),this.challenges=[...this.challenges],this.isChallengeLabel=!0;break}case"ChallengeHasExpired":this.setChallengePercent();break;case"BarLeaderboardsClick":this.showLeaderboardWidget=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.activeWidget="Leaderboards";break;case"BarChallengesClick":this.showChallengesList=!0,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="Challenges",this.isChallengeLabel=!1;break;case"BarFreeSpinsClick":this.showFreeSpinsList=!0,this.showChallengesList=!1,this.showJackpotsList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="FreeSpins";break;case"BarJackpotsClick":this.showJackpotsList=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="Jackpots";break;case"ChallengeClick":this.selectedChallengeId=e.data.id,this.selectedChallenge=this.challenges.find((e=>e.Id===this.selectedChallengeId)),this.isChallengeLabel=!1,this.showChallengesList=!1,this.showChallengeDetails=!0;break;case"FreeSpinClick":this.selectedSpinId=e.data.id,this.selectedSpin=this.freeSpins.VendorFreeSpins.find((e=>e.Id===this.selectedSpinId)),this.showFreeSpinsList=!1,this.showFreeSpinsDetails=!0;break;case"JackpotClick":this.selectedJackpotId=e.data.id,this.selectedJackpot=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId)),this.showJackpotsList=!1,this.showJackpotDetails=!0;break;case"UpdateChallengeProgress":this.updateChallengeProgress(e.data.data);break;case"ChallengeChangeStatusNotification":{const{IsEnabled:t,ChallengeId:i}=e.data.data;this.pausedChallengeIds=t||this.pausedChallengeIds.includes(i)?this.pausedChallengeIds.filter((e=>e!==i)):[...this.pausedChallengeIds,i];break}case"ShowChallengeRewardModal":{const{ChallengeId:e,LevelId:t,HasError:i,ProcessedRewards:s}=n.data,o={modalType:(null==s?void 0:s.length)?"REWARD_MODAL":"SUPPORT_MODAL",rewardMessage:this.getRewardMessage(e,t),hasError:i};this.openModal.emit(o);break}case"ShowConfirmationModal":this.openModal.emit({modalType:"TARGET_MODAL",confirmationData:n});break;case"ChallengeJoinRequest":this.isJoiningToChallenge=!0;break;case"JoinChallengeResult":{const{Success:t,JoinId:i,UnjoinId:n}=e.data.data;t&&(i&&this.updateChallengeStatus(i,1,!0),n&&this.updateChallengeStatus(n,0,!1),this.challenges=[...this.challenges]),this.isJoiningToChallenge=!1,this.closeModal.emit("TARGET_MODAL"),this.setChallengePercent();break}case"ShowJackpotRewardModal":{const{Amount:t,Currency:i}=e.data.data;this.openModal.emit({modalType:"JACKPOT_REWARD_MODAL",winAmount:{amount:t,currency:i}});break}case"UpdateJackpotBalance":this.updateJackpotBalance(e.data.data);break;case"UpdateJackpotStatus":const t=e.data.data;this.jackpots=this.jackpots.map((e=>String(e.JackpotId)===String(t.JackpotId)?Object.assign(Object.assign({},e),{IsClosed:t.IsClosed,JackpotEndTime:e.JackpotEndTime}):e));break;case"JoinJackpotResult":const i=e.data.data,s=Object.keys(i.JackpotIds);i.Success&&s.length>0&&(this.jackpots=this.jackpots.map((e=>{const t=s.find((t=>String(t)===String(e.JackpotId)));return t?Object.assign(Object.assign({},e),{Enabled:i.JackpotIds[t]}):e})))}}componentDidLoad(){this.orientation=D(),this.device=function(){const e=navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("android")?"Mobile":e.includes("ipad")?"Tablet":"Desktop"}(),window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),this.barHeight=this.barWrapperEl.offsetHeight}disconnectedCallback(){window.screen.orientation.removeEventListener("change",this.orientationChangeHandler)}async init(e){var t;this.challenges=e.challenges,this.inProgressChallenges=null===(t=e.challenges)||void 0===t?void 0:t.filter((e=>e.Status===y.InProgress||e.Status===y.PendingLevelReward)).map((e=>e.Id)),this.leaderboards=e.leaderboards||[],this.jackpots=e.jackpots||[],this.freeSpins=e.freeSpins||{},this.gameSlug=e.slug,this.setChallengePercent(),this.setChallengeLabel()}setChallengeLabel(){this.challenges&&(this.isChallengeLabel=!!this.challenges.filter((e=>e.IsNew)).length)}setChallengePercent(){if(!this.challenges)return;const e=this.challenges.find((e=>e.Status===y.InProgress));if(e){const t=e.LevelProgresses.find((e=>e.ProgressStatus===F.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===F.Fillup||e.ProgressStatus===F.Completed)).slice(-1)[0];this.challengePercent=t?`${t.ProgressPercentage}%`:i?`${i.ProgressPercentage}%`:"0%"}else this.challengePercent="—"}updateChallengeProgress(e){var t;const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.ChallengeId===e.ChallengeId));if(i&&(i.LevelProgresses=i.LevelProgresses.map((t=>{var i;const n=null===(i=e.Levels)||void 0===i?void 0:i.find((e=>e.LevelId===t.LevelId));return n?Object.assign(Object.assign({},t),{ProgressPercentage:n.ProgressPercentage,ProgressStatus:n.ProgressStatus}):t})),this.challenges=[...this.challenges]),this.showChallengeDetails){const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));e&&(this.selectedChallenge=Object.assign({},e))}this.setChallengePercent()}updateChallengeStatus(e,t,i){var n;const s=null===(n=this.challenges)||void 0===n?void 0:n.find((t=>t.Id===e));s&&(s.Status=t,this.inProgressChallenges=i?[...this.inProgressChallenges,s.Id]:this.inProgressChallenges.filter((e=>e!==s.Id)))}updateJackpotBalance(e){if(this.jackpots=this.jackpots.map((t=>{const i=e.find((e=>e.JackpotId===t.JackpotId));return i?Object.assign(Object.assign({},t),{Balance:i.Balance,WinBalance:i.WinBalance}):t})),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}getChallengesWidgets(){return t("div",null,t("div",{class:this.showChallengesList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-challenges-list",{device:this.device,class:"CasinoEngagementSuiteDialog",onResetNewChallengeLabel:this.handleResetNewChallengeLabel,onClose:this.handlePopupClose("showChallengesList","showChallengeDetails"),challenges:this.challenges,inProgressChallenges:this.inProgressChallenges,isJoiningToChallenge:this.isJoiningToChallenge,pausedChallengeIds:this.pausedChallengeIds})),t("div",{class:this.showChallengeDetails?"Backdrop Opened":"Backdrop"},this.showChallengeDetails&&t("casino-engagement-suite-challenges-details",{device:this.device,class:"CasinoEngagementSuiteDialog",onResetNewChallengeLabel:this.handleResetNewChallengeLabel,onBack:this.handleChallengePopupBack,onClose:this.handlePopupClose("showChallengesList","showChallengeDetails"),"game-slug":this.gameSlug,challenge:this.selectedChallenge,inProgressChallenges:this.inProgressChallenges,isJoiningToChallenge:this.isJoiningToChallenge,pausedChallengeIds:this.pausedChallengeIds})))}getLeaderboardsWidgets(){return t("div",{class:this.showLeaderboardWidget?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-tournament",{class:"CasinoEngagementSuiteDialog",leaderboardsInit:this.leaderboards,onClose:this.onLeaderboardsClose}))}getFreeSpinWidgets(){return t("div",null,t("div",{class:this.showFreeSpinsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-free-spins-list",{device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),freeSpins:this.freeSpins.VendorFreeSpins})),t("div",{class:this.showFreeSpinsDetails?"Backdrop Opened":"Backdrop"},this.showFreeSpinsDetails&&t("casino-engagement-suite-free-spins-details",{device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleChallengePopupBack,onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),"game-slug":this.gameSlug,spin:this.selectedSpin})))}getJackpotsWidgets(){return t("div",null,t("div",{class:this.showJackpotsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-jackpots-list",{device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handleJackpotsPopupClose,jackpots:this.jackpots})),this.showJackpotDetails&&t("div",{class:"Backdrop Opened"},t("casino-engagement-suite-jackpot-details",{device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleJackpotPopupBack,onClose:this.handleJackpotsPopupClose,"game-slug":this.gameSlug,jackpot:this.selectedJackpot})))}getRewardMessage(e,t){var i,n,s,o;return(null===(o=null===(s=null===(n=null===(i=this.challenges)||void 0===i?void 0:i.find((t=>t.Id===e)))||void 0===n?void 0:n.LevelProgresses)||void 0===s?void 0:s.find((e=>e.LevelId===t)))||void 0===o?void 0:o.CustomRewardMessage)||""}render(){return t("div",{class:`CasinoEngagementSuiteContainer ${this.device} ${this.orientation}`,style:{"--barHeight":`${this.barHeight}px`}},t("div",{class:"barWrapper",ref:e=>this.barWrapperEl=e},t("casino-engagement-suite-bar",{orientation:this.orientation,device:this.device,"active-widget":this.activeWidget,"is-challenge-label":this.isChallengeLabel,jackpots:this.jackpots,freeSpins:this.freeSpins,"challenge-percent":this.challengePercent})),this.challenges&&this.getChallengesWidgets(),this.freeSpins&&this.getFreeSpinWidgets(),!!this.jackpots.length&&this.getJackpotsWidgets(),this.leaderboards&&this.getLeaderboardsWidgets(),t("casino-engagement-suite-modal-container",{device:this.device,isJoiningToChallenge:this.isJoiningToChallenge}))}get host(){return n(this)}};E.style=":host{display:inline-block;font-family:inherit}.Backdrop{padding:20px 20px 20px 172px;display:none;position:fixed;inset:0;height:100dvh;width:100vw}.Backdrop.Opened{display:block}.Backdrop .CasinoEngagementSuiteDialog{height:calc(100dvh - 40px);max-width:600px}.CasinoEngagementSuiteContainer.Portrait{width:100vw}.CasinoEngagementSuiteContainer.Portrait .Backdrop{padding:calc(var(--barHeight) + 12px) 0 20px}.CasinoEngagementSuiteContainer.Portrait .Backdrop .CasinoEngagementSuiteDialog{max-width:initial;padding:0 4px;margin:0 auto;height:calc(100dvh - (var(--barHeight) + 20px))}.CasinoEngagementSuiteContainer.Landscape.Mobile .CasinoEngagementSuiteDialog{max-width:366px}.CasinoEngagementSuiteContainer.Landscape.Desktop .Backdrop{padding-left:272px}";const M=["en"],I={en:{freeSpins:"Free Spins",details:"Free Spins Details",tc:"Terms & Conditions",quantityGranted:"Quantity Granted",quantityLeft:"Quantity Left",valueGranted:"Value Granted",valueLeft:"Value Left",info:"Info",games:"Games",loadMore:"Load More"}},z=(e,t)=>{const i=t;return I[void 0!==i&&M.includes(i)?i:"en"][e]},j=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.activeTab=1,this.visibleGames=[],this.maxVisibleGames=0,this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),this.visibleGames=[],this.maxVisibleGames=0},this.handleLoadMore=()=>{this.visibleGames=this.spin.GamesInfo.slice(0,this.visibleGames.length+this.maxVisibleGames)},this.toggleShowDetails=()=>{this.showDetails=!this.showDetails},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})},this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()}}componentWillLoad(){this.startCountdown()}componentDidRender(){if(!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2===this.activeTab&&!this.maxVisibleGames){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,this.visibleGames=this.spin.GamesInfo.slice(0,this.maxVisibleGames)}}disconnectedCallback(){clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}getActionsTemplate(){return t("header",{class:"FreeSpinsActions"},t("button",{class:"FreeSpinsIconButton",onClick:this.handleBackClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),"Mobile"!==this.device&&t("div",{class:"FreeSpinsPopupName"},z("freeSpins",this.language)),t("button",{class:"FreeSpinsIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getFreeSpinsHeader(){const{VendorName:e,NumberOfFreeSpins:i,NumberOfUsedFreeSpins:n}=this.spin;return t("div",{class:"FreeSpinsDetailsHeader"},t("span",{class:"FreeSpinsName"},e),t("div",{class:"FreeSpinsCounter"},t("div",{class:"FreeSpinsHighlightedCounter"},n),"/",i))}getFreeSpinsCountdown(){const e=this.isExpiredChallenge?"Expired":this.timer,{VendorFreeSpinsCost:i,VendorFreeSpinsRemainingCost:n,CurrencySymbol:s}=this.spin;return t("div",{class:"FreeSpinsCountdown "+(this.isExpiredChallenge?"Expired":"")},e,t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},s,n),"/",s,i))}getTabsTemplate(){return t("div",{class:"FreeSpinsDetailsTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"FreeSpinsDetailsTab "+(1===this.activeTab?"Active":"")},z("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"FreeSpinsDetailsTab "+(2===this.activeTab?"Active":"")},z("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getSpinInfoTemplate():this.getGamesTemplate()}getSpinsDetailsTemplate(){return t("div",null,t("div",{class:"FreeSpinsDetailsButton",onClick:this.toggleShowDetails},t("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,z("details",this.language))),this.showDetails&&t("p",{class:"FreeSpinsDescription"},this.spin.FreeSpinCampaignPresentation.Description))}getSpinInfoTemplate(){const{NumberOfFreeSpins:e,NumberOfUsedFreeSpins:i,VendorFreeSpinsCost:n,CurrencySymbol:s,VendorFreeSpinsRemainingCost:o}=this.spin;return t("div",null,this.spin.FreeSpinCampaignPresentation.Description&&this.getSpinsDetailsTemplate(),t("div",{class:"FreeSpinsInfo"},t("div",{class:"FreeSpinsInfoItem"},z("quantityGranted",this.language),": ",t("span",null,e)),t("div",{class:"FreeSpinsInfoItem"},z("quantityLeft",this.language),": ",t("span",null,i)),t("div",{class:"FreeSpinsInfoItem"},z("valueGranted",this.language),": ",t("span",null,s,n)),t("div",{class:"FreeSpinsInfoItem"},z("valueGranted",this.language),": ",t("span",null,s,o)),this.spin.FreeSpinCampaignPresentation.Url&&t("div",{class:"FreeSpinsInfoItem"},t("a",{class:"tc",href:this.spin.FreeSpinCampaignPresentation.Url,target:"_blank"},z("tc",this.language)))))}getGamesTemplate(){const e=this.visibleGames.map((e=>t("div",{onClick:this.onGameClick,class:"FreeSpinsGamesListItem "+(e.GameSlug===this.gameSlug?"Disabled":""),key:e.CasinoGameId,"data-slug":e.GameSlug,style:{background:`center / cover url(${e.GameIcon}) no-repeat`},title:e.GameName})));return[t("div",{class:"FreeSpinsGamesListWrapper",ref:e=>this.gamesListWrapperEl=e},t("div",{class:"FreeSpinsGamesList"},e)),this.visibleGames.length<this.spin.GamesInfo.length?t("button",{class:"PopupButton Active FreeSpinsGamesButton",onClick:this.handleLoadMore},z("loadMore",this.language)):""]}startCountdown(){this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.spin.ExpiryDate).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:n,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${s}s`:`${t}d:${i}h:${n}m`}render(){return t("div",{class:`FreeSpinsDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{class:"FreeSpinsDetails"},this.getFreeSpinsHeader(),this.getFreeSpinsCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate()))}get host(){return n(this)}};j.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;900&display=swap"); :host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.FreeSpinsDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative}.FreeSpinsDetailsPopup.Disabled .FreeSpinsDetailsHeader{opacity:0.5}.FreeSpinsDetailsPopup.Disabled .FreeSpinsDetailsTabs{cursor:default;pointer-events:none}.FreeSpinsDetailsPopup.Disabled .FreeSpinsInfoItem{color:var(--emw--color-primary, #8F8B9C)}.FreeSpinsDetails{overflow:hidden;height:100%;display:flex;flex-direction:column}.FreeSpinsActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsActions .FreeSpinsIconButton{width:16px;height:16px;cursor:pointer}.FreeSpinsActions .FreeSpinsPopupName{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-small-plus, 16px);font-weight:500;line-height:16px}.FreeSpinsDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.FreeSpinsDetails::-webkit-scrollbar{display:none}.FreeSpinsDetailsHeader{display:flex;justify-content:space-between;gap:12px;min-width:0;align-items:flex-end}.FreeSpinsDetailsHeader .FreeSpinsName{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;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.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:var(--emw--font-size-small, 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}.FreeSpinsGamesLoadMore::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}.FreeSpinsCountdown{display:flex;justify-content:space-between;font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin:12px 0 24px;color:var(--emw--color-gray-150, #BBB9C3)}.FreeSpinsHighlightedCounter{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:var(--emw--font-size-medium, 18px);font-weight:800;margin-right:4px}.FreeSpinsCounter{display:flex;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:700;margin-right:4px}.FreeSpinsCountdown.Expired{font-weight:var(--emw--font-weight-normal, 700);color:var(--emfe-w-color-white, #FFF)}.FreeSpinsDetailsTabs{margin:20px 0 12px;display:flex;position:relative}.FreeSpinsDetailsTabs .FreeSpinsDetailsTab{padding:9px 16px 7px;font-weight:500;font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-background, #666178);border-bottom:2px solid transparent;cursor:pointer}.FreeSpinsDetailsTabs .FreeSpinsDetailsTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.FreeSpinsDetailsTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.FreeSpinsInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.FreeSpinsInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.FreeSpinsInfoItem .tc{color:var(--emw--color-primary, #59D1FF)}.FreeSpinsDetailsButton{margin-bottom:14px;display:flex;flex-direction:row;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-primary-variant, #666178);cursor:pointer}.FreeSpinsDetailsButton .Toggle{width:16px;height:16px;display:block;margin-right:4px}.FreeSpinsDetailsButton .Closed{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg") no-repeat center/contain}.FreeSpinsDetailsButton .Open{background:url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg") no-repeat center/contain}.FreeSpinsDescription{margin-bottom:20px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.FreeSpinsGamesListWrapper{overflow:auto;flex-grow:1}.FreeSpinsGamesList{display:flex;gap:10px;flex-wrap:wrap}.FreeSpinsGamesList .FreeSpinsGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.FreeSpinsGamesList .FreeSpinsGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ShowDetails{display:block}.FreeSpinsGamesButton{margin-top:12px;align-self:center;min-width:140px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsActions,.FreeSpinsDetailsPopup.Desktop .FreeSpinsActions{padding-top:16px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsIconButton,.FreeSpinsDetailsPopup.Desktop .FreeSpinsIconButton{width:24px;height:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsDetails,.FreeSpinsDetailsPopup.Desktop .FreeSpinsDetails{padding:20px 24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsName,.FreeSpinsDetailsPopup.Desktop .FreeSpinsName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.FreeSpinsDetailsPopup.Tablet .FreeSpinsCountdown,.FreeSpinsDetailsPopup.Desktop .FreeSpinsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsCollapseButton,.FreeSpinsDetailsPopup.Desktop .FreeSpinsCollapseButton{margin-bottom:12px}.FreeSpinsDetailsPopup.Tablet .PopupButton,.FreeSpinsDetailsPopup.Desktop .PopupButton{min-height:36px;font-size:var(--emw--font-size-small-plus, 16px)}';const A=["en"],R={en:{freeSpins:"Free Spins",tooltip:"Spin the game reels without using your own money",noSpins:"No FreeSpins yet\n",tryOtherGames:"Try winning FreeSpins as rewards or playing other booster games",new:"new"}},O=(e,t)=>{const i=t;return R[void 0!==i&&A.includes(i)?i:"en"][e]},H=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.freeSpins=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newSpinIds=[],this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1,this.newSpinIds=[]},this.handleSpinClick=e=>{const t=e.currentTarget.getAttribute("data-id");window.postMessage({type:"FreeSpinClick",id:t}),this.newSpinIds=this.newSpinIds.filter((e=>e!==t))},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1}}spinsPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.spinsPropHandler(this.freeSpins)}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.freeSpins.reduce(((t,i)=>{const n=new Date(i.ExpiryDate).getTime()-e;let s="00h:00m:00s";if(n<1)this.removeFreeSpin(i.Id);else{const{days:e,hours:t,minutes:i,seconds:o}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};s="00"===e?`${t}h:${i}m:${o}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:s})}),{})}removeFreeSpin(e){const t=this.freeSpins.findIndex((t=>t.Id===e));t>-1&&(this.freeSpins.splice(t,1),window.postMessage({type:"FreeSpinHasExpired",id:e}))}getFreeSpinClasses(){return{FreeSpinsCard:!0}}getChallengeHeaderTemplate(e){const{VendorName:i,NumberOfUsedFreeSpins:n,NumberOfFreeSpins:s}=e;return t("div",{class:"FreeSpinsCardHeader"},t("div",{class:"FreeSpinsName"},i),t("div",{class:"FreeSpinsCounter"},t("div",{class:"FreeSpinsHighlightedCounter"},n)," /",s))}getFreeSpinTemplate(e){const i=this.timers[e.Id],{VendorFreeSpinsRemainingCost:n,VendorFreeSpinsCost:s,CurrencySymbol:o}=e,a=this.newSpinIds.includes(e.Id);return t("div",{class:this.getFreeSpinClasses(),onClick:this.handleSpinClick,key:e.Id,"data-id":e.Id},t("div",{class:"SpinLabel "+(a?"ShowSpinLabel":"")},t("span",null,O("new",this.language))),this.getChallengeHeaderTemplate(e),t("div",{class:"FreeSpinsCountdownWrapper"},t("span",{class:"FreeSpinsCountdown"},i),";",t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},o,n),"/",o,s)))}getHeaderTemplate(){return t("header",{class:"FreeSpinsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"FreeSpinsIconButton"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),t("div",{class:"FreeSpinsListPopupHeaderName"},O("freeSpins",this.language)),t("button",{class:"FreeSpinsIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close challenges list"})))}getListTemplate(){return this.freeSpins.length?t("div",{class:"FreeSpinsListWrapper"},t("div",{class:"FreeSpinsList"},this.freeSpins.map((e=>this.getFreeSpinTemplate(e))))):t("div",{class:"FreeSpinsListEmpty"},t("h2",null,O("noSpins",this.language)),t("p",null,O("tryOtherGames",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"FreeSpinsTooltipBackdrop"},t("div",{class:"FreeSpinsTooltip"},t("button",{class:"FreeSpinsIconButton",onClick:this.hideTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),O("tooltip",this.language))):""}render(){return t("div",{class:`FreeSpinsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{freeSpins:["spinsPropHandler"]}}};H.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.FreeSpinsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:8px;overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.FreeSpinsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsIconButton{width:16px;height:16px;cursor:pointer}.FreeSpinsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.FreeSpinsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.FreeSpinsListWrapper::-webkit-scrollbar{display:none}.FreeSpinsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.FreeSpinsRowWrapper{display:flex;justify-content:space-between;min-width:0}.FreeSpinsCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:6px;position:relative;cursor:pointer}.FreeSpinsCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px;flex:1;min-width:0;align-items:flex-end}.FreeSpinsName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.FreeSpinsCounter{display:flex;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsHighlightedCounter{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:var(--emw--font-size-medium, 18px);font-weight:800;margin-right:4px}.FreeSpinsListEmpty{padding:20px 32px}.FreeSpinsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:600;font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #FFFFFF)}.FreeSpinsListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3)}.FreeSpinsCountdownWrapper{display:flex;justify-content:space-between;align-items:flex-start}.FreeSpinsCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-gray-100, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:700;margin-right:4px}.SpinLabel{min-width:35px;height:18px;background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);border-radius:2px;display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.SpinLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-x-small, 10px);line-height:10px;font-weight:700;font-family:"Montserrat", sans-serif;color:var(--emw--color-typography, #1E1638)}.ShowSpinLabel{display:inline-flex}.FreeSpinsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.FreeSpinsTooltipBackdrop .FreeSpinsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.FreeSpinsTooltipBackdrop .FreeSpinsTooltip .FreeSpinsIconButton{top:12px;right:6px;position:absolute}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeader,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeader{padding-top:16px}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeaderName,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeaderName{font-size:var(--emw--font-size-small-plus, 16px);line-height:16px}.FreeSpinsListPopup.Tablet .FreeSpinsIconButton,.FreeSpinsListPopup.Desktop .FreeSpinsIconButton{width:24px;height:24px}.FreeSpinsListPopup.Tablet .FreeSpinsList,.FreeSpinsListPopup.Desktop .FreeSpinsList{padding:20px 24px 0;row-gap:20px}.FreeSpinsListPopup.Tablet .ChallengeCardHeader,.FreeSpinsListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.FreeSpinsListPopup.Tablet .FreeSpinsName,.FreeSpinsListPopup.Desktop .FreeSpinsName{line-height:27px;font-size:var(--emw--font-size-large, 22px)}.FreeSpinsListPopup.Tablet .FreeSpinsCountdown,.FreeSpinsListPopup.Desktop .FreeSpinsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.FreeSpinsListPopup.Tablet .FreeSpinsTooltip,.FreeSpinsListPopup.Desktop .FreeSpinsTooltip{padding:60px 65px;font-size:var(--emw--font-size-small-plus, 16px);line-height:20px}.FreeSpinsListPopup.Tablet .FreeSpinsTooltip .FreeSpinsIconButton,.FreeSpinsListPopup.Desktop .FreeSpinsTooltip .FreeSpinsIconButton{top:24px;right:24px}';const W=["en"],$={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"}},G=(e,t)=>{const i=t;return $[void 0!==i&&W.includes(i)?i:"en"][e]};function _(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}const N=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(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=e=>{this.activeTab=+e.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=e=>{e.stopPropagation(),window.postMessage({type:"JackpotChangeStatusRequest",data:{[this.jackpot.JackpotId]:!this.jackpot.Enabled}}),this.loading=!0},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()},this.onGameClick=e=>{const t=e.currentTarget.getAttribute("data-slug");t&&window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:t}})}}handleEvent(e){const{type:t,data:i}=null==e?void 0:e.data;switch(t){case"UpdateJackpotStatus":this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":{const e=i;e.Success&&this.jackpot.JackpotId in e.JackpotIds&&(this.enabled=this.jackpot.Enabled=e.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 e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,this.visibleGames=this.jackpot.GamesInfo.slice(0,this.maxVisibleGames)}updateJackpotStatus(e){e.IsClosed?(this.clearInterval(),this.disabledStatus=e.Reason,this.activeTab=1):(this.disabledStatus="",this.jackpot.JackpotEndTime=e.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return t("div",{class:"JackpotDetailsNavigation"},t("button",{class:"JackpotIconButton",onClick:this.handleBackClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg",alt:"back"})),t("div",{class:"JackpotPopupName"},G("jackpots",this.language)),t("button",{class:"JackpotIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"close"})))}getJackpotBalance(){return _(this.winBalance||this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{PopupButton:!0,Active:this.enabled,Loading:this.loading}}getJackpotDetailsHeaderTemplate(){return t("div",{class:"JackpotDetailsHeader"},t("div",null,t("div",{class:"JackpotType"},this.jackpot.Type),t("div",{class:"JackpotBalance"},this.getJackpotBalance())),t("div",{class:"JackpotDetailsHeaderSecondCol"},t("button",{disabled:!!this.disabledStatus,onClick:this.changeJackpotStatus,class:this.getJoinButtonClasses()},G(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&t("div",{class:"JackpotIsWon"},G("jackpotIsWon",this.language))))}getTabsTemplate(){return t("div",{class:"JackpotDetailsTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(1===this.activeTab?"Active":"")},G("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"JackpotDetailsTab "+(2===this.activeTab?"Active":"")},G("games",this.language)))}getTabsContentTemplate(){return 1===this.activeTab?this.getJackpotInfoTemplate():this.getGamesTemplate()}getJackpotDetailsTemplate(){return t("div",null,t("div",{class:"JackpotDetailsButton",onClick:this.toggleShowDetails},t("div",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,G("jackpotDetails",this.language))),this.showDetails&&t("p",{class:"JackpotDescription"},this.jackpot.Description))}getBetLimitsRange(){var e,i,n,s;if(this.jackpot.BetLimits){const o=this.jackpot.Currency,a=Object.keys(this.jackpot.BetLimits),r=a.find((e=>e===o))||a[0],l=this.jackpot.BetLimits&&(null===(e=this.jackpot.BetLimits[r])||void 0===e?void 0:e.MinBet),p=this.jackpot.BetLimits&&(null===(i=this.jackpot.BetLimits[r])||void 0===i?void 0:i.MaxBet),c=_(null===(n=this.jackpot.BetLimits[r])||void 0===n?void 0:n.MinBet,r),h=_(null===(s=this.jackpot.BetLimits[r])||void 0===s?void 0:s.MaxBet,r);return t("div",null,l&&t("div",{class:"JackpotInfoItem"},G("minBet",this.language),": ",t("span",null,c)),p&&t("div",{class:"JackpotInfoItem"},G("maxBet",this.language),": ",t("span",null,h)))}}getJackpotInfoTemplate(){return t("div",{class:"JackpotInfoTabContent"},this.jackpot.Description&&this.getJackpotDetailsTemplate(),t("div",{class:"JackpotInfo"},t("div",{class:"JackpotInfoItem"},G("operatorContribution",this.language),": ",t("span",null,this.jackpot.OperatorContributionPercent,"%")),t("div",{class:"JackpotInfoItem"},G("type",this.language),": ",t("span",null,this.jackpot.JackpotTypePresentation)),t("div",{class:"JackpotInfoItem"},G("winningProbability",this.language),": ",t("span",null,"1:",this.jackpot.Probability)),this.getBetLimitsRange(),this.jackpot.JackpotRulesUrl&&t("div",{class:"JackpotInfoItem"},t("a",{class:"tc",href:this.jackpot.JackpotRulesUrl,target:"_blank"},G("tc",this.jackpot.JackpotRulesUrl)))))}getGamesTemplate(){const e=this.visibleGames.map((e=>t("div",{onClick:this.onGameClick,class:"JackpotGamesListItem "+(e.GameSlug===this.gameSlug?"Disabled":""),key:e.CasinoGameId,"data-slug":e.GameSlug,style:{background:`center / cover url(${e.GameIcon}) no-repeat`},title:e.GameName})));return[t("div",{class:"JackpotGamesListWrapper",ref:e=>this.gamesListWrapperEl=e},t("div",{class:"JackpotGamesList"},e)),this.visibleGames.length<this.jackpot.GamesInfo.length?t("button",{class:"PopupButton Active JackpotGamesButton",onClick:this.handleLoadMore},G("loadMore",this.language)):""]}getJackpotCountdown(){return t("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},this.disabledStatus||this.timer)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.jackpot.JackpotEndTime).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:n,seconds:s}={days:String(Math.floor(e/864e5)).padStart(2,"0"),hours:String(Math.floor(e%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(e%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(e%6e4/1e3)).padStart(2,"0")};this.timer="00"===t?`${i}h:${n}m:${s}s`:`${t}d:${i}h:${n}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 t("div",{class:this.getPopupClasses()},this.getTopNavigationTemplate(),t("div",{class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate()))}get host(){return n(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};function U(e,t){J(2,arguments);var i=B(e),n=B(t);return i.getTime()<n.getTime()}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}';const q=["en"],V={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",tooltip:"A payout that increases each time the game is played but the jackpot is not won",mega:"Mega",major:"Major",minor:"Minor",suspended:"Suspended Jackpot",allJackpotsSuspended:"Unfortunately, there are no available jackpots to join. Please, try again later.",jackpotIsWon:"Jackpot is Won",termsAndConditions:"Terms and Conditions",winningProbability:"Winning Probability",type:"Type",operatorContribution:"Operator Contribution",outdatedJackpotCountdown:"We are going to remove this Jackpot in 30 days"}},Q=(e,t)=>{const i=t;return V[void 0!==i&&q.includes(i)?i:"en"][e]},Y=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.buttonsLoadingStates={},this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=!1},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.changeJackpotStatus=e=>{e.stopPropagation();const t=+e.currentTarget.getAttribute("data-id"),i=e.currentTarget.hasAttribute("data-joined");window.postMessage({type:"JackpotChangeStatusRequest",data:{[t]:!i}}),this.buttonsLoadingStates=Object.assign(Object.assign({},this.buttonsLoadingStates),{[t]:!0})},this.handleJackpotClick=e=>{const t=+e.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:t})}}jackpotsPropHandler(e){!this.interval&&e.length&&this.startCountdown(),this.interval&&!e.length&&clearInterval(this.interval)}handleEvent(e){const{type:t,data:i}=e.data;if("JoinJackpotResult"===t){const e=Object.keys(i.JackpotIds);this.buttonsLoadingStates=Object.fromEntries(Object.entries(this.buttonsLoadingStates).filter((([t])=>!e.includes(t))))}}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.jackpots.reduce(((t,i)=>{const n=new Date(i.JackpotEndTime).getTime()-e;let s="00h:00m:00s";const{days:o,hours:a,minutes:r,seconds:l}={days:String(Math.floor(n/864e5)).padStart(2,"0"),hours:String(Math.floor(n%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(n%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(n%6e4/1e3)).padStart(2,"0")};return s="00"===o?`${a}h:${r}m:${l}s`:`${o}d:${a}h:${r}m`,Object.assign(Object.assign({},t),{[i.JackpotId]:s})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(e){return{JackpotCard:!0,JackpotCardSuspended:e.IsClosed,InProgress:e.Enabled&&!e.IsClosed}}getJackpotHeaderTemplate(e){const i=!!e.WinBalance,n=i?e.WinBalance:e.Balance,s=Q(e.Type,this.language),o=Q("suspended",this.language),a=(null==e?void 0:e.IsClosed)?o:s,r=`JackpotBalance Jackpot${Q(e.Type,this.language)}`,l=e.Enabled&&!(null==e?void 0:e.IsClosed)?"JackpotJoinButton Joined":"JackpotJoinButton",p=Q(e.Enabled&&!(null==e?void 0:e.IsClosed)?"unjoin":"join",this.language),c=!!this.buttonsLoadingStates[e.JackpotId]||(null==e?void 0:e.IsClosed)||U(new Date(e.JackpotEndTime),new Date);return t("div",{class:"JackpotCardHeader"},t("div",{class:"JackpotTitle"},t("span",{class:"JackpotName"},a),t("span",{class:r},function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(n,e.Currency))),i?t("span",{class:"JackpotWon"},Q("jackpotIsWon",this.language)):t("button",{class:l,onClick:this.changeJackpotStatus,"data-id":e.JackpotId,"data-joined":e.Enabled,disabled:c},p))}getJackpotDescriptionTemplate(e){const i=e.OperatorContributionPercent?e.OperatorContributionPercent+"%":"",n=e.Probability?`1:${e.Probability}`:"",s=U(new Date(e.JackpotEndTime),new Date)?Q("outdatedJackpotCountdown",this.language):this.timers[e.JackpotId],o=Q("operatorContribution",this.language),a=Q("type",this.language),r=Q("winningProbability",this.language);return t("div",{class:"JackpotCardDescription"},t("span",{class:"JackpotCountdown"},s),t("div",{class:"JackpotCardDescriptionBlock"},t("div",{class:"JackpotCardDescriptionColumn"},i&&this.renderDesciptionRowInfo(`${o}:`,i),this.renderDesciptionRowInfo(`${a}:`,e.JackpotTypePresentation)),t("div",{class:"JackpotCardDescriptionColumn"},n&&this.renderDesciptionRowInfo(`${r}:`,n),t("a",{href:e.JackpotRulesUrl,target:"_blank"},Q("termsAndConditions",this.language)))))}renderDesciptionRowInfo(e,i){return t("div",{class:"JackpotCardDescriptionRow"},t("span",null,e),t("span",{class:"JackpotDescriptionValue"},i))}getJackpotTemplate(e){const i=!(null==e?void 0:e.WinBalance);return t("div",{class:this.getJackpotClasses(e),onClick:this.handleJackpotClick,key:e.JackpotId,"data-id":e.JackpotId},this.getJackpotHeaderTemplate(e),i&&this.getJackpotDescriptionTemplate(e))}getHeaderTemplate(){return t("header",{class:"JackpotsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"JackpotsIconButton"},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg",alt:"Show tooltip"})),t("div",{class:"JackpotsListPopupHeaderName"},Q("jackpots",this.language)),t("button",{class:"JackpotsIconButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close jackpots list"})))}getListTemplate(){const e=this.jackpots.every((e=>e.IsClosed));return this.jackpots.length?t("div",{class:"JackpotsListWrapper"},e&&t("div",{class:"JackpotsListSuspended"},t("h2",null,Q("allJackpotsSuspended",this.language))),t("div",{class:"JackpotsList"},this.jackpots.map((e=>this.getJackpotTemplate(e))))):t("div",{class:"JackpotsListSuspended"},t("h2",null,Q("allJackpotsSuspended",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"JackpotsTooltipBackdrop"},t("div",{class:"JackpotsTooltip"},t("button",{class:"JackpotsIconButton",onClick:this.hideTooltip},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Close tooltip"})),Q("tooltip",this.language))):""}render(){return t("div",{class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return n(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};Y.style='@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap");:host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-medium, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotsIconButton{width:16px;height:16px;cursor:pointer}.JackpotsListPopupHeaderName{color:var(--emw--color-gray-100, #BBB9C3);font-size:14px;font-weight:500;line-height:14px}.JackpotsListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.JackpotsListWrapper::-webkit-scrollbar{display:none}.JackpotsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.JackpotCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-small, 6px);position:relative;cursor:pointer}.JackpotJoinButton:not([disabled]).Joined::before,.JackpotCard.InProgress::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}.JackpotCard.JackpotCardSuspended *{color:var(--emw--color-primary, #8F8B9C)}.JackpotCard.JackpotCardSuspended .JackpotBalance,.JackpotCard.JackpotCardSuspended .JackpotWon{-webkit-text-fill-color:var(--emw--color-primary, #8F8B9C)}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px}.JackpotTitle{display:flex;flex-direction:column;justify-content:space-between}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:"Montserrat", sans-serif;line-height:22px;font-weight:700;font-size:18px;word-break:break-word;margin-bottom:4px}.JackpotMega,.JackpotWon{background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%)}.JackpotMajor{background:linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%)}.JackpotMinor{background:linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%)}.JackpotBalance,.JackpotWon{font-weight:bold;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{display:flex;align-items:center;color:var(--emw--color-primary, #8F8B9C);font-size:12px;line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:600;margin-left:2px}.JackpotCardDescriptionColumn{display:flex;flex-direction:column;row-gap:4px}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px}.JackpotCardDescriptionBlock a{color:var(--emw--color-secondary, #59D1FF);text-underline-offset:3px;font-size:11px}.JackpotJoinButton{transition:all 0.5s ease-out;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;height:32px;font-size:14px;font-weight:700;position:relative;font-family:"Montserrat", sans-serif}.JackpotJoinButton.Joined{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}.JackpotJoinButton.Joined:not([disabled])::before{border-radius:99px}.JackpotJoinButton[disabled]{opacity:0.5;pointer-events:none;cursor:auto}.JackpotsListSuspended{padding:20px 19px}.JackpotsListSuspended h2{font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);font-weight:400}.JackpotCountdown{color:var(--emw--color-gray-100, #BBB9C3);font-size:12px;line-height:12px;margin-bottom:12px}.JackpotsTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.JackpotsTooltipBackdrop .JackpotsTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:8px;padding:32px;font-size:14px;line-height:17px;color:var(--emw--color-gray-100, #BBB9C3);position:relative}.JackpotsTooltipBackdrop .JackpotsTooltip .JackpotsIconButton{top:12px;right:6px;position:absolute}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:16px;line-height:16px}.JackpotsListPopup.Tablet .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotsIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotCardHeader,.JackpotsListPopup.Desktop .JackpotCardHeader{margin-bottom:16px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:22px}.JackpotsListPopup.Tablet .JackpotJoinButton,.JackpotsListPopup.Desktop .JackpotJoinButton{min-width:100px;height:36px;font-size:16px}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:14px;line-height:14px}.JackpotsListPopup.Tablet .JackpotTooltip,.JackpotsListPopup.Desktop .JackpotTooltip{padding:60px 65px;font-size:16px;line-height:20px}.JackpotsListPopup.Tablet .JackpotTooltip .JackpotsIconButton,.JackpotsListPopup.Desktop .JackpotTooltip .JackpotsIconButton{top:24px;right:24px}';const K=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1,this.handleCloseClick=()=>{this.isLoading||this.closeModal.emit(this.modalType)},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return t("div",{class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},t("div",{class:"ModalWinAnimation"}),t("div",{class:"ModalContent GradientBorder"},t("div",{class:"IconCloseContainer"},t("button",{class:"IconCloseButton",onClick:this.handleCloseClick},t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Сlose modal"}))),this.contentIcon?t("div",{class:"ModalIcon",style:{background:`url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`}}):null,t("div",{class:"ModalHeader"},t("h1",null,this.header)),t("div",{class:"ModalBodyWrapper"},t("div",{class:"ModalBody"},t("slot",{name:"body"})),t("div",{class:"ModalFooter"},t("slot",{name:"footer"})))))}get host(){return n(this)}};K.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.IconCloseButton img{width:24px;height:24px}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:"Montserrat", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:8px;width:450px;max-width:100%;text-align:center;max-height:90dvh}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 24px);margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:"Inter", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .IconCloseButton img{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const X=["en"],Z={en:{joinHeader:"Choose another challenge?",desc:"Any progress on the current challenge will be kept and you can rejoin the challenge at any time.",joinQuestion:"Would you still like to join another challenge?",joinConfirm:"Yes, join another challenge",joinReject:"No, stay at current challenge",unJoinHeader:"Quit Challenge?",unJoinQuestion:"Would you still like to quit the challenge?",unJoinConfirm:"Yes, I want to quit challenge",unJoinReject:"No, stay at current challenge",join:"Unjoin",unJoin:"Unjoin",continue:"Continue",okContinue:"Ok, continue",won:"You won",supportInfo:"However, some rewards cannot be issued. Please, contact support.",noReward:"Reward cannot be issued",contactSupport:"Please contact support",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!"}},ee=(e,t)=>{const i=t;return Z[void 0!==i&&X.includes(i)?i:"en"][e]},te=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewardMessage="",this.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""},this.handleCloseClick=e=>{const t=e.currentTarget.getAttribute("data-type");this.closeModal.emit(t)},this.handleChallengeAttendance=()=>{window.postMessage({type:"ChallengeJoinRequest",data:this.confirmationData})},this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))},this.isModalOpen=e=>Boolean(this.openModals.find((t=>t===e)))}openModalHandler(e){const{modalType:t,rewardMessage:i,hasError:n,confirmationData:s,winAmount:o}=e.detail;o&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+o.amount,currency:o.currency}:o),this.openModals=[...this.openModals,t],this.rewardMessage=i,this.hasError=n,s&&(this.confirmationData=s)}closeModalHandler(e){this.openModals=this.openModals.filter((t=>t!==e.detail))}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){const{ProgressToActivate:e}=this.confirmationData||{};return t("div",{class:`ModalContainer ${this.device}`},t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",modalType:"REWARD_MODAL","show-animation":!0,device:this.device},t("div",{slot:"body"},t("p",null,ee("won",this.language)," ",t("span",{class:"ModalReward"},this.rewardMessage)),this.hasError&&t("p",{class:"SupportInfo"},ee("supportInfo",this.language))),t("div",{slot:"footer"},t("button",{class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},ee("continue",this.language)))),t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("JACKPOT_REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg","show-animation":!0,modalType:"JACKPOT_REWARD_MODAL",device:this.device},t("div",{slot:"body"},t("div",{class:"JackpotWinText"},ee("jackpotWin",this.language)),t("div",{class:"JackpotWinAmount"},(i=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(i)}`))),t("div",{slot:"footer"},t("button",{class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},ee("continue",this.language)))),t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("TARGET_MODAL"),header:ee(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},t("div",{slot:"body"},t("p",{class:"LeftAlign"},ee("desc",this.language)),t("p",{class:"LeftAlign"},ee(e?"joinQuestion":"unJoinQuestion",this.language))),t("div",{slot:"footer",class:"ManyActions"},t("button",{class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},ee(e?"joinConfirm":"unJoinConfirm",this.language)),t("button",{class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},t("div",{class:"GradientText"},ee(e?"joinReject":"unJoinReject",this.language))))),t("casino-engagement-suite-modal",{isOpen:this.isModalOpen("SUPPORT_MODAL"),header:ee("noReward",this.language),contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",modalType:"SUPPORT_MODAL",device:this.device},t("div",{slot:"body"},t("span",null,ee("contactSupport",this.language))),t("div",{slot:"footer"},t("button",{class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},ee("okContinue",this.language)))));var i}get host(){return n(this)}};te.style=':host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;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:160px;height:36px;font-size:var(--emw--font-size-small-plus, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:"Montserrat", sans-serif;padding:0 16px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;border:2px solid transparent}.GradientText{background-image:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF);word-break:break-word}.JackpotWinText{margin:0;font-weight:var(--emw--font-weight-bold, 600);font-size:16px;line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;box-shadow:-0.41px 0.41px 0px 0px #00000026, -0.41px 0.41px 2px 0px #00000080;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;font-weight:900;font-size:16px;line-height:16px}.SupportInfo{margin-top:20px}.ModalContainer.Mobile .ModalFooterButton,.ModalContainer.Mobile .ModalFooterButtonOutlined{font-size:var(--emw--font-size-small, 14px);min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.ModalContainer.Mobile .JackpotWinText{font-size:14px;line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:14px;line-height:14px}.LeftAlign{text-align:left;line-height:1.2}';const ie=class{constructor(t){e(this,t),this.value=0,this.disabled=!1,this.hidePercent=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.host.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.host.prepend(t)}),1)})).catch((e=>{console.log("Error ",e)}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getProgressBarClasses(){return{ProgressBar:!0,Completed:100===this.value,Disabled:this.disabled,HidePercent:this.hidePercent}}render(){return t("div",{class:this.getProgressBarClasses(),part:"ProgressBar"},t("div",{class:"ProgressBarInfo",part:"ProgressBarInfo"},t("slot",{name:"Title"},t("div",null)),t("slot",{name:"Percent"},t("div",{class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),t("div",{class:"ProgressBarBackground",part:"ProgressBarBackground"},t("div",{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})))}get host(){return n(this)}};var ne,se;ie.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:14px;line-height:14px}.ProgressBarBackground{height:8px;background-color:var(--emw--color-background, #666178);border-radius:4px;position:relative}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:4px;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);transition:width ease-out 0.3s}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:700;font-size:12px;line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{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}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-background, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}",function(e){e.Info="Info",e.Leaderboard="Leaderboard",e.Games="Games"}(ne||(ne={})),function(e){e.Starts="Starts",e.Ends="Ends"}(se||(se={}));const oe=(e,t)=>(Object.keys(t).map((i=>{e=e.replace(`{${i}}`,t[i])})),e),ae=Object.assign(Object.assign(Object.assign({Join:"Join",Unjoin:"Unjoin"},ne),se),{TC:"Terms & Conditions",ScoreCriteria:"Score Criteria",MinimumBetCriteria:"Minimum bet criteria",Place:"place",Prizes:"Rewards",LeaderboardDetails:"Leaderboard Details",UnjoinDialog:{Title:"Quit Leaderboard?",Description:"Any progress on the current Leaderboard won’t be kept and you can not rejoin the Leaderboard any more. <br /><br />Would you still like to quit?",ButtonYes:"Yes, I want to quit leaderboard",ButtonNo:"No, Stay on the leaderboard"},JoinDialog:{Tile:"Congratulations!",Description:"You have unlocked <span>{tournamentName}</span>! <br />Would you like to join?",ButtonYes:"Join",ButtonNo:"Not interested"},NoLeaderboards:"No Leaderboards yet",NoLeaderboardsTip:"Try winning tickets to Leaderboards as rewards or launching other booster games",Leaderboards:"Leaderboards",TipPrize:"You took <span>{place}</span> place and win <span>{prize}</span>",Tip:"Competition where your real money bets contribute towards the leaderboard score calculation to win the leaderboard reward."}),re=(...e)=>{let t=[];return e.map((e=>{switch(typeof e){case"string":t.push(e);break;case"object":Object.keys(e).map((i=>{e[i]&&t.push(i)}))}})),t.join(" ")};var le,pe,ce;!function(e){e.Confirm="Confirm",e.List="List",e.Item="Item"}(le||(le={})),function(e){e.Running="Running",e.Unstarted="Unstarted",e.Closed="Closed",e.Closing="Closing"}(pe||(pe={})),function(e){e.Unjoin="Unjoin",e.Tip="Tip"}(ce||(ce={}));const he=e=>{var{statedClasses:i,innerHTML:n}=e,s=C(e,["statedClasses","innerHTML"]);const{isHollow:o,isPending:a}=i;return t("button",Object.assign({},Object.assign({class:re("GradientRoundedButton","GradientRounded",{Hollow:o||!1,Pending:a||!1})},s)),t("span",null,n))},de=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg"}),ge=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/help.svg"}),ue=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg"}),me=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg"}),be=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/back.svg"}),xe=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/reward.svg"}),fe=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/cup-congras.svg"}),ke=e=>{const{left:i,middle:n,right:s}=e,o={left:i,middle:n,right:s};return t("div",{class:"WrapperBar"},Object.keys(o).map((e=>{return t("div",{class:"WrapperBar"+(i=e,i.split("").map(((e,t)=>0===t?e.toUpperCase():e)).join(""))},o[e]||"");var i})))};function we(e){return e.toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1}).replace(" at",",")}function ve(e,t){return(100*((new Date).getTime()-e.getTime())/(t.getTime()-e.getTime())).toFixed(0)}const Ce=e=>{const t=["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime"],i={};return Object.keys(e).map((n=>{const s=e[n];switch(n){case"games":i[n]=s.items;break;default:i[n]=t.includes(n)?new Date(s):s}})),i};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,function(e){e.exports=function(){function e(){}function t(e){return e()}function i(){return Object.create(null)}function n(e){e.forEach(t)}function s(e){return"function"==typeof e}function o(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function a(e,t,i){e.insertBefore(t,i||null)}function r(e){e.parentNode&&e.parentNode.removeChild(e)}function l(e){const t={};for(const i of e)t[i.name]=i.value;return t}let p;function c(e){p=e}const h=[],d=[];let g=[];const u=[],m=Promise.resolve();let b=!1;function x(e){g.push(e)}const f=new Set;let k=0;function w(){if(0!==k)return;const e=p;do{try{for(;k<h.length;){const e=h[k];k++,c(e),v(e.$$)}}catch(e){throw h.length=0,k=0,e}for(c(null),h.length=0,k=0;d.length;)d.pop()();for(let e=0;e<g.length;e+=1){const t=g[e];f.has(t)||(f.add(t),t())}g.length=0}while(h.length);for(;u.length;)u.pop()();b=!1,f.clear(),c(e)}function v(e){if(null!==e.fragment){e.update(),n(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(x)}}const C=new Set;function F(e,t){-1===e.$$.dirty[0]&&(h.push(e),b||(b=!0,m.then(w)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function y(o,a,l,h,d,g,u,m=[-1]){const b=p;c(o);const f=o.$$={fragment:null,ctx:[],props:g,update:e,not_equal:d,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(b?b.$$.context:[])),callbacks:i(),dirty:m,skip_bound:!1,root:a.target||b.$$.root};u&&u(f.root);let k=!1;if(f.ctx=l?l(o,a.props||{},((e,t,...i)=>{const n=i.length?i[0]:t;return f.ctx&&d(f.ctx[e],f.ctx[e]=n)&&(!f.skip_bound&&f.bound[e]&&f.bound[e](n),k&&F(o,e)),t})):[],f.update(),k=!0,n(f.before_update),f.fragment=!!h&&h(f.ctx),a.target){if(a.hydrate){const e=function(e){return Array.from(e.childNodes)}(a.target);f.fragment&&f.fragment.l(e),e.forEach(r)}else f.fragment&&f.fragment.c();a.intro&&(v=o.$$.fragment)&&v.i&&(C.delete(v),v.i(undefined)),function(e,i,o,a){const{fragment:r,after_update:l}=e.$$;r&&r.m(i,o),a||x((()=>{const i=e.$$.on_mount.map(t).filter(s);e.$$.on_destroy?e.$$.on_destroy.push(...i):n(i),e.$$.on_mount=[]})),l.forEach(x)}(o,a.target,a.anchor,a.customElement),w()}var v;c(b)}let D;function S(t){let i;return{c(){i=document.createElement("div"),i.innerHTML='<section class="LoaderContainer" part="LoaderContainer"><div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div></section>',this.c=e},m(e,n){a(e,i,n),t[3](i)},p:e,i:e,o:e,d(e){e&&r(i),t[3](null)}}}function J(e,t,i){let n,{clientstyling:s=""}=t,{clientstylingurl:o=""}=t;return e.$$set=e=>{"clientstyling"in e&&i(1,s=e.clientstyling),"clientstylingurl"in e&&i(2,o=e.clientstylingurl)},e.$$.update=()=>{3&e.$$.dirty&&s&&n&&(()=>{let e=document.createElement("style");e.innerHTML=s,n.appendChild(e)})(),5&e.$$.dirty&&o&&n&&(()=>{let e=new URL(o),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{n.appendChild(t)}),1),setTimeout((()=>{}),500)}))})()},[n,s,o,function(e){d[e?"unshift":"push"]((()=>{n=e,i(0,n)}))}]}"function"==typeof HTMLElement&&(D=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:e}=this.$$;this.$$.on_disconnect=e.map(t).filter(s);for(const e in this.$$.slotted)this.appendChild(this.$$.slotted[e])}attributeChangedCallback(e,t,i){this[e]=i}disconnectedCallback(){n(this.$$.on_disconnect)}$destroy(){(function(e,t){const i=e.$$;null!==i.fragment&&(function(e){const t=[],i=[];g.forEach((n=>-1===e.indexOf(n)?t.push(n):i.push(n))),i.forEach((e=>e())),g=t}(i.after_update),n(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])})(this,1),this.$destroy=e}$on(t,i){if(!s(i))return e;const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(i),()=>{const e=n.indexOf(i);-1!==e&&n.splice(e,1)}}$set(e){this.$$set&&0!==Object.keys(e).length&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}});class B extends D{constructor(e){super();const t=document.createElement("style");t.textContent=".LoaderContainer{display:flex;justify-content:center}.lds-ellipsis{display:inline-block;position:relative;width:80px;height:80px}.lds-ellipsis div{position:absolute;top:33px;width:13px;height:13px;border-radius:50%;background:#d1d1d1;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:8px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:8px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:32px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:56px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(24px, 0)}}",this.shadowRoot.appendChild(t),y(this,{target:this.shadowRoot,props:l(this.attributes),customElement:!0},J,S,o,{clientstyling:1,clientstylingurl:2},null),e&&(e.target&&a(e.target,this,e.anchor),e.props&&(this.$set(e.props),w()))}static get observedAttributes(){return["clientstyling","clientstylingurl"]}get clientstyling(){return this.$$.ctx[1]}set clientstyling(e){this.$$set({clientstyling:e}),w()}get clientstylingurl(){return this.$$.ctx[2]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),w()}}return!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",B),B}()}({path:undefined,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}});const Fe=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.tab=ne.Info,this.locale=ae,this.tournamentItem=void 0,this.tournamentList=void 0,this.leaderboards=[],this.isActionJoinPending=!1,this.isDialogOpen=!1,this.isShowInfo=!1,this.page=le.List,this.tournamentInDialog=void 0,this.dialog={isOpen:!1,type:void 0,data:void 0},this.time=0,this.onClickConfirmJoin=()=>{this.actionJoin(this.tournamentItem),this.nextPage=le.List},this.onClickConfirmUnjoin=()=>{this.close.emit()},this.onClickDialogUnjoin=()=>{this.actionJoin(this.dialog.data),this.closeDialog()},this.onClickDialogJoin=()=>{this.closeDialog()},this.onClickBarInLayout=()=>{this.close.emit()},this.onClickBarInLayoutDialog=()=>{this.closeDialog()},this.onClickShowInfo=()=>{this.isShowInfo=!this.isShowInfo},this.onClickBarTip=()=>{this.openDialog(ce.Tip)},this.onClickBarBack=()=>{this.setPage(le.List)}}setTimeInterval(){this.timeHolder=setInterval((()=>{this.tournamentList||this.tournamentItem?this.time+=1:this.time=0}),1e3)}updateTournamentListByItem(e){this.tournamentList=this.tournamentList.map((t=>t.id===e.id?Ce(e):t))}handleEvent(e){const t=e.data,{type:i}=t,n=C(t,["type"]);switch(i){case"ShowLeaderboardRewardModal":{const{tournament:e}=n;this.setPage(le.Confirm,{tournament:Ce(e)}),postMessage({type:"BarLeaderboardsClick"});break}case"UpdateTournamentsItemRes":{const e=Ce(n.data.item);this.tournamentItem=e,this.updateTournamentListByItem(e);break}case"UpdateLeaderboardsRes":this.leaderboards=(e=>{let{item:t,items:i}=e;return t?i.map((e=>t&&t.userID===e.userID?Object.assign(Object.assign({},e),{isMe:!0}):e)):i})(n.data);break;case"JoinTournamentRes":case"UnjoinTournamentRes":const{success:e}=n;if(e)switch(this.tournamentItem=Object.assign(Object.assign({},this.tournamentItem),{playerEnrolled:!this.tournamentItem.playerEnrolled}),this.page){case le.Item:break;case le.List:this.updateTournamentListByItem(this.tournamentItem)}this.nextPage&&(this.setPage(this.nextPage),this.nextPage=void 0),this.isActionJoinPending=!1}}get messageSender(){return{JoinTournamentReq:e=>{var t;return window.postMessage({type:"JoinTournamentReq",bonusCode:null===(t=e.wallets[0])||void 0===t?void 0:t.code})},UnjoinTournamentReq:e=>window.postMessage({type:"UnjoinTournamentReq",id:e.id}),UpdateTournamentsItemReq:e=>window.postMessage({type:"UpdateTournamentsItemReq",id:e.id}),UpdateLeaderboardsReq:e=>window.postMessage({type:"UpdateLeaderboardsReq",id:e.id})}}connectedCallback(){this.setTimeInterval()}disconnectedCallback(){clearInterval(this.timeHolder)}actionJoin(e){if(!this.isActionJoinPending){this.isActionJoinPending=!0;try{e.playerEnrolled?this.messageSender.UnjoinTournamentReq(e):this.messageSender.JoinTournamentReq(e)}catch(e){return void console.log("error",e)}}}isTournamentClosed(e){return[pe.Closed,pe.Closing].includes(e.state)}setPage(e,t){switch(e){case le.Confirm:case le.Item:this.tournamentItem=t.tournament,this.tournamentItem||this.messageSender.UpdateTournamentsItemReq(t.tournament),this.isTournamentClosed(this.tournamentItem)&&this.messageSender.UpdateLeaderboardsReq(this.tournamentItem)}this.tab=ne.Info,this.page=e}renderPage(){switch(this.page){case le.Confirm:return this.renderPageConfirm();case le.Item:return this.renderPageLeaderboardItem();case le.List:return this.renderPageLeaderboardList()}}render(){return t(s,null,t("general-styling-wrapper",{clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,targetTranslations:ae,translationUrl:this.translationUrl}),this.renderPage())}onClickListItemChangePage(e){this.setPage(le.Item,{tournament:e})}onClickItemJoin(e,t){t.stopPropagation(),e.playerEnrolled?this.openDialog(ce.Unjoin,e):(this.actionJoin(e),this.tournamentItem=e)}onClickTab(e){switch(this.tab=e,e){case ne.Leaderboard:this.leaderboards=void 0,this.messageSender.UpdateLeaderboardsReq(this.tournamentItem);break;case ne.Games:this.messageSender.UpdateTournamentsItemReq(this.tournamentItem)}}renderPageLeaderboardList(){var e;if(!this.tournamentList)return this.tournamentList=null===(e=this.leaderboardsInit)||void 0===e?void 0:e.map((e=>Ce(e))),t("general-animation-loading",null);const{locale:i}=this;return this.tournamentList.length?this.renderLeaderboardContainer(t(o,null,t("div",{class:"Leaderboards Row"},this.tournamentList.map((e=>t("div",{class:re("LeaderboardsItem",e.playerEnrolled?" GradientRounded Hollow":""),onClick:this.onClickListItemChangePage.bind(this,e)},t("div",{class:"LeaderboardsItemContainer"},this.renderTitleContainer(e),this.renderTimeBar(e)))))))):t("div",{class:"NoLeaderboards Row"},t("div",null,i.NoLeaderboards),t("div",null,i.NoLeaderboardsTip))}renderPageConfirm(){if(!this.tournamentItem)return t("general-animation-loading",null);const e=this.tournamentItem.nameOrTitle,{locale:i}=this;return t("div",{class:"PageConfirmContainer"},t("div",{class:"GradientRounded Hollow PageConfirm"},t("div",null,fe),t("div",{class:"Title"},i.JoinDialog.Tile),t("div",{class:"Description",innerHTML:oe(i.JoinDialog.Description,{tournamentName:e})}),t("div",{class:"PageConfirmButtonsGroup"},t(he,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending},onClick:this.onClickConfirmJoin,innerHTML:i.JoinDialog.ButtonYes})),t(he,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending,isHollow:!0},onClick:this.onClickConfirmUnjoin,innerHTML:i.JoinDialog.ButtonNo})))))}renderPageLeaderboardItem(){return this.tournamentItem?this.renderLeaderboardContainer(t(o,null,this.renderTitleContainer(this.tournamentItem),this.renderTabs(),this.renderTabbedContent())):t("general-animation-loading",null)}renderDialogContent(){switch(this.dialog.type){case ce.Unjoin:return this.renderDialogContentUnjoin();case ce.Tip:return t("div",{class:"Tip"},this.locale.Tip)}}renderDialogContentUnjoin(){const{locale:e}=this;return t("div",{class:"DialogContentUnjoin"},t("div",{class:"DialogContentUnjoinTitle"},e.UnjoinDialog.Title),t("div",{class:"DialogContentUnjoinDescription",innerHTML:e.UnjoinDialog.Description}),t(he,Object.assign({},{statedClasses:{isPending:this.isActionJoinPending},onClick:this.onClickDialogUnjoin,innerHTML:e.UnjoinDialog.ButtonYes})),t(he,Object.assign({},{statedClasses:{isHollow:!0,isPending:this.isActionJoinPending},onClick:this.onClickDialogJoin,innerHTML:e.UnjoinDialog.ButtonNo})))}renderTitleContainer(e){const{locale:i}=this;return t("div",{class:"TitleContainer"},t("div",{class:"Title"},e.nameOrTitle),e.state!==pe.Closed&&t("div",null,t(he,Object.assign({},{statedClasses:{isHollow:e.playerEnrolled,isPending:this.isActionJoinPending},onClick:this.onClickItemJoin.bind(this,e),innerHTML:e.playerEnrolled?i.Unjoin:i.Join}))))}renderTabbedContent(){switch(this.tab){case ne.Info:return this.renderInfo();case ne.Leaderboard:return this.renderLeaderboard();case ne.Games:return this.renderGames()}}renderGames(){var e;return t("div",{class:"Games"},null===(e=this.tournamentItem.games)||void 0===e?void 0:e.map((e=>t("div",null,t("img",{src:e.defaultThumbnail,alt:""})))))}renderLeaderboard(){return this.leaderboards?this.leaderboards.length?t("table",{class:"Leaderboards"},this.leaderboards.map((e=>t("tr",{class:re({isMe:e.isMe})},t("td",{class:"LeaderboardRank"},t("span",null,e.rank)),t("td",{class:"LeaderboardName"},e.shortName),t("td",{class:"LeaderboardScore"},e.score),t("td",{class:"LeaderboardPrize"},e.prizeName))))):"":t("general-animation-loading",null)}renderTabs(){const{locale:e,tab:i}=this;return t("div",{class:"TabsContainer"},t("div",{class:"Tabs"},Object.keys(ne).map((n=>t("div",Object.assign({},{class:re({active:i===n}),onClick:this.onClickTab.bind(this,n)}),e[n])))))}renderTimeBar(e){return t("section",{class:"TimeContainer"},t("div",{class:"Time"},e.playerEnrolled?t(o,null,t("div",null,function(e,t){const i=Math.abs(t.getTime()-e.getTime()),n=Math.floor(i/864e5),s=Math.floor(i%864e5/36e5),o=Math.floor(i%36e5/6e4);return`${String(n).padStart(2,"0")}d:${String(s).padStart(2,"0")}h:${String(o).padStart(2,"0")}m`}(function(e,t){const i=new Date(e);return i.setSeconds(i.getSeconds()+t),i}(e.startTime,this.time),e.endTime)),t("div",null,t(he,{statedClasses:{isHollow:!0,isPendding:!1},innerHTML:`${ve(e.startTime,e.endTime)}%`}))):t(o,null,t("div",null,we(e.startTime)),t("div",null,we(e.endTime)))),t("casino-engagement-suite-progress-bar",{value:Number(ve(e.startTime,e.endTime)),"hide-percent":!0}))}renderInfo(){var e,i;const{locale:n,tournamentItem:s,isShowInfo:o}=this;return t("div",{class:"InfoContainer"},this.renderTimeBar(s),t("section",{class:"ShowInfo",onClick:this.onClickShowInfo},t("p",null,t("span",null,o?me:ue),t("span",null,n.LeaderboardDetails))),o&&t("section",{class:"Info"},t("div",null,s.description),t("div",{class:"Criterias"},t("div",null,n.ScoreCriteria,": ",t("span",null,s.scoreCriteria)),t("div",null,n.MinimumBetCriteria,": ",t("span",null,s.minBetCount))),t("div",{class:"TC"},t("a",{href:s.termsUrl,target:"_blank"},n.TC))),this.isTournamentClosed(this.tournamentItem)&&(null===(e=this.leaderboards)||void 0===e?void 0:e.find((e=>e.isMe)))&&t("section",{class:"ResultPrize",innerHTML:oe(n.TipPrize,this.getResultPrize(null===(i=this.leaderboards)||void 0===i?void 0:i.find((e=>e.isMe))))}),t("section",{class:"Prizes"},t("div",{class:"PrizesHeader"},xe,t("span",{class:"PrizesText"},n.Prizes)),s.prizes.map(((e,i)=>t("div",{class:"Prize"},i+1," ",n.Place,": ",t("span",{class:"PrizeText"},e.name))))))}getResultPrize(e){return{prize:e.prizeName,place:e.rank}}renderCloseBarInLayout(){const{left:e,middle:i}=this.getWrapperBarData();return t(ke,Object.assign({},{left:e,middle:i,right:t("span",Object.assign({},{onClick:this.onClickBarInLayout}),de)}))}renderCloseBarInLayoutDialog(){return t(ke,Object.assign({},{right:t("span",Object.assign({},{onClick:this.onClickBarInLayoutDialog}),de)}))}renderLeaderboardContainer(e){const{dialog:{isOpen:i}}=this;return t("div",{class:"Wrapper"},t("div",{class:re("WrapperContent",{faded:i})},this.renderCloseBarInLayout(),t("div",{class:"Root"},t("div",{class:"Main"},e))),t("div",{class:"WrapperUtil"},t("dialog",{open:i},t("div",null,this.renderCloseBarInLayoutDialog(),i&&this.renderDialogContent()))))}getWrapperBarData(){const{page:e,locale:i}=this;switch(e){case le.List:return{left:t("span",{onClick:this.onClickBarTip},ge),middle:i.Leaderboards};case le.Item:return{left:t("span",{onClick:this.onClickBarBack},be),middle:""}}}openDialog(e,t){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!0,type:e,data:t})}closeDialog(){this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1})}};Fe.style='.GradientRounded {\n display: block;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);\n color: rgba(30, 22, 56, 1);\n \n position: relative;\n border-radius: 16px;\n\n &.Hollow {\n background: rgba(30, 22, 56, 1);\n color: #FFFFFF;\n &::before {\n content: "";\n position: absolute;\n inset: 0;\n border-radius: 15px;\n border: 1px solid transparent;\n background: linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;\n -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);\n -webkit-mask-composite: destination-out;\n mask-composite: exclude;\n }\n\n }\n}\n\n.GradientRoundedButton {\n border: none;\n padding: 7px;\n \n height: 32px;\n width: 100%;\n \n font-size: 14px;\n font-weight: 700;\n line-height: 17.07px;\n text-align: center;\n \n transition: .5s opacity;\n\n cursor: pointer;\n &.Pending {\n cursor: not-allowed;\n opacity: .3;\n }\n\n &.Hollow {\n \n span {\n background: -webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);\n -webkit-background-clip: text;\n -webkit-text-fill-color: transparent;\n }\n }\n}\n.Wrapper {\n height: 100%;\n position: relative;\n color: var(--emw--color-typography, #FFFFFF);\n display: flex;\n background-color: var(--emw--color-background, #1d1537);\n flex-direction: column;\n border-radius: 8px;\n overflow: hidden;\n}\n\n.WrapperContent {\n padding-bottom: 20px;\n transition: 0.5s filter;\n}\n.WrapperContent.faded {\n filter: brightness(53.3333333333%);\n}\n\n.WrapperBar {\n display: flex;\n width: 100%;\n padding: 12px 8px 8px;\n}\n\n.WrapperBarLeft, .WrapperBarRight {\n cursor: pointer;\n}\n\n.WrapperBarMiddle {\n flex-grow: 1;\n text-align: center;\n font-size: 16px;\n line-height: 16px;\n font-weight: 500;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n\n:host {\n display: block;\n font-size: 12px;\n font-family: Inter;\n}\n\n.Row {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.LeaderboardsItem {\n margin: 10px 0;\n border: 1px solid #403956;\n border-radius: 16px;\n}\n.LeaderboardsItem.Hollow {\n border-color: transparent;\n}\n\n.LeaderboardsItemContainer {\n padding-top: 16px;\n}\n\n.Info {\n margin: 24px 0;\n padding: 0 20px;\n}\n\n.TimeContainer {\n margin: 24px 0;\n padding: 0 20px;\n}\n.TimeContainer .Time {\n display: flex;\n justify-content: space-between;\n font-size: 11px;\n align-items: center;\n color: var(--emw--color-secondary, #bbb9c3);\n}\n.TimeContainer .Time button {\n font-size: 12px;\n height: 20px;\n padding: 0;\n}\n.TimeContainer .Time button::before {\n inset: inherit;\n border: 0;\n}\n\n.ShowInfo {\n margin: 24px 0;\n padding: 0 20px;\n cursor: pointer;\n color: #666178;\n}\n.ShowInfo p {\n display: flex;\n gap: 4px;\n}\n\n.TitleContainer {\n display: flex;\n justify-content: space-between;\n margin: 24px 0;\n padding: 0 20px;\n margin-top: 0;\n gap: 10px;\n font-family: Montserrat;\n}\n.TitleContainer .GradientRoundedButton {\n width: 120px;\n}\n\n.TabsContainer {\n margin: 24px 0;\n padding: 0 20px;\n margin: 0 20px;\n padding: 0;\n border-bottom: 1px solid #575757;\n}\n\n.Tabs {\n display: flex;\n justify-content: space-between;\n justify-content: start;\n font-size: 12px;\n margin-bottom: -1px;\n}\n.Tabs > div {\n padding: 10px;\n color: #666178;\n cursor: pointer;\n}\n.Tabs > div.active {\n color: var(--emw--color-typography, #FFF);\n border-bottom: 2px solid var(--emw--color-typography, #FFF);\n}\n\n.Title {\n font-size: 16px;\n font-weight: 700;\n line-height: 19.5px;\n text-align: left;\n word-break: break-word;\n}\n\n.TC {\n margin-top: 12px;\n}\n.TC a {\n color: #59d1ff;\n}\n\n.Criterias {\n margin: 12px 0;\n}\n.Criterias span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.ResultPrize {\n margin: 24px 0;\n padding: 0 20px;\n}\n.ResultPrize span {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n.Prizes {\n margin: 24px 0;\n padding: 0 20px;\n}\n.Prizes .PrizesText {\n margin-left: 3px;\n font-weight: 600;\n}\n.Prizes .PrizesHeader {\n align-items: center;\n display: flex;\n}\n.Prizes .PrizesHeader img {\n width: 12px;\n}\n.Prizes .Prize {\n margin: 8px 0;\n}\n.Prizes .Prize .PrizeText {\n color: var(--emw--color-primary, #ffd62f);\n font-weight: 400;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.Leaderboards {\n width: 100%;\n text-align: center;\n border-collapse: collapse;\n}\n.Leaderboards td {\n opacity: 0.6;\n padding: 20px 5px;\n}\n.Leaderboards td:first-child {\n padding-left: 20px;\n}\n.Leaderboards td:last-child {\n padding-right: 20px;\n}\n.Leaderboards .LeaderboardName {\n color: var(--emw--color-typography, #FFF);\n opacity: 1;\n}\n.Leaderboards tr.isMe {\n background: rgba(0, 0, 0, 0.2);\n}\n.Leaderboards tr.isMe .LeaderboardRank span {\n padding: 0px 3px;\n opacity: 1;\n border: 1px solid var(--emw--color-primary, #ffd62f);\n border-radius: 11px;\n}\n.Leaderboards tr.isMe td {\n color: var(--emw--color-primary, #ffd62f);\n}\n\n.Games {\n margin: 24px 0;\n padding: 0 20px;\n display: flex;\n flex-wrap: wrap;\n justify-content: space-evenly;\n gap: 4px 7.25px;\n}\n.Games img {\n width: 60px;\n}\n\ndialog {\n position: absolute;\n top: 30px;\n width: 100%;\n height: 100%;\n background: transparent;\n border: 0;\n padding: 0;\n color: var(--emw--color-typography, #FFFFFF);\n}\ndialog > div {\n margin: 32px;\n border-radius: 8px;\n background: var(--emw--color-background, #1d1537);\n border: 1px solid #403956;\n align-items: center;\n}\n\n.DialogContentUnjoin {\n padding: 32px;\n padding-top: 10px;\n display: flex;\n gap: 10px;\n flex-direction: column;\n}\n\n.DialogContentUnjoinTitle {\n font-family: Montserrat;\n font-size: 20px;\n font-weight: 600;\n line-height: 24.38px;\n text-align: center;\n}\n\n.DialogContentUnjoinDescription {\n color: var(--emw--color-secondary, #bbb9c3);\n margin-bottom: 30px;\n}\n\n.Tip {\n padding: 32px;\n padding-top: 10px;\n color: var(--emw--color-secondary, #bbb9c3);\n font-size: 14px;\n}\n\n.PageConfirmContainer {\n text-align: center;\n width: 80%;\n margin: 0 auto;\n}\n\n.PageConfirm {\n padding: 40px 32px;\n display: flex;\n flex-direction: column;\n gap: 20px;\n}\n.PageConfirm .Title {\n font-size: 20px;\n text-align: center;\n}\n.PageConfirm .Description {\n color: var(--emw--color-secondary, #bbb9c3);\n font-weight: 400;\n}\n.PageConfirm .Description span {\n color: var(--emw--color-typography, #FFF);\n font-weight: 600;\n}\n\n.PageConfirmButtonsGroup {\n width: 150px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}';const ye=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))}}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const n=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let n in t[e])i[e][n]=t[e][n]})),e(!0)}))})));e.push(n)}var t,i;return await Promise.all(e)}render(){return t("div",{class:"StyleShell"},t("slot",{name:"mainContent"}))}get el(){return n(this)}};ye.style=":host{display:block}";export{l as casino_engagement_suite_bar,m as casino_engagement_suite_challenges_details,v as casino_engagement_suite_challenges_list,E as casino_engagement_suite_container,j as casino_engagement_suite_free_spins_details,H as casino_engagement_suite_free_spins_list,N as casino_engagement_suite_jackpot_details,Y as casino_engagement_suite_jackpots_list,K as casino_engagement_suite_modal,te as casino_engagement_suite_modal_container,ie as casino_engagement_suite_progress_bar,Fe as casino_engagement_suite_tournament,ye as general_styling_wrapper}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e,t,n,l=!1,o=!1,s=!1,i=!1;const r="undefined"!=typeof window?window:{},c=r.document||{head:{}},f={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},a=e=>Promise.resolve(e),u=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),d=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=h(e,n),i=$(t,o),r=y(n);f.ael(s,l,i,r),(t.o=t.o||[]).push((()=>f.rel(s,l,i,r)))}))},$=(e,t)=>n=>{try{256&e.t?e.i[t](n):(e.u=e.u||[]).push([t,n])}catch(e){de(e)}},h=(e,t)=>8&t?r:16&t?c.body:e,y=e=>0!=(2&e),m="http://www.w3.org/1999/xlink",p=new WeakMap,b=e=>"sc-"+e.$,w={},k=e=>"object"==(e=typeof e)||"function"===e,v=(e,t,...n)=>{let l=null,o=null,s=null,i=!1,r=!1,c=[];const f=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?f(l):null!=l&&"boolean"!=typeof l&&((i="function"!=typeof e&&!k(l))&&(l+=""),i&&r?c[c.length-1].h+=l:c.push(i?g(null,l):l),r=i)};if(f(n),t){t.key&&(o=t.key),t.name&&(s=t.name);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,j);const a=g(e,null);return a.m=t,c.length>0&&(a.p=c),a.k=o,a.v=s,a},g=(e,t)=>({t:0,g:e,h:t,S:null,p:null,m:null,k:null,v:null}),S={},j={forEach:(e,t)=>e.map(C).forEach(t),map:(e,t)=>e.map(C).map(t).map(M)},C=e=>({vattrs:e.m,vchildren:e.p,vkey:e.k,vname:e.v,vtag:e.g,vtext:e.h}),M=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),v(e.vtag,t,...e.vchildren||[])}const t=g(e.vtag,e.vtext);return t.m=e.vattrs,t.p=e.vchildren,t.k=e.vkey,t.v=e.vname,t},O=(e,t,n,l,o,s)=>{if(n!==l){let i=ue(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=R(n),s=R(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const r=k(l);if((i||r&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[t]=l;else{let o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(t=c,f=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(f?e.removeAttributeNS(m,t):e.removeAttribute(t)):(!i||4&s||o)&&!r&&(l=!0===l?"":l,f?e.setAttributeNS(m,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):ue(r,c)?c.slice(2):c[2]+t.slice(3),n&&f.rel(e,t,n,!1),l&&f.ael(e,t,l,!1)}},x=/\s/,R=e=>e?e.split(x):[],P=(e,t,n,l)=>{const o=11===t.S.nodeType&&t.S.host?t.S.host:t.S,s=e&&e.m||w,i=t.m||w;for(l in s)l in i||O(o,l,s[l],void 0,n,t.t);for(l in i)O(o,l,s[l],i[l],n,t.t)},T=(o,i,r,f)=>{let a,u,d,$=i.p[r],h=0;if(l||(s=!0,"slot"===$.g&&(e&&f.classList.add(e+"-s"),$.t|=$.p?2:1)),null!==$.h)a=$.S=c.createTextNode($.h);else if(1&$.t)a=$.S=c.createTextNode("");else if(a=$.S=c.createElement(2&$.t?"slot-fb":$.g),P(null,$,!1),null!=e&&a["s-si"]!==e&&a.classList.add(a["s-si"]=e),$.p)for(h=0;h<$.p.length;++h)u=T(o,$,h,a),u&&a.appendChild(u);return a["s-hn"]=n,3&$.t&&(a["s-sr"]=!0,a["s-cr"]=t,a["s-sn"]=$.v||"",d=o&&o.p&&o.p[r],d&&d.g===$.g&&o.S&&E(o.S,!1)),a},E=(e,t)=>{f.t|=1;const l=e.childNodes;for(let e=l.length-1;e>=0;e--){const o=l[e];o["s-hn"]!==n&&o["s-ol"]&&(A(o).insertBefore(o,W(o)),o["s-ol"].remove(),o["s-ol"]=void 0,s=!0),t&&E(o,t)}f.t&=-2},L=(e,t,l,o,s,i)=>{let r,c=e["s-cr"]&&e["s-cr"].parentNode||e;for(c.shadowRoot&&c.tagName===n&&(c=c.shadowRoot);s<=i;++s)o[s]&&(r=T(null,l,s,e),r&&(o[s].S=r,c.insertBefore(r,W(t))))},N=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.S,_(l),o=!0,s["s-ol"]?s["s-ol"].remove():E(s,!0),s.remove())},F=(e,t)=>e.g===t.g&&("slot"===e.g?e.v===t.v:e.k===t.k),W=e=>e&&e["s-ol"]||e,A=e=>(e["s-ol"]?e["s-ol"]:e).parentNode,D=(e,t)=>{const n=t.S=e.S,l=e.p,o=t.p,s=t.h;let i;null===s?("slot"===t.g||P(e,t,!1),null!==l&&null!==o?((e,t,n,l)=>{let o,s,i=0,r=0,c=0,f=0,a=t.length-1,u=t[0],d=t[a],$=l.length-1,h=l[0],y=l[$];for(;i<=a&&r<=$;)if(null==u)u=t[++i];else if(null==d)d=t[--a];else if(null==h)h=l[++r];else if(null==y)y=l[--$];else if(F(u,h))D(u,h),u=t[++i],h=l[++r];else if(F(d,y))D(d,y),d=t[--a],y=l[--$];else if(F(u,y))"slot"!==u.g&&"slot"!==y.g||E(u.S.parentNode,!1),D(u,y),e.insertBefore(u.S,d.S.nextSibling),u=t[++i],y=l[--$];else if(F(d,h))"slot"!==u.g&&"slot"!==y.g||E(d.S.parentNode,!1),D(d,h),e.insertBefore(d.S,u.S),d=t[--a],h=l[++r];else{for(c=-1,f=i;f<=a;++f)if(t[f]&&null!==t[f].k&&t[f].k===h.k){c=f;break}c>=0?(s=t[c],s.g!==h.g?o=T(t&&t[r],n,c,e):(D(s,h),t[c]=void 0,o=s.S),h=l[++r]):(o=T(t&&t[r],n,r,e),h=l[++r]),o&&A(u.S).insertBefore(o,W(u.S))}i>a?L(e,null==l[$+1]?null:l[$+1].S,n,l,r,$):r>$&&N(t,i,a)})(n,l,t,o):null!==o?(null!==e.h&&(n.textContent=""),L(n,null,t,o,0,o.length-1)):null!==l&&N(l,0,l.length-1)):(i=n["s-cr"])?i.parentNode.textContent=s:e.h!==s&&(n.data=s)},H=e=>{let t,n,l,o,s,i,r=e.childNodes;for(n=0,l=r.length;n<l;n++)if(t=r[n],1===t.nodeType){if(t["s-sr"])for(s=t["s-sn"],t.hidden=!1,o=0;o<l;o++)if(i=r[o].nodeType,r[o]["s-hn"]!==t["s-hn"]||""!==s){if(1===i&&s===r[o].getAttribute("slot")){t.hidden=!0;break}}else if(1===i||3===i&&""!==r[o].textContent.trim()){t.hidden=!0;break}H(t)}},U=[],q=e=>{let t,n,l,s,i,r,c=0,f=e.childNodes,a=f.length;for(;c<a;c++){if(t=f[c],t["s-sr"]&&(n=t["s-cr"])&&n.parentNode)for(l=n.parentNode.childNodes,s=t["s-sn"],r=l.length-1;r>=0;r--)n=l[r],n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||(V(n,s)?(i=U.find((e=>e.j===n)),o=!0,n["s-sn"]=n["s-sn"]||s,i?i.C=t:U.push({C:t,j:n}),n["s-sr"]&&U.map((e=>{V(e.j,n["s-sn"])&&(i=U.find((e=>e.j===n)),i&&!e.C&&(e.C=i.C))}))):U.some((e=>e.j===n))||U.push({j:n}));1===t.nodeType&&q(t)}},V=(e,t)=>1===e.nodeType?null===e.getAttribute("slot")&&""===t||e.getAttribute("slot")===t:e["s-sn"]===t||""===t,_=e=>{e.m&&e.m.ref&&e.m.ref(null),e.p&&e.p.map(_)},z=e=>ce(e).M,B=(e,t,n)=>{const l=z(e);return{emit:e=>G(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},G=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},I=(e,t)=>{t&&!e.O&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.O=t)))},J=(e,t)=>{if(e.t|=16,!(4&e.t))return I(e,e.R),ge((()=>K(e,t)));e.t|=512},K=(e,t)=>{const n=e.i;let l;return t&&(e.t|=256,e.u&&(e.u.map((([e,t])=>ee(n,e,t))),e.u=null),l=ee(n,"componentWillLoad")),te(l,(()=>Q(e,n,t)))},Q=async(e,t,n)=>{const l=e.M,o=l["s-rc"];n&&(e=>{const t=e.P,n=e.M,l=t.t,o=((e,t)=>{let n=b(t),l=ye.get(n);if(e=11===e.nodeType?e:c,l)if("string"==typeof l){let t,o=p.get(e=e.head||e);o||p.set(e,o=new Set),o.has(n)||(t=c.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);X(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>Y(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},X=(i,r)=>{try{r=r.render(),i.t&=-17,i.t|=2,((i,r)=>{const a=i.M,u=i.P,d=i.T||g(null,null),$=(e=>e&&e.g===S)(r)?r:v(null,null,r);if(n=a.tagName,u.L&&($.m=$.m||{},u.L.map((([e,t])=>$.m[t]=a[e]))),$.g=null,$.t|=4,i.T=$,$.S=d.S=a.shadowRoot||a,e=a["s-sc"],t=a["s-cr"],l=0!=(1&u.t),o=!1,D(d,$),f.t|=1,s){let e,t,n,l,o,s;q($.S);let i=0;for(;i<U.length;i++)e=U[i],t=e.j,t["s-ol"]||(n=c.createTextNode(""),n["s-nr"]=t,t.parentNode.insertBefore(t["s-ol"]=n,t));for(i=0;i<U.length;i++)if(e=U[i],t=e.j,e.C){for(l=e.C.parentNode,o=e.C.nextSibling,n=t["s-ol"];n=n.previousSibling;)if(s=n["s-nr"],s&&s["s-sn"]===t["s-sn"]&&l===s.parentNode&&(s=s.nextSibling,!s||!s["s-nr"])){o=s;break}(!o&&l!==t.parentNode||t.nextSibling!==o)&&t!==o&&(!t["s-hn"]&&t["s-ol"]&&(t["s-hn"]=t["s-ol"].parentNode.nodeName),l.insertBefore(t,o))}else 1===t.nodeType&&(t.hidden=!0)}o&&H($.S),f.t&=-2,U.length=0})(i,r)}catch(e){de(e,i.M)}return null},Y=e=>{const t=e.M,n=e.i,l=e.R;ee(n,"componentDidRender"),64&e.t||(e.t|=64,ne(t),ee(n,"componentDidLoad"),e.N(t),l||Z()),e.F(t),e.O&&(e.O(),e.O=void 0),512&e.t&&ve((()=>J(e,!1))),e.t&=-517},Z=()=>{ne(c.documentElement),ve((()=>G(r,"appload",{detail:{namespace:"casino-engagement-suite-container"}})))},ee=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){de(e)}},te=(e,t)=>e&&e.then?e.then(t):t(),ne=e=>e.classList.add("hydrated"),le=(e,t,n)=>{if(t.W){e.watchers&&(t.A=e.watchers);const l=Object.entries(t.W),o=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(o,e,{get(){return((e,t)=>ce(this).D.get(t))(0,e)},set(n){((e,t,n,l)=>{const o=ce(e),s=o.M,i=o.D.get(t),r=o.t,c=o.i;if(n=((e,t)=>null==e||k(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.W[t][0]),(!(8&r)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(o.D.set(t,n),c)){if(l.A&&128&r){const e=l.A[t];e&&e.map((e=>{try{c[e](n,i,t)}catch(e){de(e,s)}}))}2==(18&r)&&J(o,!1)}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(o,e,{value(...t){const n=ce(this);return n.H.then((()=>n.i[e](...t)))}})})),1&n){const n=new Map;o.attributeChangedCallback=function(e,t,l){f.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(o.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const o=l[1]||e;return n.set(o,e),512&l[0]&&t.L.push([e,o]),o}))}}return e},oe=e=>{ee(e,"connectedCallback")},se=(e,t={})=>{const n=[],l=t.exclude||[],o=r.customElements,s=c.head,i=s.querySelector("meta[charset]"),a=c.createElement("style"),$=[];let h,y=!0;Object.assign(f,t),f.l=new URL(t.resourcesUrl||"./",c.baseURI).href,e.map((e=>{e[1].map((t=>{const s={t:t[0],$:t[1],W:t[2],U:t[3]};s.W=t[2],s.U=t[3],s.L=[],s.A={};const i=s.$,r=class extends HTMLElement{constructor(e){super(e),ae(e=this,s),1&s.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?$.push(this):f.jmp((()=>(e=>{if(0==(1&f.t)){const t=ce(e),n=t.P,l=()=>{};if(1&t.t)d(e,t,n.U),oe(t.i);else{t.t|=1,12&n.t&&(e=>{const t=e["s-cr"]=c.createComment("");t["s-cn"]=!0,e.insertBefore(t,e.firstChild)})(e);{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){I(t,t.R=n);break}}n.W&&Object.entries(n.W).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,o)=>{if(0==(32&t.t)){{if(t.t|=32,(o=he(n)).then){const e=()=>{};o=await o,e()}o.isProxied||(n.A=o.watchers,le(o,n,2),o.isProxied=!0);const e=()=>{};t.t|=8;try{new o(t)}catch(e){de(e)}t.t&=-9,t.t|=128,e(),oe(t.i)}if(o.style){let e=o.style;const t=b(n);if(!ye.has(t)){const l=()=>{};((e,t,n)=>{let l=ye.get(e);u&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,ye.set(e,l)})(t,e,!!(1&n.t)),l()}}}const s=t.R,i=()=>J(t,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,t,n)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(()=>{if(0==(1&f.t)){const e=ce(this),t=e.i;e.o&&(e.o.map((e=>e())),e.o=void 0),ee(t,"disconnectedCallback")}})()))}componentOnReady(){return ce(this).q}};s.V=e[0],l.includes(i)||o.get(i)||(n.push(i),o.define(i,le(r,s,1)))}))})),a.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",a.setAttribute("data-styles",""),s.insertBefore(a,i?i.nextSibling:s.firstChild),y=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>h=setTimeout(Z,30)))},ie=(e,t)=>t,re=new WeakMap,ce=e=>re.get(e),fe=(e,t)=>re.set(t.i=e,t),ae=(e,t)=>{const n={t:0,M:e,P:t,D:new Map};return n.H=new Promise((e=>n.F=e)),n.q=new Promise((e=>n.N=e)),e["s-p"]=[],e["s-rc"]=[],d(e,n,t.U),re.set(e,n)},ue=(e,t)=>t in e,de=(e,t)=>(0,console.error)(e,t),$e=new Map,he=e=>{const t=e.$.replace(/-/g,"_"),n=e.V,l=$e.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>($e.set(n,e),e[t])),de)},ye=new Map,me=[],pe=[],be=(e,t)=>n=>{e.push(n),i||(i=!0,t&&4&f.t?ve(ke):f.raf(ke))},we=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){de(e)}e.length=0},ke=()=>{we(me),we(pe),(i=me.length>0)&&f.raf(ke)},ve=e=>a().then(e),ge=be(pe,!0);export{ie as F,S as H,se as b,B as c,z as g,v as h,a as p,fe as r}
|