@everymatrix/bonus-elevate-shop-item 1.94.51 → 1.94.53
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/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider_5.entry.js +1 -0
- package/dist/bonus-elevate-shop-item/bonus-elevate-shop-item.esm.js +1 -1
- package/dist/cjs/bonus-elevate-shop-assets-slider_5.cjs.entry.js +918 -0
- package/dist/cjs/bonus-elevate-shop-item.cjs.js +1 -1
- package/dist/cjs/index-ad2fddb6.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider.js +5 -5
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.css +92 -1
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.js +85 -4
- package/dist/collection/utils/locale.utils.js +1 -0
- package/dist/esm/bonus-elevate-shop-assets-slider_5.entry.js +910 -0
- package/dist/esm/bonus-elevate-shop-item.js +1 -1
- package/dist/esm/index-fca048d8.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/libs/common/src/types/casino/tournaments.d.ts +111 -0
- package/dist/types/components/bonus-elevate-shop-item/bonus-elevate-shop-item.d.ts +11 -0
- package/dist/types/models/bonus-elevate-shop-item.d.ts +1 -0
- package/package.json +1 -1
- package/dist/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider_3.entry.js +0 -1
- package/dist/cjs/bonus-elevate-shop-assets-slider_3.cjs.entry.js +0 -600
- package/dist/esm/bonus-elevate-shop-assets-slider_3.entry.js +0 -594
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t,g as i,c as s,F as a,H as n}from"./index-fca048d8.js";const o=class{constructor(t){e(this,t),this.xDown=null,this.yDown=null,this.orientationChangeHandler=()=>{setTimeout((()=>{this.recalculateItemsPerPage()}),10)},this.resizeHandler=()=>{this.recalculateItemsPerPage()},this.showSliderDots=!1,this.showSliderArrows=!0,this.itemsPerPage=1,this.sliderItems=[],this.activeIndex=0}setActive(e){var t;const i=null===(t=this.sliderItems)||void 0===t?void 0:t.length;this.activeIndex=e>=0?e>=i-1?i-1:e:0}move(e){this.setActive(this.activeIndex+e)}goTo(e){let t=this.activeIndex-e;if(t>0)for(let e=0;e<t;e++)this.move(-1);else for(let e=0;e>t;e--)this.move(1)}handleTouchStart(e){const t=this.getTouches(e)[0];this.xDown=t.clientX,this.yDown=t.clientY}getTouches(e){return e.touches||e.originalEvent.touches}handleTouchMove(e){if(!this.xDown||!this.yDown)return;let t=this.xDown-e.touches[0].clientX,i=this.yDown-e.touches[0].clientY;Math.abs(t)>Math.abs(i)&&this.move(t>0?1:-1),this.xDown=null,this.yDown=null}recalculateItemsPerPage(){this.sliderItemsElement&&(this.itemElementWidth=this.sliderItemsElement.clientWidth,this.sliderItemsElementWidth=(this.sliderItems.length-1)*this.itemElementWidth)}renderDots(){var e;const i=[];for(let s=0;s<(null===(e=this.sliderItems)||void 0===e?void 0:e.length)/this.itemsPerPage;s++)i.push(t("li",{class:s==this.activeIndex?"active":"default",onClick:()=>{this.goTo(s),this.setActive(s)}}));return i}componentDidRender(){this.el.addEventListener("touchstart",this.handleTouchStart.bind(this),{passive:!0}),this.el.addEventListener("touchmove",this.handleTouchMove.bind(this),{passive:!0}),this.recalculateItemsPerPage()}componentDidUpdate(){this.recalculateItemsPerPage()}connectedCallback(){window.screen.orientation.addEventListener("change",this.orientationChangeHandler)}disconnectedCallback(){this.el.removeEventListener("touchstart",this.handleTouchStart),this.el.removeEventListener("touchmove",this.handleTouchMove),window.screen.orientation.removeEventListener("change",this.orientationChangeHandler),window.removeEventListener("resize",this.resizeHandler)}render(){var e;const i={transform:`translate(${this.sliderItemsElementWidth/((null===(e=this.sliderItems)||void 0===e?void 0:e.length)-1)*this.activeIndex*-1}px, 0px)`},s={width:this.itemElementWidth/this.itemsPerPage+"px"};return t("div",{key:"740222cee57f5759854860f015dd900c1cb66f80",class:"SliderWrapper"},t("div",{key:"6d8971425bc1fc42bc4e64331b0c5f21d4ed1c40",class:"MainContent "},this.showSliderArrows&&t("div",{key:"1db77bb5cd7dfb6d5e06a4f42a33ff435f9eb224",class:`SliderNavButton LeftArrow ${0===this.activeIndex?"DisabledArrow ":""} ${1===this.sliderItems.length?"HiddenArrow ":""}`,onClick:()=>this.move(-1)},t("svg",{key:"e406abe6d9d44ab3809322d2f0699ea3ee372b0f",fill:"none",stroke:"var(--emw--color-secondary, #FD2839)",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"a8ee39ea455a06058466e03755582fbd07391514","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"a2681048af708d96aa6886db7b6b94639a650a26",class:"ItemsWrapper",ref:e=>this.sliderItemsElement=e},t("div",{key:"be1c762012144756bda71a46302dfe0954bc6add",class:"Items AssetsItems",style:i},this.sliderItems.map((e=>t("img",{class:`img${this.itemsPerPage}`,alt:"Gift Thumbnails",style:s,src:e}))))),this.showSliderArrows&&t("div",{key:"927367a3bbc674cc953eccc3359639381423d0a4",class:`SliderNavButton RightArrow ${1===this.sliderItems.length?"HiddenArrow ":""}\n ${this.activeIndex===this.sliderItems.length-1||this.itemsPerPage==this.sliderItems.length?"DisabledArrow":""}`,onClick:()=>this.move(1)},t("svg",{key:"d84e6e3011f8609f1ded47098bb28333f352f430",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"f05768932ee5e8fb74b6b1016612320d0e4ed737","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))),this.showSliderDots&&this.sliderItems.length>1&&t("div",{key:"a08098a90c717ccceda93cd741cb65521a83df9b",class:"DotsWrapper"},t("ul",{key:"8c873c229c603b4aca57e277f74cdf3d2192c01b",class:"Dots"},this.renderDots())))}get el(){return i(this)}},r={en:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back",games:"Games"},tr:{coins:"Coin",noGiftPresentation:"Açıklama yok",redeemGift:"Hediye Al",noDataFound:"Veri bulunamadı",error4003:"Geçersiz Oturum",redeemFailed:"Kullanım başarısız",back:"Geri"},ro:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},fr:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},ar:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"},hu:{coins:"Coins",noGiftPresentation:"No description",redeemGift:"Redeem Gift",noDataFound:"No data found",error4003:"Invalid Session",redeemFailed:"Failed to redeem",back:"Back"}},l=(e,t)=>r[t||"en"][e]||r.en[e],d=class{constructor(t){e(this,t),this.redeemGiftButton=s(this,"redeemGiftButton",7),this.bindedHandler=this.handleMessage.bind(this),this.deviceType=(()=>{const e=(()=>{let e=window.navigator.userAgent;return e.toLowerCase().match(/android/i)?"Android":e.toLowerCase().match(/iphone/i)?"iPhone":e.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(e)return"PC"===e?"dk":"iPad"===e||"iPhone"===e?"ios":"mtWeb"})(),this.powerUpGameSearchConditions={expand:"games",fields:"powerUpID,games(id,gameId,slug,name,thumbnail)"},this.endpoint=void 0,this.language="en",this.itemId=void 0,this.elevateGift=void 0,this.session=void 0,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showSliderDots=!1,this.showSliderArrows=!0,this.isGiftNotFound=!1,this.redeemErrorMsg="",this.isRedeeming=!1,this.powerUpGames=void 0,this.isLoadingGames=!1}redeemGiftConfirm(){this.isRedeeming||"true"!=this.elevateGift.available||window.postMessage({type:"BEERedeemConfirm",shopItem:this.elevateGift},window.location.href)}handleMessage(e){e.data&&"bee-redeem-confirmed"===e.data.type&&e.data.id==this.elevateGift.id&&this.redeemGift()}onBackClicked(){window.postMessage({type:"OnGiftDetailsBackButtonClicked"},window.location.href)}redeemGift(){if("false"===this.elevateGift.available.toLowerCase()||this.isRedeeming)return;let e=new URL(`${this.endpoint}/v1/elevate/redeem`),t={method:"PUT",headers:{"x-SessionId":this.session,"Content-Type":"application/json-patch+json"},body:JSON.stringify({giftId:this.elevateGift.id})};this.redeemErrorMsg="",this.isRedeeming=!0,fetch(e.toString(),t).then((e=>e.json())).then((e=>{if(e.success)this.redeemGiftButton.emit(),window.postMessage({type:"BEEGiftRedeem",itemId:this.elevateGift.id},window.location.href);else{let t=l(`error${e.errorCode}`,this.language);this.redeemErrorMsg=t||l("redeemFailed",this.language),window.postMessage({type:"BEEGiftRedeemFailed",itemId:this.elevateGift.id,res:e},window.location.href)}})).catch((e=>{window.postMessage({type:"BEEGiftClaimFailed",itemId:this.elevateGift.id,err:e},window.location.href)})).finally((()=>{this.isRedeeming=!1}))}async loadElevateGift(){let e=new URL(`${this.endpoint}/v1/elevate/shop?language=${this.language}&filter=id=${this.itemId}`),t={headers:{"Content-Type":"application/json","x-SessionId":this.session},method:"GET"};await new Promise((i=>{fetch(e.href,t).then((e=>e.json())).then((e=>{let t=e.data;t&&1==t.length?(this.elevateGift=t[0],"powerUp"===this.elevateGift.type&&this.elevateGift.powerUpID&&this.loadMoreGames(),this.isGiftNotFound=!1):this.isGiftNotFound=!0,i(!0)}))}))}async loadMoreGames(){var e,t,i,s,a;if(!(this.isLoadingGames||(null===(e=this.powerUpGames)||void 0===e?void 0:e.total)>0&&(null===(t=this.powerUpGames)||void 0===t?void 0:t.items.length)>=(null===(i=this.powerUpGames)||void 0===i?void 0:i.total))){this.isLoadingGames=!0;try{const e=new URL(`${this.endpoint}/v1/elevate/powerups/available?pagination=games(limit=20,offset=${(null===(s=this.powerUpGames)||void 0===s?void 0:s.items.length)||0})`),t={headers:{"x-SessionId":this.session}};e.searchParams.append("filter",`id=${this.elevateGift.powerUpID}`),Object.entries(this.powerUpGameSearchConditions).forEach((([t,i])=>{e.searchParams.append(t,i)}));const i=await fetch(e.toString(),t);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const{data:n}=await i.json(),o=null==n?void 0:n[0];(null===(a=null==o?void 0:o.games)||void 0===a?void 0:a.items)&&(this.powerUpGames?this.powerUpGames.items=[...this.powerUpGames.items,...o.games.items]:this.powerUpGames=o.games,this.powerUpGames=Object.assign({},this.powerUpGames))}catch(e){console.error("Failed to load more games:",e)}finally{this.isLoadingGames=!1}}}initializeGamesObserver(){this.loadMoreGamesObserver&&this.loadMoreGamesObserver.disconnect(),this.loadMoreGamesObserver=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&this.loadMoreGames()}))})),this.lastGameElement&&this.loadMoreGamesObserver.observe(this.lastGameElement)}onGameClick(e){window.postMessage({type:"EngagementSuiteGameRedirect",data:{Slug:e.slug}})}disconnectedCallback(){window.removeEventListener("message",this.bindedHandler,!1),this.loadMoreGamesObserver&&this.loadMoreGamesObserver.disconnect()}componentDidLoad(){window.addEventListener("message",this.bindedHandler,!1)}async componentWillLoad(){var e;this.translationUrl.length>2&&await(e=this.translationUrl,new Promise((t=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{r[t]=r[t]||{};for(let i in e[t])r[t][i]=e[t][i]})),t(!0)})).catch((e=>{console.error("Failed to load translations:",e),t(!1)}))}))),this.elevateGift?this.isGiftNotFound=!1:await this.loadElevateGift()}componentDidUpdate(){var e,t;(null===(e=this.powerUpGames)||void 0===e?void 0:e.items.length)<(null===(t=this.powerUpGames)||void 0===t?void 0:t.total)&&this.initializeGamesObserver()}render(){var e,i,s;return t(n,{key:"02194284778bc18ed94c17ee0c4a682da0c9935e"},t("general-styling-wrapper",{key:"3109c90669d039df0aa7caf8dac48ca7576b1db2",clientStylingUrl:this.clientStylingUrl,clientStyling:this.clientStyling,mbSource:this.mbSource}),t("div",{key:"aa8fa9853ff3f0c50cf055f622640f187138531b",class:"ElevateDetails"},this.isGiftNotFound&&t(a,{key:"1ff8d0e249663ea5f2ee0de06d406f962f973493"},t("div",{key:"5575275bd24e74a530ffd2b8b17045f7b0daed7c",class:"Row ThumbnailRow"},t("div",{key:"501b117a2c493750deb056ecf8f8614351c0fac2",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"556a1ece3c4b8398277ad996ed58d0d84db0f7b4",class:"BackArrow",innerHTML:"<"}),t("span",{key:"43f9a46fe32710cc7d05e953475088f049999791",class:"BackTxt"}," ",l("back",this.language)," "))),t("div",{key:"ba220234e040ed863b3bbc1960b54ced43fe4303",class:"Thumnails GiftNotFound"},l("noDataFound",this.language),".")),this.elevateGift&&t(a,{key:"e1f7f2dfd7d80da3fafdc5edd8d8686522509893"},t("div",{key:"4a8f3ee47e7ef7bd87eafa5ebdd3346b523f13fd",class:"ThumbnailRow"},t("div",{key:"d8dcab9b4b3d4963cd4ef7904caca9e1df3a6e88",class:"Row"},t("div",{key:"6368dc35f95a2202cc38c5dc05bdf6f6d83fce55",class:"BackButton",onClick:()=>{this.onBackClicked()}},t("span",{key:"64f67312085b9216b42cb61a9ee7ea780058856d",class:"BackArrow",innerHTML:"<"}),t("span",{key:"4e5d8bdec62fe9e32cb839e3904113449e4d4c0c",class:"BackTxt"}," ",l("back",this.language)," ")),t("bonus-elevate-shop-assets-slider",{key:"0b9e8164653ec6a7c8b9d1d260ed44ca641f0726",class:"Thumbnails",itemsPerPage:1,sliderItems:this.elevateGift.presentation.assets,showSliderDots:this.showSliderDots})),t("div",{key:"d911392a0ce5afac58cdf26046d80cfdaf7c1793",class:"Col Details"},t("h3",{key:"273ff2eb682767a5429dc99642b1c166921cb1dc",class:"GiftName"},this.elevateGift.presentation.displayName||this.elevateGift.displayName),t("div",{key:"459bcb83df4dc907bb7cc9757a86c88b39ca4905",class:"GiftPoints"},t("span",{key:"3648c21ea2133c6a3050f2417449ab046e51c04b",class:"Points"},this.elevateGift.points," "),t("span",{key:"8b6665da119f9dd777644592cc2815fc77dffda1",class:" PointsLabel"},l("coins",this.language))))),t("div",{key:"6e9a28dd26368897ddfd76032ce1e3882a886a5b",class:"ShopItemDetail Details"},t("div",{key:"d2844066fe51e4b3d43689406879e1306d494f0a",class:"GiftPresentation"},t("p",{key:"12f8bce3abf0df34657392e95aa8ddfb42d4c088"},this.elevateGift.presentation.description?this.elevateGift.presentation.description:l("noGiftPresentation",this.language))),t("div",{key:"2b0cc39b8e53336355f1f5d0576a59bfd9859abf",class:"BottomDetail"},t("div",{key:"0eabb8f4ecb8236d78665110c835a0cf2689e864",class:`RedeemButton ${"false"===this.elevateGift.available||this.isRedeeming?"Disabled deactive":" active "}\n ${"dk"==this.deviceType?"DkButton":""}`,onClick:this.redeemGiftConfirm.bind(this)},l("redeemGift",this.language)),t("span",{key:"9773077b08f77bc2940519070053aee362f34e2a",class:"RedeemError Error"}," ",this.redeemErrorMsg," "))))),"powerUp"===(null===(e=this.elevateGift)||void 0===e?void 0:e.type)&&this.powerUpGames&&t("div",{key:"ec880bb1c11a7fb485f4d7e80dce6e250f2b4e19",class:"GamesContent"},t("div",{key:"a6dc572f4f5b6732ed6d29fad4c76fbf0415ca68",class:"GamesTitle"},t("span",{key:"2904186a96290683dbbcd06cfca99f48c616f6f1",class:"Title2"}," ",l("games",this.language)),t("span",{key:"9c7f5fa7f0441721bc32aab10b07c3f7f2de91c4",class:"GamesAmount"}," ( ",(null===(i=this.powerUpGames)||void 0===i?void 0:i.total)||0," ) ")),t("div",{key:"4f465d62df13e07bf2d946416ed70cdd52591cbb",class:"GamesList"},t("div",{key:"d23fc7b21125dd6467ad56cbd7d2ce03a579d689",class:"Games"},null===(s=this.powerUpGames)||void 0===s?void 0:s.items.map(((e,i)=>t("div",{class:"Game",ref:i===this.powerUpGames.items.length-1?e=>this.lastGameElement=e:null},t("ui-image",{src:e.thumbnail}),t("div",{class:"GameMask",onClick:this.onGameClick.bind(this,e)},t("span",{class:"PlayBtn"},"Start Now!")))))),this.isLoadingGames&&t("p",{key:"89e860b88abc15beda61b9989e5a82a9f445aadd"},"Loading more games..."))))}};d.style=":host{display:block;--game-amount-per-line:6}.ElevateDetails{display:flex;flex-direction:row;padding:10px;width:calc(100% - 20px);}.ElevateDetails .RedeemError{display:none}.ElevateDetails .Error{color:var(--emw--color-error, #FD2839)}.ElevateDetails .Row{flex-direction:row;display:flex}.ElevateDetails .Col{flex-direction:column;display:flex}.ElevateDetails .Details{padding:20px}.ElevateDetails .ThumbnailRow{display:flex;flex-direction:column;justify-content:space-between;min-width:268px;max-width:398px}.ElevateDetails .ThumbnailRow .BackButton{width:100px;height:20px;padding:5px;background:white;box-shadow:0px 4px 40px 0px rgba(138, 149, 158, 0.2);margin:10px 0 10px;cursor:pointer;animation-timing-function:ease-out;animation-duration:300ms;transition-property:all;border:1px solid #e4e6e8;border-radius:5px;text-align:center}.ElevateDetails .ThumbnailRow .BackButton:hover{background:rgb(227, 222, 222)}.ElevateDetails .ThumbnailRow .Thumbnails{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .ShopItemDetail{flex-grow:1;min-width:300px;display:flex;flex-direction:column;justify-content:space-between}.ElevateDetails .GiftPoints .Points{font-size:21px}.ElevateDetails .GiftPoints .PointsLabel{font-size:12px;color:var(--emw--color-gray-300, rgb(78, 90, 55));font-weight:400;line-height:29px;letter-spacing:0.04em;text-align:left}.ElevateDetails .RedeemButton{width:150px;padding:5px 0px;border:2px solid var(--emw--button-border-color, rgba(8, 59, 23, 0.1098039216));text-align:center;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));font-size:var(--emw--font-size-small, 12px);font-weight:var(--emw--font-weight-bold, 700);line-height:var(--emw--font-size-medium, 14px);text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px)}.ElevateDetails .RedeemButton.active{background:var(--emw--color-primary, #18CE51)}.ElevateDetails .RedeemButton.active:hover{background:var(--mmw--color-main-button-hover, #24B24E)}.ElevateDetails .RedeemButton.deactive,.ElevateDetails .RedeemButton.disabled{background:var(--mmw--color-disabled, rgba(153, 153, 153, 0.5019607843))}.ElevateDetails .SliderWrapper{display:flex;flex-direction:column;position:relative;width:calc(100% - 40px)}.ElevateDetails .SliderWrapper .MainContent{display:flex;flex-direction:row;justify-content:space-around}.ElevateDetails .SliderWrapper .MainContent .LeftArrow,.ElevateDetails .SliderWrapper .MainContent .RightArrow{width:20px}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper{overflow:hidden;display:inline-flex;width:calc(100% - 40px);flex-direction:column}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper .Items{display:inline-flex;transition:transform 0.4s ease-in-out;transform:translateX(0px);margin:auto}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img2{width:50%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img3{width:30%}.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img,.ElevateDetails .SliderWrapper .MainContent .ItemsWrapper img.img1{max-width:100%;background:rgb(239, 239, 239);border:1px solid rgb(239, 239, 239);border-radius:18px;border:1px;margin:10px 0 10px}.ElevateDetails .SliderWrapper .DotsWrapper{width:100%;margin:0 auto;height:30px}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots{display:flex;justify-content:center;padding:0}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li{height:10px;width:10px;background:#ccc;border-radius:50%;margin-left:3px;margin-right:3px;list-style:none;cursor:pointer}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li:hover{background:#bbb}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.active{border:solid 1px var(--emw--color-secondary, #FD2839);background:var(--emw--color-secondary, #FD2839)}.ElevateDetails .SliderWrapper .DotsWrapper ul.Dots li.default{border:solid 1px var(--emw--color-secondary, #FD2839);background-color:#FFF}.ElevateDetails .SliderNavButton{border:0px;width:25px;display:flex;align-items:center;justify-content:center;cursor:pointer}.ElevateDetails .SliderNavButton.HiddenArrow{visibility:hidden}.ElevateDetails .SliderNavButton svg{width:20px;stroke:var(--emw--color-secondary, #FD2839)}.ElevateDetails .DisabledArrow svg{opacity:0.2;stroke:var(--emw--color-secondary, #FD2839);pointer-events:none}.GamesContent{margin:20px;padding:15px;min-height:500px;flex:1;gap:12px;display:flex;flex-direction:column;border-radius:8px;border:2px solid var(--emw--color-powup-light-green-0D, rgba(188, 252, 177, 0.0509803922))}.GamesContent .GamesTitle{display:flex;flex-direction:row}.GamesContent .GamesTitle .Title2{text-transform:capitalize}.GamesContent .GamesTitle .GamesAmount{opacity:0.8}.GamesContent .GameTitleTip{color:var(--emw--color-powup-gray-green, #C8D6CE);font-size:0.8rem}.GamesContent .GamesList{display:flex;justify-content:center;width:100%;max-height:300px;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--emw--background-gray-color, gray) transparent}.GamesContent .GamesList::-webkit-scrollbar-track{background-color:transparent;border-radius:5px}.GamesContent .GamesList .Games{width:100%;padding:0;display:flex;align-items:flex-start;justify-content:flex-start;flex-wrap:wrap;gap:calc(30px / (var(--game-amount-per-line) - 1))}.GamesContent .GamesList .Games .Game{width:calc((100% - 30px) / var(--game-amount-per-line));cursor:pointer;position:relative}.GamesContent .GamesList .Games .Game .GameMask{transition:opacity;transition-duration:0.2s;opacity:0;position:absolute;width:70%;height:100%}.GamesContent .GamesList .Games .Game:hover .mask-filter{opacity:1}.GamesContent .GamesList .Games .Game:hover img{opacity:0.4;filter:blur(1.5px)}.GamesContent .GamesList .Games .Game:hover .GameMask{opacity:1;mix-blend-mode:screen;background-color:var(--emw--color-powup-green, #24B24E);display:flex;justify-content:center;align-items:center;position:absolute;width:100%;left:0;height:100%;top:0;border-radius:8px}.GamesContent .GamesList .Games .Game:hover .GameMask .PlayBtn{border:2px solid var(--emw--color-powup-gray, #f0f0f0);padding:5px 3px;border-radius:3px}";const c="__WIDGET_GLOBAL_STYLE_CACHE__";function h(e,t){if(e){const i=document.createElement("style");i.innerHTML=t,e.appendChild(i)}}function m(e,t){if(!e||!t)return;const i=new URL(t);fetch(i.href).then((e=>e.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,e&&e.appendChild(i)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}function f(e,t,i,s=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!s)return i=function(e,t){const i=document.createElement("style");return window.emMessageBus.subscribe(t,(t=>{e&&(i.innerHTML=t,e.appendChild(i))}))}(e,t),i;window[c]||(window[c]={}),i=function(e,t){return window.emMessageBus.subscribe(t,(i=>{if(!e)return;const s=e.getRootNode(),a=window[c];let n=a[t]&&a[t].sheet;n?a[t].refCount=a[t].refCount+1:(n=new CSSStyleSheet,n.replaceSync(i),a[t]={sheet:n,refCount:1});const o=s.adoptedStyleSheets||[];o.includes(n)||(s.adoptedStyleSheets=[...o,n])}))}(e,t);const a=i.unsubscribe.bind(i);return i.unsubscribe=()=>{if(window[c][t]){const e=window[c][t];e.refCount>1?e.refCount=e.refCount-1:delete window[c][t]}a()},i}const p=class{constructor(t){e(this,t),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(this.mbSource&&f(this.el,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&h(this.el,this.clientStyling),this.clientStylingUrl&&m(this.el,this.clientStylingUrl),this.stylingAppends=!0)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleMbSourceChange(e,t){e!=t&&f(this.el,`${this.mbSource}.Style`,this.stylingSubscription)}handleClientStylingChange(e,t){e!=t&&h(this.el,this.clientStyling)}handleClientStylingUrlChange(e,t){e!=t&&this.clientStylingUrl&&m(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&h(this.el,this.clientStyling),this.clientStylingUrl&&m(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]||{},Object.keys(t[e]).forEach((s=>{if(!i.en[s])return;const a=i.en[s];"object"==typeof t[e][s]?(i[e][s]=i[e][s]||Object.assign({},a),Object.keys(t[e][s]).forEach((a=>{i[e][s][a]=t[e][s][a]}))):i[e][s]=t[e][s]||Object.assign({},a)}))})),e(!0)})).catch((t=>{console.error("Failed to load translations:",t),e(!1)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"e660ceb69f5e848c788c3924fc814c0fa7a777a2",class:"StyleShell"},t("slot",{key:"35014b6c0c32532af11e6a629ba9b13942504d21",name:"mainContent"}))}get el(){return i(this)}static get watchers(){return{mbSource:["handleMbSourceChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};p.style=":host{display:block}";const u=class{constructor(t){e(this,t),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const e=new Image;e.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,e.onload=null)},e.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.__uxComponent;t&&(t.shouldLoad=!0,t.handleSrc()),window.EMUxObserver.unobserve(e.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return t(n,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&t("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),t("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:e=>this.image=e,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return i(this)}static get watchers(){return{src:["handleSrc"]}}};u.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";const b=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight),size:this.handleStylingProps(this.size)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonLogo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"SkeletonImage "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonTitle "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,i)=>t("div",{key:i,class:"SkeletonText "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonRectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"SkeletonCircle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(n,{key:"c2a2650acd416962a2bc4e1a7ee18bc6d8e2def8"},t("style",{key:"9bd7fc1f9e9ed9f17735a7b72fce6f09696f5e19"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};b.style=":host{display:block}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.SkeletonRectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 10px)}.SkeletonCircle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.SkeletonText{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.SkeletonText:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.SkeletonTitle{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 10px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.SkeletonImage{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, unset)}.SkeletonLogo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{o as bonus_elevate_shop_assets_slider,d as bonus_elevate_shop_item,p as general_styling_wrapper,u as ui_image,b as ui_skeleton}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./index-fca048d8.js";export{s as setNonce}from"./index-fca048d8.js";import{g as
|
|
1
|
+
import{p as e,b as t}from"./index-fca048d8.js";export{s as setNonce}from"./index-fca048d8.js";import{g as i}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,i={};return""!==t&&(i.resourcesUrl=new URL(".",t).href),e(i)})().then((async e=>(await i(),t([["bonus-elevate-shop-assets-slider_5",[[1,"bonus-elevate-shop-item",{endpoint:[513],language:[513],itemId:[1537,"item-id"],elevateGift:[1040],session:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],isGiftNotFound:[32],redeemErrorMsg:[32],isRedeeming:[32],powerUpGames:[32],isLoadingGames:[32]}],[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}],[0,"bonus-elevate-shop-assets-slider",{showSliderDots:[516,"show-slider-dots"],showSliderArrows:[516,"show-slider-arrows"],itemsPerPage:[514,"items-per-page"],sliderItems:[16],activeIndex:[32]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],targetTranslations:[16]},null,{mbSource:["handleMbSourceChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1]},null,{structure:["handleStructureChange"]}]]]],e))));
|