"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5563],{141:(e,t,i)=>{i.d(t,{qk:()=>r});var o=i(81396),n=i.n(o),s=i(82715),a=i(91857);const r=[s.OZ.home,s.OZ.foryou,...s.OZ.foryouWithLang],d=(a.Ob.home,a.Ob.foryou,a.Ob.foryouWithLang,a.Ob.discover,a.Ob.topics,s.OZ.expansion,s.OZ.challenge,[a.Ob.report,a.Ob.reportInbox]);var l;n()(Object.values(a.Ob)).filter((e=>!d.includes(e))),function(e){e.Video="video",e.User="user",e.Challenge="hashtag",e.Trending="fyp",e.Live="live",e.Message="message",e.Setting="setting",e.Music="music",e.SearchResults="search",e.Discover="discover",e.Following="following",e.Topics="topics",e.Profile="profile",e.Expansion="expansion",e.Inbox="inbox",e.Report="report",e.Feedback="feedback",e.ChooseTime="custom-choose-time"}(l||(l={}))},60421:(e,t,i)=>{i.d(t,{_:()=>r});var o=i(58632);const n=["fetch"],s=["includes"],a=["values","entries","getOwnPropertyDescriptors"];function r(){return(0,o.__awaiter)(this,void 0,void 0,(function*(){"Promise"in window?(n.some((e=>!(e in window)))&&(yield i.e(2844).then(i.bind(i,23596))),(s.some((e=>!(e in Array.prototype)))||a.some((e=>!(e in Object))))&&(yield Promise.all([i.e(2837).then(i.t.bind(i,76431,23)),i.e(2837).then(i.t.bind(i,20929,23)),i.e(2837).then(i.t.bind(i,68091,23)),i.e(2837).then(i.t.bind(i,87323,23))]))):window.location.href="https://www.tiktok.com/unsupported"}))}},72688:(e,t,i)=>{i.d(t,{$2s:()=>_,ATn:()=>a,G2o:()=>n,WDv:()=>c,fJR:()=>d,l3z:()=>u,pHc:()=>s,wsj:()=>g,zpT:()=>m});var o=i(94810);const{getPureLivePath:n,getPureMusicPath:s,getPureTagPath:a,getPureStickerPath:r,getPureUserPath:d,getPureVideoPath:l,getPureQuestionPath:c}=o.h,{getPureUniqueId:u,hasIllegalText:p,isPureNumber:v,isRealUniqueId:_,purifyMusicName:g,purifyPlainText:m}=o.A},55322:(e,t,i)=>{i.d(t,{n:()=>a});var o=i(46657),n=i(2668),s=i(20259);const a=({msg:e,shouldShowMsg:t=!1,prevent:i=!0,callback:a})=>r=>r.pipe((0,s.W)((s=>(t&&console.error("Effect error: ",null!=e?e:s),null==a||a(),i?o.w:(0,n.$)((()=>s))))))},88920:(e,t,i)=>{i.d(t,{$4:()=>Vt,$r:()=>_e,AP:()=>Ee,Ad:()=>Ve,BI:()=>zt,BM:()=>fe,CQ:()=>Te,E1:()=>ut,Eg:()=>jt,Eo:()=>V,Eq:()=>Ke,Ey:()=>Nt,FI:()=>Bt,FT:()=>we,Fb:()=>Kt,Fl:()=>Re,Fo:()=>Ie,Ge:()=>wt,HL:()=>Zt,HW:()=>Yt,Hh:()=>Pe,IP:()=>Ft,JB:()=>z,JX:()=>$e,Jc:()=>Q,Jl:()=>nt,KK:()=>Ht,KS:()=>J,Kg:()=>Ne,Kj:()=>xe,LK:()=>Dt,M4:()=>te,Mz:()=>de,NF:()=>pt,NY:()=>D,ON:()=>Lt,OQ:()=>rt,O_:()=>me,Oj:()=>Wt,PV:()=>Me,Pk:()=>Ct,Pl:()=>Ye,Q5:()=>st,QN:()=>yt,QY:()=>lt,RC:()=>ye,Ry:()=>K,Sc:()=>W,TP:()=>ie,Tt:()=>ve,Vn:()=>Ut,Vs:()=>Jt,Vv:()=>ot,W3:()=>X,W4:()=>B,WE:()=>Je,WO:()=>G,Wh:()=>$,X$:()=>Rt,Xl:()=>N,Yu:()=>le,ZC:()=>ce,ZO:()=>he,ZT:()=>St,_Y:()=>Oe,_o:()=>Qe,aL:()=>Ze,aO:()=>qt,ac:()=>Z,bx:()=>dt,c8:()=>oe,cE:()=>x,cV:()=>Gt,d1:()=>Se,eZ:()=>et,eb:()=>Ae,eu:()=>Be,fH:()=>tt,fy:()=>it,gQ:()=>ct,gR:()=>q,gg:()=>Ot,hn:()=>qe,iM:()=>ue,iz:()=>je,jC:()=>ze,jw:()=>Fe,k0:()=>ht,kT:()=>Ue,kb:()=>F,kw:()=>re,l2:()=>Y,lP:()=>ee,lY:()=>ti,lZ:()=>bt,mT:()=>Mt,mf:()=>xt,ng:()=>Xe,oJ:()=>Qt,pC:()=>Tt,pJ:()=>Xt,pd:()=>pe,q:()=>Ce,q6:()=>ne,r6:()=>be,re:()=>ei,rl:()=>$t,rq:()=>at,s0:()=>De,sF:()=>ge,tY:()=>gt,tc:()=>se,tj:()=>Et,u6:()=>R,uT:()=>ae,ul:()=>ke,vY:()=>Pt,vh:()=>vt,vp:()=>It,wX:()=>We,xZ:()=>U,y4:()=>At,y9:()=>H,yc:()=>mt,yk:()=>He,yl:()=>_t,zD:()=>Le,zy:()=>kt});var o=i(33805),n=i(5441),s=i(52702),a=i(47172),r=i(4629),d=i(51660),l=i(4929),c=i(82715),u=i(8227),p=i(75792),v=i(35267),_=i(48961),g=i(4685),m=i(23294),h=i(95358),A=i(58305),y=i(93341),b=i(67823),f=i(40099),w=i(30721),T=i(49057),L=i(48615),S=i(89558),O=i(45297),I=i(34012),k=i(45212),P=i(60484),j=i(71281),M=i(32862);const C="abTestVersion",E="videoPlayerConfig";function V(){const{isSmartPlayer:e}=(0,w.Qt)();return{isMobileUiOptimize:!e}}const x=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>[C]),[]));return{hasNonPersonalizedMenu:"v2"===(null!==(e=(0,j.qt)(t,S.W$))&&void 0!==e?e:"v1")}},F=e=>{var t,i;const{abTestVersion:o}=(0,P.L$)((0,T.W)((()=>[C]),[])),n=null!==(t=(0,j.qt)(o,"desktop_ui_reply"))&&void 0!==t?t:"v1",s="v5"===n,a="v6"===n;return{shouldAvatarShowNickName:"v2"===(null!==(i=(0,j.qt)(o,"desktop_avatar_nick_name"))&&void 0!==i?i:"v1"),shouldOptimizeCta:"v2"===n||s,allowRightPanelScroll:s||a,shouldOptimizeReply:s||a,onlyOptimizeCta:"v2"===n,shouldShowCommentsCnt:"v2"===n||"v3"===n||s||a,isDesktopUiOptDebugOn:(0,j.TQ)("desktop_ui_opt_debug")&&!e,shouldIncludeV3V4:a}};function W(){var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>[C]),[])),{videoPlayerConfig:i}=(0,P.L$)((0,L.U)((()=>[E]),[]));return{isUseNativePlayer:null==i?void 0:i.fallback,adaptBitrateVid:null!==(e=(0,j.qt)(t,"video_bitrate_adapt"))&&void 0!==e?e:"v1"}}function B(){var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>[C]),[]));return null!==(e=(0,j.qt)(t,"xg_volume_test"))&&void 0!==e?e:"v1"}function $(){var e,t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>[C]),[])),o=null!==(e=(0,j.qt)(i,"feed_scroll_opt"))&&void 0!==e?e:"v0";return{hasLimitedItem:"v1"===o,hasMultiPlayerIns:"v2"===(null!==(t=(0,m.S)(i,"multiple_ins_model"))&&void 0!==t?t:"v0"),hasOptForFeed:"v1"===o}}function U(){var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>[C]),[])),i=null!==(e=(0,j.qt)(t,"multiple_ins_new"))&&void 0!==e?e:"v0",{hardwareScore:o}=(0,g.fL)();return{hasRetainIns:"v4"===i&&o>8.5,hasBackupIns:"v1"===i||"v2"===i&&o>=5||"v3"===i&&o>=6||"v4"===i}}function R(e){const{vgeo:t}=(0,P.L$)((0,L.U)((()=>["vgeo"]),[])),{wid:i}=(0,P.L$)((0,T.W)((()=>["wid"]),[])),o=function(e){var t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>[C]),[]));return null!==(t=(0,j.qt)(i,e))&&void 0!==t?t:"v1"}(e);return{vgeo:t,wid:i,vid:o}}function q(){var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>[C]),[])),i=null!==(e=(0,j.qt)(t,"remove_tooltip"))&&void 0!==e?e:"v0";return{removeUploadPop:"v1"===i,removeLivePop:"v1"===i,removeEditProfilePop:"v1"===i,removeOtherPop:"v4"===i,removeShortcutPop:"v5"===i}}function D(){const{xgplayerInitHost:e}=(0,P.L$)((0,L.U)((()=>["xgplayerInitHost"]),[]));return{playerInitHost:e}}function N(){const{videoOrder:e}=(0,P.L$)((0,L.U)((()=>["videoOrder"]),[]));return{videoOrder:null==e?void 0:e.videoOrder}}function Z(){const{pathname:e}=(0,a.useLocation)(),t=(0,I.Ig)()?"v1":"v2",i=(0,h.Fj)(e),o="v1"!==t,n="v1"!==t;return{isVideoPlayerOptimization:o,hasPip:n,isUIOptimization:!1,isVideoDetailUIOptimization:!1,hasVideoDetailPip:n&&i,isVideoDetailExperiment:"v1"!==t&&i,isVideoDetailPlayerExperiment:o&&i}}const G=e=>{if(!e)return{};const{id:t,type:i,isClaimed:o,cityCode:n,countryCode:s,ttTypeNameSuper:a,ttTypeNameMedium:r,ttTypeNameTiny:d,ttTypeCode:l,typeCode:c}=e;return{poi_id:t,poi_backend_type:i,poi_detail_type:_.Af[null!=i?i:0],is_claimed:o?1:0,poi_city:n,poi_region_code:s,tt_poi_backend_type:`${a},${r},${d}|${l}`,poi_type_code:c}},K=e=>{var t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),o=null!==(t=(0,j.qt)(i,"explore_ui_change"))&&void 0!==t?t:"v0";return{isClearUI:"v1"===o&&e,withCreator:"v1"!==o&&"v0"!==o&&e,withLike:("v3"===o||"v4"===o)&&e,withBack:"v4"===o&&e,withDes:("v4"===o||"v0"===o)&&e,withNoLeftInfo:"v2"===o}},H=()=>{var e;const{abTestVersion:t,language:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion","language"]),[]));let o=null!==(e=(0,j.qt)(t,"search_preview_ui_change"))&&void 0!==e?e:"v0";return"hu-HU"!==i&&"hu"!==i||"v3"!==o||(o="v0"),{withLikeAndCreator:"v1"===o||"v2"===o||"v3"===o,removeDesc:"v1"===o,withOneLineDesc:"v2"===o||"v3"===o,withPublishTime:"v3"===o}},z=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"foryou_opt"))&&void 0!==e?e:"v0";return{hasFypLoadingOpt1:"v1"===i,hasFypLoadingOpt2:"v2"===i}},Q=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"seo_preview_ui_change"))&&void 0!==e?e:"v0")},J=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,m.S)(t,"perf_blur_background"))&&void 0!==e?e:"v0",{withBlurBG:o,withNoBG:n,withLinearGradientBG:s,withLinearGradientBlueBG:a,withLinearGradientBlackBG:r}=(0,f.useMemo)((()=>({withBlurBG:"v0"===i,withNoBG:"v1"===i,withLinearGradientBG:"v2"===i||"v3"===i,withLinearGradientBlueBG:"v3"===i,withLinearGradientBlackBG:"v2"===i})),[i]);return{withBlurBG:o,withNoBG:n,withLinearGradientBG:s,withLinearGradientBlueBG:a,withLinearGradientBlackBG:r}};function Y(){var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>[C]),[])),{pathname:i}=(0,a.useLocation)(),o=null==t?void 0:t.versionName.split(",");return{isInHorizontalBoostUI:null!==(e=null==o?void 0:o.includes("71188781"))&&void 0!==e&&e&&((0,h.tO)(i)||(0,h.gq)(i))}}const X=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"islands_arch_user_profile"))&&void 0!==e?e:"v0";return{delayUntilAnyItem:"v1"===i,delayUntilFirstItem:"v2"===i}},ee=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{hasCommonVideoFirst:"v1"===(null!==(e=(0,j.qt)(t,"islands_arch_rest_page"))&&void 0!==e?e:"v0")}},te=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{isOpenNewTab:"v2"===(null!==(e=(0,j.qt)(t,"webapp_browser_mode_new_tab"))&&void 0!==e?e:"v1")}},ie=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v2"===(null!==(e=(0,j.qt)(t,"sidenav_test"))&&void 0!==e?e:"v1")},oe=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"webapp_auto_refresh"))&&void 0!==e?e:"v1";return{refreshWhenExpireAndEmpty:"v2"===i,refreshInAllCase:"v3"===i}},ne=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"one_column_player_size"))&&void 0!==e?e:"v1";return{useEnlargedVideoPlayer:"v1"!==i,useCenterAligned:"v3"===i||"v4"===i,useWiderContainerSize:"v4"===i||"v5"===i}},se=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v2"===(null!==(e=(0,j.qt)(t,"use_follow_v2"))&&void 0!==e?e:"v1")},ae=()=>{const{abTestVersion:e}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(0,j.qt)(e,"playback_refactor_desktop")},re=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{isInWebappPerfPageSwitchExperiment:"v0"!==(null!==(e=(0,j.qt)(t,"webapp_perf_page_switch"))&&void 0!==e?e:"v0")}},de=()=>{var e,t;const{isElectronApp:i}=(0,n.B)(),{pathname:s}=(0,a.useLocation)(),r=(0,o.oN)(s),{abTestVersion:d}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),l="homepage_hot"===r,c=null!==(e=(0,j.qt)(d,l?"on_device_ml_player_preload":"on_device_ml_player_preload_other_pages"))&&void 0!==e?e:{vid:"v0"},{isLowEndDevice:u}=(0,k.qo)(),p=null!==(t=null==c?void 0:c.vid)&&void 0!==t?t:"v0",v=!i&&"undefined"!=typeof WebAssembly&&!u;return{playerPreloadPredictStrategy:c,disablePreloadPredict:"v0"===p,enablePlayerPreloadPredict:("v1"===p||"v2"===p)&&v,enablePlayerPreloadDowngradePredict:"v3"===p||"v0"!==p&&!v}},le=()=>{var e,t,i;const{abTestVersion:o}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),n=(0,j.qt)(o,"tt_player_hevc_ignore_env")||"v0",s=(0,j.qt)(o,"tt_player_hevc_local")||"v0",a=(0,j.qt)(o,"cthun_predict_buffer")||"v0",r=(0,j.qt)(o,"tt_player_reuse"),d=(0,j.qt)(o,"tt_player_openmse"),{disablePreloadPredict:l}=de(),c=(0,y.PU)(),u=null!==(e=(0,j.qt)(o,"tt_player_preload"))&&void 0!==e?e:{vid:"v0",maxQueueCount:3,preloadMaxCacheCount:5,preloadTime:10,segmentMinDuration:10,minBufferLength:10,startPreloadControl:!1,startPreloadMinBuffer:0,startPreloadMinPosTime:0};return{playerReuse:"v1"===r?1:0,playerPreload:l?u:Object.assign(Object.assign({},u),c),bitrateSelect:null!==(t=(0,j.qt)(o,"ttplayer_bitrate_select"))&&void 0!==t?t:{vid:"v0",selector:"default",qualityType:20,hevcQualityType:14},hevcIgnoreEnv:"v1"===n?1:0,hevcResultLocal:"v1"===s?1:0,playerUpgrade:null!==(i=(0,j.qt)(o,"tt_player_upgrade"))&&void 0!==i?i:{vid:"v0",playerType:"XG"},playerOpenMse:"v1"===d?1:0,cthunPredictBufferWithLinear:"v1"===a,cthunPredictBufferWithPoly:"v2"===a,cthunPredictBufferWithTree:"v3"===a}},ce=()=>{const e={};return[{key:"tt_player_h265soft",retKey:"playerH265Soft"}].forEach((t=>{const i=(0,M.OW)(t.key,{});i.vid&&(e[t.retKey]=i)})),e},ue=e=>{const t={open:!1,qualityType:20,vid:"v0",closePreload:!1,testKey:"none"},i=["hevc_device_edge_low","hevc_device_edge_high","hevc_device_chrome_low","hevc_device_chrome_high","hevc_device_test"];if("desktop"===e){if("undefined"==typeof window)return t;let e=null,o="none";for(let t=0;t{if("undefined"==typeof window||"desktop"!==e)return"";const t=[];return["hevc_device_test","hevc_device_edge_low","hevc_device_edge_high","hevc_device_chrome_low","hevc_device_chrome_high","tt_player_h265soft"].forEach((e=>{const i=(0,M.HL)(e,{vid:""});i&&t.push(i)})),t.join(",")},ve=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"enable_ml_model_suggest_content"))&&void 0!==e?e:"v0")},_e=({enterFrom:e,linkIncludeVid:t})=>{var i;const{abTestVersion:o}=(0,P.L$)((0,T.W)((()=>[C]),[])),n=null!==(i=(0,j.qt)(o,"studio_web_eh_entrance_v3"))&&void 0!==i?i:"v1";let s="https://effecthouse.tiktok.com/download?utm_source=tiktok_webapp_main";return e&&(s=`${s}&enter_from=${e}`),t&&(s=`${s}&utm_campaign=ttweb_entrance_${n}`),{showEhEntrance:!0,entranceVariant:n,ehLink:s}},ge=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{isAutoScrollReposition:"v0"!==(null!==(e=(0,j.qt)(t,"autoscroll_reposition"))&&void 0!==e?e:"v0")}},me=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v0"!==(null!==(e=(0,j.qt)(t,"banner_ad_enable"))&&void 0!==e?e:"v1")},he=()=>{const{abTestVersion:e}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),t=(0,j.qt)(e,"project_ace_control");return"v0"===t||"v1"===t},Ae=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"add_profile_left_bar"))&&void 0!==e?e:"v0";return{showProfileLeftBar:"v1"===i||"v3"===i,enableClickTopRightIcon:"v2"===i||"v3"===i}},ye=()=>{var e;const{abTestVersion:t,user:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion","user"]),[])),o=!!i;return"v1"===(null!==(e=(0,j.qt)(t,"friends_tab"))&&void 0!==e?e:"v0")&&o},be=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"video_detail_reflow_card"))&&void 0!==e?e:"v0")},fe=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"yml_ui_optimize"))&&void 0!==e?e:"v0";return{isCoverImageChanged:"v1"===i,isMetaDataChanged:"v2"===i,isCoverImageAndMetaDataChanged:"v3"===i}},we=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"guide_user_to_next_video"))&&void 0!==e?e:"v0";return{isVideoDetailPage:"v1"===i,isFYP:"v2"===i}},Te=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"creator_to_fyp"))&&void 0!==e?e:"v0";let o=0;return"v1"===i?o=1:"v2"===i&&(o=2),{sendCreatorItemId:"v1"===i||"v2"===i,batchCount:o}},Le=()=>{const{abTestVersion:e}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),t=(0,m.S)(e,"video_detail_end_card");return{toCreatorEndCard:"v1"===t||!t,toForyouEndCard:"v2"===t||!t,toExploreEndCard:"v3"===t}},Se=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"detail_to_explore"))&&void 0!==e?e:"v0";return{inExploreEndCardExperiment:"v0"!==i,isExploreEndCardFourVideo:"v1"===i||"v2"===i,isExploreEndCardCategoryAll:"v2"!==i&&"v4"!==i}},Oe=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"three_column_gif"))&&void 0!==e?e:"v0")},Ie=()=>{var e,t,i,o;const n=(0,s.wW)(),a=null!==(t=null===(e=null==n?void 0:n.parameters.seo_tag_and_title)||void 0===e?void 0:e.vid)&&void 0!==t?t:"v0",r=null!==(o=null===(i=null==n?void 0:n.parameters.seo_tag_and_title)||void 0===i?void 0:i.isArticleHtmlTag)&&void 0!==o&&o,{isSearchEngineBot:d=!1}=(0,P.L$)((0,L.U)((()=>["isSearchEngineBot"]),[]));return{useTitle:["v1","v3"].includes(a)&&d,useHtmlTag:["v2","v3"].includes(a),useArticleHtmlTag:r}},ke=()=>{var e,t,i,o;const n=(0,s.wW)(),a=null!==(e=null==n?void 0:n.vidList)&&void 0!==e?e:[],r=(0,T.W)((()=>["abTestVersion"]),[]);return[...a,...null!==(o=null===(i=null===(t=null==r?void 0:r.abTestVersion)||void 0===t?void 0:t.versionName)||void 0===i?void 0:i.split(","))&&void 0!==o?o:[]]},Pe=()=>{const{abTestVersion:e}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),t=(0,j.qt)(e,"webapp_causal_inference_auto_scroll_data_collection");return{useAutoScrollModelResult:"v2"===t||"v3"===t}},je=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"auto_scroll"))&&void 0!==e?e:"v1";return"v1"===i&&(0,A.sc)("auto_scroll"),{hasAutoScrollButton:"v1"!==i}},Me=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,m.S)(t,"preview_cover"))&&void 0!==e?e:"v0";return(0,f.useMemo)((()=>"v1"===i),[i])},Ce=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"show_aigc_label_web"))&&void 0!==e?e:"v0")},Ee=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v2"===(null!==(e=(0,j.qt)(t,"use_profile_avatar"))&&void 0!==e?e:"v1")},Ve=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"pc_non_personalized_suggested_account"))&&void 0!==e?e:"v0")},xe=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"pc_non_personalized_explore"))&&void 0!==e?e:"v0")},Fe=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"use_aligned_copies"))&&void 0!==e?e:"v0";return{default:"v0"===i,solution1:"v1"===i,solution2:"v2"===i}},We=()=>{var e,t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),o=null!==(e=(0,j.qt)(i,"desktop_web_survey_new"))&&void 0!==e?e:"v0",n=null!==(t=(0,j.qt)(i,"desktop_web_survey_old"))&&void 0!==t?t:"v0";return{shouldShowSurvey:"v0"!==o||"v0"!==n,isNewUser:"v0"!==o}},Be=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"enable_autoscroll_moremenu"))&&void 0!==e?e:"v0")},$e=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"enable_video_detail_moremenu_refactor"))&&void 0!==e?e:"v0";return{enableNewPopover:"v0"!==i,moveFullScreenToMoreMenu:"v1"===i||"v2"===i,showPopoverRightTopCorner:"v2"===i||"v3"===i}},Ue=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v2"===(null!==(e=(0,j.qt)(t,"video_detail_page_video_play"))&&void 0!==e?e:"v1")},Re=()=>{var e,t,i,o;return{isRepostLabelEnabled:"v0"!==(null!==(e=(0,j.d)("webapp_repost_label"))&&void 0!==e?e:"v0"),isRepostTabEnabled:"v0"!==(null!==(t=(0,j.d)("webapp_repost_tab"))&&void 0!==t?t:"v0"),repostActionVid:null!==(i=(0,j.d)("webapp_repost_action"))&&void 0!==i?i:"v0",isRepostNoticeEnabled:"v0"!==(null!==(o=(0,j.d)("webapp_repost_notice"))&&void 0!==o?o:"v0")}},qe=()=>Re(),De=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"webapp_creator_post_sort"))&&void 0!==e?e:"v0";return{isPostSortBottomLeftEnabled:"v1"===i,isPostSortBottomMiddleEnabled:"v2"===i,isPostSortRightTwoOptionsEnabled:"v3"===i,isPostSortRightMenuEnabled:"v4"===i,isPostSortRightThreeOptionsEnabled:"v5"===i}},Ne=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"webapp_creator_just_watched"))&&void 0!==e?e:"v0";return{isJustWatchedEnabled:"v0"!==i,isButtonPrimary:"v1"===i||"v3"===i,isButtonSizeLarge:"v3"===i||"v4"===i}},Ze=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"guest_mode_redesign"))&&void 0!==e?e:"v0";return{showRedesign:"v0"!==i,buttonKey:(e=>{switch(e){case"v1":default:return"pcWeb_guestLogin_contToVideo";case"v2":return"pcWeb_guestLogin_guest";case"v3":return"pcWeb_guestLogin_without"}})(i)}};function Ge(e){var t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),o=(0,j.qt)(i,e),n=null!==(t=(0,j.qt)(i,"delay_guest"))&&void 0!==t?t:"2",s=b.A.get(O.er)||"";if(void 0!==s&&""!==s){const e=Number(s);return isNaN(e)?(console.error(`Invalid vv limit: ${s}`),{vvLimit:Number(n)}):{vvLimit:e}}return void 0!==o?(b.A.set(O.er,o,O.Ah),{vvLimit:Number(o)}):{vvLimit:Number(n)}}const Ke=()=>{const{pathname:e}=(0,a.useLocation)(),t={delay_guest_fyp:Ge("delay_guest_fyp"),delay_guest_others_homepage:Ge("delay_guest_others_homepage"),delay_guest_videos:Ge("delay_guest_videos"),delay_guest_discover:Ge("delay_guest_discover"),delay_guest_explore:Ge("delay_guest_explore"),delay_guest_other:Ge("delay_guest_other")};return(0,h.tO)(e)?t.delay_guest_fyp:(0,h.cj)(e)?t.delay_guest_others_homepage:(0,h.Fj)(e)?t.delay_guest_videos:(0,h.pz)(e)?t.delay_guest_discover:(0,h.eD)(e)?t.delay_guest_explore:t.delay_guest_other},He=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"video_detail_yml_ui"))&&void 0!==e?e:"v1";return{shouldSwapInfo:"v2"===i||"v4"===i,shouldListView:"v3"===i||"v4"===i}},ze=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{hasPip:"v1"!==(null!==(e=(0,j.qt)(t,"video_detail_auto_pip_opt"))&&void 0!==e?e:"v0")}},Qe=()=>{var e;const t="webapp_dynamic_bottom_right",{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),o=null!==(e=(0,m.S)(i,t))&&void 0!==e?e:"v0",{isInDynamicBottomRightExperiment:n,isInDynamicBottomRightControl:s,isInDynamicBottomRightFolded:a,isInDynamicBottomRightExpanded:r}=(0,f.useMemo)((()=>({isInDynamicBottomRightExperiment:"v0"===o||"v1"===o||"v2"===o,isInDynamicBottomRightControl:"v0"===o,isInDynamicBottomRightFolded:"v1"===o,isInDynamicBottomRightExpanded:"v2"===o})),[o]);return{baseExpId:t,isInDynamicBottomRightExperiment:n,isInDynamicBottomRightControl:s,isInDynamicBottomRightFolded:a,isInDynamicBottomRightExpanded:r}},Je=()=>{var e;const t="webapp_auto_dark_mode",{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),o=null!==(e=(0,m.S)(i,t,!0))&&void 0!==e?e:"v0",{isInAutoDarkModeExperiment:n,isInAutoDarkModeControl:s,isInAutoDarkModeTreatment:a}=(0,f.useMemo)((()=>({isInAutoDarkModeExperiment:"v0"===o||"v1"===o,isInAutoDarkModeControl:"v0"===o,isInAutoDarkModeTreatment:"v1"===o})),[o]);return{baseExpId:t,isInAutoDarkModeControl:s,isInAutoDarkModeTreatment:a,isInAutoDarkModeExperiment:n}},Ye=()=>{const{abTestVersion:e}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),t=(0,j.qt)(e,"browser_fingerprint_basic"),i=(0,j.qt)(e,"browser_fingerprint_verify");return{isInBasicTreatment:"v1"===t,isInVerification:"v0"===i||"v1"===i}},Xe=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"top_right_button"))&&void 0!==e?e:"v0",{pathname:o}=(0,a.useLocation)(),n=(0,h.tO)(o)||(0,h.gq)(o)||(0,h.K8)(o);return{isInTopRightButtonTreatment:"v0"!==i&&n,isInTopRightButtonLeftNavHide:("v2"===i||"v4"===i)&&n,isInTopRightButtonProfile:("v3"===i||"v4"===i)&&n}},et=()=>{var e,t,i;const{abTestVersion:o}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),{isMobile:n}=(0,P.L$)((0,L.U)((()=>["isMobile"]),[])),s=null!==(e=(0,j.qt)(o,"top_right_button_group"))&&void 0!==e?e:"v0",r=null!==(t=(0,j.qt)(o,"top_right_button_group_all"))&&void 0!==t?t:"v0",d="v1"===(null!==(i=(0,j.qt)(o,"seo_top_tool_bar"))&&void 0!==i?i:"v0"),{pathname:l}=(0,a.useLocation)(),c=((0,h.tO)(l)||(0,h.gq)(l)||(0,h.K8)(l))&&!n,u=((0,h.cj)(l)||(0,h.Fj)(l)||(0,h.eD)(l)||(0,h.a1)(l)||(0,h.ie)(l)||(0,h.q$)(l)||(0,h.ZG)(l))&&!n;return{isInTopRightButtonGroupTreatment:"v0"!==s&&c||"v0"!==r&&u||d,isConnectedActionBar:!0,isButtonGroupWithText:"v4"===s&&c}},tt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),{isMobile:i}=(0,P.L$)((0,L.U)((()=>["isMobile"]),[]));return{isInTopRightButtonGroupAllTreatment:"v0"!==(null!==(e=(0,j.qt)(t,"top_right_button_group_all"))&&void 0!==e?e:"v0")&&!i}},it=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"keyboard_shortcut"))&&void 0!==e?e:"v0",{pathname:o}=(0,a.useLocation)(),n=(0,h.tO)(o)||(0,h.gq)(o)||(0,h.K8)(o);return{isInKeyboardShortcutTreatment:"v0"!==i&&n,isInKeyboardShortcutV1:"v1"===i&&n,isInKeyboardShortcutV2:"v2"===i&&n}},ot=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"use_container_exp"))&&void 0!==e?e:"v0";return{isInProductHoldout:"v1"===i||"v3"===i,isInPerformanceHoldout:"v2"===i||"v3"===i}},nt=(e,t)=>{var i;const{abTestVersion:o}=(0,P.L$)((0,T.W)((()=>[C]),[])),n=null!==(i=(0,j.qt)(o,"tteh_effect_anchor_v1"))&&void 0!==i?i:"v1",s="v1"!==n&&[5,129,0].includes(null!=t?t:999);let a=e;return s||(a=[]),{shouldShowEhEffectAnchor:s,effectAnchors:a,abVariant:n}},st=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"video_detail_yml_creator"))&&void 0!==e?e:"v0";return{useCreatorFeed:"v0"!==i,showPinnedVideos:"v2"===i}},at=()=>{var e;const{abTestVersion:t,user:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion","user"]),[])),o=!!i;let n=null!==(e=(0,j.qt)(t,"video_detail_author_card"))&&void 0!==e?e:"v0";return o&&(n="v0"),{useAuthorCard:"v0"!==n,useLargeCard:"v3"===n,withCountDown:"v2"===n}},rt=()=>{var e,t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),o=null!==(e=(0,j.qt)(i,"video_detail_nav_opt"))&&void 0!==e?e:"v0",n=null!==(t=(0,j.qt)(i,"video_detail_nav_shortcut"))&&void 0!==t?t:"v0";return{pushHistory:"v1"===o||"v3"===o,newTabAndShortcut:"v1"===n||"v4"===n,enableShortcutFocusAddressBar:"v2"===n||"v4"===n,enableShortcutRefreshAndCopy:"v3"===n||"v4"===n,enableAllShortcut:"v4"===n}},dt=()=>{var e,t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),o=null!==(e=(0,j.qt)(i,"video_details_player_redesign_engagement"))&&void 0!==e?e:"v0",n=null!==(t=(0,j.qt)(i,"video_details_player_redesign_player"))&&void 0!==t?t:"v0",s="v0"!==o||"v3"===n,a=s&&"v1"!==o||"v3"===n,r="v0"!==n;return{showCurvedPlayerEdges:"v0"!==n||"v0"!==o,showFYPButtonStyle:s,moveCreatorIcon:a,moveEngagementPanel:a&&"v2"!==o||"v3"===n,updateButtonPanel:r,updatePlayerControls:r&&"v1"!==n}},lt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"search_top_author_card"))&&void 0!==e?e:"v0";return{withFollowButton:"v0"!==i,withVideoList:"v2"===i}},ct=()=>{var e,t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{count:null!==(t={v0:10,v1:5,v2:8,v3:12}[null!==(e=(0,j.qt)(i,"search_yml_guess_count"))&&void 0!==e?e:"v0"])&&void 0!==t?t:10}},ut=()=>{var e;const{abTestVersion:t,user:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion","user"]),[])),o=null!==(e=(0,j.qt)(t,"use_navigation_refactor"))&&void 0!==e?e:"v0";return{showUpload:!("v5"===o&&!i),condenseProfileDropdown:"v5"===o}},pt=()=>{var e,t;const{abTestVersion:i,user:o}=(0,P.L$)((0,T.W)((()=>["abTestVersion","user"]),[])),n=!!o;return{enableUploadRefactor:"v1"===(null!==(e=(0,j.qt)(i,"enable_upload_refactor"))&&void 0!==e?e:"v0")&&n,enableMessageRefactor:"v1"===(null!==(t=(0,j.qt)(i,"enable_message_refactor"))&&void 0!==t?t:"v0")&&n}},vt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"use_left_navigation_refactor"))&&void 0!==e?e:"v0";return{showNewLiveIcon:"v1"===i||"v3"===i,isCollapsibleFooter:"v2"===i||"v3"===i}},_t=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"video_detail_responsive_ui"))&&void 0!==e?e:"v0";return{responsiveUi:"v0"!==i,showUserInfo:"v2"===i}},gt=()=>{var e,t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{showOnHot:"v0"!==(null!==(e=(0,j.qt)(i,"new_guest_mode_hot"))&&void 0!==e?e:"v0"),showOnRest:"v0"!==(null!==(t=(0,j.qt)(i,"new_guest_mode_other"))&&void 0!==t?t:"v0")}},mt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return null!==(e=(0,j.qt)(t,"webapp_explore_nav_order"))&&void 0!==e?e:"v0"},ht=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return null!==(e=(0,j.qt)(t,"webapp_explore_video_info"))&&void 0!==e?e:"v0"},At=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"islands_arch_explore"))&&void 0!==e?e:"v0";return{delayAfterRender:"v1"===i,delayAfterVideoPlay:"v2"===i}},yt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{hasTrendingCard:"v1"===(null!==(e=(0,j.qt)(t,"explore_trending_topics"))&&void 0!==e?e:"v0")}},bt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"video_resolution_auto"))&&void 0!==e?e:"v0",o=(0,r.Zo)();return{allowSelectResolution:"v0"!==i&&o,defaultAuto:"v1"===i,useStoredResolution:"v2"===i,shouldResetResolution:"v0"===i}},ft=()=>{var e;return"v0"!==(null!==(e=(0,j.d)("webapp_collection_adder"))&&void 0!==e?e:"v0")},wt=()=>(0,f.useMemo)((()=>{return Object.assign({isCollectionEnabled:"v0"!==(null!==(e=(0,j.d)("webapp_collection_profile"))&&void 0!==e?e:"v0"),isAddToCollectionEnabled:ft(),popoverTriggerType:"bottomToast"},(()=>{var e;switch(null!==(e=(0,j.d)("webapp_collection_adder"))&&void 0!==e?e:"v0"){case"v2":return{toastTheme:"dark",toastDuration:5e3};case"v3":return{toastTheme:"dark",toastDuration:8e3};default:return{toastTheme:"default",toastDuration:3e3}}})());var e}),[]),Tt=()=>(0,f.useMemo)((()=>{var e;const t=null!==(e=(0,j.d)("fyf_profile_uj"))&&void 0!==e?e:"v0";return{isFyfProfileUjEnabled:"v0"!==t,cacheRange:"v2"===t?"after":"v3"===t?"all":"one",shouldCacheIndex:"v3"===t}}),[]),Lt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{shouldUseWebAppQueryCommentsPopover:"v1"===(null!==(e=(0,j.qt)(t,"webapp_query_comments_popover"))&&void 0!==e?e:"v0")}},St=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{showNewCommentDesign:"v0"!==(null!==(e=(0,j.qt)(t,"detail_page_comments_redesign"))&&void 0!==e?e:"v0")}},Ot=()=>{const{pathname:e}=(0,a.useLocation)(),{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=(0,j.qt)(t,"webapp_pc_apk");return i&&(0,h.tO)(e)?{shouldShowApkDownload:!0,link:i.link,version:i.version,scanText:i.scanText}:{shouldShowApkDownload:!1,link:"",version:""}},It=()=>{var e,t;const i=(0,s.wW)(),o=null!==(t=null===(e=null==i?void 0:i.parameters.seo_pc_traffic)||void 0===e?void 0:e.vid)&&void 0!==t?t:"v0",{isSearchEngineBot:n=!1}=(0,P.L$)((0,L.U)((()=>["isSearchEngineBot"]),[]));return{useInfoCard:["v1","v3"].includes(o)&&n,useHtmlTag:["v2","v3"].includes(o),useOnlineVersion:"v0"===o}},kt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"fyp_on_detail"))&&void 0!==e?e:"v0";return{fypOnDetail:"v1"===i||"v2"===i,endCardCloseShowNext:"v2"===i}},Pt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"grid_to_fyp"))&&void 0!==e?e:"v0";return{isInGridToFypExperiment:"v0"!==i,gridToFypVVCount:{v0:-1,v1:1,v2:2,v3:3,v4:5}[i]||-1}},jt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{inWebappFypCacheExperiment:"v1"===(null!==(e=(0,j.qt)(t,"webapp_fyp_cache"))&&void 0!==e?e:"v0")}},Mt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{hasNewShareMenu:"v0"!==(null!==(e=(0,j.qt)(t,"revamp_share_menu"))&&void 0!==e?e:"v0")}},Ct=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return{isInAppStyleShareExperiment:"v0"!==(null!==(e=(0,j.qt)(t,"app_style_share"))&&void 0!==e?e:"v0")}},Et=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v0"!==(null!==(e=(0,j.qt)(t,"remove_disclaimer"))&&void 0!==e?e:"v0")},Vt=()=>{var e;const t=null!==(e=(0,j.d)("webapp_inapp_notice"))&&void 0!==e?e:"v0";return{isInAppNotificationEnabled:"v0"!==t,placement:"v1"===t||"v2"===t?"topEnd":"bottomEnd",layoutType:"v1"===t||"v3"===t?"withoutHeader":"withHeader"}},xt=()=>{const{pathname:e,search:t}=(0,a.useLocation)();return(0,f.useMemo)((()=>{const i=Vt();return(0,h.Pz)(e,t)||(i.isInAppNotificationEnabled=!1),i}),[e,t])},Ft=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));if("v0"===(null!==(e=(0,j.qt)(t,"enable_language_expansion"))&&void 0!==e?e:"v0"))return!1;if("1"===(0,A._S)(O.Tz,"0"))return!1;(0,A.AP)(O.Tz,"1");const{pathname:i,query:o}=(0,v.xw)(),n=i.split("/")[1];if(n&&(0,d.x_)(n)&&l.d4.includes((0,d.Z0)(n)))return!1;const{lang:s,langCountry:a,language:r}=o,c=[a,s,r];for(const e of c)if(e&&(0,d.x_)(e)&&l.d4.includes((0,d.Z0)(e)))return!1;return!0},Wt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"nav_phase_3"))&&void 0!==e?e:"v0",o="v0"!==i,n="v1"===(0,j.qt)(t,"enable_dm_side_nav"),s="v1"===(0,j.qt)(t,"enable_setting_side_nav"),r=[c.OZ.feedback,c.OZ.feedbackReport,c.OZ.feedbackHistory,c.OZ.upload,u.vI.kycSubmission,u.vI.kyc,u.vI.kycLoading,u.vI.kycPoa,p.tH.loginHome,p.tH.signupHome,c.OZ.download,...c.OZ.downloadWithLang,c.OZ.downloadVideo,...c.OZ.downloadVideoWithLang,...n?[]:[c.OZ.messages],...s?[]:[c.OZ.setting,c.OZ.settingBlockList]],{pathname:d}=(0,a.useLocation)();return{vid:i,isInNavPhase3:o,showFullSideNav:!(0,a.matchPath)(d,{path:r,exact:!0})&&"v0"!==i}},Bt=()=>{var e,t,i;const{abTestVersion:o}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),n=null!==(e=(0,j.qt)(o,"feed_change_optimize_image"))&&void 0!==e?e:"v0",s=null!==(t=(0,j.qt)(o,"fyp_redesign"))&&void 0!==t?t:"v0",a=null!==(i=(0,j.qt)(o,"feed_change_optimize_ff"))&&void 0!==i?i:"v0",{isInProductHoldout:r}=ot();return{enableFeedChangeImageOptimize:"v1"===n,enableFeedChangeFirstFrameOptimize:"v1"===a&&!r&&"v1"===s}},$t=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"enable_dm_side_nav"))&&void 0!==e?e:"v0",o=(0,I.Ig)();return"v0"!==i&&!o},Ut=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v0"!==(null!==(e=(0,j.qt)(t,"global_web_footer"))&&void 0!==e?e:"v0")},Rt=()=>{var e,t;const{abTestVersion:i}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),{showLoading:o}=null!==(e=null==i?void 0:i.parameters.kep_click_opt_phase1)&&void 0!==e?e:{vid:"v0"},{waitTime:n}=null!==(t=null==i?void 0:i.parameters.kep_click_opt_phase2)&&void 0!==t?t:{vid:"v0"};return{showLoading:o,waitTime:n}},qt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,j.qt)(t,"guest_mode_interest"))&&void 0!==e?e:"v0";return{showGuestModeInterestSelector:"v0"!==i,showContinueButton:"v2"!==i}},Dt=()=>{const{abTestVersion:e}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),t=(0,m.S)(e,"dual_user");let i;try{i=b.A.get("last_login_method")}catch(e){console.error("Failed to get last_login_method cookie:",e),i=void 0}const o="QRcode"===i;return{showLoginOptionSlider:o&&"v0"!==t,showLoginOptionButton:!1,showPopupWhenInitiallyLand:o&&("v2"===t||"v3"===t),isForcedLogin:o&&"v3"===t,isInRedesignLoginPopupControl:"v0"===t,isInRedesignLoginPopupTreatment:o&&void 0!==t&&"v0"!==t}},Nt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),{isAndroid:i}=(0,P.L$)((0,L.U)((()=>["isAndroid"]),[])),o=null!==(e=(0,j.qt)(t,"mobile_android_jump_optimization"))&&void 0!==e?e:"v0";return i?{experimentalUseAppLink:"v0"!==o,experimentalUseBetterAppLink:"v2"===o}:{}},Zt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v0"!==(null!==(e=(0,j.qt)(t,"video_auto_play_optimize"))&&void 0!==e?e:"v0")},Gt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v2"===(null!==(e=(0,j.qt)(t,"web_dm_group_chat"))&&void 0!==e?e:"v1")},Kt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[])),{isAndroid:i=!1}=null!==(e=(0,L.U)((()=>["isMobile","isAndroid"]),[]))&&void 0!==e?e:{},o=null==t?void 0:t.parameters.download_page_apk;return o?Object.assign(Object.assign({},o),{apps:o.apps.filter((e=>i?"android"===e.os||"both"===e.os:"ios"===e.os||"both"===e.os))}):o},Ht=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"pns_communication_service_sdk"))&&void 0!==e?e:"v0")},zt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"feature_access_control_v2"))&&void 0!==e?e:"v0")},Qt=()=>{var e;const t=null!==(e=(0,j.d)("side_nav_preload_cache"))&&void 0!==e?e:"v0";return{enableSideNavPreloadAndCache:"v4"===t,enableFYPSideNavPreloadAndCache:"v1"===t||"v2"===t||"v3"===t,cacheRange:"v1"===t?1:"v2"===t?2:0,cacheAfter:"v3"===t}},Jt=()=>(0,f.useMemo)((()=>{var e;const t=null!==(e=(0,j.d)("side_nav_cache"))&&void 0!==e?e:"v0";return{enableFYPCache:"v0"!==t&&"v5"!==t,enableFYPPreload:"v1"===t||"v3"===t||"v5"===t,cacheRange:"v1"===t||"v2"===t?2:0,cacheAfter:"v3"===t||"v4"===t}}),[]),Yt=()=>{var e;const{abTestVersion:t}=(0,P.L$)((0,T.W)((()=>["abTestVersion"]),[]));return"v1"===(null!==(e=(0,j.qt)(t,"enable_creator_comments"))&&void 0!==e?e:"v0")},Xt=()=>(0,f.useMemo)((()=>{var e;return{isRefactorGroup:"v0"!==(null!==(e=(0,j.d)("page_init_refactor"))&&void 0!==e?e:"v0")}}),[]),ei=()=>(0,f.useMemo)((()=>{var e;return{withMultiInstance:"v0"!==(null!==(e=(0,j.d)("browser_mode_multi"))&&void 0!==e?e:"v0")}}),[]),ti=()=>{var e;const t=null!==(e=(0,j.d)("tiktok_stories"))&&void 0!==e?e:"v0",i="v0"!==t;return{isInTiktokStoriesExperiment:i,isTiktokStoriesDebug:"v2"===t,shouldShowClientNotification:!("1"===(0,A._S)(O.J3,"0"))&&i,shouldStoryDetailRedirect:!1}}},45297:(e,t,i)=>{i.d(t,{Ah:()=>B,BP:()=>w,DK:()=>r,F3:()=>u,HF:()=>x,Iw:()=>f,J3:()=>h,Kt:()=>s,LA:()=>I,Ly:()=>P,M2:()=>O,Nd:()=>U,Nj:()=>T,O_:()=>A,S0:()=>g,Tz:()=>m,Uw:()=>j,VD:()=>C,Z3:()=>d,_:()=>v,dj:()=>N,er:()=>W,fm:()=>c,gM:()=>_,iJ:()=>y,i_:()=>E,n9:()=>F,rd:()=>k,se:()=>D,sj:()=>p,tS:()=>V,v1:()=>n,vt:()=>a,vu:()=>M,xE:()=>S,xl:()=>b,z$:()=>L,z3:()=>l});var o=i(35248);const n="webapp-pwa-expanded",s="webapp-live-nav-click",a="webapp_showed_profile_tip",r="search_login",d="search_history_list",l="webapp_showed_explore_new_label",c="showed_desktop_app_download",u="time_of_last_prediction",p="timeOfLastPopup",v="pc_app_auto_tip",_="suggest_account_bind_last_show",g="last_watch_live_on_pc",m="new_language_notice",h="story_notice",A="webapp_launch_mode",y="webapp_tiktok_open",b="webapp_tiktok_privious",f="webapp_open_edit_profile_modal_from",w="popup_profile_toast",T="watch_live_on_pc",L="Sorry, something wrong with the server, please try again.",S=1988,O=12,I=3e4,k=9,P=9,j=9,M=30,C=30,E="tiktok_webapp_feed_mode",V="tiktok_webapp_theme",x="tiktok_webapp_theme_manual",F="tiktok_webapp_theme_source",W="delay_guest_mode_vid",B={secure:!0,expires:300,domain:"www.tiktok.com"};var $;!function(e){e.DarkTheme="dark",e.LightTheme="light"}($||($={}));const U=o.$m.concat(["CH","US","GB"]),R="https://sf16-website-login.neutral.ttwstatic.com/obj/tiktok_web_login_static/",q="https://lf16-tiktok-web.tiktokcdn-us.com/obj/tiktok-web-tx/",D={ROW:{remScript:`${R}tiktok/static/nginx/rem-script.js`,slardarWeb:`${R}slardar/sdk-pre/browser.web.pre.js`,serviceWorker:`${R}tiktok/static/nginx/service-worker.js`},TTP:{remScript:`${q}tiktok/static/nginx/rem-script.js`,slardarWeb:"https://lf16-cdn-tos.tiktokcdn-us.com/obj/static-tx/tiktok-infra/csp/sdk-pre/slardar.web.pre.js",serviceWorker:`${q}tiktok/static/nginx/service-worker.js`}},N="swiper-no-swiping"},48211:(e,t,i)=>{i.d(t,{Gu:()=>o,yH:()=>n});const o="tiktok_webapp",n="tiktok_webapp_login"},47888:(e,t,i)=>{i.d(t,{Ao:()=>d,Pv:()=>r,bA:()=>c,dG:()=>l});var o=i(94999),n=i(16891),s=i(11654);const a=o.l.getInstance(s.V$);function r(e,t){n.f.event("feed_top_cache",{valid:e}),a.context({use_data_prefetched:e}),a.emitEvent("feed_top_cache",{count:1},{status:String(e),pageName:t})}function d(e,t){n.f.event("feed_top_cache_invalid",{check_count:e,invalid_count:t,allInvalid:t>=e?1:0}),a.emitEvent("feed_top_cache_invalid",{count:1},{checkCount:String(e),invalidCount:String(t),allInvalid:t>=e?"1":"0"})}function l(e){n.f.event("feed_fetch_error",{error_code:e})}function c(e){a.emitEvent("feed_cache_fetch",{count:1},{statusCode:String(e)})}},44349:(e,t,i)=>{i.d(t,{n2:()=>o});const o="perf_feed_cache"},87715:(e,t,i)=>{i.d(t,{Mc:()=>d,_1:()=>l});var o,n=i(88874),s=i(57431),a=i(71281);!function(e){e[e.CacheValid=0]="CacheValid",e[e.CacheExpired=1]="CacheExpired",e[e.NoCache=2]="NoCache",e[e.UserChange=3]="UserChange",e[e.CacheUpdateSuccess=4]="CacheUpdateSuccess",e[e.NoCacheWithUpdatedPush=8]="NoCacheWithUpdatedPush"}(o||(o={}));const r="webapp.updated-items";function d({itemList:e,cacheUid:t,uid:i,cacheWid:o,wid:d}){var l,c;let u=(0,n.YI)(r);const{abTestVersion:p}=(0,s.x)(),v=null!==(l=(0,a.V7)(p,"use_container_exp"))&&void 0!==l?l:"v0",_="v1"===v||"v3"===v;if(_&&(u=null!==(c=null==u?void 0:u.filter((e=>!e.imagePost)))&&void 0!==c?c:[]),!e||0===e.length)return u?{status:8,validItemList:u}:{status:2,validItemList:[]};if(!function({cacheUid:e,cacheWid:t,wid:i,uid:o}){return t===i&&(!e||e===o)}({cacheUid:t,cacheWid:o,wid:d,uid:i}))return{status:3,validItemList:[]};const g=e.filter((e=>{var t;const i=null===(t=e.video)||void 0===t?void 0:t.cover,o=/x-expires=(\d+)/.exec(i),n=o&&Date.now()<1e3*(Number(o[1])-60),s=_&&e.imagePost;return n&&!s}));return 0===g.length?u?{status:4,validItemList:u}:{status:1,validItemList:[]}:{status:0,validItemList:g}}function l(e){if(0===e.length)return 0;const t=e.map((e=>function(e){var t;const i=null===(t=e.video)||void 0===t?void 0:t.cover,o=/x-expires=(\d+)/.exec(i);return o?1e3*Number(o[1]):0}(e)));return Math.min(...t)}},20157:(e,t,i)=>{i.d(t,{g9:()=>c,li:()=>l});var o=i(57432),n=i.n(o),s=i(40099),a=i(23124),r=i(58305);const d=(0,a.$)("ModalContext@tiktok/fe-shared")({counterRef:{current:0},scrollWidthRef:{current:0},subscribeRef:{current:[]},setCounter:n(),setScrollWidth:n(),subscribeModalChange:()=>n()});function l(){const e=(0,s.useRef)(0),t=(0,s.useRef)(0),i=(0,s.useRef)([]),o=(0,s.useCallback)((t=>{e.current=t}),[]),n=(0,s.useCallback)((e=>{t.current=e}),[]),a=(0,s.useCallback)((e=>(i.current.push(e),()=>{const t=i.current.indexOf(e);i.current.splice(t)})),[]),r=(0,s.useMemo)((()=>({counterRef:e,subscribeRef:i,scrollWidthRef:t,setCounter:o,setScrollWidth:n,subscribeModalChange:a})),[a,o,n]);return{GlobalModalProvider:d.Provider,value:r}}function c(){const{counterRef:e,setCounter:t,setScrollWidth:i,subscribeRef:o,scrollWidthRef:n,subscribeModalChange:a}=(0,s.useContext)(d),l=(0,s.useCallback)((e=>{o.current.forEach((t=>{t({hasModal:e,scrollWidth:n.current})}))}),[n,o]);return{showModal:(0,s.useCallback)(((o,n)=>{if(!(0,r.Lm)()&&!o||n)return;const{current:s}=e;if(t(s+1),0===s){const e=(0,r.aP)();i(e),document.body.style.paddingRight=`${e}px`,document.body.className+=" hidden",l(!0)}}),[e,l,t,i]),hideModal:(0,s.useCallback)((()=>{const{current:o}=e,n=Math.max(0,o-1);t(n),0===n&&(i(0),document.body.className=document.body.className.replace(/\s?hidden/g,""),document.body.style.paddingRight="0px",l(!1))}),[e,l,t,i]),subscribeModalChange:a}}},45212:(e,t,i)=>{i.d(t,{id:()=>r,qo:()=>a});var o=i(57431),n=i(43387),s=i(92651);const a=()=>{var e,t,i,a;const{abTestVersion:r}=(0,o.x)(),d=null!==(i=null===(t=null===(e=null==r?void 0:r.parameters)||void 0===e?void 0:e.ff_avg_duration_portrait)||void 0===t?void 0:t.vid)&&void 0!==i?i:{vid:"v0"},l="v0"!==(null!==(a=null==d?void 0:d.vid)&&void 0!==a?a:"v0"),c="undefined"!=typeof navigator?null===navigator||void 0===navigator?void 0:navigator.hardwareConcurrency:4,u=(0,n.BX)((e=>{var t;return(null===(t=e.ff_duration_avg)||void 0===t?void 0:t.target)===s.L.Low}));return{isLowEndDevice:l&&(u||c<4)}},r=()=>{var e,t,i,n,s;const{abTestVersion:a}=(0,o.x)(),r=null!==(i=null===(t=null===(e=null==a?void 0:a.parameters)||void 0===e?void 0:e.vv_avg_per_day_portrait)||void 0===t?void 0:t.vid)&&void 0!==i?i:{vid:"v0"},d=null===(n=null==a?void 0:a.parameters.change_list_length_new)||void 0===n?void 0:n.vid;return{enableVVAvgPerDayStrategy:"v0"!==(null!==(s=null==r?void 0:r.vid)&&void 0!==s?s:"v0"),defaultRecommendFetchCount:Number(d)}}},4712:(e,t,i)=>{i.d(t,{A5:()=>p,M2:()=>u,Zy:()=>c,zW:()=>l});var o=i(41271),n=i(52333),s=i(97071),a=i(8046),r=i(29909),d=i(32125);const l=e=>{var t;if(!e)return;const i=null!==(t=e.log_extra)&&void 0!==t?t:"";try{const e=JSON.parse(i);return{charge_type:e.charge_type,req_id:e.req_id,system_origin:e.system_origin}}catch(e){return}},c=({adInfo:e,refer:t,tag:i})=>{if(!e.web_url)return;const{web_url:o}=e,n=(0,s.n5)({ad_info:e,play_mode:"one_column"});window.open(o,"_blank"),a.pg.handleRealtimeClick(Object.assign(Object.assign({},n),{refer:t,tag:i}))},u=(e,t)=>{var i,s;const a=(0,r.Lu)((e=>null==e?void 0:e.list),d.bN),l=(0,o.P)(n.k,{selector:e=>e,dependencies:[e,t]});if(!(null===(i=l[e])||void 0===i?void 0:i.ad_info)||!a||t>=a.length)return 0;for(let e=t-1;e>=0;e--)if(null===(s=l[a[e]])||void 0===s?void 0:s.ad_info)return t-e;return 0},p=e=>{var t,i;const s=(0,r.Lu)((e=>null==e?void 0:e.list),d.bN),a=(0,o.P)(n.k,{selector:e=>e,dependencies:[e]});if(!(null===(t=a[e])||void 0===t?void 0:t.ad_info)||!s)return 0;for(let e=0;e<=s.length;e++)if(null===(i=a[s[e]])||void 0===i?void 0:i.ad_info)return e+1;return 0}},34012:(e,t,i)=>{i.d(t,{Ig:()=>d,XJ:()=>l,_Y:()=>c});var o=i(47172),n=i(82715),s=i(7089),a=i(32125),r=i(5441);const d=()=>{const{search:e}=(0,o.useLocation)();return"business"===new URLSearchParams(e).get("scene")},l=()=>{const{search:e}=(0,o.useLocation)();return"true"===new URLSearchParams(e).get("allow_label")},c=e=>{const t=(0,s.VR)((e=>e.businessPermission),a.bN),{isElectronApp:i}=(0,r.B)();return{path:t.message?`/business-suite/messages?from=homepage&lang=${e}`:`${n.OZ.messages}?lang=${e}`,target:i&&t.message?"_blank":void 0}}},61730:(e,t,i)=>{i.d(t,{P:()=>A});var o=i(58632),n=i(40099),s=i(47172),a=i(49057),r=i(60484),d=i(71281),l=i(96689),c=i(34871),u=i(58305),p=i(95358),v=i(45297),_=i(26956),g=i(92264),m=i(33063),h=i(16680);function A(e={},t){const i=(0,h.b1)();if((0,n.useEffect)((()=>{t&&i.setCheckPredictionLogin({showLoginOnLoad:!1})}),[]),t)return{loginPredictionHandler:()=>{}};const A=(0,r.L$)((0,a.W)((()=>["user","wid","abTestVersion","webIdCreatedTime"]),[])),{user:y,abTestVersion:b,webIdCreatedTime:f}=A,w=(0,d.qt)(b,"webapp_login_prediction_full"),T=(0,d.qt)(b,"webapp_login_prediction_reverse"),L=(0,d.qt)(b,"webapp_login_causal_inference_validation"),{pathname:S}=(0,s.useLocation)(),O=(0,c.mv)(f),I=w||T,k=!!L&&"v1"!==L,{getPriorityPopup:P}=(0,m._y)(),{popupPriority:j}=(0,m.lz)((e=>({popupPriority:e.priority,isReady:e.isReadyList[3]}))),{handlePopoverInitial:M,handlePopoverEnd:C}=(0,n.useMemo)((()=>P(3)),[P]),E=()=>{var t;null===(t=e.closeCallback)||void 0===t||t.call(e),C()},V=(0,l.G)({modalConfig:Object.assign(Object.assign({closeable:!1,isGuestMode:!1,query:{enter_method:"model_based"}},e),{closeCallback:E})}),x=(0,l.G)({modalConfig:Object.assign(Object.assign({query:{enter_method:"guest_mode"},isGuestMode:!1,isGuestModeUI:!0},e),{closeCallback:E})}),F=(0,n.useCallback)(((e,t,n)=>(0,o.__awaiter)(this,void 0,void 0,(function*(){if(y)return;void 0!==t&&-1>=t&&(0,c.CE)(n)&&3===j&&((0,u.AP)(v.sj,Date.now().toString()),x(),M()),i.setCheckPredictionLogin({showLoginOnLoad:Boolean(!1)})}))),[y,I,k,L,j,i,V,M,x]);return{loginPredictionHandler:(0,n.useCallback)((()=>{const e=(0,u.Hd)(v.iJ),t=(0,c.Vw)(O,e),o=[{expId:"webapp_login_prediction_full",segmentId:t,versionId:w,propertyList:["prediction_threshold"]},{expId:"webapp_login_prediction_reverse",segmentId:t,versionId:T,propertyList:["prediction_threshold"]}],{prediction_threshold:n,guest_mode_threshold:s,popup_interval:a}=(0,_.J)(g.a,o);y||void 0===n&&void 0===s&&!L?i.setCheckPredictionLogin({showLoginOnLoad:!1}):!(0,c.oX)("app_load","","")||(0,p.mQ)(S)||(0,p.FJ)(S)||F(n,s,a)}),[O,w,T,y,L,S,F,i])}}},34871:(e,t,i)=>{i.d(t,{CE:()=>c,Vw:()=>l,mv:()=>d,oX:()=>r});var o=i(58305),n=i(45297),s=i(70322);const a=["homepage_hot","others_homepage"],r=(e,t="",i="")=>{const a=(0,o._S)(n.F3);return!a||Date.now()-parseInt(a,10)>=1e3?((0,o.AP)(n.F3,Date.now().toString()),!0):(s.w.handleInferenceDisqualify({enter_method:e,model_name:t,reason:"api_rate_control",page_name:i}),!1)},d=(e=0)=>{const t=(0,o._S)("old_user_ppe_test");return"1"!==t&&("0"===t||Date.now()/1e3-(e||0)<86400)},l=(e=!0,t="")=>e?"segment_1":(a.includes(t),"segment_default"),c=(e=6e4)=>{const t=(0,o._S)(n.sj);return!t||Date.now()-parseInt(t,10)>=e}},92264:(e,t,i)=>{i.d(t,{a:()=>o});const o={online:{segment_default:{v1:[{name:"popup_interval",value:432e5,priority:0}]}},webapp_mobile_web2app_cta_guide:{segment_default:{v1:[{name:"prediction_threshold",value:.001,priority:1}],v2:[{name:"prediction_threshold",value:.009,priority:1}],v3:[{name:"prediction_threshold",value:.03,priority:1}],v4:[{name:"prediction_threshold",value:.07,priority:1}]}},webapp_login_prediction:{segment_default:{v2:[{name:"prediction_threshold",value:.602572,priority:1},{name:"popup_interval",value:-1,priority:1}],v3:[{name:"prediction_threshold",value:.261145,priority:1},{name:"popup_interval",value:-1,priority:1}],v4:[{name:"prediction_threshold",value:.114536,priority:1},{name:"popup_interval",value:-1,priority:1}],v5:[{name:"prediction_threshold",value:.067758,priority:1},{name:"popup_interval",value:-1,priority:1}],v6:[{name:"prediction_threshold",value:.031474,priority:1},{name:"popup_interval",value:-1,priority:1}],v7:[{name:"prediction_threshold",value:.018922,priority:1},{name:"popup_interval",value:-1,priority:1}],v8:[{name:"prediction_threshold",value:.012345,priority:1},{name:"popup_interval",value:-1,priority:1}],v9:[{name:"prediction_threshold",value:.008136,priority:1},{name:"popup_interval",value:-1,priority:1}]}},webapp_causal_inference_periodic_popup_validation:{segment_default:{v1:[{name:"popup_interval",value:432e5,priority:1}],v2:[{name:"popup_interval",value:36e5,priority:1}],v3:[{name:"popup_interval",value:36e5,priority:1}],v4:[{name:"popup_interval",value:36e5,priority:1}],v5:[{name:"popup_interval",value:432e5,priority:1}],v6:[{name:"popup_interval",value:432e5,priority:1}],v7:[{name:"popup_interval",value:432e5,priority:1}]}},webapp_login_prediction_full:{segment_1:{v1:[{name:"prediction_threshold",value:.012345,priority:1},{name:"popup_interval",value:-1,priority:1}],v2:[{name:"prediction_threshold",value:.012345,priority:1},{name:"popup_interval",value:-1,priority:1}]},segment_2:{v1:[{name:"prediction_threshold",value:.114536,priority:1},{name:"popup_interval",value:-1,priority:1}],v2:[{name:"prediction_threshold",value:.114536,priority:1},{name:"popup_interval",value:-1,priority:1}]}},webapp_login_prediction_reverse:{segment_1:{v1:[{name:"prediction_threshold",value:.012345,priority:1},{name:"popup_interval",value:-1,priority:1}]},segment_2:{v1:[{name:"prediction_threshold",value:.114536,priority:1},{name:"popup_interval",value:-1,priority:1}]}},webapp_guest_mode:{segment_default:{v2:[{name:"cta_style",value:"default",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!1,priority:0}],v3:[{name:"cta_style",value:"default",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!0,priority:0}],v4:[{name:"cta_style",value:"default",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!1}],v5:[{name:"cta_style",value:"default",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!0}],v6:[{name:"cta_style",value:"line",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!1,priority:0}],v7:[{name:"cta_style",value:"line",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!0,priority:0}],v8:[{name:"cta_style",value:"line",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!1}],v9:[{name:"cta_style",value:"line",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!0}],v10:[{name:"cta_style",value:"primary",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!1,priority:0}],v11:[{name:"cta_style",value:"primary",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!0,priority:0}],v12:[{name:"cta_style",value:"primary",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!1}],v13:[{name:"cta_style",value:"primary",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!0}],v14:[{name:"cta_style",value:"text",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!1,priority:0}],v15:[{name:"cta_style",value:"text",priority:0},{name:"login_text",value:"pcWeb_guestLogin_without",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_withoutSignup",priority:0},{name:"close_icon",value:!0,priority:0}],v16:[{name:"cta_style",value:"text",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!1}],v17:[{name:"cta_style",value:"text",priority:0},{name:"login_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"signup_text",value:"pcWeb_guestLogin_guest",priority:0},{name:"close_icon",value:!0}]}},mobile_predictive_data:{segment_default:{v0:[{name:"vv_count",value:-1,priority:0}],v1:[{name:"vv_count",value:3,priority:0}],v2:[{name:"vv_count",value:4,priority:0}],v3:[{name:"vv_count",value:5,priority:0}],v4:[{name:"vv_count",value:6,priority:0}],v5:[{name:"vv_count",value:7,priority:0}],v6:[{name:"vv_count",value:8,priority:0}],v7:[{name:"vv_count",value:9,priority:0}],v8:[{name:"vv_count",value:10,priority:0}],v9:[{name:"vv_count",value:11,priority:0}],v10:[{name:"vv_count",value:12,priority:0}],v11:[{name:"vv_count",value:13,priority:0}],v12:[{name:"vv_count",value:14,priority:0}],v13:[{name:"vv_count",value:15,priority:0}],v14:[{name:"vv_count",value:16,priority:0}],v15:[{name:"vv_count",value:17,priority:0}],v16:[{name:"vv_count",value:18,priority:0}],v17:[{name:"vv_count",value:19,priority:0}],v18:[{name:"vv_count",value:20,priority:0}],v19:[{name:"vv_count",value:21,priority:0}],v20:[{name:"vv_count",value:22,priority:0}],v21:[{name:"vv_count",value:23,priority:0}],v22:[{name:"vv_count",value:24,priority:0}],v23:[{name:"vv_count",value:25,priority:0}],v24:[{name:"vv_count",value:26,priority:0}],v25:[{name:"vv_count",value:27,priority:0}],v26:[{name:"vv_count",value:28,priority:0}],v27:[{name:"vv_count",value:29,priority:0}],v28:[{name:"vv_count",value:30,priority:0}],v29:[{name:"vv_count",value:31,priority:0}]}}}},26956:(e,t,i)=>{function o(e,t){const i={},o=function(e){const t=e.reduce(((e,t)=>{const{expId:i,segmentId:o,versionId:n,propertyList:s}=t;return i&&o&&n?(s.forEach((t=>{const s={expId:i,segmentId:o,versionId:n,propertyName:t};e[t]=e[t]||[],e[t].push(s)})),e):e}),{});return t}(t);for(const[t,s]of Object.entries(o)){const o=n(e,s);i[t]=o}return i}function n(e,t){const i=t.map((t=>function(e,{expId:t,segmentId:i,versionId:o,propertyName:n}){const s=e[t];if(!s)return void console.error(`Error. Experiment: ${t} not found!`);const a=s[i];if(!a)return;if(!o)return;const r=a[o];return r?r.find((e=>e.name===n)):void 0}(e,t))).filter((e=>void 0!==e));if(0!==i.length)return i.reduce(((e,t)=>t.priority>e.priority?t:e)).value}i.d(t,{J:()=>o})},23721:(e,t,i)=>{i.d(t,{HZ:()=>d,dg:()=>a,ug:()=>s}),i(24643);var o=i(23124),n=(i(44471),i(88062));(0,o.$)("SlardarControlContext@tiktok/fe-shared")(!1);const s=(0,o.$)("InlineSlardarConfigContext@tiktok/fe-shared")({enable:!0}),a={plugins:{ajax:{ignoreUrls:[".byteoversea.com",/mcs.*\.tiktok[vw]?\.(com|us|eu)/,".tiktokcdn.com",".tiktokcdn-us.com","mon.tiktokv.(com|us|eu)","ttwid/check","passport/token/beat/web",/.*-webapp-prime\.(.*\.)?tiktok\.com/]},fetch:{ignoreUrls:[".tiktokcdn.com",".tiktokcdn-us.com","mon.tiktokv.(com|us|eu)","policy/notice","feedback/v1/newest_reply","ba/business/suite/permission/list",/.*-webapp-prime\.(.*\.)?tiktok\.com/]},jsError:{ignoreErrors:["Blocked a frame with origin","__msg_type","vid_mate_check is not defined","ResizeObserver loop limit exceeded",'Video playback error: {"errorCode":',"Object Not Found Matching Id","The play method is not allowed by the user agent","The play() request was interrupted","Failed to load because no supported source was found","The request is not allowed by the user agent or the platform in the current context","Fetch is aborted","The operation was aborted"]},resource:{slowSessionThreshold:1e5},fmp:!1,tti:!1,pageview:{sendInit:!0,routeMode:"manual"}},sample:{sample_rate:1,sample_granularity:"session",include_users:[],rules:{resource:{enable:!0,sample_rate:.01,conditional_sample_rules:[]},resource_error:{enable:!0,sample_rate:.05,conditional_sample_rules:[]},performance_longtask:{enable:!0,sample_rate:.001,conditional_sample_rules:[]}}},env:"production",release:"1.0.0.123",slardarClient:"SlardarClient",manual:1,sdkUrl:n.Qn.row,pluginPathPrefix:n.tz.row};var r;!function(e){e.P0="fatal",e.P1="error",e.P2="warning",e.P3="info",e.P4="debug",e.P5="critical"}(r||(r={}));const d=["lcp","fp","fid","ttfb","mpfid","fcp","actual_fmp"];var l;!function(e){e.TTAPPluginInfo="ttapplugin_info",e.TTAPPluginFirstScreenRequest="ttapplugin_first_screen_request",e.TTAPPluginEffectiveOpenPage="ttapplugin_effective_open_page",e.TTAPPluginCustomRequest="ttapplugin_custom_request",e.actualFMP="actual_fmp",e.LoginClickToNotifyDuration="login_click_to_notify_duration"}(l||(l={}))},72277:(e,t,i)=>{i.d(t,{s:()=>o});const o=["live_im_sdk_socket_link","live_www_host","live_room_container_upgrade","live_chat_refactor_phase1","fyp_live_card_open_direct","live_non_logged_in_time_restriction_pc","live_disable_header_skeleton","image_fetch_priority","user_bundle_opt","sharing_video_first","live_recharge_login_sdk","page_loading_tiny_changes","react_upgrade_experiment","kep_streaming","web_dm_icon_click_check","web_dm_quote_message","web_dm_list_load_optimize","web_dm_combo","user_ssg","organic_video_streaming","mobile_micro_frontends","live_react_v18","sharing_video_streaming","kep_cta_style","vanilla_js_kep"]},11654:(e,t,i)=>{i.d(t,{V$:()=>L,Yr:()=>S,ng:()=>O});var o=i(58632),n=i(80798),s=i(7672),a=i(14285),r=i(94999),d=i(3452),l=i.n(d),c=i(16891),u=i(48211),p=i(23721),v=i(89023),_=i(97086),g=i(91498),m=i(88062),h=i(14974),A=i.n(h),y=i(71784),b=i.n(y),f=i(72277);const w=({message:e,defaultResult:t}={})=>(i,o,n)=>{const s=n.value;return n.value=function(...n){try{const r=s.apply(this,n);return(a=r)&&a instanceof Promise||("object"==typeof a||"function"==typeof a)&&"function"==typeof a.then&&"function"==typeof a.catch?r.catch((n=>(console.error(`${i.constructor.name}.${o.toString()}${e?` ${e}`:""}: ${n}`),t))):r}catch(n){return console.error(`${i.constructor.name}.${o.toString()}${e?` ${e}`:""}: ${n}`),t}var a},n};var T=i(73580);(0,_.fU)()||v.O.setGlobalSlardarName("SlardarClient");let L=class{constructor(){this.cachePreBid="",this._isPvFirstlyReported=!1,this._config=null,this._extraInfo=null,this._hasStart=!1,this._slardar=v.O}hasStarted(){return this._hasStart}mountBeforeSendEvent(){this._slardar.on("beforeSend",(e=>{var t,i,o,n,s,a;try{if("performance"===e.ev_type&&("metrics"in e.payload?e.payload.metrics.forEach(this.collectSlardarMetricsToTea):this.collectSlardarMetricsToTea(e.payload,null===(t=e.common)||void 0===t?void 0:t.pid)),"performance_timing"===e.ev_type){const{responseEnd:t,responseStart:s,domContentLoadedEventEnd:a,fetchStart:r,navigationStart:d}=null!==(i=e.payload.timing)&&void 0!==i?i:{},l=null!==(n=null===(o=e.payload.common)||void 0===o?void 0:o.pid)&&void 0!==n?n:"unknown",u=a-r,p=t-s,v=s-d;c.f.event("slardar_perf_domready",{metric_duration:u&&u>0?u.toString():-1,pid:l}),c.f.event("slardar_perf_response",{metric_duration:p&&p>0?p.toString():-1,pid:l}),c.f.event("slardar_perf_ttfb",{metric_duration:v&&v>0?v.toString():-1,pid:l})}if("custom"===e.ev_type&&"video_play_end"===(null===(s=e.payload)||void 0===s?void 0:s.name)){const{idc:t}=null!==(a=e.common.context)&&void 0!==a?a:{};e.common.context=t?{idc:t}:{}}}catch(e){}return e}))}init(e,t=!1,i={},o){this._option=o,t?this.preserveConfig(e):this._slardar.init(Object.assign({ttap:Object.assign({},i)},e))}start(e=""){this._config&&e&&!this._hasStart&&(this.init(Object.assign(Object.assign({},this._config),{pid:e})),this._hasStart=!0,this._extraInfo&&this.config(this._extraInfo)),this._slardar.start()}config(e){"pid"in e&&!this._isPvFirstlyReported&&(this._isPvFirstlyReported=!0,this.context({isLandingPage:0})),this._slardar.config(e)}registerImageXPlugin(e,t=.01){return e?[l().imageReport({debug:!1,sample_rate:t})]:[]}toggleLoginSlardar(e){var t,i;(null===(t=this._option)||void 0===t?void 0:t.disableToggleLoginSlardar)||(e?((null===(i=this._slardar.config())||void 0===i?void 0:i.bid)&&(this.cachePreBid=this._slardar.config().bid),this.config({bid:u.yH})):this.config({bid:this.cachePreBid}))}context(e){Object.entries(e).forEach((([e,t])=>{this._slardar.context({[e]:t})}))}captureMessage(e="",t,i={},o){this._slardar.captureException("string"==typeof e?new Error(e):e,t?Object.assign(Object.assign({},i),{level:t}):i,o)}emitEvent(e,t,i){this._slardar.sendEvent({name:e,categories:i,metrics:t})}reportI18nLoadedFailed(e,t){this.emitEvent("I18nLoadFailed",{count:1},{staringName:e,lang:t})}sendLog(e,t,i){this._slardar.sendLog({content:e,level:t,extra:i})}sendPV(e){this._slardar.rawInstance()("sendPageview",e)}previousPid(){var e;return null===(e=this._slardar.config())||void 0===e?void 0:e.pid}sendCustomPerfMetric(e,t){const i=null!=t?t:performance.now();this._slardar.sendCustomPerfMetric({name:e,value:i,isCustom:!0})}preserveConfig(e){this._config=e}preserveExtraInfo(e){this._extraInfo=e}collectSlardarMetricsToTea(e,t){if(e.isSupport||e.isPolyfill){const i=e.name.toLowerCase();p.HZ.includes(i)&&c.f.event(`slardar_perf_${i}`,{metric_duration:e.value.toString(),pid:null!=t?t:"unknown",is_support:e.isSupport?"1":"0"})}}reportActualFMP(){return this._slardar.reportActualFMP()}reportRenderStart(){return this._slardar.reportRenderStart()}reportRenderEnd(){return this._slardar.reportRenderEnd()}reportFirstScreenRequest(e,t){this._slardar.reportFirstScreenRequest(e,t)}reportCustomRequest({name:e,startTime:t,endTime:i}){var o;const n=(null===(o=null===performance||void 0===performance?void 0:performance.timing)||void 0===o?void 0:o.navigationStart)||(null===performance||void 0===performance?void 0:performance.timeOrigin);this._slardar.reportCustomRequest(e,null!=t?t:n,i)}reportPageReady(){this._slardar.reportPageReady()}reportPageCrash({errorMsg:e}){this._slardar.reportPageCrash({errorMsg:e})}reportStabilityEvent(e){this._slardar.reportStabilityEvent(e)}reportStabilityStack(e){this._slardar.reportStabilityStack(e)}reportRouteRenderStart(){this._slardar.reportRouteRenderStart()}reportRouteRenderEnd(){this._slardar.reportRouteRenderEnd()}};L.start=(e,{bid:t,initLocation:i,appContext:o,bizContext:n,reportImage:s,slardarConfig:a={},ttapOption:r={},disableToggleLoginSlardar:d=!1,extractPid:l=e=>e,customContext:c,beforeStart:u,customMountBeforeSendEvent:v})=>{var h,y,w,T;const{abTestVersion:L,env:S,botType:O,user:I,wid:k,region:P}=null!=o?o:{},{isMobile:j,isTTP:M,domains:C,idc:E,config:V}=null!=n?n:{},x=!!s||"v2"===(null===(h=null==L?void 0:L.parameters.enable_slardar_image)||void 0===h?void 0:h.vid),F=e=>{const t=l(e);return"delay_start_until_manually_called"===t?"unknown":t};return e.context(Object.assign(Object.assign(Object.assign({region:null!=P?P:"",botType:null!=O?O:"",isMobile:Boolean(j).toString(),isDowngrade:(0,_.qk)().toString(),isLogin:Boolean(I).toString(),isPPE:"ppe"===(null==S?void 0:S.type),isLandingPage:1,isSSGPage:(0,_.$y)(),launchMode:(0,_.fU)()?"":(0,g.o7)()},b()(A()(null!==(y=null==L?void 0:L.parameters)&&void 0!==y?y:{},(e=>null==e?void 0:e.vid)),((e,t)=>f.s.includes(t)))),{uid:null!==(w=null==I?void 0:I.uid)&&void 0!==w?w:"",idc:null!=E?E:"unknown"}),c)),e.mountBeforeSendEvent(),null==v||v(e._slardar),e.init(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},p.dg),{bid:t,env:"boe"===(null==S?void 0:S.type)||"ppe"===(null==S?void 0:S.type)?"test":"production",domain:(null===(T=null==V?void 0:V.featureFlags)||void 0===T?void 0:T.slardar_sg_domain)&&"SG"===P?"mon-sg.tiktokv.com":null==C?void 0:C.slardar,useLocalConfig:"ppe"===(null==S?void 0:S.type)||"boe"===(null==S?void 0:S.type),integrations:[...e.registerImageXPlugin(x,s&&"boolean"!=typeof s?s.sample:void 0)]}),M?{sdkUrl:m.Qn.us,pluginPathPrefix:m.tz.us}:{}),{pid:F("string"==typeof i?i:i.pathname),userId:k}),a),!1,Object.assign({isSpa:!0},r),{disableToggleLoginSlardar:d}),"function"==typeof u?u().finally((()=>{e.start()})).catch((e=>{console.error("beforeStart failed",e)})):e.start(),{handleLocationChange:t=>{const i=F("string"==typeof t?t:t.pathname);e.context({isLandingPage:0}),e.sendPV(i)},slardar:e}},(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"mountBeforeSendEvent",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object,Object,Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"init",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[String]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"start",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"config",null),(0,o.__decorate)([w({defaultResult:[]}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Boolean,Object]),(0,o.__metadata)("design:returntype",Object)],L.prototype,"registerImageXPlugin",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Boolean]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"toggleLoginSlardar",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"context",null),(0,o.__decorate)([w({message:"capture exception error"}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String,Object,Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"captureMessage",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[String,Object,Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"emitEvent",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[String,String]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportI18nLoadedFailed",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[String,String,Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"sendLog",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[String]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"sendPV",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"previousPid",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[String,Number]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"sendCustomPerfMetric",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"preserveConfig",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"preserveExtraInfo",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"collectSlardarMetricsToTea",null),(0,o.__decorate)([w({defaultResult:0}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",Number)],L.prototype,"reportActualFMP",null),(0,o.__decorate)([w({defaultResult:0}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",Number)],L.prototype,"reportRenderStart",null),(0,o.__decorate)([w({defaultResult:0}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",Number)],L.prototype,"reportRenderEnd",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Number,Number]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportFirstScreenRequest",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportCustomRequest",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportPageReady",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportPageCrash",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportStabilityEvent",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportStabilityStack",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportRouteRenderStart",null),(0,o.__decorate)([w(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[]),(0,o.__metadata)("design:returntype",void 0)],L.prototype,"reportRouteRenderEnd",null),L=(0,o.__decorate)([(0,s._)()],L);const S=e=>{const t=`createIsolatedSlardarService_${e}@tiktok/fe-shared`,i=(0,n.U)(t,(()=>new a.n(e)));r.l.addProvider({provide:i,useClass:L});const d={provide:i,useExisting:i};let l,c=class extends L{constructor(){super(),this._slardar=v.O.create(e)}reportActualFMP(){return 0}reportFirstScreenRequest(){}reportRenderEnd(){return 0}reportRenderStart(){return 0}reportCustomRequest(){}reportRouteRenderEnd(){}reportRouteRenderStart(){}};return c=(0,o.__decorate)([(0,s._)(),(0,o.__metadata)("design:paramtypes",[])],c),{inject:(e=c)=>{r.l.addProvider({provide:i,useClass:e})},getInstance:()=>r.l.getInstance(d),useInstance:()=>(0,T.Nj)(d),isIsolated:()=>r.l.getInstance(d)instanceof c,start:e=>{var t;const i=r.l.getInstance(d);if(i instanceof c)return l?l.handleLocationChange(e.initLocation):void(l=L.start(i,Object.assign(Object.assign({},e),{slardarConfig:Object.assign(Object.assign({},e.slardarConfig),{plugins:Object.assign(Object.assign(Object.assign({},p.dg.plugins),{performance:!1}),null===(t=e.slardarConfig)||void 0===t?void 0:t.plugins)})})))},handleLocationChange:e=>{null==l||l.handleLocationChange(e)},INJECTION_TOKEN:i}},O=r.l.getInstance(L)},66909:(e,t,i)=>{i.d(t,{TJ:()=>p});var o=i(58632),n=i(49919),s=i(16891),a=i(23831),r=i(71111),d=i(31209);const l=e=>{const t={};for(const[i,o]of e)t[i]=o;return t},c=Object.assign({globalWid:"",canvasId:"",hasReportedOnLanding:!1},l(["fonts","domBlockers","fontPreferences","audio","screenFrame","osCpu","languages","colorDepth","deviceMemory","screenResolution","hardwareConcurrency","timezone","sessionStorage","localStorage","indexedDB","openDatabase","cpuClass","platform","plugins","canvas","touchSupport","vendor","vendorFlavors","cookiesEnabled","colorGamut","invertedColors","forcedColors","monochrome","contrast","reducedMotion","hdr","math","videoCard","pdfViewerEnabled","architecture","userAgent","webglUnmaskedVendor","webglUnmaskedRenderer","webglImageHash"].map((e=>[e,""])))),u=(0,r.atom)(c);u.debugLabel="globalWidAtom";const{useServiceDispatchers:p,useServiceState:v}=(0,d.i)(u,((e,t)=>({maybeGenerateAndReportGlobalWidInfo:i=>(0,o.__awaiter)(void 0,void 0,void 0,(function*(){var o,r;const{isLanding:d=!1,enterMethod:c,hashedIP:p="",region:v=""}=i;try{let i="",_="",g={};if(!e(u).globalWid){const e=yield(0,n.e)(p,v);i=null!==(o=null==e?void 0:e.gwid)&&void 0!==o?o:"",_=null!==(r=null==e?void 0:e.canvasId)&&void 0!==r?r:"",g=null!=e?e:{},i&&t(u,(e=>Object.assign(Object.assign(Object.assign({},e),{globalWid:i,canvasId:_}),g)))}return d&&e(u).hasReportedOnLanding||a.u.handleSendGlobalWid(Object.assign({global_wid:e(u).globalWid,canvas_id:e(u).canvasId,enter_method:c,page_name:s.f.commonParams.page_name},l(Object.entries(e(u)).filter((([e])=>!["globalWid","canvasId","hasReportedOnLanding"].includes(e)))))),e(u).globalWid}catch(e){return console.error("Error in maybeGenerateAndReportGlobalWidInfo:",e),null}})),setLandingPageETSentFlag:e=>{const{hasReportedOnLanding:i}=e;t(u,(e=>Object.assign(Object.assign({},e),{hasReportedOnLanding:i})))}})))},39896:(e,t,i)=>{i.d(t,{Du:()=>S,Gg:()=>I,LT:()=>O,ct:()=>L,tF:()=>w,ym:()=>T});var o=i(58632),n=i(73580),s=i(4474),a=i(40099),r=i(47172),d=i(88456),l=i(16891),c=i(68252),u=i(2584),p=i(15343),v=i(38739),_=i(97086),g=i(95358),m=i(49057),h=i(48615),A=i(99374),y=i(60484),b=i(33805),f=i(61730);function w(e,t){var i;const o=(0,y.L$)((0,m.W)((()=>["region","user","wid","abTestVersion","language","odinId"]),[])),n=(0,y.L$)((0,h.U)((()=>["domains","vgeo"]),[])),{abTestVersion:s,user:a}=o,r=(0,A.mx)(s,null!==(i=null==a?void 0:a.uid)&&void 0!==i?i:"");(0,d.W0)(Object.assign(Object.assign({},n),o),(()=>Object.assign(Object.assign({},e()),{is_downgrade:(0,_.qk)(),is_non_personalized:r?"1":"0"})),t)}function T(e,t){const{loginPredictionHandler:i}=(0,f.P)(e,t);(0,a.useEffect)((()=>{i()}),[i])}function L({eParams:e}){var t,i;const{botType:n,webIdCreatedTime:d}=null!==(t=(0,m.W)((()=>["botType","webIdCreatedTime"]),[]))&&void 0!==t?t:{},{isMobile:l}=null!==(i=(0,h.U)((()=>["isMobile"]),[]))&&void 0!==i?i:{},{search:c,pathname:p}=(0,r.useLocation)(),v=(0,s.parse)(c);return(0,a.useCallback)((()=>{const t=e||{},{is_from_webapp:i}=t,s=(0,o.__rest)(t,["is_from_webapp"]),a=v.sender_web_id?{sender_device:v.sender_device,sender_web_id:v.sender_web_id}:{},r=l||(0,g.tO)(p)||(c=`#${location.pathname}`,/^#\/@.*\/video\/\d+$/.test(c))||location.search.indexOf("item_id")>-1?Object.assign({is_from_webapp:i||["v1","v2","v3"].indexOf(v.is_from_webapp)>-1?v.is_from_webapp:"0"},a):{};var c;const _={browser_height:"undefined"!=typeof window?window.innerHeight:0,browser_width:"undefined"!=typeof window?window.innerWidth:0},m=Object.assign(Object.assign(Object.assign({bot_type:null!=n?n:"others",keyword:v.keyword,sub_keyword:v.sub_keyword,duration:performance.now(),webIdCreatedTime:d},s),r),_);u.O.handlePageView(m)}),[e,v.sender_web_id,v.sender_device,v.is_from_webapp,l,v.keyword,v.sub_keyword,p,n])}function S(e){const{pathname:t}=(0,r.useLocation)(),i=(0,n.Nj)(p.AU);(0,a.useEffect)((()=>{const e=(0,b.N2)(t);i.handleRouteChange(t),i.updateCurrentPage(e),i.setCurrentPageReport(!1),i.resetExist(),i.reportVideoAdditionStart({startTime:Date.now(),situation:"addition_first_load"})}),[i,e,t])}function O(){const e=(0,n.Nj)(v.Gs);(0,a.useEffect)((()=>{e.reset()}),[e])}function I(){const e=(0,y.L$)((0,m.W)((()=>["region","user","wid","abTestVersion","language"]),[])),t=(0,y.L$)((0,h.U)((()=>["domains","vgeo"]),[])),i=(0,a.useMemo)((()=>Object.assign(Object.assign({},e),t)),[e,t]),{user:o,region:n,wid:s,domains:r,vgeo:u}=i;return(0,a.useCallback)((e=>{var t,a;const p={page_name:e,enter_from:e,is_downgrade:(0,_.qk)()},v=(0,d.U3)(p),g=(0,d.fT)(i,p);l.f.config({initConfig:{channel_domain:r.tea,channel_type:null!==(t=r.teaChannelType)&&void 0!==t?t:"tcpy",channel:r.teaChannel,ab_channel_domain:r.libraWebSDK,id:1988},commonHeaderConfig:{region:n,user_id:null!==(a=null==o?void 0:o.uid)&&void 0!==a?a:"",user_is_login:Boolean(o),user_unique_id:s,device_id:s,user_type:12,"header.custom":g},commonEventParams:Object.assign(Object.assign({},v),{data_collection_enabled:(0,c.uh)(u,!!o)?1:0})})}),[i,r,n,o,u,s])}},27375:(e,t,i)=>{i.d(t,{$S:()=>p,BO:()=>r,Hw:()=>g,RS:()=>u,Zr:()=>_,i0:()=>d,lH:()=>s,qY:()=>v,sg:()=>c});const o=99,n="99+";function s(e,t=o,i=n){return e>t?i:String(e)}function a(e){var t,i;return null!==(i=null===(t=null==e?void 0:e.url_list)||void 0===t?void 0:t.find((e=>!/\.webp/.test(e))))&&void 0!==i?i:""}function r(e){var t;return void 0===e?"":e.url_list&&(null===(t=e.url_list)||void 0===t?void 0:t.length)>0?e.url_list[0]:""}const d={[-1]:-1,0:0,1:1,2:2,4:3};function l({is_block:e,is_blocked:t,follow_status:i}){if(null!=i)return e?4:t?5:d[i]}function c(e,t=!1){const{follower_count:i,following_count:o,aweme_count:n}=e;return{diggCount:0,followerCount:null!=i?i:0,followingCount:null!=o?o:0,heart:0,heartCount:0,videoCount:null!=n?n:0,needFix:t}}function u(e){const{avatar_medium:t,avatar_thumb:i,uid:o,short_id:n,unique_id:s,sec_uid:r,nickname:d,is_block:c,follow_status:u,signature:p,custom_verify:v,enterprise_verify_reason:_,follower_status:g}=e;return{avatarLarger:"",avatarMedium:a(t),avatarThumb:a(i),id:o,shortId:n,uniqueId:null!=s?s:"",secUid:null!=r?r:"",nickname:d,relation:l({is_block:c,is_blocked:void 0,follow_status:u}),signature:p,verified:Boolean(v||_),createTime:0,extraInfo:{followerStatus:g}}}function p(e){const{id_str:t,title:i,play_url:o,cover_medium:n,cover_large:s,cover_thumb:a,is_original:d,duration:l,author:c}=e;return{id:String(t),title:i,duration:l,keyToken:"",playUrl:r(o),coverMedium:r(n),coverLarge:r(s),coverThumb:r(a),original:null!=d&&d,authorName:c}}function v(e,t){if(!e)return!0;const{commentSetting:i,relation:o,id:n}=e;return 1===i&&2!==o&&t!==n}function _(e){return e.replace(/\n(\n)*( )*(\n)*\n/g,"\n")}function g(e,t){var i;const{duration:o,width:n,height:s,ratio:a,cover:d,play_addr:l,bit_rate:c}=e,u=null==c?void 0:c.map((e=>({GearName:e.gear_name,Bitrate:e.bit_rate,QualityType:e.quality_type,PlayAddr:{Uri:"",UrlList:[r(e.play_addr)]},CodecType:"adapt_h264"})));return{id:t,height:s,width:n,duration:null!=o?o:0,ratio:null!=a?a:"720p",cover:r(d),originCover:r(d),playAddr:r(l),bitrate:null===(i=null==c?void 0:c[0])||void 0===i?void 0:i.bit_rate,bitrateInfo:u,encodedType:"normal"}}},16469:(e,t,i)=>{i.d(t,{Bv:()=>d,LU:()=>p,MX:()=>l,PC:()=>c,_w:()=>s,bc:()=>n,lA:()=>r,lL:()=>u});var o=i(10646);const n=new o.w1("frequency-control-config","local"),s=new o.w1("flip-control-config","local");var a;!function(e){e.Manual="manual",e.BrowserMode="browser_mode"}(a||(a={}));const r=new o.w1("webapp-video-mute","local"),d=new o.w1("keyboard-shortcut-config","local"),l=new o.w1("webapp-comment-url","session"),c=new o.w1("search-entry-block-map-storage","local"),u=new o.w1("fyp-feed-cache","local"),p=new o.w1("search_history_map","local");new o.w1("multi-account-info","local")},33805:(e,t,i)=>{i.d(t,{AF:()=>h,Am:()=>y,N2:()=>g,Q2:()=>m,Sn:()=>b,m1:()=>A,oN:()=>p,rE:()=>w,sN:()=>f});var o=i(47172),n=i(9047),s=i(82715),a=i(8227),r=i(75792),d=i(95358),l=i(72688),c=i(85612);const u=1e3;function p(e){var t,i,a,r;return e.length>u?"":(0,d.tO)(e)?"homepage_hot":/^\/@(.*?)\/video\/(.*?)/.test(e)?"video_detail":/^\/@(.*?)/.test(e)?"others_homepage":/^\/music\//.test(e)?"single_song":/^\/effect\//.test(e)?"effect_detail":/^\/tag\//.test(e)?"challenge":/^\/following/.test(e)?"homepage_follow":/^\/explore/.test(e)?"explore_page":"expansion"===(null===(t=(0,n.uZ)(e))||void 0===t?void 0:t.name)?"discover_kw":/^\/channel\/.+/.test(e)?"channel":"discover"===(null===(i=(0,s.kv)(e))||void 0===i?void 0:i.name)?"discovery":/^\/profile/.test(e)?"personal_homepage":/^\/topics/.test(e)?`topic_${e.slice(1).split("/")[1]}`:/^\/inbox/.test(e)?"homepage_message":/^\/report/.test(e)?"report":/^\/ad-report/.test(e)?"report_ad":/^\/feedback\/report/.test(e)?"feedback_report":/^\/feedback\/history/.test(e)?"feedback_history":/^\/feedback/.test(e)?"feedback":(0,o.matchPath)(e,{path:s.OZ.searchHome,exact:!0})?"general_search":(0,o.matchPath)(e,{path:s.OZ.searchUser,exact:!0})?"search_user":(0,o.matchPath)(e,{path:s.OZ.searchVideo,exact:!0})?"search_video":/^\/playlist-music/.test(e)?"music_playlist":/^\/messages/.test(e)?"messages":/^\/setting/.test(e)?"setting":/^\/place/.test(e)?"place":/^\/@(.*?)\/collection\/(.*?)/.test(e)?"collection":/^\/@(.*?)\/playlist\/(.*?)/.test(e)?"reflow_video_playlist":/^\/download/.test(e)?"download":/^\/download-video/.test(e)?"download_video":"trendingDetail"===(null===(a=(0,n.uZ)(e))||void 0===a?void 0:a.name)||"trendingDetailWithinDiscover"===(null===(r=(0,n.uZ)(e))||void 0===r?void 0:r.name)?"discover_pro":""}function v(e){return e.length>u?"":/^\/@(.*?)\/live\/(.*?)/.test(e)?"live_detail":(0,o.matchPath)(e,{path:a.vI.liveGoLive,exact:!0})?"live_take":(0,d.U0)(e)?"live_discover":(0,d.j)(e)?"live_event":(0,d.RR)(e)?"live_event_aggregation":(0,o.matchPath)(e,{path:a.vI.liveRoomEmbed,exact:!0})?"live_embed_detail":(0,o.matchPath)(e,{path:a.vI.liveRoom,exact:!0})?"live_detail":""}function _(e){return(0,o.matchPath)(e,{path:r.tH.loginHome,exact:!1})||(0,o.matchPath)(e,{path:r.tH.oauth,exact:!1})||(0,o.matchPath)(e,{path:r.tH.oauthLine,exact:!1})?"login":(0,o.matchPath)(e,{path:r.tH.signupHome,exact:!1})?"signup":""}function g(e){for(const t of[p,v,_]){const i=t(e);if(i)return i}return"unknown"}function m(){return location.pathname.startsWith(s.OZ.musicPlaylist.split(":")[0])&&location.pathname.length<=u?`${location.origin}${location.pathname.replace(/%23|%3F|%2F/g,"")}${location.search}`:location.href}function h(){return location.pathname.startsWith(s.OZ.musicPlaylist.split(":")[0])&&location.pathname.length<=u?`${location.origin}${location.pathname.replace(/%23|%3F|%2F/g,"")}`:`${location.origin}${location.pathname}`}function A(e,t){return`https://www.tiktok.com${y(e,t)}`}function y(e,t,i){return`/place/${(0,l.zpT)(t)}-${e}${i?`?language=${i}`:""}`}function b(e,t){var i,o,n,s;return(0,c.Rj)(`https://www.tiktok.com${(0,l.G2o)({uniqueId:null!==(o=null===(i=null==e?void 0:e.owner)||void 0===i?void 0:i.display_id)&&void 0!==o?o:"",secUid:null!==(s=null===(n=null==e?void 0:e.owner)||void 0===n?void 0:n.sec_uid)&&void 0!==s?s:""})}`,null!=t?t:{})}function f(e,t){return`https://www.tiktok.com/tns-inapp/pages/ai-generated-content?hide_nav_bar=1${e?`&enter_from=${e}`:""}${t?`&lang=${t}`:""}`}function w(e,t){return`/effect/${encodeURIComponent(e.replace(/\s+/g,"-"))}-${t}`}},29546:(e,t,i)=>{i.d(t,{W:()=>g});var o=i(24643),n=i(73580),s=i(40099),a=i(84971),r=i(11654),d=i(62186),l=i(97397);const c=(0,d.default)("div",{target:"emuynwa0"})((({isFullScreen:e})=>e?{flex:"1 1 auto"}:null),{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",margin:"0 auto"},"label:DivErrorContainer;"),u=(0,d.default)("p",{target:"emuynwa1"})((({theme:{typography:e,fontWeights:t,fontFamilies:i,colors:o}})=>[e.H4,{fontFamily:i.TikTokDisplayFont,fontWeight:t.bold,color:o.TextPrimary,marginTop:"24px"}]),"label:PTitle;"),p=(0,d.default)("p",{target:"emuynwa2"})((({theme:{typography:e,fontWeights:t,fontFamilies:i,colors:o}})=>[e.P2,{fontFamily:i.TikTokFont,fontWeight:t.normal,color:o.TextSecondary,marginTop:"8px"}]),"label:PDesc;"),v=d.default.div` margin-top: 24px; `,_=(0,d.default)(l.y,{target:"emuynwa3"})({marginTop:"24px"},"label:StyledButton;"),g=function(e){const{iconElem:t,title:i,desc:d,buttonText:l,button:g,isFullScreen:m,style:h,brightness:A=1,e2eTitle:y,e2eDesc:b,e2eButton:f,onButtonShow:w,ignoreErrorReport:T=!1}=e,L=(0,n.Nj)(r.V$);return(0,s.useEffect)((()=>{(l||g)&&(null==w||w()),T||(L.emitEvent("handled_error_report",{},{}),a.T.handleRenderErrorEvent())}),[l,g,w,T,L]),(0,o.jsxs)(c,{isFullScreen:m,style:h,children:[t,i&&(0,o.jsx)(u,{"data-e2e":y,brightness:A,children:i}),d&&(0,o.jsx)(p,{"data-e2e":b,brightness:A,children:d}),g&&(0,o.jsx)(v,{"data-e2e":f,children:g}),!g&&Boolean(l)&&(0,o.jsx)(_,{type:"button",onClick:e.onButtonClick,buttonTheme:"default",size:"large",e2eTag:f,children:l})]})}},25314:(e,t,i)=>{i.d(t,{a:()=>o}),i(24643);const o=function(){return window.location.href=`/404?fromUrl=${encodeURIComponent(window.location.pathname)}`,null}},33849:(e,t,i)=>{i.d(t,{J:()=>_});var o=i(24643),n=i(60484),s=i(71281),a=i(49057),r=i(48615),d=i(28591);const l=["//v16.tiktokcdn.com","//p16-va.tiktokcdn.com","//s20.tiktokcdn.com"],c=["https://p16-sign-va.tiktokcdn.com","https://p16-sign-sg.tiktokcdn.com","https://p77-sign-va.tiktokcdn.com","https://sf16-website.neutral.ttwstatic.com","https://v16-webapp-prime.tiktok.com","https://v19-webapp-prime.tiktok.com"],u=["https://p16-pu-sign-useast8.tiktokcdn-us.com","https://p19-pu-sign-useast8.tiktokcdn-us.com","https://lf16-cdn-tos.tiktokcdn-us.com","https://p16-sign.tiktokcdn-us.com","https://p19-sign.tiktokcdn-us.com","https://v16-webapp-prime.us.tiktok.com","https://v19-webapp-prime.us.tiktok.com"],p=["https://p16-sign-useast2a.tiktokcdn.com","https://p16-pu-sign-no.tiktokcdn-eu.com","https://p77-sign-sg.tiktokcdn.com","https://v16-webapp-prime.tiktok.com","https://v19-webapp-prime.tiktok.com"],v={"Singapore-Central":c,"US-East":c,"US-EastRed":p,"US-TTP":u,"US-TTP2":u,"EU-TTP":p,"EU-TTP2":p},_=function(){var e,t;const{abTestVersion:i}=(0,n.L$)((0,a.W)((()=>["abTestVersion"]),[])),c=null!==(e=(0,s.qt)(i,"page_loading_tiny_changes"))&&void 0!==e?e:"v0",{vregion:u}=(0,n.L$)((0,r.U)((()=>["vregion"]),[]));let p=l;return"v1"!==c&&"v4"!==c||!u||(p=null!==(t=v[u])&&void 0!==t?t:l),(0,o.jsx)(d.mg,{children:p.map(((e,t)=>(0,o.jsx)("link",{rel:"dns-prefetch",href:e},`prefetch-${t+1}`)))})}},96689:(e,t,i)=>{i.d(t,{G:()=>a,K:()=>r});var o=i(40099),n=i(49057),s=i(16680);function a({actionWhenUserLoggedIn:e,modalConfig:t={},reportClickEvent:i,openModalWhenUserLoggedIn:a}){const r=(0,n.W)((()=>["user"]),[]),d=(0,s.b1)();return(0,o.useCallback)(((...o)=>{null==i||i(...o);const n="function"==typeof t?t():t;if((null==r?void 0:r.user)&&!a){if(!n.isLinkPhoneOrEmail)return null==e?void 0:e(...o);d.openModal(n)}else d.openModal(n)}),[e,null==r?void 0:r.user,d,t,i,a])}function r(e={},t,i){return a({modalConfig:"function"==typeof e?e():e,reportClickEvent:t,openModalWhenUserLoggedIn:i})}},47926:(e,t,i)=>{i.d(t,{i:()=>a});var o=i(24643),n=i(40099),s=i(88091);const a=(0,n.memo)((function({isOpen:e,onClose:t,children:i,closeOnBackdropClick:n=!1,closeOnEsc:a=!1,onCloseComplete:r,compact:d}){return(0,o.jsx)(s.Mw,{isOpen:e,onClose:t,onCloseComplete:r,size:"Medium",compact:d,closeOnBackdropClick:n,closeOnEsc:a,children:i})}))},33063:(e,t,i)=>{i.d(t,{_y:()=>u,lz:()=>p});var o,n=i(7892),s=i(31209);!function(e){e[e.None=0]="None",e[e.PromotePopupTip=1]="PromotePopupTip",e[e.LoginPopupRedesign=2]="LoginPopupRedesign",e[e.LoginPopup=3]="LoginPopup",e[e.InterestSelector=4]="InterestSelector"}(o||(o={}));const a=new class{constructor(){this.priorityKeys=[],this.endPriorityKeys=[]}start(e){this.endPriorityKeys.filter((t=>t!==e))}end(e){if(!this.endPriorityKeys.includes(e)){this.endPriorityKeys.push(e);const t=this.priorityKeys.find((e=>!this.endPriorityKeys.includes(e)));if(t)return t}return null}remove(e){this.priorityKeys.filter((t=>t!==e))}add(e){this.priorityKeys.includes(e)||(this.priorityKeys=[...this.priorityKeys,e].sort(((e,t)=>e-t)))}clean(){this.priorityKeys=[],this.endPriorityKeys=[]}},r={0:!0,1:!1,3:!1},d=(0,n.p)("popupPriorityAtom@tiktok/fe-shared",{priority:0,isReadyList:r}),l=(0,n.p)("isAllReadyAtom@tiktok/fe-shared",(e=>Object.values(e(d).isReadyList).reduce(((e,t)=>e&&t)))),{useAtomService:c,useServiceDispatchers:u,useServiceState:p}=(0,s.i)(d,((e,t)=>({setIsPopupPriorityReady(i){const o=e(d);if(t(d,Object.assign(Object.assign({},o),{isReadyList:Object.assign(Object.assign({},o.isReadyList),{[i]:!0})})),e(l)){const i=a.end(0);i?t(d,Object.assign(Object.assign({},e(d)),{priority:i})):a.clean()}},clearReadyListOnRouteChange(){const i=e(d);t(d,Object.assign(Object.assign({},i),{isReadyList:r})),a.clean()},getPriorityPopup:i=>({handlePopoverInitial:()=>{a.start(i)},handlePopoverEnd:()=>{const o=e(d).priority;if(i!==o)a.remove(i);else{const o=a.end(i);o?t(d,Object.assign(Object.assign({},e(d)),{priority:o})):(a.clean(),t(d,Object.assign(Object.assign({},e(d)),{priority:0})))}},handlePopoverAdd:()=>{if(a.add(i),e(l)){const i=a.end(0);i&&t(d,Object.assign(Object.assign({},e(d)),{priority:i}))}}})})))},30721:(e,t,i)=>{i.d(t,{Qt:()=>s}),i(40099),i(47172);var o=i(60484),n=i(48615);function s(){const{playerInfo:e}=(0,o.L$)((0,n.U)((()=>["playerInfo"]),[])),{name:t="",isSmartPlayer:i=!1,type:s=0,loop:a=!1,replyComment:r=!0,hideNavBar:d=!1}=(0,o.L$)(e);return{brand:t,isEchoShow:"echoshow"===t,isTtincar:"ttincar"===t,launchType:s,isSmartPlayer:i,loop:a,replyComment:r,hideNavBar:d}}},82290:(e,t,i)=>{i.d(t,{PD:()=>d,t6:()=>r});var o=i(58632);const n=(()=>{let e;return()=>(e||(e=new Promise((e=>{"undefined"==typeof window&&e(!1);const t=new Image;t.onload=()=>{window.__support_webp__=160===(null==t?void 0:t.height),e(160===(null==t?void 0:t.height))},t.onerror=()=>{window.__support_webp__=!1,e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvn8AnAAdQiUpUov+BiOh/AAA="}))),e)})(),s=(()=>{let e;return()=>(e||(e=new Promise((e=>{"undefined"==typeof window&&e(!1);const t=new Image;t.onload=()=>{window.__support_avif__=1===(null==t?void 0:t.width),e(1===(null==t?void 0:t.width))},t.onerror=()=>{window.__support_avif__=!1,e(!1)},t.src="data:image/avif;base64,AAAALGZ0eXBhdmlzAAAAAGF2aWZhdmlzbXNmMWlzbzhtaWYxbWlhZk1BMUEAAAElbWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAiaWxvYwAAAABEQAABAAIAAAAABgAAAQAAACUAAAAYAAAAKGlpbmYAAAAAAAEAAAAaaW5mZQIAAAAAAgAAYXYwMUFscGhhAAAAAAxpcmVmAAAAAAAAAI1pcHJwAAAAbmlwY28AAAAUaXNwZQAAAAAAAAABAAAAAQAAAA5waXhpAAAAAAEIAAAADGF2MUOBABwAAAAAOGF1eEMAAAAAdXJuOm1wZWc6bXBlZ0I6Y2ljcDpzeXN0ZW1zOmF1eGlsaWFyeTphbHBoYQAAAAAXaXBtYQAAAAAAAAABAAIEAQKDBAAABKdtb292AAAAbG12aGQAAAAA4GrKgOBqyoAAAABkAAAAZAABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACGXRyYWsAAABcdGtoZAAAAAHgasqA4GrL+AAAAAEAAAAAAAAAZAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAQAAAAEAAAAAAbVtZGlhAAAAIG1kaGQAAAAA4GrKgOBqyoAAAABkAAAAZFXEAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAABZW1pbmYAAAAUdm1oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAASVzdGJsAAAAlXN0c2QAAAAAAAAAAQAAAIVhdjAxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAEAAQBIAAAASAAAAAAAAAABCkFPTSBDb2RpbmcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAADGF2MUOBIAAAAAAAE2NvbHJuY2x4AAEADQAGgAAAABBjY3N0AAAAAHwAAAAAAAAYc3R0cwAAAAAAAAABAAAAAgAAADIAAAAUc3RzcwAAAAAAAAABAAAAAQAAAChzdHNjAAAAAAAAAAIAAAABAAAAAQAAAAEAAAACAAAAAQAAAAEAAAAcc3RzegAAAAAAAAAAAAAAAgAAACUAAAAaAAAAGHN0Y28AAAAAAAAAAgAABgAAAAY9AAACGnRyYWsAAABcdGtoZAAAAAHgasqA4GrL+AAAAAIAAAAAAAAAZAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAQAAAAEAAAAAABR0cmVmAAAADGF1eGwAAAABAAABom1kaWEAAAAgbWRoZAAAAADgasqA4GrKgAAAAGQAAABkVcQAAAAAAChoZGxyAAAAAAAAAABwaWN0AAAAAAAAAAAAAAAAbGliYXZpZgAAAAFSbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAABEnN0YmwAAACCc3RzZAAAAAAAAAABAAAAcmF2MDEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAQABAEgAAABIAAAAAAAAAAEKQU9NIENvZGluZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAMYXYxQ4EAHAAAAAAQY2NzdAAAAAB8AAAAAAAAGHN0dHMAAAAAAAAAAQAAAAIAAAAyAAAAFHN0c3MAAAAAAAAAAQAAAAEAAAAoc3RzYwAAAAAAAAACAAAAAQAAAAEAAAABAAAAAgAAAAEAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAAYAAAAEAAAABhzdGNvAAAAAAAAAAIAAAYlAAAGVwAAAG9tZGF0EgAKCyAAAAAAffyQENBpMhQQALAAAAJAAAAAeUzeCGsZI8iw4BIACggAAAAAAH38lTIKEACAAAAY3qKVUBIAMhYwA8CAAABGsAAAAkAAIAAeeln6XS7gEgAyDDADwIAAAEaABACRkAAAAENmcmVlSXNvTWVkaWEgRmlsZSBQcm9kdWNlZCB3aXRoIEdQQUMgMi4yLXJldjAtZ2FiMDEyYmJmLW1hc3RlcgA="}))),e)})();let a=!1;const r=()=>(0,o.__awaiter)(void 0,void 0,void 0,(function*(){yield(0,o.__awaiter)(void 0,void 0,void 0,(function*(){const[e,t]=yield Promise.all([s(),n()]);return{supportAvif:e,supportWebp:t}})),a=!0})),d=()=>a?{supportAvif:window.__support_avif__,supportWebp:window.__support_webp__}:(console.warn("VideoCoverViewer: can not use `getCoverFormat` before `coverFormatCheck"),{})},84651:(e,t,i)=>{i.d(t,{KE:()=>v,UX:()=>_});var o=i(97086),n=i(71281),s=i(95358),a=i(88874),r=i(63615),d=i(16272),l=i(57431),c=i(53138);const u={resourceStrategy:"preload"},p={resourceStrategy:"custom",loadEvent:c.bL,defaultProps:{renderStrategy:"custom",renderEvent:c.bL,raceTime:6e3}},v=(c.uM,c.uM,function(){var e,t,i,c,v,_;let g=!1;if(!(0,o.fU)())try{const o=(0,a.YI)(r.Ow);let u="v0",p="v0",m="v0",h="v0",A="v0",y="v0";o&&((0,l.D)(o),u=null!==(e=(0,n.d)("islands_arch_phase2"))&&void 0!==e?e:"v0",p=null!==(t=(0,n.d)("islands_arch_video_detail"))&&void 0!==t?t:"v0",m=null!==(i=(0,n.d)("islands_arch_explore"))&&void 0!==i?i:"v0",h=null!==(c=(0,n.d)("webapp_perf_page_switch"))&&void 0!==c?c:"v0",A=null!==(v=(0,n.d)("islands_arch_rest_page"))&&void 0!==v?v:"v0",y=null!==(_=(0,n.d)("foryou_opt"))&&void 0!==_?_:"v0");const b=window.location.pathname,f=window.location.search,w=(0,s.tO)(b),T="business"===new URLSearchParams(f).get("scene"),L=(0,s.Fj)(b),S=(0,s.eD)(b),O=(0,s.cj)(b),I=(0,s.M5)(b),k=Boolean(d.c.find((e=>Number(I)===e.pageType)));g="v0"!==u&&w||"v0"!==p&&L&&!T||"v0"!==m&&S||"v0"!==h&&O||"v0"!==A&&k||"v0"!==y&&w}catch(e){}return g?p:u}()),_=(function(){var e;let t=!1;if(!(0,o.fU)())try{const i=(0,a.YI)(r.Ow);let o="v0";i&&((0,l.D)(i),o=null!==(e=(0,n.d)("explore_trending_topics"))&&void 0!==e?e:"v0");const d=window.location.pathname,c=(0,s.eD)(d);t="v0"!==o&&c}catch(e){}}(),[3,18,121,105,129,107,4])},53138:(e,t,i)=>{i.d(t,{aY:()=>a,bL:()=>n,uM:()=>s});var o=i(81054);const n=Symbol.for("first-video-loaded"),s=Symbol.for("explore-custom-loaded"),a=new class{constructor(){this.loadEvent=n,this.updated=!1,this.updatedDetail=!1,this.updatedExplore=!1,this.updatedUserProfile=!1,this.updatedCommon=!1}updateVideoLoadEvent(){this.updated||(o.PD.emit(this.loadEvent),this.updated=!0)}updateVideoDetailLoadEvent(){this.updatedDetail||(o.PD.emit(this.loadEvent),this.updatedDetail=!0)}updateExploreVideoLoadEvent(){this.updatedExplore||(o.PD.emit(this.loadEvent),this.updatedExplore=!0)}updateUserProfileLoadEvent(){this.updatedUserProfile||(o.PD.emit(this.loadEvent),this.updatedUserProfile=!0)}updateCommonLoadEvent(){this.updatedCommon||(o.PD.emit(this.loadEvent),this.updatedCommon=!0)}reset(){this.updated=!1,this.updatedDetail=!1,this.updatedExplore=!1,this.updatedUserProfile=!1,this.updatedCommon=!1,o.PD.resetEvent(this.loadEvent)}};new class{constructor(){this.exploreCustomLoadEvent=s}updateExploreCustomLoadEvent(){o.PD.emit(this.exploreCustomLoadEvent)}}},84506:(e,t,i)=>{i.d(t,{K8:()=>g,Sd:()=>A,W3:()=>h,_j:()=>m,gG:()=>y,sy:()=>b});var o=i(58632),n=i(40099),s=i(47172),a=i(5441),r=i(243),d=i.n(r),l=i(58305),c=i(95358),u=i(45297),p=i(60484),v=i(71281),_=i(49057);const g=()=>{const e=(0,l.Hd)(u.O_);return["pwa","msft","twa"].includes(e)},m=()=>{var e;const{abTestVersion:t}=(0,p.L$)((0,_.W)((()=>["abTestVersion"]),[])),i=null!==(e=(0,v.qt)(t,"desktop_app_test"))&&void 0!==e?e:"v1";return{desktopAppTestVid:i,isDesktopTestV1:"v1"===i,isDesktopTestV2:"v2"===i}},h=()=>{const[e,t]=(0,n.useState)(!0);return(0,n.useEffect)((()=>{var e;t(Boolean("MAIN_WINDOW"===(null===(e=null===window||void 0===window?void 0:window.TTE_ENV)||void 0===e?void 0:e.windowName)))}),[]),e},A=()=>{const{pathname:e}=(0,s.useLocation)();return(0,c.tO)(e)||(0,c.gq)(e)||(0,c.U0)(e)||(0,c.eD)(e)},y=()=>{const{isElectronApp:e}=(0,a.B)();(0,n.useEffect)((()=>{if(e){const e=Element.prototype.requestFullscreen;Element.prototype.requestFullscreen=function(...t){return(0,o.__awaiter)(this,void 0,void 0,(function*(){yield d().app.setFullScreenable(!0),e.call(this,...t)}))}}}),[e])},b=()=>{const[e,t]=(0,n.useState)("undefined"!=typeof window&&null!==(s=null===(o=null===(i=null===window||void 0===window?void 0:window.matchMedia)||void 0===i?void 0:i.call(window,"(prefers-color-scheme: dark)"))||void 0===o?void 0:o.matches)&&void 0!==s&&s);var i,o,s;const a=e=>{var i;t(null!==(i=null==e?void 0:e.matches)&&void 0!==i&&i)};return(0,n.useEffect)((()=>{var e;const t=null===(e=null===window||void 0===window?void 0:window.matchMedia)||void 0===e?void 0:e.call(window,"(prefers-color-scheme: dark)");return t.addListener(a),()=>t.removeListener(a)}),[]),e}},89311:(e,t,i)=>{i.d(t,{m:()=>s});var o=i(60484),n=i(49057);const s=()=>{const{language:e}=(0,o.L$)((0,n.W)((()=>["language"]),[]));return{isRTL:"ar"===e||"ur"===e||"he-IL"===e}}},37434:(e,t,i)=>{i.d(t,{Us:()=>s});var o=i(41271),n=(i(32877),i(50970));function s(){return(0,o.P)(n.L)}},50970:(e,t,i)=>{i.d(t,{L:()=>m});var o=i(58632),n=i(64162),s=i(4126),a=i(93995),r=i(46657),d=i(23999),l=i(26324),c=i(24451),u=i(62564),p=i(35572),v=i(8536),_=i(74690),g=i(80339);let m=class extends n.E{constructor(){super(...arguments),this.defaultState={appContext:null,initialized:!1,lang:"en",sideNavActive:!1}}setSideNavActive(e,t){return Object.assign(Object.assign({},e),{sideNavActive:t})}toggleSideNav(e){return e.pipe((0,c.E)(this.state$),(0,u.T)((([e,t])=>this.getActions().setSideNavActive(!t.sideNavActive))))}setAppContext(e,t){var{statusCode:i}=t,n=(0,o.__rest)(t,["statusCode"]);return 0!==i?e:Object.assign(Object.assign({},e),{appContext:n})}setInitialized(e,t){return Object.assign(Object.assign({},e),{initialized:t})}setLang(e,t){return Object.assign(Object.assign({},e),{lang:t})}init(e){return e.pipe((0,c.E)(this.state$),(0,p.p)((([{appContext:e},{initialized:t}])=>t?r.w:(0,d.of)(Object.assign(Object.assign({},e),{statusCode:0})).pipe((0,v.Z)((t=>(0,d.of)(this.getActions().setAppContext(t),this.getActions().setLang(e.language)))),(0,_.Z)(this.getActions().setInitialized(!1)),(0,g.q)(this.getActions().setInitialized(!0),this.terminate())))))}};(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",Object)],m.prototype,"setSideNavActive",null),(0,o.__decorate)([(0,s.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[l.c]),(0,o.__metadata)("design:returntype",void 0)],m.prototype,"toggleSideNav",null),(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],m.prototype,"setAppContext",null),(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",Object)],m.prototype,"setInitialized",null),(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",Object)],m.prototype,"setLang",null),(0,o.__decorate)([(0,s.Mj)({payloadGetter:1}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[l.c]),(0,o.__metadata)("design:returntype",void 0)],m.prototype,"init",null),m=(0,o.__decorate)([(0,a.n)("AppContext")],m)},98855:(e,t,i)=>{i.d(t,{o:()=>l});var o=i(58632),n=i(7672),s=i(91689),a=i(55099),r=i(45297),d=i(16891);let l=class{constructor(e){this.fetch=e,this.initTargetIdcRequest=()=>this.fetch.get("/passport/web/account/info/",{credentials:"include",baseUrlType:2,query:{aid:1459}})}checkTTwid(){return(0,o.__awaiter)(this,void 0,void 0,(function*(){const e=new s.TtWid({aid:r.xE,service:"www.tiktok.com",union:!1,unionHost:"",needFid:!1});try{yield e.checkWebId()}catch(e){d.f.sendEvent("check_ttwid_error",{error_msg:e}),console.error(e)}}))}};l=(0,o.__decorate)([(0,n._)(),(0,o.__metadata)("design:paramtypes",[a.p])],l)},44926:(e,t,i)=>{i.d(t,{Eq:()=>f,JV:()=>m,LV:()=>b,OB:()=>g,Sb:()=>y,Zl:()=>h,d8:()=>A,o1:()=>_});var o=i(71111),n=i(31209),s=i(18538),a=i(79479),r=i.n(a),d=i(99789),l=i.n(d);const c=(0,o.atom)({}),u=(0,o.atom)(null,((e,t,i,n)=>{if(n){const s=e(c)[i];s?t(s,n):t(c,(e=>Object.assign(Object.assign({},e),{[i]:(0,o.atom)(n)})))}else t(c,(e=>l()(e,i)))})),p=(0,o.atom)(null),v=(0,o.atom)([]),_=(0,o.atom)((e=>{const{browserList:t=[]}=(0,s.N)(e,"creator_tab");return t})),g=(0,o.atom)((e=>{const t=[],i=e(v);for(const o of i){const{browserList:i=[]}=(0,s.N)(e,o.itemListKey);if(o.skip>=i.length)break;const n=Math.min(o.skip+o.limit,i.length);if(t.push(...i.slice(o.skip,n)),o.limit===1/0)break}return t})),m=(0,o.atom)((e=>{const t=e(v),i=e(g);let o=null,n=0;for(const a of t){const{browserList:t=[],hasMore:r=!0}=(0,s.N)(e,a.itemListKey);if(n+=r?a.limit:t.length-a.skip,i.length{i.activeItemListKey&&t(p,i.activeItemListKey),i.browserListSources&&t(v,i.browserListSources)})),{useAtomService:h,useServiceState:A,useServiceDispatchers:y,getStaticApi:b}=(0,n.i)(m,((e,t)=>({registerBrowserListConfig(e){const{itemListKey:i,config:o}=e;t(u,null!=i?i:"",o)},setupBrowserList(i){var o;const{itemListKey:n,enterIndex:s}=i,a=e(c)[null!=n?n:""],d=a?e(a):null,l=[];if("explore"!==n||r()(d))l.push({itemListKey:n,skip:0,limit:1/0});else{const e=null!==(o=null==d?void 0:d.sources)&&void 0!==o?o:[];l.push(...function(e,t,i){const o={},n=[];return i.forEach((({itemListKey:i,limit:s},a)=>{var r;if(i){const d=null!==(r=o[i])&&void 0!==r?r:0,l=0===a&&i===e?t+s:s;n.push({itemListKey:i,skip:d,limit:l}),o[i]=d+l}})),n}(n,s,e))}t(p,n),t(v,l)},clearBrowserList(){t(p,null),t(v,[])},freezeSourceWithKey(i){const o=e(v),n=[];for(const t of o)if(t.itemListKey!==i)n.push(t);else{const{browserList:i=[]}=(0,s.N)(e,t.itemListKey);t.skip{i.d(t,{$T:()=>O,bc:()=>M,YZ:()=>P,BI:()=>j,JD:()=>k});var o=i(58632),n=i(71111),s=i(31209),a=i(80417),r=i(93341),d=i(35043),l=i(92032),c=i(29909),u=i(38771),p=i(79983),v=i(52333),_=i(18538),g=i(15343),m=i(34593);const h=e=>{const t=(0,m.L)(g.AU);null==t||t.reportVideoInteractStart({startTime:Date.now(),situation:e})};var A=i(56070),y=i(26325),b=i(22248),f=i(57381),w=i(44926),T=i(71777);const L={foryou:0,topic:0,following:0,video:0,find:1,music:1,music_new:1,challenge:1,challenge_new:1,sticker:1,effect:1,user:1,"user-post":1,"user-repost":1,"user-liked":1,search_top:1,search_video:1,question:1,playlist:1,live_event:1,video_playlist:0,create_video_playlist:0,messages:0,discover:1,poi:1,collection:1,"user-post-public":0,explore:0,channel:1,poi_category:1,search_live:1,favorites:1,"keyword-expansion":1,creator_tab:2,friends:0,trending_topics:1},S={3:"friends",2:"private",1:"public"},O=(0,n.atom)({currentIndex:0,enterIndex:0,prevFeedItemIndex:null,itemListKey:null,prevFeedItemListKey:null,jumpSamePageTime:0,belowPlayMode:0,enterWindowTimeSec:Number(new Date),showingBrowserMode:!1,isCreatorBrowserMode:!1});O.debugLabel="browserModeAtom";const I=(0,n.atom)((e=>{const{itemListKey:t}=e(O);return(0,_.N)(e,t)})),{useServiceState:k,useServiceDispatchers:P,useAtomService:j,getStaticApi:M}=(0,s.i)(O,((e,t)=>({setItemListKey(e){t(O,(t=>Object.assign(Object.assign({},t),{itemListKey:e})))},setCurrentIndex(e){t(O,(t=>Object.assign(Object.assign({},t),{currentIndex:e})))},setClickSamePage(){t(O,(e=>Object.assign(Object.assign({},e),{jumpSamePageTime:Date.now()})))},setShowingBrowserMode(e){t(O,(t=>Object.assign(Object.assign({},t),{showingBrowserMode:e})))},updateVideoIndexAndSavePrev({newFeedIndex:i,isIndexInvalid:o,newId:n,playProgress:s,itemListKey:a,currentIndex:d,newItemListKey:l,playMode:c}){if(o)return;const{isMiniPlayerShowing:u}=e(T.az);if(t(O,(e=>Object.assign(Object.assign({},e),{itemListKey:l,currentIndex:i,prevFeedItemIndex:d,prevFeedItemListKey:a}))),u)return(0,T.uZ)().setItemListKey("creator_tab"),void(0,T.uZ)().updateVideoIndex({newIndex:i,newId:n});const p={currentVideo:{index:i,id:n,mode:c},playProgress:null!=s?s:0};(0,r.LM)().updateVideo(p)},handleEnterCreatorMode(i){var o;try{h("enter_creator_mode");const{creatorFeedIndex:n}=i,{itemListKey:s,currentIndex:a}=e(O),r=e(w.o1),d=!r.length,l=null!==(o=r[n])&&void 0!==o?o:"";this.updateVideoIndexAndSavePrev({newFeedIndex:n,isIndexInvalid:d,newId:l,itemListKey:s,currentIndex:a,newItemListKey:"creator_tab",playMode:2}),t(O,(e=>Object.assign(Object.assign({},e),{isCreatorBrowserMode:!0})))}catch(e){}},handleExitCreatorMode(){var i;try{h("exit_creator_mode");const{prevFeedItemIndex:o,prevFeedItemListKey:n}=e(O),s=e(w.OB),a=null!=o?o:0,d=!s.length,l=null!==(i=s[a])&&void 0!==i?i:"";this.handleClearCreatorModeData({newIndex:a,isIndexInvalid:d,prevFeedItemListKey:n});const c={currentVideo:{index:a,id:l,mode:2},playProgress:0};(0,r.LM)().updateVideo(c),t(O,(e=>Object.assign(Object.assign({},e),{isCreatorBrowserMode:!1})))}catch(e){}},handleCreatorModeVideoClick(t){var i;try{h("click_creator_video");const{creatorFeedIndex:o}=t,{isMiniPlayerShowing:n}=e(T.az),s=e(w.o1),a=!s.length,r=null!==(i=s[o])&&void 0!==i?i:"";n?(0,T.uZ)().updateVideoIndex({newIndex:o,newId:r}):this.updateVideoIndex({newIndex:o,newId:r,isIndexInvalid:a})}catch(e){}},updateVideoIndex(i){const{newIndex:o,isIndexInvalid:n,newId:s,playProgress:a}=i,{isMiniPlayerShowing:l}=e(T.az),{itemListKey:c}=e(O);if(n)return;if(t(O,(e=>Object.assign(Object.assign({},e),{currentIndex:o}))),l)return;const u={currentVideo:{index:o,id:s,mode:2},playProgress:null!=a?a:0,pageType:c?d.FB[c]:999};(0,r.LM)().updateVideo(u)},updateDeleteVideo(i){const{currentIndex:o}=e(O),n=e(w.OB),s=n.length,a=s-1<=0,r=s-1===o,d=a?"":n[r?o-1:o+1],u=r?o-1:o;if(i){this.updateVideoIndex({newIndex:u,newId:d,isIndexInvalid:a});const e=(0,l.Ds)(),o=(0,c.HG)();e.setDeleteVideo(i),o.setDeleteVideo(i),t(p.D,"setDeleteVideo",i),t(v.t,"setDeleteVideo",i)}},handleClearCreatorModeData(e){const{prevFeedItemListKey:i,newIndex:o,isIndexInvalid:n}=e;n||t(O,(e=>Object.assign(Object.assign({},e),{currentIndex:o,itemListKey:i,prevFeedItemIndex:null,prevFeedItemListKey:null})))},postVideoDelete(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){const t=(0,f.o)();try{const{status_code:i,status_msg:n}=yield function(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){return A.h.post("/api/aweme/delete/",{query:Object.assign(Object.assign({},e),{tt_csrf_token:A.h.csrfToken}),headers:{[y.nk]:A.h.csrfToken},baseUrlType:2})}))}(e);t.setBrowserModeStatus({statusCode:i,statusMessage:n,action:"delete"}),0===i&&(a.y.handleVideoDelete("delete"),this.updateDeleteVideo(e.aweme_id))}catch(e){t.setBrowserModeStatus({statusCode:-1,statusMessage:""})}}))},postScheduleDelete(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){const t=(0,f.o)();try{yield function(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){return A.h.post("/api/schedule/aweme/delete/",{query:e,headers:{[y.nk]:A.h.csrfToken},baseUrlType:2})}))}({aweme_id:e}),t.setBrowserModeStatus({statusCode:0,statusMessage:"",action:"delete"}),this.updateDeleteVideo(e),a.y.handleScheduleDelete("delete")}catch(e){t.setBrowserModeStatus({statusCode:-1,statusMessage:""})}}))},postDuetOrStitchChange({type:e,enable:i,aweme_id:n}){return(0,o.__awaiter)(this,void 0,void 0,(function*(){const s=(0,f.o)();try{const{status_code:r}=yield function(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){return A.h.post("/api/aweme/set/react_duet_stitch/",{query:Object.assign(Object.assign({},e),{tt_csrf_token:A.h.csrfToken}),headers:{[y.nk]:A.h.csrfToken},baseUrlType:2})}))}({aweme_id:n,[e]:i});if(0!==r)s.setBrowserModeStatus({statusCode:r,statusMessage:""}),2054===r&&this.updateDeleteVideo(n);else{a.y.handlePrivateSetting({target:e,to_status:i?"on":"off"});const o="item_duet"===e?"duetEnabled":"stitchEnabled";t(v.t,"updateItem",{id:n,[o]:0===i})}}catch(e){s.setBrowserModeStatus({statusCode:-1,statusMessage:""})}}))},postModifyVisibility(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){const i=(0,f.o)();try{const{status_code:n,status_msg:s}=yield function(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){return A.h.post("/api/aweme/modify/visibility/",{query:Object.assign(Object.assign({},e),{tt_csrf_token:A.h.csrfToken}),headers:{[y.nk]:A.h.csrfToken},baseUrlType:2})}))}(e);0!==n?(i.setBrowserModeStatus({statusCode:n,statusMessage:s}),2054===n&&this.updateDeleteVideo(e.aweme_id)):(a.y.handleSelectPrivacySettingVideo({to_status:S[e.type]}),(0,b.G)(n,[0]),t(v.t,"setItemPrivateState",{id:e.aweme_id,visibility:e.type}))}catch(e){i.setBrowserModeStatus({statusCode:-1,statusMessage:""})}}))},postUserSetting(e){var i,n;return(0,o.__awaiter)(this,void 0,void 0,(function*(){const s=(0,f.o)();try{const{status_code:r}=yield function(e){return(0,o.__awaiter)(this,void 0,void 0,(function*(){return A.h.post("/api/user/set/settings/",{baseUrlType:2,query:Object.assign(Object.assign({},e),{tt_csrf_token:A.h.csrfToken}),headers:{[y.nk]:A.h.csrfToken}})}))}(e);0!==r?(s.setBrowserModeStatus({statusCode:r,statusMessage:""}),2054===r&&this.updateDeleteVideo(null!==(i=e.aweme_id)&&void 0!==i?i:"")):(a.y.handlePrivateSetting({target:"comment",to_status:0===e.private_setting?"on":"off"}),t(v.t,"updateItem",{id:null!==(n=e.aweme_id)&&void 0!==n?n:"",itemCommentStatus:e.private_setting}))}catch(e){s.setBrowserModeStatus({statusCode:-1,statusMessage:""})}}))},closeBrowserMode(i){var o;const{playProgress:n=0,shouldPause:s=!1}=null!=i?i:{},{itemListKey:a,currentIndex:l,belowPlayMode:c,isCreatorBrowserMode:u,prevFeedItemIndex:p,prevFeedItemListKey:v,afterCloseBrowserMode:_}=e(O),g=u?null!=v?v:"":null!=a?a:"",m=u?null!=p?p:0:l,h=e(w.OB),{list:A}=e(I),y=!h.length,b=null!==(o=h[m])&&void 0!==o?o:"",f=A.findIndex((e=>b===e));u&&(t(O,(e=>Object.assign(Object.assign({},e),{isCreatorBrowserMode:!1}))),this.handleClearCreatorModeData({prevFeedItemListKey:g,newIndex:m,isIndexInvalid:y}));const T={currentVideo:{index:s?-1:f,id:s?"":b,mode:null!=c?c:L[g],pageType:g?d.FB[g]:999},playProgress:n};(0,r.LM)().updateVideo(T),null==_||_(),t(O,(e=>Object.assign(Object.assign({},e),{showingBrowserMode:!1,belowPlayMode:null,afterCloseBrowserMode:void 0}))),(0,w.LV)().clearBrowserList()},showBrowserMode(i){const{index:o=0,playProgress:n=0,belowPlayMode:s,forceUseIndexLocation:a,shouldUsePreviousProgress:r=!1,afterCloseBrowserMode:d}=i,{browserList:l,list:c}=e(I),p=c[o],v=e(u.jD)[p],{currentTime:_}="video"===(null==v?void 0:v.contentType)?v:{currentTime:0},g=a?o:Math.max(0,Math.min(l.length-1,l.findIndex((e=>p===e)))),{itemListKey:m}=e(O),{isMiniPlayerShowing:h}=e(T.az);(0,w.LV)().setupBrowserList({itemListKey:m,enterIndex:g}),h&&(0,T.uZ)().setPrevPlayMode(2),this.updateVideoIndex({newIndex:g,newId:p,isIndexInvalid:!1,playProgress:r?_:n}),t(O,(e=>Object.assign(Object.assign(Object.assign({},e),s?{belowPlayMode:s}:{}),{afterCloseBrowserMode:d,showingBrowserMode:!0,enterIndex:g})))},handleNextVideo(){var t;try{h("browser_mode_next");const{currentIndex:i,isCreatorBrowserMode:o}=e(O),n=e(o?w.o1:w.OB),{liveCardDisplay:s}=e(I),a=e(v.t),{isMiniPlayerShowing:r}=e(T.az),d=(0,_.A)(i,n,a,s,"next"),l=!n.length||d<0,c=null!==(t=n[d])&&void 0!==t?t:"";if(l)return void console.warn("cannot switch to next video for some reasons");r?(0,T.uZ)().handleNextVideo():this.updateVideoIndex({newIndex:d,newId:c,isIndexInvalid:!1})}catch(e){}},handlePrevVideo(){var t;try{h("browser_mode_prev");const{currentIndex:i,isCreatorBrowserMode:o}=e(O),n=e(I),s=e(o?w.o1:w.OB),{liveCardDisplay:a}=n,r=e(v.t),{isMiniPlayerShowing:d}=e(T.az),l=(0,_.A)(i,s,r,a,"prev"),c=!s.length||l>s.length-1,u=null!==(t=s[l])&&void 0!==t?t:"";if(c)return void console.warn("cannot switch to prev video for some reasons");d?(0,T.uZ)().handlePrevVideo():this.updateVideoIndex({newIndex:l,newId:u,isIndexInvalid:!1})}catch(e){}},getAdjacentVideoInfo(){const{currentIndex:t,isCreatorBrowserMode:i}=e(O),o=e(i?w.o1:w.OB);return[o[t-1],o[t+1]].map((e=>null!=e?e:0))}})))},57381:(e,t,i)=>{i.d(t,{W:()=>d,o:()=>r});var o=i(71111),n=i(31209);const s={statusCode:0,statusMessage:"",toastNotShown:!1},a=(0,o.atom)(Object.assign({},s)),{getStaticApi:r,useAtomService:d}=(0,n.i)(a,((e,t)=>({setBrowserModeStatus(e){t(a,Object.assign(Object.assign({},e),{toastNotShown:!0}))},clearBrowserModeStatus(){t(a,Object.assign({},s))}})))},18538:(e,t,i)=>{i.d(t,{A:()=>a,N:()=>r});var o=i(92597),n=i(91286),s=i(79983);const a=(e,t,i,o,s)=>{var a,r;let d="next"===s?e+1:e-1;if(1===o){const o=null!==(a=t[d])&&void 0!==a?a:"";let l=(0,n.Jl)(i[o]);for(;l;){d="next"===s?d+1:d-1;const o=null!==(r=t[d])&&void 0!==r?r:"";if(l=(0,n.Jl)(i[o]),d>t.length-1||d<0||""===o)return e}}return Math.max(Math.min(d,t.length-1),0)},r=(e,t)=>{var i;const n=(0,o.D)(t);return n?e(n):null!==(i=e(s.D)[null!=t?t:""])&&void 0!==i?i:{}}},96428:(e,t,i)=>{i.d(t,{vK:()=>u});var o,n=i(24643),s=i(67823),a=i(57432),r=i.n(a),d=i(40099),l=i(45297);!function(e){e.OneColumnMode="one_column_mode",e.SwiperMode="swiper_mode"}(o||(o={}));const c=(0,d.createContext)({feedMode:"swiper_mode",switchFeedMode:r()}),u=(0,d.memo)((({feedMode:e,children:t})=>{const i=null!=e?e:s.A.get(l.i_)||"swiper_mode",[o,a]=(0,d.useState)(i),r=(0,d.useCallback)((e=>{a(e)}),[]),u=(0,d.useMemo)((()=>({feedMode:o,switchFeedMode:r})),[o,r]);return(0,n.jsx)(c.Provider,{value:u,children:t})}))},67805:(e,t,i)=>{i.d(t,{BL:()=>u,MM:()=>c,nf:()=>l});var o=i(58305),n=i(67823);const s={METHOD:"last_login_success_method",TIMESTAMP:"last_login_success_timestamp",TRACKING_INFO:"last_login_success_tracking_info",ENTER_TYPE:"last_login_enter_type"},a="login_tracking_resume_data",r="login_tracking_resume_timestamp",d="login_tracking_resume_source",l=new class{constructor(){this.MAX_CLICK_TIMESTAMP_THRESHOLD_SECONDS=1e4,this.hasDurationSinceClickTimestampUsed=!1,this.MAX_RESUME_VALID_DURATION_THRESHOLD_SECONDS=1e4}populateTrackingInfoFromSessionStorage(){const e=(0,o.Qy)("login_btn_click_timestamp")||void 0,t=e?Number(e):void 0,i=void 0!==t&&Date.now()-t>this.MAX_CLICK_TIMESTAMP_THRESHOLD_SECONDS,n=(0,o.Qy)("login_tracking_info")||void 0,s=(0,o.Qy)("login_send_info_back_after_success")||void 0,l=(0,o.Qy)(a)||void 0,c=(0,o.Qy)(r)||void 0,u=c?Number(c):void 0,p=void 0!==u&&Date.now()-u<=this.MAX_RESUME_VALID_DURATION_THRESHOLD_SECONDS,v=(0,o.Qy)(d)||void 0;if(n){let e;try{e=JSON.parse(n)}catch(e){console.log("Parse tracking info from session storage failed",e)}return!e||i?this.resetTrackingProps():(this.setTrackingInfo(e),this.setClickToLoginTimestamp(t),this.setHasDurationSinceClickTimestampUsed(!1),this.setSendInfoBackAfterLoginSuccess("1"===s),void this.setResumeDataSource(void 0))}if(l&&v){let e;try{e=JSON.parse(l)}catch(e){console.log("Parse resume data from session storage failed",e)}return e&&p?this.batchSetResumeInfo(e,v):this.resetTrackingProps()}return this.resetTrackingProps()}batchSetResumeInfo(e,t){this.setTrackingInfo(e.trackingInfo),this.setClickToLoginTimestamp(e.clickToLoginTimestamp),this.setHasDurationSinceClickTimestampUsed(e.hasDurationSinceClickTimestampUsed),this.setSendInfoBackAfterLoginSuccess(e.sendInfoBackAfterLoginSuccess),this.setLoginSuccessPlatform(e.loginSuccessPlatform),this.setLoginSuccessEnterType(e.loginSuccessEnterType),this.setResumeDataSource(t)}setTrackingInfo(e){this.trackingInfo=e}getTrackingInfo(){return this.trackingInfo}getResumeDataSource(){return this.resumeDataSource}setClickToLoginTimestamp(e){this.clickToLoginTimestamp=e}setLoginSuccessPlatform(e){this.loginSuccessPlatform=e}setLoginSuccessEnterType(e){this.loginSuccessEnterType=e}setResumeDataSource(e){this.resumeDataSource=e}getClickToLoginTimestamp(){return this.clickToLoginTimestamp}setSendInfoBackAfterLoginSuccess(e){this.sendInfoBackAfterLoginSuccess=e}getSendInfoBackAfterLoginSuccess(){return this.sendInfoBackAfterLoginSuccess}resetTrackingProps(){this.trackingInfo=void 0,this.clickToLoginTimestamp=void 0,this.sendInfoBackAfterLoginSuccess=void 0,this.hasDurationSinceClickTimestampUsed=!1,this.loginSuccessPlatform=void 0,this.loginSuccessEnterType=void 0,this.resumeDataSource=void 0}prepareResumeData(e){if(!this.trackingInfo)return;const t={trackingInfo:this.trackingInfo,clickToLoginTimestamp:this.clickToLoginTimestamp,sendInfoBackAfterLoginSuccess:this.sendInfoBackAfterLoginSuccess,hasDurationSinceClickTimestampUsed:this.hasDurationSinceClickTimestampUsed,loginSuccessEnterType:this.loginSuccessEnterType,loginSuccessPlatform:this.loginSuccessPlatform},i=JSON.stringify(t);(0,o.J2)(a,i),(0,o.J2)(r,Date.now().toString()),(0,o.J2)(d,e)}clearResumeData(){(0,o.X)(a),(0,o.X)(r),(0,o.X)(d)}setHasDurationSinceClickTimestampUsed(e){this.hasDurationSinceClickTimestampUsed=e}getDurationSinceClickTimestampOnce(){if(!this.hasDurationSinceClickTimestampUsed)return this.hasDurationSinceClickTimestampUsed=!0,void 0!==this.clickToLoginTimestamp?Date.now()-this.clickToLoginTimestamp:void 0}saveLoginSuccessInfo({teaPlatform:e,isSignUp:t}){this.trackingInfo&&(this.loginSuccessPlatform=e,this.loginSuccessEnterType=t?"click_sign_up":"click_login")}getLoginSuccessE2ETrackingProps(){if(this.trackingInfo&&this.sendInfoBackAfterLoginSuccess)return{trackingInfo:this.trackingInfo,successTimestamp:Date.now(),successEnterType:this.loginSuccessEnterType,successMethod:this.loginSuccessPlatform}}setUpLoginSuccessE2ETracking(){if(!this.trackingInfo||!this.sendInfoBackAfterLoginSuccess)return;const{TIMESTAMP:e,METHOD:t,TRACKING_INFO:i,ENTER_TYPE:a}=s;(0,o.J2)(e,Date.now().toString()),(0,o.J2)(i,JSON.stringify(this.trackingInfo)),this.loginSuccessEnterType&&(0,o.J2)(a,this.loginSuccessEnterType),this.loginSuccessPlatform&&(0,o.J2)(t,this.loginSuccessPlatform),n.A.set("TT_rp_login_track_pram","1",{path:"/",domain:"tiktok.com",secure:!1,sameSite:"lax","max-age":"4"})}},c={CLICK_TIMESTAMP:"logout_btn_click_timestamp",TRACKING_INFO:"logout_tracking_info"},u=new class{constructor(){this.MAX_CLICK_TIMESTAMP_THRESHOLD_SECONDS=1e4}populateTrackingInfoFromSessionStorage(){const e=(0,o.Qy)(c.CLICK_TIMESTAMP)||void 0,t=e?Number(e):void 0,i=void 0!==t&&Date.now()-t>this.MAX_CLICK_TIMESTAMP_THRESHOLD_SECONDS,n=(0,o.Qy)(c.TRACKING_INFO)||void 0;if(i)return;let s;if(n)try{s=JSON.parse(n)}catch(e){console.log("Parse logout tracking info from session storage failed",e)}this.trackingInfo=s}getTrackingInfo(){return this.trackingInfo}}},30615:(e,t,i)=>{i.d(t,{iM:()=>r});var o=i(16469),n=i(52401),s=i(58305),a=i(67805);const r=(e,t,i)=>{var r;if(o.LU.removeAll(),i){i.logoutSubmit(null!=t?t:{});const e=null===(r=i.getCommonTrackingInfo)||void 0===r?void 0:r.call(i);e&&((0,s.J2)(a.MM.TRACKING_INFO,JSON.stringify(e)),(0,s.J2)(a.MM.CLICK_TIMESTAMP,Date.now().toString()))}else n.z.logoutSubmit(null!=t?t:{});let d="https://www.tiktok.com/logout";e&&(d+=`?redirect_url=${encodeURIComponent(e)}`),window.location.href=d}},71777:(e,t,i)=>{i.d(t,{Dy:()=>m,Sp:()=>h,az:()=>v,mE:()=>g,uZ:()=>A});var o=i(58632),n=i(71111),s=i(31209),a=i(91257),r=i(93341),d=i(18538),l=i(57317),c=i(44926),u=i(16891);const p={isDocumentPipSupporting:"undefined"!=typeof window&&"documentPictureInPicture"in window&&function(){const e=navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9]+)\./),t=e?Number(e[1]):-1;return t>=126&&133!==t}(),pipWindow:null,isMiniPlayerShowing:!1,itemListKey:null,currentIndex:0,prevPlayMode:null,miniPlayerRef:null,svgChangeObserver:null,enterTimestamp:0,windowHeight:598,windowWidth:306},v=(0,n.atom)(p);v.debugLabel="miniPlayerAtom";const _=(0,n.atom)((e=>{const{itemListKey:t}=e(v);return(0,d.N)(e,t)})),{useServiceState:g,useServiceDispatchers:m,useAtomService:h,getStaticApi:A}=(0,s.i)(v,((e,t)=>({setItemListKey(e){t(v,(t=>Object.assign(Object.assign({},t),{itemListKey:e})))},setCurrentIndex(e){t(v,(t=>Object.assign(Object.assign({},t),{currentIndex:e})))},setPrevPlayMode(e){t(v,(t=>Object.assign(Object.assign({},t),{prevPlayMode:e})))},setIsMiniPlayerShowing(e){t(v,(t=>Object.assign(Object.assign({},t),{isMiniPlayerShowing:e})))},setMiniPlayerRef(e){t(v,(t=>Object.assign(Object.assign({},t),{miniPlayerRef:e})))},setIsLandingIndicatorDismissed(e){t(v,(t=>Object.assign(Object.assign({},t),{isLandingIndicatorDismissed:e})))},initEnableNewLocalStorageKey(){t(v,(e=>Object.assign(Object.assign({},e),{enableNewLocalStorageKey:!1})))},setIsAfterSwitchTabOrWindowSizeChange(e){t(v,(t=>Object.assign(Object.assign({},t),{isAfterSwitchTabOrWindowSizeChange:e})))},setIsAfterSwitchTabOrWindowSizeChangeIndicatorDismissed(e){t(v,(t=>Object.assign(Object.assign({},t),{isAfterSwitchTabOrWindowSizeChangeIndicatorDismissed:e})))},updateMiniPlayerSize(){const{pipWindow:i}=e(v);if(!i)return;const o=i.innerHeight,n=i.innerWidth;t(v,(e=>Object.assign(Object.assign({},e),{windowHeight:o,windowWidth:n})))},updateVideoIndex(i){const{newIndex:o,newId:n,playProgress:s,isMiniPlayerNotSupported:a}=i,{prevPlayMode:d}=e(v);t(v,(e=>Object.assign(Object.assign({},e),{currentIndex:o})));const c={currentVideo:{index:o,id:n,mode:a?d:8},playProgress:null!=s?s:0};(0,r.LM)().updateVideo(c);const{showingBrowserMode:u}=e(l.$T);u&&(0,l.bc)().updateVideoIndex({newId:n,newIndex:o,isIndexInvalid:!1})},closeMiniPlayer(i){var o,n,s;const{playMode:d,enter_method:l}=i,{currentIndex:c,prevPlayMode:p,pipWindow:g,miniPlayerRef:m,svgChangeObserver:h,enterTimestamp:A}=e(v),{list:y=[]}=e(_),b=null!==(o=y[c])&&void 0!==o?o:"",f=y.findIndex((e=>b===e)),w=null!==(s=null===(n=null==m?void 0:m.current)||void 0===n?void 0:n.currentTime)&&void 0!==s?s:0;if(g){null==g||g.close(),u.f.sendEvent("turn_off_mini_player",{play_mode:a.Jr[null!=p?p:"-1"],group_id:b,enter_method:l,stay_duration:(Date.now()-A)/1e3,has_more:cObject.assign(Object.assign({},e),{pipWindow:null,isMiniPlayerShowing:!1,itemListKey:null,currentIndex:0,prevPlayMode:null,miniPlayerRef:null,svgChangeObserver:null,enterTimestamp:0})))}},openMiniPlayer(i){return(0,o.__awaiter)(this,void 0,void 0,(function*(){const{index:o=0,playMode:n,playProgress:s,itemListKey:p}=i,{pipWindow:_,isDocumentPipSupporting:g,windowHeight:m,windowWidth:h}=e(v);if(!g||"undefined"==typeof window||null!==_)return;const{list:A}=(0,d.N)(e,p),{showingBrowserMode:y,isCreatorBrowserMode:b}=e(l.$T),{browserList:f}=e(c.JV),w=y&&!b?f[o]:A[o];try{const e=Date.now();documentPictureInPicture.addEventListener("enter",(()=>{u.f.sendEvent("enter_mini_player",{latency:Date.now()-e,play_mode:a.Jr[n],group_id:w})}),{once:!0});const i=yield window.documentPictureInPicture.requestWindow({width:h,height:m});i.addEventListener("pagehide",(()=>{this.closeMiniPlayer({playMode:n})}),{once:!0}),[...document.styleSheets].forEach((e=>{try{const t=[...e.cssRules].map((e=>e.cssText)).join(""),o=document.createElement("style");o.textContent=t,i.document.head.appendChild(o)}catch(t){const o=document.createElement("link");if(null===e.href)return;o.rel="stylesheet",o.type=e.type,o.media=e.media.toString(),o.href=e.href,i.document.head.appendChild(o)}})),this.createOrUpdateSVGSprite(i);const d=document.querySelector("#svg-sprite-container"),l=new MutationObserver((()=>this.createOrUpdateSVGSprite(i)));d&&l.observe(d,{subtree:!0,childList:!0});const c={currentVideo:{index:o,id:w,mode:8},playProgress:s};(0,r.LM)().updateVideo(c),t(v,(e=>Object.assign(Object.assign({},e),{enterTimestamp:Date.now(),itemListKey:p,prevPlayMode:n,isMiniPlayerShowing:!0,currentIndex:o,pipWindow:i,svgChangeObserver:l})))}catch(e){console.error("DocumentPIP error",e)}}))},createOrUpdateSVGSprite(e){const t=document.querySelector("#svg-sprite-container");try{let i=e.document.body.querySelector("svg");i||(i=document.createElement("svg"),e.document.body.appendChild(i)),i.innerHTML=(null==t?void 0:t.outerHTML)||""}catch(e){console.log("error to copy svg sprite",e)}},handleNextVideo(){var t;try{const{currentIndex:i}=e(v),{list:o}=e(_),n=i+1,s=null!==(t=o[n])&&void 0!==t?t:"";if(!o.length||n<0||n>=o.length)return void console.warn("cannot switch to next video for some reasons");this.updateVideoIndex({newIndex:n,newId:s})}catch(e){}},handlePrevVideo(){var t;try{const{currentIndex:i}=e(v),{list:o}=e(_),n=i-1,s=!o.length||n<0||n>=o.length,a=null!==(t=o[n])&&void 0!==t?t:"";if(s)return void console.warn("cannot switch to prev video for some reasons");this.updateVideoIndex({newIndex:n,newId:a})}catch(e){}}})))},39589:(e,t,i)=>{i.d(t,{K:()=>o});const o=(0,i(23124).$)("SeoABTestContext@tiktok/fe-shared")(null)},36488:(e,t,i)=>{i.d(t,{R:()=>k,F:()=>P});var o=i(24643),n=i(46682),s=i(40099),a=i(47172),r=i(10828),d=i(56013),l=i(50789),c=i(82715),u=i(91857),p=i(28086),v=i(64738),_=i(32125),g=i(26930),m=i(58632),h=i(71111),A=i(39785),y=i(56070);const b=(0,A.M)({csr:e=>(0,m.__awaiter)(void 0,void 0,void 0,(function*(){const{url:t}=e;return yield y.h.get("/api/seo/redirection/",{query:{url:t}})}))}),f={needRedirect:!1},w=(0,p.z)({initState:f,rehydrationDataKey:"shared.seo.pageRedirect",fetchAction:(e,t)=>(0,m.__awaiter)(void 0,void 0,void 0,(function*(){const{url:e}=t;let i;try{i=yield b(t)}catch(t){return{needRedirect:!1,loadedURL:e}}const{redirectURL:o}=i;return{pageRedirectURL:o,loadedURL:e,needRedirect:void 0!==o}}))}),T=(0,_.pj)(w),L=(0,h.atom)(null,((e,t)=>{t(T,f)}));var S=i(39589);const O=Object.assign(Object.assign({},c.OZ),u.Ob),I=e=>Object.values(O).some((t=>null!==(0,a.matchPath)(e,{path:t})));function k(e,t){return function(i){const[{atomState:n},d]=(0,p.I)(w),{pageRedirectURL:l,loadedURL:c,needRedirect:u}=n,_=(0,v.useSetAtom)(L),m=(0,a.useHistory)(),h=(0,a.useLocation)(),A=`${r.C}${decodeURIComponent(h.pathname)}`,y=h.search;return(0,g.o)((()=>[d({url:A}),()=>{_()}]),[A]),(0,s.useEffect)((()=>{if(l){const e=new URL(l);decodeURIComponent(e.pathname)!==decodeURIComponent(h.pathname)&&(I(e.pathname)?m.push(`${e.pathname}${y||""}`):window.location.href=l)}}),[l,m,h.pathname,y]),c!==A||u?(0,o.jsx)(o.Fragment,{children:t}):(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(e,Object.assign({},i))})}}function P(e){return function(t){const{pathname:i}=(0,a.useLocation)(),c=`${r.C}${i}`,[{abtest:u},p]=(0,n.S)(l.p),[v,m]=(0,d.ZC)((e=>e.abtest),{equalityFn:_.bN});return(0,g.o)((()=>m.setAbtest(c)),[p,c]),(0,s.useEffect)((()=>{v&&!u&&p.setAbTest(v)}),[v,u]),u?(0,o.jsx)(S.K.Provider,{value:u,children:(0,o.jsx)(e,Object.assign({},t))}):null}}},52702:(e,t,i)=>{i.d(t,{M0:()=>b,Nk:()=>S,O9:()=>A,Tx:()=>f,dY:()=>T,lF:()=>y,wW:()=>L,yq:()=>w});var o=i(25616),n=i(10828),s=i(7971),a=i(46682),r=i(41271),d=i(34777),l=i(56013),c=i(97086),u=i(71281),p=i(60484),v=i(48615),_=i(40099),g=i(32125),m=i(90950),h=i(50789);const A=(e,t,i)=>{if(!e||e===t||(0,c.fU)()||133===i)return;const o=location.pathname.replace(/[^\/]+$/,e),s=`${n.C}/${o}${location.search}`,a=Object.assign(Object.assign({},history.state),{as:s});window.history.replaceState(a,"format_kap_page",s)},y=e=>{const t=L();return(0,s.zh)(e,t)},b=({keyword:e,relatedWordList:t})=>{const i=(0,u.TQ)("kep_remove_desc_keywords"),n=(0,o.s)(),a=(0,_.useMemo)((()=>(({keyword:e,keywordList:t,removeRelatedKeywords:i,t:o})=>{const n=`${o("seo_serp_expansion_num1",{expansion_keywords:(0,s.zh)(e)})}`;if(i)return n;const a=(0,s.gW)(t);return`${n}${a?` ${o("seo_aggre_metadesc2",{related_search_keywords:a})}`:""}`})({keyword:e,keywordList:t.map((e=>e.formattedWord)),t:n,removeRelatedKeywords:i})),[e,n,t]);return a};function f(e){const{pageType:t,topic:i,language:o="en"}=e,n=(0,a.w)(m.E);(0,_.useEffect)((()=>{n.setFeedSEOProps({pageType:t,topic:i,language:o})}),[n,t,i,o])}function w(){return(0,_.useMemo)((()=>(0,d.pZ)()),[])}function T(){return(0,_.useMemo)((()=>(0,d.qA)()),[])}function L(){const e=(0,r.P)(h.p,{selector:e=>e.abtest,dependencies:[]});return(0,l.d7)((e=>e.abtest),{equalityFn:g.bN})||e}function S(){const{isBot:e}=(0,p.L$)((0,v.U)((()=>["isBot"]),[]));return Boolean(e)}},90950:(e,t,i)=>{i.d(t,{E:()=>I});var o=i(58632),n=i(4126),s=i(93995),a=i(340),r=(i(72828),i(80339)),d=i(95719),l=i(23999),c=i(63700),u=i(26324),p=i(8536),v=i(35572),_=i(20259),g=i(62564),m=i(24451),h=i(17354),A=i(72916),y=i(53966),b=i(33721),f=i(10828),w=i(64356),T=i(99101),L=i(19331),S=i(50789);const O=[...b.TN,...b.Wq];let I=class extends y.E{constructor(e,t,i,o){super(),this.stateModule=e,this.service=t,this.sharingMeta=i,this.t=o,this.defaultState={}}updateSEOState(e){const{metaParams:t={},jsonldList:i=[],disableAlternateLink:o=!1,generateAlternateWithCanonical:n}=e;this.stateModule.updateAtom({metaParams:t,jsonldList:i,disableAlternateLink:o,generateAlternateWithCanonical:n})}setPCMusicSEOProps(e){return e.pipe((0,p.Z)((({response:e,language:t,appType:i})=>this.setMusicSEOProps(e,{language:t},i).pipe((0,r.q)(this.terminate("setPCMusicSEOProps"))))))}setFeedSEOProps(e){return e.pipe((0,v.p)((e=>{const{pageType:t,topic:i,topicType:o,language:n}=e,s={seoProps:{pageId:"",pageType:t},topic:i,topicType:o,language:n};return this.service.fetchSEOProps(s,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((()=>(0,l.of)(this.terminate()))),(0,_.W)((e=>(0,l.of)(this.noop(),this.terminate()))))})))}setGoLiveSEOProps(e){return e.pipe((0,v.p)((({language:e,user:t})=>{const i={seoProps:{pageId:"",pageType:14},user:t,language:e,t:this.t};return this.service.fetchSEOProps(i,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((()=>(0,l.of)(this.terminate()))),(0,_.W)((()=>(0,l.of)(this.noop()))))})))}setHomeSEOProps(e){return this.service.fetchSEOProps({seoProps:{pageId:"",pageType:101},language:e},O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((()=>(0,c.h)((0,l.of)(this.sharingMeta.setSharingMetaState({"og:image":f.U}))))))}setForyouSEOProps(e,t){if(-1===e.statusCode)return(0,l.of)(this.noop());const i=Object.assign(Object.assign(Object.assign({},e),t),{seoProps:{pageType:5},t:this.t});return this.service.fetchSEOProps(i,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,g.T)((()=>this.noop())))}setVideoSEOProps(e,t,i,o,n){var s,a,r,u,v,_,g,y;if(-1===e.statusCode)return(0,l.of)(this.noop());const b=null!==(r=null===(a=null===(s=null==e?void 0:e.itemInfo)||void 0===s?void 0:s.itemStruct)||void 0===a?void 0:a.id)&&void 0!==r?r:"",f=null!==(y=null===(g=null===(_=null===(v=null===(u=null==e?void 0:e.itemInfo)||void 0===u?void 0:u.itemStruct)||void 0===v?void 0:v.author)||void 0===_?void 0:_.bioLink)||void 0===g?void 0:g.link)&&void 0!==y?y:"";return(0,l.of)(e).pipe((0,m.E)(this.stateModule.state$.pipe((0,h.p)((e=>void 0!==e.abtest)))),(0,p.Z)((([s,a])=>{const r=Object.assign(Object.assign(Object.assign({},e),t),{transcriptContent:n,bioLink:f,seoProps:{pageId:b,pageType:0,abtest:a.abtest},t:this.t});return this.service.fetchSEOProps(r,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,A.n)((t=>(0,c.h)(this.sharingMeta.setVideoSharingMeta(t,e,i,o)))))})))}setCollectionSEOProps(e,t,i,o,n){var s,a,r;const u=Object.assign(Object.assign(Object.assign({},e),t),{seoProps:{pageId:null!==(r=null===(a=null===(s=e.collectionInfo)||void 0===s?void 0:s.collectionId)||void 0===a?void 0:a.toString())&&void 0!==r?r:"",pageType:121},t:this.t,items:n});return this.service.fetchSEOProps(u,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,A.n)((()=>{var t,n,s;return(0,c.h)(o?(0,l.of)(this.noop()):this.sharingMeta.setCollectionSharingMeta(e,i,null!==(s=null===(n=null===(t=null==e?void 0:e.collectionInfo)||void 0===t?void 0:t.collectionId)||void 0===n?void 0:n.toString())&&void 0!==s?s:""))})))}setSearchSharingSEOProps(e,t,i,o){if(-1===e.statusCode)return(0,l.of)(this.noop());const n=Object.assign(Object.assign(Object.assign({},e),t),{seoProps:{pageType:111},eventName:i,t:this.t});return this.service.fetchSEOProps(n,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((t=>(0,c.h)(this.sharingMeta.setSearchSharingMeta(t,e,i,o)))))}setQuestionSEOProps(e,t,i,o,n,s){var a;if(-1===e.statusCode)return(0,l.of)(this.noop());const r=Object.assign(Object.assign(Object.assign({},e),t),{seoProps:{pageId:null===(a=e.questionInfo)||void 0===a?void 0:a.id,pageType:16},answers:i,t:this.t,items:s});return this.service.fetchSEOProps(r,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((()=>(0,l.of)(this.sharingMeta.setQuestionSharingMeta(e,i[0],o,n)))))}setVideoPlaylistSEOProps(e,t,i,o){var n;if(-1===e.statusCode)return(0,l.of)(this.noop());const s=Object.assign(Object.assign(Object.assign({},e),i),{itemList:t,seoProps:{pageId:null===(n=e.mixInfo)||void 0===n?void 0:n.id,pageType:119},t:this.t});return this.service.fetchSEOProps(s,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((()=>(0,l.of)(this.sharingMeta.setVideoPlaylistSharingMeta(e,t,o)))))}setUserSEOProps(e,t,i,o){const{userInfo:n,statusCode:s}=e;return-1===s?(0,l.of)(this.noop()):(0,l.of)(e).pipe((0,m.E)(this.stateModule.state$),(0,p.Z)((([s,a])=>{var r,l;const u=Object.assign(Object.assign(Object.assign({},e),t),{seoProps:{pageId:null!==(l=null===(r=null==n?void 0:n.user)||void 0===r?void 0:r.id)&&void 0!==l?l:"",pageType:1,abtest:a.abtest},t:this.t,items:o});return this.service.fetchSEOProps(u,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,A.n)((t=>(0,c.h)(this.sharingMeta.setUserSharingMeta(t,e,i)))))})))}setChallengeSEOProps(e,t,i,o,n){var s;const{statusCode:a}=e;if(-1===a)return(0,l.of)(this.noop());const r=Object.assign(Object.assign(Object.assign({},e),t),{statusCode:a,seoProps:{pageId:null===(s=e.challengeInfo)||void 0===s?void 0:s.challenge.id,pageType:3},t:this.t,items:o,relatedChallengeList:n});return this.service.fetchSEOProps(r,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,A.n)((t=>(0,c.h)(this.sharingMeta.setChallengeSharingMeta(t,e,i)))))}setMusicSEOProps(e,t,i,o){var n;const{statusCode:s}=e;if(-1===s)return(0,l.of)(this.noop());const a=Object.assign(Object.assign(Object.assign({},e),t),{statusCode:s,seoProps:{pageId:null===(n=e.musicInfo)||void 0===n?void 0:n.music.id,pageType:4},items:o,t:this.t});return this.service.fetchSEOProps(a,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,A.n)((t=>(0,c.h)(this.sharingMeta.setMusicSharingMeta(t,e,i)))))}setMusicPlaylistSEOProps(e,t,i){var o;const{status_code:n}=e;if(-1===n)return(0,l.of)(this.noop());const s=Object.assign(Object.assign(Object.assign({},e),t),{status_code:n,seoProps:{pageId:null===(o=e.mc_info)||void 0===o?void 0:o.id_str,pageType:17},t:this.t});return this.service.fetchSEOProps(s,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((t=>(0,c.h)(this.sharingMeta.setMusicPlaylistSharingMeta(t,e,i)))))}setSearchSEOProps(e,t,i){const{status_code:o}=e;if(-1===o)return(0,l.of)(this.noop());const n=Object.assign(Object.assign(Object.assign(Object.assign({},e),t),i),{seoProps:{pageId:"",pageType:105},t:this.t});return this.service.fetchSEOProps(n,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,g.T)((()=>this.noop())))}setLiveRoomSEOProps(e,t,i){var o;const{userInfo:n,statusCode:s}=e,a=Object.assign(Object.assign(Object.assign({},e),t),{seoProps:{pageId:null!==(o=null==n?void 0:n.user.id)&&void 0!==o?o:"",pageType:12},t:this.t});return-1===s?(0,l.of)(this.noop()):this.service.fetchSEOProps(a,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((t=>(0,c.h)(this.sharingMeta.setLiveRoomSharingMeta(t,e,i)))))}setFollowingSEOProps(e,t,i){if(-1===e.statusCode)return(0,l.of)(this.noop());const o=Object.assign(Object.assign(Object.assign({},e),t),{seoProps:{pageType:11},t:this.t});return this.service.fetchSEOProps(o,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((e=>(0,c.h)(this.sharingMeta.setFollowingSharingMeta(e,i)))))}setPoiSEOProps(e,t,i,o){var n,s;const{statusCode:a}=e;if(-1===a)return(0,l.of)(this.noop());const r=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),{statusCode:a,seoProps:{pageId:null===(s=null===(n=e.poiInfo)||void 0===n?void 0:n.poi)||void 0===s?void 0:s.id,pageType:18}}),o),{t:this.t});return this.service.fetchSEOProps(r,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((t=>(0,c.h)(this.sharingMeta.setPoiSharingMeta(t,e,i)))))}setPoiCategorySEOProps(e,t,i,o){var n,s;const{statusCode:a}=e;if(-1===a)return(0,l.of)(this.noop());const r=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),{statusCode:a,seoProps:{pageId:null===(s=null===(n=e.poiInfo)||void 0===n?void 0:n.poi)||void 0===s?void 0:s.id,pageType:125}}),o),{t:this.t});return this.service.fetchSEOProps(r,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((t=>(0,c.h)(this.sharingMeta.setPoiSharingMeta(t,e,i)))))}setEventDetailSEOProps(e){return e.pipe((0,v.p)((e=>{const{eventTitle:t,eventId:i,subscriberCount:o,language:n="en"}=e,s={seoProps:{pageId:"",pageType:114},t:this.t,eventTitle:t,language:n,eventId:i,subscriberCount:o};return this.service.fetchSEOProps(s,O).pipe((0,d.M)((e=>this.updateSEOState(e))),(0,p.Z)((()=>(0,l.of)(this.terminate()))),(0,_.W)((()=>(0,l.of)(this.noop()))))})))}reportImpressionByEventbus(e){return this.service.reportImpressionByEventbus(e)}reportImpressionByRpc(e){return this.service.reportImpressionByRpc(e)}};(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],I.prototype,"setPCMusicSEOProps",null),(0,o.__decorate)([(0,n.Mj)({payloadGetter:1}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],I.prototype,"setFeedSEOProps",null),(0,o.__decorate)([(0,n.Mj)({payloadGetter:1}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],I.prototype,"setGoLiveSEOProps",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",u.c)],I.prototype,"setEventDetailSEOProps",null),I=(0,o.__decorate)([(0,s.n)("SEO"),(0,o.__param)(3,(0,a.y)(w.hp)),(0,o.__metadata)("design:paramtypes",[S.p,L.F,T.e,Function])],I)},19331:(e,t,i)=>{i.d(t,{F:()=>m});var o=i(58632),n=i(7672),s=i(340),a=i(57432),r=i.n(a),d=i(23999),l=i(66322),c=i(15203),u=i(91498),p=i(88874),v=i(65450),_=i(55099),g=i(64356);let m=class{constructor(e,t){this.t=e,this.fetch=t}fetchSEOProps(e,t){var i,o,n,s;e.t=this.t;const a=null!==(o=null===(i=(0,l.y)(e,t).seoProps)||void 0===i?void 0:i.metaParams)&&void 0!==o?o:{},r=null!==(s=null===(n=(0,l.d)(e,t).seoProps)||void 0===n?void 0:n.jsonldList)&&void 0!==s?s:[],c=Object.assign(Object.assign({},e.seoProps),{metaParams:a,jsonldList:r});return(0,d.of)(c)}getUA(){return window.navigator.userAgent}getTrafficType(){return(0,c.q)()}getLaunchMode(){return(0,u.o7)()}fetchABTest(e){const t=(0,p.YI)(v.X);return t?(0,d.of)(t):(0,d.of)({pageId:"-1",vidList:[],parameters:{}})}reportImpressionByEventbus(e){}reportImpressionByRpc(e){this.fetch.post("/api/discover/client_impression/",{body:JSON.stringify({timestamp:e.Timestamp,visitPageUrl:e.VisitPageUrl,urls:e.Urls,module:e.Module,trafficType:e.TrafficType}),headers:{"content-type":"application/json"},baseUrlType:2}).subscribe(r())}};m=(0,o.__decorate)([(0,n._)(),(0,o.__param)(0,(0,s.y)(g.hp)),(0,o.__metadata)("design:paramtypes",[Function,_.p])],m)},50789:(e,t,i)=>{i.d(t,{p:()=>A});var o=i(58632),n=i(64162),s=i(4126),a=i(93995),r=i(340),d=i(46657),l=i(23999),c=i(26324),u=i(72916),p=i(74690),v=i(80339),_=i(9472),g=i(17995),m=i(19331);const h=(e="")=>{try{return decodeURI(e)}catch(t){return e}};let A=class extends n.E{constructor(e,t){super(),this.service=e,this.jotaiStore=t,this.defaultState={abtest:void 0,loading:!1,canonical:void 0,pageType:999}}updateAtom(e){this.jotaiStore.set(_.b,e)}setSEOState(e,t){return Object.assign(Object.assign({},e),{metaParams:t.metaParams,jsonldList:t.jsonldList})}setAbTest(e,t){return Object.assign(Object.assign({},e),{abtest:t})}setLoading(e,t){return Object.assign(Object.assign({},e),{loading:t})}setCanonical(e,t){return Object.assign(Object.assign({},e),{canonical:t})}setRouterLoading(e,t){return Object.assign(Object.assign({},e),{routerLoading:t})}fetchAbTest(e){return e.pipe((0,u.n)((e=>h(e)===h(this.state.canonical)?d.w:this.service.fetchABTest(e).pipe((0,u.n)((t=>(0,l.of)(this.getActions().setAbTest(t),this.getActions().setCanonical(e),this.terminate()))),(0,p.Z)(this.getActions().setLoading(!0)),(0,v.q)(this.getActions().setLoading(!1))))))}};(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],A.prototype,"setSEOState",null),(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",Object)],A.prototype,"setAbTest",null),(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",Object)],A.prototype,"setLoading",null),(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",Object)],A.prototype,"setCanonical",null),(0,o.__decorate)([(0,s.HI)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Boolean]),(0,o.__metadata)("design:returntype",Object)],A.prototype,"setRouterLoading",null),(0,o.__decorate)([(0,s.Mj)({payloadGetter:1}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[c.c]),(0,o.__metadata)("design:returntype",void 0)],A.prototype,"fetchAbTest",null),A=(0,o.__decorate)([(0,a.n)("SEOState"),(0,o.__param)(1,(0,r.y)(g.J7)),(0,o.__metadata)("design:paramtypes",[m.F,Object])],A)},99101:(e,t,i)=>{i.d(t,{e:()=>m});var o=i(58632),n=i(4126),s=i(93995),a=i(53966),r=i(340),d=i(8536),l=i(23999),c=i(80339),u=i(26324),p=i(64356),v=i(27375),_=i(64810),g=i(89270);let m=class extends a.E{constructor(e,t){super(),this.t=e,this.stateModule=t,this.defaultState={}}setSharingMetaStateEffect(e){return e.pipe((0,d.Z)((e=>(0,l.of)(this.setSharingMetaState(e)).pipe((0,c.q)(this.terminate("setSharingMetaStateEffect"))))))}setSharingMetaState(e){return this.stateModule.getActions().setSharingMetaState(e)}setVideoSharingMetaEffect(e){return e.pipe((0,d.Z)((({seoProps:e,response:t,appType:i,query:o})=>this.setVideoSharingMeta(e,t,i,o).pipe((0,c.q)(this.terminate("setVideoSharingMetaEffect"))))))}setVideoSharingMeta(e,t,i,o){var n,s,a,r,d,c,u,p,v,_,m,h,A,y,b,f,w,T,L,S;const O=null===(n=t.itemInfo)||void 0===n?void 0:n.itemStruct,I=null==O?void 0:O.video,k=null==O?void 0:O.imagePost,{protocal:P}=(0,g.QJ)(i),j=`${P}${Boolean(null==O?void 0:O.story)?"story/detail":"aweme/detail"}/${null===(s=t.itemInfo)||void 0===s?void 0:s.itemStruct.id}?${o}`,M=(0,g.r1)({schema:j,metaParams:e.metaParams,pageType:0,shareMeta:null==t?void 0:t.shareMeta,response:t,appType:i}),C=(null===(a=null==I?void 0:I.shareCover)||void 0===a?void 0:a[0])||(null!==(p=k?null===(c=null===(d=null===(r=k.shareCover)||void 0===r?void 0:r.imageURL)||void 0===d?void 0:d.urlList)||void 0===c?void 0:c[0]:null===(u=null==I?void 0:I.shareCover)||void 0===u?void 0:u[1])&&void 0!==p?p:""),E=null!==(m=null!==(_=String(null===(v=null==k?void 0:k.shareCover)||void 0===v?void 0:v.imageWidth))&&void 0!==_?_:null==I?void 0:I.width)&&void 0!==m?m:"",V=null!==(y=null!==(A=String(null===(h=null==k?void 0:k.shareCover)||void 0===h?void 0:h.imageHeight))&&void 0!==A?A:null==I?void 0:I.height)&&void 0!==y?y:"",x=Object.assign(Object.assign({},M),{"og:image":C,"twitter:image":C,"og:image:width":E,"og:image:height":V}),F=null===(T=null===(w=null===(f=null===(b=e.jsonldList)||void 0===b?void 0:b.find((e=>"VideoObject"===e[0])))||void 0===f?void 0:f[1])||void 0===w?void 0:w.thumbnailUrl)||void 0===T?void 0:T[0];return Boolean(F)&&Object.assign(x,{"og:image":F,"og:image:width":String(null!==(L=null==I?void 0:I.width)&&void 0!==L?L:""),"og:image:height":String(null!==(S=null==I?void 0:I.height)&&void 0!==S?S:"")}),(0,l.of)(this.stateModule.getActions().setSharingMetaState(x))}setUserSharingMetaEffect(e){return e.pipe((0,d.Z)((({seoProps:e,response:t,appType:i})=>this.setUserSharingMeta(e,t,i).pipe((0,c.q)(this.terminate("setUserSharingMetaEffect"))))))}setUserSharingMeta(e,t,i){var o,n,s,a;const{protocal:r}=(0,g.QJ)(i),d=(0,g.r1)({response:t,pageType:1,schema:`${r}user/profile/`,metaParams:e.metaParams,appType:i}),c=null===(o=t.userInfo)||void 0===o?void 0:o.user,u=null!==(s=null!==(n=null==c?void 0:c.avatarMedium)&&void 0!==n?n:null==c?void 0:c.avatarThumb)&&void 0!==s?s:g.Zw,p=Object.assign(Object.assign({},d),{"og:image":u,"twitter:image":u,"og:image:width":"360","og:image:height":"360","og:image:alt":null===(a=e.metaParams)||void 0===a?void 0:a.title});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(p))}setMusicSharingMetaEffect(e){return e.pipe((0,d.Z)((({seoProps:e,response:t,appType:i})=>this.setMusicSharingMeta(e,t,i).pipe((0,c.q)(this.terminate("setMusicSharingMetaEffect"))))))}setMusicSharingMeta(e,t,i){var o,n,s,a,r,d;const c=null===(o=t.musicInfo)||void 0===o?void 0:o.music,{protocal:u}=(0,g.QJ)(i),p=(0,g.r1)({response:t,pageType:4,schema:`${u}user/profile/${null==c?void 0:c.id}`,metaParams:e.metaParams,appType:i}),v=null!==(s=null!==(n=null==c?void 0:c.coverMedium)&&void 0!==n?n:null==c?void 0:c.coverThumb)&&void 0!==s?s:"https://lf16-tiktok-web.ttwstatic.com/obj/tiktok-web-common-sg/mtact/static/images/music-default.png",_=null!==(a=null==c?void 0:c.title)&&void 0!==a?a:"",m=null!==(r=null==c?void 0:c.authorName)&&void 0!==r?r:"",h=Object.assign(Object.assign({},p),{"og:image":v,"twitter:image":v,"og:image:width":"720","og:image:height":"720","og:image:alt":null===(d=e.metaParams)||void 0===d?void 0:d.title,"music:duration":"0","music:album:track":_,"music:musician":m});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(h))}setMusicPlaylistSharingMeta(e,t,i){var o,n,s,a;const r=t.mc_info,{protocal:d}=(0,g.QJ)(i),c=(0,g.r1)({schema:`${d}assmusic/category/${null==r?void 0:r.id_str}?name=${encodeURIComponent(null!==(o=null==r?void 0:r.name)&&void 0!==o?o:"")}&previous_page=reflow_playlist&enter_method=reflow_return`,metaParams:Object.assign(Object.assign({},e.metaParams),{title:null===(n=null==r?void 0:r.share_info)||void 0===n?void 0:n.share_title,description:null===(s=null==r?void 0:r.share_info)||void 0===s?void 0:s.share_desc}),appType:i}),u=(null==r?void 0:r.share_cover)?(0,v.BO)(null==r?void 0:r.share_cover):"https://p19-aop-sg.tiktokcdn.com/tos-alisg-i-yzb763657w-sg/d2f2b037e19646ad5f2bbd779a550302.png~tplv-yzb763657w-resize:800:800.jpeg",p=Object.assign(Object.assign({},c),{"og:image":u,"twitter:image":u,"og:image:width":"720","og:image:height":"720","og:image:alt":null===(a=e.metaParams)||void 0===a?void 0:a.title});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(p))}setStickerSharingMeta(e,t,i){var o,n,s,a;const{protocal:r}=(0,g.QJ)(i),d=null===(o=t.stickerInfo)||void 0===o?void 0:o.sticker,c=(0,g.r1)({pageType:3,response:t,schema:`${r}sticker/detail/${null==d?void 0:d.id}`,metaParams:e.metaParams,appType:i}),u=null===(s=null===(n=null==d?void 0:d.coverUrls)||void 0===n?void 0:n.urlList)||void 0===s?void 0:s[0],p=Object.assign(Object.assign({},c),{"og:image":u,"twitter:image":u,"og:image:width":"720","og:image:height":"720","og:image:alt":null===(a=e.metaParams)||void 0===a?void 0:a.title});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(p))}setChallengeSharingMetaEffect(e){return e.pipe((0,d.Z)((({seoProps:e,response:t,appType:i})=>this.setChallengeSharingMeta(e,t,i).pipe((0,c.q)(this.terminate("setChallengeSharingMetaEffect"))))))}setChallengeSharingMeta(e,t,i){var o,n,s,a;const{protocal:r}=(0,g.QJ)(i),d=null===(o=t.challengeInfo)||void 0===o?void 0:o.challenge,c=(0,g.r1)({pageType:3,response:t,schema:`${r}challenge/detail/${null==d?void 0:d.id}`,metaParams:e.metaParams,appType:i}),u=null!==(s=null!==(n=null==d?void 0:d.profileMedium)&&void 0!==n?n:null==d?void 0:d.profileThumb)&&void 0!==s?s:"https://lf16-tiktok-web.ttwstatic.com/obj/ttfe-malisg/tiktok_web/amp/m-hashtag-default.png",p=Object.assign(Object.assign({},c),{"og:image":u,"twitter:image":u,"og:image:width":"720","og:image:height":"720","og:image:alt":null===(a=e.metaParams)||void 0===a?void 0:a.title});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(p))}setCollectionSharingMeta(e,t,i){var o,n,s,a,r,d,c;const{protocal:u}=(0,g.QJ)(t),p=e.shareMeta,v=(0,g.r1)({pageType:121,response:e,schema:`${u}collection/detail?collection_id=${i}&page_name=reflow_collection`,metaParams:{title:null!==(o=null==p?void 0:p.title)&&void 0!==o?o:this.t("TikTok | Make Your Day",{},"TikTok | Make Your Day"),description:null!==(n=null==p?void 0:p.desc)&&void 0!==n?n:this.t("SEO_homepage_desc",{},"TikTok - trends start here. On a device or on the web, viewers can watch and discover millions of personalized short videos. Download the app to get started.")},appType:t}),_=null!==(d=null===(r=null===(a=null===(s=null==e?void 0:e.collectionInfo)||void 0===s?void 0:s.cover)||void 0===a?void 0:a.urlList)||void 0===r?void 0:r[0])&&void 0!==d?d:"https://sf-static.tiktokcdn.com/obj/tiktok-web-common-sg/mtact/static/images/tiktok-logo/poster-square.png",m=Object.assign(Object.assign({},v),{"og:image":_,"twitter:image":_,"og:image:width":"720","og:image:height":"720","og:image:alt":null===(c=e.shareMeta)||void 0===c?void 0:c.title});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(m))}setSearchSharingMeta(e,t,i,o){var n,s,a,r;const{protocal:d}=(0,g.QJ)(o),c=(0,g.r1)({schema:`${d}search?keyword=${null!==(s=null===(n=null==t?void 0:t.contentInfo)||void 0===n?void 0:n.query)&&void 0!==s?s:i}`,metaParams:e.metaParams,appType:o}),u=null!==(r=null===(a=null==t?void 0:t.contentInfo)||void 0===a?void 0:a.thirdPartyPreviewImg)&&void 0!==r?r:"https://sf-static.tiktokcdn.com/obj/search-static-maliva/maliva/ugvonpsj1631257573250",p=Object.assign(Object.assign({},c),{"og:image":u,"twitter:image":u,"og:image:width":"1200","og:image:height":"678"});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(p))}setLiveRoomSharingMeta(e,t,i){var o,n,s,a,r,d,c;const{protocal:u}=(0,g.QJ)(i),p=(0,g.r1)({schema:`${u}live?room_id=${null===(n=null===(o=t.userInfo)||void 0===o?void 0:o.user)||void 0===n?void 0:n.roomId}`,metaParams:e.metaParams,pageType:12,appType:i}),v=null===(s=t.userInfo)||void 0===s?void 0:s.user,_=null!==(r=null!==(a=null==v?void 0:v.avatarMedium)&&void 0!==a?a:null==v?void 0:v.avatarThumb)&&void 0!==r?r:g.Zw,m=null!==(d=null==v?void 0:v.nickname)&&void 0!==d?d:null==v?void 0:v.uniqueId,h=null==v?void 0:v.uniqueId,A=Object.assign(Object.assign({},p),{"og:image":_,"og:image:secure_url":_,"og:image:width":"360","og:image:height":"360","og:image:alt":null===(c=e.metaParams)||void 0===c?void 0:c.title,"twitter:creator":m,"twitter:creator:id":h});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(A))}setQuestionSharingMeta(e,t,i,o){var n,s,a,r,d,l,c,u,p;const{protocal:v}=(0,g.QJ)(i),_=(0,g.r1)({schema:`${v}qna/detail/${null===(n=e.questionInfo)||void 0===n?void 0:n.id}`,metaParams:{title:null===(s=e.shareMeta)||void 0===s?void 0:s.title,description:null===(a=e.shareMeta)||void 0===a?void 0:a.desc},pageType:16,response:e,appType:i}),m="qna"===(null==o?void 0:o.scene)?{"og:title":this.t("qaoop_title",{},"Hi friends, I’m inviting you to answer a question on #TikTok!"),"og:description":this.t("qaoop_desc",{},"Share your wisdom!")}:void 0,h=null!==(c=null!==(d=null===(r=null==t?void 0:t.video.shareCover)||void 0===r?void 0:r[1])&&void 0!==d?d:null===(l=null==t?void 0:t.video.shareCover)||void 0===l?void 0:l[0])&&void 0!==c?c:g.Zw,A=Object.assign(Object.assign(Object.assign({},_),{"og:image":h,"twitter:image":h,"og:image:alt":null!==(p=null===(u=e.shareMeta)||void 0===u?void 0:u.title)&&void 0!==p?p:"the cover of first video"}),m);return this.stateModule.getActions().setSharingMetaState(A)}setVideoPlaylistSharingMeta(e,t,i){var o,n,s,a,r,d,l,c,u;const{protocal:p}=(0,g.QJ)(i),v=`@${null===(n=null===(o=e.mixInfo)||void 0===o?void 0:o.creator)||void 0===n?void 0:n.nickname}`,_=null!==(a=null===(s=e.mixInfo)||void 0===s?void 0:s.name)&&void 0!==a?a:"Untitled playlist",m=(0,g.r1)({schema:`${p}mix/detail?id=${null!==(d=null===(r=e.mixInfo)||void 0===r?void 0:r.id)&&void 0!==d?d:"nan"}`,metaParams:{title:this.t("playlist_share_title",{Playlist_name:_,username:v},`Playlist ${_} created by ${v}`),description:this.t("playlist_share_desc",{},"Enjoy a curated video list and find more videos on TikTok!")},pageType:119,response:e,appType:i}),[h]=null!=t?t:[],A=null!==(c=null===(l=null==h?void 0:h.video.shareCover)||void 0===l?void 0:l[1])&&void 0!==c?c:null===(u=null==h?void 0:h.video.shareCover)||void 0===u?void 0:u[0],y=Object.assign(Object.assign({},m),{"og:image":A,"twitter:image":A,"og:image:alt":`first video of ${_}`});return this.stateModule.getActions().setSharingMetaState(y)}setFollowingSharingMeta(e,t){const i=(0,g.r1)({metaParams:e.metaParams,appType:t}),o=Object.assign(Object.assign({},i),{"og:title":this.t("serp_following_title"),"og:description":this.t("serp_following_desc"),"og:image":g.Zw,"twitter:image":g.Zw,"twitter:title":this.t("SEO_following_title"),"twitter:description":this.t("SEO_following_desc")});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(o))}setPoiSharingMeta(e,t,i){var o;const{protocal:n}=(0,g.QJ)(i),s=null===(o=t.poiInfo)||void 0===o?void 0:o.poi,a=(0,g.r1)({pageType:18,response:t,schema:`${n}poi/detail?poi_id=${null==s?void 0:s.id}`,metaParams:e.metaParams,appType:i});return(0,l.of)(this.stateModule.getActions().setSharingMetaState(a))}};(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],m.prototype,"setSharingMetaStateEffect",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],m.prototype,"setVideoSharingMetaEffect",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],m.prototype,"setUserSharingMetaEffect",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],m.prototype,"setMusicSharingMetaEffect",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],m.prototype,"setChallengeSharingMetaEffect",null),m=(0,o.__decorate)([(0,s.n)("SharingMeta"),(0,o.__param)(0,(0,r.y)(p.hp)),(0,o.__metadata)("design:paramtypes",[Function,_.J])],m)},64810:(e,t,i)=>{i.d(t,{J:()=>c});var o=i(58632),n=i(64162),s=i(4126),a=i(93995),r=i(19794),d=i.n(r),l=i(89270);let c=class extends n.E{constructor(){super(...arguments),this.defaultState={value:{}}}setSharingMetaState(e,t){var i;e.value=d()(t,{"og:image":l.Zw,"twitter:image":null!==(i=t["og:image"])&&void 0!==i?i:l.Zw})}};(0,o.__decorate)([(0,s.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],c.prototype,"setSharingMetaState",null),c=(0,o.__decorate)([(0,a.n)("SharingMetaState")],c)},89270:(e,t,i)=>{i.d(t,{QJ:()=>n,Zw:()=>a,r1:()=>s});var o=i(33440);function n(e){const t="m"===e;return{isM:t,protocal:t?"snssdk1233://":"snssdk1180://"}}function s(e){var t,i,s,a;const{schema:r="",pageType:d,shareMeta:l,metaParams:c,appType:u}=e,p=n(u),{isM:v}=p,{APP_INFO:_}=o.r,g=v?_.M_NAME:_.T_NAME,m=v?_.M_STORE:_.T_STORE,h=v?_.M_PACKAGE:_.T_PACKAGE,A=0===d?null!==(t=null==l?void 0:l.title)&&void 0!==t?t:"":null!==(i=null==c?void 0:c.title)&&void 0!==i?i:"",y=0===d?null!==(s=null==l?void 0:l.desc)&&void 0!==s?s:"":null!==(a=null==c?void 0:c.description)&&void 0!==a?a:"",b={"al:ios:url":r,"al:android:url":r,"al:ios:app_store_id":m,"al:ios:app_name":g,"al:android:app_name":g,"al:android:package":h},f={"og:site_name":"TikTok","og:type":"website","og:title":A,"og:description":y,"fb:app_id":v?_.M_FACEBOOK_ID:_.T_FACEBOOK_ID},w={"twitter:app:id:iphone":m,"twitter:app:id:googleplay":h,"twitter:card":"summary","twitter:site":"TikTok","twitter:title":A,"twitter:description":y};return Object.assign(Object.assign(Object.assign({},b),f),w)}const a="https://lf16-tiktok-web.ttwstatic.com/obj/tiktok-web-common-sg/mtact/static/images/share_img.png"},55306:(e,t,i)=>{i.d(t,{U:()=>E});var o=i(58632),n=i(4126),s=i(93995),a=i(340),r=i(23999),d=i(46657),l=i(68628),c=i(9543),u=i(26324),p=i(72916),v=i(95719),_=i(8536),g=i(64468),m=i(24451),h=i(62564),A=i(20259),y=i(74690),b=i(35572),f=i(34360),w=i(97792),T=i(8046),L=i(11983),S=i(53966),O=i(84908),I=i(79123),k=i(55322),P=i(22248),j=i(64356),M=i(27375),C=i(91543);let E=class extends S.E{constructor(e,t){super(),this.service=e,this.t=t,this.defaultState={users:{},stats:{}}}multiSetUser(e,t){(0,O.Gp)().multiSetUser(t)}setUser(e,t){(0,O.Gp)().setUser(t)}setUserRelation(e,t){(0,O.Gp)().setUserRelation(t)}setUserStats(e,t){(0,O.Gp)().setUserStats(t)}multiSetUserStats(e,t){(0,O.Gp)().multiSetUserStats(t)}getUserDetail(e){return e.pipe((0,p.n)((e=>this.service.getUserDetail(e).pipe((0,v.M)((e=>{(0!==e.statusCode&&10222!==e.statusCode||!e.userInfo)&&console.warn("Get user detail failed for getting wrong response")})),(0,_.Z)((e=>0!==e.statusCode&&10222!==e.statusCode||!e.userInfo?d.w:(0,r.of)(this.getActions().setUser(Object.assign(Object.assign({},e.userInfo.user),{extraInfo:{statusCode:e.statusCode}})),this.getActions().setUserStats({stats:Object.assign(Object.assign({},e.userInfo.stats),{needFix:!1}),uniqueId:e.userInfo.user.uniqueId})))),(0,k.n)({})))))}postCommitFollowUser(e){return e.pipe((0,g.$)((({uniqueId:e})=>e)),(0,_.Z)((e=>e.pipe((0,m.E)(this.state$),(0,h.T)((([e,t])=>{const i=t.users[e.uniqueId],{id:n,secUid:s="",relation:a=-1}=i,r=(0,I.gN)(a),d={type:1===r?1:0,action_type:1===r?1:0,user_id:n,sec_user_id:s,from:18,channel_id:0,from_pre:0},{uniqueId:l,useFollowV2:c,group_id:u,enter_method:p="click_direct_btn",action_position:v}=e;return{query:d,type:r,group_id:u,enter_method:p,action_position:v,restReportParams:(0,o.__rest)(e,["uniqueId","useFollowV2","group_id","enter_method","action_position"]),id:n,uniqueId:l,useFollowV2:c,relation:a,targetUser:i}})),(0,p.n)((({query:e,group_id:t,enter_method:i,action_position:o,restReportParams:n,id:s,uniqueId:a,useFollowV2:r,relation:d,targetUser:c})=>(r?this.service.postCommitFollowUserV2(e):this.service.postCommitFollowUser(e)).pipe((0,A.W)((e=>(0,l.H)(e.json()))),(0,h.T)((e=>Object.assign({status_code:null==e?void 0:e.status_code,follow_status:null==e?void 0:e.follow_status},e))),(0,v.M)((({status_code:a,follow_status:r})=>{if(24===a?L.F.open({content:this.t("inbox_follow_failed_banned"),duration:3,widthType:"half"}):-1===a?L.F.open({content:this.t("inbox_follow_failed_noconnection"),duration:3,widthType:"half"}):0!==a?L.F.open({content:this.t("inbox_follow_failed_other"),duration:3,widthType:"half"}):(0,P.G)(a,[24,-1,0]),w.t.handleFollowUser(Object.assign(Object.assign({},n),{status_code:a,follow_status:r,group_id:t,enter_method:i,action_position:o,to_user_id:s,author_id:s,follow_type:2===r?"mutual":"single",is_private:4===r?1:0}),e.type),n.is_ad_event&&n.tag&&n.value&&n.log_extra&&0===e.type){const{tag:e,value:t,log_extra:i}=n;T.pg.handleFollowCancel({log_extra:i,tag:e,value:t,is_ad_event:"1"})}})),(0,h.T)((({follow_status:e,status_code:t})=>0===t?this.getActions().setUserRelation({uniqueId:a,relation:M.i0[e],shouldUpdateFollowed:!0}):this.getActions().setUserRelation({uniqueId:a,relation:d}))),(0,y.Z)(this.getActions().setUserRelation({uniqueId:a,relation:(0,I.A7)({current:d,targetUser:c})})),(0,k.n)({}))))))))}blockOrUnblockUser(e){return e.pipe((0,b.p)((({secUid:e,isBlock:t,uniqueId:i})=>this.service.blockUser({sec_user_id:null!=e?e:"",block_type:t?0:1}).pipe((0,v.M)((({status_code:e})=>{0===e&&L.F.open({content:this.t(t?"webapp_mig_unblocked":"webapp_mig_blocked"),duration:3,e2eTag:"block-toast"})})),(0,h.T)((({status_code:e})=>0===e?this.getActions().setUserRelation({uniqueId:i,relation:t?0:4}):this.noop())),(0,k.n)({})))))}getLiveStatus(e){return e.pipe((0,p.n)((()=>(0,c.Y)(6e5).pipe((0,m.E)(this.state$),(0,h.T)((([e,{users:t}])=>Object.values(t).filter((e=>Boolean(null==e?void 0:e.roomId))))),(0,_.Z)((e=>(0,r.of)(...e.map((e=>this.getActions().getUserDetail({secUid:null==e?void 0:e.secUid}))))))))))}};E.jotaiAtom=O.p9,(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"multiSetUser",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"setUser",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"setUserRelation",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"setUserStats",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"multiSetUserStats",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"getUserDetail",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"postCommitFollowUser",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"blockOrUnblockUser",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[u.c]),(0,o.__metadata)("design:returntype",void 0)],E.prototype,"getLiveStatus",null),E=(0,o.__decorate)([(0,s.n)("UserModule"),(0,o.__param)(1,(0,a.y)(j.hp)),(0,o.__metadata)("design:paramtypes",[C.D,Function])],E),O.p9.__SIGI_MODULE__=E,(0,f.y)(E)},91543:(e,t,i)=>{i.d(t,{D:()=>l});var o=i(58632),n=i(7672),s=i(23999),a=i(26325),r=i(55099),d=i(97487);let l=class{constructor(e){this.fetch=e}getUserDetail(e){const t=(0,d.Ni)("userDetail");return t?(0,s.of)(t):this.fetch.get("/api/user/detail/",{query:e,baseUrlType:2})}postCommitFollowUser(e){return this.fetch.post("/api/commit/follow/user/",{query:Object.assign(Object.assign({},e),{fromWeb:1}),baseUrlType:2,headers:{[a.nk]:this.fetch.csrfToken}})}postCommitFollowUserV2(e){return this.fetch.post("/api/follow/",{signal:(new AbortController).signal,query:Object.assign(Object.assign({},e),{fromWeb:1}),baseUrlType:2,headers:{[a.nk]:this.fetch.csrfToken}})}blockUser(e){return this.fetch.post("/api/user/block/",{query:Object.assign(Object.assign({},e),{source:3}),baseUrlType:2,headers:{[a.nk]:this.fetch.csrfToken}})}};l=(0,o.__decorate)([(0,n._)(),(0,o.__metadata)("design:paramtypes",[r.p])],l)},50834:(e,t,i)=>{i.d(t,{t:()=>a});var o=i(14285),n=i(57432),s=i.n(n);const a={provide:(0,i(80798).U)("FirstVideoCover@tiktok/fe-shared",(()=>new o.n("FirstVideoCover"))),useValue:s()}},79983:(e,t,i)=>{i.d(t,{D:()=>R,O:()=>U});var o=i(58632),n=i(4126),s=i(93995),a=i(340),r=(i(16378),i(45537)),d=i.n(r),l=i(300),c=i.n(l),u=i(23999),p=i(63700),v=i(26324),_=i(20259),g=i(72916),m=i(62564),h=i(80339),A=i(24451),y=i(35572),b=i(8536),f=i(95719),w=i(45525),T=i(74690),L=i(76435),S=i(34360),O=i(17995),I=i(65852),k=i(11983),P=i(53966),j=i(91286),M=i(2408),C=i(97086),E=i(64356),V=i(45297),x=i(59952),F=i(52333),W=i(50834),B=i(14576),$=i(54888);let U=class extends P.E{constructor(e,t,i,o,n,s,a){super(),this.service=e,this.item=t,this.videoMask=i,this.bizContext=o,this.jotaiStore=n,this.t=s,this.getFirstVideoCover=a,this.defaultState={},this.createItemListErrorCatcher=e=>t=>t.pipe((0,_.W)((t=>(k.F.destroy(),k.F.open({content:this.t("server_error_title"),duration:3,widthType:"padding"}),null==e||e(t),(0,u.of)({statusCode:-1})))))}resetItemList(e,t){const{key:i,hasMore:o=!0,loading:n=!0,cursor:s="0"}=t;e[i]={list:[],browserList:[],loading:n,statusCode:0,hasMore:o,cursor:s,preloadList:[]}}addItemList(e,t){var i;const{key:o,list:n,statusCode:s=0,hasMore:a,hasMorePrevious:r,hasMoreLatest:l,cursor:u,level:p,preloadList:v,addToHead:_,liveCardDisplay:g,unviewedCursor:m,viewedCursor:h,unique:A=!0}=t,y="topic"===o||"messages"===o;e[o]||(e[o]={list:[],browserList:[],loading:!1,statusCode:s,hasMore:Boolean(a),cursor:u,preloadList:[]});const b=e[o].list,f=A?c()(n,"id").filter((e=>!b.includes(e.id))):n;if(_)e[o].list.unshift(...f.map((({id:e})=>e))),e[o].browserList=[...(0,j.bp)({list:f}),...e[o].browserList];else{const t=d()(e[o].list,f.map((({id:e})=>e)));A?(e[o].list=y?b.concat(n.map((({id:e})=>e))):t,e[o].browserList=y?e[o].browserList.concat((0,j.bp)({list:n})):d()(e[o].browserList,(0,j.bp)({list:f}))):(e[o].list=n.map((({id:e})=>e)),e[o].browserList=(0,j.bp)({list:f}))}e[o].statusCode=s,e[o].hasMore=a,e[o].cursor=u,e[o].level=p,e[o].liveCardDisplay=g,e[o].preloadList=(null!==(i=e[o].preloadList)&&void 0!==i?i:[]).concat(null!=v?v:[]),"creator_tab"===o&&(e[o].hasMorePrevious=null!=r?r:e[o].hasMorePrevious,e[o].hasMoreLatest=null!=l?l:e[o].hasMoreLatest),"friends"===o&&(e[o].unviewedCursor=null!=m?m:e[o].unviewedCursor,e[o].viewedCursor=null!=h?h:e[o].viewedCursor)}setItemListById(e,t){const{key:i,list:o,statusCode:n=0,hasMore:s=!0,cursor:a,level:r}=t;e[i]||(e[i]={list:[],browserList:[],loading:!1,statusCode:n,hasMore:Boolean(s),cursor:a,preloadList:[]}),e[i].list=o,e[i].browserList=o,e[i].statusCode=n,e[i].hasMore=s,e[i].cursor=a,e[i].level=r}removeItemListById(e,t){var i;const{key:o,groupId:n}=t;(null===(i=e[o])||void 0===i?void 0:i.list)&&(e[o].list=e[o].list.filter((e=>e!==n)))}setLoading(e,t){const{loading:i,key:o}=t;e[o]||(e[o]={list:[],browserList:[],loading:i,statusCode:0,hasMore:!0,cursor:"0"}),e[o].loading=i}setListKeyword(e,t){const{keyword:i,key:o}=t;e[o]||(e[o]={keyword:i,list:[],browserList:[],loading:!1,statusCode:0,hasMore:!0,cursor:"0"}),e[o].keyword=i}getTopicList(e){return e.pipe((0,g.n)((({topic:e,abTestVersion:t,user:i,language:o})=>this.service.getTopicList({topic:e,language:o,count:V.Uw,aid:V.xE}).pipe((0,m.T)((e=>Object.assign(Object.assign({},e),{hasMore:!0}))),this.createItemListErrorCatcher(),this.handleListData({key:"topic",abTestVersion:t,user:i,language:o}),(0,h.q)(this.terminate())))))}getFollowingList(e){return e.pipe((0,A.E)(this.state$,this.bizContext.state$),(0,y.p)((([{pullType:e=1,abTestVersion:t,user:i,language:o},n,s])=>{var a,r,d;const{cursor:l="",level:c=1}=null!==(a=n.following)&&void 0!==a?a:{};return this.service.getFollowingList({aid:V.xE,count:V.rd,language:o,cursor:l,pullType:e,level:c,isResetCounterUsed:!0,isNonPersonalized:!(0,C.fU)()&&(0,M.PJ)(this.jotaiStore.get(M.WH)),coverFormat:null===(d=null===(r=s.bizContext)||void 0===r?void 0:r.videoCoverSettings)||void 0===d?void 0:d.format,clientABVersions:null==t?void 0:t.versionName}).pipe(this.createItemListErrorCatcher(),this.handleListData({key:"following",language:o,user:i,abTestVersion:t}))})))}getFriendsList(e){return e.pipe((0,A.E)(this.state$,this.bizContext.state$),(0,y.p)((([{pullType:e=1,abTestVersion:t,user:i,language:o},n,s])=>{var a,r,d;const{unviewedCursor:l="0",viewedCursor:c="0",level:u=1}=null!==(a=n.friends)&&void 0!==a?a:{};return this.service.getFriendsList({aid:V.xE,count:V.Ly,language:o,unviewedCursor:l,viewedCursor:c,pullType:e,level:u,isResetCounterUsed:!0,isNonPersonalized:!(0,C.fU)()&&(0,M.PJ)(this.jotaiStore.get(M.WH)),coverFormat:null===(d=null===(r=s.bizContext)||void 0===r?void 0:r.videoCoverSettings)||void 0===d?void 0:d.format,clientABVersions:null==t?void 0:t.versionName}).pipe(this.createItemListErrorCatcher(),this.handleListData({key:"friends",language:o,user:i,abTestVersion:t}))})))}getQuestionList(e){return e.pipe((0,b.Z)((e=>this.getQuestionList$(e))))}getQuestionList$(e){return(0,u.of)(e).pipe((0,A.E)(this.state$),(0,y.p)((([{questionID:e,abTestVersion:t,language:i,user:o},n])=>{var s,a;return this.service.getQuestionList({questionID:e,language:i,cursor:null!==(a=null===(s=n.question)||void 0===s?void 0:s.cursor)&&void 0!==a?a:"0",aid:V.xE,count:V.vu}).pipe(this.createItemListErrorCatcher(),this.handleListData({key:"question",abTestVersion:t,language:i,user:o}))})))}getPlaylistVideoList(e){return e.pipe((0,b.Z)((e=>this.getPlaylistVideoList$(e))))}getPlaylistVideoList$(e,t){return(0,u.of)(e).pipe((0,A.E)(this.state$),(0,y.p)((([{mixId:e,key:i,abTestVersion:o,language:n,user:s,isPlayList:a},r])=>{var d,l;return this.service.getPlaylistVideoList({mixId:e,language:n,cursor:null!==(l=null===(d=r[null!=i?i:e])||void 0===d?void 0:d.cursor)&&void 0!==l?l:"0",aid:V.xE,count:V.vu}).pipe(this.createItemListErrorCatcher(),(0,f.M)((e=>{var i;return null===(i=null==t?void 0:t.onVideoList)||void 0===i?void 0:i.call(t,e.itemList)})),this.handleListData({key:null!=i?i:e,abTestVersion:o,language:n,user:s,isPlayList:a}))})))}getCollectionList(e){return e.pipe((0,b.Z)((e=>this.getCollectionList$(e))))}getCollectionList$(e){return(0,u.of)(e).pipe((0,A.E)(this.state$),(0,y.p)((([{collectionId:e,abTestVersion:t,language:i,user:o},n])=>{var s,a;return this.service.getCollectionList({collectionId:e,language:i,cursor:null!==(a=null===(s=n.collection)||void 0===s?void 0:s.cursor)&&void 0!==a?a:"0",aid:V.xE,count:V.vu,sourceType:113}).pipe(this.createItemListErrorCatcher(),this.handleListData({key:"collection",abTestVersion:t,language:i,user:o}))})))}getUserVideoListByType(e){return e.pipe((0,b.Z)((e=>this.getUserVideoListByType$(e))))}getUserVideoListByType$(e){return(0,u.of)(e).pipe((0,A.E)(this.state$),(0,g.n)((([{count:e=V.VD,postItemType:t=2,key:i,abTestVersion:o,language:n,user:s},a])=>{var r,d;const l={appId:V.xE,count:e,cursor:null!==(d=null===(r=a[i])||void 0===r?void 0:r.cursor)&&void 0!==d?d:"0",language:n,postItemType:t};return this.service.getUserPostListByType(l).pipe(this.createItemListErrorCatcher(),this.handleListData({key:i,abTestVersion:o,language:n,user:s,otherInfo:{secUid:null==s?void 0:s.secUid}}))})))}getPoiList(e){return e.pipe((0,b.Z)((e=>this.getPoiList$(e))))}getPoiList$(e){return(0,u.of)(e).pipe((0,A.E)(this.state$),(0,y.p)((([{poiId:e,abTestVersion:t,language:i,user:o},n])=>{var s,a;return this.service.getPoiList({poiId:e,language:i,cursor:null!==(a=null===(s=n.poi)||void 0===s?void 0:s.cursor)&&void 0!==a?a:"0",aid:V.xE,count:V.vu}).pipe(this.createItemListErrorCatcher(),this.handleListData({key:"poi",abTestVersion:t,user:o,language:i}))})))}setDeleteVideo(e,t){for(const i of Object.keys(e)){const o=e[i];if(o){const n=o.list.filter((e=>e!==t));e[i].list=n,e[i].browserList=o.browserList.filter((e=>e!==t))}}}deleteLiveItem(e,t){for(const i of Object.keys(e)){const o=e[i];if(o){const e=o.list.filter((e=>e!==t));o.list=e,o.browserList=o.browserList.filter((e=>e!==t))}e[i]=o}}setList(e){return e.pipe((0,A.E)(this.state$,this.videoMask.state$),(0,f.M)((([{key:e,response:t,disableReportMore:i=!1,isPlayList:o=!1},n])=>{var s,a,r;(null!==(a=null===(s=n[e])||void 0===s?void 0:s.list)&&void 0!==a?a:[]).length&&!i&&I.L.handleListMore({is_success:(null===(r=t.itemList)||void 0===r?void 0:r.length)?1:0,error_code:t.statusCode,popup_type:o?"playlist":void 0})})),(0,m.T)((([{key:e,response:t,otherInfo:i,user:o},n,s])=>{var a,r;const d=null!==(r=null!==(a=t.itemList)&&void 0!==a?a:t.items)&&void 0!==r?r:[];return t.itemList||(t.itemList=d),1!==(null==o?void 0:o.photoSensitiveVideosSetting)&&(o||1!==s.photoSensitiveVideosSetting)||"user-post"===e&&(null==o?void 0:o.secUid)===(null==i?void 0:i.secUid)||!("video"!==e||d.length>1)||(t.itemList=d.filter((e=>2===e.containerType||4!==(null==e?void 0:e.maskType)))),t.itemList=t.itemList.map((e=>{var t;return(0,j.Jl)(e)&&(e.id=(0,j.Qw)(null===(t=e.liveRoomInfo)||void 0===t?void 0:t.roomID)),e})),{key:e,response:t,otherInfo:i}})),(0,f.M)((({key:e,response:t})=>{})),(0,b.Z)((({key:e,response:t,otherInfo:i})=>{const{log_pb:o,itemList:n=[],statusCode:s=0,hasMore:a=!1,hasMorePrevious:r,liveCardDisplay:d,hasMoreLatest:l,cursor:c="0",level:p,viewedCursor:v="0",unviewedCursor:_="0"}=t,g=n.filter((e=>2!==e.containerType)).map((e=>{var t,i,o,n;return{url:null!==(i=null===(t=e.video)||void 0===t?void 0:t.playAddr)&&void 0!==i?i:"",id:null!==(n=null===(o=e.video)||void 0===o?void 0:o.id)&&void 0!==n?n:""}}));return 0===s&&"creator_tab"===e?(0,u.of)(...this.item.addItems(n,null==o?void 0:o.impr_id),this.getActions().addItemList({key:e,list:n,statusCode:s,hasMore:a,hasMorePrevious:r,hasMoreLatest:l,preloadList:g,addToHead:null==i?void 0:i.addToHead})):0!==s&&10404!==s||"friends"!==e?0===s||10404===s?(0,u.of)(...this.item.addItems(n,null==o?void 0:o.impr_id),this.getActions().addItemList({key:e,list:n,statusCode:s,hasMore:a,cursor:c,level:p,preloadList:g,liveCardDisplay:d})):(0,u.of)(this.getActions().addItemList({key:e,list:[],statusCode:s,hasMore:!0,preloadList:g})):(0,u.of)(...this.item.addItems(n,null==o?void 0:o.impr_id),this.getActions().addItemList({key:e,list:n,statusCode:s,hasMore:a,level:p,preloadList:g,addToHead:null==i?void 0:i.addToHead,viewedCursor:v,unviewedCursor:_}))})))}handleListData({key:e,language:t,user:i,otherInfo:o,onResponse:n,isPlayList:s}){return a=>a.pipe((0,w.w)(V.LA),(0,b.Z)((a=>{var r;return(0,p.h)((0,u.of)(this.getActions().setList({key:e,response:a,otherInfo:o,language:t,user:i,isPlayList:s})),null!==(r=null==n?void 0:n(a))&&void 0!==r?r:(0,u.of)(this.noop()))})),(0,T.Z)(this.getActions().setLoading({key:e,loading:!0})),(0,h.q)(this.getActions().setLoading({key:e,loading:!1})),(0,L.Q)(this.dispose$))}};(0,o.__decorate)([(0,n.uk)(),(0,o.__metadata)("design:type",v.c)],U.prototype,"dispose$",void 0),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"resetItemList",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"addItemList",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"setItemListById",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"removeItemListById",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"setLoading",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"setListKeyword",null),(0,o.__decorate)([(0,n.Mj)({payloadGetter:1,skipFirstClientDispatch:!1}),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"getTopicList",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"getFollowingList",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"getFriendsList",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"getQuestionList",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"getPlaylistVideoList",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",v.c)],U.prototype,"getCollectionList",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"getUserVideoListByType",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"getPoiList",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"setDeleteVideo",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"deleteLiveItem",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[v.c]),(0,o.__metadata)("design:returntype",void 0)],U.prototype,"setList",null),U=(0,o.__decorate)([(0,s.n)("ItemList"),(0,o.__param)(4,(0,a.y)(O.J7)),(0,o.__param)(5,(0,a.y)(E.hp)),(0,o.__param)(6,(0,a.y)(W.t.provide)),(0,o.__metadata)("design:paramtypes",[B.j,F.k,x.w,$.$,Object,Function,Function])],U);const R=(0,S.y)(U)},14576:(e,t,i)=>{i.d(t,{j:()=>p});var o=i(58632),n=i(7672),s=i(68628),a=i(20259),r=i(68881),d=i(55099),l=i(11654),c=i(50834),u=i(97895);let p=class{constructor(e,t){this.fetch=e,this.slardar=t}getCollectionList(e){return this.fetch.get("/api/collection/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getRecommendList(e){const t=(0,r.t$)("recommendItemList");if(t)return(0,s.H)(t);const i=(0,r.DV)("recommendItemList");return i?(this.slardar.emitEvent("consume_prefetch_data",{now:performance.now()},{status:"unknown",from:"recommendItemList"}),(0,s.H)(i).pipe((0,a.W)((()=>(this.slardar.emitEvent("consume_prefetch_data",{now:performance.now()},{status:"fail",from:"recommendItemList"}),this.fetch.get("/api/recommend/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})))))):this.fetch.get("/api/recommend/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getTopicList(e){return this.fetch.get("/api/topic/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getFollowingList(e){return this.fetch.get("/api/following/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getFriendsList(e){return this.fetch.get("/api/friends/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getQuestionList(e){return this.fetch.get("/api/question/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getPlaylistVideoList(e){return this.fetch.get("/api/mix/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getChallengeList(e){return this.fetch.get("/api/challenge/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getUserPostList(e){const t=(0,r.t$)("userPostList");if(t)return(0,s.H)(t);const i=(0,r.DV)("userPostList");return i?(this.slardar.emitEvent("consume_prefetch_data",{now:performance.now()},{status:"unknown",from:"userPostList"}),(0,s.H)(i).pipe((0,a.W)((t=>(console.log("-===error",t),this.slardar.emitEvent("consume_prefetch_data",{now:performance.now()},{status:"fail",from:"userPostList"}),this.fetch.get("/api/post/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})))))):this.fetch.get("/api/post/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getUserPostListByType(e){return this.fetch.get("/api/post/item_list/v1/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getUserPostListBiDirection(e){return this.fetch.get("/api/creator/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getUserLikedList(e){return this.fetch.get("/api/favorite/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getUserFavoriteList(e){return this.fetch.get("/api/user/collect/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getPoiList(e){return this.fetch.get("/api/poi/item_list/",{query:Object.assign(Object.assign({},e),{clientABVersions:(0,u.v)().join(",")}),baseUrlType:2})}getExploreList(e){const t=(0,r.DV)("exploreItemList");return t?(this.slardar.emitEvent("consume_prefetch_data",{now:performance.now()},{status:"unknown",from:"exploreItemList"}),(0,s.H)(t).pipe((0,a.W)((()=>(this.slardar.emitEvent("consume_prefetch_data",{now:performance.now()},{status:"fail",from:"exploreItemList"}),this.fetch.get("/api/explore/item_list/",{query:e,baseUrlType:2})))))):this.fetch.get("/api/explore/item_list/",{query:e,baseUrlType:2})}getFeedCacheList(e){return this.fetch.get("/api/preload/item_list/",{query:e,baseUrlType:2})}checkItemValidation(e){return this.fetch.get("/api/item/availability/",{query:e,baseUrlType:2})}};p=(0,o.__decorate)([(0,n._)({providers:[c.t]}),(0,o.__metadata)("design:paramtypes",[d.p,l.V$])],p)},52333:(e,t,i)=>{i.d(t,{k:()=>Z,t:()=>G});var o=i(58632),n=i(4126),s=i(93995),a=i(340),r=i(87933),d=i(23999),l=i(87662),c=i(46657),u=i(68628),p=i(26324),v=i(72916),_=i(24451),g=i(62564),m=i(8536),h=i(95719),A=i(74690),y=i(64468),b=i(78288),f=i(36166),w=i(20259),T=i(34360),L=i(17995),S=i(60072),O=i(10287),I=i(6986),k=i(97071),P=i(24154),j=i(25342),M=i(67974),C=i(11983),E=i(53966),V=i(57431),x=i(55322),F=i(64356),W=i(91286),B=i(45297),$=i(55306),U=i(7672),R=i(26325),q=i(55099);let D=class{constructor(e){this.fetch=e}postLikeVideo(e){return this.fetch.post("/api/commit/item/digg/",{query:e,baseUrlType:2,headers:{[R.nk]:this.fetch.csrfToken}})}postDislikeVideo(e){return this.fetch.post("/api/dislike/item/",{query:e,baseUrlType:2,headers:{[R.nk]:this.fetch.csrfToken}})}collectVideo(e){return this.fetch.post("/api/item/collect/",{query:e,baseUrlType:2,headers:{[R.nk]:this.fetch.csrfToken}})}};D=(0,o.__decorate)([(0,U._)(),(0,o.__metadata)("design:paramtypes",[q.p])],D);var N=i(53764);let Z=class extends E.E{constructor(e,t,i,o){super(),this.service=e,this.userModule=t,this.jotaiStore=i,this.t=o,this.defaultState={}}setItem(e,t){(0,S.ud)().setItem(t)}updateItem(e,t){(0,S.ud)().updateItem(t)}multiSetItem(e,t){(0,S.ud)().multiSetItem(t)}setLike(e,t){(0,S.ud)().setLike(t)}setCollect(e,t){(0,S.ud)().setCollect(t)}setCommentCount(e,t){(0,S.ud)().setCommentCount(t)}setResolutionList(e,t){(0,S.ud)().setResolutionList(t)}reduceOrIncreaseCommentCount(e,t){(0,S.ud)().reduceOrIncreaseCommentCount(t)}addItems(e,t){const i=e.filter((e=>Boolean(e.author))).map((({author:e})=>e)),o=e.filter((e=>{var t;return Boolean((null===(t=null==e?void 0:e.liveRoomInfo)||void 0===t?void 0:t.ownerInfo)&&(0,W.Jl)(e))})).map((e=>Object.assign(Object.assign({},e.liveRoomInfo.ownerInfo),{roomId:e.liveRoomInfo.roomID}))),n=e.map((e=>Object.assign(Object.assign({},e),{logId:t})));return[this.userModule.getActions().multiSetUser(i.concat(o)),this.getActions().multiSetItem(n)]}addItems$(e){return e.pipe((0,v.n)((e=>this.addItems(e))))}postCollectVideo(e){return e.pipe((0,_.E)(this.state$,this.userModule.state$),(0,g.T)((([e,t,i])=>{var o,n,s,a;const{itemId:r}=e,d=t[r],l=i.users[null!==(o=null==d?void 0:d.author)&&void 0!==o?o:""],{collected:c=!1,stats:u}=d,p=c?2:1;return{collectCount:Number(null!==(n=null==u?void 0:u.collectCount)&&void 0!==n?n:0),collected:c,action:p,query:{aid:B.xE,itemId:r,action:p,secUid:null!==(s=null==l?void 0:l.secUid)&&void 0!==s?s:""},group_id:r,author_id:null!==(a=null==l?void 0:l.id)&&void 0!==a?a:""}})),(0,m.Z)((({collectCount:e,collected:t,query:i,group_id:o,author_id:n,action:s})=>this.service.collectVideo(i).pipe((0,h.M)((()=>{I.W.handleFavoriteResult({group_id:o,author_id:n},s)})),(0,m.Z)((i=>{const{statusCode:n}=i;return 0!==n?(0,r.O)(3e3).pipe((0,g.T)((()=>this.getActions().setCollect({id:o,collected:t,count:e})))):(0,d.of)(1===s?this.getActions().addMlModelTrainData({id:o,action:"favorite"}):this.noop())})),(0,A.Z)(this.getActions().setCollect({id:o,collected:!t,count:t?Math.max(0,e-1):e+1})),(0,x.n)({})))))}postLikeVideo(e){return e.pipe((0,y.$)((({id:e})=>e)),(0,m.Z)((e=>{const t=new l.t(0);return e.pipe((0,_.E)(this.state$,this.userModule.state$,t),(0,m.Z)((([e,t,i,n])=>{var s,a,r;const{language:l,play_mode:u}=e,p=t[e.id],v=i.users[null!==(s=null==p?void 0:p.author)&&void 0!==s?s:""],{user:_}=(0,V.x)(),{digged:g,stats:m,poi:h,imagePost:A,subVideoMeta:y,ad_info:b,repostList:f}=p,{id:w,forceLike:T,enter_method:L="click",channel_id:S}=e,O=(0,o.__rest)(e,["id","forceLike","enter_method","channel_id"]),I=null!==(a=null==m?void 0:m.diggCount)&&void 0!==a?a:0,k={aweme_id:w,channel_id:S,friends_upvote:null==f?void 0:f.some((e=>e.secUid!==(null==_?void 0:_.secUid))),type:T?1:g?0:1};return T&&g?c.w:(0,d.of)({query:k,enter_method:L,diggCount:I,digged:g,author_id:null!==(r=null==v?void 0:v.id)&&void 0!==r?r:"",group_id:p.id,poi_id:null==h?void 0:h.id,restReportParams:O,changeKey:`${k.type}_${n}`,language:l,imagePost:A,play_mode:u,is_sub_only_video:y?1:0,ad_info:b})})),(0,b.w)("changeKey"),(0,v.n)((({query:e,enter_method:i,diggCount:o,author_id:n,group_id:s,digged:a,poi_id:l,imagePost:c,is_sub_only_video:u,restReportParams:p,ad_info:v})=>{let _=!1;const y=(0,r.O)(3e3).pipe((0,g.T)((()=>this.getActions().setLike({id:s,liked:a,count:o}))),(0,f.j)((()=>{const e=t.getValue();t.next(e+1)}))),b=this.getActions().setLike({id:s,liked:!a,count:a?Math.max(0,o-1):o+1});return this.service.postLikeVideo(e).pipe((0,w.W)((()=>(0,d.of)({status_code:-1}))),(0,h.M)((({status_code:t,status_msg:o,log_pb:a={}})=>{var r,d;2150!==t&&2210!==t||o&&C.F.open({content:this.t(o),duration:3,widthType:"half"}),_=!0;let g={};v&&(g=(0,k.n5)({ad_info:v,play_mode:null!==(r=p.play_mode)&&void 0!==r?r:"one_column"})),P.z.handleLikeVideoResult(Object.assign(Object.assign(Object.assign({},p),g),{group_id:s,author_id:n,log_pb:a,enter_method:i,poi_id:l,aweme_type:c?150:0,pic_cnt:null===(d=null==c?void 0:c.images)||void 0===d?void 0:d.length,is_sub_only_video:u}),e.type)})),(0,f.j)((()=>{var t,o;let a={};v&&(a=(0,k.n5)({ad_info:v,play_mode:null!==(t=p.play_mode)&&void 0!==t?t:"one_column"})),_||P.z.handleLikeVideoResult(Object.assign(Object.assign(Object.assign({},p),a),{group_id:s,author_id:n,log_pb:{},enter_method:i,poi_id:l,aweme_type:c?150:0,pic_cnt:null===(o=null==c?void 0:c.images)||void 0===o?void 0:o.length,is_sub_only_video:u}),e.type)})),(0,m.Z)((t=>{const{status_code:i,is_digg:o}=t;return 0!==i||o===e.type?y:(0,d.of)(1===e.type?this.getActions().addMlModelTrainData({id:s,action:"like"}):this.noop())})),(0,A.Z)(b),(0,x.n)({}))})))})))}addMlModelTrainData(e){return e.pipe((0,_.E)(this.state$),(0,m.Z)((([e,t])=>{var i;const{id:o,action:n,isPreview:s}=e;return o&&t[o]&&!(null===(i=t[o])||void 0===i?void 0:i.liveRoomInfo)?(0,u.H)((0,O.xt)().addTrainData({item:t[o],action:n,isPreview:s})).pipe((0,m.Z)((()=>(0,d.of)(this.noop())))):(0,d.of)(this.noop())})))}postDislikeVideo(e){return e.pipe((0,_.E)(this.state$),(0,h.M)((([e,t])=>{const{id:i,author_id:o,play_mode:n}=e,s=t[i],a=null==s?void 0:s.ad_info;let r={};a&&(r=(0,k.n5)({ad_info:a,play_mode:n}),r.refer=j.Hq.Button),M.V.handleClickDislike(Object.assign({group_id:i,author_id:o,play_mode:n},r)),C.F.open({content:this.t("webapp_forYoufeed_videoRemoved_toast"),duration:3,widthType:"half",getContainer:N.M,getContainerPosition:"fixed"})})),(0,m.Z)((([e])=>{const{id:t,author_id:i}=e,o={item_id:t,item_author_id:i};return this.service.postDislikeVideo(o).pipe((0,w.W)((()=>(0,d.of)({status_code:-1}))),(0,g.T)((()=>this.getActions().addMlModelTrainData({id:e.id,action:"dislike"}))),(0,x.n)({}))})))}setItemPrivateState(e,t){(0,S.ud)().setItemPrivateState(t)}setDeleteVideo(e,t){(0,S.ud)().setDeleteVideo(t)}};Z.jotaiAtom=S.Pu,(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"setItem",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"updateItem",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Array]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"multiSetItem",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"setLike",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"setCollect",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"setCommentCount",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"setResolutionList",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"reduceOrIncreaseCommentCount",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"addItems$",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",p.c)],Z.prototype,"postCollectVideo",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"postLikeVideo",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"addMlModelTrainData",null),(0,o.__decorate)([(0,n.Mj)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[p.c]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"postDislikeVideo",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,Object]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"setItemPrivateState",null),(0,o.__decorate)([(0,n.h5)(),(0,o.__metadata)("design:type",Function),(0,o.__metadata)("design:paramtypes",[Object,String]),(0,o.__metadata)("design:returntype",void 0)],Z.prototype,"setDeleteVideo",null),Z=(0,o.__decorate)([(0,s.n)("ItemModule"),(0,o.__param)(2,(0,a.y)(L.J7)),(0,o.__param)(3,(0,a.y)(F.hp)),(0,o.__metadata)("design:paramtypes",[D,$.U,Object,Function])],Z);const G=(0,T.y)(Z)},69616:(e,t,i)=>{i.d(t,{d:()=>n});var o=i(15203);const n=()=>/google|yahoo|yandex|bing|naver|duckduckgo/gi.test((0,o.q)())}}]);