"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["87978"],{359839:function(e,l,t){t.d(l,{M:function(){return u}}),t(490629);var i=t(101199),n=t(908219),o=t.n(n),r=t(709705),a=t(386206),d=t(426038);let u=e=>{let{video:l,canPlayCb:t,destroyCb:n,onReady:u,onEnded:s,clickProgressCb:v,changeVolumeCb:c,dargCb:f,isMute:m,isOperable:p,showProgressBar:g,onTimeUpdate:_}=e,[y,h]=(0,i.useState)(()=>{var e;return p&&!m&&g?null!==(e=(0,r.$o)(d.LocalStorageKeys.PREVIEW_VOLUME))&&void 0!==e?e:0:0}),[w,E]=(0,i.useState)(""),[I,x]=(0,i.useState)("00:00"),C=(0,i.useRef)(!1),L=(0,i.useRef)(Date.now()),T=(0,i.useRef)(),P=(0,i.useRef)(),S=(0,i.useRef)(),A=(0,i.useRef)(!1),N=(0,i.useRef)(!1),j=(0,i.useRef)(!1),b=o()(e=>{if(!!p&&!!C.current){if(e.stopPropagation(),e.preventDefault(),A.current&&S.current&&P.current){N.current=!0;let{left:t,width:i}=S.current.getBoundingClientRect(),n=(e.pageX-t)/i;P.current.style.width=`${100*n}%`,x((0,a.$y)((null==l?void 0:l.duration)*1e3*n))}}},50);return(0,i.useEffect)(()=>{l&&!j.current&&(l.volume=m?0:.4,j.current=!0)},[l]),(0,i.useEffect)(()=>()=>{let e=Date.now()-L.current;C.current&&(null==n||n(e))},[]),{handleChangeVolume:()=>{if(m)return;let e=y?0:.4;h(e),l.volume=.4,(0,r.qQ)(d.LocalStorageKeys.PREVIEW_VOLUME,e),null==c||c(e?"on":"off")},onCanplay:()=>{!C.current&&(L.current=Date.now(),C.current=!0,null==t||t(),(null==l?void 0:l.duration)&&E((0,a.$y)((null==l?void 0:l.duration)*1e3)))},handlePlaying:()=>{u(),T.current=!1},changeCanDarg:e=>{A.current=e},canDarg:A.current,canPlay:C.current,isDarging:N.current,progressRef:P,progressContainerRef:S,handleTimeUpdate:()=>{if(!l)return;let e=l.currentTime/l.duration;P.current&&!A.current&&(P.current.style.width=`${l.currentTime/l.duration*100}%`,x((0,a.$y)((null==l?void 0:l.currentTime)*1e3)),!w&&E((0,a.$y)((null==l?void 0:l.duration)*1e3)),N.current=!1),e>=.98&&!T.current&&(s(),T.current=!0),null==_||_({currentTime:l.currentTime})},changeTime:e=>{if(!!p&&!!C.current){if(S.current){let{left:t,width:i}=S.current.getBoundingClientRect(),n=(e.pageX-t)/i;if(n>=1&&n<0)return;l&&C.current&&(l.currentTime=(null==l?void 0:l.duration)*n)}N.current?null==f||f():null==v||v()}},volume:y,duration:w,currentTime:I,hanldeDarg:b}}},689308:function(e,l,t){t.r(l),t.d(l,{Preview:function(){return E}});var i=t(629686),n=t(402748);t(104882),t(679308);var o=t(320165),r=t(101199),a=t(469935),d=t.n(a),u=t(638052),s=t(601034),v=t(687581),c=t(414061),f=t(388965),m=t(425285),p=t(205693),g=t(881443),_=t(359839),y=t(176449),h=t(253424);let w=r.forwardRef((e,l)=>{let{onReady:t,onEnded:i,previewUrlList:n,isHorizontal:a,ratio:h,fakeHorizontalInfo:w,className:E,logParams:I,showProgressBar:x=!0,isOperable:C=!0,isMute:L=!1,forceContainerCover:T=!1,renderExtension:P,onTimeUpdate:S}=e,{tab_name:A="",awemeInfo:N,enter_from_merge:j,enter_from:b,sub_tab_name:R}=I||{},k=(0,r.useRef)(),M=(0,r.useRef)(),V=(0,r.useRef)(0),{handleChangeVolume:D,onCanplay:O,handlePlaying:U,changeCanDarg:W,canDarg:B,progressRef:$,progressContainerRef:F,handleTimeUpdate:H,canPlay:G,changeTime:Y,volume:z,duration:q,currentTime:Z,hanldeDarg:K,isDarging:X}=(0,_.M)({onTimeUpdate:S,video:k.current,onReady:t,onEnded:i,isMute:L,isOperable:C,showProgressBar:x,canPlayCb:()=>{var e,l,t,i,n,o,r,a,d,v;u.logInstance.sendLog("hoverPlay",{group_id:null==N?void 0:N.awemeId,author_id:null==N?void 0:null===(e=N.authorInfo)||void 0===e?void 0:e.uid,enter_from_merge:null!=j?j:(0,s.yW)(),enter_from:b,tab_name:A,is_full_screen:"0",video_scale:(null==N?void 0:null===(l=N.video)||void 0===l?void 0:l.width)/(null==N?void 0:null===(t=N.video)||void 0===t?void 0:t.height),sub_tab_name:R}),u.logInstance.sendLog("hoverVideoPlayQuality",{aweme_type:null==N?void 0:N.awemeType,group_id:null==N?void 0:N.groupId,enter_from_merge:null!=j?j:(0,s.yW)(),enter_from:b,tab_name:A,codec_format:"",duration:0,player_first_frame:0,preload_size:0,preload_time:0,video_quality:null==N?void 0:null===(o=N.video)||void 0===o?void 0:null===(n=o.bitRateList)||void 0===n?void 0:null===(i=n[0])||void 0===i?void 0:i.qualityType,video_bitrate:null==N?void 0:null===(d=N.video)||void 0===d?void 0:null===(a=d.bitRateList)||void 0===a?void 0:null===(r=a[0])||void 0===r?void 0:r.bitRate,vduration:null==N?void 0:null===(v=N.video)||void 0===v?void 0:v.duration,is_bytevc1:0})},destroyCb:e=>{var l,t,i,n,o,r,a,d,v,c,f;u.logInstance.sendLog("hoverPlayTime",{duration:e,group_id:null==N?void 0:N.awemeId,author_id:null==N?void 0:null===(l=N.authorInfo)||void 0===l?void 0:l.uid,enter_from_merge:null!=j?j:(0,s.yW)(),enter_from:b,tab_name:A,is_full_screen:"0",video_scale:(null==N?void 0:null===(t=N.video)||void 0===t?void 0:t.width)/(null==N?void 0:null===(i=N.video)||void 0===i?void 0:i.height),sub_tab_name:R});let m=null==N?void 0:null===(r=N.video)||void 0===r?void 0:null===(o=r.bitRateList)||void 0===o?void 0:null===(n=o[0])||void 0===n?void 0:n.bitRate;u.logInstance.sendLog("hoverVideoPlayEnd",{aweme_type:null==N?void 0:N.awemeType,group_id:null==N?void 0:N.groupId,enter_from_merge:(0,s.yW)(),tab_name:A,codec_format:"",preload_size:0,preload_time:0,video_quality:null==N?void 0:null===(v=N.video)||void 0===v?void 0:null===(d=v.bitRateList)||void 0===d?void 0:null===(a=d[0])||void 0===a?void 0:a.qualityType,video_bitrate:m,vduration:null==N?void 0:null===(c=N.video)||void 0===c?void 0:c.duration,is_bytevc1:0,play_duration_clean:Math.min(e,null==N?void 0:null===(f=N.video)||void 0===f?void 0:f.duration),duration:e,cache_duration:V.current,cache_size:V.current*m,data_player_type:2,play_size:e/1e3*m})},clickProgressCb:()=>{u.logInstance.sendLog("hoverProgressClick",{group_id:null==N?void 0:N.awemeId,enter_from_merge:(0,s.yW)(),tab_name:A,sub_tab_name:R})},changeVolumeCb:e=>{u.logInstance.sendLog("hoverVolumeClick",{group_id:null==N?void 0:N.awemeId,enter_from_merge:(0,s.yW)(),tab_name:A,status:e,content_sdk:"video",sub_tab_name:R})}});(0,r.useEffect)(()=>{let e=k.current;if(e){let l=()=>{v.oe.event.info({name:v.Mo.HoverVideoPreviewError,report:{errorCode:e.error.code,errorMessage:e.error.message}})};e.addEventListener("error",l);let t=()=>{c.emit(c.EVENT.videoPause,"ImgContent_preview_videoPlay")};e.addEventListener("play",t);let i=()=>{let l=0,{buffered:t}=e||{};for(let e=0;e<(null==t?void 0:t.length);e++){var i,n;l+=(null==t?void 0:null===(i=t.end)||void 0===i?void 0:i.call(t,e))-(null==t?void 0:null===(n=t.start)||void 0===n?void 0:n.call(t,e))}V.current=l};return e.addEventListener("timeupdate",i),()=>{e.removeEventListener("error",l),e.removeEventListener("play",t),e.removeEventListener("timeupdate",i)}}},[]);let Q=(0,r.useCallback)(()=>{if(M.current&&k.current){var e,l;let t=(0,f.$)({height:null===(e=M.current)||void 0===e?void 0:e.offsetHeight,width:null===(l=M.current)||void 0===l?void 0:l.offsetWidth},h,w);t&&(k.current.style.transform=`scale(${t.scale.toFixed(2)}) translateX(${t.offsetX}%) translateY(${t.offsetY}%)`)}},[w,h]),J=(0,r.useRef)();return(0,r.useImperativeHandle)(l,()=>({async pause(){if(!k.current.paused){var e;J.current&&(await J.current,J.current=void 0),null===(e=k.current)||void 0===e||e.pause()}},play(){if(G&&k.current.paused){var e;J.current=null===(e=k.current)||void 0===e?void 0:e.play()}}}),[]),(0,o.jsxs)("div",{className:d()(g.default.previewWrapper,E,{[g.default.isOnlyPreview]:!G}),ref:e=>{M.current=e,Q()},onMouseLeave:e=>{B&&(e.stopPropagation(),e.preventDefault(),W(!1),Y(e))},onMouseUp:e=>{e.stopPropagation(),e.preventDefault(),X&&(W(!1),Y(e))},onMouseMove:K,onClick:e=>{X&&(e.stopPropagation(),e.preventDefault())},children:[(0,o.jsx)("video",{ref:e=>{k.current=e,Q()},onPlaying:U,onTimeUpdate:H,className:g.default.video,style:{objectFit:a||T?"cover":"contain"},loop:!0,muted:0===z,autoPlay:!0,disablePictureInPicture:!0,onCanPlay:O,preload:"none","enable-progress-gesture":"true",children:n.map((e,l)=>(0,o.jsx)("source",{src:e},`${e}_${l}`))}),x&&(0,o.jsxs)("div",{className:g.default.controlContainer,onClick:e=>{e.stopPropagation(),e.preventDefault()},children:[C&&(0,o.jsxs)("div",{className:d()(g.default.btnBox),children:[q&&(0,o.jsxs)("div",{className:g.default.currentTimeContainer,children:[(0,o.jsx)("span",{children:Z}),"/",(0,o.jsx)("span",{children:q})]}),q&&(0,o.jsx)("div",{className:d()(g.default.volumeBox,{}),onClick:D,children:(0,o.jsx)(y.Z,{src:0===z?p.Z:m.Z,width:24,height:24,viewBox:"0 0 24 24"})})]}),(0,o.jsx)("div",{className:g.default.progressWrapper,ref:F,onMouseDown:e=>{e.stopPropagation(),e.preventDefault(),W(!0)},onMouseUp:e=>{e.stopPropagation(),e.preventDefault(),W(!1),Y(e)},children:(0,o.jsx)("div",{ref:$,className:g.default.progress,children:G&&(0,o.jsx)("div",{className:g.default.changTimebtn})})})]}),null==P?void 0:P()]})}),E=r.forwardRef((e,l)=>{let{awemeInfo:t,appendPlayerConfig:r,onLoadedData:a,onReady:d,onEnded:u,onUserAction:s,container:v,logParams:c,renderExtension:f,isOperable:m,showProgressBar:p,forceContainerCover:g=!1,coverContainer:_,scene:y,user:E,enableNote:I,needOperateHidden:x,isBigCard:C,isTopCard:L,className:T,forceFitContain:P=!1,reuseConfig:S,onPreviewControlHidden:A,onPreviewControlShow:N,pip:j,startTime:b,reuseBigCardQuickPlayer:R,isShowWatchLater:k,watchLaterProps:M}=e;return t?(0,o.jsx)(h.C,{className:T,awemeInfo:t,appendPlayerConfig:r,onPlaying:d,onLoadedData:a,onEnded:u,onUserAction:s,coverContainer:_,ref:l,progressContainer:v,logParams:c,isOperable:m||p,needOperateHidden:x,forceContainerCover:g,forceFitContain:P,scene:y,user:E,enableNote:I,isTopCard:L,isBigCard:C,reuseConfig:S,onPreviewControlHidden:A,onPreviewControlShow:N,pip:j,startTime:b,reuseBigCardQuickPlayer:R,isShowWatchLater:k,watchLaterProps:M,children:null==f?void 0:f()}):(0,o.jsx)(w,(0,n._)((0,i._)({},e),{ref:l}))})},70864:function(e,l,t){t.d(l,{s:function(){return L}});var i=t("629686");t("490629"),t("706056"),t("313036");var n=t("320165"),o=t("101199"),r=t("469935"),a=t.n(r),d=t("254457"),u=t("402748");let s=(0,o.forwardRef)((e,l)=>(0,n.jsxs)("svg",(0,u._)((0,i._)({width:22,height:22,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.111 2.75c.953 0 1.827.513 2.036 1.53.463 2.24 1.067 2.791 5.407 2.866h.004v7.545c0 1.492 0 2.239-.336 2.786a2.266 2.266 0 0 1-.754.753c-.549.336-1.3.335-2.791.335H8.34c-2.98 0-5.541-2.33-5.596-5.307a5.418 5.418 0 0 1 5.417-5.509s.01-1.44.01-1.92c.011-1.772 1.208-3.079 2.94-3.079zm3.26 7.165c-.57 0-1.103.278-1.43.743l-3.756 5.346a.166.166 0 0 0 .137.262h.755c.569 0 1.103-.277 1.43-.743l3.755-5.346a.166.166 0 0 0-.136-.262h-.755zm-6.33 0a.166.166 0 0 0-.163.196l.969 5.284c.015.086.041.167.076.243l1.326-1.883-.44-2.408a1.748 1.748 0 0 0-1.72-1.432h-.048z",fill:"url(#member-icon_svg__paint0_linear_3741_28915)"}),(0,n.jsx)("defs",{children:(0,n.jsxs)("linearGradient",{id:"member-icon_svg__paint0_linear_3741_28915",x1:10.651,y1:2.75,x2:10.651,y2:18.565,gradientUnits:"userSpaceOnUse",children:[(0,n.jsx)("stop",{stopColor:"#E1FFFE"}),(0,n.jsx)("stop",{offset:1,stopColor:"#83FAFF"})]})})]})));var v=t("384293"),c=t("176449"),f=t("855357"),m=t("333131"),p=t("734123"),g=t("46892"),_=t("326367"),y=t("386206"),h=t("913285"),w=t("310383"),E=t("63601"),I=t("736068"),x=t("746517");let C=e=>{var l,t,i,r;let{awemeInfo:u,isActive:f,unlockCurrentScene:h,isOnlyShowTag:w=!1,emitter:C,userInfo:L,loginDispatch:T,isLogin:P,requestLogin:S,control:A}=e,[N,j]=(0,o.useState)(!1),[b,R]=(0,o.useState)(!1),k=(0,o.useMemo)(()=>{var e;return(null==u?void 0:null===(e=u.entertainmentPreviewConfig)||void 0===e?void 0:e.end_time)||0},[null==u?void 0:u.awemeId]),[M,V]=(0,o.useState)(k),D=(0,o.useRef)(!0),O=(0,E.n)();(0,o.useEffect)(()=>{var e,l;let t=h?C:O;if((null==t?void 0:t.on)&&f&&(null==u?void 0:null===(e=u.entRightInfo)||void 0===e?void 0:e.right_status)===1){let e=e=>{var l,t,i,n,o,r,a,d,s;let{currentTime:v}=e;if((null===(r=window)||void 0===r?void 0:null===(o=r.location)||void 0===o?void 0:null===(n=o.href)||void 0===n?void 0:null===(i=n.includes)||void 0===i?void 0:i.call(n,null==u?void 0:null===(t=u.lvideoBrief)||void 0===t?void 0:null===(l=t.episodeInfo)||void 0===l?void 0:l.episodeId))===!1)return;let c=null==A?void 0:null===(a=A.getValue)||void 0===a?void 0:a.call(A,"paidContent");V(Math.max(0,k-1e3*v)),1e3*v>=k?(!c&&(null==A||null===(d=A.dispatch)||void 0===d||d.call(A,"paidContent",!0)),!N&&!b&&D.current&&(D.current=!1,j(!0))):(D.current=!0,c&&(null==A||null===(s=A.dispatch)||void 0===s||s.call(A,"paidContent",!1)))};return null==t||null===(l=t.on)||void 0===l||l.call(t,p.Events.TIME_UPDATE,e),()=>{var l;null==t||null===(l=t.off)||void 0===l||l.call(t,p.Events.TIME_UPDATE,e)}}},[O,f,h,N,b,u]),(0,o.useEffect)(()=>(j(!1),R(!1),()=>{var e;null==A||null===(e=A.dispatch)||void 0===e||e.call(A,"paidContent",!1)}),[u]);let U=async()=>{var e,l,t;if((null==u?void 0:null===(e=u.entRightInfo)||void 0===e?void 0:e.right_status)===2)return;let i=()=>{var e,l,t,i;if(h)j(!0);else if(null==u?void 0:null===(l=u.lvideoBrief)||void 0===l?void 0:null===(e=l.episodeInfo)||void 0===e?void 0:e.episodeId){let e=`current_video_time=${Math.ceil(null==O?void 0:O.currentTime)}`,l=(0,g.c7)(null==u?void 0:null===(i=u.lvideoBrief)||void 0===i?void 0:null===(t=i.episodeInfo)||void 0===t?void 0:t.episodeId,e);window.open(l,(0,_.f)()?"_self":"_blank","noopener")}};(null==L?void 0:L.isLogin)||P?i():S?(await S("登录后购买","lv_paid"),i()):(0,x.default)({success:async()=>{null==T||T({type:"updateUserInfo"}),i()},enterMethod:"jingxuan_video",headerText:"登录后即可购买",next:`https://${null===(t=window)||void 0===t?void 0:null===(l=t.location)||void 0===l?void 0:l.host}`})};return(0,n.jsxs)("div",{className:a()({[v.default.tagContainer]:h,[v.default.onlyShowTagContainer]:w}),children:[!!b&&!w&&(0,n.jsx)(m.A,{awemeInfo:u,onClose:()=>{R(!1),j(!0)},onPaySuccess:()=>{window.location.reload()},shareScene:"aweme_pc_jinxuan_lvideo_pay"}),!!(N&&!b&&!w)&&(0,n.jsxs)("div",{className:a()(v.default.buyTicketContainer),children:[!!(null==u?void 0:null===(l=u.authorInfo)||void 0===l?void 0:l.nickname)&&(0,n.jsxs)("div",{className:a()(v.default.author),children:["@",(null==u?void 0:null===(t=u.authorInfo)||void 0===t?void 0:t.nickname)||""]}),(0,n.jsx)("div",{className:a()(v.default.memberTagContainer),children:(0,n.jsxs)("div",{className:v.default.memberTagV2,children:[(0,n.jsx)(c.Z,{className:v.default.memberIconV2,src:s,width:14,height:14,viewBox:"0 0 22 22"}),(0,n.jsx)("span",{className:v.default.memberTextV2,children:"精选会员"})]})}),(0,n.jsx)("div",{className:a()(v.default.description),children:(null==u?void 0:u.desc)||""}),(0,n.jsx)("div",{className:a()(v.default.button),onClick:()=>R(!0),children:"买券看全片"}),(0,n.jsx)(I.Z,{className:v.default.close,onClick:()=>j(!1)})]}),!!(!b&&!N)&&(0,n.jsxs)("div",{className:a()(v.default.container),onClick:U,children:[(0,n.jsxs)("div",{className:v.default.memberTag,children:[(0,n.jsx)(c.Z,{className:v.default.memberIcon,src:s,width:22,height:22,viewBox:"0 0 22 22"}),(0,n.jsx)("span",{className:v.default.memberText,children:"精选会员"})]}),(null==u?void 0:null===(i=u.entRightInfo)||void 0===i?void 0:i.right_status)===1?(0,n.jsxs)("div",{className:v.default.previewInfo,children:["00:00"===(0,y.$y)(M)?(0,n.jsx)("span",{className:v.default.previewTextEnd,children:"试看结束"}):(0,n.jsxs)("span",{className:v.default.previewText,children:["试看",(0,y.$y)(M)]}),!w&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:v.default.divider}),(0,n.jsxs)("div",{className:v.default.buyButton,children:[(0,n.jsx)("span",{className:v.default.buyText,children:"解锁"}),(0,n.jsx)(c.Z,{className:v.default.arrowIcon,src:d.Z,width:12,height:12,viewBox:"0 0 12 12"})]})]})]}):null,(null==u?void 0:null===(r=u.entRightInfo)||void 0===r?void 0:r.right_status)===2?(0,n.jsx)("div",{className:a()(v.default.previewInfo,v.default.previewInfoUnlock),children:"已解锁"}):null]})]})},L=e=>{var l,t;let{awemeInfo:o}=e,r=(0,w.N)();return(null==o?void 0:o.awemeType)===f.e.Lvideo&&(null==o?void 0:null===(t=o.entertainmentVideoPaidWay)||void 0===t?void 0:null===(l=t.paid_ways[0])||void 0===l?void 0:l.paid_way)===9?(0,n.jsx)(h.k,{componentName:"JingxuanVideoTag",Slardar:r,children:(0,n.jsx)(C,(0,i._)({},e))}):null}},910978:function(e,l,t){t.d(l,{D:function(){return r}});var i=t(101199),n=t(499059),o=t(94109);let r=e=>{let{awemeInfo:l,isActive:t}=e,r=(0,i.useRef)();(0,i.useEffect)(()=>{var e;if((null===(e=n.Le.getConfig(n.gI.AbtestData))||void 0===e?void 0:e.useCache)===1)return;let i=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-error`),r=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-time`),a=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-play`),d=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-enter`),u=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-start`),s=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-loading`);t&&((0,o.GP)(l)?(Array.from(i).forEach(e=>e.style.visibility="hidden"),Array.from(r).forEach(e=>e.style.visibility="hidden"),Array.from(a).forEach(e=>e.style.visibility="hidden"),Array.from(d).forEach(e=>e.style.visibility="hidden"),Array.from(u).forEach(e=>e.style.visibility="hidden"),Array.from(s).forEach(e=>e.style.visibility="hidden")):(Array.from(i).forEach(e=>e.style.visibility="unset"),Array.from(r).forEach(e=>e.style.visibility="unset"),Array.from(a).forEach(e=>e.style.visibility="unset"),Array.from(d).forEach(e=>e.style.visibility="unset"),Array.from(u).forEach(e=>e.style.visibility="unset"),Array.from(s).forEach(e=>e.style.visibility="unset")))},[l,t]),(0,i.useEffect)(()=>{var e;if(t&&(null===(e=n.Le.getConfig(n.gI.AbtestData))||void 0===e?void 0:e.useCache)===1){if((0,o.GP)(l)){let e=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-error`),t=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-time`),i=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-play`),n=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-enter`),o=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-start`),r=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-loading`);Array.from(e).forEach(e=>e.style.visibility="hidden"),Array.from(t).forEach(e=>e.style.visibility="hidden"),Array.from(i).forEach(e=>e.style.visibility="hidden"),Array.from(n).forEach(e=>e.style.visibility="hidden"),Array.from(o).forEach(e=>e.style.visibility="hidden"),Array.from(r).forEach(e=>e.style.visibility="hidden")}else if((0,o.GP)(r.current)){let e=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-error`),t=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-time`),i=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-play`),n=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-enter`),o=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-start`),r=document.querySelectorAll(`.video_${l.awemeId} .xgplayer-loading`);Array.from(e).forEach(e=>e.style.visibility="unset"),Array.from(t).forEach(e=>e.style.visibility="unset"),Array.from(i).forEach(e=>e.style.visibility="unset"),Array.from(n).forEach(e=>e.style.visibility="unset"),Array.from(o).forEach(e=>e.style.visibility="unset"),Array.from(r).forEach(e=>e.style.visibility="unset")}r.current=l}},[l,t])}},817567:function(e,l,t){t.d(l,{E:function(){return em}});var i=t("101199"),n=t("499059");let o=e=>{let{player:l,isActive:t}=e;(0,i.useEffect)(()=>{if(l&&t){let e=()=>{n.Le.setConfig(n.gI.VideoHasPrevent,!0)};return l.on("autoplay_was_prevented",e),()=>{l.off("autoplay_was_prevented",e)}}},[l,t])};var r=t("629686"),a=t("402748");t("706056"),t("679308");var d=t("734123"),u=t("59850"),s=t("37821"),v=t("426038"),c=t("191785"),f=t("272726"),m=t("409250"),p=t("889429"),g=t("709705"),_=t("600767"),y=t("638052"),h=t("723349"),w=t("396868"),E=t("32712"),I=t("792903");let x=e=>{var l;let{player:t,isActive:i,awemeInfo:n,abtestData:o,startTime:a}=e;t.isPlaying=!1,null===(l=t.resetState)||void 0===l||l.call(t);let d=(0,h.QF)({awemeInfo:n,abtestData:o});return!!d.url.find(e=>!!e.src)&&(t.setConfig((0,r._)({autoplay:i},d)),i?(t.config.startTime=a,t.play()):t.start(),!0)},C=()=>{y.logInstance.sendLog("videoRetryError",{type:"retry_success"})},L=()=>{y.logInstance.sendLog("videoRetryError",{type:"retry_error"})},T=e=>{e.off("error",L),e.off("loadeddata",C)},P=e=>{T(e),e.once("error",L),e.once("loadeddata",C)},S=e=>{let{player:l,isActive:t,awemeInfo:o,deleteCurrentSwiper:h,abtestData:C}=e,L=(0,i.useRef)(t);L.current=t;let S=(0,i.useRef)(null==o?void 0:o.awemeId);S.current=null==o?void 0:o.awemeId;let A=(0,i.useRef)(!1),N=(0,i.useRef)(!1),j=(0,i.useRef)(!1),b=(0,i.useRef)(0),R=(0,u.Z)(async(e,t,i)=>{if((t||Date.now()-b.current>6e4)&&(N.current=!1,j.current=!1),N.current&&j.current)return y.logInstance.sendLog("videoRetryError",{type:"real_blank_screen",aweme_id:e}),!1;if(b.current=Date.now(),l.removeClass(d.STATE_CLASS.ERROR),l.addClass(d.STATE_CLASS.LOADING),P(l),N.current||6===i)N.current=!0;else{var o;if(N.current=!0,l.dash)return l.retry(),!0;let t=l.currentSrc&&1===(0,c.q)(l.currentSrc),i=l.currentTime,n=l.config.url instanceof Array?null===(o=l.config.url)||void 0===o?void 0:o.find(e=>{var l;return null==e?void 0:null===(l=e.src)||void 0===l?void 0:l.includes("www.douyin.com")}):null;return!n&&y.logInstance.sendLog("videoRetryError",{type:"retry_base_url_miss",aweme_id:e}),t&&n?(l.src=n.src,l.load(),l.currentTime=i):l.retry(),!0}y.logInstance.sendLog("videoRetryError",{type:"retry_native",aweme_id:e});try{j.current=!0;let t=l.currentTime,i=await (0,_.m_)({awemeId:e,originType:s.F.PlayerRetry});if(!A.current&&S.current===e){let o=null;if(0===i.statusCode&&i.detail){if(o=i.detail,!x({player:l,awemeInfo:i.detail,isActive:L.current,abtestData:C,startTime:t}))return l.addClass(d.STATE_CLASS.ERROR),l.removeClass(d.STATE_CLASS.LOADING),!1;y.logInstance.sendLog("videoRetryError",{type:"retry_api_aweme_ok",aweme_id:e})}else{if(!i.isUnknownAweme)return l.addClass(d.STATE_CLASS.ERROR),l.removeClass(d.STATE_CLASS.LOADING),y.logInstance.sendLog("videoRetryError",{type:"retry_api_statuscode_error",aweme_id:e}),!1;null==h||h(),L.current&&w.F.info("该视频已被删除"),y.logInstance.sendLog("videoRetryError",{type:"retry_api_aweme_404",aweme_id:e})}n.Le.setConfig(n.gI.RefetchAwemeInfo,{[e]:o})}}catch(t){return l.addClass(d.STATE_CLASS.ERROR),l.removeClass(d.STATE_CLASS.LOADING),y.logInstance.sendLog("videoRetryError",{type:"retry_api_catch",aweme_id:e}),!1}return!0});(0,i.useEffect)(()=>(A.current=!1,()=>{A.current=!0}),[]);let k=e=>{var t,i,n,d,u,s;let{isH265:p}=(0,E.Z)({awemeInfo:o,player:l}),g=(0,a._)((0,r._)({urlParamList:["previous_page","tab_name"]},(0,I.Z)(l)),{group_id:o.groupId,aweme_type:o.awemeType,player_type:"xgplayer",player_version:l.version,errorCode:(null==e?void 0:null===(t=e.mediaError)||void 0===t?void 0:t.code)||(null==e?void 0:e.errorCode)||"",errorDesc:(null==e?void 0:null===(i=e.mediaError)||void 0===i?void 0:i.message)||(null==e?void 0:e.errorMessage)||"",is_cdn_expired:1===(0,c.q)(l.currentSrc)?1:0,vduration:null==o?void 0:null===(n=o.video)||void 0===n?void 0:n.duration,is_video_support:Number((0,f.k)().isSupport),is_bytevc1:p,log_pb:null==o?void 0:o.logPb,video_play_mode:(null===(d=m.Q.getItem({sKey:v.CookieKeys.VideoFilterMemoSelect,refresh:!1}))||void 0===d?void 0:d.type)===1?"landscape":"all",is_landscape:(null==o?void 0:null===(u=o.video)||void 0===u?void 0:u.width)>(null==o?void 0:null===(s=o.video)||void 0===s?void 0:s.height)?1:0});y.logInstance.sendLog("videoPlayError",g)};(0,i.useEffect)(()=>{var e;l&&(null==o?void 0:null===(e=o.video)||void 0===e?void 0:e.playApi)&&(l.usePluginHooks("error","errorHandler",(e,l)=>Promise.resolve().then(async()=>{let e=await R(o.awemeId,!1,null==l?void 0:l.errorCode);return!e&&k(l),!e})),l.usePluginHooks("error","errorRetry",()=>(R(o.awemeId,!0),y.logInstance.sendLog("videoRetryError",{type:"user_click",aweme_id:null==o?void 0:o.awemeId}),!1)))},[l,o,C]),(0,i.useEffect)(()=>{t&&l&&l.isError&&o&&R(o.awemeId,!0)},[C,t,l,o,R]),(0,i.useEffect)(()=>()=>l&&l.off&&T(l),[l]),(0,i.useEffect)(()=>{if(l&&t){let e=e=>{if((0,p.un)()){var t,i;let e=null===(i=l.config.awemeInfo)||void 0===i?void 0:null===(t=i.video)||void 0===t?void 0:t.playApi;l.src=e,l.load(),(0,g.qQ)(v.LocalStorageKeys.IsSupportHevc,{has_detect:!0,is_support:!1,pure_support:!0})}};return l.on("DECODER_FAILED",e),()=>l.off("DECODER_FAILED",e)}},[l,t])};t("112459"),t("759943");var A=t("121998"),N=t("590555"),j=t("939165"),b=t("295207"),R=t("72430"),k=t("813458"),M=t("414061"),V=t("944922"),D=t("857800"),O=t("332009"),U=t("488904"),W=t("889094"),B=t("140726"),$=t("55938"),F=t("624508"),H=new F.h({retryClick:{eventName:"retry_click",params:{group_id:"",log_pb:"",enter_from:""}},purePauseVideo:{eventName:"pure_pause_video",params:{group_id:"",enter_from:"",pause_type:"",block_play_type:"",active:0,player_stat_play:"",is_global_emit:0}},purePlayVideo:{eventName:"pure_play_video",params:{group_id:"",enter_from:"",active:0,player_stat_play:""}},purePlayingVideo:{eventName:"pure_playing_video",params:{group_id:"",enter_from:"",active:0,player_stat_play:""}},pureFirstFrameRender:{eventName:"pure_first_frame_render",params:{group_id:"",enter_from:"",active:0,player_stat_play:""}},networkError:{eventName:"network_error",params:{}}});let G=e=>{let{player:l,isActive:t,awemeInfo:o,config:a,abtestData:u,currentIndex:s,reuseConfig:v,startTime:c}=e,f=(0,i.useRef)(!1),m=(0,i.useRef)(!1),p=(0,N.d)(v),g=(0,i.useRef)(c),_=()=>{l.pause()};(0,i.useEffect)(()=>{let e=M.listen(M.EVENT.changeMinWindows,e=>{let{isMiniWin:l}=e;m.current=!0}),l=M.listen(M.EVENT.changeMinWinWeb,e=>{let{isMiniWinWeb:l}=e;m.current=!0});return()=>{e(),l()}},[]),(0,j.o)(()=>{let e=n.Le.getConfig(n.gI.GlobalSwiper);if(e&&s&&l){let t=e=>{var t,i,r,c,f,p;let{index:g}=e,y=$.e.activeScene===b.d.WebVideo,h=$.e.activeScene===b.d.ListenVideo,w=V.t.isOptimizePause(u)&&Math.abs(s-g)>=2;if(!n.Le.getConfig(n.gI.IsMiniWin)&&!m.current&&!y&&!h&&!w)if(s===g)l.off(d.Events.TIME_UPDATE,_),(0,U.d)({player:l,config:a,awemeInfo:o,prePlay:1,index:s,reuseConfig:v}),M.emit(M.EVENT.livePause),l.statPlay=`${l.statPlay}_preplay`,l.emit("preplay",null==l?void 0:null===(t=l.config)||void 0===t?void 0:t.vid);else{l.prepauseStat=1,l.superResolution=(0,W.B)({player:l}),l.bandWidth=null==l?void 0:l.bandwidth,l.danmakuGetBoundingCounts=null==l?void 0:null===(i=l.danmaku)||void 0===i?void 0:i.getBoundingCounts,l.danmuElCreateCounts=null==l?void 0:null===(r=l.danmaku)||void 0===r?void 0:r.danmuElCreateCounts,(0,U.c)({player:l});try{null===(p=window.TTCommon)||void 0===p||null===(f=p.executeWithElement)||void 0===f||f.call(p,l.video,"updateSrState",0)}catch(e){}l.statPlay=`${l.statPlay}_prepause`,l.emit("prepause",null==l?void 0:null===(c=l.config)||void 0===c?void 0:c.vid)}};return e.on("activeIndexChange",t),()=>{e.off("activeIndexChange",t)}}},[o,l,s,v]),(0,i.useEffect)(()=>{if(l){var e,i,n;if(l.statPlay=l.statPlay||"",t&&(l.config.notUseRefreshVid||(0,D.B)())){l.blockPlayType=`lazyChildren_notUseRefreshVid_${null==l?void 0:null===(e=l.config)||void 0===e?void 0:e.notUseRefreshVid}_isLazyChildren${D.B}`;return}if(t&&(0,D.r)()){l.blockPlayType="isFromLynx";return}if(l.__isInlinePlayer&&t&&!l.isBlockedInlinePlayerRestart&&(l.isPlaying=!1,l.isBlockedInlinePlayerRestart=!0),t)(null==l?void 0:l.preplay)?(l.blockPlayType="preplay",l.preplay=0,l.play(),l.statPlay=`${l.statPlay}_activeplay`):((0,U.d)({player:l,config:a,awemeInfo:o,prePlay:0,index:s,reuseConfig:v}),l.statPlay=`${l.statPlay}_onactiveplay`);else if(!t){l.__isInlinePlayer&&(f.current=!0);let e=(null===(i=window.__QUICK_PLAYER)||void 0===i?void 0:i.playerId)&&window.__QUICK_PLAYER.playerId===(null==l?void 0:l.playerId),{scene:t,reuseId:o}=(null==p?void 0:p.current)||{};return(e||t&&o&&(null===B.YY||void 0===B.YY?void 0:null===(n=B.YY.checkIsReusePlayer)||void 0===n?void 0:n.call(B.YY,t,o,l)))&&!(null==g?void 0:g.current)&&(l.currentTime=0),l.statPlay=`${l.statPlay}_onnoactivepause`,(0,U.c)({player:l}),l.on(d.Events.TIME_UPDATE,_),()=>{l.off(d.Events.TIME_UPDATE,_)}}}},[l,t]),(0,i.useEffect)(()=>{l&&t&&window.dispatchEvent(new Event("playNext",{bubbles:!0}))},[l,t]),(0,i.useEffect)(()=>{let e=null;if(l&&t){var i;e=window.player,window.player=l;let t=O.s.getPlayersByScene(R.lT.Modal).length>0&&O.s.getPlayerScene(l.playerId)!==R.lT.Modal;(null===(i=(0,A.parse)(location.search))||void 0===i?void 0:i.webRid)&&(l.pause(),l.config.autoplay=!1,l.pauseType="hasModalLive"),!t&&(null==l||l.setUserActive(!0));let n=M.listen(M.EVENT.videoPause,()=>{l.pause(),l.pauseType="gobalEmit",l.config.autoplay=!1});return()=>{e&&(window.player=e),n()}}},[l,t]),(0,i.useEffect)(()=>{let e=()=>{l&&t&&O.s.getPlayersByScene(R.lT.Modal).length>0&&O.s.getPlayerScene(l.playerId)!==R.lT.Modal&&0===s&&(l.pause(),l.pauseType="hasOtherModalPlayer",l.config.autoplay=!1,l.autoplay=!1)};if(l&&t)return l.once("play",e),()=>{l.off("play",e)}},[l,t,s]),(0,k.w)(()=>{if(l&&t){l.pause(),l.pauseType="useRouteDeActiveEffect";let e=()=>{l.pause(),l.pauseType="useRouteDeActiveEffectListen"};return l.on(d.Events.PLAY,e),l.on(d.Events.TIME_UPDATE,e),()=>{l.off(d.Events.PLAY,e),l.off(d.Events.TIME_UPDATE,e)}}},[t,l]);let y=(0,i.useRef)(t);(0,i.useEffect)(()=>{y.current=t},[t]),(0,i.useEffect)(()=>{l&&(l.statPlay="")},[l,o]),(0,i.useEffect)(()=>{if((null==l?void 0:l.on)&&t){let e=e=>{H.sendLog("networkError",(0,r._)({},e||{}))};return l.on("networkError",e),()=>{l.off("networkError",e)}}},[l,t])};t("228983");let Y=e=>{let{player:l,isActive:t}=e;(0,i.useEffect)(()=>{if(l&&l.root.getElementsByClassName("xgplayer-start")[0]&&(l.root.getElementsByClassName("xgplayer-start")[0].className=`${l.root.getElementsByClassName("xgplayer-start")[0].className} douyinHide`,t)){let e=setTimeout(()=>{l.root.getElementsByClassName("xgplayer-start")[0]&&(l.root.getElementsByClassName("xgplayer-start")[0].className=l.root.getElementsByClassName("xgplayer-start")[0].className.split(" ").filter(e=>"douyinHide"!==e).join(" "))},1e3),t=()=>{clearTimeout(e),l.root.getElementsByClassName("xgplayer-start")[0]&&(l.root.getElementsByClassName("xgplayer-start")[0].className=l.root.getElementsByClassName("xgplayer-start")[0].className.split(" ").filter(e=>"douyinHide"!==e).join(" "))};return l.once(d.Events.AUTOPLAY_STARTED,t),()=>{l.off(d.Events.AUTOPLAY_STARTED,t),l.root.getElementsByClassName("xgplayer-start")[0]&&(l.root.getElementsByClassName("xgplayer-start")[0].className=`${l.root.getElementsByClassName("xgplayer-start")[0].className} douyinHide`)}}},[l,t])};var z=t("5784"),q=t.n(z),Z=t("431940"),K=t.n(Z),X=t("870127"),Q=t.n(X),J=t("855357"),ee=t("987826"),el=t("423629"),et=t("495394"),ei=t("810069"),en=t("352871");let eo=(e,l)=>{let t=[J.e.Normal,J.e.XgVideo].includes(null==e?void 0:e.awemeType),i=l.currentTime>=3&&l.duration-l.currentTime>=30;return t&&i},er=e=>{var l,t;let{player:o,isActive:r,awemeInfo:a,scene:u,userInfo:s}=e,v=(0,en.U7)(),c=(0,en.dY)("multi_device_resume",null==s?void 0:s.isLogin),f=v&&(null==c?void 0:c.enable)===1&&(null==c?void 0:c.pc_auto_record)===1;(0,i.useEffect)(()=>{var e,l;if(o&&(null==s?void 0:null===(e=s.info)||void 0===e?void 0:e.uid)&&(null==a?void 0:null===(l=a.continationInfo)||void 0===l?void 0:l.continationVideoAlreadyConsume)===!1){let{fwsExample:e}=n.Le.getConfig(n.gI.fwsExample)||{},l=e=>{var l,t,i,n,o;let r={app_id:ee.APP_ID,message_type:new(Q())(el.Cs.ReplyConsume||"0"),user_id:new(Q())(s.info.uid||"0"),device_id:new(Q())((null===(l=(0,ei.Es)())||void 0===l?void 0:l.user_unique_id)||"0"),to_device_type:new(Q())(el.Yi.Phone||"0"),to_device_id:new(Q())((null==a?void 0:null===(t=a.continationInfo)||void 0===t?void 0:t.fromDeviceId)||"0"),continuation_info:{ItemId:new(Q())(null==a?void 0:a.awemeId),RecordType:new(Q())(null==a?void 0:null===(i=a.continationInfo)||void 0===i?void 0:i.recordType),EpisodeId:new(Q())((null==a?void 0:null===(o=a.lvideoBrief)||void 0===o?void 0:null===(n=o.episodeInfo)||void 0===n?void 0:n.episodeId)||"0")}},d=K().stringify(r);e.send(d,{service:el.oU.Multicast,method:10}),q()(a,"continationInfo.continationVideoAlreadyConsume",!0)};if(e){let t=()=>{l(e)};if(!o.isPlaying)return o.once(d.Events.CANPLAY,t),()=>{o.off(d.Events.CANPLAY,t)};t()}else{let e=null,t=M.listen(M.EVENT.fwsExampleInit,t=>{o.isPlaying?l(t):(e=()=>{l(t)},o.once(d.Events.CANPLAY,e))});return()=>{t(),o.off(d.Events.CANPLAY,e)}}}},[o,a]),(0,i.useEffect)(()=>{var e;if(o&&r&&(null==s?void 0:null===(e=s.info)||void 0===e?void 0:e.uid))return M.listen(M.EVENT.sendPullMessage,e=>{if(o.isUserActive&&eo(a,o)){var l,t,i,r,d,u,v;let{toDeviceId:c,toDeviceType:f}=e||{},{fwsExample:m}=n.Le.getConfig(n.gI.fwsExample)||{},p={app_id:new(Q())("6383"),message_type:2,user_id:new(Q())((null==s?void 0:null===(l=s.info)||void 0===l?void 0:l.uid)||"0"),device_id:new(Q())((null===(t=(0,ei.Es)())||void 0===t?void 0:t.user_unique_id)||"0"),to_device_type:new(Q())(f),to_device_id:new(Q())(c),continuation_info:{UserId:new(Q())((null==s?void 0:null===(i=s.info)||void 0===i?void 0:i.uid)||"0"),ItemId:new(Q())((null==a?void 0:a.awemeId)||"0"),ItemType:new(Q())((null==a?void 0:a.awemeType)||"0"),PlayTime:Math.floor(o.currentTime),Cover:(null==a?void 0:null===(r=a.video)||void 0===r?void 0:r.cover)||"",FromDeviceId:new(Q())((null===(d=(0,ei.Es)())||void 0===d?void 0:d.user_unique_id)||"0"),FromDeviceType:Number(el.Yi.PC),RecordType:Number(el.ns.auto),EpisodeId:new(Q())((null==a?void 0:null===(v=a.lvideoBrief)||void 0===v?void 0:null===(u=v.episodeInfo)||void 0===u?void 0:u.episodeId)||"0")}},g=K().stringify(p);m.send(g,{service:el.oU.Multicast,method:10})}})},[o,r,null==s?void 0:null===(l=s.info)||void 0===l?void 0:l.uid]),(0,i.useEffect)(()=>{var e;if(o&&r&&[el.b.Default,el.b.Open].includes(null==s?void 0:null===(e=s.info)||void 0===e?void 0:e.continuationState)&&f){let e=()=>{"hidden"===document.visibilityState&&o.isUserActive&&eo(a,o)&&(0,et.wU)({item_id:null==a?void 0:a.awemeId,item_type:null==a?void 0:a.awemeType,play_progress:Math.floor(o.currentTime),to_client:Number(el.Yi.Phone),record_type:Number(el.ns.auto)})},l=()=>{o.isUserActive&&eo(a,o)&&(0,et.wU)({item_id:null==a?void 0:a.awemeId,item_type:null==a?void 0:a.awemeType,play_progress:Math.floor(o.currentTime),to_client:Number(el.Yi.Phone),record_type:Number(el.ns.auto)})};return window.addEventListener("beforeunload",l),document.addEventListener("visibilitychange",e),()=>{window.removeEventListener("beforeunload",l),document.removeEventListener("visibilitychange",e)}}},[o,r,null==s?void 0:null===(t=s.info)||void 0===t?void 0:t.uid,f])};var ea=t("486463"),ed=t("598412");let eu=e=>{let{player:l,isNext:t,awemeInfo:n,abtestData:o}=e,r=(0,ed.Y)({awemeInfo:n,abtestData:o});(0,i.useEffect)(()=>{l&&t&&((0,ea.tw)(null==l?void 0:l.playerId,!0),window.nextPlayer=l,l.isMultiple=1,r())},[l,t])};var es=t("439827"),ev=t("693017");let ec=e=>{let{player:l,awemeInfo:t,abtestData:n}=e,o=(0,es.l)();(0,i.useEffect)(()=>{var e;let l=()=>{let e=null==t?void 0:t.isAds;if(window.TTCommon){var l,i;null===(l=(i=window.TTCommon).execute)||void 0===l||l.call(i,"applyConfig",e?'{"gpu_use_single_video_decoder_texture":1}':'{"gpu_use_single_video_decoder_texture":0}')}};return null==o||null===(e=o.on)||void 0===e||e.call(o,ev.V.PlayerBeforeCreate,l),()=>{var e;null==o||null===(e=o.off)||void 0===e||e.call(o,ev.V.PlayerBeforeCreate,l)}},[t,n]),(0,i.useEffect)(()=>{var e;if(l&&(null==n?void 0:null===(e=n.controls)||void 0===e?void 0:e.dragdisable)){let e=l.getPlugin("progress"),t=l.getPlugin("controls");e&&t&&e.setConfig({onMoveStart:()=>{t.root.classList.add("progress-dragging")},onMoveEnd:()=>{t.root.classList.remove("progress-dragging")}})}},[l,t,n])};var ef=t("63601");t("838368");let em=e=>{let l=(0,ef.n)(),{isActive:t,awemeInfo:i,deleteCurrentSwiper:n,config:r,abtestData:a,scene:d,userInfo:u,isNext:s,currentIndex:v,reuseConfig:c,startTime:f}=e;return o({player:l,isActive:t,awemeInfo:i}),S({player:l,isActive:t,awemeInfo:i,deleteCurrentSwiper:n,abtestData:a}),G({player:l,isActive:t,awemeInfo:i,config:r,abtestData:a,currentIndex:v,reuseConfig:c,startTime:f}),Y({player:l,isActive:t}),er({player:l,isActive:t,awemeInfo:i,scene:d,userInfo:u}),eu({player:l,isNext:s,awemeInfo:i,abtestData:a}),ec({player:l,awemeInfo:i,abtestData:a}),null}},681363:function(e,l,t){t.d(l,{t:function(){return m}});var i=t(629686);t(706056);var n=t(320165),o=t(101199),r=t(734123),a=t(913285),d=t(63601),u=t(310383),s=t(439827),v=t(693017);let c=["firstFrame","loadstart","loadeddata"];function f(e){let{awemeInfo:l}=e,t=(0,d.n)(),i=(0,s.l)();return(0,o.useEffect)(()=>{let e=t,n=t=>{c.includes(t.eventType)&&(!e.dyLogStat&&(e.dyLogStat={}),e.dyLogStat[t.eventType]={data:t,awemeInfo:l})};if(!e){let t;let o=i=>{l&&((e=i).on(r.Events.XGLOG,n),t=()=>{e.off(r.Events.XGLOG,n)})};return i.on(v.V.PlayerCreated,o),()=>{null==t||t(),i.off(v.V.PlayerCreated,o)}}return e.on(r.Events.XGLOG,n),()=>{e.off(r.Events.XGLOG,n)}},[l]),null}let m=e=>{let l=(0,u.N)();return(0,n.jsx)(a.k,{componentName:"LogStat",Slardar:l,children:(0,n.jsx)(f,(0,i._)({},e))})}},392772:function(e,l,t){t.d(l,{r:function(){return o}});var i=t(101199),n=t(63601);let o=e=>{let l=(0,n.n)();return(0,i.useEffect)(()=>{if(l){let e=()=>{l.replay(),l.replayed=!0};return l.on("ended",e),()=>{l.off("ended",e)}}},[l]),null}},587512:function(e,l,t){t.d(l,{V:function(){return g}}),t(490629),t(706056);var i=t(320165),n=t(101199),o=t(469935),r=t.n(o),a=t(414061),d=t(537047),u=t(343341),s=t(190995),v=t(176449),c=t(63601),f=t(94109),m=t(140543),p=t(800513);let g=e=>{var l,t;let{className:o,awemeInfo:g,isShowReplay:_=!0,isActive:y,isMiniWin:h=!1}=e,w=(0,f.GP)(g),[E,I]=(0,n.useState)(w||!1),x=(0,c.n)();(0,n.useEffect)(()=>{let e=a.listen(a.EVENT.ShowPreviewPaidMask,e=>{let{isShow:l,awemeId:t,playerId:i}=e;y&&t===(null==g?void 0:g.awemeId)&&(i===(null==x?void 0:x.playerId)||!i)&&I(l)});return()=>{null==e||e()}},[y,g,x]),(0,n.useEffect)(()=>{w?I(!0):I(!1)},[g]);let{isPreivewFinish:C}=(0,m.O)({awemeInfo:g,isActive:y});return((0,n.useEffect)(()=>{!C&&!h&&I(!1)},[C]),(0,n.useEffect)(()=>{h&&(C?["primary","subscribe"].includes((0,p.$m)(g))&&I(!0):!w&&I(!1))},[C,h]),!E||(null==g?void 0:null===(l=g.chargeInfo)||void 0===l?void 0:l.has_paid)||[0,2].includes(null==g?void 0:null===(t=g.entRightInfo)||void 0===t?void 0:t.right_status))?null:(0,i.jsxs)("div",{className:r()(d.default.conatienr,o,{[d.default.filter]:w}),children:[(0,i.jsx)(v.Z,{src:u.Z,width:28,height:28,viewBox:"0 0 28 28"}),(0,i.jsx)("span",{className:d.default.title,children:"购买后可看"}),!w&&_&&(0,i.jsxs)("div",{className:d.default.subTitle,onClick:()=>{var e,l,t,i,n,o;(null==g?void 0:null===(l=g.chargeInfo)||void 0===l?void 0:null===(e=l.preview_config)||void 0===e?void 0:e.start_time)>0?null==x||null===(n=x.seek)||void 0===n||n.call(x,(null==g?void 0:null===(i=g.chargeInfo)||void 0===i?void 0:null===(t=i.preview_config)||void 0===t?void 0:t.start_time)/1e3):null==x||null===(o=x.replay)||void 0===o||o.call(x),I(!1)},children:[(0,i.jsx)(v.Z,{src:s.Z,width:20,height:20,viewBox:"0 0 20 20"}),"重播"]})]})}},611981:function(e,l,t){t.d(l,{H:function(){return s}});var i=t(629686),n=t(320165),o=t(101199),r=t(63601),a=t(310383),d=t(913285);let u=()=>{let e=(0,r.n)();return(0,o.useEffect)(()=>{if(e){let l=e.config.closeVideoClick;return e.config.closeVideoClick=!0,()=>{e.config.closeVideoClick=l}}},[e]),null},s=e=>{let l=(0,a.N)();return(0,n.jsx)(d.k,{componentName:"PreviewCloseVideoClick",Slardar:l,children:(0,n.jsx)(u,(0,i._)({},e))})}},698265:function(e,l,t){t.d(l,{X:function(){return C}});var i=t(629686),n=t(402748),o=t(320165),r=t(101199),a=t(734123),d=t(264034),u=t.n(d),s=t(59850),v=t(638052),c=t(601034),f=t(499059),m=t(870327),p=t(434441),g=t(63601),_=t(310383),y=t(913285),h=t(32712),w=t(420253),E=t(666266);let I=e=>{var l,t,o,d;let{isTopCardPlayerActive:u,logParams:f}=e,m=(0,r.useMemo)(()=>e.awemeInfo,[null===(l=e.awemeInfo)||void 0===l?void 0:l.awemeId,null===(d=e.awemeInfo)||void 0===d?void 0:null===(o=d.video)||void 0===o?void 0:null===(t=o.playAddr)||void 0===t?void 0:t.length]),p=(0,g.n)(),_=(0,s.Z)(()=>{var e;return(0,n._)((0,i._)({},f),{author_id:null==m?void 0:null===(e=m.authorInfo)||void 0===e?void 0:e.uid,group_id:null==m?void 0:m.awemeId,extraParams:{enter_from_merge:(0,c.yW)()}})}),y=(0,s.Z)(()=>({}));return(0,w.Z)({player:p,awemeInfo:m,isActive:u,getLogInfo:_,getSpecialParams:y}),(0,r.useEffect)(()=>{var e;let l=()=>{var e,l,t,n,o,r,a,d,u,s,f,g,y;let w=null==m?void 0:null===(t=m.video)||void 0===t?void 0:null===(l=t.bitRateList)||void 0===l?void 0:null===(e=l[0])||void 0===e?void 0:e.bitRate,E=0;for(let e=0;e<(null===(n=p.buffered)||void 0===n?void 0:n.length);e++)E+=(null===(f=p.buffered)||void 0===f?void 0:null===(s=f.end)||void 0===s?void 0:s.call(f,e))-(null===(y=p.buffered)||void 0===y?void 0:null===(g=y.start)||void 0===g?void 0:g.call(y,e));let{codecFormat:I}=(0,h.Z)({awemeInfo:m,player:p})||{};v.logInstance.sendLog("videoPlayFinish",(0,i._)({aweme_type:null==m?void 0:m.awemeType,group_id:null==m?void 0:m.groupId,enter_from_merge:(0,c.yW)(),enter_from:(0,c.yW)(),codec_format:I,preload_size:0,preload_time:0,video_quality:null==m?void 0:null===(a=m.video)||void 0===a?void 0:null===(r=a.bitRateList)||void 0===r?void 0:null===(o=r[0])||void 0===o?void 0:o.qualityType,video_bitrate:w,vduration:null==m?void 0:null===(d=m.video)||void 0===d?void 0:d.duration,is_bytevc1:0,play_duration_clean:Math.min(p.cumulateTime,null==m?void 0:null===(u=m.video)||void 0===u?void 0:u.duration),duration:p.cumulateTime,cache_duration:E,cache_size:E*w,data_player_type:2,play_size:p.cumulateTime/1e3*w,boost_task_id:(null==m?void 0:m.boostTaskId)||"",is_ting_window:0},_()))};return null==p||null===(e=p.on)||void 0===e||e.call(p,a.Events.ENDED,l),()=>{var e;null==p||null===(e=p.off)||void 0===e||e.call(p,a.Events.ENDED,l)}},[p]),null},x=e=>{let{awemeInfo:l,logParams:t={},isTopCard:o}=e,{getReported:d,setReported:s}=E.c.getState(),_=(0,g.n)(),y=(0,r.useRef)({volumnStatus:0,initVolumn:!1});return(0,r.useEffect)(()=>{if(_){var e,r,u;let{tab_name:g,folder_id:w="",folder_name:E="",enter_from_merge:I,enter_from:x,enter_method:C,is_multilist:L,search_params:T,sub_tab_name:P,gid_rank:S,is_first_screen:A,visit_id:N,filter_name:j,is_first_large_card_outflow:b}=t,R={aweme_type:null==l?void 0:l.awemeType,group_id:null==l?void 0:l.awemeId,author_id:null==l?void 0:null===(e=l.authorInfo)||void 0===e?void 0:e.uid,enter_from_merge:null!=I?I:(0,c.yW)(),enter_from:null!=x?x:(0,c.yW)(),enter_method:C,tab_name:g,is_full_screen:"0",video_scale:(null==l?void 0:null===(r=l.video)||void 0===r?void 0:r.width)/(null==l?void 0:null===(u=l.video)||void 0===u?void 0:u.height),folder_id:w,folder_name:E,is_multilist:L,search_params:T,sub_tab_name:P,gid_rank:S,is_first_screen:A,visit_id:N,is_first_large_card_outflow:b,filter_name:j},k=()=>{if(o){if(!d(null==l?void 0:l.awemeId))v.logInstance.sendLog("videoPlay",R),s(null==l?void 0:l.awemeId,!0)}},M=()=>{var e,t,r;(0,m.Vw)(p.H.hover_play,(0,n._)((0,i._)({},R),{aweme_info:l})),o?!d(null==l?void 0:l.awemeId)&&(v.logInstance.sendLog("videoPlay",R),s(null==l?void 0:l.awemeId,!0)):v.logInstance.sendLog("hoverPlay",R);let{codecFormat:a}=(0,h.Z)({awemeInfo:l,player:_})||{},u=Date.now()-f.Le.getConfig(f.gI.VideoCardMouseOverTime);v.logInstance.sendLog("hoverVideoPlayQuality",{aweme_type:null==l?void 0:l.awemeType,group_id:null==l?void 0:l.groupId,enter_from_merge:(0,c.yW)(),tab_name:g,codec_format:a,duration:u,player_first_frame:0,preload_size:0,preload_time:0,video_quality:null===(e=_.curDefinition)||void 0===e?void 0:e.qualityType,video_bitrate:null===(t=_.curDefinition)||void 0===t?void 0:t.bitrate,vduration:null==l?void 0:null===(r=l.video)||void 0===r?void 0:r.duration,is_bytevc1:0,folder_id:w,folder_name:E,sub_tab_name:P,filter_name:j,is_first_large_card_outflow:b})},V=e=>{if(y.current.volumnStatus=(null==e?void 0:e.muted)?0:1,!y.current.initVolumn){y.current.initVolumn=!0;return}v.logInstance.sendLog("hoverVolumeClick",{aweme_type:null==l?void 0:l.awemeType,group_id:null==l?void 0:l.awemeId,enter_from_merge:(0,c.yW)(),tab_name:g,status:`${y.current.volumnStatus}`,content_sdk:"video",sub_tab_name:P,visit_id:N,gid_rank:S,is_first_screen:A,filter_name:j,is_first_large_card_outflow:b})};return o&&_.on(a.Events.PLAY,k),_.on(a.Events.AUTOPLAY_STARTED,M),_.on(a.Events.VOLUME_CHANGE,V),()=>{_.off(a.Events.PLAY,k),_.off(a.Events.AUTOPLAY_STARTED,M),_.off(a.Events.VOLUME_CHANGE,V)}}},[_,l,o,d,s]),(0,r.useEffect)(()=>{if(_){let{tab_name:e,folder_id:i="",folder_name:n="",enter_from_merge:r,enter_from:d,is_multilist:s,search_params:f,sub_tab_name:m,enter_method:p,visit_id:g,gid_rank:y,is_first_screen:w,filter_name:E,is_first_large_card_outflow:I}=t,x=u()(()=>{var t,a,u,x,C,L,T,P,S,A,N,j,b,R,k,M;if(o)return;v.logInstance.sendLog("hoverPlayTime",{aweme_type:null==l?void 0:l.awemeType,duration:_.cumulateTime,group_id:null==l?void 0:l.awemeId,author_id:null==l?void 0:null===(t=l.authorInfo)||void 0===t?void 0:t.uid,enter_from_merge:null!=r?r:(0,c.yW)(),enter_from:d,tab_name:e,folder_id:i,folder_name:n,is_full_screen:"0",video_scale:(null==l?void 0:null===(a=l.video)||void 0===a?void 0:a.width)/(null==l?void 0:null===(u=l.video)||void 0===u?void 0:u.height),is_multilist:s,search_params:f,sub_tab_name:m,enter_method:p,visit_id:g,gid_rank:y,is_first_screen:w,filter_name:E,is_first_large_card_outflow:I});let V=null==l?void 0:null===(L=l.video)||void 0===L?void 0:null===(C=L.bitRateList)||void 0===C?void 0:null===(x=C[0])||void 0===x?void 0:x.bitRate,D=0;for(let e=0;e<(null===(T=_.buffered)||void 0===T?void 0:T.length);e++)D+=(null===(R=_.buffered)||void 0===R?void 0:null===(b=R.end)||void 0===b?void 0:b.call(R,e))-(null===(M=_.buffered)||void 0===M?void 0:null===(k=M.start)||void 0===k?void 0:k.call(M,e));let{codecFormat:O}=(0,h.Z)({awemeInfo:l,player:_})||{};v.logInstance.sendLog(o?"videoPlayFinish":"hoverVideoPlayEnd",{aweme_type:null==l?void 0:l.awemeType,group_id:null==l?void 0:l.groupId,enter_from_merge:(0,c.yW)(),enter_from:(0,c.yW)(),enter_method:p,tab_name:e,codec_format:O,preload_size:0,preload_time:0,video_quality:null==l?void 0:null===(A=l.video)||void 0===A?void 0:null===(S=A.bitRateList)||void 0===S?void 0:null===(P=S[0])||void 0===P?void 0:P.qualityType,video_bitrate:V,vduration:null==l?void 0:null===(N=l.video)||void 0===N?void 0:N.duration,is_bytevc1:0,play_duration_clean:Math.min(_.cumulateTime,null==l?void 0:null===(j=l.video)||void 0===j?void 0:j.duration),duration:_.cumulateTime,cache_duration:D,cache_size:D*V,data_player_type:2,play_size:_.cumulateTime/1e3*V,folder_id:i,folder_name:n,is_multilist:s,search_params:f,sub_tab_name:m,filter_name:E,is_first_large_card_outflow:I})});return _.on(a.Events.DESTROY,x),o&&window.addEventListener("beforeunload",x),()=>{x(),_.off(a.Events.DESTROY,x),o&&window.removeEventListener("beforeunload",x)}}},[_,l,o]),null},C=e=>{let{isTopCard:l}=e,t=(0,_.N)();return(0,o.jsxs)(y.k,{componentName:"PreviewEtPlugin",Slardar:t,children:[(0,o.jsx)(x,(0,i._)({},e)),l&&(0,o.jsx)(I,(0,i._)({},e))]})}},375931:function(e,l,t){t.d(l,{Q:function(){return C}});var i=t(629686),n=t(402748),o=t(320165),r=t(101199),a=t(734123),d=t(59850),u=t(590555),s=t(638052),v=t(855357),c=t(206698),f=t(499059),m=t(601034),p=t(414061),g=t(486463),_=t(63601),y=t(310383),h=t(913285),w=t(666266);let E=e=>1===(f.Le.getConfig(f.gI.topCardManualPause)||{})[e],I=e=>{let{onLoadedData:l=()=>{},onPlaying:t=()=>{},onEnded:o=()=>{},onUserAction:v=()=>{},awemeInfo:c,progressContainer:g,isInView:y,isTopCard:h,logParams:I}=e,x=(0,_.n)(),{addPlayer:C,updatePreventLiveAutoPlay:L,getIsAllowActive:T,handlePlayPause:P}=w.c.getState(),S=(0,w.c)(e=>{var l;return(null===(l=e.cards)||void 0===l?!void 0:!l[null==c?void 0:c.awemeId])||e.cards[c.awemeId].isCurrentActive}),A=(0,r.useRef)(!1),N=(0,r.useRef)(!1),j=(0,d.Z)(function(){var e;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,n._)((0,i._)({},I,l),{enter_from:(0,m.yW)(),author_id:null==c?void 0:null===(e=c.authorInfo)||void 0===e?void 0:e.uid,group_id:null==c?void 0:c.awemeId})}),b=(0,d.Z)(()=>{let e=f.Le.getConfig(f.gI.topCardManualPause)||{};delete e[null==c?void 0:c.awemeId],f.Le.setConfig(f.gI.topCardManualPause,e)}),R=(0,u.d)(y);(0,r.useEffect)(()=>{if(x&&(null==c?void 0:c.awemeId)){var e;C(c.awemeId,x);let i=function(){for(var e,l,i=arguments.length,n=Array(i),o=0;o{N.current=!0,p.emit(p.EVENT.JingxuanTopCard,{action:"playEnd",awemeId:null==c?void 0:c.awemeId}),L(c.awemeId,{preventLiveAutoPlay:!1},!0)},o=function(){for(var e,l,t=arguments.length,i=Array(t),n=0;n{"space"===e.key&&"playPause"===e.action&&!(null==x?void 0:x.isPlaying)&&R.current&&E(null==c?void 0:c.awemeId)&&b()},d=e=>{"firstFrame"===e.eventType&&!A.current&&(A.current=!0,performance.mark("jx-top-card-first-frame"),null==l||l({cost:null==e?void 0:e.costTime}))};(null===(e=performance.getEntriesByName("jx-top-card-quickstart-first-frame"))||void 0===e?void 0:e[0])&&!A.current&&(A.current=!0,null==l||l({cost:0}));let u=()=>{if(x.isCanplay){var e;let l=null!==(e=f.Le.getConfig(f.gI.JingxuanCardProgress))&&void 0!==e?e:{};l[c.awemeId]=x.currentTime,f.Le.setConfig(f.gI.JingxuanCardProgress,l)}};return x.on(a.Events.XGLOG,d),x.on(a.Events.SHORTCUT,r),x.on(a.Events.PLAY,i),x.on(a.Events.USER_ACTION,o),x.once(a.Events.ENDED,n),x.on(a.Events.DESTROY,u),()=>{x.off(a.Events.XGLOG,d),x.off(a.Events.SHORTCUT,r),x.off(a.Events.PLAY,i),x.off(a.Events.USER_ACTION,o),x.off(a.Events.ENDED,n),x.off(a.Events.DESTROY,u)}}},[x,h,b]),(0,r.useEffect)(()=>{if(g){let e=!1,l=e=>{var l;let t=e=>{var l,t;return null==e?void 0:null===(t=e.classList)||void 0===t?void 0:null===(l=t.contains)||void 0===l?void 0:l.call(t,"preview-pause-icon")};if(!(t(null==e?void 0:e.target)||t(null==e?void 0:null===(l=e.target)||void 0===l?void 0:l.ownerSVGElement)))b()},t=()=>{(null==x?void 0:x.paused)&&!e&&!E(null==c?void 0:c.awemeId)&&x.play(),e=!0},i=()=>{e=!1};return g.addEventListener("click",l),g.addEventListener("mouseenter",t),g.addEventListener("mouseleave",i),()=>{g.removeEventListener("click",l),g.removeEventListener("mouseenter",t),g.removeEventListener("mouseleave",i)}}},[g,x,b]);let k=(0,r.useRef)(null);return(0,r.useEffect)(()=>S?(A.current&&(performance.mark("jx-top-card-first-frame"),null==l||l({cost:0})),y)?p.listen(p.EVENT.JingxuanTopCard,e=>{let{action:l,awemeId:t,from:i}=e;if(t===(null==c?void 0:c.awemeId))if(clearTimeout(k.current),"play"!==l||E(null==c?void 0:c.awemeId)){if("pause"===l){var n;null==x||null===(n=x.pause)||void 0===n||n.call(x),"hover_other_cover"===i&&s.logInstance.sendLog("pause_video_auto",j({pause_reason:"hover_other_cover"}))}}else k.current=setTimeout(()=>{P(c.awemeId,"play","cancel_hover_other_cover")},200),"cancel_hover_other_cover"===i&&s.logInstance.sendLog("start_video_auto",j({start_reason:"cancel_hover_other_cover"}))}):void 0:()=>{},[x,null==c?void 0:c.awemeId,y,j,S]),(0,r.useEffect)(()=>()=>{clearTimeout(k.current)},[]),(0,r.useEffect)(()=>{if(!S)return()=>{};x&&!y&&!x.paused&&(x.pause(),s.logInstance.sendLog("pause_video_auto",j({pause_reason:"leave_visible_area"}))),x&&y&&x.paused&&!E(null==c?void 0:c.awemeId)&&(x.play(),s.logInstance.sendLog("start_video_auto",j({start_reason:"enter_visible_area"})))},[y,x,S]),null},x=e=>{let{onPlaying:l=()=>{},onEnded:t=()=>{},onUserAction:i=()=>{},awemeInfo:n,progressContainer:o,isInView:d,isTopCard:s}=e,m=(0,_.n)(),p=n.awemeType===v.e.Note,y=(0,u.d)(s);return(0,r.useEffect)(()=>{if(m){let e=()=>{let{isInModal:e=!1,modalEnterFrom:l}=f.Le.getConfig(f.gI.IsInModalVideo)||{};if(m.currentTime>3&&!p&&f.Le.setConfig(f.gI.PreviewPlayInfoRecord,{awemeId:null==n?void 0:n.awemeId,recordPlayTime:m.currentTime}),(l===c.a.WaterFall||l===c.a.WatchLaterPip)&&e&&(null==y?void 0:y.current)){var t;null==m||null===(t=m.pause)||void 0===t||t.call(m)}},o=()=>{f.Le.setConfig(f.gI.PreviewPlayInfoRecord,{awemeId:null==n?void 0:n.awemeId,recordPlayTime:0})};return m.on(a.Events.CANPLAY,l),m.on(a.Events.ENDED,t),m.on(a.Events.ENDED,o),m.on(a.Events.TIME_UPDATE,e),m.on(a.Events.USER_ACTION,i),()=>{m.off(a.Events.CANPLAY,l),m.off(a.Events.ENDED,t),m.off(a.Events.ENDED,o),m.off(a.Events.TIME_UPDATE,e),m.off(a.Events.USER_ACTION,i)}}},[m,p]),(0,r.useEffect)(()=>{if(m){let e=(0,g.OB)();return(0,g.wS)(m.playerId,!0),()=>{(0,g.wS)(e,!0)}}},[m]),null},C=e=>{var l,t;let n=(0,y.N)(),{isTopCard:r,awemeInfo:a}=e;return(0,o.jsxs)(h.k,{componentName:"PreviewHandle",Slardar:n,children:[(0,o.jsx)(x,(0,i._)({},e)),r&&(0,o.jsx)(I,(0,i._)({},e),a?`${null==a?void 0:a.awemeId}-${null==a?void 0:null===(t=a.video)||void 0===t?void 0:null===(l=t.playAddr)||void 0===l?void 0:l.length}`:void 0)]})}},793808:function(e,l,t){t.d(l,{$:function(){return n}});var i=t(101199);let n=e=>{let{player:l,duration:t}=e,n=(0,i.useRef)(null),o=(0,i.useRef)(null),r=(0,i.useRef)(0),a=(0,i.useRef)(-1),d=(0,i.useRef)(null);return(0,i.useEffect)(()=>{if(l){let e=n.current,i=e.offsetWidth,u=o.current,s=l.root,v=d.current,c=n=>{if(n.stopPropagation(),n.preventDefault(),a.current="touchstart"===n.type?n.targetTouches[0].pageX:n.pageX,i=e.offsetWidth,(null==n?void 0:n.target)!==u){let e=t/1e3*(n.offsetX/i);r.current=e,l.seek(e)}else r.current=l.currentTime},f=e=>{if(e.stopPropagation(),e.preventDefault(),-1!==a.current){let n=(("touchmove"===e.type?e.targetTouches[0].pageX:e.pageX)-a.current)/i;l.seek(r.current+t/1e3*n)}},m=()=>{a.current=-1};return e.addEventListener("mousedown",c),s.addEventListener("mousemove",f),v.addEventListener("mousemove",f),document.addEventListener("mouseup",m),v.addEventListener("mouseup",m),()=>{e.removeEventListener("mousedown",c),s.removeEventListener("mousemove",f),v.removeEventListener("mousemove",f),document.removeEventListener("mouseup",m),v.removeEventListener("mouseup",m)}}},[l]),{sliderProgressRef:n,sliderButtonRef:o,controlContainerRef:d}}},718211:function(e,l,t){t.d(l,{I:function(){return O}});var i=t(629686);t(490629);var n=t(320165),o=t(101199),r=t(890710),a=t(469935),d=t.n(a),u=t(734123),s=t(5784),v=t.n(s),c=t(280647),f=t(396868),m=t(426038),p=t(855357),g=t(638052),_=t(709705),y=t(414061),h=t(386206),w=t(601034),E=t(759894),I=t(386325),x=t(290913),C=t(323320),L=t(762849),T=t(1390),P=t(552713),S=t(793808),A=t(63601),N=t(541053),j=t(310383),b=t(913285),R=t(435132),k=t(316213),M=t(87897),V=t(314946);let D=e=>{var l,t,a;let{awemeInfo:s,progressContainer:j,needOperateHidden:b=!1,onPreviewControlShow:D,onPreviewControlHidden:O,logParams:U={},isTopCard:W,isTopCardPlayerActive:B,isShowWatchLater:$,watchLaterProps:F}=e,H=(0,o.useRef)(null),G=(0,o.useRef)(null),{user:Y,watchLaterAwemeInfo:z}=F||{},q=(0,A.n)(),[Z,K]=(0,o.useState)((null!==(a=(0,_.$o)(m.LocalStorageKeys.PREVIEW_IS_MUTE))&&void 0!==a?a:1)===1),[X,Q]=(0,o.useState)(!0),{sliderProgressRef:J,sliderButtonRef:ee,controlContainerRef:el}=(0,S.$)({player:q,duration:null==s?void 0:null===(l=s.video)||void 0===l?void 0:l.duration}),et=(null==s?void 0:s.awemeType)===p.e.Note,ei=(0,M._)(),{enablePip:en}=(0,N.$)({abtestData:ei,awemeInfo:s}),eo=!!((null===(t=e.pip)||void 0===t?void 0:t.show)&&en);(0,c.Z)(()=>{W&&B&&q&&K(q.muted||0===q.volume)},[W,B,q]),(0,o.useEffect)(()=>{if(W&&q)return y.listen(y.EVENT.syncVolumeChange,e=>{let{scene:l,isMute:t,volume:i}=e;if("previewTopCard"===l&&q.video){var n,o;q.video.volume=i,q.video.muted=t,null===(o=q.getPlugin("volume"))||void 0===o||null===(n=o.onVolumeChange)||void 0===n||n.call(o)}})},[W,q]),(0,o.useEffect)(()=>{if(q){let e=()=>{v()(H,"current.style.width",`${100*q.currentTime/q.duration}%`);let e=G.current;v()(e,"innerText",(0,h.$y)(1e3*q.currentTime))},l=()=>{K(q.muted||0===q.volume)},t=()=>{Q(!0)},i=()=>{Q(!1)};return q.on(u.Events.TIME_UPDATE,e),q.on(u.Events.SEEKED,e),q.on(u.Events.SEEKING,e),q.on(u.Events.VOLUME_CHANGE,l),q.on(u.Events.PLAY,t),q.on(u.Events.PAUSE,i),()=>{q.off(u.Events.TIME_UPDATE,e),q.off(u.Events.SEEKED,e),q.off(u.Events.SEEKING,e),q.off(u.Events.VOLUME_CHANGE,l),q.off(u.Events.PLAY,t),q.off(u.Events.PAUSE,i)}}},[q]);let er=(0,o.useRef)(0),[ea,ed]=(0,o.useState)(!0),[eu,es]=(0,o.useState)(0),ev=(0,o.useCallback)(()=>{if(!!j&&!!b&&!!ea)es(e=>e+1)},[j,b,ea]);return((0,o.useEffect)(()=>{if(!!j&&!!ea&&!!b)return er.current=setTimeout(()=>{ed(!1),null==O||O()},3e3),()=>{clearTimeout(er.current)}},[ea,j,b,O,eu]),(0,o.useEffect)(()=>{var e;if(!j||ea||!b)return;let l=et?document:q.root,t=()=>{ed(!0),null==D||D()};return null==l||l.addEventListener("mousemove",t,!0),null==el||null===(e=el.current)||void 0===e||e.addEventListener("mousemove",t,!0),()=>{var e;null==l||l.removeEventListener("mousemove",t,!0),null==el||null===(e=el.current)||void 0===e||e.removeEventListener("mousemove",t,!0)}},[j,ea,b,et,D]),j)?r.createPortal((0,n.jsxs)("div",{className:d()(P.default.controlContainer,{[P.default.isTopBigCard]:W}),onClick:e=>{e.stopPropagation(),e.preventDefault(),ev()},ref:el,onMouseEnter:()=>{if(W){var e;g.logInstance.sendLog("progress_preview",(0,i._)({enter_from:(0,w.yW)(),group_id:null==s?void 0:s.awemeId,author_id:null==s?void 0:null===(e=s.authorInfo)||void 0===e?void 0:e.uid},U))}},onMouseLeave:()=>{if(W){var e;g.logInstance.sendLog("hover_progress",(0,i._)({enter_from:(0,w.yW)(),group_id:null==s?void 0:s.awemeId,author_id:null==s?void 0:null===(e=s.authorInfo)||void 0===e?void 0:e.uid,player_display_mode:(0,E.Ok)()},U))}},children:[(0,n.jsxs)("div",{className:d()(P.default.timeAndVolumeContainer,{[P.default.hidden]:!ea}),children:[et?(0,n.jsx)("div",{}):(0,n.jsxs)("div",{className:P.default.currentTimeContainer,children:[(0,n.jsx)(k.z,{svg:X?(0,n.jsx)(I.Z,{className:d()({"preview-pause-icon":W}),style:{fontSize:"32px"}}):(0,n.jsx)(x.Z,{style:{fontSize:"32px"}}),onClick:()=>{let e="pause";X?q.pause():(q.play(),e="play"),null==q||q.emit(u.Events.USER_ACTION,{action:X?"pause_click":"play_click"}),g.logInstance.sendLog("hoverPauseClick",(0,i._)({click_type:e,content_sdk:"video",request_id:null==s?void 0:s.logPb,enter_from_merge:(0,w.yW)(),aweme_type:null==s?void 0:s.awemeType,group_id:null==s?void 0:s.awemeId},U))}}),(0,n.jsx)("span",{ref:G,children:"00:00"}),"/",(0,n.jsx)("span",{children:(0,h.$y)(s.video.duration)})]}),(0,n.jsxs)("div",{className:P.default.rightIconsContainer,children:[$&&(0,n.jsx)(V.nf,{awemeInfo:z,isActive:!0,isPreview:!0,isLogin:null==Y?void 0:Y.isLogin,userInfo:null==Y?void 0:Y.info,loginDispatch:null==Y?void 0:Y.dispatch,logParams:U,toast:e=>f.F.info({text:e,className:P.default.discoverWatchLaterToast}),canCancelWatchLater:!1,isTopCard:W,abtest:ei}),eo&&(0,n.jsx)("div",{className:P.default.pipBox,onClick:l=>{var t,i,n;(null===(t=e.pip)||void 0===t?void 0:t.onClick)&&(null===(n=e.pip)||void 0===n||null===(i=n.onClick)||void 0===i||i.call(n,l),q.autoOpenPip=!0)},children:(0,n.jsx)(k.z,{svg:(0,n.jsx)(C.Z,{}),style:{fontSize:"32px"}})}),(0,n.jsx)("div",{className:d()(P.default.volumeBox,P.default.newStyle),onClick:()=>{var e,l;if(null==s?!void 0:null===(l=s.status)||void 0===l?!void 0:null===(e=l.videoMute)||void 0===e?!void 0:!e.isMute)null==q||q.emit(u.Events.USER_ACTION,{action:Z?"mute_click":"volume_click"}),0===q.volume?(q.volume=.2,q.muted=!1):q.muted=!q.muted,!q.muted&&q.volume>0&&(0,R.c)({isMute:q.muted,volume:q.volume,isUserMute:q.muted||0===q.volume}),!W&&y.emit(y.EVENT.syncVolumeChange,{scene:"previewTopCard",isMute:q.muted,volume:q.volume})},children:Z?(0,n.jsx)(k.z,{svg:(0,n.jsx)(L.Z,{style:{fontSize:"32px"}})}):(0,n.jsx)(k.z,{svg:(0,n.jsx)(T.Z,{style:{fontSize:"32px"}})})})]})]}),(0,n.jsxs)("div",{className:d()(P.default.progressWrapper,et&&P.default.hidden,{"preview-progress-wrapper":W}),ref:J,onClick:()=>{null==q||q.emit(u.Events.USER_ACTION,{action:"progress_click"})},children:[(0,n.jsx)("div",{ref:H,className:P.default.progress,children:(0,n.jsx)("div",{className:P.default.changTimebtnOuter,ref:ee,children:(0,n.jsx)("div",{className:P.default.changTimebtnInner})})}),(0,n.jsx)("div",{className:P.default.mask})]})]}),j):null},O=e=>{let l=(0,j.N)();return(0,n.jsx)(b.k,{componentName:"PreviewProgress",Slardar:l,children:(0,n.jsx)(D,(0,i._)({},e))})}},635656:function(e,l,t){t.d(l,{g:function(){return g}});var i=t(629686);t(679308);var n=t(320165),o=t(101199),r=t(734123),a=t(426038),d=t(709705),u=t(414061),s=t(499059),v=t(251422),c=t(63601),f=t(310383),m=t(913285);let p=e=>{let{isActive:l,abtestData:t,awemeInfo:i,defaultMuted:n,isTopCard:f}=e,m=(0,c.n)();return(0,o.useEffect)(()=>{if(m&&l){var e,o;let l=e=>{(0,d.qQ)(a.LocalStorageKeys.PREVIEW_IS_MUTE,m.muted?1:0),!m.muted&&((0,d.qQ)(a.LocalStorageKeys.PLAYER_IS_MUTE,0),(0,d.qQ)(a.LocalStorageKeys.PLAYER_VOLUME,m.volume),u.emit(u.EVENT.searchWaterfallFullCardUnmute))};if((null==i||null===(o=i.status)||void 0===o||null===(e=o.videoMute)||void 0===e||!e.isMute)&&!n)return new Promise((e,l)=>{try{var i,n,o,r;null===(0,d.$o)(a.LocalStorageKeys.PLAYER_VOLUME)&&(0,d.qQ)(a.LocalStorageKeys.PLAYER_VOLUME,.5),null===(0,d.$o)(a.LocalStorageKeys.PREVIEW_IS_MUTE)&&(0,d.qQ)(a.LocalStorageKeys.PREVIEW_IS_MUTE,1);let l=Number((0,d.$o)(a.LocalStorageKeys.PLAYER_VOLUME)),u=s.Le.getConfig(s.gI.InitStartVolume);((null==t?void 0:null===(i=t.startPlayDefaultVolume)||void 0===i?void 0:i.isOpen)||(null==t?void 0:null===(n=t.startPlayDefaultVolumeGradient)||void 0===n?void 0:n.isOpen))&&!u&&(0,v.F)(()=>{s.Le.setConfig(s.gI.InitStartVolume,!0),l=(0,v.m)({abtestData:t,volume:l}),(0,d.qQ)(a.LocalStorageKeys.PLAYER_VOLUME,l)}),m.video.volume=l,m.video.muted=(null!==(r=(0,d.$o)(a.LocalStorageKeys.PREVIEW_IS_MUTE))&&void 0!==r?r:1)===1,null===(o=m.getPlugin("volume"))||void 0===o||o.onVolumeChange(),e(0)}catch(e){m.volume=Number((0,d.$o)(a.LocalStorageKeys.PLAYER_VOLUME)),m.muted=1===(0,d.$o)(a.LocalStorageKeys.PREVIEW_IS_MUTE),l(e)}}).then(()=>{null==m||m.on(r.Events.VOLUME_CHANGE,l)}).catch(e=>{}),()=>{null==m||m.off(r.Events.VOLUME_CHANGE,l)};{let e=setTimeout(()=>{var e,l,t;m.muted=!0,m.volume=0,null===(t=m.plugins)||void 0===t||null===(l=t.volume)||void 0===l||null===(e=l.disable)||void 0===e||e.call(l)});return()=>{var l,t,i;clearTimeout(e),null===(i=m.plugins)||void 0===i||null===(t=i.volume)||void 0===t||null===(l=t.enable)||void 0===l||l.call(t)}}}},[m,l,f]),null},g=e=>{let l=(0,f.N)();return(0,n.jsx)(m.k,{componentName:"ProgressVolumePlugin",Slardar:l,children:(0,n.jsx)(p,(0,i._)({},e))})}},314946:function(e,l,t){t.d(l,{vq:function(){return ee},nf:function(){return K}});var i=t("480333"),n=t("629686"),o=t("402748");t("490629"),t("228983"),t("759943"),t("706056"),t("932651");var r=t("320165"),a=t("358986"),d=t("502615"),u=t("734123"),s=t("101199"),v=t("469935"),c=t.n(v),f=t("242875"),m=t("590555"),p=t("426038"),g=t("540129"),_=t("749113"),y=t("759894"),h=t("335924"),w=t("499059"),E=t("601034"),I=t("709705"),x=t("414061"),C=t("249478"),L=t("573031"),T=t("649310"),P=t("31992");let S=(0,s.forwardRef)((e,l)=>(0,r.jsx)("svg",(0,o._)((0,n._)({width:12,height:12,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,r.jsx)("path",{d:"M13 4a1 1 0 1 0-2 0v7H4a1 1 0 1 0 0 2h7v7a1 1 0 1 0 2 0v-7h7a1 1 0 1 0 0-2h-7V4z",fill:"#000"})})));var A=t("442379"),N=t("567669"),j=t("365169"),b=t("407866"),R=t("913285"),k=t("746517"),M=t("396868");t("422012");var V=t("63601"),D=t("310383"),O=t("44599"),U=t("40137"),W=t("624508"),B=new W.h({watchLaterAdd:{eventName:"watch_later_add",params:{enter_from:"",enter_from_merge:"",group_id:"",author_id:"",tab_name:"",search_params:{search_id:"",search_result_id:""},status:0,failure_reason:"",click_method:"",if_first_big_card:0}},clickHoverLogin:{eventName:"click_hover_login",params:{enter_method:"",enter_from:"",params_for_special:""}}}),$=t("176449");let F=(0,s.forwardRef)((e,l)=>(0,r.jsx)("svg",(0,o._)((0,n._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,r.jsx)("path",{d:"M21.102 17.505A1 1 0 0 1 22 18.5v2h2a1 1 0 1 1 0 2h-2v2l-.005.102a1 1 0 0 1-.893.893L21 25.5a1 1 0 0 1-1-1v-2h-2a1 1 0 1 1 0-2h2v-2a1 1 0 0 1 1-1l.102.005zM13 20.5a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h5zM24 14a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h16zm0-6a1 1 0 0 1 0 2H8a1 1 0 0 1 0-2h16z",fill:"#fff"})}))),H=(0,s.forwardRef)((e,l)=>(0,r.jsx)("svg",(0,o._)((0,n._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,r.jsx)("path",{d:"M13 20.5a1 1 0 1 1 0 2H8a1 1 0 1 1 0-2h5zM24 14a1 1 0 0 1 0 2H8a1 1 0 1 1 0-2h16zm0-6a1 1 0 0 1 0 2H8a1 1 0 0 1 0-2h16zM24.553 18.627c.161.148.242.222.297.297a.943.943 0 0 1 .046 1.047c-.049.08-.123.16-.27.322l-3.232 3.527c-.68.741-1.019 1.112-1.461 1.134-.442.022-.817-.314-1.567-.984L16.3 22.12c-.163-.146-.245-.22-.3-.293a.943.943 0 0 1-.058-1.047c.047-.08.12-.162.266-.325.146-.163.22-.245.294-.3a.943.943 0 0 1 1.046-.059c.08.048.162.12.325.267l1.917 1.715 3.097-3.38c.148-.16.222-.242.297-.296a.943.943 0 0 1 1.047-.046c.08.048.16.122.322.27z",fill:"#fff"})})));var G=t("497227"),Y=e=>{let{checked:l=!1,onChange:t,className:i,width:n=32,height:o=32,disableHoverTip:a=!1}=e,d=(0,s.useMemo)(()=>l?"已添加稍后再看":"添加至稍后再看",[l]);return(0,r.jsxs)("div",{className:c()(G.default.container,i,{[G.default.enableHoverTip]:!a}),onClick:e=>{e.stopPropagation(),null==t||t(e,!l)},children:[(0,r.jsx)("div",{className:G.default.iconWrapper,style:{width:n,height:o},children:(0,r.jsx)($.Z,{src:l?H:F,width:n,height:o,viewBox:`0 0 ${n} ${o}`})}),!a&&(0,r.jsx)("div",{className:G.default.text,children:d})]})};function z(e){let{disableShortcut:l=!1,isDouyinPlayer:t}=e;return(0,r.jsxs)("div",{className:t?"douyin-playerTips":"xgTips",children:[(0,r.jsx)("span",{children:_.a.t("see_you_later",{},"稍后再看")}),!l&&!!(null==g?void 0:g.SHORTCUT_KEY.watchLater.badgeText)&&(0,r.jsx)("span",{className:"shortcutKey",children:null==g?void 0:g.SHORTCUT_KEY.watchLater.badgeText})]})}let q=e=>{var l,t,i;return{group_id:null!==(t=null==e?void 0:e.awemeId)&&void 0!==t?t:"",author_id:null!==(i=null==e?void 0:null===(l=e.authorInfo)||void 0===l?void 0:l.uid)&&void 0!==i?i:""}},Z=e=>(0,o._)((0,n._)({},e),{enter_from_merge:(null==e?void 0:e.enter_from_merge)||"",enter_from:(null==e?void 0:e.enter_from)||(0,y.mo)()||"",tab_name:(null==e?void 0:e.tab_name)||(0,P.zD)()||(0,h.Rs)("tab_name")||"",search_params:(null==e?void 0:e.search_params)||{},player_display_mode:(0,y.Ok)()});function K(e){let{player:l,isLogin:t,loginDispatch:i,userInfo:a,isActive:d,awemeInfo:v,isMini:g,isPreview:y,toast:h,disableShortcut:C,logParams:L,abtest:T,canCancelWatchLater:P=!1,isTopCard:j,isDouyinPlayer:R}=e,{uid:V}=a||{},D=(0,U.H)("watch_later"),O=(0,s.useRef)(null),{isMobile:W,isiPad:$}=(0,f.X)(),F=(0,s.useCallback)(e=>"function"==typeof h?h(e):M.F.info(e),[h]),H=(0,m.d)(L),[G,K]=(0,s.useState)(!1),X=(e,l,t)=>{var i,r;let a=null==l?void 0:l.awemeId,d=null!==(i=w.Le.getConfig(w.gI.WatchLater))&&void 0!==i?i:{},u=null!==(r=d.list)&&void 0!==r?r:"",s=Array.from(new Set([...u?u.split(","):[],a]));if(w.Le.setConfig(w.gI.WatchLater,(0,o._)((0,n._)({},d),{list:s.join(",")})),null==T?void 0:T.jxWatchLaterPip){let i=t;if(!i&&e){let l=e.currentTarget||e.target;l instanceof Element&&(i=l.getBoundingClientRect())}if("discover"===(0,E.yW)()&&i){let e=(0,I.$o)(p.LocalStorageKeys.watchLaterPipNewAddList)||{},t=Array.from(new Set([...(null==e?void 0:e[V])||[],null==l?void 0:l.awemeId]));e[V]=t,(0,I.qQ)(p.LocalStorageKeys.watchLaterPipNewAddList,e),x.emit(x.EVENT.flyToWatchLater,{startRect:i,awemeInfo:l})}else x.emit(x.EVENT.watchLaterPipNewAddListChange,{action:"add",awemeInfo:l})}},Q=e=>{var l,t,i;let r=null!==(t=w.Le.getConfig(w.gI.WatchLater))&&void 0!==t?t:{},a=null!==(i=r.list)&&void 0!==i?i:"",d=a?a.split(","):[],u=null==d?void 0:null===(l=d.filter)||void 0===l?void 0:l.call(d,l=>l!==(null==e?void 0:e.awemeId));w.Le.setConfig(w.gI.WatchLater,(0,o._)((0,n._)({},r),{list:u.join(",")})),(null==T?void 0:T.jxWatchLaterPip)&&x.emit(x.EVENT.watchLaterPipNewAddListChange,{action:"minus",awemeInfo:e})};(0,s.useEffect)(()=>{var e;let{list:l=""}=null!==(e=w.Le.getConfig(w.gI.WatchLater))&&void 0!==e?e:{};K(l&&l.includes(v.awemeId))},[v]);let J=(0,s.useCallback)(async(e,t,i)=>{var r,a,d;let u={DUPLICATE:"已添加过该视频",SUCCESS:"添加成功,可在“我的-稍后再看”中查看",FAIL:"添加失败,请稍后再试",OFFLINE:"网络异常,请稍后再试",MAX_LIMIT:"已达上限"},{list:s=""}=null!==(a=w.Le.getConfig(w.gI.WatchLater))&&void 0!==a?a:{};if(v.watchLaterInfo||s.includes(v.awemeId)){F(u.DUPLICATE),K(!0),X(e,v,i),B.sendLog("watchLaterAdd",(0,o._)((0,n._)({},q(v),Z(H.current)),{click_method:t,status:0}));return}if(!navigator.onLine){F(u.OFFLINE),B.sendLog("watchLaterAdd",(0,o._)((0,n._)({},Z(H.current),q(v)),{click_method:t,status:0}));return}let{statusCode:c=-1}=await (0,A.ih)({actionType:1,itemToPlayinfo:{[v.awemeId]:{play_duration:0,loop_status:null!==(d=null==v?void 0:null===(r=v.playProgress)||void 0===r?void 0:r.watch_times)&&void 0!==d?d:0}}});if(0===c){F(u.SUCCESS),K(!0),l&&(l.isWatchLater=!0),X(e,v,i),B.sendLog("watchLaterAdd",(0,o._)((0,n._)({},Z(H.current),q(v)),{click_method:t,status:1}));return}if(4===c){F(u.MAX_LIMIT),B.sendLog("watchLaterAdd",(0,o._)((0,n._)({},q(v),Z(H.current)),{failure_reason:"overlimit",click_method:t,status:0}));return}F(u.FAIL),B.sendLog("watchLaterAdd",(0,o._)((0,n._)({},Z(H.current),q(v)),{click_method:t,status:0}))},[v]);(0,s.useEffect)(()=>{var e;let{list:t=""}=null!==(e=w.Le.getConfig(w.gI.WatchLater))&&void 0!==e?e:{},i=!!v.watchLaterInfo||t.includes(v.awemeId);l&&(l.isWatchLater=i)},[l,v]);let ee=(0,s.useCallback)(async()=>{let{isSuccess:e}=await (0,A.iH)({awemeIds:[null==v?void 0:v.awemeId],remove_type:A.L7.selectItems});if(!e){F("服务异常,请稍后再试");return}null==l||l.emit(u.Events.USER_ACTION,{action:"click_view_later",status:"close"}),Q(v),K(!1),l&&(l.isWatchLater=!1),F("已移除添加视频")},[v]),el=(0,s.useRef)(!1),et=(0,s.useCallback)(async(e,l)=>{let t;if(e){let l=e.currentTarget||e.target;l instanceof Element&&(t=l.getBoundingClientRect())}el.current=!1,(0,k.default)({headerText:"登录后可添加稍后再看",success:async()=>{el.current=!0,null==i||i({type:"updateUserInfo"}),J(e,l,t)},enterMethod:"watch_later_add",onClose:()=>{x.emit(x.EVENT.videoRemoveStopPlayNext),!el.current&&(el.current=!0,B.sendLog("watchLaterAdd",(0,o._)((0,n._)({},Z(H.current),q(v)),{failure_reason:"not_login",click_method:l,status:0})))}})},[J,i,v,T]),ei=(0,s.useCallback)(async(e,n)=>{let{clickMethod:o="icon"}=n||{};if(!!d&&!!v&&!O.current&&(!!(null==l?void 0:l.isUserActive)||!!y))null==l||l.emit(u.Events.USER_ACTION,{action:"click_view_later",status:"open"}),O.current=setTimeout(()=>{O.current&&(O.current=null)},3e3),t?J(e,o):(null==i||i({type:"updateUserInfo"}),et(e,o))},[i,et,J,t,d,v,l]),en=(0,s.useCallback)((e,l)=>{G?ee():ei(e,{clickMethod:l})},[ei,ee,G]);return((0,s.useEffect)(()=>()=>{clearTimeout(O.current)},[]),(0,s.useEffect)(()=>{if(!d||!l||C)return()=>{};let e=e=>{let{clickMethod:l,isOn:t}=e;"switch"===l?t?ei(void 0,e):ee():ei(void 0,e)};return null==l||l.on("onWatchLater",e),()=>{null==l||l.off("onWatchLater",e)}},[l,d,ei,C]),y)?(0,r.jsx)(Y,{checked:G,onChange:(e,l)=>en(e,`${(0,E.yW)()}_preview`),disableHoverTip:j,className:c()({[N.default.previewIconNew]:!j})}):g?(0,r.jsxs)("div",{className:b.default.switchBox,onClick:e=>ei(e,{clickMethod:"icon"}),children:[(0,r.jsx)("div",{className:b.default.switchLabel,children:_.a.t("see_you_later",{},"稍后再看")}),(0,r.jsxs)("div",{className:c()(b.default.select,b.default.textSelect),children:["添加",(0,r.jsx)(S,{className:"noTransform"})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:D,className:c()(`${R?"douyin-player-watch-later-item douyin-player-icon":"xgplayer-watch-later-item xgplayer-icon"}`,N.default.newIcon),onClick:e=>{en(e,"icon")},children:(0,r.jsx)(Y,{checked:G,onChange:(e,l)=>{en(e,"icon")},disableHoverTip:!0})}),!W&&!$&&(0,r.jsx)(z,{disableShortcut:C,isDouyinPlayer:R})]})}class X extends u.Plugin{static get pluginName(){return"WatchLaterPlugin"}static get defaultConfig(){return{position:a.POSITIONS.CONTROLS_RIGHT,index:6.2,className:"xgplayer-watch-later"}}afterCreate(){if(!this.config.disable)this.renderRoot(),this.bind("mouseenter",this.onMouseenter),this.bind("mouseleave",this.onMouseleave)}destroy(){this.unbind("mouseenter",this.onMouseenter),this.unbind("mouseleave",this.onMouseleave),(0,O.v)(this)}renderRoot(){var e;let l=null!==(e=this.config)&&void 0!==e?e:{};this.root&&(0,O.s)(this,(0,r.jsx)(K,(0,n._)({},l)))}update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=(0,n._)({},this.config,e),this.renderRoot()}render(){return` `}constructor(...e){super(...e),(0,i._)(this,"onMouseleave",()=>{this.emit("icon_mouseleave",{pluginName:this.pluginName})}),(0,i._)(this,"onMouseenter",()=>{this.emit("icon_mouseenter",{pluginName:this.pluginName})})}}class Q extends d.di{afterPlayerInit(){if(!this._config.disable)this.renderRoot(),this.el.addEventListener("mouseenter",this.onMouseenter),this.el.addEventListener("mouseleave",this.onMouseleave)}beforeDestroy(){this.el.removeEventListener("mouseenter",this.onMouseenter),this.el.removeEventListener("mouseleave",this.onMouseleave),(0,O.v)(this)}renderRoot(){var e;let l=null!==(e=this._config)&&void 0!==e?e:{};this.el&&(0,O.s)(this,(0,r.jsx)(K,(0,n._)({},l)))}configDidUpdate(){this.renderRoot()}render(){return''}constructor(...e){super(...e),(0,i._)(this,"onMouseleave",()=>{this._player.emit("icon_mouseleave",{pluginName:"WatchLaterPlugin"})}),(0,i._)(this,"onMouseenter",()=>{this._player.emit("icon_mouseenter",{pluginName:"WatchLaterPlugin"})})}}(0,i._)(Q,"pluginName","WatchLaterPlugin");let J=e=>{var l;let{awemeInfo:t,isActive:i,disable:n,loginDispatch:o,isLogin:r,toast:a,disableShortcut:u,logParams:v,abtest:c,userInfo:f}=e,p=(0,V.n)(),g=(0,m.d)(v),_=(0,V.g)(),{isClientMiniWin:y}=null!==(l=(0,s.useContext)(T.C))&&void 0!==l?l:{},{isWebMiniWin:h}=(0,j.Iq)(e=>{let{isWebMiniWin:l}=e;return{isWebMiniWin:l}}),w=(0,s.useMemo)(()=>_?Q:X,[_]),E={position:d.PZ.CONTROL_RIGHT,index:5.6,className:"douyin-player-watch-later"};(0,s.useEffect)(()=>{if(p&&(0,C.D)(t)&&!L.H.baseOpt(c)){if(2===p.config.reuse&&p.getPlugin("WatchLaterPlugin"))return()=>{};let e={disable:n,loginDispatch:o,isActive:i,awemeInfo:t,isLogin:r,player:p,toast:a,disableShortcut:u,logParams:g.current,abtest:c,isDouyinPlayer:_,userInfo:f};return _&&Object.assign(e,E),p.registerPlugin(w,e),()=>{if(!p.destroyed)p.getPlugin("WatchLaterPlugin")&&2!==p.config.reuse&&p.unRegisterPlugin("WatchLaterPlugin",!0)}}},[p,t,c,_]),(0,s.useEffect)(()=>{if(p&&(0,C.D)(t)&&L.H.baseOpt(c)){if(2===p.config.reuse&&p.getPlugin("WatchLaterPlugin"))return()=>{};let e={disable:n,loginDispatch:o,isActive:i,awemeInfo:t,isLogin:r,player:p,toast:a,disableShortcut:u,logParams:g.current,abtest:c,isDouyinPlayer:_,userInfo:f};return _&&Object.assign(e,E),p.registerPlugin(w,e),()=>{if(null==p?!void 0:!p.destroyed)p.getPlugin("WatchLaterPlugin")&&2!==p.config.reuse&&p.unRegisterPlugin("WatchLaterPlugin",!0)}}},[p,c,_]),(0,s.useEffect)(()=>{var e,l,d;let s={isActive:i,awemeInfo:t,loginDispatch:o,disable:n,isLogin:r,toast:a,disableShortcut:u,abtest:c,userInfo:f};if(_)(null==p?void 0:p.updatePluginConfig)&&(null==p||null===(e=p.updatePluginConfig)||void 0===e||e.call(p,"WatchLaterPlugin",s));else{let e=null==p?void 0:null===(l=p.getPlugin)||void 0===l?void 0:l.call(p,"WatchLaterPlugin");null==e||null===(d=e.update)||void 0===d||d.call(e,s)}},[p,i,t,o,n,r,a,u,c,f]);let I=(0,s.useMemo)(()=>h||y,[h,y]);return(0,s.useEffect)(()=>{var e,l,t;let n=null==p?void 0:null===(e=p.getPlugin)||void 0===e?void 0:e.call(p,"WatchLaterPlugin");p&&i&&n&&(I?null==n||null===(l=n.hide)||void 0===l||l.call(n):null==n||null===(t=n.show)||void 0===t||t.call(n))},[p,i,I]),null},ee=e=>{let l=(0,D.N)();return(0,r.jsx)(R.k,{componentName:"WatchLater",Slardar:l,children:(0,r.jsx)(J,(0,n._)({},e))})}},253424:function(e,l,t){t.d(l,{C:function(){return ec}});var i=t("629686"),n=t("402748");t("490629"),t("706056"),t("374954"),t("932651");var o=t("320165"),r=t("101199"),a=t("469935"),d=t.n(a),u=t("72430"),s=t("426038"),v=t("908219"),c=t.n(v),f=t("666266");let m=function(e){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=!(arguments.length>2)||void 0===arguments[2]||arguments[2],i=arguments.length>3?arguments[3]:void 0,[n,o]=(0,r.useState)(!0),a=(0,r.useRef)(null),d=(0,r.useRef)(null),{updatePreventLiveAutoPlay:u,getPlayer:s}=f.c.getState(),v=(0,r.useCallback)(()=>{if(!a.current)return;let e=a.current.getBoundingClientRect();o(e.top<(window.innerHeight||document.documentElement.clientHeight)&&e.bottom>0&&e.left<(window.innerWidth||document.documentElement.clientWidth)&&e.right>0)},[]),m=(0,r.useCallback)(c()(v,200),[v]);return(0,r.useEffect)(()=>l&&a.current&&t?"IntersectionObserver"in window?(d.current&&d.current.disconnect(),d.current=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},i),a.current&&d.current.observe(a.current),()=>{var e;null===(e=d.current)||void 0===e||e.disconnect()}):(v(),window.addEventListener("scroll",m,!0),window.addEventListener("resize",m),()=>{window.removeEventListener("scroll",m,!0),window.removeEventListener("resize",m),m.cancel()}):()=>{},[i,v,m,l,t]),(0,r.useEffect)(()=>{!t&&n&&o(!1)},[t,n]),(0,r.useEffect)(()=>{if(!!e)if(n){let l=s(e);l&&!l.replayed&&l.isPlaying&&u(e,{preventLiveAutoPlay:!0})}else u(e,{preventLiveAutoPlay:!1})},[n,e]),[a,n]};var p=t("687875"),g=t("499059"),_=t("709705"),y=t("414061"),h=t("70864"),w=t("673616"),E=t("723349"),I=t("814129"),x=t("137375"),C=t("94109"),L=t("392772"),T=t("635656"),P=t("838468"),S=t("375931"),A=t("718211"),N=t("817567"),j=t("698265"),b=t("890710"),R=t("734123"),k=t("855357"),M=t("263832"),V=t("515330"),D=t("623607"),O=t("319977"),U=t("227831"),W=t("593697"),B=t("160843"),$=t("63601"),F=t("310383"),H=t("913285"),G=t("176449"),Y=t("671913"),z=t("195691");let q=e=>{var l,t,i,n,a;let{awemeInfo:u,container:s}=e,[v,c]=(0,r.useState)(null),[f,m]=(0,r.useState)(!1),p=(0,$.n)(),[g,_]=(0,r.useState)(0),h=(null==u?void 0:u.awemeType)===k.e.Note,w=(null==u?void 0:null===(l=u.images)||void 0===l?void 0:l.length)===1&&(null==u?void 0:null===(i=u.images)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.clipType)===M.NJ.LivePhoto,E=w&&(null==u?void 0:null===(a=u.images)||void 0===a?void 0:null===(n=a[0])||void 0===n?void 0:n.livePhotoType)===1,I=(0,r.useRef)(null),x=(0,r.useCallback)(()=>clearTimeout(I.current),[]),C=(0,r.useMemo)(()=>{let e=null==u?void 0:u.images;return h&&e?e:[]},[u,h]),L=(0,r.useMemo)(()=>`${g+1} / ${C.length}`,[g,C]),T=(0,r.useCallback)(e=>{if(!!v&&!(C.length<=1))m(!0),x(),-1===e?v.slidePrev():1===e&&v.slideNext()},[v,C.length]),P=(0,r.useCallback)((e,l)=>{e.stopPropagation(),e.preventDefault(),T(l)},[T]);return((0,r.useEffect)(()=>{if(h){let e=()=>{I.current=setTimeout(()=>{T(1),e()},3e3)};C.length>1&&e()}return x},[h,T,x,C]),(0,Y.X)({preClick:()=>T(-1),nextClick:()=>T(1),active:h}),!function(e){let{swiper:l,player:t,autoPlay:i,isOneLive:n,isOneLiveMix:o}=e,a=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(t){let e=!1,i=()=>{e&&y.emit(y.EVENT.notevideo,{type:"replay",playerId:t.playerId,index:l.activeIndex})},n=()=>{a.current&&(e=!0,clearTimeout(a.current))};return t.on("play",i),t.on("pause",n),()=>{t.off("play",i),t.off("pause",n)}}},[t]),(0,r.useEffect)(()=>{if(!t||!l)return()=>{};let e=y.listen(y.EVENT.notevideo,e=>{let{type:r,playerId:d}=e;if(t.playerId===d)"start"===r&&n&&setTimeout(()=>{y.emit(y.EVENT.notevideo,{type:"onelive_start",playerId:t.playerId,isMix:o})},100),"end"===r&&(n&&(y.emit(y.EVENT.notevideo,{type:"onelive_end",playerId:t.playerId,isMix:o}),o?a.current=setTimeout(()=>{y.emit(y.EVENT.notevideo,{type:"replay",playerId:t.playerId,index:l.activeIndex})},2500):setTimeout(()=>{y.emit(y.EVENT.notevideo,{type:"replay",playerId:t.playerId,index:l.activeIndex})},300)),!i&&setTimeout(()=>{y.emit(y.EVENT.notevideo,{type:"replay",playerId:t.playerId,index:l.activeIndex})},100))});return()=>{e(),clearTimeout(a.current)}},[t,l,i])}({swiper:v,player:p,autoPlay:!f,isOneLive:w,isOneLiveMix:E}),h&&s)?(0,b.createPortal)((0,o.jsxs)("div",{className:O.default.previewPicture,children:[(0,o.jsx)(W.t,{direction:0,className:O.default.swiper,data:C,slideKey:(e,l)=>`${null==e?void 0:e.uri}_${l}`,speed:250,loop:C.length>1,onSwiper:c,onActiveIndexChange:_,children:(0,o.jsx)(B.o,{children:e=>{var l;let{slideData:t,currentIndex:i}=e;return(0,o.jsxs)("div",{className:O.default.slide,children:[(0,o.jsx)(U.Q,{src:null==t?void 0:null===(l=t.urlList)||void 0===l?void 0:l[0],renderDefault:!0}),t.video&&(0,o.jsx)(z.v,{albumMusic:u.imageAlbumMusicInfo,info:t,activeIndex:g,currentIndex:i,isOneLive:w,isInPreview:!0})]})}})}),C.length>1&&(0,o.jsx)("div",{className:O.default.controllerWrapper,children:(0,o.jsxs)("div",{className:O.default.controller,onClick:e=>e,children:[(0,o.jsx)(G.Z,{className:d()([O.default.arrow,O.default.left]),src:V.Z,viewBox:"0 0 56 56",onClick:e=>{P(e,-1),null==p||p.emit(R.Events.USER_ACTION,{action:"picture_left_btn"})}}),(0,o.jsx)(G.Z,{className:d()([O.default.arrow,O.default.right]),src:D.Z,viewBox:"0 0 56 56",onClick:e=>{P(e,1),null==p||p.emit(R.Events.USER_ACTION,{action:"picture_right_btn"})}})]})}),(0,o.jsx)("div",{className:O.default.progress,children:L})]}),s):null},Z=e=>{let l=(0,F.N)();return(0,o.jsx)(H.k,{componentName:"PreviewPicture",Slardar:l,children:(0,o.jsx)(q,(0,i._)({},e))})};var K=t("307323");t("838368"),t("234572"),t("225293");var X=t("435132"),Q=t("587512"),J=t("764658"),ee=t("541053"),el=t("910978"),et=t("57449"),ei=t("611981"),en=t("681363"),eo=t("636371"),er=t("386206");let ea=e=>{var l;let{awemeInfo:t}=e;return(0,o.jsxs)("div",{className:eo.default.bigCardInfo,children:[(0,o.jsxs)("div",{className:eo.default.userInfo,children:[(0,o.jsxs)("span",{className:eo.default.nickName,children:["@",null==t?void 0:null===(l=t.authorInfo)||void 0===l?void 0:l.nickname]}),(null==t?void 0:t.createTime)>0&&(0,o.jsxs)("span",{className:eo.default.createTime,children:["\xb7 ",(0,er.MH)((null==t?void 0:t.createTime)*1e3)]})]}),(0,o.jsx)("div",{className:eo.default.desc,children:null==t?void 0:t.desc})]})},{A:ed,D:eu,ArrowUp:es,ArrowDown:ev}=p.bf,ec=(0,r.forwardRef)((e,l)=>{var t,a,v;let{awemeInfo:c,options:p,abtestData:b=g.Le.getConfig(g.gI.AbtestData),logParams:R,appendPlayerConfig:k,onPlaying:M,onLoadedData:V,onEnded:D,onUserAction:O,progressContainer:U,coverContainer:W,children:B,isOperable:$=!0,needOperateHidden:F=!1,forceContainerCover:H=!1,forceFitContain:G=!1,enableNote:Y,scene:z,isBigCard:q=!1,isTopCard:eo=!1,user:er,className:ec,reuseConfig:ef,onPreviewControlHidden:em,onPreviewControlShow:ep,pip:eg,startTime:e_,reuseBigCardQuickPlayer:ey,isShowWatchLater:eh,watchLaterProps:ew}=e,eE=(0,f.c)(e=>{var l;return(null===(l=e.cards)||void 0===l?!void 0:!l[null==c?void 0:c.awemeId])||e.cards[c.awemeId].isCurrentActive}),eI=(0,r.useRef)(null),[ex,eC]=m(null==c?void 0:c.awemeId,eo,!0),{enablePip:eL}=(0,ee.$)({abtestData:b,awemeInfo:c});(0,r.useImperativeHandle)(l,()=>{var e,l,t,i,n,o;return{getPlayer:()=>eI.current.getPlayer(),play:null===(t=eI.current)||void 0===t?void 0:null===(l=t.player)||void 0===l?void 0:null===(e=l.play)||void 0===e?void 0:e.call(l),pause:null===(o=eI.current)||void 0===o?void 0:null===(n=o.player)||void 0===n?void 0:null===(i=n.pause)||void 0===i?void 0:i.call(n)}},[]),(0,el.D)({awemeInfo:c,isActive:!0});let eT=(0,r.useMemo)(()=>{var e,l,t,o;let r=(0,K.k)({awemeInfo:c,abtestData:b}),a=(0,E.QF)({awemeInfo:c,abtestData:b,disableBitRateFilter:q,forceUserSelect:q});a.plugins=a.plugins||r.plugins||[],(0,I.Zf)({config:a,awemeInfo:c,abtestData:b});let{autoplayMuted:d}=(0,X.J)(b);d&&(0,_.qQ)(s.LocalStorageKeys.PREVIEW_IS_MUTE,1);(0,x.LX)({config:a,awemeInfo:c,abtestData:b});let u={};(0,C.GP)(c)?(u.url=[],u.downgradeUrl=[],u.nullUrlStart=!0,(null===(t=u.ignores)||void 0===t?void 0:t.length)>0&&u.ignores.push("enter")):u.nullUrlStart=!1,r.pip&&(r.pip.showIcon=eL);try{(null==a?void 0:a.mp4encryptplayer)&&(null==k?void 0:k.mp4encryptplayer)&&Object.assign(a.mp4encryptplayer,k.mp4encryptplayer),(null==a?void 0:a.DASHPlugin)&&(null==k?void 0:k.DASHPlugin)&&Object.assign(a.DASHPlugin,k.DASHPlugin)}catch(e){}return(0,n._)((0,i._)({},r,a,p,u),{closePlayVideoFocus:!1,autoplay:!0,controls:!0,autoplayMuted:(null!==(o=(0,_.$o)(s.LocalStorageKeys.PREVIEW_IS_MUTE))&&void 0!==o?o:1)===1||(null==c?void 0:null===(l=c.status)||void 0===l?void 0:null===(e=l.videoMute)||void 0===e?void 0:e.isMute)||!$,startTime:(()=>{var e,l,t,i,n,o,r,a,d,u;if(void 0!==e_)return e_;if(eo){let l=null===(e=g.Le.getConfig(g.gI.JingxuanCardProgress))||void 0===e?void 0:e[null==c?void 0:c.awemeId];return null!=l?l:0}let s=g.Le.getConfig(g.gI.PreviewPlayInfoRecord);if((null==s?void 0:s.awemeId)===(null==c?void 0:c.awemeId))return null==s?void 0:s.recordPlayTime;if("watch_later"===z){let{store:e}=null!==(o=g.Le.getConfig(g.gI.WatchLater))&&void 0!==o?o:{},d=(null==e?void 0:null===(l=e[c.awemeId])||void 0===l?void 0:l.loop)>0||(null===(t=c.playProgress)||void 0===t?void 0:t.watch_times)>0,u=null!==(a=null!==(r=null==e?void 0:null===(i=e[c.awemeId])||void 0===i?void 0:i.progress)&&void 0!==r?r:null===(n=c.playProgress)||void 0===n?void 0:n.play_progress)&&void 0!==a?a:0;return d||!u?0:Math.floor(u/1e3)}if(["favorite_collection","like","record"].includes(z))return(null==c?void 0:null===(d=c.playProgress)||void 0===d?void 0:d.play_progress)<=0?0:Math.max(Math.floor((null==c?void 0:null===(u=c.playProgress)||void 0===u?void 0:u.play_progress)/1e3)-2,1);return 0})(),closeVideoClick:eo,keyboard:{isGlobalTrigger:!0,keyCodeMap:{leftA:{keyCode:ed.keyCode,action:"seekBack",disable:!1},rightD:{keyCode:eu.keyCode,action:"seek",disable:!1},up:{keyCode:es.keyCode,disable:!0},down:{keyCode:ev.keyCode,disable:!0}},seekStep:5}})},[c,p,b,!0,eo,eL,k,q]);return(0,r.useEffect)(()=>y.listen(y.EVENT.videoPause,()=>{var e;let l=null===(e=eI.current)||void 0===e?void 0:e.getPlayer();null==l||l.pause()}),[]),(0,o.jsxs)(et.f,(0,n._)((0,i._)({},e),{xgplayerConfig:eT,isInitPlayer:!0,style:{height:"100%",width:"100%"},className:d()(w.default.container,ec,`video_${null==c?void 0:c.awemeId}`,{[w.default.isHorizontal]:(null==c?void 0:null===(t=c.video)||void 0===t?void 0:t.width)>(null==c?void 0:null===(a=c.video)||void 0===a?void 0:a.height),[w.default.forceFitCover]:H&&!G,[w.default.forceFitContain]:G}),ref:eI,playerDOMRef:ex,reuseConfig:ef,reuseBigCardQuickPlayer:ey,scene:u.lT.Preview,children:[(0,o.jsx)(L.r,{}),(0,o.jsx)(T.g,{isActive:!0,abtestData:b,awemeInfo:c,defaultMuted:!$,isTopCard:eo}),(0,o.jsx)(P.L,{isTopCard:eo,awemeInfo:c,isActive:!0,abtestData:b}),(0,o.jsx)(S.Q,{awemeInfo:c,onPlaying:M,onLoadedData:V,onEnded:D,onUserAction:O,progressContainer:U,isInView:eC,isTopCard:eo,logParams:R}),eo&&(0,o.jsx)(ea,{awemeInfo:c}),$&&(0,o.jsx)(A.I,{isTopCard:eo,awemeInfo:c,progressContainer:U,needOperateHidden:F,logParams:R,onPreviewControlHidden:em,onPreviewControlShow:ep,pip:eg,isTopCardPlayerActive:eE,isShowWatchLater:eh,watchLaterProps:ew}),(0,o.jsx)(en.t,{awemeInfo:c}),(0,o.jsx)(N.E,{isActive:!0,awemeInfo:c,config:eT,reuseConfig:ef}),(0,o.jsx)(j.X,{awemeInfo:c,logParams:R,isTopCard:eo,isTopCardPlayerActive:eE}),Y&&(0,o.jsx)(Z,{awemeInfo:c,container:W}),B,(null==c?void 0:null===(v=c.chargeInfo)||void 0===v?void 0:v.is_charge_content)&&(0,o.jsx)(Q.V,{awemeInfo:c,className:w.default.paidMask,isShowReplay:!1,isActive:!0}),"discover"!==z&&(0,o.jsx)(h.s,{awemeInfo:c,isActive:!0,isOnlyShowTag:!0,userInfo:er}),(0,o.jsx)(J.A,{abTestData:b,awemeInfo:c,isActive:!0,className:w.default.paidMaskButton,isShowBuy:!1,isShowLimited:!0,userInfo:er,isSearch:!0}),(0,o.jsx)(ei.H,{})]}))})},649310:function(e,l,t){t.d(l,{C:function(){return o}});var i=t(101199),n=t(593124);let o=(0,i.createContext)({globalIsCommentShow:!1,setIsCommentShowFunc:void 0,globalIsCommentTrayPushGuideShow:!1,setIsCommentTrayPushGuideShowFunc:void 0,globalCommentTrayPushGuideType:!1,setCommentTrayPushGuideTypeFunc:void 0,globalIsRelatedShow:!1,setIsRelatedShowFunc:void 0,globalIsSideBarShow:!1,setIsSideBarShowFunc:void 0,setTargetVideoRef:()=>null,swiper:void 0,isFullScreen:!1,isCssFullScreen:!1,isClientMiniWin:!1,fullScreenTarget:null,videoToast:void 0,slideVideoTab:n.L.Author,setSlideVideoTab:void 0,userId:"",setModalAwemeInfo:()=>null,awemeInfoList:[],collectionFolderInfo:null,docId:"",globalIsShowAiCard:!1,useJxSlideInheritAndPin:!1,useJxDefaultOpen:!1,aiCardIsDefaultOpen:!1,hasDefaultOpenAiRelatedCardRef:void 0})},205693:function(e,l,t){var i=t(629686),n=t(402748),o=t(320165),r=t(101199);let a=(0,r.forwardRef)((e,l)=>(0,o.jsxs)("svg",(0,n._)((0,i._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,o.jsx)("g",{filter:"url(#mute_svg__filter0_d_42764_243856)",children:(0,o.jsx)("path",{d:"M4 10a2 2 0 0 1 2-2h1l4.36-3.633a1 1 0 0 1 1.64.768v13.73a1 1 0 0 1-1.64.768L7 16H6a2 2 0 0 1-2-2v-4z",fill:"#fff"})}),(0,o.jsx)("g",{filter:"url(#mute_svg__filter1_d_42764_243856)",children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.002 13.55l2.499 2.954 1.502-1.316-2.693-3.185 2.694-3.185-1.503-1.316-2.499 2.955-2.5-2.955L14 8.818l2.694 3.185-2.693 3.185 1.502 1.316 2.499-2.955z",fill:"#fff"})}),(0,o.jsxs)("defs",{children:[(0,o.jsxs)("filter",{id:"mute_svg__filter0_d_42764_243856",x:3,y:4.133,width:11,height:17.734,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,o.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,o.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,o.jsx)("feOffset",{dy:1}),(0,o.jsx)("feGaussianBlur",{stdDeviation:".5"}),(0,o.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,o.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),(0,o.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_42764_243856"}),(0,o.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_42764_243856",result:"shape"})]}),(0,o.jsxs)("filter",{id:"mute_svg__filter1_d_42764_243856",x:13,y:7.502,width:10.004,height:11.002,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,o.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,o.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,o.jsx)("feOffset",{dy:1}),(0,o.jsx)("feGaussianBlur",{stdDeviation:".5"}),(0,o.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,o.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),(0,o.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_42764_243856"}),(0,o.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_42764_243856",result:"shape"})]})]})]})));l.Z=a},425285:function(e,l,t){var i=t(629686),n=t(402748),o=t(320165),r=t(101199);let a=(0,r.forwardRef)((e,l)=>(0,o.jsxs)("svg",(0,n._)((0,i._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,o.jsx)("g",{filter:"url(#volume_svg__filter0_d_44850_265349)",children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 10a2 2 0 0 1 2-2h1l4.36-3.633a1 1 0 0 1 1.64.768v13.73a1 1 0 0 1-1.64.768L6 16H5a2 2 0 0 1-2-2v-4zm11 5a3 3 0 1 0 0-6v6zm7.25-3A7.75 7.75 0 0 1 14 19.734v-2.508a5.25 5.25 0 0 0 0-10.453V4.266A7.75 7.75 0 0 1 21.25 12z",fill:"#fff"})}),(0,o.jsx)("defs",{children:(0,o.jsxs)("filter",{id:"volume_svg__filter0_d_44850_265349",x:2,y:4.133,width:20.25,height:17.734,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,o.jsx)("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),(0,o.jsx)("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,o.jsx)("feOffset",{dy:1}),(0,o.jsx)("feGaussianBlur",{stdDeviation:".5"}),(0,o.jsx)("feComposite",{in2:"hardAlpha",operator:"out"}),(0,o.jsx)("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),(0,o.jsx)("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_44850_265349"}),(0,o.jsx)("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_44850_265349",result:"shape"})]})})]})));l.Z=a},190995:function(e,l,t){var i=t(629686),n=t(402748),o=t(320165),r=t(101199);let a=(0,r.forwardRef)((e,l)=>(0,o.jsx)("svg",(0,n._)((0,i._)({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.54 10a5.464 5.464 0 0 1 10.883-.702l-1.394-1.232a.75.75 0 1 0-.994 1.124l2.825 2.498a.75.75 0 0 0 1.128-.157l2.036-3.174a.75.75 0 1 0-1.262-.81l-.879 1.37A6.965 6.965 0 0 0 2.04 10a6.964 6.964 0 0 0 10.943 5.715.75.75 0 1 0-.858-1.23A5.464 5.464 0 0 1 3.54 10z",fill:"#fff",opacity:".6"})})));l.Z=a},343341:function(e,l,t){var i=t(629686),n=t(402748),o=t(320165),r=t(101199);let a=(0,r.forwardRef)((e,l)=>(0,o.jsx)("svg",(0,n._)((0,i._)({width:28,height:28,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,o.jsx)("path",{d:"M14 1.167a6.125 6.125 0 0 0-6.125 6.125V10.5a3.208 3.208 0 0 0-3.208 3.208v8.75a3.208 3.208 0 0 0 3.208 3.209h12.25a3.208 3.208 0 0 0 3.208-3.209v-8.75a3.208 3.208 0 0 0-3.208-3.208V7.292A6.125 6.125 0 0 0 14 1.167zm4.375 9.333h-8.75V7.292a4.375 4.375 0 1 1 8.75 0V10.5z",fill:"#fff"})})));l.Z=a},736068:function(e,l,t){var i=t(629686),n=t(402748),o=t(320165),r=t(101199);let a=(0,r.forwardRef)((e,l)=>(0,o.jsx)("svg",(0,n._)((0,i._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,o.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.284 11.224a.75.75 0 1 0-1.06 1.06l3.719 3.72-3.72 3.719a.75.75 0 0 0 1.061 1.06l3.72-3.719 3.718 3.72a.75.75 0 0 0 1.061-1.061l-3.719-3.72 3.72-3.719a.75.75 0 1 0-1.061-1.06l-3.72 3.719-3.719-3.72z",fill:"currentColor"})})));l.Z=a}}]);