@everymatrix/casino-engagement-suite-modal-container 1.0.69

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.
Files changed (46) hide show
  1. package/dist/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.esm.js +1 -0
  2. package/dist/casino-engagement-suite-modal-container/index.esm.js +0 -0
  3. package/dist/casino-engagement-suite-modal-container/p-aaab8749.entry.js +1 -0
  4. package/dist/casino-engagement-suite-modal-container/p-ac43a734.js +2 -0
  5. package/dist/casino-engagement-suite-modal-container/p-e1255160.js +1 -0
  6. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  7. package/dist/cjs/casino-engagement-suite-modal-container.cjs.js +25 -0
  8. package/dist/cjs/casino-engagement-suite-modal_2.cjs.entry.js +201 -0
  9. package/dist/cjs/index-00ddb955.js +1279 -0
  10. package/dist/cjs/index.cjs.js +2 -0
  11. package/dist/cjs/loader.cjs.js +15 -0
  12. package/dist/collection/collection-manifest.json +19 -0
  13. package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.css +115 -0
  14. package/dist/collection/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.js +242 -0
  15. package/dist/collection/components/casino-engagement-suite-modal-container/index.js +1 -0
  16. package/dist/collection/index.js +1 -0
  17. package/dist/collection/models/index.js +1 -0
  18. package/dist/collection/utils/locale.utils.js +31 -0
  19. package/dist/collection/utils/utils.js +4 -0
  20. package/dist/esm/app-globals-0f993ce5.js +3 -0
  21. package/dist/esm/casino-engagement-suite-modal-container.js +20 -0
  22. package/dist/esm/casino-engagement-suite-modal_2.entry.js +196 -0
  23. package/dist/esm/index-896654aa.js +1251 -0
  24. package/dist/esm/index.js +1 -0
  25. package/dist/esm/loader.js +11 -0
  26. package/dist/index.cjs.js +1 -0
  27. package/dist/index.js +1 -0
  28. package/dist/stencil.config.dev.js +17 -0
  29. package/dist/stencil.config.js +17 -0
  30. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.d.ts +2 -0
  31. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/casino-engagement-suite-modal-container/.stencil/packages/stencil/casino-engagement-suite-modal-container/stencil.config.dev.d.ts +2 -0
  32. package/dist/types/components/casino-engagement-suite-modal-container/casino-engagement-suite-modal-container.d.ts +44 -0
  33. package/dist/types/components/casino-engagement-suite-modal-container/index.d.ts +1 -0
  34. package/dist/types/components.d.ts +87 -0
  35. package/dist/types/index.d.ts +1 -0
  36. package/dist/types/models/index.d.ts +10 -0
  37. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  38. package/dist/types/utils/locale.utils.d.ts +1 -0
  39. package/dist/types/utils/utils.d.ts +1 -0
  40. package/loader/cdn.js +1 -0
  41. package/loader/index.cjs.js +1 -0
  42. package/loader/index.d.ts +24 -0
  43. package/loader/index.es2017.js +1 -0
  44. package/loader/index.js +2 -0
  45. package/loader/package.json +11 -0
  46. package/package.json +29 -0
@@ -0,0 +1 @@
1
+ import{p as n,b as e}from"./p-ac43a734.js";export{s as setNonce}from"./p-ac43a734.js";import{g as i}from"./p-e1255160.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),n(i)})().then((async n=>(await i(),e([["p-aaab8749",[[1,"casino-engagement-suite-modal-container",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],language:[1],isJoiningToChallenge:[1028,"is-joining-to-challenge"],device:[1],limitStylingAppends:[32],openModals:[32],rewardMessage:[32],hasError:[32],confirmationData:[32],winAmount:[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]],[1,"casino-engagement-suite-modal",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],isOpen:[4,"is-open"],isLoading:[1028,"is-loading"],header:[1],contentIcon:[1,"content-icon"],modalType:[1,"modal-type"],device:[1],showAnimation:[4,"show-animation"],limitStylingAppends:[32]}]]]],n))));
@@ -0,0 +1 @@
1
+ import{r as e,c as t,h as o,g as i}from"./p-ac43a734.js";const a=class{constructor(o){e(this,o),this.closeModal=t(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.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 o("div",{key:"8285e9a45ca4c3ce4fb17e67d5804bc9b6c503a5",class:`ModalOverlay ${this.isOpen&&"Open"} ${this.device} ${this.showAnimation&&"ShowAnimation"}`},o("div",{key:"9c0fca26014ebe7fa8ed9c5304ff2508b872f358",class:"ModalWinAnimation"}),o("div",{key:"7281f0aef2ae65ba58a7afee7d070c1caf34f1c3",class:"ModalContent GradientBorder"},o("div",{key:"7db7f93904c057b80e78d982ee73baed6b91fc7b",class:"IconCloseContainer"},o("button",{key:"9ea9de79010807ff507c88897acddb4ca3d1ddcf",class:"IconCloseButton",onClick:this.handleCloseClick},o("img",{key:"75f3155c2ccc0c98c0ae195057dd1ccf80939549",src:"https://static.everymatrix.com/gic/img/engagement-suite/close.svg",alt:"Сlose modal"}))),this.contentIcon?o("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,o("div",{key:"11dc59541107ba88928c8d56d87bf4c1e879b28a",class:"ModalHeader"},o("h1",{key:"0587e3a15ef19b4e087e5c0262f974709d269baf"},this.header)),o("div",{key:"826992ac3be61bbdff34f51e9e089efb18d07ce5",class:"ModalBodyWrapper"},o("div",{key:"a80b16956ef7a1941638e99fb0c0ad7166137037",class:"ModalBody"},o("slot",{key:"41882aa05cea337febb2b2c4dad7c0089239b181",name:"body"})),o("div",{key:"6f4e855d70851eaa7ba3f58389110aa35431f03f",class:"ModalFooter"},o("slot",{key:"737fe84975e121d5162d7824c577b4028dc327eb",name:"footer"})))))}get host(){return i(this)}};a.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.IconCloseButton img{width:24px;height:24px}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:"Montserrat", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 24px);margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:"Inter", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .IconCloseButton img{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}';const n=["en"],s={en:{joinHeader:"Choose another challenge?",desc:"Any progress on the current challenge will be kept and you can rejoin the challenge at any time.",joinQuestion:"Would you still like to join another challenge?",joinConfirm:"Yes, join another challenge",joinReject:"No, stay at current challenge",unJoinHeader:"Quit Challenge?",unJoinQuestion:"Would you still like to quit the challenge?",unJoinConfirm:"Yes, I want to quit challenge",unJoinReject:"No, stay at challenge",join:"Unjoin",unJoin:"Unjoin",continue:"Continue",okContinue:"Ok, continue",won:"You won",supportInfo:"However, some rewards cannot be issued. Please, contact support.",noReward:"Reward cannot be issued",contactSupport:"Please contact support",noChallenges:"No Challenges yet",tryOtherGames:"Try winning Challenges as rewards or launching other booster games",tooltip:"Competition where your real money bets contribute towards the level progress to achieve the level reward",jackpotWin:"Total Jackpot Win!"}},d=(e,t)=>{const o=t;return s[void 0!==o&&n.includes(o)?o:"en"][e]},r=class{constructor(o){e(this,o),this.closeModal=t(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.hasError=!1,this.confirmationData=null,this.winAmount={amount:0,currency:""}}openModalHandler(e){const{modalType:t,rewardMessage:o,hasError:i,confirmationData:a,winAmount:n}=e.detail;n&&(this.winAmount=this.isModalOpen("JACKPOT_REWARD_MODAL")?{amount:this.winAmount.amount+n.amount,currency:n.currency}:n),this.openModals=[...this.openModals,t],this.rewardMessage=o,this.hasError=i,a&&(this.confirmationData=a)}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 o("div",{key:"136c2521b6ce142d9c0dddf9300526e156b937d6",class:`ModalContainer ${this.device}`},o("casino-engagement-suite-modal",{key:"151a21ef6d3b0e5f3d82ebe45f0a22aa519821bb",isOpen:this.isModalOpen("REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg",modalType:"REWARD_MODAL","show-animation":!0,device:this.device},o("div",{key:"00d4a4ea4d1a790d68a06156b4829b1b181c072f",slot:"body"},o("div",{key:"dff1a278e656acaec2aa5045a54dd12226f5ac61"},d("won",this.language)," ",o("span",{key:"bf8eccf6e0221fab5fb319ca05a61917956dc2b0",class:"ModalReward"},this.rewardMessage)),this.hasError&&o("div",{key:"b9ab84114f91fc3e2d80bc5871afd804abb3daab",class:"SupportInfo"},d("supportInfo",this.language))),o("div",{key:"e45e9a072f5cf1bb5d36d232896dffbeff110621",slot:"footer"},o("button",{key:"c76d8b69e2ceef4f93fd01319b79e09e638e4212",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"REWARD_MODAL"},d("continue",this.language)))),o("casino-engagement-suite-modal",{key:"cd1500c95db9670004deaee3f374aff36dbdb156",isOpen:this.isModalOpen("JACKPOT_REWARD_MODAL"),header:"Congratulations!",contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg","show-animation":!0,modalType:"JACKPOT_REWARD_MODAL",device:this.device},o("div",{key:"a6832af4eb48940d5c573ed906a7511082c1b59e",slot:"body"},o("div",{key:"ad484526c5fbfcd2aa8280f6050c573022b6c04e",class:"JackpotWinText"},d("jackpotWin",this.language)),o("div",{key:"3475b1d2824afd37f07cfbbe7db97b15f56f9772",class:"JackpotWinAmount"},(t=this.winAmount.amount,`${this.winAmount.currency} ${new Intl.NumberFormat("en",{minimumFractionDigits:2,maximumFractionDigits:2}).format(t)}`))),o("div",{key:"d5da13989c807d509a307fe21e5eb37d2f417926",slot:"footer"},o("button",{key:"43b080260542d91712e8ae956e6e97e4d51ba4ac",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"JACKPOT_REWARD_MODAL"},d("continue",this.language)),o("div",{key:"145b2a136d92cdf575267d9350ea8c673cac6a21",class:"JackpotWinInfoText"},d("jackpotWinInfo",this.language)))),o("casino-engagement-suite-modal",{key:"ef905b8a730bdae1f03711fecef7b32b15b8d98d",isOpen:this.isModalOpen("TARGET_MODAL"),header:d(e?"joinHeader":"unJoinHeader",this.language),modalType:"TARGET_MODAL",device:this.device,isLoading:this.isJoiningToChallenge},o("div",{key:"cf234ba1fef13cade20db68b8a5c8973fe7a2285",slot:"body"},o("div",{key:"1ed85c4005cf467491b96e4a1ecc76f635bae15d",class:"LeftAlign"},d("desc",this.language)),o("div",{key:"1cbad96502b6fc3d730ae7301e062728e1030cd6",class:"LeftAlignQuestion"},d(e?"joinQuestion":"unJoinQuestion",this.language))),o("div",{key:"c288c8eddba30f36c4aa9d59c12c47c84033cecd",slot:"footer",class:"ManyActions"},o("button",{key:"184eddbe4d080628f87ab863b2f045d85a2122d5",class:"ModalFooterButton "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleChallengeAttendance},d(e?"joinConfirm":"unJoinConfirm",this.language)),o("button",{key:"aa165d256092a64d907645cc62102156d4caf02b",class:"ModalFooterButtonOutlined "+(this.isJoiningToChallenge?"Disabled":""),onClick:this.handleCloseClick,"data-type":"TARGET_MODAL"},o("div",{key:"5bb286abafdd1676ddb3080fc1e96adfd68af39f",class:"GradientText"},d(e?"joinReject":"unJoinReject",this.language))))),o("casino-engagement-suite-modal",{key:"44ab65b8618af413b70e647ba6d497a581dbff91",isOpen:this.isModalOpen("SUPPORT_MODAL"),header:d("noReward",this.language),contentIcon:"https://static.everymatrix.com/gic/img/engagement-suite/alert.svg",modalType:"SUPPORT_MODAL",device:this.device},o("div",{key:"fe6cff805502a17e61d4c9bae8a434635f708e58",slot:"body"},o("span",{key:"aae084da0430fc62a484f16c1fe7dc1278955b5e"},d("contactSupport",this.language))),o("div",{key:"ff10b11d061bfafe306491afe8461da76dfd991c",slot:"footer"},o("button",{key:"ae2a9345e70d5dd24c7c52aa15a3734464074f81",class:"ModalFooterButton",onClick:this.handleCloseClick,"data-type":"SUPPORT_MODAL"},d("okContinue",this.language)))));var t}get host(){return i(this)}};r.style=':host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-small-plus, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:"Montserrat", sans-serif;padding:0 16px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;border:2px solid transparent}.GradientText{background-image:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF);word-break:break-word}.JackpotWinText{margin:0;font-weight:var(--emw--font-weight-bold, 600);font-size:16px;line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;box-shadow:-0.41px 0.41px 0px 0px rgba(0, 0, 0, 0.1490196078), -0.41px 0.41px 2px 0px rgba(0, 0, 0, 0.5019607843);background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-weight:900;font-size:16px;line-height:16px}.SupportInfo{margin-top:20px}.ModalContainer.Mobile .ModalFooterButton,.ModalContainer.Mobile .ModalFooterButtonOutlined{font-size:var(--emw--font-size-small, 14px);min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.ModalContainer.Mobile .JackpotWinText{font-size:14px;line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:14px;line-height:14px}.LeftAlign{text-align:left;line-height:1.2}';export{a as casino_engagement_suite_modal,r as casino_engagement_suite_modal_container}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,p=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?w(b):f.raf(b))},v=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},b=()=>{v(p),v(y),(m=p.length>0)&&f.raf(b)},w=e=>h().then(e),g=$(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>E,unwrap:()=>x,unwrapErr:()=>P});var E=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>E(e))):E(n)}if(e.isErr)return O(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?A(null,l):l),i=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=A(e,null);return u.u=t,r.length>0&&(u.h=r),u.m=o,u},A=(e,t)=>({l:0,p:e,i:t,$:null,h:null,u:null,m:null}),T={},D=e=>n(e).$hostElement$,H=(e,t,n)=>{const l=D(e);return{emit:e=>N(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},N=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},U=new WeakMap,F=e=>"sc-"+e.v,L=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=q(n),s=q(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if(r||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(G);t=t.replace(V,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},W=/\s/,q=e=>e?e.split(W):[],G="Capture",V=RegExp(G+"$"),_=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of z(Object.keys(o)))e in s||L(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))L(l,e,o[e],s[e],n,t.l)};function z(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var B=!1,I=!1,J=(e,t,n)=>{const l=t.h[n];let o,s,i=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.p),_(null,l,I),o.getRootNode().querySelector("body"),l.h)for(i=0;i<l.h.length;++i)s=J(e,l,i),s&&o.appendChild(s);return o["s-hn"]=M,o},K=(e,t,n,l,o,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot);o<=s;++o)l[o]&&(i=J(null,n,o),i&&(l[o].$=i,Z(r,i,t)))},Q=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;e&&e.remove()}}},X=(e,t,n=!1)=>e.p===t.p&&(!!n||e.m===t.m),Y=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,i=t.i;null===i?(("slot"!==t.p||B)&&_(e,t,I),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],m=l.length-1,p=l[0],y=l[m];for(;r<=f&&c<=m;)if(null==h)h=t[++r];else if(null==d)d=t[--f];else if(null==p)p=l[++c];else if(null==y)y=l[--m];else if(X(h,p,o))Y(h,p,o),h=t[++r],p=l[++c];else if(X(d,y,o))Y(d,y,o),d=t[--f],y=l[--m];else if(X(h,y,o))Y(h,y,o),Z(e,h.$,d.$.nextSibling),h=t[++r],y=l[--m];else if(X(d,p,o))Y(d,p,o),Z(e,d.$,h.$),d=t[--f],p=l[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].m&&t[a].m===p.m){u=a;break}u>=0?(i=t[u],i.p!==p.p?s=J(t&&t[c],n,u):(Y(i,p,o),t[u]=void 0,s=i.$),p=l[++c]):(s=J(t&&t[c],n,c),p=l[++c]),s&&Z(h.$.parentNode,s,h.$)}r>f?K(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&Q(t,r,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),K(l,null,t,s,0,s.length-1)):!n&&null!==o&&Q(o,0,o.length-1)):e.i!==i&&(l.data=i)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},te=(e,t)=>{if(e.l|=16,!(4&e.l))return ee(e,e.j),g((()=>ne(e,t)));e.l|=512},ne=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return t&&(e.l|=256,e.k&&(e.k.map((([e,t])=>ue(n,e,t))),e.k=void 0)),le(void 0,(()=>se(e,n,t)))},le=(e,t)=>oe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),oe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,se=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=F(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,i=U.get(e=e.head||e);if(i||U.set(e,i=new Set),!i.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=f.C)?n:k(a);null!=l&&s.setAttribute("nonce",l),(!(1&t.l)||1&t.l&&"HEAD"!==e.nodeName)&&e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),i&&i.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);ie(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>re(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},ie=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.M||A(null,null),i=(e=>e&&e.p===T)(t)?t:R(null,null,t);if(M=l.tagName,o.P&&(i.u=i.u||{},o.P.map((([e,t])=>i.u[t]=l[e]))),n&&i.u)for(const e of Object.keys(i.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=l[e]);i.p=null,i.l|=4,e.M=i,i.$=s.$=l.shadowRoot||l,B=!!(1&o.l),Y(s,i,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},re=e=>{const t=e.$hostElement$,n=e.j;ue(e.t,"componentDidRender"),64&e.l||(e.l|=64,ae(t),e.R(t),n||ce()),e.S&&(e.S(),e.S=void 0),512&e.l&&w((()=>te(e,!1))),e.l&=-517},ce=()=>{ae(a.documentElement),w((()=>N(u,"appload",{detail:{namespace:"casino-engagement-suite-modal-container"}})))},ue=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ae=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,s;const i=e.prototype;if(t.A){const r=Object.entries(null!=(o=t.A)?o:{});if(r.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const s=n(e);if(!s)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=s.T.get(t),r=s.l,c=s.t;l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?e+"":e)(l,o.A[t][0]),8&r&&void 0!==i||l===i||Number.isNaN(i)&&Number.isNaN(l)||(s.T.set(t,l),c&&2==(18&r)&&te(s,!1))})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.D)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=t.D)?s:{}),...r.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.P)||o.push([e,s])),s}))]))}}return e},he=(e,l={})=>{var o;const h=[],m=l.exclude||[],p=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),v=a.createElement("style"),b=[];let w,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{const o={l:l[0],v:l[1],A:l[2],H:l[3]};4&o.l&&(S=!0),o.A=l[2],o.H=l[3],o.P=[];const c=o.v,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,T:new Map};l.N=new Promise((e=>l.R=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,o),1&o.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){const e=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,de(this,e,o.H)),w&&(clearTimeout(w),w=null),g?b.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)de(e,t,l.H),(null==t?void 0:t.t)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.j=n);break}}l.A&&Object.entries(l.A).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=i.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(i.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.F}" was not found`);l.isProxied||(fe(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=F(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>te(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);e.L&&(e.L.map((e=>e())),e.L=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}))}})()))}componentOnReady(){return n(this).N}};o.U=e[0],m.includes(c)||p.get(c)||(h.push(c),p.define(c,fe(u,o,1)))}))})),h.length>0&&(S&&(v.textContent+=c),v.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",v.innerHTML.length)){v.setAttribute("data-styles","");const e=null!=(o=f.C)?o:k(a);null!=e&&v.setAttribute("nonce",e),y.insertBefore(v,$?$.nextSibling:y.firstChild)}g=!1,b.length?b.map((e=>e.connectedCallback())):f.jmp((()=>w=setTimeout(ce,30)))},de=(e,t,n)=>{n&&n.map((([n,l,o])=>{const s=pe(e,n),i=me(t,o),r=ye(n);f.ael(s,l,i,r),(t.L=t.L||[]).push((()=>f.rel(s,l,i,r)))}))},me=(e,t)=>n=>{var l;try{256&e.l?null==(l=e.t)||l[t](n):(e.k=e.k||[]).push([t,n])}catch(e){s(e)}},pe=(e,t)=>16&t?a.body:e,ye=e=>({passive:!!(1&e),capture:!!(2&e)}),$e=e=>f.C=e;export{he as b,H as c,D as g,R as h,h as p,l as r,$e as s}
@@ -0,0 +1 @@
1
+ const o=()=>{};export{o as g}
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const globalScripts = () => {};
4
+
5
+ exports.globalScripts = globalScripts;
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-00ddb955.js');
6
+ const appGlobals = require('./app-globals-3a1e7e63.js');
7
+
8
+ /*
9
+ Stencil Client Patch Browser v4.20.0 | MIT Licensed | https://stenciljs.com
10
+ */
11
+ var patchBrowser = () => {
12
+ const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('casino-engagement-suite-modal-container.cjs.js', document.baseURI).href));
13
+ const opts = {};
14
+ if (importMeta !== "") {
15
+ opts.resourcesUrl = new URL(".", importMeta).href;
16
+ }
17
+ return index.promiseResolve(opts);
18
+ };
19
+
20
+ patchBrowser().then(async (options) => {
21
+ await appGlobals.globalScripts();
22
+ return index.bootstrapLazy([["casino-engagement-suite-modal_2.cjs",[[1,"casino-engagement-suite-modal-container",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"language":[1],"isJoiningToChallenge":[1028,"is-joining-to-challenge"],"device":[1],"limitStylingAppends":[32],"openModals":[32],"rewardMessage":[32],"hasError":[32],"confirmationData":[32],"winAmount":[32]},[[16,"openModal","openModalHandler"],[16,"closeModal","closeModalHandler"]]],[1,"casino-engagement-suite-modal",{"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"isOpen":[4,"is-open"],"isLoading":[1028,"is-loading"],"header":[1],"contentIcon":[1,"content-icon"],"modalType":[1,"modal-type"],"device":[1],"showAnimation":[4,"show-animation"],"limitStylingAppends":[32]}]]]], options);
23
+ });
24
+
25
+ exports.setNonce = index.setNonce;
@@ -0,0 +1,201 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-00ddb955.js');
6
+
7
+ const casinoEngagementSuiteModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);justify-content:center;align-items:center}.ModalOverlay.Open{display:flex}.IconCloseContainer{width:100%;display:flex;justify-content:end}.IconCloseButton img{width:24px;height:24px}.ModalContent{display:flex;flex-direction:column;align-items:center;font-family:\"Montserrat\", sans-serif;position:relative;color:var(--emw--color-typography, #FFFFFF);background-color:var(--emw--color-background, #1E1638);padding:24px;border-radius:8px;width:450px;max-width:100%;text-align:center}.GradientBorder::before{content:\"\";position:absolute;top:-1px;left:-1px;right:-1px;bottom:-1px;border-radius:9px;background:linear-gradient(143.2deg, #FF9401 -0.41%, #FFD32D 45.61%, #FF9401 82.77%);z-index:-1}.ModalHeader h1{font-weight:var(--emw--font-weight-semibold, 600);font-size:var(--emw--font-size-large, 24px);margin-top:12px;padding:0 16px}.ModalIcon{width:44px;height:44px;border-radius:50%;background-size:cover;margin-top:12px}.ModalBody{margin-top:20px;font-size:16px;font-family:\"Inter\", sans-serif;font-weight:var(--emw--font-weight-normal, 400);color:var(--emw--color-gray-100, #BBB9C3);padding:0 16px}.ModalFooter{margin-top:40px;margin-bottom:28px;padding:0 16px;width:100%}@keyframes rotate{100%{transform:rotate(1turn)}}.ModalOverlay .ModalWinAnimation{display:none}.ModalOverlay.ShowAnimation .ModalWinAnimation{display:block;position:absolute;width:100%;height:100%;inset:0;background:center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/light.svg) no-repeat, center/550px url(https://static.everymatrix.com/gic/img/engagement-suite/win.svg) no-repeat;animation:6s rotate linear infinite}.ModalOverlay.Mobile .IconCloseButton img{width:16px;height:16px}.ModalOverlay.Mobile .ModalBody{font-size:14px}.ModalOverlay.Mobile .ModalContent{width:318px;padding:12px}.ModalOverlay.Mobile .ModalHeader h1{font-size:20px}.ModalOverlay.Mobile.ShowAnimation .ModalWinAnimation{background-size:400px}";
8
+ const CasinoEngagementSuiteModalStyle0 = casinoEngagementSuiteModalCss;
9
+
10
+ const CasinoEngagementSuiteModal = class {
11
+ constructor(hostRef) {
12
+ index.registerInstance(this, hostRef);
13
+ this.closeModal = index.createEvent(this, "closeModal", 7);
14
+ this.handleCloseClick = () => {
15
+ if (this.isLoading)
16
+ return;
17
+ this.closeModal.emit(this.modalType);
18
+ };
19
+ this.setClientStyling = () => {
20
+ let sheet = document.createElement('style');
21
+ sheet.innerHTML = this.clientStyling;
22
+ this.host.prepend(sheet);
23
+ };
24
+ this.setClientStylingURL = () => {
25
+ let url = new URL(this.clientStylingUrl);
26
+ let cssFile = document.createElement('style');
27
+ fetch(url.href)
28
+ .then((res) => res.text())
29
+ .then((data) => {
30
+ cssFile.innerHTML = data;
31
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
32
+ })
33
+ .catch((err) => {
34
+ console.log('Error ', err);
35
+ });
36
+ };
37
+ this.clientStyling = '';
38
+ this.clientStylingUrl = '';
39
+ this.isOpen = undefined;
40
+ this.isLoading = undefined;
41
+ this.header = undefined;
42
+ this.contentIcon = undefined;
43
+ this.modalType = undefined;
44
+ this.device = 'Mobile';
45
+ this.showAnimation = false;
46
+ this.limitStylingAppends = false;
47
+ }
48
+ componentDidRender() {
49
+ if (!this.limitStylingAppends && this.host) {
50
+ if (this.clientStyling)
51
+ this.setClientStyling();
52
+ if (this.clientStylingUrl)
53
+ this.setClientStylingURL();
54
+ this.limitStylingAppends = true;
55
+ }
56
+ }
57
+ render() {
58
+ return (index.h("div", { key: '8285e9a45ca4c3ce4fb17e67d5804bc9b6c503a5', class: `ModalOverlay ${this.isOpen && 'Open'} ${this.device} ${this.showAnimation && 'ShowAnimation'}` }, index.h("div", { key: '9c0fca26014ebe7fa8ed9c5304ff2508b872f358', class: "ModalWinAnimation" }), index.h("div", { key: '7281f0aef2ae65ba58a7afee7d070c1caf34f1c3', class: "ModalContent GradientBorder" }, index.h("div", { key: '7db7f93904c057b80e78d982ee73baed6b91fc7b', class: 'IconCloseContainer' }, index.h("button", { key: '9ea9de79010807ff507c88897acddb4ca3d1ddcf', class: "IconCloseButton", onClick: this.handleCloseClick }, index.h("img", { key: '75f3155c2ccc0c98c0ae195057dd1ccf80939549', src: "https://static.everymatrix.com/gic/img/engagement-suite/close.svg", alt: "\u0421lose modal" }))), this.contentIcon ? (index.h("div", { class: "ModalIcon", style: {
59
+ background: `url(${this.contentIcon}) no-repeat center, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%)`
60
+ } })) : null, index.h("div", { key: '11dc59541107ba88928c8d56d87bf4c1e879b28a', class: "ModalHeader" }, index.h("h1", { key: '0587e3a15ef19b4e087e5c0262f974709d269baf' }, this.header)), index.h("div", { key: '826992ac3be61bbdff34f51e9e089efb18d07ce5', class: "ModalBodyWrapper" }, index.h("div", { key: 'a80b16956ef7a1941638e99fb0c0ad7166137037', class: "ModalBody" }, index.h("slot", { key: '41882aa05cea337febb2b2c4dad7c0089239b181', name: "body" })), index.h("div", { key: '6f4e855d70851eaa7ba3f58389110aa35431f03f', class: "ModalFooter" }, index.h("slot", { key: '737fe84975e121d5162d7824c577b4028dc327eb', name: "footer" }))))));
61
+ }
62
+ get host() { return index.getElement(this); }
63
+ };
64
+ CasinoEngagementSuiteModal.style = CasinoEngagementSuiteModalStyle0;
65
+
66
+ const DEFAULT_LANGUAGE = 'en';
67
+ const SUPPORTED_LANGUAGES = ['en'];
68
+ const TRANSLATIONS = {
69
+ en: {
70
+ joinHeader: 'Choose another challenge?',
71
+ desc: 'Any progress on the current challenge will be kept and you can rejoin the challenge at any time.',
72
+ joinQuestion: 'Would you still like to join another challenge?',
73
+ joinConfirm: 'Yes, join another challenge',
74
+ joinReject: 'No, stay at current challenge',
75
+ unJoinHeader: 'Quit Challenge?',
76
+ unJoinQuestion: 'Would you still like to quit the challenge?',
77
+ unJoinConfirm: 'Yes, I want to quit challenge',
78
+ unJoinReject: 'No, stay at challenge',
79
+ join: 'Unjoin',
80
+ unJoin: 'Unjoin',
81
+ continue: 'Continue',
82
+ okContinue: 'Ok, continue',
83
+ won: 'You won',
84
+ supportInfo: 'However, some rewards cannot be issued. Please, contact support.',
85
+ noReward: 'Reward cannot be issued',
86
+ contactSupport: 'Please contact support',
87
+ noChallenges: 'No Challenges yet',
88
+ tryOtherGames: 'Try winning Challenges as rewards or launching other booster games',
89
+ tooltip: 'Competition where your real money bets contribute towards the level progress to achieve the level reward',
90
+ jackpotWin: 'Total Jackpot Win!'
91
+ }
92
+ };
93
+ const translate = (key, customLang) => {
94
+ const lang = customLang;
95
+ return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
96
+ };
97
+
98
+ function formatBalance(amount, currency) {
99
+ return `${currency} ${new Intl.NumberFormat('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
100
+ .format(amount)}`;
101
+ }
102
+
103
+ const casinoEngagementSuiteModalContainerCss = ":host{display:block;font-family:inherit}.ModalFooterButton,.ModalFooterButtonOutlined{transition:all 0.5s ease-out;background:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:var(--emw--color-typography, #1E1638);border-radius:99px;min-width:160px;height:36px;font-size:var(--emw--font-size-small-plus, 16px);font-weight:var(--emw--font-weight-bold, 700);position:relative;font-family:\"Montserrat\", sans-serif;padding:0 16px;box-sizing:border-box;margin:auto;border:none;cursor:pointer}.ModalFooterButtonOutlined{background:linear-gradient(var(--emw--color-background, #1E1638) 0 0) padding-box, linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%) border-box;border:2px solid transparent}.GradientText{background-image:linear-gradient(98.25deg, #FF9400 22.48%, #FEF746 131.02%, #FFE24A 131.9%);color:transparent;background-clip:text}.ManyActions{display:flex;width:100%;flex-direction:column;align-items:stretch}.ManyActions .ModalFooterButton,.ManyActions .ModalFooterButtonOutlined{width:280px}.ManyActions button:first-child{margin-bottom:16px}.Disabled{opacity:0.5;pointer-events:none;cursor:auto}.ModalReward{font-weight:var(--emw--font-weight-semibold, 600);color:var(--emw--color-typography, #FFFFFF);word-break:break-word}.JackpotWinText{margin:0;font-weight:var(--emw--font-weight-bold, 600);font-size:16px;line-height:20px;color:var(--emw--color-typography, #FFF)}.JackpotWinAmount{margin-top:8px;box-shadow:-0.41px 0.41px 0px 0px rgba(0, 0, 0, 0.1490196078), -0.41px 0.41px 2px 0px rgba(0, 0, 0, 0.5019607843);background:linear-gradient(180deg, #FFB801 15.86%, #FEF746 31.36%, #FBFFE0 36.86%, #FFFA60 47.86%, #FF9400 87.36%);-webkit-text-fill-color:transparent;-webkit-background-clip:text;font-weight:900;font-size:16px;line-height:16px}.SupportInfo{margin-top:20px}.ModalContainer.Mobile .ModalFooterButton,.ModalContainer.Mobile .ModalFooterButtonOutlined{font-size:var(--emw--font-size-small, 14px);min-width:140px;height:32px}.ModalContainer.Mobile .ManyActions .ModalFooterButton,.ModalContainer.Mobile .ManyActions .ModalFooterButtonOutlined{width:100%;height:32px}.ModalContainer.Mobile .ManyActions button:first-child{margin-bottom:8px}.ModalContainer.Mobile .JackpotWinText{font-size:14px;line-height:16px}.ModalContainer.Mobile .JackpotWinAmount{font-size:14px;line-height:14px}.LeftAlign{text-align:left;line-height:1.2}";
104
+ const CasinoEngagementSuiteModalContainerStyle0 = casinoEngagementSuiteModalContainerCss;
105
+
106
+ const CasinoEngagementSuiteModalContainer = class {
107
+ constructor(hostRef) {
108
+ index.registerInstance(this, hostRef);
109
+ this.closeModal = index.createEvent(this, "closeModal", 7);
110
+ this.handleCloseClick = (e) => {
111
+ const type = e.currentTarget.getAttribute('data-type');
112
+ this.closeModal.emit(type);
113
+ };
114
+ this.handleChallengeAttendance = () => {
115
+ window.postMessage({
116
+ type: 'ChallengeJoinRequest',
117
+ data: this.confirmationData,
118
+ });
119
+ };
120
+ this.setClientStyling = () => {
121
+ let sheet = document.createElement('style');
122
+ sheet.innerHTML = this.clientStyling;
123
+ this.host.prepend(sheet);
124
+ };
125
+ this.setClientStylingURL = () => {
126
+ let url = new URL(this.clientStylingUrl);
127
+ let cssFile = document.createElement('style');
128
+ fetch(url.href)
129
+ .then((res) => res.text())
130
+ .then((data) => {
131
+ cssFile.innerHTML = data;
132
+ setTimeout(() => { this.host.prepend(cssFile); }, 1);
133
+ })
134
+ .catch((err) => {
135
+ console.log('Error ', err);
136
+ });
137
+ };
138
+ this.isModalOpen = (type) => {
139
+ return Boolean(this.openModals.find(el => el === type));
140
+ };
141
+ this.clientStyling = '';
142
+ this.clientStylingUrl = '';
143
+ this.language = 'en';
144
+ this.isJoiningToChallenge = undefined;
145
+ this.device = 'Mobile';
146
+ this.limitStylingAppends = false;
147
+ this.openModals = [];
148
+ this.rewardMessage = '';
149
+ this.hasError = false;
150
+ this.confirmationData = null;
151
+ this.winAmount = { amount: 0, currency: '' };
152
+ }
153
+ openModalHandler(event) {
154
+ const { modalType, rewardMessage, hasError, confirmationData, winAmount } = event.detail;
155
+ if (winAmount) {
156
+ // If jackpot win modal is already opened
157
+ // add won amount to the previous amount
158
+ if (this.isModalOpen('JACKPOT_REWARD_MODAL')) {
159
+ this.winAmount = { amount: this.winAmount.amount + winAmount.amount, currency: winAmount.currency };
160
+ }
161
+ else {
162
+ this.winAmount = winAmount;
163
+ }
164
+ }
165
+ this.openModals = [...this.openModals, modalType];
166
+ this.rewardMessage = rewardMessage;
167
+ this.hasError = hasError;
168
+ if (confirmationData) {
169
+ this.confirmationData = confirmationData;
170
+ }
171
+ }
172
+ closeModalHandler(event) {
173
+ this.openModals = this.openModals.filter(el => el !== event.detail);
174
+ }
175
+ componentDidRender() {
176
+ if (!this.limitStylingAppends && this.host) {
177
+ if (this.clientStyling)
178
+ this.setClientStyling();
179
+ if (this.clientStylingUrl)
180
+ this.setClientStylingURL();
181
+ this.limitStylingAppends = true;
182
+ }
183
+ }
184
+ render() {
185
+ const { ProgressToActivate } = this.confirmationData || {};
186
+ return (index.h("div", { key: '136c2521b6ce142d9c0dddf9300526e156b937d6', class: `ModalContainer ${this.device}` }, index.h("casino-engagement-suite-modal", { key: '151a21ef6d3b0e5f3d82ebe45f0a22aa519821bb', isOpen: this.isModalOpen("REWARD_MODAL"), header: "Congratulations!", contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg", modalType: "REWARD_MODAL", "show-animation": true, device: this.device }, index.h("div", { key: '00d4a4ea4d1a790d68a06156b4829b1b181c072f', slot: "body" }, index.h("div", { key: 'dff1a278e656acaec2aa5045a54dd12226f5ac61' }, translate('won', this.language), " ", index.h("span", { key: 'bf8eccf6e0221fab5fb319ca05a61917956dc2b0', class: 'ModalReward' }, this.rewardMessage)), this.hasError && (index.h("div", { key: 'b9ab84114f91fc3e2d80bc5871afd804abb3daab', class: "SupportInfo" }, translate('supportInfo', this.language)))), index.h("div", { key: 'e45e9a072f5cf1bb5d36d232896dffbeff110621', slot: "footer" }, index.h("button", { key: 'c76d8b69e2ceef4f93fd01319b79e09e638e4212', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'REWARD_MODAL' }, translate('continue', this.language)))), index.h("casino-engagement-suite-modal", { key: 'cd1500c95db9670004deaee3f374aff36dbdb156', isOpen: this.isModalOpen("JACKPOT_REWARD_MODAL"), header: "Congratulations!", contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/cup-reward.svg", "show-animation": true, modalType: "JACKPOT_REWARD_MODAL", device: this.device }, index.h("div", { key: 'a6832af4eb48940d5c573ed906a7511082c1b59e', slot: "body" }, index.h("div", { key: 'ad484526c5fbfcd2aa8280f6050c573022b6c04e', class: "JackpotWinText" }, translate('jackpotWin', this.language)), index.h("div", { key: '3475b1d2824afd37f07cfbbe7db97b15f56f9772', class: "JackpotWinAmount" }, formatBalance(this.winAmount.amount, this.winAmount.currency))), index.h("div", { key: 'd5da13989c807d509a307fe21e5eb37d2f417926', slot: "footer" }, index.h("button", { key: '43b080260542d91712e8ae956e6e97e4d51ba4ac', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'JACKPOT_REWARD_MODAL' }, translate('continue', this.language)), index.h("div", { key: '145b2a136d92cdf575267d9350ea8c673cac6a21', class: "JackpotWinInfoText" }, translate('jackpotWinInfo', this.language)))), index.h("casino-engagement-suite-modal", { key: 'ef905b8a730bdae1f03711fecef7b32b15b8d98d', isOpen: this.isModalOpen("TARGET_MODAL"), header: ProgressToActivate ?
187
+ translate('joinHeader', this.language) :
188
+ translate('unJoinHeader', this.language), modalType: "TARGET_MODAL", device: this.device, isLoading: this.isJoiningToChallenge }, index.h("div", { key: 'cf234ba1fef13cade20db68b8a5c8973fe7a2285', slot: "body" }, index.h("div", { key: '1ed85c4005cf467491b96e4a1ecc76f635bae15d', class: 'LeftAlign' }, translate('desc', this.language)), index.h("div", { key: '1cbad96502b6fc3d730ae7301e062728e1030cd6', class: 'LeftAlignQuestion' }, ProgressToActivate ?
189
+ translate('joinQuestion', this.language) :
190
+ translate('unJoinQuestion', this.language))), index.h("div", { key: 'c288c8eddba30f36c4aa9d59c12c47c84033cecd', slot: "footer", class: 'ManyActions' }, index.h("button", { key: '184eddbe4d080628f87ab863b2f045d85a2122d5', class: `ModalFooterButton ${this.isJoiningToChallenge ? 'Disabled' : ''}`, onClick: this.handleChallengeAttendance }, ProgressToActivate ?
191
+ translate('joinConfirm', this.language) :
192
+ translate('unJoinConfirm', this.language)), index.h("button", { key: 'aa165d256092a64d907645cc62102156d4caf02b', class: `ModalFooterButtonOutlined ${this.isJoiningToChallenge ? 'Disabled' : ''}`, onClick: this.handleCloseClick, "data-type": 'TARGET_MODAL' }, index.h("div", { key: '5bb286abafdd1676ddb3080fc1e96adfd68af39f', class: 'GradientText' }, ProgressToActivate ?
193
+ translate('joinReject', this.language) :
194
+ translate('unJoinReject', this.language))))), index.h("casino-engagement-suite-modal", { key: '44ab65b8618af413b70e647ba6d497a581dbff91', isOpen: this.isModalOpen("SUPPORT_MODAL"), header: translate('noReward', this.language), contentIcon: "https://static.everymatrix.com/gic/img/engagement-suite/alert.svg", modalType: "SUPPORT_MODAL", device: this.device }, index.h("div", { key: 'fe6cff805502a17e61d4c9bae8a434635f708e58', slot: "body" }, index.h("span", { key: 'aae084da0430fc62a484f16c1fe7dc1278955b5e' }, translate('contactSupport', this.language))), index.h("div", { key: 'ff10b11d061bfafe306491afe8461da76dfd991c', slot: "footer" }, index.h("button", { key: 'ae2a9345e70d5dd24c7c52aa15a3734464074f81', class: 'ModalFooterButton', onClick: this.handleCloseClick, "data-type": 'SUPPORT_MODAL' }, translate('okContinue', this.language))))));
195
+ }
196
+ get host() { return index.getElement(this); }
197
+ };
198
+ CasinoEngagementSuiteModalContainer.style = CasinoEngagementSuiteModalContainerStyle0;
199
+
200
+ exports.casino_engagement_suite_modal = CasinoEngagementSuiteModal;
201
+ exports.casino_engagement_suite_modal_container = CasinoEngagementSuiteModalContainer;