@everymatrix/casino-engagement-suite-jackpots-list 1.66.1 → 1.66.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as o,g as i}from"./index-fc7166a4.js";function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function s(t){n(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t,e){n(2,arguments);var o=s(t),i=s(e);return o.getTime()<i.getTime()}const r=["en"],c={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."}},l=(t,e)=>{const o=e;return c[void 0!==o&&r.includes(o)?o:"en"][t]},d=class{constructor(o){t(this,o),this.close=e(this,"close",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((t=>{console.log("Error ",t)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=null},this.toggleTooltip=t=>{t.stopPropagation(),this.tooltip=this.tooltip?null:l(t.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=t=>{t.stopPropagation()},this.handleJackpotClick=t=>{const e=+t.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:e})},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(t){!this.interval&&t.length&&this.startCountdown(),this.interval&&!t.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const t=(new Date).getTime();this.timers=this.jackpots.reduce(((e,o)=>{const i=new Date(o.JackpotEndTime).getTime()-t;let a="00h:00m:00s";const{days:n,hours:s,minutes:p,seconds:r}={days:String(Math.floor(i/864e5)).padStart(2,"0"),hours:String(Math.floor(i%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(i%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(i%6e4/1e3)).padStart(2,"0")};return a="00"===n?`${s}h:${p}m:${r}s`:`${n}d:${s}h:${p}m`,Object.assign(Object.assign({},e),{[o.JackpotId]:a})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(t){return{JackpotCard:!0,JackpotCardClosed:t.IsClosed||p(new Date(t.JackpotEndTime),new Date),InProgress:t.Enabled&&!t.IsClosed}}getJackpotHeaderTemplate(t){const e=!!t.WinBalance,i=l(t.Type,this.language),a=l(t.Reason,this.language),n=(null==t?void 0:t.IsClosed)?a:i,s=`JackpotBalance Jackpot${l(t.Type,this.language)}`,r=t.Enabled?"EngagementSuiteButton Active":"EngagementSuiteButton",c=l(t.Enabled?"unjoin":"join",this.language),d=t.Pending||(null==t?void 0:t.IsClosed)||p(new Date(t.JackpotEndTime),new Date);return o("div",{class:"JackpotCardHeader"},o("div",{class:"JackpotTitle"},o("span",{class:"JackpotName"},n),o("span",{class:s},function(t,e,o=99999999){return t=Math.min(t,o),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}(t.Balance,t.Currency))),o("div",{class:"JackpotActions"},o("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":t.JackpotId,disabled:d},c)),e&&o("span",{class:"JackpotWon"},l("jackpotIsWon",this.language)))}getJackpotDescriptionTemplate(t){const e=+t.OperatorContributionPercent+"%",i=`1:${t.Probability}`,a=p(new Date(t.JackpotEndTime),new Date)?l("outdatedJackpotCountdown",this.language):this.timers[t.JackpotId],n=l("operatorContribution",this.language),s=l("type",this.language),r=l("winningProbability",this.language);return o("div",{class:"JackpotCardDescription"},!t.IsClosed&&o("span",{class:"JackpotCountdown"},a),o("div",{class:"JackpotCardDescriptionBlock"},o("div",{class:"JackpotCardDescriptionRow"},o("span",null,n,":"),o("span",{class:"JackpotDescriptionValue"},e,o("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,i),this.renderDescriptionRowInfo(`${s}:`,t.JackpotTypePresentation),o("a",{href:t.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},l("termsAndConditions",this.language))))}renderDescriptionRowInfo(t,e){return o("div",{class:"JackpotCardDescriptionRow"},o("span",null,t),o("span",{class:"JackpotDescriptionValue"},e))}getJackpotTemplate(t){return o("div",{class:this.getJackpotClasses(t),onClick:this.handleJackpotClick,key:t.JackpotId,"data-id":t.JackpotId},this.getJackpotHeaderTemplate(t),this.getJackpotDescriptionTemplate(t))}getHeaderTemplate(){return o("header",{class:"JackpotsListPopupHeader"},o("button",{onClick:this.toggleTooltip,"data-tooltip":"tooltip",class:"EngagementSuiteIconButton Help"}),o("div",{class:"JackpotsListPopupHeaderName"},l("jackpots",this.language)),o("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){const t=this.jackpots.every((t=>t.IsClosed));return this.jackpots.length?o("div",{class:"JackpotsListWrapper"},t&&o("div",{class:"JackpotsListClosed"},o("h2",null,l("allJackpotsClosed",this.language))),o("div",{class:"JackpotsList"},this.jackpots.map((t=>this.getJackpotTemplate(t))))):o("div",{class:"JackpotsListClosed"},o("h2",null,l("allJackpotsClosed",this.language)))}getTooltipTemplate(){return o("div",{class:"EngagementSuiteTooltipBackdrop"},o("div",{class:"EngagementSuiteTooltip"},o("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return o("div",{key:"9fd4d384af0ee639e14925c797fe28bc71beb586",class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return i(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};d.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}';export{d as casino_engagement_suite_jackpots_list}
@@ -1 +1 @@
1
- import{p as t,b as a}from"./p-971a59a3.js";export{s as setNonce}from"./p-971a59a3.js";import{g as e}from"./p-e1255160.js";(()=>{const a=import.meta.url,e={};return""!==a&&(e.resourcesUrl=new URL(".",a).href),t(e)})().then((async t=>(await e(),a([["p-bc2b4909",[[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]},null,{jackpots:["jackpotsPropHandler"]}]]]],t))));
1
+ import{p as t,b as e}from"./index-fc7166a4.js";export{s as setNonce}from"./index-fc7166a4.js";import{g as a}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,s={};return""!==e&&(s.resourcesUrl=new URL(".",e).href),t(s)})().then((async t=>(await a(),e([["casino-engagement-suite-jackpots-list",[[1,"casino-engagement-suite-jackpots-list",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],device:[1],jackpots:[1040],jackpotChangeStatusRequest:[1040],tooltip:[32],timers:[32],limitStylingAppends:[32]},null,{jackpots:["jackpotsPropHandler"]}]]]],t))));
@@ -5,6 +5,7 @@ export const config = {
5
5
  taskQueue: 'async',
6
6
  sourceMap: false,
7
7
  minifyJs: true,
8
+ hashFileNames: false,
8
9
  extras: {
9
10
  experimentalImportInjection: true
10
11
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-engagement-suite-jackpots-list",
3
- "version": "1.66.1",
3
+ "version": "1.66.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as o,g as i}from"./p-971a59a3.js";function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function n(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function s(t){n(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===a(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function p(t,e){n(2,arguments);var o=s(t),i=s(e);return o.getTime()<i.getTime()}const r=["en"],c={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."}},l=(t,e)=>{const o=e;return c[void 0!==o&&r.includes(o)?o:"en"][t]},d=class{constructor(o){t(this,o),this.close=e(this,"close",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.host.prepend(e)}),1)})).catch((t=>{console.log("Error ",t)}))},this.handleCloseClick=()=>{this.close.emit(),this.tooltip=null},this.toggleTooltip=t=>{t.stopPropagation(),this.tooltip=this.tooltip?null:l(t.currentTarget.getAttribute("data-tooltip"),this.language)},this.stopPropagation=t=>{t.stopPropagation()},this.handleJackpotClick=t=>{const e=+t.currentTarget.getAttribute("data-id");window.postMessage({type:"JackpotClick",id:e})},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(t){!this.interval&&t.length&&this.startCountdown(),this.interval&&!t.length&&clearInterval(this.interval)}componentWillLoad(){this.jackpotsPropHandler(this.jackpots)}startCountdown(){this.updateTimers(),this.interval=setInterval((()=>{this.updateTimers()}),1e3)}updateTimers(){const t=(new Date).getTime();this.timers=this.jackpots.reduce(((e,o)=>{const i=new Date(o.JackpotEndTime).getTime()-t;let a="00h:00m:00s";const{days:n,hours:s,minutes:p,seconds:r}={days:String(Math.floor(i/864e5)).padStart(2,"0"),hours:String(Math.floor(i%864e5/36e5)).padStart(2,"0"),minutes:String(Math.floor(i%36e5/6e4)).padStart(2,"0"),seconds:String(Math.floor(i%6e4/1e3)).padStart(2,"0")};return a="00"===n?`${s}h:${p}m:${r}s`:`${n}d:${s}h:${p}m`,Object.assign(Object.assign({},e),{[o.JackpotId]:a})}),{})}componentDidRender(){!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}disconnectedCallback(){this.interval&&clearInterval(this.interval)}getJackpotClasses(t){return{JackpotCard:!0,JackpotCardClosed:t.IsClosed||p(new Date(t.JackpotEndTime),new Date),InProgress:t.Enabled&&!t.IsClosed}}getJackpotHeaderTemplate(t){const e=!!t.WinBalance,i=l(t.Type,this.language),a=l(t.Reason,this.language),n=(null==t?void 0:t.IsClosed)?a:i,s=`JackpotBalance Jackpot${l(t.Type,this.language)}`,r=t.Enabled?"EngagementSuiteButton Active":"EngagementSuiteButton",c=l(t.Enabled?"unjoin":"join",this.language),d=t.Pending||(null==t?void 0:t.IsClosed)||p(new Date(t.JackpotEndTime),new Date);return o("div",{class:"JackpotCardHeader"},o("div",{class:"JackpotTitle"},o("span",{class:"JackpotName"},n),o("span",{class:s},function(t,e,o=99999999){return t=Math.min(t,o),`${e} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`}(t.Balance,t.Currency))),o("div",{class:"JackpotActions"},o("button",{class:r,onClick:this.jackpotChangeStatusRequest,"data-id":t.JackpotId,disabled:d},c)),e&&o("span",{class:"JackpotWon"},l("jackpotIsWon",this.language)))}getJackpotDescriptionTemplate(t){const e=+t.OperatorContributionPercent+"%",i=`1:${t.Probability}`,a=p(new Date(t.JackpotEndTime),new Date)?l("outdatedJackpotCountdown",this.language):this.timers[t.JackpotId],n=l("operatorContribution",this.language),s=l("type",this.language),r=l("winningProbability",this.language);return o("div",{class:"JackpotCardDescription"},!t.IsClosed&&o("span",{class:"JackpotCountdown"},a),o("div",{class:"JackpotCardDescriptionBlock"},o("div",{class:"JackpotCardDescriptionRow"},o("span",null,n,":"),o("span",{class:"JackpotDescriptionValue"},e,o("button",{class:"JackpotContributionTooltipButton","data-tooltip":"contributionTooltip",onClick:this.toggleTooltip}))),this.renderDescriptionRowInfo(`${r}:`,i),this.renderDescriptionRowInfo(`${s}:`,t.JackpotTypePresentation),o("a",{href:t.JackpotRulesUrl,target:"_blank",onClick:this.stopPropagation},l("termsAndConditions",this.language))))}renderDescriptionRowInfo(t,e){return o("div",{class:"JackpotCardDescriptionRow"},o("span",null,t),o("span",{class:"JackpotDescriptionValue"},e))}getJackpotTemplate(t){return o("div",{class:this.getJackpotClasses(t),onClick:this.handleJackpotClick,key:t.JackpotId,"data-id":t.JackpotId},this.getJackpotHeaderTemplate(t),this.getJackpotDescriptionTemplate(t))}getHeaderTemplate(){return o("header",{class:"JackpotsListPopupHeader"},o("button",{onClick:this.toggleTooltip,"data-tooltip":"tooltip",class:"EngagementSuiteIconButton Help"}),o("div",{class:"JackpotsListPopupHeaderName"},l("jackpots",this.language)),o("button",{class:"EngagementSuiteIconButton Close",onClick:this.handleCloseClick}))}getListTemplate(){const t=this.jackpots.every((t=>t.IsClosed));return this.jackpots.length?o("div",{class:"JackpotsListWrapper"},t&&o("div",{class:"JackpotsListClosed"},o("h2",null,l("allJackpotsClosed",this.language))),o("div",{class:"JackpotsList"},this.jackpots.map((t=>this.getJackpotTemplate(t))))):o("div",{class:"JackpotsListClosed"},o("h2",null,l("allJackpotsClosed",this.language)))}getTooltipTemplate(){return o("div",{class:"EngagementSuiteTooltipBackdrop"},o("div",{class:"EngagementSuiteTooltip"},o("button",{class:"EngagementSuiteIconButton Close",onClick:this.toggleTooltip}),this.tooltip))}render(){return o("div",{key:"9fd4d384af0ee639e14925c797fe28bc71beb586",class:`JackpotsListPopup ${this.device}`},this.getHeaderTemplate(),this.getListTemplate(),this.tooltip&&this.getTooltipTemplate())}get host(){return i(this)}static get watchers(){return{jackpots:["jackpotsPropHandler"]}}};d.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}';export{d as casino_engagement_suite_jackpots_list}