@everymatrix/casino-challenges-overlay-slider 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-challenges-overlay-slider/app-globals-0f993ce5.js +1 -0
- package/dist/casino-challenges-overlay-slider/casino-challenges-overlay-card_2.entry.js +1 -0
- package/dist/casino-challenges-overlay-slider/casino-challenges-overlay-slider-2eb80eb5.js +1 -0
- package/dist/casino-challenges-overlay-slider/casino-challenges-overlay-slider.esm.js +1 -0
- package/dist/casino-challenges-overlay-slider/index-9e63661c.js +2 -0
- package/dist/casino-challenges-overlay-slider/index.esm.js +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-challenges-overlay-card_2.cjs.entry.js +164 -0
- package/dist/cjs/casino-challenges-overlay-slider-bf3e8c30.js +412 -0
- package/dist/cjs/casino-challenges-overlay-slider.cjs.js +25 -0
- package/dist/cjs/index-180bdedd.js +1248 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/collection/assets/left_arrow.svg +3 -0
- package/dist/collection/assets/right_arrow.svg +3 -0
- package/dist/collection/collection-manifest.json +13 -0
- package/dist/collection/components/casino-challenges-overlay-slider/casino-challenges-overlay-slider.css +98 -0
- package/dist/collection/components/casino-challenges-overlay-slider/casino-challenges-overlay-slider.js +450 -0
- package/dist/collection/components/casino-challenges-overlay-slider/components/casino-challenges-overlay-card.css +107 -0
- package/dist/collection/components/casino-challenges-overlay-slider/components/casino-challenges-overlay-card.js +260 -0
- package/dist/collection/components/casino-challenges-overlay-slider/index.js +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +48 -0
- package/dist/collection/utils/types.js +52 -0
- package/dist/collection/utils/utils.js +20 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-challenges-overlay-card_2.entry.js +160 -0
- package/dist/esm/casino-challenges-overlay-slider-2eb80eb5.js +409 -0
- package/dist/esm/casino-challenges-overlay-slider.js +20 -0
- package/dist/esm/index-9e63661c.js +1220 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil.config.dev.js +19 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +43 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/packages/stencil/casino-challenges-overlay-slider/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/packages/stencil/casino-challenges-overlay-slider/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/packages/stencil/casino-challenges-overlay-slider/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/packages/stencil/casino-challenges-overlay-slider/storybook/preview.d.ts +70 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/tools/plugins/index.d.ts +4 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-challenges-overlay-slider/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/casino-challenges-overlay-slider/casino-challenges-overlay-slider.d.ts +53 -0
- package/dist/types/components/casino-challenges-overlay-slider/components/casino-challenges-overlay-card.d.ts +22 -0
- package/dist/types/components/casino-challenges-overlay-slider/index.d.ts +1 -0
- package/dist/types/components.d.ts +118 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +3 -0
- package/dist/types/utils/types.d.ts +120 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +27 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as n,h as s,H as a}from"./index-9e63661c.js";import{t as i}from"./casino-challenges-overlay-slider-2eb80eb5.js";export{C as casino_challenges_overlay_slider}from"./casino-challenges-overlay-slider-2eb80eb5.js";var t,l,r,d,o;!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",e[e.BonusProgram=5]="BonusProgram",e[e.LoyaltyEngine=6]="LoyaltyEngine"}(t||(t={})),function(e){e[e.Closed=0]="Closed",e[e.InProgress=1]="InProgress",e[e.Fillup=2]="Fillup",e[e.Completed=3]="Completed"}(l||(l={})),function(e){e[e.Draft=0]="Draft",e[e.Enabled=1]="Enabled",e[e.Paused=2]="Paused",e[e.Closed=3]="Closed",e[e.Deleted=4]="Deleted"}(r||(r={})),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",e[e.Awaiting=6]="Awaiting",e[e.Paused=7]="Paused"}(d||(d={})),function(e){e[e.Accumulative=0]="Accumulative",e[e.SingleBet=1]="SingleBet",e[e.MultipleOneBetSize=2]="MultipleOneBetSize"}(o||(o={}));const c=["started","inProgress","pendingLevelReward","completed","expired","forfeited","awaiting","paused"],h=class{constructor(a){e(this,a),this.challengeExpired=n(this,"challengeExpired",7),this.getBadgeContent=()=>{var e;if((null===(e=this.challenge)||void 0===e?void 0:e.ChallengeStatus)===r.Paused)return s("span",{class:"status"},i("unavailable",this.language));switch(this.challenge.Status){case d.Expired:return s("span",{class:"status"},i("expired",this.language));case d.Forfeited:return s("span",{class:"status"},i("forfeited",this.language));case d.Completed:return s("span",{class:"status"},i("finished",this.language));case d.Paused:return s("span",{class:"status"},i("suspended",this.language));default:return this.timeLeft?[i("endsIn",this.language)," - ",s("span",{class:"timer"},this.timeLeft)]:s("span",{class:"status"},i("expired",this.language))}},this.challenge=void 0,this.index=void 0,this.arrLength=void 0,this.currentIndex=void 0,this.language=void 0,this.isOptedOut=!1,this.slideWidth=void 0,this.slideHeight=void 0,this.timeLeft=void 0}connectedCallback(){this.timerId||(this.timerId=setInterval((()=>{this.updateTime()}),1e3))}disconnectedCallback(){clearInterval(this.timerId)}componentWillLoad(){this.updateTime()}updateTime(){var e;this.timeLeft=function(e){const n=new Date;let s=new Date(e).getTime()-n.getTime();if(s<=0)return;const a=Math.floor(s/864e5);s-=864e5*a;const i=Math.floor(s/36e5);s-=36e5*i;const t=Math.floor(s/6e4);s-=6e4*t;const l=Math.floor(s/1e3),r=e=>e.toString().padStart(2,"0");return`${r(a)} : ${r(i)} : ${r(t)} : ${r(l)}`}(null===(e=this.challenge)||void 0===e?void 0:e.ExpirationTime),this.timeLeft||(clearInterval(this.timerId),this.challengeExpired.emit(this.challenge.Id))}isItemActive(){return this.index===this.currentIndex||1===this.index&&this.currentIndex===this.arrLength-1||this.index===this.arrLength-2&&0===this.currentIndex}render(){var e,n,i,t,l,o,h,g;const b=(null===(e=this.challenge)||void 0===e?void 0:e.ChallengeStatus)===r.Paused;return s(a,{key:"5491e59a4439d23a7cd68d0e28af1a7b5d650925"},s("div",{class:{challenges__slide:!0,active:this.isItemActive(),grayed:[d.Expired,d.Forfeited,d.Completed].includes(null===(n=this.challenge)||void 0===n?void 0:n.Status)||b||this.isOptedOut},key:`${null===(i=this.challenge)||void 0===i?void 0:i.Id}-${this.index}`},s("div",{key:"8c10ad8fc780c314af68443c5c81057d3e88668b",class:"challenges__slide__image-wrapper",style:{width:`${this.slideWidth}px`,height:`${this.slideHeight}px`}},s("img",{key:"3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2",src:null===(l=null===(t=this.challenge)||void 0===t?void 0:t.ChallengePresentation)||void 0===l?void 0:l.BannerUrl,alt:""})),s("h1",{key:"e03556b748fda30202b3b80c2c84cf9dc3471168",class:"challenges__slide__title",style:{"max-width":this.slideWidth-28+"px"}},null===(h=null===(o=this.challenge)||void 0===o?void 0:o.ChallengePresentation)||void 0===h?void 0:h.PresentationName),s("div",{key:"9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9",class:`challenges__slide__badge ${(null===(g=this.challenge)||void 0===g?void 0:g.ChallengeStatus)!==r.Paused?c[this.challenge.Status]:"unavailable"}`},this.getBadgeContent())))}};h.style='.challenges__slide {\n align-content: center;\n flex-shrink: 0;\n transform: scale(0.8);\n opacity: 0.5;\n transition: transform 0.25s ease, opacity 0.25s ease;\n filter: blur(1px);\n position: relative;\n font-family: var(--emw--font-family-primary, "Teachers"), sans-serif;\n}\n.challenges__slide.active {\n transform: scale(1);\n opacity: 1;\n filter: blur(0);\n}\n.challenges__slide.active .challenges__slide__image-wrapper {\n border: 3px solid var(--emw--img-bg-color, rgba(255, 255, 255, 0.3019607843));\n box-shadow: var(--emw--img-box-shadow, rgba(102, 102, 102, 0.3019607843) 0 0 10px 10px);\n box-sizing: border-box;\n}\n.challenges__slide.grayed .challenges__slide__image-wrapper img {\n opacity: 0.5;\n}\n.challenges__slide__title {\n color: white;\n position: absolute;\n bottom: 20px;\n left: 12px;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: 500;\n margin: 0;\n max-width: 319px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.challenges__slide__badge {\n box-sizing: border-box;\n align-content: center;\n color: var(--emw--badge-font-color, #f4eff4);\n font-size: var(--emw--font-size-xs-small, 13px);\n font-weight: 400;\n position: absolute;\n top: 10px;\n left: 12px;\n padding: 2px 3px;\n border: 1px solid var(--emw--dot-button-active-bg, rgba(255, 255, 255, 0.2));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n backdrop-filter: blur(4.5px);\n border-radius: 15px;\n}\n.challenges__slide__badge .status {\n height: 19px;\n display: inline-flex;\n align-items: center;\n border-radius: 15px;\n border: 1px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n padding: 0 8px 0 6px;\n}\n.challenges__slide__badge .status::before {\n content: "";\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n margin-right: 5px;\n flex-shrink: 0;\n}\n.challenges__slide__badge .timer {\n font-weight: 700;\n padding-right: 4px;\n}\n.challenges__slide__badge.unavailable .status::before, .challenges__slide__badge.expired .status::before {\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n}\n.challenges__slide__badge.completed .status::before {\n background: var(--emw--background-green-color, #00b541);\n}\n.challenges__slide__badge.forfeited .status::before {\n background: var(--emw--status-badge-red-bg, #d63d1e);\n}\n.challenges__slide__badge.paused .status::before {\n background: var(--emw--status-badge-yellow-bg, #ffb801);\n}\n.challenges__slide__badge:has(.timer) {\n padding-left: 6px;\n}\n.challenges__slide__image-wrapper {\n position: relative;\n border-radius: 16px;\n overflow: hidden;\n}\n.challenges__slide__image-wrapper img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.challenges__slide * {\n pointer-events: none;\n}\n\n@container challenges-drawer (width <= 500px) {\n .challenges__slide__title {\n bottom: 12px;\n }\n}';export{h as casino_challenges_overlay_card}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e}from"./index-9e63661c.js";const s="__WIDGET_GLOBAL_STYLE_CACHE__";function n(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function h(t,i){if(!t||!i)return;const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function o(t,i,e,n=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!n)return e=function(t,i){const e=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{t&&(e.innerHTML=i,t.appendChild(e))}))}(t,i),e;window[s]||(window[s]={}),e=function(t,i){return window.emMessageBus.subscribe(i,(e=>{if(!t)return;const n=t.getRootNode(),h=window[s];let o=h[i]&&h[i].sheet;o?h[i].refCount=h[i].refCount+1:(o=new CSSStyleSheet,o.replaceSync(e),h[i]={sheet:o,refCount:1});const a=n.adoptedStyleSheets||[];a.includes(o)||(n.adoptedStyleSheets=[...a,o])}))}(t,i);const h=e.unsubscribe.bind(e);return e.unsubscribe=()=>{if(window[s][i]){const t=window[s][i];t.refCount>1?t.refCount=t.refCount-1:delete window[s][i]}h()},e}const a={en:{endsIn:"Ends In",expired:"Expired",forfeited:"Forfeited",finished:"Finished",suspended:"Suspended",unavailable:"Unavailable"},da:{endsIn:"Ends In",expired:"Expired",forfeited:"Forfeited",finished:"Finished",suspended:"Suspended",unavailable:"Unavailable"}},l=(t,i)=>a[void 0!==i&&i in a?i:"en"][t],r=class{constructor(e){t(this,e),this.activeChallengeChange=i(this,"activeChallengeChange",7),this.slideGap=0,this.isDragging=!1,this.startX=0,this.currentTranslate=0,this.baseTranslate=0,this.slideWidthToContainer=.57,this.slideHeightToContainer=.3,this.next=()=>{this.currentIndex++,this.setPositionByIndex(),this.currentIndex===this.challenges.length+1&&setTimeout((()=>this.scheduleReset(1)),250)},this.prev=()=>{this.currentIndex--,this.setPositionByIndex();const t=this.challenges.length;0===this.currentIndex&&setTimeout((()=>this.scheduleReset(t)),250)},this.onPointerDown=t=>{var i;this.isOneSlide||(this.isDragging=!0,this.startX=t.clientX,this.baseTranslate=this.getBaseTranslate(),null===(i=this.sliderContainer)||void 0===i||i.setPointerCapture(t.pointerId))},this.onPointerMove=t=>{this.isDragging&&(this.currentTranslate=this.baseTranslate+(t.clientX-this.startX),this.setSliderPosition(this.currentTranslate))},this.onPointerUp=t=>{var i;if(!this.isDragging)return;this.isDragging=!1,null===(i=this.sliderContainer)||void 0===i||i.releasePointerCapture(t.pointerId);const e=this.currentTranslate-this.getBaseTranslate();e<-50?this.next():e>50?this.prev():this.setPositionByIndex()},this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.isMobile=!1,this.challenges=void 0,this.initialProgressId="",this.activeTabIndex="",this.currentIndex=null,this.slideWidth=0,this.slideHeight=0,this.isOneSlide=!1}handleClientStylingChange(t,i){t!=i&&n(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&h(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,i){t!=i&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}onCurrentIndexChange(t,i){if(null!==i&&t!==i&&t>0){const i=this.challenges[t-1];this.activeChallengeChange.emit(null==i?void 0:i.Id)}}onChallengesChange(t){this.isOneSlide=1===t.length}onInitialProgressIdChange(t,i){t!=i&&this.updateCurrentIndex()}componentWillLoad(){this.translationUrl&&(async t=>{if(t)try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const s=await e.json();i=s,Object.keys(i).forEach((t=>{a[t]||(a[t]={});for(let e in i[t])a[t][e]=i[t][e]}))}catch(t){console.error("Failed to fetch or parse translations from URL:",t)}var i})(this.translationUrl)}componentDidLoad(){var t;this.isOneSlide=1===(null===(t=this.challenges)||void 0===t?void 0:t.length),this.resizeObserver=new ResizeObserver((([t])=>{this.slideWidth=Math.round(t.contentRect.width*this.slideWidthToContainer),this.slideHeight=Math.round(t.contentRect.width*this.slideHeightToContainer),this.isOneSlide||this.setPositionByIndex()})),this.stylingContainer&&(this.mbSource&&o(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&h(this.stylingContainer,this.clientStylingUrl),this.resizeObserver.observe(this.stylingContainer)),this.updateCurrentIndex()}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),this.resizeObserver&&this.resizeObserver.disconnect()}updateCurrentIndex(){this.isOneSlide?(this.currentIndex=0,this.setSliderPosition(0)):requestAnimationFrame((()=>{var t;const i=(null===(t=this.challenges)||void 0===t?void 0:t.findIndex((t=>(null==t?void 0:t.Id)===this.initialProgressId)))||0;this.currentIndex=i+1,this.setPositionByIndex(!1)}))}setSliderPosition(t){this.sliderContainer&&(this.sliderContainer.style.transform=`translateX(${t}px)`)}getCarouselItems(){const t=this.challenges;return t.length<=1?t:[t[t.length-1],...t,t[0]]}scheduleReset(t){this.sliderContainer&&requestAnimationFrame((()=>{requestAnimationFrame((()=>{const i=this.sliderContainer;i.style.transition="none",this.currentIndex=t,this.setPositionByIndex(!1),requestAnimationFrame((()=>{i.style.transition=""}))}))}))}setPositionByIndex(t=!0){this.sliderContainer&&(this.currentTranslate=-(this.slideWidth+this.slideGap)*this.currentIndex+(this.sliderContainer.clientWidth-this.slideWidth)/2,t||this.disableTransition(),this.setSliderPosition(this.currentTranslate))}getBaseTranslate(){var t,i;const e=null===(t=this.sliderContainer)||void 0===t?void 0:t.querySelector(".challenges__slide"),s=null===(i=this.sliderContainer)||void 0===i?void 0:i.parentElement;if(!e||!s)return 0;const n=e.clientWidth;return-(n+this.slideGap)*this.currentIndex+(s.clientWidth-n)/2}disableTransition(){this.sliderContainer&&(this.sliderContainer.style.transition="none",requestAnimationFrame((()=>{this.sliderContainer.style.transition=""})))}goToSlide(t){this.currentIndex=t+1,this.setPositionByIndex()}getRealIndex(){const t=this.challenges.length;return 0===this.currentIndex?t-1:this.currentIndex===t+1?0:this.currentIndex-1}render(){return e("div",{key:"25e34524b9a1fb6fcd4b164f5f3d58a58173ed09",class:{"slider-container":!0,mobile:this.isMobile,"one-slide":this.isOneSlide},ref:t=>this.stylingContainer=t},e("div",{key:"1f77218efd7201eb0de40405d7128168d5bb2a64",class:"challenges__slider-wrapper",onPointerDown:this.onPointerDown,onPointerMove:this.onPointerMove,onPointerUp:this.onPointerUp,onPointerLeave:this.onPointerUp},e("div",{key:"623e0d69197edea0a4a01a670bc678e2c99af735",class:"challenges__slider",ref:t=>this.sliderContainer=t},this.getCarouselItems().map(((t,i,s)=>e("casino-challenges-overlay-card",{challenge:t,index:i,arrLength:s.length,currentIndex:this.currentIndex,slideWidth:this.slideWidth,slideHeight:this.slideHeight}))))),this.challenges.length>1&&e("div",{key:"ffc80e15f608761c6b830dd6f8ed19ebf7a2498e"},e("button",{key:"0403fb4615605c33ef596c74ae2427b5e823b7d9",class:"action-button action-button--prev",onClick:this.prev},e("img",{key:"de3536ec00f15de6240d3c7da032b9584fffbc92",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDggMTUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik03LjE2ODk1IDEzLjgzNTNMMC41MDIyNzggNy4xNjg2Mkw3LjE2ODk1IDAuNTAxOTUzIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjEuMDA0NTkiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",alt:""})),e("button",{key:"84cc6967ded946264bde8db938c8e5541ace145c",class:"action-button action-button--next",onClick:this.next},e("img",{key:"f6e8d44662f3ca55866001d90d41f66c4a5f6f04",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSIxNSIgdmlld0JveD0iMCAwIDggMTUiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0wLjUwMTk1MyAxMy44MzUzTDcuMTY4NjIgNy4xNjg2MkwwLjUwMTk1MyAwLjUwMTk1MyIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjAwNDU5IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==",alt:""})),e("div",{key:"25124a8bb6d0fc72086e69e20b6fc2f41986999e",class:"challenges__slider-dots"},this.challenges.map(((t,i)=>e("span",{class:{"challenges__slider-dot":!0,active:i===this.getRealIndex()},onClick:()=>{this.goToSlide(i)}}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],currentIndex:["onCurrentIndexChange"],challenges:["onChallengesChange"],initialProgressId:["onInitialProgressIdChange"]}}};r.style='@import url("https://fonts.googleapis.com/css2?family=Teachers:ital,wght@0,400..800;1,400..800&display=swap"); .one-slide .challenges__slider{justify-content:center;cursor:pointer;transition:none}.slider-container{position:relative}.challenges__slider-wrapper{overflow:hidden;width:100%}.challenges__slider{display:flex;transition:transform 0.25s ease;will-change:transform;touch-action:pan-y;user-select:none;cursor:grab}.challenges__slider.active{cursor:grabbing}.challenges__slider-dots{display:flex;justify-content:center;margin-top:10px}.challenges__slider-dot{width:7px;height:7px;border-radius:50%;background:var(--emw--dot-button-bg, rgba(255, 255, 255, 0.1490196078));margin:4px;cursor:pointer;transition:0.2s}.challenges__slider-dot.active{width:29px;border-radius:8px;background:var(--emw--dot-button-active-bg, rgba(255, 255, 255, 0.2))}.action-button{position:absolute;top:42%;transform:translateY(-50%);stroke:white;width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:2px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));background:var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));backdrop-filter:blur(9.5px);cursor:pointer}.action-button--prev{left:30px}.action-button--next{right:30px}.mobile .challenges__slider-dot{width:5px;height:5px;margin:2px}.mobile .challenges__slider-dot.active{width:18px}.mobile .challenges__slide__image-wrapper{width:240px;height:122px}.mobile .challenges__slide__title{bottom:8px;left:8px;font-size:var(--emw--font-size-small, 14px);max-width:224px}.mobile .challenges__slide__badge{top:8px;left:8px;font-size:var(--emw--font-size-2x-small, 11px)}.mobile .challenges__slide__badge .status{height:17px}.mobile .action-button{display:none}';export{r as C,l as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as e,b as n}from"./index-9e63661c.js";export{s as setNonce}from"./index-9e63661c.js";import{g as i}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,i={};return""!==n&&(i.resourcesUrl=new URL(".",n).href),e(i)})().then((async e=>(await i(),n([["casino-challenges-overlay-card_2",[[1,"casino-challenges-overlay-slider",{mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],language:[513],isMobile:[516,"is-mobile"],challenges:[16],initialProgressId:[1,"initial-progress-id"],activeTabIndex:[1,"active-tab-index"],currentIndex:[32],slideWidth:[32],slideHeight:[32],isOneSlide:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],currentIndex:["onCurrentIndexChange"],challenges:["onChallengesChange"],initialProgressId:["onInitialProgressIdChange"]}],[0,"casino-challenges-overlay-card",{challenge:[16],index:[2],arrLength:[2,"arr-length"],currentIndex:[2,"current-index"],language:[1],isOptedOut:[4,"is-opted-out"],slideWidth:[2,"slide-width"],slideHeight:[2,"slide-height"],timeLeft:[32]}]]]],e))));
|
|
@@ -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),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",a="undefined"!=typeof window?window:{},u=a.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})(),p=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?v(w):f.raf(w))},b=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},w=()=>{b(m),b(y),(p=m.length>0)&&f.raf(w)},v=e=>h().then(e),g=$(y,!0),S={},k=e=>"object"==(e=typeof e)||"function"===e;function j(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:()=>C,map:()=>E,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),C=e=>({isOk:!1,isErr:!0,value:e});function E(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return C(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],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&&!k(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=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 a=T(e,null);return a.u=t,i.length>0&&(a.h=i),a.p=o,a},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},F=(e,t,l)=>{const o=(e=>n(e).$hostElement$)(e);return{emit:e=>H(o,t,{bubbles:!!(4&l),composed:!!(2&l),cancelable:!!(1&l),detail:e})}},H=(e,t,n)=>{const l=f.ce(t,n);return e.dispatchEvent(l),l},N=new WeakMap,U=e=>"sc-"+e.v,W=(e,t,n,l,s,r)=>{if(n!==l){let i=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("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=k(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(a,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)}}},D=/\s/,q=e=>e?e.split(D):[],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||W(l,e,o[e],void 0,n,t.l);for(const e of z(Object.keys(s)))W(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=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=u.createTextNode(l.i);else if(o=l.$=u.createElement(l.m),_(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=I(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},J=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=I(null,n,o),r&&(l[o].$=r,Z(i,r,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Y(t),e&&e.remove()}}},Q=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),X=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(_(e,t,B),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,a=0,u=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],y=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--p];else if(Q(h,m,o))X(h,m,o),h=t[++i],m=l[++c];else if(Q(d,y,o))X(d,y,o),d=t[--f],y=l[--p];else if(Q(h,y,o))X(h,y,o),Z(e,h.$,d.$.nextSibling),h=t[++i],y=l[--p];else if(Q(d,m,o))X(d,m,o),Z(e,d.$,h.$),d=t[--f],m=l[++c];else{for(a=-1,u=i;u<=f;++u)if(t[u]&&null!==t[u].p&&t[u].p===m.p){a=u;break}a>=0?(r=t[a],r.m!==m.m?s=I(t&&t[c],n,a):(X(r,m,o),t[a]=void 0,s=r.$),m=l[++c]):(s=I(t&&t[c],n,c),m=l[++c]),s&&Z(h.$.parentNode,s,h.$)}i>f?J(e,null==l[p+1]?null:l[p+1].$,n,l,c,p):c>p&&K(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),J(l,null,t,s,0,s.length-1)):null!==o&&K(o,0,o.length-1)):e.i!==r&&(l.data=r)},Y=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Y)},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.k),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`);let l;return t&&(l=ae(n,"componentWillLoad")),le(l,(()=>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.j,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=U(t),o=i.get(l);if(e=11===e.nodeType?e:u,o)if("string"==typeof o){let s,r=N.get(e=e.head||e);if(r||N.set(e,r=new Set),!r.has(l)){{s=u.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:j(u);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);re(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ie(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},re=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.j,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],X(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.t,l=e.k;64&e.l||(e.l|=64,ue(t),ae(n,"componentDidLoad"),e.P(t),l||ce()),e.S&&(e.S(),e.S=void 0),512&e.l&&v((()=>te(e,!1))),e.l&=-517},ce=()=>{ue(u.documentElement),v((()=>H(a,"appload",{detail:{namespace:"casino-challenges-overlay-slider"}})))},ae=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ue=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.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 r=n(e);if(!r)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=r.$hostElement$,c=r.T.get(t),a=r.l,u=r.t;if(l=((e,t)=>null==e||k(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.L[t][0]),(!(8&a)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),u)){if(o.R&&128&a){const e=o.R[t];e&&e.map((e=>{try{u[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&a)&&te(r,!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.R)?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!=(r=t.R)?r:{}),...c.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.M)||o.push([e,s])),s}))]))}}return e},he=e=>{ae(e,"connectedCallback")},de=e=>{ae(e,"disconnectedCallback")},pe=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=a.customElements,y=u.head,$=y.querySelector("meta[charset]"),b=u.createElement("style"),w=[];let v,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",u.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const a=c.v,u=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,j:n,T:new Map};l.F=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),v&&(clearTimeout(v),v=null),g?w.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.j,o=()=>{};if(1&t.l)(null==t?void 0:t.t)?he(t.t):(null==t?void 0:t.F)&&t.F.then((()=>he(t.t)));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.k=n);break}}l.L&&Object.entries(l.L).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.H){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.H;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.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.N}" was not found`);l.isProxied||(n.R=l.watchers,fe(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o(),he(t.t)}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=U(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.k,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);(null==e?void 0:e.t)?de(e.t):(null==e?void 0:e.F)&&e.F.then((()=>de(e.t)))}})()))}componentOnReady(){return n(this).F}};c.H=e[0],p.includes(a)||m.get(a)||(h.push(a),m.define(a,fe(u,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const e=null!=(o=f.O)?o:j(u);null!=e&&b.setAttribute("nonce",e),y.insertBefore(b,$?$.nextSibling:y.firstChild)}g=!1,w.length?w.map((e=>e.connectedCallback())):f.jmp((()=>v=setTimeout(ce,30)))},me=e=>f.O=e;export{A as H,pe as b,F as c,R as h,h as p,l as r,me as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{C as CasinoChallengesOverlaySlider}from"./casino-challenges-overlay-slider-2eb80eb5.js";import"./index-9e63661c.js";
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-180bdedd.js');
|
|
6
|
+
const casinoChallengesOverlaySlider = require('./casino-challenges-overlay-slider-bf3e8c30.js');
|
|
7
|
+
|
|
8
|
+
var EChallengeRewardType;
|
|
9
|
+
(function (EChallengeRewardType) {
|
|
10
|
+
EChallengeRewardType[EChallengeRewardType["FreeSpins"] = 0] = "FreeSpins";
|
|
11
|
+
EChallengeRewardType[EChallengeRewardType["LuckyWheel"] = 1] = "LuckyWheel";
|
|
12
|
+
EChallengeRewardType[EChallengeRewardType["Leaderboard"] = 2] = "Leaderboard";
|
|
13
|
+
EChallengeRewardType[EChallengeRewardType["Challenge"] = 3] = "Challenge";
|
|
14
|
+
EChallengeRewardType[EChallengeRewardType["Custom"] = 4] = "Custom";
|
|
15
|
+
EChallengeRewardType[EChallengeRewardType["BonusProgram"] = 5] = "BonusProgram";
|
|
16
|
+
EChallengeRewardType[EChallengeRewardType["LoyaltyEngine"] = 6] = "LoyaltyEngine";
|
|
17
|
+
})(EChallengeRewardType || (EChallengeRewardType = {}));
|
|
18
|
+
var EChallengeProgressLevelStatus;
|
|
19
|
+
(function (EChallengeProgressLevelStatus) {
|
|
20
|
+
EChallengeProgressLevelStatus[EChallengeProgressLevelStatus["Closed"] = 0] = "Closed";
|
|
21
|
+
EChallengeProgressLevelStatus[EChallengeProgressLevelStatus["InProgress"] = 1] = "InProgress";
|
|
22
|
+
EChallengeProgressLevelStatus[EChallengeProgressLevelStatus["Fillup"] = 2] = "Fillup";
|
|
23
|
+
EChallengeProgressLevelStatus[EChallengeProgressLevelStatus["Completed"] = 3] = "Completed";
|
|
24
|
+
})(EChallengeProgressLevelStatus || (EChallengeProgressLevelStatus = {}));
|
|
25
|
+
var EChallengeStatus;
|
|
26
|
+
(function (EChallengeStatus) {
|
|
27
|
+
EChallengeStatus[EChallengeStatus["Draft"] = 0] = "Draft";
|
|
28
|
+
EChallengeStatus[EChallengeStatus["Enabled"] = 1] = "Enabled";
|
|
29
|
+
EChallengeStatus[EChallengeStatus["Paused"] = 2] = "Paused";
|
|
30
|
+
EChallengeStatus[EChallengeStatus["Closed"] = 3] = "Closed";
|
|
31
|
+
EChallengeStatus[EChallengeStatus["Deleted"] = 4] = "Deleted";
|
|
32
|
+
})(EChallengeStatus || (EChallengeStatus = {}));
|
|
33
|
+
var EChallengeProgressStatus;
|
|
34
|
+
(function (EChallengeProgressStatus) {
|
|
35
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Started"] = 0] = "Started";
|
|
36
|
+
EChallengeProgressStatus[EChallengeProgressStatus["InProgress"] = 1] = "InProgress";
|
|
37
|
+
EChallengeProgressStatus[EChallengeProgressStatus["PendingLevelReward"] = 2] = "PendingLevelReward";
|
|
38
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Completed"] = 3] = "Completed";
|
|
39
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Expired"] = 4] = "Expired";
|
|
40
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Forfeited"] = 5] = "Forfeited";
|
|
41
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Awaiting"] = 6] = "Awaiting";
|
|
42
|
+
EChallengeProgressStatus[EChallengeProgressStatus["Paused"] = 7] = "Paused";
|
|
43
|
+
})(EChallengeProgressStatus || (EChallengeProgressStatus = {}));
|
|
44
|
+
var EChallengeLevelTargetType;
|
|
45
|
+
(function (EChallengeLevelTargetType) {
|
|
46
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["Accumulative"] = 0] = "Accumulative";
|
|
47
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["SingleBet"] = 1] = "SingleBet";
|
|
48
|
+
EChallengeLevelTargetType[EChallengeLevelTargetType["MultipleOneBetSize"] = 2] = "MultipleOneBetSize";
|
|
49
|
+
})(EChallengeLevelTargetType || (EChallengeLevelTargetType = {}));
|
|
50
|
+
const ChallengeStatusDictionary = [
|
|
51
|
+
'started',
|
|
52
|
+
'inProgress',
|
|
53
|
+
'pendingLevelReward',
|
|
54
|
+
'completed',
|
|
55
|
+
'expired',
|
|
56
|
+
'forfeited',
|
|
57
|
+
'awaiting',
|
|
58
|
+
'paused'
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
function getTimeLeft(endTime) {
|
|
62
|
+
const now = new Date();
|
|
63
|
+
const end = new Date(endTime);
|
|
64
|
+
let diff = end.getTime() - now.getTime();
|
|
65
|
+
if (diff <= 0) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
|
69
|
+
diff -= days * (1000 * 60 * 60 * 24);
|
|
70
|
+
const hours = Math.floor(diff / (1000 * 60 * 60));
|
|
71
|
+
diff -= hours * (1000 * 60 * 60);
|
|
72
|
+
const minutes = Math.floor(diff / (1000 * 60));
|
|
73
|
+
diff -= minutes * (1000 * 60);
|
|
74
|
+
const seconds = Math.floor(diff / 1000);
|
|
75
|
+
const pad = (n) => n.toString().padStart(2, '0');
|
|
76
|
+
return `${pad(days)} : ${pad(hours)} : ${pad(minutes)} : ${pad(seconds)}`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const casinoChallengesOverlayCardCss = ".challenges__slide {\n align-content: center;\n flex-shrink: 0;\n transform: scale(0.8);\n opacity: 0.5;\n transition: transform 0.25s ease, opacity 0.25s ease;\n filter: blur(1px);\n position: relative;\n font-family: var(--emw--font-family-primary, \"Teachers\"), sans-serif;\n}\n.challenges__slide.active {\n transform: scale(1);\n opacity: 1;\n filter: blur(0);\n}\n.challenges__slide.active .challenges__slide__image-wrapper {\n border: 3px solid var(--emw--img-bg-color, rgba(255, 255, 255, 0.3019607843));\n box-shadow: var(--emw--img-box-shadow, rgba(102, 102, 102, 0.3019607843) 0 0 10px 10px);\n box-sizing: border-box;\n}\n.challenges__slide.grayed .challenges__slide__image-wrapper img {\n opacity: 0.5;\n}\n.challenges__slide__title {\n color: white;\n position: absolute;\n bottom: 20px;\n left: 12px;\n font-size: var(--emw--font-size-medium, 16px);\n font-weight: 500;\n margin: 0;\n max-width: 319px;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.challenges__slide__badge {\n box-sizing: border-box;\n align-content: center;\n color: var(--emw--badge-font-color, #f4eff4);\n font-size: var(--emw--font-size-xs-small, 13px);\n font-weight: 400;\n position: absolute;\n top: 10px;\n left: 12px;\n padding: 2px 3px;\n border: 1px solid var(--emw--dot-button-active-bg, rgba(255, 255, 255, 0.2));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n backdrop-filter: blur(4.5px);\n border-radius: 15px;\n}\n.challenges__slide__badge .status {\n height: 19px;\n display: inline-flex;\n align-items: center;\n border-radius: 15px;\n border: 1px solid var(--emw--color-container-border, rgba(255, 255, 255, 0.0705882353));\n background: var(--emw--color-container-background, rgba(9, 9, 9, 0.5019607843));\n padding: 0 8px 0 6px;\n}\n.challenges__slide__badge .status::before {\n content: \"\";\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n margin-right: 5px;\n flex-shrink: 0;\n}\n.challenges__slide__badge .timer {\n font-weight: 700;\n padding-right: 4px;\n}\n.challenges__slide__badge.unavailable .status::before, .challenges__slide__badge.expired .status::before {\n background: var(--emw--status-badge-gray-bg, rgba(255, 255, 255, 0.5019607843));\n}\n.challenges__slide__badge.completed .status::before {\n background: var(--emw--background-green-color, #00b541);\n}\n.challenges__slide__badge.forfeited .status::before {\n background: var(--emw--status-badge-red-bg, #d63d1e);\n}\n.challenges__slide__badge.paused .status::before {\n background: var(--emw--status-badge-yellow-bg, #ffb801);\n}\n.challenges__slide__badge:has(.timer) {\n padding-left: 6px;\n}\n.challenges__slide__image-wrapper {\n position: relative;\n border-radius: 16px;\n overflow: hidden;\n}\n.challenges__slide__image-wrapper img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n}\n.challenges__slide * {\n pointer-events: none;\n}\n\n@container challenges-drawer (width <= 500px) {\n .challenges__slide__title {\n bottom: 12px;\n }\n}";
|
|
80
|
+
const CasinoChallengesOverlayCardStyle0 = casinoChallengesOverlayCardCss;
|
|
81
|
+
|
|
82
|
+
const CasinoChallengesOverlaySlider = class {
|
|
83
|
+
constructor(hostRef) {
|
|
84
|
+
index.registerInstance(this, hostRef);
|
|
85
|
+
this.challengeExpired = index.createEvent(this, "challengeExpired", 7);
|
|
86
|
+
this.getBadgeContent = () => {
|
|
87
|
+
var _a;
|
|
88
|
+
if (((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused) {
|
|
89
|
+
return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('unavailable', this.language));
|
|
90
|
+
}
|
|
91
|
+
switch (this.challenge.Status) {
|
|
92
|
+
case EChallengeProgressStatus.Expired:
|
|
93
|
+
return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('expired', this.language));
|
|
94
|
+
case EChallengeProgressStatus.Forfeited:
|
|
95
|
+
return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('forfeited', this.language));
|
|
96
|
+
case EChallengeProgressStatus.Completed:
|
|
97
|
+
return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('finished', this.language));
|
|
98
|
+
case EChallengeProgressStatus.Paused:
|
|
99
|
+
return index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('suspended', this.language));
|
|
100
|
+
default:
|
|
101
|
+
return this.timeLeft ? ([casinoChallengesOverlaySlider.translate('endsIn', this.language), ' - ', index.h("span", { class: "timer" }, this.timeLeft)]) : (index.h("span", { class: "status" }, casinoChallengesOverlaySlider.translate('expired', this.language)));
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
this.challenge = undefined;
|
|
105
|
+
this.index = undefined;
|
|
106
|
+
this.arrLength = undefined;
|
|
107
|
+
this.currentIndex = undefined;
|
|
108
|
+
this.language = undefined;
|
|
109
|
+
this.isOptedOut = false;
|
|
110
|
+
this.slideWidth = undefined;
|
|
111
|
+
this.slideHeight = undefined;
|
|
112
|
+
this.timeLeft = undefined;
|
|
113
|
+
}
|
|
114
|
+
connectedCallback() {
|
|
115
|
+
if (!this.timerId) {
|
|
116
|
+
this.timerId = setInterval(() => {
|
|
117
|
+
this.updateTime();
|
|
118
|
+
}, 1000);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
disconnectedCallback() {
|
|
122
|
+
clearInterval(this.timerId);
|
|
123
|
+
}
|
|
124
|
+
componentWillLoad() {
|
|
125
|
+
this.updateTime();
|
|
126
|
+
}
|
|
127
|
+
updateTime() {
|
|
128
|
+
var _a;
|
|
129
|
+
this.timeLeft = getTimeLeft((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ExpirationTime);
|
|
130
|
+
if (!this.timeLeft) {
|
|
131
|
+
clearInterval(this.timerId);
|
|
132
|
+
this.challengeExpired.emit(this.challenge.Id);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
isItemActive() {
|
|
136
|
+
return (this.index === this.currentIndex ||
|
|
137
|
+
(this.index === 1 && this.currentIndex === this.arrLength - 1) ||
|
|
138
|
+
(this.index === this.arrLength - 2 && this.currentIndex === 0));
|
|
139
|
+
}
|
|
140
|
+
render() {
|
|
141
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
142
|
+
const isChallengePaused = ((_a = this.challenge) === null || _a === void 0 ? void 0 : _a.ChallengeStatus) === EChallengeStatus.Paused;
|
|
143
|
+
return (index.h(index.Host, { key: '5491e59a4439d23a7cd68d0e28af1a7b5d650925' }, index.h("div", { class: {
|
|
144
|
+
challenges__slide: true,
|
|
145
|
+
active: this.isItemActive(),
|
|
146
|
+
grayed: [
|
|
147
|
+
EChallengeProgressStatus.Expired,
|
|
148
|
+
EChallengeProgressStatus.Forfeited,
|
|
149
|
+
EChallengeProgressStatus.Completed
|
|
150
|
+
].includes((_b = this.challenge) === null || _b === void 0 ? void 0 : _b.Status) ||
|
|
151
|
+
isChallengePaused ||
|
|
152
|
+
this.isOptedOut
|
|
153
|
+
}, key: `${(_c = this.challenge) === null || _c === void 0 ? void 0 : _c.Id}-${this.index}` }, index.h("div", { key: '8c10ad8fc780c314af68443c5c81057d3e88668b', class: "challenges__slide__image-wrapper", style: {
|
|
154
|
+
width: `${this.slideWidth}px`,
|
|
155
|
+
height: `${this.slideHeight}px`
|
|
156
|
+
} }, index.h("img", { key: '3e4ea68d459c17c38f112d89af7a6fa4cb8f3bb2', src: (_e = (_d = this.challenge) === null || _d === void 0 ? void 0 : _d.ChallengePresentation) === null || _e === void 0 ? void 0 : _e.BannerUrl, alt: "" })), index.h("h1", { key: 'e03556b748fda30202b3b80c2c84cf9dc3471168', class: "challenges__slide__title", style: { 'max-width': `${this.slideWidth - 28}px` } }, (_g = (_f = this.challenge) === null || _f === void 0 ? void 0 : _f.ChallengePresentation) === null || _g === void 0 ? void 0 : _g.PresentationName), index.h("div", { key: '9e72dc5d0acfe2bfe67f7ef5a1a978d686ed3cc9', class: `challenges__slide__badge ${((_h = this.challenge) === null || _h === void 0 ? void 0 : _h.ChallengeStatus) !== EChallengeStatus.Paused
|
|
157
|
+
? ChallengeStatusDictionary[this.challenge.Status]
|
|
158
|
+
: 'unavailable'}` }, this.getBadgeContent()))));
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
CasinoChallengesOverlaySlider.style = CasinoChallengesOverlayCardStyle0;
|
|
162
|
+
|
|
163
|
+
exports.casino_challenges_overlay_slider = casinoChallengesOverlaySlider.CasinoChallengesOverlaySlider;
|
|
164
|
+
exports.casino_challenges_overlay_card = CasinoChallengesOverlaySlider;
|