"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[47],{56111:(e,t,o)=>{o.d(t,{cF:()=>j,Nl:()=>k,Gd:()=>x,_0:()=>q});var n=o(31209),i=o(43723),s=o(14374),r=o(22113),u=o.n(r),a=o(84908),c=o(39785),l=o(95868),d=o(56070),v=function(e,t,o,n){return new(o||(o=Promise))((function(i,s){function r(e){try{a(n.next(e))}catch(e){s(e)}}function u(e){try{a(n.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,u)}a((n=n.apply(e,t||[])).next())}))};const f=(0,c.M)({csr:function(e,t){return v(this,void 0,void 0,(function*(){let o=28,n=17;return(0,l.gq)(e)?o=50:(0,l.cj)(e)?(o=30,n=15):o=30,(yield d.h.get("/node/share/discover",{query:{noUser:"0",count:o,scene:n,pageId:t,userId:t}})).body[0].exploreList}))}}),g={list:[],hasMore:!0,loading:!0,maxCursor:0,minCursor:0,total:0,statusCode:0};function m(e,t,o){const{list:n,maxCursor:i,minCursor:s,total:r,statusCode:a,hasMore:c}=o;e(t,(e=>Object.assign(Object.assign({},e),{list:u()(e.list.concat(n)),maxCursor:i,minCursor:s,total:null!=r?r:e.total,statusCode:null!=a?a:e.statusCode,hasMore:null!=c?c:-1!==i,loading:!1})))}function p(e,t,o,n,i){var s,r,u,c,l;return r=this,u=void 0,l=function*(){try{const{count:r,scene:u,isNonPersonalized:c,secUid:l}=n,{list:f,maxCursor:g=0,minCursor:p=0}=e(o);t(o,(e=>Object.assign(Object.assign({},e),{loading:!0})));const h=yield function(e){return v(this,void 0,void 0,(function*(){return d.h.get("/api/user/list/",{query:e,baseUrlType:2})}))}({scene:u,maxCursor:g,minCursor:p,count:r,isNonPersonalized:c,secUid:l});!function({set:e,atom:t,response:o,idList:n,useSorting:i=!1}){const{maxCursor:s,minCursor:r,userList:u=[],total:c,statusCode:l,hasMore:d}=o,v=(0,a.Gp)();v.multiSetUser(u.map((({user:e})=>e))),v.multiSetUserStats(u.map((({user:e,stats:t})=>({uniqueId:e.uniqueId,stats:t})))),m(e,t,{list:i?u.sort(((e,t)=>{var o,n,i,s;return(null!==(n=null===(o=t.user.roomId)||void 0===o?void 0:o.length)&&void 0!==n?n:0)-(null!==(s=null===(i=e.user.roomId)||void 0===i?void 0:i.length)&&void 0!==s?s:0)})).map((({user:{uniqueId:e}})=>e)).filter((e=>n.indexOf(e)<0)):u.map((({user:{uniqueId:e}})=>e)).filter((e=>n.indexOf(e)<0)),maxCursor:s,minCursor:r,total:c,statusCode:l,hasMore:d})}({set:t,atom:o,response:h,idList:f,useSorting:null!==(s=null==i?void 0:i.useSorting)&&void 0!==s&&s})}catch(e){}},new((c=void 0)||(c=Promise))((function(e,t){function o(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof c?i:new c((function(e){e(i)}))).then(o,n)}i((l=l.apply(r,u||[])).next())}))}function h(e){const t=e.toLowerCase().replace(/([-_][a-z])/g,(e=>e.toUpperCase().replace("-","").replace("_","")));return(0,s._)((0,i.p)(`accountListAtom_${t}@tiktok/webapp-atoms`,g),{rehydrationKey:`webapp.accountList.${t}`})}var w=o(18499),I=function(e,t,o,n){return new(o||(o=Promise))((function(i,s){function r(e){try{a(n.next(e))}catch(e){s(e)}}function u(e){try{a(n.throw(e))}catch(e){s(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof o?t:new o((function(e){e(t)}))).then(r,u)}a((n=n.apply(e,t||[])).next())}))};const y=h("following"),S=h("follower"),L=h("suggest"),b=h("friend"),C=h("others_following"),U=h("others_follower"),_=h("suggested_follow"),A=(0,i.p)("accountListAtomMapAtom@tiktok/webapp-atoms",{following:y,follower:S,suggest:L,friend:b,others_following:C,others_follower:U,suggested_follow:_}),O=(0,i.p)("accountListAtom@tiktok/webapp-atoms",(e=>({following:e(y),follower:e(S),suggest:e(L),friend:e(b),others_following:e(C),others_follower:e(U),suggested_follow:e(_)})),((e,t,o)=>{t(e(A)[o.key],o.data)})),{useAtomService:x,useServiceState:q,useServiceDispatchers:k,getStaticApi:j}=(0,n.i)(O,((e,t)=>({resetList(e){t(O,{key:e.key,data:g})},resetUserFollowInfo(){(0,w.unstable_batchedUpdates)((()=>{t(U,g),t(C,g)}))},getRecommendList(e){return I(this,void 0,void 0,(function*(){try{const{pathname:o,userId:n=""}=e,i=yield f(o,n);t(L,g);const s=i.map((({cardItem:e})=>({avatarLarger:e.cover,avatarMedium:e.cover,avatarThumb:e.cover,id:e.id,nickname:e.title,relation:e.extraInfo.relation,signature:e.description,uniqueId:e.subTitle.replace(/^@/,""),verified:e.extraInfo.verified,secUid:e.extraInfo.secUid,roomId:e.extraInfo.roomId}))).sort(((e,t)=>{var o,n;return(null!==(o=null==e?void 0:e.relation)&&void 0!==o?o:0)-(null!==(n=null==t?void 0:t.relation)&&void 0!==n?n:0)})).sort(((e,t)=>{var o,n,i,s;return(null!==(n=null===(o=null==t?void 0:t.roomId)||void 0===o?void 0:o.length)&&void 0!==n?n:0)-(null!==(s=null===(i=null==e?void 0:e.roomId)||void 0===i?void 0:i.length)&&void 0!==s?s:0)}));(0,a.Gp)().multiSetUser(s),m(t,L,{list:s.map((({uniqueId:e})=>e)),hasMore:!1})}catch(e){}}))},getFollowingList(o){return I(this,void 0,void 0,(function*(){yield p(e,t,y,{count:o.count,scene:21},{useSorting:!0})}))},getFollowerList(o){return I(this,void 0,void 0,(function*(){yield p(e,t,S,{count:o.count,scene:67})}))},getFriendsList(o){var n;return I(this,void 0,void 0,(function*(){yield p(e,t,b,{count:null!==(n=o.count)&&void 0!==n?n:30,scene:150})}))},getSuggestedList(o){var n;return I(this,void 0,void 0,(function*(){yield p(e,t,_,{count:null!==(n=o.count)&&void 0!==n?n:30,isNonPersonalized:o.isNonPersonalized,scene:151})}))},getTargetFollowerList(o){var n;return I(this,void 0,void 0,(function*(){yield p(e,t,U,{count:null!==(n=o.count)&&void 0!==n?n:30,secUid:o.secUid,scene:67})}))},getTargetFollowingList(o){var n;return I(this,void 0,void 0,(function*(){yield p(e,t,C,{count:null!==(n=o.count)&&void 0!==n?n:30,secUid:o.secUid,scene:21})}))}})))},83266:(e,t,o)=>{o.d(t,{Gr:()=>r,SA:()=>a,fz:()=>i,q:()=>s});var n=o(31209);const i=(0,o(43723).p)("cachedUserState@tiktok/webapp-atoms",{uniqueId:""}),{useAtomService:s,useServiceState:r,useServiceDispatchers:u,getStaticApi:a}=(0,n.i)(i,((e,t)=>({setCachedUser(e){t(i,(t=>Object.assign(Object.assign({},t),{uniqueId:e})))},resetCachedUser(){t(i,{uniqueId:""})}})))},22972:(e,t,o)=>{o.d(t,{UO:()=>l,kq:()=>c});var n=o(14374),i=o(31209),s=o(43723);const r=(0,n._)((0,s.p)("recommendUserListAtom@tiktok/webapp-atoms",{uniqueId:void 0}),{rehydrationKey:"webapp.recommendUserList"}),{useAtomService:u,useServiceDispatchers:a,useServiceState:c,getStaticApi:l}=(0,i.i)(r,((e,t)=>({setUniqueId(e){t(r,(t=>Object.assign(Object.assign({},t),{uniqueId:e})))}})))},91210:(e,t,o)=>{o.d(t,{Vg:()=>m,ZV:()=>f,in:()=>v,o6:()=>g});var n=o(43723),i=o(14374),s=o(31209),r=o(89049),u=o(44630),a=o(34308),c=o(68881),l=o(68783),d=o(83266);const v=(0,i._)((0,n.p)("personalPostCacheAtom@tiktok/webapp-atoms",r.hA),{rehydrationKey:"desktop.userPage.personalPostCache"}),{useAtomService:f,useServiceDispatchers:g,useServiceState:m,getStaticApi:p}=(0,s.i)(v,((e,t)=>({setLoading(e){t(v,(t=>Object.assign(Object.assign({},t),{loading:e})))},getItemList(o){var n,i,s,r,f;return i=this,s=void 0,f=function*(){try{t(v,(e=>Object.assign(Object.assign({},e),{loading:!0})));const{secUid:i,userId:s,userUniqueId:r,count:f,filterPhotoContent:g,locateItemID:m,needPinnedItemIds:p=!0}=o,h=(0,u.bv)(e,v,Object.assign({secUid:i,userId:s,count:null!=f?f:c.M4,postItemListRequestType:0,needPinnedItemIds:p},m&&{locateItemID:m}));(0,d.SA)().setCachedUser(r);const w=(0,a.Ob)(h);t(v,(e=>Object.assign(Object.assign({},e),{prevPromise:w})));const I=yield w;g&&(I.itemList=null===(n=I.itemList)||void 0===n?void 0:n.filter((e=>!e.imagePost))),(0,l.Tj)(e,t,v,"user-post",I,{secUid:i})}catch(e){(0,l.e_)(t,v)}},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{u(f.next(e))}catch(e){t(e)}}function n(e){try{u(f.throw(e))}catch(e){t(e)}}function u(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(o,n)}u((f=f.apply(i,s||[])).next())}))},resetItemList(){t(v,r.hA)}})))}}]);