@everymatrix/casino-engagement-suite-container 1.77.21 → 1.77.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,c as i,g as a,H as n}from"./index-4a08682c.js";import{_ as s,l as o,r,g as l,D as p,L as d,a as c,T as h,i as g,b as u,c as m,d as b,e as f}from"./util.date-a59c0863.js";import{c as y,t as w,g as x}from"./utils-25141486.js";const v={labels:[],rank:"-"},k=["en"],M={en:{new:"new",win:"win"}},C=(e,t)=>{const i=t;return M[void 0!==i&&k.includes(i)?i:"en"][e]},L=class{constructor(t){e(this,t),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)}))},this.activeWidget=void 0,this.challengePercent=void 0,this.highlightChallenge=!1,this.clientStyling="",this.clientStylingUrl="",this.orientation="Landscape",this.device="Mobile",this.isChallengeLabel=!1,this.isForfeitedChallengeLabel=!1,this.isSpinForfeitedLabel=!1,this.language="en",this.jackpots=[],this.remainingFreeSpins=void 0,this.remainingLuckywheels=void 0,this.leaderboards=void 0,this.limitStylingAppends=!1,this.activeJackpot="",this.leaderboardState=v}handleEvent(e){const t=null==e?void 0:e.data,{type:i}=t,a=s(t,["type"]);switch(i){case"UpdateLeaderboardState":Object.keys(v).map((e=>{a[e]&&(this.leaderboardState=Object.assign(Object.assign({},this.leaderboardState),{[e]:a[e]}))}));break;case"LeaderboardLiveEvent":["TournamentUpdate","PlayerLeaderBoardUpdate"].includes(a.messageType)&&!this.leaderboardState.labels.includes("new")&&(this.leaderboardState=Object.assign(Object.assign({},this.leaderboardState),{labels:[...this.leaderboardState.labels,"new"]}))}}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||this.highlightChallenge?"Active":""),"data-app":"Challenges",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.challengePercent),t("div",{class:"ChallengeLabel "+(this.isChallengeLabel&&!this.isForfeitedChallengeLabel?"ShowChallengeLabel":"")},t("span",null,C("new",this.language))),t("div",{class:"ForfeitLabel "+(this.isForfeitedChallengeLabel?"ShowForfeitChallengeLabel":"")}))}getFreeSpinsTile(){return t("button",{class:"Tile Reward FreeSpins "+("FreeSpins"===this.activeWidget?"Active":""),"data-app":"FreeSpins",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.remainingFreeSpins),t("div",{class:"ForfeitLabel "+(this.isSpinForfeitedLabel?"ShowForfeitLabel":"")},t("span",null)))}getLuckyWheelTile(){return t("button",{class:"Tile Reward Luckywheel "+("LuckyWheels"===this.activeWidget?"Active":""),"data-app":"LuckyWheels",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.remainingLuckywheels))}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.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,this.leaderboardState.rank),t("div",{class:"LeaderboardLabels"},this.leaderboardState.labels.map((e=>t("div",{class:"LeaderboardLabel"},t("span",null,C(e,this.language)))))))}displayTilesInOneRow(){return this.jackpots.length+[this.leaderboards,this.challengePercent,this.remainingFreeSpins].filter((e=>!!e)).length<4}getTilesTemplate(){return this.displayTilesInOneRow()?t("div",{class:"EngagementSuiteContainer"},!!this.jackpots.length&&this.getJackpotsTemplate(),this.leaderboards&&this.getLeaderboardsTile(),this.remainingLuckywheels&&this.getLuckyWheelTile(),this.challengePercent&&this.getChallengeTile(),this.remainingFreeSpins&&this.getFreeSpinsTile()):t("div",{class:"EngagementSuiteContainer"},t("div",{class:"Jackpots"},!!this.jackpots.length&&this.getJackpotsTemplate()),t("div",{class:"Rewards"},this.leaderboards&&this.getLeaderboardsTile(),this.remainingLuckywheels&&this.getLuckyWheelTile(),this.challengePercent&&this.getChallengeTile(),this.remainingFreeSpins&&this.getFreeSpinsTile()))}render(){return t("div",{key:"9fa80b96364085609f814668692eea4a3842815f",class:`CasinoEngagementSuiteBar ${this.orientation} ${this.device}`,ref:e=>this.engagementSuiteBar=e},this.getTilesTemplate())}};L.style=':host{display:block}*{box-sizing:border-box}button{touch-action:manipulation}.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:7px 9px 0;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar{width:3px;background:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{cursor:pointer;background-color:var(--emw--color-background-secondary, #251D3E);border-radius:var(--emw--border-radius-small, 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:var(--emw--font-family-secondary, "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-small, 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 .Jackpots,.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{display:flex;gap:4px;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{padding:14px 4px;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:var(--emw--font-size-x-small, 12px);color:var(--emw--color-typography, #fff)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled .JackpotBalance{font-weight:var(--emw--font-weight-extra-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:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 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:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ForfeitLabel{width:12px;height:12px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:50%;display:none;position:absolute;top:-6px;right:8px}.ShowChallengeLabel{display:inline-flex}.ShowForfeitLabel,.ShowForfeitChallengeLabel{display:inline-flex}.LeaderboardLabels{position:absolute;top:-4px;right:4px;display:flex;gap:4px}.LeaderboardLabel{min-width:23px;height:11px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:7px;line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.Landscape.CasinoEngagementSuiteBar{width:152px;padding-top:10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer{flex-direction:column}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{width:120px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{width:120px;height:40px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{flex-direction:column}.Portrait.CasinoEngagementSuiteBar{border-radius:0 0 var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px);height:auto;padding:3px 10px 10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer{padding:7px 0 0;gap:8px;flex-wrap:wrap}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards,.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots{gap:8px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{flex:1 1 0px;height:32px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{min-width:30%;padding:10px 4px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{min-width:20%;padding:4px 8px}.CasinoEngagementSuiteBar.Desktop.Landscape{width:252px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.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 .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.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"), var(--emw--color-background-secondary, #251D3E)}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType{display:block;font-weight:var(--emw--font-weight-extra-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 D=["en"],S={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",details:"Mission Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution",gameLimit:"Full game list in Terms and Conditions or \n Contact Support"}},I=(e,t)=>{const i=t;return S[void 0!==i&&D.includes(i)?i:"en"][e]};var T,z;function E(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"}(T||(T={})),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",e[e.Forfeited=5]="Forfeited"}(z||(z={}));const F=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.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 a=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(a))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:a}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:a,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:a}})},this.toggle=()=>{this.showDetails=!this.showDetails},this.clientStyling="",this.clientStylingUrl="",this.challenge=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.isJoiningToChallenge=void 0,this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1}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:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getChallengeHeader(){const e=this.challenge.ChallengePresentation.PresentationName,i=this.challenge.Status===z.InProgress||this.challenge.Status===z.PendingLevelReward,a=this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId),n=![z.Completed,z.Forfeited].includes(this.challenge.Status),s=this.challenge.Status!==z.Forfeited;return t("div",{class:"ChallengeDetailsHeader"},t("span",{class:"ChallengeName"},e),n?t("button",{onClick:this.changeChallengeStatus,class:`EngagementSuiteButton ${i?"Active":""}\n ${a?"Disabled":""}`,"data-id":this.challenge.Id},I(i?"unjoin":"join",this.language)):null,s?t("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},t("span",null,I("new",this.language))):null)}getChallengeCountdown(){return this.challenge.Status!==z.Forfeited?t("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer):null}getChallengeDetails(){const e=this.challenge.ChallengePresentation.Description,i=this.challenge.ChallengePresentation.Url,a=this.challenge.Games,n=this.challenge.TotalGamesCount>this.challenge.Games.length;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"},I("tc",this.language))),(null==a?void 0:a.length)&&t("div",{class:"ChallengeGames"},a.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})))),n&&t("div",{class:"GameLimitMessage"},t("span",null,I("gameLimit",this.language)))))}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:a,seconds:n}={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:${a}m:${n}s`:`${t}d:${i}h:${a}m`}getLevelTarget(e){const i=E(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let a=`${I("place",this.language)} ${i}`;return 1===e.LevelTargetType?a+=` ${I("bet",this.language)}`:2===e.LevelTargetType&&(a+=` ${I("bets",this.language)} X ${e.TargetBetCount}`),t("span",{class:"ChallengeLevelTarget"},a)}getLevelBetRangesDetails(e){var i,a,n,s;if(0===e.LevelTargetType){const o=E(null===(i=e.BetRange)||void 0===i?void 0:i.MinBet,this.challenge.CurrencySymbol),r=E(null===(a=e.BetRange)||void 0===a?void 0:a.MaxBet,this.challenge.CurrencySymbol),l=e.LevelContributionPercent+"%",p=!!(null===(n=e.BetRange)||void 0===n?void 0:n.MinBet),d=!!(null===(s=e.BetRange)||void 0===s?void 0:s.MaxBet),c=100!==e.LevelContributionPercent;if(p||d||c)return t("div",{class:"ChallengeLevelBetDetails"},p&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,I("minBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},o)),d&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,I("maxBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},r)),c&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,I("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(((a,n)=>t("div",{class:"ChallengeLevelCard "+(i(a)?"InProgress":"")},t("casino-engagement-suite-progress-bar",{clientStylingUrl:this.clientStylingUrl,class:this.device,value:a.ProgressPercentage,"hide-percent":0===a.ProgressPercentage&&!i(a)||100===a.ProgressPercentage,disabled:this.isExpiredChallenge||e},t("span",{slot:"Title",class:"ChallengeLevelTitle"},t("span",null,"Level ",n+1,": "),this.getLevelTarget(a))),t("div",{class:"ChallengeRewardMessage"},t("div",{class:"EngagementSuiteIconButton Reward"}),t("span",null,I("win",this.language),": "),t("span",{class:"CustomRewardMessage"},a.CustomRewardMessage)),this.getLevelBetRangesDetails(a)))))}getToggleButton(){return t("div",{class:"ChallengeCollapseButton",onClick:this.toggle},t("span",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,I("details",this.language)))}render(){return t("div",{key:"0d845a9ff0cf10c942add6ab84bc0648b185fda6",class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{key:"7ae213adaac726bbf0a6eddef530ef9a120fda7a",class:"ChallengeDetails "+(this.challenge.IsNew?"IsNewChallenge":"")},this.getChallengeHeader(),this.getChallengeCountdown(),this.getToggleButton(),this.getChallengeDetails(),this.getChallengeLevels()))}get host(){return a(this)}static get watchers(){return{challenge:["challengePropHandler"]}}};var j,N,P,B;F.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Reward{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/reward.svg) no-repeat;min-width:16px;min-height:16px}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-23px;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-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-word}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.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-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.ChallengeCollapseButton{margin:24px 0 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-gray-300, #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(--emw--color-typography, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-contrast, #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:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);cursor:pointer}.CollapseDetails .ChallengeGames .GameLimitMessage{min-width:100%;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);background-color:var(--emw--color-background-transparency-30, rgba(64, 57, 86, 0.3));display:flex;align-items:center;justify-content:center;text-align:center}.CollapseDetails .ChallengeGames .GameLimitMessage span{color:var(--emw--color-secondary, #BBB9C3);white-space:pre-line}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-x-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:var(--emw--border-radius-large, 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(--emw--color-typography, #FFF)}.ChallengeLevels .InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-large, 8px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton.Reward,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton.Reward{min-width:24px;min-height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengeDetailsPopup.Tablet .EngagementSuiteButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 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.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(j||(j={})),function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(N||(N={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(P||(P={})),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",e[e.Forfeited=5]="Forfeited"}(B||(B={}));const A=["en"],O={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",history:"History",level:"Level",status:"Status",time:"Time",loading:"Loading...",completed:"Completed",expired:"Expired",forfeited:"Forfeited",noHistory:"No missions’ history available (last 30 days)",freeSpins:"Free Spins",luckyWheel:"Lucky Wheel",leaderboard:"Leaderboard",mission:"Mission",missionHasBeenForfeited:"The mission has been canceled.",support:"Please, contact support."}},W=(e,t)=>{const i=t;return O[void 0!==i&&A.includes(i)?i:"en"][e]};function H(e){return H="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},H(e)}function J(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function R(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function U(e){R(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===H(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))}var Y={};function G(){return Y}var Q={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function $(e,t,i){R(2,arguments);var a,n=function(e,t){return R(2,arguments),U(e).getTime()-U(t).getTime()}(e,t)/1e3;return((a=null==i?void 0:i.roundingMethod)?Q[a]:Q.trunc)(n)}function Z(e){R(1,arguments);var t=U(e),i=t.getUTCDay(),a=(i<1?7:0)+i-1;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function _(e){R(1,arguments);var t=U(e),i=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(i+1,0,4),a.setUTCHours(0,0,0,0);var n=Z(a),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var o=Z(s);return t.getTime()>=n.getTime()?i+1:t.getTime()>=o.getTime()?i:i-1}function V(e,t){var i,a,n,s,o,r,l,p;R(1,arguments);var d=G(),c=J(null!==(i=null!==(a=null!==(n=null!==(s=null==t?void 0:t.weekStartsOn)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==n?n:d.weekStartsOn)&&void 0!==a?a:null===(l=d.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=U(e),g=h.getUTCDay(),u=(g<c?7:0)+g-c;return h.setUTCDate(h.getUTCDate()-u),h.setUTCHours(0,0,0,0),h}function q(e,t){var i,a,n,s,o,r,l,p;R(1,arguments);var d=U(e),c=d.getUTCFullYear(),h=G(),g=J(null!==(i=null!==(a=null!==(n=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==n?n:h.firstWeekContainsDate)&&void 0!==a?a:null===(l=h.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(c+1,0,g),u.setUTCHours(0,0,0,0);var m=V(u,t),b=new Date(0);b.setUTCFullYear(c,0,g),b.setUTCHours(0,0,0,0);var f=V(b,t);return d.getTime()>=m.getTime()?c+1:d.getTime()>=f.getTime()?c:c-1}function X(e,t){for(var i=e<0?"-":"",a=Math.abs(e).toString();a.length<t;)a="0"+a;return i+a}const K=function(e,t){var i=e.getUTCFullYear(),a=i>0?i:1-i;return X("yy"===t?a%100:a,t.length)},ee=function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):X(i+1,2)},te=function(e,t){return X(e.getUTCDate(),t.length)},ie=function(e,t){return X(e.getUTCHours()%12||12,t.length)},ae=function(e,t){return X(e.getUTCHours(),t.length)},ne=function(e,t){return X(e.getUTCMinutes(),t.length)},se=function(e,t){return X(e.getUTCSeconds(),t.length)},oe=function(e,t){var i=t.length,a=e.getUTCMilliseconds();return X(Math.floor(a*Math.pow(10,i-3)),t.length)};var re={G:function(e,t,i){var a=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(a,{width:"abbreviated"});case"GGGGG":return i.era(a,{width:"narrow"});default:return i.era(a,{width:"wide"})}},y:function(e,t,i){if("yo"===t){var a=e.getUTCFullYear();return i.ordinalNumber(a>0?a:1-a,{unit:"year"})}return K(e,t)},Y:function(e,t,i,a){var n=q(e,a),s=n>0?n:1-n;return"YY"===t?X(s%100,2):"Yo"===t?i.ordinalNumber(s,{unit:"year"}):X(s,t.length)},R:function(e,t){return X(_(e),t.length)},u:function(e,t){return X(e.getUTCFullYear(),t.length)},Q:function(e,t,i){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return X(a,2);case"Qo":return i.ordinalNumber(a,{unit:"quarter"});case"QQQ":return i.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(a,{width:"narrow",context:"formatting"});default:return i.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,i){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return X(a,2);case"qo":return i.ordinalNumber(a,{unit:"quarter"});case"qqq":return i.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(a,{width:"narrow",context:"standalone"});default:return i.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,i){var a=e.getUTCMonth();switch(t){case"M":case"MM":return ee(e,t);case"Mo":return i.ordinalNumber(a+1,{unit:"month"});case"MMM":return i.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(a,{width:"narrow",context:"formatting"});default:return i.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,i){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return X(a+1,2);case"Lo":return i.ordinalNumber(a+1,{unit:"month"});case"LLL":return i.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(a,{width:"narrow",context:"standalone"});default:return i.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,i,a){var n=function(e,t){R(1,arguments);var i=U(e),a=V(i,t).getTime()-function(e,t){var i,a,n,s,o,r,l,p;R(1,arguments);var d=G(),c=J(null!==(i=null!==(a=null!==(n=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==n?n:d.firstWeekContainsDate)&&void 0!==a?a:null===(l=d.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1),h=q(e,t),g=new Date(0);return g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0),V(g,t)}(i,t).getTime();return Math.round(a/6048e5)+1}(e,a);return"wo"===t?i.ordinalNumber(n,{unit:"week"}):X(n,t.length)},I:function(e,t,i){var a=function(e){R(1,arguments);var t=U(e),i=Z(t).getTime()-function(e){R(1,arguments);var t=_(e),i=new Date(0);return i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0),Z(i)}(t).getTime();return Math.round(i/6048e5)+1}(e);return"Io"===t?i.ordinalNumber(a,{unit:"week"}):X(a,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):te(e,t)},D:function(e,t,i){var a=function(e){R(1,arguments);var t=U(e),i=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime();return Math.floor((i-a)/864e5)+1}(e);return"Do"===t?i.ordinalNumber(a,{unit:"dayOfYear"}):X(a,t.length)},E:function(e,t,i){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,i,a){var n=e.getUTCDay(),s=(n-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return X(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,i,a){var n=e.getUTCDay(),s=(n-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return X(s,t.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,i){var a=e.getUTCDay(),n=0===a?7:a;switch(t){case"i":return String(n);case"ii":return X(n,t.length);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return i.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,i){var a=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,i){var a,n=e.getUTCHours();switch(a=12===n?"noon":0===n?"midnight":n/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,i){var a,n=e.getUTCHours();switch(a=n>=17?"evening":n>=12?"afternoon":n>=4?"morning":"night",t){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,i){if("ho"===t){var a=e.getUTCHours()%12;return 0===a&&(a=12),i.ordinalNumber(a,{unit:"hour"})}return ie(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ae(e,t)},K:function(e,t,i){var a=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(a,{unit:"hour"}):X(a,t.length)},k:function(e,t,i){var a=e.getUTCHours();return 0===a&&(a=24),"ko"===t?i.ordinalNumber(a,{unit:"hour"}):X(a,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ne(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):se(e,t)},S:function(e,t){return oe(e,t)},X:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return pe(n);case"XXXX":case"XX":return de(n);default:return de(n,":")}},x:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();switch(t){case"x":return pe(n);case"xxxx":case"xx":return de(n);default:return de(n,":")}},O:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+le(n,":");default:return"GMT"+de(n,":")}},z:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+le(n,":");default:return"GMT"+de(n,":")}},t:function(e,t,i,a){return X(Math.floor((a._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,i,a){return X((a._originalDate||e).getTime(),t.length)}};function le(e,t){var i=e>0?"-":"+",a=Math.abs(e),n=Math.floor(a/60),s=a%60;if(0===s)return i+String(n);var o=t||"";return i+String(n)+o+X(s,2)}function pe(e,t){return e%60==0?(e>0?"-":"+")+X(Math.abs(e)/60,2):de(e,t)}function de(e,t){var i=t||"",a=e>0?"-":"+",n=Math.abs(e);return a+X(Math.floor(n/60),2)+i+X(n%60,2)}const ce=re;var he=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},ge=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ue={p:ge,P:function(e,t){var i,a=e.match(/(P+)(p+)?/)||[],n=a[1],s=a[2];if(!s)return he(e,t);switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",he(n,t)).replace("{{time}}",ge(s,t))}};const me=ue;var be=["D","DD"],fe=["YY","YYYY"];function ye(e,t,i){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var we={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function xe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth;return e.formats[i]||e.formats[e.defaultWidth]}}var ve,ke={date:xe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:xe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:xe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Me={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ce(e){return function(t,i){var a;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var n=e.defaultFormattingWidth||e.defaultWidth,s=null!=i&&i.width?String(i.width):n;a=e.formattingValues[s]||e.formattingValues[n]}else{var o=e.defaultWidth,r=null!=i&&i.width?String(i.width):e.defaultWidth;a=e.values[r]||e.values[o]}return a[e.argumentCallback?e.argumentCallback(t):t]}}function Le(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.width,n=t.match(a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth]);if(!n)return null;var s,o=n[0],r=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e){for(var t=0;t<e.length;t++)if(e[t].test(o))return t}(r):function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t].test(o))return t}(r);return s=e.valueCallback?e.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:t.slice(o.length)}}}const De={code:"en-US",formatDistance:function(e,t,i){var a,n=we[e];return a="string"==typeof n?n:1===t?n.one:n.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+a:a+" ago":a},formatLong:ke,formatRelative:function(e){return Me[e]},localize:{ordinalNumber:function(e){var t=Number(e),i=t%100;if(i>20||i<10)switch(i%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:Ce({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ce({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ce({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ce({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ce({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ve={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(ve.matchPattern);if(!i)return null;var a=i[0],n=e.match(ve.parsePattern);if(!n)return null;var s=ve.valueCallback?ve.valueCallback(n[0]):n[0];return{value:s=t.valueCallback?t.valueCallback(s):s,rest:e.slice(a.length)}}),era:Le({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Le({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Le({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Le({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Le({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Se=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Te=/^'([^]*?)'?$/,ze=/''/g,Ee=/[a-zA-Z]/;function Fe(e,t,i){var a,n,s,o,r,l,p,d,c,h,g,u,m,b,f,y,w,x;R(2,arguments);var v=String(t),k=G(),M=null!==(a=null!==(n=null==i?void 0:i.locale)&&void 0!==n?n:k.locale)&&void 0!==a?a:De,C=J(null!==(s=null!==(o=null!==(r=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(p=i.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:k.firstWeekContainsDate)&&void 0!==o?o:null===(c=k.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==s?s:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var L=J(null!==(g=null!==(u=null!==(m=null!==(b=null==i?void 0:i.weekStartsOn)&&void 0!==b?b:null==i||null===(f=i.locale)||void 0===f||null===(y=f.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:k.weekStartsOn)&&void 0!==u?u:null===(w=k.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==g?g:0);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var D=U(e);if(!function(e){if(R(1,arguments),!function(e){return R(1,arguments),e instanceof Date||"object"===H(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=U(e);return!isNaN(Number(t))}(D))throw new RangeError("Invalid time value");var S=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(D),I=function(e,t){return R(2,arguments),function(e,t){R(2,arguments);var i=U(e).getTime(),a=J(t);return new Date(i+a)}(e,-J(t))}(D,S),T={firstWeekContainsDate:C,weekStartsOn:L,locale:M,_originalDate:D};return v.match(Ie).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,me[t])(e,M.formatLong):e})).join("").match(Se).map((function(a){if("''"===a)return"'";var n,s,o=a[0];if("'"===o)return(s=(n=a).match(Te))?s[1].replace(ze,"'"):n;var r=ce[o];if(r)return null!=i&&i.useAdditionalWeekYearTokens||-1===fe.indexOf(a)||ye(a,t,String(e)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==be.indexOf(a))||ye(a,t,String(e)),r(I,a,M.localize,T);if(o.match(Ee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return a})).join("")}function je(e,t){R(2,arguments);var i=U(e),a=U(t);return i.getTime()<a.getTime()}const Ne=(e,i,a,n)=>0===e.length?t("p",{class:"HistoryEmptyMessage"},W("noHistory",n)):t("div",{class:"HistoryList"},e.map((e=>t("div",{key:e.ProgressId,class:"HistoryListItem "+(i.includes(e.ProgressId)?"Opened":"Closed")},t("header",{class:"HistoryListItemHeader","data-id":e.ProgressId,onClick:a},e.Name,t("button",{class:"EngagementSuiteIconButton ArrowDown"})),t("div",{class:"HistoryListItemBody"},t("div",null,e.Levels.map(((e,i)=>t("div",{class:"HistoryListItemLevelCard"},((e,i,a)=>t("div",{class:"HistoryLevelInfo"},t("span",{class:"Level"},`${W("level",a)} ${i+1}`),t("span",{class:"Status"},((e,t)=>{switch(e){case N.Completed:return W("completed",t);case N.Expired:return W("expired",t);case N.Forfeited:return W("forfeited",t);default:return e}})(e.Status,a)),t("span",{class:"Time"},Fe(new Date(e.Time),"LLL d, yyyy HH:mm:ss"))))(e,i,n),(e=>!!e.Rewards&&e.Status===N.Completed)(e)&&((e,i)=>t("div",{class:"HistoryRewardsList"},t("div",{class:"EngagementSuiteIconButton CupRewardList"}),Object.values(e.Rewards).map((e=>((e,i)=>{const a=e.Type===j.Custom,n=a?e.RewardDescription:((e,t)=>{switch(e){case 0:return W("freeSpins",t);case 1:return W("luckyWheel",t);case 2:return W("leaderboard",t);case 3:return W("mission",t)}})(e.Type,i),s=a||e.IsRewarded;return t("div",{class:"HistoryRewardsItem "+(s||a?"IsRewarded":"IsNotRewarded")},t("span",{class:"HistoryRewardsItemName"},n),!a&&t("div",{class:"EngagementSuiteIconButton "+(s?"Check":"Close")}))})(e,i)))))(e,n)))))))))),Pe=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),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.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),2===this.activeTab&&this.sendHistoryRequest()},this.toggleChallengeHistory=e=>{const t=e.currentTarget.getAttribute("data-id"),i=this.openedHistoryIds.findIndex((e=>e===t));i>-1?this.openedHistoryIds.splice(i,1):this.openedHistoryIds.push(t),this.openedHistoryIds=[...this.openedHistoryIds]},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 a=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(a))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:a}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:a,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:a}})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.isJoiningToChallenge=void 0,this.inProgressChallenges=void 0,this.pausedChallengeIds=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.activeTab=1,this.historyLoading=!1,this.challengesHistory=void 0,this.openedHistoryIds=[]}handleEvent(e){const{type:t}=null==e?void 0:e.data;"ChallengesHistoryResponse"===t&&(this.openedHistoryIds=[],this.challengesHistory=e.data.data||[],this.historyLoading=!1),"BarChallengesClick"===t&&(this.activeTab=1,this.openedHistoryIds=[])}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)}sendHistoryRequest(){this.historyLoading=!0,window.postMessage({type:"ChallengesHistoryRequest"})}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.challenges.filter((e=>e.Status!==B.Expired)).reduce(((t,i)=>{const a=new Date(i.ExpirationTime).getTime()-e;let n="00h:00m:00s";if(a<1)this.removeChallenge(i.Id);else{const{days:e,hours:t,minutes:i,seconds:s}={days:String(Math.floor(a/864e5)).padStart(2,"0"),hours:String(Math.floor(a%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(a%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(a%6e4/1e3)).padStart(2,"0")};n="00"===e?`${t}h:${i}m:${s}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:n})}),{})}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===B.InProgress&&!this.pausedChallengeIds.includes(e.ChallengeId),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===B.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.ChallengeId)}isChallengeCompleted(e){return e.Status===B.Completed||e.Status===B.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===B.Completed)return 100;if(this.isChallengePaused(e)||e.Status===B.PendingLevelReward||e.Status===B.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===P.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===P.Fillup||e.ProgressStatus===P.Completed)).slice(-1)[0];return t?t.ProgressPercentage:i?i.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:i}=e,a=e.Status===B.InProgress||e.Status===B.PendingLevelReward;return t("div",{class:"ChallengeCardHeader"},t("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),e.Status!==B.Completed?t("button",{class:`${a?"EngagementSuiteButton Active":"EngagementSuiteButton"} ${this.isJoiningToChallenge||this.pausedChallengeIds.includes(e.ChallengeId)?"Disabled":""}`,onClick:this.changeChallengeStatus,"data-id":i},W(a?"unjoin":"join",this.language)):null)}getChallengeTemplate(e){const i=e.Status===B.Forfeited,a=this.getChallengeProgress(e),n=this.timers[e.Id],s=a>-1?t("casino-engagement-suite-progress-bar",{clientStylingUrl:this.clientStylingUrl,class:this.device,value:a,disabled:this.isChallengePaused(e)},t("span",{slot:"Title",class:"ChallengeCountdown"},n)):t("span",{class:"ChallengeCountdown"},n);return i?this.getForfeitedChallengeTemplate(e):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))))}getForfeitedChallengeTemplate(e){return t("div",{class:"ChallengeCard ForfeitedChallengeCard"},t("div",{class:"ForfeitedChallengeName"},e.ChallengePresentation.PresentationName),t("div",{class:"ForfeitedChallengeInfo"},t("div",null,t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg",alt:"Forfeited"})),t("div",{class:"ForfeitedChallengeMessage"},t("div",null,W("missionHasBeenForfeited",this.language)),t("div",null,W("support",this.language)))))}getHeaderTemplate(){return t("header",{class:"ChallengesListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"ChallengesListPopupHeaderName"},W("missions",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTabTemplate(){return this.challenges.length?t("div",{class:"ChallengesListWrapper"},t("div",{class:"ChallengesList"},[...this.challenges].sort((e=>e.Status===B.InProgress?-1:0)).map((e=>this.getChallengeTemplate(e))))):t("div",{class:"ChallengesListEmpty"},t("h2",null,W("noMissions",this.language)),t("p",null,W("tryOtherGames",this.language)))}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),W("tooltip",this.language)))}getHistoryTabTemplate(){return t("div",{class:"HistoryWrapper"},t("div",{class:"HistoryCols"},t("div",{class:"HistoryColName Level"},W("level",this.language)),t("div",{class:"HistoryColName Status"},W("status",this.language)),t("div",{class:"HistoryColName Time"},W("time",this.language))),this.historyLoading?(e=this.language,t("div",{class:"HistoryLoader"},t("casino-engagement-suite-progress-bar",{indeterminate:!0}),t("span",null,W("loading",e)))):Ne(this.challengesHistory,this.openedHistoryIds,this.toggleChallengeHistory,this.language));var e}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabsWrapper"},t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},W("missions",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},W("history",this.language))))}getTabsContentTemplate(){return 1===this.activeTab?this.getListTabTemplate():this.getHistoryTabTemplate()}render(){return t("div",{key:"50b676f6394d813aa946ed1fd85e9612ba04a7a1",class:`ChallengesListPopup ${this.device}`},this.getHeaderTemplate(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{challenges:["challengesPropHandler"]}}};var Be,Ae;function Oe(){return window.screen.orientation.type.includes("portrait")?"Portrait":"Landscape"}Pe.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.CupRewardList{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg) no-repeat}.EngagementSuiteIconButton.Check{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.EngagementSuiteIconButton.ArrowDown{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesListPopupHeader .EngagementSuiteIconButton{cursor:pointer}.ChallengesListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.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:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.ChallengeCard.InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ForfeitedChallengeCard{cursor:default}.ChallengeName,.ForfeitedChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.ForfeitedChallengeName,.ForfeitedChallengeMessage{color:var(--emw--color-gray-150, #8F8B9C)}.ForfeitedChallengeInfo{margin-top:14px;display:flex;gap:4px}.ForfeitedChallengeMessage{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:15px}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{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:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 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:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.EngagementSuiteTabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.EngagementSuiteTabsWrapper{padding:0 20px;margin:8px 0}.EngagementSuiteTabsWrapper .EngagementSuiteTabs{display:flex;position:relative}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-secondary, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-150, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .EngagementSuiteIconButton.ArrowDown{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .EngagementSuiteIconButton.ArrowDown{transition:transform 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:90px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:100px}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-gray-300, #666178)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Tablet .ChallengesListPopupHeader .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .ChallengesListPopupHeader .EngagementSuiteIconButton{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--font-size-large-plus, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Tablet .ForfeitedChallengeName,.ChallengesListPopup.Desktop .ChallengeName,.ChallengesListPopup.Desktop .ForfeitedChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengesListPopup.Tablet .ForfeitedChallengeMessage,.ChallengesListPopup.Desktop .ForfeitedChallengeMessage{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteButton,.ChallengesListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengesListPopup.Tablet .EngagementSuiteTooltipBackdrop,.ChallengesListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.ChallengesListPopup.Tablet .EngagementSuiteTooltip,.ChallengesListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{cursor:pointer;padding:17px 5px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList{height:24px;flex-basis:24px}',function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(Be||(Be={})),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",e[e.Forfeited=5]="Forfeited"}(Ae||(Ae={}));const We="REWARD_MODAL",He="TARGET_MODAL",Je="SUPPORT_MODAL",Re=class{constructor(t){e(this,t),this.openModal=i(this,"openModal",7),this.closeModal=i(this,"closeModal",7),this.updateLWRemainingTikets=({Message:e})=>{try{const t=JSON.parse(e),i=Number(t.timestamp);i>this.lastTicketRemainingTimestamp?(this.lastTicketRemainingTimestamp=i,(null==t?void 0:t.items)&&(t.items.filter((e=>"wheelOfFortune"===e.programType)).forEach((e=>{const t=this.luckyWheels.find((t=>t.Program.Id.toString()===e.programId));(null==t?void 0:t.Current)&&(t.Current.RemainingTimes=e.remainingTimes)})),this.setRemainingLuckyWheels())):console.warn("Stale event ignored:",t)}catch(e){console.error("Exception when parse TicketRemaining event result",e)}},this.handlePopupClose=(e,t)=>()=>{"showChallengesList"===e&&this.isForfeitedChallengeLabel&&(this.isForfeitedChallengeLabel=!1,this.setChallengePercent()),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.handleFreeSpinsPopupBack=()=>{this.showFreeSpinsDetails=!1,this.showFreeSpinsList=!0},this.handleLuckyWheelsPopupBack=()=>{this.showLuckyWheelsList=!0,this.showLuckyWheelsDetails=!1},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.orientationChangeHandler=()=>{this.orientation=Oe(),this.barHeight=this.barWrapperEl.offsetHeight},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.setValidLuckyWheels=e=>{if(!Array.isArray(e))return;const t=(new Date).getTime();return e.filter((e=>{var i,a;return new Date(null===(i=e.Current)||void 0===i?void 0:i.EndTime).getTime()-t>0&&(null===(a=null==e?void 0:e.Current)||void 0===a?void 0:a.RemainingTimes)>0}))},this.jackpotChangeStatusRequest=e=>{e.stopPropagation();const t=e.currentTarget.getAttribute("data-id");if(this.jackpots=this.jackpots.map((e=>String(t)===String(e.JackpotId)?Object.assign(Object.assign({},e),{Pending:!0}):e)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}const i=this.jackpots.reduce(((e,t)=>(e[t.JackpotId]=t.Pending?!t.Enabled:t.Enabled,e)),{});window.postMessage({type:"JackpotChangeStatusRequest",data:i})},this.onLeaderboardsClose=()=>{this.showLeaderboardWidget=!1,this.activeWidget=""},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.orientation="Landscape",this.device="Mobile",this.showChallengesList=!1,this.showFreeSpinsList=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showFreeSpinsDetails=!1,this.showJackpotDetails=!1,this.showLeaderboardWidget=!1,this.challengePercent=void 0,this.remainingFreeSpins=void 0,this.remainingLuckywheels=void 0,this.highlightChallenge=!1,this.limitStylingAppends=!1,this.activeWidget=void 0,this.challenges=void 0,this.inProgressChallenges=void 0,this.jackpots=[],this.freeSpins=void 0,this.luckyWheels=void 0,this.leaderboards=void 0,this.gameSlug="",this.pausedChallengeIds=[],this.isChallengeLabel=!1,this.isForfeitedSpinsLabel=!1,this.isForfeitedChallengeLabel=!1,this.isJoiningToChallenge=!1,this.selectedChallenge=void 0,this.selectedJackpot=void 0,this.selectedSpin=void 0,this.selectedSpinId=void 0,this.selectedChallengeId=void 0,this.selectedJackpotId=void 0,this.selectedLuckyWheelId=void 0,this.selectedLuckyWheelIndex=void 0,this.barHeight=0,this.lastTicketRemainingTimestamp=0}handleEvent(e){var t;const i=null==e?void 0:e.data,{type:a}=i,n=s(i,["type"]);switch(a){case"ChallengeGrant":{const t=e.data.data.challengeProgressData[0],i=this.challenges.findIndex((e=>$(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"CampaignGrant":this.grantFreeSpinCampaigns(e.data.data);break;case"ForfeitCampaign":{const t=e.data.data.toString();this.freeSpins.find((e=>e.Id===t)).IsForfeited=!0,this.freeSpins=[...this.freeSpins],this.isForfeitedSpinsLabel=!0,this.setRemainingFreeSpins();break}case"ChallengeForfeitNotification":{const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.ChallengeId===e.data.data.ChallengeId));i&&(i.Status=5,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))],this.challenges=[...this.challenges],this.isForfeitedChallengeLabel=!0,this.setSelectedChallenge(),this.setChallengePercent());break}case"ChallengeHasExpired":{const t=e.data.id,i=this.inProgressChallenges.findIndex((e=>e===t));i>-1&&this.inProgressChallenges.splice(i,1),this.setChallengePercent();break}case"FreeSpinHasExpired":this.setRemainingFreeSpins();break;case"BarLeaderboardsClick":this.showLeaderboardWidget=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.activeWidget="Leaderboards";break;case"BarChallengesClick":this.showChallengesList=!0,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.activeWidget="Challenges",this.isChallengeLabel=!1;break;case"BarLuckyWheelsClick":this.showChallengesList=!1,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!0,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="LuckyWheels",this.isChallengeLabel=!1;break;case"BarFreeSpinsClick":this.showFreeSpinsList=!0,this.showChallengesList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.isForfeitedSpinsLabel=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.activeWidget="FreeSpins";break;case"BarJackpotsClick":this.showJackpotsList=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!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.find((e=>e.AwardBonusId===this.selectedSpinId)),this.isForfeitedSpinsLabel=!1,this.showFreeSpinsList=!1,this.showFreeSpinsDetails=!0;break;case"LuckyWheelClick":this.selectedLuckyWheelId=e.data.id,this.selectedLuckyWheelIndex=e.data.index,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!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"UpdateFreeSpinsProgress":this.updateFreeSpinsProgress(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:a}=n.data,s={modalType:(null==a?void 0:a.length)?We:Je,rewardMessage:this.getRewardMessage(e,t),hasError:i};this.openModal.emit(s);break}case"ShowConfirmationModal":this.openModal.emit({modalType:He,confirmationData:n});break;case"ShowNoSpinLeftModal":this.openModal.emit({modalType:"NO_SPIN_LEFT_MODAL",confirmationData:n});break;case"ShowLuckywheelRewardModal":{const{HasError:e,PrizeMessage:t,PrizeText:i,NoPrize:a,NoSpinLeft:s,Assets:o}=n.data;let r=We;e?r=Je:a&&(r="NO_PRIZE_MODAL"),this.setRemainingLuckyWheels(),this.openModal.emit({modalType:r,rewardMessage:t,rewardText:i,hasError:e,noSpinLeft:s,assets:o});break}case"ChallengeJoinRequest":this.isJoiningToChallenge=!0;break;case"JoinChallengeResult":{const{Success:t,JoinId:i,UnjoinId:a}=e.data.data;if(t){i&&this.updateChallengeStatus(i,1,!0),a&&this.updateChallengeStatus(a,0,!1),this.challenges=[...this.challenges];const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));this.selectedChallenge=Object.assign({},e)}this.isJoiningToChallenge=!1,this.closeModal.emit(He),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":this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":this.joinJackpotResult(e.data.data);break;case"TicketRemaining":this.updateLWRemainingTikets(e.data.data)}}componentDidLoad(){this.orientation=Oe(),this.device=function(){const e=navigator.userAgent.toLowerCase(),t=screen.availWidth,i=screen.availHeight;if(e.includes("iphone"))return"Mobile";if(e.includes("ipad"))return"Tablet";if(e.includes("android")){if(i>t&&t<800)return"Mobile";if(t>i&&i<800)return"Tablet"}return"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===Ae.InProgress||e.Status===Ae.PendingLevelReward)).map((e=>e.Id)),this.leaderboards=e.leaderboards,this.jackpots=e.jackpots||[],this.freeSpins=e.freeSpins,this.luckyWheels=this.setValidLuckyWheels(e.luckyWheels),this.gameSlug=e.slug,this.setChallengePercent(),this.setChallengeLabel(),this.setRemainingFreeSpins(),this.setRemainingLuckyWheels(),this.setSpinsForfeitedLabel()}setRemainingLuckyWheels(){this.luckyWheels&&(this.remainingLuckywheels=this.luckyWheels.length?this.luckyWheels.reduce(((e,t)=>e+t.Current.RemainingTimes),0).toString():"-")}setChallengeLabel(){this.challenges&&(this.isChallengeLabel=!!this.challenges.filter((e=>e.IsNew)).length)}setSpinsForfeitedLabel(){var e;this.freeSpins&&(this.isForfeitedSpinsLabel=!!(null===(e=this.freeSpins)||void 0===e?void 0:e.filter((e=>e.IsForfeited)).length))}setChallengePercent(){if(!this.challenges)return;this.highlightChallenge=this.isForfeitedChallengeLabel;const e=this.challenges.find((e=>e.Status===Ae.InProgress));if(e){const t=e.LevelProgresses.find((e=>e.ProgressStatus===Be.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===Be.Fillup||e.ProgressStatus===Be.Completed)).slice(-1)[0];this.highlightChallenge=e.LevelProgresses.every((e=>100===e.ProgressPercentage))||this.isForfeitedChallengeLabel,this.challengePercent=t?`${t.ProgressPercentage}%`:i?`${i.ProgressPercentage}%`:"0%"}else this.challengePercent="—"}setRemainingFreeSpins(){this.freeSpins&&(this.remainingFreeSpins=this.freeSpins.length?this.freeSpins.filter((e=>!e.IsForfeited)).reduce(((e,t)=>e+(t.NumberOfFreeSpins-t.NumberOfUsedFreeSpins)),0).toString():"—")}updateChallengeProgress(e){var t;const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.Id===e.ProgressId));i&&(e.Status===Ae.Completed&&(i.Status=e.Status,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))]),i.LevelProgresses=i.LevelProgresses.map((t=>{var i;const a=null===(i=e.Levels)||void 0===i?void 0:i.find((e=>e.LevelId===t.LevelId));return a?Object.assign(Object.assign({},t),{ProgressPercentage:a.ProgressPercentage,ProgressStatus:a.ProgressStatus}):t})),this.challenges=[...this.challenges]),this.setSelectedChallenge(),this.setChallengePercent()}setSelectedChallenge(){if(this.showChallengeDetails){const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));e&&(this.selectedChallenge=Object.assign({},e))}}updateFreeSpinsProgress(e){var t;const i=null===(t=this.freeSpins)||void 0===t?void 0:t.find((t=>t.AwardBonusId===e.AwardBonusId));if(i&&(i.NumberOfUsedFreeSpins=e.NumberOfUsedFreeSpins,i.VendorFreeSpinsRemainingCost=e.VendorFreeSpinsRemainingCost,this.freeSpins=[...this.freeSpins]),this.showFreeSpinsDetails&&this.selectedSpinId===e.AwardBonusId){const e=this.freeSpins.find((e=>e.AwardBonusId===this.selectedSpinId));e&&(this.selectedSpin=Object.assign({},e))}this.setRemainingFreeSpins()}updateChallengeStatus(e,t,i){var a;const n=null===(a=this.challenges)||void 0===a?void 0:a.find((t=>t.Id===e));n&&(n.Status=t,this.inProgressChallenges=i?[...this.inProgressChallenges,n.Id]:this.inProgressChallenges.filter((e=>e!==n.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))}}updateJackpotStatus(e){if(this.jackpots=this.jackpots.map((t=>String(t.JackpotId)===String(e.JackpotId)?Object.assign(Object.assign({},t),{IsClosed:e.IsClosed,JackpotEndTime:e.JackpotEndTime,Reason:e.Reason}):t)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}joinJackpotResult(e){if(e.Success){const t=Object.keys(e.JackpotIds);if(t.length>0&&(this.jackpots=this.jackpots.map((i=>{const a=t.find((e=>String(e)===String(i.JackpotId)));return a?Object.assign(Object.assign(Object.assign({},i),i.Enabled!==e.JackpotIds[a]&&{Pending:!1}),{Enabled:e.JackpotIds[a]}):i}))),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}}grantFreeSpinCampaigns(e){e.forEach((e=>{const t=this.freeSpins.findIndex((t=>$(new Date(t.ExpiryDate),new Date(e.ExpiryDate))>0));t>-1?this.freeSpins.splice(t,0,e):this.freeSpins.push(e),this.freeSpins=[...this.freeSpins]})),this.setRemainingFreeSpins()}getChallengesWidgets(){return t("div",null,t("div",{class:this.showChallengesList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-challenges-list",{clientStylingUrl:this.clientStylingUrl,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",{clientStylingUrl:this.clientStylingUrl,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",{device:this.device,class:"CasinoEngagementSuiteDialog",leaderboardsInit:this.leaderboards,show:this.showLeaderboardWidget,onClose:this.onLeaderboardsClose}))}getLuckyWheelsWidgets(){return t("div",null,t("div",{class:this.showLuckyWheelsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-luckywheel-list",{class:"CasinoEngagementSuiteDialog",device:this.device,luckyWheels:this.luckyWheels,onClose:this.handlePopupClose("showLuckyWheelsList","showLuckyWheelsDetails")})),t("div",{class:this.showLuckyWheelsDetails?"Backdrop Opened":"Backdrop"},this.showLuckyWheelsDetails&&t("casino-engagement-suite-luckywheel-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,luckyWheels:this.luckyWheels,"selected-index":this.selectedLuckyWheelIndex,class:"CasinoEngagementSuiteDialog",onBack:this.handleLuckyWheelsPopupBack,onClose:this.handlePopupClose("showLuckyWheelsList","showLuckyWheelsDetails")})))}getFreeSpinWidgets(){return t("div",null,t("div",{class:this.showFreeSpinsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-free-spins-list",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),freeSpins:this.freeSpins})),t("div",{class:this.showFreeSpinsDetails?"Backdrop Opened":"Backdrop"},this.showFreeSpinsDetails&&t("casino-engagement-suite-free-spins-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,orientation:this.orientation,class:"CasinoEngagementSuiteDialog",onBack:this.handleFreeSpinsPopupBack,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",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handleJackpotsPopupClose,jackpots:this.jackpots,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})),this.showJackpotDetails&&t("div",{class:"Backdrop Opened"},t("casino-engagement-suite-jackpot-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleJackpotPopupBack,onClose:this.handleJackpotsPopupClose,"game-slug":this.gameSlug,jackpot:this.selectedJackpot,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})))}getRewardMessage(e,t){var i,a,n,s;return(null===(s=null===(n=null===(a=null===(i=this.challenges)||void 0===i?void 0:i.find((t=>t.Id===e)))||void 0===a?void 0:a.LevelProgresses)||void 0===n?void 0:n.find((e=>e.LevelId===t)))||void 0===s?void 0:s.CustomRewardMessage)||""}render(){return t("div",{key:"2078259b3dbfb0d47a5f0836b57127edfb0c29e2",class:`CasinoEngagementSuiteContainer ${this.device} ${this.orientation}`,style:{"--barHeight":`${this.barHeight}px`}},t("div",{key:"0dab66ad89f48dd9453afa96c030f61553267eaf",class:"barWrapper",ref:e=>this.barWrapperEl=e},t("casino-engagement-suite-bar",{key:"a2b78ee1ccae3a08567b7df713ed5d20022e2e93",clientStylingUrl:this.clientStylingUrl,orientation:this.orientation,device:this.device,"active-widget":this.activeWidget,"is-challenge-label":this.isChallengeLabel,"is-spin-forfeited-label":this.isForfeitedSpinsLabel,leaderboards:this.leaderboards,jackpots:this.jackpots,remainingFreeSpins:this.remainingFreeSpins,remainingLuckywheels:this.remainingLuckywheels,highlightChallenge:this.highlightChallenge,"challenge-percent":this.challengePercent,"is-forfeited-challenge-label":this.isForfeitedChallengeLabel})),this.challenges&&this.getChallengesWidgets(),this.freeSpins&&this.getFreeSpinWidgets(),!!this.jackpots.length&&this.getJackpotsWidgets(),this.leaderboards&&this.getLeaderboardsWidgets(),this.luckyWheels&&this.getLuckyWheelsWidgets(),t("casino-engagement-suite-modal-container",{key:"fc1c7ffe210e30571de84fba173f567724d01179",clientStylingUrl:this.clientStylingUrl,device:this.device,isJoiningToChallenge:this.isJoiningToChallenge}))}get host(){return a(this)}};Re.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 Ue=["en"],Ye={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"}},Ge=(e,t)=>{const i=t;return Ye[void 0!==i&&Ue.includes(i)?i:"en"][e]},Qe=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),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.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},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()},this.clientStyling="",this.clientStylingUrl="",this.spin=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.orientation="Landscape",this.isJoiningToChallenge=void 0,this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.activeTab=1,this.visibleGames=[],this.tooltip=!1}componentWillLoad(){this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,t),this.visibleGames=this.spin.GamesInfo.slice(0,this.maxVisibleGames)}getActionsTemplate(){return t("header",{class:"FreeSpinsActions"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),"Mobile"!==this.device&&t("div",{class:"FreeSpinsPopupName"},Ge("freeSpins",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getFreeSpinsHeader(){const{VendorName:e,NumberOfFreeSpins:i,NumberOfUsedFreeSpins:a}=this.spin;return t("div",{class:"FreeSpinsDetailsHeader"},t("span",{class:"FreeSpinsName"},e),t("div",{class:"FreeSpinsCounter"},t("div",{class:"FreeSpinsHighlightedCounter"},i-a),"/",i))}getFreeSpinsCountdown(){const e=this.isExpiredChallenge?"Expired":this.timer,{VendorFreeSpinsCost:i,VendorFreeSpinsRemainingCost:a,CurrencySymbol:n}=this.spin;return t("div",{class:"FreeSpinsCountdown "+(this.isExpiredChallenge?"Expired":"")},e,t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},n,a),"/",n,i))}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},Ge("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},Ge("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,Ge("details",this.language))),this.showDetails&&t("p",{class:"FreeSpinsDescription"},this.spin.FreeSpinCampaignPresentation.Description))}getSpinInfoTemplate(){var e;const{NumberOfFreeSpins:i,NumberOfUsedFreeSpins:a,VendorFreeSpinsCost:n,CurrencySymbol:s,VendorFreeSpinsRemainingCost:o}=this.spin,r="GreenTube"===(null===(e=this.spin)||void 0===e?void 0:e.VendorName);return t("div",null,this.spin.FreeSpinCampaignPresentation.Description&&this.getSpinsDetailsTemplate(),t("div",{class:"FreeSpinsInfo"},t("div",{class:"FreeSpinsInfoItem"},Ge("quantityGranted",this.language),": ",t("span",null,i)),t("div",{class:"FreeSpinsInfoItem"},Ge("quantityLeft",this.language),": ",t("span",null,i-a)),t("div",{class:"FreeSpinsInfoItem"},Ge("valueGranted",this.language),": ",t("span",null,s,n),r&&t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"})),t("div",{class:"FreeSpinsInfoItem"},Ge("valueLeft",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"},Ge("tc",this.language)))))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),Ge("tooltip",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:"EngagementSuiteButton Active FreeSpinsGamesButton",onClick:this.handleLoadMore},Ge("loadMore",this.language)):""]}startCountdown(){this.updateTimer(),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:a,seconds:n}={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:${a}m:${n}s`:`${t}d:${i}h:${a}m`}render(){return t("div",{key:"7799bca46d4a7892440a791eaaedbc966c74cbaa",class:`FreeSpinsDetailsPopup ${this.device} ${this.orientation}`},this.getActionsTemplate(),t("div",{key:"09f9f995dea347d512680f509fd537706d8ce447",class:"FreeSpinsDetails"},this.getFreeSpinsHeader(),this.getFreeSpinsCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.getTooltipTemplate()))}get host(){return a(this)}};Qe.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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.FreeSpinsDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.FreeSpinsDetailsPopup.Disabled .FreeSpinsDetailsHeader{opacity:0.5}.FreeSpinsDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.FreeSpinsDetailsPopup.Disabled .FreeSpinsInfoItem{color:var(--emw--color-gray-150, #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 .FreeSpinsPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px}.FreeSpinsInfo .EngagementSuiteIconButton{margin-left:5px;width:17px;height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.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:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #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}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.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-secondary, #BBB9C3)}.FreeSpinsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.FreeSpinsCounter{display:flex;color:var(--emw--color-secondary, #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-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.FreeSpinsCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs{margin:20px 0 12px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.FreeSpinsInfoItem{display:flex;align-items:center;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-contrast, #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-gray-300, #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-medium, 16px);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 .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsActions,.FreeSpinsDetailsPopup.Desktop .FreeSpinsActions{padding-top:16px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip{padding:24px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right: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 .EngagementSuiteButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteButton{min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsInfoItem,.FreeSpinsDetailsPopup.Desktop .FreeSpinsInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Mobile.Landscape .FreeSpinsGamesListWrapper{overflow:visible}';const $e=["en"],Ze={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",forfeited:"The campaign has been canceled.",support:"Please, contact support."}},_e=(e,t)=>{const i=t;return Ze[void 0!==i&&$e.includes(i)?i:"en"][e]},Ve=class{constructor(t){e(this,t),this.close=i(this,"close",7),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},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.freeSpins=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newSpinIds=[]}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 a=new Date(i.ExpiryDate).getTime()-e;let n="00h:00m:00s";if(a<1)this.removeFreeSpin(i.AwardBonusId);else{const{days:e,hours:t,minutes:i,seconds:s}={days:String(Math.floor(a/864e5)).padStart(2,"0"),hours:String(Math.floor(a%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(a%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(a%6e4/1e3)).padStart(2,"0")};n="00"===e?`${t}h:${i}m:${s}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.AwardBonusId]:n})}),{})}removeFreeSpin(e){const t=this.freeSpins.findIndex((t=>t.AwardBonusId===e));t>-1&&(this.freeSpins.splice(t,1),window.postMessage({type:"FreeSpinHasExpired",awardBonusId:e}))}getFreeSpinClasses(e){return{FreeSpinsCard:!0,Forfeited:e.IsForfeited,FreeSpinsEmptyNumber:e.NumberOfFreeSpins===e.NumberOfUsedFreeSpins}}getChallengeHeaderTemplate(e){const{VendorName:i,NumberOfUsedFreeSpins:a,NumberOfFreeSpins:n,IsForfeited:s}=e,o=n-a;return t("div",{class:"FreeSpinsCardHeader"},t("div",{class:"FreeSpinsName "+(s?"Forfeited":"")},i),s?null:t("div",{class:"FreeSpinsCounter"},t("div",{class:o?"FreeSpinsHighlightedCounter":"FreeSpinsEmptyCounter"},o),"/",n))}getFreeSpinTemplate(e){const i=this.timers[e.AwardBonusId],{VendorFreeSpinsRemainingCost:a,VendorFreeSpinsCost:n,CurrencySymbol:s,IsForfeited:o}=e,r=this.newSpinIds.includes(e.AwardBonusId);return t("div",{class:this.getFreeSpinClasses(e),onClick:this.handleSpinClick,key:e.AwardBonusId,"data-id":e.AwardBonusId},o?null:t("div",{class:"SpinLabel "+(r?"ShowSpinLabel":"")},t("span",null,_e("new",this.language))),this.getChallengeHeaderTemplate(e),o?t("div",{class:"ForfeitedMessage"},t("div",null,_e("forfeited",this.language)),t("div",null,_e("support",this.language))):t("div",{class:"FreeSpinsCountdownWrapper"},t("span",{class:"FreeSpinsCountdown"},i),t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},s,a),"/",s,n)))}getHeaderTemplate(){return t("header",{class:"FreeSpinsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"FreeSpinsListPopupHeaderName"},_e("freeSpins",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}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,_e("noSpins",this.language)),t("p",null,_e("tryOtherGames",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),_e("tooltip",this.language))):""}render(){return t("div",{key:"9c101942a2d381d77e82ec49a0f33bb34e5f5191",class:`FreeSpinsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{freeSpins:["spinsPropHandler"]}}};Ve.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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.FreeSpinsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.FreeSpinsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 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:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.FreeSpinsCard.Forfeited{cursor:auto;pointer-events:none}.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:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.FreeSpinsName.Forfeited{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsCounter{display:flex;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsHighlightedCounter,.FreeSpinsEmptyCounter{font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.FreeSpinsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.FreeSpinsEmptyCounter{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsListEmpty{padding:20px 32px}.FreeSpinsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "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-secondary, #BBB9C3)}.FreeSpinsCountdownWrapper{display:flex;justify-content:space-between;align-items:flex-start}.FreeSpinsCountdown,.ForfeitedMessage{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ForfeitedMessage{line-height:1.2}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.SpinLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 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-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowSpinLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.FreeSpinsEmptyNumber .FreeSpinsName,.FreeSpinsEmptyNumber .FreeSpinsCountdown,.FreeSpinsEmptyNumber .FreeSpinsRemainCounter{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeader,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeader{padding-top:16px}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeaderName,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.FreeSpinsListPopup.Tablet .EngagementSuiteIconButton,.FreeSpinsListPopup.Desktop .EngagementSuiteIconButton{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 .EngagementSuiteTooltipBackdrop,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.FreeSpinsListPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}';const qe=["en"],Xe={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",betContribution:"Bet Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot is won!",loadMore:"Load More",jackpotDetails:"Jackpot Details",minBet:"Min Bet",maxBet:"Max Bet",Suspended:"Suspended",Closed:"Closed",betContributionTooltip:"A % of the bet that will be added to jackpot funds (current and next jackpot amounts).",operatorContributionTooltip:"This jackpot is covered by the casino.",partialWins:"Partial wins",gameLimit:"Full game list in Terms and Conditions \n or Contact Support"}},Ke=(e,t)=>{const i=t;return Xe[void 0!==i&&qe.includes(i)?i:"en"][e]};function et(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}const tt=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),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.toggleTooltip=e=>{if(this.tooltip)this.tooltip="";else{const t=e.currentTarget.getAttribute("data-tooltip");this.tooltip=Ke(t,this.language)}},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}})},this.clientStyling="",this.clientStylingUrl="",this.jackpot=void 0,this.jackpotChangeStatusRequest=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.enabled=!1,this.balance=void 0,this.winBalance=void 0,this.showDetails=!1,this.jackpotEndTime="",this.tooltip="",this.partialWins=""}handleEvent(e){const{type:t,data:i}=null==e?void 0:e.data;switch(t){case"UpdateJackpotStatus":this.jackpot.JackpotId===e.data.data.JackpotId&&this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":i.Success&&this.jackpot.JackpotId in i.JackpotIds&&(this.enabled=this.jackpot.Enabled=i.JackpotIds[this.jackpot.JackpotId])}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames(),this.tooltip=""}componentWillLoad(){this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance,this.jackpotEndTime=this.jackpot.JackpotEndTime,this.disabledStatus=this.jackpot.Reason||"",this.partialWins=this.formatPartHits(this.jackpot.PartHits),this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}formatPartHits(e){return e.filter((e=>100!==e)).sort(((e,t)=>t-e)).map((e=>`${e}%`)).join(", ")}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,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.jackpotEndTime=e.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return t("div",{class:"JackpotDetailsNavigation"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),t("div",{class:"JackpotPopupName"},Ke("jackpots",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getJackpotBalance(){return et(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{EngagementSuiteButton:!0,Active:this.enabled,Loading:this.jackpot.Pending}}getJackpotDetailsHeaderTemplate(){const e=je(new Date(this.jackpot.JackpotEndTime),new Date)||!!this.disabledStatus;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:e,onClick:this.jackpotChangeStatusRequest,class:this.getJoinButtonClasses(),"data-id":this.jackpot.JackpotId},Ke(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&t("div",{class:"JackpotIsWon"},Ke("jackpotIsWon",this.language))))}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},Ke("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},Ke("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,Ke("jackpotDetails",this.language))),this.showDetails&&t("div",{class:"JackpotDetailsContent"},this.jackpot.Description&&t("p",{class:"JackpotDescription"},this.jackpot.Description),this.jackpot.JackpotRulesUrl&&t("a",{class:"TermsAndConditions",href:this.jackpot.JackpotRulesUrl,target:"_blank"},Ke("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var e,i,a,n;if(this.jackpot.BetLimits){const s=this.jackpot.Currency,o=Object.keys(this.jackpot.BetLimits),r=o.find((e=>e===s))||o[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),d=et(null===(a=this.jackpot.BetLimits[r])||void 0===a?void 0:a.MinBet,r),c=et(null===(n=this.jackpot.BetLimits[r])||void 0===n?void 0:n.MaxBet,r);return t("div",null,l&&t("div",{class:"JackpotInfoItem"},Ke("minBet",this.language),": ",t("span",null,d)),p&&t("div",{class:"JackpotInfoItem"},Ke("maxBet",this.language),": ",t("span",null,c)))}}getPartialWins(){return t("div",{class:"JackpotInfoItem"},t("div",{class:"JackpotInfoItemProperty"},Ke("partialWins",this.language),": "),t("span",null,this.partialWins))}getJackpotInfoTemplate(){var e;return t("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),t("div",{class:"JackpotInfo"},"Static"!==this.jackpot.JackpotTypePresentation&&t("div",{class:"JackpotInfoItem"},Ke("betContribution",this.language),": ",t("span",null,+this.jackpot.ContributionPercent,"%"),t("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"betContributionTooltip",onClick:this.toggleTooltip})),t("div",{class:"JackpotInfoItem"},Ke("type",this.language),": ",t("span",null,this.jackpot.JackpotTypePresentation)),t("div",{class:"JackpotInfoItem"},Ke("winningProbability",this.language),": ",t("span",null,"1:",this.jackpot.Probability)),t("div",{class:"JackpotInfoItem"},Ke("operatorContribution",this.language),": ",t("span",null,+this.jackpot.OperatorContributionPercent,"%"),t("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"operatorContributionTooltip",onClick:this.toggleTooltip})),this.getBetLimitsRange(),(null===(e=this.jackpot.PartHits)||void 0===e?void 0:e.length)>1&&this.getPartialWins()))}getGamesTemplate(){const e=!!this.jackpot.TotalGamesCount&&this.jackpot.TotalGamesCount>this.jackpot.GamesInfo.length&&this.visibleGames.length===this.jackpot.GamesInfo.length,i=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"},i),e&&t("div",{class:"GameLimitMessage"},Ke("gameLimit",this.language))),this.visibleGames.length<this.jackpot.GamesInfo.length?t("button",{class:"EngagementSuiteButton Active JackpotGamesButton",onClick:this.handleLoadMore},Ke("loadMore",this.language)):""]}getJackpotCountdown(){const e=Ke(this.disabledStatus,this.language)||this.timer;return t("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},e)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.jackpotEndTime).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:a,seconds:n}={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:${a}m:${n}s`:`${t}d:${i}h:${a}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus||je(new Date(this.jackpot.JackpotEndTime),new Date),[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return t("div",{key:"1566b4539220be1c5b5c72cf4a4288161b4a2537",class:this.getPopupClasses()},this.getTopNavigationTemplate(),t("div",{key:"1e8fa5324f9ee96905f56a46f53e9e147410719c",class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate()))}get host(){return a(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};tt.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.EngagementSuiteButton.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF);text-transform:capitalize}.EngagementSuiteTabs{margin-top:20px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px;display:flex;align-items:center}.JackpotInfoItem .JackpotInfoItemProperty{align-self:flex-start;white-space:nowrap}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .EngagementSuiteIconButton.Help{margin-left:5px}.JackpotGamesListWrapper{margin-top:12px;overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg")}.JackpotDetailsButton .Open{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-contrast, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.GameLimitMessage{margin-top:14px;font-size:var(--emw--font-size-x-small, 12px);min-height:50px;border-radius:var(--emw--border-radius-x-small, 2px);background-color:var(--emw--color-background-transparency-30, rgba(64, 57, 86, 0.3));display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre-line;color:var(--emw--color-secondary, #BBB9C3)}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton{min-width:98px;min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton.JackpotGamesButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton.JackpotGamesButton{min-width:140px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.JackpotDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotGamesListWrapper,.JackpotDetailsPopup.Desktop .JackpotGamesListWrapper{margin-top:20px}.JackpotDetailsPopup.Tablet .GameLimitMessage,.JackpotDetailsPopup.Desktop .GameLimitMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:17px;min-height:60px;border-radius:var(--emw--border-radius-medium, 6px)}';const it=["en"],at={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",Closed:"Closed Jackpot",allJackpotsClosed:"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",contributionTooltip:"This jackpot is covered by the casino."}},nt=(e,t)=>{const i=t;return at[void 0!==i&&it.includes(i)?i:"en"][e]},st=class{constructor(t){e(this,t),this.close=i(this,"close",7),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=null},this.toggleTooltip=e=>{e.stopPropagation(),this.tooltip=this.tooltip?null:nt(e.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=e=>{e.stopPropagation()},this.handleJackpotClick=e=>{const t=+e.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:t})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.jackpotChangeStatusRequest=void 0,this.tooltip=null,this.timers={},this.limitStylingAppends=!1}jackpotsPropHandler(e){!this.interval&&e.length&&this.startCountdown(),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.jackpots.reduce(((t,i)=>{const a=new Date(i.JackpotEndTime).getTime()-e;let n="00h:00m:00s";const{days:s,hours:o,minutes:r,seconds:l}={days:String(Math.floor(a/864e5)).padStart(2,"0"),hours:String(Math.floor(a%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(a%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(a%6e4/1e3)).padStart(2,"0")};return n="00"===s?`${o}h:${r}m:${l}s`:`${s}d:${o}h:${r}m`,Object.assign(Object.assign({},t),{[i.JackpotId]:n})}),{})}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,JackpotCardClosed:e.IsClosed||je(new Date(e.JackpotEndTime),new Date),InProgress:e.Enabled&&!e.IsClosed}}getJackpotHeaderTemplate(e){const i=!!e.WinBalance,a=nt(e.Type,this.language),n=nt(e.Reason,this.language),s=(null==e?void 0:e.IsClosed)?n:a,o=`JackpotBalance Jackpot${nt(e.Type,this.language)}`,r=e.Enabled?"EngagementSuiteButton Active":"EngagementSuiteButton",l=nt(e.Enabled?"unjoin":"join",this.language),p=e.Pending||(null==e?void 0:e.IsClosed)||je(new Date(e.JackpotEndTime),new Date);return t("div",{class:"JackpotCardHeader"},t("div",{class:"JackpotTitle"},t("span",{class:"JackpotName"},s),t("span",{class:o},function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(e.Balance,e.Currency))),t("div",{class:"JackpotActions"},t("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":e.JackpotId,disabled:p},l)),i&&t("span",{class:"JackpotWon"},nt("jackpotIsWon",this.language)))}getJackpotDescriptionTemplate(e){const i=+e.OperatorContributionPercent+"%",a=`1:${e.Probability}`,n=je(new Date(e.JackpotEndTime),new Date)?nt("outdatedJackpotCountdown",this.language):this.timers[e.JackpotId],s=nt("operatorContribution",this.language),o=nt("type",this.language),r=nt("winningProbability",this.language);return t("div",{class:"JackpotCardDescription"},!e.IsClosed&&t("span",{class:"JackpotCountdown"},n),t("div",{class:"JackpotCardDescriptionBlock"},t("div",{class:"JackpotCardDescriptionRow"},t("span",null,s,":"),t("span",{class:"JackpotDescriptionValue"},i,t("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,a),this.renderDescriptionRowInfo(`${o}:`,e.JackpotTypePresentation),t("a",{href:e.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},nt("termsAndConditions",this.language))))}renderDescriptionRowInfo(e,i){return t("div",{class:"JackpotCardDescriptionRow"},t("span",null,e),t("span",{class:"JackpotDescriptionValue"},i))}getJackpotTemplate(e){return t("div",{class:this.getJackpotClasses(e),onClick:this.handleJackpotClick,key:e.JackpotId,"data-id":e.JackpotId},this.getJackpotHeaderTemplate(e),this.getJackpotDescriptionTemplate(e))}getHeaderTemplate(){return t("header",{class:"JackpotsListPopupHeader"},t("button",{onClick:this.toggleTooltip,"data-tooltip":"tooltip",class:"EngagementSuiteIconButton Help"}),t("div",{class:"JackpotsListPopupHeaderName"},nt("jackpots",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){const e=this.jackpots.every((e=>e.IsClosed));return this.jackpots.length?t("div",{class:"JackpotsListWrapper"},e&&t("div",{class:"JackpotsListClosed"},t("h2",null,nt("allJackpotsClosed",this.language))),t("div",{class:"JackpotsList"},this.jackpots.map((e=>this.getJackpotTemplate(e))))):t("div",{class:"JackpotsListClosed"},t("h2",null,nt("allJackpotsClosed",this.language)))}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return t("div",{key:"9fd4d384af0ee639e14925c797fe28bc71beb586",class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};var ot,rt,lt,pt,dt,ct,ht,gt,ut,mt;st.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.JackpotsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 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-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.JackpotCard.InProgress::before{content:"";position:absolute;pointer-events:none;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-x-small, 12px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));position:absolute;right:0;bottom:-6px}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px;position:relative}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.JackpotMega{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%))}.JackpotMajor{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%))}.JackpotMinor{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%))}.JackpotBalance,.JackpotWon{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-bold, 700);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium-plus, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:var(--emw--font-weight-semibold, 600);margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{border-radius:99px}.EngagementSuiteButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);font-weight:var(--emw--font-weight-normal, 400)}.JackpotCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-bottom:12px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Mobile .JackpotCardDescriptionRow:nth-child(3){flex-basis:50%}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotsListPopup.Tablet .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotsListPopup.Tablet .EngagementSuiteButton,.JackpotsListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large-plus, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotsListPopup.Tablet .EngagementSuiteTooltip,.JackpotsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}',function(e){e.ActiveTickets="ActiveTickets",e.ImplicitTickets="ImplicitTickets",e.RemainingTimes="RemainingTimes"}(ot||(ot={})),function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise",e[e.outward=0]="outward"}(rt||(rt={})),function(e){e.fulfilled="fulfilled",e.drawn="drawn"}(lt||(lt={})),function(e){e.noPrize="noprize",e.luckywheel="luckywheel",e.bonus="bonus"}(pt||(pt={})),function(e){e.Arrow="Arrow",e.Partition="Partition"}(dt||(dt={})),function(e){e.DownFromTop="DownFromTop",e.UpFromCenter="UpFromCenter",e.DownFromCenter="DownFromCenter",e.UpFromBottom="UpFromBottom"}(ct||(ct={})),function(e){e.en="en",e.fr="fr",e.de="de",e.tr="tr"}(ht||(ht={})),function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise",e[e.outward=0]="outward"}(gt||(gt={})),function(e){e.launch="launch",e.loop="loop",e.halt="halt"}(ut||(ut={})),function(e){e.quad="quad",e.cubic="cubic",e.quart="quart",e.quint="quint",e.expo="expo",e.sine="sine",e.circ="circ"}(mt||(mt={}));const bt=(e,t)=>{Object.keys(t).map((i=>{e.setAttribute(i.split(/(?=[A-Z])/).map((e=>e.toLocaleLowerCase())).join("-"),t[i])}))},ft=e=>new Promise((t=>{let i=document.createElementNS("http://www.w3.org/2000/svg","image");i.onload=()=>t(i),i.onerror=()=>t(i),i.href.baseVal=e})),yt=e=>({x:e,y:e}),wt=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),xt={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},vt=async(e,t)=>{let i=((e,t)=>{const i=e.map((e=>{const i={};return Object.keys(e).map((a=>{"object"==typeof e[a]&&e[a]&&(i["Image1"===a?"Image":a]=e[a][t]||e[a]["*"])})),i}));return(e=>{let t=0;return e.map((e=>{t+=Number(e.probability)})),t})(e)<1&&i.push(xt),i})(e.Program.WheelOfFortune.Partitions,t);return i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?i.map((e=>{if(e.Image){const t=document.createElementNS("http://www.w3.org/2000/svg","image");return t.href.baseVal=e.Image,Object.assign(Object.assign({},e),{Image:t})}return e})):await Promise.all(i.map((async e=>Object.assign(Object.assign({},e),await(async e=>e?{Image:await ft(e)}:{})(e.Image))))),i},kt={in:{quad:e=>Math.pow(e,2),cubic:e=>Math.pow(e,3),quart:e=>Math.pow(e,4),quint:e=>Math.pow(e,5),sine:e=>1-Math.cos(e*Math.PI/2),expo:e=>0===e?0:Math.pow(2,10*e-10),circ:e=>1-Math.sqrt(1-Math.pow(e,2))},out:{quad:e=>1-Math.pow(1-e,2),cubic:e=>1-Math.pow(1-e,3),quart:e=>1-Math.pow(1-e,4),quint:e=>1-Math.pow(1-e,5),sine:e=>Math.sin(e*Math.PI/2),expo:e=>1===e?1:1-Math.pow(2,-10*e),circ:e=>Math.sqrt(1-Math.pow(e-1,2))}},Mt={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},Ct={in:{quad:e=>2*e,cubic:e=>3*e**2,quart:e=>4*e**3,quint:e=>5*e**4,sine:e=>Math.PI/2*Math.sin(Math.PI/2*e),expo:e=>10*Math.LN2*2**(10*e-10),circ:e=>-.5*(1-e**2)**-.5},out:{cubic:e=>3*e**2-6*e+3}},Lt=[{launchTurns:5,launchSpeed:.2,loopSpeed:15,haltTurns:2,haltSpeed:.16},{launchTurns:2,launchSpeed:.5,loopSpeed:20,haltTurns:2,haltSpeed:.22},{launchTurns:6,launchSpeed:1.38,loopSpeed:45,haltTurns:6,haltSpeed:.5}],Dt=e=>Object.keys(e).map((t=>e[t]));var St;!function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise"}(St||(St={}));class It{constructor({size:e,radius:t,options:i,themeIndex:a,contentdirection:n}){this.arrowmode=ct.DownFromTop,this.convertDegToArc=e=>e*Math.PI/180,this.convertArcToDeg=e=>180*e/Math.PI%360,this.getArcDelta=e=>2*Math.PI/e,this.findDeg=(e,t)=>e*this.convertArcToDeg(this.getArcDelta(t)),this.angleTransform=e=>{switch(e){case ct.DownFromTop:case ct.UpFromCenter:return-Math.PI/2;case ct.DownFromCenter:case ct.UpFromBottom:return Math.PI/2}},this.contentdirection=n,this.center=e/2,this.ratio=e/375,this.options=i,this.length=i.length,this.themeIndex=a,this.radius=t}get sizeImage(){const e=e=>48*this.ratio*5/e;if(this.length<=3)return e(4);switch(this.length){case 8:case 7:return 24*this.ratio;case 6:return 36*this.ratio;case 5:return 48*this.ratio;case 4:return 56*this.ratio;default:return e(this.length)}}getSizeImageByPartition(e){return this.options[e].Name?this.sizeImage/2:this.sizeImage}getSvgImageProps(e,t=1.25){const i=this.getSizeImageByPartition(e);let a;return a=this.options[e].Name?this.radius-i/2-3*this.ratio:(this.radius-i/2)/Number(t)-3*this.ratio,Object.assign(Object.assign({},this.getPropsForPartitionInfo(e,this.getOffsetImage(i),a,gt.outward)),{width:170===this.center?24:32,height:170===this.center?24:32})}getSvgTextProps(e,t){const i=this.getSizeImageByPartition(e);let a;return a=this.options[e].Image?this.radius-i-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(e,this.offsetText,a,void 0,t))}getSvgTextPropsAdjustedByImage(e,t){let i,a;this.options.length<=8?(i="Mobile"!==t?68:55,a=60):this.options.length<=12?(i=55,a="Mobile"!==t?60:40):this.options.length<=16&&(i="Mobile"!==t?53:47,a=60);const n=this.getSvgTextProps(e,{width:i,height:a});return Object.assign({},n)}get offsetText(){return{center:0,position:{x:0,y:0},transform:{x:0,y:0}}}getOffsetImage(e){return{center:0,position:{x:-1*e/2,y:-1*e/2},transform:{x:0,y:0}}}get direction(){return St.clockwise}getAngleSelf(e,t){return 360*e/this.length*this.direction+360*(void 0!==t?t:gt[this.contentdirection])}getPartitionPositions(e,t,i){const a=this.angleTransform(this.arrowmode)+this.direction*e*2*Math.PI/this.length,n=((e,t,i)=>{const a=yt(i);return{x:a.x+e*Math.cos(t),y:a.y+e*Math.sin(t)}})(t||this.radius-9*this.ratio,a,this.center+i.center);return{transformOrigin:wt(n,i.transform),point:wt(n,i.position)}}getPropsForPartitionInfo(e,t,i,a,n){const{point:s,transformOrigin:o}=this.getPartitionPositions(e,i,t),r=0===a?(this.options.length>=12?-2:0)-7:s.x-32,l=0===a?170===this.center?70:76.5:s.y;return Object.assign(Object.assign({},s),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(e,a)}deg) translate(${r}px, ${l}px)`,"transform-origin":`${p=o,Object.keys(p).map((e=>`${p[e]}px`)).join(" ")}`,height:`${null==n?void 0:n.height}px`,width:`${null==n?void 0:n.width}px`}});var p}getPartitionDraw(e){const t=yt(this.center),i=yt(this.radius),{point:a,pointNext:n}=((e,t,i,a)=>{const n=e=>((e,t,i,a)=>{const n=Math.PI/180*(360/t*(e-.5)-90),s=yt(a),o=yt(i);return{x:s.x+o.x*Math.cos(n),y:s.y+o.y*Math.sin(n)}})(e,t,i,a);return{point:n(e),pointNext:n(e+1)}})(e,this.length,this.radius,this.center);return{d:["M",...Dt(t),"L",...Dt(a),"A",...Dt(i),"0 0 1",...Dt(n),"Z"].join(" ")}}getDeg(e){return this.findDeg(this.length-e,this.length)}getSpinnerProps(){const e=yt(this.center);return{"transform-origin":`${e.x} ${e.y}`}}}class Tt{constructor(e){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=mt.cubic,this.param=Lt[2],this.halt=(e,t=(()=>{}))=>{this.shouldHalt=()=>{this.step=ut.halt,this.cb=()=>{t(),this.setDeg(e,0)},this.degTarget=e+360*this.param.haltTurns,this.continueRepeat()}},this.continueRepeat=()=>setTimeout((()=>this.ticker()),30),this.ticker=()=>{const e=this.param.loopSpeed,t=e=>33*Mt[this.easingType]*e/this.param.loopSpeed,i=()=>{const e=360*this.param.launchTurns-this.deg,i=t(e);this.animateF(i,this.deg,e,kt.in[this.easingType],Ct.in[this.easingType])},a=()=>{const e=t(this.degTarget);this.animateF(e,0,this.degTarget,kt.out[this.easingType],Ct.out[this.easingType])},n=()=>{this.setDeg((this.deg+e)%360,Mt[this.easingType]),this.continueRepeat()};({[ut.launch]:()=>{this.cb=()=>{this.step=ut.loop,this.setDeg(e,Mt[this.easingType]),this.continueRepeat()},i()},[ut.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():n()},[ut.halt]:()=>{this.deg===360-e?a():n()}})[this.step]()},this.setDeg=(e,t)=>{this.deg=e,this.tick(e,t)},this.animateF=(e,t,i,a,n)=>{let s=null;const o=()=>{let r=(new Date).getTime();s||(s=r);const l=r-s,p=i*a(l/e)+t,d=Math.abs(n(l/e));this.setDeg(p,d),l<e?setTimeout((()=>o()),30):this.cb()};o()},this.animate=(e,t,i,a,n)=>{let s=null;window.cancelAnimationFrame(s);let o=null;const r=l=>{o||(o=l);const p=l-o,d=i*a(p/e)+t,c=Math.abs(n(p/e));this.setDeg(d,c),p<e?s=window.requestAnimationFrame(r):this.cb()};s=window.requestAnimationFrame(r)},this.tick=e.tick}launch(){this.shouldHalt=void 0,this.step=ut.launch,this.ticker()}}const zt=class{constructor(t){e(this,t),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.renderImage=(e,t)=>{const i=this.options[t].Image;bt(i,this.settings.getSvgImageProps(t)),e.innerHTML=null,e.appendChild(i)},this.updateSpinable=()=>{this.spinable=!!(this.luckywheel.Current&&Number(this.luckywheel.Current.RemainingTimes)>0)},this.eventSpin=()=>{this.updateSpinable(),this.spinable&&!this.isSpinning&&(this.isSpinning=!0,this.spinContainer=this.svg.querySelector("g.PartitionsContainer"),this.spinner.launch(),window.postMessage({type:"SpinLuckyWheel",data:{lotteryProgramID:this.luckywheel.Program.Id}}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckywheel=void 0,this.size="440",this.contentdirection="anticlockwise",this.limitStylingAppends=!1,this.isPartitionsCustomableReady=!1,this.isSpinning=!1,this.options=void 0,this.radius=.85*Number(this.size)/2,this.speed=0,this.settings=void 0,this.svg=void 0,this.spinContainer=void 0,this.spinable=void 0,this.spinner=void 0}handleEvent(e){const{type:t,data:i}=null==e?void 0:e.data;if("SpinLuckyWheelRes"===t&&this.isSpinning){const e=+i.Result.WheelOfFortunePartitionIndex||0;i.State===lt.fulfilled?this.handleSpinResult(i,e):this.handleSpinError(e)}}handleSpinError(e){const t=this.settings.getDeg(e);this.spinner.halt(t,(()=>{this.isSpinning=!1,this.updateSpinable(),window.postMessage({type:"ShowLuckywheelRewardModal",data:{HasError:!0,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes)}})}))}handleSpinResult(e,t){if(this.luckywheel.Program.Id===e.LotteryProgramID){const i=this.settings.getDeg(t);this.spinner.halt(i,(()=>{var i;this.isSpinning=!1,this.updateSpinable();const a=this.luckywheel.Program.WheelOfFortune.Partitions[t],n=null===(i=e.Result.Outcomes)||void 0===i?void 0:i.some((e=>{var t;return(null===(t=e.Action)||void 0===t?void 0:t.Type)===pt.noPrize})),s=(null==a?void 0:a.PrizeImage[this.language])||(null==a?void 0:a.PrizeImage["*"]);window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeText:(null==a?void 0:a.PrizeText[this.language])||(null==a?void 0:a.PrizeText["*"]),PrizeMessage:(null==a?void 0:a.Name[this.language])||(null==a?void 0:a.Name["*"]),NoPrize:n,HasError:!1,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes),Assets:s}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await vt(this.luckywheel,ht.en),this.settings=new It({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new Tt({tick:(e,t)=>{bt(this.spinContainer,{style:[`transform: rotate(${e}deg)`,`height: ${this.size}px`,`width: ${this.size}px`].join(";")}),this.speed=.5*t}})}defineGeneralVariables(){return{"--length":`${this.options.length}`,"--radius":`${this.radius}`,"--ratio":""+Number(this.size)/480,"--size":`${this.size}`}}setSvgSize(e){if(!e||!this.size)return;const t=this.size.toString();e.getAttribute("width")!==t&&e.setAttribute("width",t),e.getAttribute("height")!==t&&e.setAttribute("height",t)}render(){const e={height:`${this.size}px`,width:`${this.size}px`};return t("div",{key:"e466a34c9a4526c2379aa601462c65cb65f5a445",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},t("svg",{key:"04b74322b3651a364a92777984b008fe845c16f0",width:this.size,height:this.size,ref:e=>{this.svg=e}},t("foreignObject",{key:"f18c832a86c1474e510cae219eae78b44667b07e",ref:this.setSvgSize.bind(this),class:"Bottom Customable"},t("div",{key:"b0adaa4e02d6394293ed3e4cc4a2331b46cc9fd1",style:e})),t("g",Object.assign({key:"9c08d5fa3cb3bde27b641f71fa2bbc0612b0b93f",class:"PartitionsContainer"},this.settings.getSpinnerProps()),t("g",{key:"cbdc31800e068702b0dc50ced9139c25e8e30785",class:"PartitionsBackgrounds"},this.options.map(((i,a)=>t("foreignObject",{ref:this.setSvgSize.bind(this),"clip-path":`url(#clip${a})`,class:"PartitionBackground Customable",style:Object.assign({"--index":a.toString()},e)},t("div",{style:e}))))),t("g",{key:"af8c9da33f138918e81b80ae691c9a58bbd9232b",class:"PartitionsBackgroundStrokes"},this.options.map(((e,i)=>t("path",Object.assign({class:"PartitionBackgroundStroke"},this.settings.getPartitionDraw(i),{width:this.size,height:this.size}))))),t("g",{key:"6ccca1f63545eae71d024ee5da59d0149607e3d1",class:"Partitions",style:{filter:this.speed>.3?`blur(${this.speed}px)`:""}},this.options.map(((e,i)=>[e.Image&&t("g",Object.assign({class:`PartitionImage PartitionImage${i}`,ref:e=>this.renderImage(e,i)},this.settings.getSvgImageProps(i))),e.Name&&t("foreignObject",Object.assign({class:"PartitionText",ref:e=>{if(e){const t=this.options.length>6?"55":"75";e.setAttribute("width",t),e.setAttribute("height",t)}}},this.settings.getSvgTextPropsAdjustedByImage(i,this.device)),t("div",{class:"PartitionTextEntityContainer"},t("p",{class:`PartitionTextEntity${"clockwise"===this.settings.contentdirection?"":" Anticlockwise"} ${this.device}`,innerHTML:e.Name})))])))),t("g",{key:"a367d23565a8cb54f6435cb120f377d934ebeca1",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((i,a)=>t("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition1 Customable",style:{"--index":a.toString()}},t("div",{style:e}))))),t("g",{key:"dbccc30fa53f944b63454d83cab4cae7ab787cb0",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((i,a)=>t("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition2 Customable",style:{"--index":a.toString()}},t("div",{style:e}))))),t("foreignObject",{key:"6ad80cb9533ec295bad090831532250cd35afd7e",ref:this.setSvgSize.bind(this),class:"Middle Customable",style:e},t("div",{key:"ba0afa07f997acf338118c1e07e4ad5446db65c1",style:e})),t("foreignObject",{key:"766381cdd2cc4b9c5243a0a78306e8329a208693",ref:this.setSvgSize.bind(this),class:"Top Customable",style:e},t("div",{key:"83df3eb57328d3eda101f90515ef6993253513e9",style:e})),t("g",{key:"d2c1b67fddb67ccc613c31b06a9daa6921eba5f2",class:{spinning:this.isSpinning,Center:!0}},t("foreignObject",{key:"a3353eb0e5d764c867f8193a5d8f7c96b18add80",ref:e=>{e&&(e.setAttribute("width","100"),e.setAttribute("height","100"))},style:{transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}},t("div",{key:"38948f9a684ef29dc3ff0c4f8d98972cc2b32e25",style:{width:"100px",height:"100px",cursor:"pointer"},onClick:this.eventSpin}))),t("g",{key:"6f0a40abf872f17825ecd63a25970a0a89417728"},this.options.map(((e,i)=>t("clipPath",{id:`clip${i}`},t("path",Object.assign({},this.settings.getPartitionDraw(i)))))))))}get host(){return a(this)}};var Et,Ft;zt.style=':host{font-family:Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.LotteryProgramWof{background:var(--emw--color-contrast, #07072A);display:flex;align-items:center;flex-direction:column;padding:20px 0}main{max-width:600px;width:100%;display:flex;justify-content:space-around;min-height:200px}svg{transition:opacity 0.3s}.WheelContainer{text-align:center}.FortuneContainer{width:100%;display:flex;align-items:center;flex-direction:column}.Center{cursor:pointer;transition:filter;transition-duration:1s}.Center.disabled{filter:grayscale(80%)}.Center .CenterCircle{fill:#3CE4BB;stroke:rgb(150, 54, 88);stroke-width:2px;cursor:pointer;transition:fill;transition-duration:1s}.Center .CenterText{fill:#FFFFFF}.PointerPartition{opacity:0.3;fill:lightgoldenrodyellow;stroke:red;stroke-width:6px;stroke-dasharray:12}.Current{color:#FFFFFF}.PartitionText{color:#FFFFFF;font-style:normal;font-weight:700;text-anchor:end;text-shadow:0px 3px #000;dominant-baseline:central}.PartitionsShadow{background-blend-mode:multiply;mix-blend-mode:multiply}.PartitionTextEntityContainer{height:100%;display:flex;align-items:center}.PartitionTextEntity{width:100%}.PartitionTextEntity.Anticlockwise{text-align:end}foreignObject.Bottom div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-bg.svg");background-size:calc(var(--radius) * 2px + var(--ratio) * 20px);background-position:center}foreignObject.Middle div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-spin.svg"), url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-pointer.svg");background-position:center, center 5px}foreignObject.Top{mix-blend-mode:multiply}foreignObject.Top div{background-image:var(--img-theme-shadow);background-position:center;background-size:calc(var(--radius) * 2px)}foreignObject.Partition1 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc(var(--index) * 360deg / var(--length)))}foreignObject.Partition2 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc((var(--index) + 0.5) * 360deg / var(--length)))}foreignObject.PointerArea{mix-blend-mode:screen}foreignObject.PointerArea div{background-image:var(--img-theme-pointer-area);background-position:center -3px;background-size:51%}foreignObject.Partition1 div,foreignObject.Partition2 div{transform-origin:center}.PartitionsCustomable1 div,.PartitionsCustomable2 div{visibility:hidden}.PartitionsCustomable1 div.active,.PartitionsCustomable2 div.active{visibility:visible}foreignObject.Customable{overflow:visible}foreignObject.Customable div{background-repeat:no-repeat}.PartitionBackground div{background-size:calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);background-position:center}.PartitionBackground:nth-child(2n) div{background:var(--emw--color-primary, #3F2E75)}.PartitionBackground:nth-child(2n+1) div{background:var(--emw--color-secondary, #9482CE)}.PartitionBackground div{transform-origin:center}.PartitionBackgroundStroke{fill:transparent;stroke:var(--emw--color-background-secondary, #251D3E);stroke-width:3px;stroke-dasharray:none}.PointerPartitionFrame{stroke:#FFDD64;fill:transparent;stroke-dasharray:var(--radius) calc(6.2831853072 / var(--length) * var(--radius));stroke-width:0px}.PointerPartitionFrame.active{stroke-width:3px}.WheelContainer.Mobile foreignObject.Middle div{background-size:95px, 38px}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity{text-align:center;text-transform:uppercase;text-shadow:none;font-size:var(--emw--font-size-small, 10px);font-weight:700}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity.Mobile{font-size:var(--emw--font-size-x-small, 8px)}',function(e){e.ActiveTickets="ActiveTickets",e.ImplicitTickets="ImplicitTickets",e.RemainingTimes="RemainingTimes"}(Et||(Et={})),function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise",e[e.outward=0]="outward"}(Ft||(Ft={}));const jt=["en"],Nt={en:{luckywheel:"LuckyWheel",remaining:"times remaining",noluckywheels:"No Unlocked LuckyWheel",tryOtherGames:"Try winning LuckyWheel as rewards or launching other booster games"}},Pt=(e,t)=>{const i=t;return Nt[void 0!==i&&jt.includes(i)?i:"en"][e]};var Bt;"undefined"!=typeof window&&(customElements.define=(Bt=customElements.define,function(...e){try{return Bt.apply(this,e)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}),import("./GeneralAnimationLoading-Dqt0LPDS-2e1c11e3.js").then((({default:e})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",e.element)})));const At=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.luckyWheels=void 0,this.luckywheel=void 0,this.giftimagesrc=void 0,this.currentinfo=Et.RemainingTimes,this.contentdirection="anticlockwise",this.device="Mobile",this.translationUrl="",this.selectedIndex=0,this.timers={},this.isLoading=!1}luckywheelsPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}async componentWillLoad(){var e;this.luckywheelsPropHandler(this.luckyWheels),this.translationUrl&&await(e=this.translationUrl,new Promise(((t,i)=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])Nt[t][i]=e[t][i]})),t(Nt)})).catch((e=>{i(e)}))})))}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.luckyWheels.reduce(((t,i)=>{var a,n;const s=(null===(a=i.Current)||void 0===a?void 0:a.ExpiryTime)||(null===(n=i.Program)||void 0===n?void 0:n.Time),o=new Date(s).getTime()-e;let r="00h:00m:00s";if(o<1)this.removeLuckyWheel(i.Program.Id);else{const{days:e,hours:t,minutes:i,seconds:a}={days:String(Math.floor(o/864e5)).padStart(2,"0"),hours:String(Math.floor(o%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(o%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(o%6e4/1e3)).padStart(2,"0")};r="00"===e?`${t}h:${i}m:${a}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Program.Id]:r})}),{})}removeLuckyWheel(e){const t=this.luckyWheels.findIndex((t=>t.Program.Id===e));t>-1&&(this.luckyWheels.splice(t,1),window.postMessage({type:"LuckyWheelHasExpired",id:e}))}getLuckyWheelHeaderTemplate(e){var i,a;const n=this.timers[e.Program.Id];return t("div",{class:"LuckyWheelsCardHeader"},t("div",{class:"LuckyWheelsName"},e.Program.Name.en||e.Program.Name["*"]),t("div",{class:"LuckyWheelsInfo"},t("div",{class:"LuckyWheelsCounterWrapper"},t("div",{class:"LuckyWheelsCounter"},t("div",{class:(null===(i=e.Current)||void 0===i?void 0:i.RemainingTimes)?"LuckyWheelsHighlightedCounter":"LuckyWheelsEmptyCounter"},null===(a=e.Current)||void 0===a?void 0:a.RemainingTimes)),t("div",{class:"LuckyWheelsRemaining"},Pt("remaining",this.language))),t("div",{class:"LuckyWheelsCountdownWrapper"},t("span",{class:"LuckyWheelsCountdown"},n))))}getActionsTemplate(){return t("header",{class:"LuckyWheelsActions"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),"Mobile"!==this.device&&t("div",{class:"LuckyWheelsPopupName"},Pt("luckywheel",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getLuckyWheelListTemplate(){return this.luckyWheels?t("div",{class:"LuckyWheelsList"},t("general-slider",{"slide-number":"1","slide-show":"1","show-arrow":"true","show-button":"true","auto-item-height":"true","current-page":this.selectedIndex,"client-styling":this.clientStyling+"\n .ArrowButtons {\n position: absolute; \n bottom: 5px; \n width: 100%;\n } \n .Button {\n background: center / 100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat;\n opacity: 1;\n padding: 20px;\n position: absolute;\n font-size: 0;\n &[disabled] {\n opacity: 1;\n }\n &.ButtonNext {\n transform: scale(-1, -1);\n }\n }\n .PageButtons {\n padding: 0 40px;\n display: flex;\n justify-content: center;\n }\n .PageButton {\n border-radius: 12px;\n width: 12px;\n height: 12px;\n opacity: 1;\n background-color: var(--emw--color-background, #666178);\n &.active {\n background-color: var(--emw--color-background-secondary, #FFD62F);\n width: 65px;\n }\n }","client-styling-url":this.clientStylingUrl},this.luckyWheels&&this.luckyWheels.map((e=>t("li",{class:"LuckyWheelsListItem"},this.getLuckyWheelHeaderTemplate(e),t("casino-engagement-suite-luckywheel",{device:this.device,luckywheel:e,size:"Desktop"===this.device?"440":"340"})))))):t("div",{class:"LuckyWheelsListEmpty"},t("h2",null,Pt("noluckywheels",this.language)),t("p",null,Pt("tryOtherGames",this.language)))}render(){return this.isLoading?t("div",{class:`LuckyWheelsDetailsPopup ${this.device}`},t("general-animation-loading",null)):t("div",{class:`LuckyWheelsDetailsPopup ${this.device}`},this.getActionsTemplate(),this.getLuckyWheelListTemplate())}get host(){return a(this)}static get watchers(){return{luckyWheels:["luckywheelsPropHandler"]}}};At.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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.LuckyWheelsDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.LuckyWheelsDetailsPopup.Disabled .LuckyWheelsDetailsHeader{opacity:0.5}.LuckyWheelsDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.LuckyWheelsDetailsPopup.Disabled .LuckyWheelsInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.LuckyWheelsDetailsPopup .LuckyWheelsListItemWof{width:300px}.LuckyWheelsDetailsPopup.Desktop .LuckyWheelsListItemWof,.LuckyWheelsDetailsPopup.Tablet .LuckyWheelsListItemWof{width:400px}.LuckyWheelsDetails{overflow:hidden;height:100%;display:flex;flex-direction:column}.LuckyWheelsActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.LuckyWheelsActions .LuckyWheelsPopupName{color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.LuckyWheelsCountdown{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-secondary, #BBB9C3)}.LuckyWheelsCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.LuckyWheelsCard.Forfeited{cursor:auto;pointer-events:none}.LuckyWheelsCardHeader{display:flex;flex-direction:column;gap:12px;flex:1;min-width:0;padding:20px}.LuckyWheelsName{color:var(--emw--color-typography, #ffffff);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.LuckyWheelsList{padding-bottom:30px}.LuckyWheelsHighlightedCounter,.LuckyWheelsEmptyCounter{font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.LuckyWheelsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #ffb801 15.86%, #fef746 31.36%, #fbffe0 36.86%, #fffa60 47.86%, #ff9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.LuckyWheelsInfo{display:flex;justify-content:space-between}.LuckyWheelsCounterWrapper{display:flex;gap:5px;align-items:baseline}.LuckyWheelsRemaining{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.LuckyWheelsListEmpty{padding:20px 32px}.LuckyWheelsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #ffffff)}.LuckyWheelsListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #bbb9c3)}.LuckyWheelsDetailsPopup.Tablet .LuckyWheelsActions,.LuckyWheelsDetailsPopup.Desktop .LuckyWheelsActions{padding-top:16px}.LuckyWheelsDetailsPopup.Tablet .LuckyWheelsPopupName,.LuckyWheelsDetailsPopup.Desktop .LuckyWheelsPopupName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.LuckyWheelsDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.LuckyWheelsDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.LuckyWheelsDetailsPopup.Tablet .EngagementSuiteIconButton,.LuckyWheelsDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}';const Ot=["en"],Wt={en:{luckywheels:"LuckyWheels",join:"Join",unjoin:"Unjoin",new:"new",noluckywheels:"No Unlocked LuckyWheel",tryOtherGames:"Try winning LuckyWheel as rewards or launching other booster games",tooltip:"Get a chance to win rewards by spinning the wheel!",history:"History",rewards:"Rewards",issued:"Issued",time:"Time",loading:"Loading...",noHistory:"No LuckyWheels’ history available (last 30 days)",freeSpins:"Free Spins",luckyWheel:"LuckyWheel",leaderboard:"Leaderboard",mission:"Mission",canceled:"The luckywheel has been canceled.",support:"Please, contact support."}},Ht=(e,t)=>{const i=t;return Wt[void 0!==i&&Ot.includes(i)?i:"en"][e]};var Jt,Rt;!function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(Jt||(Jt={})),function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(Rt||(Rt={}));const Ut=class{constructor(t){e(this,t),this.close=i(this,"close",7),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.handleLuckyWheelClick=e=>{const t=e.currentTarget.getAttribute("data-id"),i=e.currentTarget.getAttribute("data-index");window.postMessage({type:"LuckyWheelClick",id:t,index:i})},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),2===this.activeTab&&this.sendHistoryRequest()},this.toggleLuckyWheelHistory=e=>{const t=e.currentTarget.getAttribute("data-id");this.openedHistoryIds.findIndex((e=>e===t))>-1?this.openedHistoryIds=this.openedHistoryIds.filter((e=>e!==t)):this.openedHistoryIds.push(t),this.openedHistoryIds=[...this.openedHistoryIds]},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckyWheels=[],this.translationUrl="",this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.activeTab=1,this.historyLoading=!1,this.luckywheelHistory={},this.openedHistoryIds=[],this.historyLoaded=!1,this.isLoading=!1}handleEvent(e){var t;const i=null==e?void 0:e.data,{type:a}=i,n=s(i,["type"]);if("BarLuckyWheelsClick"===a&&(this.activeTab=1,this.openedHistoryIds=[]),"LuckywheelHistoryResponse"===a){this.openedHistoryIds=[];const e=n.data;if(e.length>0){const i=null===(t=e[0].Draw)||void 0===t?void 0:t.LotteryProgramID;this.luckywheelHistory[i]=e}this.historyLoading=!1}}luckywheelsPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}async componentWillLoad(){var e;this.luckywheelsPropHandler(this.luckyWheels),this.translationUrl&&await(e=this.translationUrl,new Promise(((t,i)=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])Wt[t][i]=e[t][i]})),t(Wt)})).catch((e=>{i(e)}))})))}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.luckyWheels.reduce(((t,i)=>{var a,n,s;const o=(null===(a=i.Current)||void 0===a?void 0:a.ExpiryTime)||(null===(s=null===(n=i.Program)||void 0===n?void 0:n.Trigger)||void 0===s?void 0:s.EndTime),r=new Date(o).getTime()-e;let l="00h:00m:00s";if(r<1)this.removeLuckyWheel(i.Program.Id);else{const{days:e,hours:t,minutes:i,seconds:a}={days:String(Math.floor(r/864e5)).padStart(2,"0"),hours:String(Math.floor(r%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(r%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(r%6e4/1e3)).padStart(2,"0")};l="00"===e?`${t}h:${i}m:${a}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Program.Id]:l})}),{})}removeLuckyWheel(e){this.luckyWheels=this.luckyWheels.filter((t=>t.Program.Id!==e)),window.postMessage({type:"LuckyWheelHasExpired",id:e})}sendHistoryRequest(){this.historyLoading=!0,this.luckyWheels.forEach((e=>{window.postMessage({type:"LuckywheelHistoryRequest",data:{lotteryProgramID:e.Program.Id}})}))}getLuckyWheelClasses(e){return{LuckyWheelsCard:!0,LuckyWheelsEmptyNumber:0===e.Current.RemainingTimes}}getLuckyWheelName(e){var t,i;return(null===(t=e.Program)||void 0===t?void 0:t.Name.en)||(null===(i=e.Program)||void 0===i?void 0:i.Name["*"])}getLuckyWheelHeaderTemplate(e){var i,a;return t("div",{class:"LuckyWheelsCardHeader"},t("div",{class:"LuckyWheelsName"},this.getLuckyWheelName(e)),t("div",{class:"LuckyWheelsCounter"},t("div",{class:(null===(i=e.Current)||void 0===i?void 0:i.RemainingTimes)?"LuckyWheelsHighlightedCounter":"LuckyWheelsEmptyCounter"},null===(a=e.Current)||void 0===a?void 0:a.RemainingTimes)))}getLuckyWheelTemplate(e,i){const a=this.timers[e.Program.Id];return t("div",{class:this.getLuckyWheelClasses(e),onClick:this.handleLuckyWheelClick,key:e.Program.Id,"data-id":e.Program.Id,"data-index":i},this.getLuckyWheelHeaderTemplate(e),t("div",{class:"LuckyWheelsCountdownWrapper"},t("span",{class:"LuckyWheelsCountdown"},a)))}getHeaderTemplate(){return t("header",{class:"LuckyWheelsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"LuckyWheelsListPopupHeaderName"},Ht("luckyWheel",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){return this.isLoading?t("general-animation-loading",null):this.luckyWheels.length?t("div",{class:"LuckyWheelsListWrapper"},t("div",{class:"LuckyWheelsList"},this.luckyWheels.map(((e,t)=>this.getLuckyWheelTemplate(e,t))))):t("div",{class:"LuckyWheelsListEmpty"},t("h2",null,Ht("noluckywheels",this.language)),t("p",null,Ht("tryOtherGames",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),Ht("tooltip",this.language))):""}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabsWrapper"},t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},Ht("luckywheels",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},Ht("history",this.language))))}getHistoryTabTemplate(){return t("div",{class:"HistoryWrapper"},t("div",{class:"HistoryCols"},t("div",{class:"HistoryColName Rewards"},Ht("rewards",this.language)),t("div",{class:"HistoryColName Issued"},Ht("issued",this.language)),t("div",{class:"HistoryColName Time"},Ht("time",this.language))),this.historyLoading?(e=this.language,t("div",{class:"HistoryLoader"},t("casino-engagement-suite-progress-bar",{indeterminate:!0}),t("span",null,Ht("loading",e)))):((e,i,a,n,s)=>0===e.length?t("p",{class:"HistoryEmptyMessage"},Ht("noHistory",s)):t("div",{class:"HistoryList"},e.map((e=>{var s;return t("div",{key:e.Program.Id,class:"HistoryListItem "+(a.includes(e.Program.Id)?"Opened":"Closed")},t("header",{class:"HistoryListItemHeader","data-id":e.Program.Id,onClick:n},e.Program.Name.en||e.Program.Name["*"],t("button",{class:"EngagementSuiteIconButton ArrowDown"})),t("div",{class:"HistoryListItemBody"},t("div",{class:"HistoryInfoRow"},null===(s=i[e.Program.Id])||void 0===s?void 0:s.map((i=>t("div",{class:"HistoryInfo"},t("div",{class:"HistoryCol Rewards"},((e,i)=>{var a,n,s,o;const r=i.WheelOfFortunePartitionIndex||0,l=null===(n=null===(a=e.Program.WheelOfFortune)||void 0===a?void 0:a.Partitions[r])||void 0===n?void 0:n.Name,p=null===(o=null===(s=e.Program.WheelOfFortune)||void 0===s?void 0:s.Partitions[r])||void 0===o?void 0:o.Image1,d=p.en||p["*"],c=e.Program.Name.en||e.Program.Name["*"];return t("div",{class:"HistoryRewards"},l.en||l["*"]||(d?t("img",{src:d}):c))})(e,i.Draw.Result)),t("div",{class:"HistoryCol Issued"},"fulfilled"===i.Draw.State?"Success":"Failed"),t("div",{class:"HistoryCol Time"},Fe(new Date(i.Draw.Time),"LLL d, yyyy HH:mm:ss"))))))))}))))(this.luckyWheels,this.luckywheelHistory,this.openedHistoryIds,this.toggleLuckyWheelHistory,this.language));var e}getTabsContentTemplate(){return 1===this.activeTab?this.getListTemplate():this.getHistoryTabTemplate()}render(){return t("div",{key:"e1ae674e9f7c5b7ba46f062cb9312365e7219073",class:`LuckyWheelsListPopup ${this.device}`},this.getHeaderTemplate(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{luckyWheels:["luckywheelsPropHandler"]}}};Ut.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}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.ArrowDown{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.LuckyWheelsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1e1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.LuckyWheelsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.LuckyWheelsListPopupHeaderName{color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.LuckyWheelsListWrapper::-webkit-scrollbar,.HistoryListItem::-webkit-scrollbar{width:3px;border-radius:4px}.LuckyWheelsListWrapper::-webkit-scrollbar-track,.HistoryListItem::-webkit-scrollbar-track{background:transparent}.LuckyWheelsListWrapper::-webkit-scrollbar-thumb,.HistoryListItem::-webkit-scrollbar-thumb{background:var(--emw--color-gray-105, rgba(255, 255, 255, 0.6))}.LuckyWheelsListWrapper::-webkit-scrollbar-thumb:hover,.HistoryListItem::-webkit-scrollbar-thumb:hover{background:var(--emw--color-gray-290, #969696)}.LuckyWheelsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.LuckyWheelsRowWrapper{display:flex;justify-content:space-between;min-width:0}.LuckyWheelsCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.LuckyWheelsCard.Forfeited{cursor:auto;pointer-events:none}.LuckyWheelsCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px;flex:1;min-width:0;align-items:flex-end}.LuckyWheelsName{color:var(--emw--color-typography, #ffffff);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.LuckyWheelsCounter{display:flex;color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-medium-plus, 18px);align-items:flex-end}.LuckyWheelsHighlightedCounter,.LuckyWheelsEmptyCounter{font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.LuckyWheelsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #ffb801 15.86%, #fef746 31.36%, #fbffe0 36.86%, #fffa60 47.86%, #ff9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.LuckyWheelsEmptyCounter{color:var(--emw--color-gray-150, #8f8b9c)}.LuckyWheelsListEmpty{padding:20px 32px}.LuckyWheelsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #ffffff)}.LuckyWheelsListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #bbb9c3)}.LuckyWheelsCountdownWrapper{display:flex;justify-content:space-between;align-items:flex-start}.LuckyWheelsCountdown,.ForfeitedMessage{color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ForfeitedMessage{line-height:1.2}.LuckyWheelsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-x-small, 12px)}.LuckyWheelsRemainCounter{color:var(--emw--color-typography, #ffffff);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.LuckyWheelLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #ffb801 15.86%, #fef746 31.36%, #fbffe0 36.86%, #fffa60 47.86%, #ff9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.LuckyWheelLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1e1638)}.ShowLuckyWheelLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1e1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #bbb9c3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.LuckyWheelsEmptyNumber .LuckyWheelsName,.LuckyWheelsEmptyNumber .LuckyWheelsCountdown,.LuckyWheelsEmptyNumber .LuckyWheelsRemainCounter{color:var(--emw--color-gray-150, #8f8b9c)}.LuckyWheelsListPopup.Tablet .LuckyWheelsListPopupHeader,.LuckyWheelsListPopup.Desktop .LuckyWheelsListPopupHeader{padding-top:16px}.LuckyWheelsListPopup.Tablet .LuckyWheelsListPopupHeaderName,.LuckyWheelsListPopup.Desktop .LuckyWheelsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.LuckyWheelsListPopup.Tablet .EngagementSuiteIconButton,.LuckyWheelsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.LuckyWheelsListPopup.Tablet .LuckyWheelsList,.LuckyWheelsListPopup.Desktop .LuckyWheelsList{padding:20px 24px 0;row-gap:20px}.LuckyWheelsListPopup.Tablet .LuckyWheelCardHeader,.LuckyWheelsListPopup.Desktop .LuckyWheelCardHeader{margin-bottom:16px}.LuckyWheelsListPopup.Tablet .LuckyWheelsName,.LuckyWheelsListPopup.Desktop .LuckyWheelsName{line-height:27px;font-size:var(--emw--font-size-large, 18px);font-weight:var(--emw--font-weight-bold, 700)}.LuckyWheelsListPopup.Tablet .LuckyWheelsCountdown,.LuckyWheelsListPopup.Desktop .LuckyWheelsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.LuckyWheelsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.LuckyWheelsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.LuckyWheelsListPopup.Tablet .EngagementSuiteTooltip,.LuckyWheelsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.LuckyWheelsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.LuckyWheelsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.LuckyWheelsListPopup.Tablet .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab,.LuckyWheelsListPopup.Desktop .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryCols,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryCols{font-size:var(--emw--font-size-medium, 16px)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryCols .Rewards,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryCols .Rewards{flex-basis:140px}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryCols .Issued,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryCols .Issued{flex-basis:100px}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-large, 18px);font-weight:var(--emw--font-weight-medium, 500)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryInfo,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryInfo{font-size:var(--emw--font-size-medium, 16px)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryInfo .Rewards,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryInfo .Rewards{flex-basis:140px}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryInfo .Issued,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryInfo .Issued{flex-basis:100px}.EngagementSuiteTabsWrapper{padding:0 24px;margin:8px 0}.EngagementSuiteTabsWrapper .EngagementSuiteTabs{display:flex;position:relative;border-bottom:2px solid var(--emw--color-secondary, #666178)}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #fff);border-bottom:2px solid var(--emw--color-typography, #fff);margin-bottom:-2px}.HistoryWrapper{padding:0 24px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-secondary, #bbb9c3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 10px;position:relative;display:flex;border-bottom:1px solid var(--emw--color-secondary, #666178);font-size:var(--emw--font-size-x-small, 12px)}.HistoryWrapper .HistoryCols .HistoryColName{color:var(--emw--color-secondary, #bbb9c3)}.HistoryWrapper .HistoryCols .Rewards{flex-basis:80px}.HistoryWrapper .HistoryCols .Issued{flex-basis:80px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-medium, 16px);color:var(--emw--color-gray-150, #8f8b9c)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{max-height:300px;overflow:auto;margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .EngagementSuiteIconButton.ArrowDown{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr;border-bottom:1px solid var(--emw--color-secondary, #666178)}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #ffffff);font-size:var(--emw--font-size-medium, 14px)}.HistoryWrapper .HistoryListItem .EngagementSuiteIconButton.ArrowDown{transition:transform 0.3s ease-out;width:24px;height:24px}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryInfoRow{display:flex;gap:10px;flex-direction:column}.HistoryWrapper .HistoryListItem .HistoryInfo{display:flex;padding:10px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #bbb9c3)}.HistoryWrapper .HistoryListItem .HistoryInfo .HistoryCol{text-overflow:ellipsis;overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryInfo .Rewards{color:var(--emw--color-typography, #ffffff);flex-basis:80px;font-weight:600}.HistoryWrapper .HistoryListItem .HistoryInfo .Issued{flex-basis:80px}';const Yt=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),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)}))},this.clientStyling="",this.clientStylingUrl="",this.isOpen=void 0,this.isLoading=void 0,this.header=void 0,this.contentIcon=void 0,this.modalType=void 0,this.assets=void 0,this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return t("div",{key:"27c64eb08e60bdc0525d1bfa800f7d3257d8e377",class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},t("div",{key:"75080d22dbe97360c91356da2a4fa73dd1ded948",class:"ModalWinAnimation"}),t("div",{key:"e25510992fa764b9d0976566df40c8aa04aca38a",class:"ModalContent GradientBorder"},t("div",{key:"9d5f1d11afc7522857d49fd9dedb704b216c4a1e",class:"IconCloseContainer"},t("button",{key:"5edea8aafd0fbc7104e7093f2a9f12568187fa05",class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick})),this.assets?t("div",{class:"ModalAssets",style:{background:`url(${this.assets}) no-repeat center / cover`}}):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",{key:"c787b35b593d94258072420ff4a47e0433369b21",class:"ModalHeader"},t("h1",{key:"3e162d602050e9d3e1c3a97234549bc971370a23"},this.header)),t("div",{key:"35784436dc1b5d8342730959d69bc8e08910aeb7",class:"ModalBodyWrapper"},t("div",{key:"500831b113cde82958ae1971d8710c6f0e2a45ff",class:"ModalBody"},t("slot",{key:"b47a0252f9fe4fa01bea07a69e3d6b7cc02f575c",name:"body"})),t("div",{key:"d10041375451213d55c7be600b237a802cbe56f5",class:"ModalFooter"},t("slot",{key:"db205227b152ead571e2029f66ba3d381337457a",name:"footer"})))))}get host(){return a(this)}};Yt.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.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;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 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:var(--emw--border-radius-large, 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-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalAssets{width:44px;height:44px;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #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 .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const Gt=["en"],Qt={en:{joinHeader:"Choose another mission?",desc:"Any progress on the current mission will be kept and you can rejoin the mission at any time.",joinQuestion:"Would you still like to join another mission?",joinConfirm:"Yes, join another mission",joinReject:"No, stay at this mission",unJoinHeader:"Quit Mission?",unJoinQuestion:"Would you still like to quit the mission?",unJoinConfirm:"Yes, I want to quit this mission",unJoinReject:"No, stay at this mission",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.",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!",jackpotWinInfo:"Please refresh game page or place any bet to update game balance",seeYouLater:"See you later",noSpinsLeft:"You've used all spins here",spinAgain:"Spin again",noPrizeMessage:"You didn't win this time, try again!",noPrizeTitle:"Oh, Sorry",close:"Close"}},$t=(e,t)=>{const i=t;return Qt[void 0!==i&&Gt.includes(i)?i:"en"][e]},Zt="https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",_t="https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",Vt=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),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))),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.isJoiningToChallenge=void 0,this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewardMessage="",this.rewardText="",this.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""},this.noLWSpinLeft=!1,this.assets=void 0}openModalHandler(e){const{modalType:t,rewardMessage:i,hasError:a,confirmationData:n,winAmount:s,rewardText:o,noSpinLeft:r,assets:l}=e.detail;s&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+s.amount,currency:s.currency}:s),this.openModals=[...this.openModals,t],this.rewardMessage=i,this.rewardText=o,this.hasError=a,this.noLWSpinLeft=r,this.assets=l,n&&(this.confirmationData=n)}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",{key:"f6084274c1f53415a89aacca7cefc088b401e01a",class:`ModalContainer ${this.device}`},t("casino-engagement-suite-modal",{key:"16e8e1db4bc6916197723aeec9d86edce5142fa4",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("NO_SPIN_LEFT_MODAL"),header:$t("noSpinsLeft",this.language),contentIcon:_t,assets:this.assets,modalType:"NO_SPIN_LEFT_MODAL","show-animation":!1,device:this.device},t("div",{key:"666d74509a18ecf7250f594b65ed50d894e8bc69",slot:"body"},t("div",{key:"dae32188cb62d48681159a7f1953e8e24ad45a15"},$t("seeYouLater",this.language))),t("div",{key:"57eae0585f9bbcaa0c3168b967db7d2197c69377",slot:"footer"},t("button",{key:"f4ffef3e030620dc2eacfc0315ad1ef87c648723",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"NO_SPIN_LEFT_MODAL"},"OK"))),t("casino-engagement-suite-modal",{key:"3ab936accd2c6f7f4a47f506750527dba251b54b",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",contentIcon:_t,assets:this.assets,modalType:"REWARD_MODAL","show-animation":!0,device:this.device},t("div",{key:"e8f31b5b1fa7b3cdbede19d2332c5aca912d6e17",slot:"body"},t("div",{key:"fa5a265da89b3d306c910bc74a65637fc775ebad"},!this.rewardText&&$t("won",this.language)," ",t("span",{key:"d95f375d21a90564b9d8c5e328c7c6d19d164571",class:"ModalReward"},this.rewardText||this.rewardMessage)),this.hasError&&t("div",{key:"d5c9f2f8e3fe91bd2a6593c1796b2e60b69d6200",class:"SupportInfo"},$t("supportInfo",this.language))),t("div",{key:"a0b6d0d65298de17b3aa588db7154eab048482f4",slot:"footer"},t("button",{key:"f518cc3fefa88c5090d84f198b7ff3913c11faf1",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},$t(this.noLWSpinLeft?"close":"continue",this.language)),this.noLWSpinLeft&&t("div",{key:"2a76bdd63efcba8c4c447586f390316ad4197ad6",class:"NoSpinsLeft"},$t("noSpinsLeft",this.language)))),t("casino-engagement-suite-modal",{key:"250f50a7f9f8ee816c5855a0dd3fcf5a54a9eaca",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("JACKPOT_REWARD_MODAL"),header:"Congratulations!",contentIcon:_t,"show-animation":!0,modalType:"JACKPOT_REWARD_MODAL",device:this.device},t("div",{key:"9ed16e8dd8c074525b09e60058f6d4e1f347337f",slot:"body"},t("div",{key:"4a62303a24951e6bbea43ca53195e639c916adca",class:"JackpotWinText"},$t("jackpotWin",this.language)),t("div",{key:"6e338e3781e014066691609a2ff0055c63eb6c2b",class:"JackpotWinAmount"},(i=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(i)}`))),t("div",{key:"dd252ee2f9d4a55a9a148b71aaef0f4319b3664d",slot:"footer"},t("button",{key:"b547c0d0264fda93698a2dd6927908103e5bdf39",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},$t("continue",this.language)),t("div",{key:"771804d487d49347ee30c1f158e3f6b3b9962b59",class:"JackpotWinInfoText"},$t("jackpotWinInfo",this.language)))),t("casino-engagement-suite-modal",{key:"ea0428fe8f377e427bd9ebe7ed1ed33bbbbc47d2",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("TARGET_MODAL"),header:$t(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},t("div",{key:"190bf7531bae3de373e7c04233bfd31bb007d22a",slot:"body"},t("div",{key:"2437aec4f2393e2ddc934f0ed927a2b7043a1e88",class:"LeftAlign"},$t("desc",this.language)),t("div",{key:"eca39946bc741a4e56d09f9640822b0c51a17d79",class:"LeftAlignQuestion"},$t(e?"joinQuestion":"unJoinQuestion",this.language))),t("div",{key:"81107a7b57a5c6dd573128090c1145171c4d7131",slot:"footer",class:"ManyActions"},t("button",{key:"c3e256cb8334e9386c572bd037c78678f7b922f4",class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},$t(e?"joinConfirm":"unJoinConfirm",this.language)),t("button",{key:"29de3f6da68fd1ec8258856480bf89e3d286309f",class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},t("div",{key:"f01704e080896e65c86ec67e3f14945fcbd2b016",class:"GradientText"},$t(e?"joinReject":"unJoinReject",this.language))))),t("casino-engagement-suite-modal",{key:"a5708ff6eb5ef898adf17b8869c687b816b0ace3",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("SUPPORT_MODAL"),header:$t("noReward",this.language),contentIcon:Zt,modalType:"SUPPORT_MODAL",device:this.device},t("div",{key:"aa5ee73704966ee4ec44de3c287b4520f5c0f45b",slot:"body"},t("span",{key:"05783ef120dd1a61737540a4a6121ee20886ff63"},$t("contactSupport",this.language))),t("div",{key:"3fc1e0534e3acd0c599fe7317fda89d51b841555",slot:"footer"},t("button",{key:"85db69d240d1999e2b6f002688cda0c0be957e9f",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},$t(this.noLWSpinLeft?"close":"okContinue",this.language)),this.noLWSpinLeft&&t("div",{key:"fc864b315cb1f3f9829287a679125eb036a11c70",class:"NoSpinsLeft"},$t("noSpinsLeft",this.language)))),t("casino-engagement-suite-modal",{key:"2666ffb2fa903a96205c55558acb9566af28e789",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("NO_PRIZE_MODAL"),header:$t("noPrizeTitle",this.language),contentIcon:Zt,modalType:"NO_PRIZE_MODAL",assets:this.assets,device:this.device},t("div",{key:"1c681e3f5253c1ed3e65358f735b48b676a27ddc",slot:"body"},t("span",{key:"14357307c9f43d8a690c7434d610fa2172cb6282"},$t("noPrizeMessage",this.language))),t("div",{key:"c038057289eb2a597ef35d09bbe7b85fad79032e",slot:"footer"},t("button",{key:"fde3b09e7109aef522b3804206f136f02aadbaef",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"NO_PRIZE_MODAL"},$t(this.noLWSpinLeft?"close":"spinAgain",this.language)),this.noLWSpinLeft&&t("div",{key:"b85fa50c50bf70f1ddd1361a403f2735086b9028",class:"NoSpinsLeft"},$t("noSpinsLeft",this.language)))));var i}get host(){return a(this)}};Vt.style=':host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);padding:0 12px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)) border-box;border:2px solid transparent}.GradientText{background:var(--emw--engagement-suite-gradient-button, 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-semibold, 600);font-size:var(--emw--font-size-medium, 16px);line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;background:var(--emw--linear-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-weight:var(--emw--font-weight-black, 900);font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotWinInfoText{padding:0 50px;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.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:var(--emw--font-size-small, 14px);line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ModalContainer.Mobile .JackpotWinInfoText{padding:0;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.LeftAlign,.LeftAlignQuestion{text-align:left;line-height:1.2}.LeftAlignQuestion{margin-top:20px}.NoSpinsLeft{color:var(--emw--color-secondary, #BBB9C3);margin-top:20px}';const qt=class{constructor(t){e(this,t),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.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1}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||this.indeterminate}}getProgressBarLineTemplate(){return t("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return t("div",{key:"ecce3a26a92d2e090c1db84bdc1bdbeb505080ed",class:this.getProgressBarClasses(),part:"ProgressBar"},t("div",{key:"649fe1103d222200f2a1ad3b5967e37da1f1ab3d",class:"ProgressBarInfo",part:"ProgressBarInfo"},t("slot",{key:"49dc180eedd823f0027f75099813fb9d91bcd938",name:"Title"},t("div",{key:"e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5"})),t("slot",{key:"3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e",name:"Percent"},t("div",{key:"6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad",class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),t("div",{key:"141106e77caad7b04bb199f911e87c0c6f0adc2d",class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return a(this)}};qt.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";const Xt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg"}),Kt=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KICAgIDxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xOTcxXzUxNikiPgogICAgICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOC4wMDAwOCAyLjAwMDAxQzQuNjg2MzcgMi4wMDAwMSAyLjAwMDA4IDQuNjg2MyAyLjAwMDA4IDhDMi4wMDAwOCAxMS4zMTM3IDQuNjg2MzcgMTQgOC4wMDAwOCAxNEMxMS4zMTM4IDE0IDE0LjAwMDEgMTEuMzEzNyAxNC4wMDAxIDhDMTQuMDAwMSA0LjY4NjMgMTEuMzEzOCAyLjAwMDAxIDguMDAwMDggMi4wMDAwMVpNMC42NjY3NDggOEMwLjY2Njc0OCAzLjk0OTkyIDMuOTQ5OTkgMC42NjY2NzIgOC4wMDAwOCAwLjY2NjY3MkMxMi4wNTAyIDAuNjY2NjcyIDE1LjMzMzQgMy45NDk5MiAxNS4zMzM0IDhDMTUuMzMzNCAxMi4wNTAxIDEyLjA1MDIgMTUuMzMzMyA4LjAwMDA4IDE1LjMzMzNDMy45NDk5OSAxNS4zMzMzIDAuNjY2NzQ4IDEyLjA1MDEgMC42NjY3NDggOFpNOC4xNzIxNiA1LjM0OTU1QzcuODYxODEgNS4yOTYzMiA3LjU0MjY0IDUuMzU0NjQgNy4yNzExNyA1LjUxNDE4QzYuOTk5NzEgNS42NzM3MyA2Ljc5MzQ2IDUuOTI0MiA2LjY4ODk3IDYuMjIxMjNDNi41NjY3OSA2LjU2ODU2IDYuMTg2MTggNi43NTEwOCA1LjgzODg1IDYuNjI4ODlDNS40OTE1MyA2LjUwNjcxIDUuMzA5MDEgNi4xMjYxIDUuNDMxMTkgNS43Nzg3OEM1LjY0MDE3IDUuMTg0NyA2LjA1MjY2IDQuNjgzNzYgNi41OTU2IDQuMzY0NjdDNy4xMzg1MyA0LjA0NTU4IDcuNzc2ODggMy45Mjg5NCA4LjM5NzU3IDQuMDM1NDFDOS4wMTgyNiA0LjE0MTg3IDkuNTgxMjUgNC40NjQ1OCA5Ljk4NjgyIDQuOTQ2MzZDMTAuMzkyMyA1LjQyODA0IDEwLjYxNDMgNi4wMzc2NiAxMC42MTM0IDYuNjY3MjhDMTAuNjEzMSA3LjY4NzUyIDkuODU2NzEgOC4zNjEyNiA5LjMxNjU1IDguNzIxMzdDOS4wMjYxMyA4LjkxNDk5IDguNzQwNDUgOS4wNTczNSA4LjUzMDAxIDkuMTUwODhDOC40MjM4NCA5LjE5ODA2IDguMzM0NDQgOS4yMzM4NyA4LjI3MDAyIDkuMjU4NDFDOC4yMzc3NSA5LjI3MDcxIDguMjExNTkgOS4yODAyMyA4LjE5MjU1IDkuMjg3TDguMTY5MzkgOS4yOTUxMUw4LjE2MjAyIDkuMjk3NjNMOC4xNTk0MiA5LjI5ODVMOC4xNTg0IDkuMjk4ODVDOC4xNTgyIDkuMjk4OTEgOC4xNTc1NyA5LjI5OTEzIDcuOTQ2NzUgOC42NjY2N0w4LjE1NzU3IDkuMjk5MTNDNy44MDgyNyA5LjQxNTU2IDcuNDMwNzIgOS4yMjY3OCA3LjMxNDI5IDguODc3NDlDNy4xOTc5IDguNTI4MzEgNy4zODY1MSA4LjE1MDkgNy43MzU1OCA4LjAzNDMzTDcuNzQ1ODcgOC4wMzA3MkM3Ljc1NjEyIDguMDI3MDcgNy43NzI5MyA4LjAyMDk3IDcuNzk1MzUgOC4wMTI0M0M3Ljg0MDMxIDcuOTk1MyA3LjkwNzE2IDcuOTY4NjEgNy45ODg0OSA3LjkzMjQ2QzguMTUzMDUgNy44NTkzMyA4LjM2NzM3IDcuNzUxNjkgOC41NzY5NSA3LjYxMTk3QzkuMDM2NjggNy4zMDU0OCA5LjI4MDA4IDYuOTc5NDMgOS4yODAwOCA2LjY2NjY3TDkuMjgwMDggNi42NjU2OEM5LjI4MDU1IDYuMzUwOCA5LjE2OTU3IDYuMDQ1OTEgOC45NjY3OCA1LjgwNTAyQzguNzY0IDUuNTY0MTMgOC40ODI1MSA1LjQwMjc4IDguMTcyMTYgNS4zNDk1NVpNNy4zMzM0MSAxMS4zMzMzQzcuMzMzNDEgMTAuOTY1MSA3LjYzMTg5IDEwLjY2NjcgOC4wMDAwOCAxMC42NjY3SDguMDA2NzVDOC4zNzQ5NCAxMC42NjY3IDguNjczNDEgMTAuOTY1MSA4LjY3MzQxIDExLjMzMzNDOC42NzM0MSAxMS43MDE1IDguMzc0OTQgMTIgOC4wMDY3NSAxMkg4LjAwMDA4QzcuNjMxODkgMTIgNy4zMzM0MSAxMS43MDE1IDcuMzMzNDEgMTEuMzMzM1oiIGZpbGw9IiM2NjYxNzgiLz4KICAgIDwvZz4KICAgIDxkZWZzPgogICAgICAgIDxjbGlwUGF0aCBpZD0iY2xpcDBfMTk3MV81MTYiPgogICAgICAgICAgICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CiAgICAgICAgPC9jbGlwUGF0aD4KICAgIDwvZGVmcz4KPHNjcmlwdCB4bWxucz0iIi8+PC9zdmc+Cg==",alt:"question",class:"Question"}),ei=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg"}),ti=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg"}),ii=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC40NzEzIDMuNTI4NTlDMTAuNzMxNyAzLjc4ODk0IDEwLjczMTcgNC4yMTEwNSAxMC40NzEzIDQuNDcxNEw2Ljk0MjczIDhMMTAuNDcxMyAxMS41Mjg2QzEwLjczMTcgMTEuNzg4OSAxMC43MzE3IDEyLjIxMTEgMTAuNDcxMyAxMi40NzE0QzEwLjIxMSAxMi43MzE3IDkuNzg4ODYgMTIuNzMxNyA5LjUyODUxIDEyLjQ3MTRMNS41Mjg1MSA4LjQ3MTRDNS4yNjgxNiA4LjIxMTA1IDUuMjY4MTYgNy43ODg5NCA1LjUyODUxIDcuNTI4NTlMOS41Mjg1MSAzLjUyODU5QzkuNzg4ODYgMy4yNjgyNCAxMC4yMTEgMy4yNjgyNCAxMC40NzEzIDMuNTI4NTlaIiBmaWxsPSIjNjY2MTc4Ii8+Cjwvc3ZnPgo=",alt:"Back",class:"Back"}),ai=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIxMTVfMzA2KSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNC45MDI5MiAwLjY2NjQ5NkM0LjkyMzM5IDAuNjY2NTc5IDQuOTQzNCAwLjY2NjY2IDQuOTYyODYgMC42NjY2NkgxMS4wMzY5QzExLjA1NjQgMC42NjY2NiAxMS4wNzY0IDAuNjY2NTc5IDExLjA5NjkgMC42NjY0OTZDMTEuMzA1NiAwLjY2NTY1MyAxMS41NjI3IDAuNjY0NjEzIDExLjc4OTMgMC43NDcwN0MxMi4xNTk2IDAuODgxODY4IDEyLjQ1MTQgMS4xNzM2MSAxMi41ODYyIDEuNTQzOTdDMTIuNjM5NCAxLjY5MDMxIDEyLjY1NzggMS44NDk0MiAxMi42NjQgMS45OTk5OUwxMy42ODQyIDEuOTk5OTlDMTMuODI0MiAxLjk5OTk4IDEzLjk2MDcgMS45OTk5NiAxNC4wNzY3IDIuMDA3ODhDMTQuMjAzNiAyLjAxNjU0IDE0LjM1NDEgMi4wMzY4NiAxNC41MTAxIDIuMTAxNDlDMTQuODM2OCAyLjIzNjgxIDE1LjA5NjQgMi40OTYzOCAxNS4yMzE3IDIuODIzMDhDMTUuMjk2NCAyLjk3OTExIDE1LjMxNjcgMy4xMjk1OSAxNS4zMjUzIDMuMjU2NTFDMTUuMzMzMyAzLjM3MjU2IDE1LjMzMzIgMy41MDg5OCAxNS4zMzMyIDMuNjQ5MDFWMy45OTk5OUMxNS4zMzMyIDQuMDMxMDIgMTUuMzMzMyA0LjA2MTU4IDE1LjMzMzMgNC4wOTE3MUMxNS4zMzM2IDQuNjIxOTcgMTUuMzMzOCA1LjAxNTc0IDE1LjI0MjQgNS4zNTY4NEMxNC45OTU4IDYuMjc3MDkgMTQuMjc3IDYuOTk1ODggMTMuMzU2OCA3LjI0MjQ2QzEzLjEwMyA3LjMxMDQ0IDEyLjgyMDIgNy4zMjc3NCAxMi40NzM3IDcuMzMyMDNDMTEuOTYxOCA5LjA1MzkzIDEwLjQ4MjkgMTAuMzU5NiA4LjY2NjU3IDEwLjYxOTRWMTEuMzMzM0g4Ljk2Mjg2QzEwLjY0MDIgMTEuMzMzMyAxMS45OTk5IDEyLjY5MzEgMTEuOTk5OSAxNC4zNzA0QzExLjk5OTkgMTQuOTAyMiAxMS41Njg4IDE1LjMzMzMgMTEuMDM2OSAxNS4zMzMzSDQuOTYyODZDNC40MzEwMyAxNS4zMzMzIDMuOTk5OSAxNC45MDIyIDMuOTk5OSAxNC4zNzA0QzMuOTk5OSAxMi42OTMxIDUuMzU5NjMgMTEuMzMzMyA3LjAzNjk0IDExLjMzMzNINy4zMzMyM1YxMC42MTk0QzUuNTE2OTMgMTAuMzU5NiA0LjAzODAyIDkuMDUzOTMgMy41MjYxIDcuMzMyMDNDMy4xNzk2MiA3LjMyNzc0IDIuODk2NzYgNy4zMTA0NCAyLjY0MzA1IDcuMjQyNDZDMS43MjI4MSA2Ljk5NTg4IDEuMDA0MDEgNi4yNzcwOSAwLjc1NzQzMyA1LjM1Njg0QzAuNjY2MDM1IDUuMDE1NzQgMC42NjYyNDggNC42MjE5NyAwLjY2NjUzNSA0LjA5MTcxQzAuNjY2NTUyIDQuMDYxNTkgMC42NjY1NjggNC4wMzEwMiAwLjY2NjU2OCAzLjk5OTk5VjMuNjY2NjZDMC42NjY1NjggMy42NjA3NyAwLjY2NjU2OCAzLjY1NDg5IDAuNjY2NTY3IDMuNjQ5MDFDMC42NjY1NTMgMy41MDg5OCAwLjY2NjU0IDMuMzcyNTYgMC42NzQ0NTggMy4yNTY1MUMwLjY4MzExNyAzLjEyOTU5IDAuNzAzNDMzIDIuOTc5MTEgMC43NjgwNjIgMi44MjMwOEMwLjkwMzM4NyAyLjQ5NjM4IDEuMTYyOTUgMi4yMzY4MSAxLjQ4OTY2IDIuMTAxNDlDMS42NDU2OSAyLjAzNjg2IDEuNzk2MTcgMi4wMTY1NCAxLjkyMzA4IDIuMDA3ODhDMi4wMzkxNCAxLjk5OTk2IDIuMTc1NTYgMS45OTk5OCAyLjMxNTU5IDEuOTk5OTlDMi4zMjE0NiAxLjk5OTk5IDIuMzI3MzUgMS45OTk5OSAyLjMzMzIzIDEuOTk5OTlIMy4zMzU4MUMzLjM0MTk2IDEuODQ5NDIgMy4zNjAzOCAxLjY5MDMxIDMuNDEzNjQgMS41NDM5N0MzLjU0ODQ0IDEuMTczNjEgMy44NDAxOSAwLjg4MTg2OCA0LjIxMDU0IDAuNzQ3MDdDNC40MzcwOSAwLjY2NDYxMyA0LjY5NDIxIDAuNjY1NjUzIDQuOTAyOTIgMC42NjY0OTZaTTMuMzMzMjMgMy4zMzMzM0gyLjMzMzIzQzIuMTY4OCAzLjMzMzMzIDIuMDc4ODYgMy4zMzM2OSAyLjAxMzg1IDMuMzM4MTJDMi4wMTA4MiAzLjMzODMzIDIuMDA3OTggMy4zMzg1NCAyLjAwNTMyIDMuMzM4NzVDMi4wMDUxMSAzLjM0MTQxIDIuMDA0OSAzLjM0NDI1IDIuMDA0NyAzLjM0NzI3QzIuMDAwMjYgMy40MTIyOSAxLjk5OTkgMy41MDIyMiAxLjk5OTkgMy42NjY2NlYzLjk5OTk5QzEuOTk5OSA0LjY2MjkgMi4wMDU2MyA0Ljg2MzU3IDIuMDQ1MzMgNS4wMTE3NUMyLjE2ODYyIDUuNDcxODcgMi41MjgwMiA1LjgzMTI3IDIuOTg4MTQgNS45NTQ1NkMzLjA2NzM0IDUuOTc1NzggMy4xNjE1MiA1Ljk4NzMgMy4zMzMyMyA1Ljk5MzQyVjMuMzMzMzNaTTQuNjY2NTcgMi4yOTYyOUM0LjY2NjU3IDIuMTUwMjUgNC42NjY4NSAyLjA3MDM5IDQuNjcwMzcgMi4wMTI0OUM0LjY3MDU1IDIuMDA5NTggNC42NzA3MiAyLjAwNjg3IDQuNjcwOSAyLjAwNDMzQzQuNjczNDQgMi4wMDQxNSA0LjY3NjE2IDIuMDAzOTcgNC42NzkwNyAyLjAwMzc5QzQuNzM2OTcgMi4wMDAyOCA0LjgxNjgzIDEuOTk5OTkgNC45NjI4NiAxLjk5OTk5SDExLjAzNjlDMTEuMTgzIDEuOTk5OTkgMTEuMjYyOCAyLjAwMDI4IDExLjMyMDcgMi4wMDM3OUMxMS4zMjM2IDIuMDAzOTcgMTEuMzI2NCAyLjAwNDE1IDExLjMyODkgMi4wMDQzM0MxMS4zMjkxIDIuMDA2ODYgMTEuMzI5MyAyLjAwOTU5IDExLjMyOTQgMi4wMTI0OUMxMS4zMzI5IDIuMDcwMzkgMTEuMzMzMiAyLjE1MDI1IDExLjMzMzIgMi4yOTYyOVY1Ljk5OTk5QzExLjMzMzIgNy44NDA5NCA5Ljg0MDg1IDkuMzMzMzMgNy45OTk5IDkuMzMzMzNDNi4xNTg5NSA5LjMzMzMzIDQuNjY2NTcgNy44NDA5NCA0LjY2NjU3IDUuOTk5OTlWMi4yOTYyOVpNMTIuNjY2NiAzLjMzMzMzVjUuOTkzNDJDMTIuODM4MyA1Ljk4NzMgMTIuOTMyNSA1Ljk3NTc4IDEzLjAxMTcgNS45NTQ1NkMxMy40NzE4IDUuODMxMjcgMTMuODMxMiA1LjQ3MTg3IDEzLjk1NDUgNS4wMTE3NUMxMy45OTQyIDQuODYzNTcgMTMuOTk5OSA0LjY2MjkgMTMuOTk5OSAzLjk5OTk5VjMuNjY2NjZDMTMuOTk5OSAzLjUwMjIyIDEzLjk5OTUgMy40MTIyOSAxMy45OTUxIDMuMzQ3MjdDMTMuOTk0OSAzLjM0NDI1IDEzLjk5NDcgMy4zNDE0MSAxMy45OTQ1IDMuMzM4NzVDMTMuOTkxOCAzLjMzODU0IDEzLjk4OSAzLjMzODMzIDEzLjk4NiAzLjMzODEyQzEzLjkyMDkgMy4zMzM2OSAxMy44MzEgMy4zMzMzMyAxMy42NjY2IDMuMzMzMzNIMTIuNjY2NlpNNy4wMzY5NCAxMi42NjY3QzYuMjIzMiAxMi42NjY3IDUuNTQyNzEgMTMuMjM3MiA1LjM3MzYxIDE0SDEwLjYyNjJDMTAuNDU3MSAxMy4yMzcyIDkuNzc2NiAxMi42NjY3IDguOTYyODYgMTIuNjY2N0g3LjAzNjk0WiIgZmlsbD0iIzhGOEI5QyIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzIxMTVfMzA2Ij4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+CjxzY3JpcHQgeG1sbnM9IiIvPgo8L3N2Zz4K",alt:"reward",class:"Reward"}),ni=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NSIgaGVpZ2h0PSI0NCIgdmlld0JveD0iMCAwIDQ1IDQ0IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KICA8cmVjdCB4PSIwLjUiIHdpZHRoPSI0NCIgaGVpZ2h0PSI0NCIgcng9IjIyIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMTYwNF81NTg5KSIvPgogIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTkuODc0NCAxOS43MjI3QzE5Ljg3NDQgMTguMjc1IDIxLjA1MjIgMTcuMDk3MiAyMi40OTk5IDE3LjA5NzJDMjMuOTQ3NyAxNy4wOTcyIDI1LjEyNTUgMTguMjc1IDI1LjEyNTUgMTkuNzIyN0MyNS4xMjU1IDIxLjE3MDUgMjMuOTQ3NyAyMi4zNDgzIDIyLjQ5OTkgMjIuMzQ4M0MyMS4wNTIyIDIyLjM0ODMgMTkuODc0NCAyMS4xNzA1IDE5Ljg3NDQgMTkuNzIyN1pNMjIuNDk5OSAyMS40NzgxQzIyLjg0NyAyMS40NzgxIDIzLjEyODcgMjEuMTk2NSAyMy4xMjg3IDIwLjg0OTRWMTguNTk2MUMyMy4xMjg3IDE4LjI0OSAyMi44NDcgMTcuOTY3MyAyMi40OTk5IDE3Ljk2NzNDMjIuMTUyOSAxNy45NjczIDIxLjg3MTIgMTguMjQ5IDIxLjg3MTIgMTguNTk2MVYyMC44NDk0QzIxLjg3MTIgMjEuMTk2NSAyMi4xNTI5IDIxLjQ3ODEgMjIuNDk5OSAyMS40NzgxWiIgZmlsbD0iIzFFMTYzOCIvPgogIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMzEuODcxNCAxNS40NzIxQzMyLjA1MzMgMTUuNDcyMSAzMi4yMjY0IDE1LjU1MDkgMzIuMzQ1OSAxNS42ODc5QzMyLjQ2NDkgMTUuODI1NCAzMi41MTk0IDE2LjAwNzcgMzIuNDkzOCAxNi4xODhMMzEuOTAzMiAyMC40MTA1QzMxLjcxODggMjEuNzI3IDMwLjU3NzUgMjIuNzIgMjkuMjQ3OSAyMi43MkgyNy4zMDI2QzI2LjYwMTggMjMuODIyNCAyNS41MjYzIDI0LjY3MiAyNC4yNDA3IDI1LjA3OThWMjYuMzM5QzI0LjI0MDcgMjYuNjU1OCAyNC40OTk0IDI2LjkwNTIgMjQuODE2MiAyNi45MDY5QzI1Ljc1NDcgMjYuOTExMSAyNi41MTEzIDI3LjY2OTggMjYuNTExMyAyOC42MDk1VjI5LjQ3NDJIMTguNDg4N1YyOC42MDk1QzE4LjQ4ODcgMjcuNjY5OCAxOS4yNDUzIDI2LjkxMTEgMjAuMTgzOCAyNi45MDY5QzIwLjUwMDcgMjYuOTA1MiAyMC43NTkzIDI2LjY1NTggMjAuNzU5MyAyNi4zMzlWMjUuMDc5OEMxOS40NzM3IDI0LjY3MiAxOC4zOTgyIDIzLjgyMjQgMTcuNjk3NCAyMi43MkgxNS43NTIxQzE0LjQyMjUgMjIuNzIgMTMuMjgxMiAyMS43MjcgMTMuMDk2OCAyMC40MTA1TDEyLjUwNjIgMTYuMTg4QzEyLjQ4MDYgMTYuMDA3NyAxMi41MzUxIDE1LjgyNTQgMTIuNjU0MSAxNS42ODc5QzEyLjc3MzYgMTUuNTUwOSAxMi45NDY3IDE1LjQ3MjEgMTMuMTI4NiAxNS40NzIxSDE2LjMxMzhMMTYuMTk0NyAxNC40MDI0QzE2LjE3MTIgMTQuMTg3OCAxNi4zMzg5IDE0IDE2LjU1NTIgMTRIMjguNDQ0OEMyOC42NjExIDE0IDI4LjgyODggMTQuMTg3OCAyOC44MDUzIDE0LjQwMjRMMjguNjg2MiAxNS40NzIxSDMxLjg3MTRaTTE0LjM0MjUgMjAuMjM2MUMxNC40NDAyIDIwLjkzNTMgMTUuMDQ2MiAyMS40NjI2IDE1Ljc1MjEgMjEuNDYyNkgxNy4xMDEzQzE2Ljk4MTUgMjEuMTAwNCAxNi44OTgxIDIwLjcyMjggMTYuODU0IDIwLjMzNDZMMTYuNDUzMyAxNi43Mjk1SDEzLjg1MTdMMTQuMzQyNSAyMC4yMzYxWk0xOC42MTcgMTkuNzIyN0MxOC42MTcgMjEuODYzNyAyMC4zNTkgMjMuNjA1NyAyMi41IDIzLjYwNTdDMjQuNjQxIDIzLjYwNTcgMjYuMzgzIDIxLjg2MzcgMjYuMzgzIDE5LjcyMjdDMjYuMzgzIDE3LjU4MTYgMjQuNjQxIDE1LjgzOTcgMjIuNSAxNS44Mzk3QzIwLjM1OSAxNS44Mzk3IDE4LjYxNyAxNy41ODE2IDE4LjYxNyAxOS43MjI3Wk0yOS4yNDc5IDIxLjQ2MjZDMjkuOTUzOCAyMS40NjI2IDMwLjU1OTkgMjAuOTM1MyAzMC42NTc1IDIwLjIzNjFMMzEuMTQ4MyAxNi43Mjk1SDI4LjU0NjdMMjguMTQ2IDIwLjMzNDZDMjguMTAyIDIwLjcyMjggMjguMDE4NSAyMS4xMDA0IDI3Ljg5ODcgMjEuNDYyNkgyOS4yNDc5WiIgZmlsbD0iIzFFMTYzOCIvPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzE2MDRfNTU4OSIgeDE9IjMuMzQ3MDYiIHkxPSIyLjA2MjUiIHgyPSI2NS4zNDQ3IiB5Mj0iMTEuMDQ4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICA8c3RvcCBvZmZzZXQ9IjAuMTI5MTg0IiBzdG9wLWNvbG9yPSIjRkY5NDAwIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjAuOTkzMDA3IiBzdG9wLWNvbG9yPSIjRkVGNzQ2Ii8+CiAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRkUyNEEiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgo8c2NyaXB0IHhtbG5zPSIiLz48L3N2Zz4K",alt:"iconTrophy",class:"Trophy"}),si=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIDM3Njc4Ij4KPHJlY3Qgd2lkdGg9IjQ0IiBoZWlnaHQ9IjQ0IiByeD0iMjIiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xNzAxXzEyNjA0KSIvPgo8ZyBpZD0iaWNvbiI+CjxwYXRoIGlkPSJJY29uIiBkPSJNMjEuOTk5OCAxOS4wMDAyVjIzLjAwMDJNMjEuOTk5OCAyNy4wMDAySDIyLjAwOThNMjAuNjE1MSAxMy44OTJMMTIuMzkwMiAyOC4wOTg2QzExLjkzNCAyOC44ODY2IDExLjcwNTkgMjkuMjgwNiAxMS43Mzk2IDI5LjYwMzlDMTEuNzY5IDI5Ljg4NiAxMS45MTY4IDMwLjE0MjMgMTIuMTQ2MSAzMC4zMDlDMTIuNDA5MSAzMC41MDAyIDEyLjg2NDMgMzAuNTAwMiAxMy43NzQ5IDMwLjUwMDJIMzAuMjI0NkMzMS4xMzUyIDMwLjUwMDIgMzEuNTkwNCAzMC41MDAyIDMxLjg1MzQgMzAuMzA5QzMyLjA4MjcgMzAuMTQyMyAzMi4yMzA1IDI5Ljg4NiAzMi4yNTk5IDI5LjYwMzlDMzIuMjkzNiAyOS4yODA2IDMyLjA2NTUgMjguODg2NiAzMS42MDkzIDI4LjA5ODZMMjMuMzg0NCAxMy44OTJDMjIuOTI5OSAxMy4xMDY4IDIyLjcwMjYgMTIuNzE0MiAyMi40MDYxIDEyLjU4MjRDMjIuMTQ3NCAxMi40NjczIDIxLjg1MjEgMTIuNDY3MyAyMS41OTM1IDEyLjU4MjRDMjEuMjk2OSAxMi43MTQyIDIxLjA2OTYgMTMuMTA2OCAyMC42MTUxIDEzLjg5MloiIHN0cm9rZT0iIzI1MUQzRSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMTcwMV8xMjYwNCIgeDE9IjIuODQ3MDYiIHkxPSIyLjA2MjUiIHgyPSI2NC44NDQ3IiB5Mj0iMTEuMDQ4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIG9mZnNldD0iMC4xMjkxODQiIHN0b3AtY29sb3I9IiNGRjk0MDAiLz4KPHN0b3Agb2Zmc2V0PSIwLjk5MzAwNyIgc3RvcC1jb2xvcj0iI0ZFRjc0NiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRkUyNEEiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K",alt:"Reward Assign Failed",class:"Warn"});var oi;!function(e){e.normal="normal",e.okContinue="okContinue",e.unjoinYes="unjoinYes",e.unjoinNo="unjoinNo"}(oi||(oi={}));const ri=(e,t,i=!1)=>{const{locale:a}=e,n={normal:{innerHTML:a.WinDialog.ButtonContinue},okContinue:{innerHTML:a.WinDialog.FailedButtonContinue},unjoinYes:{onClick:()=>e.actionJoin(e.dialog.data),innerHTML:a.UnjoinDialog.ButtonYes},unjoinNo:{statedClasses:{isHollow:!0},innerHTML:a.UnjoinDialog.ButtonNo}}[t];return r({statedClasses:Object.assign({isPending:i},n.statedClasses),onClick:()=>{var t;null===(t=n.onClick)||void 0===t||t.call(),e.closeDialog()},innerHTML:n.innerHTML})},li={gift(e){const{name:i,failedRewards:a}=e.gifts[0],{locale:n}=e;return t("div",{class:"PageConfirmContainer"},i?t("div",{class:"PageConfirm Gift"},t("div",null,ni),t("div",{class:"Title"},n.WinDialog.Title),t("div",{class:"Description",innerHTML:o(n.WinDialog.Description,{rewards:i})}),t("div",{class:"PageConfirmButtonsGroup"},ri(e,oi.normal))):t("div",{class:"PageConfirm Gift"},t("div",null,si),t("div",{class:"Title",innerHTML:o(n.WinDialog.FailedTitle,{failedRewards:a})}),t("div",{class:"Description"},n.WinDialog.FailedDescription),t("div",{class:"PageConfirmButtonsGroup"},ri(e,oi.okContinue))))},unjoin(e){const{locale:i}=e;return t("div",{class:"DialogContentUnjoin"},t("div",{class:"DialogContentUnjoinTitle"},i.UnjoinDialog.Title),t("div",{class:"DialogContentUnjoinDescription",innerHTML:i.UnjoinDialog.Description}),ri(e,oi.unjoinYes),ri(e,oi.unjoinNo))}},pi=e=>{const t=["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime"],i={};return Object.keys(e).map((a=>{const n=e[a];i[a]="games"===a?n.items:t.includes(a)?new Date(n):n})),i},di=(e,t)=>(["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime","state","prizes","minBetCount","scoreCriteria","termsUrl"].forEach((i=>{e[i]=t[i]})),Object.assign({},e)),ci=e=>{let{item:t,items:i}=e;return i.forEach((e=>e.userId=e.userId||e.userID)),t?(t.userId=t.userId||t.userID,-1!==i.findIndex((e=>e.userId===t.userId))||(i=[t,...i]),i.map((e=>(null==t?void 0:t.userId)&&t.userId===e.userId?Object.assign(Object.assign({},e),{isMe:!0}):e))):i},hi=e=>window.postMessage({type:"UpdateLeaderboardState",labels:e}),gi=e=>window.postMessage({type:"UpdateTournamentsItemReq",id:e.id}),ui=(e,t)=>window.postMessage({type:"UpdateLeaderboardsReq",id:e.id,query:t}),mi=(e,t,i)=>{const{success:a,data:n}=t;let s=e.tournamentList.findIndex((e=>e.id===(n.tournamentId||n.id||n.bonusCode))),o=e.tournamentList[s];if(-1!=s){if(o.isActionJoinPending=!1,e.page===d.item&&e.tournamentItem.id===o.id&&(e.tournamentItem=Object.assign(Object.assign({},e.tournamentItem),{isActionJoinPending:!1})),e.pendingChangeEvent.emit(o),!a)return e.tournamentList[s]=o,e.tournamentList=[...e.tournamentList],void e.openDialog(p.error);if(i?(o.isPlayerAcknowledged=!0,o.order=e.minOrder--):(o.isUnjoined=!0,((e,t)=>{const i=setTimeout((()=>{e.tournamentList=e.tournamentList.filter((e=>e.id!==t)),clearTimeout(i)}),100)})(e,n.tournamentId)),e.tournamentList[s]=Object.assign({},o),e.tournamentList=[...e.tournamentList],e.page===d.item){if(!i)return void e.setPage(d.list);e.tournamentItem=Object.assign({},o)}e.nextPage&&(e.setPage(e.nextPage),e.nextPage=void 0)}},bi=(e,t)=>{t.success?(e.leaderboards=ci(t.data),e.currentPlayerRank=t.data.item?t.data.item.rank:-1):console.error(t)},fi=(e,t)=>{const i=pi(t);e.page===d.item&&e.tournamentItem.id===t.id&&(e.tournamentItem=di(e.tournamentItem,i)),e.tournamentList=e.tournamentList.map((e=>e.id===t.id?di(e,i):e))},yi=(e,t)=>{e.tournamentList=e.tournamentList.filter((e=>e.id!==t.id))},wi=(e,t)=>{const i=e.tournamentList.findIndex((e=>e.id===t.id));-1===i?e.tournamentList=[pi(t),...e.tournamentList]:(e.tournamentList[i]=pi(t),e.tournamentList=[...e.tournamentList])},xi={list(e){var i;if(!(null==e?void 0:e.tournamentList))return e.tournamentList=null===(i=e.leaderboardsInit)||void 0===i?void 0:i.map((e=>pi(e))),t("general-animation-loading",null);const{locale:a,language:n}=e;return vi(e.tournamentList.length?t("div",{class:"Leaderboards ScrollBar Row"},e.tournamentList.map(((i,a)=>t("tournament-item",{tid:i.id,key:i.id,tournament:i,style:{order:`${i.order||a}`},isNew:e.newIdList.includes(i.id),language:n})))):t("div",{class:"NoLeaderboards ScrollBar Row"},t("h3",{class:"Title"},a.NoLeaderboards),t("div",{class:"message"},a.NoLeaderboardsTip)))},item(e){if(!e.tournamentItem)return t("general-animation-loading",null);const{locale:i,tab:a,language:n}=e;return vi([t("tournament-item-title",{tournament:e.tournamentItem,language:n}),t("div",{class:"TabsContainer"},t("div",{class:"Tabs"},Object.keys(h).map((n=>t("div",{class:y({active:a===n}),onClick:()=>(t=>{switch(e.tab=t,t){case h.leaderboard:e.leaderboards=void 0,ui(e.tournamentItem);break;case h.games:gi(e.tournamentItem)}})(n)},i[n]))))),t("div",{class:`TableContentWrapper Tab_${e.tab}`},e.renders.tab[e.tab]())])}},vi=e=>t("div",{class:"Root"},t("div",{class:"Main"},e)),ki={info(e){var i,a;const{locale:n,tournamentItem:s,isShowInfo:r}=e,l=Mi(null===(i=e.leaderboards)||void 0===i?void 0:i.find((e=>e.isMe))),p=!(null==l?void 0:l.place)||(null==l?void 0:l.unqualified)?"":o((null==l?void 0:l.prize)?n.TipPrize:n.TipPrizeWithoutReward,l),d=n.ScoreAlgorithms[s.scoreCriteria];return t("div",{class:"InfoContainer"},t("tournament-timer",{"is-detail":!0,tournament:s}),t("section",{class:"ShowInfo",onClick:()=>e.isShowInfo=!e.isShowInfo},t("div",{class:"DetailHeader"},t("span",null,r?ei:ti),t("span",null,n.LeaderboardDetails))),t("div",{class:"ContentScrollContainer "+(r?"expanded":"")},r&&t("section",{class:"Info"},t("div",{class:"Description"},s.description),t("div",{class:"Criterias"},t("div",null,n.ScoreCriteria,": ",t("span",null,d)),t("div",null,n.MinimumBetCriteria,": ",t("span",null,s.minBetCount))),!!s.termsUrl&&t("div",{class:"TC"},t("a",{href:s.termsUrl,target:"_blank"},n.TC))),g(e.tournamentItem)&&(null===(a=e.leaderboards)||void 0===a?void 0:a.find((e=>e.isMe)))&&t("section",{class:"ResultPrize",innerHTML:p}),t("section",{class:"PrizesContainer"},t("div",{class:"PrizesHeader"},ai,t("span",{class:"PrizesText"},n.Prizes)),t("div",{class:"Prizes"},s.prizes.map((e=>t("div",{class:"Prize"},t("span",{class:"Rank"},e.rank," ",1===e.count?"":" - "+(e.rank+e.count-1)),1===e.count?n.Place:n.Places,": ",t("span",{class:"PrizeText"},e.name))))))))},leaderboard(e){const{locale:i,tournamentItem:a}=e;if("Unstarted"===(null==a?void 0:a.state)){const e=u(null==a?void 0:a.startTime,new Date);return t("div",{class:"LeaderboardUnstarted",innerHTML:o(i.TournamentNotStarted,{startTime:e})})}return e.leaderboards?e.leaderboards.length?t("table",{class:"Leaderboards"},t("thead",null,t("tr",null,t("th",null,i.Rank),t("th",null,i.Player),t("th",null,i.Score),t("th",null,i.Prize))),e.leaderboards.map((i=>t("tr",{class:y({isMe:i.isMe}),ref:t=>i.isMe&&(e.isMeElement=t)},t("td",{class:"LeaderboardRank"},t("span",null,i.rank)),t("td",{class:"LeaderboardName"},t("span",null,i.shortName)),t("td",{class:"LeaderboardScore"},t("span",null,w(i.score,2,!0))),t("td",{class:"LeaderboardPrize"},t("span",null,i.prizeName)))))):t("div",{class:"LeaderboardUnstarted"},i.BeOne):t("general-animation-loading",null)},games(e){var i;return e.tournamentItem.games?t("div",{class:"Games"},e.tournamentItem.games.length?null===(i=e.tournamentItem.games)||void 0===i?void 0:i.map((i=>t("div",{class:"Game "+(e.currentGameId==i.id?"Current":""),onClick:()=>{e.onGameClick(i)}},t("ui-image",{src:i.defaultThumbnail,alt:"Game"})))):e.locale.NoGameConfiged):t("general-animation-loading",null)}},Mi=e=>({prize:null==e?void 0:e.prizeName,place:null==e?void 0:e.rank,unqualified:null==e?void 0:e.unqualified}),Ci={dialog:li,page:xi,tab:ki},Li=e=>{const{left:i,middle:a,right:n}=e,s={left:i,middle:a,right:n};return t("div",{class:"WrapperBar"},Object.keys(s).map((e=>{return t("div",{class:"WrapperBar"+(i=e,i.split("").map(((e,t)=>0===t?e.toUpperCase():e)).join(""))},s[e]||"");var i})))},Di=class{handleEvent(e){var t,i;const a=e.data,{type:n}=a,o=s(a,["type"]);var r;null===(i=null===(r=this,t={UpdateLeaderboardsPlayerRes:e=>{const{rank:t,detail:i}=l(e.data.items);window.postMessage({type:"UpdateLeaderboardState",rank:t,detail:i})},UpdateLeaderboardStateReq:()=>{window.postMessage({type:"UpdateLeaderboardState",labels:["win","new"]})},UpdateTournamentsItemRes:e=>{if(!e.success)return void r.openDialog(p.loadingError);const t=pi(e.data.item);r.tournamentItem=t,fi(r,t)},UpdateLeaderboardsRes:e=>bi(r,e),JoinTournamentRes:e=>mi(r,e,!0),UnjoinTournamentRes:e=>mi(r,e,!1),TournamentsPageIsReadyRes:e=>r.currentGameId=""+e.data.GameId,LeaderboardLiveEvent:e=>((e,t)=>{const{messageType:i,item:a}=t;switch(i){case"TournamentUpdate":case"PlayerLeaderBoardUpdate":wi(e,a);break;case"TournamentRemove":yi(e,a);break;case"LeaderBoardUpdate":e.leaderboards=ci(t)}})(r,e),LiveLeaderboardUpdate:e=>((e,t)=>{var i;try{const a=JSON.parse(t.data.Message),{playerLeaderBoard:n,tournamentId:s,leaderBoardList:o}=a;n&&window.postMessage({type:"UpdateLeaderboardState",rank:`${n.rank} / ${o.totalRecords}`,detail:{playerRank:n.rank,total:o.totalRecords}}),(null===(i=e.tournamentItem)||void 0===i?void 0:i.id)==s&&bi(e,{data:{item:Object.assign({},n),items:[...o.players]},success:!0})}catch(e){console.error("Exception when parse live update info, ",e)}})(r,Object.assign(Object.assign({},e),{messageType:"LeaderboardUpdate"})),LiveTournamentUpdate:e=>((e,t)=>{try{const i=JSON.parse(t.data.Message);fi(e,i)}catch(e){console.error("Exception when parse Player Tournament Info",e)}})(r,Object.assign(Object.assign({},e),{messageType:"TournamentUpdate"})),LiveLeaderboardFinalizeUpdate:e=>((e,t)=>{try{const i=JSON.parse(t.data.Message),a=i.rewards.filter((e=>e.status&&"success"!==e.status)).map((e=>c(e))),n=i.rewards.filter((e=>e.status&&"success"===e.status)).map((e=>c(e)));a.length&&(e.gifts=[{name:null,failedRewards:a.join(",")},...e.gifts]),n.length&&i.prizeName&&(e.gifts=[{name:i.prizeName[e.language]||i.prizeName["*"]||""},...e.gifts]),e.checkGift()}catch(e){console.error("Exception when parse Player LeaderboardFinalize info",e)}})(r,Object.assign(Object.assign({},e),{messageType:"PlayerFinalizeUpdate"}))})||void 0===t?void 0:t[n])||void 0===i||i.call(null,o)}handleClickToTournamentDetail(e){const t=e.detail;this.setPage(d.item,{tournament:t}),this.newIdList=this.newIdList.filter((e=>e!==t.id))}handleJoinTournamentEvent(e){const t=e.detail;this.actionJoin(t),this.tournamentItem=t}handleUnjoinTournamentEvent(e){const{tournament:t}=e.detail;this.openDialog(p.unjoin,t)}watchPropHandler(e,t){e!==t&&m[e]&&(this.locale=m[e])}checkNewIdList(){this.newIdList.length>0?this.addLabel("new"):this.removeLabel("new")}syncBarState(e,t){if(t){const i=x(e,t,((e,t)=>e.id===t.id));this.newIdList=[...this.newIdList,...i.map((e=>e.id))]}else this.checkNewIdList(),this.gifts.length&&this.addLabel("win")}showPropWatcher(e,t){0==t&&1==e&&(this.checkGift(),this.page=d.list)}addLabel(e){this.labels.includes(e)||this.labels.push(e),hi(this.labels)}removeLabel(e){this.labels=this.labels.filter((t=>t!=e)),hi(this.labels)}checkGift(){this.gifts.length?(this.labels.includes("win")||this.labels.push("win"),hi(this.labels),this.show&&this.openDialog(p.gift,this.gifts[0],(()=>{if(this.dialog.type===p.gift){this.gifts=this.gifts.slice(1);const e=setTimeout((()=>{this.checkGift(),clearTimeout(e)}),300)}}))):this.removeLabel("win")}getContainerScrollTop(){var e;return this.page===d.list?this.containerScrollTop:(null===(e=this.detailElement)||void 0===e?void 0:e.clientHeight)/2-250}handleClickOutside(e){const t=e.composedPath();t.includes(this.tooltipIconReference)||t.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidLoad(){window.postMessage({type:"TournamentsPageIsReady"})}renderTooltip(){return this.showTooltip?t("div",{class:"question__tooltip "+(this.showTooltip?"visible":""),ref:e=>this.tooltipReference=e,innerHTML:this.locale.Tip}):null}connectedCallback(){window.postMessage({type:"UpdateLeaderboardsPlayerReq"})}scrollToMyRankLine(){this.isMeElement&&(this.isMeElement.scrollIntoView({behavior:"smooth"}),this.scrolledToMyLine=!0)}componentDidRender(){this.scrolledToMyLine=!1,this.page===d.item?this.tab===h.leaderboard?this.currentPlayerRank>this.defaultPageSize&&!this.scrolledToMyLine&&this.scrollToMyRankLine():this.scrolledToMyLine=!1:this.page===d.list&&(this.scrolledToMyLine=!1)}onGameClick(e){e.id!=this.currentGameId&&(e=>{window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e.slug}})})(e)}actionJoin(e){if(!e.isActionJoinPending){e.isActionJoinPending=!0,this.page===d.item&&(this.tournamentItem.isActionJoinPending=!0,this.tournamentItem=Object.assign({},this.tournamentItem)),this.pendingChangeEvent.emit(e);try{e.isPlayerAcknowledged?(e=>{window.postMessage({type:"UnjoinTournamentReq",id:e.id})})(e):(e=>{var t,i;window.postMessage({type:"JoinTournamentReq",id:e.id,bonusCode:e.id||(null===(i=null===(t=e.wallets)||void 0===t?void 0:t[0])||void 0===i?void 0:i.code)})})(e)}catch(e){console.log("error",e)}}}setPage(e,t){this.page=e,e===d.item&&(this.isShowInfo=!1,this.tournamentItem=t.tournament,this.tournamentItem||gi(t.tournament),b(this.tournamentItem)&&ui(this.tournamentItem),this.tab=h.info),this.tournamentTimer.emit({page:e})}render(){return t(n,null,t("general-styling-wrapper",{clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,targetTranslations:m,translationUrl:this.translationUrl}),t("div",{class:`Wrapper ${this.device} ${this.orientation}`},t("div",{class:y("WrapperContent",{faded:this.dialog.isOpen,page:this.page})},this.page&&Li({left:this.page===d.list?t("span",{class:"EngagementSuiteIcon",onClick:this.openDialog.bind(this,p.tip)},Kt):t("span",{class:"EngagementSuiteIcon",onClick:this.setPage.bind(this,d.list)},ii),middle:this.locale.Leaderboards,right:t("span",{class:"EngagementSuiteIcon",onClick:()=>this.close.emit()},Xt)}),t("div",{class:`Leaderboards ${this.page} ${"list"===this.page?"Active":"Hidden"}`,ref:e=>this.pageElement=e},this.renders.page.list()),this.page===d.item&&t("div",{class:`Leaderboards ${this.page} ${"item"===this.page?"Active":"Hidden"} `,ref:e=>this.detailElement=e},this.renders.page.item())),t("div",{class:"WrapperUtil"},t("dialog",{class:`${this.dialog.type}`,open:this.dialog.isOpen},t("div",{class:"Hollow "+("gift"===this.dialog.type?"GradientRounded":"")},Li({right:t("span",{class:"EngagementSuiteIcon",onClick:()=>this.closeDialog()},Xt)}),this.dialog.isOpen&&(()=>{switch(this.dialog.type){case p.unjoin:return this.renders.dialog.unjoin();case p.tip:return t("div",{class:"Tip"},this.locale.Tip);case p.error:return t("div",{class:"Tip Error"},this.locale.FailedToJoin);case p.loadingError:return t("div",{class:"Tip",innerHTML:this.locale.LoadingError});case p.gift:return this.renders.dialog.gift()}})())))))}openDialog(e,t,i){if(this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!0,onClose:i,type:e,data:t}),e===p.error||e===p.tip){const e=setTimeout((()=>{this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1}),clearInterval(e)}),this.tipsHideDelay)}}closeDialog(){var e;null===(e=this.dialog.onClose)||void 0===e||e.call(this),this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1,onClose:void 0})}constructor(t){e(this,t),this.close=i(this,"close",7),this.tournamentTimer=i(this,"tournamentTimer",7),this.pendingChangeEvent=i(this,"pendingChangeEvent",7),this.minOrder=-1,this.gifts=[],this.labels=[],this.showTooltip=!1,this.defaultPageSize=f,this.scrolledToMyLine=!1,this.language="en",this.show=!1,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.device="Mobile",this.orientation="Landscape",this.leaderboardsInit=void 0,this.tipsHideDelay=3e3,this.tab=h.info,this.locale=m[this.language],this.tournamentItem=void 0,this.tournamentList=void 0,this.leaderboards=[],this.isDialogOpen=!1,this.isShowInfo=!1,this.page=d.list,this.tournamentInDialog=void 0,this.dialog={isOpen:!1,type:void 0,data:void 0,onClose:void 0},this.newIdList=[],this.renders={},Object.keys(Ci).forEach((e=>{this.renders[e]={},Object.keys(Ci[e]).forEach((t=>{this.renders[e][t]=Ci[e][t].bind(this,this)}))}))}static get watchers(){return{newIdList:["watchPropHandler"],language:["watchPropHandler"],tournamentList:["syncBarState"],show:["showPropWatcher"]}}};Di.style='.Leaderboards{height:100%;overflow-y:auto;transition:0.5s ease;transition-property:all, transform}.Leaderboards.list,.Leaderboards.item{margin-top:5px;opacity:0}.Leaderboards.list.Active,.Leaderboards.item.Active{opacity:1}.Leaderboards.list.Hidden,.Leaderboards.item.Hidden{display:none}.Leaderboards .question__tooltip{position:absolute;top:0;left:20px;width:320px;text-align:left;background-color:var(--emw--color-typography, rgba(255, 255, 255, 0.6));border:1px solid var(--emw--color-typography, rgba(255, 255, 255, 0.8));color:var(var(--emw--color-primary, rgb(255, 214, 47)), rgb(255, 214, 47));padding:10px;border-radius:5px;opacity:0;fill-opacity:0.5;transition:opacity 0.3s ease-in-out;z-index:10}.Leaderboards .question__tooltip.visible{opacity:0.8}table.Leaderboards{height:auto}table.Leaderboards td span{display:inline-block;overflow-y:auto;width:98%}table.Leaderboards td.LeaderboardRank{width:10%;min-width:70px}table.Leaderboards td.LeaderboardScore{width:25%}table.Leaderboards td.LeaderboardScore span{min-width:128px}table.Leaderboards td.LeaderboardName{width:20%;max-width:180px}table.Leaderboards td.LeaderboardPrize{width:auto;text-align:left;display:grid}.Wrapper{position:relative;min-height:100%;line-height:20px;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:var(--emw--border-radius-large, 8px);word-break:break-all}.Wrapper .Title{background-color:transparent}.Wrapper .TableContentWrapper{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Wrapper .Games .Game .Skeleton{animation:none}.Wrapper .Games .Game .Skeleton.Image{background-color:transparent}.Wrapper .WrapperContent .TableContentWrapper{height:calc(100vh - 216px);overflow-y:auto}.Wrapper .WrapperContent .Main{height:calc(100vh - 109px)}.Wrapper .WrapperContent .Main .Leaderboards.ScrollBar.Row{will-change:scroll-position;display:flex;flex-direction:column}.Wrapper .WrapperContent .Main .Leaderboards.ScrollBar.Row tournament-item{transition:2s ease-in-out;transform:translate(0) scale(1, 1);opacity:0.99}.Wrapper.Mobile .PageConfirmContainer,.Wrapper.Mobile .DialogContentUnjoin{min-width:80%;width:78vw}.Wrapper.Mobile dialog>div{margin:0px}.Wrapper.Mobile dialog.tip{padding:120px 10px}.Wrapper.Mobile dialog.unjoin .Hollow{margin:5px}.Wrapper.Mobile .GradientRoundedButton{font-size:var(--emw--font-size-medium, 14px)}.Wrapper.Mobile .PageConfirmButtonsGroup{margin:10px auto}.Wrapper.Mobile .PageConfirm.Gift{padding:5px 16px 30px}.Wrapper.Mobile .PageConfirm.Gift .Title{font-size:var(--emw--font-size-large, 22px);line-height:25px}.Wrapper.Mobile .PageConfirm.Gift .Description{font-size:var(--emw--font-size-medium, 16px)}.Wrapper.Mobile .PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton{font-size:var(--emw--font-size-medium, 16px);padding:8px}.Wrapper.Mobile .PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton.GradientRounded{border-radius:var(--emw--border-radius-large, 15px)}.Wrapper.Mobile .GradientRounded{position:relative;border-radius:12px}.WrapperContent{padding-bottom:7px;transition:0.5s filter;display:flex;flex-direction:column;justify-content:space-between}.WrapperContent.faded{filter:brightness(53.3333333333%);pointer-events:none}.WrapperContent .Title{background:transparent;width:initial;height:initial;border:initial;margin-bottom:initial}.WrapperContent .NoLeaderboards h3.Title{text-align:center}.WrapperContent .NoLeaderboards div.message{color:var(--emw--color-secondary, rgb(187, 185, 195));text-align:left}.Wrapper.Mobile .WrapperBar{padding:16px 8px 8px;margin-bottom:8px}.Wrapper.Mobile .Tip{padding:0px 30px 32px}.Wrapper.Mobile .TitleContainer .GradientRoundedButton{width:100px}.Wrapper.Mobile .WrapperContent .WrapperBar{padding:12px 8px;line-height:var(--emw--font-size-medium, 14px)}.Wrapper.Mobile .WrapperContent .WrapperBar .WrapperBarMiddle{font-size:var(--emw--font-size-medium, 14px)}.Wrapper.Mobile .items.TitleContainer{height:50px;margin-bottom:5px}.Wrapper.Mobile .Title{font-size:var(--emw--font-size-large, 16px)}.Wrapper.Mobile .WrapperContent .Main{height:calc(100vh - 179px)}.Wrapper.Mobile .WrapperContent .TableContentWrapper{height:calc(100vh - 276px);overflow-y:auto}.Wrapper.Mobile .WrapperBarLeft span.EngagementSuiteIcon img,.Wrapper.Mobile .WrapperBarRight span.EngagementSuiteIcon img{width:16px;height:16px}.WrapperBar{display:flex;width:100%;padding:16px 8px 12px;align-content:center;justify-content:center;align-items:center}.WrapperBar .WrapperBarLeft span{position:relative}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarLeft span.EngagementSuiteIcon img,.WrapperBarRight span.EngagementSuiteIcon img{width:24px;height:24px}.WrapperBarMiddle{flex-grow:1;text-align:center;font-size:var(--emw--font-size-medium, 16px);font-weight:500;color:var(--emw--color-secondary, rgb(187, 185, 195))}:host{display:block;font-size:var(--emw--font-size-x-small, 14px)}.ScrollBar{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Row{margin:10px 0;padding:0 20px}.Row:first-child{margin:0;padding-top:5px}.LeaderboardsItem{opacity:1;transition:1s opacity ease;position:relative;margin:20px 0;border:1px solid rgb(64, 57, 86);border-radius:6px;padding:12px 0}.LeaderboardsItem.Unjoined{opacity:0;margin:0;border:0 none;animation:slideOut 1s forwards}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.ShowInfo{margin:10px 0;padding:0 20px;transition:0.5s all ease}.TimeContainer{margin:10px 0;padding:0 20px;transition:0.5s all ease}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 14px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time .Running{width:100%;display:flex;flex-direction:row;justify-content:space-between}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 14px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.TitleContainer{display:flex;justify-content:space-between;margin:10px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat;align-items:center}.TitleContainer .GradientRoundedButton{width:120px}.item .TitleContainer{height:55px;overflow:auto}.TabsContainer{margin:10px 0;padding:0 20px;margin:0 20px;padding:0;border-bottom:1px solid #575757}.Tabs{display:flex;justify-content:space-between;justify-content:start;font-size:var(--emw--font-size-x-small, 14px);margin-bottom:-1px}.Tabs .Tab{text-transform:capitalize}.Tabs>div{padding:10px;color:rgb(102, 97, 120);cursor:pointer}.Tabs>div.active{color:var(--emw--color-typography, #FFF);border-bottom:2px solid var(--emw--color-typography, #FFF)}.Title{font-size:var(--emw--font-size-large, 20px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:14px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:14px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:10px 0;padding:0 20px;padding-left:30px;text-align:left}.ResultPrize span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.ContentScrollContainer{flex:1;display:flex;flex-direction:column;overflow-y:auto;position:relative;height:auto}.ContentScrollContainer.expanded{height:100%;max-height:100%}.PrizesContainer{flex:1;display:flex;flex-direction:column;min-height:100px;max-height:calc(100% - 20px)}.PrizesHeader,.DetailHeader{align-items:center;display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));padding:5px 0;z-index:1;margin:0 20px}.PrizesHeader img,.DetailHeader img{width:14px}.PrizesHeader .PrizesText,.DetailHeader .PrizesText{margin-left:3px;font-weight:600}.DetailHeader{margin:0}.Prizes{margin:10px 0;padding:0 20px;text-align:left;flex:1;overflow-y:auto;margin-bottom:0;padding-right:10px;margin-top:10px}.Prizes::-webkit-scrollbar{width:4px}.Prizes::-webkit-scrollbar-track{background:rgba(0, 0, 0, 0.1);border-radius:2px}.Prizes::-webkit-scrollbar-thumb{background:var(--emw--color-primary, rgb(255, 214, 47));border-radius:2px}.Prizes .Prize{margin:8px 0}.Prizes .Prize .Rank{margin-right:5px}.Prizes .Prize .PrizeText{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer section.Info{margin-bottom:12px;text-align:left;padding-left:20px}.InfoContainer section.Info .Criterias,.InfoContainer section.Info .Description{margin-top:10px;margin-right:10px}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards thead{position:sticky;top:0;z-index:2;background-color:var(--emw--color-background, hsl(254, 44%, 15%))}.Leaderboards td,.Leaderboards th{opacity:0.6;padding:12px 5px}.Leaderboards th:last-child{text-align:left}.Leaderboards td:first-child{padding-left:20px}.Leaderboards td:last-child{padding-right:20px}.Leaderboards .LeaderboardName{color:var(--emw--color-typography, #FFF);opacity:1}.Leaderboards tr.isMe{background:rgba(0, 0, 0, 0.2);scroll-margin-top:42px}.Leaderboards tr.isMe .LeaderboardRank span{padding:0px 3px;opacity:1;border:1px solid var(--emw--color-primary, rgb(255, 214, 47));border-radius:11px}.Leaderboards tr.isMe td{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:var(--emw--font-weight-semibold, 500)}.LeaderboardLabels{position:absolute;top:-6px;right:18px;display:flex;gap:4px}.LeaderboardLabel{width:30px;height:15px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-3x-small, 7px);line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.LeaderboardUnstarted{margin:10px 0;padding:0 20px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-medium, 16px)}.Games{margin:10px 0;padding:0 20px;display:grid;justify-content:start;grid-template-columns:repeat(4, 25%);margin-top:8px;align-content:flex-start;width:100%}.Games .Game{padding-right:8px}.Games .Game.Current{cursor:auto;filter:grayscale(10)}.Games .Game:nth-of-type(4n){padding-right:0px}.Games .Game:hover{filter:brightness(var(--emw--hover-brightness, 1.25));cursor:pointer}.Games .Game.Current:hover{cursor:auto;filter:grayscale(10);cursor:not-allowed}.Games img{width:100%;height:auto;margin:auto 0}dialog.tip{position:absolute;align-items:start;padding:120px 90px;line-height:20px;border:none;border-radius:var(--emw--border-radius-large, 8px);font-size:var(--emw--font-size-small, 16px)}dialog.tip>div{margin:0px}dialog{display:none;position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1;color:var(--emw--color-typography, #FFFFFF);transition:all 0.2s;transition-timing-function:ease-in-out}dialog>div{margin:32px;border-radius:8px;background:var(--emw--color-background, hsl(254, 44%, 15%));border:1px solid hsl(254, 20%, 28%);align-items:center}dialog div.Hollow .WrapperBar{padding:12px}dialog div.Hollow .WrapperBar .WrapperBarRight img{width:20px}dialog div.Hollow .Tip{line-height:20px;padding:0px 60px 32px;font-size:var(--emw--font-size-small, 16px)}dialog[open]{display:flex}.DialogContentUnjoin{padding:32px;padding-top:10px;display:flex;gap:10px;max-width:510px;flex-direction:column}.DialogContentUnjoinTitle{font-family:Montserrat;font-size:var(--emw--font-size-large, 20px);font-weight:600;line-height:24.38px;text-align:center}.DialogContentUnjoinDescription{color:var(--emw--color-secondary, rgb(187, 185, 195));margin-bottom:30px}.Tip{padding:32px;padding-top:0px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-small, 14px)}.Tip.Error{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-weight:var(--emw--font-weight-normal, 500)}.PageConfirmContainer{text-align:center;width:80%;min-width:450px;max-width:510px;margin:0 auto}.PageConfirm{padding:0px 32px 60px;display:flex;flex-direction:column;gap:20px}.PageConfirm .Title{font-size:var(--emw--font-size-large, 26px);text-align:center}.PageConfirm .Description{color:var(--emw--color-secondary, rgb(187, 185, 195));font-weight:400}.PageConfirm .Description span{color:var(--emw--color-typography, #FFF);font-weight:600}.PageConfirm.Gift{padding:22px 32px 60px}.PageConfirm.Gift .Title{font-size:var(--emw--font-size-large, 30px)}.PageConfirm.Gift .Description{font-size:var(--emw--font-size-medium, 20px)}.PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton{font-size:var(--emw--font-size-medium, 20px);padding:12px;height:auto}.PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton.GradientRounded{border-radius:20px}.PageConfirmButtonsGroup{width:150px;margin:20px auto;display:flex;flex-direction:column;gap:10px}.GradientRounded{display:block;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:rgb(30, 22, 56);position:relative;border-radius:16px}.GradientRounded.Hollow{background:rgb(30, 22, 56);color:#FFFFFF}.GradientRounded.Hollow::before{content:"";position:absolute;inset:0;border-radius:15px;border:1px solid transparent;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;-webkit-mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude}.GradientRoundedButton{border:none;padding:7px;height:32px;width:100%;font-size:var(--emw--font-size-medium, 16px);font-weight:700;line-height:17.07px;text-align:center;transition:0.5s opacity;cursor:pointer}.GradientRoundedButton.Pending{cursor:not-allowed;opacity:0.3}.GradientRoundedButton.Hollow span{background:-webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.LeaderboardsItem.GradientRounded.Hollow::before{border-radius:7px}.WrapperUtil .GradientRounded .WrapperBar{margin-bottom:0;padding-bottom:0}.WrapperUtil .GradientRounded .Tip{padding-top:0;padding-bottom:40px}.LeaderboardsItem .LeaderboardsItemContainer .TitleContainer{margin-bottom:16px}@keyframes slideOut{0%{display:block;opacity:1;height:max-content}50%{display:block;opacity:0.5}80%{display:none;opacity:0}100%{display:none;opacity:0;height:0}}';const Si=class{constructor(t){e(this,t),this.slides=null,this.slideWidth=0,this.controls={Prev:null,Next:null},this.xDown=null,this.yDown=null,this.slideNumber=3,this.slideShow=3,this.showArrow=!0,this.showButton=!1,this.autoSlide=!1,this.loopTime=1,this.autoItemHeight=!1,this.clientStyling="",this.clientStylingUrl="",this.currentPage=0,this.currentSlideNumber=0,this.slidesCount=0,this.limitStylingAppends=!1}slide(e){this.sliderEl.classList.remove("Static");let t=0;t=e?this.currentSlideNumber+this.slideNumber:this.currentSlideNumber-this.slideNumber,t<0||t>=this.slidesCount||(this.currentSlideNumber=t,this.currentPage=this.currentSlideNumber/this.slideNumber,this.updateListStyle())}slideTo(e){this.sliderEl.classList.remove("Static"),this.currentSlideNumber=e*this.slideNumber,this.currentPage=e,this.updateListStyle()}updateControls(){this.switchControl("Prev",0!==this.currentSlideNumber),this.switchControl("Next",this.currentSlideNumber!==this.slidesCount-this.slideShow)}switchControl(e,t){this.controls[e]&&(this.controls[e].disabled=!t)}componentWillLoad(){this.slideNumber||(this.slideNumber=1),this.slideShow||(this.slideShow=1)}componentDidLoad(){this.slides=this.slotEl.assignedElements(),this.slidesCount=this.slides.length;for(let e in this.controls)this.controls[e]=this.el.shadowRoot.querySelector(".Button"+e);this.autoSlide&&this.setSlideAutoInterval(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),0!==this.currentPage&&(this.sliderEl.classList.add("Static"),this.currentSlideNumber=this.currentPage*this.slideNumber)}componentDidRender(){this.slides&&(this.slideWidth=this.slides[0].offsetWidth),this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.updateListStyle(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}updateListStyle(){this.autoItemHeight&&null!==this.slides&&this.slides.forEach(((e,t)=>{t>=this.currentPage*this.slideNumber&&t<(this.currentPage+1)*this.slideNumber?e.classList.remove("hide"):e.classList.add("hide")}))}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY,clearInterval(this.sliderInterval)}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.slide(t>0),this.xDown=null,this.yDown=null,this.autoSlide&&this.setSlideAutoInterval()}setSlideAutoInterval(){0!=this.loopTime&&(clearInterval(this.sliderInterval),this.sliderInterval=setInterval((()=>{this.slideTo(this.currentPage+1<this.slidesCount/this.slideNumber?this.currentPage+1:0)}),1e3*Number(this.loopTime)))}componentDidUpdate(){this.sliderEl.style.transform=`translateX(${this.currentSlideNumber*this.slideWidth*-1}px)`,this.updateControls()}switchLoopStatus(e){this.autoSlide&&this.loopTime>0&&(e?clearInterval(this.sliderInterval):this.setSlideAutoInterval())}setClientStyling(){const e=new CSSStyleSheet;e.replace(this.clientStyling),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,e]}setClientStylingURL(){let e=new URL(this.clientStylingUrl);fetch(e.href).then((e=>e.text())).then((e=>{const t=new CSSStyleSheet;t.replace(e),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,t]}))}render(){return t("div",{key:"8f86541d4454387e01a54b26c0aa6515d47ddb4d",class:"GeneralSlider"},t("div",{key:"c3e606e98881afeb2b867a58b25f3e7aa3915808",class:"Slider"},t("ul",{key:"e764fb6ad7fe7a727b7c1f37b5fe26704f2cd390",class:`SliderList Col-${this.slideShow}`,part:"SliderList",onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1),ref:e=>this.sliderEl=e},t("slot",{key:"c61792d98ee4aefeb8fe8e84245eac495ff2f898",ref:e=>this.slotEl=e}))),this.showButton&&this.slidesCount>0&&t("div",{key:"35b1a666ec07535c2b70e8678aff70be5a2eff35",class:"PageButtons",part:"PageButtons"},[...Array(this.slidesCount/this.slideNumber)].map(((e,i)=>t("div",{class:"PageButton "+(this.currentPage==i?"active":""),title:`page${i}`,onClick:this.slideTo.bind(this,i),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)}," ")))),this.showArrow&&t("div",{key:"6e910a7d9013b49bc70160fdc8b193de0c1ee309",class:"ArrowButtons"},t("button",{key:"1d21da8ede99b7ef0c1610334763d15d7a9640c7",type:"button",class:"Button ButtonNext",onClick:this.slide.bind(this,!0),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},">"),t("button",{key:"e890b5cb47ba744fb977e492235330f201129f09",type:"button",class:"Button ButtonPrev",onClick:this.slide.bind(this,!1),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},"<")))}get el(){return a(this)}};function Ii(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function Ti(e,t){const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}Si.style=":host{display:block}.GeneralSlider{position:relative}.Slider{position:relative;width:100%;margin:0 auto;overflow:hidden}.SliderList{display:flex;margin:0;padding:0;list-style:none;transition:transform 0.5s ease-in-out}.SliderList.Static{transition-duration:0ms}::slotted(li){flex:1 0 auto;width:100%;margin:auto}::slotted(li.hide){visibility:hidden;height:0;transition-delay:500ms}.Col-2 ::slotted(li){flex:2 0 auto;width:50%}.Col-3 ::slotted(li){flex:3 0 auto;width:33.3333333333%}.Col-4 ::slotted(li){flex:4 0 auto;width:25%}.Col-5 ::slotted(li){flex:5 0 auto;width:20%}.Col-6 ::slotted(li){flex:6 0 auto;width:16.6666666667%}.Col-7 ::slotted(li){flex:7 0 auto;width:14.2857142857%}.Col-8 ::slotted(li){flex:8 0 auto;width:12.5%}.Col-9 ::slotted(li){flex:9 0 auto;width:11.1111111111%}.Col-10 ::slotted(li){flex:10 0 auto;width:10%}.Col-11 ::slotted(li){flex:11 0 auto;width:9.0909090909%}.Col-12 ::slotted(li){flex:12 0 auto;width:8.3333333333%}.Button{position:absolute;z-index:1;top:calc(50% - 32px);padding:20px;font-size:20px;line-height:20px;opacity:0.5;border:none;background:var(--emw--color-contrast, #07072A);color:var(--emw--color-white, #FFFFFF);cursor:pointer}.Button:hover{opacity:1;transition:opacity 0.5s ease-in-out}.Button[disabled],.Button[disabled]:hover{color:var(--emw--color-gray-150, #828282);opacity:0.25}.Button.ButtonNext{right:0}.PageButtons{display:flex;gap:4px;margin-top:8px}.PageButton{width:15px;height:4px;border-radius:4px;background-color:var(--emw--tournament-color-primary, #0072ed);opacity:0.2;cursor:pointer;float:right}.PageButton.active{width:45px;opacity:1}";const zi=class{constructor(t){e(this,t),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,e&&e.appendChild(i)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&Ii(this.el,this.clientStyling),this.clientStylingUrl&&Ti(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&Ii(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&Ti(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&Ii(this.el,this.clientStyling),this.clientStylingUrl&&Ti(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const a=(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]||{},Object.keys(t[e]).forEach((a=>{if(!i.en[a])return;const n=i.en[a];"object"==typeof t[e][a]?(i[e][a]=i[e][a]||Object.assign({},n),Object.keys(t[e][a]).forEach((n=>{i[e][a][n]=t[e][a][n]}))):i[e][a]=t[e][a]||Object.assign({},n)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(a)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},t("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return a(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};zi.style=":host{display:block}";export{L as casino_engagement_suite_bar,F as casino_engagement_suite_challenges_details,Pe as casino_engagement_suite_challenges_list,Re as casino_engagement_suite_container,Qe as casino_engagement_suite_free_spins_details,Ve as casino_engagement_suite_free_spins_list,tt as casino_engagement_suite_jackpot_details,st as casino_engagement_suite_jackpots_list,zt as casino_engagement_suite_luckywheel,At as casino_engagement_suite_luckywheel_details,Ut as casino_engagement_suite_luckywheel_list,Yt as casino_engagement_suite_modal,Vt as casino_engagement_suite_modal_container,qt as casino_engagement_suite_progress_bar,Di as casino_engagement_suite_tournament,Si as general_slider,zi as general_styling_wrapper}
|
|
1
|
+
import{r as e,h as t,c as i,g as a,H as n}from"./index-4a08682c.js";import{_ as s,l as o,r,g as l,D as p,L as d,a as c,T as h,i as g,b as u,c as m,d as b,e as f}from"./util.date-a59c0863.js";import{c as y,t as w,g as x}from"./utils-25141486.js";const v={labels:[],rank:"-"},k=["en"],M={en:{new:"new",win:"win"}},C=(e,t)=>{const i=t;return M[void 0!==i&&k.includes(i)?i:"en"][e]},L=class{constructor(t){e(this,t),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)}))},this.activeWidget=void 0,this.challengePercent=void 0,this.highlightChallenge=!1,this.clientStyling="",this.clientStylingUrl="",this.orientation="Landscape",this.device="Mobile",this.isChallengeLabel=!1,this.isForfeitedChallengeLabel=!1,this.isSpinForfeitedLabel=!1,this.language="en",this.jackpots=[],this.remainingFreeSpins=void 0,this.remainingLuckywheels=void 0,this.leaderboards=void 0,this.limitStylingAppends=!1,this.activeJackpot="",this.leaderboardState=v}handleEvent(e){const t=null==e?void 0:e.data,{type:i}=t,a=s(t,["type"]);switch(i){case"UpdateLeaderboardState":Object.keys(v).map((e=>{a[e]&&(this.leaderboardState=Object.assign(Object.assign({},this.leaderboardState),{[e]:a[e]}))}));break;case"LeaderboardLiveEvent":["TournamentUpdate","PlayerLeaderBoardUpdate"].includes(a.messageType)&&!this.leaderboardState.labels.includes("new")&&(this.leaderboardState=Object.assign(Object.assign({},this.leaderboardState),{labels:[...this.leaderboardState.labels,"new"]}))}}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||this.highlightChallenge?"Active":""),"data-app":"Challenges",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.challengePercent),t("div",{class:"ChallengeLabel "+(this.isChallengeLabel&&!this.isForfeitedChallengeLabel?"ShowChallengeLabel":"")},t("span",null,C("new",this.language))),t("div",{class:"ForfeitLabel "+(this.isForfeitedChallengeLabel?"ShowForfeitChallengeLabel":"")}))}getFreeSpinsTile(){return t("button",{class:"Tile Reward FreeSpins "+("FreeSpins"===this.activeWidget?"Active":""),"data-app":"FreeSpins",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.remainingFreeSpins),t("div",{class:"ForfeitLabel "+(this.isSpinForfeitedLabel?"ShowForfeitLabel":"")},t("span",null)))}getLuckyWheelTile(){return t("button",{class:"Tile Reward Luckywheel "+("LuckyWheels"===this.activeWidget?"Active":""),"data-app":"LuckyWheels",onClick:this.handleTileClick},t("div",{class:"RewardIcon"}),t("span",null,this.remainingLuckywheels))}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.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,this.leaderboardState.rank),t("div",{class:"LeaderboardLabels"},this.leaderboardState.labels.map((e=>t("div",{class:"LeaderboardLabel"},t("span",null,C(e,this.language)))))))}displayTilesInOneRow(){return this.jackpots.length+[this.leaderboards,this.challengePercent,this.remainingFreeSpins].filter((e=>!!e)).length<4}getTilesTemplate(){return this.displayTilesInOneRow()?t("div",{class:"EngagementSuiteContainer"},!!this.jackpots.length&&this.getJackpotsTemplate(),this.leaderboards&&this.getLeaderboardsTile(),this.remainingLuckywheels&&this.getLuckyWheelTile(),this.challengePercent&&this.getChallengeTile(),this.remainingFreeSpins&&this.getFreeSpinsTile()):t("div",{class:"EngagementSuiteContainer"},t("div",{class:"Jackpots"},!!this.jackpots.length&&this.getJackpotsTemplate()),t("div",{class:"Rewards"},this.leaderboards&&this.getLeaderboardsTile(),this.remainingLuckywheels&&this.getLuckyWheelTile(),this.challengePercent&&this.getChallengeTile(),this.remainingFreeSpins&&this.getFreeSpinsTile()))}render(){return t("div",{key:"9fa80b96364085609f814668692eea4a3842815f",class:`CasinoEngagementSuiteBar ${this.orientation} ${this.device}`,ref:e=>this.engagementSuiteBar=e},this.getTilesTemplate())}};L.style=':host{display:block}*{box-sizing:border-box}button{touch-action:manipulation}.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:7px 9px 0;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar{width:3px;background:none}.CasinoEngagementSuiteBar .EngagementSuiteContainer::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{cursor:pointer;background-color:var(--emw--color-background-secondary, #251D3E);border-radius:var(--emw--border-radius-small, 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:var(--emw--font-family-secondary, "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-small, 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 .Jackpots,.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{display:flex;gap:4px;width:100%}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{padding:14px 4px;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:var(--emw--font-size-x-small, 12px);color:var(--emw--color-typography, #fff)}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot.Enabled .JackpotBalance{font-weight:var(--emw--font-weight-extra-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:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 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:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ForfeitLabel{width:12px;height:12px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:50%;display:none;position:absolute;top:-6px;right:8px}.ShowChallengeLabel{display:inline-flex}.ShowForfeitLabel,.ShowForfeitChallengeLabel{display:inline-flex}.LeaderboardLabels{position:absolute;top:-4px;right:4px;display:flex;gap:4px}.LeaderboardLabel{min-width:23px;height:11px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:7px;line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.Landscape.CasinoEngagementSuiteBar{width:152px;padding-top:10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer{flex-direction:column}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{width:120px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{width:120px;height:40px}.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots,.Landscape.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards{flex-direction:column}.Portrait.CasinoEngagementSuiteBar{border-radius:0 0 var(--emw--border-radius-medium, 4px) var(--emw--border-radius-medium, 4px);height:auto;padding:3px 10px 10px;box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.2509803922), 8px 0 10px 0 rgba(0, 0, 0, 0.3019607843)}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer{padding:7px 0 0;gap:8px;flex-wrap:wrap}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Rewards,.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpots{gap:8px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Tile{flex:1 1 0px;height:32px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Jackpot{min-width:30%;padding:10px 4px}.Portrait.CasinoEngagementSuiteBar .EngagementSuiteContainer .Reward{min-width:20%;padding:4px 8px}.CasinoEngagementSuiteBar.Desktop.Landscape{width:252px}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.CasinoEngagementSuiteBar.Desktop.Landscape .Rewards,.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 .Rewards,.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpots,.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"), var(--emw--color-background-secondary, #251D3E)}.CasinoEngagementSuiteBar.Desktop.Landscape .Jackpot .JackpotType{display:block;font-weight:var(--emw--font-weight-extra-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 D=["en"],S={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",details:"Mission Details",tc:"Terms & Conditions",level:"Level",place:"Place",bet:"bet",bets:"bets",win:"Win",minBet:"Min Bet",maxBet:"Max Bet",contribution:"Contribution",gameLimit:"Full game list in Terms and Conditions or \n Contact Support"}},I=(e,t)=>{const i=t;return S[void 0!==i&&D.includes(i)?i:"en"][e]};var T,z;function E(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"}(T||(T={})),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",e[e.Forfeited=5]="Forfeited"}(z||(z={}));const F=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.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 a=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(a))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:a}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:a,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:a}})},this.toggle=()=>{this.showDetails=!this.showDetails},this.clientStyling="",this.clientStylingUrl="",this.challenge=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.isJoiningToChallenge=void 0,this.pausedChallengeIds=[],this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1}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:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getChallengeHeader(){const e=this.challenge.ChallengePresentation.PresentationName,i=this.challenge.Status===z.InProgress||this.challenge.Status===z.PendingLevelReward,a=this.isExpiredChallenge||this.isJoiningToChallenge||this.pausedChallengeIds.includes(this.challenge.ChallengeId),n=![z.Completed,z.Forfeited].includes(this.challenge.Status),s=this.challenge.Status!==z.Forfeited;return t("div",{class:"ChallengeDetailsHeader"},t("span",{class:"ChallengeName"},e),n?t("button",{onClick:this.changeChallengeStatus,class:`EngagementSuiteButton ${i?"Active":""}\n ${a?"Disabled":""}`,"data-id":this.challenge.Id},I(i?"unjoin":"join",this.language)):null,s?t("div",{class:"ChallengeLabel "+(this.challenge.IsNew?"ShowChallengeLabel":"")},t("span",null,I("new",this.language))):null)}getChallengeCountdown(){return this.challenge.Status!==z.Forfeited?t("div",{class:"ChallengeCountdown "+(this.isExpiredChallenge?"Expired":"")},this.isExpiredChallenge?"Expired":this.timer):null}getChallengeDetails(){const e=this.challenge.ChallengePresentation.Description,i=this.challenge.ChallengePresentation.Url,a=this.challenge.Games,n=this.challenge.TotalGamesCount>this.challenge.Games.length;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"},I("tc",this.language))),(null==a?void 0:a.length)&&t("div",{class:"ChallengeGames"},a.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})))),n&&t("div",{class:"GameLimitMessage"},t("span",null,I("gameLimit",this.language)))))}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:a,seconds:n}={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:${a}m:${n}s`:`${t}d:${i}h:${a}m`}getLevelTarget(e){const i=E(e.DisplayCurrencyTargetTurnover,this.challenge.CurrencySymbol);let a=`${I("place",this.language)} ${i}`;return 1===e.LevelTargetType?a+=` ${I("bet",this.language)}`:2===e.LevelTargetType&&(a+=` ${I("bets",this.language)} X ${e.TargetBetCount}`),t("span",{class:"ChallengeLevelTarget"},a)}getLevelBetRangesDetails(e){var i,a,n,s;if(0===e.LevelTargetType){const o=E(null===(i=e.BetRange)||void 0===i?void 0:i.MinBet,this.challenge.CurrencySymbol),r=E(null===(a=e.BetRange)||void 0===a?void 0:a.MaxBet,this.challenge.CurrencySymbol),l=e.LevelContributionPercent+"%",p=!!(null===(n=e.BetRange)||void 0===n?void 0:n.MinBet),d=!!(null===(s=e.BetRange)||void 0===s?void 0:s.MaxBet),c=100!==e.LevelContributionPercent;if(p||d||c)return t("div",{class:"ChallengeLevelBetDetails"},p&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,I("minBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},o)),d&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,I("maxBet",this.language),": "),t("span",{class:"ChallengeLevelBetRange"},r)),c&&t("div",{class:"ChallengeLevelBetDetail"},t("span",null,I("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(((a,n)=>t("div",{class:"ChallengeLevelCard "+(i(a)?"InProgress":"")},t("casino-engagement-suite-progress-bar",{clientStylingUrl:this.clientStylingUrl,class:this.device,value:a.ProgressPercentage,"hide-percent":0===a.ProgressPercentage&&!i(a)||100===a.ProgressPercentage,disabled:this.isExpiredChallenge||e},t("span",{slot:"Title",class:"ChallengeLevelTitle"},t("span",null,"Level ",n+1,": "),this.getLevelTarget(a))),t("div",{class:"ChallengeRewardMessage"},t("div",{class:"EngagementSuiteIconButton Reward"}),t("span",null,I("win",this.language),": "),t("span",{class:"CustomRewardMessage"},a.CustomRewardMessage)),this.getLevelBetRangesDetails(a)))))}getToggleButton(){return t("div",{class:"ChallengeCollapseButton",onClick:this.toggle},t("span",{class:"Toggle "+(this.showDetails?"Closed":"Open")}),t("span",null,I("details",this.language)))}render(){return t("div",{key:"0d845a9ff0cf10c942add6ab84bc0648b185fda6",class:`ChallengeDetailsPopup ${this.device}`},this.getActionsTemplate(),t("div",{key:"7ae213adaac726bbf0a6eddef530ef9a120fda7a",class:"ChallengeDetails "+(this.challenge.IsNew?"IsNewChallenge":"")},this.getChallengeHeader(),this.getChallengeCountdown(),this.getToggleButton(),this.getChallengeDetails(),this.getChallengeLevels()))}get host(){return a(this)}static get watchers(){return{challenge:["challengePropHandler"]}}};var j,N,P,B;F.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat;cursor:pointer}.EngagementSuiteIconButton.Reward{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/reward.svg) no-repeat;min-width:16px;min-height:16px}.ChallengeDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.ChallengeActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-23px;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-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.ChallengeDetails{padding:0px 19px 10px;overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.ChallengeDetails::-webkit-scrollbar{display:none}.ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsHeader{position:relative;display:flex;justify-content:space-between;gap:12px}.ChallengeDetailsHeader .ChallengeName{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-word}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.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-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.ChallengeCollapseButton{margin:24px 0 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-gray-300, #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(--emw--color-typography, #FFF);margin:12px 0}.CollapseDetails .TC{margin:12px 0 16px}.CollapseDetails .TC a{color:var(--emw--color-contrast, #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:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.CollapseDetails .ChallengeGames .Game img{width:96px;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);cursor:pointer}.CollapseDetails .ChallengeGames .GameLimitMessage{min-width:100%;height:50px;border-radius:var(--emw--border-radius-x-small, 2px);background-color:var(--emw--color-background-transparency-30, rgba(64, 57, 86, 0.3));display:flex;align-items:center;justify-content:center;text-align:center}.CollapseDetails .ChallengeGames .GameLimitMessage span{color:var(--emw--color-secondary, #BBB9C3);white-space:pre-line}.ShowDetails{display:block}.ChallengeLevels{display:flex;flex-direction:column;gap:16px;margin-top:24px;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-x-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:var(--emw--border-radius-large, 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(--emw--color-typography, #FFF)}.ChallengeLevels .InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-large, 8px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeDetailsPopup.Tablet .ChallengeActions,.ChallengeDetailsPopup.Desktop .ChallengeActions{padding-top:16px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.ChallengeDetailsPopup.Tablet .EngagementSuiteIconButton.Reward,.ChallengeDetailsPopup.Desktop .EngagementSuiteIconButton.Reward{min-width:24px;min-height:24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails,.ChallengeDetailsPopup.Desktop .ChallengeDetails{padding:20px 24px}.ChallengeDetailsPopup.Tablet .ChallengeDetails.IsNewChallenge,.ChallengeDetailsPopup.Desktop .ChallengeDetails.IsNewChallenge{padding-top:25px}.ChallengeDetailsPopup.Tablet .ChallengeName,.ChallengeDetailsPopup.Desktop .ChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengeDetailsPopup.Tablet .EngagementSuiteButton,.ChallengeDetailsPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 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.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(j||(j={})),function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(N||(N={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(P||(P={})),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",e[e.Forfeited=5]="Forfeited"}(B||(B={}));const A=["en"],O={en:{missions:"Missions",join:"Join",unjoin:"Unjoin",new:"new",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",history:"History",level:"Level",status:"Status",time:"Time",loading:"Loading...",completed:"Completed",expired:"Expired",forfeited:"Forfeited",noHistory:"No missions’ history available (last 30 days)",freeSpins:"Free Spins",luckyWheel:"Lucky Wheel",leaderboard:"Leaderboard",mission:"Mission",missionHasBeenForfeited:"The mission has been canceled.",support:"Please, contact support."}},W=(e,t)=>{const i=t;return O[void 0!==i&&A.includes(i)?i:"en"][e]};function H(e){return H="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},H(e)}function J(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function R(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function U(e){R(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===H(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))}var Y={};function G(){return Y}var Q={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}};function $(e,t,i){R(2,arguments);var a,n=function(e,t){return R(2,arguments),U(e).getTime()-U(t).getTime()}(e,t)/1e3;return((a=null==i?void 0:i.roundingMethod)?Q[a]:Q.trunc)(n)}function Z(e){R(1,arguments);var t=U(e),i=t.getUTCDay(),a=(i<1?7:0)+i-1;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function _(e){R(1,arguments);var t=U(e),i=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(i+1,0,4),a.setUTCHours(0,0,0,0);var n=Z(a),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var o=Z(s);return t.getTime()>=n.getTime()?i+1:t.getTime()>=o.getTime()?i:i-1}function V(e,t){var i,a,n,s,o,r,l,p;R(1,arguments);var d=G(),c=J(null!==(i=null!==(a=null!==(n=null!==(s=null==t?void 0:t.weekStartsOn)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.weekStartsOn)&&void 0!==n?n:d.weekStartsOn)&&void 0!==a?a:null===(l=d.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=U(e),g=h.getUTCDay(),u=(g<c?7:0)+g-c;return h.setUTCDate(h.getUTCDate()-u),h.setUTCHours(0,0,0,0),h}function q(e,t){var i,a,n,s,o,r,l,p;R(1,arguments);var d=U(e),c=d.getUTCFullYear(),h=G(),g=J(null!==(i=null!==(a=null!==(n=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==n?n:h.firstWeekContainsDate)&&void 0!==a?a:null===(l=h.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1);if(!(g>=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(c+1,0,g),u.setUTCHours(0,0,0,0);var m=V(u,t),b=new Date(0);b.setUTCFullYear(c,0,g),b.setUTCHours(0,0,0,0);var f=V(b,t);return d.getTime()>=m.getTime()?c+1:d.getTime()>=f.getTime()?c:c-1}function X(e,t){for(var i=e<0?"-":"",a=Math.abs(e).toString();a.length<t;)a="0"+a;return i+a}const K=function(e,t){var i=e.getUTCFullYear(),a=i>0?i:1-i;return X("yy"===t?a%100:a,t.length)},ee=function(e,t){var i=e.getUTCMonth();return"M"===t?String(i+1):X(i+1,2)},te=function(e,t){return X(e.getUTCDate(),t.length)},ie=function(e,t){return X(e.getUTCHours()%12||12,t.length)},ae=function(e,t){return X(e.getUTCHours(),t.length)},ne=function(e,t){return X(e.getUTCMinutes(),t.length)},se=function(e,t){return X(e.getUTCSeconds(),t.length)},oe=function(e,t){var i=t.length,a=e.getUTCMilliseconds();return X(Math.floor(a*Math.pow(10,i-3)),t.length)};var re={G:function(e,t,i){var a=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return i.era(a,{width:"abbreviated"});case"GGGGG":return i.era(a,{width:"narrow"});default:return i.era(a,{width:"wide"})}},y:function(e,t,i){if("yo"===t){var a=e.getUTCFullYear();return i.ordinalNumber(a>0?a:1-a,{unit:"year"})}return K(e,t)},Y:function(e,t,i,a){var n=q(e,a),s=n>0?n:1-n;return"YY"===t?X(s%100,2):"Yo"===t?i.ordinalNumber(s,{unit:"year"}):X(s,t.length)},R:function(e,t){return X(_(e),t.length)},u:function(e,t){return X(e.getUTCFullYear(),t.length)},Q:function(e,t,i){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return X(a,2);case"Qo":return i.ordinalNumber(a,{unit:"quarter"});case"QQQ":return i.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(a,{width:"narrow",context:"formatting"});default:return i.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,i){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return X(a,2);case"qo":return i.ordinalNumber(a,{unit:"quarter"});case"qqq":return i.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(a,{width:"narrow",context:"standalone"});default:return i.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,i){var a=e.getUTCMonth();switch(t){case"M":case"MM":return ee(e,t);case"Mo":return i.ordinalNumber(a+1,{unit:"month"});case"MMM":return i.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(a,{width:"narrow",context:"formatting"});default:return i.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,i){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return X(a+1,2);case"Lo":return i.ordinalNumber(a+1,{unit:"month"});case"LLL":return i.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(a,{width:"narrow",context:"standalone"});default:return i.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,i,a){var n=function(e,t){R(1,arguments);var i=U(e),a=V(i,t).getTime()-function(e,t){var i,a,n,s,o,r,l,p;R(1,arguments);var d=G(),c=J(null!==(i=null!==(a=null!==(n=null!==(s=null==t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null==t||null===(o=t.locale)||void 0===o||null===(r=o.options)||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==n?n:d.firstWeekContainsDate)&&void 0!==a?a:null===(l=d.locale)||void 0===l||null===(p=l.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==i?i:1),h=q(e,t),g=new Date(0);return g.setUTCFullYear(h,0,c),g.setUTCHours(0,0,0,0),V(g,t)}(i,t).getTime();return Math.round(a/6048e5)+1}(e,a);return"wo"===t?i.ordinalNumber(n,{unit:"week"}):X(n,t.length)},I:function(e,t,i){var a=function(e){R(1,arguments);var t=U(e),i=Z(t).getTime()-function(e){R(1,arguments);var t=_(e),i=new Date(0);return i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0),Z(i)}(t).getTime();return Math.round(i/6048e5)+1}(e);return"Io"===t?i.ordinalNumber(a,{unit:"week"}):X(a,t.length)},d:function(e,t,i){return"do"===t?i.ordinalNumber(e.getUTCDate(),{unit:"date"}):te(e,t)},D:function(e,t,i){var a=function(e){R(1,arguments);var t=U(e),i=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime();return Math.floor((i-a)/864e5)+1}(e);return"Do"===t?i.ordinalNumber(a,{unit:"dayOfYear"}):X(a,t.length)},E:function(e,t,i){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return i.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,i,a){var n=e.getUTCDay(),s=(n-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return X(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,i,a){var n=e.getUTCDay(),s=(n-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return X(s,t.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,i){var a=e.getUTCDay(),n=0===a?7:a;switch(t){case"i":return String(n);case"ii":return X(n,t.length);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return i.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(a,{width:"short",context:"formatting"});default:return i.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,i){var a=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,i){var a,n=e.getUTCHours();switch(a=12===n?"noon":0===n?"midnight":n/12>=1?"pm":"am",t){case"b":case"bb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,i){var a,n=e.getUTCHours();switch(a=n>=17?"evening":n>=12?"afternoon":n>=4?"morning":"night",t){case"B":case"BB":case"BBB":return i.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(a,{width:"narrow",context:"formatting"});default:return i.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,i){if("ho"===t){var a=e.getUTCHours()%12;return 0===a&&(a=12),i.ordinalNumber(a,{unit:"hour"})}return ie(e,t)},H:function(e,t,i){return"Ho"===t?i.ordinalNumber(e.getUTCHours(),{unit:"hour"}):ae(e,t)},K:function(e,t,i){var a=e.getUTCHours()%12;return"Ko"===t?i.ordinalNumber(a,{unit:"hour"}):X(a,t.length)},k:function(e,t,i){var a=e.getUTCHours();return 0===a&&(a=24),"ko"===t?i.ordinalNumber(a,{unit:"hour"}):X(a,t.length)},m:function(e,t,i){return"mo"===t?i.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):ne(e,t)},s:function(e,t,i){return"so"===t?i.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):se(e,t)},S:function(e,t){return oe(e,t)},X:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return pe(n);case"XXXX":case"XX":return de(n);default:return de(n,":")}},x:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();switch(t){case"x":return pe(n);case"xxxx":case"xx":return de(n);default:return de(n,":")}},O:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+le(n,":");default:return"GMT"+de(n,":")}},z:function(e,t,i,a){var n=(a._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+le(n,":");default:return"GMT"+de(n,":")}},t:function(e,t,i,a){return X(Math.floor((a._originalDate||e).getTime()/1e3),t.length)},T:function(e,t,i,a){return X((a._originalDate||e).getTime(),t.length)}};function le(e,t){var i=e>0?"-":"+",a=Math.abs(e),n=Math.floor(a/60),s=a%60;if(0===s)return i+String(n);var o=t||"";return i+String(n)+o+X(s,2)}function pe(e,t){return e%60==0?(e>0?"-":"+")+X(Math.abs(e)/60,2):de(e,t)}function de(e,t){var i=t||"",a=e>0?"-":"+",n=Math.abs(e);return a+X(Math.floor(n/60),2)+i+X(n%60,2)}const ce=re;var he=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},ge=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},ue={p:ge,P:function(e,t){var i,a=e.match(/(P+)(p+)?/)||[],n=a[1],s=a[2];if(!s)return he(e,t);switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",he(n,t)).replace("{{time}}",ge(s,t))}};const me=ue;var be=["D","DD"],fe=["YY","YYYY"];function ye(e,t,i){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var we={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function xe(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=t.width?String(t.width):e.defaultWidth;return e.formats[i]||e.formats[e.defaultWidth]}}var ve,ke={date:xe({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:xe({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:xe({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Me={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Ce(e){return function(t,i){var a;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&e.formattingValues){var n=e.defaultFormattingWidth||e.defaultWidth,s=null!=i&&i.width?String(i.width):n;a=e.formattingValues[s]||e.formattingValues[n]}else{var o=e.defaultWidth,r=null!=i&&i.width?String(i.width):e.defaultWidth;a=e.values[r]||e.values[o]}return a[e.argumentCallback?e.argumentCallback(t):t]}}function Le(e){return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=i.width,n=t.match(a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth]);if(!n)return null;var s,o=n[0],r=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(r)?function(e){for(var t=0;t<e.length;t++)if(e[t].test(o))return t}(r):function(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t].test(o))return t}(r);return s=e.valueCallback?e.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:t.slice(o.length)}}}const De={code:"en-US",formatDistance:function(e,t,i){var a,n=we[e];return a="string"==typeof n?n:1===t?n.one:n.other.replace("{{count}}",t.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+a:a+" ago":a},formatLong:ke,formatRelative:function(e){return Me[e]},localize:{ordinalNumber:function(e){var t=Number(e),i=t%100;if(i>20||i<10)switch(i%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},era:Ce({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Ce({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Ce({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Ce({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Ce({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(ve={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.match(ve.matchPattern);if(!i)return null;var a=i[0],n=e.match(ve.parsePattern);if(!n)return null;var s=ve.valueCallback?ve.valueCallback(n[0]):n[0];return{value:s=t.valueCallback?t.valueCallback(s):s,rest:e.slice(a.length)}}),era:Le({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Le({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Le({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Le({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Le({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var Se=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ie=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Te=/^'([^]*?)'?$/,ze=/''/g,Ee=/[a-zA-Z]/;function Fe(e,t,i){var a,n,s,o,r,l,p,d,c,h,g,u,m,b,f,y,w,x;R(2,arguments);var v=String(t),k=G(),M=null!==(a=null!==(n=null==i?void 0:i.locale)&&void 0!==n?n:k.locale)&&void 0!==a?a:De,C=J(null!==(s=null!==(o=null!==(r=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(p=i.locale)||void 0===p||null===(d=p.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==r?r:k.firstWeekContainsDate)&&void 0!==o?o:null===(c=k.locale)||void 0===c||null===(h=c.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==s?s:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var L=J(null!==(g=null!==(u=null!==(m=null!==(b=null==i?void 0:i.weekStartsOn)&&void 0!==b?b:null==i||null===(f=i.locale)||void 0===f||null===(y=f.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:k.weekStartsOn)&&void 0!==u?u:null===(w=k.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==g?g:0);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!M.localize)throw new RangeError("locale must contain localize property");if(!M.formatLong)throw new RangeError("locale must contain formatLong property");var D=U(e);if(!function(e){if(R(1,arguments),!function(e){return R(1,arguments),e instanceof Date||"object"===H(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!=typeof e)return!1;var t=U(e);return!isNaN(Number(t))}(D))throw new RangeError("Invalid time value");var S=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(D),I=function(e,t){return R(2,arguments),function(e,t){R(2,arguments);var i=U(e).getTime(),a=J(t);return new Date(i+a)}(e,-J(t))}(D,S),T={firstWeekContainsDate:C,weekStartsOn:L,locale:M,_originalDate:D};return v.match(Ie).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,me[t])(e,M.formatLong):e})).join("").match(Se).map((function(a){if("''"===a)return"'";var n,s,o=a[0];if("'"===o)return(s=(n=a).match(Te))?s[1].replace(ze,"'"):n;var r=ce[o];if(r)return null!=i&&i.useAdditionalWeekYearTokens||-1===fe.indexOf(a)||ye(a,t,String(e)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==be.indexOf(a))||ye(a,t,String(e)),r(I,a,M.localize,T);if(o.match(Ee))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return a})).join("")}function je(e,t){R(2,arguments);var i=U(e),a=U(t);return i.getTime()<a.getTime()}const Ne=(e,i,a,n)=>0===e.length?t("p",{class:"HistoryEmptyMessage"},W("noHistory",n)):t("div",{class:"HistoryList"},e.map((e=>t("div",{key:e.ProgressId,class:"HistoryListItem "+(i.includes(e.ProgressId)?"Opened":"Closed")},t("header",{class:"HistoryListItemHeader","data-id":e.ProgressId,onClick:a},e.Name,t("button",{class:"EngagementSuiteIconButton ArrowDown"})),t("div",{class:"HistoryListItemBody"},t("div",null,e.Levels.map(((e,i)=>t("div",{class:"HistoryListItemLevelCard"},((e,i,a)=>t("div",{class:"HistoryLevelInfo"},t("span",{class:"Level"},`${W("level",a)} ${i+1}`),t("span",{class:"Status"},((e,t)=>{switch(e){case N.Completed:return W("completed",t);case N.Expired:return W("expired",t);case N.Forfeited:return W("forfeited",t);default:return e}})(e.Status,a)),t("span",{class:"Time"},Fe(new Date(e.Time),"LLL d, yyyy HH:mm:ss"))))(e,i,n),(e=>!!e.Rewards&&e.Status===N.Completed)(e)&&((e,i)=>t("div",{class:"HistoryRewardsList"},t("div",{class:"EngagementSuiteIconButton CupRewardList"}),Object.values(e.Rewards).map((e=>((e,i)=>{const a=e.Type===j.Custom,n=a?e.RewardDescription:((e,t)=>{switch(e){case 0:return W("freeSpins",t);case 1:return W("luckyWheel",t);case 2:return W("leaderboard",t);case 3:return W("mission",t)}})(e.Type,i),s=a||e.IsRewarded;return t("div",{class:"HistoryRewardsItem "+(s||a?"IsRewarded":"IsNotRewarded")},t("span",{class:"HistoryRewardsItemName"},n),!a&&t("div",{class:"EngagementSuiteIconButton "+(s?"Check":"Close")}))})(e,i)))))(e,n)))))))))),Pe=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.resetNewChallengeLabel=i(this,"resetNewChallengeLabel",7),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.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),2===this.activeTab&&this.sendHistoryRequest()},this.toggleChallengeHistory=e=>{const t=e.currentTarget.getAttribute("data-id"),i=this.openedHistoryIds.findIndex((e=>e===t));i>-1?this.openedHistoryIds.splice(i,1):this.openedHistoryIds.push(t),this.openedHistoryIds=[...this.openedHistoryIds]},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 a=e.currentTarget.getAttribute("data-id");(null===(t=this.inProgressChallenges)||void 0===t?void 0:t.includes(a))?window.postMessage({type:"ShowConfirmationModal",ProgressToDeactivate:a}):(null===(i=this.inProgressChallenges)||void 0===i?void 0:i.length)>0?window.postMessage({type:"ShowConfirmationModal",ProgressToActivate:a,ProgressToDeactivate:this.inProgressChallenges[0]}):window.postMessage({type:"ChallengeJoinRequest",data:{ProgressToActivate:a}})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.challenges=[],this.isJoiningToChallenge=void 0,this.inProgressChallenges=void 0,this.pausedChallengeIds=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.activeTab=1,this.historyLoading=!1,this.challengesHistory=void 0,this.openedHistoryIds=[]}handleEvent(e){const{type:t}=null==e?void 0:e.data;"ChallengesHistoryResponse"===t&&(this.openedHistoryIds=[],this.challengesHistory=e.data.data||[],this.historyLoading=!1),"BarChallengesClick"===t&&(this.activeTab=1,this.openedHistoryIds=[])}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)}sendHistoryRequest(){this.historyLoading=!0,window.postMessage({type:"ChallengesHistoryRequest"})}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.challenges.filter((e=>e.Status!==B.Expired)).reduce(((t,i)=>{const a=new Date(i.ExpirationTime).getTime()-e;let n="00h:00m:00s";if(a<1)this.removeChallenge(i.Id);else{const{days:e,hours:t,minutes:i,seconds:s}={days:String(Math.floor(a/864e5)).padStart(2,"0"),hours:String(Math.floor(a%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(a%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(a%6e4/1e3)).padStart(2,"0")};n="00"===e?`${t}h:${i}m:${s}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Id]:n})}),{})}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===B.InProgress&&!this.pausedChallengeIds.includes(e.ChallengeId),Completed:this.isChallengeCompleted(e),Paused:this.isChallengePaused(e)}}isChallengePaused(e){return e.Status===B.Started&&e.LevelProgresses[0].ProgressPercentage>0||this.pausedChallengeIds.includes(e.ChallengeId)}isChallengeCompleted(e){return e.Status===B.Completed||e.Status===B.PendingLevelReward&&e.LevelProgresses.every((e=>100===e.ProgressPercentage))}getChallengeProgress(e){if(e.Status===B.Completed)return 100;if(this.isChallengePaused(e)||e.Status===B.PendingLevelReward||e.Status===B.InProgress){const t=e.LevelProgresses.find((e=>e.ProgressStatus===P.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===P.Fillup||e.ProgressStatus===P.Completed)).slice(-1)[0];return t?t.ProgressPercentage:i?i.ProgressPercentage:0}return-1}getChallengeHeaderTemplate(e){const{Id:i}=e,a=e.Status===B.InProgress||e.Status===B.PendingLevelReward;return t("div",{class:"ChallengeCardHeader"},t("div",{class:"ChallengeName"},e.ChallengePresentation.PresentationName),e.Status!==B.Completed?t("button",{class:`${a?"EngagementSuiteButton Active":"EngagementSuiteButton"} ${this.isJoiningToChallenge||this.pausedChallengeIds.includes(e.ChallengeId)?"Disabled":""}`,onClick:this.changeChallengeStatus,"data-id":i},W(a?"unjoin":"join",this.language)):null)}getChallengeTemplate(e){const i=e.Status===B.Forfeited,a=this.getChallengeProgress(e),n=this.timers[e.Id],s=a>-1?t("casino-engagement-suite-progress-bar",{clientStylingUrl:this.clientStylingUrl,class:this.device,value:a,disabled:this.isChallengePaused(e)},t("span",{slot:"Title",class:"ChallengeCountdown"},n)):t("span",{class:"ChallengeCountdown"},n);return i?this.getForfeitedChallengeTemplate(e):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))))}getForfeitedChallengeTemplate(e){return t("div",{class:"ChallengeCard ForfeitedChallengeCard"},t("div",{class:"ForfeitedChallengeName"},e.ChallengePresentation.PresentationName),t("div",{class:"ForfeitedChallengeInfo"},t("div",null,t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/alert-circle.svg",alt:"Forfeited"})),t("div",{class:"ForfeitedChallengeMessage"},t("div",null,W("missionHasBeenForfeited",this.language)),t("div",null,W("support",this.language)))))}getHeaderTemplate(){return t("header",{class:"ChallengesListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"ChallengesListPopupHeaderName"},W("missions",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTabTemplate(){return this.challenges.length?t("div",{class:"ChallengesListWrapper"},t("div",{class:"ChallengesList"},[...this.challenges].sort((e=>e.Status===B.InProgress?-1:0)).map((e=>this.getChallengeTemplate(e))))):t("div",{class:"ChallengesListEmpty"},t("h2",null,W("noMissions",this.language)),t("p",null,W("tryOtherGames",this.language)))}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),W("tooltip",this.language)))}getHistoryTabTemplate(){return t("div",{class:"HistoryWrapper"},t("div",{class:"HistoryCols"},t("div",{class:"HistoryColName Level"},W("level",this.language)),t("div",{class:"HistoryColName Status"},W("status",this.language)),t("div",{class:"HistoryColName Time"},W("time",this.language))),this.historyLoading?(e=this.language,t("div",{class:"HistoryLoader"},t("casino-engagement-suite-progress-bar",{indeterminate:!0}),t("span",null,W("loading",e)))):Ne(this.challengesHistory,this.openedHistoryIds,this.toggleChallengeHistory,this.language));var e}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabsWrapper"},t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},W("missions",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},W("history",this.language))))}getTabsContentTemplate(){return 1===this.activeTab?this.getListTabTemplate():this.getHistoryTabTemplate()}render(){return t("div",{key:"50b676f6394d813aa946ed1fd85e9612ba04a7a1",class:`ChallengesListPopup ${this.device}`},this.getHeaderTemplate(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{challenges:["challengesPropHandler"]}}};var Be,Ae;function Oe(){return window.screen.orientation.type.includes("portrait")?"Portrait":"Landscape"}Pe.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.CupRewardList{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/cup-reward-list.svg) no-repeat}.EngagementSuiteIconButton.Check{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/check.svg) no-repeat}.EngagementSuiteIconButton.ArrowDown{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.ChallengesListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.ChallengesListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.ChallengesListPopupHeader .EngagementSuiteIconButton{cursor:pointer}.ChallengesListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.HistoryList,.ChallengesListWrapper{overflow-y:auto;-ms-overflow-style:none;scrollbar-width:none}.HistoryList::-webkit-scrollbar,.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:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.ChallengeCard.InProgress::before{content:"";position:absolute;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.ChallengeCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px}.ForfeitedChallengeCard{cursor:default}.ChallengeName,.ForfeitedChallengeName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.ForfeitedChallengeName,.ForfeitedChallengeMessage{color:var(--emw--color-gray-150, #8F8B9C)}.ForfeitedChallengeInfo{margin-top:14px;display:flex;gap:4px}.ForfeitedChallengeMessage{font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);line-height:15px}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{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:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #FFFFFF)}.ChallengesListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3)}.ChallengeCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ChallengeLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 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:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowChallengeLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.EngagementSuiteTabs::after,.HistoryCols::after,.HistoryListItem.Opened .HistoryListItemBody::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.EngagementSuiteTabsWrapper{padding:0 20px;margin:8px 0}.EngagementSuiteTabsWrapper .EngagementSuiteTabs{display:flex;position:relative}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.HistoryWrapper{padding:0 20px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-secondary, #BBB9C3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 0;position:relative;display:flex}.HistoryWrapper .HistoryCols .HistoryColName{padding:0 5px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:90px}.HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:100px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-gray-150, #8F8B9C)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .EngagementSuiteIconButton.ArrowDown{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #FFFFFF);font-size:var(--emw--font-size-small, 14px)}.HistoryWrapper .HistoryListItem .EngagementSuiteIconButton.ArrowDown{transition:transform 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo{display:flex;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:90px}.HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:100px}.HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:8px;display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:var(--emw--font-size-x-small, 10px);font-weight:var(--emw--font-weight-bold, 700)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton{height:14px;width:14px}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem{display:flex;align-items:center;gap:2px;color:var(--emw--color-typography, #FFF)}.HistoryWrapper .HistoryListItem .HistoryRewardsList .HistoryRewardsItem.IsNotRewarded{color:var(--emw--color-gray-300, #666178)}.ChallengesListPopup.Tablet .ChallengesListPopupHeader,.ChallengesListPopup.Desktop .ChallengesListPopupHeader{padding-top:16px}.ChallengesListPopup.Tablet .ChallengesListPopupHeaderName,.ChallengesListPopup.Desktop .ChallengesListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Tablet .ChallengesListPopupHeader .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteIconButton.ArrowDown,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .ChallengesListPopupHeader .EngagementSuiteIconButton{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--font-size-large-plus, 24px);line-height:29px}.ChallengesListPopup.Tablet .ChallengesListEmpty p,.ChallengesListPopup.Desktop .ChallengesListEmpty p{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .ChallengeCardHeader,.ChallengesListPopup.Desktop .ChallengeCardHeader{margin-bottom:16px}.ChallengesListPopup.Tablet .ChallengeName,.ChallengesListPopup.Tablet .ForfeitedChallengeName,.ChallengesListPopup.Desktop .ChallengeName,.ChallengesListPopup.Desktop .ForfeitedChallengeName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.ChallengesListPopup.Tablet .ForfeitedChallengeMessage,.ChallengesListPopup.Desktop .ForfeitedChallengeMessage{font-size:var(--emw--font-size-small, 14px);line-height:16px}.ChallengesListPopup.Tablet .EngagementSuiteButton,.ChallengesListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .ChallengeCountdown,.ChallengesListPopup.Desktop .ChallengeCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ChallengesListPopup.Tablet .EngagementSuiteTooltipBackdrop,.ChallengesListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.ChallengesListPopup.Tablet .EngagementSuiteTooltip,.ChallengesListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.ChallengesListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper{padding:0 24px;margin:20px 0}.ChallengesListPopup.Tablet .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab,.ChallengesListPopup.Desktop .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper,.ChallengesListPopup.Desktop .HistoryWrapper{padding:0 24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryEmptyMessage,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryEmptyMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName{padding:0 12px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryCols .HistoryColName.Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryCols .HistoryColName.Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:10px;width:150px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem{margin-top:20px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:24px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{cursor:pointer;padding:17px 5px;font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemLevelCard{padding:12px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo{font-size:var(--emw--font-size-medium, 16px)}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Level{flex-basis:140px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryLevelInfo .Status{flex-basis:200px}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList{margin-top:12px;gap:12px;font-size:var(--emw--font-size-small, 14px);align-items:flex-end}.ChallengesListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList,.ChallengesListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryRewardsList .EngagementSuiteIconButton.CupRewardList{height:24px;flex-basis:24px}',function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(Be||(Be={})),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",e[e.Forfeited=5]="Forfeited"}(Ae||(Ae={}));const We="REWARD_MODAL",He="TARGET_MODAL",Je="SUPPORT_MODAL",Re=class{constructor(t){e(this,t),this.openModal=i(this,"openModal",7),this.closeModal=i(this,"closeModal",7),this.updateLWRemainingTikets=({Message:e})=>{try{const t=JSON.parse(e),i=Number(t.timestamp);i>this.lastTicketRemainingTimestamp?(this.lastTicketRemainingTimestamp=i,(null==t?void 0:t.items)&&(t.items.filter((e=>"wheelOfFortune"===e.programType)).forEach((e=>{const t=this.luckyWheels.find((t=>t.Program.Id.toString()===e.programId));(null==t?void 0:t.Current)&&(t.Current.RemainingTimes=e.remainingTimes)})),this.setRemainingLuckyWheels())):console.warn("Stale event ignored:",t)}catch(e){console.error("Exception when parse TicketRemaining event result",e)}},this.handlePopupClose=(e,t)=>()=>{"showChallengesList"===e&&this.isForfeitedChallengeLabel&&(this.isForfeitedChallengeLabel=!1,this.setChallengePercent()),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.handleFreeSpinsPopupBack=()=>{this.showFreeSpinsDetails=!1,this.showFreeSpinsList=!0},this.handleLuckyWheelsPopupBack=()=>{this.showLuckyWheelsList=!0,this.showLuckyWheelsDetails=!1},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.orientationChangeHandler=()=>{this.orientation=Oe(),this.barHeight=this.barWrapperEl.offsetHeight},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.setValidLuckyWheels=e=>{if(!Array.isArray(e))return;const t=(new Date).getTime();return e.filter((e=>{var i,a;return new Date(null===(i=e.Current)||void 0===i?void 0:i.EndTime).getTime()-t>0&&(null===(a=null==e?void 0:e.Current)||void 0===a?void 0:a.RemainingTimes)>0}))},this.jackpotChangeStatusRequest=e=>{e.stopPropagation();const t=e.currentTarget.getAttribute("data-id");if(this.jackpots=this.jackpots.map((e=>String(t)===String(e.JackpotId)?Object.assign(Object.assign({},e),{Pending:!0}):e)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}const i=this.jackpots.reduce(((e,t)=>(e[t.JackpotId]=t.Pending?!t.Enabled:t.Enabled,e)),{});window.postMessage({type:"JackpotChangeStatusRequest",data:i})},this.onLeaderboardsClose=()=>{this.showLeaderboardWidget=!1,this.activeWidget=""},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.endpoint=void 0,this.session=void 0,this.orientation="Landscape",this.device="Mobile",this.showChallengesList=!1,this.showFreeSpinsList=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showFreeSpinsDetails=!1,this.showJackpotDetails=!1,this.showLeaderboardWidget=!1,this.challengePercent=void 0,this.remainingFreeSpins=void 0,this.remainingLuckywheels=void 0,this.highlightChallenge=!1,this.limitStylingAppends=!1,this.activeWidget=void 0,this.challenges=void 0,this.inProgressChallenges=void 0,this.jackpots=[],this.freeSpins=void 0,this.luckyWheels=void 0,this.leaderboards=void 0,this.gameSlug="",this.pausedChallengeIds=[],this.isChallengeLabel=!1,this.isForfeitedSpinsLabel=!1,this.isForfeitedChallengeLabel=!1,this.isJoiningToChallenge=!1,this.selectedChallenge=void 0,this.selectedJackpot=void 0,this.selectedSpin=void 0,this.selectedSpinId=void 0,this.selectedChallengeId=void 0,this.selectedJackpotId=void 0,this.selectedLuckyWheelId=void 0,this.selectedLuckyWheelIndex=void 0,this.barHeight=0,this.lastTicketRemainingTimestamp=0}handleEvent(e){var t;const i=null==e?void 0:e.data,{type:a}=i,n=s(i,["type"]);switch(a){case"ChallengeGrant":{const t=e.data.data.challengeProgressData[0],i=this.challenges.findIndex((e=>$(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"CampaignGrant":this.grantFreeSpinCampaigns(e.data.data);break;case"ForfeitCampaign":{const t=e.data.data.toString();this.freeSpins.find((e=>e.Id===t)).IsForfeited=!0,this.freeSpins=[...this.freeSpins],this.isForfeitedSpinsLabel=!0,this.setRemainingFreeSpins();break}case"ChallengeForfeitNotification":{const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.ChallengeId===e.data.data.ChallengeId));i&&(i.Status=5,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))],this.challenges=[...this.challenges],this.isForfeitedChallengeLabel=!0,this.setSelectedChallenge(),this.setChallengePercent());break}case"ChallengeHasExpired":{const t=e.data.id,i=this.inProgressChallenges.findIndex((e=>e===t));i>-1&&this.inProgressChallenges.splice(i,1),this.setChallengePercent();break}case"FreeSpinHasExpired":this.setRemainingFreeSpins();break;case"BarLeaderboardsClick":this.showLeaderboardWidget=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.activeWidget="Leaderboards";break;case"BarChallengesClick":this.showChallengesList=!0,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.activeWidget="Challenges",this.isChallengeLabel=!1;break;case"BarLuckyWheelsClick":this.showChallengesList=!1,this.showFreeSpinsList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!0,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.activeWidget="LuckyWheels",this.isChallengeLabel=!1;break;case"BarFreeSpinsClick":this.showFreeSpinsList=!0,this.showChallengesList=!1,this.showJackpotsList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.isForfeitedSpinsLabel=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!1,this.activeWidget="FreeSpins";break;case"BarJackpotsClick":this.showJackpotsList=!0,this.showFreeSpinsList=!1,this.showChallengesList=!1,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!1,this.showChallengeDetails=!1,this.showJackpotDetails=!1,this.showFreeSpinsDetails=!1,this.showLeaderboardWidget=!1,this.showLuckywheelList=!1,this.showLuckywheelDetails=!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.find((e=>e.AwardBonusId===this.selectedSpinId)),this.isForfeitedSpinsLabel=!1,this.showFreeSpinsList=!1,this.showFreeSpinsDetails=!0;break;case"LuckyWheelClick":this.selectedLuckyWheelId=e.data.id,this.selectedLuckyWheelIndex=e.data.index,this.showLuckyWheelsList=!1,this.showLuckyWheelsDetails=!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"UpdateFreeSpinsProgress":this.updateFreeSpinsProgress(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:a}=n.data,s={modalType:(null==a?void 0:a.length)?We:Je,rewardMessage:this.getRewardMessage(e,t),hasError:i};this.openModal.emit(s);break}case"ShowConfirmationModal":this.openModal.emit({modalType:He,confirmationData:n});break;case"ShowNoSpinLeftModal":this.openModal.emit({modalType:"NO_SPIN_LEFT_MODAL",confirmationData:n});break;case"ShowLuckywheelRewardModal":{const{HasError:e,PrizeMessage:t,PrizeText:i,NoPrize:a,NoSpinLeft:s,Assets:o}=n.data;let r=We;e?r=Je:a&&(r="NO_PRIZE_MODAL"),this.setRemainingLuckyWheels(),this.openModal.emit({modalType:r,rewardMessage:t,rewardText:i,hasError:e,noSpinLeft:s,assets:o});break}case"ChallengeJoinRequest":this.isJoiningToChallenge=!0;break;case"JoinChallengeResult":{const{Success:t,JoinId:i,UnjoinId:a}=e.data.data;if(t){i&&this.updateChallengeStatus(i,1,!0),a&&this.updateChallengeStatus(a,0,!1),this.challenges=[...this.challenges];const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));this.selectedChallenge=Object.assign({},e)}this.isJoiningToChallenge=!1,this.closeModal.emit(He),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":this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":this.joinJackpotResult(e.data.data);break;case"TicketRemaining":this.updateLWRemainingTikets(e.data.data)}}componentDidLoad(){this.orientation=Oe(),this.device=function(){const e=navigator.userAgent.toLowerCase(),t=screen.availWidth,i=screen.availHeight;if(e.includes("iphone"))return"Mobile";if(e.includes("ipad"))return"Tablet";if(e.includes("android")){if(i>t&&t<800)return"Mobile";if(t>i&&i<800)return"Tablet"}return"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===Ae.InProgress||e.Status===Ae.PendingLevelReward)).map((e=>e.Id)),this.leaderboards=e.leaderboards,this.jackpots=e.jackpots||[],this.freeSpins=e.freeSpins,this.luckyWheels=this.setValidLuckyWheels(e.luckyWheels),this.gameSlug=e.slug,this.setChallengePercent(),this.setChallengeLabel(),this.setRemainingFreeSpins(),this.setRemainingLuckyWheels(),this.setSpinsForfeitedLabel()}setRemainingLuckyWheels(){this.luckyWheels&&(this.remainingLuckywheels=this.luckyWheels.length?this.luckyWheels.reduce(((e,t)=>e+t.Current.RemainingTimes),0).toString():"-")}setChallengeLabel(){this.challenges&&(this.isChallengeLabel=!!this.challenges.filter((e=>e.IsNew)).length)}setSpinsForfeitedLabel(){var e;this.freeSpins&&(this.isForfeitedSpinsLabel=!!(null===(e=this.freeSpins)||void 0===e?void 0:e.filter((e=>e.IsForfeited)).length))}setChallengePercent(){if(!this.challenges)return;this.highlightChallenge=this.isForfeitedChallengeLabel;const e=this.challenges.find((e=>e.Status===Ae.InProgress));if(e){const t=e.LevelProgresses.find((e=>e.ProgressStatus===Be.InProgress)),i=e.LevelProgresses.filter((e=>e.ProgressStatus===Be.Fillup||e.ProgressStatus===Be.Completed)).slice(-1)[0];this.highlightChallenge=e.LevelProgresses.every((e=>100===e.ProgressPercentage))||this.isForfeitedChallengeLabel,this.challengePercent=t?`${t.ProgressPercentage}%`:i?`${i.ProgressPercentage}%`:"0%"}else this.challengePercent="—"}setRemainingFreeSpins(){this.freeSpins&&(this.remainingFreeSpins=this.freeSpins.length?this.freeSpins.filter((e=>!e.IsForfeited)).reduce(((e,t)=>e+(t.NumberOfFreeSpins-t.NumberOfUsedFreeSpins)),0).toString():"—")}updateChallengeProgress(e){var t;const i=null===(t=this.challenges)||void 0===t?void 0:t.find((t=>t.Id===e.ProgressId));i&&(e.Status===Ae.Completed&&(i.Status=e.Status,this.inProgressChallenges=[...this.inProgressChallenges.filter((e=>e!==i.Id))]),i.LevelProgresses=i.LevelProgresses.map((t=>{var i;const a=null===(i=e.Levels)||void 0===i?void 0:i.find((e=>e.LevelId===t.LevelId));return a?Object.assign(Object.assign({},t),{ProgressPercentage:a.ProgressPercentage,ProgressStatus:a.ProgressStatus}):t})),this.challenges=[...this.challenges]),this.setSelectedChallenge(),this.setChallengePercent()}setSelectedChallenge(){if(this.showChallengeDetails){const e=this.challenges.find((e=>e.Id===this.selectedChallengeId));e&&(this.selectedChallenge=Object.assign({},e))}}updateFreeSpinsProgress(e){var t;const i=null===(t=this.freeSpins)||void 0===t?void 0:t.find((t=>t.AwardBonusId===e.AwardBonusId));if(i&&(i.NumberOfUsedFreeSpins=e.NumberOfUsedFreeSpins,i.VendorFreeSpinsRemainingCost=e.VendorFreeSpinsRemainingCost,this.freeSpins=[...this.freeSpins]),this.showFreeSpinsDetails&&this.selectedSpinId===e.AwardBonusId){const e=this.freeSpins.find((e=>e.AwardBonusId===this.selectedSpinId));e&&(this.selectedSpin=Object.assign({},e))}this.setRemainingFreeSpins()}updateChallengeStatus(e,t,i){var a;const n=null===(a=this.challenges)||void 0===a?void 0:a.find((t=>t.Id===e));n&&(n.Status=t,this.inProgressChallenges=i?[...this.inProgressChallenges,n.Id]:this.inProgressChallenges.filter((e=>e!==n.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))}}updateJackpotStatus(e){if(this.jackpots=this.jackpots.map((t=>String(t.JackpotId)===String(e.JackpotId)?Object.assign(Object.assign({},t),{IsClosed:e.IsClosed,JackpotEndTime:e.JackpotEndTime,Reason:e.Reason}):t)),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}joinJackpotResult(e){if(e.Success){const t=Object.keys(e.JackpotIds);if(t.length>0&&(this.jackpots=this.jackpots.map((i=>{const a=t.find((e=>String(e)===String(i.JackpotId)));return a?Object.assign(Object.assign(Object.assign({},i),i.Enabled!==e.JackpotIds[a]&&{Pending:!1}),{Enabled:e.JackpotIds[a]}):i}))),this.showJackpotDetails){const e=this.jackpots.find((e=>e.JackpotId===this.selectedJackpotId));e&&(this.selectedJackpot=Object.assign({},e))}}}grantFreeSpinCampaigns(e){e.forEach((e=>{const t=this.freeSpins.findIndex((t=>$(new Date(t.ExpiryDate),new Date(e.ExpiryDate))>0));t>-1?this.freeSpins.splice(t,0,e):this.freeSpins.push(e),this.freeSpins=[...this.freeSpins]})),this.setRemainingFreeSpins()}getChallengesWidgets(){return t("div",null,t("div",{class:this.showChallengesList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-challenges-list",{clientStylingUrl:this.clientStylingUrl,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",{clientStylingUrl:this.clientStylingUrl,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",{device:this.device,class:"CasinoEngagementSuiteDialog",leaderboardsInit:this.leaderboards,show:this.showLeaderboardWidget,onClose:this.onLeaderboardsClose}))}getLuckyWheelsWidgets(){return t("div",null,t("div",{class:this.showLuckyWheelsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-luckywheel-list",{class:"CasinoEngagementSuiteDialog",device:this.device,luckyWheels:this.luckyWheels,onClose:this.handlePopupClose("showLuckyWheelsList","showLuckyWheelsDetails")})),t("div",{class:this.showLuckyWheelsDetails?"Backdrop Opened":"Backdrop"},this.showLuckyWheelsDetails&&t("casino-engagement-suite-luckywheel-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,luckyWheels:this.luckyWheels,"selected-index":this.selectedLuckyWheelIndex,class:"CasinoEngagementSuiteDialog",onBack:this.handleLuckyWheelsPopupBack,onClose:this.handlePopupClose("showLuckyWheelsList","showLuckyWheelsDetails")})))}getFreeSpinWidgets(){return t("div",null,t("div",{class:this.showFreeSpinsList?"Backdrop Opened":"Backdrop"},t("casino-engagement-suite-free-spins-list",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handlePopupClose("showFreeSpinsList","showFreeSpinsDetails"),freeSpins:this.freeSpins})),t("div",{class:this.showFreeSpinsDetails?"Backdrop Opened":"Backdrop"},this.showFreeSpinsDetails&&t("casino-engagement-suite-free-spins-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,orientation:this.orientation,class:"CasinoEngagementSuiteDialog",onBack:this.handleFreeSpinsPopupBack,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",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onClose:this.handleJackpotsPopupClose,jackpots:this.jackpots,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})),this.showJackpotDetails&&t("div",{class:"Backdrop Opened"},t("casino-engagement-suite-jackpot-details",{clientStylingUrl:this.clientStylingUrl,device:this.device,class:"CasinoEngagementSuiteDialog",onBack:this.handleJackpotPopupBack,onClose:this.handleJackpotsPopupClose,"game-slug":this.gameSlug,jackpot:this.selectedJackpot,jackpotChangeStatusRequest:this.jackpotChangeStatusRequest})))}getRewardMessage(e,t){var i,a,n,s;return(null===(s=null===(n=null===(a=null===(i=this.challenges)||void 0===i?void 0:i.find((t=>t.Id===e)))||void 0===a?void 0:a.LevelProgresses)||void 0===n?void 0:n.find((e=>e.LevelId===t)))||void 0===s?void 0:s.CustomRewardMessage)||""}render(){return t("div",{key:"2078259b3dbfb0d47a5f0836b57127edfb0c29e2",class:`CasinoEngagementSuiteContainer ${this.device} ${this.orientation}`,style:{"--barHeight":`${this.barHeight}px`}},t("div",{key:"0dab66ad89f48dd9453afa96c030f61553267eaf",class:"barWrapper",ref:e=>this.barWrapperEl=e},t("casino-engagement-suite-bar",{key:"a2b78ee1ccae3a08567b7df713ed5d20022e2e93",clientStylingUrl:this.clientStylingUrl,orientation:this.orientation,device:this.device,"active-widget":this.activeWidget,"is-challenge-label":this.isChallengeLabel,"is-spin-forfeited-label":this.isForfeitedSpinsLabel,leaderboards:this.leaderboards,jackpots:this.jackpots,remainingFreeSpins:this.remainingFreeSpins,remainingLuckywheels:this.remainingLuckywheels,highlightChallenge:this.highlightChallenge,"challenge-percent":this.challengePercent,"is-forfeited-challenge-label":this.isForfeitedChallengeLabel})),this.challenges&&this.getChallengesWidgets(),this.freeSpins&&this.getFreeSpinWidgets(),!!this.jackpots.length&&this.getJackpotsWidgets(),this.leaderboards&&this.getLeaderboardsWidgets(),this.luckyWheels&&this.getLuckyWheelsWidgets(),t("casino-engagement-suite-modal-container",{key:"fc1c7ffe210e30571de84fba173f567724d01179",clientStylingUrl:this.clientStylingUrl,device:this.device,isJoiningToChallenge:this.isJoiningToChallenge}))}get host(){return a(this)}};Re.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 Ue=["en"],Ye={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"}},Ge=(e,t)=>{const i=t;return Ye[void 0!==i&&Ue.includes(i)?i:"en"][e]},Qe=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),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.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},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()},this.clientStyling="",this.clientStylingUrl="",this.spin=void 0,this.inProgressChallenges=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.orientation="Landscape",this.isJoiningToChallenge=void 0,this.limitStylingAppends=!1,this.timer="",this.showDetails=!1,this.isExpiredChallenge=!1,this.activeTab=1,this.visibleGames=[],this.tooltip=!1}componentWillLoad(){this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,t),this.visibleGames=this.spin.GamesInfo.slice(0,this.maxVisibleGames)}getActionsTemplate(){return t("header",{class:"FreeSpinsActions"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),"Mobile"!==this.device&&t("div",{class:"FreeSpinsPopupName"},Ge("freeSpins",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getFreeSpinsHeader(){const{VendorName:e,NumberOfFreeSpins:i,NumberOfUsedFreeSpins:a}=this.spin;return t("div",{class:"FreeSpinsDetailsHeader"},t("span",{class:"FreeSpinsName"},e),t("div",{class:"FreeSpinsCounter"},t("div",{class:"FreeSpinsHighlightedCounter"},i-a),"/",i))}getFreeSpinsCountdown(){const e=this.isExpiredChallenge?"Expired":this.timer,{VendorFreeSpinsCost:i,VendorFreeSpinsRemainingCost:a,CurrencySymbol:n}=this.spin;return t("div",{class:"FreeSpinsCountdown "+(this.isExpiredChallenge?"Expired":"")},e,t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},n,a),"/",n,i))}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},Ge("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},Ge("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,Ge("details",this.language))),this.showDetails&&t("p",{class:"FreeSpinsDescription"},this.spin.FreeSpinCampaignPresentation.Description))}getSpinInfoTemplate(){var e;const{NumberOfFreeSpins:i,NumberOfUsedFreeSpins:a,VendorFreeSpinsCost:n,CurrencySymbol:s,VendorFreeSpinsRemainingCost:o}=this.spin,r="GreenTube"===(null===(e=this.spin)||void 0===e?void 0:e.VendorName);return t("div",null,this.spin.FreeSpinCampaignPresentation.Description&&this.getSpinsDetailsTemplate(),t("div",{class:"FreeSpinsInfo"},t("div",{class:"FreeSpinsInfoItem"},Ge("quantityGranted",this.language),": ",t("span",null,i)),t("div",{class:"FreeSpinsInfoItem"},Ge("quantityLeft",this.language),": ",t("span",null,i-a)),t("div",{class:"FreeSpinsInfoItem"},Ge("valueGranted",this.language),": ",t("span",null,s,n),r&&t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"})),t("div",{class:"FreeSpinsInfoItem"},Ge("valueLeft",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"},Ge("tc",this.language)))))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),Ge("tooltip",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:"EngagementSuiteButton Active FreeSpinsGamesButton",onClick:this.handleLoadMore},Ge("loadMore",this.language)):""]}startCountdown(){this.updateTimer(),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:a,seconds:n}={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:${a}m:${n}s`:`${t}d:${i}h:${a}m`}render(){return t("div",{key:"7799bca46d4a7892440a791eaaedbc966c74cbaa",class:`FreeSpinsDetailsPopup ${this.device} ${this.orientation}`},this.getActionsTemplate(),t("div",{key:"09f9f995dea347d512680f509fd537706d8ce447",class:"FreeSpinsDetails"},this.getFreeSpinsHeader(),this.getFreeSpinsCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.getTooltipTemplate()))}get host(){return a(this)}};Qe.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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.FreeSpinsDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.FreeSpinsDetailsPopup.Disabled .FreeSpinsDetailsHeader{opacity:0.5}.FreeSpinsDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.FreeSpinsDetailsPopup.Disabled .FreeSpinsInfoItem{color:var(--emw--color-gray-150, #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 .FreeSpinsPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px}.FreeSpinsInfo .EngagementSuiteIconButton{margin-left:5px;width:17px;height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.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:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #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}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.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-secondary, #BBB9C3)}.FreeSpinsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.FreeSpinsCounter{display:flex;color:var(--emw--color-secondary, #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-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.FreeSpinsCountdown.Expired{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs{margin:20px 0 12px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.FreeSpinsInfoItem{display:flex;align-items:center;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-contrast, #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-gray-300, #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-medium, 16px);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 .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsActions,.FreeSpinsDetailsPopup.Desktop .FreeSpinsActions{padding-top:16px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip{padding:24px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right: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 .EngagementSuiteButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteButton{min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.FreeSpinsDetailsPopup.Tablet .FreeSpinsInfoItem,.FreeSpinsDetailsPopup.Desktop .FreeSpinsInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsDetailsPopup.Mobile.Landscape .FreeSpinsGamesListWrapper{overflow:visible}';const $e=["en"],Ze={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",forfeited:"The campaign has been canceled.",support:"Please, contact support."}},_e=(e,t)=>{const i=t;return Ze[void 0!==i&&$e.includes(i)?i:"en"][e]},Ve=class{constructor(t){e(this,t),this.close=i(this,"close",7),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},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.freeSpins=[],this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.newSpinIds=[]}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 a=new Date(i.ExpiryDate).getTime()-e;let n="00h:00m:00s";if(a<1)this.removeFreeSpin(i.AwardBonusId);else{const{days:e,hours:t,minutes:i,seconds:s}={days:String(Math.floor(a/864e5)).padStart(2,"0"),hours:String(Math.floor(a%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(a%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(a%6e4/1e3)).padStart(2,"0")};n="00"===e?`${t}h:${i}m:${s}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.AwardBonusId]:n})}),{})}removeFreeSpin(e){const t=this.freeSpins.findIndex((t=>t.AwardBonusId===e));t>-1&&(this.freeSpins.splice(t,1),window.postMessage({type:"FreeSpinHasExpired",awardBonusId:e}))}getFreeSpinClasses(e){return{FreeSpinsCard:!0,Forfeited:e.IsForfeited,FreeSpinsEmptyNumber:e.NumberOfFreeSpins===e.NumberOfUsedFreeSpins}}getChallengeHeaderTemplate(e){const{VendorName:i,NumberOfUsedFreeSpins:a,NumberOfFreeSpins:n,IsForfeited:s}=e,o=n-a;return t("div",{class:"FreeSpinsCardHeader"},t("div",{class:"FreeSpinsName "+(s?"Forfeited":"")},i),s?null:t("div",{class:"FreeSpinsCounter"},t("div",{class:o?"FreeSpinsHighlightedCounter":"FreeSpinsEmptyCounter"},o),"/",n))}getFreeSpinTemplate(e){const i=this.timers[e.AwardBonusId],{VendorFreeSpinsRemainingCost:a,VendorFreeSpinsCost:n,CurrencySymbol:s,IsForfeited:o}=e,r=this.newSpinIds.includes(e.AwardBonusId);return t("div",{class:this.getFreeSpinClasses(e),onClick:this.handleSpinClick,key:e.AwardBonusId,"data-id":e.AwardBonusId},o?null:t("div",{class:"SpinLabel "+(r?"ShowSpinLabel":"")},t("span",null,_e("new",this.language))),this.getChallengeHeaderTemplate(e),o?t("div",{class:"ForfeitedMessage"},t("div",null,_e("forfeited",this.language)),t("div",null,_e("support",this.language))):t("div",{class:"FreeSpinsCountdownWrapper"},t("span",{class:"FreeSpinsCountdown"},i),t("div",{class:"FreeSpinsBalCounter"},t("div",{class:"FreeSpinsRemainCounter"},s,a),"/",s,n)))}getHeaderTemplate(){return t("header",{class:"FreeSpinsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"FreeSpinsListPopupHeaderName"},_e("freeSpins",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}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,_e("noSpins",this.language)),t("p",null,_e("tryOtherGames",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),_e("tooltip",this.language))):""}render(){return t("div",{key:"9c101942a2d381d77e82ec49a0f33bb34e5f5191",class:`FreeSpinsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{freeSpins:["spinsPropHandler"]}}};Ve.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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.FreeSpinsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.FreeSpinsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.FreeSpinsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 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:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.FreeSpinsCard.Forfeited{cursor:auto;pointer-events:none}.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:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.FreeSpinsName.Forfeited{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsCounter{display:flex;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);align-items:flex-end}.FreeSpinsHighlightedCounter,.FreeSpinsEmptyCounter{font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.FreeSpinsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.FreeSpinsEmptyCounter{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsListEmpty{padding:20px 32px}.FreeSpinsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "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-secondary, #BBB9C3)}.FreeSpinsCountdownWrapper{display:flex;justify-content:space-between;align-items:flex-start}.FreeSpinsCountdown,.ForfeitedMessage{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ForfeitedMessage{line-height:1.2}.FreeSpinsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px)}.FreeSpinsRemainCounter{color:var(--emw--color-typography, #FFFFFF);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.SpinLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 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-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.ShowSpinLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.FreeSpinsEmptyNumber .FreeSpinsName,.FreeSpinsEmptyNumber .FreeSpinsCountdown,.FreeSpinsEmptyNumber .FreeSpinsRemainCounter{color:var(--emw--color-gray-150, #8F8B9C)}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeader,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeader{padding-top:16px}.FreeSpinsListPopup.Tablet .FreeSpinsListPopupHeaderName,.FreeSpinsListPopup.Desktop .FreeSpinsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.FreeSpinsListPopup.Tablet .EngagementSuiteIconButton,.FreeSpinsListPopup.Desktop .EngagementSuiteIconButton{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 .EngagementSuiteTooltipBackdrop,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.FreeSpinsListPopup.Tablet .EngagementSuiteTooltip,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.FreeSpinsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.FreeSpinsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}';const qe=["en"],Xe={en:{jackpots:"Jackpots",join:"Join",unjoin:"Unjoin",info:"Info",games:"Games",operatorContribution:"Operator Contribution",betContribution:"Bet Contribution",type:"Type",winningProbability:"Winning Probability",tc:"Terms & Conditions",jackpotIsWon:"Jackpot is won!",loadMore:"Load More",jackpotDetails:"Jackpot Details",minBet:"Min Bet",maxBet:"Max Bet",Suspended:"Suspended",Closed:"Closed",betContributionTooltip:"A % of the bet that will be added to jackpot funds (current and next jackpot amounts).",operatorContributionTooltip:"This jackpot is covered by the casino.",partialWins:"Partial wins",gameLimit:"Full game list in Terms and Conditions \n or Contact Support"}},Ke=(e,t)=>{const i=t;return Xe[void 0!==i&&qe.includes(i)?i:"en"][e]};function et(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}const tt=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),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.toggleTooltip=e=>{if(this.tooltip)this.tooltip="";else{const t=e.currentTarget.getAttribute("data-tooltip");this.tooltip=Ke(t,this.language)}},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}})},this.clientStyling="",this.clientStylingUrl="",this.jackpot=void 0,this.jackpotChangeStatusRequest=void 0,this.language="en",this.gameSlug="",this.device="Mobile",this.limitStylingAppends=!1,this.timer="",this.disabledStatus="",this.activeTab=1,this.visibleGames=[],this.enabled=!1,this.balance=void 0,this.winBalance=void 0,this.showDetails=!1,this.jackpotEndTime="",this.tooltip="",this.partialWins=""}handleEvent(e){const{type:t,data:i}=null==e?void 0:e.data;switch(t){case"UpdateJackpotStatus":this.jackpot.JackpotId===e.data.data.JackpotId&&this.updateJackpotStatus(e.data.data);break;case"JoinJackpotResult":i.Success&&this.jackpot.JackpotId in i.JackpotIds&&(this.enabled=this.jackpot.Enabled=i.JackpotIds[this.jackpot.JackpotId])}}handleJackpotUpdate(){this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance}handleResize(){2===this.activeTab&&this.setVisibleGames(),this.tooltip=""}componentWillLoad(){this.enabled=this.jackpot.Enabled,this.balance=this.jackpot.Balance,this.winBalance=this.jackpot.WinBalance,this.jackpotEndTime=this.jackpot.JackpotEndTime,this.disabledStatus=this.jackpot.Reason||"",this.partialWins=this.formatPartHits(this.jackpot.PartHits),this.startCountdown()}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),2!==this.activeTab||this.maxVisibleGames||this.setVisibleGames()}disconnectedCallback(){this.clearInterval()}clearInterval(){this.interval&&(clearInterval(this.interval),this.interval=null)}formatPartHits(e){return e.filter((e=>100!==e)).sort(((e,t)=>t-e)).map((e=>`${e}%`)).join(", ")}setVisibleGames(){const e="Mobile"===this.device?10:12,t="Mobile"===this.device?4:5;this.maxVisibleGames=Math.max(Math.floor(this.gamesListWrapperEl.offsetHeight/((this.gamesListWrapperEl.offsetWidth-e*(t-1))/t/74*40+e))*t,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.jackpotEndTime=e.JackpotEndTime,this.startCountdown())}getTopNavigationTemplate(){return t("div",{class:"JackpotDetailsNavigation"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),t("div",{class:"JackpotPopupName"},Ke("jackpots",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getJackpotBalance(){return et(this.balance,this.jackpot.Currency)}getJoinButtonClasses(){return{EngagementSuiteButton:!0,Active:this.enabled,Loading:this.jackpot.Pending}}getJackpotDetailsHeaderTemplate(){const e=je(new Date(this.jackpot.JackpotEndTime),new Date)||!!this.disabledStatus;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:e,onClick:this.jackpotChangeStatusRequest,class:this.getJoinButtonClasses(),"data-id":this.jackpot.JackpotId},Ke(this.enabled?"unjoin":"join",this.language)),!!this.winBalance&&t("div",{class:"JackpotIsWon"},Ke("jackpotIsWon",this.language))))}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},Ke("info",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},Ke("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,Ke("jackpotDetails",this.language))),this.showDetails&&t("div",{class:"JackpotDetailsContent"},this.jackpot.Description&&t("p",{class:"JackpotDescription"},this.jackpot.Description),this.jackpot.JackpotRulesUrl&&t("a",{class:"TermsAndConditions",href:this.jackpot.JackpotRulesUrl,target:"_blank"},Ke("tc",this.jackpot.JackpotRulesUrl))))}getBetLimitsRange(){var e,i,a,n;if(this.jackpot.BetLimits){const s=this.jackpot.Currency,o=Object.keys(this.jackpot.BetLimits),r=o.find((e=>e===s))||o[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),d=et(null===(a=this.jackpot.BetLimits[r])||void 0===a?void 0:a.MinBet,r),c=et(null===(n=this.jackpot.BetLimits[r])||void 0===n?void 0:n.MaxBet,r);return t("div",null,l&&t("div",{class:"JackpotInfoItem"},Ke("minBet",this.language),": ",t("span",null,d)),p&&t("div",{class:"JackpotInfoItem"},Ke("maxBet",this.language),": ",t("span",null,c)))}}getPartialWins(){return t("div",{class:"JackpotInfoItem"},t("div",{class:"JackpotInfoItemProperty"},Ke("partialWins",this.language),": "),t("span",null,this.partialWins))}getJackpotInfoTemplate(){var e;return t("div",{class:"JackpotInfoTabContent"},!(!this.jackpot.Description&&!this.jackpot.JackpotRulesUrl)&&this.getJackpotDetailsTemplate(),t("div",{class:"JackpotInfo"},"Static"!==this.jackpot.JackpotTypePresentation&&t("div",{class:"JackpotInfoItem"},Ke("betContribution",this.language),": ",t("span",null,+this.jackpot.ContributionPercent,"%"),t("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"betContributionTooltip",onClick:this.toggleTooltip})),t("div",{class:"JackpotInfoItem"},Ke("type",this.language),": ",t("span",null,this.jackpot.JackpotTypePresentation)),t("div",{class:"JackpotInfoItem"},Ke("winningProbability",this.language),": ",t("span",null,"1:",this.jackpot.Probability)),t("div",{class:"JackpotInfoItem"},Ke("operatorContribution",this.language),": ",t("span",null,+this.jackpot.OperatorContributionPercent,"%"),t("button",{class:"EngagementSuiteIconButton Help","data-tooltip":"operatorContributionTooltip",onClick:this.toggleTooltip})),this.getBetLimitsRange(),(null===(e=this.jackpot.PartHits)||void 0===e?void 0:e.length)>1&&this.getPartialWins()))}getGamesTemplate(){const e=!!this.jackpot.TotalGamesCount&&this.jackpot.TotalGamesCount>this.jackpot.GamesInfo.length&&this.visibleGames.length===this.jackpot.GamesInfo.length,i=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"},i),e&&t("div",{class:"GameLimitMessage"},Ke("gameLimit",this.language))),this.visibleGames.length<this.jackpot.GamesInfo.length?t("button",{class:"EngagementSuiteButton Active JackpotGamesButton",onClick:this.handleLoadMore},Ke("loadMore",this.language)):""]}getJackpotCountdown(){const e=Ke(this.disabledStatus,this.language)||this.timer;return t("div",{class:"JackpotCountdown "+(this.disabledStatus?"Suspended":"")},e)}startCountdown(){this.updateTimer(),this.interval=setInterval((()=>{this.updateTimer()}),1e3)}updateTimer(){const e=new Date(this.jackpotEndTime).getTime()-(new Date).getTime();if(e<1)return void this.clearInterval();const{days:t,hours:i,minutes:a,seconds:n}={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:${a}m:${n}s`:`${t}d:${i}h:${a}m`}getPopupClasses(){return{JackpotDetailsPopup:!0,Disabled:!!this.disabledStatus||je(new Date(this.jackpot.JackpotEndTime),new Date),[this.device]:!0,[this.jackpot.Type.charAt(0).toUpperCase()+this.jackpot.Type.slice(1)]:!0}}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return t("div",{key:"1566b4539220be1c5b5c72cf4a4288161b4a2537",class:this.getPopupClasses()},this.getTopNavigationTemplate(),t("div",{key:"1e8fa5324f9ee96905f56a46f53e9e147410719c",class:"JackpotDetailsPopupContent"},this.getJackpotDetailsHeaderTemplate(),this.getJackpotCountdown(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.tooltip&&this.getTooltipTemplate()))}get host(){return a(this)}static get watchers(){return{jackpot:["handleJackpotUpdate"]}}};tt.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;touch-action:manipulation}button:focus{outline:none}button:not(:disabled){cursor:pointer}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteButton{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;min-height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{content:"";position:absolute;inset:0;padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude;border-radius:99px}.EngagementSuiteButton.Loading{opacity:0.5;pointer-events:none}.EngagementSuiteButton.JackpotGamesButton{margin-top:12px;align-self:center;min-width:140px}.JackpotDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.JackpotDetailsPopup.Disabled .JackpotDetailsHeader{opacity:0.5}.JackpotDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.JackpotDetailsPopup.Disabled .JackpotDescription,.JackpotDetailsPopup.Disabled .TermsAndConditions,.JackpotDetailsPopup.Disabled .JackpotInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotGamesListWrapper,.JackpotInfoTabContent{overflow-x:auto;scrollbar-gutter:stable}.JackpotGamesListWrapper::-webkit-scrollbar,.JackpotInfoTabContent::-webkit-scrollbar{width:3px;background:none}.JackpotGamesListWrapper::-webkit-scrollbar-thumb,.JackpotInfoTabContent::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.JackpotDetailsNavigation{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.JackpotDetailsNavigation .JackpotPopupName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-medium, 500);line-height:16px;display:none}.JackpotDetailsPopupContent{padding:8px 18px 18px;overflow:hidden;height:100%;display:flex;flex-direction:column}.JackpotDetailsHeader{display:flex;justify-content:space-between;gap:12px}.JackpotDetailsHeader .JackpotDetailsHeaderSecondCol{text-align:right}.JackpotDetailsHeader .JackpotType{text-transform:uppercase;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-bold, 700);line-height:22px;color:var(--emw--color-typography, #FFF);word-break:break-all}.JackpotDetailsHeader .JackpotBalance{margin-top:8px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);line-height:18px}.JackpotDetailsHeader .JackpotIsWon{margin-top:8px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Mega .JackpotBalance{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Major .JackpotBalance{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotDetailsPopup.Minor .JackpotBalance{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%));-webkit-text-fill-color:transparent;-webkit-background-clip:text}.JackpotCountdown{font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-top:12px;color:var(--emw--color-secondary, #BBB9C3)}.JackpotCountdown.Suspended{font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-typography, #FFF);text-transform:capitalize}.EngagementSuiteTabs{margin-top:20px;display:flex;position:relative}.EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);border-bottom:2px solid transparent;cursor:pointer}.EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #FFF);border-color:var(--emw--color-typography, #FFF)}.EngagementSuiteTabs::after{content:"";position:absolute;bottom:0;left:0;width:100%;height:1px;background-color:var(--emw--color-typography, #FFF);opacity:0.1}.JackpotInfoItem{margin-bottom:8px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px;display:flex;align-items:center}.JackpotInfoItem .JackpotInfoItemProperty{align-self:flex-start;white-space:nowrap}.JackpotInfoItem span{font-weight:var(--emw--font-weight-bold, 700)}.JackpotInfoItem .EngagementSuiteIconButton.Help{margin-left:5px}.JackpotGamesListWrapper{margin-top:12px;overflow:auto;flex-grow:1}.JackpotGamesList{display:flex;gap:10px;flex-wrap:wrap}.JackpotGamesList .JackpotGamesListItem{width:calc(25% - 8px);aspect-ratio:74/40;cursor:pointer}.JackpotGamesList .JackpotGamesListItem.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.JackpotDetailsButton{margin-top:12px;display:flex;align-items:center;font-size:var(--emw--font-size-x-small, 12px);line-height:12px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.JackpotDetailsButton .Toggle{width:16px;height:16px;margin-right:4px}.JackpotDetailsButton .Closed{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg")}.JackpotDetailsButton .Open{background:center/100% url("https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg")}.JackpotInfo{margin-top:24px}.JackpotDescription{margin-top:12px;color:var(--emw--color-typography, #FFF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.TermsAndConditions{display:block;margin-top:12px;color:var(--emw--color-contrast, #59D1FF);font-size:var(--emw--font-size-small, 14px);line-height:17px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.GameLimitMessage{margin-top:14px;font-size:var(--emw--font-size-x-small, 12px);min-height:50px;border-radius:var(--emw--border-radius-x-small, 2px);background-color:var(--emw--color-background-transparency-30, rgba(64, 57, 86, 0.3));display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre-line;color:var(--emw--color-secondary, #BBB9C3)}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsButton,.JackpotDetailsPopup.Desktop .JackpotDetailsButton{margin-top:20px}.JackpotDetailsPopup.Tablet .JackpotDescription,.JackpotDetailsPopup.Desktop .JackpotDescription{font-size:var(--emw--font-size-medium, 16px);line-height:22px}.JackpotDetailsPopup.Tablet .JackpotPopupName,.JackpotDetailsPopup.Desktop .JackpotPopupName{display:block}.JackpotDetailsPopup.Tablet .JackpotDetailsNavigation,.JackpotDetailsPopup.Desktop .JackpotDetailsNavigation{padding-top:16px}.JackpotDetailsPopup.Tablet .EngagementSuiteIconButton,.JackpotDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotDetailsPopup.Tablet .JackpotDetailsPopupContent,.JackpotDetailsPopup.Desktop .JackpotDetailsPopupContent{padding:20px 24px 30px}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Tablet .JackpotType,.JackpotDetailsPopup.Desktop .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotType{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotDetailsPopup.Tablet .JackpotBalance,.JackpotDetailsPopup.Desktop .JackpotBalance{font-weight:var(--emw--font-weight-bold, 700)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton{min-width:98px;min-height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotDetailsPopup.Tablet .EngagementSuiteButton.JackpotGamesButton,.JackpotDetailsPopup.Desktop .EngagementSuiteButton.JackpotGamesButton{min-width:140px}.JackpotDetailsPopup.Tablet .JackpotCountdown,.JackpotDetailsPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotDetailsPopup.Tablet .JackpotInfoItem,.JackpotDetailsPopup.Desktop .JackpotInfoItem{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotIsWon,.JackpotDetailsPopup.Desktop .JackpotIsWon{font-size:var(--emw--font-size-small, 14px);line-height:17px}.JackpotDetailsPopup.Tablet .JackpotGamesList,.JackpotDetailsPopup.Desktop .JackpotGamesList{gap:12px}.JackpotDetailsPopup.Tablet .JackpotGamesList .JackpotGamesListItem,.JackpotDetailsPopup.Desktop .JackpotGamesList .JackpotGamesListItem{width:calc(20% - 10px)}.JackpotDetailsPopup.Tablet .EngagementSuiteTabs .EngagementSuiteTab,.JackpotDetailsPopup.Desktop .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotDetailsPopup.Tablet .JackpotGamesListWrapper,.JackpotDetailsPopup.Desktop .JackpotGamesListWrapper{margin-top:20px}.JackpotDetailsPopup.Tablet .GameLimitMessage,.JackpotDetailsPopup.Desktop .GameLimitMessage{margin-top:20px;font-size:var(--emw--font-size-medium, 16px);line-height:17px;min-height:60px;border-radius:var(--emw--border-radius-medium, 6px)}';const it=["en"],at={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",Closed:"Closed Jackpot",allJackpotsClosed:"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",contributionTooltip:"This jackpot is covered by the casino."}},nt=(e,t)=>{const i=t;return at[void 0!==i&&it.includes(i)?i:"en"][e]},st=class{constructor(t){e(this,t),this.close=i(this,"close",7),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=null},this.toggleTooltip=e=>{e.stopPropagation(),this.tooltip=this.tooltip?null:nt(e.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=e=>{e.stopPropagation()},this.handleJackpotClick=e=>{const t=+e.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:t})},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.jackpots=[],this.jackpotChangeStatusRequest=void 0,this.tooltip=null,this.timers={},this.limitStylingAppends=!1}jackpotsPropHandler(e){!this.interval&&e.length&&this.startCountdown(),this.interval&&!e.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.jackpots.reduce(((t,i)=>{const a=new Date(i.JackpotEndTime).getTime()-e;let n="00h:00m:00s";const{days:s,hours:o,minutes:r,seconds:l}={days:String(Math.floor(a/864e5)).padStart(2,"0"),hours:String(Math.floor(a%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(a%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(a%6e4/1e3)).padStart(2,"0")};return n="00"===s?`${o}h:${r}m:${l}s`:`${s}d:${o}h:${r}m`,Object.assign(Object.assign({},t),{[i.JackpotId]:n})}),{})}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,JackpotCardClosed:e.IsClosed||je(new Date(e.JackpotEndTime),new Date),InProgress:e.Enabled&&!e.IsClosed}}getJackpotHeaderTemplate(e){const i=!!e.WinBalance,a=nt(e.Type,this.language),n=nt(e.Reason,this.language),s=(null==e?void 0:e.IsClosed)?n:a,o=`JackpotBalance Jackpot${nt(e.Type,this.language)}`,r=e.Enabled?"EngagementSuiteButton Active":"EngagementSuiteButton",l=nt(e.Enabled?"unjoin":"join",this.language),p=e.Pending||(null==e?void 0:e.IsClosed)||je(new Date(e.JackpotEndTime),new Date);return t("div",{class:"JackpotCardHeader"},t("div",{class:"JackpotTitle"},t("span",{class:"JackpotName"},s),t("span",{class:o},function(e,t,i=99999999){return e=Math.min(e,i),`${t} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}`}(e.Balance,e.Currency))),t("div",{class:"JackpotActions"},t("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":e.JackpotId,disabled:p},l)),i&&t("span",{class:"JackpotWon"},nt("jackpotIsWon",this.language)))}getJackpotDescriptionTemplate(e){const i=+e.OperatorContributionPercent+"%",a=`1:${e.Probability}`,n=je(new Date(e.JackpotEndTime),new Date)?nt("outdatedJackpotCountdown",this.language):this.timers[e.JackpotId],s=nt("operatorContribution",this.language),o=nt("type",this.language),r=nt("winningProbability",this.language);return t("div",{class:"JackpotCardDescription"},!e.IsClosed&&t("span",{class:"JackpotCountdown"},n),t("div",{class:"JackpotCardDescriptionBlock"},t("div",{class:"JackpotCardDescriptionRow"},t("span",null,s,":"),t("span",{class:"JackpotDescriptionValue"},i,t("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,a),this.renderDescriptionRowInfo(`${o}:`,e.JackpotTypePresentation),t("a",{href:e.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},nt("termsAndConditions",this.language))))}renderDescriptionRowInfo(e,i){return t("div",{class:"JackpotCardDescriptionRow"},t("span",null,e),t("span",{class:"JackpotDescriptionValue"},i))}getJackpotTemplate(e){return t("div",{class:this.getJackpotClasses(e),onClick:this.handleJackpotClick,key:e.JackpotId,"data-id":e.JackpotId},this.getJackpotHeaderTemplate(e),this.getJackpotDescriptionTemplate(e))}getHeaderTemplate(){return t("header",{class:"JackpotsListPopupHeader"},t("button",{onClick:this.toggleTooltip,"data-tooltip":"tooltip",class:"EngagementSuiteIconButton Help"}),t("div",{class:"JackpotsListPopupHeaderName"},nt("jackpots",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){const e=this.jackpots.every((e=>e.IsClosed));return this.jackpots.length?t("div",{class:"JackpotsListWrapper"},e&&t("div",{class:"JackpotsListClosed"},t("h2",null,nt("allJackpotsClosed",this.language))),t("div",{class:"JackpotsList"},this.jackpots.map((e=>this.getJackpotTemplate(e))))):t("div",{class:"JackpotsListClosed"},t("h2",null,nt("allJackpotsClosed",this.language)))}getTooltipTemplate(){return t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return t("div",{key:"9fd4d384af0ee639e14925c797fe28bc71beb586",class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};var ot,rt,lt,pt,dt,ct,ht,gt,ut,mt;st.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}body{margin:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.JackpotsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.JackpotsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.JackpotsListPopupHeaderName{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 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-medium, 6px);position:relative;cursor:pointer}.EngagementSuiteButton.Active::before,.JackpotCard.InProgress::before{content:"";position:absolute;pointer-events:none;inset:0;border-radius:var(--emw--border-radius-small, 4px);padding:1px;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-mask:linear-gradient(#FFF 0 0) content-box, linear-gradient(#FFF 0 0);-webkit-mask-composite:xor;mask-composite:exclude}.JackpotCard.JackpotCardClosed *{color:var(--emw--color-gray-150, #8F8B9C)}.JackpotCard.JackpotCardClosed .JackpotBalance,.JackpotCard.JackpotCardClosed .JackpotWon{opacity:0.5}.JackpotWon{font-size:var(--emw--font-size-x-small, 12px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));position:absolute;right:0;bottom:-6px}.JackpotCardHeader{display:flex;justify-content:space-between;gap:24px;position:relative}.JackpotTitle,.JackpotActions{display:flex;flex-direction:column;justify-content:space-between}.JackpotActions{justify-items:flex-end}.JackpotName{color:var(--emw--color-typography, #FFFFFF);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word}.JackpotMega{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%))}.JackpotMajor{background:var(--emw--engagement-suite-gradient-silver, linear-gradient(180deg, #A19FA0 5.36%, #E1DBDB 28.86%, #FEFFFF 36.86%, #E1DBDB 44.36%, #5E5B5F 91.86%))}.JackpotMinor{background:var(--emw--engagement-suite-gradient-bronze, linear-gradient(180deg, #A0522C 5.36%, #FFAB8C 28.86%, #FFEEDF 36.86%, #FFAB8C 44.36%, #6A3A21 91.86%))}.JackpotBalance,.JackpotWon{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-bold, 700);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;margin-top:6px}.JackpotBalance{font-size:var(--emw--font-size-medium-plus, 18px);line-height:18px}.JackpotCardDescription{display:flex;flex-direction:column;margin-top:12px}.JackpotCardDescriptionRow{flex-basis:65%;display:flex;align-items:center;color:var(--emw--color-gray-150, #8F8B9C);font-size:var(--emw--font-size-2x-smal, 11px);line-height:12px}.JackpotCardDescriptionRow .JackpotDescriptionValue{font-weight:var(--emw--font-weight-semibold, 600);margin-left:2px;display:flex;align-items:center}.JackpotCardDescriptionAlignEnd{align-items:flex-end}.JackpotCardDescriptionBlock{display:flex;justify-content:space-between;column-gap:14px;row-gap:6px;flex-wrap:wrap}.JackpotCardDescriptionBlock a{color:var(--emw--color-contrast, #59D1FF);text-underline-offset:3px;font-size:var(--emw--font-size-2x-smal, 11px)}.JackpotContributionTooltipButton{margin-left:5px;width:16px;height:16px;background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg)}.EngagementSuiteButton{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:88px;height:32px;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif)}.EngagementSuiteButton.Active{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.EngagementSuiteButton.Active::before{border-radius:99px}.EngagementSuiteButton[disabled]{opacity:0.5;cursor:auto}.JackpotsListClosed{padding:20px 19px}.JackpotsListClosed h2{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);font-weight:var(--emw--font-weight-normal, 400)}.JackpotCountdown{color:var(--emw--color-secondary, #BBB9C3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px;margin-bottom:12px}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #BBB9C3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.JackpotsListPopup.Mobile .JackpotCardDescriptionRow:nth-child(3){flex-basis:50%}.JackpotsListPopup.Tablet .JackpotContributionTooltipButton,.JackpotsListPopup.Desktop .JackpotContributionTooltipButton{width:22px;height:22px}.JackpotsListPopup.Tablet .JackpotsListPopupHeader,.JackpotsListPopup.Desktop .JackpotsListPopupHeader{padding-top:16px}.JackpotsListPopup.Tablet .JackpotsListPopupHeaderName,.JackpotsListPopup.Desktop .JackpotsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotsListPopup.Tablet .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.JackpotsListPopup.Tablet .JackpotsList,.JackpotsListPopup.Desktop .JackpotsList{padding:20px 24px 0;row-gap:20px}.JackpotsListPopup.Tablet .JackpotName,.JackpotsListPopup.Desktop .JackpotName{line-height:27px;font-size:var(--emw--font-size-large-plus, 22px)}.JackpotsListPopup.Tablet .EngagementSuiteButton,.JackpotsListPopup.Desktop .EngagementSuiteButton{min-width:100px;height:36px;font-size:var(--emw--font-size-medium, 16px)}.JackpotsListPopup.Tablet .JackpotCountdown,.JackpotsListPopup.Desktop .JackpotCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.JackpotsListPopup.Tablet .JackpotBalance,.JackpotsListPopup.Desktop .JackpotBalance{font-size:var(--emw--font-size-large-plus, 22px);line-height:22px}.JackpotsListPopup.Tablet .JackpotWon,.JackpotsListPopup.Desktop .JackpotWon{font-size:var(--emw--font-size-small, 14px)}.JackpotsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.JackpotsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.JackpotsListPopup.Tablet .EngagementSuiteTooltip,.JackpotsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.JackpotsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.JackpotsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow,.JackpotsListPopup.Desktop .JackpotCardDescriptionRow{flex-basis:45%}.JackpotsListPopup.Tablet .JackpotCardDescriptionRow:nth-child(2),.JackpotsListPopup.Desktop .JackpotCardDescriptionRow:nth-child(2){justify-content:flex-end}',function(e){e.ActiveTickets="ActiveTickets",e.ImplicitTickets="ImplicitTickets",e.RemainingTimes="RemainingTimes"}(ot||(ot={})),function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise",e[e.outward=0]="outward"}(rt||(rt={})),function(e){e.fulfilled="fulfilled",e.drawn="drawn"}(lt||(lt={})),function(e){e.noPrize="noprize",e.luckywheel="luckywheel",e.bonus="bonus"}(pt||(pt={})),function(e){e.Arrow="Arrow",e.Partition="Partition"}(dt||(dt={})),function(e){e.DownFromTop="DownFromTop",e.UpFromCenter="UpFromCenter",e.DownFromCenter="DownFromCenter",e.UpFromBottom="UpFromBottom"}(ct||(ct={})),function(e){e.en="en",e.fr="fr",e.de="de",e.tr="tr"}(ht||(ht={})),function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise",e[e.outward=0]="outward"}(gt||(gt={})),function(e){e.launch="launch",e.loop="loop",e.halt="halt"}(ut||(ut={})),function(e){e.quad="quad",e.cubic="cubic",e.quart="quart",e.quint="quint",e.expo="expo",e.sine="sine",e.circ="circ"}(mt||(mt={}));const bt=(e,t)=>{Object.keys(t).map((i=>{e.setAttribute(i.split(/(?=[A-Z])/).map((e=>e.toLocaleLowerCase())).join("-"),t[i])}))},ft=e=>new Promise((t=>{let i=document.createElementNS("http://www.w3.org/2000/svg","image");i.onload=()=>t(i),i.onerror=()=>t(i),i.href.baseVal=e})),yt=e=>({x:e,y:e}),wt=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),xt={Image:"",Name:"Thank you",PrizeText:"",PrizeImage:""},vt=async(e,t)=>{let i=((e,t)=>{const i=e.map((e=>{const i={};return Object.keys(e).map((a=>{"object"==typeof e[a]&&e[a]&&(i["Image1"===a?"Image":a]=e[a][t]||e[a]["*"])})),i}));return(e=>{let t=0;return e.map((e=>{t+=Number(e.probability)})),t})(e)<1&&i.push(xt),i})(e.Program.WheelOfFortune.Partitions,t);return i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)?i.map((e=>{if(e.Image){const t=document.createElementNS("http://www.w3.org/2000/svg","image");return t.href.baseVal=e.Image,Object.assign(Object.assign({},e),{Image:t})}return e})):await Promise.all(i.map((async e=>Object.assign(Object.assign({},e),await(async e=>e?{Image:await ft(e)}:{})(e.Image))))),i},kt={in:{quad:e=>Math.pow(e,2),cubic:e=>Math.pow(e,3),quart:e=>Math.pow(e,4),quint:e=>Math.pow(e,5),sine:e=>1-Math.cos(e*Math.PI/2),expo:e=>0===e?0:Math.pow(2,10*e-10),circ:e=>1-Math.sqrt(1-Math.pow(e,2))},out:{quad:e=>1-Math.pow(1-e,2),cubic:e=>1-Math.pow(1-e,3),quart:e=>1-Math.pow(1-e,4),quint:e=>1-Math.pow(1-e,5),sine:e=>Math.sin(e*Math.PI/2),expo:e=>1===e?1:1-Math.pow(2,-10*e),circ:e=>Math.sqrt(1-Math.pow(e-1,2))}},Mt={quad:2,cubic:3,quart:4,quint:5,sine:Math.PI/2,expo:Math.LN2,circ:1/0},Ct={in:{quad:e=>2*e,cubic:e=>3*e**2,quart:e=>4*e**3,quint:e=>5*e**4,sine:e=>Math.PI/2*Math.sin(Math.PI/2*e),expo:e=>10*Math.LN2*2**(10*e-10),circ:e=>-.5*(1-e**2)**-.5},out:{cubic:e=>3*e**2-6*e+3}},Lt=[{launchTurns:5,launchSpeed:.2,loopSpeed:15,haltTurns:2,haltSpeed:.16},{launchTurns:2,launchSpeed:.5,loopSpeed:20,haltTurns:2,haltSpeed:.22},{launchTurns:6,launchSpeed:1.38,loopSpeed:45,haltTurns:6,haltSpeed:.5}],Dt=e=>Object.keys(e).map((t=>e[t]));var St;!function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise"}(St||(St={}));class It{constructor({size:e,radius:t,options:i,themeIndex:a,contentdirection:n}){this.arrowmode=ct.DownFromTop,this.convertDegToArc=e=>e*Math.PI/180,this.convertArcToDeg=e=>180*e/Math.PI%360,this.getArcDelta=e=>2*Math.PI/e,this.findDeg=(e,t)=>e*this.convertArcToDeg(this.getArcDelta(t)),this.angleTransform=e=>{switch(e){case ct.DownFromTop:case ct.UpFromCenter:return-Math.PI/2;case ct.DownFromCenter:case ct.UpFromBottom:return Math.PI/2}},this.contentdirection=n,this.center=e/2,this.ratio=e/375,this.options=i,this.length=i.length,this.themeIndex=a,this.radius=t}get sizeImage(){const e=e=>48*this.ratio*5/e;if(this.length<=3)return e(4);switch(this.length){case 8:case 7:return 24*this.ratio;case 6:return 36*this.ratio;case 5:return 48*this.ratio;case 4:return 56*this.ratio;default:return e(this.length)}}getSizeImageByPartition(e){return this.options[e].Name?this.sizeImage/2:this.sizeImage}getSvgImageProps(e,t=1.25){const i=this.getSizeImageByPartition(e);let a;return a=this.options[e].Name?this.radius-i/2-3*this.ratio:(this.radius-i/2)/Number(t)-3*this.ratio,Object.assign(Object.assign({},this.getPropsForPartitionInfo(e,this.getOffsetImage(i),a,gt.outward)),{width:170===this.center?24:32,height:170===this.center?24:32})}getSvgTextProps(e,t){const i=this.getSizeImageByPartition(e);let a;return a=this.options[e].Image?this.radius-i-6*this.ratio:this.radius-6*this.ratio,Object.assign({},this.getPropsForPartitionInfo(e,this.offsetText,a,void 0,t))}getSvgTextPropsAdjustedByImage(e,t){let i,a;this.options.length<=8?(i="Mobile"!==t?68:55,a=60):this.options.length<=12?(i=55,a="Mobile"!==t?60:40):this.options.length<=16&&(i="Mobile"!==t?53:47,a=60);const n=this.getSvgTextProps(e,{width:i,height:a});return Object.assign({},n)}get offsetText(){return{center:0,position:{x:0,y:0},transform:{x:0,y:0}}}getOffsetImage(e){return{center:0,position:{x:-1*e/2,y:-1*e/2},transform:{x:0,y:0}}}get direction(){return St.clockwise}getAngleSelf(e,t){return 360*e/this.length*this.direction+360*(void 0!==t?t:gt[this.contentdirection])}getPartitionPositions(e,t,i){const a=this.angleTransform(this.arrowmode)+this.direction*e*2*Math.PI/this.length,n=((e,t,i)=>{const a=yt(i);return{x:a.x+e*Math.cos(t),y:a.y+e*Math.sin(t)}})(t||this.radius-9*this.ratio,a,this.center+i.center);return{transformOrigin:wt(n,i.transform),point:wt(n,i.position)}}getPropsForPartitionInfo(e,t,i,a,n){const{point:s,transformOrigin:o}=this.getPartitionPositions(e,i,t),r=this.options.length>=12,l=this.options.length>=8&&this.options.length<12,p=this.options.some((e=>e.Image)),d=!this.options[e].Name,c=0===a?d?r?-4:l?0:4:r?170===this.center?-8:-11:l?170===this.center?-6:-8:170===this.center?-4:-6:-(null==n?void 0:n.width)/2||-30,h=0===a?d?170===this.center?46:46.5:170===this.center?75:81.5:p?this.options[e].Image?r?0:-10:r?10:5:r?10:l?20:30;return Object.assign(Object.assign({},s),{style:{"font-size":13*this.ratio+"px",transform:`rotate(${this.getAngleSelf(e,a)}deg) translate(${c}px, ${h}px)`,"transform-origin":`${g=o,Object.keys(g).map((e=>`${g[e]}px`)).join(" ")}`,height:`${null==n?void 0:n.height}px`,width:`${null==n?void 0:n.width}px`}});var g}getPartitionDraw(e){const t=yt(this.center),i=yt(this.radius),{point:a,pointNext:n}=((e,t,i,a)=>{const n=e=>((e,t,i,a)=>{const n=Math.PI/180*(360/t*(e-.5)-90),s=yt(a),o=yt(i);return{x:s.x+o.x*Math.cos(n),y:s.y+o.y*Math.sin(n)}})(e,t,i,a);return{point:n(e),pointNext:n(e+1)}})(e,this.length,this.radius,this.center);return{d:["M",...Dt(t),"L",...Dt(a),"A",...Dt(i),"0 0 1",...Dt(n),"Z"].join(" ")}}getDeg(e){return this.findDeg(this.length-e,this.length)}getSpinnerProps(){const e=yt(this.center);return{"transform-origin":`${e.x} ${e.y}`}}}class Tt{constructor(e){this.deg=0,this.degTarget=void 0,this.step=void 0,this.easingType=mt.cubic,this.param=Lt[2],this.halt=(e,t=(()=>{}))=>{this.shouldHalt=()=>{this.step=ut.halt,this.cb=()=>{t(),this.setDeg(e,0)},this.degTarget=e+360*this.param.haltTurns,this.continueRepeat()}},this.continueRepeat=()=>setTimeout((()=>this.ticker()),30),this.ticker=()=>{const e=this.param.loopSpeed,t=e=>33*Mt[this.easingType]*e/this.param.loopSpeed,i=()=>{const e=360*this.param.launchTurns-this.deg,i=t(e);this.animate(i,this.deg,e,kt.in[this.easingType],Ct.in[this.easingType])},a=()=>{const e=t(this.degTarget);this.animate(e,0,this.degTarget,kt.out[this.easingType],Ct.out[this.easingType])},n=()=>{this.setDeg((this.deg+e)%360,Mt[this.easingType]),this.continueRepeat()};({[ut.launch]:()=>{this.cb=()=>{this.step=ut.loop,this.setDeg(e,Mt[this.easingType]),this.continueRepeat()},i()},[ut.loop]:()=>{this.shouldHalt&&0===this.deg?this.shouldHalt():n()},[ut.halt]:()=>{this.deg===360-e?a():n()}})[this.step]()},this.setDeg=(e,t)=>{this.deg=e,this.tick(e,t)},this.animateF=(e,t,i,a,n)=>{let s=null;const o=()=>{let r=(new Date).getTime();s||(s=r);const l=r-s,p=i*a(l/e)+t,d=Math.abs(n(l/e));this.setDeg(p,d),l<e?setTimeout((()=>o()),30):this.cb()};o()},this.animate=(e,t,i,a,n)=>{let s=null;window.cancelAnimationFrame(s);let o=null;const r=l=>{o||(o=l);const p=l-o,d=i*a(p/e)+t,c=Math.abs(n(p/e));this.setDeg(d,c),p<e?s=window.requestAnimationFrame(r):this.cb()};s=window.requestAnimationFrame(r)},this.tick=e.tick}launch(){this.shouldHalt=void 0,this.step=ut.launch,this.ticker()}}const zt=class{constructor(t){e(this,t),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.renderImage=(e,t)=>{const i=this.options[t].Image;bt(i,this.settings.getSvgImageProps(t)),e.innerHTML=null,e.appendChild(i)},this.updateSpinable=()=>{this.spinable=!!(this.luckywheel.Current&&Number(this.luckywheel.Current.RemainingTimes)>0)},this.eventSpin=()=>{this.updateSpinable(),this.spinable&&!this.isSpinning&&(this.isSpinning=!0,this.spinContainer=this.svg.querySelector("g.PartitionsContainer"),this.spinner.launch(),window.postMessage({type:"SpinLuckyWheel",data:{lotteryProgramID:this.luckywheel.Program.Id}}))},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckywheel=void 0,this.size="440",this.contentdirection="anticlockwise",this.limitStylingAppends=!1,this.isPartitionsCustomableReady=!1,this.isSpinning=!1,this.options=void 0,this.radius=.85*Number(this.size)/2,this.speed=0,this.settings=void 0,this.svg=void 0,this.spinContainer=void 0,this.spinable=void 0,this.spinner=void 0}handleEvent(e){const{type:t,data:i}=null==e?void 0:e.data;if("SpinLuckyWheelRes"===t&&this.isSpinning){const e=+i.Result.WheelOfFortunePartitionIndex||0;i.State===lt.fulfilled?this.handleSpinResult(i,e):this.handleSpinError(e)}}handleSpinError(e){const t=this.settings.getDeg(e);this.spinner.halt(t,(()=>{this.isSpinning=!1,this.updateSpinable(),window.postMessage({type:"ShowLuckywheelRewardModal",data:{HasError:!0,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes)}})}))}handleSpinResult(e,t){if(this.luckywheel.Program.Id===e.LotteryProgramID){const i=this.settings.getDeg(t);this.spinner.halt(i,(()=>{var i;this.isSpinning=!1,this.updateSpinable();const a=this.luckywheel.Program.WheelOfFortune.Partitions[t],n=null===(i=e.Result.Outcomes)||void 0===i?void 0:i.some((e=>{var t;return(null===(t=e.Action)||void 0===t?void 0:t.Type)===pt.noPrize})),s=(null==a?void 0:a.PrizeImage[this.language])||(null==a?void 0:a.PrizeImage["*"]);window.postMessage({type:"ShowLuckywheelRewardModal",data:{PrizeText:(null==a?void 0:a.PrizeText[this.language])||(null==a?void 0:a.PrizeText["*"]),PrizeMessage:(null==a?void 0:a.Name[this.language])||(null==a?void 0:a.Name["*"]),NoPrize:n,HasError:!1,NoSpinLeft:0===Number(this.luckywheel.Current.RemainingTimes),Assets:s}})}))}}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}async componentWillLoad(){this.options=await vt(this.luckywheel,ht.en),this.settings=new It({size:this.size,radius:this.radius,options:this.options,themeIndex:1,contentdirection:this.contentdirection}),this.spinner=new Tt({tick:(e,t)=>{bt(this.spinContainer,{style:[`transform: rotate(${e}deg)`,`height: ${this.size}px`,`width: ${this.size}px`].join(";")}),this.speed=.5*t}})}defineGeneralVariables(){return{"--length":`${this.options.length}`,"--radius":`${this.radius}`,"--ratio":""+Number(this.size)/480,"--size":`${this.size}`}}setSvgSize(e){if(!e||!this.size)return;const t=this.size.toString();e.getAttribute("width")!==t&&e.setAttribute("width",t),e.getAttribute("height")!==t&&e.setAttribute("height",t)}render(){const e={height:`${this.size}px`,width:`${this.size}px`};return t("div",{key:"e466a34c9a4526c2379aa601462c65cb65f5a445",class:`WheelContainer ${this.device}`,style:this.defineGeneralVariables()},t("svg",{key:"04b74322b3651a364a92777984b008fe845c16f0",width:this.size,height:this.size,ref:e=>{this.svg=e}},t("foreignObject",{key:"f18c832a86c1474e510cae219eae78b44667b07e",ref:this.setSvgSize.bind(this),class:"Bottom Customable"},t("div",{key:"b0adaa4e02d6394293ed3e4cc4a2331b46cc9fd1",style:e})),t("g",Object.assign({key:"9c08d5fa3cb3bde27b641f71fa2bbc0612b0b93f",class:"PartitionsContainer"},this.settings.getSpinnerProps()),t("g",{key:"cbdc31800e068702b0dc50ced9139c25e8e30785",class:"PartitionsBackgrounds"},this.options.map(((i,a)=>t("foreignObject",{ref:this.setSvgSize.bind(this),"clip-path":`url(#clip${a})`,class:"PartitionBackground Customable",style:Object.assign({"--index":a.toString()},e)},t("div",{style:e}))))),t("g",{key:"af8c9da33f138918e81b80ae691c9a58bbd9232b",class:"PartitionsBackgroundStrokes"},this.options.map(((e,i)=>t("path",Object.assign({class:"PartitionBackgroundStroke"},this.settings.getPartitionDraw(i),{width:this.size,height:this.size}))))),t("g",{key:"6ccca1f63545eae71d024ee5da59d0149607e3d1",class:"Partitions",style:{filter:this.speed>.3?`blur(${this.speed}px)`:""}},this.options.map(((e,i)=>[e.Image&&t("g",Object.assign({class:`PartitionImage PartitionImage${i}`,ref:e=>this.renderImage(e,i)},this.settings.getSvgImageProps(i))),e.Name&&t("foreignObject",Object.assign({class:"PartitionText",ref:e=>{if(e){const t=this.options.length>6?"55":"75";e.setAttribute("width",t),e.setAttribute("height",t)}}},this.settings.getSvgTextPropsAdjustedByImage(i,this.device)),t("div",{class:"PartitionTextEntityContainer"},t("p",{class:`PartitionTextEntity${"clockwise"===this.settings.contentdirection?"":" Anticlockwise"} ${this.device}`,innerHTML:e.Name})))])))),t("g",{key:"a367d23565a8cb54f6435cb120f377d934ebeca1",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable1:!0}},this.options.map(((i,a)=>t("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition1 Customable",style:{"--index":a.toString()}},t("div",{style:e}))))),t("g",{key:"dbccc30fa53f944b63454d83cab4cae7ab787cb0",class:{active:this.isPartitionsCustomableReady,PartitionsCustomable2:!0}},this.options.map(((i,a)=>t("foreignObject",{ref:this.setSvgSize.bind(this),class:"Partition2 Customable",style:{"--index":a.toString()}},t("div",{style:e}))))),t("foreignObject",{key:"6ad80cb9533ec295bad090831532250cd35afd7e",ref:this.setSvgSize.bind(this),class:"Middle Customable",style:e},t("div",{key:"ba0afa07f997acf338118c1e07e4ad5446db65c1",style:e})),t("foreignObject",{key:"766381cdd2cc4b9c5243a0a78306e8329a208693",ref:this.setSvgSize.bind(this),class:"Top Customable",style:e},t("div",{key:"83df3eb57328d3eda101f90515ef6993253513e9",style:e})),t("g",{key:"d2c1b67fddb67ccc613c31b06a9daa6921eba5f2",class:{spinning:this.isSpinning,Center:!0}},t("foreignObject",{key:"a3353eb0e5d764c867f8193a5d8f7c96b18add80",ref:e=>{e&&(e.setAttribute("width","100"),e.setAttribute("height","100"))},style:{transform:`translate(${Number(this.size)/2-50}px, ${Number(this.size)/2-50}px)`}},t("div",{key:"38948f9a684ef29dc3ff0c4f8d98972cc2b32e25",style:{width:"100px",height:"100px",cursor:"pointer"},onClick:this.eventSpin}))),t("g",{key:"6f0a40abf872f17825ecd63a25970a0a89417728"},this.options.map(((e,i)=>t("clipPath",{id:`clip${i}`},t("path",Object.assign({},this.settings.getPartitionDraw(i)))))))))}get host(){return a(this)}};var Et,Ft;zt.style=':host{font-family:Montserrat, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"}*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.LotteryProgramWof{background:var(--emw--color-contrast, #07072A);display:flex;align-items:center;flex-direction:column;padding:20px 0}main{max-width:600px;width:100%;display:flex;justify-content:space-around;min-height:200px}svg{transition:opacity 0.3s}.WheelContainer{text-align:center}.FortuneContainer{width:100%;display:flex;align-items:center;flex-direction:column}.Center{cursor:pointer;transition:filter;transition-duration:1s}.Center.disabled{filter:grayscale(80%)}.Center .CenterCircle{fill:#3CE4BB;stroke:rgb(150, 54, 88);stroke-width:2px;cursor:pointer;transition:fill;transition-duration:1s}.Center .CenterText{fill:#FFFFFF}.PointerPartition{opacity:0.3;fill:lightgoldenrodyellow;stroke:red;stroke-width:6px;stroke-dasharray:12}.Current{color:#FFFFFF}.PartitionText{color:#FFFFFF;font-style:normal;font-weight:700;text-anchor:end;text-shadow:0px 3px #000;dominant-baseline:central;word-wrap:break-word}.PartitionsShadow{background-blend-mode:multiply;mix-blend-mode:multiply}.PartitionTextEntityContainer{height:100%;display:flex;align-items:center}.PartitionTextEntity{width:100%}.PartitionTextEntity.Anticlockwise{text-align:end}foreignObject.Bottom div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-bg.svg");background-size:calc(var(--radius) * 2px + var(--ratio) * 20px);background-position:center}foreignObject.Middle div{background-image:url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-spin.svg"), url("https://static.everymatrix.com/gic/img/engagement-suite/bar/luckywheel/luckywheel-pointer.svg");background-position:center, center 5px}foreignObject.Top{mix-blend-mode:multiply}foreignObject.Top div{background-image:var(--img-theme-shadow);background-position:center;background-size:calc(var(--radius) * 2px)}foreignObject.Partition1 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc(var(--index) * 360deg / var(--length)))}foreignObject.Partition2 div{background-image:var(--img-theme-partition-light);background-position:center calc((var(--size) / 2 - var(--radius)) * 1px - var(--ratio) * 22px);transform:rotate(calc((var(--index) + 0.5) * 360deg / var(--length)))}foreignObject.PointerArea{mix-blend-mode:screen}foreignObject.PointerArea div{background-image:var(--img-theme-pointer-area);background-position:center -3px;background-size:51%}foreignObject.Partition1 div,foreignObject.Partition2 div{transform-origin:center}.PartitionsCustomable1 div,.PartitionsCustomable2 div{visibility:hidden}.PartitionsCustomable1 div.active,.PartitionsCustomable2 div.active{visibility:visible}foreignObject.Customable{overflow:visible}foreignObject.Customable div{background-repeat:no-repeat}.PartitionBackground div{background-size:calc(var(--radius) * 2 / var(--size) * 100%) calc(var(--radius) * 2 / var(--size) * 100%);background-position:center}.PartitionBackground:nth-child(2n) div{background:var(--emw--color-primary, #3F2E75)}.PartitionBackground:nth-child(2n+1) div{background:var(--emw--color-secondary, #9482CE)}.PartitionBackground div{transform-origin:center}.PartitionBackgroundStroke{fill:transparent;stroke:var(--emw--color-background-secondary, #251D3E);stroke-width:3px;stroke-dasharray:none}.PointerPartitionFrame{stroke:#FFDD64;fill:transparent;stroke-dasharray:var(--radius) calc(6.2831853072 / var(--length) * var(--radius));stroke-width:0px}.PointerPartitionFrame.active{stroke-width:3px}.WheelContainer.Mobile foreignObject.Middle div{background-size:95px, 38px}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity{text-align:center;text-transform:uppercase;text-shadow:none;font-size:var(--emw--font-size-small, 10px);font-weight:700}.PartitionText .PartitionTextEntityContainer .PartitionTextEntity.Mobile{font-size:var(--emw--font-size-x-small, 8px)}',function(e){e.ActiveTickets="ActiveTickets",e.ImplicitTickets="ImplicitTickets",e.RemainingTimes="RemainingTimes"}(Et||(Et={})),function(e){e[e.clockwise=1]="clockwise",e[e.anticlockwise=-1]="anticlockwise",e[e.outward=0]="outward"}(Ft||(Ft={}));const jt=["en"],Nt={en:{luckywheel:"LuckyWheel",remaining:"times remaining",noluckywheels:"No Unlocked LuckyWheel",tryOtherGames:"Try winning LuckyWheel as rewards or launching other booster games"}},Pt=(e,t)=>{const i=t;return Nt[void 0!==i&&jt.includes(i)?i:"en"][e]};var Bt;"undefined"!=typeof window&&(customElements.define=(Bt=customElements.define,function(...e){try{return Bt.apply(this,e)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}),import("./GeneralAnimationLoading-Dqt0LPDS-2e1c11e3.js").then((({default:e})=>{!customElements.get("general-animation-loading")&&customElements.define("general-animation-loading",e.element)})));const At=class{constructor(t){e(this,t),this.close=i(this,"close",7),this.back=i(this,"back",7),this.handleCloseClick=()=>{this.close.emit()},this.handleBackClick=()=>{this.back.emit()},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.luckyWheels=void 0,this.luckywheel=void 0,this.giftimagesrc=void 0,this.currentinfo=Et.RemainingTimes,this.contentdirection="anticlockwise",this.device="Mobile",this.translationUrl="",this.selectedIndex=0,this.timers={},this.isLoading=!1}luckywheelsPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}async componentWillLoad(){var e;this.luckywheelsPropHandler(this.luckyWheels),this.translationUrl&&await(e=this.translationUrl,new Promise(((t,i)=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])Nt[t][i]=e[t][i]})),t(Nt)})).catch((e=>{i(e)}))})))}startCountdown(){this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const e=(new Date).getTime();this.timers=this.luckyWheels.reduce(((t,i)=>{var a,n;const s=(null===(a=i.Current)||void 0===a?void 0:a.ExpiryTime)||(null===(n=i.Program)||void 0===n?void 0:n.Time),o=new Date(s).getTime()-e;let r="00h:00m:00s";if(o<1)this.removeLuckyWheel(i.Program.Id);else{const{days:e,hours:t,minutes:i,seconds:a}={days:String(Math.floor(o/864e5)).padStart(2,"0"),hours:String(Math.floor(o%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(o%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(o%6e4/1e3)).padStart(2,"0")};r="00"===e?`${t}h:${i}m:${a}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Program.Id]:r})}),{})}removeLuckyWheel(e){const t=this.luckyWheels.findIndex((t=>t.Program.Id===e));t>-1&&(this.luckyWheels.splice(t,1),window.postMessage({type:"LuckyWheelHasExpired",id:e}))}getLuckyWheelHeaderTemplate(e){var i,a;const n=this.timers[e.Program.Id];return t("div",{class:"LuckyWheelsCardHeader"},t("div",{class:"LuckyWheelsName"},e.Program.Name.en||e.Program.Name["*"]),t("div",{class:"LuckyWheelsInfo"},t("div",{class:"LuckyWheelsCounterWrapper"},t("div",{class:"LuckyWheelsCounter"},t("div",{class:(null===(i=e.Current)||void 0===i?void 0:i.RemainingTimes)?"LuckyWheelsHighlightedCounter":"LuckyWheelsEmptyCounter"},null===(a=e.Current)||void 0===a?void 0:a.RemainingTimes)),t("div",{class:"LuckyWheelsRemaining"},Pt("remaining",this.language))),t("div",{class:"LuckyWheelsCountdownWrapper"},t("span",{class:"LuckyWheelsCountdown"},n))))}getActionsTemplate(){return t("header",{class:"LuckyWheelsActions"},t("button",{class:"EngagementSuiteIconButton Back",onClick:this.handleBackClick}),"Mobile"!==this.device&&t("div",{class:"LuckyWheelsPopupName"},Pt("luckywheel",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getLuckyWheelListTemplate(){return this.luckyWheels?t("div",{class:"LuckyWheelsList"},t("general-slider",{"slide-number":"1","slide-show":"1","show-arrow":"true","show-button":"true","auto-item-height":"true","current-page":this.selectedIndex,"client-styling":this.clientStyling+"\n .ArrowButtons {\n position: absolute; \n bottom: 5px; \n width: 100%;\n } \n .Button {\n background: center / 100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat;\n opacity: 1;\n padding: 20px;\n position: absolute;\n font-size: 0;\n &[disabled] {\n opacity: 1;\n }\n &.ButtonNext {\n transform: scale(-1, -1);\n }\n }\n .PageButtons {\n padding: 0 40px;\n display: flex;\n justify-content: center;\n }\n .PageButton {\n border-radius: 12px;\n width: 12px;\n height: 12px;\n opacity: 1;\n background-color: var(--emw--color-background, #666178);\n &.active {\n background-color: var(--emw--color-background-secondary, #FFD62F);\n width: 65px;\n }\n }","client-styling-url":this.clientStylingUrl},this.luckyWheels&&this.luckyWheels.map((e=>t("li",{class:"LuckyWheelsListItem"},this.getLuckyWheelHeaderTemplate(e),t("casino-engagement-suite-luckywheel",{device:this.device,luckywheel:e,size:"Desktop"===this.device?"440":"340"})))))):t("div",{class:"LuckyWheelsListEmpty"},t("h2",null,Pt("noluckywheels",this.language)),t("p",null,Pt("tryOtherGames",this.language)))}render(){return this.isLoading?t("div",{class:`LuckyWheelsDetailsPopup ${this.device}`},t("general-animation-loading",null)):t("div",{class:`LuckyWheelsDetailsPopup ${this.device}`},this.getActionsTemplate(),this.getLuckyWheelListTemplate())}get host(){return a(this)}static get watchers(){return{luckyWheels:["luckywheelsPropHandler"]}}};At.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}.EngagementSuiteIconButton{width:16px;height:16px;cursor:pointer}.EngagementSuiteIconButton.Back{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/back.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.LuckyWheelsDetailsPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1E1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative}.LuckyWheelsDetailsPopup.Disabled .LuckyWheelsDetailsHeader{opacity:0.5}.LuckyWheelsDetailsPopup.Disabled .EngagementSuiteTabs{cursor:default;pointer-events:none}.LuckyWheelsDetailsPopup.Disabled .LuckyWheelsInfoItem{color:var(--emw--color-gray-150, #8F8B9C)}.LuckyWheelsDetailsPopup .LuckyWheelsListItemWof{width:300px}.LuckyWheelsDetailsPopup.Desktop .LuckyWheelsListItemWof,.LuckyWheelsDetailsPopup.Tablet .LuckyWheelsListItemWof{width:400px}.LuckyWheelsDetails{overflow:hidden;height:100%;display:flex;flex-direction:column}.LuckyWheelsActions{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.LuckyWheelsActions .LuckyWheelsPopupName{color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.LuckyWheelsCountdown{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-secondary, #BBB9C3)}.LuckyWheelsCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.LuckyWheelsCard.Forfeited{cursor:auto;pointer-events:none}.LuckyWheelsCardHeader{display:flex;flex-direction:column;gap:12px;flex:1;min-width:0;padding:20px}.LuckyWheelsName{color:var(--emw--color-typography, #ffffff);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.LuckyWheelsList{padding-bottom:30px}.LuckyWheelsHighlightedCounter,.LuckyWheelsEmptyCounter{font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.LuckyWheelsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #ffb801 15.86%, #fef746 31.36%, #fbffe0 36.86%, #fffa60 47.86%, #ff9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.LuckyWheelsInfo{display:flex;justify-content:space-between}.LuckyWheelsCounterWrapper{display:flex;gap:5px;align-items:baseline}.LuckyWheelsRemaining{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-weight:var(--emw--font-weight-normal, 400);font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #BBB9C3)}.LuckyWheelsListEmpty{padding:20px 32px}.LuckyWheelsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #ffffff)}.LuckyWheelsListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #bbb9c3)}.LuckyWheelsDetailsPopup.Tablet .LuckyWheelsActions,.LuckyWheelsDetailsPopup.Desktop .LuckyWheelsActions{padding-top:16px}.LuckyWheelsDetailsPopup.Tablet .LuckyWheelsPopupName,.LuckyWheelsDetailsPopup.Desktop .LuckyWheelsPopupName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.LuckyWheelsDetailsPopup.Tablet .EngagementSuiteTooltipBackdrop,.LuckyWheelsDetailsPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.LuckyWheelsDetailsPopup.Tablet .EngagementSuiteIconButton,.LuckyWheelsDetailsPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}';const Ot=["en"],Wt={en:{luckywheels:"LuckyWheels",join:"Join",unjoin:"Unjoin",new:"new",noluckywheels:"No Unlocked LuckyWheel",tryOtherGames:"Try winning LuckyWheel as rewards or launching other booster games",tooltip:"Get a chance to win rewards by spinning the wheel!",history:"History",rewards:"Rewards",issued:"Issued",time:"Time",loading:"Loading...",noHistory:"No LuckyWheels’ history available (last 30 days)",freeSpins:"Free Spins",luckyWheel:"LuckyWheel",leaderboard:"Leaderboard",mission:"Mission",canceled:"The luckywheel has been canceled.",support:"Please, contact support."}},Ht=(e,t)=>{const i=t;return Wt[void 0!==i&&Ot.includes(i)?i:"en"][e]};var Jt,Rt;!function(e){e[e.FreeSpins=0]="FreeSpins",e[e.LuckyWheel=1]="LuckyWheel",e[e.Leaderboard=2]="Leaderboard",e[e.Challenge=3]="Challenge",e[e.Custom=4]="Custom"}(Jt||(Jt={})),function(e){e[e.Completed=0]="Completed",e[e.Expired=1]="Expired",e[e.Forfeited=2]="Forfeited"}(Rt||(Rt={}));const Ut=class{constructor(t){e(this,t),this.close=i(this,"close",7),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.handleLuckyWheelClick=e=>{const t=e.currentTarget.getAttribute("data-id"),i=e.currentTarget.getAttribute("data-index");window.postMessage({type:"LuckyWheelClick",id:t,index:i})},this.showTooltip=()=>{this.tooltip=!0},this.hideTooltip=()=>{this.tooltip=!1},this.handleTabChange=e=>{this.activeTab=+e.target.getAttribute("data-index"),2===this.activeTab&&this.sendHistoryRequest()},this.toggleLuckyWheelHistory=e=>{const t=e.currentTarget.getAttribute("data-id");this.openedHistoryIds.findIndex((e=>e===t))>-1?this.openedHistoryIds=this.openedHistoryIds.filter((e=>e!==t)):this.openedHistoryIds.push(t),this.openedHistoryIds=[...this.openedHistoryIds]},this.clientStyling="",this.clientStylingUrl="",this.language="en",this.device="Mobile",this.luckyWheels=[],this.translationUrl="",this.tooltip=!1,this.timers={},this.limitStylingAppends=!1,this.activeTab=1,this.historyLoading=!1,this.luckywheelHistory={},this.openedHistoryIds=[],this.historyLoaded=!1,this.isLoading=!1}handleEvent(e){var t;const i=null==e?void 0:e.data,{type:a}=i,n=s(i,["type"]);if("BarLuckyWheelsClick"===a&&(this.activeTab=1,this.openedHistoryIds=[]),"LuckywheelHistoryResponse"===a){this.openedHistoryIds=[];const e=n.data;if(e.length>0){const i=null===(t=e[0].Draw)||void 0===t?void 0:t.LotteryProgramID;this.luckywheelHistory[i]=e}this.historyLoading=!1}}luckywheelsPropHandler(e){!this.interval&&e.length&&(this.updateTimers(),this.startCountdown()),this.interval&&!e.length&&clearInterval(this.interval)}async componentWillLoad(){var e;this.luckywheelsPropHandler(this.luckyWheels),this.translationUrl&&await(e=this.translationUrl,new Promise(((t,i)=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])Wt[t][i]=e[t][i]})),t(Wt)})).catch((e=>{i(e)}))})))}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.luckyWheels.reduce(((t,i)=>{var a,n,s;const o=(null===(a=i.Current)||void 0===a?void 0:a.ExpiryTime)||(null===(s=null===(n=i.Program)||void 0===n?void 0:n.Trigger)||void 0===s?void 0:s.EndTime),r=new Date(o).getTime()-e;let l="00h:00m:00s";if(r<1)this.removeLuckyWheel(i.Program.Id);else{const{days:e,hours:t,minutes:i,seconds:a}={days:String(Math.floor(r/864e5)).padStart(2,"0"),hours:String(Math.floor(r%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(r%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(r%6e4/1e3)).padStart(2,"0")};l="00"===e?`${t}h:${i}m:${a}s`:`${e}d:${t}h:${i}m`}return Object.assign(Object.assign({},t),{[i.Program.Id]:l})}),{})}removeLuckyWheel(e){this.luckyWheels=this.luckyWheels.filter((t=>t.Program.Id!==e)),window.postMessage({type:"LuckyWheelHasExpired",id:e})}sendHistoryRequest(){this.historyLoading=!0,this.luckyWheels.forEach((e=>{window.postMessage({type:"LuckywheelHistoryRequest",data:{lotteryProgramID:e.Program.Id}})}))}getLuckyWheelClasses(e){return{LuckyWheelsCard:!0,LuckyWheelsEmptyNumber:0===e.Current.RemainingTimes}}getLuckyWheelName(e){var t,i;return(null===(t=e.Program)||void 0===t?void 0:t.Name.en)||(null===(i=e.Program)||void 0===i?void 0:i.Name["*"])}getLuckyWheelHeaderTemplate(e){var i,a;return t("div",{class:"LuckyWheelsCardHeader"},t("div",{class:"LuckyWheelsName"},this.getLuckyWheelName(e)),t("div",{class:"LuckyWheelsCounter"},t("div",{class:(null===(i=e.Current)||void 0===i?void 0:i.RemainingTimes)?"LuckyWheelsHighlightedCounter":"LuckyWheelsEmptyCounter"},null===(a=e.Current)||void 0===a?void 0:a.RemainingTimes)))}getLuckyWheelTemplate(e,i){const a=this.timers[e.Program.Id];return t("div",{class:this.getLuckyWheelClasses(e),onClick:this.handleLuckyWheelClick,key:e.Program.Id,"data-id":e.Program.Id,"data-index":i},this.getLuckyWheelHeaderTemplate(e),t("div",{class:"LuckyWheelsCountdownWrapper"},t("span",{class:"LuckyWheelsCountdown"},a)))}getHeaderTemplate(){return t("header",{class:"LuckyWheelsListPopupHeader"},t("button",{onClick:this.showTooltip,class:"EngagementSuiteIconButton Help"}),t("div",{class:"LuckyWheelsListPopupHeaderName"},Ht("luckyWheel",this.language)),t("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){return this.isLoading?t("general-animation-loading",null):this.luckyWheels.length?t("div",{class:"LuckyWheelsListWrapper"},t("div",{class:"LuckyWheelsList"},this.luckyWheels.map(((e,t)=>this.getLuckyWheelTemplate(e,t))))):t("div",{class:"LuckyWheelsListEmpty"},t("h2",null,Ht("noluckywheels",this.language)),t("p",null,Ht("tryOtherGames",this.language)))}getTooltipTemplate(){return this.tooltip?t("div",{class:"EngagementSuiteTooltipBackdrop"},t("div",{class:"EngagementSuiteTooltip"},t("button",{class:"EngagementSuiteIconButton Close",onClick:this.hideTooltip}),Ht("tooltip",this.language))):""}getTabsTemplate(){return t("div",{class:"EngagementSuiteTabsWrapper"},t("div",{class:"EngagementSuiteTabs"},t("div",{"data-index":"1",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(1===this.activeTab?"Active":"")},Ht("luckywheels",this.language)),t("div",{"data-index":"2",onClick:this.handleTabChange,class:"EngagementSuiteTab "+(2===this.activeTab?"Active":"")},Ht("history",this.language))))}getHistoryTabTemplate(){return t("div",{class:"HistoryWrapper"},t("div",{class:"HistoryCols"},t("div",{class:"HistoryColName Rewards"},Ht("rewards",this.language)),t("div",{class:"HistoryColName Issued"},Ht("issued",this.language)),t("div",{class:"HistoryColName Time"},Ht("time",this.language))),this.historyLoading?(e=this.language,t("div",{class:"HistoryLoader"},t("casino-engagement-suite-progress-bar",{indeterminate:!0}),t("span",null,Ht("loading",e)))):((e,i,a,n,s)=>0===e.length?t("p",{class:"HistoryEmptyMessage"},Ht("noHistory",s)):t("div",{class:"HistoryList"},e.map((e=>{var s;return t("div",{key:e.Program.Id,class:"HistoryListItem "+(a.includes(e.Program.Id)?"Opened":"Closed")},t("header",{class:"HistoryListItemHeader","data-id":e.Program.Id,onClick:n},e.Program.Name.en||e.Program.Name["*"],t("button",{class:"EngagementSuiteIconButton ArrowDown"})),t("div",{class:"HistoryListItemBody"},t("div",{class:"HistoryInfoRow"},null===(s=i[e.Program.Id])||void 0===s?void 0:s.map((i=>t("div",{class:"HistoryInfo"},t("div",{class:"HistoryCol Rewards"},((e,i)=>{var a,n,s,o;const r=i.WheelOfFortunePartitionIndex||0,l=null===(n=null===(a=e.Program.WheelOfFortune)||void 0===a?void 0:a.Partitions[r])||void 0===n?void 0:n.Name,p=null===(o=null===(s=e.Program.WheelOfFortune)||void 0===s?void 0:s.Partitions[r])||void 0===o?void 0:o.Image1,d=p.en||p["*"],c=e.Program.Name.en||e.Program.Name["*"];return t("div",{class:"HistoryRewards"},l.en||l["*"]||(d?t("img",{src:d}):c))})(e,i.Draw.Result)),t("div",{class:"HistoryCol Issued"},"fulfilled"===i.Draw.State?"Success":"Failed"),t("div",{class:"HistoryCol Time"},Fe(new Date(i.Draw.Time),"LLL d, yyyy HH:mm:ss"))))))))}))))(this.luckyWheels,this.luckywheelHistory,this.openedHistoryIds,this.toggleLuckyWheelHistory,this.language));var e}getTabsContentTemplate(){return 1===this.activeTab?this.getListTemplate():this.getHistoryTabTemplate()}render(){return t("div",{key:"e1ae674e9f7c5b7ba46f062cb9312365e7219073",class:`LuckyWheelsListPopup ${this.device}`},this.getHeaderTemplate(),this.getTabsTemplate(),this.getTabsContentTemplate(),this.getTooltipTemplate())}get host(){return a(this)}static get watchers(){return{luckyWheels:["luckywheelsPropHandler"]}}};Ut.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}.EngagementSuiteIconButton{width:16px;height:16px}.EngagementSuiteIconButton.Help{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/help.svg) no-repeat}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.EngagementSuiteIconButton.ArrowDown{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/arrow-down.svg) no-repeat}.LuckyWheelsListPopup{display:flex;height:100%;background-color:var(--emw--color-background, #1e1638);border-radius:var(--emw--border-radius-large, 8px);overflow:hidden;flex-direction:column;position:relative;padding-bottom:20px}.LuckyWheelsListPopupHeader{display:flex;justify-content:space-between;align-items:center;padding:12px 8px 8px}.LuckyWheelsListPopupHeaderName{color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-medium, 500);line-height:14px}.LuckyWheelsListWrapper::-webkit-scrollbar,.HistoryListItem::-webkit-scrollbar{width:3px;border-radius:4px}.LuckyWheelsListWrapper::-webkit-scrollbar-track,.HistoryListItem::-webkit-scrollbar-track{background:transparent}.LuckyWheelsListWrapper::-webkit-scrollbar-thumb,.HistoryListItem::-webkit-scrollbar-thumb{background:var(--emw--color-gray-105, rgba(255, 255, 255, 0.6))}.LuckyWheelsListWrapper::-webkit-scrollbar-thumb:hover,.HistoryListItem::-webkit-scrollbar-thumb:hover{background:var(--emw--color-gray-290, #969696)}.LuckyWheelsList{display:flex;flex-direction:column;row-gap:12px;padding:8px 19px 0}.LuckyWheelsRowWrapper{display:flex;justify-content:space-between;min-width:0}.LuckyWheelsCard{padding:15px 15px 19px;border:1px solid var(--emw--button-border-color, #403956);border-radius:var(--emw--border-radius-medium, 6px);position:relative;cursor:pointer}.LuckyWheelsCard.Forfeited{cursor:auto;pointer-events:none}.LuckyWheelsCardHeader{display:flex;justify-content:space-between;gap:24px;margin-bottom:12px;flex:1;min-width:0;align-items:flex-end}.LuckyWheelsName{color:var(--emw--color-typography, #ffffff);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);line-height:22px;font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-medium-plus, 18px);word-break:break-word;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.LuckyWheelsCounter{display:flex;color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-medium-plus, 18px);align-items:flex-end}.LuckyWheelsHighlightedCounter,.LuckyWheelsEmptyCounter{font-size:var(--emw--font-size-medium-plus, 18px);font-weight:var(--emw--font-weight-extra-bold, 800);margin-right:4px}.LuckyWheelsHighlightedCounter{background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #ffb801 15.86%, #fef746 31.36%, #fbffe0 36.86%, #fffa60 47.86%, #ff9400 87.36%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.LuckyWheelsEmptyCounter{color:var(--emw--color-gray-150, #8f8b9c)}.LuckyWheelsListEmpty{padding:20px 32px}.LuckyWheelsListEmpty h2{margin:0 0 16px 0;text-align:center;font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 20px);line-height:24px;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-typography, #ffffff)}.LuckyWheelsListEmpty p{font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #bbb9c3)}.LuckyWheelsCountdownWrapper{display:flex;justify-content:space-between;align-items:flex-start}.LuckyWheelsCountdown,.ForfeitedMessage{color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.ForfeitedMessage{line-height:1.2}.LuckyWheelsBalCounter{display:flex;align-items:flex-end;color:var(--emw--color-secondary, #bbb9c3);font-size:var(--emw--font-size-x-small, 12px)}.LuckyWheelsRemainCounter{color:var(--emw--color-typography, #ffffff);font-weight:var(--emw--font-weight-bold, 700);margin-right:4px}.LuckyWheelLabel{min-width:35px;height:18px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #ffb801 15.86%, #fef746 31.36%, #fbffe0 36.86%, #fffa60 47.86%, #ff9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:none;position:absolute;top:-11px;right:11px;padding:0 2px;align-items:center;justify-content:center}.LuckyWheelLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-2x-small, 10px);line-height:10px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1e1638)}.ShowLuckyWheelLabel{display:inline-flex}.EngagementSuiteTooltipBackdrop{padding:48px 30px 0;position:absolute;width:100%;height:100%;inset:0;background-color:rgba(0, 0, 0, 0.5)}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip{border:1px solid var(--emw--button-border-color, #403956);background-color:var(--emw--color-background, #1e1638);border-radius:var(--emw--border-radius-large, 8px);padding:32px;font-size:var(--emw--font-size-small, 14px);line-height:17px;color:var(--emw--color-secondary, #bbb9c3);position:relative}.EngagementSuiteTooltipBackdrop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:12px;right:12px;position:absolute}.LuckyWheelsEmptyNumber .LuckyWheelsName,.LuckyWheelsEmptyNumber .LuckyWheelsCountdown,.LuckyWheelsEmptyNumber .LuckyWheelsRemainCounter{color:var(--emw--color-gray-150, #8f8b9c)}.LuckyWheelsListPopup.Tablet .LuckyWheelsListPopupHeader,.LuckyWheelsListPopup.Desktop .LuckyWheelsListPopupHeader{padding-top:16px}.LuckyWheelsListPopup.Tablet .LuckyWheelsListPopupHeaderName,.LuckyWheelsListPopup.Desktop .LuckyWheelsListPopupHeaderName{font-size:var(--emw--font-size-medium, 16px);line-height:16px}.LuckyWheelsListPopup.Tablet .EngagementSuiteIconButton,.LuckyWheelsListPopup.Desktop .EngagementSuiteIconButton{width:24px;height:24px}.LuckyWheelsListPopup.Tablet .LuckyWheelsList,.LuckyWheelsListPopup.Desktop .LuckyWheelsList{padding:20px 24px 0;row-gap:20px}.LuckyWheelsListPopup.Tablet .LuckyWheelCardHeader,.LuckyWheelsListPopup.Desktop .LuckyWheelCardHeader{margin-bottom:16px}.LuckyWheelsListPopup.Tablet .LuckyWheelsName,.LuckyWheelsListPopup.Desktop .LuckyWheelsName{line-height:27px;font-size:var(--emw--font-size-large, 18px);font-weight:var(--emw--font-weight-bold, 700)}.LuckyWheelsListPopup.Tablet .LuckyWheelsCountdown,.LuckyWheelsListPopup.Desktop .LuckyWheelsCountdown{font-size:var(--emw--font-size-small, 14px);line-height:14px}.LuckyWheelsListPopup.Tablet .EngagementSuiteTooltipBackdrop,.LuckyWheelsListPopup.Desktop .EngagementSuiteTooltipBackdrop{padding:90px 75px 0}.LuckyWheelsListPopup.Tablet .EngagementSuiteTooltip,.LuckyWheelsListPopup.Desktop .EngagementSuiteTooltip{padding:60px 65px;font-size:var(--emw--font-size-medium, 16px);line-height:20px}.LuckyWheelsListPopup.Tablet .EngagementSuiteTooltip .EngagementSuiteIconButton,.LuckyWheelsListPopup.Desktop .EngagementSuiteTooltip .EngagementSuiteIconButton{top:24px;right:24px}.LuckyWheelsListPopup.Tablet .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab,.LuckyWheelsListPopup.Desktop .EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{font-size:var(--emw--font-size-medium, 16px)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryCols,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryCols{font-size:var(--emw--font-size-medium, 16px)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryCols .Rewards,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryCols .Rewards{flex-basis:140px}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryCols .Issued,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryCols .Issued{flex-basis:100px}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryListItemHeader,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryListItemHeader{font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);font-size:var(--emw--font-size-large, 18px);font-weight:var(--emw--font-weight-medium, 500)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryInfo,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryInfo{font-size:var(--emw--font-size-medium, 16px)}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryInfo .Rewards,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryInfo .Rewards{flex-basis:140px}.LuckyWheelsListPopup.Tablet .HistoryWrapper .HistoryListItem .HistoryInfo .Issued,.LuckyWheelsListPopup.Desktop .HistoryWrapper .HistoryListItem .HistoryInfo .Issued{flex-basis:100px}.EngagementSuiteTabsWrapper{padding:0 24px;margin:8px 0}.EngagementSuiteTabsWrapper .EngagementSuiteTabs{display:flex;position:relative;border-bottom:2px solid var(--emw--color-secondary, #666178)}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab{padding:9px 16px 7px;font-weight:var(--emw--font-weight-medium, 500);font-size:var(--emw--font-size-x-small, 12px);line-height:15px;color:var(--emw--color-gray-300, #666178);cursor:pointer}.EngagementSuiteTabsWrapper .EngagementSuiteTabs .EngagementSuiteTab.Active{color:var(--emw--color-typography, #fff);border-bottom:2px solid var(--emw--color-typography, #fff);margin-bottom:-2px}.HistoryWrapper{padding:0 24px;display:flex;flex-direction:column;height:100%;overflow:hidden}.HistoryWrapper .HistoryEmptyMessage{margin-top:8px;font-size:var(--emw--font-size-small, 14px);color:var(--emw--color-secondary, #bbb9c3);line-height:30px}.HistoryWrapper .HistoryCols{padding:12px 10px;position:relative;display:flex;border-bottom:1px solid var(--emw--color-secondary, #666178);font-size:var(--emw--font-size-x-small, 12px)}.HistoryWrapper .HistoryCols .HistoryColName{color:var(--emw--color-secondary, #bbb9c3)}.HistoryWrapper .HistoryCols .Rewards{flex-basis:80px}.HistoryWrapper .HistoryCols .Issued{flex-basis:80px}.HistoryWrapper .HistoryLoader{display:flex;flex-direction:column;justify-content:center;align-items:center;height:inherit;font-size:var(--emw--font-size-medium, 16px);color:var(--emw--color-gray-150, #8f8b9c)}.HistoryWrapper .HistoryLoader casino-engagement-suite-progress-bar{margin-bottom:8px;width:100px}.HistoryWrapper .HistoryListItem{max-height:300px;overflow:auto;margin-top:8px}.HistoryWrapper .HistoryListItem.Opened .EngagementSuiteIconButton.ArrowDown{transform:rotate(180deg)}.HistoryWrapper .HistoryListItem.Opened .HistoryListItemBody{padding-bottom:8px;grid-template-rows:1fr;border-bottom:1px solid var(--emw--color-secondary, #666178)}.HistoryWrapper .HistoryListItem .HistoryListItemHeader{padding:16px 0;display:flex;justify-content:space-between;align-items:center;color:var(--emw--color-typography, #ffffff);font-size:var(--emw--font-size-medium, 14px)}.HistoryWrapper .HistoryListItem .EngagementSuiteIconButton.ArrowDown{transition:transform 0.3s ease-out;width:24px;height:24px}.HistoryWrapper .HistoryListItem .HistoryListItemBody{position:relative;display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.3s ease-out}.HistoryWrapper .HistoryListItem .HistoryListItemBody>div{overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryListItemCard{padding:12px 5px}.HistoryWrapper .HistoryListItem .HistoryInfoRow{display:flex;gap:10px;flex-direction:column}.HistoryWrapper .HistoryListItem .HistoryInfo{display:flex;padding:10px;font-size:var(--emw--font-size-x-small, 12px);color:var(--emw--color-secondary, #bbb9c3)}.HistoryWrapper .HistoryListItem .HistoryInfo .HistoryCol{text-overflow:ellipsis;overflow:hidden}.HistoryWrapper .HistoryListItem .HistoryInfo .Rewards{color:var(--emw--color-typography, #ffffff);flex-basis:80px;font-weight:600}.HistoryWrapper .HistoryListItem .HistoryInfo .Issued{flex-basis:80px}';const Yt=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),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)}))},this.clientStyling="",this.clientStylingUrl="",this.isOpen=void 0,this.isLoading=void 0,this.header=void 0,this.contentIcon=void 0,this.modalType=void 0,this.assets=void 0,this.device="Mobile",this.showAnimation=!1,this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return t("div",{key:"27c64eb08e60bdc0525d1bfa800f7d3257d8e377",class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},t("div",{key:"75080d22dbe97360c91356da2a4fa73dd1ded948",class:"ModalWinAnimation"}),t("div",{key:"e25510992fa764b9d0976566df40c8aa04aca38a",class:"ModalContent GradientBorder"},t("div",{key:"9d5f1d11afc7522857d49fd9dedb704b216c4a1e",class:"IconCloseContainer"},t("button",{key:"5edea8aafd0fbc7104e7093f2a9f12568187fa05",class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick})),this.assets?t("div",{class:"ModalAssets",style:{background:`url(${this.assets}) no-repeat center / cover`}}):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",{key:"c787b35b593d94258072420ff4a47e0433369b21",class:"ModalHeader"},t("h1",{key:"3e162d602050e9d3e1c3a97234549bc971370a23"},this.header)),t("div",{key:"35784436dc1b5d8342730959d69bc8e08910aeb7",class:"ModalBodyWrapper"},t("div",{key:"500831b113cde82958ae1971d8710c6f0e2a45ff",class:"ModalBody"},t("slot",{key:"b47a0252f9fe4fa01bea07a69e3d6b7cc02f575c",name:"body"})),t("div",{key:"d10041375451213d55c7be600b237a802cbe56f5",class:"ModalFooter"},t("slot",{key:"db205227b152ead571e2029f66ba3d381337457a",name:"footer"})))))}get host(){return a(this)}};Yt.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.EngagementSuiteIconButton{width:24px;height:24px}.EngagementSuiteIconButton.Close{background:center/100% url(https://static.everymatrix.com/gic/img/engagement-suite/close.svg) no-repeat}.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;z-index:1}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.ModalBodyWrapper{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.ModalBodyWrapper::-webkit-scrollbar{width:3px;background:none}.ModalBodyWrapper::-webkit-scrollbar-thumb{border-radius:var(--emw--border-radius-small, 4px);background-color:var(--emw--color-gray-transparency-30, rgba(255, 255, 255, 0.3))}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:var(--emw--border-radius-large, 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:var(--emw--border-radius-large, 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-plus, 24px);padding:0 16px;margin-bottom:16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin:12px 0}.ModalAssets{width:44px;height:44px;background-size:cover;margin:12px 0}.ModalBody{font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-secondary, #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 .EngagementSuiteIconButton{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:var(--emw--font-size-small, 14px)}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:var(--emw--font-size-large, 20px);padding:0 60px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const Gt=["en"],Qt={en:{joinHeader:"Choose another mission?",desc:"Any progress on the current mission will be kept and you can rejoin the mission at any time.",joinQuestion:"Would you still like to join another mission?",joinConfirm:"Yes, join another mission",joinReject:"No, stay at this mission",unJoinHeader:"Quit Mission?",unJoinQuestion:"Would you still like to quit the mission?",unJoinConfirm:"Yes, I want to quit this mission",unJoinReject:"No, stay at this mission",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.",noMissions:"No Missions yet",tryOtherGames:"Try winning Missions as rewards or launching other booster games",tooltip:"Mission where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!",jackpotWinInfo:"Please refresh game page or place any bet to update game balance",seeYouLater:"See you later",noSpinsLeft:"You've used all spins here",spinAgain:"Spin again",noPrizeMessage:"You didn't win this time, try again!",noPrizeTitle:"Oh, Sorry",close:"Close"}},$t=(e,t)=>{const i=t;return Qt[void 0!==i&&Gt.includes(i)?i:"en"][e]},Zt="https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",_t="https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",Vt=class{constructor(t){e(this,t),this.closeModal=i(this,"closeModal",7),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))),this.clientStyling="",this.clientStylingUrl="",this.language="en",this.isJoiningToChallenge=void 0,this.device="Mobile",this.limitStylingAppends=!1,this.openModals=[],this.rewardMessage="",this.rewardText="",this.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""},this.noLWSpinLeft=!1,this.assets=void 0}openModalHandler(e){const{modalType:t,rewardMessage:i,hasError:a,confirmationData:n,winAmount:s,rewardText:o,noSpinLeft:r,assets:l}=e.detail;s&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+s.amount,currency:s.currency}:s),this.openModals=[...this.openModals,t],this.rewardMessage=i,this.rewardText=o,this.hasError=a,this.noLWSpinLeft=r,this.assets=l,n&&(this.confirmationData=n)}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",{key:"f6084274c1f53415a89aacca7cefc088b401e01a",class:`ModalContainer ${this.device}`},t("casino-engagement-suite-modal",{key:"16e8e1db4bc6916197723aeec9d86edce5142fa4",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("NO_SPIN_LEFT_MODAL"),header:$t("noSpinsLeft",this.language),contentIcon:_t,assets:this.assets,modalType:"NO_SPIN_LEFT_MODAL","show-animation":!1,device:this.device},t("div",{key:"666d74509a18ecf7250f594b65ed50d894e8bc69",slot:"body"},t("div",{key:"dae32188cb62d48681159a7f1953e8e24ad45a15"},$t("seeYouLater",this.language))),t("div",{key:"57eae0585f9bbcaa0c3168b967db7d2197c69377",slot:"footer"},t("button",{key:"f4ffef3e030620dc2eacfc0315ad1ef87c648723",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"NO_SPIN_LEFT_MODAL"},"OK"))),t("casino-engagement-suite-modal",{key:"3ab936accd2c6f7f4a47f506750527dba251b54b",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",contentIcon:_t,assets:this.assets,modalType:"REWARD_MODAL","show-animation":!0,device:this.device},t("div",{key:"e8f31b5b1fa7b3cdbede19d2332c5aca912d6e17",slot:"body"},t("div",{key:"fa5a265da89b3d306c910bc74a65637fc775ebad"},!this.rewardText&&$t("won",this.language)," ",t("span",{key:"d95f375d21a90564b9d8c5e328c7c6d19d164571",class:"ModalReward"},this.rewardText||this.rewardMessage)),this.hasError&&t("div",{key:"d5c9f2f8e3fe91bd2a6593c1796b2e60b69d6200",class:"SupportInfo"},$t("supportInfo",this.language))),t("div",{key:"a0b6d0d65298de17b3aa588db7154eab048482f4",slot:"footer"},t("button",{key:"f518cc3fefa88c5090d84f198b7ff3913c11faf1",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},$t(this.noLWSpinLeft?"close":"continue",this.language)),this.noLWSpinLeft&&t("div",{key:"2a76bdd63efcba8c4c447586f390316ad4197ad6",class:"NoSpinsLeft"},$t("noSpinsLeft",this.language)))),t("casino-engagement-suite-modal",{key:"250f50a7f9f8ee816c5855a0dd3fcf5a54a9eaca",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("JACKPOT_REWARD_MODAL"),header:"Congratulations!",contentIcon:_t,"show-animation":!0,modalType:"JACKPOT_REWARD_MODAL",device:this.device},t("div",{key:"9ed16e8dd8c074525b09e60058f6d4e1f347337f",slot:"body"},t("div",{key:"4a62303a24951e6bbea43ca53195e639c916adca",class:"JackpotWinText"},$t("jackpotWin",this.language)),t("div",{key:"6e338e3781e014066691609a2ff0055c63eb6c2b",class:"JackpotWinAmount"},(i=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(i)}`))),t("div",{key:"dd252ee2f9d4a55a9a148b71aaef0f4319b3664d",slot:"footer"},t("button",{key:"b547c0d0264fda93698a2dd6927908103e5bdf39",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},$t("continue",this.language)),t("div",{key:"771804d487d49347ee30c1f158e3f6b3b9962b59",class:"JackpotWinInfoText"},$t("jackpotWinInfo",this.language)))),t("casino-engagement-suite-modal",{key:"ea0428fe8f377e427bd9ebe7ed1ed33bbbbc47d2",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("TARGET_MODAL"),header:$t(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},t("div",{key:"190bf7531bae3de373e7c04233bfd31bb007d22a",slot:"body"},t("div",{key:"2437aec4f2393e2ddc934f0ed927a2b7043a1e88",class:"LeftAlign"},$t("desc",this.language)),t("div",{key:"eca39946bc741a4e56d09f9640822b0c51a17d79",class:"LeftAlignQuestion"},$t(e?"joinQuestion":"unJoinQuestion",this.language))),t("div",{key:"81107a7b57a5c6dd573128090c1145171c4d7131",slot:"footer",class:"ManyActions"},t("button",{key:"c3e256cb8334e9386c572bd037c78678f7b922f4",class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},$t(e?"joinConfirm":"unJoinConfirm",this.language)),t("button",{key:"29de3f6da68fd1ec8258856480bf89e3d286309f",class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},t("div",{key:"f01704e080896e65c86ec67e3f14945fcbd2b016",class:"GradientText"},$t(e?"joinReject":"unJoinReject",this.language))))),t("casino-engagement-suite-modal",{key:"a5708ff6eb5ef898adf17b8869c687b816b0ace3",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("SUPPORT_MODAL"),header:$t("noReward",this.language),contentIcon:Zt,modalType:"SUPPORT_MODAL",device:this.device},t("div",{key:"aa5ee73704966ee4ec44de3c287b4520f5c0f45b",slot:"body"},t("span",{key:"05783ef120dd1a61737540a4a6121ee20886ff63"},$t("contactSupport",this.language))),t("div",{key:"3fc1e0534e3acd0c599fe7317fda89d51b841555",slot:"footer"},t("button",{key:"85db69d240d1999e2b6f002688cda0c0be957e9f",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},$t(this.noLWSpinLeft?"close":"okContinue",this.language)),this.noLWSpinLeft&&t("div",{key:"fc864b315cb1f3f9829287a679125eb036a11c70",class:"NoSpinsLeft"},$t("noSpinsLeft",this.language)))),t("casino-engagement-suite-modal",{key:"2666ffb2fa903a96205c55558acb9566af28e789",clientStylingUrl:this.clientStylingUrl,isOpen:this.isModalOpen("NO_PRIZE_MODAL"),header:$t("noPrizeTitle",this.language),contentIcon:Zt,modalType:"NO_PRIZE_MODAL",assets:this.assets,device:this.device},t("div",{key:"1c681e3f5253c1ed3e65358f735b48b676a27ddc",slot:"body"},t("span",{key:"14357307c9f43d8a690c7434d610fa2172cb6282"},$t("noPrizeMessage",this.language))),t("div",{key:"c038057289eb2a597ef35d09bbe7b85fad79032e",slot:"footer"},t("button",{key:"fde3b09e7109aef522b3804206f136f02aadbaef",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"NO_PRIZE_MODAL"},$t(this.noLWSpinLeft?"close":"spinAgain",this.language)),this.noLWSpinLeft&&t("div",{key:"b85fa50c50bf70f1ddd1361a403f2735086b9028",class:"NoSpinsLeft"},$t("noSpinsLeft",this.language)))));var i}get host(){return a(this)}};Vt.style=':host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));color:var(--emw--color-background, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);padding:0 12px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)) border-box;border:2px solid transparent}.GradientText{background:var(--emw--engagement-suite-gradient-button, 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-semibold, 600);font-size:var(--emw--font-size-medium, 16px);line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;background:var(--emw--linear-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-weight:var(--emw--font-weight-black, 900);font-size:var(--emw--font-size-medium, 16px);line-height:16px}.JackpotWinInfoText{padding:0 50px;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.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:var(--emw--font-size-small, 14px);line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:var(--emw--font-size-small, 14px);line-height:14px}.ModalContainer.Mobile .JackpotWinInfoText{padding:0;margin-top:20px;font-size:var(--emw--font-size-small, 14px);line-height:16px;color:var(--emw--color-secondary, #BBB9C3)}.LeftAlign,.LeftAlignQuestion{text-align:left;line-height:1.2}.LeftAlignQuestion{margin-top:20px}.NoSpinsLeft{color:var(--emw--color-secondary, #BBB9C3);margin-top:20px}';const qt=class{constructor(t){e(this,t),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.value=0,this.disabled=!1,this.hidePercent=!1,this.indeterminate=!1,this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1}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||this.indeterminate}}getProgressBarLineTemplate(){return t("div",this.indeterminate?{class:"ProgressBarLine Indeterminate",part:"ProgressBarLine Indeterminate"}:{class:"ProgressBarLine",part:"ProgressBarLine",style:{width:this.value+"%"}})}render(){return t("div",{key:"ecce3a26a92d2e090c1db84bdc1bdbeb505080ed",class:this.getProgressBarClasses(),part:"ProgressBar"},t("div",{key:"649fe1103d222200f2a1ad3b5967e37da1f1ab3d",class:"ProgressBarInfo",part:"ProgressBarInfo"},t("slot",{key:"49dc180eedd823f0027f75099813fb9d91bcd938",name:"Title"},t("div",{key:"e6e59da3fe7bbcb37e118e7fd23a8ff35587aca5"})),t("slot",{key:"3dc8e5fd1dbc8c268b9c76e393b751cb53605e7e",name:"Percent"},t("div",{key:"6a9e880f3ee3c4f26e8577c69be5db5f8e2d10ad",class:"ProgressBarPercent",part:"ProgressBarPercent"},this.value,"%"))),t("div",{key:"141106e77caad7b04bb199f911e87c0c6f0adc2d",class:"ProgressBarBackground",part:"ProgressBarBackground"},this.getProgressBarLineTemplate()))}get host(){return a(this)}};qt.style=":host{display:block;font-family:inherit}:host(.Desktop) .ProgressBarPercent{font-size:var(--emw--font-size-small, 14px);line-height:14px}@keyframes indeterminate{0%{left:-200%;right:100%}60%{left:110%;right:-10%}to{left:110%;right:-10%}}.ProgressBarBackground{height:8px;background-color:var(--emw--color-gray-300, #666178);border-radius:var(--emw--border-radius-small, 4px);position:relative;overflow:hidden}.ProgressBarLine{position:absolute;left:0;top:0;bottom:0;border-radius:var(--emw--border-radius-small, 4px);background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));transition:width ease-out 0.3s}.ProgressBarLine.Indeterminate{animation:indeterminate 1s linear infinite}.ProgressBarInfo{margin-bottom:8px;display:flex;justify-content:space-between;align-items:center}.ProgressBarPercent{font-weight:var(--emw--font-weight-bold, 700);font-size:var(--emw--font-size-x-small, 12px);line-height:12px}.HidePercent .ProgressBarPercent{display:none}.ProgressBar:not(.Disabled) .ProgressBarPercent{background:var(--emw--engagement-suite-gradient-button, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%));-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}.ProgressBar.Disabled .ProgressBarPercent{color:var(--emw--color-gray-300, #666178)}.ProgressBar.Disabled .ProgressBarLine{background:var(--emw--color-background-secondary, #474668)}";const Xt=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg"}),Kt=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KICAgIDxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xOTcxXzUxNikiPgogICAgICAgIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOC4wMDAwOCAyLjAwMDAxQzQuNjg2MzcgMi4wMDAwMSAyLjAwMDA4IDQuNjg2MyAyLjAwMDA4IDhDMi4wMDAwOCAxMS4zMTM3IDQuNjg2MzcgMTQgOC4wMDAwOCAxNEMxMS4zMTM4IDE0IDE0LjAwMDEgMTEuMzEzNyAxNC4wMDAxIDhDMTQuMDAwMSA0LjY4NjMgMTEuMzEzOCAyLjAwMDAxIDguMDAwMDggMi4wMDAwMVpNMC42NjY3NDggOEMwLjY2Njc0OCAzLjk0OTkyIDMuOTQ5OTkgMC42NjY2NzIgOC4wMDAwOCAwLjY2NjY3MkMxMi4wNTAyIDAuNjY2NjcyIDE1LjMzMzQgMy45NDk5MiAxNS4zMzM0IDhDMTUuMzMzNCAxMi4wNTAxIDEyLjA1MDIgMTUuMzMzMyA4LjAwMDA4IDE1LjMzMzNDMy45NDk5OSAxNS4zMzMzIDAuNjY2NzQ4IDEyLjA1MDEgMC42NjY3NDggOFpNOC4xNzIxNiA1LjM0OTU1QzcuODYxODEgNS4yOTYzMiA3LjU0MjY0IDUuMzU0NjQgNy4yNzExNyA1LjUxNDE4QzYuOTk5NzEgNS42NzM3MyA2Ljc5MzQ2IDUuOTI0MiA2LjY4ODk3IDYuMjIxMjNDNi41NjY3OSA2LjU2ODU2IDYuMTg2MTggNi43NTEwOCA1LjgzODg1IDYuNjI4ODlDNS40OTE1MyA2LjUwNjcxIDUuMzA5MDEgNi4xMjYxIDUuNDMxMTkgNS43Nzg3OEM1LjY0MDE3IDUuMTg0NyA2LjA1MjY2IDQuNjgzNzYgNi41OTU2IDQuMzY0NjdDNy4xMzg1MyA0LjA0NTU4IDcuNzc2ODggMy45Mjg5NCA4LjM5NzU3IDQuMDM1NDFDOS4wMTgyNiA0LjE0MTg3IDkuNTgxMjUgNC40NjQ1OCA5Ljk4NjgyIDQuOTQ2MzZDMTAuMzkyMyA1LjQyODA0IDEwLjYxNDMgNi4wMzc2NiAxMC42MTM0IDYuNjY3MjhDMTAuNjEzMSA3LjY4NzUyIDkuODU2NzEgOC4zNjEyNiA5LjMxNjU1IDguNzIxMzdDOS4wMjYxMyA4LjkxNDk5IDguNzQwNDUgOS4wNTczNSA4LjUzMDAxIDkuMTUwODhDOC40MjM4NCA5LjE5ODA2IDguMzM0NDQgOS4yMzM4NyA4LjI3MDAyIDkuMjU4NDFDOC4yMzc3NSA5LjI3MDcxIDguMjExNTkgOS4yODAyMyA4LjE5MjU1IDkuMjg3TDguMTY5MzkgOS4yOTUxMUw4LjE2MjAyIDkuMjk3NjNMOC4xNTk0MiA5LjI5ODVMOC4xNTg0IDkuMjk4ODVDOC4xNTgyIDkuMjk4OTEgOC4xNTc1NyA5LjI5OTEzIDcuOTQ2NzUgOC42NjY2N0w4LjE1NzU3IDkuMjk5MTNDNy44MDgyNyA5LjQxNTU2IDcuNDMwNzIgOS4yMjY3OCA3LjMxNDI5IDguODc3NDlDNy4xOTc5IDguNTI4MzEgNy4zODY1MSA4LjE1MDkgNy43MzU1OCA4LjAzNDMzTDcuNzQ1ODcgOC4wMzA3MkM3Ljc1NjEyIDguMDI3MDcgNy43NzI5MyA4LjAyMDk3IDcuNzk1MzUgOC4wMTI0M0M3Ljg0MDMxIDcuOTk1MyA3LjkwNzE2IDcuOTY4NjEgNy45ODg0OSA3LjkzMjQ2QzguMTUzMDUgNy44NTkzMyA4LjM2NzM3IDcuNzUxNjkgOC41NzY5NSA3LjYxMTk3QzkuMDM2NjggNy4zMDU0OCA5LjI4MDA4IDYuOTc5NDMgOS4yODAwOCA2LjY2NjY3TDkuMjgwMDggNi42NjU2OEM5LjI4MDU1IDYuMzUwOCA5LjE2OTU3IDYuMDQ1OTEgOC45NjY3OCA1LjgwNTAyQzguNzY0IDUuNTY0MTMgOC40ODI1MSA1LjQwMjc4IDguMTcyMTYgNS4zNDk1NVpNNy4zMzM0MSAxMS4zMzMzQzcuMzMzNDEgMTAuOTY1MSA3LjYzMTg5IDEwLjY2NjcgOC4wMDAwOCAxMC42NjY3SDguMDA2NzVDOC4zNzQ5NCAxMC42NjY3IDguNjczNDEgMTAuOTY1MSA4LjY3MzQxIDExLjMzMzNDOC42NzM0MSAxMS43MDE1IDguMzc0OTQgMTIgOC4wMDY3NSAxMkg4LjAwMDA4QzcuNjMxODkgMTIgNy4zMzM0MSAxMS43MDE1IDcuMzMzNDEgMTEuMzMzM1oiIGZpbGw9IiM2NjYxNzgiLz4KICAgIDwvZz4KICAgIDxkZWZzPgogICAgICAgIDxjbGlwUGF0aCBpZD0iY2xpcDBfMTk3MV81MTYiPgogICAgICAgICAgICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIGZpbGw9IndoaXRlIi8+CiAgICAgICAgPC9jbGlwUGF0aD4KICAgIDwvZGVmcz4KPHNjcmlwdCB4bWxucz0iIi8+PC9zdmc+Cg==",alt:"question",class:"Question"}),ei=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-open.svg"}),ti=t("img",{src:"https://static.everymatrix.com/gic/img/engagement-suite/eye-closed.svg"}),ii=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMC40NzEzIDMuNTI4NTlDMTAuNzMxNyAzLjc4ODk0IDEwLjczMTcgNC4yMTEwNSAxMC40NzEzIDQuNDcxNEw2Ljk0MjczIDhMMTAuNDcxMyAxMS41Mjg2QzEwLjczMTcgMTEuNzg4OSAxMC43MzE3IDEyLjIxMTEgMTAuNDcxMyAxMi40NzE0QzEwLjIxMSAxMi43MzE3IDkuNzg4ODYgMTIuNzMxNyA5LjUyODUxIDEyLjQ3MTRMNS41Mjg1MSA4LjQ3MTRDNS4yNjgxNiA4LjIxMTA1IDUuMjY4MTYgNy43ODg5NCA1LjUyODUxIDcuNTI4NTlMOS41Mjg1MSAzLjUyODU5QzkuNzg4ODYgMy4yNjgyNCAxMC4yMTEgMy4yNjgyNCAxMC40NzEzIDMuNTI4NTlaIiBmaWxsPSIjNjY2MTc4Ii8+Cjwvc3ZnPgo=",alt:"Back",class:"Back"}),ai=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDE2IDE2IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIxMTVfMzA2KSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNC45MDI5MiAwLjY2NjQ5NkM0LjkyMzM5IDAuNjY2NTc5IDQuOTQzNCAwLjY2NjY2IDQuOTYyODYgMC42NjY2NkgxMS4wMzY5QzExLjA1NjQgMC42NjY2NiAxMS4wNzY0IDAuNjY2NTc5IDExLjA5NjkgMC42NjY0OTZDMTEuMzA1NiAwLjY2NTY1MyAxMS41NjI3IDAuNjY0NjEzIDExLjc4OTMgMC43NDcwN0MxMi4xNTk2IDAuODgxODY4IDEyLjQ1MTQgMS4xNzM2MSAxMi41ODYyIDEuNTQzOTdDMTIuNjM5NCAxLjY5MDMxIDEyLjY1NzggMS44NDk0MiAxMi42NjQgMS45OTk5OUwxMy42ODQyIDEuOTk5OTlDMTMuODI0MiAxLjk5OTk4IDEzLjk2MDcgMS45OTk5NiAxNC4wNzY3IDIuMDA3ODhDMTQuMjAzNiAyLjAxNjU0IDE0LjM1NDEgMi4wMzY4NiAxNC41MTAxIDIuMTAxNDlDMTQuODM2OCAyLjIzNjgxIDE1LjA5NjQgMi40OTYzOCAxNS4yMzE3IDIuODIzMDhDMTUuMjk2NCAyLjk3OTExIDE1LjMxNjcgMy4xMjk1OSAxNS4zMjUzIDMuMjU2NTFDMTUuMzMzMyAzLjM3MjU2IDE1LjMzMzIgMy41MDg5OCAxNS4zMzMyIDMuNjQ5MDFWMy45OTk5OUMxNS4zMzMyIDQuMDMxMDIgMTUuMzMzMyA0LjA2MTU4IDE1LjMzMzMgNC4wOTE3MUMxNS4zMzM2IDQuNjIxOTcgMTUuMzMzOCA1LjAxNTc0IDE1LjI0MjQgNS4zNTY4NEMxNC45OTU4IDYuMjc3MDkgMTQuMjc3IDYuOTk1ODggMTMuMzU2OCA3LjI0MjQ2QzEzLjEwMyA3LjMxMDQ0IDEyLjgyMDIgNy4zMjc3NCAxMi40NzM3IDcuMzMyMDNDMTEuOTYxOCA5LjA1MzkzIDEwLjQ4MjkgMTAuMzU5NiA4LjY2NjU3IDEwLjYxOTRWMTEuMzMzM0g4Ljk2Mjg2QzEwLjY0MDIgMTEuMzMzMyAxMS45OTk5IDEyLjY5MzEgMTEuOTk5OSAxNC4zNzA0QzExLjk5OTkgMTQuOTAyMiAxMS41Njg4IDE1LjMzMzMgMTEuMDM2OSAxNS4zMzMzSDQuOTYyODZDNC40MzEwMyAxNS4zMzMzIDMuOTk5OSAxNC45MDIyIDMuOTk5OSAxNC4zNzA0QzMuOTk5OSAxMi42OTMxIDUuMzU5NjMgMTEuMzMzMyA3LjAzNjk0IDExLjMzMzNINy4zMzMyM1YxMC42MTk0QzUuNTE2OTMgMTAuMzU5NiA0LjAzODAyIDkuMDUzOTMgMy41MjYxIDcuMzMyMDNDMy4xNzk2MiA3LjMyNzc0IDIuODk2NzYgNy4zMTA0NCAyLjY0MzA1IDcuMjQyNDZDMS43MjI4MSA2Ljk5NTg4IDEuMDA0MDEgNi4yNzcwOSAwLjc1NzQzMyA1LjM1Njg0QzAuNjY2MDM1IDUuMDE1NzQgMC42NjYyNDggNC42MjE5NyAwLjY2NjUzNSA0LjA5MTcxQzAuNjY2NTUyIDQuMDYxNTkgMC42NjY1NjggNC4wMzEwMiAwLjY2NjU2OCAzLjk5OTk5VjMuNjY2NjZDMC42NjY1NjggMy42NjA3NyAwLjY2NjU2OCAzLjY1NDg5IDAuNjY2NTY3IDMuNjQ5MDFDMC42NjY1NTMgMy41MDg5OCAwLjY2NjU0IDMuMzcyNTYgMC42NzQ0NTggMy4yNTY1MUMwLjY4MzExNyAzLjEyOTU5IDAuNzAzNDMzIDIuOTc5MTEgMC43NjgwNjIgMi44MjMwOEMwLjkwMzM4NyAyLjQ5NjM4IDEuMTYyOTUgMi4yMzY4MSAxLjQ4OTY2IDIuMTAxNDlDMS42NDU2OSAyLjAzNjg2IDEuNzk2MTcgMi4wMTY1NCAxLjkyMzA4IDIuMDA3ODhDMi4wMzkxNCAxLjk5OTk2IDIuMTc1NTYgMS45OTk5OCAyLjMxNTU5IDEuOTk5OTlDMi4zMjE0NiAxLjk5OTk5IDIuMzI3MzUgMS45OTk5OSAyLjMzMzIzIDEuOTk5OTlIMy4zMzU4MUMzLjM0MTk2IDEuODQ5NDIgMy4zNjAzOCAxLjY5MDMxIDMuNDEzNjQgMS41NDM5N0MzLjU0ODQ0IDEuMTczNjEgMy44NDAxOSAwLjg4MTg2OCA0LjIxMDU0IDAuNzQ3MDdDNC40MzcwOSAwLjY2NDYxMyA0LjY5NDIxIDAuNjY1NjUzIDQuOTAyOTIgMC42NjY0OTZaTTMuMzMzMjMgMy4zMzMzM0gyLjMzMzIzQzIuMTY4OCAzLjMzMzMzIDIuMDc4ODYgMy4zMzM2OSAyLjAxMzg1IDMuMzM4MTJDMi4wMTA4MiAzLjMzODMzIDIuMDA3OTggMy4zMzg1NCAyLjAwNTMyIDMuMzM4NzVDMi4wMDUxMSAzLjM0MTQxIDIuMDA0OSAzLjM0NDI1IDIuMDA0NyAzLjM0NzI3QzIuMDAwMjYgMy40MTIyOSAxLjk5OTkgMy41MDIyMiAxLjk5OTkgMy42NjY2NlYzLjk5OTk5QzEuOTk5OSA0LjY2MjkgMi4wMDU2MyA0Ljg2MzU3IDIuMDQ1MzMgNS4wMTE3NUMyLjE2ODYyIDUuNDcxODcgMi41MjgwMiA1LjgzMTI3IDIuOTg4MTQgNS45NTQ1NkMzLjA2NzM0IDUuOTc1NzggMy4xNjE1MiA1Ljk4NzMgMy4zMzMyMyA1Ljk5MzQyVjMuMzMzMzNaTTQuNjY2NTcgMi4yOTYyOUM0LjY2NjU3IDIuMTUwMjUgNC42NjY4NSAyLjA3MDM5IDQuNjcwMzcgMi4wMTI0OUM0LjY3MDU1IDIuMDA5NTggNC42NzA3MiAyLjAwNjg3IDQuNjcwOSAyLjAwNDMzQzQuNjczNDQgMi4wMDQxNSA0LjY3NjE2IDIuMDAzOTcgNC42NzkwNyAyLjAwMzc5QzQuNzM2OTcgMi4wMDAyOCA0LjgxNjgzIDEuOTk5OTkgNC45NjI4NiAxLjk5OTk5SDExLjAzNjlDMTEuMTgzIDEuOTk5OTkgMTEuMjYyOCAyLjAwMDI4IDExLjMyMDcgMi4wMDM3OUMxMS4zMjM2IDIuMDAzOTcgMTEuMzI2NCAyLjAwNDE1IDExLjMyODkgMi4wMDQzM0MxMS4zMjkxIDIuMDA2ODYgMTEuMzI5MyAyLjAwOTU5IDExLjMyOTQgMi4wMTI0OUMxMS4zMzI5IDIuMDcwMzkgMTEuMzMzMiAyLjE1MDI1IDExLjMzMzIgMi4yOTYyOVY1Ljk5OTk5QzExLjMzMzIgNy44NDA5NCA5Ljg0MDg1IDkuMzMzMzMgNy45OTk5IDkuMzMzMzNDNi4xNTg5NSA5LjMzMzMzIDQuNjY2NTcgNy44NDA5NCA0LjY2NjU3IDUuOTk5OTlWMi4yOTYyOVpNMTIuNjY2NiAzLjMzMzMzVjUuOTkzNDJDMTIuODM4MyA1Ljk4NzMgMTIuOTMyNSA1Ljk3NTc4IDEzLjAxMTcgNS45NTQ1NkMxMy40NzE4IDUuODMxMjcgMTMuODMxMiA1LjQ3MTg3IDEzLjk1NDUgNS4wMTE3NUMxMy45OTQyIDQuODYzNTcgMTMuOTk5OSA0LjY2MjkgMTMuOTk5OSAzLjk5OTk5VjMuNjY2NjZDMTMuOTk5OSAzLjUwMjIyIDEzLjk5OTUgMy40MTIyOSAxMy45OTUxIDMuMzQ3MjdDMTMuOTk0OSAzLjM0NDI1IDEzLjk5NDcgMy4zNDE0MSAxMy45OTQ1IDMuMzM4NzVDMTMuOTkxOCAzLjMzODU0IDEzLjk4OSAzLjMzODMzIDEzLjk4NiAzLjMzODEyQzEzLjkyMDkgMy4zMzM2OSAxMy44MzEgMy4zMzMzMyAxMy42NjY2IDMuMzMzMzNIMTIuNjY2NlpNNy4wMzY5NCAxMi42NjY3QzYuMjIzMiAxMi42NjY3IDUuNTQyNzEgMTMuMjM3MiA1LjM3MzYxIDE0SDEwLjYyNjJDMTAuNDU3MSAxMy4yMzcyIDkuNzc2NiAxMi42NjY3IDguOTYyODYgMTIuNjY2N0g3LjAzNjk0WiIgZmlsbD0iIzhGOEI5QyIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzIxMTVfMzA2Ij4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+CjxzY3JpcHQgeG1sbnM9IiIvPgo8L3N2Zz4K",alt:"reward",class:"Reward"}),ni=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0NSIgaGVpZ2h0PSI0NCIgdmlld0JveD0iMCAwIDQ1IDQ0IiBmaWxsPSJub25lIj48c2NyaXB0IHhtbG5zPSIiLz4KICA8cmVjdCB4PSIwLjUiIHdpZHRoPSI0NCIgaGVpZ2h0PSI0NCIgcng9IjIyIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMTYwNF81NTg5KSIvPgogIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTkuODc0NCAxOS43MjI3QzE5Ljg3NDQgMTguMjc1IDIxLjA1MjIgMTcuMDk3MiAyMi40OTk5IDE3LjA5NzJDMjMuOTQ3NyAxNy4wOTcyIDI1LjEyNTUgMTguMjc1IDI1LjEyNTUgMTkuNzIyN0MyNS4xMjU1IDIxLjE3MDUgMjMuOTQ3NyAyMi4zNDgzIDIyLjQ5OTkgMjIuMzQ4M0MyMS4wNTIyIDIyLjM0ODMgMTkuODc0NCAyMS4xNzA1IDE5Ljg3NDQgMTkuNzIyN1pNMjIuNDk5OSAyMS40NzgxQzIyLjg0NyAyMS40NzgxIDIzLjEyODcgMjEuMTk2NSAyMy4xMjg3IDIwLjg0OTRWMTguNTk2MUMyMy4xMjg3IDE4LjI0OSAyMi44NDcgMTcuOTY3MyAyMi40OTk5IDE3Ljk2NzNDMjIuMTUyOSAxNy45NjczIDIxLjg3MTIgMTguMjQ5IDIxLjg3MTIgMTguNTk2MVYyMC44NDk0QzIxLjg3MTIgMjEuMTk2NSAyMi4xNTI5IDIxLjQ3ODEgMjIuNDk5OSAyMS40NzgxWiIgZmlsbD0iIzFFMTYzOCIvPgogIDxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMzEuODcxNCAxNS40NzIxQzMyLjA1MzMgMTUuNDcyMSAzMi4yMjY0IDE1LjU1MDkgMzIuMzQ1OSAxNS42ODc5QzMyLjQ2NDkgMTUuODI1NCAzMi41MTk0IDE2LjAwNzcgMzIuNDkzOCAxNi4xODhMMzEuOTAzMiAyMC40MTA1QzMxLjcxODggMjEuNzI3IDMwLjU3NzUgMjIuNzIgMjkuMjQ3OSAyMi43MkgyNy4zMDI2QzI2LjYwMTggMjMuODIyNCAyNS41MjYzIDI0LjY3MiAyNC4yNDA3IDI1LjA3OThWMjYuMzM5QzI0LjI0MDcgMjYuNjU1OCAyNC40OTk0IDI2LjkwNTIgMjQuODE2MiAyNi45MDY5QzI1Ljc1NDcgMjYuOTExMSAyNi41MTEzIDI3LjY2OTggMjYuNTExMyAyOC42MDk1VjI5LjQ3NDJIMTguNDg4N1YyOC42MDk1QzE4LjQ4ODcgMjcuNjY5OCAxOS4yNDUzIDI2LjkxMTEgMjAuMTgzOCAyNi45MDY5QzIwLjUwMDcgMjYuOTA1MiAyMC43NTkzIDI2LjY1NTggMjAuNzU5MyAyNi4zMzlWMjUuMDc5OEMxOS40NzM3IDI0LjY3MiAxOC4zOTgyIDIzLjgyMjQgMTcuNjk3NCAyMi43MkgxNS43NTIxQzE0LjQyMjUgMjIuNzIgMTMuMjgxMiAyMS43MjcgMTMuMDk2OCAyMC40MTA1TDEyLjUwNjIgMTYuMTg4QzEyLjQ4MDYgMTYuMDA3NyAxMi41MzUxIDE1LjgyNTQgMTIuNjU0MSAxNS42ODc5QzEyLjc3MzYgMTUuNTUwOSAxMi45NDY3IDE1LjQ3MjEgMTMuMTI4NiAxNS40NzIxSDE2LjMxMzhMMTYuMTk0NyAxNC40MDI0QzE2LjE3MTIgMTQuMTg3OCAxNi4zMzg5IDE0IDE2LjU1NTIgMTRIMjguNDQ0OEMyOC42NjExIDE0IDI4LjgyODggMTQuMTg3OCAyOC44MDUzIDE0LjQwMjRMMjguNjg2MiAxNS40NzIxSDMxLjg3MTRaTTE0LjM0MjUgMjAuMjM2MUMxNC40NDAyIDIwLjkzNTMgMTUuMDQ2MiAyMS40NjI2IDE1Ljc1MjEgMjEuNDYyNkgxNy4xMDEzQzE2Ljk4MTUgMjEuMTAwNCAxNi44OTgxIDIwLjcyMjggMTYuODU0IDIwLjMzNDZMMTYuNDUzMyAxNi43Mjk1SDEzLjg1MTdMMTQuMzQyNSAyMC4yMzYxWk0xOC42MTcgMTkuNzIyN0MxOC42MTcgMjEuODYzNyAyMC4zNTkgMjMuNjA1NyAyMi41IDIzLjYwNTdDMjQuNjQxIDIzLjYwNTcgMjYuMzgzIDIxLjg2MzcgMjYuMzgzIDE5LjcyMjdDMjYuMzgzIDE3LjU4MTYgMjQuNjQxIDE1LjgzOTcgMjIuNSAxNS44Mzk3QzIwLjM1OSAxNS44Mzk3IDE4LjYxNyAxNy41ODE2IDE4LjYxNyAxOS43MjI3Wk0yOS4yNDc5IDIxLjQ2MjZDMjkuOTUzOCAyMS40NjI2IDMwLjU1OTkgMjAuOTM1MyAzMC42NTc1IDIwLjIzNjFMMzEuMTQ4MyAxNi43Mjk1SDI4LjU0NjdMMjguMTQ2IDIwLjMzNDZDMjguMTAyIDIwLjcyMjggMjguMDE4NSAyMS4xMDA0IDI3Ljg5ODcgMjEuNDYyNkgyOS4yNDc5WiIgZmlsbD0iIzFFMTYzOCIvPgogIDxkZWZzPgogICAgPGxpbmVhckdyYWRpZW50IGlkPSJwYWludDBfbGluZWFyXzE2MDRfNTU4OSIgeDE9IjMuMzQ3MDYiIHkxPSIyLjA2MjUiIHgyPSI2NS4zNDQ3IiB5Mj0iMTEuMDQ4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CiAgICA8c3RvcCBvZmZzZXQ9IjAuMTI5MTg0IiBzdG9wLWNvbG9yPSIjRkY5NDAwIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjAuOTkzMDA3IiBzdG9wLWNvbG9yPSIjRkVGNzQ2Ii8+CiAgICA8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRkUyNEEiLz4KICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgPC9kZWZzPgo8c2NyaXB0IHhtbG5zPSIiLz48L3N2Zz4K",alt:"iconTrophy",class:"Trophy"}),si=t("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDQiIGhlaWdodD0iNDQiIHZpZXdCb3g9IjAgMCA0NCA0NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IkZyYW1lIDM3Njc4Ij4KPHJlY3Qgd2lkdGg9IjQ0IiBoZWlnaHQ9IjQ0IiByeD0iMjIiIGZpbGw9InVybCgjcGFpbnQwX2xpbmVhcl8xNzAxXzEyNjA0KSIvPgo8ZyBpZD0iaWNvbiI+CjxwYXRoIGlkPSJJY29uIiBkPSJNMjEuOTk5OCAxOS4wMDAyVjIzLjAwMDJNMjEuOTk5OCAyNy4wMDAySDIyLjAwOThNMjAuNjE1MSAxMy44OTJMMTIuMzkwMiAyOC4wOTg2QzExLjkzNCAyOC44ODY2IDExLjcwNTkgMjkuMjgwNiAxMS43Mzk2IDI5LjYwMzlDMTEuNzY5IDI5Ljg4NiAxMS45MTY4IDMwLjE0MjMgMTIuMTQ2MSAzMC4zMDlDMTIuNDA5MSAzMC41MDAyIDEyLjg2NDMgMzAuNTAwMiAxMy43NzQ5IDMwLjUwMDJIMzAuMjI0NkMzMS4xMzUyIDMwLjUwMDIgMzEuNTkwNCAzMC41MDAyIDMxLjg1MzQgMzAuMzA5QzMyLjA4MjcgMzAuMTQyMyAzMi4yMzA1IDI5Ljg4NiAzMi4yNTk5IDI5LjYwMzlDMzIuMjkzNiAyOS4yODA2IDMyLjA2NTUgMjguODg2NiAzMS42MDkzIDI4LjA5ODZMMjMuMzg0NCAxMy44OTJDMjIuOTI5OSAxMy4xMDY4IDIyLjcwMjYgMTIuNzE0MiAyMi40MDYxIDEyLjU4MjRDMjIuMTQ3NCAxMi40NjczIDIxLjg1MjEgMTIuNDY3MyAyMS41OTM1IDEyLjU4MjRDMjEuMjk2OSAxMi43MTQyIDIxLjA2OTYgMTMuMTA2OCAyMC42MTUxIDEzLjg5MloiIHN0cm9rZT0iIzI1MUQzRSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9nPgo8L2c+CjxkZWZzPgo8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMTcwMV8xMjYwNCIgeDE9IjIuODQ3MDYiIHkxPSIyLjA2MjUiIHgyPSI2NC44NDQ3IiB5Mj0iMTEuMDQ4IiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+CjxzdG9wIG9mZnNldD0iMC4xMjkxODQiIHN0b3AtY29sb3I9IiNGRjk0MDAiLz4KPHN0b3Agb2Zmc2V0PSIwLjk5MzAwNyIgc3RvcC1jb2xvcj0iI0ZFRjc0NiIvPgo8c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiNGRkUyNEEiLz4KPC9saW5lYXJHcmFkaWVudD4KPC9kZWZzPgo8L3N2Zz4K",alt:"Reward Assign Failed",class:"Warn"});var oi;!function(e){e.normal="normal",e.okContinue="okContinue",e.unjoinYes="unjoinYes",e.unjoinNo="unjoinNo"}(oi||(oi={}));const ri=(e,t,i=!1)=>{const{locale:a}=e,n={normal:{innerHTML:a.WinDialog.ButtonContinue},okContinue:{innerHTML:a.WinDialog.FailedButtonContinue},unjoinYes:{onClick:()=>e.actionJoin(e.dialog.data),innerHTML:a.UnjoinDialog.ButtonYes},unjoinNo:{statedClasses:{isHollow:!0},innerHTML:a.UnjoinDialog.ButtonNo}}[t];return r({statedClasses:Object.assign({isPending:i},n.statedClasses),onClick:()=>{var t;null===(t=n.onClick)||void 0===t||t.call(),e.closeDialog()},innerHTML:n.innerHTML})},li={gift(e){const{name:i,failedRewards:a}=e.gifts[0],{locale:n}=e;return t("div",{class:"PageConfirmContainer"},i?t("div",{class:"PageConfirm Gift"},t("div",null,ni),t("div",{class:"Title"},n.WinDialog.Title),t("div",{class:"Description",innerHTML:o(n.WinDialog.Description,{rewards:i})}),t("div",{class:"PageConfirmButtonsGroup"},ri(e,oi.normal))):t("div",{class:"PageConfirm Gift"},t("div",null,si),t("div",{class:"Title",innerHTML:o(n.WinDialog.FailedTitle,{failedRewards:a})}),t("div",{class:"Description"},n.WinDialog.FailedDescription),t("div",{class:"PageConfirmButtonsGroup"},ri(e,oi.okContinue))))},unjoin(e){const{locale:i}=e;return t("div",{class:"DialogContentUnjoin"},t("div",{class:"DialogContentUnjoinTitle"},i.UnjoinDialog.Title),t("div",{class:"DialogContentUnjoinDescription",innerHTML:i.UnjoinDialog.Description}),ri(e,oi.unjoinYes),ri(e,oi.unjoinNo))}},pi=e=>{const t=["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime"],i={};return Object.keys(e).map((a=>{const n=e[a];i[a]="games"===a?n.items:t.includes(a)?new Date(n):n})),i},di=(e,t)=>(["startTime","endTime","closeTime","exhibitionStartTime","exhibitionEndTime","state","prizes","minBetCount","scoreCriteria","termsUrl"].forEach((i=>{e[i]=t[i]})),Object.assign({},e)),ci=e=>{let{item:t,items:i}=e;return i.forEach((e=>e.userId=e.userId||e.userID)),t?(t.userId=t.userId||t.userID,-1!==i.findIndex((e=>e.userId===t.userId))||(i=[t,...i]),i.map((e=>(null==t?void 0:t.userId)&&t.userId===e.userId?Object.assign(Object.assign({},e),{isMe:!0}):e))):i},hi=e=>window.postMessage({type:"UpdateLeaderboardState",labels:e}),gi=e=>window.postMessage({type:"UpdateTournamentsItemReq",id:e.id}),ui=(e,t)=>window.postMessage({type:"UpdateLeaderboardsReq",id:e.id,query:t}),mi=(e,t,i)=>{const{success:a,data:n}=t;let s=e.tournamentList.findIndex((e=>e.id===(n.tournamentId||n.id||n.bonusCode))),o=e.tournamentList[s];if(-1!=s){if(o.isActionJoinPending=!1,e.page===d.item&&e.tournamentItem.id===o.id&&(e.tournamentItem=Object.assign(Object.assign({},e.tournamentItem),{isActionJoinPending:!1})),e.pendingChangeEvent.emit(o),!a)return e.tournamentList[s]=o,e.tournamentList=[...e.tournamentList],void e.openDialog(p.error);if(i?(o.isPlayerAcknowledged=!0,o.order=e.minOrder--):(o.isUnjoined=!0,((e,t)=>{const i=setTimeout((()=>{e.tournamentList=e.tournamentList.filter((e=>e.id!==t)),clearTimeout(i)}),100)})(e,n.tournamentId)),e.tournamentList[s]=Object.assign({},o),e.tournamentList=[...e.tournamentList],e.page===d.item){if(!i)return void e.setPage(d.list);e.tournamentItem=Object.assign({},o)}e.nextPage&&(e.setPage(e.nextPage),e.nextPage=void 0)}},bi=(e,t)=>{t.success?(e.leaderboards=ci(t.data),e.currentPlayerRank=t.data.item?t.data.item.rank:-1):console.error(t)},fi=(e,t)=>{const i=pi(t);e.page===d.item&&e.tournamentItem.id===t.id&&(e.tournamentItem=di(e.tournamentItem,i)),e.tournamentList=e.tournamentList.map((e=>e.id===t.id?di(e,i):e))},yi=(e,t)=>{e.tournamentList=e.tournamentList.filter((e=>e.id!==t.id))},wi=(e,t)=>{const i=e.tournamentList.findIndex((e=>e.id===t.id));-1===i?e.tournamentList=[pi(t),...e.tournamentList]:(e.tournamentList[i]=pi(t),e.tournamentList=[...e.tournamentList])},xi={list(e){var i;if(!(null==e?void 0:e.tournamentList))return e.tournamentList=null===(i=e.leaderboardsInit)||void 0===i?void 0:i.map((e=>pi(e))),t("general-animation-loading",null);const{locale:a,language:n}=e;return vi(e.tournamentList.length?t("div",{class:"Leaderboards ScrollBar Row"},e.tournamentList.map(((i,a)=>t("tournament-item",{tid:i.id,key:i.id,tournament:i,style:{order:`${i.order||a}`},isNew:e.newIdList.includes(i.id),language:n})))):t("div",{class:"NoLeaderboards ScrollBar Row"},t("h3",{class:"Title"},a.NoLeaderboards),t("div",{class:"message"},a.NoLeaderboardsTip)))},item(e){if(!e.tournamentItem)return t("general-animation-loading",null);const{locale:i,tab:a,language:n}=e;return vi([t("tournament-item-title",{tournament:e.tournamentItem,language:n}),t("div",{class:"TabsContainer"},t("div",{class:"Tabs"},Object.keys(h).map((n=>t("div",{class:y({active:a===n}),onClick:()=>(t=>{switch(e.tab=t,t){case h.leaderboard:e.leaderboards=void 0,ui(e.tournamentItem);break;case h.games:gi(e.tournamentItem)}})(n)},i[n]))))),t("div",{class:`TableContentWrapper Tab_${e.tab}`},e.renders.tab[e.tab]())])}},vi=e=>t("div",{class:"Root"},t("div",{class:"Main"},e)),ki={info(e){var i,a;const{locale:n,tournamentItem:s,isShowInfo:r}=e,l=Mi(null===(i=e.leaderboards)||void 0===i?void 0:i.find((e=>e.isMe))),p=!(null==l?void 0:l.place)||(null==l?void 0:l.unqualified)?"":o((null==l?void 0:l.prize)?n.TipPrize:n.TipPrizeWithoutReward,l),d=n.ScoreAlgorithms[s.scoreCriteria];return t("div",{class:"InfoContainer"},t("tournament-timer",{"is-detail":!0,tournament:s}),t("section",{class:"ShowInfo",onClick:()=>e.isShowInfo=!e.isShowInfo},t("div",{class:"DetailHeader"},t("span",null,r?ei:ti),t("span",null,n.LeaderboardDetails))),t("div",{class:"ContentScrollContainer "+(r?"expanded":"")},r&&t("section",{class:"Info"},t("div",{class:"Description"},s.description),t("div",{class:"Criterias"},t("div",null,n.ScoreCriteria,": ",t("span",null,d)),t("div",null,n.MinimumBetCriteria,": ",t("span",null,s.minBetCount))),!!s.termsUrl&&t("div",{class:"TC"},t("a",{href:s.termsUrl,target:"_blank"},n.TC))),g(e.tournamentItem)&&(null===(a=e.leaderboards)||void 0===a?void 0:a.find((e=>e.isMe)))&&t("section",{class:"ResultPrize",innerHTML:p}),t("section",{class:"PrizesContainer"},t("div",{class:"PrizesHeader"},ai,t("span",{class:"PrizesText"},n.Prizes)),t("div",{class:"Prizes"},s.prizes.map((e=>t("div",{class:"Prize"},t("span",{class:"Rank"},e.rank," ",1===e.count?"":" - "+(e.rank+e.count-1)),1===e.count?n.Place:n.Places,": ",t("span",{class:"PrizeText"},e.name))))))))},leaderboard(e){const{locale:i,tournamentItem:a}=e;if("Unstarted"===(null==a?void 0:a.state)){const e=u(null==a?void 0:a.startTime,new Date);return t("div",{class:"LeaderboardUnstarted",innerHTML:o(i.TournamentNotStarted,{startTime:e})})}return e.leaderboards?e.leaderboards.length?t("table",{class:"Leaderboards"},t("thead",null,t("tr",null,t("th",null,i.Rank),t("th",null,i.Player),t("th",null,i.Score),t("th",null,i.Prize))),e.leaderboards.map((i=>t("tr",{class:y({isMe:i.isMe}),ref:t=>i.isMe&&(e.isMeElement=t)},t("td",{class:"LeaderboardRank"},t("span",null,i.rank)),t("td",{class:"LeaderboardName"},t("span",null,i.shortName)),t("td",{class:"LeaderboardScore"},t("span",null,w(i.score,2,!0))),t("td",{class:"LeaderboardPrize"},t("span",null,i.prizeName)))))):t("div",{class:"LeaderboardUnstarted"},i.BeOne):t("general-animation-loading",null)},games(e){var i;return e.tournamentItem.games?t("div",{class:"Games"},e.tournamentItem.games.length?null===(i=e.tournamentItem.games)||void 0===i?void 0:i.map((i=>t("div",{class:"Game "+(e.currentGameId==i.id?"Current":""),onClick:()=>{e.onGameClick(i)}},t("ui-image",{src:i.defaultThumbnail,alt:"Game"})))):e.locale.NoGameConfiged):t("general-animation-loading",null)}},Mi=e=>({prize:null==e?void 0:e.prizeName,place:null==e?void 0:e.rank,unqualified:null==e?void 0:e.unqualified}),Ci={dialog:li,page:xi,tab:ki},Li=e=>{const{left:i,middle:a,right:n}=e,s={left:i,middle:a,right:n};return t("div",{class:"WrapperBar"},Object.keys(s).map((e=>{return t("div",{class:"WrapperBar"+(i=e,i.split("").map(((e,t)=>0===t?e.toUpperCase():e)).join(""))},s[e]||"");var i})))},Di=class{handleEvent(e){var t,i;const a=e.data,{type:n}=a,o=s(a,["type"]);var r;null===(i=null===(r=this,t={UpdateLeaderboardsPlayerRes:e=>{const{rank:t,detail:i}=l(e.data.items);window.postMessage({type:"UpdateLeaderboardState",rank:t,detail:i})},UpdateLeaderboardStateReq:()=>{window.postMessage({type:"UpdateLeaderboardState",labels:["win","new"]})},UpdateTournamentsItemRes:e=>{if(!e.success)return void r.openDialog(p.loadingError);const t=pi(e.data.item);r.tournamentItem=t,fi(r,t)},UpdateLeaderboardsRes:e=>bi(r,e),JoinTournamentRes:e=>mi(r,e,!0),UnjoinTournamentRes:e=>mi(r,e,!1),TournamentsPageIsReadyRes:e=>r.currentGameId=""+e.data.GameId,LeaderboardLiveEvent:e=>((e,t)=>{const{messageType:i,item:a}=t;switch(i){case"TournamentUpdate":case"PlayerLeaderBoardUpdate":wi(e,a);break;case"TournamentRemove":yi(e,a);break;case"LeaderBoardUpdate":e.leaderboards=ci(t)}})(r,e),LiveLeaderboardUpdate:e=>((e,t)=>{var i;try{const a=JSON.parse(t.data.Message),{playerLeaderBoard:n,tournamentId:s,leaderBoardList:o}=a;n&&window.postMessage({type:"UpdateLeaderboardState",rank:`${n.rank} / ${o.totalRecords}`,detail:{playerRank:n.rank,total:o.totalRecords}}),(null===(i=e.tournamentItem)||void 0===i?void 0:i.id)==s&&bi(e,{data:{item:Object.assign({},n),items:[...o.players]},success:!0})}catch(e){console.error("Exception when parse live update info, ",e)}})(r,Object.assign(Object.assign({},e),{messageType:"LeaderboardUpdate"})),LiveTournamentUpdate:e=>((e,t)=>{try{const i=JSON.parse(t.data.Message);fi(e,i)}catch(e){console.error("Exception when parse Player Tournament Info",e)}})(r,Object.assign(Object.assign({},e),{messageType:"TournamentUpdate"})),LiveLeaderboardFinalizeUpdate:e=>((e,t)=>{try{const i=JSON.parse(t.data.Message),a=i.rewards.filter((e=>e.status&&"success"!==e.status)).map((e=>c(e))),n=i.rewards.filter((e=>e.status&&"success"===e.status)).map((e=>c(e)));a.length&&(e.gifts=[{name:null,failedRewards:a.join(",")},...e.gifts]),n.length&&i.prizeName&&(e.gifts=[{name:i.prizeName[e.language]||i.prizeName["*"]||""},...e.gifts]),e.checkGift()}catch(e){console.error("Exception when parse Player LeaderboardFinalize info",e)}})(r,Object.assign(Object.assign({},e),{messageType:"PlayerFinalizeUpdate"}))})||void 0===t?void 0:t[n])||void 0===i||i.call(null,o)}handleClickToTournamentDetail(e){const t=e.detail;this.setPage(d.item,{tournament:t}),this.newIdList=this.newIdList.filter((e=>e!==t.id))}handleJoinTournamentEvent(e){const t=e.detail;this.actionJoin(t),this.tournamentItem=t}handleUnjoinTournamentEvent(e){const{tournament:t}=e.detail;this.openDialog(p.unjoin,t)}watchPropHandler(e,t){e!==t&&m[e]&&(this.locale=m[e])}checkNewIdList(){this.newIdList.length>0?this.addLabel("new"):this.removeLabel("new")}syncBarState(e,t){if(t){const i=x(e,t,((e,t)=>e.id===t.id));this.newIdList=[...this.newIdList,...i.map((e=>e.id))]}else this.checkNewIdList(),this.gifts.length&&this.addLabel("win")}showPropWatcher(e,t){0==t&&1==e&&(this.checkGift(),this.page=d.list)}addLabel(e){this.labels.includes(e)||this.labels.push(e),hi(this.labels)}removeLabel(e){this.labels=this.labels.filter((t=>t!=e)),hi(this.labels)}checkGift(){this.gifts.length?(this.labels.includes("win")||this.labels.push("win"),hi(this.labels),this.show&&this.openDialog(p.gift,this.gifts[0],(()=>{if(this.dialog.type===p.gift){this.gifts=this.gifts.slice(1);const e=setTimeout((()=>{this.checkGift(),clearTimeout(e)}),300)}}))):this.removeLabel("win")}getContainerScrollTop(){var e;return this.page===d.list?this.containerScrollTop:(null===(e=this.detailElement)||void 0===e?void 0:e.clientHeight)/2-250}handleClickOutside(e){const t=e.composedPath();t.includes(this.tooltipIconReference)||t.includes(this.tooltipReference)||(this.showTooltip=!1)}componentDidLoad(){window.postMessage({type:"TournamentsPageIsReady"})}renderTooltip(){return this.showTooltip?t("div",{class:"question__tooltip "+(this.showTooltip?"visible":""),ref:e=>this.tooltipReference=e,innerHTML:this.locale.Tip}):null}connectedCallback(){window.postMessage({type:"UpdateLeaderboardsPlayerReq"})}scrollToMyRankLine(){this.isMeElement&&(this.isMeElement.scrollIntoView({behavior:"smooth"}),this.scrolledToMyLine=!0)}componentDidRender(){this.scrolledToMyLine=!1,this.page===d.item?this.tab===h.leaderboard?this.currentPlayerRank>this.defaultPageSize&&!this.scrolledToMyLine&&this.scrollToMyRankLine():this.scrolledToMyLine=!1:this.page===d.list&&(this.scrolledToMyLine=!1)}onGameClick(e){e.id!=this.currentGameId&&(e=>{window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e.slug}})})(e)}actionJoin(e){if(!e.isActionJoinPending){e.isActionJoinPending=!0,this.page===d.item&&(this.tournamentItem.isActionJoinPending=!0,this.tournamentItem=Object.assign({},this.tournamentItem)),this.pendingChangeEvent.emit(e);try{e.isPlayerAcknowledged?(e=>{window.postMessage({type:"UnjoinTournamentReq",id:e.id})})(e):(e=>{var t,i;window.postMessage({type:"JoinTournamentReq",id:e.id,bonusCode:e.id||(null===(i=null===(t=e.wallets)||void 0===t?void 0:t[0])||void 0===i?void 0:i.code)})})(e)}catch(e){console.log("error",e)}}}setPage(e,t){this.page=e,e===d.item&&(this.isShowInfo=!1,this.tournamentItem=t.tournament,this.tournamentItem||gi(t.tournament),b(this.tournamentItem)&&ui(this.tournamentItem),this.tab=h.info),this.tournamentTimer.emit({page:e})}render(){return t(n,null,t("general-styling-wrapper",{clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,targetTranslations:m,translationUrl:this.translationUrl}),t("div",{class:`Wrapper ${this.device} ${this.orientation}`},t("div",{class:y("WrapperContent",{faded:this.dialog.isOpen,page:this.page})},this.page&&Li({left:this.page===d.list?t("span",{class:"EngagementSuiteIcon",onClick:this.openDialog.bind(this,p.tip)},Kt):t("span",{class:"EngagementSuiteIcon",onClick:this.setPage.bind(this,d.list)},ii),middle:this.locale.Leaderboards,right:t("span",{class:"EngagementSuiteIcon",onClick:()=>this.close.emit()},Xt)}),t("div",{class:`Leaderboards ${this.page} ${"list"===this.page?"Active":"Hidden"}`,ref:e=>this.pageElement=e},this.renders.page.list()),this.page===d.item&&t("div",{class:`Leaderboards ${this.page} ${"item"===this.page?"Active":"Hidden"} `,ref:e=>this.detailElement=e},this.renders.page.item())),t("div",{class:"WrapperUtil"},t("dialog",{class:`${this.dialog.type}`,open:this.dialog.isOpen},t("div",{class:"Hollow "+("gift"===this.dialog.type?"GradientRounded":"")},Li({right:t("span",{class:"EngagementSuiteIcon",onClick:()=>this.closeDialog()},Xt)}),this.dialog.isOpen&&(()=>{switch(this.dialog.type){case p.unjoin:return this.renders.dialog.unjoin();case p.tip:return t("div",{class:"Tip"},this.locale.Tip);case p.error:return t("div",{class:"Tip Error"},this.locale.FailedToJoin);case p.loadingError:return t("div",{class:"Tip",innerHTML:this.locale.LoadingError});case p.gift:return this.renders.dialog.gift()}})())))))}openDialog(e,t,i){if(this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!0,onClose:i,type:e,data:t}),e===p.error||e===p.tip){const e=setTimeout((()=>{this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1}),clearInterval(e)}),this.tipsHideDelay)}}closeDialog(){var e;null===(e=this.dialog.onClose)||void 0===e||e.call(this),this.dialog=Object.assign(Object.assign({},this.dialog),{isOpen:!1,onClose:void 0})}constructor(t){e(this,t),this.close=i(this,"close",7),this.tournamentTimer=i(this,"tournamentTimer",7),this.pendingChangeEvent=i(this,"pendingChangeEvent",7),this.minOrder=-1,this.gifts=[],this.labels=[],this.showTooltip=!1,this.defaultPageSize=f,this.scrolledToMyLine=!1,this.language="en",this.show=!1,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.device="Mobile",this.orientation="Landscape",this.leaderboardsInit=void 0,this.tipsHideDelay=3e3,this.tab=h.info,this.locale=m[this.language],this.tournamentItem=void 0,this.tournamentList=void 0,this.leaderboards=[],this.isDialogOpen=!1,this.isShowInfo=!1,this.page=d.list,this.tournamentInDialog=void 0,this.dialog={isOpen:!1,type:void 0,data:void 0,onClose:void 0},this.newIdList=[],this.renders={},Object.keys(Ci).forEach((e=>{this.renders[e]={},Object.keys(Ci[e]).forEach((t=>{this.renders[e][t]=Ci[e][t].bind(this,this)}))}))}static get watchers(){return{newIdList:["watchPropHandler"],language:["watchPropHandler"],tournamentList:["syncBarState"],show:["showPropWatcher"]}}};Di.style='.Leaderboards{height:100%;overflow-y:auto;transition:0.5s ease;transition-property:all, transform}.Leaderboards.list,.Leaderboards.item{margin-top:5px;opacity:0}.Leaderboards.list.Active,.Leaderboards.item.Active{opacity:1}.Leaderboards.list.Hidden,.Leaderboards.item.Hidden{display:none}.Leaderboards .question__tooltip{position:absolute;top:0;left:20px;width:320px;text-align:left;background-color:var(--emw--color-typography, rgba(255, 255, 255, 0.6));border:1px solid var(--emw--color-typography, rgba(255, 255, 255, 0.8));color:var(var(--emw--color-primary, rgb(255, 214, 47)), rgb(255, 214, 47));padding:10px;border-radius:5px;opacity:0;fill-opacity:0.5;transition:opacity 0.3s ease-in-out;z-index:10}.Leaderboards .question__tooltip.visible{opacity:0.8}table.Leaderboards{height:auto}table.Leaderboards td span{display:inline-block;overflow-y:auto;width:98%}table.Leaderboards td.LeaderboardRank{width:10%;min-width:70px}table.Leaderboards td.LeaderboardScore{width:25%}table.Leaderboards td.LeaderboardScore span{min-width:128px}table.Leaderboards td.LeaderboardName{width:20%;max-width:180px}table.Leaderboards td.LeaderboardPrize{width:auto;text-align:left;display:grid}.Wrapper{position:relative;min-height:100%;line-height:20px;color:var(--emw--color-typography, #FFFFFF);display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));flex-direction:column;border-radius:var(--emw--border-radius-large, 8px);word-break:break-all}.Wrapper .Title{background-color:transparent}.Wrapper .TableContentWrapper{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Wrapper .Games .Game .Skeleton{animation:none}.Wrapper .Games .Game .Skeleton.Image{background-color:transparent}.Wrapper .WrapperContent .TableContentWrapper{height:calc(100vh - 216px);overflow-y:auto}.Wrapper .WrapperContent .Main{height:calc(100vh - 109px)}.Wrapper .WrapperContent .Main .Leaderboards.ScrollBar.Row{will-change:scroll-position;display:flex;flex-direction:column}.Wrapper .WrapperContent .Main .Leaderboards.ScrollBar.Row tournament-item{transition:2s ease-in-out;transform:translate(0) scale(1, 1);opacity:0.99}.Wrapper.Mobile .PageConfirmContainer,.Wrapper.Mobile .DialogContentUnjoin{min-width:80%;width:78vw}.Wrapper.Mobile dialog>div{margin:0px}.Wrapper.Mobile dialog.tip{padding:120px 10px}.Wrapper.Mobile dialog.unjoin .Hollow{margin:5px}.Wrapper.Mobile .GradientRoundedButton{font-size:var(--emw--font-size-medium, 14px)}.Wrapper.Mobile .PageConfirmButtonsGroup{margin:10px auto}.Wrapper.Mobile .PageConfirm.Gift{padding:5px 16px 30px}.Wrapper.Mobile .PageConfirm.Gift .Title{font-size:var(--emw--font-size-large, 22px);line-height:25px}.Wrapper.Mobile .PageConfirm.Gift .Description{font-size:var(--emw--font-size-medium, 16px)}.Wrapper.Mobile .PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton{font-size:var(--emw--font-size-medium, 16px);padding:8px}.Wrapper.Mobile .PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton.GradientRounded{border-radius:var(--emw--border-radius-large, 15px)}.Wrapper.Mobile .GradientRounded{position:relative;border-radius:12px}.WrapperContent{padding-bottom:7px;transition:0.5s filter;display:flex;flex-direction:column;justify-content:space-between}.WrapperContent.faded{filter:brightness(53.3333333333%);pointer-events:none}.WrapperContent .Title{background:transparent;width:initial;height:initial;border:initial;margin-bottom:initial}.WrapperContent .NoLeaderboards h3.Title{text-align:center}.WrapperContent .NoLeaderboards div.message{color:var(--emw--color-secondary, rgb(187, 185, 195));text-align:left}.Wrapper.Mobile .WrapperBar{padding:16px 8px 8px;margin-bottom:8px}.Wrapper.Mobile .Tip{padding:0px 30px 32px}.Wrapper.Mobile .TitleContainer .GradientRoundedButton{width:100px}.Wrapper.Mobile .WrapperContent .WrapperBar{padding:12px 8px;line-height:var(--emw--font-size-medium, 14px)}.Wrapper.Mobile .WrapperContent .WrapperBar .WrapperBarMiddle{font-size:var(--emw--font-size-medium, 14px)}.Wrapper.Mobile .items.TitleContainer{height:50px;margin-bottom:5px}.Wrapper.Mobile .Title{font-size:var(--emw--font-size-large, 16px)}.Wrapper.Mobile .WrapperContent .Main{height:calc(100vh - 179px)}.Wrapper.Mobile .WrapperContent .TableContentWrapper{height:calc(100vh - 276px);overflow-y:auto}.Wrapper.Mobile .WrapperBarLeft span.EngagementSuiteIcon img,.Wrapper.Mobile .WrapperBarRight span.EngagementSuiteIcon img{width:16px;height:16px}.WrapperBar{display:flex;width:100%;padding:16px 8px 12px;align-content:center;justify-content:center;align-items:center}.WrapperBar .WrapperBarLeft span{position:relative}.WrapperBarLeft,.WrapperBarRight{cursor:pointer;z-index:1}.WrapperBarLeft span.EngagementSuiteIcon img,.WrapperBarRight span.EngagementSuiteIcon img{width:24px;height:24px}.WrapperBarMiddle{flex-grow:1;text-align:center;font-size:var(--emw--font-size-medium, 16px);font-weight:500;color:var(--emw--color-secondary, rgb(187, 185, 195))}:host{display:block;font-size:var(--emw--font-size-x-small, 14px)}.ScrollBar{scrollbar-width:thin;scrollbar-color:var(--emw--color-background, hsl(254, 8.53%, 54.93%)) transparent}.Row{margin:10px 0;padding:0 20px}.Row:first-child{margin:0;padding-top:5px}.LeaderboardsItem{opacity:1;transition:1s opacity ease;position:relative;margin:20px 0;border:1px solid rgb(64, 57, 86);border-radius:6px;padding:12px 0}.LeaderboardsItem.Unjoined{opacity:0;margin:0;border:0 none;animation:slideOut 1s forwards}.LeaderboardsItem.Hollow{border-color:transparent}.LeaderboardsItem:first-child{margin-top:0}.LeaderboardsItemContainer{padding-top:16px}.ShowInfo{margin:10px 0;padding:0 20px;transition:0.5s all ease}.TimeContainer{margin:10px 0;padding:0 20px;transition:0.5s all ease}.TimeContainer .Time{display:flex;justify-content:space-between;font-size:var(--emw--font-size-x-small, 14px);align-items:center;color:var(--emw--color-secondary, rgb(187, 185, 195))}.TimeContainer .Time .Running{width:100%;display:flex;flex-direction:row;justify-content:space-between}.TimeContainer .Time button{font-size:var(--emw--font-size-x-small, 14px);height:20px;padding:0}.TimeContainer .Time button::before{inset:inherit;border:0}.TitleContainer{display:flex;justify-content:space-between;margin:10px 0;padding:0 20px;margin-top:0;gap:10px;font-family:Montserrat;align-items:center}.TitleContainer .GradientRoundedButton{width:120px}.item .TitleContainer{height:55px;overflow:auto}.TabsContainer{margin:10px 0;padding:0 20px;margin:0 20px;padding:0;border-bottom:1px solid #575757}.Tabs{display:flex;justify-content:space-between;justify-content:start;font-size:var(--emw--font-size-x-small, 14px);margin-bottom:-1px}.Tabs .Tab{text-transform:capitalize}.Tabs>div{padding:10px;color:rgb(102, 97, 120);cursor:pointer}.Tabs>div.active{color:var(--emw--color-typography, #FFF);border-bottom:2px solid var(--emw--color-typography, #FFF)}.Title{font-size:var(--emw--font-size-large, 20px);font-weight:700;line-height:19.5px;text-align:left;word-break:break-word}.TC{margin-top:14px}.TC a{color:rgb(89, 209, 255)}.Criterias{margin:14px 0}.Criterias span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.ResultPrize{margin:10px 0;padding:0 20px;padding-left:30px;text-align:left}.ResultPrize span{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer{flex:1;display:flex;flex-direction:column;position:relative;overflow:hidden}.ContentScrollContainer{flex:1;display:flex;flex-direction:column;overflow-y:auto;position:relative;height:auto}.ContentScrollContainer.expanded{height:100%;max-height:100%}.PrizesContainer{flex:1;display:flex;flex-direction:column;min-height:100px;max-height:calc(100% - 20px)}.PrizesHeader,.DetailHeader{align-items:center;display:flex;background-color:var(--emw--color-background, hsl(254, 44%, 15%));padding:5px 0;z-index:1;margin:0 20px}.PrizesHeader img,.DetailHeader img{width:14px}.PrizesHeader .PrizesText,.DetailHeader .PrizesText{margin-left:3px;font-weight:600}.DetailHeader{margin:0}.Prizes{margin:10px 0;padding:0 20px;text-align:left;flex:1;overflow-y:auto;margin-bottom:0;padding-right:10px;margin-top:10px}.Prizes::-webkit-scrollbar{width:4px}.Prizes::-webkit-scrollbar-track{background:rgba(0, 0, 0, 0.1);border-radius:2px}.Prizes::-webkit-scrollbar-thumb{background:var(--emw--color-primary, rgb(255, 214, 47));border-radius:2px}.Prizes .Prize{margin:8px 0}.Prizes .Prize .Rank{margin-right:5px}.Prizes .Prize .PrizeText{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:400}.InfoContainer section.Info{margin-bottom:12px;text-align:left;padding-left:20px}.InfoContainer section.Info .Criterias,.InfoContainer section.Info .Description{margin-top:10px;margin-right:10px}*{box-sizing:border-box}.Leaderboards{width:100%;text-align:center;border-collapse:collapse}.Leaderboards thead{position:sticky;top:0;z-index:2;background-color:var(--emw--color-background, hsl(254, 44%, 15%))}.Leaderboards td,.Leaderboards th{opacity:0.6;padding:12px 5px}.Leaderboards th:last-child{text-align:left}.Leaderboards td:first-child{padding-left:20px}.Leaderboards td:last-child{padding-right:20px}.Leaderboards .LeaderboardName{color:var(--emw--color-typography, #FFF);opacity:1}.Leaderboards tr.isMe{background:rgba(0, 0, 0, 0.2);scroll-margin-top:42px}.Leaderboards tr.isMe .LeaderboardRank span{padding:0px 3px;opacity:1;border:1px solid var(--emw--color-primary, rgb(255, 214, 47));border-radius:11px}.Leaderboards tr.isMe td{color:var(--emw--color-primary, rgb(255, 214, 47));font-weight:var(--emw--font-weight-semibold, 500)}.LeaderboardLabels{position:absolute;top:-6px;right:18px;display:flex;gap:4px}.LeaderboardLabel{width:30px;height:15px;background:var(--emw--engagement-suite-gradient-golden, linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%));border-radius:var(--emw--border-radius-x-small, 2px);display:inline-flex;padding:0 2px;align-items:center;justify-content:center}.LeaderboardLabel span{display:inline-block;text-transform:uppercase;font-size:var(--emw--font-size-3x-small, 7px);line-height:7px;font-weight:var(--emw--font-weight-bold, 700);font-family:var(--emw--font-family-secondary, "Montserrat", sans-serif);color:var(--emw--color-background, #1E1638)}.LeaderboardUnstarted{margin:10px 0;padding:0 20px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-medium, 16px)}.Games{margin:10px 0;padding:0 20px;display:grid;justify-content:start;grid-template-columns:repeat(4, 25%);margin-top:8px;align-content:flex-start;width:100%}.Games .Game{padding-right:8px}.Games .Game.Current{cursor:auto;filter:grayscale(10)}.Games .Game:nth-of-type(4n){padding-right:0px}.Games .Game:hover{filter:brightness(var(--emw--hover-brightness, 1.25));cursor:pointer}.Games .Game.Current:hover{cursor:auto;filter:grayscale(10);cursor:not-allowed}.Games img{width:100%;height:auto;margin:auto 0}dialog.tip{position:absolute;align-items:start;padding:120px 90px;line-height:20px;border:none;border-radius:var(--emw--border-radius-large, 8px);font-size:var(--emw--font-size-small, 16px)}dialog.tip>div{margin:0px}dialog{display:none;position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center;z-index:1;color:var(--emw--color-typography, #FFFFFF);transition:all 0.2s;transition-timing-function:ease-in-out}dialog>div{margin:32px;border-radius:8px;background:var(--emw--color-background, hsl(254, 44%, 15%));border:1px solid hsl(254, 20%, 28%);align-items:center}dialog div.Hollow .WrapperBar{padding:12px}dialog div.Hollow .WrapperBar .WrapperBarRight img{width:20px}dialog div.Hollow .Tip{line-height:20px;padding:0px 60px 32px;font-size:var(--emw--font-size-small, 16px)}dialog[open]{display:flex}.DialogContentUnjoin{padding:32px;padding-top:10px;display:flex;gap:10px;max-width:510px;flex-direction:column}.DialogContentUnjoinTitle{font-family:Montserrat;font-size:var(--emw--font-size-large, 20px);font-weight:600;line-height:24.38px;text-align:center}.DialogContentUnjoinDescription{color:var(--emw--color-secondary, rgb(187, 185, 195));margin-bottom:30px}.Tip{padding:32px;padding-top:0px;color:var(--emw--color-secondary, rgb(187, 185, 195));font-size:var(--emw--font-size-small, 14px)}.Tip.Error{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-weight:var(--emw--font-weight-normal, 500)}.PageConfirmContainer{text-align:center;width:80%;min-width:450px;max-width:510px;margin:0 auto}.PageConfirm{padding:0px 32px 60px;display:flex;flex-direction:column;gap:20px}.PageConfirm .Title{font-size:var(--emw--font-size-large, 26px);text-align:center}.PageConfirm .Description{color:var(--emw--color-secondary, rgb(187, 185, 195));font-weight:400}.PageConfirm .Description span{color:var(--emw--color-typography, #FFF);font-weight:600}.PageConfirm.Gift{padding:22px 32px 60px}.PageConfirm.Gift .Title{font-size:var(--emw--font-size-large, 30px)}.PageConfirm.Gift .Description{font-size:var(--emw--font-size-medium, 20px)}.PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton{font-size:var(--emw--font-size-medium, 20px);padding:12px;height:auto}.PageConfirm.Gift .PageConfirmButtonsGroup .GradientRoundedButton.GradientRounded{border-radius:20px}.PageConfirmButtonsGroup{width:150px;margin:20px auto;display:flex;flex-direction:column;gap:10px}.GradientRounded{display:block;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:rgb(30, 22, 56);position:relative;border-radius:16px}.GradientRounded.Hollow{background:rgb(30, 22, 56);color:#FFFFFF}.GradientRounded.Hollow::before{content:"";position:absolute;inset:0;border-radius:15px;border:1px solid transparent;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;-webkit-mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);-webkit-mask-composite:destination-out;mask-composite:exclude}.GradientRoundedButton{border:none;padding:7px;height:32px;width:100%;font-size:var(--emw--font-size-medium, 16px);font-weight:700;line-height:17.07px;text-align:center;transition:0.5s opacity;cursor:pointer}.GradientRoundedButton.Pending{cursor:not-allowed;opacity:0.3}.GradientRoundedButton.Hollow span{background:-webkit-linear-gradient(98.25deg, rgb(255, 148, 0) 22.48%, rgb(254, 247, 70) 131.02%, rgb(255, 226, 74) 131.9%);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.LeaderboardsItem.GradientRounded.Hollow::before{border-radius:7px}.WrapperUtil .GradientRounded .WrapperBar{margin-bottom:0;padding-bottom:0}.WrapperUtil .GradientRounded .Tip{padding-top:0;padding-bottom:40px}.LeaderboardsItem .LeaderboardsItemContainer .TitleContainer{margin-bottom:16px}@keyframes slideOut{0%{display:block;opacity:1;height:max-content}50%{display:block;opacity:0.5}80%{display:none;opacity:0}100%{display:none;opacity:0;height:0}}';const Si=class{constructor(t){e(this,t),this.slides=null,this.slideWidth=0,this.controls={Prev:null,Next:null},this.xDown=null,this.yDown=null,this.slideNumber=3,this.slideShow=3,this.showArrow=!0,this.showButton=!1,this.autoSlide=!1,this.loopTime=1,this.autoItemHeight=!1,this.clientStyling="",this.clientStylingUrl="",this.currentPage=0,this.currentSlideNumber=0,this.slidesCount=0,this.limitStylingAppends=!1}slide(e){this.sliderEl.classList.remove("Static");let t=0;t=e?this.currentSlideNumber+this.slideNumber:this.currentSlideNumber-this.slideNumber,t<0||t>=this.slidesCount||(this.currentSlideNumber=t,this.currentPage=this.currentSlideNumber/this.slideNumber,this.updateListStyle())}slideTo(e){this.sliderEl.classList.remove("Static"),this.currentSlideNumber=e*this.slideNumber,this.currentPage=e,this.updateListStyle()}updateControls(){this.switchControl("Prev",0!==this.currentSlideNumber),this.switchControl("Next",this.currentSlideNumber!==this.slidesCount-this.slideShow)}switchControl(e,t){this.controls[e]&&(this.controls[e].disabled=!t)}componentWillLoad(){this.slideNumber||(this.slideNumber=1),this.slideShow||(this.slideShow=1)}componentDidLoad(){this.slides=this.slotEl.assignedElements(),this.slidesCount=this.slides.length;for(let e in this.controls)this.controls[e]=this.el.shadowRoot.querySelector(".Button"+e);this.autoSlide&&this.setSlideAutoInterval(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0),0!==this.currentPage&&(this.sliderEl.classList.add("Static"),this.currentSlideNumber=this.currentPage*this.slideNumber)}componentDidRender(){this.slides&&(this.slideWidth=this.slides[0].offsetWidth),this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.updateListStyle(),!this.limitStylingAppends&&this.el.shadowRoot&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}updateListStyle(){this.autoItemHeight&&null!==this.slides&&this.slides.forEach(((e,t)=>{t>=this.currentPage*this.slideNumber&&t<(this.currentPage+1)*this.slideNumber?e.classList.remove("hide"):e.classList.add("hide")}))}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY,clearInterval(this.sliderInterval)}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.slide(t>0),this.xDown=null,this.yDown=null,this.autoSlide&&this.setSlideAutoInterval()}setSlideAutoInterval(){0!=this.loopTime&&(clearInterval(this.sliderInterval),this.sliderInterval=setInterval((()=>{this.slideTo(this.currentPage+1<this.slidesCount/this.slideNumber?this.currentPage+1:0)}),1e3*Number(this.loopTime)))}componentDidUpdate(){this.sliderEl.style.transform=`translateX(${this.currentSlideNumber*this.slideWidth*-1}px)`,this.updateControls()}switchLoopStatus(e){this.autoSlide&&this.loopTime>0&&(e?clearInterval(this.sliderInterval):this.setSlideAutoInterval())}setClientStyling(){const e=new CSSStyleSheet;e.replace(this.clientStyling),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,e]}setClientStylingURL(){let e=new URL(this.clientStylingUrl);fetch(e.href).then((e=>e.text())).then((e=>{const t=new CSSStyleSheet;t.replace(e),this.el.shadowRoot.adoptedStyleSheets=[...this.el.shadowRoot.adoptedStyleSheets,t]}))}render(){return t("div",{key:"8f86541d4454387e01a54b26c0aa6515d47ddb4d",class:"GeneralSlider"},t("div",{key:"c3e606e98881afeb2b867a58b25f3e7aa3915808",class:"Slider"},t("ul",{key:"e764fb6ad7fe7a727b7c1f37b5fe26704f2cd390",class:`SliderList Col-${this.slideShow}`,part:"SliderList",onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1),ref:e=>this.sliderEl=e},t("slot",{key:"c61792d98ee4aefeb8fe8e84245eac495ff2f898",ref:e=>this.slotEl=e}))),this.showButton&&this.slidesCount>0&&t("div",{key:"35b1a666ec07535c2b70e8678aff70be5a2eff35",class:"PageButtons",part:"PageButtons"},[...Array(this.slidesCount/this.slideNumber)].map(((e,i)=>t("div",{class:"PageButton "+(this.currentPage==i?"active":""),title:`page${i}`,onClick:this.slideTo.bind(this,i),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)}," ")))),this.showArrow&&t("div",{key:"6e910a7d9013b49bc70160fdc8b193de0c1ee309",class:"ArrowButtons"},t("button",{key:"1d21da8ede99b7ef0c1610334763d15d7a9640c7",type:"button",class:"Button ButtonNext",onClick:this.slide.bind(this,!0),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},">"),t("button",{key:"e890b5cb47ba744fb977e492235330f201129f09",type:"button",class:"Button ButtonPrev",onClick:this.slide.bind(this,!1),onMouseEnter:this.switchLoopStatus.bind(this,!0),onMouseLeave:this.switchLoopStatus.bind(this,!1)},"<")))}get el(){return a(this)}};function Ii(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function Ti(e,t){const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}Si.style=":host{display:block}.GeneralSlider{position:relative}.Slider{position:relative;width:100%;margin:0 auto;overflow:hidden}.SliderList{display:flex;margin:0;padding:0;list-style:none;transition:transform 0.5s ease-in-out}.SliderList.Static{transition-duration:0ms}::slotted(li){flex:1 0 auto;width:100%;margin:auto}::slotted(li.hide){visibility:hidden;height:0;transition-delay:500ms}.Col-2 ::slotted(li){flex:2 0 auto;width:50%}.Col-3 ::slotted(li){flex:3 0 auto;width:33.3333333333%}.Col-4 ::slotted(li){flex:4 0 auto;width:25%}.Col-5 ::slotted(li){flex:5 0 auto;width:20%}.Col-6 ::slotted(li){flex:6 0 auto;width:16.6666666667%}.Col-7 ::slotted(li){flex:7 0 auto;width:14.2857142857%}.Col-8 ::slotted(li){flex:8 0 auto;width:12.5%}.Col-9 ::slotted(li){flex:9 0 auto;width:11.1111111111%}.Col-10 ::slotted(li){flex:10 0 auto;width:10%}.Col-11 ::slotted(li){flex:11 0 auto;width:9.0909090909%}.Col-12 ::slotted(li){flex:12 0 auto;width:8.3333333333%}.Button{position:absolute;z-index:1;top:calc(50% - 32px);padding:20px;font-size:20px;line-height:20px;opacity:0.5;border:none;background:var(--emw--color-contrast, #07072A);color:var(--emw--color-white, #FFFFFF);cursor:pointer}.Button:hover{opacity:1;transition:opacity 0.5s ease-in-out}.Button[disabled],.Button[disabled]:hover{color:var(--emw--color-gray-150, #828282);opacity:0.25}.Button.ButtonNext{right:0}.PageButtons{display:flex;gap:4px;margin-top:8px}.PageButton{width:15px;height:4px;border-radius:4px;background-color:var(--emw--tournament-color-primary, #0072ed);opacity:0.2;cursor:pointer;float:right}.PageButton.active{width:45px;opacity:1}";const zi=class{constructor(t){e(this,t),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?function(e,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,e&&e.appendChild(i)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&Ii(this.el,this.clientStyling),this.clientStylingUrl&&Ti(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(e,t){e!=t&&Ii(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&Ti(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&Ii(this.el,this.clientStyling),this.clientStylingUrl&&Ti(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const a=(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]||{},Object.keys(t[e]).forEach((a=>{if(!i.en[a])return;const n=i.en[a];"object"==typeof t[e][a]?(i[e][a]=i[e][a]||Object.assign({},n),Object.keys(t[e][a]).forEach((n=>{i[e][a][n]=t[e][a][n]}))):i[e][a]=t[e][a]||Object.assign({},n)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(a)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},t("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return a(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};zi.style=":host{display:block}";export{L as casino_engagement_suite_bar,F as casino_engagement_suite_challenges_details,Pe as casino_engagement_suite_challenges_list,Re as casino_engagement_suite_container,Qe as casino_engagement_suite_free_spins_details,Ve as casino_engagement_suite_free_spins_list,tt as casino_engagement_suite_jackpot_details,st as casino_engagement_suite_jackpots_list,zt as casino_engagement_suite_luckywheel,At as casino_engagement_suite_luckywheel_details,Ut as casino_engagement_suite_luckywheel_list,Yt as casino_engagement_suite_modal,Vt as casino_engagement_suite_modal_container,qt as casino_engagement_suite_progress_bar,Di as casino_engagement_suite_tournament,Si as general_slider,zi as general_styling_wrapper}
|