1import{l as u,r as x,b6 as b,A as a,a$ as k,m as A,aL as D,o as P}from"./index.a592fd0f.1791468856214.js";import{r as F}from"./agentation.68356e44.1791468856214.js";import{D as R}from"./draggable-floating-icon.3470a86e.1791468856214.js";import{a as T}from"./general-hook.582f544d.1791468856214.js";import"./store.c551292d.1791468856214.js";import"./floatingNotification.constant.27687fe7.1791468856214.js";import"./dayjs.min.4438ae62.1791468856214.js";import"./matchPredictionModules.8463f61a.1791468856214.js";import"./oddsFeedModules.2bed76ce.1791468856214.js";import"./promotionModules.e5ad9f13.1791468856214.js";import"./index.d6d38540.1791468856214.js";const E=()=>{const t=u.useSelector(s=>s.language),c=u.useSelector(s=>s.screen),g=T(),[i,d]=x.useState([]);x.useEffect(()=>{async function s(){const o=t?.countryLanguageKey;try{await window.SPL_JsonSettings.getSideBannerSettingsJson(r=>{if(!r||r&&!r.floatingIcons)return;const f={props:{screen:{viewType:c.viewType}}},l=r.floatingIcons.filter(n=>n!=null&&n?.languages?.indexOf(o)>=0).map(n=>({...n,closebtn:b(n.closebtn,f),img:typeof n?.banner?.img=="string"?n?.banner?.img:n?.banner?.img?.[o]||"",href:typeof n?.href=="string"?n?.href:n?.href?.[o]||"",className:"side-banner-icon",bannerCSS:p(b(n.style,f),!1,o),closeBtnCSS:p(b(n.closebtn.style,f),!0),subIcons:(n.subIcons||[]).map(S=>({bannerCSS:p(b(S.style,f),!1,o),href:typeof S?.href=="string"?S?.href:S?.href?.[o]||""})),disablePage:g(n?.disablePage),activePage:g(n?.activePage)}));d(l)})}catch(r){console.error(r)}}t&&c&&s()},[t,c]);function p(s,o=!1,r){if(!s)return{};return{...s,width:l(s.width),height:l(s.height),top:l(s.top),left:l(s.left),right:l(s.right),bottom:l(s.bottom),backgroundImage:s?.img[r]?`url(${s.img[r]})`:s.img?`url(${s.img})`:"",backgroundSize:s.backgroundSize??"",backgroundRepeat:s.backgroundRepeat??"",position:o?"absolute":"fixed",zIndex:s.zIndex??"200",cursor:s.cursor??""};function l(n){return n?n.includes("px")||n.includes("%")||n.includes("rem")?n:n+"px":""}}return{sideFloating:i}},_=({item:t,openSubIcons:c,handleIconClick:g})=>t?a.jsx("div",{className:`float-left-sub-banners-container ${c?"open":""} ${t?.openSubIconsAnimationClass}`,children:t.subIcons?.map((i,d)=>a.jsx("div",{className:"float-left-sub-banner-container",style:i.bannerCSS,onClick:()=>{c&&g(i)},children:a.jsx(D.LazyLoadImage,{id:"sub-banner-img",src:i.img||""})},d))}):a.jsx(a.Fragment,{}),Y=()=>{const t=u.useSelector(e=>e.language),c=u.useSelector(e=>e.portal),g=u.useSelector(e=>e.user),i=u.useSelector(e=>e.seamless),d=u.useSelector(e=>e.screen),p=u.useDispatch(),s=F.useHistory(),{pathname:o}=F.useLocation(),[r,f]=x.useState(!1),[l,n]=x.useState(!0),{sideFloating:S}=E(),w=e=>{const h=g?.isLogin;if(e.subIcons?.length>0){f(!r);return}if(!h&&e.showLoginAlert){p(P.showLoginAlert(!0));return}if(e.href){s.push(e.href);return}z(e,!1)},z=(e,h)=>{e&&!e.category&&(e.category="SL");let m={domain:window.location.hostname,isMobile:d.isMobile,isFun:h,isMenuMode:!0,isMiniGame:!1,languageKey:t.key,provider:e?.provider,gameCode:e?.gamecode,isSeamless:i&&i.isSeamless,languageCurrency:t.currencyLang},C={isSeamless:i&&i.isSeamless,languageCurrency:t.currencyLang},y=!1;d.viewType==="mobile"&&(y=!0),window.SPL_Provider.startProviderGameV2(m.provider,e.category,t.key,y,h,g.isLogin,v,m,null,C);function v(){p(P.showLoginAlert(!0))}},B=e=>{e.preventDefault(),n(!1)};return l?a.jsx(a.Fragment,{children:S.map(e=>{const{bannerCSS:h={},closeBtnCSS:m={},closebtn:C={},altText:y,disablePage:v=!1,activePage:I=!1}=e,M=v?.some?.(L=>k(L,o)),N=!I||I?.some?.(L=>k(L,o));return M||!N?null:a.jsxs("div",{className:"sideBannerSection",onClick:()=>w(e),children:[a.jsx(R,{customClass:"floating-banner",disableDragFeature:A(c,"settings.features.disableDailyMissionDragFeature"),showFullSizeOpt:!0,containerStyle:h,children:m&&a.jsx("div",{className:"floatLeftCloseBtn",style:m,onClick:B,children:a.jsx(D.LazyLoadImage,{id:"leftBanner-close-btn",src:C?.img||""})})}),a.jsx(_,{item:e,openSubIcons:r,handleIconClick:w})]},y)})}):null};export{Y as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.