"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7679],{31918:(e,t,n)=>{n.d(t,{g:()=>de});var o=n(24643),s=n(67518),a=n(40099),r=n(82535),l=n(8046),i=n(11983),u=n(25616),d=n(58305),c=n(60484),h=n(44920),p=n(47172);const g=e=>7===e||5===e;var m=n(72688),k=n(4712),f=n(34131),y=n(62186);const x=(0,y.default)("span",{target:"efbd9f0"})((({isAds:e})=>({fontWeight:400,"&:hover":e&&{textDecoration:"underline",cursor:"pointer"}})),"label:SpanText;");var C=n(25342),v=n(17566),b=n(99282),_=n(95868),j=n(11072),R=n(4474),I=n(97086),T=n(70539);function L({to:e,location:{search:t}={search:""}},n={}){var o;const s=null!==(o=(0,R.parse)(t).lang)&&void 0!==o?o:"",a=function(e){var t,n,o,s,a,r,l;let i=!1;if(!(0,I.fU)())return!1;try{const{seoAbtest:u,isSearchEngineBot:d,featureFlags:c}=(0,T.w)();if(!d)return!1;const h=null!==(n="string"==typeof e?null===(t=(0,R.parseUrl)(e))||void 0===t?void 0:t.url:null==e?void 0:e.pathname)&&void 0!==n?n:"",p=Boolean((null==c?void 0:c.music_canonical_url)&&(0,_.Iy)(h)),g=Boolean((null==c?void 0:c.user_canonical_url)&&(0,_.cj)(h)),m=Boolean((null==c?void 0:c.hashtag_canonical_url)&&(0,_.Ke)(h)),k=null==u?void 0:u.parameters,f=function(e){try{return new URL(e).pathname}catch(t){return e}}(null!==(o=null==u?void 0:u.canonical)&&void 0!==o?o:""),y=null!==(a=null===(s=null==k?void 0:k.kep_canonical_abtest)||void 0===s?void 0:s.vid)&&void 0!==a?a:"v0",x=null!==(l=null===(r=null==k?void 0:k.video_canonical_abtest)||void 0===r?void 0:r.vid)&&void 0!==l?l:"v0",C="v1"===y&&(0,_.pz)(f),v="v1"===x&&(0,_.Fj)(f);i=(p||g||m)&&!(v||C)}catch(e){console.error("Error: while geting Canonical Url Experiment get base bot/abtest result")}return i}(e);if("string"==typeof e){const{url:t,query:o}=(0,R.parseUrl)(e);return a?t:(0,R.stringifyUrl)({url:t,query:Object.assign({lang:s},o)},Object.assign({skipEmptyString:!0},n))}const{pathname:r="",search:l={},hash:i}=e,u=i?`#${i}`:"";return a?r:`${(0,R.stringifyUrl)({url:r,query:Object.assign({lang:s},l)},Object.assign({skipEmptyString:!0},n))}${u}`}const w={fontWeight:700},S={fontWeight:600},q={},N=(e,t,n={})=>(0,o.jsx)("span",{style:Object.assign({fontWeight:400},n),"data-e2e":"new-desc-span",children:e},e+t),O=e=>{var t,n;const{item:s,desc:a,textExtra:r,DuetComp:l,LinkComp:i,QuestionComp:u,shouldReport:d,reportParams:h,styleType:g,mode:m,useGetVideoPath:k,onSearchResultClick:f,onBrowserModeClose:y,onLinkClick:x}=e,{authorId:C,id:v}=(0,c.L$)(s),b=null!==(n=null!==(t=(0,j.ik)(v))&&void 0!==t?t:a)&&void 0!==n?n:"",R=(0,j.M)(v),I=(0,j.sX)(v),T=R&&I,O=(0,p.useLocation)(),P=k();if(!a)return null;let B=q;switch(g){case"kep":B=w;break;case"explore":B=S}if(!(null==r?void 0:r.length))return N(T?b:a,0,B);const D=[...r].sort(((e,t)=>e.start-t.start)).reduce(((t,n,s,r)=>{const{start:c,end:p,awemeId:k,userUniqueId:b,hashtagName:j,type:R,subType:I,userId:w,hashtagId:S,questionId:q="",questionContent:D=""}=n,E=0===s?0:r[s-1].end,F=c,W=a.substring(E,F);W&&!T&&t.push(N(W,t.length-1,B));const M=7===(A=I)||5===A;var A;const $=a.substring(c,p);if(0===R&&M){const e=L({to:{pathname:(0,_.WD)({questionId:q,questionContent:D})},location:O});t.push((0,o.jsx)(u,{href:e,text:null!=b?b:"",index:t.length-1,id:q,type:"question",target:"_self",authorId:C,groupId:v,shouldReport:d,reportParams:h,styleType:"question",inline:"compact"===m,onLinkClick:x,onSearchResultClick:f},$+s))}else if(0===R&&k){const n=L({to:{pathname:P({uniqueId:null!=b?b:"",videoId:k})},location:O});t.push((0,o.jsx)(l,{href:n,text:$,index:t.length-1,id:k,type:"video",target:"_self",authorId:C,groupId:v,shouldReport:d,reportParams:h,styleType:"duet",onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick},$+s))}else if(0===R&&w){const n=L({to:{pathname:(0,_.fJ)({uniqueId:null!=b?b:""})},location:O});t.push((0,o.jsx)(i,{href:n,text:$,index:t.length-1,id:w,type:"user",target:"_self",authorId:C,groupId:v,shouldReport:d,reportParams:h,styleType:g,ariaLabel:`Watch more videos from user ${$}`,onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick,onBrowserModeClose:e.onBrowserModeClose},$+s))}else if(1===R&&j){const e=L({to:{pathname:(0,_.AT)({tagName:j})},location:O});t.push((0,o.jsx)(i,{href:e,text:$,index:t.length-1,id:null!=S?S:"",type:"tag",target:"_self",authorId:C,groupId:v,shouldReport:d,reportParams:h,styleType:g,ariaLabel:`Watch more videos of the ${$} category`,onLinkClick:x,onSearchResultClick:f,onBrowserModeClose:y},$+s))}else T||t.push(N($,t.length-1,B));return s!==r.length-1||T||t.push(N(a.substring(p),t.length,B)),t}),[]);return T&&D.unshift(N(b,-1,B)),(0,o.jsx)(o.Fragment,{children:D})},P=(e,t,n={},s,a)=>{const r=!!s,l=null==s?void 0:s.web_url;return(0,o.jsx)(x,{style:n,isAds:r,onClick:l?()=>(0,k.Zy)({adInfo:s,refer:C.Hq.Title,tag:null!=a?a:C.xY.BrowserMode}):void 0,children:e},e+t)},B={fontWeight:700},D={fontWeight:600},E={},F=(0,a.memo)((e=>{const t=(0,b.MQ)(),{item:n,DuetComp:s,LinkComp:a,QuestionComp:r,target:l="_self",renderText:i=P,shouldReport:u,reportParams:d,styleType:h,mode:k,textExtra:y,desc:x}=e,C=(0,p.useLocation)(),_=(0,v._u)();if(!x)return null;if(t)return(0,o.jsx)(O,Object.assign({},e,{useGetVideoPath:v._u}));const{authorId:j,id:R,ad_info:I}=(0,c.L$)(n);let T=E;switch(h){case"kep":T=B;break;case"explore":T=D;break;default:T=E}return(null==y?void 0:y.length)?(0,o.jsx)(o.Fragment,{children:[...y].sort(((e,t)=>e.start-t.start)).reduce(((t,n,c,p)=>{const{start:y,end:v,awemeId:b,userUniqueId:L,hashtagName:w,type:S,subType:q,userId:N,hashtagId:O,questionId:P="",questionContent:B=""}=n,D=0===c?0:p[c-1].end,E=y,F=x.substring(D,E);F&&t.push(i(F,t.length-1,T,I,null==d?void 0:d.ttamTag));const W=g(q),M=x.substring(y,v);if(0===S&&W){const n=(0,f.FR)({to:{pathname:(0,m.WDv)({questionId:P,questionContent:B})},location:C});t.push((0,o.jsx)(r,{href:n,text:null!=L?L:"",index:t.length-1,id:P,type:"question",target:l,authorId:j,groupId:R,shouldReport:u,reportParams:d,styleType:"question",inline:"compact"===k,onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick},M+c))}else if(0===S&&b){const n=(0,f.FR)({to:{pathname:_({uniqueId:null!=L?L:"",videoId:b})},location:C});t.push((0,o.jsx)(s,{href:n,text:M,index:t.length-1,id:b,type:"video",target:l,authorId:j,groupId:R,shouldReport:u,reportParams:d,styleType:"duet",onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick},M+c))}else if(0===S&&N){const n=(0,f.FR)({to:{pathname:(0,m.fJR)({uniqueId:null!=L?L:""})},location:C});t.push((0,o.jsx)(a,{href:n,text:M,index:t.length-1,id:N,type:"user",target:l,authorId:j,groupId:R,shouldReport:u,reportParams:d,styleType:h,ariaLabel:`Watch more videos from user ${M}`,onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick,onBrowserModeClose:e.onBrowserModeClose},M+c))}else if(1===S&&w){const n=(0,f.FR)({to:{pathname:(0,m.ATn)({tagName:w})},location:C});t.push((0,o.jsx)(a,{href:n,text:M,index:t.length-1,id:null!=O?O:"",type:"tag",target:l,authorId:j,groupId:R,shouldReport:u,reportParams:d,styleType:h,ariaLabel:`Watch more videos of the ${M} category`,onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick,onBrowserModeClose:e.onBrowserModeClose},M+c))}else t.push(i(M,t.length-1,T,I,null==d?void 0:d.ttamTag));return c===p.length-1&&t.push(i(x.substring(v),t.length,T,I,null==d?void 0:d.ttamTag)),t}),[])}):i(x,0,T,I,null==d?void 0:d.ttamTag)}));var W=n(39589);function M({href:e,text:t,TagName:n,ariaLabel:s,className:a,tagClassName:r}){return(0,o.jsx)("a",{"data-e2e":"search-common-link",target:"_self",rel:"opener",className:a,"aria-label":null!=s?s:"",href:e,children:(0,o.jsxs)(n,{color:"rgba(43, 93, 185, 1)",className:r,children:[t," "]})})}const A=(0,h.T)((e=>{var t,n;const{textExtra:s,desc:r}=e,l=(0,a.useContext)(W.K),i=null===(n=null===(t=null==l?void 0:l.parameters)||void 0===t?void 0:t.bot_cost_optimize)||void 0===n?void 0:n.simplify_video_desc,u=null==i?void 0:i.spanClassName,d=null==i?void 0:i.aClassName,c=null==i?void 0:i.strongClassName,h=(0,p.useLocation)(),k=(0,v._u)();if(!r)return null;if(null==s?void 0:s.length){const e=[...s].sort(((e,t)=>e.start-t.start)).reduce(((e,t,n,s)=>{const{start:a,end:l,awemeId:i,userUniqueId:p,hashtagName:y,type:x,subType:C,userId:v,questionId:b="",questionContent:_=""}=t,j=0===n?0:s[n-1].end,R=a,I=r.substring(j,R),T=e;I&&T.push((0,o.jsx)("span",{className:u,children:I}));const L=g(C),w=r.substring(a,l);if(0===x&&L){const e=(0,f.FR)({to:{pathname:(0,m.WDv)({questionId:b,questionContent:_})},location:h});T.push(M({href:e,text:null!=p?p:"",TagName:"strong",className:d,tagClassName:c}))}else if(0===x&&i){const e=(0,f.FR)({to:{pathname:k({uniqueId:null!=p?p:"",videoId:i})},location:h});T.push(M({href:e,text:w,TagName:"strong",className:d,tagClassName:c}))}else if(0===x&&v&&p){const e=(0,f.FR)({to:{pathname:(0,m.fJR)({uniqueId:null!=p?p:""})},location:h});T.push(M({href:e,text:w,TagName:"strong",ariaLabel:`Watch more videos from user ${w}`,className:d,tagClassName:c}))}else if(1===x&&y){const e=(0,f.FR)({to:{pathname:`/tag/${y}`},location:h});T.push(M({href:e,text:w,TagName:"strong",ariaLabel:`Watch more videos of the ${w} category`,className:d,tagClassName:c}))}else T.push((0,o.jsx)("span",{className:u,children:w}));return n===s.length-1&&T.push((0,o.jsx)("span",{className:u,children:r.substring(l)})),T}),[]);return(0,o.jsx)(o.Fragment,{children:e})}return(0,o.jsx)("span",{className:u,children:r})}),F,{feature:"simplify_video_desc",shouldForwardRef:!0}),$=(0,a.memo)((e=>{const{item:t,showTranslation:n}=e,{desc:s,contents:r=[],textExtra:l}=(0,c.L$)(t),i=r.length;return 0===i?(0,o.jsx)(A,Object.assign({},e,{desc:s,textExtra:l})):s?0===i||n?(0,o.jsx)(A,Object.assign({},e,{desc:s,textExtra:l})):(0,o.jsx)(o.Fragment,{children:r.map(((t,n)=>(0,o.jsxs)(a.Fragment,{children:[(0,o.jsx)(A,Object.assign({},e,{desc:t.desc,textExtra:t.textExtra})),n!==i-1&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{})," "]})]},`${n}-${s}`)))}):null}));var U=n(19434),Q=n(62289),G=n(72153),H=n(67963);const z="inline-block",K="break-word",J=(0,y.default)("div",{target:"ejg0rhn1"})((({ellipsis:e,ellipsisLine:t,theme:n,theme:{direction:o,colors:s},styleType:a})=>[Object.assign(Object.assign({},n.typography.P2),{wordBreak:K}),e?(0,G.jJ)({max:479,style:G.PR}):null,t?1===t?[G.PR,(0,G.mp)({direction:o,display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"pre-line"})]:(0,G.m4)(t):null,"tag"===a||"question"===a?[(0,G.zy)({theme:n,fontFamily:"TikTokFont",fontWeight:"semiBold"}),{lineHeight:"22px",color:s.TextPrimary,pointerEvents:"none","a:hover":[{textDecoration:"none"},(0,G.mp)({direction:o,display:z,verticalAlign:"top",maxWidth:"100%"})],strong:{wordBreak:K,fontWeight:600}}]:null]),"label:DivDescriptionContentContainer;"),V=(0,y.default)("strong",{target:"ejg0rhn2"})((({theme:e,styleType:t="",color:n=""})=>({fontWeight:"kep"===t?e.fontWeights.bold:e.fontWeights.semiBold,color:n})),"label:StrongText;"),X={top:"50%",marginTop:"-8px"},Y=(0,y.default)(U.A,{target:"ejg0rhn3"})((({theme:{direction:e}})=>[Object.assign({position:"absolute"},X),(0,G.mp)({direction:e,start:"5px"})]),"label:StyledPlayFill;"),Z=(0,y.default)(Q.A,{target:"ejg0rhn4"})((({theme:{direction:e}})=>[Object.assign({position:"absolute"},X),(0,G.mp)({direction:e,start:"5px"})]),"label:StyledQAFill;"),ee=(0,y.default)(H.N_,{shouldForwardProp:e=>"styleType"!==e&&"inline"!==e,target:"ejg0rhn5"})((({styleType:e,inline:t,theme:{direction:n,colors:o}})=>[{background:o.BGPlaceholderDefault,display:t?"inline":z,padding:"1px 5px",position:"relative"},"tag"===e&&[{display:"initial",whiteSpace:"nowrap",fontSize:"14px",lineHeight:"20px"},(0,G.mp)({direction:n,paddingStart:25})],("duet"===e||"question"===e)&&(0,G.mp)({direction:n,paddingStart:25}),"kep"===e&&[{fontWeight:700}]]),"label:StyledLink;"),te=(0,y.default)(H.N_,{shouldForwardProp:e=>"shouldBreak"!==e&&"shouldInline"!==e,target:"ejg0rhn6"})((({shouldBreak:e=!1,shouldInline:t=!1})=>[{display:e||t?"inline":z,"&:focus-visible":{display:"inline"}},e?{wordBreak:"break-all"}:null]),"label:StyledCommonLink;");var ne=n(92502),oe=n(90217),se=n(32125);function ae({type:e,id:t,authorId:n,groupId:o,text:s,isDuet:l,reportParams:i,shouldReport:u,onSearchResultClick:d}){return(0,a.useCallback)((a=>{if(a.stopPropagation(),u)switch(e){case"tag":r.q.handleEnterTagDetail(Object.assign(Object.assign({},i),{tag_id:t,author_id:n,group_id:o,enter_method:l?"click_duet":"click_caption"})),null==d||d("tag");break;case"user":r.q.handleEnterUser(Object.assign(Object.assign({},i),{to_user_id:t,author_id:n,group_id:o,enter_method:l?"click_duet":"click_caption",to_user_name:s.substr(1)})),null==d||d("person");break;case"video":r.q.handleEnterVideo(Object.assign(Object.assign({},i),{author_id:n,group_id:o,to_group_id:t,enter_method:l?"click_duet":"click_caption"}));break;case"question":r.q.handleEnterQuestion(Object.assign(Object.assign({},i),{author_id:n,group_id:o,question_id:t,enter_method:"click_anchor"}))}}),[u,e,t,n,o,l,i,d,s])}const re=e=>{const{isQuestionMark:t=!1}=e,{colors:n}=(0,s.u)(),a=t?Z:Y;return(0,o.jsx)(a,{fill:n.Primary2,width:16,height:16})},le=e=>{const{href:t,text:n,index:s,id:r,type:l,target:i="_self",reportParams:u,shouldReport:d=!0,styleType:c,authorId:h,groupId:p,hasSpace:g=!0,onLinkClick:m,onSearchResultClick:k}=e,f=ae({type:l,id:r,text:n,isDuet:!0,reportParams:u,shouldReport:d,authorId:h,groupId:p,onSearchResultClick:k}),y=(0,a.useCallback)((e=>{f(e),null==m||m(e,t,"hashtag")}),[f,t,m]);return(0,o.jsxs)(ee,{to:t,target:i,rel:"opener",onClick:y,styleType:c,children:[(0,o.jsx)(re,{}),(0,o.jsxs)(V,{children:[n,g?" ":""]})]},n+s)},ie=e=>{const{href:t,text:n,index:s,id:r,type:l,target:d="_self",reportParams:c,shouldReport:h=!0,styleType:p,inline:g,authorId:m,groupId:k,onLinkClick:f,onSearchResultClick:y}=e,x=(0,u.s)(),C=ae({type:l,id:r,text:n,isDuet:!1,reportParams:c,shouldReport:h,authorId:m,groupId:k,onSearchResultClick:y}),v=(0,a.useCallback)((e=>{if(!r)return e.preventDefault(),i.F.destroy(),void i.F.open({content:x("qapage_webapp_error_title"),duration:3,widthType:"padding"});C(e),null==f||f(e,t)}),[C,t,r,f,x]);return(0,o.jsxs)(ee,{"data-e2e":"question-video-anchor",to:t,target:d,rel:"opener",onClick:v,styleType:p,inline:g,children:[(0,o.jsx)(re,{isQuestionMark:!0}),(0,o.jsx)(V,{children:n})]},n+s)},ue=e=>{const{href:t,text:n,index:r,id:i,type:u,target:c="_self",authorId:h,groupId:p,reportParams:g,shouldReport:m=!0,hasSpace:k=!0,styleType:f,ariaLabel:y,onLinkClick:x,onSearchResultClick:C}=e,v=(0,a.useRef)(null),b=(0,s.u)(),_=ae({type:u,id:i,authorId:h,groupId:p,text:n,isDuet:!1,reportParams:g,shouldReport:m,onSearchResultClick:C}),j=(0,a.useCallback)((e=>{if(_(e),null==x||x(e,t,"hashtag"),"tag"===u&&(null==g?void 0:g.is_ad_event)){const{log_extra:e,tag:t,value:n}=g;l.pg.handleChallengeClick({log_extra:e,tag:t,value:n,is_ad_event:"1"})}}),[_,t,x,g,u]),R=(0,a.useCallback)((e=>{var t;13===e.keyCode&&((0,d.Gu)(e),null===(t=v.current)||void 0===t||t.click())}),[]);return(0,o.jsx)(te,{"data-e2e":"search-common-link",to:t,target:c,rel:"opener",onClick:j,onKeyDown:R,ref:v,ariaLabel:y,shouldInline:"explore"===f,shouldBreak:"channel-break"===f,children:(0,o.jsxs)(V,{styleType:f,color:b.colors.AssistColorAzure,children:[n,k?" ":""]})},`${n}${r}`)},de=(0,a.memo)((function(e){const{item:t,ellipsisLine:n=0,ellipsisOnNarrow:s=!1,e2eTag:r,shouldReport:l=!0,reportParams:i,mode:u,target:d="_self",styleType:h="default",style:p={},wrapInContainer:g=!0}=e,{id:m}=(0,c.L$)(t),{selectedTranslationLanguage:k,isReady:f}=(0,ne.RD)((e=>({selectedTranslationLanguage:e.selectedTranslationLanguage,isReady:e.isReady})),se.bN),y=(0,j.sX)(m),x=(0,j.xr)(),C=(0,j.Oh)(m),v=(0,j.Vk)(m),b=(0,a.useRef)(null),_=(0,a.useMemo)((()=>[0]),[]),R=(0,a.useCallback)((()=>{y&&f&&x.getDescriptionTranslation({target_lang:k,item_id:m})}),[y,m,x,k,f]);return(0,a.useEffect)((()=>{f&&x.setShowTranslation(m,C||v)}),[m,f,C,v,x]),(0,oe.B)({intersectionHandler:R,unobserveAfterIntersect:!0,element:b,threshold:_}),g?(0,o.jsx)(J,{style:p,ellipsis:s,ellipsisLine:n,styleType:h,"data-e2e":r,ref:b,children:(0,o.jsx)($,{mode:u,item:t,showTranslation:y,DuetComp:le,LinkComp:ue,QuestionComp:ie,reportParams:i,shouldReport:l,styleType:h,target:d,onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick,onBrowserModeClose:e.onBrowserModeClose})}):(0,o.jsx)($,{mode:u,item:t,showTranslation:y,DuetComp:le,LinkComp:ue,QuestionComp:ie,reportParams:i,shouldReport:l,styleType:h,onLinkClick:e.onLinkClick,onSearchResultClick:e.onSearchResultClick,onBrowserModeClose:e.onBrowserModeClose})}))},50772:(e,t,n)=>{n.d(t,{c:()=>r});var o,s=n(93608),a=n(2584);!function(e){e.Main="main_page"}(o||(o={}));const r={videoShow:(e,t={})=>{s.f.sendEvent("video_show",Object.assign({keyword:e},t))},showSection:(e,t={})=>{s.f.sendEvent("show_section",Object.assign({section:e,duration:performance.now()},t))},handleTap:(e,t="click_content")=>{s.f.sendEvent("tap",{enter_method:e,target:t})},handleGeneralClick:(e,t="main_page",n={})=>{a.O.handleGeneralClick(e,Object.assign({scene:t},n))}}}}]);