@streamlayer/react 1.9.0 → 1.9.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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),t=require("./index2.js"),m=require("./useStreamLayerApp2.js"),me=t.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),ue="a1rlj479",pe="s35f1di",ye="sj4471g",ve="b12050d8",fe="b1d5ybek",Ae=e=>e==="left"||e==="right"?pe:ve,ge=e=>e==="left"||e==="right"?ye:fe,Ie=e=>e==="left"?"avdxyl3":e==="right"?"a1bisd08":e==="top"?"a1u9y2aj":"a1qqaks",k=({children:e,style:s,className:i,enabled:n=!0,hiding:r,direction:a="left",onAnimationEnd:c})=>o.jsx(me,{style:s,className:t.cx_default(i,ue,Ie(a),n&&!r&&Ae(a),n&&r&&ge(a)),onAnimationEnd:c,children:e}),xe=t.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),he=t.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),je=()=>xe,be=t.styled_default(je())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),_e=({promotion:e,promotionId:s,hiding:i,direction:n="bottom"})=>{var r,a;if(!((r=e.additionalBanner)!=null&&r.imageUrl))return null;let c=(a=e.banner)==null?void 0:a.url;return c&&c.indexOf("http")!==0&&(c=`https://${c}`),o.jsx(k,{direction:n,hiding:i,children:o.jsx(he,{className:"BannerContainer",children:o.jsx(be,{className:"BannerLink",href:c,style:{backgroundImage:`url(${e.additionalBanner.imageUrl})`},"data-promo-id":s,"data-promo-type":e.type,"data-analytics":"banner",target:"_blank"})})})},Ne=t.styled_default("div")({name:"NotificationContent",class:"n18wsqoo",propsAsIs:!1}),Se=t.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),Te=t.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),Ee=t.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),O=t.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),Ce=()=>O,Pe=t.styled_default(Ce())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),Le=t.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),$e=t.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),Me=t.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),ke=t.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),Oe=t.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),Be=t.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),De={[m.NotificationPromotionImagePosition.BOTTOM]:O,[m.NotificationPromotionImagePosition.MIDDLE]:Pe},Re=({src:e,imagePosition:s})=>{const i=De[s]||O;return o.jsx(i,{children:o.jsx("img",{src:e,alt:""})})},qe=({notification:e,open:s})=>{if(!e||!e.promotion||e.enabled!==m.NotificationEnabled.NOTIFICATION_ENABLED)return null;const{title:i,body:n,image:r,promotion:a}=e,{sponsorLogo:c,sponsorLogoMode:u,imagePosition:v,ctaButton:l}=a;return o.jsxs(Be,{className:"SL_Lower_Third_Notification",onClick:s,children:[o.jsxs(Ne,{children:[o.jsx(Re,{src:r,imagePosition:v}),o.jsxs(Se,{children:[i&&o.jsx(Te,{children:i}),n&&o.jsx(Ee,{children:n})]})]}),o.jsxs(ke,{children:[u!==m.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsxs(o.Fragment,{children:[o.jsx(Me,{children:o.jsx("img",{src:c,alt:i})}),o.jsx(Oe,{})]}),o.jsxs($e,{name:"promo-button",style:{color:l==null?void 0:l.textColor,backgroundColor:l==null?void 0:l.color},children:[(l==null?void 0:l.ctaIcon)&&(l==null?void 0:l.ctaIconMode)===m.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(Le,{src:l==null?void 0:l.ctaIcon,alt:"cta-icon"}),(l==null?void 0:l.label)||"Open"]})]})]})},we=t.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Ve=t.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),Fe=t.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),Ue=t.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Ke=t.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),C=t.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),ze=()=>C,H=t.styled_default(ze())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),Ge=()=>C,Z=t.styled_default(Ge())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),We=()=>Z,He=t.styled_default(We())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),Ye=()=>C,Je=t.styled_default(Ye())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),Qe=()=>C,Xe=t.styled_default(Qe())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),Ze=t.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),eo=t.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),oo=()=>t.h1,to=t.styled_default(oo())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),so=t.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),no={[m.NotificationPromotionImagePosition.UNSET]:H,[m.NotificationPromotionImagePosition.FIT]:H,[m.NotificationPromotionImagePosition.CENTERED]:Z,[m.NotificationPromotionImagePosition.BOTTOM]:He,[m.NotificationPromotionImagePosition.SOLID]:Je,[m.NotificationPromotionImagePosition.MIDDLE]:Xe},io=({src:e,imagePosition:s})=>{const i=no[s];return o.jsx(i,{children:o.jsx("img",{src:e,alt:""})})},lo=({notification:e,open:s,promotionId:i,hiding:n,direction:r="left"})=>{if(!e||!e.promotion||e.enabled!==m.NotificationEnabled.NOTIFICATION_ENABLED)return null;if(e.promotion.mode===m.NotificationPromotionMode.LOWER_THIRD)return o.jsx(qe,{notification:e,open:s});const{title:a,body:c,image:u,promotion:v}=e,{sponsorLogo:l,sponsorLogoMode:f,imagePosition:y,ctaButton:p}=v;return o.jsx(k,{className:"SL_Rich_Notification",direction:r,hiding:n,children:o.jsxs(Ve,{onClick:s,children:[f!==m.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsx(so,{children:o.jsx("img",{src:l,alt:a})}),o.jsxs(we,{children:[o.jsx(io,{src:u,imagePosition:y}),o.jsxs(Fe,{children:[a&&o.jsx(Ue,{children:a}),c&&o.jsx(Ke,{children:c})]}),o.jsxs(eo,{name:"promo-button",style:{color:p==null?void 0:p.textColor,backgroundColor:p==null?void 0:p.color},children:[(p==null?void 0:p.ctaIcon)&&(p==null?void 0:p.ctaIconMode)===m.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(Ze,{src:p==null?void 0:p.ctaIcon,alt:"cta-icon"}),(p==null?void 0:p.label)||"Open"]}),o.jsx(to,{name:"chevronRight"})]})]})})},ao=t.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),ee=t.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),oe=t.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),te=t.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),se="h10toh7",Y=t.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),ro=t.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),ne=t.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),co=t.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),mo="s1nmch9k",J=t.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),uo=t.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),po=t.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),yo=t.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),ie=t.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),vo=t.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),fo=t.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),Ao=t.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),go=t.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),Io="h17rwbtk",xo=t.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),Q=t.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),ho=t.styled_default("div")({name:"Dot",class:"d1f6aqua",propsAsIs:!1}),jo=({time:e,adCount:s,adPosition:i})=>{const n=Math.floor(e/60),r=e-n*60;return n===0&&r===0&&s===i?null:o.jsxs(xo,{children:[s>1&&o.jsxs(o.Fragment,{children:[o.jsxs(Q,{children:[i," of ",s]}),o.jsx(ho,{})]}),o.jsxs(Q,{children:[n,":",r<10?`0${r}`:r]})]})},bo=(e,s,{onPlay:i,onStop:n,onProgress:r})=>{const a=google.ima;let c=new a.AdDisplayContainer(e),u=new a.AdsLoader(c),v=new a.AdsRequest,l;u.addEventListener(a.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,y=>{l=y.getAdsManager(e),i&&l.addEventListener(a.AdEvent.Type.STARTED,i),n&&l.addEventListener(a.AdEvent.Type.COMPLETE,n),r&&l.addEventListener(a.AdEvent.Type.AD_PROGRESS,p=>r(p.getAdData())),l.init(e.clientWidth,e.clientHeight,a.ViewMode.NORMAL),l.start()},!1),u.addEventListener(a.AdErrorEvent.Type.AD_ERROR,()=>{console.log("ad error"),n==null||n()},!1),v.linearAdSlotWidth=e.clientWidth,v.linearAdSlotHeight=e.clientHeight,v.adTagUrl=s,u.requestAds(v);const f=()=>{l==null||l.destroy(),u==null||u.destroy(),c==null||c.destroy(),c=void 0,u=void 0,v=void 0,l=void 0};return()=>{try{c.initialize()}catch(y){n==null||n(),console.log("AdsManager could not be started",y)}return f}},_o=t.styled_default("div")({name:"Container",class:"c4q6dw1",propsAsIs:!1}),No=t.styled_default("div")({name:"ControlsContainer",class:"c1la67r",propsAsIs:!1}),So="m3guev",To="m7099mt",Eo="mmm6o5s",Co=({promotion:e,controlVideo:s,promotionId:i,onClose:n,externalAd:r,skipAutoClose:a})=>{var c;const u=g.useRef(null),[v,l]=g.useState(!1),[f,y]=g.useState(0),[p,h]=g.useState(0),[b,A]=g.useState(0),I=g.useRef(),x=g.useCallback(()=>{y(0),h(0),A(0),l(!1),s==null||s({muted:!1})},[s]);g.useEffect(()=>{if(r!=null&&r.url&&u.current){x();const j=bo(u.current,r.url,{onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:i,type:e.type}}),s==null||s({muted:!0}),l(!0)},onStop:()=>{n==null||n(),x()},onProgress:_=>{y(Math.round(_.duration-_.currentTime)),h(_.totalAds),A(_.adPosition)}})();return I.current=j,()=>{I.current=void 0,j()}}},[r==null?void 0:r.url,s,x,i,e.type,n]);const S=((c=e.sponsor)==null?void 0:c.logo)&&e.logoMode===m.PromotionLogoMode.CENTER;return o.jsxs(ee,{className:"PromoOverlay",children:[o.jsxs(oe,{children:[o.jsx(te,{className:t.cx_default(!S&&se),children:o.jsx(ie,{style:{transform:"scale(1.5)"},children:"Ad"})}),o.jsxs(No,{children:[o.jsx(jo,{time:f,adCount:p,adPosition:b}),a&&o.jsx(t.b,{className:"ClosePromoIcon",close:()=>{var j;(j=I.current)==null||j.call(I),n==null||n(),x()}})]})]}),o.jsx(ne,{className:t.cx_default(So,v&&To,!v&&Eo),children:o.jsx(_o,{ref:u})})]})},X=e=>{var s,i,n,r,a,c,u,v,l,f,y,p,h,b,A,I,x,S,j,_,B,D,R,q,w,V,F,U,K,z;const{promotion:d,controlVideo:T,skipAutoClose:ae,promotionId:E,onClose:re,markAsViewed:P,externalAd:G}=e,L=d.type===m.PromotionType.INGAME_IAB11_LBAR||d.type===m.PromotionType.INGAME_IAB11,$=((s=d.sponsor)==null?void 0:s.logo)&&d.logoMode===m.PromotionLogoMode.CENTER,de=!!((n=(i=d.banner)==null?void 0:i.video)!=null&&n.url),M=d.autoPlayVideo===m.AutoPlayVideo.ENABLED,[ce,W]=g.useState(!de||!M);if(g.useEffect(()=>{E&&d.type&&P&&P()},[E,d.type,P]),g.useEffect(()=>()=>{T==null||T({muted:!1})},[T]),G)return o.jsx(Co,{...e,externalAd:G});let N=(r=d.banner)==null?void 0:r.url;return N&&N.indexOf("http")!==0&&(N=`https://${N}`),o.jsxs(ee,{className:"PromoOverlay",children:[o.jsxs(oe,{children:[o.jsxs(te,{className:t.cx_default(!$&&se),children:[((a=d.sponsor)==null?void 0:a.logo)&&d.logoMode===m.PromotionLogoMode.LEFT&&o.jsx(Y,{src:(c=d.sponsor)==null?void 0:c.logo,alt:"promo"}),o.jsxs(po,{style:{paddingLeft:(u=d.sponsor)!=null&&u.logo&&d.logoMode===m.PromotionLogoMode.LEFT?"0px":"8px"},children:[((v=d.sponsor)==null?void 0:v.logo)&&d.logoMode===m.PromotionLogoMode.LEFT&&o.jsx(ro,{children:(l=d.sponsor)==null?void 0:l.name}),o.jsxs(yo,{className:"SponsorText",children:[o.jsx(ie,{children:"AD"}),o.jsx(vo,{children:"SPONSORED"})]})]})]}),o.jsx(t.b,{className:"ClosePromoIcon",close:re,autoClose:(f=d.closeTimer)==null?void 0:f.auto,duration:ae?0:(y=d.closeTimer)==null?void 0:y.seconds,isPlaying:ce})]}),o.jsxs(ne,{children:[$&&o.jsx(Y,{className:mo,src:(p=d.sponsor)==null?void 0:p.logo,alt:"promo"}),o.jsx(J,{children:(b=(h=d.banner)==null?void 0:h.video)!=null&&b.url?o.jsx(t.Y,{source:(I=(A=d.banner)==null?void 0:A.video)==null?void 0:I.url,poster:(S=(x=d.banner)==null?void 0:x.video)==null?void 0:S.thumbnailUrl,aspectRatio:L?"1/1":"16/9",onPause:()=>{M&&W(!1)},onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:E,type:d.type}}),W(!0)},controlVideo:T,autoPlay:M}):(j=d.banner)!=null&&j.imageUrl?o.jsx(co,{style:L?{aspectRatio:"1/1"}:{},src:(_=d.banner)==null?void 0:_.imageUrl,alt:"promo"}):null}),!L&&o.jsxs(J,{children:[((B=d.banner)==null?void 0:B.title)&&o.jsx(go,{className:t.cx_default("AdvTitle",$&&Io),children:(D=d.banner)==null?void 0:D.title}),((R=d.banner)==null?void 0:R.body)&&o.jsx(uo,{className:"AdvDescription",children:(q=d.banner)==null?void 0:q.body})]})]}),d.buttonType!==m.PromotionButtonType.NO_BUTTON&&o.jsx(fo,{children:o.jsx(Ao,{href:N,style:{backgroundColor:((V=(w=d.banner)==null?void 0:w.ctaButton)==null?void 0:V.color)||"#009dc4",color:((U=(F=d.banner)==null?void 0:F.ctaButton)==null?void 0:U.textColor)||"#fff"},"data-analytics":"button","data-promo-id":E,"data-promo-type":d.type,target:"_blank",children:(z=(K=d.banner)==null?void 0:K.ctaButton)==null?void 0:z.label})})]})},Po=t.styled_default("div")({name:"SidebarContainer",class:"s1abskp8",propsAsIs:!1}),Lo=({children:e,direction:s,style:i,className:n,hiding:r})=>o.jsx(k,{direction:s,style:i,hiding:r,className:n,children:o.jsx(Po,{children:e})}),$o=e=>(e==null?void 0:e.type)===m.PromotionType.INGAME_IAB11_LBAR||(e==null?void 0:e.type)===m.PromotionType.INGAME_IAB21_LBAR,Mo=e=>(e==null?void 0:e.type)===m.PromotionType.INGAME_IAB11||(e==null?void 0:e.type)===m.PromotionType.INGAME_IAB21,ko=({advertisement:e,close:s,skipTypeCheck:i,skipAutoClose:n,layoutMode:r="side-by-side",sidebar:a,isNotification:c,banner:u,markAsViewed:v,open:l,externalAd:f,controlVideo:y})=>e.promotion?c&&e.notification?o.jsx(lo,{open:l,notification:e.notification,promotionId:e.question.id}):!a&&!u&&(i||Mo(e.promotion))?o.jsx(ao,{className:"PromoOverlayContainer",children:o.jsx(X,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,onClose:s,skipAutoClose:n,externalAd:f,controlVideo:y})}):a&&(i||$o(e.promotion))?o.jsx(Lo,{className:"PromoSidebarContainer",direction:a,hiding:!1,children:o.jsx(X,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,externalAd:f,onClose:s,controlVideo:y,skipAutoClose:n})}):u?o.jsx(_e,{promotionId:e.question.id,hiding:!1,promotion:e.promotion,direction:u}):null:null,Oo=t.styled_default("div")({name:"AdvertisementUIWrap",class:"aa6pjif",propsAsIs:!1}),Bo=e=>{const s=e.target;if(s instanceof HTMLAnchorElement&&s.target==="_blank"){const i=s.getAttribute("data-promo-id")||"",n=s.getAttribute("data-promo-type")||m.PromotionType.UNSET;s.getAttribute("data-analytics")==="button"&&t.eventBus.emit("advertisement",{action:"buttonSelect",payload:{id:i,type:n}}),s.getAttribute("data-analytics")==="banner"&&t.eventBus.emit("advertisement",{action:"bannerSelect",payload:{id:i,type:n}})}},Do=({gamification:e,layoutMode:s,skipAutoClose:i,skipTypeCheck:n,sidebar:r,banner:a,notification:c,isMobileScreen:u,persistent:v,externalAd:l,controlVideo:f})=>{var y,p,h;const b=g.useRef(null),A=t.useStore(e.advertisement.$store);t.L(b,{enabled:!!A.data,event:"click",listener:Bo});const I=!a&&!r;if(A.data===void 0||!v&&A.isViewed)return null;const x=((h=(p=(y=A==null?void 0:A.data)==null?void 0:y.notification)==null?void 0:p.promotion)==null?void 0:h.mode)===m.NotificationPromotionMode.LOWER_THIRD;return o.jsx(Oo,{ref:b,style:{height:I?"auto":"100%"},className:t.cx_default("SL-AdvertisementUIWrap",u&&"mobile-view",x&&"SL-AdvertisementUIWrap--lower-third"),children:o.jsx(ko,{skipTypeCheck:n,sidebar:r,banner:a,advertisement:A.data,close:A.close,externalAd:l?A.externalAd:void 0,markAsViewed:e.advertisement.markAsViewed,open:e.advertisement.open,layoutMode:s,isNotification:c,skipAutoClose:i,controlVideo:f})})},le=({sdk:e,sidebar:s,externalAd:i,banner:n,skipAutoClose:r,skipTypeCheck:a,layoutMode:c,isMobileScreen:u,persistent:v,notification:l})=>{const f=t.useStore(e.featuresList.getStore());if(g.useEffect(()=>{if(i){const p=document.createElement("script");p.async=!0,p.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",document.body.appendChild(p)}},[i]),s&&n)return o.jsx("div",{style:{color:"red"},children:"define either sidebar or banner, not both."});if(n&&i)return o.jsx("div",{style:{color:"red"},children:"externalAd is not supported with banner"});if(!f)return null;const y=e.getFeature(m.SdkOverlayType.GAMES);return y?o.jsx(Do,{gamification:y,sidebar:s,banner:n,layoutMode:c,isMobileScreen:u,persistent:v,notification:l,skipTypeCheck:a,skipAutoClose:r,externalAd:i,controlVideo:e.controlVideoPlayer}):null},Ro=({event:e,sidebar:s,banner:i,isMobileScreen:n,skipAutoClose:r,persistent:a,theme:c,notification:u,skipTypeCheck:v,externalAd:l})=>{const f=t.useStreamLayer(),y=t.useStreamLayerUI(),p=t.useStreamLayerTheme();return f?l&&!y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!l&&y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):s&&!y.promotionSidebar?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):i&&!y.promotionBanner?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):u&&!y.promotionNotification?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!i&&!s&&!u&&!y.promotionOverlay?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):o.jsxs("div",{className:"StreamLayerSDK",children:[o.jsx(t.d,{customTheme:c??p,children:o.jsx(le,{sdk:f,sidebar:s,banner:i,isMobileScreen:n,persistent:a,notification:u,skipTypeCheck:v,skipAutoClose:r,layoutMode:"side-by-side",externalAd:l})}),e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e})]}):null};exports.StreamLayerSDKAdvertisement=Ro;exports.StreamLayerSDKAdvertisementUI=le;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),g=require("react"),t=require("./index2.js"),u=require("./useStreamLayerApp2.js"),me=t.styled_default("div")({name:"Container",class:"c5b6wdg",propsAsIs:!1}),ue="a1rlj479",pe="s35f1di",ye="sj4471g",ve="b12050d8",fe="b1d5ybek",Ae=e=>e==="left"||e==="right"?pe:ve,ge=e=>e==="left"||e==="right"?ye:fe,Ie=e=>e==="left"?"avdxyl3":e==="right"?"a1bisd08":e==="top"?"a1u9y2aj":"a1qqaks",O=({children:e,style:s,className:l,enabled:n=!0,hiding:r,direction:a="left",onAnimationEnd:c})=>o.jsx(me,{style:s,className:t.cx_default(l,ue,Ie(a),n&&!r&&Ae(a),n&&r&&ge(a)),onAnimationEnd:c,children:e}),xe=t.styled_default("a")({name:"Link",class:"l1sgte8c",propsAsIs:!1}),he=t.styled_default("div")({name:"BannerContainer",class:"b7yfc72",propsAsIs:!1}),je=()=>xe,be=t.styled_default(je())({name:"BannerLink",class:"bejjq94",propsAsIs:!0}),_e=({promotion:e,promotionId:s,hiding:l,direction:n="bottom"})=>{var r,a;if(!((r=e.additionalBanner)!=null&&r.imageUrl))return null;let c=(a=e.banner)==null?void 0:a.url;return c&&c.indexOf("http")!==0&&(c=`https://${c}`),o.jsx(O,{direction:n,hiding:l,children:o.jsx(he,{className:"BannerContainer",children:o.jsx(be,{className:"BannerLink",href:c,style:{backgroundImage:`url(${e.additionalBanner.imageUrl})`},"data-promo-id":s,"data-promo-type":e.type,"data-analytics":"banner",target:"_blank"})})})},Ne=t.styled_default("div")({name:"NotificationContent",class:"n18wsqoo",propsAsIs:!1}),Se=t.styled_default("div")({name:"Body",class:"b1ia90c2",propsAsIs:!1}),Pe=t.styled_default("div")({name:"Title",class:"tg2z08v",propsAsIs:!1}),Te=t.styled_default("div")({name:"Text",class:"t59zdk1",propsAsIs:!1}),B=t.styled_default("div")({name:"MediaImgBottom",class:"m1ab9fq",propsAsIs:!1}),Ee=()=>B,$e=t.styled_default(Ee())({name:"MediaImgMiddle",class:"m9fsr0y",propsAsIs:!0}),Ce=t.styled_default("img")({name:"CtaIcon",class:"cvi9y5q",propsAsIs:!1}),Le=t.styled_default("button")({name:"Button",class:"bgl6boa",propsAsIs:!1}),Me=t.styled_default("div")({name:"Logo",class:"l5mq0z",propsAsIs:!1}),ke=t.styled_default("div")({name:"Footer",class:"f1mse0ft",propsAsIs:!1}),Oe=t.styled_default("div")({name:"Vector",class:"v1hcloah",propsAsIs:!1}),Be=t.styled_default("div")({name:"NotificationContainer",class:"n3n65jf",propsAsIs:!1}),De={[u.NotificationPromotionImagePosition.BOTTOM]:B,[u.NotificationPromotionImagePosition.MIDDLE]:$e},Re=({src:e,imagePosition:s})=>{const l=De[s]||B;return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},qe=({notification:e,open:s})=>{if(!e||!e.promotion||e.enabled!==u.NotificationEnabled.NOTIFICATION_ENABLED)return null;const{title:l,body:n,image:r,promotion:a}=e,{sponsorLogo:c,sponsorLogoMode:p,imagePosition:v,ctaButton:i}=a;return o.jsxs(Be,{className:"SL_Lower_Third_Notification",onClick:s,children:[o.jsxs(Ne,{children:[o.jsx(Re,{src:r,imagePosition:v}),o.jsxs(Se,{children:[l&&o.jsx(Pe,{children:l}),n&&o.jsx(Te,{children:n})]})]}),o.jsxs(ke,{children:[p!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsxs(o.Fragment,{children:[o.jsx(Me,{children:o.jsx("img",{src:c,alt:l})}),o.jsx(Oe,{})]}),o.jsxs(Le,{name:"promo-button",style:{color:i==null?void 0:i.textColor,backgroundColor:i==null?void 0:i.color},children:[(i==null?void 0:i.ctaIcon)&&(i==null?void 0:i.ctaIconMode)===u.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(Ce,{src:i==null?void 0:i.ctaIcon,alt:"cta-icon"}),(i==null?void 0:i.label)||"Open"]})]})]})},we=t.styled_default("div")({name:"NotificationContent",class:"n1ku6hz",propsAsIs:!1}),Ve=t.styled_default("div")({name:"NotificationContainer",class:"nbxqmol",propsAsIs:!1}),Fe=t.styled_default("div")({name:"Body",class:"b1gu3eml",propsAsIs:!1}),Ue=t.styled_default("div")({name:"Title",class:"t1u17zva",propsAsIs:!1}),Ke=t.styled_default("div")({name:"Text",class:"t10ko1g",propsAsIs:!1}),$=t.styled_default("div")({name:"Media",class:"mntc42e",propsAsIs:!1}),ze=()=>$,H=t.styled_default(ze())({name:"MediaImgFit",class:"ml060eo",propsAsIs:!0}),Ge=()=>$,Z=t.styled_default(Ge())({name:"MediaImgCentered",class:"m1vqlvig",propsAsIs:!0}),We=()=>Z,He=t.styled_default(We())({name:"MediaImgBottom",class:"m1e7tvi5",propsAsIs:!0}),Ye=()=>$,Je=t.styled_default(Ye())({name:"MediaImgSolid",class:"mqvntt2",propsAsIs:!0}),Qe=()=>$,Xe=t.styled_default(Qe())({name:"MediaImgMiddle",class:"m12jtj3u",propsAsIs:!0}),Ze=t.styled_default("img")({name:"CtaIcon",class:"ckq1frv",propsAsIs:!1}),eo=t.styled_default("button")({name:"Button",class:"bis90pl",propsAsIs:!1}),oo=()=>t.h1,to=t.styled_default(oo())({name:"StyledChevronRight",class:"s9mjmz3",propsAsIs:!0}),so=t.styled_default("div")({name:"Logo",class:"l1cf50a7",propsAsIs:!1}),no={[u.NotificationPromotionImagePosition.UNSET]:H,[u.NotificationPromotionImagePosition.FIT]:H,[u.NotificationPromotionImagePosition.CENTERED]:Z,[u.NotificationPromotionImagePosition.BOTTOM]:He,[u.NotificationPromotionImagePosition.SOLID]:Je,[u.NotificationPromotionImagePosition.MIDDLE]:Xe},lo=({src:e,imagePosition:s})=>{const l=no[s];return o.jsx(l,{children:o.jsx("img",{src:e,alt:""})})},io=({notification:e,open:s,promotionId:l,hiding:n,direction:r="left"})=>{if(!e||!e.promotion||e.enabled!==u.NotificationEnabled.NOTIFICATION_ENABLED)return null;if(e.promotion.mode===u.NotificationPromotionMode.LOWER_THIRD)return o.jsx(qe,{notification:e,open:s});const{title:a,body:c,image:p,promotion:v}=e,{sponsorLogo:i,sponsorLogoMode:f,imagePosition:y,ctaButton:m}=v;return o.jsx(O,{className:"SL_Rich_Notification",direction:r,hiding:n,children:o.jsxs(Ve,{onClick:s,children:[f!==u.NotificationSponsorLogoMode.NOTIFICATION_SPONSOR_LOGO_NONE&&o.jsx(so,{children:o.jsx("img",{src:i,alt:a})}),o.jsxs(we,{children:[o.jsx(lo,{src:p,imagePosition:y}),o.jsxs(Fe,{children:[a&&o.jsx(Ue,{children:a}),c&&o.jsx(Ke,{children:c})]}),o.jsxs(eo,{name:"promo-button",style:{color:m==null?void 0:m.textColor,backgroundColor:m==null?void 0:m.color},children:[(m==null?void 0:m.ctaIcon)&&(m==null?void 0:m.ctaIconMode)===u.CtaIconMode.CTA_ICON_TRANSPARENT&&o.jsx(Ze,{src:m==null?void 0:m.ctaIcon,alt:"cta-icon"}),(m==null?void 0:m.label)||"Open"]}),o.jsx(to,{name:"chevronRight"})]})]})})},ao=t.styled_default("div")({name:"OverlayContainer",class:"okzhq2w",propsAsIs:!1}),ee=t.styled_default("div")({name:"PromoOverlay",class:"pmgz5i",propsAsIs:!1}),oe=t.styled_default("div")({name:"Header",class:"hyxi3jt",propsAsIs:!1}),te=t.styled_default("div")({name:"HeaderContent",class:"h149e3gp",propsAsIs:!1}),se="h10toh7",Y=t.styled_default("img")({name:"SponsorLogo",class:"s1jyea6t",propsAsIs:!1}),ro=t.styled_default("div")({name:"SponsorName",class:"szpfa3h",propsAsIs:!1}),ne=t.styled_default("div")({name:"Media",class:"m1crmu01",propsAsIs:!1}),co=t.styled_default("img")({name:"PromoImg",class:"p1l37r8s",propsAsIs:!1}),mo="s1nmch9k",J=t.styled_default("div")({name:"Content",class:"c1er0ljd",propsAsIs:!1}),uo=t.styled_default("div")({name:"Description",class:"dydopmr",propsAsIs:!1}),po=t.styled_default("div")({name:"Sponsor",class:"s1w6nt04",propsAsIs:!1}),yo=t.styled_default("div")({name:"SponsorText",class:"s1evcmtq",propsAsIs:!1}),le=t.styled_default("div")({name:"ADLogo",class:"awodx0x",propsAsIs:!1}),vo=t.styled_default("span")({name:"SponsoredText",class:"s1q3n6oi",propsAsIs:!1}),fo=t.styled_default("div")({name:"ActionBtnWrap",class:"a8d4xfk",propsAsIs:!1}),Ao=t.styled_default("a")({name:"ActionButton",class:"at6oobh",propsAsIs:!1}),go=t.styled_default("div")({name:"Title",class:"t1gyg7tt",propsAsIs:!1}),Io="h17rwbtk",xo=t.styled_default("div")({name:"Container",class:"c10m2bce",propsAsIs:!1}),Q=t.styled_default("div")({name:"Item",class:"ig23yq5",propsAsIs:!1}),ho=t.styled_default("div")({name:"Dot",class:"d1f6aqua",propsAsIs:!1}),jo=({time:e,adCount:s,adPosition:l})=>{const n=Math.floor(e/60),r=e-n*60;return n===0&&r===0&&s===l?null:o.jsxs(xo,{children:[s>1&&o.jsxs(o.Fragment,{children:[o.jsxs(Q,{children:[l," of ",s]}),o.jsx(ho,{})]}),o.jsxs(Q,{children:[n,":",r<10?`0${r}`:r]})]})},bo=(e,s,{onPlay:l,onStop:n,onProgress:r})=>{const a=google.ima;let c=new a.AdDisplayContainer(e),p=new a.AdsLoader(c),v=new a.AdsRequest,i;p.addEventListener(a.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,y=>{i=y.getAdsManager(e),l&&i.addEventListener(a.AdEvent.Type.STARTED,l),n&&i.addEventListener(a.AdEvent.Type.COMPLETE,n),r&&i.addEventListener(a.AdEvent.Type.AD_PROGRESS,m=>r(m.getAdData())),i.init(e.clientWidth,e.clientHeight,a.ViewMode.NORMAL),i.start()},!1),p.addEventListener(a.AdErrorEvent.Type.AD_ERROR,()=>{console.log("ad error"),n==null||n()},!1),v.linearAdSlotWidth=e.clientWidth,v.linearAdSlotHeight=e.clientHeight,v.adTagUrl=s,p.requestAds(v);const f=()=>{i==null||i.destroy(),p==null||p.destroy(),c==null||c.destroy(),c=void 0,p=void 0,v=void 0,i=void 0};return()=>{try{c.initialize()}catch(y){n==null||n(),console.log("AdsManager could not be started",y)}return f}},_o=t.styled_default("div")({name:"Container",class:"c4q6dw1",propsAsIs:!1}),No=t.styled_default("div")({name:"ControlsContainer",class:"c1la67r",propsAsIs:!1}),So="m3guev",Po="m7099mt",To="mmm6o5s",Eo=({promotion:e,controlVideo:s,promotionId:l,onClose:n,externalAd:r,skipAutoClose:a})=>{var c;const p=g.useRef(null),[v,i]=g.useState(!1),[f,y]=g.useState(0),[m,I]=g.useState(0),[b,A]=g.useState(0),x=g.useRef(),h=g.useCallback(()=>{y(0),I(0),A(0),i(!1),s==null||s({muted:!1})},[s]);g.useEffect(()=>{if(r!=null&&r.url&&p.current){h();const j=bo(p.current,r.url,{onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:l,type:e.type}}),s==null||s({muted:!0}),i(!0)},onStop:()=>{n==null||n(),h()},onProgress:_=>{y(Math.round(_.duration-_.currentTime)),I(_.totalAds),A(_.adPosition)}})();return x.current=j,()=>{x.current=void 0,j()}}},[r==null?void 0:r.url,s,h,l,e.type,n]);const P=((c=e.sponsor)==null?void 0:c.logo)&&e.logoMode===u.PromotionLogoMode.CENTER;return o.jsxs(ee,{className:"PromoOverlay",children:[o.jsxs(oe,{children:[o.jsx(te,{className:t.cx_default(!P&&se),children:o.jsx(le,{style:{transform:"scale(1.5)"},children:"Ad"})}),o.jsxs(No,{children:[o.jsx(jo,{time:f,adCount:m,adPosition:b}),a&&o.jsx(t.b,{className:"ClosePromoIcon",close:()=>{var j;(j=x.current)==null||j.call(x),n==null||n(),h()}})]})]}),o.jsx(ne,{className:t.cx_default(So,v&&Po,!v&&To),children:o.jsx(_o,{ref:p})})]})},X=e=>{var s,l,n,r,a,c,p,v,i,f,y,m,I,b,A,x,h,P,j,_,D,R,q,w,V,F,U,K,z,G;const{promotion:d,advertisementPaused:ae,togglePause:N,controlVideo:T,skipAutoClose:re,promotionId:E,onClose:de,markAsViewed:C,externalAd:W}=e,L=d.type===u.PromotionType.INGAME_IAB11_LBAR||d.type===u.PromotionType.INGAME_IAB11,M=((s=d.sponsor)==null?void 0:s.logo)&&d.logoMode===u.PromotionLogoMode.CENTER,ce=!!((n=(l=d.banner)==null?void 0:l.video)!=null&&n.url),k=d.autoPlayVideo===u.AutoPlayVideo.ENABLED;if(g.useEffect(()=>{N==null||N(ce||k)},[]),g.useEffect(()=>{E&&d.type&&C&&C()},[E,d.type,C]),g.useEffect(()=>()=>{T==null||T({muted:!1})},[T]),W)return o.jsx(Eo,{...e,externalAd:W});let S=(r=d.banner)==null?void 0:r.url;return S&&S.indexOf("http")!==0&&(S=`https://${S}`),o.jsxs(ee,{className:"PromoOverlay",children:[o.jsxs(oe,{children:[o.jsxs(te,{className:t.cx_default(!M&&se),children:[((a=d.sponsor)==null?void 0:a.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(Y,{src:(c=d.sponsor)==null?void 0:c.logo,alt:"promo"}),o.jsxs(po,{style:{paddingLeft:(p=d.sponsor)!=null&&p.logo&&d.logoMode===u.PromotionLogoMode.LEFT?"0px":"8px"},children:[((v=d.sponsor)==null?void 0:v.logo)&&d.logoMode===u.PromotionLogoMode.LEFT&&o.jsx(ro,{children:(i=d.sponsor)==null?void 0:i.name}),o.jsxs(yo,{className:"SponsorText",children:[o.jsx(le,{children:"AD"}),o.jsx(vo,{children:"SPONSORED"})]})]})]}),o.jsx(t.b,{className:"ClosePromoIcon",close:de,autoClose:(f=d.closeTimer)==null?void 0:f.auto,duration:re?0:(y=d.closeTimer)==null?void 0:y.seconds,isPlaying:!ae})]}),o.jsxs(ne,{children:[M&&o.jsx(Y,{className:mo,src:(m=d.sponsor)==null?void 0:m.logo,alt:"promo"}),o.jsx(J,{children:(b=(I=d.banner)==null?void 0:I.video)!=null&&b.url?o.jsx(t.Y,{source:(x=(A=d.banner)==null?void 0:A.video)==null?void 0:x.url,poster:(P=(h=d.banner)==null?void 0:h.video)==null?void 0:P.thumbnailUrl,aspectRatio:L?"1/1":"16/9",onPause:()=>{k&&(N==null||N(!0))},onPlay:()=>{t.eventBus.emit("advertisement",{action:"videoPlay",payload:{id:E,type:d.type}}),N==null||N(!1)},controlVideo:T,autoPlay:k}):(j=d.banner)!=null&&j.imageUrl?o.jsx(co,{style:L?{aspectRatio:"1/1"}:{},src:(_=d.banner)==null?void 0:_.imageUrl,alt:"promo"}):null}),!L&&o.jsxs(J,{children:[((D=d.banner)==null?void 0:D.title)&&o.jsx(go,{className:t.cx_default("AdvTitle",M&&Io),children:(R=d.banner)==null?void 0:R.title}),((q=d.banner)==null?void 0:q.body)&&o.jsx(uo,{className:"AdvDescription",children:(w=d.banner)==null?void 0:w.body})]})]}),d.buttonType!==u.PromotionButtonType.NO_BUTTON&&o.jsx(fo,{children:o.jsx(Ao,{href:S,style:{backgroundColor:((F=(V=d.banner)==null?void 0:V.ctaButton)==null?void 0:F.color)||"#009dc4",color:((K=(U=d.banner)==null?void 0:U.ctaButton)==null?void 0:K.textColor)||"#fff"},"data-analytics":"button","data-promo-id":E,"data-promo-type":d.type,target:"_blank",children:(G=(z=d.banner)==null?void 0:z.ctaButton)==null?void 0:G.label})})]})},$o=t.styled_default("div")({name:"SidebarContainer",class:"s1abskp8",propsAsIs:!1}),Co=({children:e,direction:s,style:l,className:n,hiding:r})=>o.jsx(O,{direction:s,style:l,hiding:r,className:n,children:o.jsx($o,{children:e})}),Lo=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11_LBAR||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21_LBAR,Mo=e=>(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB11||(e==null?void 0:e.type)===u.PromotionType.INGAME_IAB21,ko=({advertisement:e,close:s,skipTypeCheck:l,skipAutoClose:n,layoutMode:r="side-by-side",sidebar:a,isNotification:c,banner:p,markAsViewed:v,open:i,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:I})=>e.promotion?c&&e.notification?o.jsx(io,{open:i,notification:e.notification,promotionId:e.question.id}):!a&&!p&&(l||Mo(e.promotion))?o.jsx(ao,{className:"PromoOverlayContainer",children:o.jsx(X,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,onClose:s,skipAutoClose:n,externalAd:f,controlVideo:y,advertisementPaused:m,togglePause:I})}):a&&(l||Lo(e.promotion))?o.jsx(Co,{className:"PromoSidebarContainer",direction:a,hiding:!1,children:o.jsx(X,{markAsViewed:v,promotionId:e.question.id,promotion:e.promotion,externalAd:f,onClose:s,controlVideo:y,skipAutoClose:n,advertisementPaused:m,togglePause:I})}):p?o.jsx(_e,{promotionId:e.question.id,hiding:!1,promotion:e.promotion,direction:p}):null:null,Oo=t.styled_default("div")({name:"AdvertisementUIWrap",class:"aa6pjif",propsAsIs:!1}),Bo=e=>{const s=e.target;if(s instanceof HTMLAnchorElement&&s.target==="_blank"){const l=s.getAttribute("data-promo-id")||"",n=s.getAttribute("data-promo-type")||u.PromotionType.UNSET;s.getAttribute("data-analytics")==="button"&&t.eventBus.emit("advertisement",{action:"buttonSelect",payload:{id:l,type:n}}),s.getAttribute("data-analytics")==="banner"&&t.eventBus.emit("advertisement",{action:"bannerSelect",payload:{id:l,type:n}})}},Do=({gamification:e,layoutMode:s,skipAutoClose:l,skipTypeCheck:n,sidebar:r,banner:a,notification:c,isMobileScreen:p,persistent:v,externalAd:i,controlVideo:f})=>{var y,m,I;const b=g.useRef(null),A=t.useStore(e.advertisement.$store);t.L(b,{enabled:!!A.data,event:"click",listener:Bo});const x=!a&&!r;if(A.data===void 0||!v&&A.isViewed)return null;const h=((I=(m=(y=A==null?void 0:A.data)==null?void 0:y.notification)==null?void 0:m.promotion)==null?void 0:I.mode)===u.NotificationPromotionMode.LOWER_THIRD;return o.jsx(Oo,{ref:b,style:{height:x?"auto":"100%"},className:t.cx_default("SL-AdvertisementUIWrap",p&&"mobile-view",h&&"SL-AdvertisementUIWrap--lower-third"),children:o.jsx(ko,{skipTypeCheck:n,sidebar:r,banner:a,advertisement:A.data,advertisementPaused:A.isPaused,togglePause:A.togglePause,close:A.close,externalAd:i?A.externalAd:void 0,markAsViewed:e.advertisement.markAsViewed,open:e.advertisement.open,layoutMode:s,isNotification:c,skipAutoClose:l,controlVideo:f})})},ie=({sdk:e,sidebar:s,externalAd:l,banner:n,skipAutoClose:r,skipTypeCheck:a,layoutMode:c,isMobileScreen:p,persistent:v,notification:i})=>{const f=t.useStore(e.featuresList.getStore());if(g.useEffect(()=>{if(l){const m=document.createElement("script");m.async=!0,m.src="https://imasdk.googleapis.com/js/sdkloader/ima3.js",document.body.appendChild(m)}},[l]),s&&n)return o.jsx("div",{style:{color:"red"},children:"define either sidebar or banner, not both."});if(n&&l)return o.jsx("div",{style:{color:"red"},children:"externalAd is not supported with banner"});if(!f)return null;const y=e.getFeature(u.SdkOverlayType.GAMES);return y?o.jsx(Do,{gamification:y,sidebar:s,banner:n,layoutMode:c,isMobileScreen:p,persistent:v,notification:i,skipTypeCheck:a,skipAutoClose:r,externalAd:l,controlVideo:e.controlVideoPlayer}):null},Ro=({event:e,sidebar:s,banner:l,isMobileScreen:n,skipAutoClose:r,persistent:a,theme:c,notification:p,skipTypeCheck:v,externalAd:i})=>{const f=t.useStreamLayer(),y=t.useStreamLayerUI(),m=t.useStreamLayerTheme();return f?i&&!y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!i&&y.promotionExternalAd?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):s&&!y.promotionSidebar?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):l&&!y.promotionBanner?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):p&&!y.promotionNotification?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):!l&&!s&&!p&&!y.promotionOverlay?e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e}):o.jsxs("div",{className:"StreamLayerSDK",children:[o.jsx(t.d,{customTheme:c??m,children:o.jsx(ie,{sdk:f,sidebar:s,banner:l,isMobileScreen:n,persistent:a,notification:p,skipTypeCheck:v,skipAutoClose:r,layoutMode:"side-by-side",externalAd:i})}),e!==void 0&&o.jsx(t.StreamLayerSDKEvent,{event:e})]}):null};exports.StreamLayerSDKAdvertisement=Ro;exports.StreamLayerSDKAdvertisementUI=ie;