__d("LiveProducerLP2ScheduledLiveVideoAdsCard.react",["fbt","BaseDivider.react","CometColumn.react","CometColumnItem.react","CometRow.react","CometRowItem.react","FDSButton.react","FDSCard.react","FDSText.react","LiveProducerLP2AdsStatusFormatter","LiveProducerScheduledLiveVideoAdUtils","nux:681","qex","react","react-compiler-runtime","requireDeferred","useCometRouterDispatcher","useEmptyFunction","useSinglePartialViewImpression"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u,c,d=c||(c=o("react")),m=c.useCallback,p=r("requireDeferred")("LiveBoostingFalcoEvent").__setRef("LiveProducerLP2ScheduledLiveVideoAdsCard.react"),_={buttonContainer:{marginBottom:"xod5an3",marginInlineStart:"xqsn43r",marginInlineEnd:"x3aesyq",marginLeft:null,marginRight:null,marginTop:"x1rdy4ex",$$css:!0},divider:{marginBottom:"x12nagc",marginTop:"x1gslohp",$$css:!0},innerCard:{justifyContent:"x1qughib",$$css:!0},nux:{width:"xdzyupr",$$css:!0},textContainer:{flexGrow:"x1iyjqo2",minHeight:"x1db3i3o",paddingTop:"x1p5oq8j",paddingInlineEnd:"x64bnmy",paddingBottom:"xwxc41k",paddingInlineStart:"x13jy36j",$$css:!0}},f=(e=(u=n("nux:681"))==null?void 0:u("SLVA_GO_LIVE_NUX"))!=null?e:r("useEmptyFunction");function g(e){var t=o("react-compiler-runtime").c(58),n=e.adgroupID,a=e.adsStatus,i=e.formattedStartTime,l=e.hasGoLiveButton,u=e.isInvalidated,c=e.isLiveNow,m=e.isStartTimeApproaching,g=e.isStartTimePast,h=e.page,y=e.setIsLoading,C=e.title,b=e.videoID,v;t[0]===Symbol.for("react.memo_cache_sentinel")?(v=s._(/*BTDS*/""),t[0]=v):v=t[0];var S;t[1]===Symbol.for("react.memo_cache_sentinel")?(S={align:"end","aria-label":v,arrowStyle:"inset",content:s._(/*BTDS*/""),hasCloseButton:!0,position:"below",type:"accent",xstyle:_.nux},t[1]=S):S=t[1];var R=f(S,a==="ACTIVE"),L;t[2]!==a||t[3]!==u||t[4]!==g?(L=o("LiveProducerLP2AdsStatusFormatter").getAdsStatusLabel(a,g,u),t[2]=a,t[3]=u,t[4]=g,t[5]=L):L=t[5];var E=L,k;t[6]!==a||t[7]!==u||t[8]!==g?(k=o("LiveProducerLP2AdsStatusFormatter").getColorForAdsStatus(a,g,u),t[6]=a,t[7]=u,t[8]=g,t[9]=k):k=t[9];var I=k,T=function(){p.onReady(function(e){return e.log(function(){return{adgroup_id_provided:n,event:"slva_live_producer_tab_click",extra_data:{ad_status:a},page_id:h==null?void 0:h.id,surface:"live_producer",video_id:b}})}),y(!0),N()},D=r("useCometRouterDispatcher")(),x;t[10]!==n||t[11]!==a||t[12]!==(h==null?void 0:h.id)||t[13]!==b?(x={onImpressionStart:function(){p.onReady(function(e){return e.log(function(){return{adgroup_id_provided:n,event:"slva_live_producer_tab_impression",extra_data:{ad_status:a},page_id:h==null?void 0:h.id,surface:"live_producer",video_id:b}})})}},t[10]=n,t[11]=a,t[12]=h==null?void 0:h.id,t[13]=b,t[14]=x):x=t[14];var $=r("useSinglePartialViewImpression")(x),P;t[15]!==D||t[16]!==b?(P=function(){o("LiveProducerScheduledLiveVideoAdUtils").routeToGoLiveViewOnVideo(b,D)},t[15]=D,t[16]=b,t[17]=P):P=t[17];var N=P,M;t[18]===Symbol.for("react.memo_cache_sentinel")?(M=s._(/*BTDS*/""),t[18]=M):M=t[18];var w=M,A;t[19]!==E||t[20]!==I?(A=E!=null&&I!=null&&d.jsxs(d.Fragment,{children:[d.jsx(r("CometRowItem.react"),{children:d.jsx(r("FDSText.react"),{color:I,type:"meta2",children:E})}),d.jsx(r("CometRowItem.react"),{children:d.jsx(r("FDSText.react"),{type:"meta2",children:"u2022"})})]}),t[19]=E,t[20]=I,t[21]=A):A=t[21];var F;t[22]!==i?(F=d.jsx(r("CometRowItem.react"),{children:d.jsx(r("FDSText.react"),{type:"meta2",children:i})}),t[22]=i,t[23]=F):F=t[23];var O;t[24]!==A||t[25]!==F?(O=d.jsx(r("CometColumnItem.react"),{children:d.jsx(r("CometRow.react"),{align:"start",paddingHorizontal:0,paddingVertical:0,children:d.jsx(r("CometRowItem.react"),{children:d.jsxs(r("CometRow.react"),{align:"start",paddingHorizontal:0,paddingVertical:0,children:[A,F]})})})}),t[24]=A,t[25]=F,t[26]=O):O=t[26];var B;t[27]===Symbol.for("react.memo_cache_sentinel")?(B=d.jsx(r("CometColumnItem.react"),{children:d.jsx(r("BaseDivider.react"),{xstyle:_.divider})}),t[27]=B):B=t[27];var W;t[28]!==n?(W=n!==null&&d.jsx(r("CometColumnItem.react"),{style:{maxWidth:300},children:d.jsxs(r("FDSText.react"),{numberOfLines:1,type:"meta3",children:[w," ",n]})}),t[28]=n,t[29]=W):W=t[29];var q;t[30]===Symbol.for("react.memo_cache_sentinel")?(q={maxWidth:300},t[30]=q):q=t[30];var U;t[31]!==C?(U=d.jsx(r("CometColumnItem.react"),{style:q,children:d.jsx(r("FDSText.react"),{numberOfLines:1,type:"headlineEmphasized3",children:C})}),t[31]=C,t[32]=U):U=t[32];var V;t[33]!==a||t[34]!==u||t[35]!==g?(V=o("LiveProducerLP2AdsStatusFormatter").getDescriptionForAdsStatus(a,g,u),t[33]=a,t[34]=u,t[35]=g,t[36]=V):V=t[36];var H;t[37]!==V?(H=d.jsx(r("CometColumnItem.react"),{children:d.jsx(r("FDSText.react"),{type:"meta3",children:V})}),t[37]=V,t[38]=H):H=t[38];var G;t[39]!==O||t[40]!==W||t[41]!==U||t[42]!==H?(G=d.jsxs(r("CometColumn.react"),{spacing:12,xstyle:_.textContainer,children:[O,B,W,U,H]}),t[39]=O,t[40]=W,t[41]=U,t[42]=H,t[43]=G):G=t[43];var z;if(t[44]!==a||t[45]!==R||t[46]!==l||t[47]!==c||t[48]!==m||t[49]!==g||t[50]!==T){var j;z=l&&d.jsx(r("CometColumnItem.react"),{xstyle:_.buttonContainer,children:d.jsx("div",{ref:R,children:d.jsx(r("FDSButton.react"),{disabled:!m||g||a==="ERROR",label:c?s._(/*BTDS*/""):(j=r("qex")._("4549"))!=null?j:s._(/*BTDS*/""),onPress:T,reduceEmphasis:!0})})}),t[44]=a,t[45]=R,t[46]=l,t[47]=c,t[48]=m,t[49]=g,t[50]=T,t[51]=z}else z=t[51];var K;t[52]!==G||t[53]!==z?(K=d.jsxs(r("FDSCard.react"),{background:"white",dropShadow:2,expanding:!0,xstyle:_.innerCard,children:[G,z]}),t[52]=G,t[53]=z,t[54]=K):K=t[54];var Q;return t[55]!==$||t[56]!==K?(Q=d.jsx("div",{ref:$,children:K}),t[55]=$,t[56]=K,t[57]=Q):Q=t[57],Q}l.default=g}),226); __d("LiveProducerLP2ScheduledLiveVideoAdsDialogQuery_facebookRelayOperation",[],(function(t,n,r,o,a,i){a.exports="24090220310647815"}),null); __d("LiveProducerLP2ScheduledLiveVideoAdsDialogQuery$Parameters",["LiveProducerLP2ScheduledLiveVideoAdsDialogQuery_facebookRelayOperation"],(function(t,n,r,o,a,i){"use strict";var e={kind:"PreloadableConcreteRequest",params:{id:n("LiveProducerLP2ScheduledLiveVideoAdsDialogQuery_facebookRelayOperation"),metadata:{},name:"LiveProducerLP2ScheduledLiveVideoAdsDialogQuery",operationKind:"query",text:null}};a.exports=e}),null); __d("LiveProducerLP2ScheduledLiveVideoAdsDialog.entrypoint",["JSResourceForInteraction","LiveProducerLP2ScheduledLiveVideoAdsDialogQuery$Parameters"],(function(t,n,r,o,a,i,l){"use strict";var e={getPreloadProps:function(t){var e=t.page_id;return{queries:{queryReference:{options:{fetchPolicy:"store-or-network"},parameters:r("LiveProducerLP2ScheduledLiveVideoAdsDialogQuery$Parameters"),variables:{page_id:e}}}}},root:r("JSResourceForInteraction")("LiveProducerLP2ScheduledLiveVideoAdsDialog.react").__setRef("LiveProducerLP2ScheduledLiveVideoAdsDialog.entrypoint")};l.default=e}),98); __d("LiveProducerScheduledLiveVideoAdsCardUtils",["fbt","LiveProducerLP2ScheduledLiveVideoAdsCard.react","LiveProducerScheduledLiveVideoAdUtils","formatDate","react"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u=e||(e=r("react")),c=864e5;function d(e){return e.toLocaleDateString("en-US",{day:"numeric",month:"long"})}function m(e,t,n,o){var a=d(new Date),i=d(new Date(Date.now()+c)),l=d(e),u=o?r("formatDate")(e,"M j"):d(e),m=n?",":"",p=t?s._(/*BTDS*/"").toString():s._(/*BTDS*/"").toString(),_=t?s._(/*BTDS*/"").toString():s._(/*BTDS*/"").toString();return l===a?" "+p:l===i?" "+_:m+" "+u}function p(e,t,n){var a,i=o("LiveProducerScheduledLiveVideoAdUtils").getValidScheduledLiveVideoAds(t==null||(a=t.live_shopping_scheduled_live_video)==null?void 0:a.nodes);if(i==null||i.length===0)return null;var l=i.map(function(a){var i,l,c,d,p,_,f,g,h=a==null||(i=a.video)==null||(i=i.scheduled_live_video_ads_info)==null?void 0:i.adgroup_id,y=a==null||(l=a.video)==null||(l=l.scheduled_live_video_ads_info)==null?void 0:l.ads_status,C=a==null||(c=a.video)==null||(c=c.scheduled_live_video_ads_info)==null?void 0:c.start_time,b=(d=a==null||(p=a.video)==null||(p=p.scheduled_live_video_ads_info)==null?void 0:p.is_invalidated)!=null?d:!1,v=a==null||(_=a.video)==null?void 0:_.name,S=a==null||(f=a.video)==null?void 0:f.id,R=a==null||(g=a.video)==null?void 0:g.broadcast_status,L=C!=null&&C1?s.jsx(o("FDSHScroll.react").Container,{cardWidth:{minWidth:360,type:"responsive"},gap:8,peek:!0,peekPaddingEnd:12,peekPaddingStart:12,reduceArrowSize:!0,children:l.map(d)}):s.jsx(s.Fragment,{children:l.map(c)})}t[0]=n,t[1]=r,t[2]=a,t[3]=i}else a=t[2],i=t[3];return i!==Symbol.for("react.early_return_sentinel")?i:a}function c(e){return e.slva_card}function d(e,t){return s.jsx(o("FDSHScroll.react").Child,{children:e.slva_card},t)}d.displayName=d.name+" [from "+i.id+"]",l.default=u}),98); __d("useLiveProducerLP2ScheduledLiveVideoAdsDialog",["LiveProducerLP2ScheduledLiveVideoAdsDialog.entrypoint","react","react-compiler-runtime","useCometEntryPointDialog"],(function(t,n,r,o,a,i,l){"use strict";var e,s=(e||(e=o("react"))).useCallback;function u(e,t,n){var a=o("react-compiler-runtime").c(6),i;a[0]!==e?(i={page_id:e},a[0]=e,a[1]=i):i=a[1];var l=r("useCometEntryPointDialog")(r("LiveProducerLP2ScheduledLiveVideoAdsDialog.entrypoint"),i),s=l[0],u;return a[2]!==t||a[3]!==n||a[4]!==s?(u=function(){s({page:t,setIsLoading:n})},a[2]=t,a[3]=n,a[4]=s,a[5]=u):u=a[5],u}l.useLiveProducerLP2ScheduledLiveVideoAdsDialog=u}),98); __d("LiveProducerLP2ScheduledLiveVideoAdsTab.react",["fbt","CometColumn.react","CometColumnItem.react","CometRelay","CometRow.react","CometRowItem.react","FDSCard.react","FDSInlinePressableText.react","FDSText.react","LiveProducerLP2ScheduledLiveVideoAdsSection.react","LiveProducerScheduledLiveVideoAdUtils","react","react-compiler-runtime","useLiveProducerLP2ScheduledLiveVideoAdsDialog"],(function(t,n,r,o,a,i,l,s){"use strict";var e,u=e||(e=o("react")),c={seeAllButton:{paddingTop:"xz9dl7a",$$css:!0},tabCard:{paddingInlineEnd:"xv54qhq",paddingBottom:"x1l90r2v",paddingInlineStart:"xf7dkkf",paddingTop:"x1iorvi4",$$css:!0}};function d(e){var t,n,a=o("react-compiler-runtime").c(14),i=e.page$key,l=e.setIsLoading,d=o("CometRelay").useFragment(o("LiveProducerScheduledLiveVideoAdUtils").SCHEDULED_LIVE_VIDEO_FRAGMENT,i),m=o("LiveProducerScheduledLiveVideoAdUtils").getHasValidScheduledLiveVideoAd(d==null||(t=d.live_shopping_scheduled_live_video)==null?void 0:t.nodes),p=o("useLiveProducerLP2ScheduledLiveVideoAdsDialog").useLiveProducerLP2ScheduledLiveVideoAdsDialog((n=d==null?void 0:d.id)!=null?n:"",d,l);if(!m)return null;var _;a[0]===Symbol.for("react.memo_cache_sentinel")?(_={className:"xyqm7xq x1ys307a"},a[0]=_):_=a[0];var f;a[1]===Symbol.for("react.memo_cache_sentinel")?(f=u.jsx(r("CometColumnItem.react"),{paddingTop:4,children:u.jsx(r("FDSText.react"),{type:"headlineEmphasized3",children:s._(/*BTDS*/"")})}),a[1]=f):f=a[1];var g;a[2]===Symbol.for("react.memo_cache_sentinel")?(g=u.jsxs(r("CometRowItem.react"),{children:[f,u.jsx(r("CometColumnItem.react"),{paddingTop:12,children:u.jsx(r("FDSText.react"),{type:"meta3",children:s._(/*BTDS*/"")})})]}),a[2]=g):g=a[2];var h;a[3]!==p?(h=function(){return p()},a[3]=p,a[4]=h):h=a[4];var y;a[5]===Symbol.for("react.memo_cache_sentinel")?(y=s._(/*BTDS*/""),a[5]=y):y=a[5];var C;a[6]!==h?(C=u.jsx(r("CometColumnItem.react"),{children:u.jsxs(r("CometRow.react"),{children:[g,u.jsx(r("CometRowItem.react"),{xstyle:c.seeAllButton,children:u.jsx(r("FDSText.react"),{color:"highlight",type:"button1",children:u.jsx(r("FDSInlinePressableText.react"),{hoverUnderlineDisabled:!0,onPress:h,children:y})})})]})}),a[6]=h,a[7]=C):C=a[7];var b;a[8]!==d||a[9]!==l?(b=u.jsx(r("CometColumnItem.react"),{paddingTop:16,children:u.jsx(r("LiveProducerLP2ScheduledLiveVideoAdsSection.react"),{page:d,setIsLoading:l})}),a[8]=d,a[9]=l,a[10]=b):b=a[10];var v;return a[11]!==C||a[12]!==b?(v=u.jsx("div",babelHelpers.extends({},_,{children:u.jsx(r("FDSCard.react"),{background:"white",dropShadow:1,expanding:!0,xstyle:c.tabCard,children:u.jsxs(r("CometColumn.react"),{children:[C,b]})})})),a[11]=C,a[12]=b,a[13]=v):v=a[13],v}l.default=d}),226);