1import{l as u,R as m,A as i,aL as g}from"./index.a592fd0f.1791468856214.js";import{r as b}from"./agentation.68356e44.1791468856214.js";import{m as v}from"./selector.4b536653.1791468856214.js";import w from"./HomeBannerSlider.aa3c4e9f.1791468856214.js";import{c as s}from"./home.controller.b9a3b5ff.1791468856214.js";import{w as x}from"./withTranslation.307c35be.1791468856214.js";import{T as H}from"./Translation.d9727a31.1791468856214.js";import"./index.f9422d19.1791468856214.js";import"./index.2815c6b3.1791468856214.js";import"./index.c060afc9.1791468856214.js";import"./index.665864a1.1791468856214.js";import"./index.d45b7018.1791468856214.js";import"./affiliate-service.06e05bd2.1791468856214.js";import"./HomeBannerSlider.selector.674fa7e7.1791468856214.js";import"./image-helper.f0b71afe.1791468856214.js";import"./text.3a0e29a2.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";import"./accordion_beta.07b9cb38.1791468856214.js";import"./D_testimonials_beta.f35e342a.1791468856214.js";import"./ceremory-banner.00fc8b26.1791468856214.js";import"./staticContentModules.67d7c02e.1791468856214.js";class R extends m.Component{constructor(e){super(e),this.state={content:"",iframeHeight:0},this.iframeRef=m.createRef(),this.resizeObserver=null,s.init(this)}componentDidMount(){window.addEventListener("message",this.handleIframeMessage),this.readAffiliatePage(),s.initCompSettings().then(()=>{s.getAffHomePageBanner()})}componentWillUnmount(){window.removeEventListener("message",this.handleIframeMessage),this.disconnectResizeObserver(),this.setState=()=>{}}disconnectResizeObserver=()=>{this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null)};updateIframeHeight=()=>{const e=this.iframeRef.current?.contentDocument,t=e?.body?.scrollHeight||e?.documentElement?.scrollHeight||0;t&&t!==this.state.iframeHeight&&this.setState({iframeHeight:t})};handleIframeLoad=()=>{this.disconnectResizeObserver(),this.updateIframeHeight();const e=this.iframeRef.current?.contentDocument?.body;e&&typeof ResizeObserver<"u"&&(this.resizeObserver=new ResizeObserver(this.updateIframeHeight),this.resizeObserver.observe(e))};handleIframeMessage=e=>{if(!e.origin.includes(window.location.origin))return;const{action:t}=e.data,n={navigate_to_register:"/register",navigate_to_contact:"/contact-us"}[t];n&&this.props.history.push(n)};async readAffiliatePage(){const e=`/public/html/affiliate/index.html?${new Date().getTime()}`;await window.SPL_JsonSettings.getTextFile(e,t=>{t?.data&&this.setState({content:t.data})})}render(){const{language:e,screen:t}=this.props,{iframeHeight:o,compSettings:n,affhomePageBanner:c}=this.state,{disableNoHomeBannerDefaultHeight:l,affCustomHomeBanner:r}=n||{},a=t?.viewType!=="web",f={homePageBanner:c,disableNoHomeBannerDefaultHeight:l,handleBannerOnClick:s.handleBannerOnClick},h=a?"mobileCarouselSliderSection":"carouselSliderSection",d=a?r?.mHomeBanner:r?.homeBanner,p=a?"m-aff-custom-btn":"aff-custom-btn";return i.jsx(H,{children:()=>i.jsxs("main",{className:"aff-home",children:[i.jsx("section",{className:h,children:r?i.jsxs("div",{className:"aff-custom-banner-container",children:[i.jsx(g.LazyLoadImage,{className:"aff-custom-banner",src:d,alt:""}),r?.btn&&i.jsx("button",{className:p,onClick:()=>s.redirectToComissionPlan(),children:r.btn})]}):i.jsx(w,{...f})}),i.jsx("iframe",{ref:this.iframeRef,className:"iframe-container",src:`/public/html/affiliate/index-${e?.key}.html`,scrolling:"no",onLoad:this.handleIframeLoad,style:{display:"block",width:"100%",height:o?`${o}px`:"100vh",border:0,overflow:"hidden"}})]})})}}const X=u.connect(v)(x("affiliate")(b.withRouter(R)));export{X 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.