import{p as z,aX as D,bI as G,ay as K,az as e,aj as X,dK as Z,f0 as J,bw as Q,fb as W,fc as Y,fh as _,dN as $,bu as tt,bN as et,bO as ot,bP as x,fd as at,jp as it,fe as st,i6 as rt,ao as n,aZ as nt}from"./app-k0jcl5PQ.js";import{u as mt}from"./CtFw3Moj.chunk.js";import{u as dt,T as y,P as ct}from"./BfuF1qtN.chunk.js";import{u as pt}from"./DDxzgH2W.chunk.js";import{u as ut}from"./GqZ33xmI.chunk.js";import{u as lt}from"./4IZETxJX.chunk.js";import{u as ht}from"./Dw2t5TEb.chunk.js";import"./CCtuxSlD.chunk.js";import"./CPXlV0fg.chunk.js";import"./Crww-RVm.chunk.js";import"./80MCcucU.chunk.js";import"./ZlF_2kui.chunk.js";import"./Bj7bJt_4.chunk.js";import"./CGYNvpr2.chunk.js";import"./Q_WQ5xs9.chunk.js";import"./DdN4NAtQ.chunk.js";import"./CBiwFpxE.chunk.js";import"./BYBYoVkn.chunk.js";import"./BurIODLh.chunk.js";import"./BhYYYlpK.chunk.js";import"./FGhEvk_q.chunk.js";import"./WCBjpMHJ.chunk.js";import"./DoFMWlew.chunk.js";import"./CMnqIsoM.chunk.js";import"./neLjacsa.chunk.js";import"./Bpw1_OdO.chunk.js";import"./BwBaQklX.chunk.js";import"./1YwtoG9U.chunk.js";import"./BZa85bFL.chunk.js";import"./D1WNsOm8.chunk.js";import"./U4M4wGTR.chunk.js";import"./BgZMo0y9.chunk.js";import"./CX9BGBTP.chunk.js";import"./uoUaCILN.chunk.js";import"./DXJ2-V8v.chunk.js";import"./DH1mz64H.chunk.js";import"./BlKMjFEf.chunk.js";import"./CofWDDSQ.chunk.js";import"./DwvfEevL.chunk.js";import"./D9SGbB34.chunk.js";import"./ByBCp1MC.chunk.js";import"./eerUhItV.chunk.js";import"./Cukd0Qmt.chunk.js";import"./B31bqZwo.chunk.js";import"./f_twTV5Z.chunk.js";import"./BDeUEvb2.chunk.js";import"./Daim1zo7.chunk.js";import"./B3XH0kWB.chunk.js";import"./BRhv_AHY.chunk.js";import"./BDviDDog.chunk.js";import"./wCY37Ze3.chunk.js";import"./CIN5bTKK.chunk.js";import"./BUtU6IOA.chunk.js";import"./DAIetGMf.chunk.js";import"./TReHo2Ua.chunk.js";import"./Bw9otuBi.chunk.js";import"./BvnABNse.chunk.js";import"./Bh7bFXwG.chunk.js";import"./DCdUbbLx.chunk.js";import"./t24_x3Gi.chunk.js";import"./BlyWclzH.chunk.js";import"./BWkfKZwD.chunk.js";import"./BAuuQuuB.chunk.js";import"./lKJuB19y.chunk.js";import"./0f3cnETk.chunk.js";import"./BqNArZps.chunk.js";import"./DWt5Ov1e.chunk.js";import"./BxQFOoIR.chunk.js";import"./DlYrdKHv.chunk.js";import"./D62ACZel.chunk.js";import"./BBUCoOir.chunk.js";import"./BrY2bcAL.chunk.js";import"./BHJbqrq4.chunk.js";import"./DRX7tQDY.chunk.js";import"./BNuOjrBr.chunk.js";import"./CW-zLlXC.chunk.js";import"./BKsI6eJC.chunk.js";import"./DtIulmHQ.chunk.js";function Ee(t){var P,b,I,v,g,V,C,S;const{commonVideoProps:j,hasCommonVideoPropsCompleted:q}=pt({locationContext:z.VideoThumbnail}),{hasPermissions:R}=D(),m=ut(),T=ht(),{activePresentation:u}=G(),{hasPlayPageTranscript:w,hasNewSearch:A}=K(null),s=e(X.currentUser()),o=e(Z.sharedVideo(t.objectId,t.shareId)),U=e(m.canViewClips&&J.videoClips(t.objectId)),F=e(m.canViewInteractives&&Q.videoInteractives(t.objectId)),l=W({video:o.data,context:t.queryParams.context,contextId:t.queryParams.contextId,moviesAndTv:t.queryParams.mtv,currentUser:s.data}),r=Y(t.objectId),L=e(!!u&&_.audiencesByPresentationId(u.id)),{shouldFetchTranscript:h,shouldShowTranscript:M}=dt(t.objectId,t.shareId),d=e(h&&((P=s.data)==null?void 0:P.contentRegion)&&y.chaptersAndSubtitles(t.objectId,s.data.contentRegion)),{subtitles:c,chapters:N}=(d==null?void 0:d.data)||{},a=c==null?void 0:c.filter(i=>!i.customer),B=a&&a.length>0?a.map(i=>y.subtitleVtt(i.url,i)):[],p=$(B),O=(a==null?void 0:a.filter(i=>p.data.find(H=>H.id===i.id)))||[],f=e(tt.config());et(ot.getVideoMetadata({content:o.data,canonicalLink:x.getCanonicalLink({stripPresentationSlug:!0}),allowIndexing:!1})),lt(l.videos??[]),at(o,{private:it}),st({id:t.objectId,app:"videos",shareId:t.shareId});const k=mt({name:(b=o.data)==null?void 0:b.name}),E=rt(t.objectId);return o.data&&s.hasCompleted&&r.hasCompleted&&q?n.jsx("div",{className:"px-3",children:n.jsx(ct,{presentationSlug:null,video:o.data,clips:(I=U.data)==null?void 0:I.data,interactives:(v=F.data)==null?void 0:v.data,curriculums:E,relatedVideos:l,currentUser:s.data,pointsOfInterest:r==null?void 0:r.items,playNext:(g=t.queryParams)==null?void 0:g.playNext,shareId:t.shareId,featureAccess:m,audiences:L.data,params:t.queryParams,canManageVideoAccess:R(nt.ManageVideoAccess),tableOfContentsId:(V=t.queryParams)==null?void 0:V.tocId,shouldShowSideTableOfContents:T,breadcrumbs:k,commonVideoProps:j,hasTheatreMode:w,shouldShowTranscript:M&&(!h||((C=p.data)==null?void 0:C.length)>0),vttSubtitles:p.data||[],subtitles:O,chapters:N,isBot:x.isBot(),playerApiUrl:(S=f.data)==null?void 0:S.playerApiUrl,hasNewSearch:A,liteUrl:f.data.liteUrl})}):n.jsx(n.Fragment,{})}export{Ee as PlaySharedVideoView};
//# sourceMappingURL=DVkdeKAc.chunk.js.map
