"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7985],{77985:(e,t,o)=>{o.d(t,{E:()=>er});var i=o(2787),n=o(24643),r=o(40099),a=o(16680),l=o(60322),s=o(49057),d=o(71281),u=o(47172),c=o(46682),p=o(42617),m=o(54622),h=o(25616),v=o(58305),g=o(60484),f=o(79881),b=o(67169),x=o(79983),_=o(20157),y=o(45285),C=o(4474),k=o(97397),w=o(72688),j=o(29098),I=o(11328),M=o(4538),P=o(62186),S=o(72153),L=o(53439);const T=(0,P.default)("div",{target:"e1ebu80n4"})({display:"flex",justifyContent:"flex-start",alignItems:"center",height:38,cursor:"pointer"},"label:DivUserProfile;"),O=(0,P.default)("div",{target:"e1ebu80n5"})({flex:1},"label:DivProfileInfo;"),D=(0,P.default)(u.Link,{target:"e1ebu80n6"})({display:"block",textDecoration:"none","&:hover":{textDecoration:"none"}},"label:StyledProfileLink;"),B=(0,P.default)("div",{target:"e1ebu80n7"})((({theme:e})=>[(0,S.mp)({direction:e.direction,marginEnd:12})]),"label:DivAvatarContainer;"),E=(0,P.default)(L.I,{target:"e1ebu80n8"})((({theme:e})=>[(0,S.mp)({direction:e.direction,marginEnd:12}),{width:40,height:40,borderRadius:"50%",position:"relative"}]),"label:StyledProfileAvatar;"),R=(0,P.default)("div",{target:"e1ebu80n9"})((({theme:e})=>({fontSize:16,lineHeight:"22px",color:e.colors.TextPrimary,fontWeight:"bold",fontFamily:e.fontFamilies.TikTokDisplayFont,display:"inline-flex",alignItems:"center",justifyContent:"center",textDecoration:"none"})),"label:DivUniqueId;"),V=(0,P.default)("h2",{target:"e1ebu80n10"})((({theme:e})=>[(0,S.zy)({theme:e,typography:"P2",fontWeight:"bold",fontFamily:"TikTokFont",color:"TextPrimary"}),{lineHeight:"26px",fontSize:"18px",display:"block",overflow:"hidden",textOverflow:"ellipsis"}]),"label:H2UniqueId;"),A=(0,P.default)("h3",{target:"e1ebu80n11"})((({theme:e})=>[(0,S.zy)({theme:e,typography:"P3",fontWeight:"normal",fontFamily:"TikTokFont",color:"TextSecondary"}),{display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}]),"label:H3Nickname;"),F=(0,P.default)("div",{target:"e1ebu80n12"})({display:"flex",alignItems:"center"},"label:DivExtraContainer;"),z=(0,r.memo)((e=>{const{avatarUri:t,uniqueId:o,nickname:i,verified:r,href:a="",avatarCircle:l=!1,loading:s,onMouseEnter:d,onMouseLeave:u}=e,c=(0,n.jsxs)(T,{children:[(0,n.jsx)(E,{src:"",size:48,skeleton:"avatar"}),(0,n.jsxs)(O,{children:[(0,n.jsx)(R,{children:(0,n.jsx)(I.EA.Title,{style:{width:140,height:24}})}),(0,n.jsx)(F,{children:(0,n.jsx)(I.EA.Title,{style:{width:160,height:15}})})]})]}),p=(0,n.jsx)(D,{to:a,target:"tiktok_live_view_window",rel:"noreferrer noopener",children:(0,n.jsxs)(T,{onMouseEnter:d,onMouseLeave:u,children:[(0,n.jsx)(B,{children:(0,n.jsx)(M.i,{size:40,needAnimation:!0,isShowLive:l,src:t})}),(0,n.jsxs)(O,{children:[(0,n.jsxs)(R,{children:[(0,n.jsx)(V,{children:o}),r&&(0,n.jsx)(j.A,{width:14,height:14,style:{margin:"0 4px"}})]}),(0,n.jsx)(F,{children:(0,n.jsx)(A,{children:i})})]})]})});return s?c:p}));var N=o(30023);const G=(0,P.default)("div",{target:"e4h3q9j0"})({flex:"0 0 544px",width:"544px",display:"flex",flexDirection:"column",padding:"32px 30px"},"label:DivLiveRoomDescriptionPanel;"),U=(0,P.default)("div",{target:"e4h3q9j1"})({margin:"16px 0",fontStyle:"normal",fontWeight:400,fontSize:16,lineHeight:"24px"},"label:DivLiveRoomDescriptionContent;"),q=(0,r.memo)((({isEnd:e=!1,liveInfo:t,requestId:o})=>{const{commonLiveParams:i}=function({liveInfo:e,isEnd:t,requestId:o}){const i=(0,r.useMemo)((()=>{var t;return{room_id:null==e?void 0:e.roomID,anchor_id:null===(t=null==e?void 0:e.ownerInfo)||void 0===t?void 0:t.id,play_mode:"browser_mode",request_id:o,enter_from_merge:"homepage_hot",live_room_mode:null==e?void 0:e.mode}}),[o,e]);return(0,r.useEffect)((()=>{t||(N.YH.handleLiveShow(Object.assign(Object.assign({},i),{enter_method:"live_head"})),N.YH.handleLiveShow(Object.assign(Object.assign({},i),{enter_method:"live_btn"})))}),[t]),{commonLiveParams:i}}({requestId:o,liveInfo:t,isEnd:e}),a=(0,r.useCallback)((e=>(0,C.stringifyUrl)({url:(0,w.G2o)({uniqueId:null==t?void 0:t.ownerInfo.uniqueId,secUid:null==t?void 0:t.ownerInfo.secUid}),query:{enter_from_merge:i.enter_from_merge,from_play_mode:i.play_mode,enter_method:e?"live_btn":"live_head"}})),[t,i]),l=(0,r.useCallback)((()=>{(null==t?void 0:t.ownerInfo.uniqueId)&&window.open(a(!0),"tiktok_live_view_window")}),[a,t]),s=(0,h.s)(),d=(0,r.useMemo)((()=>e?(0,w.fJR)({uniqueId:null==t?void 0:t.ownerInfo.uniqueId,secUid:null==t?void 0:t.ownerInfo.secUid}):a(!1)),[e,null==t?void 0:t.ownerInfo.uniqueId,null==t?void 0:t.ownerInfo.secUid,a]);return(0,n.jsxs)(G,{children:[(0,n.jsx)(z,{avatarUri:t.ownerInfo.avatarThumb,uniqueId:t.ownerInfo.uniqueId,nickname:t.ownerInfo.nickname,href:d,avatarCircle:!e,verified:t.ownerInfo.verified}),(0,n.jsx)(U,{children:t.title}),!e&&(0,n.jsx)(k.y,{buttonTheme:"primary",size:"largeNew",onClick:l,children:s("pm_web_fullpage_entry")})]})}));var W=o(35374),H=o(23500),$=o(16501),K=o(41271),Y=o(90159),X=o(75248),J=o(58632),Q=o(64162),Z=o(4126),ee=o(93995),te=o(57432),oe=o.n(te),ie=o(23999),ne=o(26324),re=o(8536),ae=o(34360);let le=class extends Q.E{constructor(){super(),this.defaultState={isOpen:!1,url:"",isRedirectToProfilePage:!1,closeable:!1,isBannerActive:!1,bannerEnabled:!1,content:{title:"",desc:"",btnOpenText:""},iframeStyle:{},handleDownload:oe(),handleLogin:oe(),closeCallback:oe(),loginModalShow:!1,maskCloseable:!1,userId:"",groupId:"",enterMethod:void 0,pageType:5,modalType:"",hasCheckedPeriodicLogin:!1,hasCheckedPredictionLogin:!1,hasCheckedGuestMode:!1,showLoginOnLoad:!1,isLoginOnLoadClosed:!1,redirectToHomePage:!1,isGuestMode:!1,isGuestModeUI:!1}}setCloseable(e,t){(0,a.CP)().setCloseable(t)}setUrl(e,t){(0,a.CP)().setUrl(t)}setLoginPath(e,t){(0,a.CP)().setLoginPath(t)}setCloseCallback(e,t){t&&(0,a.CP)().setCloseCallback(t)}setIsOpen(e,t){(0,a.CP)().setIsOpen(t)}setContent(e,t){t&&(0,a.CP)().setContent(t)}setHandleDownload(e,t){t&&(0,a.CP)().setHandleDownload(t)}setHandleLogin(e,t){t&&(0,a.CP)().setHandleLogin(t)}setIframeStyle(e,t){(0,a.CP)().setIframeStyle(t)}setModalType(e,t){(0,a.CP)().setModalType(t)}setLoginModalShow(e,t){(0,a.CP)().setLoginModalShow(t)}setMaskCloseable(e,t){(0,a.CP)().setMaskCloseable(t)}setPageType(e,t){(0,a.CP)().setPageType(t)}setUserId(e,t){(0,a.CP)().setUserId(t)}setGroupId(e,t){(0,a.CP)().setGroupId(t)}setLastGroupId(e,t){(0,a.CP)().setLastGroupId(t)}setEnterMethod(e,t){(0,a.CP)().setEnterMethod(t)}setModalImage(e,t){(0,a.CP)().setModalImage(t)}setPopupType(e,t){(0,a.CP)().setPopupType(t)}setIsRedirectToProfilePage(e,t){(0,a.CP)().setIsRedirectToProfilePage(t)}setIsGuestMode(e,t){(0,a.CP)().setIsGuestMode(t)}setIsGuestModeUI(e,t){(0,a.CP)().setIsGuestModeUI(t)}setPredictionPayload(e,t){(0,a.CP)().setPredictionPayload(t)}setIsLinkPhoneOrEmail(e,t){(0,a.CP)().setIsLinkPhoneOrEmail(t)}openModal(e){return e.pipe((0,re.Z)((e=>(0,ie.of)((0,a.CP)().openModal(e)).pipe((0,re.Z)((()=>(0,ie.of)(this.noop())))))))}setCheckPeriodicLogin(e,t){(0,a.CP)().setCheckPeriodicLogin(t)}setCheckPredictionLogin(e,t){(0,a.CP)().setCheckPredictionLogin(t)}setCheckGuestModeLogin(e,t){(0,a.CP)().setCheckGuestModeLogin(t)}setIsLoginOnLoadClosed(e,t){(0,a.CP)().setIsLoginOnLoadClosed(t)}setClearShowLoginOnLoad(e){(0,a.CP)().setClearShowLoginOnLoad()}closeModal(e){return e.pipe((0,re.Z)((e=>(0,ie.of)((0,a.CP)().closeModal(e)).pipe((0,re.Z)((()=>(0,ie.of)(this.noop())))))))}setIsBannerActive(e,t){(0,a.CP)().setIsBannerActive(t)}};le.jotaiAtom=a.JF,(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setCloseable",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,String]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setUrl",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,String]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setLoginPath",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setCloseCallback",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIsOpen",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setContent",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setHandleDownload",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setHandleLogin",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIframeStyle",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setModalType",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setLoginModalShow",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setMaskCloseable",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Number]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setPageType",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setUserId",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setGroupId",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setLastGroupId",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setEnterMethod",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setModalImage",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setPopupType",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIsRedirectToProfilePage",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIsGuestMode",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIsGuestModeUI",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,String]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setPredictionPayload",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIsLinkPhoneOrEmail",null),(0,J.__decorate)([(0,Z.Mj)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[ne.c]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"openModal",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setCheckPeriodicLogin",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setCheckPredictionLogin",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setCheckGuestModeLogin",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIsLoginOnLoadClosed",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setClearShowLoginOnLoad",null),(0,J.__decorate)([(0,Z.Mj)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[ne.c]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"closeModal",null),(0,J.__decorate)([(0,Z.h5)(),(0,J.__metadata)("design:type",Function),(0,J.__metadata)("design:paramtypes",[Object,Boolean]),(0,J.__metadata)("design:returntype",void 0)],le.prototype,"setIsBannerActive",null),le=(0,J.__decorate)([(0,ee.n)("LoginModal"),(0,J.__metadata)("design:paramtypes",[])],le),a.JF.__SIGI_MODULE__=le,(0,ae.y)(le);var se=o(16469),de=o(84987);const ue={id:"logo-icon-5f8ed36e",use:"logo-icon-5f8ed36e-usage",viewBox:"0 0 48 48",content:''};function ce(e){const t=(0,r.useContext)(de.X);return(0,r.useLayoutEffect)((()=>(t.add(ue),()=>{t.remove("logo-icon-5f8ed36e")})),[]),(0,n.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,n.jsx)("use",{xlinkHref:"#logo-icon-5f8ed36e"},void 0)}),void 0)}const pe=(0,P.default)("div",{target:"e1g3y02w0"})((({theme:{colors:e}})=>({position:"fixed",left:0,top:0,right:0,bottom:0,background:e.BGPrimary,zIndex:3e3,display:"flex",flexDirection:"row"})),"label:DivBrowserModeContainer;"),me=(0,P.default)("div",{target:"e1g3y02w1"})({position:"absolute",width:"10%",height:"10%",filter:"blur(2px)",left:"50%",top:"50%",transform:"scale(11)",opacity:"0.3",background:"center no-repeat",backgroundSize:"cover"},"label:DivBlurBackground;"),he=(0,P.default)("svg",{target:"e1g3y02w2"})({position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},"label:SvgPlayIcon;");he.defaultProps=Object.assign(Object.assign({},he.defaultProps),{"data-e2e":"browse-video-play"});const ve=(0,P.default)("button",{target:"e1g3y02w3"})((({theme:{colors:e}})=>({position:"absolute",zIndex:1,display:"flex",justifyContent:"center",alignItems:"center",width:"40px",height:"40px",background:e.ConstLineInverse,borderRadius:"50%",cursor:"pointer",border:"none",outline:"none",fontsize:0,WebkitAppRegion:"no-drag"})),(({theme:e,isUiOptimise:t})=>(0,S.oO)({theme:e,isUiOptimise:t})),"label:ButtonBasicButtonContainer;"),ge=(0,P.default)(ve,{target:"e1g3y02w4"})((({theme:e,isUiOptimise:t})=>({top:"20px",transition:"opacity .3s",backgroundColor:t?"":e.colors.ConstBGContainer,":hover":{opacity:.7},":active":{opacity:.5}})),(({theme:{direction:e}})=>(0,S.mp)({direction:e,start:"20px"})),"label:StyledCloseIconContainer;");ge.defaultProps=Object.assign(Object.assign({},ge.defaultProps),{"data-e2e":"browse-close"});const fe=(0,P.default)(ce,{target:"e1g3y02w5"})({position:"absolute",zIndex:1,top:"20px",borderRadius:"100px",fill:"black"},(({theme:{direction:e}})=>(0,S.mp)({direction:e,start:"84px"})),"label:StyledLogo;");fe.defaultProps=Object.assign(Object.assign({},fe.defaultProps),{"data-e2e":"browse-logo"});const be=(0,P.default)("div",{target:"e1g3y02w6"})((({theme:{colors:e}})=>({flex:"1 0 600px",background:e.ConstBGInverse,position:"relative",overflow:"hidden"})),"label:DivPlayerContainer;"),xe=(0,r.memo)((function({itemListKey:e,currentIndex:t,onCloseBrowserMode:o,onNextVideo:i,onPrevVideo:a,zIndex:l=3e3}){const{handlePlayErrorReport:s}=(0,$.Fb)(),d=(0,W.b)(),{currentId:u="",listLength:k}=(0,g.L$)((0,f.Ky)({itemListKey:e,currentIndex:t})),[j,I]=(0,r.useState)(!1),[M,P]=(0,r.useState)(!1),[S,L]=(0,r.useState)(!1),T=t{L(!0)}),[]),B=(0,r.useCallback)((()=>{I(!j)}),[j]),E=(0,r.useCallback)((()=>{i()}),[i]),R=(0,r.useCallback)((()=>{a()}),[a]),V=(0,r.useCallback)((()=>{o()}),[o]),A=(0,f.FQ)({handleNext:E,handlePrev:R,hasNext:T,currentIndex:t,itemListKey:e}),{liveRoomInfo:F,requestId:z}=(0,f.jd)({itemListKey:e,currentIndex:t}),N=(0,c.w)(x.O);!function({liveRoomInfo:e,onCloseBrowserMode:t}){(0,r.useEffect)((()=>{if(!e)return;const t=(0,C.stringifyUrl)({url:(0,w.G2o)({uniqueId:e.ownerInfo.uniqueId}),query:{live_room_mode:null==e?void 0:e.mode,play_mode:"browser_mode",enter_from_merge:"homepage_hot",enter_method:"live_cell"}});window.history.replaceState(window.history.state,"live-card",t)}),[e]),(0,r.useEffect)((()=>{const e=()=>{t({fromPopState:!0})};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}}),[])}({liveRoomInfo:F,onCloseBrowserMode:o}),function({currentId:e,togglePlay:t,handleNext:o,handlePrev:i,handleClose:n}){const a=(0,r.useRef)(!0),l=(0,X.i3)(),s=(0,X.S4)(),d=(0,r.useRef)(-1),u=(0,K.P)(le,{selector:e=>e.isOpen,dependencies:[]}),c=(0,r.useCallback)((()=>{se.lA.setItem("muted",!l),s.setMute(!l)}),[s,l]),p=(0,r.useCallback)((e=>{if(u)return;const r=new Map([[27,()=>{n()}],[40,()=>{o()}],[32,()=>{t()}],[38,()=>{i()}],[77,()=>{c()}]]);if(r.has(e.keyCode)){e.preventDefault(),e.stopPropagation();const t=r.get(e.keyCode);return null==t||t(),!1}}),[u,n,i,t,o,c]),m=(0,r.useRef)(p);m.current=p,(0,r.useEffect)((()=>{const e=e=>m.current(e);return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[]);const h=(0,Y._g)((e=>{e.stopPropagation(),d.current&&clearTimeout(d.current),d.current=window.setTimeout((()=>{if(a.current)return;const t=-e.deltaY||-e.detail;Math.max(-1,Math.min(1,t))<0?o():i(),a.current=!1}),100)}),[e,o,i],20);(0,r.useEffect)((()=>(document.addEventListener("wheel",h),()=>{document.removeEventListener("wheel",h)})),[h]),(0,r.useEffect)((()=>{setTimeout((()=>{a.current=!1}),2e3)}),[])}({currentId:u,togglePlay:B,handleNext:E,handlePrev:R,handleClose:V});const{showModal:G,hideModal:U}=(0,_.g9)();(0,r.useEffect)((()=>(G(!0),I(!0),()=>{U(),I(!1)})),[U,G]);const J=(0,r.useCallback)((()=>{P(!0)}),[]),Q=(0,r.useCallback)((()=>{D()}),[D]);(0,r.useEffect)((()=>{S&&u&&N.deleteLiveItem(u)}),[S,u,N]),(0,r.useEffect)((()=>{F||o()}),[F,o]);const Z=(0,H.t4)();return(0,n.jsx)(p.Ay,{returnFocus:!0,children:(0,n.jsxs)(pe,{style:{zIndex:l},children:[(0,n.jsxs)(be,{children:[(0,n.jsx)(me,{style:{backgroundImage:`url(${null==F?void 0:F.coverUrl})`}}),(0,n.jsx)(y.C,{liveInfo:F,requestId:z,loggerConfig:Z,onLiveEndTimeoutStart:J,onLiveEndTimeoutEnd:Q,onPlayError:s,isBrowserMode:!0,active:j,autoplay:!0,volumeProps:d}),(0,n.jsx)(ge,{role:"button","aria-label":O("Close"),onClick:V,onMouseDown:v.dG,children:(0,n.jsx)(m.A,{width:18,height:18,fill:"#fff"})}),(0,n.jsx)(fe,{width:40,height:40}),A]}),F&&(0,n.jsx)(q,{requestId:z,isEnd:M,liveInfo:F})]})})}));var _e=o(35323),ye=o(93987),Ce=o(43626),ke=o(73580),we=o(48980),je=o(43175),Ie=o(38470),Me=o(26059),Pe=o(98332),Se=o(56546),Le=o(97071),Te=o(2584),Oe=o(95357),De=o(91055),Be=o(49677),Ee=o(61740),Re=o(4103),Ve=o(509),Ae=o(8046),Fe=o(14107),ze=o(11983),Ne=o(32125),Ge=o(99282),Ue=o(88920),qe=o(94039),We=o(19442),He=o(71777),$e=o(53438),Ke=o(86634),Ye=o(48180),Xe=o(7772),Je=o(40884),Qe=o(28936),Ze=o(40650),et=o(22248),tt=o(63363),ot=o(85245),it=o(29793),nt=o(78305),rt=o(93341),at=o(4712),lt=o(63438),st=o(53924),dt=o(37350),ut=o(96689),ct=o(60492),pt=o(85349),mt=o(80357),ht=o(48452),vt=o(83600),gt=o(89367),ft=o(86751),bt=o(76497),xt=o(99893),_t=o(5441),yt=o(42287),Ct=o(80131),kt=o(40935),wt=o(59952),jt=o(78208),It=o(93965),Mt=o(36792),Pt=o(53656),St=o(52333),Lt=o(7859),Tt=o(53764),Ot=o(95481);const Dt=(0,P.default)("div",{target:"e19twy0g0"})((({theme:{colors:e}})=>({position:"relative",width:310,height:218,boxSizing:"content-box",borderRadius:8,backgroundColor:e.BGPrimary,textAlign:"center"})),"label:DivLeaveModalContainer;"),Bt=(0,P.default)("div",{target:"e19twy0g1"})((({theme:e})=>[(0,S.zy)({theme:e,color:"TextPrimary",typography:"H5"}),{position:"absolute",top:22,left:20,right:20}]),"label:DivTitle;"),Et=(0,P.default)("div",{target:"e19twy0g2"})((({theme:e})=>[(0,S.zy)({theme:e,color:"TextSecondary",typography:"H6"}),{position:"absolute",top:60,left:20,right:20}]),"label:DivSubTitle;"),Rt=(0,P.default)("div",{target:"e19twy0g3"})({position:"absolute",top:118,left:20,right:20,height:100},"label:DivButtonContainer;"),Vt=(0,P.default)("div",{target:"e19twy0g4"})((({theme:e})=>[(0,S.zy)({theme:e,color:"ConstTextInverse",typography:"H6"}),{height:48,lineHeight:"48px",borderRadius:2,backgroundColor:e.colors.Primary,cursor:"pointer"}]),"label:DivConfirmButton;"),At=(0,P.default)("div",{target:"e19twy0g5"})((({theme:e})=>[(0,S.zy)({theme:e,color:"TextTertiary",typography:"H6"}),{height:48,lineHeight:"48px",cursor:"pointer",marginTop:2}]),"label:DivCancelButton;"),Ft=(0,r.memo)((function({needLeaveCheck:e,visible:t,onConfirmLeave:o,onCancelLeave:i}){const a=(0,h.s)(),l=(0,u.useHistory)(),s=(0,r.useRef)(null),[d,c]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!1),v=(0,r.useCallback)((()=>{c(!1),m(!0),o()}),[o]),g=(0,r.useCallback)((()=>{c(!1),s.current=null,i()}),[i]),f=(0,r.useCallback)((t=>!(!p&&e&&(c(!0),s.current=t,1))),[p,e]);(0,r.useEffect)((()=>{const e=s.current;p&&e&&l.push(e)}),[p,l]);const b=(0,Tt.M)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u.Prompt,{when:e,message:f}),(0,n.jsx)(Ot.aF,{parentRef:b,visible:t||d,maskCloseable:!1,children:(0,n.jsxs)(Dt,{children:[(0,n.jsx)(Bt,{children:a("comment_tray_exit_title")}),(0,n.jsx)(Et,{children:a("comment_tray_exit_des")}),(0,n.jsxs)(Rt,{children:[(0,n.jsx)(Vt,{onClick:v,children:a("comment_tray_exit_leave")}),(0,n.jsx)(At,{onClick:g,children:a("comment_tray_exit_stay")})]})]})})]})}));var zt=o(70294),Nt=o(27375),Gt=o(8513),Ut=o(31918),qt=o(18410),Wt=o(45515),Ht=o(67960),$t=o(38401),Kt=o(67518),Yt=o(29857),Xt=o(42434),Jt=o(24716),Qt=o(25342),Zt=o(98014),eo=o(84908),to=o(82858);const oo={id:"favorite-f29ef602",use:"favorite-f29ef602-usage",viewBox:"0 0 24 24",content:''};function io(e){const t=(0,r.useContext)(de.X);return(0,r.useLayoutEffect)((()=>(t.add(oo),()=>{t.remove("favorite-f29ef602")})),[]),(0,n.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,n.jsx)("use",{xlinkHref:"#favorite-f29ef602"},void 0)}),void 0)}var no=o(6985);const ro={id:"uncollect-7652bb5c",use:"uncollect-7652bb5c-usage",viewBox:"0 0 24 24",content:''};function ao(e){const t=(0,r.useContext)(de.X);return(0,r.useLayoutEffect)((()=>(t.add(ro),()=>{t.remove("uncollect-7652bb5c")})),[]),(0,n.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,n.jsx)("use",{xlinkHref:"#uncollect-7652bb5c"},void 0)}),void 0)}var lo=o(17566),so=o(68182),uo=o(60342),co=o(97706),po=o(44935),mo=o(44494),ho=o(25941),vo=o(86776),go=o(6944),fo=o(96737),bo=o(79395),xo=o(70669),_o=o(64317),yo=o(10332);const Co=(0,n.jsx)(Yt.A,{width:20,height:20}),ko=(0,r.memo)((function(e){var t,o,i,a;const l=(0,Kt.u)(),d="rtl"===l.direction,u=(0,ke.Nj)(Se.A),p=(0,h.s)(),{itemId:m,hideComment:v=!1,teaParams:f,onTabChange:b,activeTab:_}=e,y=(0,c.w)(St.k),C=(0,bo.k)(m),{ad_info:k,item_control:w,stats:j,statsV2:I,digged:M,id:P="",collected:S}=(0,g.L$)(C),L=null!=I?I:j,T=!!k,O=!1===(null==w?void 0:w.can_share),D=!1===(null==w?void 0:w.can_comment),B=(0,po.AP)(m),E=(0,to.Eo)(),R=(0,c.w)(x.O),V=(0,eo.nW)((e=>{var t;return e.users[null!==(t=null==C?void 0:C.author)&&void 0!==t?t:""]}),Ne.bN),[A,F]=(0,r.useState)(!1),{shouldOptimizeCta:z}=(0,Ue.kb)(),N=z?24:20,G=(0,r.useMemo)((()=>(0,n.jsx)(io,{width:N,height:N})),[N]),{uniqueId:U=""}=null!=V?V:{},q=(0,lo._u)()(C),{wid:W=""}=null!==(t=(0,s.W)((()=>["wid"]),[]))&&void 0!==t?t:{},H=`https://www.tiktok.com${q}?is_from_webapp=1&sender_device=pc&web_id=${W}`,$=(0,r.useRef)(null),K=(0,r.useMemo)((()=>e=>(0,mo.io)({platform:"copy",url:H,targetDOM:e})),[H]),Y=(0,r.useCallback)((()=>{const e=$.current;u.handleShare(Object.assign(Object.assign({},f),{platform:"copy",author_id:null==V?void 0:V.id,group_id:m,play_mode:"browser_mode",share_click_from:"short"})),T&&Ae.pg.handleShare(f),y.addMlModelTrainData({id:m,action:"share"}),K(e)(),ze.F.open({content:p("Copied"),duration:1.2,widthType:"half",getContainer:Tt.M,getContainerPosition:"fixed"})}),[K,m,u,p,null==V?void 0:V.id,f,T]),{isAddToCollectionEnabled:X,popoverTriggerType:J,toastTheme:Q,toastDuration:Z}=(0,Ue.Ge)(),{isInExperiment:ee,isBrowserMode:te}=(0,Ue.NV)(),oe=(0,qe.FV)(),{isSharedPulsing:ie,lastSharedMethod:ne}=(0,ho.p)(),[re,ae]=(0,r.useState)([]),le=(0,r.useCallback)((e=>{ae(e)}),[]),se=(0,r.useCallback)((()=>{var e;ee&&C&&!C.digged&&oe.turnOnSharePulsing({videoId:m,authorId:null!==(e=null==C?void 0:C.authorId)&&void 0!==e?e:""}),y.postLikeVideo(Object.assign(Object.assign({},f),{id:m,enter_method:"click",play_mode:"browser_mode"}))}),[y,m,f,null==C?void 0:C.digged,ee]),de=(0,ut.G)({actionWhenUserLoggedIn:se,reportClickEvent:()=>{Te.O.handleGeneralClick("like",{scene:"video_feed",group_id:m,play_mode:"browser_mode"})},modalConfig:{query:{enter_method:"click_like",group_id:m}}});const ue=(0,r.useCallback)((()=>{S&&R.removeItemListById({key:"favorites",groupId:m}),y.postCollectVideo({itemId:m})}),[S,y,m,R]),ce=(0,ut.G)({actionWhenUserLoggedIn:ue,modalConfig:{query:{enter_method:"click_favorite",group_id:m}},reportClickEvent:()=>{Te.O.handleGeneralClick("favorite",{group_id:P,play_mode:"browser_mode"})}}),pe=(0,r.useMemo)((()=>(0,n.jsx)(no.A,{fill:M?l.colors.Primary:l.colors.Primary2,width:N,height:N})),[M,N,l.colors.Primary,l.colors.Primary2]),me=(0,r.useMemo)((()=>S?G:(0,n.jsx)(ao,{style:{color:l.colors.Primary2},width:N,height:N})),[G,S,N,l.colors.Primary2]),he=(0,r.useMemo)((()=>Object.assign(Object.assign({},f),{author_id:null==V?void 0:V.id,group_id:m,play_mode:"browser_mode"})),[f,m,null==V?void 0:V.id]),{active:ve,handleMouseEnter:ge,handleMouseLeave:fe,handleOtherModalOpen:be,handleButtonShareOnBlur:xe,actionItemRef:_e,buttonShareRef:ye}=(0,uo.K)(z?300:200),{expanded:Ce}=(0,vo.kw)(),we=(0,$e.MA)(C),je=(0,r.useCallback)((()=>{var e,t;u.handleSharePanelShow(Object.assign(Object.assign({},we),{group_id:m,author_id:null==V?void 0:V.id,share_option_type:Ce,poi_id:null===(e=null==C?void 0:C.poi)||void 0===e?void 0:e.id,playlist_id:null!==(t=null==f?void 0:f.playlist_id)&&void 0!==t?t:"",popup_type:null==f?void 0:f.popup_type,is_sub_only_video:(null==C?void 0:C.subVideoMeta)?1:0,scene:"video_feed"})),ge()}),[u,m,null==V?void 0:V.id,Ce,null===(o=null==C?void 0:C.poi)||void 0===o?void 0:o.id,null==f?void 0:f.playlist_id,null==C?void 0:C.subVideoMeta,null==f?void 0:f.popup_type,we,ge]),Ie=(0,vo.XF)();(0,r.useEffect)((()=>{Ie()}),[Ie]);const Me=(0,r.useCallback)((()=>{F(!0)}),[F]),Pe=(0,r.useCallback)((()=>{F(!1)}),[F]),Le=(0,r.useCallback)((e=>{27===e.keyCode&&(e.stopPropagation(),e.preventDefault(),Pe())}),[Pe]),{shouldShowCommentsCnt:Oe}=(0,Ue.kb)(),De=(0,r.useCallback)((e=>{var t,o;13===e.keyCode||32===e.keyCode?(e.stopPropagation(),e.preventDefault(),je()):27===e.keyCode&&(e.stopPropagation(),e.preventDefault(),z?null===(t=_e.current)||void 0===t||t.setFocus():null===(o=ye.current)||void 0===o||o.focus(),fe())}),[_e,ye,je,fe,z]),Be=()=>{T&&Ae.pg.handleOtherclick(Object.assign(Object.assign({},f),{refer:Qt.Hq.Share}))},Ee=(0,$e.mx)(C),Re=(null==V?void 0:V.isEmbedBanned)||Ee,Ve=(0,r.useCallback)(((e,t)=>{Zt.mr.handleChannelGeneralClick("share_video","video_feed",t)}),[]),Fe=(0,n.jsx)(co.z,{placement:d?"bottomLeft":"bottomRight",active:ve,margin:-12,arrowMargin:12,backgroundColor:l.colors.BGSecondary,children:(0,n.jsx)(xo.o8,{children:(0,n.jsx)(go.SY,{videoId:P,uniqueId:U,mode:1,url:H,enabled:null==C?void 0:C.shareEnabled,embedCode:B,isEmbedBanned:Re,onEmbedModalVisibleChange:e.onEmbedModalVisibleChange,teaParams:he,onSendMessagePanelOpen:Me,from:3,onClickShare:z?Ve:void 0,onOtherModalOpen:z?be:void 0})})}),Ge=!O&&!z&&(0,n.jsxs)(xo.i6,{children:[(0,n.jsx)(xo.jP,{children:H}),(0,n.jsx)(xo._E,{onClick:Y,children:p("copy_link")})]}),We=!z&&!O&&(0,n.jsxs)(xo.eT,{"data-e2e":"browse-share-group",children:[(0,n.jsx)(go.SY,{videoId:P,uniqueId:U,enabled:null==C?void 0:C.shareEnabled,mode:0,url:H,embedCode:B,isEmbedBanned:Re,onEmbedModalVisibleChange:e.onEmbedModalVisibleChange,teaParams:he,onSendMessagePanelOpen:Me,onClickShare:Ve,showLastSharedPulsing:te,onPlatformChange:le}),(0,n.jsxs)(xo.ue,{"aria-expanded":ve,"aria-label":`${p("webapp_share_btn")}`,onMouseEnter:je,onMouseLeave:fe,onKeyDown:De,onBlur:xe,ref:ye,children:[te&&ie&&ne&&!re.includes(ne)?(0,n.jsx)(fo.T,{iconSize:24,lastSharedIconStyle:{marginTop:"8px"},onClick:Be,children:(0,n.jsx)(Xt.A,{width:"16",height:"16",onClick:Be})}):(0,n.jsx)(Xt.A,{width:"16",height:"16",onClick:Be}),Fe]})]}),He=(0,n.jsx)(so.A,{styleType:3,text:E?"":(0,g.D1)(Number(null!==(i=null==L?void 0:L.collectCount)&&void 0!==i?i:0)),Icon:me,onClick:ce}),Ke=(0,n.jsxs)(n.Fragment,{children:[!T&&(X?(0,n.jsx)(Jt.e,{trigger:He,itemId:m,playModeForTea:"browser_mode",popoverTriggerType:J,toastTheme:Q,toastDuration:Z}):He),z&&!O&&(0,n.jsx)(so.A,{style:{color:l.colors.Primary2},styleType:3,Icon:(0,n.jsx)(Xt.A,{width:24,height:24,onClick:Be}),e2eTag:"browse-share",text:(null==L?void 0:L.shareCount)&&!E?(0,g.D1)(null==L?void 0:L.shareCount):p("Share"),onMouseEnter:je,onMouseLeave:fe,onBlur:xe,onKeyDown:De,ariaLabel:p("accessibilityLabels_forYou_btn_share",{number:(0,g.D1)(null==L?void 0:L.shareCount)}),ariaExpanded:ve,ref:_e,children:Fe})]}),Ye=(0,r.useMemo)((()=>({isColor:!1,isStrong:!0,size:N,showTick:!1})),[N]),Xe=(0,yo.g)({itemId:m,iconConfig:Ye}),{handleClickRepost:Je,canRepost:Qe,isReposted:Ze}=(0,yo.l)({itemId:m,playMode:"browser_mode",playlistId:null!==(a=null==f?void 0:f.playlist_id)&&void 0!==a?a:""}),{repostActionVid:et}=(0,Ue.hn)(),tt=Qe&&"v1"===et&&(0,n.jsx)(so.A,{style:{color:Ze?l.colors.AssistColorYellow:l.colors.TextSecondary},styleType:3,text:E?"":(0,g.D1)(null==I?void 0:I.repostCount),Icon:Xe,onClick:Je,e2eTag:"browse-repost",ariaLabel:`${(0,g.D1)(null==I?void 0:I.repostCount)} ${p("pcWeb_repostTab")}`,ariaPressed:Ze});return(0,n.jsxs)(xo.Le,{ref:$,children:[(0,n.jsxs)(xo.d4,{shouldOptimizeCta:z,children:[(0,n.jsxs)(xo.eT,{style:{gap:"20px"},children:[(0,n.jsx)(so.A,{styleType:3,text:E?"":(0,g.D1)(null==L?void 0:L.diggCount),Icon:pe,onClick:de,e2eTag:"browse-like",ariaLabel:`${(0,g.D1)(null==L?void 0:L.diggCount)} ${p("fixed_likes")}`,ariaPressed:M}),!v&&!z&&(0,n.jsx)(so.A,{styleType:3,text:E?"":(0,g.D1)(D?0:null==L?void 0:L.commentCount),Icon:Co,disabled:!0,e2eTag:"browse-comment"}),Ke,tt]}),We]}),Ge,Oe&&(0,n.jsx)(_o.r,{itemId:m,onTabChange:b,activeTab:_,isCommentDisabled:D}),A&&(0,n.jsx)(yt.k,{visible:A,videoId:P,onClose:Pe,onKeyDown:Le})]})}));var wo=o(88091),jo=o(62738),Io=o(22006),Mo=o(22993),Po=o(50289),So=o(46803),Lo=o(44061),To=o(46251),Oo=o(38975),Do=o(50970),Bo=o(51664),Eo=o(30772),Ro=o(97057),Vo=o(69152);const Ao=function({author:e,video:t,videoReportParams:o}){var i;const a=(0,K.P)(Do.L,{selector:t=>{var o,i;return(null===(i=null===(o=t.appContext)||void 0===o?void 0:o.user)||void 0===i?void 0:i.uniqueId)===e.uniqueId},dependencies:[e.uniqueId]}),l=null==t?void 0:t.ad_info,s=(0,Le.n5)({ad_info:l,play_mode:"browser_mode"}),d=(0,ut.K)({query:{enter_method:"click_follow",group_id:null==t?void 0:t.id}}),{text:u,handleFollow:c,isFollowing:p,relation:m}=(0,kt.Tu)({uniqueId:e.uniqueId,onNeedLogin:d,teaParams:Object.assign(Object.assign(Object.assign({},o),s),{group_id:null==t?void 0:t.id,play_mode:"browser_mode"})}),h=(0,r.useMemo)((()=>(0,n.jsx)(n.Fragment,{children:2===m?(0,n.jsx)(jo.A,{}):null})),[m]);if(null==t?void 0:t.scheduleTime)return(0,n.jsx)(Eo.D,{video:t});if(a)return(0,n.jsx)(Vo.KE,{videoId:null!==(i=null==t?void 0:t.id)&&void 0!==i?i:""});const v=p?"secondary":"primary";return(0,n.jsx)(Ro.xV,{children:(0,n.jsx)(wo.I0,{onClick:c,label:u,variant:v,icon:h})})},Fo=(0,r.memo)((function(e){const{uniqueId:t,nicknameEllipsis:o=!1,videoId:i,teaParams:a,target:l="_self"}=e,s=(0,eo.nW)((e=>e.users[t]),Ne.bN),d=(0,bo.k)(i),{ad_info:u,item_control:c}=(0,g.L$)(d),{nickname:p,secUid:m,verified:h,stateControlledMedia:v}=(0,g.L$)(s),{shouldAvatarShowNickName:f}=(0,Ue.kb)(),{t:b,timeTranslator:x}=(0,So.T)(),_=!!u,y=null==u?void 0:u.is_normal,C=!1===(null==c?void 0:c.can_creator_redirect),k=_&&!y||C,{secret:w,forFriend:j,createTime:I,adAuthorization:P}=null!=d?d:{},{showing:S,handleCardEnter:L,handleCardLeave:T,handleItemEnter:O,handleItemLeave:D}=(0,Lo.C)(),B=(0,Bo.r$)(s),{isShowLive:E}=B;(0,Bo.Fu)({isShowLive:E,reportTrigger:E,user:s,enterMethod:E?"video_head_browser":"creator",autoReport:!0,reportValidator:()=>void 0!==(null==s?void 0:s.relation),once:!0});const R=(0,r.useCallback)((()=>{Te.O.handleGeneralClick("user",{scene:"video_feed"})}),[]),V=(0,Bo.AL)(Object.assign({user:s,enterMethod:E?"video_head_browser":"creator",playMode:"browser_mode"},a)),A=(0,r.useMemo)((()=>Object.assign(Object.assign({},V),{author_id:V.to_user_id,group_id:i,ttamRefer:_?Qt.Hq.Photo:void 0})),[V,i,_]),F=(0,r.useMemo)((()=>{if(s)return Object.assign(Object.assign({},V),{author_id:s.id,to_user_id:s.id,group_id:i,enterMethod:"creator",ttamRefer:_?Qt.Hq.Name:void 0})}),[s,V,i,_]),z=(0,r.useMemo)((()=>({margin:"-11px 0 6px 52px"})),[]),{colors:N}=(0,Kt.u)();if(!s)return(0,et.d)(["authorInfo"]);const G=(0,Ro.CH)(E),U={uniqueId:t,secUid:m,onMouseEnter:O,onMouseLeave:D,isInBrowserMode:!0,onClick:e.onClick,onLinkClick:e.onLinkClick},q=f?p:t,W=f?t:p,H={shouldAvatarShowNickName:f},$=f?(0,n.jsx)(Ro.M8,{}):(0,n.jsx)("span",{style:{margin:"0 4px"},children:" · "});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Ro.D_,{children:[(0,n.jsx)((({children:e})=>(0,n.jsx)(G,Object.assign({rel:"opener",target:l,teaParams:A,"data-e2e":"browse-user-avatar"},U,{adInfo:u,children:e}))),{children:(0,n.jsx)(M.i,Object.assign({needAnimation:!0,liveTheme:2,size:40},B))}),(0,n.jsxs)((({children:e})=>(0,n.jsx)(Ro.ah,Object.assign({target:l,rel:"opener",teaParams:F},U,{adInfo:u,children:e}))),{children:[(0,n.jsxs)(Ro.HI,Object.assign({},H,{children:[o?(0,n.jsx)(Ro.IW,{children:q}):q,h&&(0,n.jsx)(Po.s,{width:14,height:14,"data-e2e":"browse-bluev"})]})),(0,n.jsx)("br",{}),(0,n.jsxs)(Ro.ap,Object.assign({},H,{children:[o?(0,n.jsx)(Ro.IW,{children:W}):W,$,(0,n.jsx)("span",{children:x(1e3*Number(I))}),w&&!P&&(0,n.jsxs)(n.Fragment,{children:[$,(0,n.jsx)(Io.A,{width:16,height:16,style:{fill:N.TextPrimary,opacity:.5,margin:"0 4px"}}),(0,n.jsx)("span",{children:b("video_label_private")})]}),j&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{children:" · "}),(0,n.jsx)(Mo.A,{style:{margin:"0 4px"},width:20,height:20}),(0,n.jsx)("span",{className:"friend",children:b("Friends only")})]})]}))]}),!k&&(0,n.jsx)(Ao,{author:s,video:d,videoReportParams:a}),S&&!k&&(0,n.jsx)(To.t,{top:30,fixedLeft:32,onMouseEnter:L,onMouseLeave:T,uniqueId:t,onClick:R})]}),(0,n.jsx)(Oo.w,{style:z,stateControlledMedia:v,labelType:0})]})}));var zo=o(8270),No=o(7931),Go=o(10745),Uo=o(90217);const qo=(0,P.default)("div",{target:"e1mgfe70"})({width:"100%",position:"relative",flexWrap:"wrap",display:"flex"},"label:DivVideoListSkeletonContainer;"),Wo=(0,P.default)("div",{target:"e1mgfe71"})((({theme:e})=>[(0,S.mp)({marginEnd:"7.5px",direction:e.direction}),{width:"160px",height:"240px",marginBottom:"8px",background:e.colors.BGPlaceholderDefault,borderRadius:"4px"}]),"label:DivVideoItemSkeletonWrapper;"),Ho=(0,r.memo)((function({rowNum:e=3}){const t=Array.from({length:3*e},((e,t)=>t));return(0,n.jsx)(qo,{children:t.map((e=>(0,n.jsx)(Wo,{},e)))})})),$o=(0,P.default)("div",{target:"e1o3lsy80"})((({theme:{colors:e}})=>({width:"100%",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",flexGrow:1,position:"relative",display:"flex",flexDirection:"column",background:e.BGCreation3,borderTop:`1px solid ${e.LineSecondary}`})),"label:DivListContainer;"),Ko=(0,P.default)("div",{target:"e1o3lsy81"})({width:"100%",overflowY:"auto",overflowX:"hidden",position:"relative",":first-of-type":{paddingTop:"20px"},paddingInlineStart:"23.5px",flexWrap:"wrap",display:"flex"},"label:DivVideoListContainer;");var Yo=o(10084),Xo=o(71334),Jo=o(38739),Qo=o(28050),Zo=o(95628),ei=o(91842),ti=o(17781);const oi=(0,P.default)("img",{target:"eadndt60"})((({theme:{colors:e}})=>({width:"100%",height:"100%",objectFit:"cover",background:e.BGPlaceholderDefault})),"label:ImgCover;"),ii=(0,P.default)("img",{target:"eadndt61"})({width:"100%",height:"100%",objectFit:"cover",transition:"transform 150ms linear",":hover":{transform:"scale(1.1)"}},"label:ImgPoster;"),ni=(0,P.default)("div",{target:"eadndt62"})({width:"100%",height:"239px",position:"relative",borderRadius:"4px",marginBottom:"8px",overflow:"hidden"},"label:DivCoverContainer;"),ri=(0,P.default)("div",{target:"eadndt63"})({width:"100%",height:"100%",position:"absolute",left:"0",top:"0"},"label:DivPlayerWrapper;"),ai=(0,P.default)("div",{target:"eadndt64"})({position:"absolute",bottom:0,left:0,right:0},"label:DivWarnInfoPosition;"),li=(0,P.default)("div",{target:"eadndt65"})((({theme:{direction:e}})=>[Object.assign({position:"absolute",top:"12px",color:"#fff"},(0,ti.I)()),(0,S.mp)({direction:e,end:"12px"})]),"label:DivPhotoIconContainer;"),si=(0,P.default)("div",{target:"eadndt66"})((({theme:e})=>(0,S.mp)({marginEnd:"7.5px",direction:e.direction})),{width:"160px",height:"239px",marginBottom:"8px",cursor:"pointer"},"label:DivItemContainer;"),di=(0,P.default)("div",{target:"eadndt67"})((({theme:e,hasSolidBackground:t,hasGradientBackground:o})=>({width:"100%",height:"100%",left:"0",top:"0",backdropFilter:t?"none":"blur(50px)",background:t?e.colors.ConstBGInverse:o?"linear-gradient(180deg, #2b2b2b 0%, #000000 90%)":e.colors.SDSecondary,position:"absolute",borderRadius:"4px"})),"label:DivMask;"),ui=(0,P.default)("div",{target:"eadndt68"})((({theme:e})=>({position:"absolute",top:"50%",left:"50%",color:e.colors.ConstTextInverse,transform:"translate(-50%, -50%)",width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",background:e.colors.ConstBGContainer,borderRadius:"50px"})),"label:DivMaskContainer;"),ci=(0,P.default)("div",{target:"eadndt69"})((({theme:e})=>({position:"absolute",height:"40px",left:0,right:0,bottom:0,background:"linear-gradient(180deg, rgba(22, 24, 35, 0.0001) 2.92%, rgba(22, 24, 35, 0.3) 98.99%)",color:e.colors.ConstTextInverse,fontSize:"13px",lineHeight:"17px",padding:"12px 8px 8px 8px",display:"flex",alignItems:"center"})),"label:DivPlayCount;"),pi=(0,P.default)(ei.A,{target:"eadndt610"})((({theme:e})=>(0,S.mp)({direction:e.direction,marginEnd:4})),"label:StyledPlay;"),mi=(0,r.memo)((0,r.forwardRef)((({item:e,index:t,playing:o,handleClickCreatorVid:i},a)=>{var l,s;const{video:d,authorId:u="",stats:p,statsV2:m,warnInfo:h}=(0,g.L$)(e),v=null!=m?m:p,{cover:f,playAddr:b="",zoomCover:x,bitrate:_}=(0,g.L$)(d),y=(0,ke.Nj)(Jo.Gs),[C,k]=(0,We.BI)((e=>e.isCreatorBrowserMode)),w=(0,r.useRef)(null),[j,I]=(0,r.useState)(!1),M=(0,to.Eo)(),{withNoBG:P,withLinearGradientBG:S}=(0,Ue.KS)();(0,r.useEffect)((()=>{var e,t,o,i;j&&w.current?null===(t=(e=w.current).play)||void 0===t||t.call(e):w.current&&(null===(i=(o=w.current).pause)||void 0===i||i.call(o))}),[j]);const L=(0,r.useCallback)((o=>{i&&i(o),C?k.handleCreatorModeVideoClick({creatorFeedIndex:t}):(k.handleEnterCreatorMode({creatorFeedIndex:t}),De.G.handleCreatorPageShow({group_id:e.id,author_id:u}))}),[i,k,t,C,u,e.id]),{showVideoMask:T}=(0,jt.d)({item:null!=e?e:{},playMode:7}),O=(0,Ue.tj)(),D=(0,$e.mx)(e),{hideMaskTempVideoId:B}=(0,K.P)(wt.w),E=T&&B!==e.id,R=(0,c.w)(it.hf),V=(0,c.w)(nt.y7),A=(0,r.useMemo)((()=>{var t,o,i;return{itemId:e.id,authorId:null!==(t=e.authorId)&&void 0!==t?t:"",isScheduled:!1,autoplayStatus:0,playMode:7,isReposted:Number(null!==(i=null===(o=e.statsV2)||void 0===o?void 0:o.repostCount)&&void 0!==i?i:0)>0,enterMethod:"creator_tab"}}),[e.id,e.authorId,null===(l=e.statsV2)||void 0===l?void 0:l.repostCount]),F=(0,r.useCallback)((()=>{var e;const{currentTime:t=0,duration:o=0}=(0,g.L$)(null===(e=w.current)||void 0===e?void 0:e.getPlayerAttributes());return Object.assign(Object.assign({},A),{currentTime:t,duration:o})}),[A]),z=(0,r.useCallback)((()=>{y.handleEndedForSideCards(F())}),[y,F]),N=(0,r.useCallback)((()=>{y.handlePause(F())}),[y,F]),G=(0,r.useCallback)((()=>{y.handleWaiting(F())}),[y,F]),U=(0,r.useCallback)((()=>{I(!0),y.handleTimeUpdateForSideCards(F())}),[y,F]),q=(0,r.useCallback)((()=>{I(!1),y.handlePause(F())}),[y,F]),W=(0,r.useCallback)((t=>{E||(t.preventDefault(),t.stopPropagation(),e&&(R.removeBlockVideo(e.id),V.removeBlockVideo(e.id)))}),[R,V,e,E]),H=(0,K.P)(it.hf,{selector:e=>e.blockedVideos||[],dependencies:[]}),$=(0,K.P)(nt.y7,{selector:e=>e.blockedVideos||[],dependencies:[]}),Y=E||H.includes((null==e?void 0:e.id)||"")||$.includes((null==e?void 0:e.id)||""),X=!Y&&o;return(0,n.jsx)(si,{onClick:L,ref:a,children:(0,n.jsxs)(ni,{onMouseEnter:U,onMouseLeave:q,children:[(0,n.jsx)(oi,{src:(null==x?void 0:x[480])||f}),!j||Y||X?null:(0,n.jsx)(ri,{children:D?(0,n.jsx)(ii,{src:null!==(s=null==x?void 0:x[480])&&void 0!==s?s:f}):(0,n.jsx)(Zo.e,{ref:w,horizontal:!1,itemMute:!0,muteSetting:lt.T5[7].forceMute,defaultMute:lt.T5[7].defaultMute,playProgress:0,src:b,onEnded:z,onPause:N,onWaiting:G,bitrate:Number(_)})}),!O&&(null==h?void 0:h[0])&&(0,n.jsx)(ai,{children:(0,n.jsx)(bt.Q,{needExtraBottom:!0,info:null==h?void 0:h[0]})}),D&&(0,n.jsx)(li,{children:(0,n.jsx)(Yo.N,{size:20})}),X&&(0,n.jsx)(Qo.h,{}),Y&&(0,n.jsx)(di,{hasSolidBackground:P,hasGradientBackground:S,children:(0,n.jsx)(ui,{onClick:W,children:(0,n.jsx)(Xo.A,{width:"24",height:"24"})})}),!M&&(0,n.jsxs)(ci,{children:[(0,n.jsx)(pi,{width:20,height:20,fill:"#fff"}),(0,g.D1)(null==v?void 0:v.playCount)]})]})})})));var hi=o(50461);const vi=(0,r.memo)((0,r.forwardRef)((({itemList:e,onLoadMore:t,onLoadMoreBefore:o,hasMoreLatest:i,hasMorePrevious:a,hasMore:l,isLoading:s,currentItemId:d,currentAuthorId:u,handleClickCreatorVid:c},p)=>{const m=(0,We.JD)((e=>e.currentIndex)),[h,v]=(0,r.useState)(!1),[b,x]=(0,r.useState)(!0),[_,y]=(0,r.useState)(!1),C=(0,r.useMemo)((()=>(null==e?void 0:e.length)>0),[e]),k=(0,r.useRef)(null),w=(0,r.useRef)(0),j=(0,r.useRef)(null),{currentId:I=""}=(0,g.L$)((0,f.Og)({currentIndex:m})),M=(0,g.L$)((0,K.P)(St.k,{selector:e=>e[I],dependencies:[I]}));(0,r.useEffect)((()=>{C&&De.G.handleCreatorTabLoadComplete({group_id:d,author_id:u})}),[C]),(0,r.useEffect)((()=>{x(!0)}),[I]),(0,Go.O9)({elemRef:k,onHitBottom:t,isFirstRender:b}),(0,Go.yE)({elemRef:k,scrollTopRef:w,onHitTop:o,isFirstRender:b});const P=(0,r.useCallback)((()=>{var e;j.current&&(v(!1),null===(e=k.current)||void 0===e||e.scrollTo({top:j.current.offsetTop,behavior:"smooth"}))}),[]),S=(0,r.useCallback)((()=>{De.G.handleClickPlayNow({group_id:d,author_id:u}),P()}),[d,u,P]);let L;k.current&&(L=k.current.getBoundingClientRect()),(0,Uo.B)({intersectionHandler:()=>{v(!1),b&&x(!1)},outerSectionHandler:()=>{if(b)x(!1),P();else if(j.current){v(!0);const{top:e,bottom:t}=j.current.getBoundingClientRect();t-47.800000000000004L.bottom&&y(!1)}},element:j,threshold:[b?.9:.2]});const T=3-e.length%3,O=Array.from({length:3===T?0:T},((e,t)=>t));return(0,n.jsxs)($o,{ref:p,children:[(0,n.jsxs)(Ko,{ref:k,children:[!e.length&&s?(0,n.jsx)(Ho,{rowNum:3}):null,s&&e.length>0&&i?(0,n.jsx)(Ho,{rowNum:1}):null,e.map(((e,t)=>((e,t,o)=>e?(0,n.jsx)(mi,{ref:(null==M?void 0:M.id)===e.id?o:null,playing:(null==M?void 0:M.id)===e.id,index:t,item:e,handleClickCreatorVid:c},e.id):null)(e,t,j))),s&&e.length>0&&l&&0!==T&&O.map((e=>(0,n.jsx)(Wo,{},e))),s&&e.length>0&&(a||l)?(0,n.jsx)(Ho,{rowNum:1}):null]}),h&&(0,n.jsx)(hi.x,{onClick:S,isUp:_})]})})));var gi=o(93638),fi=o(39415),bi=o(11072),xi=o(35043),_i=o(62696),yi=o(2191);const Ci=(0,r.memo)((function(e){var t,o,i,a,l,u,p,m;const{item:g,itemListKey:b,prefetchId1:x="",prefetchId2:_="",teaParams:y,videoReportParams:C,onBrowserModeClose:k,handleClickCreatorVid:w,videoCount:j=0}=e,{id:I,author:M="",scheduleTime:P,music:S,ad_info:L,item_control:T}=g,O=(0,kt.yS)(null==g?void 0:g.author),{user:D,abTestVersion:B}=null!==(t=(0,s.W)((()=>["user","language","abTestVersion"]),[]))&&void 0!==t?t:{},{allowRightPanelScroll:E,shouldOptimizeCta:R,shouldShowCommentsCnt:V}=(0,Ue.kb)(),{isOpenNewTab:A}=(0,Ue.M4)(),F=(0,Ge.MQ)(),z=null!==(o=(0,d.qt)(B,"browser_mode_encourage_login"))&&void 0!==o?o:"v1",{isCreatorBrowserMode:N,currentIndex:G}=(0,We.JD)((e=>({isCreatorBrowserMode:e.isCreatorBrowserMode,currentIndex:e.currentIndex})),Ne.bN),{creatorTabVidList:U,hasMoreLatest:q,hasMorePrevious:W,creatorTabLoading:H,statusCode:$,listLength:K}=(0,fi.ag)((e=>{var t,o,i;return{creatorTabVidList:e.browserList,hasMorePrevious:null!==(t=e.hasMorePrevious)&&void 0!==t&&t,hasMoreLatest:null!==(o=e.hasMoreLatest)&&void 0!==o&&o,creatorTabLoading:e.loading,statusCode:e.statusCode,listLength:null!==(i=null==e?void 0:e.list.length)&&void 0!==i?i:0}}),Ne.bN),[{creatorTabItemList:Y}]=(0,c.S)(St.k,{selector:e=>({creatorTabItemList:U.filter((t=>{var o;return(null===(o=e[t])||void 0===o?void 0:o.authorId)===(null==O?void 0:O.id)})).map((t=>e[t]))}),dependencies:[U]}),X=(0,h.s)(),{prefixText:J,loginText:Q,endText:Z}=(0,f.ih)(),ee=(0,bi.M)(g.id)&&F,te=(0,bi.sX)(g.id),oe=(0,r.useRef)(I),[ie,ne]=(0,r.useState)(!1),[re,ae]=(0,r.useState)(0),le=Boolean(D),se=b?xi.FB[b]:999,{nickname:de=""}=null!=O?O:{},ue=!!L,ce=!1===(null==T?void 0:T.can_comment),pe=A?"_blank":"_self",me=(0,_i.V)({item:g,showTranslation:te}),he=(0,r.useMemo)((()=>{var e;if((null===(e=g.event)||void 0===e?void 0:e.event_id)&&g.event.event_start_time)return{eventId:g.event.event_id,eventStartTime:Number(g.event.event_start_time),authorId:M,groupId:I}}),[g]),ve=(0,r.useMemo)((()=>3===(null==g?void 0:g.itemCommentStatus)||3===(null==O?void 0:O.commentSetting)),[(null==O||O.commentSetting,null==g?void 0:g.itemCommentStatus)]),ge=(0,r.useMemo)((()=>(0,Nt.qY)(O,null==D?void 0:D.uid)),[O,null==D?void 0:D.uid]),fe=!1===(null==T?void 0:T.can_creator_redirect),be=Y[Y.length-1],xe=Y[0],_e=`${J}${Q}${Z}`,ye=0===re,Ce=1===re,ke=E&&!ve&&!Ce,we=X("pcWeb_login_browserMode"),je=(0,r.useMemo)((()=>({author_id:M,group_id:I})),[M,I]),Ie=(0,r.useMemo)((()=>{var e;return{author_id:M,group_id:I,music_id:null!==(e=null==S?void 0:S.id)&&void 0!==e?e:""}}),[M,I,null==S?void 0:S.id]),Me=(0,r.useCallback)((()=>{ne(!0)}),[]),Pe=(0,r.useCallback)((()=>{ne(!1)}),[]),Se=(0,f.V0)({id:I,authorId:null!==(i=null==D?void 0:D.uid)&&void 0!==i?i:"",playMode:"browser_mode",needDispose:!1,handleCommentScrollDown:Me,handleCommentHitTop:Pe}),Le=(0,f.rw)(null!==(a=null==O?void 0:O.secUid)&&void 0!==a?a:"",1e3*Number(null!==(l=null==be?void 0:be.createTime)&&void 0!==l?l:0),!1),Oe=(0,f.rw)(null!==(u=null==O?void 0:O.secUid)&&void 0!==u?u:"",1e3*Number(null!==(p=null==xe?void 0:xe.createTime)&&void 0!==p?p:0),!0),De=(0,r.useCallback)((()=>{(null==Se?void 0:Se.current)&&Se.current.scrollTo({top:0,behavior:"smooth"})}),[Se]),Be=(0,r.useCallback)((e=>{ae(e)}),[]),Ee=(0,ut.G)({modalConfig:{query:{enter_method:"click_comment",group_id:I}},reportClickEvent:()=>{Te.O.handleGeneralClick("post_comment",{group_id:I,play_mode:"browser_mode"})}});(0,r.useEffect)((()=>{N||ae(0)}),[I,N]),(0,r.useEffect)((()=>{N&&0===re&&0===$&&W&&K-G<=3?Le():N&&0===re&&0===$&&q&&G<=1&&Oe()}),[N,G,re,Le,Oe,W,q,K,$]),(0,r.useEffect)((()=>{oe.current!==I&&Se&&Se.current&&(Se.current.scrollTop=0),oe.current=I}),[I,Se]);const Re=(0,n.jsx)(Fo,{target:pe,onClick:e=>{L||!1!==(null==T?void 0:T.can_creator_redirect)||(ze.F.destroy(),ze.F.open({content:X("ad_not_support"),duration:3}),(0,v.Gu)(e))},onLinkClick:e.onLinkClick,uniqueId:M,videoId:I,teaParams:y,nicknameEllipsis:!0}),Ve=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Gt.k,{onlyKey:I,lineClamp:2,overflowLineNum:12,showTranslation:te,children:(0,n.jsx)(Ut.g,{onBrowserModeClose:k,target:pe,onLinkClick:e.onLinkClick,item:g,showTranslation:te,e2eTag:"browse-video-desc",reportParams:y})}),ee&&(0,n.jsx)(yi.G,{itemId:I,authorId:null!==(m=g.authorId)&&void 0!==m?m:""})]}),Ae=(0,r.useMemo)((()=>(0,n.jsx)(qt.i,{onLinkClick:e.onLinkClick,styleType:1,item:g,target:pe,e2eTag:"browse-music",teaParams:y})),[g,e.onLinkClick,pe,y]);if(P){const e=(0,n.jsxs)(n.Fragment,{children:[Re,(0,n.jsxs)(gi.Mi,{children:[Ve,(0,n.jsxs)(gi.qF,{children:[(0,n.jsx)($t.P,{target:pe,item:g}),(0,n.jsx)(Wt.a,{item:g})]}),(0,n.jsx)(gi.Ys,{scheduledTime:Number(P),height:22,fontSize:16,iconSize:20,iconMargin:4})]})]});return(0,n.jsxs)(gi.wV,{children:[(0,n.jsx)(gi.ex,{shouldShowCommentsCnt:V,children:e}),(0,n.jsx)(gi.pp,{}),(0,n.jsx)(gi.hJ,{children:(0,n.jsx)(gi.rb,{children:X("scheduled_video_comment_unavailable")})})]})}const Fe=(0,n.jsxs)(n.Fragment,{children:[me&&(0,n.jsx)(gi.a_,{children:me}),Ve,he&&(0,n.jsx)("div",{style:{marginTop:"8px"},children:(0,n.jsx)(zt._,{eventList:[he]})}),Ae,(0,n.jsx)(Ht.gF,{item:g,target:pe,playMode:2,poiTeaParams:je,capcapAnchorTeaParams:Ie,onLinkClick:e.onLinkClick,pageType:se})]}),qe=(0,n.jsx)(ko,{itemId:I,onEmbedModalVisibleChange:e.onEmbedVisibleChange,teaParams:y,onTabChange:Be,activeTab:re}),He=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(gi.ex,{children:[Re,(0,n.jsx)(gi.Mi,{shouldOptProfile:!0,children:Fe})]}),(0,n.jsx)(gi.Mi,{shouldOptimizeCta:R,children:qe})]}),$e=j>1?(0,n.jsx)(wo.I0,{variant:"primary",size:"medium",label:we}):(0,n.jsx)(gi.VW,{children:we}),Ke="v1"===z?(0,n.jsx)(gi.hJ,{onClick:Ee,children:(0,n.jsx)(gi.mB,{children:_e})}):(0,n.jsx)(gi.oH,{onClick:Ee,children:"v2"===z?(0,n.jsx)(gi.VW,{children:we}):$e});return(0,n.jsx)(pt.t,{isMobile:!1,componentName:"browser-mode-content",children:(0,n.jsxs)(gi.wV,{optDescription:!0,noPaddingTop:ke,children:[ke?null:He,ye&&(ve&&!ce?(0,n.jsx)(gi.rb,{"data-e2e":"comment-turned-off",children:X("comment_off")}):(0,n.jsx)(pt.t,{isMobile:!1,componentName:"browser-mode-comment-list",children:(0,n.jsx)(zo.QM,{itemId:I,onClose:e.onClose,prefetchId1:x,prefetchId2:_,disableReply:ge,creatorTabDisabled:ue||fe,ref:Se,teaParams:y,profileContent:ke?He:null,onClickScrollToTop:De,showScrollToTop:ie,onTabChange:Be,adsCommentDisabled:ce})})),ye&&(0,n.jsxs)(n.Fragment,{children:[le&&!ve&&!ce&&(0,n.jsx)(gi.hJ,{children:ge?(0,n.jsx)("div",{children:X("comment_disable_notfollow").replace("%@",de)}):(0,n.jsx)(No.gi,{itemId:I,teaParams:C})}),!le&&Ke]}),Ce&&(0,n.jsx)(pt.t,{isMobile:!1,componentName:"browser-mode-creator-tab",children:(0,n.jsx)(vi,{itemList:Y,hasMorePrevious:W,hasMoreLatest:q,isLoading:H,onLoadMore:Le,onLoadMoreBefore:Oe,currentPlayingItemListKey:b,currentItemId:I,currentAuthorId:M,handleClickCreatorVid:w})})]})})}));var ki=o(99129),wi=o(82668),ji=o(41632),Ii=o(12674);const Mi=(0,r.memo)((function({adInfo:e}){const{button_color:t="",button_text:o,ad_id:i}=e,[a,l]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{l(!1)}),[i]),(0,n.jsxs)(Ii.OV,{"data-e2e":"ttam-ads-cta",onAnimationEnd:()=>{l(!0)},toBackground:t,animationEnd:a,children:[`${o} `," ",(0,n.jsx)(Ii.tj,{fontSize:16})]})})),Pi=(0,r.memo)((function(e){const{adInfo:t,author:o,desc:i}=e,{ad_id:a}=t,l=(0,Le.n5)({ad_info:t,play_mode:"browser_mode"});return(0,r.useEffect)((()=>{Ae.pg.handleOthershow(Object.assign(Object.assign({},l),{refer:Qt.Hq.Button}))}),[a]),(0,n.jsxs)(Ii.hr,{onClick:e=>{(0,at.Zy)({adInfo:t,refer:Qt.Hq.Button,tag:Qt.xY.BrowserMode}),e.preventDefault(),e.stopPropagation()},children:[(0,n.jsxs)(Ii.WH,{children:[(0,n.jsx)(Ii.G5,{src:null==o?void 0:o.avatarThumb}),(0,n.jsxs)(Ii.k7,{children:[(0,n.jsx)(Ii.m0,{"data-e2e":"ttam-ads-popup-title",children:null==o?void 0:o.uniqueId}),(0,n.jsx)(Ii.Qp,{"data-e2e":"ttam-ads-popup-description",children:i})]})]}),(0,n.jsx)(Mi,{adInfo:t})]})}));var Si=o(83162),Li=o(64116),Ti=o(45958),Oi=o(30018),Di=o(36776),Bi=o(536);const Ei=(0,r.memo)((function(e){var t,o;const i=(0,r.useRef)(null),a=(0,r.useRef)(null),l=(0,r.useRef)(null),d=(0,r.useRef)(null),[u,c]=(0,r.useState)(!1),[p,m]=(0,r.useState)(!0),{direction:h}=(0,Kt.u)(),g=(0,r.useRef)("0"),{user:f}=null!==(t=(0,s.W)((()=>["user"]),[]))&&void 0!==t?t:{},{hasAutoScrollButton:b}=(0,Ue.iz)(),{enableMiniPlayer:x}=(0,Bi.D)(),{vid:_,seek:y,videoRef:C,progressReportCallback:k,extraBottomSpace:w=!1,isXgPlayer:j,isBrowserMode:I}=e;(0,r.useEffect)((()=>{g.current=_}),[_]);const{bindDrag:M,seek:P,seekByDelta:S,videoPercent:L,duration:T,currentTime:O}=(0,Si.u)({direction:h,progressRef:a,circleRef:l,videoId:e.vid,barRef:d,initialPercent:0,draggingStateCb:c,draggingPercentCb:y,progressReportCallback:k}),D=(0,r.useCallback)((()=>{(0,Oi.X)(`${null==f?void 0:f.uid}`)}),[null==f?void 0:f.uid]),B=(0,r.useCallback)((()=>{(0,Oi.W)(`${null==f?void 0:f.uid}`)||D(),p||m(!0)}),[null==f?void 0:f.uid,D,p]),E=(0,r.useCallback)(((e,t)=>o=>{if(9===o.keyCode)return;o.preventDefault(),o.stopPropagation();const i=lt.cb/(e||100);38===o.keyCode||39===o.keyCode?S(i,!0,t):40===o.keyCode||37===o.keyCode?S(-1*i,!0,t):36===o.keyCode?S(-1,!1,t):35===o.keyCode&&S(1,!1,t)}),[S]);if(0===O||!(null===(o=null==C?void 0:C.current)||void 0===o?void 0:o.currentCanPlay)&&j&&I)return null;const R="ltr"===h?{left:`calc(${100*L}%)`}:{right:`calc(${100*L}%)`};return(0,n.jsx)(Ti.c,{visible:!p,text:"webapp_seekbar_tooltip",onShow:D,children:(0,n.jsxs)(Di.ht,{isNarrow:b,show:u,extraBottomSpace:w,onMouseDown:v.dG,onClick:B,useFullWideInNarrow:x,isDisplayForAnyWidth:!0,children:[(0,n.jsxs)(Di.gt,{ref:i,children:[(0,n.jsx)(Di.AK,{ref:a,onClick:P,onMouseDown:M,tabIndex:0,role:"slider","aria-label":"progress bar","aria-valuenow":L,"aria-valuetext":(0,Li.Az)(O),onKeyDown:E(T,L)}),(0,n.jsx)(Di.n9,{ref:l,style:R,onMouseDown:M}),(0,n.jsx)(Di.Vi,{ref:d,style:{transform:`scaleX(${L}) translateY(-50%)`},onClick:P,onMouseDown:M})]}),(0,n.jsx)(Di.l5,{children:"ltr"===h?`${(0,Li.Az)(O)}/${(0,Li.Az)(T)}`:`${(0,Li.Az)(T)}/${(0,Li.Az)(O)}`})]})})}));var Ri=o(48578);const Vi=(0,P.default)("div",{target:"e1exqkaz0"})({width:"28px",height:"96px",margin:"8px 6px",display:"block",position:"relative",background:"rgba(255, 255, 255, 0.12)",borderRadius:"32px"},(({theme:e})=>(0,S.oO)({theme:e,isUiOptimise:!0})),"label:DivVolumeControlContainer;"),Ai=(0,P.default)("div",{target:"e1exqkaz1"})((({theme:{colors:e}})=>({width:"4px",height:"80px",backgroundColor:e.ConstTextInverse5,position:"absolute",left:"12px",top:"8px",bottom:"8px",cursor:"pointer"})),"label:DivVolumeControlProgress;"),Fi=(0,P.default)("div",{target:"e1exqkaz2"})((({theme:{colors:e}})=>({width:"4px",height:"80px",backgroundColor:e.ConstTextInverse,position:"absolute",left:"12px",bottom:"8px",cursor:"pointer",transform:"scaleY(0)",transformOrigin:"bottom"})),"label:DivVolumeControlBar;"),zi=(0,P.default)("div",{target:"e1exqkaz3"})({width:"16px",height:"16px",backgroundColor:"#ffffff",borderRadius:"16px",position:"absolute",left:"6px",bottom:"0",cursor:"pointer",zIndex:1},"label:DivVolumeControlCircle;"),Ni=(0,r.memo)((0,r.forwardRef)((function({teaParams:e,setVolumeDragging:t},o){const i=(0,r.useRef)(null),a=(0,r.useRef)(null),l=(0,r.useRef)(null),s=(0,r.useRef)(!0),{mute:d,volume:u,setVolume:c}=(0,b.rq)(),p=(0,r.useCallback)(((t,o)=>{Ri.p.handleSwitchSound(Object.assign(Object.assign({},e),{playMode:2,volume_from:t,volume_to:o})),Ri.p.handleVolumeChange({volume_to:u,click_mute:!0})}),[u,e]),m=(0,r.useRef)(d);(0,r.useEffect)((()=>{m.current=d}),[d]);const{percent:h,bindDrag:g,seek:f,seekByDelta:x,update:_}=(0,Si.M)({direction:"vertical",progressRef:i,circleRef:a,barRef:l,initialPercent:u,draggingStateCb:t,progressReportCallback:p}),y=(0,Y._g)((e=>{s.current?s.current=!1:c(e,m.current)}),[c],160);(0,r.useEffect)((()=>y(h)),[h]),(0,r.useEffect)((()=>{d||u!==lt.Lj||_(lt.Lj)}),[d,u,_]);const C=d?0:h,k=0===C?8:72*C;return(0,r.useImperativeHandle)(o,(()=>({seekByDelta:x}))),(0,n.jsxs)(Vi,{onClick:v.dG,children:[(0,n.jsx)(Ai,{ref:i,onClick:f,onMouseDown:g}),(0,n.jsx)(zi,{ref:a,style:{transform:`translateY(-${k}px)`},onMouseDown:g}),(0,n.jsx)(Fi,{ref:l,style:{transform:`scaleY(${C})`},onClick:f,onMouseDown:g})]})})));var Gi=o(82904),Ui=o(32545);const qi=(0,P.default)("div",{target:"e12q9uh50"})((({theme:{colors:e}})=>({flex:"1 0 600px",maxWidth:"100%",background:e.ConstBGInverse,position:"relative",overflow:"hidden",padding:"0 80px"})),"label:DivMiniPlayerPlaceHolder;"),Wi=(0,P.default)("div",{target:"e12q9uh51"})({position:"absolute",left:0,top:0,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignContent:"center",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(18, 18, 18, 1)",borderRadius:"8px",overflow:"hidden"},"label:DivMiniPlayerCoverContainer;"),Hi=(0,P.default)("div",{target:"e12q9uh52"})({position:"absolute",display:"flex",flexDirection:"column",alignContent:"center",justifyContent:"center",alignItems:"center"},"label:DivReturnContentContainer;"),$i=(0,P.default)(Gi.A,{target:"e12q9uh53"})({width:"56px",height:"56px",marginBottom:"24px",color:"rgba(255, 255, 255, .9)",zIndex:1},"label:IconPIPReturn;"),Ki=(0,P.default)("p",{target:"e12q9uh54"})((({theme:e})=>[(0,S.zy)({theme:e}),(0,S.mp)({direction:e.direction,end:"16px"}),{fontSize:"24px",fontWeight:"500",lineHeight:"21.55px",color:"rgba(255, 255, 255, .9)",marginBottom:"24px",zIndex:1}]),"label:PReturnText;"),Yi=(0,P.default)(wo.I0,{target:"e12q9uh55"})((({theme:e})=>[(0,S.mp)({direction:e.direction}),{fontSize:"16px",fontWeight:"500",lineHeight:"20.8px",padding:"13.5px 24px",minWidth:"56px",zIndex:1,height:"48px",borderRadius:"8px"}]),"label:ButtonReturn;"),Xi=(0,P.default)(Ui.x,{target:"e12q9uh56"})({position:"absolute",filter:"blur(5px)",opacity:"0.3"},"label:StyledVideoBlurBackground;"),Ji=(0,r.memo)((function(e){var t;const o=(0,He.Dy)(),{playMode:i,item:a}=e,{originCover:l=""}=null!==(t=null==a?void 0:a.video)&&void 0!==t?t:{},s=(0,r.useMemo)((()=>({cover:l,quality:"720"})),[l]),d=(0,h.s)(),u=(0,r.useCallback)((e=>{(0,v.Gu)(e),o.closeMiniPlayer({playMode:i,enter_method:"click_button"})}),[o,i]);return(0,n.jsx)(qi,{children:(0,n.jsxs)(Wi,{children:[(0,n.jsx)(Xi,{video:s,objectFit:"contain"}),(0,n.jsxs)(Hi,{children:[(0,n.jsx)($i,{}),(0,n.jsx)(Ki,{children:d("pcWeb_floatingPlayer_on")}),(0,n.jsx)(Yi,{label:d("pcWeb_miniPlayer_turnOff_cta"),variant:"const",onClick:u,size:"medium"})]})]})})}));var Qi=o(77170),Zi=o(38771),en=o(8641),tn=o(43097),on=o(68783),nn=o(90341),rn=o(68141),an=o(93608),ln=o(87864),sn=o(70461),dn=o(46994),un=o(80074),cn=o(75431);const pn=(0,P.default)("div",{target:"eegjxd40"})((({theme:{colors:e}})=>({flex:"1 0 600px",maxWidth:"100%",background:e.ConstBGInverse,position:"relative",overflow:"hidden",padding:"0 80px"})),"label:DivEndCardContainer;"),mn=(0,P.default)("div",{target:"eegjxd41"})({position:"absolute",left:0,top:0,width:"100%",height:"100%",display:"flex",flexDirection:"column",alignContent:"center",justifyContent:"center",alignItems:"center",backgroundColor:"rgba(18, 18, 18, 1)",borderRadius:"8px",overflow:"hidden"},"label:DivEndCardInnerContainer;"),hn=(0,P.default)("div",{target:"eegjxd42"})((({responsiveUi:e=!1,isAuthorMask:t=!1})=>[{position:"absolute",width:"100%",height:e||t?"100%":"80%",minHeight:"600px",left:0,top:0,borderRadius:"4px",display:"flex",justifyContent:"center",flexDirection:"column",zIndex:"initial",alignItems:e?"center":"unset","&.mask-exit":{opacity:1},"&.mask-exit-active":{opacity:0,transition:"opacity 233ms cubic-bezier(0.25, 0, 0.25, 1)"}}]),"label:DivVideoCountdown;"),vn=(0,P.default)("div",{target:"eegjxd43"})((({index:e})=>({cursor:"pointer",margin:"0 auto",animation:`0.3s cubic-bezier(0.25, 0, 0.25, 1) ${.066*e}s backwards show-card`,"@keyframes show-card":{"0%":{transform:"scale(0.8)",opacity:"0"},"100%":{transform:"scale(1)",opacity:"1"}}})),"label:DivItemContainer;"),gn=(0,P.default)("div",{target:"eegjxd44"})({width:"100%",position:"relative",borderRadius:"8px",marginBottom:"8px",overflow:"hidden",boxSizing:"border-box"},"label:DivCoverContainer;"),fn=(0,P.default)("img",{target:"eegjxd45"})((({theme:{colors:e}})=>({width:"100%",height:"100%",objectFit:"cover",background:e.BGPlaceholderDefault})),"label:ImgCover;"),bn=(0,P.default)("div",{target:"eegjxd46"})({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},"label:DivPlayIcon;"),xn=(0,P.default)("div",{target:"eegjxd47"})((({theme:e})=>(0,S.zy)({theme:e,fontWeight:"semiBold",color:"ConstTextInverse"})),(0,S.m4)(2),{position:"absolute",left:"8px",bottom:"40px",wordBreak:"break-word",fontSize:"16px",lineHeight:"24px"},"label:DivTitle;"),_n=(0,P.default)("div",{target:"eegjxd48"})({position:"absolute",height:"90px",left:"0",bottom:"0",width:"100%",background:"linear-gradient(180deg, rgba(22, 24, 35, 0.0001) 2.92%, rgba(22, 24, 35, 0.5) 98.99%)"},"label:DivMask;"),yn=(0,P.default)("div",{target:"eegjxd49"})((({theme:e})=>({position:"absolute",height:"40px",left:0,right:0,bottom:0,background:"linear-gradient(180deg, rgba(22, 24, 35, 0.0001) 2.92%, rgba(22, 24, 35, 0.3) 98.99%)",color:e.colors.ConstTextInverse,fontSize:"16px",fontWeight:"500",lineHeight:"17px",padding:"12px 8px 8px 8px",display:"flex",alignItems:"center"})),"label:DivPlayCount;"),Cn=(0,P.default)(un.A,{target:"eegjxd410"})((({theme:e})=>[(0,S.mp)({direction:e.direction,marginEnd:"4px"})]),"label:StyledHeart;"),kn=(0,P.default)("div",{target:"eegjxd411"})({display:"flex",alignItems:"start",justifyContent:"center",flexWrap:"wrap",minHeight:"347px",overflow:"hidden"},"label:DivRecommendCountListContainer;"),wn=((0,cn.i7)({"0%":{strokeDasharray:"283",strokeDashoffset:"0"},"100%":{strokeDasharray:"283",strokeDashoffset:"283"}}),(0,P.default)("div",{target:"eegjxd414"})({color:"#FFF",marginBottom:"32px",fontSize:"20px",fontWeight:700},"label:DivVideoCountdownTitle;")),jn=(0,P.default)("div",{target:"eegjxd415"})({display:"flex",padding:"12.5px 46.5px",marginTop:"24px",justifyContent:"center",alignItems:"center",flexShrink:0,borderRadius:" 32px",background:"rgba(255, 255, 255, 0.20)",color:" #FFF",fontSize:"15px",fontWeight:"500",cursor:"pointer"},"label:DivVideoPlayNowBtn;"),In=P.default.div` position: absolute; display: flex; justify-content: center; align-items: center; width: 90px; height: 90px; font-size: 24px; font-weight: bold; color: #ffffff; z-index: 100; cursor: pointer; `,Mn=P.default.svg` position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); circle { fill: none; stroke-linecap: round; stroke-width: 4; } .circle-background { stroke: #ffffff; opacity: 0; } .circle-progress { stroke: #ffffff; stroke-dasharray: ${()=>2*Math.PI*48}; stroke-dashoffset: ${e=>2*(1.125-e.timeRemaining/e.duration)*Math.PI*48}; transition: stroke-dashoffset 1s linear; } `,Pn={id:"X_Mark_Smallcross-679e3513",use:"X_Mark_Smallcross-679e3513-usage",viewBox:"0 0 48 48",content:''};function Sn(e){const t=(0,r.useContext)(de.X);return(0,r.useLayoutEffect)((()=>(t.add(Pn),()=>{t.remove("X_Mark_Smallcross-679e3513")})),[]),(0,n.jsx)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor"},e,{children:(0,n.jsx)("use",{xlinkHref:"#X_Mark_Smallcross-679e3513"},void 0)}),void 0)}const Ln=(0,r.memo)((({onFinish:e,onTimeUpdate:t,itemInfo:o,onCountClick:i,duration:a})=>{const[l,s]=(0,r.useState)(a),[d,u]=(0,r.useState)(!1),[c,p]=(0,r.useState)(!1),m=(0,r.useRef)(null),h=(0,ln.TU)();return(0,r.useEffect)((()=>{let o=null;return!d&&h&&(o=setInterval((()=>{const i=l-1e3;i<=0?(clearInterval(o),e(),null==t||t(0),s(0)):(null==t||t(i),s(i))}),1e3)),()=>{o&&clearInterval(o)}}),[d,e,t,o,l,h]),(0,r.useEffect)((()=>{!h&&l<=3e3&&p(!0),h&&c&&(s(a),p(!1))}),[h,l,a,c]),(0,Uo.B)({element:m,threshold:[0],intersectionHandler:()=>{u(!1)},outerSectionHandler:()=>{!d&&l<=3e3?(s(8e3),u(!1)):u(!0)}}),(0,n.jsxs)(In,{ref:m,duration:a,timeRemaining:l,onClick:i,children:[(0,n.jsxs)(Mn,{duration:a,timeRemaining:l,children:[(0,n.jsx)("circle",{className:"circle-background",cx:"45",cy:"45",r:"43"}),(0,n.jsx)("circle",{className:"circle-progress",cx:"45",cy:"45",r:"43"})]}),(0,n.jsx)(Sn,{width:48,height:48,fill:"#fff"})]})}));var Tn;!function(e){e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Big=2]="Big"}(Tn||(Tn={}));const On={0:{iconSize:48,cardWidth:224,cardHeight:299},1:{iconSize:48,cardWidth:260,cardHeight:347},2:{iconSize:48,cardWidth:336,cardHeight:447}},Dn=(0,r.memo)((e=>{const{item:t,size:o,index:i=0}=e,{video:{cover:a,zoomCover:l},desc:s}=t,{diggCount:d}=(0,Qi.D)(t),u=On[o],c=u.cardWidth,p=u.cardHeight,[m,h]=(0,r.useState)({width:c,animation:""});(0,r.useEffect)((()=>{h((e=>Object.assign(Object.assign({},e),{animation:`0.3s cubic-bezier(0.25, 0, 0.25, 1) ${.066*i}s backwards show-card`}))),window.setTimeout((()=>{h((e=>Object.assign(Object.assign({},e),{animation:"none"})))}),300+66*i+1)}),[t.id,i]);const v=(0,r.useRef)(null);return(0,n.jsx)(vn,{index:i,style:m,onClick:e.onClick,ref:v,children:(0,n.jsxs)(gn,{style:{height:p},isSmallCard:0===o,children:[(0,n.jsx)(fn,{src:(null==l?void 0:l[480])||a}),(0,n.jsx)(bn,{}),(0,n.jsx)(_n,{}),0!==o&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(xn,{children:s}),(0,n.jsxs)(yn,{children:[(0,n.jsx)(Cn,{width:16,height:16,fill:"#fff"}),(0,g.D1)(d)]})]})]})})})),Bn=(0,r.memo)((e=>{var t;const{itemList:o,isFullScreen:i,onVideoCardClick:a}=e,l=(0,r.useCallback)((e=>()=>{a(e)}),[]);return(0,n.jsx)(kn,{isFullScreen:i,isResponsiveUi:!0,children:null===(t=[o[0]])||void 0===t?void 0:t.map(((e,t)=>(0,n.jsx)(Dn,{index:t,onClick:l(e.id),item:e,size:2},t)))})})),En=(0,r.memo)((({showRelated:e,onCloseRelatedMask:t,onCountClick:o,item:i})=>{const{isFYP:a}=(0,Ue.FT)(),{responsiveUi:l}=(0,Ue.yl)(),[s,d]=(0,r.useState)(8e3),c=(0,u.useHistory)(),p=null==i?void 0:i.author,m=null==i?void 0:i.id,v=(0,r.useCallback)((()=>{if(a)return t(),void c.push("/foryou");t()}),[c,a,t]),g=(0,r.useCallback)((e=>{d(e)}),[]),f=(0,r.useCallback)((()=>{(0,ln.Eo)(),o(),p&&m&&dn.a.handleCountdownExit({author_id:p,group_id:m})}),[o,p,m]),b=(0,r.useCallback)((()=>{v(),p&&m&&dn.a.handlePlayNowClick({author_id:p,group_id:m})}),[v,p,m]);(0,r.useEffect)((()=>{p&&m&&e&&dn.a.handleCountdownStart({author_id:p,group_id:m})}),[p,m,e]);const x=(0,h.s)();return i?(0,n.jsx)(sn.A,{in:e,unmountOnExit:!0,timeout:223,classNames:"mask",children:(0,n.jsxs)(hn,{responsiveUi:l,children:[(0,n.jsx)(wn,{children:x("Web_exploreFYFRedirect_opening",{},"Opening For You feed in...%s").replace("%s",String(s/1e3))}),(0,n.jsx)(Ln,{duration:8e3,itemInfo:i,onFinish:b,onTimeUpdate:g,onCountClick:f}),(0,n.jsx)(Bn,{isFullScreen:!1,onVideoCardClick:v,itemList:[i]}),(0,n.jsx)(jn,{onClick:b,children:x("Web_exploreFYFRedirect_goToFYF",{},"Go to For You feed now")})]})}):null}));var Rn=o(47449),Vn=o(6752);const An=(0,r.memo)((({item:e})=>{const{disableEndCard:t}=(0,Rn.$c)(),o=(0,Vn.g1)(),i=(0,r.useCallback)((()=>{t(),(null==e?void 0:e.id)&&o(e.id)}),[t,e.id,o]);return(0,n.jsx)(pn,{children:(0,n.jsx)(mn,{children:(0,n.jsx)(En,{showRelated:!0,onCloseRelatedMask:i,onCountClick:t,item:e})})})}));var Fn=o(23237);const zn=(0,r.memo)((function({itemListKey:e,currentIndex:t,needUrlDelegate:o=!0,onCloseBrowserMode:i,onNextVideo:a,onPrevVideo:l,teaParams:u,onJumpSamePage:x,isUiOptimise:y,zIndex:C=3e3,openFocusLock:k=!0,disableUpdate:w=!1,adjacentVideoIds:j=[]}){var I,M,P,S,L,T,O;const{currentId:D="",prefetchId1:B="",prefetchId2:E="",listLength:R=0}=(0,g.L$)((0,f.Og)({currentIndex:t})),V=(0,g.L$)((0,K.P)(St.k,{selector:e=>e[D],dependencies:[D]})),{video:A,id:F,itemMute:z=!1,warnInfo:N,scheduleTime:G,subVideoMeta:U,ad_info:q,desc:W,video:{duration:H}={},logId:$}=(0,g.L$)(V),{diggCount:X,collectCount:J,playCount:Q,commentCount:Z,shareCount:ee,isReposted:te}=(0,Qi.D)(V),{playAddr:oe="",width:ie=1,height:ne=1,duration:re,bitrateInfo:ae,bitrate:le,volumeInfo:se,originCover:de,VQScore:ue=0}=(0,g.L$)(A),ce=null!==(I=null==V?void 0:V.id)&&void 0!==I?I:"",pe=(0,kt.yS)(null==V?void 0:V.author),me=null!==(M=null==V?void 0:V.downloadSetting)&&void 0!==M?M:0,he=null!==(P=null==V?void 0:V.authorPrivate)&&void 0!==P&&P,ve=`xgwrapper-2-${F}`,ge=t["user","language","abTestVersion"]),[]))&&void 0!==S?S:{},{isPlayerErrorOrUnsupported:_e}=(0,st.w)(),{enabledClosedCaption:ye,isEntranceInMoreMenu:Ce}=(0,Ge.vN)(),{isUseNativePlayer:Tt}=(0,Ue.Sc)(),{withNewStyle:Ot}=(0,tt.hA)(),{enableMiniPlayer:Dt}=(0,Bi.D)(),{hasAutoScrollButton:Bt}=(0,Ue.iz)(),{useAutoScrollModelResult:Et}=(0,Ue.Hh)(),{isInExperiment:Rt,isBrowserMode:Vt}=(0,Ue.NV)(),{hasNonPersonalizedMenu:At}=(0,Ue.cE)(),zt=(0,Ue.Kj)(),Nt=(0,Ue.eu)(),Gt="v1"!==(null!==(L=(0,d.qt)(xe,"creator_center_reverse"))&&void 0!==L?L:"v2")?`/tiktokstudio/analytics/${F}?from=invideo_button`:`/analytics/video/posted/${F}?lang=${be}`,{withBlurBG:Ut,withNoBG:qt,withLinearGradientBG:Wt}=(0,Ue.KS)(),{defaultAuto:Ht}=(0,Ue.lZ)(),$t=(0,c.w)(St.k),Kt=(0,f.Dk)(),Yt=(0,Zi.hy)(),Xt=(0,qe.FV)(),[{photoSensitiveVideosSetting:Jt,hideMaskTempVideoId:Qt},Zt]=(0,c.S)(wt.w),[eo,{openContextMenu:to}]=(0,en.xx)((e=>e.contextMenuOpen),Ne.bN),[oo,io]=(0,We.BI)((e=>e.isCreatorBrowserMode)),{showToast:no,dismissToast:ro}=(0,Fn.n)("top"),ao=(0,nn.eu)(),lo=(0,nn.J3)(),{actualResolution:so}=(0,tn.qW)(),uo=(0,rt.nr)(),co=(0,tn.VL)(),{isDocumentPipSupporting:po,isMiniPlayerShowing:mo}=(0,He.mE)(),{showModal:ho,hideModal:vo}=(0,_.g9)(),go=(0,ke.Nj)(Se.A),fo=(0,$e.Q4)(V),xo=(0,K.P)(it.hf,{selector:e=>e.blockedVideos||[],dependencies:[]}),_o=(0,K.P)(nt.y7,{selector:e=>e.blockedVideos||[],dependencies:[]}),yo=(0,K.P)(nt.y7,{selector:e=>e.showing||!1,dependencies:[]}),Co=(0,h.s)(),{subtitleList:ko,curSubtitle:wo,handleSubtitleCallback:jo}=(0,Ge.ck)(V,"browser_mode"),{mute:Io,setMute:Mo}=(0,b.ah)({playMode:2,itemMute:z}),{isMacElectronApp:Po,isElectronApp:So}=(0,_t.B)(),Lo=(0,Lt.uR)(),To=(0,f.DX)(e),{seekingTips:Oo}=(0,Ct.r)(),{handleLightenVideoControls:Do}=(0,dt.XY)(),{handleResolutionReady:Bo}=(0,Ke.mc)(V),{showVideoMask:Eo,maskType:Ro,videoMaskTitle:Vo,videoMaskDesc:Ao,icon:Fo,videoMaskFirstButtonText:zo,videoMaskSecondButtonText:No}=(0,jt.d)({playMode:2,item:null!=V?V:{},isLogin:Boolean(fe)}),{playbackRate:Go}=(0,dt.C7)({isActive:!0,group_id:F,author_id:null!==(T=null==V?void 0:V.authorId)&&void 0!==T?T:"",playModeForTea:"browser_mode"}),{showAnalyticsButton:Uo}=(0,f.WQ)(V),[qo,Wo]=(0,r.useState)(!1),[Ho,$o]=(0,r.useState)(!0),Ko=(0,r.useRef)(!1),Yo=(0,r.useRef)(null),Xo=(0,r.useRef)(!1),Jo=(0,r.useRef)(null),Qo=(0,r.useRef)(!1),Zo=(0,r.useRef)(null),ei=(0,r.useRef)(),ti=(0,r.useRef)(-1),oi=(0,r.useRef)(rn.zC),ii=(0,r.useRef)(null),ni=(0,r.useRef)(!1),ri=(0,r.useRef)(-1),ai=(0,r.useRef)(void 0),li=(0,r.useRef)(-1),si=(0,r.useRef)(0),di=(0,r.useRef)(!1),ui=(0,r.useRef)(null),ci=(0,r.useRef)(0),pi=(0,r.useRef)(-1),mi=(0,r.useRef)((new Date).getTime()),hi=(0,r.useRef)(""),vi=(0,r.useRef)([]),[gi,fi]=(0,r.useState)(!0),[bi,xi]=(0,r.useState)(!1),[_i,yi]=(0,r.useState)(!1),[Ii,Mi]=(0,r.useState)(!1),[Si,Li]=(0,r.useState)(0),[Ti,Oi]=(0,r.useState)(!1),Ri=(0,g.L$)((0,bo.k)(j[0])),Vi=(0,g.L$)((0,bo.k)(j[1])),Ai=e=>{var t;if(!e)return{};const o=(0,on.Jl)(e);return{contentType:o?"live":"video",itemId:o?"":e.id,roomId:o?null===(t=e.liveRoomInfo)||void 0===t?void 0:t.roomID:""}},Fi=!!q,zi=(0,Le.n5)({ad_info:q,play_mode:"browser_mode"}),Gi=Fi&&!!(null==q?void 0:q.web_url)&&-1!==(null==q?void 0:q.animation_type),Ui=null==q?void 0:q.vast,qi=(0,at.M2)(D,t),Wi=(0,at.A5)(D),Hi=!oo&&"foryou"===e,$i=!(!q||!Ui),Ki=(0,r.useMemo)((()=>{const t=["foryou","following"];return zt&&t.push("explore"),t.includes(e)}),[e]),Yi=`/promote/web/delivery?item_id=${F}&enter_from=video`,Xi=!!V.HasPromoteEntry,sn=Eo&&Qt!==ce,dn=(0,$e.mx)(V),un=(0,$e.MA)(V),cn=!dn&&!fo,pn=(0,r.useMemo)((()=>({vqscore:ue?Number(ue):0})),[ue]),mn=Uo&&!G,hn=ye&&!Ce&&!Fi&&!G&&!dn&&!fo,vn=po&&Dt&&!Fi&&!dn&&!fo,gn=z||Io?Ie.A:Me.A,fn=(0,r.useMemo)((()=>!(k&&!Lo&&!yo&&To)),[To,k,Lo,yo]),bn=(0,r.useMemo)((()=>{const{video:{bitrate:e=-1,encodedType:o="",format:i="",videoQuality:n="",encodeUserTag:r="",codecType:a="",definition:l=""}={},authorId:s="",id:d="",scheduleTime:c,adLabelVersion:p,poi:m,subVideoMeta:h,logId:v,isAd:g}=null!=V?V:{},f=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u),zi),{author_id:s,group_id:d,is_scheduled:Boolean(c),bitrate:Number(e),encodedType:o,format:i,videoQuality:n,encodeUserTag:r,codecType:a,definition:l,isPaidPartnership:2===p,poi_id:null==m?void 0:m.id,is_sub_only_video:h?1:0,isReposted:te,log_id:v,isAd:g}),oo&&{enter_method:"creator_tab"}),u&&void 0!==u.index_from_just_watched&&{is_just_watched:u.index_from_just_watched===t}),u&&void 0!==u.index_from_just_watched&&{index_from_just_watched:u.index_from_just_watched-t});return Yo.current=f,f}),[V,u]),xn=(0,r.useMemo)((()=>{var e;return Object.assign(Object.assign(Object.assign(Object.assign({},u),un),zi),{poi_id:null===(e=null==V?void 0:V.poi)||void 0===e?void 0:e.id,is_sub_only_video:(null==V?void 0:V.subVideoMeta)?1:0})}),[u,V,un]),_n=(0,r.useMemo)((()=>({cover:de,quality:"720"})),[de]),yn=(ie/ne||1)>=1,Cn=Boolean(null==N?void 0:N[0])||Boolean(G),kn=dn?"photo":"video",wn=(0,r.useMemo)((()=>({videoCover:_n,desc:V.desc})),[_n,V]),jn=(0,r.useMemo)((()=>({params:bn})),[bn]),{showEndCard:In,handleVideoEndShowEndCard:Mn}=(0,ln.V7)({currentIndex:t,itemListKey:e,nextItem:Vi}),Pn=(0,r.useCallback)((e=>{var t,o,i,n;9!==e.keyCode&&(e.preventDefault(),e.stopPropagation(),13===e.keyCode||32===e.keyCode?Mo(!Io):38===e.keyCode||39===e.keyCode?null===(t=Zo.current)||void 0===t||t.seekByDelta(lt.QI,!1):40===e.keyCode||37===e.keyCode?null===(o=Zo.current)||void 0===o||o.seekByDelta(-1*lt.QI,!1):36===e.keyCode?null===(i=Zo.current)||void 0===i||i.seekByDelta(1,!1):35===e.keyCode&&(null===(n=Zo.current)||void 0===n||n.seekByDelta(-1,!1)))}),[Io,Mo]),Sn=(0,r.useCallback)(((e="click",t)=>{$t.postLikeVideo(Object.assign({id:ce,enter_method:e,media_type:t},u))}),[$t,ce,u]),Ln=(0,ut.G)({actionWhenUserLoggedIn:Sn,modalConfig:{query:{enter_method:"click_like",group_id:ce}},reportClickEvent:()=>{Te.O.handleGeneralClick("like",{group_id:ce,play_mode:"browser_mode"})}}),Tn=(0,r.useCallback)((()=>{yi(!0)}),[]),On=(0,r.useCallback)((()=>{yi(!1)}),[]),Dn=(0,r.useCallback)((()=>{xi(!0)}),[]),Bn=(0,r.useCallback)((()=>{xi(!1)}),[]),En=(0,r.useCallback)(((e,t="click")=>{e.preventDefault(),e.stopPropagation(),Mo(!Io,t,un)}),[Io,un,Mo]),{handleLinkClick:Rn,handleClose:Vn,handleCloseCreatorMode:zn,handleNext:Nn,handlePrev:Gn,videoPlayerRef:Un,multimediaDesktopBizPlayerRef:qn,usePlaybackRefactor:Wn,togglePlay:Hn,noEditingContent:$n,showLeaveModal:Kn,handleConfirmLeave:Yn,handleCancelLeave:Xn,handleClickCreatorVid:Jn}=(0,f.JE)({onCloseBrowserMode:i,onNextVideo:a,onPrevVideo:l,pause:qo,shouldPause:sn,setPause:e=>{Wo(e),Ko.current=e},embedVisibleRef:Xo,group_id:ce,handleLikeClick:Ln,author_id:null==V?void 0:V.authorId,itemListKey:e,onJumpSamePage:x,isPhotoMode:dn,photoVideoRef:ii,photoTeaParams:un,setIsShowPhoto:e=>{$o(e)},itemMute:z}),Qn=(0,r.useCallback)((()=>{Wo(!0),Ko.current=!0}),[]),Zn=(0,r.useCallback)((e=>{var t,o,i,n;Wn?null===(o=null===(t=qn.current)||void 0===t?void 0:t.seek)||void 0===o||o.call(t,e):null===(n=null===(i=Un.current)||void 0===i?void 0:i.seek)||void 0===n||n.call(i,e)}),[Un,qn,Wn]),er=(0,r.useCallback)((()=>{ni.current=!0,setTimeout((()=>{ni.current=!1}),500)}),[]),tr=(0,r.useCallback)((()=>{ni.current&&(Hn("click_pause"),ni.current=!1)}),[Hn]),or=(0,ut.G)({actionWhenUserLoggedIn:(0,r.useCallback)((e=>{if(!ni.current)return;const{clientX:t,clientY:o}=e;new ct.m(t,o).emit(),$t.postLikeVideo(Object.assign(Object.assign({id:ce,forceLike:!0},u),{enter_method:"double_tap"})),ni.current=!1}),[ce,$t,u]),modalConfig:{query:{enter_method:"click_like",group_id:ce}},reportClickEvent:()=>{Te.O.handleGeneralClick("like",{group_id:ce,play_mode:"browser_mode"})}}),ir=(0,Ze.R)((()=>({onClick:tr,onDoubleClick:or})),[or,tr]),nr=(0,Pt.v)({item:V,onShow:v.Gu,useAd:Fi,play_mode:"browser_mode"}),rr=(0,r.useCallback)((e=>{Xo.current=e}),[]),ar=(0,f.FQ)({handleNext:Nn,handlePrev:Gn,hasNext:ge,currentIndex:t,itemListKey:e,isUiOptimise:y}),lr=(0,r.useCallback)(((e,t)=>{var o,i,n,r;Oe.$.handleSeekBarClick(Object.assign({fromPercent:e,toPercent:t,video_length:Wn?null!==(i=null===(o=qn.current)||void 0===o?void 0:o.duration)&&void 0!==i?i:0:null!==(r=null===(n=Un.current)||void 0===n?void 0:n.duration)&&void 0!==r?r:0,is_pause:Ko.current,play_mode:"browser_mode"},Yo.current))}),[Un,qn,Wn]),sr=(0,r.useCallback)((e=>{var t,o,i,n,r,a,l,s,d,u,c,p,m,h,v,g,f,b;const x=Wn?null===(t=qn.current)||void 0===t?void 0:t.duration:null===(o=Un.current)||void 0===o?void 0:o.duration;Yt.setVideoInfo({itemId:ce,videoPercent:e,currentTime:Wn?null!==(n=null===(i=qn.current)||void 0===i?void 0:i.currentTime)&&void 0!==n?n:0:null!==(a=null===(r=Un.current)||void 0===r?void 0:r.currentTime)&&void 0!==a?a:0,duration:x});const _=ei.current;if(_){const t=ti.current;t<0&&e>=0?(null===(s=null===(l=oi.current)||void 0===l?void 0:l.sendImpressionEvent)||void 0===s||s.call(l,_),null===(u=null===(d=oi.current)||void 0===d?void 0:d.sendVideoEvent)||void 0===u||u.call(d,_,"start",{duration:x,mediaPlayerVolume:null==_?void 0:_.volume})):t<.25&&e>=.25?null===(p=null===(c=oi.current)||void 0===c?void 0:c.sendVideoEvent)||void 0===p||p.call(c,_,"firstQuartile"):t<.5&&e>=.5?null===(h=null===(m=oi.current)||void 0===m?void 0:m.sendVideoEvent)||void 0===h||h.call(m,_,"midpoint"):t<.75&&e>=.75?null===(g=null===(v=oi.current)||void 0===v?void 0:v.sendVideoEvent)||void 0===g||g.call(v,_,"thirdQuartile"):t<1&&e>=1&&(null===(b=null===(f=oi.current)||void 0===f?void 0:f.sendVideoEvent)||void 0===b||b.call(f,_,"complete"))}ti.current=Number.isNaN(e)?-1:e}),[ce,Yt,Un,qn,Wn,ei]),dr=(0,r.useCallback)((()=>{var e;if($i&&(ei.current=null===(e=null===document||void 0===document?void 0:document.getElementById(ve))||void 0===e?void 0:e.querySelector("video"),ei.current)){const e=new rn.yy(Ui),t=ei.current;e.getVASTInfo().then((e=>{var o,i;null===(i=null===(o=oi.current)||void 0===o?void 0:o.createAdContext)||void 0===i||i.call(o,{adElement:t,adVerifications:e.adVerifications,enableContentUrl:e.enableContentUrl,itemIds:j})})).catch((e=>console.log(e)))}}),[ei,$i,ve,j]),ur=(0,r.useCallback)((()=>{var e,t;const o=ei.current;o&&(null===(t=null===(e=oi.current)||void 0===e?void 0:e.sendLoadEvent)||void 0===t||t.call(e,o))}),[ei,oi]),cr=(0,r.useCallback)((()=>{clearTimeout(li.current),si.current=0}),[]),pr=(0,r.useCallback)((e=>{Vn(e),cr()}),[Vn,cr]),mr=(0,r.useCallback)((e=>{var t;zn(e),cr(),De.G.handleExitCreatorPage({group_id:ce,author_id:null!==(t=null==pe?void 0:pe.id)&&void 0!==t?t:""}),Wo(!1)}),[zn,cr,null==pe?void 0:pe.id,ce,Wo]),hr=(0,r.useCallback)((e=>{if((0,v.Gu)(e),"general_sensitive"===Ro){if(di.current)return;ge?Nn(e):R>1?Gn(e):Vn(e),Be._.handleMaskLayerClickSkip({scenario:"general",group_id:ce}),ze.F.open({content:Co("photosensitive_skepped_toast"),duration:3,widthType:"half"}),di.current=!0}else Zt.setSkipPhotoSensitive({skip:!1,hasLogin:Boolean(fe)}),cr(),Be._.handleMaskLayerClickWatch({scenario:"photosensitive",group_id:ce})}),[Ro,ge,R,Co,Nn,Gn,Vn,Zt,cr,ce,fe]),vr=(0,r.useCallback)((e=>{if((0,v.Gu)(e),"general_sensitive"===Ro)Zt.setHideMaskTempVideoId(ce),cr(),Be._.handleMaskLayerClickWatch({scenario:"general",group_id:ce});else{if(di.current)return;ge?Nn(e):1===R?(null==fe?void 0:fe.uid)===(null==V?void 0:V.authorId)&&Vn(e):Gn(e),Zt.setSkipPhotoSensitive({skip:!0,hasLogin:Boolean(fe)}),Be._.handleMaskLayerClickSkip({scenario:"photosensitive",group_id:ce}),ze.F.open({content:Co("photosensitive_skepped_toast"),duration:3,widthType:"half"}),di.current=!0}}),[Ro,Zt,ce,cr,ge,Co,Nn,R,null==V?void 0:V.authorId,Vn,Gn,fe]),gr=(0,Y._g)((e=>{if(hi.current===D)return;e.stopPropagation(),pi.current&&clearTimeout(pi.current),pi.current=window.setTimeout((()=>{ci.current=0}),100);const t=(new Date).getTime(),o=e.wheelDelta||-e.deltaY||-e.detail,i=Math.max(-1,Math.min(1,o)),n=t-mi.current;ci.current=ci.current+1,mi.current=t,n>100&&1===ci.current&&(i<0?Nn(e,"scroll"):Gn(e,"scroll"),hi.current=D)}),[D,Nn,Gn],20),fr=(0,r.useCallback)((()=>{var e;Rt&&Xt.maybeTurnOnSharePulsing({videoId:ce,authorId:null!==(e=V.authorId)&&void 0!==e?e:""}),ao&&$n?Nn():Mn()}),[ao,Nn,$n,Xt,Rt,ce,V.authorId]),br=(0,r.useCallback)((e=>{13!==e.keyCode&&32!==e.keyCode||nr(e)}),[]),xr=(0,r.useCallback)((()=>{go.handleClickShare({author_id:null==pe?void 0:pe.id,group_id:F,enter_method:"click_context_menu",media_type:kn,is_sub_only_video:U?1:0}),Oi(!0)}),[null==pe?void 0:pe.id,F,kn,go,U]),_r=(0,ut.G)({actionWhenUserLoggedIn:xr,modalConfig:{query:{enter_method:"click_share"}},reportClickEvent:()=>{Te.O.handleGeneralClick("share_video",{group_id:F,play_mode:"browser_mode"})}}),yr=(0,r.useCallback)((()=>{Oi(!1)}),[Oi]),Cr=(0,r.useCallback)((e=>{var t,o;if(e.preventDefault(),Fi)return ze.F.destroy(),void ze.F.open({content:Co("ad_not_support"),duration:3});const i=["link"];dn?i.push("photo"):(i.push("details"),he||0!==me||U||z||fo||i.push("download"),!document.pictureInPictureEnabled||Dt&&po||i.push("pip")),At&&Ki&&i.push("manage-feed"),fe&&!(null==fe?void 0:fe.hasIMPermission)||i.push("share"),Ee.Z.handleContextMenu({media_type:kn}),to({location:{x:e.clientX,y:e.clientY},videoInfo:{downloadAddr:null!==(t=V.video.downloadAddr)&&void 0!==t?t:"",videoId:ce,author:null!==(o=null==pe?void 0:pe.uniqueId)&&void 0!==o?o:"",videoElement:e.target,videoShareHandler:_r,videoDetailsRedirectHandler:()=>io.setShowingBrowserMode(!1),mediaType:kn},menuOptions:i})}),[pe,ce,V,Fi,fo,dn,At,Ki]),kr=(0,r.useCallback)((e=>{var t;Qo.current||9!==e.keyCode||(null===(t=Jo.current)||void 0===t||t.setAttribute("tabindex","-1"),Qo.current=!0)}),[]),wr=(0,r.useCallback)((e=>{if(!eo){if(fo){const e=no(Co("web_player_TTshopVid_toast"),{durationMs:1e4});return void vi.current.push(e)}ir(e)}}),[eo,fo,ir]),jr=(0,r.useCallback)((e=>{var t,o;Wn?null===(t=qn.current)||void 0===t||t.changeResolution(e):null===(o=Un.current)||void 0===o||o.changeResolution(e),Ht?uo.setDefaultResolution(e.resolution):uo.setDefaultResolutionAndUpdateLocalStorage(e.resolution),co.setVideoActualResolution(e.resolution),Re.Y.resolutionChange({play_mode:"browser_mode",group_id:ce,author_id:null==V?void 0:V.authorId},so,e.resolution)}),[Un,qn,Wn]),Ir=(0,r.useCallback)((()=>{var e;fn||null===(e=document.querySelector(`#${To}-${t}`))||void 0===e||e.focus()}),[t,To,fn]),Mr=(0,r.useCallback)((()=>Ve.d.handleClickAnalyticsVideoCover(ce)),[ce]),Pr=(0,r.useCallback)((()=>{an.f.sendEvent("Promote_entrance_click",{enter_from:"video"})}),[]),Sr=(0,r.useCallback)((()=>{Wo(!0),Ko.current=!0}),[]),Lr=(0,r.useCallback)((e=>{var t;$t.postDislikeVideo({id:ce,author_id:null!==(t=null==V?void 0:V.authorId)&&void 0!==t?t:"",play_mode:"browser_mode"}),io.updateDeleteVideo(ce),Wo(!1),(0,v.Gu)(e)}),[ce,null==V?void 0:V.authorId,$t,io,Wo]),Tr=(0,ut.G)({actionWhenUserLoggedIn:Lr,modalConfig:{query:{enter_method:"click_dislike",redirect_url:"https://www.tiktok.com",group_id:V.id}},reportClickEvent:()=>{Te.O.handleGeneralClick("dislike",{group_id:ce,play_mode:"browser_mode"})}}),Or=(0,r.useCallback)((()=>{ze.F.open({content:Co("Sorry, something went wrong, please try again later"),duration:3}),i()}),[]),Dr=(0,r.useCallback)((()=>{var e,t;Wo(!1),Ko.current=!1,(null==ei?void 0:ei.current)&&(null===(t=null===(e=oi.current)||void 0===e?void 0:e.sendVideoEvent)||void 0===t||t.call(e,ei.current,"resume"))}),[Wo,ei,oi]),Br=(0,r.useCallback)((()=>{var e,t;(null==ei?void 0:ei.current)&&(null===(t=null===(e=oi.current)||void 0===e?void 0:e.sendVideoEvent)||void 0===t||t.call(e,ei.current,"pause"))}),[ei,oi]),Er=(0,r.useCallback)((e=>{var t,o;const i=ei.current;null===(o=null===(t=oi.current)||void 0===t?void 0:t.sendVideoEvent)||void 0===o||o.call(t,i,"volumeChange",{mediaPlayerVolume:e})}),[oi]),Rr=(0,r.useCallback)((()=>{var e;const t=ei.current;t&&(null===(e=oi.current)||void 0===e||e.sendVideoEvent(t,"skipped"),setTimeout((()=>{var e,t;null===(t=null===(e=oi.current)||void 0===e?void 0:e.adSessionFinished)||void 0===t||t.call(e,ei.current)}),3e3))}),[ei,oi]),Vr=(0,r.useCallback)((()=>{var e,t;const o=ei.current;o&&(null===(t=null===(e=oi.current)||void 0===e?void 0:e.sendVideoEvent)||void 0===t||t.call(e,o,"adUserInteraction"))}),[ei,oi]),{active:Ar,handleDismissPanel:Fr,handleMouseMouseEnter:zr,handleMouseLeave:Nr}=(0,dt.rY)();return(0,r.useEffect)((()=>{var o;if(Fi&&"foryou"===e){const e=Ai(V),t=Ai(Ri),i=Ai(Vi);Ae.pg.handleShow(Object.assign(Object.assign({},zi),{ad_extra_data:Object.assign(Object.assign({},zi.ad_extra_data),{item_id:D,author_id:null!==(o=V.authorId)&&void 0!==o?o:"",start_pos:Wi,ad_gap:qi,content_type:e.contentType,room_id:e.roomId,before_content_type:t.contentType,before_item_id:t.itemId,before_room_id:t.roomId,after_content_type:i.contentType,after_item_id:i.itemId,after_room_id:i.roomId})}))}if(D&&"foryou"===e){const e=(0,ki.bE)(Kt,t);Fe.j.handleVideoContentShow({item_id:D,group_id:A.id,play_mode:"browser_mode",is_ad:Fi,duration:H,like_cnt:X.toString(),collect_cnt:J.toString(),play_cnt:Q.toString(),comment_cnt:Z.toString(),share_cnt:ee.toString(),request_id:$||"",order:t,following_items:JSON.stringify(Array.isArray(e)?e:[])})}}),[D,V,Ri,Vi,t]),(0,f.dD)({author:pe,item:V,currentIndex:t,itemListKey:e,needUrlDelegate:o,onCloseBrowserMode:i,disableUpdate:w}),(0,f.Oz)({showLeaveModal:Kn,group_id:ce}),(0,b.Ux)(2),(0,r.useEffect)((()=>{Bt||lo.setAutoScroll(!1)}),[Bt,Et]),(0,r.useEffect)((()=>(ho(!0),()=>{vo()})),[vo,ho]),(0,r.useEffect)((()=>{var e,t,o,i,n,r,a,l,s,d;V&&(xo.includes(V.id)||_o.includes(V.id))&&(dn?(null===(o=null===(t=null===(e=ii.current)||void 0===e?void 0:e.audio)||void 0===t?void 0:t.pause)||void 0===o||o.call(t),null===(r=null===(n=null===(i=ii.current)||void 0===i?void 0:i.swiper)||void 0===n?void 0:n.pause)||void 0===r||r.call(n,"other"),Wo(!qo)):Wn?null===(l=null===(a=qn.current)||void 0===a?void 0:a.pause)||void 0===l||l.call(a):null===(d=null===(s=Un.current)||void 0===s?void 0:s.pause)||void 0===d||d.call(s))}),[xo,_o,dn,V,qo,Un,qn,Wn]),(0,r.useEffect)((()=>{var e,t;(null==V?void 0:V.video)&&!(null==V?void 0:V.isContentClassified)||(i({fromPopState:w,playProgress:Wn?null===(e=qn.current)||void 0===e?void 0:e.currentTime:null===(t=Un.current)||void 0===t?void 0:t.currentTime}),(null==V?void 0:V.isContentClassified)&&(ze.F.destroy(),ze.F.open({content:Co("cc_webapp_age_video_details_body"),duration:3,widthType:"half"})))}),[V,i,Un,w,Co,qn,Wn]),(0,r.useEffect)((()=>{var e,o,i,n,r,a,l,s;sn||(Wn?null===(o=null===(e=qn.current)||void 0===e?void 0:e.play)||void 0===o||o.call(e):null===(n=null===(i=Un.current)||void 0===i?void 0:i.play)||void 0===n||n.call(i),cr()),t!==ri.current&&(-1!==ri.current&&(Zt.setHideMaskTempVideoId(""),gi&&fi(!1),di.current=!1),cr(),void 0===Jt&&"photo_sensitive"===ai.current&&Zt.setSkipPhotoSensitive({skip:!1,hasLogin:Boolean(fe)}),Eo?("photo_sensitive_denied"===Ro?Be._.handleShowPhotosensitiveRemoved({group_id:ce}):Be._.handleShowMaskLayer({scenario:"general_sensitive"===Ro?"general":"photosensitive",group_id:ce}),li.current=window.setInterval((()=>{var e,t,o,i,n,r;si.current++>100&&cr(),!Wn&&(null===(e=Un.current)||void 0===e?void 0:e.currentCanPlay)&&(null===(o=(t=Un.current).pause)||void 0===o||o.call(t),cr()),Wn&&(null===(i=qn.current)||void 0===i?void 0:i.currentCanPlay)&&(null===(r=(n=qn.current).pause)||void 0===r||r.call(n),cr())}),50)):Wn?null===(a=null===(r=qn.current)||void 0===r?void 0:r.play)||void 0===a||a.call(r):null===(s=null===(l=Un.current)||void 0===l?void 0:l.play)||void 0===s||s.call(l),ri.current=t,ai.current=Ro)}),[Eo,sn,Un,qn,Wn,t,Ro,Zt,Jt,cr,gi,Qt,ce,lo,fe]),(0,r.useEffect)((()=>{Li(Si+1)}),[F]),(0,r.useEffect)((()=>{Xi&&an.f.sendEvent("Promote_entrance_show",{enter_from:"video"})}),[Xi]),(0,r.useEffect)((()=>{Do()}),[]),(0,r.useEffect)((()=>{if(fo){$o(!1);const e=no(Co("web_player_TTshopVid_toast"),{durationMs:1e4});vi.current.push(e)}return()=>{vi.current.forEach((e=>{ro(e)}))}}),[fo,F]),(null==V?void 0:V.video)?(0,n.jsx)(p.Ay,{disabled:fn||Lo,onDeactivation:Ir,children:(0,n.jsx)(pt.t,{isMobile:!1,onCatchError:Or,componentName:"browser-mode",children:(0,n.jsxs)(ji._P,{tabIndex:0,ref:Jo,onKeyDown:kr,role:"dialog","aria-modal":!0,style:{zIndex:C},children:[In&&(0,n.jsx)(An,{item:Vi}),mo&&(0,n.jsx)(Ji,{playMode:2,item:V}),_e&&(0,n.jsxs)(mt.I,{playMode:2,item:V,children:[ar,(0,n.jsx)(ji.Mu,{onClick:pr,onMouseDown:v.dG,isUiOptimise:y,needOffset:Po,role:"button","aria-label":Co("Close"),children:(0,n.jsx)(m.A,{width:18,height:18,fill:"#fff"})})]}),!mo&&!_e&&!In&&(0,n.jsxs)(ji.Ii,{isUiOptimise:y,withLinearGradientBG:Wt,onWheel:gr,ref:ui,onClick:wr,onMouseDown:er,onMouseMove:Do,children:[Ot&&(0,n.jsxs)(ji.sh,{useNarrowSearchBar:oo,children:[(0,n.jsx)(ji.TP,{useNarrowSearchBar:oo}),(0,n.jsx)(ot.v,{onBrowserModeClose:Vn,isBrowserMode:!0})]}),!qt&&(0,n.jsx)(ji.cR,{video:_n,withBlurBG:Ut,withLinearGradientBG:Wt}),(0,n.jsxs)(ji.iH,{isUiOptimise:y,onContextMenu:Cr,children:[cn?(0,n.jsxs)(n.Fragment,{children:[Wn?(0,n.jsx)(Ye.o,{ref:qn,id:F,url:oe,horizontal:yn,mode:2,index:t,muted:Boolean(z),duration:re,bitrateInfo:ae,bitrate:Number(le),onVideoError:Qn,onTimeUpdate:sr,onVideoEnded:fr,e2eTag:"browse-video",playbackRate:Go,posterConfig:wn,teaConfig:jn,videoQualityConfig:pn,subtitleList:ko,curSubtitle:wo,onSubtitleCallback:jo,onResolutionReady:Bo},F):(0,n.jsx)(Mt.K,{videoCover:_n,horizontal:yn,mode:2,ref:Un,desc:V.desc,id:F,playUrl:oe,index:t,itemMute:Boolean(z),duration:re,bitrateInfo:ae,bitrate:Number(le),teaParams:bn,onVideoError:Qn,onTimeUpdate:sr,onVideoEnded:fr,onVideoPlay:Dr,onLoadStart:dr,onLoadedData:ur,onVideoPause:Br,onVolumeChange:Er,onVideoUnmount:Rr,onUserHandlePlayVideo:Vr,onUserHandlePauseVideo:Vr,e2eTag:"browse-video",volumeInfo:se,playbackRate:Go,itemListKey:e,adInfo:q,subtitleList:ko,curSubtitle:wo,onSubtitleCallback:jo,onResolutionReady:Bo},F),!Fi&&(0,n.jsx)(Ei,{seek:Zn,videoRef:Wn?qn:Un,vid:F,progressReportCallback:lr,extraBottomSpace:Cn,isXgPlayer:!Tt,isBrowserMode:!0,playbackRate:Go}),Oo]}):Ho&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ht.Y,{ref:ii,playMode:2,item:V,teaParams:bn,index:t,onTimeUpdate:sr,onFinish:Nn}),(0,n.jsx)(wi._,{photoVideoRef:ii,item:V})]}),(0,n.jsx)(Di.Zx,{onMouseDown:v.dG,widerBottom:Cn,children:(0,n.jsx)(ji.II,{children:(0,n.jsx)(vt.S,{playMode:2,item:V})})}),(0,n.jsx)(Di.p5,{onMouseDown:v.dG}),xo.includes(V.id||"")||_o.includes(V.id||"")?(0,n.jsx)(gt.X,{item:V,zIndex:1,styleContainer:ji.O8,styleMaskTitle:ji.CY,styleMaskDetail:ji.$2,onClickShowVideo:Sr}):null,sn&&(0,n.jsx)(It.u,{playMode:2,icon:Fo,title:Vo,desc:Ao,firstButtonText:zo,secondButtonText:No,onClickFirstButton:hr,onClickSecondButton:vr})]}),(qo||fo)&&(0,n.jsx)(ji.rh,{width:70,height:70,fill:"#fff"}),Fi&&Gi&&(0,n.jsx)(Pi,{adInfo:q,author:pe,desc:W}),!oo&&(0,n.jsx)(ji.Mu,{onClick:pr,onMouseDown:v.dG,isUiOptimise:y,needOffset:Po,role:"button","aria-label":Co("Close"),children:(0,n.jsx)(m.A,{width:18,height:18,fill:"#fff"})}),oo&&(0,n.jsx)(ji.Jr,{onClick:mr,onMouseDown:v.dG,needOffset:Po,role:"button","aria-label":Co("Close"),children:(0,n.jsxs)(ji.F3,{children:[(0,n.jsx)(m.A,{width:18,height:18,fill:"#fff"}),(0,n.jsx)(ji.QN,{children:Co("pc_web_browser_creatorVid_exit")})]})}),hn&&(0,n.jsx)(ji.Rq,{onMouseDown:v.dG,widerBottom:Cn,showMiniPlayer:vn,children:(0,n.jsx)(Xe.k,{playMode:"browser_mode",useLargeToggle:!0,item:V})}),vn&&(0,n.jsx)(ji.xS,{onMouseDown:v.dG,widerBottom:Cn,children:(0,n.jsx)(Je.W,{videoId:F,itemListKey:oo?"creator_tab":e,useLargeToggle:!0,playMode:2,playModeForTea:"browser_mode",index:t,prevPlayerRef:Wn?qn:Un})}),(0,n.jsxs)(ji.oK,{widerBottom:Cn,onMouseEnter:Dn,onMouseLeave:Bn,onMouseDown:v.dG,children:[!z&&(bi||Ii||_i)?(0,n.jsx)(Ni,{teaParams:un,setVolumeDragging:Mi,ref:Zo}):null,(0,n.jsx)(ji.kn,{onClick:En,onKeyDown:Pn,onFocus:Tn,onBlur:On,widerBottom:Cn,isUiOptimise:y,tabIndex:0,role:"button","aria-label":Co("pc_web_volume_btn"),children:(0,n.jsx)(gn,{width:40,height:40,fill:"none"})})]}),ar,Hi||Nt?(0,n.jsxs)(ji.es,{tabIndex:0,onMouseEnter:zr,onMouseLeave:Nr,onClick:v.dG,children:[(0,n.jsx)(we.A,{width:24,height:24}),(0,n.jsx)(ft._,{itemId:ce,authorId:null!==(O=null==V?void 0:V.authorId)&&void 0!==O?O:"",active:Ar,isBrowserMode:!0,playModeForTea:"browser_mode",showNotInterested:Hi,onDismissPanel:Fr,onClickReport:nr,onClickNotInterested:Hi?Tr:void 0,onSelectResolution:jr})]}):(0,n.jsxs)(ji.lG,{onClick:nr,isUiOptimise:y,role:"button","aria-label":Co("pc_web_report_btn"),tabIndex:0,onKeyDown:br,id:"browser-mode-report-btn",children:[(0,n.jsx)(ji.fJ,{width:16,height:15}),Co("Report")]}),(0,n.jsxs)(ji.RK,{children:[mn&&(0,n.jsxs)(ji.jc,{href:Gt,target:So?"_blank":"_self",onClick:Mr,children:[(0,n.jsx)(Pe.A,{width:20,height:20,fill:"#fff",style:{marginInlineEnd:"6px"}}),Co("view_analytics")]}),Xi&&(0,n.jsxs)(ji.jc,{href:Yi,target:So?"_blank":"_self",onClick:Pr,children:[(0,n.jsx)(je.A,{width:20,height:20,fill:"#fff",style:{marginInlineEnd:"6px"}}),Co("Promote_web_entrance_video")]})]}),(null==N?void 0:N[0])&&(0,n.jsx)(ji.zm,{children:(0,n.jsx)(bt.Q,{info:N[0]})}),Boolean(G)&&(0,n.jsx)(ji.zm,{children:(0,n.jsx)(xt.Z,{isTextAlignStart:!0,scheduledTime:Number(G),height:56,fontSize:14,iconSize:18.33,iconMargin:4.83})}),Vt&&(0,n.jsx)(ji.cA,{widerBottom:Cn,children:(0,n.jsx)(Qe.w,{item:V,playMode:2})})]}),(0,n.jsx)(Ci,{item:V,onBrowserModeClose:Vn,prefetchId1:B,prefetchId2:E,teaParams:xn,onLinkClick:Rn,onEmbedVisibleChange:rr,videoReportParams:bn,onClose:Vn,itemListKey:e,handleClickCreatorVid:Jn,videoCount:Si}),(0,n.jsx)(Ft,{visible:Kn,needLeaveCheck:!$n,onConfirmLeave:Yn,onCancelLeave:Xn}),Ti&&(0,n.jsx)(yt.k,{visible:Ti,videoId:F,onClose:yr})]})})}):(0,et.d)(["item.video"])}));var Nn=o(45297),Gn=o(57381);var Un=o(35014),qn=o(65852),Wn=o(16085),Hn=o(92597),$n=o(36825),Kn=o(28369),Yn=o(66994),Xn=o(8877),Jn=o(22174),Qn=o(69794);const Zn=(0,o(81054).Ay)({resolved:{},chunkName:()=>"immersive-player",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!o.m[t]},importAsync:()=>Promise.all([o.e(4434),o.e(4730),o.e(5468),o.e(530)]).then(o.bind(o,67807)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return o(t)},resolve:()=>67807}),er=(e,t=!0,o=3e3)=>c=>{var p;const m=function(e,t=!0,o=3e3){return function(i){const c=l=>{var c,p;const{itemListKey:m,currentIndex:v,closeBrowserMode:g,isLiveBrowserShowing:f,isBrowserModeShowing:b,disableUpdate:x,showBrowserMode:_,teaParams:y,enterFrom:C}=(0,Ce.m)(),k=(0,We.YZ)(),w=(0,a.b1)(),j=(0,s.W)((()=>["abTestVersion"]),[]),I=null!==(c=(0,d.qt)(null==j?void 0:j.abTestVersion,"search_video"))&&void 0!==c?c:"v1",{user:M}=null!==(p=(0,s.W)((()=>["user"]),[]))&&void 0!==p?p:{},P=k.getAdjacentVideoInfo(),S=Boolean(M),L=("general_search"===C||"search_video"===C)&&!S,T=(0,r.useCallback)((({playProgress:e,fromPopState:o,shouldPause:i}={})=>{g({playProgress:e,shouldPause:i}),!o&&t&&window.history.back()}),[g]),O=(0,r.useCallback)((()=>{k.setClickSamePage()}),[k]);!function(e){const t=(0,r.useRef)(),o=(0,u.useHistory)();(0,r.useEffect)((()=>{var i,n;const r=null!==(n=null===(i=null==o?void 0:o.location)||void 0===i?void 0:i.pathname)&&void 0!==n?n:"";r&&t.current!==r&&(null==e||e(t.current),t.current=r)}),[o,e])}((()=>{b&&g(void 0)})),(0,r.useEffect)((()=>{k.setItemListKey(e)}),[k]),(0,r.useEffect)((()=>{(0,_e.uQ)(ye.Y.BrowseModeRerender)}));const D=(0,r.useMemo)((()=>({closeBrowserMode:g,showBrowserMode:_,isBrowserModeShowing:b,isLiveBrowserShowing:f})),[g,b,f,_]),B=(0,r.useCallback)((()=>{(0,_e.uQ)(ye.Y.PlayerChange),5!==v||!L||"v3"!==I&&"v4"!==I?k.handleNextVideo():w.openModal({isSignup:!1,query:{redirect_url:window.location.href,enter_method:"click_top_bar",enter_from:C,type:"loginsearchmore"}})}),[v,w,I,C,L,k]),E=(0,r.useCallback)((()=>{(0,_e.uQ)(ye.Y.PlayerChange),k.handlePrevVideo()}),[k]);return function(){const e=(0,h.s)(),[{statusCode:t,statusMessage:o,action:i,toastNotShown:n},a]=(0,Gn.W)((({statusCode:e,statusMessage:t,action:o,toastNotShown:i})=>({statusCode:e,statusMessage:t,action:o,toastNotShown:i})),Ne.bN);(0,r.useEffect)((()=>{if(!n)return;let r;switch(t){case 0:"delete"===i&&(r=e("deleted"));break;case 2752:r=o;break;case 2054:r=e("video_unavailable_deleted");break;default:r=e(Nn.z$)}ze.F.destroy(),ze.F.open({content:r,duration:3,widthType:"half"}),a.clearBrowserModeStatus()}),[e,n,t,o,i,a])}(),(0,n.jsxs)(Ce.g.Provider,{value:D,children:[(0,n.jsx)(i,Object.assign({},l)),f?(0,n.jsx)(xe,{itemListKey:m,currentIndex:v,zIndex:o,onCloseBrowserMode:T,onNextVideo:B,onPrevVideo:E}):b&&(0,n.jsx)(zn,{isUiOptimise:!0,disableUpdate:x,itemListKey:m,currentIndex:v,onNextVideo:B,onPrevVideo:E,needUrlDelegate:t,zIndex:o,onCloseBrowserMode:T,teaParams:y,onJumpSamePage:O,adjacentVideoIds:P})]})};return c.displayName=`WithBrowserMode(${(0,l.x)(i)})`,c}}(e,t,o)(c),v=(({itemListKey:e})=>t=>{var o;const n=o=>{const{isCommentsDefaultOpen:n}=(0,Kn.uA)(),[a,l]=(0,We.BI)((e=>e.showingBrowserMode),Ne.bN),[{isImmersivePlayerOpen:s},d]=(0,Wn.vZ)((e=>({isImmersivePlayerOpen:e.isOpen})),Ne.bN),{selectedTab:u}=(0,Xn.R0)((e=>({selectedTab:e.selectedTab})),Ne.bN),c=(0,$n.w)(e).list,{enterTimeRef:p,closeImmersivePlayer:m}=(0,Qn.Cd)(),h=(0,Un.J)(),{isUserPage:v}=(0,Yn.eK)(),g=(0,r.useMemo)((()=>"foryou"===e||"friends"===e||"following"===e),[]);(0,r.useEffect)((()=>{s!==a&&l.setShowingBrowserMode(s)}),[l,s,a]);const f=(0,r.useCallback)(((t,o,i,r)=>{const a={index:t,itemListSourceConfig:i?{mode:"id",source:"user-playlist",id:i}:{mode:"single",itemListKey:null!=o?o:v?u:e},isCommentsOpen:g||n,teaParams:r};return!!(0,Hn.D)(e)||(a.id=c[t]),a}),[d,n,g,v,u,c]),b=(0,r.useCallback)((({index:e=0,teaParams:t,reportTeaParams:o,itemListKey:i,itemListConfigId:n})=>{const r=f(e,i,n,t);d.openImmersivePlayer(r),p.current=Number(Date.now());const a=g?Jn.U.ClickComment:Jn.U.ClickPreviewCard,l=qn.L.getScreenRatio(),s=Object.assign(Object.assign(Object.assign({},null!=o?o:t),l),{enter_method:a,play_mode:"immersive_player"});an.f.sendEvent("enter_immersive_player",s),qn.L.handleEnterBrowserOpt(s)}),[f,p,d]),x=(0,r.useCallback)((()=>{m("close-browser-mode")}),[m]);return(0,i.FD)(Ce.g.Provider,{value:{showBrowserMode:({index:e,teaParams:t,reportTeaParams:o,itemListKey:i,id:n})=>{h()||b({index:e,teaParams:t,reportTeaParams:o,itemListKey:i,itemListConfigId:n})},closeBrowserMode:x,isBrowserModeShowing:s,isLiveBrowserShowing:s},children:[(0,i.Y)(t,Object.assign({},o)),(0,i.Y)(Zn,{})]})};return n.displayName=`WithImmersivePlayer(${null!==(o=t.displayName)&&void 0!==o?o:t.name})`,n})({itemListKey:e})(c),g=e=>{const{enableImmersivePlayer:t}=(0,Kn.uA)();return t?(0,i.Y)(v,Object.assign({},e)):(0,i.Y)(m,Object.assign({},e))};return g.displayName=`WithOverlayPlayer(${null!==(p=c.displayName)&&void 0!==p?p:c.name})`,g}},22174:(e,t,o)=>{var i;o.d(t,{U:()=>i}),function(e){e.ClickComment="click_comment",e.ClickPreviewCard="click_preview_card",e.ClickX="click_x",e.ClickBackground="click_background",e.Keyboard="keyboard",e.Navigate="navigate",e.Refresh="refresh"}(i||(i={}))},69794:(e,t,o)=>{o.d(t,{Cd:()=>u});var i=o(40099),n=o(16085),r=o(93608),a=o(65852),l=o(32125),s=o(36825);const d=i.createRef(),u=()=>{const{reportExitImmersivePlayer:e}=(()=>{const{teaParams:e}=(0,s.Z)((e=>({teaParams:e.teaParams})),l.bN);return{reportExitImmersivePlayer:(0,i.useCallback)((t=>{if(!t||!d.current)return;const o=Number(new Date),i=Object.assign(Object.assign(Object.assign(Object.assign({},a.L.getScreenRatio()),{duration:d.current?(o-d.current)/1e3:void 0}),e),{enter_method:t,play_mode:"immersive_player"});a.L.handleExitBrowser(i),r.f.sendEvent("exit_immersive_player",i),d.current=null}),[e])}})(),t=(0,n.kh)(),o=(0,i.useCallback)((o=>{e(o),t.closeImmersivePlayer()}),[t,e]);return{enterTimeRef:d,closeImmersivePlayer:o,reportExitImmersivePlayer:e}}},36825:(e,t,o)=>{o.d(t,{Z:()=>d,w:()=>s});var i=o(79983),n=o(46682),r=o(16085),a=o(92597),l=o(32125);const s=e=>{const[t]=(0,n.S)(i.O,{selector:t=>{var o;return null!==(o=t[null!=e?e:""])&&void 0!==o?o:{list:[]}},dependencies:[e]});return t},d=(...[e,t])=>{var o;const i=(0,r.Z9)(e,t),n=(0,r.Z9)((e=>e),l.bN),d=n.itemListSourceConfig,u=s("single"===(null==d?void 0:d.mode)?d.itemListKey:void 0);return"single"===(null==d?void 0:d.mode)?(0,a.D)(d.itemListKey)?i:e(Object.assign(Object.assign({},n),{itemList:null!==(o=u.list)&&void 0!==o?o:[]})):i}},62696:(e,t,o)=>{o.d(t,{V:()=>l});var i=o(40099),n=o(11072),r=o(92502),a=o(60484);const l=({item:e})=>{const{imagePost:t,id:o=""}=(0,a.L$)(e),l=(0,n.RA)(o),s=(0,n.sX)(o),d=(0,n.xr)(),{selectedTranslationLanguage:u,isReady:c}=(0,r.RD)((e=>({selectedTranslationLanguage:e.selectedTranslationLanguage,isReady:e.isReady})));return(0,i.useEffect)((()=>{s&&c&&d.getPhotoTitleTranslation({target_lang:u,item_id:o})}),[s,o,d,u,c]),s?l:null==t?void 0:t.title}},2191:(e,t,o)=>{o.d(t,{G:()=>v});var i=o(24643),n=o(40099),r=o(77976),a=o(91257),l=o(11072),s=o(25616),d=o(93341),u=o(15936),c=o(62186),p=o(26290);const m=(0,c.default)(p.F.P1,{target:"ea6l3fv0"})({cursor:"pointer",":hover":{textDecoration:"underline"}},"label:StyledDescriptionTranslationToggleText;"),h=(0,r.w)(m),v=(0,n.memo)((({itemId:e,authorId:t})=>{var o;const r=a.Jr[null!==(o=(0,d.RT)())&&void 0!==o?o:-1],c=(0,l.xr)(),p=(0,l.sX)(e),m=(0,s.s)(),v=(0,n.useMemo)((()=>({group_id:e,author_id:t,play_mode:r})),[e,t,r]),g=m(p?"Web_buildVideoTranslations_seeOriginal":"Web_buildVideoTranslations_seeTrans"),f=(0,n.useCallback)((t=>{t.stopPropagation(),t.preventDefault(),c.setShowTranslation(e,!p)}),[p,e,c]),b=(0,u.B)(f);return(0,i.jsx)(h,{color:"UIText3",weight:"medium",onClick:f,onKeyDown:b,etClick:{etName:p?"click_see_original":"click_see_translation",etParams:v},children:g})}))},68182:(e,t,o)=>{o.d(t,{A:()=>g});var i,n=o(24643),r=o(40099),a=o(62186),l=o(39522),s=o(72153);!function(e){e[e.OneColumn=0]="OneColumn",e[e.OneColumnDarkOnly=1]="OneColumnDarkOnly",e[e.OneColumnShare=2]="OneColumnShare",e[e.BrowserMode=3]="BrowserMode"}(i||(i={}));const d=(e,t)=>1===e?l.J:t;function u({styleType:e,shouldOptimizeCta:t,colors:o,disabled:i}){switch(e){case 0:case 1:case 2:return{flexDirection:"column"};case 3:return[{flexDirection:"row"},t&&[{borderRadius:"40px",padding:"8px 12px 8px 12px",height:"40px",backgroundColor:o.BGInput},!i&&{"&:hover":{backgroundColor:o.BGInput2},"&:active":{backgroundColor:"rgba(22, 24, 35, .14)"}}]];default:return null}}const c=(0,a.default)("button",{target:"e1hk3hf90"})((({styleType:e,shouldOptimizeCta:t,theme:{direction:o,colors:i}})=>[s.WA,{position:"relative",display:"flex",alignItems:"center",cursor:"pointer",":disabled":{cursor:"default",color:d(e,i).TextPrimary}},u({styleType:e,direction:o,shouldOptimizeCta:t,colors:d(e,i)})]),"label:ButtonActionItem;");function p({styleType:e,direction:t,shouldOptimizeCta:o}){switch(e){case 1:case 0:return[{marginTop:"8px",marginBottom:"6px"},(0,s.jJ)({max:768,style:{width:"32px",height:"32px",padding:"6px",svg:{width:"20px",height:"20px"}}})];case 2:return[{padding:"0",marginTop:"8px",marginBottom:"6px"}];case 3:return[!o&&{padding:"6px"},(0,s.mp)({direction:t,marginEnd:o?"8px":"6px"})];default:return null}}const m=(0,a.default)("span",{target:"e1hk3hf91"})((({shouldOptimizeCta:e,styleType:t,theme:{direction:o,colors:i}})=>[{display:"flex",justifyContent:"center",alignItems:"center",fontSize:"0px",borderRadius:"50%",transition:"all ease-in-out 200ms",cursor:"pointer"},(!e||3!==t)&&{width:3===t?"32px":"48px",height:3===t?"32px":"48px"},2===t||e&&3===t?null:{backgroundColor:d(t,i).BGInput,[`${c}:not(:disabled) &:hover`]:{backgroundColor:d(t,i).BGInput2},[`${c}:not(:disabled) &:active`]:{backgroundColor:"rgba(22, 24, 35, .14)"}},p({styleType:t,direction:o,shouldOptimizeCta:e})]),"label:SpanIconWrapper;"),h=(0,a.default)("strong",{target:"e1hk3hf92"})((({theme:e,styleType:t})=>[(0,s.zy)({theme:e,typography:"P4"}),{color:d(null!=t?t:0,e.colors).TextSecondary}]),{textAlign:"center"},"label:StrongText;");var v=o(88920);const g=(0,r.memo)((0,r.forwardRef)((function(e,t){const{text:o,Icon:i,styleType:a,disabled:l,children:s,e2eTag:d,style:u,ariaLabel:p,ariaPressed:g,ariaExpanded:f}=e,b=(0,r.useRef)(null),{shouldOptimizeCta:x}=(0,v.kb)(),_=(0,r.useCallback)((()=>{var e,t;return null===(t=Array.from(null===(e=b.current)||void 0===e?void 0:e.querySelectorAll("*")))||void 0===t?void 0:t.includes(document.activeElement)}),[]),y=(0,r.useCallback)((()=>{var e;null===(e=b.current)||void 0===e||e.focus()}),[]);return(0,r.useImperativeHandle)(t,(()=>({hasFocusForChildren:_,setFocus:y}))),(0,n.jsxs)(c,{styleType:a,type:"button",onClick:t=>{e.onClick&&(e.onClick(t),t.stopPropagation())},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onKeyDown:e.onKeyDown,onBlur:e.onBlur,disabled:l,"aria-label":p,"aria-pressed":g,"aria-expanded":f,ref:b,shouldOptimizeCta:x,children:[(0,n.jsx)(m,{style:null!=u?u:{},styleType:a,"data-e2e":`${d}-icon`,shouldOptimizeCta:x,children:i}),(0,n.jsx)(h,{"data-e2e":`${d}-count`,styleType:a,children:o}),s]})})))},7772:(e,t,o)=>{o.d(t,{k:()=>f});var i=o(24643),n=o(67518),r=o(95197),a=o(40099),l=o(30866),s=o(58305),d=o(25616),u=o(58542),c=o(66458),p=o(16085),m=o(77976),h=o(19442),v=o(32125);const g=(0,m.w)(l.X),f=(0,a.memo)((function(e){const{useLargeToggle:t=!1,tooltipOffset:o=-11,hideTooltip:l,iconSize:m,item:f,playMode:b}=e,{colors:x}=(0,n.u)(),_=(0,d.s)(),y=(0,c.K)(),C=(0,h.JD)((e=>e.showingBrowserMode),v.bN),k=(0,p.Z9)((e=>e.isOpen),v.bN),w=(0,a.useMemo)((()=>({background:t?x.ConstBGInverse3:x.ConstBGInverse1,paddingInlineStart:"12px",paddingInlineEnd:"12px",fontWeight:500,fontSize:"14px",lineHeight:"18px",display:l?"none":""})),[t,x.ConstBGInverse3,x.ConstBGInverse1,l]),j=(0,a.useMemo)((()=>({author_id:null==f?void 0:f.authorId,group_id:null==f?void 0:f.id,play_mode:b})),[f,b]),I=(0,a.useCallback)((()=>{y.setIsCaptionModalOn(!0)}),[y]);return(0,i.jsx)(r.m,{fullscreenAdjust:!0,overlay:_("claSeeTranslation_fyp_longPressPanel_captionsLabelV2"),overlayInnerStyle:w,arrow:!1,align:{offset:[0,o]},children:(0,i.jsx)(g,{onClick:I,onMouseDown:s.dG,useLargeToggle:t,etImpression:{etName:"show_captions_button",etParams:j,unobserveAfterIntersect:!0,skip:"one_column"===b&&(C||k)},etClick:{etName:"click_captions_button",etParams:j},children:(0,i.jsx)(u.qY7,{style:{fill:"rgba(255, 255, 255, 1)",width:null!=m?m:t?20:21,height:null!=m?m:t?20:21}})})})}))},83600:(e,t,o)=>{o.d(t,{S:()=>m});var i=o(24643),n=o(40099),r=o(30866),a=o(99282),l=o(66458),s=o(67416),d=o(92502),u=o(68783),c=o(58305),p=o(53438);const m=(0,n.memo)((function(e){var t;const{item:o}=e,{enabledClosedCaption:m}=(0,a.vN)(),h=(0,a.MQ)(),[{currentCaption:v},g]=(0,l.JE)(),f=(0,s.l)(null!==(t=null==o?void 0:o.id)&&void 0!==t?t:""),{selectedTranslationLanguage:b}=(0,d.RD)(),x=(0,p.mx)(o),_=!!(null==o?void 0:o.ad_info),y=(0,u.Jl)(o),C=(m||h)&&f&&v.length>0&&!x&&!_&&!y,k=(0,n.useCallback)((e=>{g.setIsCaptionModalOn(!0),g.setCaptionModalEnterMethod("click_subtitle"),(0,c.Gu)(e)}),[g]);return(0,n.useEffect)((()=>{g.setCurrentCaption("")}),[null==o?void 0:o.id,b]),C?(0,i.jsx)(r.Z,{onClick:k,children:v}):null}))},30866:(e,t,o)=>{o.d(t,{X:()=>a,Z:()=>r});var i=o(62186),n=o(72153);const r=(0,i.default)("div",{target:"e15oqmov0"})({color:"white",marginBottom:"4px",zIndex:1,background:"rgba(0, 0, 0, 0.3)",fontSize:"0.875rem",borderRadius:"4px",fontWeight:500,maxWidth:"min(350px, 100%)",lineHeight:"135%",cursor:"pointer",width:"max-content",padding:"4px 6px"},"label:DivVideoClosedCaption;"),a=(0,i.default)("div",{target:"e15oqmov1"})((({theme:{colors:e},useLargeToggle:t})=>({width:t?"40px":"24px",height:t?"40px":"24px",background:t?e.ConstBGInverse4:"transparent",borderRadius:t?"50%":"unset",":hover":{background:t?e.ConstBGInverse3:"transparent"},display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"})),(({theme:{direction:e}})=>(0,n.mp)({direction:e,end:"66px"})),"label:DivCloseCaptionButtonContainer;")},45958:(e,t,o)=>{o.d(t,{c:()=>l});var i=o(24643),n=o(40099),r=o(95197),a=o(25616);const l=e=>{const{visible:t=!1,duration:o=5e3,onHide:l,text:s,children:d,onShow:u,closeByActive:c}=e,p=(0,a.s)(),[m,h]=(0,n.useState)(!1);(0,n.useEffect)((()=>{h(t)}),[t]),(0,n.useEffect)((()=>{!m&&l&&l(),m&&(null==u||u(),setTimeout((()=>{h(!1)}),o))}),[l,m,o,u]);const v=(0,n.useCallback)((()=>{c&&h(!1)}),[c]),g=(0,n.useMemo)((()=>({padding:"12px"})),[]),f=(0,n.useMemo)((()=>({keepParent:!0})),[]);return(0,i.jsx)(r.m,{destroyTooltipOnHide:f,onClick:v,placement:"top",overlay:p(s),tooltipTheme:"blue",visible:m,overlayInnerStyle:g,children:d})}},28936:(e,t,o)=>{o.d(t,{w:()=>f});var i=o(24643),n=o(40099),r=o(10332),a=o(75431),l=o(62186);const s=(0,l.default)("div",{target:"e1bm8u860"})({display:"flex"},"label:DivRepostOuterContainer;"),d=(0,a.i7)({"0%":{opacity:"0"},"100%":{opacity:"1"}}),u=(0,l.default)("div",{target:"e1bm8u861"})((({clickable:e})=>[{flexShrink:"0",padding:"4px 7px",fontSize:"14px",borderRadius:"4px",color:"black",backgroundColor:"white !important",lineHeight:"130%",fontWeight:"500"},e?{cursor:"pointer",animation:`${d} 0.5s`}:{pointerEvents:"none"},{"*":{color:"black !important"}}]),"label:DivRepostContainer;"),c=(0,l.default)("div",{target:"e1bm8u862"})({display:"inline-block",lineHeight:"0",verticalAlign:"middle",marginRight:"4px"},"label:DivRepostIcon;"),p=(0,l.default)("div",{target:"e1bm8u863"})({display:"inline-block"},"label:DivRepostText;");var m=o(25616),h=o(5352),v=o(25941);const g=(0,n.memo)((({children:e,show:t,setShow:o})=>((0,n.useEffect)((()=>{const e=setTimeout((()=>{o(!1)}),3e3);return()=>clearTimeout(e)}),[o]),t?(0,i.jsx)(i.Fragment,{children:e}):null))),f=(0,n.memo)((({item:e,playMode:t,style:o,hideAfterRepost:a=!1})=>{const l=(0,m.s)(),{isSharedPulsing:d}=(0,v.p)(),{handleClickRepost:f,canRepost:b,isReposted:x}=(0,r.l)({itemId:e.id,playMode:t}),_=(0,n.useMemo)((()=>({isColor:!1,isStrong:!0,size:14,showTick:!1})),[]),y=(0,r.g)({itemId:e.id,iconConfig:_}),[C,k]=(0,n.useState)(!1);return b&&d?a&&x?null:(0,i.jsxs)(s,{style:o,children:[!x&&(0,i.jsxs)(u,{clickable:!0,onClick:e=>{f(e),k(!0)},children:[(0,i.jsxs)(c,{children:[" ",y," "]}),(0,i.jsxs)(p,{children:[" ",l("pcWeb_repost_btn")," "]})]}),x&&C&&(0,i.jsx)(g,{show:C,setShow:k,children:(0,i.jsx)(u,{clickable:!1,children:(0,i.jsx)(h.W,{item:e,onClick:()=>{}})})})]}):null}))},30018:(e,t,o)=>{o.d(t,{W:()=>n,X:()=>r});var i=o(10646);const n=e=>{var t;return-1!==(null!==(t=i.v7.getItem("has_use_seek_bar"))&&void 0!==t?t:[]).indexOf(e)},r=e=>{var t;const o=null!==(t=i.v7.getItem("has_use_seek_bar"))&&void 0!==t?t:[];-1===o.indexOf(e)&&o.push(e),i.v7.setItem("has_use_seek_bar",o)}},82668:(e,t,o)=>{o.d(t,{_:()=>v,Y:()=>h});var i=o(24643),n=o(65404),r=o(34393),a=o(67518),l=o(40099),s=o(58305),d=o(16680),u=o(80279);const c=(e,t)=>(e-t)*u.Hg+"px",p=({originIndex:e,startIndex:t,maxShowNum:o,num:i})=>0===e||e===i-1||e>t&&e{var m,h;const v=(null!==(h=null===(m=null==t?void 0:t.imagePost)||void 0===m?void 0:m.images)&&void 0!==h?h:[]).length,[g,f]=(0,l.useState)(0),{direction:b}=(0,a.u)(),x=(e=>{const[t,o]=(0,l.useState)(0);return(0,l.useEffect)((()=>{var t,i;null===(i=null===(t=e.current)||void 0===t?void 0:t.swiper)||void 0===i||i.onActiveIndexChange((e=>{o(e.realIndex)}))}),[e]),t})(e),{disabledLeft:_,disabledRight:y}=(0,l.useMemo)((()=>({disabledLeft:0===x,disabledRight:x===v-1})),[x,v]),{handleSwitchLeft:C,handleSwitchRight:k}=(({photoVideoRef:e,disabledLeft:t,disabledRight:o})=>{const i=(0,d.mZ)((e=>e.isOpen)),n=(0,l.useCallback)((o=>()=>{var i,n,r;t||null===(r=null===(n=null===(i=e.current)||void 0===i?void 0:i.swiper)||void 0===n?void 0:n.slidePrev)||void 0===r||r.call(n,"keyboard"===o?"keyboard":"manual_click")}),[t,e]),r=(0,l.useCallback)((t=>()=>{var i,n,r;o||null===(r=null===(n=null===(i=e.current)||void 0===i?void 0:i.swiper)||void 0===n?void 0:n.slideNext)||void 0===r||r.call(n,"keyboard"===t?"keyboard":"manual_click")}),[o,e]),a=(0,l.useMemo)((()=>{const e=new Map;return e.set(37,n("keyboard")),e.set(39,r("keyboard")),e}),[n,r]),s=(0,l.useCallback)((e=>{const t=Number(e.keyCode);27!==t&&["input","textarea"].includes(e.target.tagName.toLocaleLowerCase())||"true"===e.target.getAttribute("contenteditable")||i||(e.preventDefault(),!a.has(t))||a.get(t)()}),[i,a]);return(0,l.useEffect)((()=>(document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)})),[s]),{handleSwitchLeft:n,handleSwitchRight:r}})({photoVideoRef:e,disabledLeft:_,disabledRight:y});(0,l.useEffect)((()=>{v=o-1?f(x-o+(x===v-1?1:2)):x<=g&&0!==g&&f(x-(0===x?0:1)))}),[x,o,v,g]);const w=(0,l.useCallback)((()=>{if(v>=o){const e="ltr"===b?"left":"right";return(0,i.jsx)(u.DM,{children:(0,i.jsx)(u.Te,{dynamic:!0,num:o,children:Array.from({length:v}).map(((t,n)=>(0,i.jsx)(u.AS,{index:n,style:{[e]:c(n,g)},children:(0,i.jsx)(u.pv,{active:x===n,style:Object.assign({},p({originIndex:n,startIndex:g,maxShowNum:o,num:v}))})},n)))})})}return(0,i.jsx)(u.DM,{children:(0,i.jsx)(u.Te,{num:v,children:Array.from({length:v}).map(((e,t)=>(0,i.jsx)(u.AS,{index:t,children:(0,i.jsx)(u.pv,{active:x===t})},t)))})})}),[x,v,g,b,o]);return(0,i.jsxs)(u.NY,{onClick:s.Gu,children:[(0,i.jsx)(u.q5,{disabled:_,onClick:C("slide"),children:(0,i.jsx)(n.p,{size:20})}),w(),(0,i.jsx)(u.f4,{disabled:y,onClick:k("slide"),children:(0,i.jsx)(r.a,{size:20})})]})})),h=m,v=(0,l.memo)((e=>(0,i.jsx)(u.bI,{children:(0,i.jsx)(u.wB,{children:(0,i.jsx)(m,Object.assign({},e))})})))},80279:(e,t,o)=>{o.d(t,{AS:()=>v,DM:()=>s,Hg:()=>a,NY:()=>h,Te:()=>d,bI:()=>p,f4:()=>c,pv:()=>g,q5:()=>u,wB:()=>m});var i=o(62186),n=o(72153),r=o(17781);const a=12,l=({theme:{colors:e,direction:t},disabled:o=!1})=>Object.assign({display:"flex",justifyContent:"center",alignItems:"center",width:"36px",height:"36px",borderRadius:"100%",color:o?e.ConstTextInverse5:e.ConstTextInverse,cursor:"pointer",transform:`rotate(${"rtl"===t?"180deg":"0"})`},(0,r.I)()),s=(0,i.default)("div",{target:"exksjhw0"})({margin:"0 8px",padding:"12px 17px",borderRadius:"18px"},"label:DivPaginationWrapper;"),d=(0,i.default)("div",{target:"exksjhw1"})((({num:e})=>({position:"relative",display:"flex",overflow:"hidden",width:a*e+"px",height:`${a}px`})),"label:DivPaginationContainer;"),u=(0,i.default)("div",{target:"exksjhw2"})(l,"label:DivLeftArrow;"),c=(0,i.default)("div",{target:"exksjhw3"})(l,"label:DivRightArrow;"),p=(0,i.default)("div",{target:"exksjhw4"})((({theme:{colors:e}})=>({position:"absolute",bottom:0,width:"100%",height:"100%",cursor:"pointer",userSelect:"none","&:hover":{[s.toString()]:{backgroundColor:e.ConstBGInverse4},[u.toString()]:{backgroundColor:e.ConstBGInverse4},[c.toString()]:{backgroundColor:e.ConstBGInverse4}}})),"label:DivPhotoWrapper;"),m=(0,i.default)("div",{target:"exksjhw5"})({position:"absolute",left:0,right:0,bottom:0},"label:DivPhotoControlWrapper;"),h=(0,i.default)("div",{target:"exksjhw6"})({display:"flex",position:"absolute",bottom:"20px",left:"50%",transform:"translateX(-50%)",height:"36px"},"label:DivPhotoControl;"),v=(0,i.default)("div",{target:"exksjhw7"})((({theme:{direction:e},index:t})=>[{position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",width:`${a}px`,height:`${a}px`,transition:"all 200ms cubic-bezier(.65, 0, .35, 1)"},(0,n.mp)({direction:e,start:t*a})]),"label:DivDotWrapper;"),g=(0,i.default)("div",{target:"exksjhw8"})((({active:e})=>({width:"6px",height:"6px",margin:"3px",borderRadius:"100%",backgroundColor:e?"#fff":"rgba(255, 255, 255, .6)",transition:"all 200ms cubic-bezier(.65, 0, .35, 1)"})),"label:DivDot;")}}]);