1 line
195 KiB
Plaintext
1 line
195 KiB
Plaintext
"use strict";(self.webpackChunkdouyin_web=self.webpackChunkdouyin_web||[]).push([["51705"],{909723:function(e,l,i){e.exports=i.p+"media/blackBg_big.4a5aa435941eed50.png"},682839:function(e,l,i){i.d(l,{k:function(){return u}});var o=i(320165),t=i(101199),n=i(473228),r=i(318966),d=i(397176);let a=function(e,l,i,o){let t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"component",n=arguments.length>5?arguments[5]:void 0;null==o||o(e,l),"module"===t&&(null==n||n("report",{ev_type:"blank_screen",payload:{timestamp:Date.now(),score:0,error:{type:"js_error",message:e.message}}})),null==n||n("sendEvent",{name:"live_component_error_boundary",categories:{componentName:i,message:e.message,stack:e.stack,componentStack:l,isNewProject:!0},type:"event"})},u=e=>{let{onError:l,beforeCapture:i,fallback:u,children:s,type:c="component",componentName:v,_slardarInstance:m}=e,f=(0,t.useMemo)(()=>{if(!d.s)return m||(0,r.OK)()},[m]),_=t.useCallback((e,i)=>{a(e,i,v,l,c,f)},[c,l,v,f]);return(0,o.jsx)(n.SV,{onError:_,beforeCapture:i,fallback:u,Slardar:f,children:s})}},104891:function(e,l,i){i.d(l,{l:function(){return o}});var o={TRIPLE_SCREEN_PLUGIN:"triple_screen_plugin",ROTATE_PLUGIN:"rotate_plugin",GLOBAL_APP:"global_app",GIFT_BAR:"gift_bar",GIFT_BAR_MINI:"gift_bar_mini",HEADER:"header",NAVIGATION:"navigation",SIDEBAR:"siderbar",CATEGORY_TAB:"category_tab",TAB:"tab",TITLE_PLUGIN:"title_plugin",FOLLOW_PLUGIN:"follow_plugin",COMMENT_PLUGIN:"comment_plugin",GIFT_SWITCH_PLUGIN:"gift_switch_plugin",GIFT_BAR_PLUGIN:"gift_bar_plugin",EFFECT_SWITCH_PLUGIN:"effect_switch_plugin",GIFT_TRAY_PLUGIN:"gift_tray_plugin",GIFT_EFFECT_PLUGIN:"gift_effect_plugin",FANS_CLUB_PLUGIN:"fans_club_plugin",EXHIBITION_VIEW_PLUGIN:"exhibition_view_plugin",VIP_VIEW_PLUGIN:"vip_view_plugin",EFFECT_PLUGIN:"effect_plugin",HOUR_RANK_LIST_VIEW_PLUGIN:"hour_rank_list_view_plugin",TOOL_BAR_PLUGIN:"tool_bar_plugin",QUALITY_SWITCH_PLUGIN:"quality_switch_plugin",DANMAKU_PLUGIN:"danmaku_plugin",AUDIO_ROOM_PLUGIN:"audio_room_plugin",VIDEO_ROOM_PLUGIN:"video_room_plugin",RTC_LAYER_PLUGIN:"rtc_layer_plugin",PK_VIEW_PLUGIN:"pk_view_plugin",PIP_PLUGIN:"pip_plugin",INPICTURE_PLUGIN:"inpicture_plugin",ADMIN_PRIVILEGE_PLUGIN:"admin_privilege_plugin",LIVING_PLAYER:"living_plyaer",IFRAME_PLAYER:"iframe_player",GIFT_ITEM:"gift_item",GIFT_PANEL:"gift_panel",LIVE_CATEGORY:"live_category",LIVE_CARD:"live_card",RANK_LIST:"rank_list",ORDER_SING_LIST:"order_sing_list",ORDER_SING_RULE:"order_sing_rule",PROMOTION_POP:"promotion_pop",PROMOTION_LIST_WRAPPER:"promotion_list_wrapper",FANS_CLUB_POPUP:"fans_club_popup",USER_POPUP:"user_popup",CHAT_ROOM_PANEL:"chat_room_panel",AUDIENCE_PANEL:"audience_panel",FIXED_CHAT:"fixed_chat",LIVE_CAROUSEL:"live_carousel",LIVE_COVER:"live_cover",LIVE_FULLPLAYER_QULIATY:"live_fullplayer_quality",Live_Like:"live_like",Live_Flutter_Like:"live_flutter_like",DANMAKU_SETTINGS:"danmaku_settings",VIP_LIVE_BOUNDARY:"vip_live_boundary",FOLD_CHAT_ROOM_COMMENT_PLUGIN:"fold_chat_room_comment_plugin",LIVING_PIP_WINDOW:"living-pip-window",SHORT_CUT:"short_cut",SERVICE_CENTER_PLUGIN:"service_center_plugin",QUALITY_SWITCH:"quality_switch",LivePreviewEnterRoom:"LivePreviewEnterRoom",LiveUserProfile:"live_user_profile",LOTTERY_COMPONENT:"lottery_componet",LOTTERY_COMPONENT_PLUGIN:"lottery_componet_plugin",LINK_MIC_DYNAMIC_CONFIG:"link_mic_dynamic_config",LIVE_RESERVE_CARD:"live_reserve_card",StreamCompute:"StreamCompute",RoomLogic:"RoomLogic",EnterAndLeave:"EnterAndLeave",LiveStallPerfReporter:"LiveStallPerfReporter",ForceLoginRecorder:"ForceLoginRecorder",ChatRoom:"ChatRoom",Tracking:"Tracking",RoomInit:"RoomInit",RoomMessageConsume:"RoomMessageConsume",StatusHandler:"StatusHandler",RoomEvent:"RoomEvent",RightPanelContainer:"RightPanelContainer",DetailLayoutSideCard:"DetailLayoutSideCard",RoomInfoBar:"RoomInfoBar",LandPageContainer:"LandPageContainer",LiveShare:"LiveShare",OperatingBar:"OperatingBar",TheaterPlugin:"TheaterPlugin",KeyBindPlugin:"KeyBindPlugin",VolumeMemoryPlugin:"VolumeMemoryPlugin",RefreshPlugin:"RefreshPlugin",LiveDebugStoragePlugin:"LiveDebugStoragePlugin",HintContainerPlugin:"HintContainerPlugin",CancelMutePlugin:"CancelMutePlugin",GlobalControlPlugin:"GlobalControlPlugin",PlayerLoggerPlugin:"PlayerLoggerPlugin",PlayerTeaLogPlugin:"PlayerTeaLogPlugin",PlayerEndCover:"PlayerEndCover",VolumeWheelPlugin:"VolumeWheelPlugin",AdaptedBySEIPlugin:"AdaptedBySEIPlugin",PKSEIPlugin:"PKSEIPlugin",NewPlayerErrorCover:"NewPlayerErrorCover",PaidLivePlugin:"PaidLivePlugin",LeadingLoginPlugin:"LeadingLoginPlugin",LinkMicLayoutPlugin:"LinkMicLayoutPlugin",LinkMicPlayModeLimitPlugin:"LinkMicPlayModeLimitPlugin",UpdateFunctionTypePlugin:"UpdateFunctionTypePlugin",TopEffectPlugin:"TopEffectPlugin",OrderSingPlugin:"OrderSingPlugin",GroupFightPlugin:"GroupFightPlugin",GuestBattlePlugin:"GuestBattlePlugin",LiveReserveCard:"LiveReserveCard",PlayerControl:"PlayerControl",UgcAvatar:"UgcAvatar",PlayerEventConsume:"PlayerEventConsume",GroupLive:"GroupLive",ChangeDynamicBg:"ChangeDynamicBg",LinkMicApplyPlugin:"LinkMicApplyPlugin",ORDER_SING_SELECT_GUEST:"order_sing_select_guest",PausePop:"PausePop",DetailContextMenuPlugin:"DetailContextMenuPlugin",DoubleScreenPlugin:"DoubleScreenPlugin",ProgrammeWrapper:"ProgrammeWrapper",LiveTDK:"LiveTDK",AutoRunModal:"AutoRunModal",AudioCheatTips:"AudioCheatTips",GetDressList:"GetDressList",GROUP_LIVE_PLUGIN:"group_live_plugin",LiveFromAppTips:"LiveFromAppTips",MoreLiveEntrancePlugin:"MoreLiveEntrancePlugin",COMMENT_EDITOR:"comment_editor",WaterMark:"WaterMark",LIVE_CARD_IN_MIX_PLAYER:"live_card_in_mix_player",AiHelper:"AiHelper",VrPlugin:"VrPlugin",NewLinkInitPlugin:"NewLinkInitPlugin",Gift_MENU_PLUGIN:"GiftMenu",LIVE_CHANNEL_BANNER_ROOMS:"LIVE_CHANNEL_BANNER_ROOMS",LIVE_CHANNEL_BANNER:"LIVE_CHANNEL_BANNER",NEW_VIDEO_ROOM_PLUGIN:"new_video_room_plugin",NEW_RTC_LAYER_PLUGIN:"new_rtc_layer_plugin",NewLinkMicLogicPlugin:"NewLinkMicLogicPlugin",LIVE_CHANNEL_RECOMMEND_LIST:"LIVE_CHANNEL_RECOMMEND_LIST",LIVE_CHANNEL_FOLLOW_LIST:"LIVE_CHANNEL_FOLLOW_LIST",LIVE_CHANNEL_HOT_CATEGORY:"LIVE_CHANNEL_HOT_CATEGORY"}},721108:function(e,l,i){i.d(l,{C:function(){return o}});var o={iframe:"iframe",liveCard:"live_card",liveSmallCard:"live_small_card",liveCarousel:"live_carousel",liveDetail:"live_detail",mediaDetail:"live_media_detail",smallWindow:"live_small_window",liveCollege:"live_college",liveSearch:"live_search",liveSlider:"live_slider",liveFeedFull:"live_feed_full",liveModal:"live_modal"}},677655:function(e,l,i){i.d(l,{f:function(){return o}}),i(683656),i(759943);let o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.replace(/^http:\/\//i,"https://")}},847779:function(e,l,i){i.d(l,{Q:function(){return C},Y:function(){return w}});var o=i(480333),t=i(629686),n=i(402748);i(374954),i(490629);var r=i(101199),d=i(30995),a=i(855357),u=i(426038),s=i(37821),c=i(426112),v=i(448163),m=i(119778),f=i(547352),_=i(687581),h=i(597085),g=i(180750),p=i(889570);let{WHALE_CUT_HEADER:I}=d,C=new class e{get(e){let{userId:l,maxCursor:i,count:o,locateItemId:t,whaleCutToken:n=""}=e,r=`${l}_${i}_${o}_${t}_${n}`;return this.store.get(r)}getOverFull(){return this.cacheKeyList.length>this.cacheSize}set(e,l){let{userId:i,maxCursor:o,count:t,locateItemId:n,whaleCutToken:r=""}=e,d=`${i}_${o}_${t}_${n}_${r}`;this.store.set(d,l),this.cacheKeyList.push(d),this.getOverFull()&&this.clearCache()}clearCache(){let e=this.cacheKeyList.length-this.cacheSize;for(let l=0;l<e;l++){let e=this.cacheKeyList.shift();e&&this.store.delete(e)}}constructor(){(0,o._)(this,"store",new Map),(0,o._)(this,"cacheKeyList",[]),(0,o._)(this,"cacheSize",5)}},w=e=>{var l;let{awemeInfo:i,isShow:o,authorCardLoginGuide:d,isNeedLoginGuideSense:w,isLogin:y,abtestData:S}=e,T=null==i?void 0:null===(l=i.authorInfo)||void 0===l?void 0:l.secUid,L=null==i?void 0:i.awemeId,E=(0,r.useRef)(0),k=(0,r.useRef)(0),b=(0,r.useRef)({list:[],isInit:!0}),P=(0,r.useRef)(!0),N=(0,r.useRef)(!1),A=(0,r.useRef)(!1),x=(0,r.useRef)({}),R=(0,r.useRef)(!1),M=async e=>{var l,r,M,V,F,D,j,B,O,U,W,G,H;let{dir:Z,curList:K}=e,$=e=>e.filter(e=>{var l,i;return(!(null==e?void 0:null===(l=e.tag)||void 0===l?void 0:l.inReviewing)||!((null==e?void 0:null===(i=e.tag)||void 0===i?void 0:i.isStory)||e.awemeType===a.e.Note))&&!K.find(l=>l.awemeId===e.awemeId)}).map(e=>(0,n._)((0,t._)({},e),{itemId:e.awemeId})),z=[],Y=0,q=!0,J=0,X="",Q=!0;if(b.current.isInit){let e={userId:T,maxCursor:"after"===Z?k.current:E.current,count:24,locateItemId:L,whaleCutToken:null===(l=x.current)||void 0===l?void 0:l.whaleCutToken},t=C.get(e);!t&&(t=(0,m.fetchUserPost)(e));let{data:n,maxCursor:d,hasMore:v,statusCode:g,logPb:w,whaleInfo:j,notLoginModule:B}=await t;(null==j?void 0:j.whaleDecisionCustom)===I&&!y&&(N.current=!0);let{actionClose:O}=(0,p.jb)(u.LocalStorageKeys.AuthorBlock);if((0,p.A_)({effectiveTime:null==S?void 0:null===(r=S.authorBlock)||void 0===r?void 0:r.effective_time,type:null==S?void 0:null===(M=S.authorBlock)||void 0===M?void 0:M.type,abtestData:S,isLogin:y})&&!O&&!y&&(A.current=!0),0===J){let e=n;B&&B.guideLoginTipExist&&(R.current=!0,e=[{awemeId:s.P.NoLoginVideoGuide,awemeType:a.e.NoLoginVideoGuide,name:B.guideLoginTipText,desc:B.guideLoginTipDesc,video:{cover:B.guideLoginTipCover},authorInfo:{uid:null==n?void 0:null===(F=n[0])||void 0===F?void 0:null===(V=F.authorInfo)||void 0===V?void 0:V.uid}},...n]);let l=$(e||[]),i=l.find(e=>e.awemeId===L);z=l,Y=d,q=!!v,J=g,X=w,k.current=d,x.current={whaleCutToken:null==j?void 0:j.whaleCutToken},(i||N.current||A.current)&&(Q=!1,P.current=!1,Y=0),b.current={list:l,isInit:!1}}if(Q){let e=await (0,m.fetchUserLocatePost)({createTime:(0,f.QE)(i.createTime)?i.createTime:1e3*i.createTime,userId:T,locateItemId:L,cursor:(null===(D=b.current.list[b.current.list.length-1])||void 0===D?void 0:D.createTime)*1e3||d}),l=o&&!(0,c.gc)(i)&&!(0,c.Jt)(i);if(e.statusCode===h.j.Success){let i=$(e.data||[]);i.find(e=>e.awemeId===L)?(z=i,q=!!e.hasMore,X=e.logPb,J=e.statusCode,Y=e.maxCursor,k.current=Math.min(k.current,e.maxCursor),E.current=e.minCursor):l&&_.oe.event.info({name:_.Mo.AuthorCardLocateFail,report:{awemeId:L,authorUid:T,logId:e.logPb,statusCode:e.statusCode}})}}b.current.isInit=!1}else{if(!P.current&&"before"===Z)return{data:z,maxCursor:Y,hasMore:q,statusCode:J,logPb:X};let{data:e,forwardHasMore:l,maxCursor:i,minCursor:o=0,hasMore:t,statusCode:n,logPb:r,whaleInfo:d}=await (0,m.fetchUserPost)({userId:T,maxCursor:"after"===Z?k.current:E.current,count:20,locateItemId:L,forwardAnchorCursor:"after"===Z?void 0:E.current,whaleCutToken:null===(j=x.current)||void 0===j?void 0:j.whaleCutToken,forwardEndCursor:"after"===Z?void 0:(null===(B=b.current.list[b.current.list.length-1])||void 0===B?void 0:B.createTime)*1e3||new Date().getTime()+5*v.s2});if((null==d?void 0:d.whaleDecisionCustom)===I&&!y&&(N.current=!0),0===J){if(z=$(e||[]),q=!!t,J=n,X=r,x.current={whaleCutToken:null==d?void 0:d.whaleCutToken},"after"===Z)Y=i,k.current=i;else if(E.current=o||((0,f.QE)(null===(O=K[0])||void 0===O?void 0:O.createTime)?null===(U=K[0])||void 0===U?void 0:U.createTime:(null===(W=K[0])||void 0===W?void 0:W.createTime)*1e3),Y=l?1:0,!l||R.current&&E.current<k.current){let l=null===(G=b.current)||void 0===G?void 0:G.list;null===(H=e.forEach)||void 0===H||H.call(e,e=>{!l.find(l=>l.awemeId===e.awemeId)&&l.push(e)}),z=$(l||[]),P.current=!0}}}let ee={data:z,maxCursor:Y,hasMore:q,statusCode:J,logPb:X,disableFetch:N.current};return"force_login"===d&&w?(0,g.t3)(ee):ee};return{fetchLocateList:M,cleatFetchParms:()=>{k.current=0,E.current=0,b.current.list=[],x.current={}},notLoginVideoGuideRef:R}}},185498:function(e,l,i){i.d(l,{A9:function(){return c},BP:function(){return u},G0:function(){return m},gR:function(){return f},pF:function(){return s}}),i(490629);var o=i(320165),t=i(101199),n=i(414061),r=i(365169),d=i(575559),a=i(552388);let u="336px",s="--fullscreen-layout-side-card-width",c="data-fullscreen-layout-side-card-content",v=(e,l)=>"boolean"==typeof(null==l?void 0:l.visible)?l.visible:(null==l?void 0:l.action)==="show"||(null==l?void 0:l.action)!=="hide"&&!e;function m(e){let{isWebMiniWin:l,isListenVideoMiniWin:i}=(0,r.Iq)(e=>{let{isWebMiniWin:l,isListenVideoMiniWin:i}=e;return{isWebMiniWin:l,isListenVideoMiniWin:i}}),[o,a]=(0,t.useState)(()=>!!d.J.dockEl);return(0,t.useEffect)(()=>{let e=n.listen(n.EVENT.toggleLayoutSideArea,e=>{a(l=>v(l,e))});return()=>e()},[]),e&&o&&!l&&!i}function f(e){let{isFullScreen:l,visible:i=!0,withContainer:n=!0}=e,r=(0,t.useRef)(null);if((0,t.useLayoutEffect)(()=>{let e=r.current;return i&&l&&d.J.setFullscreenDockEl(e),()=>{d.J.fullscreenDockEl===e&&d.J.setFullscreenDockEl(null)}},[l,i]),!i)return null;let u=(0,o.jsx)("aside",{className:a.default.fullscreenLayoutSideCard,children:(0,o.jsx)("div",{ref:r,className:a.default.content,[c]:!0})});return n?(0,o.jsx)("div",{id:"layoutSideCard",className:a.default.layoutSideCard,onWheel:e=>e.stopPropagation(),children:(0,o.jsx)("div",{className:a.default.layoutSideCardInnerWrapper,children:u})}):u}},944180:function(e,l,i){var o=i(624508);l.Z=new o.h({recommendVideoToast:{eventName:"recommend_video_toast",params:{group_id:"",author_id:"",action_type:"",relation_tag:0,enter_from:"",enter_method:"",label_related_action:"",label_text:"",like_cnt:0,follow_cnt:0,mutual_cnt:0,friend_user_id:"",recommend_range:"mutual"}},cancelRecommendVideo:{eventName:"cancel_recommend_video",params:{group_id:"",author_id:"",action_type:"",relation_tag:0,enter_from:"",enter_method:"",recommend_range:"mutual"}},friendsWatchingShow:{eventName:"friends_watching_show",params:{group_id:"",author_id:"",enter_from:"",is_friend_watching:0,like_cnt:0,follow_cnt:0,mutual_cnt:0,friend_user_id:"",recommend_user_relation:"",recommend_user_app_list:""}},fromDiscoverLabel:{eventName:"from_discover_label",params:{group_id:"",author_id:"",action_type:"",enter_from:""}}})},994166:function(e,l,i){i.d(l,{J:function(){return f}}),i(490629),i(706056);var o=i(101199),t=i(908219),n=i.n(t),r=i(939165),d=i(889429),a=i(414061),u=i(499059),s=i(687875),c=i(509523),v=i(205030),m=i(365169);let f=e=>{let{EventListener:l,refContainerStatus:i,isClientMiniWin:t,abtestData:f}=e,{pipWindow:_}=(0,m.Iq)(e=>{let{pipWindow:l}=e;return{pipWindow:l}}),h=(0,o.useRef)(!1),g=(0,o.useRef)(null),p=(0,o.useRef)([]),I=(0,o.useRef)(null),C=(0,o.useRef)(null),w=(0,o.useRef)((0,d.vU)()?120:0),y=(0,o.useRef)(0),S=(0,o.useRef)("unknown"),T=(0,o.useCallback)((e,l)=>{let i=0,o=e.slice(Math.max(e.length-l,1));for(let e=0;e<o.length;e++)i+=o[e];return Math.ceil(i/l)},[]),L=(0,o.useCallback)(()=>{a.emit(a.EVENT.swiperVideo)},[]),E=(0,o.useCallback)(e=>{var i,o,t,n,r,d,a,s,c,m;L(),null==e||null===(i=e.preventDefault)||void 0===i||i.call(e),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{var e,l;p.current=[],(null==f?void 0:null===(l=f.swiperOptimize)||void 0===l?void 0:null===(e=l.wheel)||void 0===e?void 0:e.logic)&&(C.current=!1,S.current="unknown")},400);let _=new Date().getTime(),h=e.wheelDelta||-e.deltaY||-e.detail,E=Math.max(-1,Math.min(1,h));(null==f?void 0:null===(t=f.swiperOptimize)||void 0===t?void 0:null===(o=t.wheel)||void 0===o?void 0:o.logic)&&(y.current!==E&&(p.current=[]),y.current=E);let k=void 0!==e.wheelDeltaX||void 0!==e.deltaX,b=Math.abs(e.wheelDeltaX)<Math.abs(e.wheelDelta)||Math.abs(e.deltaX)<Math.abs(e.deltaY)||!k,P=w.current+Math.abs(h);if(p.current=[...p.current,P],(null==f?void 0:null===(r=f.swiperOptimize)||void 0===r?void 0:null===(n=r.wheel)||void 0===n?void 0:n.logic)&&("unknown"===S.current&&(S.current=P>50?"mouse":"touch"),p.current.length>2)){let e=p.current[p.current.length-2],l=p.current[p.current.length-1],i=p.current[p.current.length-3];e>l&&e>i?p.current[p.current.length-2]=Math.max(l,i)+1:e<l&&e<i&&(p.current[p.current.length-2]=Math.min(l,i)-1)}let N=_-I.current;I.current=_,N>400&&1===p.current.length&&(p.current=[,,].fill(p.current[0]),C.current=!1);let A=null!==(m=null==f?void 0:null===(a=f.swiperOptimize)||void 0===a?void 0:null===(d=a.wheel)||void 0===d?void 0:d.windowsize)&&void 0!==m?m:20,x=(null==f?void 0:null===(c=f.swiperOptimize)||void 0===c?void 0:null===(s=c.wheel)||void 0===s?void 0:s.logic)&&"mouse"===S.current?A/2:A,R=T(p.current,x),M=R>T(p.current,2*x);M&&!C.current&&b&&((0,u.Vv)(v.CJ.scroll),E<0?l.emit("changeNext",{from:"scroll"}):l.emit("changePrev",{from:"scroll"}),C.current=!0),!M&&C.current&&b&&(C.current=!1)},[l,f]);return(0,o.useEffect)(()=>{if(l){let e=(0,a.emitterListen)(l,"sliderMove",L);return()=>{null==e||e()}}},[l]),(0,o.useEffect)(()=>{if(i)return null==i||i.addEventListener("wheel",E),()=>{null==i||i.removeEventListener("wheel",E)}},[i,E]),(0,o.useEffect)(()=>{if(_)return null==_||_.addEventListener("wheel",E),()=>{null==_||_.removeEventListener("wheel",E)}},[_,E]),(0,r.o)(()=>{var e,i,o,r,d;let m=t?[s.bf.ArrowUp.keyCode]:[s.bf.ArrowUp.keyCode,s.bf.W.keyCode],_=t?[s.bf.ArrowDown.keyCode]:[s.bf.ArrowDown.keyCode,s.bf.S.keyCode],g=e=>{var i,o,t,n,r,d,a,f;if(e.nativeEvent||(null===(i=u.Le.getConfig(u.gI.IsInModalVideo))||void 0===i?void 0:i.isInModal)||(null===(o=u.Le.getConfig(u.gI.PlayerShortcutConf))||void 0===o?void 0:o.pausePlayControlShortcut)||(null==e?void 0:null===(t=e.target)||void 0===t?void 0:t.contentEditable)==="true"||h.current)return;let g=e;(null===(n=e.data)||void 0===n?void 0:n.type)==="KEY_DOWN"&&(null===(r=e.data)||void 0===r?void 0:r.data)&&(g=null===(d=e.data)||void 0===d?void 0:d.data);let p=u.Le.getConfig(u.gI.DisableNextPre);!m.includes(g.keyCode)||g.shiftKey||p&&g.keyCode===s.bf.ArrowUp.keyCode?_.includes(g.keyCode)&&!g.shiftKey&&(!p||g.keyCode!==s.bf.ArrowDown.keyCode)&&((0,u.Vv)(v.CJ.hotkey),c.p.postTask({task:()=>{l.emit("changeNext",{from:"keyboard"})},priority:"user-blocking",immediate:(null===(f=u.Le.getConfig(u.gI.AbtestData))||void 0===f?void 0:f.longtask)!==1})):((0,u.Vv)(v.CJ.hotkey),c.p.postTask({task:()=>{l.emit("changePrev",{from:"keyboard"})},priority:"user-blocking",immediate:(null===(a=u.Le.getConfig(u.gI.AbtestData))||void 0===a?void 0:a.longtask)!==1}))},p=(null==f?void 0:null===(i=f.swiperOptimize)||void 0===i?void 0:null===(e=i.keydown)||void 0===e?void 0:e.logic)?g:n()(g,null!==(d=null==f?void 0:null===(r=f.swiperOptimize)||void 0===r?void 0:null===(o=r.keydown)||void 0===o?void 0:o.delay)&&void 0!==d?d:500,{leading:!0,trailing:!1});document.addEventListener("keydown",p),window.addEventListener("message",p);let I=a.listen(a.EVENT.showLoginPanel,e=>{h.current=e});return()=>{document.removeEventListener("keydown",p),window.removeEventListener("message",p),I()}},[t,l,f]),null}},914858:function(e,l,i){i.d(l,{z:function(){return T}}),i("490629");var o=i("320165"),t=i("101199"),n=i("855357"),r=i("263832"),d=i("469935"),a=i.n(d),u=i("356336"),s=i("909723"),c=i("190889"),v=i("439503");let m=e=>{let{isActive:l,isRenderInSSR:i,awemeInfo:r,abtestData:d,className:m}=e,f=(0,t.useMemo)(()=>{var e,l,i,o;return d.searchSuspenseFetch===u.SearchSuspenseFetch.StreamWithBlackBg?s:r.awemeType===n.e.Note?null===(o=r.images)||void 0===o?void 0:null===(i=o[0])||void 0===i?void 0:null===(l=i.urlList)||void 0===l?void 0:l[0]:null===(e=r.video)||void 0===e?void 0:e.originCover},[r,d]);return(0,o.jsxs)("div",{className:a()(c.default.staticImgBackground,m,"HideInLynxClassName"),children:[(0,o.jsx)("img",{src:f,className:a()(c.default.videoCover,{[c.default.blackVideoCover]:d.searchSuspenseFetch===u.SearchSuspenseFetch.StreamWithBlackBg})}),(0,o.jsx)(v.T3,{className:c.default.playerImgBackground,isRenderInSSR:i,awemeInfo:r,elementtiming:"lcp_ele",abtestData:d,fetchPriority:"auto",priorityServerBackupBg:!1})]})};var f=i("732979"),_=i.n(f),h=i("297738"),g=i.n(h),p=i("236758"),I=i("457822"),C=i("629686"),w=i("402748");let y=(0,t.forwardRef)((e,l)=>(0,o.jsx)("svg",(0,w._)((0,C._)({width:32,height:32,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,o.jsx)("path",{d:"M23.5 15.134a1 1 0 0 1 0 1.732l-11.25 6.495a1 1 0 0 1-1.5-.866V9.505a1 1 0 0 1 1.5-.866l11.25 6.495z",fill:"#fff"})})));_().extend(g());let S=e=>{let{isActive:l,progress:i,time:n,abtestData:r,enableEnterDetail:d}=e,u=(0,t.useMemo)(()=>_().duration(Math.round(n/1e3),"seconds").format("mm:ss"),[n]);return(0,o.jsxs)("div",{className:a()(I.default.staticControls),children:[i&&(0,o.jsx)("div",{className:I.default.progress}),(0,o.jsxs)("div",{className:I.default.innerControls,children:[(0,o.jsxs)("div",{className:I.default.leftGrid,children:[(0,o.jsx)(y,{}),n>0&&(0,o.jsxs)("div",{className:I.default.time,children:[(0,o.jsx)("span",{children:"00:00"}),(0,o.jsx)("span",{className:I.default.timeSeparator,children:"/"}),(0,o.jsx)("span",{children:u})]})]}),d&&(0,o.jsxs)("div",{className:I.default.rightGrid,children:[(0,o.jsx)("div",{className:I.default.desc,children:"详情"}),(0,o.jsx)("div",{className:I.default.detailSvg,children:(0,o.jsx)(p.Z,{width:6,height:9,viewBox:"0 0 6 9"})})]})]})]})},T=e=>{var l,i,d;let{isActive:a,isRenderInSSR:u,awemeInfo:s,player:c,abtestData:v,className:f}=e,[_,h]=(0,t.useState)(!1),g=(null==s?void 0:s.awemeType)===n.e.Note,p=(null==s?void 0:null===(l=s.images)||void 0===l?void 0:l.length)===1&&(null==s?void 0:null===(d=s.images)||void 0===d?void 0:null===(i=d[0])||void 0===i?void 0:i.clipType)===r.NJ.LivePhoto;return(0,t.useEffect)(()=>{h(!0)},[]),(0,o.jsxs)(o.Fragment,{children:[!_&&(0,o.jsx)(m,{isActive:a,isRenderInSSR:u,awemeInfo:s,abtestData:v,className:f}),(!c||!a)&&(0,o.jsx)(S,{isActive:a,progress:!(g&&p),time:s.video.duration,abtestData:v})]})}},752900:function(e,l,i){i.d(l,{T:function(){return a}}),i(490629);var o=i(101199),t=i(590555),n=i(601034),r=i(759894),d=i(771410);let a=e=>{let{awemeInfo:l,isLogin:i,isActive:a,onOpenCard:u}=e,[s,c]=(0,o.useState)(!1),[v,m]=(0,o.useState)(""),[f,_]=(0,o.useState)(null),h=(0,t.d)(l),g=e=>{if("anchor"===e){var l,i,o;d.Z.report("pc_feed_label_click",{action:"close",enter_from:(0,n.yW)(),player_enter_from:(0,r.mo)(),group_id:null===(l=h.current)||void 0===l?void 0:l.awemeId,author_id:String(null!==(o=null===(i=h.current)||void 0===i?void 0:i.authorUserId)&&void 0!==o?o:""),label_type:null==f?void 0:f.activityName,activity_id:null==f?void 0:f.schema})}c(!1)},p=(0,o.useCallback)((e,l)=>{var i,o,t;c(!0),m(e),_(l),u(),d.Z.report("pc_feed_label_click",{action:"open",enter_from:(0,n.yW)(),player_enter_from:(0,r.mo)(),group_id:null===(i=h.current)||void 0===i?void 0:i.awemeId,author_id:String(null!==(t=null===(o=h.current)||void 0===o?void 0:o.authorUserId)&&void 0!==t?t:""),label_type:null==l?void 0:l.activityName,activity_id:null==l?void 0:l.schema})},[]);return(0,o.useEffect)(()=>{!a&&c(!1)},[a]),{isShowActivityCard:s,closeActivityCard:g,openActivityCard:p,activityName:v,anchorData:f,onActivityCardClick:(e,l)=>{s?g("anchor"):p(e,l)}}}},619770:function(e,l,i){i.d(l,{x:function(){return f}});var o=i(629686),t=i(811603);i(490629),i(679308);var n=i(101199),r=i(734123),d=i(855357),a=i(414061),u=i(601034),s=i(264104),c=i(338214);let v="",m=null,f=e=>{var l;let{awemeInfo:i,enablePreload:f,player:_}=e,[h,g]=(0,n.useState)((null==i?void 0:null===(l=i.stats)||void 0===l?void 0:l.commentCount)||0);(0,n.useEffect)(()=>{var e;g((null==i?void 0:null===(e=i.stats)||void 0===e?void 0:e.commentCount)||0)},[i]);let p=(0,n.useCallback)(async function(e,l,o,t,n,r){let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],u=null==i?void 0:i.awemeId,c=`${u}-0-${l}-${e}-${n}-${o}`;if(v===c&&m)return m;let f=await (0,s.iq)({awemeId:null==i?void 0:i.awemeId,cursor:e,count:l,itemType:(null==i?void 0:i.awemeType)===d.e.XgVideo?1:0,fetchType:o,cancleFunc:t,cid:n,whaleCutToken:r});return a&&f&&(v=c,m=f),f},[null==i?void 0:i.awemeId]),I=(0,n.useCallback)((e,l,o,t)=>(0,s.rs)({awemeId:null==i?void 0:i.awemeId,commentId:e,cursor:l,count:o,itemType:(null==i?void 0:i.awemeType)===d.e.XgVideo?1:0,whaleCutToken:t}),[null==i?void 0:i.awemeId]),C=(0,n.useCallback)(function(){let{cursor:e=0,count:l,needPage:o=!0,ctx:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.Yp)({cursor:e,count:l,needPage:o,ctx:t,groupId:null==i?void 0:i.awemeId})},[null==i?void 0:i.awemeId]),w=(0,n.useCallback)(function(){let{cid:e,diggType:l,level:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.y6)({awemeId:null==i?void 0:i.awemeId,cid:e,diggType:l,itemType:(null==i?void 0:i.awemeType)===d.e.XgVideo?1:0,level:o})},[null==i?void 0:i.awemeId]),y=(0,n.useCallback)(function(){let{cid:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,s.YF)({cid:e})},[]);return{globalCommentCount:h,updateGlobalCommentCount:g,fetchComment:p,fetchReply:I,fetchCommentMention:C,publishCommentItem:(0,n.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var l,n,{text:d,textExtra:v,replyId:m,replyToReplyId:f,commentSendCelltime:h,commentVideoCelltime:g}=e,p=(0,t._)(e,["text","textExtra","replyId","replyToReplyId","commentSendCelltime","commentVideoCelltime"]);let I=await (0,s.uo)((0,o._)({awemeId:null==i?void 0:i.awemeId,text:d,textExtra:v,replyId:m,replyToReplyId:f,commentVideoCelltime:g,commentSendCelltime:h},p));return!I.statusCode&&(a.emit(a.EVENT.showClientDownloadGuide,{isShow:!0,type:"comment",text:"及时接收互动消息通知"}),null==_||_.emit(r.Events.USER_ACTION,{action:"comment"}),c.Z.sendLog("post_comment_finish",{enter_from:(0,u.yW)(),group_id:null==i?void 0:i.awemeId,comment_panel_position:"sidebar",comment_id:(null==I?void 0:null===(l=I.comment)||void 0===l?void 0:l.cid)||"",comment_category:(null==I?void 0:null===(n=I.comment)||void 0===n?void 0:n.replyId)==="0"?"original":"reply",play_current_time:Math.floor((null==_?void 0:_.currentTime)||0)})),I},[null==i?void 0:i.awemeId,_]),deleteCommentItem:y,diggCommentItem:w}}},456329:function(e,l,i){i.d(l,{U:function(){return s}}),i(706056),i(679308);var o=i(476595),t=i(72430),n=i(66948),r=i(356336),d=i(982244);let a=(0,d.fF)("CommentPreload"),u=[r.CommentAIPreloadStatus.CommentPreloadHighThreshold,r.CommentAIPreloadStatus.CommentPreloadLowThreshold,r.CommentAIPreloadStatus.CommentPreloadAll],s=e=>{let{isModal:l,awemeInfo:s,isActive:c,fetchComment:v,player:m,commentpreloadAbStatus:f,adCommentpreloadAbStatus:_,scene:h,showSideCard:g,abtestData:p,abUseSimpleNN:I,abVid:C}=e;(0,o.b)(async()=>{if(!!(u.includes(f)&&h===t.lT.Recommend&&!1===l&&!0===c&&(null==m?void 0:m.currentTime)>=0&&!1===g)&&((null==s?void 0:s.isAds)!==!0||!![r.AdCommentAIPreloadStatus.AdCommentPreloadHighThreshold,r.AdCommentAIPreloadStatus.AdCommentPreloadLowThreshold].includes(_))&&"undefined"!=typeof WebAssembly)try{let e=()=>{let e=(null==p?void 0:p.commentRenderOptimize)===2?10:20;v(0,e,"user",{current:null},"",void 0,!0)},l=!(null==s?void 0:s.isAds)&&I,{Pylon:o,EScene:t,EBiz:u}=await i.e("52543").then(i.bind(i,831626)),c=new o({biz:u.DOUYIN_WEB_RECOMMEND}),h=f===r.CommentAIPreloadStatus.CommentPreloadHighThreshold?n.TccKey.CommentPreloadHighThreshold:n.TccKey.CommentPreloadLowThreshold;_===r.AdCommentAIPreloadStatus.AdCommentPreloadHighThreshold?h=n.TccKey.AdCommentPreloadHighThreshold:_===r.AdCommentAIPreloadStatus.AdCommentPreloadLowThreshold&&(h=n.TccKey.AdCommentPreloadLowThreshold),l&&(h=n.TccKey.clientAIOptimizeConfig);let g=await (0,d.aW)(h),w=c.createStrategyEngine({abConfig:g,scene:t.COMMENT});w.setThresholdCallback(async()=>{var i,o,n,r,u,v,f,_;if(d.cy.getPreloadCache(d.mM.COMMENT_BTN_CLICKED))return;let{package:h="",engine_config:p={}}=null!==(f=g.preload_ml)&&void 0!==f?f:{},I=await c.createEngine({scene:t.COMMENT,modelUrl:h,inputs:null==p?void 0:p.inputs,outputs:null==p?void 0:p.outputs,runTime:l?"simplenn":"bytenn"}),y=1e3*((null==m?void 0:m.currentTime)||0),S=I.inference({features:{videoPlayTime:y}}),T=w.hitThresholdValue(S),L=null==g?void 0:null===(i=g.preload_ml)||void 0===i?void 0:i.package,E=null==g?void 0:null===(u=g.preload_ml)||void 0===u?void 0:null===(r=u.output)||void 0===r?void 0:null===(n=r[0])||void 0===n?void 0:null===(o=n.args)||void 0===o?void 0:o[0],k=null!==(_=I.getFeatureVector({features:{scene:t.COMMENT,videoPlayTime:y}}))&&void 0!==_?_:[];if((0,d.zo)(S,T,d.vV.COMMENT_PRELOAD,L,E,k,0,C),a("comment-ret:",S,",hit:",T,", nickname:",null==s?void 0:null===(v=s.authorInfo)||void 0===v?void 0:v.nickname,", playTime: ",y),T){e();return}})}catch(e){a("comment inference error: ",e)}},[c,m])}},315911:function(e,l,i){i.d(l,{Cu:function(){return c},nW:function(){return v}});var o=i(629686),t=i(402748);i(490629);var n=i(101199),r=i(593124);i(426038);var d=i(499059),a=i(414061);i(709705),i(486463),i(37285),i(332009);var u=i(36897);let s=e=>({[r.L.Author]:r.t.Author,[r.L.Mix]:r.t.Mix,[r.L.Series]:r.t.Series,[r.L.Search]:r.t.Search,[r.L.CollectFolder]:r.t.CollectFolder,[r.L.Collection]:r.t.Collection,[r.L.Hot]:r.t.Hot,[r.L.Related]:r.t.Related,[r.L.Search]:r.t.Search,[r.L.Record]:r.t.Record,[r.L.Like]:r.t.Like})[e],c=e=>({[r.t.Author]:r.L.Author,[r.t.Mix]:r.L.Mix,[r.t.Series]:r.L.Series,[r.t.Search]:r.L.Search,[r.t.CollectFolder]:r.L.CollectFolder,[r.t.Collection]:r.L.Collection,[r.t.Hot]:r.L.Hot,[r.t.Related]:r.L.Related,[r.t.Like]:r.L.Like,[r.t.Record]:r.L.Record})[e],v=e=>{let{defaultTab:l,isActive:i,stopAutoPlay:c,awemeInfo:v,abtestData:m,showSideCard:f}=e,{awemeFeed:_}=(0,u.j)(),[h,g]=(0,n.useState)(l),[p,I]=(0,n.useState)(s(h)),[C,w]=(0,n.useState)(()=>{if(s(h))return{[s(h)]:v}}),y=(0,n.useRef)(l),S=(0,n.useRef)(!1);y.current=h;let T=(0,n.useCallback)(e=>{let{tab:l,from:i}=e;if(y.current=l,_.dispatch("cardType",l),void 0!==s(l)&&_.dispatch("feedType",l),g(e=>{var o;return null===(o=d.Le.getConfig(d.gI.IsInLookMiniModal))||void 0===o||o.isInMiniModal,e!==l&&"auto"!==i&&(null==c||c()),l}),l!==r.L.Comment&&a.emit(a.EVENT.changeTab,l),l){let e=d.Le.getConfig(d.gI.PlayerCardInfo);d.Le.setConfig(d.gI.PlayerCardInfo,{isActive:!0,videoCardType:l!==r.L.Comment?l:null==e?void 0:e.videoCardType,expandCardType:l})}},[c]);return(0,n.useEffect)(()=>{i&&l&&g(l)},[i]),(0,n.useEffect)(()=>{h&&I(e=>{if(h===r.L.Comment||h===r.L.AiCard)return(!(null==m?void 0:m.slideOptimize)||f)&&w(l=>(0,t._)((0,o._)({},l),{[e]:v})),e;let l=s(h);return l!==e?l:((!(null==m?void 0:m.slideOptimize)||f)&&w(l=>(0,t._)((0,o._)({},l),{[e]:v})),e)})},[h,v,f]),(0,n.useEffect)(()=>{var e;let l=null===(e=d.Le.getConfig(d.gI.IsInLookMiniModal))||void 0===e?void 0:e.isInMiniModal;l&&(S.current=l),i&&d.Le.setConfig(d.gI.IsInMixCard,!1)},[h,i]),{curTab:h,curTabRef:y,changeTab:T,curVideoFeed:s(h)||p,lastVideoFeedAweme:C}}},826758:function(e,l,i){i.d(l,{Y:function(){return _}}),i(490629);var o=i(101199),t=i(405368),n=i(426112),r=i(762167),d=i(939165),a=i(72878),u=i(375209),s=i(708003),c=i(414061),v=i(442022),m=i(947383),f=i(746517);let _=e=>{let{isActive:l,onOpenCard:i,isLogin:_,accountParentEl:h,awemeInfo:g,onLoginSuccess:p,onCloseCard:I,abtestData:C,toast:w}=e,[y,S]=(0,o.useState)(!1),T=(0,o.useRef)(!1),L=(0,o.useMemo)(()=>(0,t.o4)(g),[g]),E=(0,o.useMemo)(()=>(0,n.Rx)(g),[g]),[k,b]=(0,o.useState)(!1),P=(0,o.useRef)(!1),N=(0,o.useRef)(!0),A=(0,o.useCallback)(e=>{let{from:l}=e||{};b("automatic"===l),!P.current&&"automatic"!==l&&(P.current=!0,c.emit(c.EVENT.videoStopPlayNext,{openSideCard:!0}));let o=()=>{S(!0),(0,v.B1)({tag:"ecom_load_start"}),null==i||i(),L&&(0,r.E)("detail_show",{tag:"landing_ad",value:E.creative_id,log_extra:E.log_extra})};if(_)o();else{var t,n;(0,f.default)({success:async()=>{null==p||p(),o()},headerText:"登录后即可查看商品详情",enterMethod:"product_entrance_click",next:`https://${null===(n=window)||void 0===n?void 0:null===(t=n.location)||void 0===t?void 0:t.host}`},h)}},[S,_,h,i,E,L]);(0,d.o)(()=>{let e=c.listen(c.EVENT.openAdSideCard,e=>{let i=(null==e?void 0:e.from)!=="automatic"||!T.current;if(l&&L&&i){var o,t;let l=null==E?void 0:null===(o=E.lynx_components)||void 0===o?void 0:o.find(e=>(null==e?void 0:e.lynx_type)===a.AD_FEED_TYPE);if(!(null==l?void 0:null===(t=l.lynx_raw_data)||void 0===t?void 0:t.open_url)&&!(null==E?void 0:E.open_url)&&(0,n.Gu)(g)){w?w("广告链接获取失败,请跳过"):s.F.info("广告链接获取失败,请跳过"),(0,r.E)("load_failed",{tag:(0,m.f)(),value:E.creative_id,log_extra:E.log_extra});return}A({from:null==e?void 0:e.from}),(null==e?void 0:e.from)==="automatic"&&(0,r.E)("realtime_click",{tag:(0,m.f)(),value:null==E?void 0:E.creative_id,log_extra:null==E?void 0:E.log_extra,refer:"enter"})}});return()=>e()},[l,g,_,A,E,L]);let x=(0,o.useCallback)(e=>{let{action:l}=e||{};"manual"===l&&(T.current=!0),S(!1),N.current=!1,P.current&&(P.current=!1,c.emit(c.EVENT.videoRemoveStopPlayNext,{openSideCard:!0})),L&&(0,r.E)("close",{tag:(0,m.f)(),value:E.creative_id,log_extra:E.log_extra,content:"ad_detail"}),null==I||I()},[S,L,E,I]);return(0,o.useEffect)(()=>{!l&&y&&x()},[l]),(0,o.useEffect)(()=>{!(0,u.n)(g)&&y&&x()},[g]),{isShowShopDetailSideCard:y,isAutoOpen:k,closeShopDetailCard:x,openShopDetailCard:A,isFirstLoad:N.current}}},412247:function(e,l,i){i.d(l,{B:function(){return m}});var o=i(629686),t=i(402748);i(706056);var n=i(101199),r=i(593124),d=i(72430),a=i(414061),u=i(499059),s=i(264104),c=i(575559),v=i(619770);let m=e=>{let{awemeInfo:l,customProps:i,reportParams:m,fullScreenTarget:f,tab:_,showSideCard:h,player:g,scrollElRef:p,followStatus:I,handleCommentClick:C,isShowRelatedCard:w,isActive:y,isUpperFeed:S=!1,globalIsCommentTrayPushGuideShow:T,globalCommentTrayPushGuideType:L,setCommentTrayPushGuideTypeFunc:E,setIsCommentTrayPushGuideShowFunc:k,onSearchTextClick:b,scene:P}=e,{abtestData:N,userContext:A,insertCommentId:x,tab:R}=i||{},{userInfo:M,dispatch:V}=A||{};(0,n.useEffect)(()=>{var e,l;let i;if(!y)return;w&&(i=setTimeout(()=>a.emit(a.EVENT.feedVideoCardLocateCurrentVideo),0)),w&&[r.L.Comment,r.L.Author].includes(_)&&(null==N?void 0:N.imIsReplaceTab)&&c.J.closeWindow();let{isShow:n,isModal:d,tab:s}=u.Le.getConfig(u.gI.IsSidebarShow)||{},v=(null===(e=u.Le.getConfig(u.gI.IsInLookMiniModal))||void 0===e?void 0:e.isInMiniModal)||!1,m=(null===(l=u.Le.getConfig(u.gI.IsInModalVideo))||void 0===l?void 0:l.isInModal)||!1,f=d!==(m||v)?{tab:s,isShow:void 0}:{tab:s,isShow:n};return u.Le.setConfig(u.gI.IsSidebarShow,{isShow:w,tab:_,isModal:m||v,lastStatus:(0,t._)((0,o._)({},f),{isModal:d})}),a.emit(a.EVENT.changeVideoSideBar,{isShowRelatedCard:w,isShowComment:_===r.L.Comment,lastStatus:f}),()=>{clearTimeout(i)}},[w,_]);let F=(0,n.useMemo)(()=>({awemeInfo:l,sense:"slider_video",onCloseClick:()=>{},onCollapseClick:()=>{},userContext:A,abtestData:N,changeLoginStatus:()=>{V({type:"updateUserInfo"})},logParams:m}),[l,A,V,m,N]),{fetchComment:D,fetchReply:j,fetchCommentMention:B,deleteCommentItem:O,publishCommentItem:U,diggCommentItem:W}=(0,v.x)({awemeInfo:l,player:g});return{authorConfig:F,commentConfig:{abtestData:N,fullScreenTarget:f,isDetail:!1,isShowComment:_===r.L.Comment&&h,total:0,onCloseCommentClick:C,awemeInfo:l,awemelogPb:null==l?void 0:l.logPb,userInfo:M,scrollContainerEl:null==p?void 0:p.current,player:g,shortcutMode:null==N?void 0:N.shortcutMode,fetchComment:D,fetchReply:j,fetchEmoticonGif:s.D2,fetchCommentMetionList:B,diggCommentItem:W,deleteCommentItem:O,puhlishCommentItem:U,count:(null==N?void 0:N.commentRenderOptimize)===2?10:20,defaultommentList:[],defaultCursor:0,defaultHotsoonHasMoreRef:0,defaultHasMore:!0,defaultStatusCode:0,defaultCommentId:S?"":x,isNeedCommentInput:!0,changeLoginStatus:()=>{V({type:"updateUserInfo"})},reportExtraParams:(0,t._)((0,o._)({},m),{relation:String(I)}),dispatch:V,globalIsCommentTrayPushGuideShow:T,globalCommentTrayPushGuideType:L,setCommentTrayPushGuideTypeFunc:E,setIsCommentTrayPushGuideShowFunc:k,tab:R,onSearchTextClick:b,isSearch:P===d.lT.Search}}}},73053:function(e,l,i){let o;i.d(l,{Z:function(){return oH}});var t=i("629686"),n=i("320165"),r=i("101199"),d=i("402748"),a=i("811603");i("679308"),i("706056"),i("490629"),i("968336"),i("656562"),i("992871"),i("414931"),i("76375"),i("112459"),i("759943");var u=i("116537"),s=i("469935"),c=i.n(s),v=i("855436"),m=i("350856"),f=i.n(m),_=i("473228"),h=i("280647"),g=i("339808"),p=i("734123"),I=i("72430"),C=i("638052"),w=i("593124"),y=i("206698"),S=i("426112"),T=i("967139"),L=i("690301"),E=i("499889"),k=i("855357"),b=i("939165"),P=i("405368"),N=i("905010"),A=i("988736"),x=i("540129"),R=i("414800"),M=i("778018"),V=i("119778"),F=i("759894"),D=i("414061"),j=i("995898"),B=i("335948"),O=i("573031"),U=i("601034"),W=i("880327"),G=i("499059"),H=i("474221"),Z=i("810069"),K=i("273372"),$=i("988381"),z=i("889429"),Y=i("618759"),q=i("795653"),J=i("31992"),X=i("649310"),Q=i("636081"),ee=i("195446"),el=i("459699"),ei=i("558337"),eo=i("486463"),et=i("365169"),en=i("448797"),er=i("682445"),ed=i("913285"),ea=i("587554");let eu=(0,v.ZP)(()=>i.e("2787").then(i.bind(i,181142)),{ssr:!1}),es=(0,v.ZP)(()=>i.e("78498").then(i.bind(i,676330)),{ssr:!1}),ec=(0,v.ZP)(()=>Promise.all([i.e("23634"),i.e("21133"),i.e("77772")]).then(i.bind(i,697730)),{ssr:!1}),ev=(0,r.lazy)(()=>(Date.now(),(0,ea.At)().loadRemote("@dygame-pc/game-prefix/track").then(e=>({default:e.Track})).catch(e=>({default:()=>null})))),em=(0,r.memo)(ev),ef=e=>{let{children:l,className:i,componentName:o,abtestData:t}=e;return(0,n.jsx)("div",{id:"videoSideCard",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,i,er.default.noDrag,{"isDark dark":!(null==t?void 0:t.newThemeColor)}),onWheel:e=>e.stopPropagation(),ref:e=>{(0,z.G6)()&&e&&!e.onwheel&&(e.onwheel=e=>{e.stopPropagation()})},children:(0,n.jsx)(ed.k,{componentName:o,children:l})})};var e_=r.memo(e=>{var l;let{abtestData:i,awemeInfo:o,userInfo:t,isClientMiniWin:d,isWebMiniWin:a,isActive:u,player:s,douPlusCtr:v,sodaCtr:m,gameCtr:f}=e;return(0,n.jsxs)(n.Fragment,{children:[v.isShow&&(0,n.jsx)(ef,{className:c()({[er.default.displayNone]:d}),componentName:"DouPlusCard",abtestData:i,children:(0,n.jsx)(eu,{awemeInfo:o,userInfo:t,close:v.close,entranceSeq:v.seq})}),m.isShow&&(0,n.jsx)(ef,{className:c()({[er.default.displayNone]:d,[er.default.sideBarSoda]:!0}),componentName:"SodaCard",children:(0,n.jsx)(ec,{abtestData:i,awemeInfo:o,player:s,isActive:u,isMiniWin:a||d,close:m.close})}),(0,n.jsx)("div",{style:{display:"none"},children:(0,n.jsx)(ed.k,{componentName:"GameTrack",children:(0,n.jsx)(r.Suspense,{children:(0,n.jsx)(em,{isActive:u})})})}),f.isShow&&(0,n.jsx)(ef,{className:c()({[er.default.displayNone]:d}),componentName:"GameCard",children:(0,n.jsx)(es,{awemeInfo:o,userInfo:t,close:f.close,openUrl:(null==o?void 0:null===(l=o.anchorInfo)||void 0===l?void 0:l.openUrl)||"",showCloseBtn:!0})})]})}),eh=i("65229"),eg=i("498714"),ep=i("887736"),eI=i("338214"),eC=i("771410"),ew=i("396868"),ey=i("983218"),eS=i("185498");let eT=e=>{let{player:l,abTestData:i,awemeInfo:o,chapterScrollElRef:t,topLevelSidebar:n,activateCard:d,resetClosingShopRef:a,isActive:u,isInnerFeed:s}=e,[c,v]=(0,r.useState)(-1),[m,f]=(0,r.useState)(!1),_=(0,r.useRef)(""),h=(0,r.useRef)(!0),g=null==o?void 0:o.chapterInfo,p=e=>{null==e||e.stopPropagation()};return(0,r.useEffect)(()=>{if((null==l?void 0:l.on)&&(null==g?void 0:g.status)){let e=e=>{var l;let i=(null!==(l=e.currentTime)&&void 0!==l?l:0)*1e3,{list:o}=g,t=o.map(e=>e.timestamp),n=-1;for(let e=0;e<t.length;e++)i>=t[e]&&(n=e);v(n)};return l.on("timeupdate",e),()=>{l.off("timeupdate",e)}}},[l,i,g]),(0,r.useEffect)(()=>{let e=s&&_.current!==(null==o?void 0:o.awemeId);if(t.current||e){var l;return null===(l=t.current)||void 0===l||l.addEventListener("wheel",p),()=>{var e;null===(e=t.current)||void 0===e||e.removeEventListener("wheel",p)}}},[t,u,o,s]),(0,r.useEffect)(()=>{if(s&&_.current!==(null==o?void 0:o.awemeId)){var e;f(!1),_.current=null!==(e=null==o?void 0:o.awemeId)&&void 0!==e?e:""}},[o,s]),{chapterProgress:c,chapterSliderShow:m,setChapterSliderShow:f,triggerChapterSliderShow:()=>{if(!!h.current){if(h.current=!1,setTimeout(()=>{h.current=!0},500),m&&"sidebar"===n){d("chapterSidebar");return}!m&&a(),f(!m)}}}};var eL=i("847742"),eE=i("609555"),ek=i("36897");let eb=e=>{let{scene:l,originAwemeInfo:i,canUseListenFeed:o,isActive:t}=e,[n,d]=(0,r.useState)(0),[a,u]=(0,r.useState)([i]),s=(0,r.useRef)(1),c=(0,r.useRef)(!1),v=(0,r.useRef)(0),m=(0,r.useRef)(null),{awemeFeed:f}=(0,ek.j)(),{isListenVideoMiniWin:_}=(0,et.Iq)(e=>{let{isListenVideoMiniWin:l}=e;return{isListenVideoMiniWin:l}});return(0,h.Z)(()=>{!_&&(u([i]),d(0),v.current=0,s.current=1,f.dispatch({listenPrevAwemeInfo:null,listenNextAwemeInfo:null}),m.current=null,c.current=!1)},[_]),(0,r.useEffect)(()=>{if(!!_&&!!o&&!!t)(async()=>{if(4>=Math.abs(a.length-n)&&!c.current){c.current=!0;let e=await (0,eL.v6)({count:10,refreshIndex:s.current,scene:l});if(c.current=!1,0===e.statusCode&&0!==e.awemeList.length)s.current+=1,u(l=>{let i=e.awemeList.filter(e=>(0,eE.P)(e)).filter(e=>!l.find(l=>l.awemeId===e.awemeId));return 1===l.length&&(f.dispatch({listenNextAwemeInfo:i[0]}),m.current=i[0]),[...l,...i]})}})()},[_,t]),{listenVideoFeedIndex:n,changeListenVideoFeedIndex:(0,r.useCallback)(async e=>{let{newIndex:i,changeMode:o}=e,t=async e=>{if(4>=Math.abs(a.length-e)&&!c.current){c.current=!0;let e=await (0,eL.v6)({count:10,refreshIndex:s.current,scene:l});if(c.current=!1,0===e.statusCode&&0!==e.awemeList.length)s.current+=1,u(l=>{let i=e.awemeList.filter(e=>(0,eE.P)(e)).filter(e=>!l.find(l=>l.awemeId===e.awemeId)),o=[...l,...i];return v.current===l.length-1&&!m.current&&(f.dispatch({listenNextAwemeInfo:o[v.current+1]||null,listenPrevAwemeInfo:o[v.current-1]||null}),m.current=o[v.current+1]||null),o})}};if(void 0!==i){f.dispatch({listenPrevAwemeInfo:a[i-1]||null,listenNextAwemeInfo:a[i+1]||null}),d(i),v.current=i,await t(i);return}"incr"===o?d(e=>{let l=Math.min(e+1,a.length-1);return v.current=l,t(l),f.dispatch({listenPrevAwemeInfo:a[l-1]||null,listenNextAwemeInfo:a[l+1]||null}),m.current=a[l+1]||null,l}):"decr"===o&&d(e=>{let l=Math.max(e-1,0);return v.current=l,f.dispatch({listenPrevAwemeInfo:a[l-1]||null,listenNextAwemeInfo:a[l+1]||null}),m.current=a[l+1]||null,l})},[d,a,f])}};var eP=i("431493"),eN=i("157762"),eA=i("63601");let ex=e=>{let l=(0,eA.n)(),{onPlayer:i}=e;return(0,r.useEffect)(()=>{l&&(null==i||i(l))},[l]),null};var eR=i("5784"),eM=i.n(eR),eV=i("908219"),eF=i.n(eV),eD=i("311507"),ej=i("982244"),eB=i("954026");let eO=e=>{var l,i,o;let{originAwemeInfo:t,player:n,toast:d,isActive:a,isLast:u,modalEnterFrom:s,handleNextOnLast:c,handleOuterPlayNext:v,handleOuterPlayPrev:m,handlePrev:_,handleNext:g,isInnerFeedCondition:p,scene:C,abtestData:y,canUseListenFeed:S,changeListenVideoFeedIndex:T}=e,{isListenVideoMiniWin:L,fullScreenQuestionVars:E}=(0,et.Iq)(e=>{let{isListenVideoMiniWin:l,fullScreenQuestionVars:i}=e;return{isListenVideoMiniWin:l,fullScreenQuestionVars:i}}),[k,b]=(0,r.useState)(t),{awemeFeed:P}=(0,ek.j)(),[N,A]=(0,r.useState)(null),[x,R]=(0,r.useState)(null),[M,V]=(0,r.useState)(null),[F,j]=(0,r.useState)(null),B=(0,r.useMemo)(()=>{var e,l,i;return null!==(i=null==y?void 0:null===(l=y.swiperOptimizeThrottle)||void 0===l?void 0:null===(e=l.basic)||void 0===e?void 0:e.delay)&&void 0!==i?i:400},[y]);(0,r.useEffect)(()=>{var e;if((null==y?void 0:null===(e=y.authorOptimize)||void 0===e?void 0:e.render)&&!a)return;let l=P.subscribe("prevAwemeInfo",e=>{A(e)}),i=P.subscribe("nextAwemeInfo",e=>{R(e)}),o=P.subscribe("listenPrevAwemeInfo",e=>{V(e)}),t=P.subscribe("listenNextAwemeInfo",e=>{j(e)});return()=>{o(),t(),l(),i()}},[a]);let[O,U]=(0,r.useState)((null==t?void 0:null===(l=t.logParams)||void 0===l?void 0:l.enter_from)||""),W=(0,r.useRef)({});(0,r.useEffect)(()=>{var e,l,i,o;((null==k?void 0:k.awemeId)!==(null==t?void 0:t.awemeId)||(null==k?void 0:null===(e=k.authorInfo)||void 0===e?void 0:e.uid)!==(null==t?void 0:null===(l=t.authorInfo)||void 0===l?void 0:l.uid)||(null==k?void 0:null===(i=k.authorInfo)||void 0===i?void 0:i.roomId)!==(null==t?void 0:null===(o=t.authorInfo)||void 0===o?void 0:o.roomId))&&b(t)},[t,p]);let H=null!=p?p:t.awemeId!==k.awemeId;G.Le.setConfig(G.gI.IsInnerFeed,H);let Z=(0,r.useCallback)(e=>{var l,i,o,n;let{inComingAwemeInfo:r,card:d}=e;if(d){let e=G.Le.getConfig(G.gI.PlayerCardInfo);G.Le.setConfig(G.gI.PlayerCardInfo,{isActive:(null==r?void 0:r.awemeId)===(null==t?void 0:t.awemeId)||a,videoCardType:d!==w.L.Comment?d:null==e?void 0:e.videoCardType,expandCardType:"chat"===d?null==e?void 0:e.expandCardType:d})}if((null==r?void 0:r.awemeId)!==(null==k?void 0:k.awemeId)||(null==r?void 0:null===(l=r.seriesInfo)||void 0===l?void 0:l.seriesId)!==(null==k?void 0:null===(i=k.seriesInfo)||void 0===i?void 0:i.seriesId)||(null==r?void 0:null===(o=r.authorInfo)||void 0===o?void 0:o.uid)!==(null==k?void 0:null===(n=k.authorInfo)||void 0===n?void 0:n.uid)||"im"===s)eM()(r,"logPb",(null==r?void 0:r.scrollLogPb)||(null==r?void 0:r.logPb)),b(e=>(P.dispatch("innerFeedAwemeInfo",r),U(l=>{var i,o,t,n,d;return(null===(i=r.logParams)||void 0===i?void 0:i.enter_from)?r.logParams.enter_from:"author_compilation_card"===l&&(null===(o=e.mixInfo)||void 0===o?void 0:o.mixId)!==(null===(t=r.mixInfo)||void 0===t?void 0:t.mixId)||"author_playlet_card"===l&&(null===(n=e.seriesInfo)||void 0===n?void 0:n.seriesId)!==(null===(d=r.seriesInfo)||void 0===d?void 0:d.seriesId)?"":l}),r)),setTimeout(()=>{D.emit(D.EVENT.feedVideoCardLocateCurrentVideo)})},[k,null==t?void 0:t.awemeId,n,y]);(0,h.Z)(()=>{a&&D.emit(D.EVENT.videoChange)},[k,a]),(0,h.Z)(()=>{!H&&G.Le.setConfig(G.gI.PlayerCardInfo,null)},[H]),(0,h.Z)(()=>{a&&n&&(n.replayed=!1,C===I.lT.Recommend&&!p&&(0,ej.Ci)())},[k,a,n]);let K=e=>{var l,i,o,t;if(!a||(null!==(o=(0,eo.OB)())&&void 0!==o?o:null===(i=window)||void 0===i?void 0:null===(l=i.__QUICK_PLAYER)||void 0===l?void 0:l.playerId)!==(null==n?void 0:n.playerId)||eB.f.playNextInterceptor(E))return;let r=null==e?void 0:e.from;(0,eD.Y3)(r);let s=()=>{D.emit(D.EVENT.reportPlayNext,{clickFrom:r})};if(H||C===I.lT.Search){let e=null===(t=G.Le.getConfig(G.gI.PlayerCardInfo))||void 0===t?void 0:t.videoCardType,l=new Map([[w.L.Related,"该视频暂无更多相关作品"],[w.L.Music,"该音乐暂无更多相关作品"],[w.L.Topic,"该话题暂无更多相关作品"],[w.L.Mix,"暂无更多作品"],[w.L.Author,"该作者已无更多作品"],[w.L.Comment,"暂无更多作品"],[w.L.CollectFolder,"暂无更多作品"],[w.L.Search,"暂无更多搜索结果"],[w.L.Like,"暂无更多作品"],[w.L.Collection,"暂无更多作品"],[w.L.Record,"暂无更多作品"]]),i=new Map([[w.L.Related,"暂时无法切换,可查看其他相关视频"],[w.L.Music,"暂时无法切换,可查看其他音乐视频"],[w.L.Topic,"暂时无法切换,可查看其他话题视频"],[w.L.Mix,"暂时无法切换"],[w.L.Author,"暂时无法切换,可查看作者的其他视频"],[w.L.Comment,"暂时无法切换"],[w.L.CollectFolder,"暂时无法切换"],[w.L.Search,"暂时无法切换,请在「搜索结果」中选择"],[w.L.Like,"暂时无法切换"],[w.L.Collection,"暂时无法切换"],[w.L.Record,"暂时无法切换"]]);if(x)Z({inComingAwemeInfo:x,card:e}),("scroll"===r||"keyboard"===r||"auto"===r||L&&"click_button"===r)&&s();else if("auto"===r)n&&(n.isReplay=!0,n.replay(),n.replayed=!0);else if(null===x){let l=i.get(e);l&&d(l)}else{let i=l.get(e);i&&d(i)}}else L&&!H&&S?F&&(b(F),T({changeMode:"incr"}),("scroll"===r||"keyboard"===r||"auto"===r||"click_button"===r)&&s()):(u&&(null==c||c()),v(e),u&&(null==e?void 0:e.from)==="auto"&&n&&(n.isReplay=!0,n.replay(),n.replayed=!0));null==g||g()},$=(0,r.useCallback)((null==y?void 0:null===(i=y.swiperOptimizeThrottle)||void 0===i?void 0:i.basic.logic)?eF()(K,B,{leading:!0,trailing:!1}):f()(K,B,{leading:!0,trailing:!1}),[y,B,F,x,n,a,c,H,u,v,L,T,S,E]),z=e=>{if(!a||eB.f.playPrevInterceptor(E))return;let l=null==e?void 0:e.from,i=()=>{D.emit(D.EVENT.reportPlayPrev,{clickFrom:l})};if((0,eD.Y3)(l),H){var o;let e=null===(o=G.Le.getConfig(G.gI.PlayerCardInfo))||void 0===o?void 0:o.videoCardType,t=new Map([[w.L.Related,"暂时无法切换,可查看其他相关视频"],[w.L.Music,"暂时无法切换,可查看其他音乐视频"],[w.L.Topic,"暂时无法切换,可查看其他话题视频"],[w.L.Mix,"暂无无法切换"],[w.L.Author,"暂时无法切换,可查看作者的其他视频"],[w.L.Search,"暂无无法切换"]]);if(N)Z({inComingAwemeInfo:N,card:e}),("scroll"===l||"keyboard"===l||"auto"===l||L&&"click_button"===l)&&i();else if(null===N){let l=t.get(e);l&&d(l)}}else L&&!H&&S?M&&(b(M),T({changeMode:"decr"}),("scroll"===l||"keyboard"===l||"auto"===l||"click_button"===l)&&i()):setTimeout(()=>null==m?void 0:m(e),0);null==_||_()},Y=(0,r.useCallback)((null==y?void 0:null===(o=y.swiperOptimizeThrottle)||void 0===o?void 0:o.basic.logic)?eF()(z,B,{leading:!0,trailing:!1}):f()(z,B,{leading:!0,trailing:!1}),[y,B,M,N,a,H,m,T,L,S,E]);return{listenFeedPrevAwemeInfo:M,listenFeedNextAwemeInfo:F,awemeInfo:k,enterFrom:O,updateAwemeInfo:Z,changePrevVideo:Y,changeNextVideo:$,nextAwemeInfo:x,prevAwemeInfo:N,isInnerFeed:H,updateLogParams:(0,r.useCallback)(e=>{let{logParams:l}=e;W.current=l},[])}};var eU=i("120701"),eW=i("870327");let eG=e=>{let{abtestData:l,isModal:i,awemeInfo:o,isActive:t,fetchAuthorPost:n,player:d,scene:a}=e,[u,s]=(0,r.useState)(0);return(0,r.useEffect)(()=>{var e,r,d;if(!(!(0,z.km)(80)&&(0,z.i7)())||!t||i||a!==I.lT.Recommend||(null===(e=l.smartDataTrackConfig)||void 0===e?void 0:e.scene)!==eU.P.AUTHOR_CARD_PRELOAD||0!==u||(null==o?void 0:o.isAds))return;let c=null===(r=(0,eW.lZ)())||void 0===r?void 0:r.getSceneByName(eU.P.AUTHOR_CARD_PRELOAD);if(c){let e=setTimeout(async()=>{var e;null==c||null===(e=c.inference(null==o?void 0:o.awemeId))||void 0===e||e.then(e=>{e&&(s(2),n(o),s(3))})},null===(d=l.authorCardPreload)||void 0===d?void 0:d.wait_time);return()=>{clearTimeout(e),e=null}}},[t,a,l,i]),{preloadStatus:u}};i("559352"),i("374954");var eH=i("263832"),eZ=i("202613"),eK=i("488721"),e$=i("728810"),ez=i("56554"),eY=i("816565"),eq=i("356336"),eJ=i("678532");let eX=e=>{var l,i;let{showRelateVideo:o=eH.TP.ShowSideCarOnly}=(null==e?void 0:null===(i=e.webRawData)||void 0===i?void 0:null===(l=i.CTR)||void 0===l?void 0:l.recommendScore)||{};return o===eH.TP.ShowSideCarOnly},eQ=e=>{let{awemeInfo:l,scene:i,modalEnterFrom:o,filterData:t,currentVideoFeedRef:n,lastVideoFeedAwemeRef:d,outFeedItem:a,isInnerFeed:u,abtestData:s,isLogin:c}=e,v=[],{normalList:m,relatedBlockedByRecommendScore:f}=(0,r.useMemo)(()=>{var e,t,r,c,v;let m=[w.L.Comment],f=!1;if((null==l?void 0:l.awemeType)!==(null==eZ?void 0:k.e.XgVideo)&&!(0,S.Jt)(l)&&!(0,S.gc)(l)&&m.unshift(w.L.Author),"collection_folder"===o)m.unshift(w.L.CollectFolder);(null==l?void 0:l.awemeType)!==(null==eZ?void 0:k.e.XgVideo)&&!(0,S.Jt)(l)&&!(0,S.gc)(l)&&m.unshift(w.L.VideoDetail);let _=[I.lT.Recommend,I.lT.Follow,I.lT.Topic].includes(i),h=i===I.lT.Modal&&![y.a.Im,y.a.Search,y.a.GeneralSearch].includes(o),g=[S.Jt,S.gc,S.Kf,eK.L,e$.A,ez.u,T.p,eY.hj,P.o4],p=Number(null==s?void 0:s.aiSummary)>eq.AiSummaryType.V0,C=()=>{var e,i,o;(null==l?void 0:null===(e=l.mixInfo)||void 0===e?void 0:e.mixId)&&!(null==l?void 0:null===(i=l.seriesInfo)||void 0===i?void 0:i.seriesId)&&m.push(w.L.Mix),(null==l?void 0:null===(o=l.seriesInfo)||void 0===o?void 0:o.seriesId)&&m.push(w.L.Series)};return p&&C(),p&&(null==l?void 0:l.awemeType)!==(null==eZ?void 0:k.e.XgVideo)&&(0,eJ.gs)(l)&&!(0,z.km)(80)&&m.push(w.L.AiCard),(_||h)&&g.every(e=>!e(l))&&(!u||(null==a?void 0:a.awemeId)===l.awemeId&&g.every(e=>!e(a))||(null===(t=d.current)||void 0===t?void 0:null===(e=t[w.t.Related])||void 0===e?void 0:e.awemeId)===l.awemeId||n.current===w.t.Related)&&(eX(u?a:l)?m.push(w.L.Related):f=!0),!p&&C(),(null==l?void 0:l.hotList)&&(null==l?void 0:null===(r=l.hotList)||void 0===r?void 0:r.rank)!==51&&(null==l?void 0:null===(c=l.hotList)||void 0===c?void 0:c.type)!==2&&m.push(w.L.Hot),(null==l?void 0:l.videoAbstract)&&[2,3].includes(null==l?void 0:null===(v=l.videoAbstract)||void 0===v?void 0:v.displayType)&&(i===I.lT.Search||I.lT.Modal===i&&[y.a.GeneralSearch,y.a.Search].includes(o)&&!u)&&m.push(w.L.AbstractList),{normalList:m,relatedBlockedByRecommendScore:f}},[l,o,i,n.current,a,u,d.current]);return[I.lT.Recommend,I.lT.Follow,I.lT.Friend,I.lT.Modal,I.lT.Topic,I.lT.Search].includes(i)&&(v=m),{showRelatedTabList:(0,r.useMemo)(()=>t?t(v):v,[v.join(","),t]),relatedBlockedByRecommendScore:f}},e0=e=>{let{awemeInfo:l,clickedCard:i,isActive:o,withCtr:t=!0}=e;return(0,r.useEffect)(()=>{let e=G.Le.getConfig(G.gI.PlayerCardInfo);return i&&G.Le.setConfig(G.gI.PlayerCardInfo,{isActive:o,videoCardType:i!==w.L.Comment?i:null==e?void 0:e.videoCardType,expandCardType:i}),()=>{G.Le.setConfig(G.gI.PlayerCardInfo,null)}},[]),{defaultCard:(0,r.useMemo)(()=>i?i:l?t&&l.awemeType===k.e.XgVideo?w.L.Related:w.L.Author:w.L.Author,[l,t,i])}};var e1=i("916046");let e2=e=>{let{isLogin:l,uid:i,showRelatedTabList:o,isJingxuan:t,abtestData:n}=e,d=[eq.AiSummaryType.V3,eq.AiSummaryType.V5].includes(Number(null==n?void 0:n.aiSummary)),a=(0,r.useMemo)(()=>!!(t&&l&&d),[t,l,d]),u=(0,r.useMemo)(()=>"undefined"==typeof window||window.innerWidth>=1200,[]),s=(0,r.useMemo)(()=>(0,e1.gg)(i),[i]),c=(0,r.useMemo)(()=>a&&u&&!s&&o.includes(w.L.AiCard),[a,u,s,o]);return(0,r.useEffect)(()=>{if(!l)return},[i,t,l,a,u,s,o,c]),{isEnabled:a,autoOpenAiTab:c}};var e3=i("59850");let e5=e=>{let{isShow:l,player:i,isActive:o,awemeInfo:t,abtestData:n}=e,d=(0,r.useRef)(!1),a=(0,r.useRef)(()=>{});a.current=(0,r.useCallback)(()=>{d.current&&(setTimeout(()=>{D.emit(D.EVENT.videoRemoveStopPlayNext)}),d.current=!1)},[i]);let u=(0,e3.Z)(()=>{i&&o&&i.duration-i.currentTime>0&&i.duration-i.currentTime<=5&&!d.current&&l&&(null==t?void 0:t.awemeType)!==k.e.Note&&(D.emit(D.EVENT.videoStopPlayNext),d.current=!0,i.once(p.Events.ENDED,a.current))});return(0,r.useEffect)(()=>{if(l)return()=>{a.current()}},[l]),(0,r.useEffect)(()=>{if(t)return()=>{a.current()}},[t]),{stopAutoPlay:u}};var e6=i("315911");let e4=e=>{let{awemeInfo:l,onAwemeInfoChange:i}=e;(0,r.useEffect)(()=>{var e;(null===(e=G.Le.getConfig(G.gI.IsInModalVideo))||void 0===e?void 0:e.isInModal)&&D.emit(D.EVENT.livePause)},[]),(0,r.useEffect)(()=>{null==i||i({awemeInfo:l})},[l])},e9=e=>{let{curTab:l,isActive:i,modalAwemeInfo:o,showRelatedTabList:t,showSideCard:n}=e,{setSlideVideoTab:d,slideVideoTab:a}=(0,r.useContext)(X.C);(0,r.useEffect)(()=>{var e;if(!!i&&(a!==w.L.AiCard||l===w.L.AiCard||!!(null==t?void 0:null===(e=t.includes)||void 0===e?void 0:e.call(t,w.L.AiCard))))null==d||d(l)},[l,i,null==o?void 0:o.awemeId,a,t,n])},e8=e=>{let{onChangeAwemeInfo:l}=e,i=(0,e3.Z)(function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.L.Author;return l({inComingAwemeInfo:e,card:i})});return{handleAuthorVideoChange:i,handleOtherVideoChange:(0,r.useCallback)(function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.L.Related;l({inComingAwemeInfo:e,card:i})},[l])}};var e7=i("619770"),le=i("456329"),ll=i("375209"),li=i("205030"),lo=i("72878"),lt=i("295207"),ln=i("386206"),lr=i("335924"),ld=i("853344"),la=i("336808"),lu=i("800513"),ls=i("55938");let lc=e=>{let{awemeInfo:l,logParams:i={},originAwemeInfo:o,tagId:n,expandCard:a,curCard:u="",isInnerFeedCondition:s=!1,searchSideCardProps:c,modalEnterFrom:v}=e,m=(0,r.useRef)(i),f=(0,r.useMemo)(()=>{var e,i,o;return null!==(o=null===(i=G.Le.getConfig(G.gI.UnLookVideos))||void 0===i?void 0:null===(e=i[null==l?void 0:l.awemeId])||void 0===e?void 0:e.status)&&void 0!==o?o:""},[l]);return(0,r.useEffect)(()=>{var e,r,_,h,g,p,I,C,T,E,b,P,N,A,x,R,M,V,F,D,j,B,O,W,Z,K,$,z,Y,q;let J=null==i?void 0:i.enter_from,X="";""!==u&&(X=u===a&&"comment"!==u?"1":"0");let Q={};if((0,ll.n)(l)){let e=(null==l?void 0:null===(Z=l.anchorInfo)||void 0===Z?void 0:null===(W=Z.extra)||void 0===W?void 0:W[0])||{};Q={anchor_product_comment_cnt:e.comment_count,anchor_product_category_id:e.front_category_id,anchor_product_price:e.price,anchor_product_sales:e.sales}}let ee=(0,d._)((0,t._)((0,d._)((0,t._)((0,d._)((0,t._)({enter_from:null!==(K=i.enter_from)&&void 0!==K?K:(0,U.yW)(),web_rid:null==l?void 0:null===(_=l.authorInfo)||void 0===_?void 0:null===(r=_.roomData)||void 0===r?void 0:null===(e=r.owner)||void 0===e?void 0:e.web_rid},i),{is_card_expand:X,from_group_id:null!==($=i.from_group_id)&&void 0!==$?$:null==o?void 0:o.awemeId,music_id:null==l?void 0:null===(h=l.music)||void 0===h?void 0:h.mid,compilation_id:null==l?void 0:null===(g=l.mixInfo)||void 0===g?void 0:g.mixId,tag_id:n,from_xigua:(null==l?void 0:l.awemeType)===k.e.XgVideo?1:0,insert_task_id:(null==l?void 0:l.libfinsertTaskId)||"0",boost_task_id:(null==l?void 0:l.boostTaskId)||"",enter_from_merge:null!==(z=i.enter_from_merge)&&void 0!==z?z:(0,U.yW)(),search_params:null==l?void 0:l.searchLogParams,from_video_id:G.Le.getConfig(G.gI.PageEnterFromVideoID),is_seen:v===y.a.FollowAuthorModal&&""===f?1:f,is_update:(null===(p=G.Le.getConfig(G.gI.UnLookVideos))||void 0===p?void 0:p[null==l?void 0:l.awemeId])?1:0,post_time:(0,ln.MH)(1e3*l.createTime),is_from_skylight:null!==(Y=null==i?void 0:i.is_from_skylight)&&void 0!==Y?Y:0}),(0,H.t)()),{is_co_publish:(null==l?void 0:null===(C=l.cooperationInfo)||void 0===C?void 0:null===(I=C.cooperationCreators)||void 0===I?void 0:I.length)>1?1:0,co_publish_author_list:null==l?void 0:null===(b=l.cooperationInfo)||void 0===b?void 0:null===(E=b.cooperationCreators)||void 0===E?void 0:null===(T=E.filter(e=>e.roleId!==li.iG.Author))||void 0===T?void 0:T.map(e=>`${e.uid}_${null==e?void 0:e.roleId}`),cid:null===(P=(0,S.Rx)(l))||void 0===P?void 0:P.creative_id,if_qianchuan_ad:(0,S.nT)(l)===L.Z9.Live||(0,S.nT)(l)===L.Z9.ShopVideo?1:0,ad_type:(0,S.nT)(l),brand_ad_type:lo.AD_LOG_MAP[null==l?void 0:null===(A=l.webRawData)||void 0===A?void 0:null===(N=A.brandAd)||void 0===N?void 0:N.brand_type]}),(null==l?void 0:l.logParams)||{},Q),{playlet_id:null==l?void 0:null===(x=l.seriesInfo)||void 0===x?void 0:x.seriesId,is_trailer:(null==l?void 0:null===(M=l.chargeInfo)||void 0===M?void 0:null===(R=M.preview_config)||void 0===R?void 0:R.is_preview)?1:0,module:decodeURIComponent((0,lr.Rs)("module")||""),payment_status:(0,lu.wQ)(l),episode_rank:(null==l?void 0:null===(V=l.seriesInfo)||void 0===V?void 0:V.currentEpisode)||(null==l?void 0:null===(F=l.mixInfo)||void 0===F?void 0:F.currentEpisode)||0,episode_id:String((null==l?void 0:null===(D=l.seriesInfo)||void 0===D?void 0:D.currentEpisode)||(null==l?void 0:null===(j=l.mixInfo)||void 0===j?void 0:j.currentEpisode)||0),is_charge_content:(null==l?void 0:null===(B=l.chargeInfo)||void 0===B?void 0:B.is_charge_content)?1:0,is_hard_ad:(0,S.Jt)(l)?(0,S.Gu)(l)?1:0:void 0,is_ting_window:ls.e.activeScene===lt.d.ListenVideo?1:0,is_from_aweme_search_engine:(0,ld.V)()?1:0}),el=[w.L.Author,w.L.Hot,w.L.Mix,w.L.Music,w.L.Related,w.L.Topic,w.L.AwemeRelated,w.L.Search,w.L.History,w.L.Like,w.L.CollectFolder,w.L.Collection,w.L.Handpick];if(null!=s?s:(null==o?void 0:o.awemeId)!==(null==l?void 0:l.awemeId)){if(el.includes(u))J=u;else{if(u===w.L.Comment){let e=G.Le.getConfig(G.gI.PlayerCardInfo),l=G.Le.getConfig(G.gI.CurLookCard);J=(null==l?void 0:l.curCard)?null==l?void 0:l.curCard:(null==e?void 0:e.isActive)&&(null==e?void 0:e.videoCardType)?null==e?void 0:e.videoCardType:null==i?void 0:i.enter_from}m.current=(0,t._)({},ee)}}(null==c?void 0:c.scene)&&(null==o?void 0:o.awemeId)!==(null==l?void 0:l.awemeId)&&!s&&(J=(0,la.V)(null==c?void 0:c.scene,l,null==i?void 0:null===(q=i.search_params)||void 0===q?void 0:q.token_type),G.Le.setConfig(G.gI.PlayerCardInfo,{videoCardType:J,expandCardType:J,isActive:!0})),(null==l?void 0:null===(O=l.logParams)||void 0===O?void 0:O.enter_from)?m.current=(0,d._)((0,t._)({},ee),{enter_from:l.logParams.enter_from}):J?m.current=(0,d._)((0,t._)({},ee),{enter_from:J}):m.current=(0,t._)({},ee)},[i,u,a,l,o,n,f,s]),{reportParams:m.current}},lv=e=>{let{isActive:l,player:i,showSideCard:o}=e,[t,n]=(0,r.useState)(!1),d=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{var e,t;let r;d.current?l&&o&&n(!0):r=setTimeout(()=>{l&&o&&n(!0)},3e3);let a=()=>{d.current=!0,clearTimeout(r),o&&n(!0)};return null==i||null===(e=i.on)||void 0===e||e.call(i,p.Events.CANPLAY,a),null==i||null===(t=i.once)||void 0===t||t.call(i,p.Events.TIME_UPDATE,a),()=>{var e,l;null==i||null===(e=i.off)||void 0===e||e.call(i,p.Events.CANPLAY,a),null==i||null===(l=i.off)||void 0===l||l.call(i,p.Events.TIME_UPDATE,a),clearTimeout(r)}},[i,l,o]),{hasRelatedCardShown:t}};var lm=i("752900"),lf=i("121998"),l_=i("746517"),lh=i("493630");let lg=e=>{let{awemeInfo:l,abtestData:i,isActive:o,isLogin:t,onOpenCard:n,accountParentEl:d,onLoginSuccess:a,isInnerFeed:u}=e,[s,c]=(0,r.useState)(!1),[v,m]=(0,r.useState)(!1),[f,_]=(0,r.useState)(),p=e=>{let{aiNoteEnterMethod:l,onLoginSuccess:i,onLoginCancel:o}=e,r=()=>{l&&_(l),n(),m(!0),c(!0)};if(t)r();else{var u,s;(0,l_.default)({success:async()=>{null==a||a(),r(),null==i||i()},onClose:()=>{m(!1),null==o||o()},headerText:"登录后即可使用AI笔记",enterMethod:"ai_search_card_click",next:`https://${null===(s=window)||void 0===s?void 0:null===(u=s.location)||void 0===u?void 0:u.host}`},d)}},I=(0,r.useCallback)(()=>{if(!!o)D.emit(D.EVENT.closeAiNoteCard,{awemeId:null==l?void 0:l.awemeId}),m(!1)},[null==l?void 0:l.awemeId,o]),C=(0,r.useCallback)(e=>{v?I():p(e)},[v,p]);(0,r.useEffect)(()=>()=>{I()},[]),(0,r.useEffect)(()=>{!o&&(D.emit(D.EVENT.closeAiNoteCard,{awemeId:null==l?void 0:l.awemeId}),m(!1))},[o,null==l?void 0:l.awemeId]),(0,h.Z)(()=>{!u&&I()},[u]),(0,b.o)(()=>{let e=D.listen(D.EVENT.openAiNoteCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!o)p(e)}),i=D.listen(D.EVENT.toggleAiNoteCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!o)C(e)});return()=>{e(),i()}},[o,l,t,a,d,n]);let{pathname:w,search:y}=(0,g.a)();return{isShowAiCard:v,closeAiCard:I,renderAiCard:s,aiNoteProps:{enterMethod:f},isAiNoteUseable:(0,r.useMemo)(()=>{var e;if(!l||(0,z.km)(78)||[k.e.LiveCard,k.e.Note].includes(l.awemeType)||(0,S.Jt)(l)||(0,S.Kf)(l)||"video_detail"===(0,U.yW)())return!1;let{showTab:i}=lf.parse(y);return"/user/self"===w&&"ai_note"===i||(null==l?void 0:null===(e=l.douyinPcVideoExtra)||void 0===e?void 0:e.aiNoteV2)===1},[l])}},lp=e=>{let{awemeInfo:l,isActive:i,isLogin:o,onOpenCard:t,accountParentEl:n,onLoginSuccess:d,isInnerFeed:a,isAiNoteCardShow:u,globalIsShowAiCard:s,setGlobalIsShowAiCard:c,setHasDefaultShowAiCard:v,otherCardIsOpen:m,aiCardIsPined:f,abtestData:_,aiSearchIsDefaultShow:h}=e,[g,p]=(0,r.useState)(i),[I,C]=(0,r.useState)(!1),{aiEntryVisible:w}=(0,lh.$)({isLogin:o,awemeInfo:l,checkAiNote:!1}),y=!!o&&(c&&w?s:I),S=c&&w?c:C,T=(0,r.useCallback)(e=>{S(e),e&&(null==v||v(!0))},[S,v]);(0,r.useEffect)(()=>{i&&p(!0)},[i]);let L=(0,r.useRef)(!1),[E,k]=(0,r.useState)(h?ee.jE.AutoShow:void 0),[P,N]=(0,r.useState)("bottom_bar"!==E&&"bottom_bar_mention"!==E),[A,x]=(0,r.useState)("");(0,r.useEffect)(()=>{!L.current&&N("bottom_bar"!==E&&"bottom_bar_mention"!==E)},[E]);let R=e=>{let{from:l,word:i,onLoginSuccess:r,onLoginCancel:a}=e,u=()=>{l&&k(l),i&&x(i),t(),T(!0),L.current=!0};if(o)u();else{var s,c;(0,l_.default)({success:async()=>{null==d||d(),u(),null==r||r()},onClose:()=>{T(!1),null==a||a()},headerText:"登录后即可使用问问AI",enterMethod:"ai_search_card_click",next:`https://${null===(c=window)||void 0===c?void 0:null===(s=c.location)||void 0===s?void 0:s.host}`},n)}},M=()=>{if(!!i)T(!1)},V=(0,r.useCallback)(l=>{if(f&&m){R(e);return}y&&!u?M():R(l)},[y,u,R,m,f]);return(0,b.o)(()=>D.listen(D.EVENT.aiSearchEntranceVisibleChange,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)N(null==e?void 0:e.visible)}),[l,i]),(0,b.o)(()=>{let e=D.listen(D.EVENT.openAiSearchCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)R(e)}),o=D.listen(D.EVENT.toggleAiSearchCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)V(e)}),t=D.listen(D.EVENT.renderAiSearchCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)k(null==e?void 0:e.from)});return()=>{e(),o(),t()}},[i,l,o,d,n,t]),{isShowAiCard:y,closeAiCard:M,renderAiCard:g,openAiCard:R,aiSearchProps:{keyword:A,entryFrom:E,isColdStart:P}}};i("362051");var lI=i("66948"),lC=i("528937"),lw=i("762167"),ly=i("547189"),lS=i("683079"),lT=i("103680"),lL=i("947383"),lE=i("326367"),lk=i("740197");let lb=e=>{let{awemeInfo:l,userInfo:i,onOpenCard:o,isActive:n,onCloseAdCard:d,abtestData:a,toast:u,isFirst:s,isUpperFeed:c,changeSplashAdStatus:v}=e,m=(0,r.useRef)(lI.TCC_DEFAULT_VALUE_MAP.get(lI.TccKey.AdConfig)),[f,_]=(0,r.useState)(!1),h=(0,r.useRef)(!1),g=(0,r.useRef)(!1);(0,r.useEffect)(()=>{h.current=!1,g.current=!1,_(!1)},[l]),(0,r.useEffect)(()=>{let e=!1;return(async()=>{let l=await lC.get({key:lI.TccKey.AdConfig,defaultValue:lI.TCC_DEFAULT_VALUE_MAP.get(lI.TccKey.AdConfig)});!e&&(m.current=l)})(),()=>{e=!0}},[]);let p=(0,r.useCallback)(e=>{let{from:l}=e||{};"closeIcon"===l&&(h.current=!0),g.current&&(g.current=!1,D.emit(D.EVENT.videoRemoveStopPlayNext,{openSideCard:!0})),_(!1),null==d||d()},[d]),I=(0,r.useCallback)(e=>{let{title:l,microAppId:i,logParams:o,logExtra:n,logoUrl:r,onAfterOpenGame:d}=e;if(!i)return;let a=`sslocal://microgame?${new URLSearchParams({app_id:i,bdp_log:JSON.stringify((0,t._)({},o)),scene:"255001",meta:JSON.stringify({icon:r||"",name:l||"小游戏",orientation:0}),is_from_web:String((0,Y.DT)()?0:1),query:JSON.stringify({projectid:o.project_id,promotionid:o.promotion_id,ad_params:{log_extra:{rit:null==n?void 0:n.rit}}})}).toString()}`;if((0,Y.DT)()){lT.invoke("createGameWindow",{urlSchema:a,isHorizontal:0,gameId:i}).then(()=>{null==d||d()}).catch(()=>null);return}lk.p.open({logParams:o,clientSchemaUrl:a,onClose:()=>{lk.p.close()}}),null==d||d()},[]),C=(0,r.useCallback)(e=>{var t,n,r,d,a,s,c,v,f,h,p,C;let{from:w}=e||{},y=(0,S.Rx)(l),T=(0,S.BD)(l);if("automatic"!==w&&!g.current&&(g.current=!0,D.emit(D.EVENT.videoStopPlayNext,{openSideCard:!0})),"keyboard"===w&&(0,lw.E)("realtime_click",{tag:(0,lL.f)(),value:null==y?void 0:y.creative_id,log_extra:null==y?void 0:y.log_extra,refer:"enter"}),(0,P.o4)(l))return;if((0,ly.jr)(y)){if((null==y?void 0:y.group_type)===303&&(null==y?void 0:y.open_url)){window.open(null==y?void 0:y.open_url,"_blank");return}let e="string"==typeof y.log_extra?(0,ln.As)(y.log_extra):y.log_extra,l=(0,ly.xi)(y),o=(null==l?void 0:l.data)||{},t=(null==y?void 0:y.avatar_url)||(null==o?void 0:o.image_url),u=(null==o?void 0:o.title)||(null==y?void 0:null===(n=y.tt_micro_game_track)||void 0===n?void 0:n.mp_name),m=null==o?void 0:o.sub_title,_=(null==e?void 0:e.micro_app_id)||(null==y?void 0:null===(r=y.tt_micro_game_track)||void 0===r?void 0:r.mp_id),h={enter_method:"feed_video_game_ad",enter_from:(0,F.mo)(),_param_for_special:"micro_game",mp_id:_,mp_name:u||"小游戏",scene:"255001",launch_from:"ad",is_ad_channel:"1",is_soft_ad:"0",ad_id:String(null==y?void 0:y.ad_id)||"",cid:(null==y?void 0:y.creative_id)||"",project_id:(null==y?void 0:null===(d=y.tt_micro_game_track)||void 0===d?void 0:d.project_id)||"",promotion_id:(null==y?void 0:null===(a=y.tt_micro_game_track)||void 0===a?void 0:a.promotion_id)||"",if_dou:(null==y?void 0:null===(s=y.tt_micro_game_track)||void 0===s?void 0:s.if_dou)||"",location:(null==y?void 0:null===(c=y.tt_micro_game_track)||void 0===c?void 0:c.location)||"",is_ad:"1",did:(null===(v=(0,Z.Es)())||void 0===v?void 0:v.user_unique_id)||"",uid:(null===(f=i.info)||void 0===f?void 0:f.uid)||"",req_id:(null==e?void 0:e.req_id)||"",rit:(null==e?void 0:e.rit)||""};I({microAppId:_,logParams:h,logExtra:e,logoUrl:t,title:u,subTitle:m,onAfterOpenGame:()=>{D.emit(D.EVENT.videoPause,"SliderVideo_openAdCard")}});return}if((0,eY.hj)(l)){if(D.emit(D.EVENT.videoPause,"SliderVideo_openAdCard"),(null==T?void 0:null===(h=T.lynx_raw_data)||void 0===h?void 0:h.open_url)||(null==y?void 0:y.open_url)){let e=(0,eY.at)({rawAdData:y,extraParams:{enter_from_merge:"web_homepage_hot",enter_method:"web_video_commercialize",action_type:"click",group_id:l.awemeId,request_id:l.logPb}});window.open(e,(0,lE.f)()?"_self":"_blank")}else u?u("广告链接获取失败,请跳过"):ew.F.info("广告链接获取失败,请跳过"),(0,lw.E)("load_failed",{tag:(0,lL.f)(),value:y.creative_id,log_extra:y.log_extra});return}if((0,eK.L)(l)||(0,ez.u)(l)){(null==T?void 0:null===(p=T.lynx_raw_data)||void 0===p?void 0:p.web_url)?(_(!0),null==o||o({isAuto:"automatic"===w}),(0,lw.E)("detail_show",{tag:"landing_ad",value:y.creative_id,log_extra:y.log_extra})):(u?u("广告链接获取失败,请跳过"):ew.F.info("广告链接获取失败,请跳过"),(0,lw.E)("load_failed",{tag:(0,lL.f)(),value:null==y?void 0:y.creative_id,log_extra:null==y?void 0:y.log_extra}));return}let L=!1;if(null==T?void 0:null===(t=T.lynx_raw_data)||void 0===t?void 0:t.web_url){if(!(null===(C=m.current)||void 0===C?void 0:C.openInSidebarCondition.siteTypes.includes(y.site_type))||(0,Y.DT)()){if("automatic"!==w){let e=(0,lS.J2)({awemeInfo:l,userInfo:i});L=!0,window.open(e,(0,lE.f)()?"_self":"_blank")}}else _(!0),L=!0,null==o||o({isAuto:"automatic"===w})}else u?u("广告链接获取失败,请跳过"):ew.F.info("广告链接获取失败,请跳过"),(0,lw.E)("load_failed",{tag:(0,lL.f)(),value:null==y?void 0:y.creative_id,log_extra:null==y?void 0:y.log_extra});L&&(0,lw.E)("detail_show",{tag:"landing_ad",value:y.creative_id,log_extra:y.log_extra})},[l,i,o,I]);return(0,b.o)(()=>D.listen(D.EVENT.openAdSideCard,e=>{if(n){(null==e?void 0:e.from)==="automatic"&&h.current||C({from:null==e?void 0:e.from});let i=(0,S.Rx)(l);(null==e?void 0:e.from)==="keyboard"&&(0,lw.E)("slide",{tag:(0,lL.f)(),value:i.creative_id,log_extra:i.log_extra})}}),[n,C,l]),(0,r.useEffect)(()=>{s&&!c&&n&&(null==v||v((0,T.p)(l)?L.QB.Fullscreen:L.QB.Normal))},[]),(0,r.useEffect)(()=>{n?(!s&&(null==v||v(L.QB.Normal)),g.current=!1):_(!1)},[n]),{closeAdCard:p,openAdCard:C,isShowAdCard:f,isAdAweme:(0,S.Jt)(l)}},lP=e=>{let{onOpenCard:l,awemeInfo:i,isInnerFeed:o,isActive:t}=e,[n,d]=(0,r.useState)(!1),a=()=>{d(!1)};return(0,r.useEffect)(()=>{o&&a()},[o]),(0,r.useEffect)(()=>{!t&&a()},[t]),{isShowRecommendWhiteTagSideCard:n,openRecommendWhiteTagSideCard:()=>{d(!0),null==l||l()},closeRecommendWhiteTagSideCard:a}};var lN=i("614170");let lA=e=>{let{awemeInfo:l,isActive:i,isLogin:o,onOpenCard:t,accountParentEl:n,onLoginSuccess:d,isInnerFeed:a,globalIsShowAiCard:u,setGlobalIsShowAiCard:s,setHasDefaultShowAiCard:c,otherCardIsOpen:v,aiCardIsPined:m,abtestData:f,aiSearchIsDefaultShow:_}=e,[h,g]=(0,r.useState)(!1),{aiEntryVisible:p}=(0,lh.$)({isLogin:o,awemeInfo:l}),[I,C]=(0,r.useState)(!1),w=!!o&&(s&&p?u:I),y=s&&p?s:C,S=(0,r.useCallback)(e=>{y(e),e&&(null==c||c(!0))},[y,c]),T=(0,r.useRef)(!1),[L,E]=(0,r.useState)(_?ee.jE.AutoShow:void 0),[k,P]=(0,r.useState)(""),N=["bottom_bar","bottom_bar_mention","comment_related_search_ai_search","comment_named_entity_search_ai_search"],[A,x]=(0,r.useState)(!N.includes(L||"")),[R,M]=(0,r.useState)(),[V,F]=(0,r.useState)(""),[j,B]=(0,r.useState)(lN.X.Search);(0,r.useEffect)(()=>{!T.current&&x(!N.includes(L||""))},[L]),(0,r.useEffect)(()=>{j===lN.X.Note&&E(void 0)},[j]);let O=e=>{let{tab:l,from:i,word:r,cid:a,aiNoteEnterMethod:u,onLoginSuccess:s,onLoginCancel:c}=e,v=()=>{a&&P(a),i&&E(i),r&&F(r),l&&B(l),u&&M(u),t(),S(!0),l===lN.X.Search&&(T.current=!0)};if(o)v();else{var m,f;(0,l_.default)({success:async()=>{null==d||d(),v(),null==s||s()},onClose:()=>{S(!1),null==c||c()},headerText:"登录后即可使用问问AI",enterMethod:"ai_search_card_click",next:`https://${null===(f=window)||void 0===f?void 0:null===(m=f.location)||void 0===m?void 0:m.host}`},n)}},U=()=>{if(!!i)S(!1)};return(0,r.useCallback)(e=>{let{tab:l,aiNoteEnterMethod:i}=e;if(m&&v){O(e);return}w?l?j===l?U():(B(l),M(i)):U():O(e)},[w,j,O,v,m]),(0,b.o)(()=>D.listen(D.EVENT.aiSearchEntranceVisibleChange,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)x(null==e?void 0:e.visible)}),[l,i]),(0,b.o)(()=>{let e=D.listen(D.EVENT.openAiCard,e=>{(null==e?void 0:e.tab)===lN.X.Note?D.emit(D.EVENT.openAiNoteCard,e):D.emit(D.EVENT.openAiSearchCard,e)}),l=D.listen(D.EVENT.toggleAiCard,e=>{(null==e?void 0:e.tab)===lN.X.Note?D.emit(D.EVENT.toggleAiNoteCard,e):D.emit(D.EVENT.toggleAiSearchCard,e)}),i=D.listen(D.EVENT.renderAiCard,e=>{D.emit(D.EVENT.renderAiSearchCard,e)});return()=>{e(),l(),i()}},[]),{renderAiCard:h,isShowAiCard:w,closeAiCard:U,activeAiCardTab:j,setActiveAiCardTab:B,setAiNoteEnterMethod:M,aiSearchEntryFrom:L,aiSearchKeyword:V,aiNoteEnterMethod:R,isColdStart:A,conversationId:k,openAiCard:O}},lx=e=>{let{awemeInfo:l,abtestData:i}=e,{renderAiCard:o,isShowAiCard:t,closeAiCard:n,activeAiCardTab:d,setActiveAiCardTab:a,setAiNoteEnterMethod:u,aiSearchEntryFrom:s,aiSearchKeyword:c,aiNoteEnterMethod:v,isColdStart:m,conversationId:f,openAiCard:_}=lA(e),{pathname:h,search:p}=(0,g.a)();return{isShowAiCard:t,closeAiCard:n,renderAiCard:o,activeAiCardTab:d,setActiveAiCardTab:a,setAiNoteEnterMethod:u,aiSearchProps:{keyword:c,entryFrom:s,isColdStart:m,conversationId:f},aiNoteProps:{enterMethod:v},isAiNoteUseable:(0,r.useMemo)(()=>{var e;if(!l||(0,z.km)(78)||[k.e.LiveCard,k.e.Note].includes(l.awemeType)||(0,S.Jt)(l)||(0,S.Kf)(l)||"video_detail"===(0,U.yW)())return!1;let{showTab:i}=lf.parse(p);return"/user/self"===h&&"ai_note"===i||(null==l?void 0:null===(e=l.douyinPcVideoExtra)||void 0===e?void 0:e.aiNote)===1},[l]),openAiCard:_}},lR=e=>{let{aiCardElRef:l,isShowAiCard:i}=e;(0,r.useEffect)(()=>{var e,i,o,t;let n=e=>{null==e||e.stopPropagation(),D.emit(D.EVENT.globalEventPrevented)},r=e=>{null==e||e.stopPropagation(),D.emit(D.EVENT.globalEventPrevented)};return null===(e=l.current)||void 0===e||e.addEventListener("wheel",n),null===(i=l.current)||void 0===i||i.addEventListener("mousedown",r),null===(o=l.current)||void 0===o||o.addEventListener("pointerdown",r),null===(t=l.current)||void 0===t||t.addEventListener("touchstart",r),()=>{var e,i,o,t;null===(e=l.current)||void 0===e||e.removeEventListener("wheel",n),null===(i=l.current)||void 0===i||i.removeEventListener("mousedown",r),null===(o=l.current)||void 0===o||o.removeEventListener("pointerdown",r),null===(t=l.current)||void 0===t||t.removeEventListener("touchstart",r)}},[l.current,i])};var lM=i("826758");let lV=e=>{let{awemeInfo:l,isActive:i,abtestData:o,isInnerFeed:t,onOpenCard:n}=e,[d,a]=(0,r.useState)(!1),u=()=>{a(!1),D.emit(D.EVENT.closeVideoInfoSideCard,{awemeId:null==l?void 0:l.awemeId})};return(0,b.o)(()=>{var e;if(!isInLiveChildRoute(null===(e=location)||void 0===e?void 0:e.pathname))return D.listen(D.EVENT.openVideoInfoSideCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)a(!0),null==n||n()})},[l,i,n]),(0,b.o)(()=>{var e;if(!isInLiveChildRoute(null===(e=location)||void 0===e?void 0:e.pathname))return D.listen(D.EVENT.closeVideoInfoSideCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)a(!1)})},[l,i]),(0,r.useEffect)(()=>()=>{u()},[]),(0,r.useEffect)(()=>{t&&u()},[t]),(0,r.useEffect)(()=>{!i&&u()},[i]),{closeVideoInfoSideCard:u,isShowVideoInfoSideCard:d}},lF=e=>{let{isActive:l,showSideCard:i,showRelatedTabList:o,isUpperFeed:t,awemeInfo:n,autoOpenAiTab:d,disableRef:a,hasDefaultOpenAiRelatedCardRef:u,onAutoOpen:s,handleShowSidebar:c,changeTab:v,setSlideVideoTab:m,allowUpperFeed:f=!1}=e,_=(0,r.useRef)(!1),h=u||_;(0,b.o)(()=>{var e;if(!(a.current||!l||t&&!f||!d||!(null==o?void 0:null===(e=o.includes)||void 0===e?void 0:e.call(o,w.L.AiCard))||!(0,eJ.gs)(n)||(0,z.km)(80))&&!h.current)h.current=!0,setTimeout(()=>{null==s||s(),D.emit(D.EVENT.renderAiSearchCard,{awemeId:null==n?void 0:n.awemeId,from:ee.jE.AutoShow}),v({tab:w.L.AiCard,from:"auto"}),null==m||m(w.L.AiCard),c(!0,{from:"auto"})},0)},[l,t,d,o,null==n?void 0:n.awemeId,a,s,c,v,m])},lD=e=>{let{showSideCard:l,isActive:i,originAwemeInfo:o,showRelatedTabList:t,slideVideoTab:n,setSlideVideoTab:d,changeTab:a,isUpperFeed:u,defaultLandingTab:s,handleShowSidebar:c,logParams:v,searchFrom:m,autoOpenAiTab:f,hasDefaultOpenAiRelatedCardRef:_,allowUpperFeed:h,onAiRelatedAutoOpen:g}=e,p=(0,r.useRef)(!s),I=(0,r.useRef)(!1);lF({isActive:i,showSideCard:l,showRelatedTabList:t,isUpperFeed:u,awemeInfo:o,autoOpenAiTab:!!f,disableRef:I,hasDefaultOpenAiRelatedCardRef:_,onAutoOpen:g,handleShowSidebar:c,changeTab:a,setSlideVideoTab:d,allowUpperFeed:h});let y=(0,r.useMemo)(()=>{if(i){if(l){var e;return(null==t?void 0:null===(e=t.includes)||void 0===e?void 0:e.call(t,n))?n:t[0]}if(s)return t[0]}},[i,l,n,s,t[0],t[1],t[2],t[3],t[4]]);return(0,b.o)(()=>{!I.current&&!(0,S.Jt)(o)&&i&&y&&!u&&!p.current&&s&&(setTimeout(()=>{if(c(!0,{from:"auto"}),a({tab:s,from:"auto"}),s===w.L.AbstractList){var e;C.logInstance.sendLog("enterVideoCardTab",{type:s,enter_method:"video_abstract_text"===m?"click_video_abstract":"click_card_entrance",enter_from_merge:(0,F.vM)(),enter_from:null!==(e=null==v?void 0:v.enter_from)&&void 0!==e?e:(0,F.mo)(),tab_name:(null==v?void 0:v.tab_name)||(0,J.zD)(),module_name:null==v?void 0:v.module_name})}}),p.current=!0)},[y,o,i,v,m,c,a,s,u]),{openSpecificTab:(0,r.useCallback)(e=>{I.current=!0,c(!0),a({tab:e});let l=setTimeout(()=>{I.current=!1,clearTimeout(l)},3e3)},[c,a])}},lj=e=>{let{awemeInfo:l,isActive:i=!1,isShowAiCard:t=!1,enabled:n=!1}=e,d=(0,r.useRef)(!1),[a,u]=(0,r.useState)(void 0),[s,c]=(0,r.useState)(void 0),[v,m]=(0,r.useState)(a!==ee.jE.BottomBar&&a!==ee.jE.BottomBarMention);return(0,r.useEffect)(()=>{t&&!d.current&&i&&(d.current=!0,!a&&(u(ee.jE.HeadEntry),c(`extend_from_${o}`)))},[t,a,i]),(0,r.useEffect)(()=>{!d.current&&m(a!==ee.jE.BottomBar&&a!==ee.jE.BottomBarMention)},[a]),(0,b.o)(()=>n?D.listen(D.EVENT.aiSearchEntranceVisibleChange,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i)m(null==e?void 0:e.visible)}):()=>{},[null==l?void 0:l.awemeId,i,n]),(0,b.o)(()=>n?D.listen(D.EVENT.renderAiSearchCard,e=>{if((null==e?void 0:e.awemeId)===(null==l?void 0:l.awemeId)&&!!i){if(null==e?void 0:e.from){if(e.from===ee.jE.TabSwitch){c(e.from),o=e.from;return}u(e.from),c(e.from),o=e.from}}}):()=>{},[null==l?void 0:l.awemeId,i,n]),{aiSearchProps:{keyword:"",entryFrom:a,entryFromBackup:s,isColdStart:v}}};var lB=i("883776");let lO=e=>{let{awemeInfo:l,slideOptimize:i}=e,[o,t]=(0,r.useState)((0,lB.g)(l));return(0,r.useEffect)(()=>{i||t((0,lB.g)(l))},[l]),{hotData:o}};var lU=i("502615");let lW=e=>{let{player:l,isActive:i,isNext:o,showSideCard:t,abtestData:n,keepAlive:d=!1}=e,[a,u]=(0,r.useState)(!1),s=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{if(t){if(i&&l){if(l.isPlaying||l.currentTime>0||(null==l?void 0:l.firstframe))u(!0),s.current=!0;else{let e=setTimeout(()=>{u(!0),s.current=!0},3e3),i=()=>{clearTimeout(e),u(!0),s.current=!0};return l.once(p.Events.AUTOPLAY_STARTED,i),l.on(lU.FP.PLAY_FULFILLED,i),()=>{l.off(p.Events.AUTOPLAY_STARTED,i),l.off(lU.FP.PLAY_FULFILLED,i),clearTimeout(e)}}}else i||!a||d?!a&&u(!0):u(!1)}},[l,i,n,t,d]),{delaySideCardShow:a,setDelaySideCardShow:u}},lG=e=>{let{scene:l,awemeInfo:i,toast:o,reportParams:n={},curCard:a,isShowSideBar:u,showRelatedTabList:s,handleRelated:c}=e,v=(0,r.useCallback)(e=>{let{clickMethod:l,awemeInfo:i}=e||{};c({tab:w.L.Author,clickMethod:null!=l?l:"click_icon",awemeInfo:i})},[c]),m=(0,r.useCallback)(e=>{let{clickMethod:l,awemeInfo:i}=e||{};c({tab:w.L.Mix,clickMethod:null!=l?l:"click_feed_bar",awemeInfo:i})},[c]),f=(0,r.useCallback)(e=>{let{clickMethod:l,awemeInfo:i}=e||{};c({tab:w.L.Series,clickMethod:null!=l?l:"click_feed_bar",awemeInfo:i})},[c]),_=(0,r.useCallback)((e,r)=>{var s,c,m,f,_,h,g,p;let{to_user_id:C,is_co_publish:y,co_publish_author_list:T}=(0,eI.m)(i)||{};if((null==i?void 0:i.awemeType)===k.e.XgVideo){eI.Z.sendLog("clickAuthorHead",(0,t._)({click_from:(null==r?void 0:r.clickMethod)||"head",action:"",urlParamList:["previous_page"],author_id:null==i?void 0:null===(f=i.authorInfo)||void 0===f?void 0:f.uid,group_id:null==i?void 0:i.awemeId,log_pb:null==i?void 0:i.logPb,enter_from:(0,F.mo)(),is_full_screen:(0,W.r)()?"1":"0",from_follow_list:(null===(_=G.Le.getConfig(G.gI.FromFollowList))||void 0===_?void 0:_.tag)?"1":"0"},(0,H.t)(),n)),(null==i?void 0:i.awemeType)===k.e.XgVideo&&D.emit(D.EVENT.videoPause,"SliderVideo_clickAuthorHead_cover");return}if((0,S.Jt)(i)){if(l===I.lT.Recommend||l===I.lT.Modal&&"discover"===(0,F.vM)()){null==e||null===(g=e.preventDefault)||void 0===g||g.call(e),D.emit(D.EVENT.openAdSideCard);let l=(0,S.Rx)(i);(0,lw.E)("realtime_click",{tag:(0,lL.f)(),value:null==l?void 0:l.creative_id,log_extra:null==l?void 0:l.log_extra,refer:"source",ad_extra_data:(0,t._)({},(0,S.f6)(i))});return}if((0,S.gc)(i)){null==e||null===(h=e.preventDefault)||void 0===h||h.call(e),o?o("广告视频不支持此功能"):ew.F.info("广告视频不支持此功能");return}}if((0,S.gc)(i)){null==e||null===(p=e.preventDefault)||void 0===p||p.call(e),ew.F.info("广告视频不支持此功能");return}return null==e||null===(s=e.preventDefault)||void 0===s||s.call(e),eI.Z.sendLog("clickAuthorHead",(0,d._)((0,t._)((0,d._)((0,t._)({click_from:(null==r?void 0:r.clickMethod)||"head",urlParamList:["previous_page"],author_id:null==i?void 0:null===(c=i.authorInfo)||void 0===c?void 0:c.uid,group_id:null==i?void 0:i.awemeId,log_pb:null==i?void 0:i.logPb,enter_from:(0,F.mo)(),is_full_screen:(0,W.r)()?"1":"0",from_follow_list:(null===(m=G.Le.getConfig(G.gI.FromFollowList))||void 0===m?void 0:m.tag)?"1":"0"},n),{action:u&&a===w.L.Author?"close":"open"}),(0,H.t)()),{to_user_id:C,is_co_publish:y,co_publish_author_list:T})),null==v||v(r),!0},[i,n,a,v,u]),h=(0,r.useCallback)((e,l)=>{var i,t;return s.includes(w.L.Related)?(c({tab:w.L.Related,clickMethod:null!==(t=l.clickMethod)&&void 0!==t?t:"click_feed_bar",awemeInfo:l.awemeInfo}),!0):(null==e||null===(i=e.preventDefault)||void 0===i||i.call(e),o?o("暂无相关推荐"):ew.F.info("暂无相关推荐"),!1)},[c,s,o]),g=(0,r.useCallback)(e=>{let{clickMethod:l,awemeInfo:i}=e||{};return s.includes(w.L.AiCard)?(c({tab:w.L.AiCard,clickMethod:null!=l?l:"click_button",awemeInfo:i}),!0):(o?o("暂无问问AI"):ew.F.info("暂无问问AI"),!1)},[c,s,o]),p=(0,r.useCallback)(e=>{let{clickMethod:l,awemeInfo:i}=e||{};h(null,{awemeInfo:i,clickMethod:l})},[h]);return{onAvatarClick:_,onRelatedClick:h,onAiCardClick:g,handleAvatarClick:v,handleMixClick:m,handleSeriesClick:f,handleHotClick:()=>{c({tab:w.L.Hot,clickMethod:"click_feed_bar"})},handleRelatedClick:p}},lH=e=>{let{player:l,isActive:i,isOuter:o,scene:t}=e;(0,r.useEffect)(()=>{let e;return l&&i&&t===I.lT.Recommend&&(()=>{if(o){var e;(null===(e=G.Le.getConfig(G.gI.IsInLookMiniModal))||void 0===e?void 0:e.isInMiniModal)&&setTimeout(()=>{var e;null===(e=l.pause)||void 0===e||e.call(l),l.config.autoplay=!1,l.autoplay=!1},20)}})(),()=>{clearTimeout(e)}},[l,i])};var lZ=i("712909"),lK=i("202206"),l$=i("332009");let lz=e=>{let{isUpperFeed:l,awemeInfo:i,scrollElRef:o,swiper:t,isActive:n,changeNextVideo:d,changePrevVideo:a,player:u,onFullScreen:s,onCssFullScreen:c,onFullScreenrestore:v,onChangeMinWindows:m,onCanPlay:f,onPlay:_,onEnterVideo:g,onLeaveVideo:p,onVideoTitleClick:C,feedCssFullScreen:w,modalEnterFrom:y}=e,S=(0,e3.Z)(e.onTriggerModalPlayerClose),[T,L]=(0,r.useState)(!1),E=null!=w?w:T,[k,P]=(0,r.useState)(!1),{isFullscreen:N}=(0,lZ.$)(),A=(0,r.useRef)(c);A.current=c,(0,r.useEffect)(()=>{let e=e=>{null==e||e.stopPropagation(),D.emit(D.EVENT.globalEventPrevented)},l=e=>{null==e||e.stopPropagation(),D.emit(D.EVENT.globalEventPrevented)};if(o.current){var i,t,r,d;null===(i=o.current)||void 0===i||i.addEventListener("wheel",e),null===(t=o.current)||void 0===t||t.addEventListener("mousedown",l),null===(r=o.current)||void 0===r||r.addEventListener("pointerdown",l),null===(d=o.current)||void 0===d||d.addEventListener("touchstart",l)}let a=D.listen(D.EVENT.pageFullScreen,e=>{if(!n)return;let{fullScreen:l}=e;L(e=>null!=l?l:!e)});return()=>{var i,t,n,r;null===(i=o.current)||void 0===i||i.removeEventListener("wheel",e),null===(t=o.current)||void 0===t||t.removeEventListener("mousedown",l),null===(n=o.current)||void 0===n||n.removeEventListener("pointerdown",l),null===(r=o.current)||void 0===r||r.removeEventListener("touchstart",l),null==a||a()}},[o,u,n]),(0,b.o)(()=>{if(n&&t)try{let e=(0,D.emitterListen)(t,"changeNext",function(){for(var e,l,i,o,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];if((null==n?void 0:null===(e=n[0])||void 0===e?void 0:e.triggerFrom)!=="ai_search"&&(null==n?void 0:null===(l=n[0])||void 0===l?void 0:l.triggerFrom)!=="ai_extension"&&(null==n?void 0:null===(i=n[0])||void 0===i?void 0:i.triggerFrom)!=="activity"||(null==n?void 0:null===(o=n[0])||void 0===o?void 0:o.triggerFrom)===y)(0,lK.i0)(lK.CK.User),d(...n)}),l=(0,D.emitterListen)(t,"changePrev",function(){for(var e,l,i,o,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];if((null==n?void 0:null===(e=n[0])||void 0===e?void 0:e.triggerFrom)!=="ai_search"&&(null==n?void 0:null===(l=n[0])||void 0===l?void 0:l.triggerFrom)!=="ai_extension"&&(null==n?void 0:null===(i=n[0])||void 0===i?void 0:i.triggerFrom)!=="activity"||(null==n?void 0:null===(o=n[0])||void 0===o?void 0:o.triggerFrom)===y)(0,lK.i0)(lK.CK.User),a(...n)});return()=>{try{null==e||e(),null==l||l()}catch(e){}}}catch(e){}},[n,t,d,a]),(0,h.Z)(()=>{n&&!(E||N)&&(null==v||v())},[N,E]),(0,h.Z)(()=>{n&&(N?null==s||s(!0):null==s||s(!1))},[N]),(0,h.Z)(()=>{if(n){var e,l;E?null===(e=A.current)||void 0===e||e.call(A,!0):null===(l=A.current)||void 0===l||l.call(A,!1)}},[E]),(0,r.useEffect)(()=>{let e=D.listen(D.EVENT.triggerModalPlayerClose,S);return()=>{null==e||e()}},[S]),(0,b.o)(()=>{let e=D.listen(D.EVENT.changeMinWindows,e=>{let l=l$.s.getPlayersByScene(I.lT.Modal).length>0;if(l$.s.getPlayerScene(null==u?void 0:u.playerId)!==I.lT.Modal&&l)return;let{isMiniWin:i}=e||{};P(i),null==m||m(i)});return()=>e()},[m,u]);let x=(0,r.useRef)(f);x.current=f,(0,r.useEffect)(()=>{if(u&&n){var e;let l=()=>{var e;null===(e=x.current)||void 0===e||e.call(x)};return null===(e=u.once)||void 0===e||e.call(u,"canplay",l),()=>{var e;null===(e=u.off)||void 0===e||e.call(u,"canplay",l)}}},[u,n,l]);let R=(0,r.useRef)(_);return R.current=_,(0,r.useEffect)(()=>{if(u){let e=()=>{var e;null===(e=R.current)||void 0===e||e.call(R)};return u.on("play",e),()=>{u.off("play",e)}}},[u]),(0,h.Z)(()=>{n&&(null==g||g()),!n&&(null==p||p())},[n]),(0,r.useEffect)(()=>{let e=D.listen(D.EVENT.videoTitleClick,e=>{let{awemeId:l,playerId:o}=e;if((null==i?void 0:i.awemeId)===l&&(null==u?void 0:u.playerId)===o)null==C||C()});return()=>{null==e||e()}},[i,u,C]),{isCssFullScreen:E,isFullScreen:N,isMiniWin:k}};var lY=i("980114"),lq=i("853552");let lJ=e=>{let{isActive:l,awemeInfo:i,isNext:o,scene:t,isUpperFeed:n=!1,smoothInner:d=!1,modalEnterFrom:a}=e,u=(0,lY.t)();(0,lq.t)(function(){var e;let o=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(!o)l&&!(null==u?void 0:null===(e=u.current)||void 0===e?void 0:e.isRecoveryFromChild)&&D.emit(D.EVENT.postCurVideoInfo,{awemeId:null==i?void 0:i.awemeId,groupId:null==i?void 0:i.groupId,scene:t,suggestWords:null==i?void 0:i.suggestWords,modalEnterFrom:a,isRecovery:!0})}),(0,r.useEffect)(()=>{if(i&&t!==I.lT.Search){if(!n||!!d)l?(D.emit(D.EVENT.postCurVideoInfo,{awemeId:null==i?void 0:i.awemeId,groupId:null==i?void 0:i.groupId,scene:t,suggestWords:null==i?void 0:i.suggestWords,modalEnterFrom:a}),!G.Le.getConfig(G.gI.FirstFeedVideoSearchInfo)&&G.Le.setConfig(G.gI.FirstFeedVideoSearchInfo,{awemeId:null==i?void 0:i.awemeId,groupId:null==i?void 0:i.groupId,scene:t,suggestWords:null==i?void 0:i.suggestWords,modalEnterFrom:a})):o&&D.emit(D.EVENT.postCurVideoInfo,{awemeId:null==i?void 0:i.awemeId,groupId:null==i?void 0:i.groupId,scene:t,suggestWords:null==i?void 0:i.suggestWords,preload:!0,modalEnterFrom:a})}},[i,l,t,o])};var lX=i("412247");let lQ=e=>{let{isActive:l,isUpperFeed:i,modalAwemeInfo:o,showSideCard:t,isCommonCardShow:n,isShowAiCard:d,abtestData:a,scene:u}=e,s=(0,r.useRef)(!0);(0,r.useEffect)(()=>{if(s.current){s.current=!1;return}l&&D.emit(D.EVENT.sideCardShowChange,{isUpperFeed:i,isModalAwemeShow:!!o,isShow:t||n||d})},[t,n,d,i,l,null==o?void 0:o.awemeId])};var l0=i("229757"),l1=i.n(l0);let l2=e=>{let{curTab:l,awemeInfo:i,handleChangeVideo:o,handleCooperationAvatarClick:n,reportParams:a,isShowVideoCard:u}=e,s=(0,r.useRef)(!1),c=(0,r.useCallback)(e=>{var o,r;s.current=!0,null==n||n(e);let{to_user_id:c,is_co_publish:v,co_publish_author_list:m}=(0,eI.m)(e)||{};eI.Z.sendLog("clickAuthorHead",(0,d._)((0,t._)((0,d._)((0,t._)({click_from:"click_co_author_head",urlParamList:["previous_page"],author_id:null==e?void 0:null===(o=e.authorInfo)||void 0===o?void 0:o.uid,group_id:null==i?void 0:i.awemeId,log_pb:null==i?void 0:i.logPb,is_full_screen:(0,W.r)()?"1":"0",from_follow_list:(null===(r=G.Le.getConfig(G.gI.FromFollowList))||void 0===r?void 0:r.tag)?"1":"0"},a),{action:u&&l===w.L.Author?"close":"open"}),(0,H.t)()),{to_user_id:c,is_co_publish:v,co_publish_author_list:m})),D.emit(D.EVENT.feedVideoCardLocateCurrentVideo,{offsetHeight:0,scrollBehavior:"smooth"})},[n,i,l,u,a]);return(0,r.useEffect)(()=>{if(void 0!==i.authorInfo.roleId&&i.authorInfo.roleId!==li.iG.Author&&[w.L.Mix,w.L.Hot].includes(l)){var e,t;let l=l1()(i),n=null==l?void 0:null===(t=l.cooperationInfo)||void 0===t?void 0:null===(e=t.cooperationCreators)||void 0===e?void 0:e.filter(e=>e.roleId===li.iG.Author)[0];n&&(l.authorInfo=n),null==o||o(l)}},[l]),{onCooperationAvatarClick:c,changeIsInCooperation:e=>{s.current=e},isInCooperation:s.current}};i("527553"),i("240148"),i("683656");var l3=i("890710"),l5=i("426038"),l6=i("709705"),l4=i("585215"),l9=i("798357"),l8=i("661444"),l7=i("810534"),ie=i("331198"),il=i("163896"),ii=i("994166");let io="undefined"!=typeof window?r.useLayoutEffect:r.useEffect,it="slide-mode-0",ir=()=>{let e=parseInt(it.match(/\d+$/)[0]);e++,it=it.replace(/\d+$/,e)},id=()=>{let e=parseInt(it.match(/\d+$/)[0]);e--,it=it.replace(/\d+$/,e)},ia=e=>{var l,i,o;let{SliderContainer:a,close:u,clickedCard:s,customProps:v,isEnterByFullScreen:m=!1,modalEnterFrom:f,currentAwemeInfo:_,isClientMiniWin:h,relatedSmooth:g}=e,{tab:p,userContext:C}=v||{},{userInfo:w}=C,[y,S]=(0,r.useState)({}),{isCssFullScreen:T,isFullScreen:L,isSelf:E}=(0,r.useContext)(X.C),[k,P]=(0,r.useState)(!1),N=(0,r.useRef)(it),A=(0,r.useRef)(null),x=(0,r.useRef)(null),R=(0,r.useRef)(null),M=(0,r.useRef)("click_screen");(0,r.useEffect)(()=>(D.emit(D.EVENT.InnerFeedReady,N.current),ir(),()=>{D.emit(D.EVENT.InnerFeedExit,N.current),id()}),[]);let V=(0,r.useCallback)(e=>{e.target===A.current&&(M.current="click_screen",P(!0))},[]),F=(0,r.useCallback)(()=>{S({width:"100%",height:"100%"})},[]);return((0,r.useEffect)(()=>{var e;F();let l=(0,eo.OB)(),i=l$.s.getPlayer(l);return null==i||null===(e=i.pause)||void 0===e||e.call(i),(0,eo.wS)(l,!1),()=>{if((0,eo.wS)(l,!0),setTimeout(()=>{var e;D.emit(D.EVENT.syncInteraction),null==i||null===(e=i.play)||void 0===e||e.call(i)}),G.Le.getConfig(G.gI.IsInMixCard)){let e=Number((0,l6.$o)(l5.LocalStorageKeys.PLAYER_NEXT_AUTOPLAY)),l=G.Le.getConfig(G.gI.AutoPlayChanged);!(null==l?void 0:l.changed)&&(null==l?void 0:l.autoEmit)&&e&&((0,l6.qQ)(l5.LocalStorageKeys.PLAYER_NEXT_AUTOPLAY,"0"),D.emit(D.EVENT.changeInnerAutoPlay,2),G.Le.setConfig(G.gI.InnerAutoPlay,null),G.Le.setConfig(G.gI.AutoPlayChanged,{autoEmit:!1})),G.Le.setConfig(G.gI.IsInMixCard,!1)}}},[F]),io(()=>(G.Le.setConfig(G.gI.SlideStartTime,{slideStartTime:0}),G.Le.setConfig(G.gI.IsInLookMiniModal,{isInMiniModal:!0}),()=>{G.Le.setConfig(G.gI.IsInLookMiniModal,{isInMiniModal:!1})}),[]),(0,r.useEffect)(()=>{let e=()=>{if(k){var l,i,o;null==u||u(M.current,null===(i=R.current)||void 0===i?void 0:null===(l=i.getCurTab)||void 0===l?void 0:l.call(i)),null===(o=x.current)||void 0===o||o.removeEventListener("animationend",e)}};if(k){var l,i;null==u||u(M.current,null===(i=R.current)||void 0===i?void 0:null===(l=i.getCurTab)||void 0===l?void 0:l.call(i))}let o=D.listen(D.EVENT.sendImUserMsg,()=>{var e,l;null==u||u(M.current,null===(l=R.current)||void 0===l?void 0:null===(e=l.getCurTab)||void 0===e?void 0:e.call(l))}),t=x.current;return t.addEventListener("animationend",e),()=>{t.removeEventListener("animationend",e),o()}},[T,L,k,u,h]),(0,b.o)(()=>{let e=e=>{if(e.shiftKey||e.metaKey||e.ctrlKey)return;let l=G.Le.getConfig(G.gI.DisableExit);if("Escape"===e.code&&(!T||p===I.lT.Modal)&&!L&&!h&&!l){var i,o;return e.preventDefault(),e.returnValue=!1,null==u||u("esc",null===(o=R.current)||void 0===o?void 0:null===(i=o.getCurTab)||void 0===i?void 0:i.call(o)),!1}};return l4.k.bind("Escape",e),()=>{l4.k.remove("Escape",e)}},[T,L,h,u]),(0,r.useEffect)(()=>{if(T)return S({}),()=>{F()}},[T]),(0,r.useEffect)(()=>{if(L)return S({}),()=>{F()}},[L]),(0,r.useEffect)(()=>{if(h)return S({}),()=>{F()}},[h]),(0,r.useEffect)(()=>{if(!m&&p!==I.lT.Modal){var e,l,i;D.emit(D.EVENT.pageFullScreen,{fullScreen:!0,playerId:null===(i=R.current)||void 0===i?void 0:null===(l=i.getPlayer)||void 0===l?void 0:null===(e=l.call(i))||void 0===e?void 0:e.playerId,clickMethod:"inner_player",fromAuthorCard:!0})}},[]),g)?null:(0,n.jsxs)(il.T6,{onMaskClick:()=>{M.current="click_screen",P(!0)},className:c()(l7.default.screenMaskContainer),children:[(0,n.jsxs)("div",{className:l7.default.container,ref:A,onClick:V,children:[!h&&(0,n.jsx)(ie.N,{positionFixed:!0,exitTextProps:{getCurrentTab:()=>{var e,l;return(null==R?void 0:null===(l=R.current)||void 0===l?void 0:null===(e=l.getCurTab)||void 0===e?void 0:e.call(l))||s},modalEnterFrom:f,isSelf:E,uidEquals:(null==_?void 0:null===(l=_.authorInfo)||void 0===l?void 0:l.uid)===(null==w?void 0:null===(i=w.info)||void 0===i?void 0:i.uid),awemeInfo:_},onHandleReturn:()=>{var e,l;M.current="click_button",null==u||u(M.current,null===(l=R.current)||void 0===l?void 0:null===(e=l.getCurTab)||void 0===e?void 0:e.call(l))}}),(0,n.jsx)("div",{className:l7.default.videoContainer,ref:x,style:{height:"100%"},children:(0,n.jsx)(a,(0,d._)((0,t._)({},e),{style:y,isUpperFeed:!0,isMultiInstanceScene:!1,className:l7.default.modalContainer,close:u,ref:R,swiper:null!==(o=null==e?void 0:e.swiper)&&void 0!==o?o:D.commonEvent}))})]}),p===I.lT.Search&&A.current&&(0,n.jsx)(ii.J,{EventListener:D.commonEvent,refContainerStatus:A.current})]})},iu=e=>{let l=(0,r.useRef)(document.createElement("div")),i=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{let e=Array.from(document.querySelectorAll('.sliderVideo[data-e2e="feed-active-video"]')),o=e[e.length-1]||document.body,t=document.querySelector(".searchUpperFeedContainer")||o,n=document.getElementById("upperFeedContainer")||(0,l9.t)()||o,r=(0,l8.En)()?t:n;return null==r||r.appendChild(l.current),()=>{var e,o,t;(null===(e=l.current)||void 0===e?void 0:e.parentNode)&&(null===(t=l.current)||void 0===t||null===(o=t.remove)||void 0===o||o.call(t)),l.current=null,i.current=!0}},[]),(0,l3.createPortal)((0,n.jsx)(ia,(0,d._)((0,t._)({},e),{close:function(){for(var o,t,n,r,d,a=arguments.length,u=Array(a),s=0;s<a;s++)u[s]=arguments[s];(null===(o=l.current)||void 0===o?void 0:o.parentNode)&&(null===(d=l.current)||void 0===d||d.remove()),null==e||null===(t=e.close)||void 0===t||t.call(e,...u),D.emit(null==D?void 0:null===(n=D.EVENT)||void 0===n?void 0:n.clarityRel,{exitInner:!0}),D.emit(null==D?void 0:null===(r=D.EVENT)||void 0===r?void 0:r.quitInnerFeed,!0),i.current=!0}})),l.current)};var is=e=>(0,n.jsx)(iu,(0,t._)({},e)),ic=i("700762"),iv=i("372468");let im=(0,r.forwardRef)((e,l)=>(0,n.jsxs)("svg",(0,d._)((0,t._)({width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:[(0,n.jsx)("path",{d:"M7.978 8.5H14a4.5 4.5 0 0 1 4.5 4.5v0a4.5 4.5 0 0 1-4.5 4.5H7.5",stroke:"#222",strokeWidth:2,strokeLinecap:"round"}),(0,n.jsx)("path",{d:"M8.5 5.5l-3 3 3 3",stroke:"#222",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})));var i_=i("227677");let ih=e=>{let{width:l=24,height:i=24,className:o}=e;return(0,n.jsx)(i_.A,(0,d._)((0,t._)({},e),{width:l,height:i,src:im,id:"svg_icon_revoke",defaultWidth:24,defaultHeight:24,viewBox:"0 0 24 24",className:o}))},ig=e=>{let{onRevokeDislike:l,isActive:i=!1}=e;return(0,r.useEffect)(()=>{i&&eI.Z.sendLog("dislikeRecallShow")},[i]),(0,n.jsxs)("div",{className:iv.default.dislikePanel,children:[(0,n.jsx)("span",{className:iv.default.text,children:"你已对该视频不感兴趣"}),(0,n.jsxs)("div",{className:iv.default.revokeBtn,onClick:()=>{null==l||l(),eI.Z.sendLog("dislikeRecallClick")},children:[(0,n.jsx)(ih,{className:iv.default.revokeIcon}),(0,n.jsx)("span",{className:iv.default.revokeText,children:"撤销"})]})]})};var ip=i("914858"),iI=i("442556"),iC=i("37285");let iw=ew.F.info.bind(ew.F),iy=e=>{let{awemeInfo:l,reportExtraParams:i,onDislikeSuccess:o,onDislikeError:n,initIsDislike:d,toast:a=iw,player:u}=e,[s,c]=(0,r.useState)(null!=d&&d);(0,r.useLayoutEffect)(()=>{void 0!==d&&c(d)},[d]);let v=(0,r.useRef)(),m=(0,e3.Z)(async function(){var e,r,d,s;let{clickMethod:m,reportExtraParams:f}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{clickMethod:"icon"};if((0,S.Jt)(l)){null==u||u.emit(iC.B.AdDislike,{onAddDislikeSuccess:()=>{null==o||o(),v.current=setTimeout(()=>{c(!0)},2500)}});return}let{statusCode:_,errMsg:h}=await (0,iI.w)(null==l?void 0:l.awemeId),g=(null===(e=G.Le.getConfig(G.gI.WallPaperIds))||void 0===e?void 0:e.includes(null==l?void 0:l.awemeId))?1:0;0===_?(null==a||a("操作成功,将减少此类视频出现"),C.logInstance.sendLog("dislike",(0,t._)({urlParamList:["previous_page"],enter_from:(0,F.mo)(),author_id:null==l?void 0:null===(r=l.authorInfo)||void 0===r?void 0:r.uid,group_id:null==l?void 0:l.awemeId,log_pb:null==l?void 0:l.logPb,is_full_screen:(0,W.r)()?"1":"0",tab_name:(0,J.zD)()||(0,lr.Rs)("tab_name")||"",click_method:m,from_follow_list:(null===(d=G.Le.getConfig(G.gI.FromFollowList))||void 0===d?void 0:d.tag)?"1":"0",aweme_type:null==l?void 0:l.awemeType,is_insert_wallpaper:g,item_duration_ms:(null==l?void 0:null===(s=l.video)||void 0===s?void 0:s.duration)||0,play_current_time:Math.floor((null==u?void 0:u.currentTime)||0)},f,i)),null==o||o(),v.current=setTimeout(()=>{c(!0)},2500)):(null==a||a(h),null==n||n(h)),g&&(0,l6.qQ)(l5.LocalStorageKeys.WallPaper,{disappear:!0})}),f=(0,e3.Z)(async()=>{let{statusCode:e}=await (0,iI.m)(null==l?void 0:l.awemeId);0===e&&c(!1)});return(0,r.useEffect)(()=>()=>{var e;((null===(e=G.Le.getConfig(G.gI.AbtestData))||void 0===e?void 0:e.useCache)!==1||v.current)&&clearTimeout(v.current)},[]),{dislike:m,revokeDislike:f,isDislike:s}},iS=e=>{let{abtestData:l,scene:i,isModal:o,awemeInfo:t,dislikeIdList:n=new Set,deleteCurrentSwiper:r,videoToast:d,uuid:a,player:u}=e;I.lT.Recommend,(0,S.Jt)(t);let{isDislike:s,dislike:c,revokeDislike:v}=iy({awemeInfo:t,toast:e=>{d(e)},onDislikeSuccess:()=>{null==r||r(),G.Le.setConfig(G.gI.SlideStartTime,{slideStartTime:Date.now(),slideFrom:"dislike"})},initIsDislike:n.has(t.awemeId),player:u});return{isDislikePanelVisible:!1,dislike:c,revokeDislike:v,isPermanentDislikeBtn:!1,disableShortCut:!1,isAdapterMiniHeightWithDislikeBtn:!1}};var iT=i("915821"),iL=i("687875"),iE=i("262658"),ik=i("115874"),ib=i("714102"),iP=i("121237"),iN=i("661812"),iA=i("236121"),ix=i("988588"),iR=i("452154");let iM=e=>{let{userInfo:l,abtestData:i,fullScreenTarget:o,awemeInfo:t}=e,d=(0,Y.DT)()&&(0,iT.y)((0,Y.FJ)().awemePcClient,">=","5.4.0"),{handleHiddenLog:a}=(0,iA.s)(),{supportAiTop1:u}=(0,et.Iq)(e=>{let{supportAiTop1:l}=e;return{supportAiTop1:l}}),s=(0,iR.V1)();(0,r.useEffect)(()=>{D.emit(D.EVENT.postCurVideoInfo,{awemeId:null==t?void 0:t.awemeId,groupId:null==t?void 0:t.groupId,scene:I.lT.InnerUpper,suggestWords:null==t?void 0:t.suggestWords})},[t]);let v=e=>a(e),m=e=>{let{text:l}=e.currentTarget.dataset;return a(l)},f=(e,l)=>{if("Enter"===(0,iL.CS)(e))return a(l)};return(0,n.jsx)("div",{className:c()(iE.default.searchCt,"isDark",d&&iE.default.searchCtNew),children:(()=>{if((null==i?void 0:i.aiSearchAiInput)&&(null==i?void 0:i.aiSearchInputMiddleNew)&&u&&!s)return(0,n.jsx)(ik.AiSearchBar,{customProps:{isInnerUpper:!0},userInfo:l,abTestData:i,onSearchClick:v,onHistoryClick:m,onInputKeyDown:f,playerProps:{awemeInfo:t,scene:I.lT.InnerUpper},fullScreenTarget:o});if(!(null==i?void 0:i.aiSearchAiInput)&&(null==i?void 0:i.aiSearchInputMiddleNew)&&u&&!s)return(0,n.jsx)(ib.E1,{customProps:{isInnerUpper:!0},userInfo:l,abTestData:i,onSearchClick:v,onHistoryClick:m,onInputKeyDown:f,playerProps:{awemeInfo:t,scene:I.lT.InnerUpper}});if((null==i?void 0:i.aiSearchAiInput)&&!(null==i?void 0:i.aiSearchInputMiddleNew)&&u&&!s)return(0,n.jsx)(iP.E1,{customProps:{isInnerUpper:!0},userInfo:l,abTestData:i,onSearchClick:v,onHistoryClick:m,onInputKeyDown:f,playerProps:{awemeInfo:t,scene:I.lT.InnerUpper},fullScreenTarget:o});else return(0,n.jsx)(iN.SearchBar,{customProps:{isInnerUpper:!0},userInfo:l,abTestData:i,onSearchClick:v,onHistoryClick:m,onInputKeyDown:f,playerProps:{awemeInfo:t,scene:I.lT.InnerUpper}})})()})},iV=e=>{let[l,i]=(0,r.useState)(!0);return((0,ix.kO)({callback(){i(!0)},useIdleCallback:!(0,z.b_)(),isActive:!0,timeout:1e3,immediately:!(0,z.b_)()}),l)?(0,n.jsx)(iM,(0,t._)({},e)):null};var iF=i("439503"),iD=i("624508");let ij=new iD.h({prf_slider_modal_video:{eventName:"prf_slider_modal_video",params:{fps:0,duration:0,scene:"",jank:0,jank_duration:0,bjank:0,bjank_duration:0,tab:""}}}),iB=1e3/24*2,iO=1e3/24*3,iU=()=>{var e,l;return(null===(l=performance)||void 0===l?void 0:null===(e=l.now)||void 0===e?void 0:e.call(l))||Date.now()||0},iW=function(){},iG=e=>{let{sidebarHidden:l,chapterSidebarHidden:i,bottomLevelSidebar:o,setBottomLevelSidebar:t,topLevelSidebar:n,setTopLevelSidebar:d}=e;return(0,r.useEffect)(()=>{if(l&&i){t(void 0),d(void 0);return}l||i?(d(void 0),t(l?"chapterSidebar":"sidebar")):d("sidebar"===o?"chapterSidebar":"sidebar")},[l,i]),{isTopLevelSidebar:"sidebar"===n,isTopLevelChapterSidebar:"chapterSidebar"===n,isBottomLevelSidebar:"sidebar"===o,isBottomLevelChapterSidebar:"chapterSidebar"===o}};i("117232");var iH=i("541493");let iZ=e=>{try{let l=JSON.parse(e);return(null==l?void 0:l.query_type)==="ai"}catch(e){return!1}},iK=function(e){var l;let{needFoldText:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{needFoldText:!1},o=null==e?void 0:null===(l=e.suggestWords)||void 0===l?void 0:l.filter(e=>e.scene===eH.gQ.FeedBottomRec),t=[],n=[];return null==o||o.forEach(e=>{let{words:l=[],hintText:o}=e,r=(null==l?void 0:l.length)||0;l.forEach((e,l)=>{let{word:d,info:a}=e;if(!d)return null;iZ(a)||localStorage.getItem("isAiSearchForceTrue")?n.push({index:l,type:I.WZ.AiSearch,title:i?`${o}`:`${o}:${d}`,word:d,hintText:o,searchWord:e,wordsNum:r,itemClassName:c()(iH.default.relatedSearch),textClassName:c()(iH.default.relatedSearchText)}):t.push({index:l,type:I.WZ.RelatedSearch,title:i?`${o}`:`${o}:${d}`,word:d,hintText:o,searchWord:e,wordsNum:r,itemClassName:c()(iH.default.relatedSearch),textClassName:c()(iH.default.relatedSearchText)})})}),{relatedSearchFeedBars:t,aiSearchFeedBars:n,hasSearchFeedBar:!!((null==t?void 0:t.length)||(null==n?void 0:n.length))}},i$=e=>{var l;let{withCtr:i,awemeInfo:o,showRelatedTabList:t,abtestData:n,recommendScore:r={}}=e,{showHot:d,showMix:a,showAiSearch:u,showRelateSearch:s}=r,c=!i||(null==n?void 0:n.searchUseCtr)!==1||!!u,v=!i||(null==n?void 0:n.searchUseCtr)!==1||!!s;return[{isShow:(!i||(null==n?void 0:n.searchUseCtr)!==1||!!a)&&!!(null==o?void 0:null===(l=o.seriesInfo)||void 0===l?void 0:l.seriesId),priority:a,feedBarTag:I.WZ.Series,cardTab:w.L.Series},{isShow:!i||!!a,priority:a,feedBarTag:I.WZ.Mix,cardTab:w.L.Mix},{isShow:!i||!!d,priority:d,feedBarTag:I.WZ.Hot,cardTab:w.L.Hot},{isShow:n.sortWebrecFeed!==eq.CommonSwitch.On||c,priority:n.sortWebrecFeed===eq.CommonSwitch.On?u:s,feedBarTag:I.WZ.AiSearch},{isShow:v,priority:s,feedBarTag:I.WZ.RelatedSearch}].filter(e=>{let{cardTab:l,feedBarTag:i,isShow:o}=e;return o&&(t.includes(l)||i===I.WZ.RelatedSearch||i===I.WZ.AiSearch)}).sort((e,l)=>l.priority-e.priority).map(e=>{let{feedBarTag:l}=e;return l})},iz=e=>{var l,i;let{showRelatedTabList:o,awemeInfo:t,scene:n,abtestData:r}=e||{},d=(null==t?void 0:null===(i=t.webRawData)||void 0===i?void 0:null===(l=i.CTR)||void 0===l?void 0:l.recommendScore)||{},a=n===I.lT.Recommend,u=t.awemeType===k.e.XgVideo,s=t.awemeType===k.e.Normal,c=t.awemeType===k.e.Note,{hasSearchFeedBar:v}=iK(t),m=(null==r?void 0:r.searchUseCtr)===1||n===I.lT.Friend||d.showRelateSearch;return u?[]:a||s?i$({withCtr:!0,awemeInfo:t,showRelatedTabList:o,abtestData:r,recommendScore:d}):c&&v&&!m?[I.WZ.RelatedSearch,I.WZ.AiSearch]:[]},iY=e=>{let{showRelatedTabList:l,awemeInfo:i,scene:o,abtestData:t}=e||{},n=o===I.lT.Recommend,r=i.awemeType===k.e.XgVideo,d=i.awemeType===k.e.Normal,a=i.awemeType===k.e.Note,{hasSearchFeedBar:u}=iK(i);return n&&!r||d?i$({withCtr:!1,awemeInfo:i,showRelatedTabList:l,abtestData:t}):a&&u?[I.WZ.RelatedSearch,I.WZ.AiSearch]:[]},iq=e=>{let{awemeInfo:l,showRelatedTabList:i=[],withCtr:o=!0,scene:t,abtestData:n,originAwemeInfo:d,actions:a,canShowMixCard:u=!1,canShowSeriesCard:s=!1,canShowRelatedSearchFeedBar:v=!1,isShowSideBar:m,isInnerFeed:f,player:_,isActive:h}=e,[g,C]=(0,r.useState)(!1),w=(0,r.useMemo)(()=>l?o?iz({awemeInfo:l,showRelatedTabList:i,scene:t,abtestData:n}):iY({awemeInfo:l,showRelatedTabList:i,scene:t,abtestData:n}):[],[l,i,o,t,n]);return(0,r.useEffect)(()=>{if(_&&(null==n?void 0:n.controlAdapt)){let e=e=>{var l,i;let o=(null==e?void 0:e.vWidth)||(null==_?void 0:null===(i=_.video)||void 0===i?void 0:null===(l=i.getBoundingClientRect())||void 0===l?void 0:l.width)||0;G.Le.setConfig(G.gI.videoRect,{width:o}),o<=380?C(!0):C(!1)};return _.on(p.Events.VIDEO_RESIZE,e),()=>{_.off(p.Events.VIDEO_RESIZE,e)}}},[_,n]),(0,r.useEffect)(()=>{if(_&&(null==n?void 0:n.controlAdapt)){var e;let l=null===(e=G.Le.getConfig(G.gI.videoRect))||void 0===e?void 0:e.width;if(!!l)l<=380?C(!0):C(!1)}},[_,n,h]),{videoTags:(0,r.useMemo)(()=>{var e,i,o,t,r,d,m,_,h,p,C,y,S,T,L,E,k;let b=[];if(u&&(null==l?void 0:null===(e=l.mixInfo)||void 0===e?void 0:e.status)!==-1){let e=g?"合集":`合集:${null==l?void 0:null===(d=l.mixInfo)||void 0===d?void 0:d.mixName}`;b.push({type:I.WZ.Mix,title:e,onClick:e=>{var l;return null===(l=a.handleMixClick)||void 0===l?void 0:l.call(a,e)},itemClassName:c()(iH.default.mix),textClassName:c()(iH.default.mixText)})}if(s&&(null==l?void 0:null===(i=l.seriesInfo)||void 0===i?void 0:i.status)!==-1){let e=(null==l?void 0:null===(m=l.seriesInfo)||void 0===m?void 0:m.seriesName)||"",i=e;g&&(i=(null==e?void 0:e.includes("合集"))?"合集":"短剧"),b.push({type:I.WZ.Series,title:i,onClick:e=>{var l;return null===(l=a.handleSeriesClick)||void 0===l?void 0:l.call(a,e)},itemClassName:c()(iH.default.mix),textClassName:c()(iH.default.mixText)})}if((null==l?void 0:null===(o=l.hotList)||void 0===o?void 0:o.title)&&(null==l?void 0:null===(t=l.hotList)||void 0===t?void 0:t.rank)!==51&&(null==l?void 0:null===(r=l.hotList)||void 0===r?void 0:r.type)!==2){let e=(null==l?void 0:null===(_=l.hotList)||void 0===_?void 0:_.rank)?`${null==l?void 0:null===(h=l.hotList)||void 0===h?void 0:h.header}TOP${null==l?void 0:null===(p=l.hotList)||void 0===p?void 0:p.rank}: ${null==l?void 0:null===(C=l.hotList)||void 0===C?void 0:C.title}`:`置顶热榜:${null==l?void 0:null===(y=l.hotList)||void 0===y?void 0:y.title}`;e=g?"热榜":e,b.push({type:I.WZ.Hot,title:e,customProps:{trending_topic:null==l?void 0:null===(S=l.hotList)||void 0===S?void 0:S.title,first_tag_name:null==l?void 0:null===(T=l.hotList)||void 0===T?void 0:T.header,top:null==l?void 0:null===(L=l.hotList)||void 0===L?void 0:L.rank},onClick:a.handleHotClick,itemClassName:(null==l?void 0:null===(E=l.hotList)||void 0===E?void 0:E.rank)?c()(iH.default.rankHot):c()(iH.default.hot),textClassName:(null==l?void 0:null===(k=l.hotList)||void 0===k?void 0:k.rank)?c()(iH.default.rankHotText):c()(iH.default.hotText)})}if(v){let{relatedSearchFeedBars:e,aiSearchFeedBars:i}=iK(l,{needFoldText:g});b.push(...i,...e)}return f?b.filter(e=>e.type===I.WZ.RelatedSearch||e.type===I.WZ.AiSearch):n.sortWebrecFeed===eq.CommonSwitch.On?b.filter(e=>{let{type:l}=e;return w.includes(l)}).sort((e,l)=>w.indexOf(e.type)-w.indexOf(l.type)):b.filter(e=>{let{type:l}=e;return w.includes(l)})},[w,d,l,a,u,v,m,f,n])}};var iJ=i("537694"),iX=i("118616"),iQ=i("46892"),i0=i("545467"),i1=i("110843");let i2=(0,r.forwardRef)((e,l)=>(0,n.jsx)("svg",(0,d._)((0,t._)({xmlns:"http://www.w3.org/2000/svg",width:36,height:36,fill:"none",ref:l},e),{children:(0,n.jsx)("path",{d:"M22.133 23.776a1.342 1.342 0 1 0 1.898-1.898l-4.112-4.113 4.112-4.112a1.342 1.342 0 1 0-1.898-1.898l-4.112 4.112-4.113-4.112a1.342 1.342 0 1 0-1.898 1.898l4.113 4.112-4.113 4.113a1.342 1.342 0 0 0 1.898 1.898l4.113-4.113 4.112 4.113z",fill:"#fff",fillOpacity:".34"})}))),i3=(0,r.forwardRef)((e,l)=>(0,n.jsx)("svg",(0,d._)((0,t._)({xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",ref:l},e),{children:(0,n.jsx)("path",{d:"M14.787 13.997a2.322 2.322 0 0 1-2.157 1.463H5.785V5.816l3.857-4.115a1.42 1.42 0 0 1 2-.072.92.92 0 0 1 .2.333c.053.14.08.275.08.403 0 .163-.022.325-.064.483l-.02.075-.688 2.893h4.114c.709 0 1.283.574 1.283 1.283v1.366c0 .737-.14 1.466-.412 2.15l-1.348 3.381zM4.731 5.817v9.643H3.317c-.71 0-1.286-.576-1.286-1.286V7.102c0-.71.576-1.285 1.286-1.285h1.414z",fill:"#fff"})}))),i5=(0,r.forwardRef)((e,l)=>(0,n.jsx)("svg",(0,d._)((0,t._)({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none",ref:l},e),{children:(0,n.jsx)("path",{d:"M3.803 9.864a.75.75 0 0 1 0-1.061L6.606 6 3.803 3.197a.75.75 0 0 1 1.06-1.06L8.198 5.47a.75.75 0 0 1 0 1.06L4.864 9.864a.75.75 0 0 1-1.06 0z",fill:"#fff",fillOpacity:".34"})})));var i6=i("719829");let i4=(0,r.forwardRef)((e,l)=>(0,n.jsx)("svg",(0,d._)((0,t._)({xmlns:"http://www.w3.org/2000/svg",width:36,height:36,fill:"none",ref:l},e),{children:(0,n.jsx)("path",{d:"M22.592 25.935a1.928 1.928 0 0 1-2.727 0l-7-7a1.928 1.928 0 0 1 0-2.728l.015-.015 6.985-6.985a1.929 1.929 0 1 1 2.727 2.727l-5.637 5.637 5.637 5.637a1.928 1.928 0 0 1 0 2.727z",fill:"#fff",fillOpacity:".5",opacity:".7"})}))),i9=(0,r.forwardRef)((e,l)=>(0,n.jsx)("svg",(0,d._)((0,t._)({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",ref:l},e),{children:(0,n.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.818 10.818a1 1 0 0 1 1.414-.022l3.803 3.686 7.348-10.407a1 1 0 0 1 1.634 1.153L8.995 16.59a1 1 0 0 1-1.513.141l-4.642-4.5a1 1 0 0 1-.022-1.413z",fill:"#FE2C55"})}))),i8=[{id:0,label:"互相关注的人可见"},{id:1,label:"粉丝可见"}],i7=e=>{let{onBack:l,className:i,privacySetting:o,onPrivacySettingChange:t}=e,r=e=>{t(e)};return(0,n.jsxs)("div",{className:c()(i6.default.settingContainer,i),children:[l&&(0,n.jsx)(iX.Z,{className:i6.default.backButton,onClick:l,src:i4,width:36,height:36,viewBox:"0 0 36 36"}),(0,n.jsxs)("div",{className:i6.default.contentWrapper,children:[(0,n.jsx)("div",{className:i6.default.title,children:"谁可以看到我的推荐 (包含历史推荐内容)"}),(0,n.jsx)("div",{className:i6.default.optionsList,children:i8.map(e=>(0,n.jsxs)("div",{className:c()(i6.default.optionItem,{[i6.default.selected]:o===e.id}),onClick:()=>r(e.id),children:[(0,n.jsx)("span",{className:i6.default.optionLabel,children:e.label}),o===e.id&&(0,n.jsx)(iX.Z,{src:i9,width:20,height:20,viewBox:"0 0 20 20",className:i6.default.checkIcon})]},e.id))})]})]})};var oe=i("203085"),ol=i("915268"),oi=i("944180");let oo=e=>{let{userList:l=[],awemeInfo:i,onClose:o,className:t,userInfo:d,player:a}=e,[u,s]=(0,r.useState)(!1),[v,m]=(0,r.useState)(0),f=(0,r.useRef)(null),{isListenVideoMiniWin:_}=(0,et.Iq)(e=>{let{isListenVideoMiniWin:l}=e;return{isListenVideoMiniWin:l}}),h=(0,r.useMemo)(()=>null==l?void 0:l.find(e=>{var l,i;return String(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.uid)===(null==d?void 0:null===(i=d.info)||void 0===i?void 0:i.uid)}),[l,d]),g=(0,r.useMemo)(()=>{var e;let l=(null==i?void 0:null===(e=i.stats)||void 0===e?void 0:e.recommendCount)||0;return h?l+1:l},[i,h]),I=(0,ol.w)({clickMethod:"share"});(0,r.useEffect)(()=>{(async()=>{let{data:e,statusCode:l}=await (0,i0.s$)();if(0===l){let{recommendVisibility:l}=e;m(l)}})()},[]),(0,b.o)(()=>{let e=e=>{"cancel_recommend"===e.action&&h&&1===l.length&&o()};return null==a||a.on(p.Events.USER_ACTION,e),()=>{null==a||a.off(p.Events.USER_ACTION,e)}},[a,h,l]),(0,r.useEffect)(()=>{let e=e=>{e.stopPropagation()},l=f.current;return l&&l.addEventListener("wheel",e),()=>{l&&l.removeEventListener("wheel",e)}},[]);let C=(0,r.useMemo)(()=>{if(h){let e=l.length-1;return e>0?`你和 ${e} 个关注的人推荐`:"你推荐了视频"}return`${l.length} 个关注的人推荐`},[l]),w=e=>{var l,i,o;let t;t=String(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.uid)===(null==d?void 0:null===(i=d.info)||void 0===i?void 0:i.uid)?"self":null==e?void 0:null===(o=e.user)||void 0===o?void 0:o.sec_uid;let n=(0,iQ.HC)(t,"showTab=recommend&enter_method=recommend_panel");_&&iJ.T.exit(),window.open(n,"_blank","noopener")},y=e=>{D.emit(D.EVENT.sendImUserMsg,{uid:e,enterMethod:oe.Q.recommend_side_card}),I()},S=()=>{D.emit(D.EVENT.OpenJXModal,{source:"recommend_panel",logParams:{group_id:null==i?void 0:i.awemeId,author_id:String(null==i?void 0:i.authorUserId)}}),oi.Z.sendLog("fromDiscoverLabel",{group_id:null==i?void 0:i.awemeId,author_id:String(null==i?void 0:i.authorUserId),enter_from:"recommend_panel",action_type:"click"})};return(0,r.useEffect)(()=>{var e;(null===(e=l.slice(0,h?31:30))||void 0===e?void 0:e.some(e=>"568863"===String(null==e?void 0:e.recommend_app_id)))&&oi.Z.sendLog("fromDiscoverLabel",{group_id:null==i?void 0:i.awemeId,author_id:String(null==i?void 0:i.authorUserId),enter_from:"recommend_panel",action_type:"show"})},[l,h,i]),(0,n.jsxs)("div",{className:c()(i1.default.cardContainer,t),ref:f,children:[(0,n.jsxs)("div",{className:i1.default.recommendUserPanel,style:u?{display:"none"}:{},children:[(0,n.jsxs)("div",{className:i1.default.header,children:[(0,n.jsxs)("div",{className:i1.default.titleSection,children:[(0,n.jsx)("h3",{className:i1.default.title,children:C}),(0,n.jsx)("p",{className:i1.default.subtitle,children:`共${(0,ln.qe)(g)}人推荐此精选内容`})]}),(0,n.jsx)(iX.Z,{className:i1.default.closeButton,onClick:o,src:i2,width:36,height:36,viewBox:"0 0 36 36"})]}),(0,n.jsx)("div",{className:i1.default.userList,children:l.slice(0,h?31:30).map((e,l)=>{var i,o,t,r,d;return(0,n.jsxs)("div",{className:i1.default.userItem,children:[(0,n.jsx)("img",{src:null==e?void 0:null===(t=e.user)||void 0===t?void 0:null===(o=t.avatar)||void 0===o?void 0:null===(i=o.url_list)||void 0===i?void 0:i[0],className:i1.default.avatar,onClick:()=>{w(e)}}),(0,n.jsxs)("div",{className:i1.default.userInfo,children:[(0,n.jsx)("div",{className:i1.default.userNameRow,onClick:()=>{w(e)},children:(0,n.jsx)("span",{className:i1.default.userName,children:null==e?void 0:null===(r=e.user)||void 0===r?void 0:r.nickname})}),"568863"===String(null==e?void 0:e.recommend_app_id)&&(0,n.jsxs)("p",{className:i1.default.userSource,onClick:S,children:["来自抖音精选App",(0,n.jsx)(iX.Z,{src:i5,width:12,height:12,viewBox:"0 0 12 12"})]})]}),(!h||l>0)&&(0,n.jsx)("div",{className:i1.default.sendMessageButton,onClick:()=>{var l;return y(String(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.uid))},children:"发私信"})]},null==e?void 0:null===(d=e.user)||void 0===d?void 0:d.uid)})}),(0,n.jsxs)("div",{className:i1.default.footer,children:[(0,n.jsxs)("div",{className:i1.default.privacyText,children:["你的推荐仅",0===v?"互相关注的人可见":"粉丝可见",(0,n.jsx)("span",{className:i1.default.settingsLink,onClick:()=>{s(!0)},role:"button",tabIndex:0,children:"设置"})]}),h?(0,n.jsx)("div",{className:i1.default.cancelRecommendButton,onClick:()=>{null==a||a.emit(p.Events.USER_ACTION,{action:"cancel_recommend",source:"friends_like_list"}),h&&1===l.length&&o()},children:"取消推荐"}):(0,n.jsxs)("div",{className:i1.default.recommendButton,onClick:()=>{null==a||a.emit(p.Events.USER_ACTION,{action:"recommend",source:"friends_like_list"})},children:[(0,n.jsx)(iX.Z,{src:i3,width:18,height:18,viewBox:"0 0 18 18",className:i1.default.recommendButtonIcon}),"推荐"]})]})]}),u&&(0,n.jsx)(i7,{onBack:()=>{s(!1)},privacySetting:v,onPrivacySettingChange:e=>{m(e),(0,i0.a3)({on:!!e,field:"recommend_visibility"})}})]})};var ot=i("175390");let on=e=>{let{awemeInfo:l,guideTagTriggerSource:i,abTestData:o}=e,{stats:{recommendCount:t=0}={}}=l,n=(0,r.useRef)("mutual"),d=(0,r.useMemo)(()=>{let e=null==o?void 0:o.familiarRecommendEntranceCountLabelCondition;return e?t>e?`共${(0,ln.qe)(t)}人推荐`:"点击推荐":"点击推荐"},[o,t]);return{handleRecommendReport:async e=>{var o,r,a,u,s,c,v,m,f,_;let{data:h,statusCode:g}=await (0,i0.s$)();if(0===g){let{recommendVisibility:e}=h;n.current=0===e?"mutual":"fans"}oi.Z.sendLog("recommendVideoToast",{group_id:null==l?void 0:l.awemeId,author_id:String(null==l?void 0:l.authorUserId),action_type:"click",relation_tag:null==l?void 0:null===(o=l.authorInfo)||void 0===o?void 0:o.followStatus,enter_from:(0,F.vM)(),enter_method:e,label_related_action:"label"===e?i:"",label_text:"label"===e?d:"",like_cnt:t,follow_cnt:"plus_one"===e?null==l?void 0:null===(u=l.friendRecommendInfo)||void 0===u?void 0:null===(a=u.label_user_list)||void 0===a?void 0:null===(r=a.filter(e=>{var l;return(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.follow_status)===1}))||void 0===r?void 0:r.length:void 0,mutual_cnt:"plus_one"===e?null==l?void 0:null===(v=l.friendRecommendInfo)||void 0===v?void 0:null===(c=v.label_user_list)||void 0===c?void 0:null===(s=c.filter(e=>{var l;return(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.follow_status)===2}))||void 0===s?void 0:s.length:void 0,friend_user_id:null==l?void 0:null===(_=l.friendRecommendInfo)||void 0===_?void 0:null===(f=_.label_user_list)||void 0===f?void 0:null===(m=f.map(e=>{var l;return null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.uid}))||void 0===m?void 0:m.join(","),recommend_range:n.current})},handleCancelRecommendReport:async e=>{var i;let{data:o,statusCode:t}=await (0,i0.s$)();if(0===t){let{recommendVisibility:e}=o;n.current=0===e?"mutual":"fans"}oi.Z.sendLog("cancelRecommendVideo",{group_id:null==l?void 0:l.awemeId,author_id:String(null==l?void 0:l.authorUserId),action_type:"click",relation_tag:null==l?void 0:null===(i=l.authorInfo)||void 0===i?void 0:i.followStatus,enter_from:(0,F.vM)(),enter_method:e,recommend_range:n.current})}}};function or(e,l,i,o){if(i!==I.lT.Recommend||o&&i===I.lT.Recommend)return!0;switch(l){case"digg":return e>=-1;case"share":return e>=.7;case"play":return e>=1.65;default:return!1}}function od(e){var l,i,o;return{user:{avatar:{url_list:[null==e?void 0:null===(l=e.info)||void 0===l?void 0:l.avatarUrl]},uid:Number(null==e?void 0:null===(i=e.info)||void 0===i?void 0:i.uid),nickname:null==e?void 0:null===(o=e.info)||void 0===o?void 0:o.nickname}}}let oa=(e,l)=>{let i=G.Le.getConfig(G.gI.RecommendStatusCache)||{},o=i[e];o?G.Le.setConfig(G.gI.RecommendStatusCache,(0,d._)((0,t._)({},i),{[e]:(0,t._)({},o,l)})):G.Le.setConfig(G.gI.RecommendStatusCache,(0,d._)((0,t._)({},i),{[e]:l}))},ou=(e,l)=>{let i=(G.Le.getConfig(G.gI.RecommendStatusCache)||{})[e];return i?i[l]:null},os=e=>{let{awemeInfo:l,player:i,userInfo:o,abTestData:n,userDispatch:a,scene:u,isUpperFeed:s}=e,{userRecommendStatus:c,status:{allowFriendRecommendGuide:v,allowSelfRecommendToFriend:m}={},friendRecommendInfo:f}=l,{isLogin:_}=o,h=v&&m,g=(null==f?void 0:f.recommend_predict_rate)||0,I=()=>{var e,i;if(!m||!_)return;let o=null===(e=G.Le.getConfig(G.gI.RecommendStatusCache))||void 0===e?void 0:e[l.awemeId];if(o)return o.recommendTagType;let t=2===c||(null==f?void 0:null===(i=f.label_user_list)||void 0===i?void 0:i.length)>0?"white":void 0;return oa(l.awemeId,{recommendTagType:t}),t},C=()=>{if(!_)return(null==f?void 0:f.label_user_list)||[];let e=ou(l.awemeId,"selfRecommend");return(null!=e?e:2===c)?[od(o),...(null==f?void 0:f.label_user_list)||[]]:(null==f?void 0:f.label_user_list)||[]},[w,y]=(0,r.useState)(I),[S,T]=(0,r.useState)(C),L=(0,r.useRef)(ou(l.awemeId,"guideTagTriggerSource")||void 0),E=(0,r.useRef)(ou(l.awemeId,"recommendTriggerSource")||("white"===w?"feed":void 0)),k=(0,r.useRef)(ou(l.awemeId,"cancelRecommend")||!1),P=(0,r.useRef)(!1),N=(0,r.useRef)(!1),{handleCancelRecommendReport:A,handleRecommendReport:x}=on({awemeInfo:l,abTestData:n,guideTagTriggerSource:L.current}),R=(0,r.useMemo)(()=>null==S?void 0:S.find(e=>{var l,i;return String(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.uid)===(null==o?void 0:null===(i=o.info)||void 0===i?void 0:i.uid)}),[S,o]),M=(0,r.useMemo)(()=>m&&!R&&!k.current,[m,R]),V=()=>{if(!w&&!!h&&!!or(g,"digg",u,s)&&!k.current&&!!_)L.current="like",y("guide"),oa(l.awemeId,{recommendTagType:"guide",guideTagTriggerSource:"like"})},F=()=>{let e=cookies.getItem({sKey:l5.CookieKeys.shareRecommendGuideTagNegative}),i=cookies.getItem({sKey:l5.CookieKeys.totalRecommendGuideTagNegative});if(w||e||i||!h||!or(g,"share",u,s)||k.current||!_)return;y("guide"),L.current="share",oa(l.awemeId,{recommendTagType:"guide",guideTagTriggerSource:"share"});let o=Number(cookies.getItem({sKey:l5.CookieKeys.shareRecommendGuideTagCount}))||0,t=Number(cookies.getItem({sKey:l5.CookieKeys.totalRecommendGuideTagCount}))||0;cookies.setItem(l5.CookieKeys.shareRecommendGuideTagCount,o+1),cookies.setItem(l5.CookieKeys.totalRecommendGuideTagCount,t+1)},j=()=>{let e=cookies.getItem({sKey:l5.CookieKeys.playRecommendGuideTagNegative}),i=cookies.getItem({sKey:l5.CookieKeys.totalRecommendGuideTagNegative});if(w||e||i||!h||!or(g,"play",u,s)||k.current||!_)return;y("guide"),L.current="play",oa(l.awemeId,{recommendTagType:"guide",guideTagTriggerSource:"play"});let o=Number(cookies.getItem({sKey:l5.CookieKeys.playRecommendGuideTagCount}))||0,t=Number(cookies.getItem({sKey:l5.CookieKeys.totalRecommendGuideTagCount}))||0;cookies.setItem(l5.CookieKeys.playRecommendGuideTagCount,o+1),cookies.setItem(l5.CookieKeys.totalRecommendGuideTagCount,t+1)},B=async function(){var e;let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;y("white"),T(e=>(null==e?void 0:e.find(e=>{var l,t,n;return String(null==e?void 0:null===(l=e.user)||void 0===l?void 0:l.uid)===(null===(n=i||o)||void 0===n?void 0:null===(t=n.info)||void 0===t?void 0:t.uid)}))?e:[od(i||o),...e]),x(t),E.current=t,P.current=!0;let n=await (0,ot.a)(null==l?void 0:l.awemeId,(null==f?void 0:null===(e=f.label_user_list)||void 0===e?void 0:e.length)>0?1:0);if(P.current=!1,(null==n?void 0:n.status_code)===0)oa(l.awemeId,{recommendTagType:"white",selfRecommend:!0}),oa(null==l?void 0:l.awemeId,{recommendTriggerSource:t});else{ew.F.info("推荐失败,请稍后重试"),y(w),T((null==f?void 0:f.label_user_list)||[]);return}},O=async e=>{if(!!m&&!R&&!P.current){if(!(null==o?void 0:o.isLogin)){var l,i;(0,l_.default)({success:async()=>{let l=await (null==a?void 0:a({type:"updateUserInfo"}));B((0,d._)((0,t._)({},l),{info:l.user}),e)},headerText:"登录后即可推荐视频",enterMethod:"recommend",next:`https://${null===(i=window)||void 0===i?void 0:null===(l=i.location)||void 0===l?void 0:l.host}`});return}await B(null,e)}},U=async e=>{var i,t;if(P.current)return;k.current=!0,!(null==f?void 0:null===(i=f.label_user_list)||void 0===i?void 0:i.length)&&y(void 0),T((null==f?void 0:f.label_user_list)||[]),A(e),P.current=!0;let n=await (0,ot.T)(null==l?void 0:l.awemeId);if(P.current=!1,(null==n?void 0:n.status_code)===0)!(null==f?void 0:null===(t=f.label_user_list)||void 0===t?void 0:t.length)&&oa(l.awemeId,{recommendTagType:void 0}),oa(l.awemeId,{selfRecommend:!1,cancelRecommend:!0});else{ew.F.info("取消推荐失败,请稍后重试"),k.current=!1,y(w),T([od(o),...(null==f?void 0:f.label_user_list)||[]]);return}ew.F.info("已取消推荐")};return(0,b.o)(()=>{if(!m)return;let e=e=>{switch(e.action){case"digg":("open"===e.status||e.force)&&V();break;case"share":F();break;case"recommend":O(e.source);break;case"cancel_recommend":U(e.source);break;case"shortcut_recommend":{let e=R?"cancel_recommend":"recommend";null==i||i.emit(p.Events.USER_ACTION,{action:e,source:"P"})}}};null==i||i.on(p.Events.USER_ACTION,e);let o=D.listen(D.EVENT.syncInteractionStatus,i=>{let{awemeId:o,action:t}=i;o===(null==l?void 0:l.awemeId)&&e({action:t,force:!0})});return()=>{null==i||i.off(p.Events.USER_ACTION,e),o()}},[V,F,O,U,i,m,R,n,l]),(0,b.o)(()=>{var e,l;if(!h)return;let o=e=>{if("play"===L.current)return;let{currentTime:l}=e;l>=15&&j()},t=()=>{if("play"!==L.current)j()};return null==i||null===(e=i.on)||void 0===e||e.call(i,iC.B.TimeUpdate,o),null==i||null===(l=i.on)||void 0===l||l.call(i,iC.B.Ended,t),()=>{var e,l;null==i||null===(e=i.off)||void 0===e||e.call(i,iC.B.TimeUpdate,o),null==i||null===(l=i.off)||void 0===l||l.call(i,iC.B.Ended,t)}},[i,j,h,n]),(0,b.o)(()=>{!_&&(y(I()),T(C()))},[_]),(0,b.o)(()=>(y(I()),T(C()),L.current=ou(l.awemeId,"guideTagTriggerSource")||void 0,k.current=ou(l.awemeId,"cancelRecommend")||!1,P.current=!1,N.current=!1,()=>{if(!N.current){let e=Number(cookies.getItem({sKey:l5.CookieKeys.shareRecommendGuideTagCount}))||0,l=Number(cookies.getItem({sKey:l5.CookieKeys.playRecommendGuideTagCount}))||0,i=Number(cookies.getItem({sKey:l5.CookieKeys.totalRecommendGuideTagCount}))||0;e>=10&&(cookies.setItem(l5.CookieKeys.shareRecommendGuideTagNegative,1,7200),cookies.setItem(l5.CookieKeys.shareRecommendGuideTagCount,0)),l>=15&&(cookies.setItem(l5.CookieKeys.playRecommendGuideTagNegative,1,7200),cookies.setItem(l5.CookieKeys.playRecommendGuideTagCount,0)),i>=50&&(cookies.setItem(l5.CookieKeys.totalRecommendGuideTagNegative,1,7200),cookies.setItem(l5.CookieKeys.totalRecommendGuideTagCount,0))}}),[l]),{recommendTagType:w,userList:S,handleShare:F,handleLike:V,handleClickGuideTag:()=>{N.current=!0,"share"===L.current&&cookies.setItem(l5.CookieKeys.shareRecommendGuideTagCount,0),"play"===L.current&&cookies.setItem(l5.CookieKeys.playRecommendGuideTagCount,0),cookies.setItem(l5.CookieKeys.totalRecommendGuideTagCount,0),O("label")},triggerRecommend:O,cancelRecommend:U,shouldShowFollowRecBtn:M,recommended:R,guideTagTriggerSource:L.current,recommendTriggerSource:E.current}};var oc=i("191825"),ov=i("140726");let om=e=>{let{defaultOpenedCardType:l,defaultOpenedCardExtraProps:i}=e;(0,r.useEffect)(()=>{if("ai"===l)D.emit(D.EVENT.openAiCard,i)},[])},of=e=>{let{defaultShow:l=!1}=e,[i,o]=(0,r.useState)(l),t=(0,r.useRef)({}),n=(0,r.useRef)({});return{closeAllCommonCardsExcept:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];Object.keys(t.current).filter(l=>!e.includes(l)).forEach(e=>{let l=t.current[e];l&&(i.includes(e)||l.isShow)&&l.close()}),l.forEach(e=>{if(!!n.current[e]){if("chapter"===e&&!n.current.chapter.chapterSidebarHidden){var l,i;null===(l=(i=n.current.chapter).close)||void 0===l||l.call(i)}}})},closeOtherCard:e=>{if(Object.keys(t.current).forEach(l=>{if(l===e)return;let i=t.current[l];i&&i.isShow&&i.close()}),n.current.chapter&&!n.current.chapter.chapterSidebarHidden){var l,i;null===(l=(i=n.current.chapter).close)||void 0===l||l.call(i)}},registerCard:(e,l,i)=>{t.current[e]={isShow:l,close:i}},registerSpecialCards:(e,l)=>{n.current[e]=l},getIsCommonCardShow:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(e.length?e:Object.keys(t.current)).filter(e=>!l.includes(e)).some(e=>{var l,i;return null!==(i=null===(l=t.current[e])||void 0===l?void 0:l.isShow)&&void 0!==i&&i})},isCommonCardShow:i,setIsCommonCardShow:o}},o_=e=>{let{key:l,isShow:i,close:o,registerCard:t,setIsCommonCardShow:n,getIsCommonCardShow:d}=e;t(l,i,o),(0,r.useEffect)(()=>{n(d())},[i])};var oh=i("78190");let og=e=>{let{isUpperFeed:l,playPrevFunc:i,playNextFunc:o,changePrevVideo:t,changeNextVideo:n}=e,{fullScreenQuestionVars:d}=(0,et.Iq)(e=>{let{fullScreenQuestionVars:l}=e;return{fullScreenQuestionVars:l}}),a=(0,r.useCallback)(()=>{if(!eB.f.playNextInterceptor(d))l?n():o()},[l,n,o,d]);return{playSwitchNextVideo:a,playSwitchPrevVideo:(0,r.useCallback)(()=>{if(!eB.f.playPrevInterceptor(d))l?t():i()},[l,t,i,d])}};var op=i("847779"),oI=i("590555");let oC=e=>{let{modalEnterFrom:l,logParams:i,isActive:o,isCommonCardShow:t,showSideCard:n,chapterSliderShow:d,aiCardIsPined:a,useJxSlideInheritAndPin:u,useJxDefaultOpen:s,aiCardIsDefaultOpen:c,closeAiCard:v,openAiCard:m,awemeInfo:f,isInnerFeed:_,hasDefaultShowAiCardRef:g,isLogin:p,isShowAiCard:I,abTestData:C,checkAiNote:y,openRelatedCard:S}=e,{aiEntryVisible:T}=(0,lh.$)({isLogin:p,awemeInfo:f,checkAiNote:y}),L=(0,oI.d)(I),E=(0,oI.d)(T),k=(0,oI.d)(S),b=Number(null==C?void 0:C.aiSummary)>eq.AiSummaryType.V0;(0,h.Z)(()=>{(t||n||d)&&(!a||!u)&&v()},[t,a,n,d,u]),(0,r.useEffect)(()=>{if(!u&&o)return()=>{v()}},[o,u]),(0,h.Z)(()=>{!u&&!_&&v()},[_,u]),(0,h.Z)(()=>{!u&&(null==f?void 0:f.awemeId)&&v()},[null==f?void 0:f.awemeId,u]),(0,r.useEffect)(()=>{p&&!(null==L?void 0:L.current)&&(null==E?void 0:E.current)&&o&&(u&&a||s&&c&&!(null==g?void 0:g.current))&&m({tab:lN.X.Search,from:ee.jE.AutoShow})},[p,o,a,u,s,c]),(0,r.useEffect)(()=>{var e,o;let t=null==i?void 0:null===(e=i.search_params)||void 0===e?void 0:e.conversation_id;"ai_search"===l&&(null==i?void 0:null===(o=i.search_params)||void 0===o?void 0:o.open_conversation)==="1"&&t&&(b?setTimeout(()=>{let e=k.current;e?e({tab:w.L.AiCard,clickMethod:"auto",awemeInfo:f,preventCloseOnSameTab:!0}):D.emit(D.EVENT.OpenRelatedCard,{tab:w.L.AiCard,clickMethod:"auto",awemeInfo:f,isFromClientSync:!0,preventCloseOnSameTab:!0}),D.emit(D.EVENT.renderAiSearchCard,{awemeId:null==f?void 0:f.awemeId,from:ee.jE.AutoShow})},0):m({tab:lN.X.Search,cid:t}))},[i,l,b,null==f?void 0:f.awemeId])},ow="soda",oy=e=>{let{awemeInfo:l,isActive:i,defaultShow:o=!1,controller:n}=e,[d,a]=(0,r.useState)(o),u=(0,e3.Z)(e=>{a(!1)}),s=(0,e3.Z)(e=>{n.closeOtherCard(ow),a(!0)}),c=(0,e3.Z)(async e=>{if(!!i){if("video_bottom"===e.from){var o,t,n;eC.Z.report("click_ticker_icon_entrance",{author_id:(null==l?void 0:null===(o=l.authorInfo)||void 0===o?void 0:o.uid)||"",enter_from:(0,U.yW)(),enter_method:"video_bottom",group_id:(null==l?void 0:l.awemeId)||"",luna_group_id:String((null==l?void 0:null===(n=l.relatedMusicAnchor)||void 0===n?void 0:null===(t=n.extraJson)||void 0===t?void 0:t.luna_sid)||""),click_action:d?"off_luna_panel":"on_luna_panel"})}d?u(e):s(e)}});return(0,r.useEffect)(()=>{a(!1)},[i,null==l?void 0:l.awemeId]),o_((0,t._)({key:ow,isShow:d,close:u},n)),(0,r.useMemo)(()=>({isShow:d,open:s,close:u,click:c}),[d,s,u,c])},oS="douPlus",oT=e=>{let{awemeInfo:l,isLogin:i,isActive:o,userDispatch:n,defaultShow:d=!1,controller:a}=e,[u,s]=(0,r.useState)(d),[c,v]=(0,r.useState)(0),m=(0,r.useRef)(null),f=(0,e3.Z)(e=>{m.current&&(m.current=null),s(!1)}),_=(0,e3.Z)(e=>{var l;a.closeOtherCard(oS),v(null!==(l=e.seq)&&void 0!==l?l:0),s(!0)}),h=(0,e3.Z)(async e=>{if(m.current&&(m.current=null),!!o){if("share"===e.from||"more"===e.from){var l;eC.Z.report("click_dou_plus",{has_coupon:e.hasCoupon?1:0,action:u?"close":"open",dou_plus_source:"origin_entrance",dou_plus_sub_source:"douyin",dou_plus_medium:(null==e?void 0:e.from)==="share"?"douyin_PC_share":"douyin_PC_moresettings",dou_plus_entrance_type:1,dou_plus_entrance_level:1,dou_plus_entrance_seq:null!==(l=null==e?void 0:e.seq)&&void 0!==l?l:0,dou_plus_referer:"homepage_hot",target_step:1})}if(u){f(e);return}i?_(e):(0,l_.default)({enterMethod:e.from,success:async()=>{n({type:"updateUserInfo"}),m.current=()=>_(e)},onClose:()=>{}})}});return(0,r.useEffect)(()=>{m.current&&(m.current=null),s(!1)},[o,null==l?void 0:l.awemeId]),(0,r.useEffect)(()=>{if(m.current&&i&&o){var e;null===(e=m.current)||void 0===e||e.call(m),m.current=null}},[i,o]),o_((0,t._)({key:oS,isShow:u,close:f},a)),(0,r.useMemo)(()=>({isShow:u,open:_,close:f,click:h,seq:c}),[u,_,f,h,c])},oL="gameCard",oE=e=>{let{awemeInfo:l,isActive:i,defaultShow:o=!1,controller:n}=e,[d,a]=(0,r.useState)(o),[u,s]=(0,r.useState)(0),c=(0,e3.Z)(e=>{a(!1)}),v=(0,e3.Z)(e=>{var l;n.closeOtherCard(oL),s(null!==(l=e.seq)&&void 0!==l?l:0),a(!0)}),m=(0,e3.Z)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!!i){if(d){c(e);return}v(e)}});return(0,r.useEffect)(()=>{a(!1)},[i,null==l?void 0:l.awemeId]),o_((0,t._)({key:oL,isShow:d,close:c},n)),(0,r.useMemo)(()=>({isShow:d,open:v,close:c,click:m,seq:u}),[d,v,c,m,u])},ok=e=>{let{awemeInfo:l,isActive:i,abtestData:o,isLogin:t,dispatch:n,commonCardsController:r}=e,d=oE({awemeInfo:l,isActive:i,abtestData:o,isLogin:t,userDispatch:n,controller:r}),a=oT({awemeInfo:l,isActive:i,abtestData:o,isLogin:t,userDispatch:n,controller:r});return{sodaCtr:oy({awemeInfo:l,isActive:i,abtestData:o,isLogin:t,userDispatch:n,controller:r}),douPlusCtr:a,gameCtr:d}};i("104882");let ob=e=>{let{awemeInfo:l,player:i,abtestData:o,sliderConainerRef:t,isCutVideo:n}=e,d=(0,r.useCallback)(()=>{var e,l,o,t;let n=null==i?void 0:null===(t=i.plugins)||void 0===t?void 0:null===(o=t.srplugin)||void 0===o?void 0:null===(l=o._args)||void 0===l?void 0:null===(e=l.root)||void 0===e?void 0:e.querySelector(".object-fit-container");n&&(n.style.transform=""),(null==i?void 0:i.video)&&"style"in i.video&&(i.video.style.transform="")},[i]),a=(0,r.useCallback)(()=>{var e,r,a,u,s,c,v,m,f,_,h,g,p,I,C,w,y,S,T,L;if(null===(e=(0,U.yW)())||void 0===e?!void 0:!e.includes("search")){if(n||(null==l?void 0:l.horizontalType)!==2||!o.enableFakeHorizontal||!(null==l?void 0:null===(a=l.video)||void 0===a?void 0:null===(r=a.meta)||void 0===r?void 0:r.sandwich_info)||!(null==i?void 0:i.video)||"string"==typeof i.fakeScreenType&&"origin"!==i.fakeScreenType){d();return}try{let e,o;let n=JSON.parse(l.video.meta.sandwich_info),r=null==t?void 0:null===(u=t.current)||void 0===u?void 0:u.getBoundingClientRect(),a=l.video.width,E=l.video.height,k=n.top,b=n.bottom;if(!a||!E||!k||!b||!r){d();return}let P=r.width,N=r.height-48,A=P/N,x=1;if(A>a/E){let l=a/E*N*((null!==(s=n.right)&&void 0!==s?s:1)-(null!==(c=n.left)&&void 0!==c?c:0)),i=N*(b-k);l/i<A?(x=N/i,o=((1-b-k)/2*100).toFixed(10),e=((1-(null!==(v=n.right)&&void 0!==v?v:1)-(null!==(m=n.left)&&void 0!==m?m:0))/2*100).toFixed(10)):(x=P/l,o=((1-b-k)/2*100).toFixed(10),e=((1-(null!==(f=n.right)&&void 0!==f?f:1)-(null!==(_=n.left)&&void 0!==_?_:0))/2*100).toFixed(10))}else{let l=P*((null!==(h=n.right)&&void 0!==h?h:1)-(null!==(g=n.left)&&void 0!==g?g:0)),i=E/a*P*(b-k);l/i<A?(x=N/i,o=((1-b-k)/2*100).toFixed(10),e=((1-(null!==(p=n.right)&&void 0!==p?p:1)-(null!==(I=n.left)&&void 0!==I?I:0))/2*100).toFixed(10)):(x=P/l,o=((1-b-k)/2*100).toFixed(10),e=((1-(null!==(C=n.right)&&void 0!==C?C:1)-(null!==(w=n.left)&&void 0!==w?w:0))/2*100).toFixed(10))}if(i.video&&"style"in i.video){let l=null==i?void 0:null===(L=i.plugins)||void 0===L?void 0:null===(T=L.srplugin)||void 0===T?void 0:null===(S=T._args)||void 0===S?void 0:null===(y=S.root)||void 0===y?void 0:y.querySelector(".object-fit-container"),t=`scale(${x}) translateX(${e}%) translateY(${o}%)`;l&&(l.style.transform=t),i.video.style.transform=t}}catch(e){d()}}},[l,i,o,d,n]);(0,r.useEffect)(()=>{if(!o.enableFakeHorizontal||!i)return;let e=K.Z.bind(null==t?void 0:t.current,a);return null==a||a(),()=>null==e?void 0:e()},[t,a,o,n])};var oP=i("414644"),oN=i("706192");let oA=(0,v.ZP)(()=>Promise.all([i.e("74792"),i.e("96537"),i.e("19452"),i.e("34008")]).then(i.bind(i,646199)),{ssr:!1}),ox=(0,v.ZP)(()=>Promise.all([i.e("67539"),i.e("14856"),i.e("62074"),i.e("53062")]).then(i.bind(i,933872)),{ssr:!1}),oR=(0,v.ZP)(()=>i.e("83404").then(i.bind(i,459792)),{ssr:!1}),oM=(0,v.ZP)(()=>i.e("75739").then(i.bind(i,458049)),{ssr:!1}),oV=(0,v.ZP)(()=>Promise.all([i.e("22556"),i.e("23145"),i.e("21248"),i.e("74792"),i.e("33792"),i.e("58906"),i.e("505"),i.e("73239"),i.e("90397"),i.e("35827")]).then(i.bind(i,362015)),{ssr:!1}),oF=(0,v.ZP)(()=>Promise.all([i.e("22556"),i.e("23145"),i.e("21248"),i.e("74792"),i.e("33792"),i.e("58906"),i.e("505"),i.e("73239"),i.e("90397"),i.e("35827")]).then(i.bind(i,853771)),{ssr:!1}),oD=(0,v.ZP)(()=>Promise.all([i.e("22556"),i.e("23145"),i.e("21248"),i.e("74792"),i.e("33792"),i.e("58906"),i.e("505"),i.e("73239"),i.e("90397"),i.e("35827")]).then(i.bind(i,520572)),{ssr:!1}),oj=(0,v.ZP)(()=>i.e("30188").then(i.bind(i,773869)),{ssr:!1,resolveComponent:e=>e.SearchPlayerSideCard}),oB=(0,v.ZP)(()=>i.e("65520").then(i.bind(i,345838)),{ssr:!1}),oO=(0,v.ZP)(()=>i.e("81021").then(i.bind(i,213249)),{ssr:!1}),oU=[ee.jE.CommentNamedEntitySearchAiSearch,ee.jE.CommentRelatedSearchAiSearch],oW=(0,r.forwardRef)(function(e,l){var i,o,s,v,m,ea,eu,es,ec,ev,em,ef,eL,eE,eA,eR,eM,eV,eF,eD,eB,eU,eW,eH,eZ,eK,e$,ez,eY,eq,eJ,eX,e3,ll,li,lo,lt,ln,lr,ld,lu,ls,lf,l_,lh,lI,lC,lw,ly,lS;let{item:lT,playPrevFunc:lL,playNextFunc:lE,deleteCurrentSwiper:lk,fullScreenTarget:lN,isActive:lA,isNext:lF,isPrev:lB,swiper:lU,children:lZ,customProps:lK,isLast:l$,handleNextOnLast:lY,slideListInsideFunc:lq,InnerPlayer:l0,className:l1,isShowGuide:l3,isClientMiniWin:l5,style:l6,close:l4,hotDefaultList:l9,mixDefault:l8,seriesDefault:l7,relatedDefault:ie,currentAwemeInfo:il,onAwemeInfoChange:ii,clickedCard:io,moreBoxShowList:it,getCurrentTime:ir,modalInnerFeedCard:id,defaultOpenedCardType:ia,defaultOpenedCardExtraProps:iu,modalEnterFrom:iv,defaultCommentShow:im,startTime:i_,splashAdStatus:ih,changeSplashAdStatus:iI,isSplashTransitionEnd:iC,isFirst:iw,needStaticContainer:iy,searchSideCardProps:iT,onSearchTextClick:iL,searchListType:iE,hideSidebarSwitch:ik,searchFrom:ib,isDyPlayer:iP=!1,modalInnerPlayer:iN,index:iA,activityCardDirectOpen:ix,reuseConfig:iR}=e,{abtestData:iM={},tab:iD,userContext:iH,logParams:iZ}=lK||{},{isWebMiniWin:iK}=(0,et.Iq)(e=>{let{isWebMiniWin:l}=e;return{isWebMiniWin:l}}),i$=(0,r.useRef)(0);(0,u.C)(M.w3.components.container3);let iz=(0,r.useMemo)(()=>[I.lT.Recommend,I.lT.Follow,I.lT.Friend,I.lT.Topic,I.lT.Modal].includes(iD),[iD]),iY=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"inner_player",l=arguments.length>1?arguments[1]:void 0;if(!iz&&o1)return null==l4?void 0:l4(e,l);eI.Z.sendLog("closePlayer",{click_method:e,enter_from:l});let i=e;"click_screen"===e&&(i="click_blank"),C.logInstance.sendLog("closeVideoCard",{enter_method:i,type:l,enter_from_merge:(0,F.vM)()}),oz.dispatch("modalAwemeInfo",null),!tc.current&&D.emit(D.EVENT.pageFullScreen,{fullScreen:!1,playerId:null==oK?void 0:oK.playerId,oldFullScreen:!0,clickMethod:"inner_player"}),id&&setTimeout(()=>{null==l4||l4()})},iJ=(0,r.useRef)(null),iX=(0,r.useRef)(null),iQ=(0,r.useRef)(),{userInfo:i0,dispatch:i1}=iH||{},{isLogin:i2}=i0||{},i3=(0,r.useRef)(),{globalIsSideBarShow:i5,setIsSideBarShowFunc:i6,isFullScreen:i4,isCssFullScreen:i9,setTargetVideoRef:i8=()=>{},slideVideoTab:i7,setSlideVideoTab:oe,videoToast:ol=e=>ew.F.info(e,iX.current),dislikeIdList:oi,globalIsCommentTrayPushGuideShow:ot,globalCommentTrayPushGuideType:on,setCommentTrayPushGuideTypeFunc:or,setIsCommentTrayPushGuideShowFunc:od,globalIsShowAiCard:oa,setGlobalIsShowAiCard:ou,aiCardIsPined:oI,togglePinAiCard:ow,useJxSlideInheritAndPin:oy,useJxDefaultOpen:oS,aiCardIsDefaultOpen:oT,hasDefaultShowAiCardRef:oL,setHasDefaultShowAiCard:oE,hasDefaultOpenAiRelatedCardRef:oG}=(0,r.useContext)(X.C),[oH,oZ]=(0,r.useState)(!1),[oK,o$]=(0,r.useState)(null),{awemeFeed:oz,metaCtxId:oY}=(0,ek.j)(),[oq,oJ]=(0,r.useState)(null),oX=(0,r.useRef)(void 0),[oQ,o0]=(0,r.useState)(!1);(0,r.useEffect)(()=>{var e;if((null==iM?!void 0:null===(e=iM.authorOptimize)||void 0===e?!void 0:!e.render)||!!lA)return oz.subscribe("modalAwemeInfo",e=>{oJ(e)})},[lA,iM]);let o1=e.isUpperFeed||!!(iz&&oq),{pathname:o2}=(0,g.a)(),o3=(0,r.useRef)(o2),o5=(0,r.useRef)(o2);!(0,j.Nr)(o2)&&(o5.current=o2);let o6=(0,en.W)(e=>e.isSideBarShow),o4=(0,en.W)(e=>e.setIsSideBarShow),[o9,o8]=(0,r.useState)(w.L.Author),[o7,te]=(0,r.useState)(!1),[tl,ti]=(0,r.useState)(),[to,tt]=(0,r.useState)(),tn=i6||o4,tr=oe?i7:w.L.AbstractList,td=oe||o8,ta=(0,B.x)(),tu=[I.lT.Recommend].includes(iD)||iD===I.lT.Modal&&iv===y.a.WaterFall,ts=[I.lT.Recommend,I.lT.Follow,I.lT.Friend].includes(iD)||iD===I.lT.Modal&&el.D.includes(iv),tc=(0,r.useRef)(!1);(0,r.useEffect)(()=>{if(oK&&lA&&o1&&iz){!oK.fullscreen&&D.emit(D.EVENT.pageFullScreen,{clickMethod:"inner_feed",fullScreen:!0,playerId:oK.playerId});let e=e=>{D.emit(D.EVENT.pageFullScreen,{clickMethod:"inner_feed",fullScreen:!e,playerId:oK.playerId})};return null==oK||oK.on(p.Events.FULLSCREEN_CHANGE,e),()=>{null==oK||oK.off(p.Events.FULLSCREEN_CHANGE,e),D.emit(D.EVENT.pageFullScreen,{clickMethod:"inner_feed",fullScreen:!1,playerId:oK.playerId})}}},[o1,iz]);let tv=(0,r.useRef)(!1),tm=(0,r.useRef)(!1),tf=(0,r.useRef)(!1),t_=(0,r.useRef)(null),th=(0,r.useRef)(null),tg=(0,r.useRef)(null),tp=(0,r.useRef)(null),tI=(0,r.useRef)(null),tC=(0,r.useRef)(null),tw=(0,r.useRef)(),ty=iD===I.lT.Search&&(i4||i9),tS=(0,eS.G0)(ty),tT=(0,r.useRef)(null),tL=(0,r.useMemo)(()=>"string"==typeof ib&&ib.startsWith("video_abstract"),[ib]),tE=o1?oH:(!(0,S.Jt)(lT)||tr===w.L.Comment)&&(i6?i5:o6),tk=(0,r.useCallback)(ew.F.infoInModalVideo.bind(ew.F),[]),tb=o1||iD===I.lT.Modal?tk:ol;(0,r.useEffect)(()=>{if(!iz)return;let e=oz.subscribe("modalAwemeInfo",e=>{oz.dispatch("innerFeedAwemeInfo",e);let l=document.querySelector('[data-e2e="recommend-guide-mask"]');l&&e&&D.emit(D.EVENT.RecommendGuideClose),l=null,!id&&e&&oK.isActive&&oK.paused&&oK.play()});return()=>{e()}},[iz,oK,id]);let{changeListenVideoFeedIndex:tP}=eb({scene:iD===I.lT.Modal?"discover":iD,canUseListenFeed:tu,originAwemeInfo:lT,isActive:lA}),{changeNextVideo:tN,changePrevVideo:tA,awemeInfo:tx,updateAwemeInfo:tR,prevAwemeInfo:tM,nextAwemeInfo:tV,isInnerFeed:tF,enterFrom:tD,updateLogParams:tj,listenFeedNextAwemeInfo:tB,listenFeedPrevAwemeInfo:tO}=eO({abtestData:iM,player:oK,originAwemeInfo:(null==iM?void 0:null===(i=iM.authorOptimize)||void 0===i?void 0:i.render)?lA&&(iz&&oq||il)||lT:iz&&oq||il||lT,isActive:lA,isLast:l$,toast:tb,modalEnterFrom:iv,handleNextOnLast:lY,handleOuterPlayNext:lE,handleOuterPlayPrev:lL,isInnerFeedCondition:o1,scene:iD,canUseListenFeed:tu,changeListenVideoFeedIndex:tP});(0,r.useEffect)(()=>(null==ii||ii(tx),()=>{clearTimeout(oX.current)}),[tx]),eG({abtestData:iM,isActive:lA,awemeInfo:tx,isModal:o1,player:oK,scene:iD,fetchAuthorPost:async e=>{if(lA){var l;let i={userId:null==e?void 0:null===(l=e.authorInfo)||void 0===l?void 0:l.secUid,maxCursor:0,count:24,locateItemId:null==e?void 0:e.awemeId,whaleCutToken:""},o=(0,V.fetchUserPost)(i);op.Q.set(i,o)}}}),(0,r.useEffect)(()=>{let e=oz.getValue("activeIndex");return oz.subscribe("activeIndex",l=>{iz&&oz.getValue("modalAwemeInfo")&&(l>e?tN():l<e&&tA(),e=l)})},[tN,tA]),(0,r.useEffect)(()=>{if(oq&&lA)return iz&&(oZ(!0),oK&&(i$.current=oK.currentTime,oq.awemeId===tx.awemeId&&setTimeout(()=>{null==oK||oK.emit("enter_inner_feed")}))),()=>{var e,i,o,t;iz&&(null==oK||oK.emit("exit_inner_feed",tx.awemeId),(null===(t=l.current)||void 0===t?void 0:null===(o=t.getCurrAweme)||void 0===o?void 0:null===(i=o.call(t))||void 0===i?void 0:i.awemeId)===tx.awemeId&&(i$.current=0)),D.emit(null==D?void 0:null===(e=D.EVENT)||void 0===e?void 0:e.quitInnerFeed,!0)}},[!oq,iz]),(0,r.useEffect)(()=>{!o1&&(oZ(!1),rn(!1))},[o1]);let tU=(0,r.useMemo)(()=>!(0,T.p)(tx)||ih===L.QB.Fullscreen||ih===L.QB.Normal,[tx,ih,iC,iM,lA]);(0,r.useEffect)(()=>{O.H.cancelVideoGaussian(iM)&&!(0,T.p)(tx)&&[I.lT.Recommend,I.lT.Follow,I.lT.Friend,I.lT.Modal,I.lT.Discover].includes(iD)&&(lB?oX.current=setTimeout(()=>{o0(!0)},1e3):(o0(!1),clearTimeout(oX.current)))},[lF,lA,lB,iD,tx,ih]),(0,E.u)(ox);let{showRelatedTabList:tW,relatedBlockedByRecommendScore:tG}=eQ({awemeInfo:tx,currentVideoFeedRef:t_,lastVideoFeedAwemeRef:th,outFeedItem:lT,scene:iD,modalEnterFrom:iv,abtestData:iM,isInnerFeed:tF,isLogin:i2}),tH=tr===w.L.AiCard&&(null==tW?void 0:null===(o=tW.includes)||void 0===o?void 0:o.call(tW,w.L.AiCard)),tZ=tr===w.L.Comment,{defaultCard:tK}=e0({isActive:lA,awemeInfo:tx,clickedCard:null!=io?io:tZ?w.L.Comment:tH?w.L.AiCard:void 0,withCtr:iD===I.lT.Recommend}),t$=iv===y.a.WaterFall||iv===y.a.ShareModal&&"discover"===(0,U.yW)(),{autoOpenAiTab:tz}=e2({isLogin:i2,uid:null==i0?void 0:null===(s=i0.info)||void 0===s?void 0:s.uid,showRelatedTabList:tW,isJingxuan:t$,abtestData:iM}),tY=(0,r.useMemo)(()=>tL?w.L.AbstractList:(null==tx?void 0:tx.awemeType)!==k.e.XgVideo||[w.L.CollectFolder].includes(tK)?tK:w.L.Comment,[tK,tx,tr,tL]),{stopAutoPlay:tq}=e5({isShow:tE||o7||tm.current,player:oK,isActive:lA,awemeInfo:tx,abtestData:iM}),{curTab:tJ,curTabRef:tX,curVideoFeed:tQ,changeTab:t0,lastVideoFeedAweme:t1}=e6.nW({defaultTab:tY,isActive:lA,stopAutoPlay:tq,awemeInfo:tx,abtestData:iM,showSideCard:tE,slideVideoTab:tr,showRelatedTabList:tW});t_.current=tQ,th.current=t1,e4({originAwemeInfo:lT,awemeInfo:tx}),e9({awemeInfo:tx,curTab:tJ,isActive:lA,abtestData:iM,isUpperFeed:o1,modalAwemeInfo:oq,showRelatedTabList:tW,showSideCard:tE});let t2=()=>{iv===y.a.AiSearch&&oz.dispatch({modalAwemeInfo:null,nextAwemeInfo:null,prevAwemeInfo:null})},{handleAuthorVideoChange:t3,handleOtherVideoChange:t5}=e8({onChangeAwemeInfo:e=>{o1?tR(e):(null==e?void 0:e.inComingAwemeInfo)&&oz.dispatch("modalAwemeInfo",e.inComingAwemeInfo),(null==e?void 0:e.card)&&t0({tab:e.card})}}),{globalCommentCount:t6,updateGlobalCommentCount:t4,fetchComment:t9}=e7.x({awemeInfo:tx});le.U({isModal:o1,awemeInfo:tx,isActive:lA,fetchComment:t9,player:oK,showSideCard:tE,commentpreloadAbStatus:null==iM?void 0:iM.commentAiPreloadStatus,adCommentpreloadAbStatus:null==iM?void 0:iM.adCommentAiPreloadStatus,scene:iD,abUseSimpleNN:null==iM?void 0:iM.useSimpleNN,abVid:null==iM?void 0:iM.commentAiVid});let{reportParams:t8}=lc({originAwemeInfo:lT,awemeInfo:tx,logParams:(0,d._)((0,t._)({},iZ),{is_outflow:0===iA?1:0,item_rank:iA+1}),curCard:tJ,expandCard:tE?tJ:"",isSideBarShow:tE,isInnerFeedCondition:o1,searchSideCardProps:iT,modalEnterFrom:iv}),{hasRelatedCardShown:t7}=lv({isActive:lA,player:oK,showSideCard:tE});(0,r.useEffect)(()=>{tj({logParams:t8})},[t8]);let ne=of({defaultShow:!1}),{closeAllCommonCardsExcept:nl,closeOtherCard:ni,registerSpecialCards:no,isCommonCardShow:nt}=ne,nn=(0,r.useCallback)(e=>{let l="chapterSidebar"===e;ti(l?"sidebar":"chapterSidebar"),tt(l?"chapterSidebar":"sidebar")},[]),{isShowActivityCard:nr,activityName:nd,anchorData:na,openActivityCard:nu,closeActivityCard:ns}=lm.T({awemeInfo:tx,isActive:lA,onOpenCard:()=>{ni("activity")},abtestData:iM,isLogin:i2}),{sodaCtr:nc,douPlusCtr:nv,gameCtr:nm}=ok({awemeInfo:tx,isActive:lA,abtestData:iM,isLogin:i2,dispatch:i1,commonCardsController:ne}),{chapterProgress:nf,chapterSliderShow:n_,triggerChapterSliderShow:nh,setChapterSliderShow:ng}=eT({player:oK,awemeInfo:tx,abTestData:iM,chapterScrollElRef:tI,topLevelSidebar:to,activateCard:nn,resetClosingShopRef:()=>{tf.current=!1},isActive:lA,isInnerFeed:tF}),np=lg({awemeInfo:tx,isActive:lA,isInnerFeed:tF,onOpenCard:()=>{},abtestData:iM,toast:tb,isLogin:i2,accountParentEl:(0,W.r)()&&lN,onLoginSuccess:()=>{null==i1||i1({type:"updateUserInfo"})}}),nI=(null==np?void 0:np.renderAiCard)&&!(iD===I.lT.Search&&!o1)&&(null==np?void 0:np.isShowAiCard),nC=lp({awemeInfo:tx,isActive:lA,isInnerFeed:tF,globalIsShowAiCard:oa,setGlobalIsShowAiCard:ou,onOpenCard:()=>{nl(),n8(!1),ng(!1)},abtestData:iM,toast:tb,isLogin:i2,aiCardIsPined:oI,otherCardIsOpen:nt||n_||tE,accountParentEl:(0,W.r)()&&lN,aiSearchIsDefaultShow:oy&&oI||oS&&oT,setHasDefaultShowAiCard:oE,onLoginSuccess:()=>{null==i1||i1({type:"updateUserInfo"})},isAiNoteCardShow:nI}),nw=(0,r.useCallback)(e=>{var l;(null==e?void 0:e.source)==="close_btn"&&tJ===w.L.AiCard&&"auto"===i3.current&&t$&&(null==i0?void 0:null===(l=i0.info)||void 0===l?void 0:l.uid)&&(0,e1.B2)(i0.info.uid)},[tJ,i2,t$,null==i0?void 0:null===(v=i0.info)||void 0===v?void 0:v.uid]),ny=(0,r.useCallback)(e=>{var l,i;let{tab:o,clickMethod:t="",awemeInfo:n=tx,isFromUserPersonalPannel:r=!1,preventCloseOnSameTab:d}=e;nl(["videoDetail","recommendWhiteTag","ad","shopDetail"]);let a=[w.L.Comment,w.L.VideoDetail].includes(o)&&tE&&o===tJ&&nt,u="chapterSidebar"===to||nI||a;if(u&&nn("sidebar"),![w.L.Comment,w.L.VideoDetail,w.L.AiCard].includes(o)){if(o1){if(o===tJ&&!u)return iY()}else{td(o),t0({tab:o}),oz.dispatch({modalAwemeInfo:n,nextAwemeInfo:null,prevAwemeInfo:null}),C.logInstance.sendLog("enterVideoCardTab",{from_group_id:null==n?void 0:n.awemeId,type:o,enter_method:t,enter_from_merge:(0,F.vM)(),enter_from:null!==(l=null==iZ?void 0:iZ.enter_from)&&void 0!==l?l:(0,F.mo)(),tab_name:(null==iZ?void 0:iZ.tab_name)||(0,J.zD)(),module_name:null==iZ?void 0:iZ.module_name});return}}if(tE&&o===tJ&&!u){if(d)return;n8(!1,{from:t}),C.logInstance.sendLog("closeVideoCard",{type:o,enter_method:t,enter_from_merge:(0,F.vM)()})}else t0({tab:o}),td(o),n8(!0,{from:t}),C.logInstance.sendLog("enterVideoCardTab",{from_group_id:null==n?void 0:n.awemeId,type:o,enter_method:t,enter_from_merge:(0,F.vM)(),enter_from:null!==(i=null==iZ?void 0:iZ.enter_from)&&void 0!==i?i:(0,F.mo)(),tab_name:(null==iZ?void 0:iZ.tab_name)||(0,J.zD)(),module_name:null==iZ?void 0:iZ.module_name})},[tE,tx,o1,tJ,l4,iM,i9,to,nn,iD,np,nt]);(0,b.o)(()=>D.listen(D.EVENT.OpenRelatedCard,e=>{(null==e?void 0:e.isFromClientSync)&&ny(e)}),[iM]),(0,b.o)(()=>{let e=D.listen(D.EVENT.CloseRelatedCard,e=>{iY(null==e?void 0:e.from,null==e?void 0:e.enterFrom)});return()=>{null==e||e()}},[]),(0,r.useEffect)(()=>{if(!o1&&lA&&id){let e;let l="auto";"mix"===id?e=w.L.Mix:"author_card"===id?(e=w.L.Author,iv===y.a.FollowAuthorModal&&(l="click_follow_head_show")):"series"===id?e=w.L.Series:"collect_folder"===id&&(e=w.L.CollectFolder),e&&setTimeout(()=>{ny({tab:e,clickMethod:l})})}},[o1,id,ny,iv]),(0,r.useEffect)(()=>{if(oK&&oq&&!iz&&lA&&!o1){let e=oK.playerId;if((0,eo.OB)()===e||!oK.paused)return(0,eo.wS)(e,!1),oK.pause(),()=>{(0,eo.wS)(e,!0),setTimeout(()=>{oK.play()})}}},[oK,oq,lA,iz,o1]),(0,r.useEffect)(()=>{if(lA){let e=tE&&tJ===w.L.Comment;G.Le.setConfig(G.gI.IsCommetTab,e)}},[lA,tE,tJ]);let{closeAdCard:nS,isShowAdCard:nT,isAdAweme:nL}=lb({awemeInfo:tx,userInfo:i0,isActive:lA,abtestData:iM,toast:tb,isFirst:iw,isUpperFeed:o1,changeSplashAdStatus:iI}),{recommendTagType:nE,handleClickGuideTag:nk,userList:nb,shouldShowFollowRecBtn:nP,recommended:nN,guideTagTriggerSource:nA,recommendTriggerSource:nx}=os({isUpperFeed:o1,awemeInfo:tx,player:oK,userInfo:i0,abTestData:iM,userDispatch:i1,scene:iD}),{isShowRecommendWhiteTagSideCard:nR,openRecommendWhiteTagSideCard:nM,closeRecommendWhiteTagSideCard:nV}=lP({onOpenCard:()=>{nl([],["chapter"]),tE&&n8(!1)},awemeInfo:tx,isActive:lA,isInnerFeed:tF}),{closeAiCard:nF,isShowAiCard:nD,renderAiCard:nj,activeAiCardTab:nB,setActiveAiCardTab:nO,setAiNoteEnterMethod:nU,aiSearchProps:nW,aiNoteProps:nG,isAiNoteUseable:nH,openAiCard:nZ}=lx({awemeInfo:tx,isActive:lA,isInnerFeed:tF,globalIsShowAiCard:oa,setGlobalIsShowAiCard:ou,onOpenCard:()=>{nl(),n8(!1),ng(!1)},abtestData:iM,toast:tb,isLogin:i2,aiCardIsPined:oI,otherCardIsOpen:nt||n_||tE,accountParentEl:(0,W.r)()&&lN,aiSearchIsDefaultShow:oy&&oI||oS&&oT,setHasDefaultShowAiCard:oE,onLoginSuccess:()=>{null==i1||i1({type:"updateUserInfo"})}}),nK=null==nC?void 0:nC.isShowAiCard,n$=null==nC?void 0:nC.openAiCard,nz=null==nC?void 0:nC.closeAiCard,{openShopDetailCard:nY,isShowShopDetailSideCard:nq,closeShopDetailCard:nJ,isFirstLoad:nX,isAutoOpen:nQ}=lM.Y({awemeInfo:tx,isActive:lA,onOpenCard:()=>{nl(["videoDetail","recommendWhiteTag","shopDetail"])},isLogin:i2,accountParentEl:(0,W.r)()&&lN,onLoginSuccess:()=>{null==i1||i1({type:"updateUserInfo"})},onCloseCard:()=>{tf.current=!0},abtestData:iM,toast:tb}),{isShowVideoInfoSideCard:n0,closeVideoInfoSideCard:n1}=lV({awemeInfo:tx,isActive:lA,abtestData:iM,isInnerFeed:tF,onOpenCard:()=>{nl(["videoDetail"],["chapter"]),tE&&n8(!1)}});(0,h.Z)(()=>{nT&&(null==np||np.closeAiCard(),n1(),nV())},[nT]),(0,h.Z)(()=>{nl(["ad","shopDetail"])},[null==tx?void 0:tx.awemeId]);let n2=(0,r.useMemo)(()=>(0,P.o4)(tx),[tx]),n3=n2?(0,P.ZO)({rawAdData:(0,S.Rx)(tx)}):{},n5=n2?{promotion_id:n3.promotion_id,product_id:n3.product_id,shop_info:{author_id:null==tx?void 0:null===(m=tx.authorInfo)||void 0===m?void 0:m.uid}}:(null==tx?void 0:null===(eu=tx.anchorInfo)||void 0===eu?void 0:null===(ea=eu.extra)||void 0===ea?void 0:ea[0])||{},{sendPrefetch:n6,cancelPrefetch:n4}=(0,N._t)(()=>{var e;return(0,A.L)({promotionId:null==n5?void 0:n5.promotion_id,originType:638302,secAuthorId:null==tx?void 0:null===(e=tx.authorInfo)||void 0===e?void 0:e.secUid,roomId:"",itemId:null==tx?void 0:tx.awemeId})}),n9=(0,r.useCallback)(e=>{let{clickMethod:l}=e||{};return("hot_key"===l||"click_icon"===l)&&tE&&tJ===w.L.Comment&&nt?(!tv.current&&(tv.current=!0,D.emit(D.EVENT.videoStopPlayNext,{openSideCard:!0})),nl([]),!0):(ny({tab:w.L.Comment,clickMethod:l||"click_icon"}),(!tE||tJ!==w.L.Comment)&&(!!tE&&tJ!==w.L.Comment||!0))},[tE,ny,tJ,nt]);(0,h.Z)(()=>{tm.current=nq},[nq]);let n8=(e,l)=>{let{from:i}=l||{};!tv.current&&e&&"auto"!==i&&(tv.current=!0),tv.current&&!e&&(tv.current=!1,D.emit(D.EVENT.videoRemoveStopPlayNext,{openSideCard:!0})),o1?(oZ(e),e&&!tE&&nl(["ad"])):(null==tn||tn(e),e&&(nl(),(0,ej.nJ)(ej.mM.COMMENT_BTN_CLICKED)))},n7=(0,r.useMemo)(()=>tL?w.L.AbstractList:im?w.L.Comment:void 0,[im,tL]);(0,h.Z)(()=>{nK&&(nl(),n8(!1),ng(!1))},[nK]);let{openSpecificTab:re}=lD({showSideCard:tE,isActive:lA,originAwemeInfo:lT,showRelatedTabList:tW,slideVideoTab:tr,setSlideVideoTab:td,abtestData:iM,changeTab:t0,isUpperFeed:o1,defaultLandingTab:n7,handleShowSidebar:n8,logParams:iZ,searchFrom:ib,autoOpenAiTab:tz,hasDefaultOpenAiRelatedCardRef:oG,allowUpperFeed:t$,onAiRelatedAutoOpen:()=>{i3.current="auto"}}),rl=lj({awemeInfo:tx,isActive:lA,isShowAiCard:tE&&tJ===w.L.AiCard,enabled:null==tW?void 0:null===(es=tW.includes)||void 0===es?void 0:es.call(tW,w.L.AiCard)}),ri=(0,r.useCallback)(e=>{var l,i;if((null==e?void 0:e.source)==="close_btn"&&tJ===w.L.AiCard)eI.Z.sendLog("aiSearchSidebarClose",{enter_from:(0,U.yW)(),page_name:(0,U.yW)(),is_cold_start:(null===(l=rl.aiSearchProps)||void 0===l?void 0:l.isColdStart)?"1":"0",group_id:null==tx?void 0:tx.awemeId,is_class_video:(null==tx?void 0:null===(i=tx.douyinPcVideoExtra)||void 0===i?void 0:i.aiSearchPicture)===1?"1":"0",exit_code:0})},[null==tx?void 0:tx.awemeId,null==tx?void 0:null===(ec=tx.douyinPcVideoExtra)||void 0===ec?void 0:ec.aiSearchPicture,tJ,null===(ev=rl.aiSearchProps)||void 0===ev?void 0:ev.isColdStart]),{hotData:ro}=lO({awemeInfo:tx,slideOptimize:null==iM?void 0:iM.slideOptimize}),{delaySideCardShow:rt,setDelaySideCardShow:rn}=lW({isActive:lA,isNext:lF,player:oK,showSideCard:tE,abtestData:iM}),{delaySideCardShow:rr}=lW({isActive:lA,isNext:lF,player:oK,showSideCard:nK,abtestData:iM,keepAlive:!0});oC({modalEnterFrom:iv,logParams:iZ,isActive:lA,isCommonCardShow:nt,showSideCard:tE,chapterSliderShow:n_,aiCardIsPined:oI,useJxSlideInheritAndPin:oy,useJxDefaultOpen:oS,aiCardIsDefaultOpen:oT,hasDefaultShowAiCardRef:oL,closeAiCard:nz,openAiCard:n$,isInnerFeed:tF,awemeInfo:tx,isLogin:i2,isShowAiCard:nK,abTestData:iM,openRelatedCard:ny});let rd=lG({scene:iD,reportParams:t8,awemeInfo:tx,curCard:tJ,toast:tb,showRelatedTabList:tW,isShowSideBar:nt||tE||nK,handleRelated:ny}),{onAvatarClick:ra,onRelatedClick:ru,onAiCardClick:rs}=rd,rc=(0,a._)(rd,["onAvatarClick","onRelatedClick","onAiCardClick"]),{videoTags:rv}=iq({abtestData:iM,awemeInfo:tx,scene:iD,showRelatedTabList:tW,withCtr:iD===I.lT.Recommend,originAwemeInfo:lT,isInnerFeed:tF,canShowMixCard:!0,canShowSeriesCard:!0,canShowRelatedCard:!0,canShowRelatedSearchFeedBar:!0,actions:rc,player:oK,isActive:lA}),{inImmersive:rm}=(0,ic.O)({player:oK,isActive:lA,slideOptimize:null==iM?void 0:iM.slideOptimize}),{follow:rf,unFollow:r_}=(0,eP.OM)({selfUid:null==i0?void 0:null===(em=i0.info)||void 0===em?void 0:em.uid,actionUid:null==tx?void 0:null===(ef=tx.authorInfo)||void 0===ef?void 0:ef.uid,defaultFollowerStatus:null==tx?void 0:null===(eL=tx.authorInfo)||void 0===eL?void 0:eL.followerStatus,defaultFollowStatus:null==tx?void 0:null===(eE=tx.authorInfo)||void 0===eE?void 0:eE.followStatus,logExtraParams:(0,t._)({author_id:null==tx?void 0:null===(eA=tx.authorInfo)||void 0===eA?void 0:eA.uid,group_id:null==tx?void 0:tx.awemeId,from_group_id:null==lT?void 0:lT.awemeId,music_id:null==tx?void 0:null===(eR=tx.music)||void 0===eR?void 0:eR.mid,compilation_id:null==tx?void 0:null===(eM=tx.mixInfo)||void 0===eM?void 0:eM.mixId,aweme_type:(null==tx?void 0:tx.isSlides)?k.e.Slides:null==tx?void 0:tx.awemeType,pic_cnt:null!==(lC=null==tx?void 0:null===(eV=tx.images)||void 0===eV?void 0:eV.length)&&void 0!==lC?lC:0,is_pure:rm?"1":"0",to_user_id:null==tx?void 0:null===(eF=tx.authorInfo)||void 0===eF?void 0:eF.uid,item_duration_ms:(null==tx?void 0:null===(eD=tx.video)||void 0===eD?void 0:eD.duration)||0},t8),isLogin:i2,accountParentEl:(0,W.r)()&&lN,onLoginSuccess:()=>{null==i1||i1({type:"updateUserInfo"})},fail:eP.GH}),{followStatus:rh}=(0,eN.r)({selfUid:null==i0?void 0:null===(eB=i0.info)||void 0===eB?void 0:eB.uid,actionUid:null==tx?void 0:null===(eU=tx.authorInfo)||void 0===eU?void 0:eU.uid,defaultFollowerStatus:null==tx?void 0:null===(eW=tx.authorInfo)||void 0===eW?void 0:eW.followerStatus,defaultFollowStatus:null==tx?void 0:null===(eH=tx.authorInfo)||void 0===eH?void 0:eH.followStatus});lH({scene:iD,isOuter:!o1,isActive:lA,player:oK}),lR({aiCardElRef:tp,isShowAiCard:nD});let{isMiniWin:rg}=lz({scene:iD,awemeInfo:tx,scrollElRef:tg,changeNextVideo:tN,changePrevVideo:tA,isUpperFeed:o1,swiper:lU,isActive:lA&&!oq||o1,feedCssFullScreen:i9,player:oK,modalEnterFrom:iv,onFullScreen:e=>{e&&n8(tF,{from:"auto"}),o1&&!iz&&!e&&D.emit(D.EVENT.pageFullScreen,{fullScreen:!0,playerId:null==oK?void 0:oK.playerId,clickMethod:"inner_player"})},onCssFullScreen:e=>{e&&n8(tF,{from:"auto"}),iz&&!e&&(null==tn||tn(!1)),o1&&!e&&!(i4||(0,W.r)())&&iY()},onFullScreenrestore:()=>{n8(tF,{from:"auto"})},onTriggerModalPlayerClose:()=>{o1&&iY("click_button",tJ)},onCanPlay:()=>{let e=()=>{var e;let l=(null===(e=window.__QUICK_PLAYER)||void 0===e?void 0:e.playerId)&&window.__QUICK_PLAYER.playerId===(null==oK?void 0:oK.playerId),i=G.Le.getConfig(G.gI.ModalStartTime)||{};!l&&!ov.YY.checkIsReusePlayer(null==iR?void 0:iR.scene,null==iR?void 0:iR.reuseId,oK)&&(oK.seek(i_,"play"),i[tx.awemeId]&&(delete i[tx.awemeId],G.Le.setConfig(G.gI.ModalStartTime,i)),G.Le.setConfig(G.gI.PreviewPlayInfoRecord,{awemeId:"",recordPlayTime:0}))},l=new URL(location.href);if(l.searchParams.get("open_mini_window")&&(l.searchParams.delete("open_mini_window"),window.history.replaceState({},"",l),D.emitAfterListen(D.EVENT.openWidgetMiniWindows)),o1){let l=null==ir?void 0:ir();l&&oK.seek(l,"play"),id&&e()}else if(i$.current)oK.seek(i$.current,"play"),i$.current=0;else if(i_)e();else{let{continationInfo:e}=tx;(null==e?void 0:e.playProgress)&&(oK.seek(null==e?void 0:e.playProgress,"play"),delete e.playProgress)}},onPlay:()=>{!o1&&oz.getValue("modalAwemeInfo")&&!iz&&setTimeout(()=>{var e;return null===(e=oK.pause)||void 0===e?void 0:e.call(oK)})},onVideoTitleClick:()=>{var e,l;ny({tab:w.L.Author,clickMethod:"click_title"}),eI.Z.sendLog("clickAuthorHead",(0,t._)((0,d._)((0,t._)({click_from:"title",urlParamList:["previous_page"],author_id:null==tx?void 0:null===(e=tx.authorInfo)||void 0===e?void 0:e.uid,group_id:null==tx?void 0:tx.awemeId,log_pb:null==tx?void 0:tx.logPb,enter_from:(0,F.mo)(),is_full_screen:(0,W.r)()?"1":"0",from_follow_list:(null===(l=G.Le.getConfig(G.gI.FromFollowList))||void 0===l?void 0:l.tag)?"1":"0"},t8),{action:tE?"close":"open"}),(0,H.t)()))}});om({defaultOpenedCardType:ia,defaultOpenedCardExtraProps:iu}),lJ({scene:iD,awemeInfo:tx,isActive:lA,isNext:lF,isUpperFeed:o1,modalEnterFrom:iv,smoothInner:iz&&tF});let{authorConfig:rp,commentConfig:rI}=lX.B({awemeInfo:tx,customProps:lK,reportParams:t8,fullScreenTarget:lN,tab:tJ,showSideCard:tE,isShowRelatedCard:tE,player:oK,scrollElRef:tg,followStatus:rh,handleCommentClick:e=>n9(e),isActive:lA,isUpperFeed:o1,globalIsCommentTrayPushGuideShow:ot,globalCommentTrayPushGuideType:on,setCommentTrayPushGuideTypeFunc:or,setIsCommentTrayPushGuideShowFunc:od,onSearchTextClick:iL,scene:iD});lQ({isActive:lA,isUpperFeed:o1,modalAwemeInfo:oq,showSideCard:tE,isCommonCardShow:nt,isShowAiCard:nK,abtestData:iM,scene:iD}),(0,r.useImperativeHandle)(l,()=>({getPlayerRoot:()=>{var e,l;return null===(l=iJ.current)||void 0===l?void 0:null===(e=l.getPlayerRoot)||void 0===e?void 0:e.call(l)},getPlayer:()=>oK,setIsAuthorCardShow:n8,setIsShowRelatedCard:n8,getCurTab:()=>tJ,getCurrAweme:()=>tx,player:oK}),[lA,tJ,oK,tx]);let{onCooperationAvatarClick:rC,isInCooperation:rw,changeIsInCooperation:ry}=l2({curTab:tJ,awemeInfo:tx,handleChangeVideo:e=>{tR({inComingAwemeInfo:e})},handleCooperationAvatarClick:e=>{var l;o1?(t0({tab:w.L.Author}),n8(!0,{from:"auto"}),tR({inComingAwemeInfo:e})):(oz.dispatch({modalAwemeInfo:e,nextAwemeInfo:null,prevAwemeInfo:null}),t0({tab:w.L.Author})),C.logInstance.sendLog("enterVideoCardTab",{from_group_id:e.awemeId,type:w.L.Author,enter_method:"click_co_author_head",enter_from:null!==(l=null==iZ?void 0:iZ.enter_from)&&void 0!==l?l:(0,F.mo)(),enter_from_merge:(0,F.vM)(),tab_name:(null==iZ?void 0:iZ.tab_name)||(0,J.zD)(),module_name:null==iZ?void 0:iZ.module_name})},reportParams:t8,isShowVideoCard:tE});(0,h.Z)(()=>{!oq&&lA&&(ry(!1),(i4||i9)&&n8(!1,{from:"auto"}))},[null==oq?void 0:oq.awemeId]);let{isPermanentDislikeBtn:rS,isDislikePanelVisible:rT,dislike:rL,revokeDislike:rE,disableShortCut:rk,isAdapterMiniHeightWithDislikeBtn:rb}=iS({awemeInfo:tx,scene:iD,deleteCurrentSwiper:lk,isModal:o1,videoToast:tb,abtestData:iM,dislikeIdList:oi,uuid:null===(eZ=(0,Z.Es)())||void 0===eZ?void 0:eZ.user_unique_id,player:oK}),rP=(0,r.useMemo)(()=>(null==iM?void 0:iM.slideOptimize)&&["discover","recommend"].includes((0,U.yW)()),[iM]),rN=(0,r.useMemo)(()=>"waterFall"===iv&&(null==oq?void 0:oq.awemeId)?(0,d._)((0,t._)({},iZ),{from_group_id:null==oq?void 0:oq.awemeId}):iZ,[iZ,null==oq?void 0:oq.awemeId,iv]),rA=(0,r.useMemo)(()=>{if(!(null==iT?void 0:iT.scene))return{};let{awemeId:e,desc:l}=tx,i={aladdin_words:l,list_item_id:e};return!(null==iT?void 0:iT.removeThirdItemId)&&(i.search_third_item_id=e),i},[null==iT?void 0:iT.scene,tx]),rx=(0,r.useMemo)(()=>{if(null==iT?void 0:iT.toggleButtonText)return null==iT?void 0:iT.toggleButtonText;switch(null==iT?void 0:iT.scene){case"mix":var e,l;if((null==tx?void 0:null===(e=tx.seriesInfo)||void 0===e?void 0:e.seriesId)&&!(null==tx?void 0:null===(l=tx.seriesInfo)||void 0===l?void 0:l.isSeries2Mix))return"短剧";return"合集";case"user":return"相关作品";default:return""}},[iT]),rR=!tE||iD===I.lT.Search&&!lA||nt,rM=!n_||!lA||nt,{isTopLevelSidebar:rV,isTopLevelChapterSidebar:rF,isBottomLevelSidebar:rD,isBottomLevelChapterSidebar:rj}=iG({sidebarHidden:rR,chapterSidebarHidden:rM,bottomLevelSidebar:tl,setBottomLevelSidebar:ti,topLevelSidebar:to,setTopLevelSidebar:tt});o_((0,t._)({key:"ad",isShow:nT,close:nS},ne)),o_((0,t._)({key:"shopDetail",isShow:nq,close:nJ},ne)),o_((0,t._)({key:"aiNote",isShow:null==np?void 0:np.isShowAiCard,close:null==np?void 0:np.closeAiCard},ne)),o_((0,t._)({key:"videoDetail",isShow:n0,close:n1},ne)),o_((0,t._)({key:"activity",isShow:nr,close:ns},ne)),o_((0,t._)({key:"recommendWhiteTag",isShow:nR,close:nV},ne)),no("chapter",{chapterSidebarHidden:rM,close:()=>{ng(!1)}});let rB=(0,r.useMemo)(()=>({showSideCard:!rR,curTab:tr,setSideCard:n8,setCurTab:td,handleRelated:ny}),[rR,tr,n8,td,ny]),rO=(0,d._)((0,t._)({},rA,null==iZ?void 0:iZ.search_params,null==t8?void 0:t8.search_params),{item_rank:((null===(e$=tw.current)||void 0===e$?void 0:null===(eK=e$.getCurIndex)||void 0===eK?void 0:eK.call(e$))||0)+1});(0,r.useEffect)(()=>{(null==lK?void 0:lK.tab)===I.lT.Search&&(tx.searchLogParams=rO)},[rO]);let rU=tD&&[w.t.Mix,w.t.Series].includes(tQ)?"author_":"",[rW,rG]=(0,r.useState)(!1),rH=(0,r.useRef)(!1);(0,r.useEffect)(()=>{var e,l,i,o;rH.current=!1;let t=(e,l)=>{if(rH.current)return;rH.current=!0;let i=e?1:0,o=l&&l.length>5?1:0;eC.K.report("pc_video_cut_result",{group_id:null==tx?void 0:tx.awemeId,is_cut:i,cut_protect_type:o}),(0,G.Sl)(null==tx?void 0:tx.awemeId,{isCut:i,cutProtectType:o})};if(null==iM?void 0:null===(l=iM.videoCutByTag)||void 0===l?void 0:null===(e=l.disabledTags)||void 0===e?void 0:e.length){let e=(null==iM?void 0:null===(i=iM.videoCutByTag)||void 0===i?void 0:i.disabledTags)||[],l=(null==tx?void 0:null===(o=tx.relatedVideoExtra)||void 0===o?void 0:o.tags)||{},t=[null==l?void 0:l.level1,null==l?void 0:l.level2,null==l?void 0:l.level3];if(null==t?void 0:t.some(l=>{var i;let o=(null==l?void 0:null===(i=l.tag_id)||void 0===i?void 0:i.toString())||"";if(e.includes(o))return!0})){rW&&rG(!1);return}}let n=f()(()=>{let e="recommend"===(0,U.yW)()&&!1===o1;if(o1){rG(!1);return}if((null==iM?void 0:iM.videoCut)&&iQ.current&&tx&&tx.video&&e){if(1e3*tx.createTime<=17304192e5&&!tx.pcBlockedAreaRatio)return;let e=iQ.current.getBoundingClientRect(),{width:l}=e,i=e.height-48;if(l/i<tx.video.width/tx.video.height){let e=tx.pcBlockedAreaRatio,o=(1-tx.video.height/tx.video.width*l/i)/2;if(!e){let l=o<.05;rG(l),t(l,e);return}if(e&&e.length<=5){t(!1,e);return}let n=Math.min(null==e?void 0:e[6],100-(null==e?void 0:e[7]))-100*o>=1,r=o<.05&&n;rG(r),t(r,e)}if(l/i>tx.video.width/tx.video.height){let e=tx.pcBlockedAreaRatio,o=(1-tx.video.width/tx.video.height*i/l)/2;if(!e){let l=o<.05;rG(l),t(l,e);return}if(e&&e.length<=5){t(!1,e);return}let n=Math.min(100-(null==e?void 0:e[8]),null==e?void 0:e[9])-100*o>=1,r=o<.05&&n;rG(r),t(r,e)}}},0);n();let r=K.Z.bind(iQ.current,n);return()=>{null==r||r()}},[tx,iM,o1]),!function(e){let{awemeInfo:l,curTab:i}=e,o=(0,r.useRef)(null);(0,r.useEffect)(()=>{l?o.current=function(e){var l;if(!(null===(l=window)||void 0===l?void 0:l.requestAnimationFrame))return iW;let{timeout:i=1e4}=e,o={fps:0,duration:0,scene:(0,U.yW)(),jank:0,jank_duration:0,bjank:0,bjank_duration:0,tab:e.curTab},t=0,n=iU(),r=n,d=null,a=null;return!function e(){d=requestAnimationFrame(function(){t++;let l=iU(),i=l-r;r=l,i>iB&&(o.jank++,o.jank_duration+=i),i>iO&&(o.bjank++,o.bjank_duration+=i),e()})}(),a=setTimeout(()=>{d&&cancelAnimationFrame(d)},i),function(){d&&cancelAnimationFrame(d),a&&clearTimeout(a);let e=iU()-n;o.fps=Math.min(Math.round(1e3*t/e),60),o.duration=Math.round(e),ij.sendLog("prf_slider_modal_video",o)}}({awemeInfo:l,curTab:i}):o.current=null},[l]),(0,r.useLayoutEffect)(()=>{let e=D.listen(D.EVENT.firstFrameReady,()=>{if(o.current){var e;null===(e=o.current)||void 0===e||e.call(o),o.current=null}});return()=>{e()}})}({awemeInfo:oq,curTab:tJ});let rZ=o1&&lA?"slideMode":"sliderVideo",rK=(0,r.useMemo)(()=>({playerScene:iD,globalCommentCount:t6,setGlobalCommentCount:t4,authorVideoCardClick:t3,modalEnterFrom:iv,player:oK,stopAutoPlay:tq}),[iD,t6,t4,t3,oK,iv,tq]),r$=!$._.isRenderOnActive(iM)||lA,rz=lA&&(null==tx?void 0:null===(ez=tx.chapterInfo)||void 0===ez?void 0:ez.status),rY=(e,l,i)=>{if(i&&!e.find(e=>e.awemeId===i.awemeId)){var o;e=e.concat(i);let l=null===(o=i.relatedRecommend)||void 0===o?void 0:o.popoverAwemeInfo;l&&!e.find(e=>e.awemeId===l.awemeId)&&(e=e.concat(l))}return l&&!e.find(e=>e.awemeId===l.awemeId)&&(e=[l,...e]),e},{playSwitchNextVideo:rq,playSwitchPrevVideo:rJ}=og({isUpperFeed:o1,playPrevFunc:lL,playNextFunc:lE,changePrevVideo:tA,changeNextVideo:tN});ob({awemeInfo:tx,player:oK,sliderConainerRef:iQ,abtestData:iM,isCutVideo:rW});let rX=(0,r.useMemo)(()=>(0,d._)((0,t._)({},t8,tx.logParams),{relation:String(rh),is_click_cover:Number(o1||lT!==tx),enter_from:`${rU}${o1?e6.Cu(tQ):null==t8?void 0:t8.enter_from}`,search_params:rO}),[t8,tx,rh,o1,tQ,rO,lT,rU]),rQ=(0,r.useMemo)(()=>{var e,l,i;return(0,d._)((0,t._)({},it),{notInterestingIcon:o1?!tF&&(null==lT?void 0:lT.awemeId)===(null==tx?void 0:tx.awemeId):null===(e=null==it?void 0:it.notInterestingIcon)||void 0===e||e,unfollow:!o1||null===(l=null==it?void 0:it.unfollow)||void 0===l||l,report:!o1||null===(i=null==it?void 0:it.report)||void 0===i||i})},[it,o1,tF,lT,tx]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Q.v.Provider,{value:rK,children:(0,n.jsx)(ed.k,{componentName:"Container3",children:(0,n.jsxs)("div",{"data-e2e":lA?"feed-active-video":"feed-video","data-e2e-vid":null==tx?void 0:tx.awemeId,id:rZ,className:c()(er.default.playerCommentWrapper,`video_${tx.awemeId}`,rZ,l1,{isMiniWindow:l5,isMiniWindowOptimize:l5&&ta,[er.default.isMiniWindowActive]:lA&&l5,[er.default.flex]:!rt||!rr,[er.default.isFullScreen]:i4,[er.default.inOutFeed]:!o1,[er.default.miniWidth]:tE,[er.default.adapterSeventh]:!nq,[er.default.shopCard]:nq,[er.default.adapterMiniHeight]:o1,[er.default.adapterMiniHeight495]:o1&&iD===I.lT.Recommend,[er.default.adapterMiniHeightWithDislikeBtn]:rb,[er.default.searchFit]:iD===I.lT.Search,[er.default.withImSideCard]:tS,relatedUiAdapter:!(iD===I.lT.Search&&!o1),[er.default.transparent]:(0,T.p)(tx)&&!iC,upperFeedClass:o1,[er.default.forFixedLayer]:iv===y.a.Im&&lA}),style:(0,t._)({},l6),ref:tC,children:[(0,n.jsxs)("div",{ref:iQ,className:c()(er.default.playerContainer,"playerContainer",ei.z,{"isDark isDeepDark":!(null==iM?void 0:iM.newThemeColor),[er.default.isHavePlayer]:tx,[er.default.isSafari]:(0,z.G6)(),[er.default.showSideBar]:nt||tE||n_||nK}),style:{transition:i4||i9?"none":void 0},children:[lZ,(0,n.jsxs)("div",{className:c()(er.default.playerWrap,"slider-video",{[er.default.playerCutVideo]:rW,[er.default.isVertical]:(null==tx?void 0:null===(eY=tx.video)||void 0===eY?void 0:eY.height)>(null==tx?void 0:null===(eq=tx.video)||void 0===eq?void 0:eq.width),"controls-drag-disable":null==iM?void 0:null===(eJ=iM.controls)||void 0===eJ?void 0:eJ.dragdisable,"controls-delay-hover":null==iM?void 0:null===(eX=iM.controls)||void 0===eX?void 0:eX.delayhover,"controls-add-space":null==iM?void 0:null===(e3=iM.controls)||void 0===e3?void 0:e3.addspace,"controls-hotzone":null==iM?void 0:null===(ll=iM.controls)||void 0===ll?void 0:ll.hotzone}),ref:e=>{lA?!iX.current&&!o1&&(iX.current=e,i8(iX)):iX.current=null},children:[iD===I.lT.Modal&&(0,Y.DT)()&&!oq&&(0,n.jsx)("div",{className:er.default.electronDrag}),(null==tx?void 0:tx.debugInfo)&&(0,n.jsx)(ep.W,{req:null==tx?void 0:null===(li=tx.debugInfo)||void 0===li?void 0:li.web_debug_req,video:null==tx?void 0:null===(lo=tx.debugInfo)||void 0===lo?void 0:lo.client_rec_debug_info,size:{height:null==oK?void 0:oK._videoHeight,width:null==oK?void 0:oK._videoWidth},gear:null==tx?void 0:null===(lr=tx.video)||void 0===lr?void 0:null===(ln=lr.bitRateList)||void 0===ln?void 0:null===(lt=ln[0])||void 0===lt?void 0:lt.gearName,showPanelRightside:!0}),(0,n.jsx)(eg.r,{children:(0,n.jsx)(l0,(0,d._)((0,t._)({ref:iJ},e),{listenFeedNextAwemeInfo:tB,listenFeedPrevAwemeInfo:tO,canShowListenVideo:ts,changeListenVideoFeedIndex:tP,canUseListenFeed:tu,onPlayer:e=>{o$(e)},actionFollow:rf,actionUnFollow:r_,isClientMiniWin:l5,userInfo:i0,dispatch:i1,awemeInfo:tx,nextAwemeInfo:tV,prevAwemeInfo:tM,videoTags:rv,isInnerFeed:tF,isOuterFeedSplash:(0,T.p)(il||lT),playNextFunc:tN,playPrevFunc:tA,deleteCurrentSwiper:lk,toggleComment:e=>n9(e),onCooperationAuthorClick:rC,isShowCooperation:!0,onAvatarClick:ra,avatarTipText:o1&&tJ===w.L.Author?"退出作者主页":void 0,logParams:O.H.baseOpt(iM)?rX:(0,d._)((0,t._)({},t8,tx.logParams),{relation:String(rh),is_click_cover:Number(o1||lT!==tx),enter_from:`${rU}${o1?e6.Cu(tQ):null==t8?void 0:t8.enter_from}`,search_params:rO}),videoToast:tb,abtestData:iM,openSpecificTab:re,abTestData:iM,isFullScreen:i4,isAuthorCardShow:!1,slideListInsideFunc:lq,sideBarShow:tE,onAiCardClick:tW.includes(w.L.AiCard)?rs:void 0,onRelatedClick:tW.includes(w.L.Related)||tG?ru:void 0,isShowRelatedCard:o1,isShowGuide:l3,showPlaySwitch:i9||i4||!1,moreBoxShowList:O.H.baseOpt(iM)?rQ:(0,d._)((0,t._)({},it),{notInterestingIcon:o1?!tF&&(null==lT?void 0:lT.awemeId)===(null==tx?void 0:tx.awemeId):null===(lw=null==it?void 0:it.notInterestingIcon)||void 0===lw||lw,unfollow:!o1||null===(ly=null==it?void 0:it.unfollow)||void 0===ly||ly,report:!o1||null===(lS=null==it?void 0:it.report)||void 0===lS||lS}),shortCutFiltered:(null==lT?void 0:lT.awemeId)!==(null==tx?void 0:tx.awemeId)||o1?[x.getShortcut().dislike.badgeText]:[],positionBoxClassName:{right:c()(er.default.posTransition,oh.m4,tE||nt||n_||nK?null:er.default.interactionPos,er.default.removeSlideRelatedButton)},isAdShortCut:!tE,isShowAdCard:nT,isShowVideoInfoSideCard:n0,isShowAiCard:nK,onActivityCardClick:(e,l)=>{nr?ns("anchor"):nu(e,l)},onDouPlusClick:e=>{nv.click(e)},onGameAnchorClick:e=>{nm.click(e)},onSodaClick:e=>{nc.click(e)},isShowShopSideCard:nq,onShopAnchorClick:()=>{nq?nJ():(nY(),n4())},onShopAnchorMouseEnter:()=>{!nq&&n6({reqKey:null==n5?void 0:n5.promotion_id})},onShopAnchorMouseLeave:()=>{!nq&&n4()},defaultIsPageFullScreen:!i4&&!!o1&&!iz||void 0,onDislike:rL,isPermanentDislikeBtn:rS,disableShortCut:rk,isDislike:rT,splashAdStatus:ih,fullScreenTarget:null!=lN?lN:tC.current,horizontalToggleProps:{showHorizontalToggle:!!(null==iT?void 0:iT.scene)&&!(o7||tE||nt||nK),onClick:()=>{var e;te(!0),C.logInstance.sendLog("enterVideoCardTab",{enter_from:"general_search",enter_from_merge:"general_search",enter_method:"click_card_entrance",type:(0,la.V)(null==iT?void 0:iT.scene,tx,null==iZ?void 0:null===(e=iZ.search_params)||void 0===e?void 0:e.token_type)})},buttonText:rx,buttonClassName:"",scene:null==iT?void 0:iT.scene},enableAutoPlayPlugin:!!(null==iT?void 0:iT.scene)||o1,isUpperFeed:o1,sideCardContext:rB,searchListType:iE,disableFullScreenSearchBar:!1,chapterProps:{chapterProgress:nf,triggerChapterSliderShow:()=>{nl(["ad","shopDetail"]),nh()}},aiNoteProps:{useable:nH||(null==np?void 0:np.isAiNoteUseable),isShow:nK},setContainerPlayer:rP?o$:null,recommendTagProps:{userList:nb,recommendTagType:nE,onClickGuideTag:nk,onClickWhiteTag:nM,shouldShowFollowRecBtn:nP,recommended:nN,guideTagTriggerSource:nA,recommendTriggerSource:nx,isShowVideoInfoSideCard:n0||!rR&&tJ===w.L.VideoDetail&&tE},children:!(iP||rP)&&(0,n.jsx)(ex,{onPlayer:o$})}))}),(0,n.jsx)("div",{}),(0,n.jsx)(eh.R,{player:oK,isActive:lA,modalEnterFrom:iv,abtestData:iM}),(0,n.jsx)("div",{}),!!(iK&&(iv===y.a.UserPost||o1))&&(0,n.jsx)(oc.I,{playPrevFunc:rJ,playNextFunc:rq,disablePrev:o1&&!tM||!o1&&iw,disableNext:o1&&!tV||!o1&&l$,className:c()(er.default.playSwitch,{"is-follow-scene":iD===I.lT.Follow})})]})]}),nT&&(0,n.jsx)("div",{id:"videoSideBar",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,{[er.default.displayNone]:l5,"isDark dark":!(null==iM?void 0:iM.newThemeColor)}),onWheel:e=>e.stopPropagation(),children:(0,n.jsx)(oM,{awemeInfo:tx,onClose:()=>{nS({from:"closeIcon"})},userInfo:i0})}),nj&&!(iD===I.lT.Search&&!o1)&&(0,n.jsxs)("div",{id:"hideInMiniWindow",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,{[er.default.displayNone]:l5,[er.default.sideBarHidden]:!nD||tE||n_||nt,"isDark dark":!(null==iM?void 0:iM.newThemeColor)}),onWheel:e=>e.stopPropagation(),ref:tp,children:[!rr&&nD&&(0,n.jsx)(ey.gb,{className:er.default.loading}),rr?(0,n.jsx)("div",{className:c()(er.default.sideBarInnerWrapper,er.default.relatedVertical,{[er.default.sideBarInnerHidden]:!nD}),children:(0,n.jsx)(ed.k,{componentName:R.y.AiCard,children:(0,n.jsx)(oV,{isShow:nD,isAiNoteUseable:nH,activeAiCardTab:nB,setActiveAiCardTab:nO,setAiNoteEnterMethod:nU,awemeInfo:tx,usePin:oy,abTestData:iM,player:oK,onClose:()=>{nF(),oU.includes(nW.entryFrom)&&n8(!0),G.Le.setConfig(G.gI.PlayerCardInfo,null)},userInfo:i0,aiSearchProps:(0,d._)((0,t._)({},nW),{userDispatch:i1,userInfo:i0,onOpenModalVideo:t2}),aiNoteProps:nG,fullScreenTarget:null!=lN?lN:tC.current,aiCardIsPined:oI,togglePinAiCard:ow})})}):null]}),(null==np?void 0:np.renderAiCard)&&!(iD===I.lT.Search&&!o1)&&(0,n.jsx)("div",{id:"hideInMiniWindow",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,{[er.default.displayNone]:l5||!(null==np?void 0:np.isShowAiCard),"isDark dark":!(null==iM?void 0:iM.newThemeColor)}),onWheel:e=>e.stopPropagation(),ref:tp,children:(0,n.jsx)(ed.k,{componentName:R.y.AiCard,children:(0,n.jsx)(oF,{isShow:null==np?void 0:np.isShowAiCard,awemeInfo:tx,abTestData:iM,player:oK,onClose:()=>{null==np||np.closeAiCard()},userInfo:i0,aiNoteProps:null==np?void 0:np.aiNoteProps,fullScreenTarget:null!=lN?lN:tC.current},null==tx?void 0:tx.awemeId)})}),(null==nC?void 0:nC.renderAiCard)&&!(iD===I.lT.Search&&!o1)&&(0,n.jsxs)("div",{id:"hideInMiniWindow",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,{[er.default.displayNone]:l5,"isDark dark":!(null==iM?void 0:iM.newThemeColor),[er.default.sideBarHidden]:!(null==nC?void 0:nC.isShowAiCard)||tE||n_||nt}),onWheel:e=>e.stopPropagation(),ref:tp,children:[!rr&&(null==nC?void 0:nC.isShowAiCard)&&(0,n.jsx)(ey.gb,{className:er.default.loading}),rr?(0,n.jsx)("div",{className:c()(er.default.sideBarInnerWrapper,er.default.relatedVertical,{[er.default.sideBarInnerHidden]:!(null==nC?void 0:nC.isShowAiCard)}),children:(0,n.jsx)(ed.k,{componentName:R.y.AiCard,children:(0,n.jsx)(oD,{isShow:null==nC?void 0:nC.isShowAiCard,awemeInfo:tx,usePin:oy,abTestData:iM,player:oK,onClose:()=>{var e,l;null==nC||null===(e=nC.closeAiCard)||void 0===e||e.call(nC),oU.includes(null==nC?void 0:null===(l=nC.aiSearchProps)||void 0===l?void 0:l.entryFrom)&&n8(!0),G.Le.setConfig(G.gI.PlayerCardInfo,null)},userInfo:i0,aiSearchProps:(0,d._)((0,t._)({},null==nC?void 0:nC.aiSearchProps),{userDispatch:i1,userInfo:i0,onOpenModalVideo:t2}),fullScreenTarget:null!=lN?lN:tC.current,aiCardIsPined:oI,togglePinAiCard:ow})})}):null]}),nr&&(0,n.jsx)("div",{id:"videoSideCard",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,{[er.default.displayNone]:l5,"isDark dark":!(null==iM?void 0:iM.newThemeColor)}),onWheel:e=>e.stopPropagation(),ref:e=>{(0,z.G6)()&&e&&!e.onwheel&&(e.onwheel=e=>{e.stopPropagation()})},children:(0,n.jsx)(ed.k,{componentName:"ActivityCard",fallback:(0,n.jsx)(ey.gb,{className:c()(er.default.loading,er.default.absolute)}),children:(0,n.jsx)(oR,{isLogin:i2,awemeInfo:tx,activityName:nd,anchorData:na,closeCard:ns,userInfo:i0,userDispatch:i1,activityCardDirectOpen:ix})})}),(0,n.jsx)(e_,{abtestData:iM,isClientMiniWin:l5,isWebMiniWin:iK,awemeInfo:tx,userInfo:i0,isActive:lA,player:oK,sodaCtr:nc,douPlusCtr:nv,gameCtr:nm}),nR&&(0,n.jsx)("div",{id:"videoSideBar",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,er.default.videoInfoSideBar,{[er.default.displayNone]:l5,"isDark dark":!(null==iM?void 0:iM.newThemeColor)}),onWheel:e=>e.stopPropagation(),children:(0,n.jsx)(oo,{player:oK,awemeInfo:tx,onClose:nV,userList:nb,userInfo:i0})}),nq&&(0,n.jsx)("div",{id:"videoSideBar",className:c()(er.default.sideBarDefaultWidth,er.default.shopSidebar,{[er.default.displayNone]:l5,isDark:!(null==iM?void 0:iM.newThemeColor)}),onWheel:e=>e.stopPropagation(),children:(0,n.jsx)(ed.k,{componentName:R.y.ShopDetailSideCard,children:(0,n.jsx)(ox,{isFirstLoad:nX,awemeInfo:tx,onClose:nJ,userInfo:i0,abtestData:iM,isAutoOpen:nQ})})}),!!(null==iT?void 0:iT.scene)&&(0,n.jsx)(oj,(0,t._)({className:c()({[er.default.displayNone]:!o7||tE||nt||nK||rg}),currentPlayingAwemeInfo:tx,onClose:()=>te(!1),onItemClick:e=>{var l;let{inComingAwemeInfo:i,index:o}=e;tR({inComingAwemeInfo:i}),null==iT||null===(l=iT.onSideCardClick)||void 0===l||l.call(iT,{inComingAwemeInfo:i,index:o})},updateNextAwemeInfo:e=>oz.dispatch("nextAwemeInfo",e),isActive:lA,showSearchSideCard:o7,setShowSearchSideCard:te,ref:tw,stopAutoPlay:tq,logParams:(0,d._)((0,t._)({},iZ),{search_params:rO}),isUpperFeed:o1,listReplay:!0},iT)),r$&&(0,n.jsxs)("div",{id:"videoSideCard",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,{isDark:!(null==iM?void 0:iM.newThemeColor),[er.default.sideBarHidden]:rR,[er.default.force300pxWidth]:iD===I.lT.Search&&!o1&&!rR,[er.default.displayNone]:l5,[er.default.sideBarInBottomLayer]:rD,[er.default.sideBarInUnderLayer]:rF,[er.default.sideBarInTopLayer]:rV,[er.default.activeAiCardTab]:tJ===w.L.AiCard,[er.default.addDetailTabSideBar]:!0,[er.default.newThemeColor]:!0}),style:{position:rj?"absolute":void 0},onWheel:e=>e.stopPropagation(),ref:tg,children:[$._.isHideSiderLoading(iM)?null:!rt&&tE&&(0,n.jsx)(ey.gb,{}),rt&&(0,n.jsx)("div",{id:"relatedVideoCard",className:c()(er.default.sideBarInnerWrapper,er.default.relatedVertical,{[er.default.sideBarInnerHidden]:!tE,[er.default.inFullScreen]:i9||i4,LookModalFrameFast:(null===(ld=(0,q.fV)())||void 0===ld?void 0:ld.os)==="Windows"}),children:(0,n.jsx)(_.SV,{fallback:(0,n.jsx)("div",{className:er.default.errorContainer,children:(0,n.jsx)(oP.jj,{type:oP.NI.noNetwork,title:"加载失败",desc:"请检查网络或稍后重试"})}),children:(0,n.jsx)(oA,{isRender:t7,ref:tT,collapse:!1,scene:I.lT.Recommend,isShow:tE,awemeInfo:tx,lastVideoFeedAweme:t1,originFeedAwemeInfo:lT,enterFromPrefix:rU,handleClose:e=>{nw(e),ri(e),n8(!1),G.Le.setConfig(G.gI.PlayerCardInfo,null),C.logInstance.sendLog("closeVideoCard",{type:tJ,enter_from_merge:(0,F.vM)(),enter_method:"click_x"})},isActive:lA,customProps:lK,logParams:t8,abtestData:iM,userContext:iH,isShowCloseBtn:!0,handleRelatedVideoChange:t5,tab:tJ,videoFeed:tQ,showTabList:iD!==I.lT.Search||o1?tW:[w.L.Comment],aiSearchProps:rl.aiSearchProps,relatedAuthorConfig:rp,relatedCommentConfig:rI,defaultHotData:ro,hotDefaultList:l9,mixDefault:l8,seriesDefault:l7,relatedDefault:rY(ie||[],il||lT,oq),onTabChange:e=>{e===w.L.AiCard&&(i3.current="click",D.emit(D.EVENT.renderAiSearchCard,{awemeId:null==tx?void 0:tx.awemeId,from:ee.jE.TabSwitch})),t0({tab:e})},isUpperFeed:o1,isObscuredByOtherCard:nt||nK||!!oq,isRenderAiNoteCard:nI})})}),(0,n.jsx)(oN.D,{userInfo:i0,abTestData:iM})]}),rz&&(0,n.jsx)("div",{id:"chapterVideoSideCard",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,er.default.chapterSideBar,{[er.default.sideBarHidden]:rM,[er.default.displayNone]:l5,[er.default.sideBarInBottomLayer]:rj,[er.default.sideBarInUnderLayer]:rV,[er.default.chapterSideBarInTopLayer]:rF,isDark:!(null==iM?void 0:iM.newThemeColor)}),ref:tI,children:(0,n.jsx)("div",{id:"chapterVideoCard",className:c()(er.default.sideBarInnerWrapper,er.default.relatedVertical,{LookModalFrameFast:(null===(lu=(0,q.fV)())||void 0===lu?void 0:lu.os)==="Windows"}),children:(0,n.jsx)(_.SV,{children:(0,n.jsx)(oO,{isShow:!rM,awemeInfo:tx,chapterProgress:nf,onClose:()=>{nh()},player:oK,selfUid:null==i0?void 0:null===(ls=i0.info)||void 0===ls?void 0:ls.uid})})})}),(0,n.jsx)("div",{id:"videoSideBar",className:c()(er.default.sideBar,er.default.sideBarDefaultWidth,er.default.videoInfoSideBar,{[er.default.videoInfoSideBarHidden]:!n0,[er.default.search]:iD===I.lT.Search,"isDark dark":!(null==iM?void 0:iM.newThemeColor)}),children:n0&&(0,n.jsx)(oB,{awemeInfo:tx,isTopicLinkSearchResult:!0,abtestData:iM,onClose:()=>{n1(),n8(!1)}})}),tU&&!oQ&&(0,n.jsx)(iF.T3,{awemeInfo:tx,elementtiming:"lcp_ele",maskClassName:c()({[er.default.maskBackgroundHidden]:(0,T.p)(tx)&&!iC}),fetchPriority:iw?"auto":void 0,abtestData:iM,priorityServerBackupBg:!1}),rT&&!l5&&(0,n.jsx)(ig,{onRevokeDislike:rE,isActive:lA}),iy&&!l5&&(0,n.jsx)(ip.z,{isActive:lA,awemeInfo:tx,player:oK,abtestData:iM}),tS&&(0,n.jsx)(eS.gR,{isFullScreen:ty})]})})}),tF&&!iz&&!l5&&(0,n.jsx)(iV,{userInfo:i0,awemeInfo:tx,abtestData:iM,fullScreenTarget:null!=lN?lN:tC.current}),oq&&!o1&&lA&&((null==o3?void 0:o3.current)===o2||(null==o3?void 0:o3.current)===(null==o5?void 0:o5.current))&&(0,n.jsx)(is,(0,d._)((0,t._)((0,d._)((0,t._)({},e),{isDyPlayer:!1,SliderContainer:oW,InnerPlayer:iN&&iP?iN:l0}),{abtestData:iM,logParams:rN,customProps:(0,d._)((0,t._)({},e.customProps),{logParams:rN}),close:iY,getCurrentTime:()=>oq.awemeId===lT.awemeId?null==oK?void 0:oK.currentTime:null,clickedCard:rw?w.L.Author:tJ,hotDefaultList:tJ===w.L.Hot?null==tT?void 0:null===(lf=tT.current)||void 0===lf?void 0:lf.getHotDefaultList():null,mixDefault:tJ===w.L.Mix?null==tT?void 0:null===(l_=tT.current)||void 0===l_?void 0:l_.getMixDefaultParam():null,seriesDefault:tJ===w.L.Series?null==tT?void 0:null===(lh=tT.current)||void 0===lh?void 0:lh.getSeriesDefaultParam():null,relatedDefault:tJ===w.L.Related?rY((null==tT?void 0:null===(lI=tT.current)||void 0===lI?void 0:lI.getRelatedDefaultList())||[],tx,oq):null,currentAwemeInfo:oq,isActive:!0,isEnterByCssFullScreen:i9,isEnterByFullScreen:i4,changeSplashAdStatus:iI,fullScreenTarget:null!=lN?lN:tC.current}),{isClientMiniWin:l5,hasPlaceholder:!0,relatedSmooth:iz}))]})});var oG=i("106525"),oH=(0,r.forwardRef)((e,l)=>{let{customProps:i,modalEnterFrom:o}=e,{tab:d}=i||{},a=(0,r.useRef)(null);return(0,r.useImperativeHandle)(l,()=>{var e,l;return{getPlayerRoot:()=>{var e,l;return null==a?void 0:null===(l=a.current)||void 0===l?void 0:null===(e=l.getPlayerRoot)||void 0===e?void 0:e.call(l)},getPlayer:()=>{var e;return null===(e=a.current)||void 0===e?void 0:e.player},setIsAuthorCardShow:null===(e=a.current)||void 0===e?void 0:e.setIsAuthorCardShow,setIsShowRelatedCard:null===(l=a.current)||void 0===l?void 0:l.setIsShowRelatedCard,setTab:e=>{var l,i;null===(i=a.current)||void 0===i||null===(l=i.setTab)||void 0===l||l.call(i,e)},getCurTab:()=>{var e,l;return null===(l=a.current)||void 0===l?void 0:null===(e=l.getCurTab)||void 0===e?void 0:e.call(l)},getCurrAweme:()=>{var e,l;return null===(l=a.current)||void 0===l?void 0:null===(e=l.getCurrAweme)||void 0===e?void 0:e.call(l)}}},[a.current]),(0,oG.s)(!0),(0,n.jsx)(oW,(0,t._)({ref:a},e))})},883776:function(e,l,i){i.d(l,{g:function(){return o}}),i(968336),i(759943),i(121926),i(683656);let o=e=>{var l,i,o,t,n,r,d,a,u,s,c,v,m,f;let _=null!==(a=null==e?void 0:null===(l=e.hotList)||void 0===l?void 0:l.schema)&&void 0!==a?a:"",h=NaN,g="";return _&&(h=_.startsWith("aweme://")?Number(/\"board_type\":([\w|_]*)&/.exec(_)):Number(null===(u=/board_type=([\w|_]*)&/.exec(_))||void 0===u?void 0:u[1]),g=null!==(f=_.startsWith("aweme://")?null===(v=/\"board_sub_type\":([\w|_\"]*)\,/.exec(_))||void 0===v?void 0:null===(c=v[1])||void 0===c?void 0:null===(s=c.replaceAll)||void 0===s?void 0:s.call(c,'"',""):null===(m=/board_sub_type=([\w|_]*)&/.exec(_))||void 0===m?void 0:m[1])&&void 0!==f?f:""),{boardType:h,boardSubType:g,sentence:(null==e?void 0:null===(i=e.hotList)||void 0===i?void 0:i.sentence)||"",sentenceId:(null==e?void 0:null===(o=e.hotList)||void 0===o?void 0:o.sentenceId)||"",footer:null==e?void 0:null===(t=e.hotList)||void 0===t?void 0:t.footer,rank:null==e?void 0:null===(n=e.hotList)||void 0===n?void 0:n.rank,type:null==e?void 0:null===(r=e.hotList)||void 0===r?void 0:r.type,hotName:null==e?void 0:null===(d=e.hotList)||void 0===d?void 0:d.header}}},336808:function(e,l,i){i.d(l,{V:function(){return o}}),i(706056);let o=(e,l,i)=>{if(["douyin_dcd_model","douyin_disease","xiaohe_disease","baikemy_disease","medicines_baikemy"].includes(i)||!e)return"search_related_card";switch(e){case"user":return"author_card";case"mix":var o;return(null==l?void 0:null===(o=l.seriesInfo)||void 0===o?void 0:o.seriesId)?"playlet_card":"compilation_card";case"hot":return"hot_card";default:return"general_search"}}},597085:function(e,l,i){i.d(l,{j:function(){return o}});var o={Success:0,0:"Success",LocateError:3002056,3002056:"LocateError"}},915268:function(e,l,i){i.d(l,{w:function(){return r}});var o=i(414061),t=i(63601),n=i(332009);function r(){let{clickMethod:e=""}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},l=(0,t.n)();return()=>{var i;null==l||null===(i=l.exitFullscreen)||void 0===i||i.call(l),o.emit(o.EVENT.triggerModalPlayerClose,{}),n.s.setPageFullscreen({playerId:l.playerId,isPageFullscreen:!1}),o.emit(o.EVENT.pageFullScreen,{clickMethod:e,fullScreen:!1,playerId:l.playerId})}}},988588:function(e,l,i){i.d(l,{BJ:function(){return s},kO:function(){return a},nA:function(){return u}});var o=i(629686),t=i(402748);i(490629);var n=i(101199),r=i(855357),d=i(414061);let a=e=>{let{isActive:l,timeout:i=2e3,useIdleCallback:o=!1,immediately:t=!1,callback:r}=e,a=(0,n.useRef)();a.current=r,(0,n.useEffect)(()=>{if(t){var e;return null===(e=a.current)||void 0===e?void 0:e.call(a)}},[t]),(0,n.useEffect)(()=>{if(!t&&o&&l){var e,i;let l;let o=0,t=setTimeout(()=>{var e,i,t;l=null===(e=a.current)||void 0===e?void 0:e.call(a),null===(i=(t=window).cancelIdleCallback)||void 0===i||i.call(t,o)},200);return o=null===(e=(i=window).requestIdleCallback)||void 0===e?void 0:e.call(i,()=>{var e;l=null===(e=a.current)||void 0===e?void 0:e.call(a),clearTimeout(t)}),()=>{var e,i;clearTimeout(t),null===(e=(i=window).cancelIdleCallback)||void 0===e||e.call(i,o),null==l||l()}}},[t,o,l]),(0,n.useLayoutEffect)(()=>{let e;if(t||o||!l)return;let n=setTimeout(()=>{var l;null==r||r(),e=null===(l=a.current)||void 0===l?void 0:l.call(a)},i),r=d.listen(d.EVENT.firstFrameReady,()=>{var l;e=null===(l=a.current)||void 0===l?void 0:l.call(a),clearTimeout(n)});return()=>{r(),null==e||e(),clearTimeout(n)}},[l,t,i,o])},u=e=>{let{awemeInfo:l,once:i=!1,immediately:d,normalDelay:u=!0}=e,[s,c]=(0,n.useState)(()=>!!d||l.awemeType!==r.e.Normal&&!!u||!1);return a((0,t._)((0,o._)({},e),{callback:()=>(c(!0),()=>{!i&&c(!1)})})),{isShow:s}},s=e=>{let{immediately:l,once:i,delay:r}=e,[d,u]=(0,n.useState)(l);return a((0,t._)((0,o._)({},e),{callback:()=>{let e;return!l&&r?e=setTimeout(()=>{u(!0)},r):u(!0),()=>{e&&clearTimeout(e),!l&&!i&&u(!1)}}})),{isShow:d}}},927435:function(e,l,i){i.d(l,{_:function(){return a}});var o=i(101199),t=i(426038),n=i(414061),r=i(499059),d=i(709705);let a=e=>{let{prevAwemeInfo:l,awemeInfo:i,isInnerFeedModel:a}=e,u=(0,o.useRef)(i);(0,o.useEffect)(()=>{u.current=i},[i]),(0,o.useEffect)(()=>{let e=null==n?void 0:n.listen(null==n?void 0:n.EVENT.quitInnerFeed,e=>{e&&r.Le.setConfig(r.gI.PreAwemeId,"")});return()=>e()},[]),(0,o.useEffect)(()=>{let e=(0,d.$o)(t.LocalStorageKeys.HasUseFlashBack),i=(0,d.$o)(t.LocalStorageKeys.ShowFlashBackTipNum)||0;if(a&&!e&&i<3){var o;let e=r.Le.getConfig(r.gI.PreAwemeId);e&&e===(null===(o=u.current)||void 0===o?void 0:o.awemeId)?n.emit(n.EVENT.showFlashbackTip,!0):n.emit(n.EVENT.showFlashbackTip,!1),(null==l?void 0:l.awemeId)&&r.Le.setConfig(r.gI.PreAwemeId,null==l?void 0:l.awemeId)}},[l,a])}},290397:function(e,l,i){i.d(l,{Kw:function(){return t},cL:function(){return n},tU:function(){return o}});var o={Photo:"photo",Name:"name",Blank:"blank",Sow:"sow",Pull:"pull",Button:"button",Source:"source",Feed:"feed",Title:"title",Card:"card",SupportArea:"support_area",SupportAreaCard:"support_area_card"},t={AdProduct:"product",AdBackupProduct:"backup_product",AdAnchor:"anchor"},n={HIDDEN:-1,"-1":"HIDDEN",MINI_DARK:0,0:"MINI_DARK",MINI_LIGHT:1,1:"MINI_LIGHT",NORMAL_LIGHT:2,2:"NORMAL_LIGHT"}},954026:function(e,l,i){i.d(l,{f:function(){return o}});let o={playNextInterceptor:function(){let{needShowQuestion:e,setNeedShowQuestion:l,isShowingQuestion:i,setIsShowingQuestion:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{needShowQuestion:!1,setNeedShowQuestion:()=>{},isShowingQuestion:!1,setIsShowingQuestion:()=>{}};return i?(null==l||l(!1),null==o||o(!1),!1):!!e&&(null==o||o(!0),!0)},playPrevInterceptor:function(){let{needShowQuestion:e,setNeedShowQuestion:l,isShowingQuestion:i,setIsShowingQuestion:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{needShowQuestion:!1,setNeedShowQuestion:()=>{},isShowingQuestion:!1,setIsShowingQuestion:()=>{}};return!!i&&(null==l||l(!1),null==o||o(!1),!0)}}},988736:function(e,l,i){i.d(l,{L:function(){return t}}),i(679308),i(490629);var o=i(746546);let t=e=>{let{promotionId:l,originType:i,secAuthorId:t,roomId:n,itemId:r}=e;return Promise.all([(0,o.y3)({promotionId:l,originType:i,secAuthorId:t,roomId:n,itemId:r}),(0,o.$P)({promotionId:l,originType:i})])}},746546:function(e,l,i){i.d(l,{$P:function(){return N},FE:function(){return A},G:function(){return x},N7:function(){return R},Q2:function(){return y},Sn:function(){return b},Ws:function(){return E},XK:function(){return C},XQ:function(){return w},YB:function(){return L},du:function(){return T},jZ:function(){return k},w:function(){return S},y3:function(){return P}});var o=i(629686),t=i(402748),n=i(811603);i(679308),i(362051);var r=i(30995),d=i(987826),a=i(911429),u=i(732199),s=i(431940),c=i.n(s);let{COMMON_SEARCH_PARAMS:v}=r;function m(e){var l,i,o;return{text:null!==(l=null==e?void 0:e.text)&&void 0!==l?l:"",iconUrl:null!==(i=null==e?void 0:e.icon_url)&&void 0!==i?i:"",jumpUrl:null!==(o=null==e?void 0:e.jump_url)&&void 0!==o?o:""}}function f(e){var l,i,o,t;return{userAvatar:null!==(l=null==e?void 0:e.user_avatar)&&void 0!==l?l:"",userNickname:null!==(i=null==e?void 0:e.user_nickname)&&void 0!==i?i:"",text:null!==(o=null==e?void 0:e.text)&&void 0!==o?o:"",imageList:null!==(t=null==e?void 0:e.image_list)&&void 0!==t?t:[]}}function _(e){var l,i,o,t,n;return{image:null!==(l=null==e?void 0:e.image)&&void 0!==l?l:"",name:null!==(i=null==e?void 0:e.name)&&void 0!==i?i:"",price:(o=Number(null==e?void 0:e.price)/100,o),sales:null!==(t=null==e?void 0:e.sales)&&void 0!==t?t:0,productUrl:null!==(n=null==e?void 0:e.product_url)&&void 0!==n?n:""}}function h(e){var l,i,o,t,n,r,d,a,u,s,c,v,_,h,g,p,I,C,w,y,S,T,L,E,k,b,P,N,A,x,R,M,V,F,D,j,B,O,U,W,G,H,Z,K,$,z;let{item_info:Y,status_code:q,log_pb:J}=e;return{statusCode:q,logPb:null!==(N=null==J?void 0:J.impr_id)&&void 0!==N?N:"",itemInfo:{productInfo:{name:null!==(A=null==Y?void 0:null===(l=Y.product_info)||void 0===l?void 0:l.name)&&void 0!==A?A:"",price:(x=Number(null==Y?void 0:null===(i=Y.product_info)||void 0===i?void 0:i.price)/100,x),promiseTextList:null!==(R=null==Y?void 0:null===(o=Y.product_info)||void 0===o?void 0:o.promise_text_list)&&void 0!==R?R:[],logisticsTextList:null!==(M=null==Y?void 0:null===(t=Y.product_info)||void 0===t?void 0:t.logistics_text_list)&&void 0!==M?M:[],imageUrlList:null!==(V=null==Y?void 0:null===(n=Y.product_info)||void 0===n?void 0:n.image_url_list)&&void 0!==V?V:[],scheme:null!==(F=null==Y?void 0:null===(r=Y.product_info)||void 0===r?void 0:r.scheme)&&void 0!==F?F:"",schemeQRcodeBase64:null!==(D=null==Y?void 0:null===(d=Y.product_info)||void 0===d?void 0:d.scheme_qrcode_base64)&&void 0!==D?D:""},shopInfo:{name:null!==(j=null==Y?void 0:null===(a=Y.shop_info)||void 0===a?void 0:a.name)&&void 0!==j?j:"",image:null!==(B=null==Y?void 0:null===(u=Y.shop_info)||void 0===u?void 0:u.image)&&void 0!==B?B:"",label:m(null==Y?void 0:null===(s=Y.shop_info)||void 0===s?void 0:s.label),score:null!==(O=null==Y?void 0:null===(c=Y.shop_info)||void 0===c?void 0:c.score)&&void 0!==O?O:0,percent:null!==(U=null==Y?void 0:null===(v=Y.shop_info)||void 0===v?void 0:v.percent)&&void 0!==U?U:0,tagList:null!==(W=null==Y?void 0:null===(g=Y.shop_info)||void 0===g?void 0:null===(h=g.tag_list)||void 0===h?void 0:null===(_=h.map)||void 0===_?void 0:_.call(h,m))&&void 0!==W?W:[],accountName:null!==(G=null==Y?void 0:null===(p=Y.shop_info)||void 0===p?void 0:p.account_name)&&void 0!==G?G:""},commentInfo:{totalCount:null!==(H=null==Y?void 0:null===(I=Y.comment_info)||void 0===I?void 0:I.total_count)&&void 0!==H?H:0,tagList:null!==(Z=null==Y?void 0:null===(C=Y.comment_info)||void 0===C?void 0:C.tag_list)&&void 0!==Z?Z:[],commentList:null!==(K=null==Y?void 0:null===(S=Y.comment_info)||void 0===S?void 0:null===(y=S.comment_list)||void 0===y?void 0:null===(w=y.map)||void 0===w?void 0:w.call(y,f))&&void 0!==K?K:[]},extraInfo:{productParams:null!==($=null==Y?void 0:null===(E=Y.extra_info)||void 0===E?void 0:null===(L=E.product_params)||void 0===L?void 0:null===(T=L.map)||void 0===T?void 0:T.call(L,e=>{var l,i;return{name:null!==(l=e.name)&&void 0!==l?l:"",value:null!==(i=e.value)&&void 0!==i?i:""}}))&&void 0!==$?$:[],detailImageList:null!==(z=null==Y?void 0:null===(P=Y.extra_info)||void 0===P?void 0:null===(b=P.detail_image_list)||void 0===b?void 0:null===(k=b.map)||void 0===k?void 0:k.call(b,e=>null!=e?e:""))&&void 0!==z?z:[]}}}}function g(e){var l;let{status_code:i,product_preview_list:o,log_pb:t}=e;return{statusCode:i,logPb:null!==(l=null==t?void 0:t.impr_id)&&void 0!==l?l:"",productPreviewList:null==o?void 0:o.map(e=>_(e))}}function p(e){var l,i;let{status_code:o,video_info_list:t,has_product_data:n,product_card:r,log_pb:d}=e;return{statusCode:o,logPb:null!==(l=null==d?void 0:d.impr_id)&&void 0!==l?l:"",videoInfoList:null!==(i=null==t?void 0:t.map(e=>(0,u.s0)(e)))&&void 0!==i?i:[],hasProductData:null!=n&&n,productCard:n?_(r):void 0}}function I(e){let{promotions:l=[],top_promotion:i,target_promotions:o=[],status_code:t,next_offset:n=-1,log_id:r,page_header:d,page_hint:a}=e||{};return{statusCode:t,promotions:l,topPromotion:i,targetPromotions:o,nextOffset:n,logId:r,pageHeader:d,pageHint:a}}async function C(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=await (0,a.U2)("/aweme/v1/web/seo/ecom/detail/product_meta",(0,t._)((0,o._)({},v),{product_id:e}),{},void 0,l,{});return(0,u.RL)(i,h)}async function w(e){let{productId:l="0",itemId:i,needProductCard:n=!1}=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=await (0,a.U2)("/aweme/v1/web/seo/ecom/detail/related_video",(0,t._)((0,o._)({},v),{product_id:l,item_id:i,need_product_card:n}),{},void 0,r,{});return(0,u.RL)(d,p)}async function y(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=await (0,a.U2)("/aweme/v1/web/seo/ecom/detail/recommend_product",(0,t._)((0,o._)({},v),{product_id:e}),{},void 0,l,{});return(0,u.RL)(i,g)}async function S(e){let{roomId:l,authorId:i,offset:n,limit:r=20}=e,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=await (0,a.v_)("/live/promotions/page/",(0,t._)((0,o._)({},v),{room_id:l,author_id:i,offset:n,limit:r}),{},void 0,d);return(0,u.RL)(s,I)}async function T(e){let{roomId:l,authorId:i}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await (0,a.v_)("/live/promotions/page/top/",(0,t._)((0,o._)({},v),{room_id:l,author_id:i}),{},void 0,n)}async function L(e,l){let{roomId:i,authorId:r,productId:d}=e;return(0,n._)(e,["roomId","authorId","productId"]),await (0,a.U2)(l,(0,o._)((0,t._)((0,o._)({},v),{room_id:i,author_id:r,product_infos:JSON.stringify([{product_id:d}])}),e),{},void 0,null)}async function E(e){return(0,a.U2)("/aweme/v1/commerce/order/getUserAuth/",(0,t._)((0,o._)({},v),{user_id:e,app_id:d.APP_ID}))}async function k(e){return(0,a.U2)("/aweme/v1/commerce/order/saveUserAuth/",(0,t._)((0,o._)({},v),{user_id:e,app_id:d.APP_ID,auth_flag:1}))}async function b(e){let{roomId:l,authorId:i,liveSceneId:n=0,entranceInfo:r}=e,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return await (0,a.U2)("/live/promotions/pop/v3/",(0,t._)((0,o._)({},v),{room_id:l,author_id:i,live_scene_id:n,entrance_info:r}),{},void 0,d)}async function P(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{promotionId:i,originType:t,roomId:n,secAuthorId:r,itemId:d}=e||{};return await (0,a.v_)("/ecom/product/detail/saas/pc/",(0,o._)({is_h5:1,origin_type:t},v),{is_h5:1,use_new_price:1,bff_type:2,room_id:n,live_room_id:n,item_id:d,sec_author_id:r,origin_type:t,promotion_ids:String(i),ec_promotion_id:i},void 0,l)}async function N(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{promotionId:i,originType:o}=e||{};return await (0,a.v_)("/aweme/v2/shop/promotion/pack/detail/",{is_h5:1,origin_type:o},{is_h5:1,bff_type:2,origin_type:o,promotion_id:i},void 0,l)}async function A(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{productId:i,shopId:n,cursor:r,count:d,statId:u,tagId:s,sortType:m}=e||{};return await (0,a.U2)("/aweme/v1/web/ecom/product/comments/",(0,t._)((0,o._)({},v),{product_id:i,shop_id:n,cursor:r,count:d,stat_id:u,tag_id:s,sort_type:m}),{transformResponse:e=>c().parse(e)},void 0,l)}async function x(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{productId:i,shopId:n,statId:r}=e||{};return await (0,a.U2)("/aweme/v1/web/ecom/product/comment/counter/",(0,t._)((0,o._)({},v),{product_id:i,shop_id:n,stat_id:r}),{},void 0,l)}async function R(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{commentId:i,action:o}=e;return await (0,a.v_)("/aweme/v1/web/ecom/comment/action/",v,{comment_id:i,action:o},void 0,l)}},236758:function(e,l,i){var o=i(629686),t=i(402748),n=i(320165),r=i(101199);let d=(0,r.forwardRef)((e,l)=>(0,n.jsx)("svg",(0,t._)((0,o._)({width:6,height:9,fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:l},e),{children:(0,n.jsx)("path",{opacity:".7",fillRule:"evenodd",clipRule:"evenodd",d:"M.69 8.124a.75.75 0 0 1 0-1.06l2.828-2.83L.689 1.407A.75.75 0 0 1 1.75.346L5.11 3.704a.75.75 0 0 1 0 1.061L1.75 8.124a.75.75 0 0 1-1.06 0z",fill:"#fff"})})));l.Z=d}}]); |