forked from Romeo-Rosete/EXCHANGE-SECURITY
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
1493-60a859d0801ccb7.js.download
1 lines (1 loc) · 37 KB
/
1493-60a859d0801ccb7.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1493],{42488:function(n,t,r){r.d(t,{Hq:function(){return h},tJ:function(){return Z}});var e=r(62230),u=r(98240),i=r(2784),o=r(82066),a=r(15798),c=r.n(a),s=r(54293),d=r(25084),v=(0,s.f0)(s.c,{reqInterceptors:[[function(n){var t=n.url,r=n.data;return function(n){(0,d.nS)({category:"Troubleshooting",action:"CMCApiCallEvent",json_data:n})}({path:t,params:JSON.stringify(r)}),n}]],resInterceptors:[[function(n){var t;return t={path:n.config.url,params:n.config.data},(0,d.nS)({category:"Troubleshooting",action:"CMCApiResultEvent",json_data:t}),n}]]}),l=(0,s.d5)(v),f=function(n){return["community","live","token",n]},p=function(n){return["community","live","online",n||"all"]},h=function(n,t){return(0,o.useQuery)(f(n),(function(){return function(n){return l({baseURL:"".concat(c().env.endpoints.javaApi,"/live"),url:"/v3/live/get-token",method:"POST",data:{gravityId:n},suppressWarning:!0}).then((function(n){return n.data.data}))}(n)}),{enabled:!!n&&t})},y=function(n){return l({baseURL:"".concat(c().env.endpoints.javaApi,"/live"),url:"/v3/live/get-online",method:"POST",data:{cryptoId:n},suppressWarning:!0}).then((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.data)||[]})).catch((function(n){return[]}))},g=6e4,Z=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,i.useRef)(!0),a=(0,o.useQuery)(p(n),(function(){return y(n)}),{enabled:r.current,staleTime:g,refetchInterval:g}),c=a.data,s=(0,u.Z)(a,["data"]);return(0,i.useEffect)((function(){t&&0===(null===c||void 0===c?void 0:c.length)&&(r.current=!1)}),[c,t]),(0,e.Z)({data:c},s)}},82062:function(n,t,r){r.d(t,{$v:function(){return o},B8:function(){return f},Eh:function(){return e},IB:function(){return v},_t:function(){return s},h4:function(){return i},lW:function(){return p},mQ:function(){return u},sW:function(){return l},uj:function(){return h},xU:function(){return d}});var e,u,i,o,a=r(91077);!function(n){n[n.DESKTOP=1]="DESKTOP",n[n.MEDIUM_SCREEN=2]="MEDIUM_SCREEN",n[n.SMALL_SCREEN=3]="SMALL_SCREEN",n[n.MOBILE=4]="MOBILE"}(e||(e={})),function(n){n.Top="Top",n.Latest="Latest"}(u||(u={})),function(n){n.ALL="ALL",n.OFFICIAL="OFFICIAL"}(i||(i={})),function(n){n.ALL="ALL",n.OFFICIAL="OFFICIAL",n.SELF="SELF"}(o||(o={}));var c,s=5,d=1,v=1,l=6;!function(n){n.BSAAd="BSAAd",n.SECOND_BSAAd="SECOND_BSAAd",n.ADMIN_ADS="ADMIN_ADS"}(c||(c={}));var f={gravityId:c.ADMIN_ADS,key:(0,a.Ki)()},p={gravityId:c.SECOND_BSAAd,key:(0,a.Ki)()},h={gravityId:c.BSAAd,key:(0,a.Ki)()}},11772:function(n,t,r){r.d(t,{h:function(){return y}});var e=r(62230),u=r(85244),i=r(2784),o=r(66582),a=r(82066),c=r(48312),s=r(7279),d=r(23263),v=r(15013),l=r(82062),f=r(13300),p="FAKE",h={status:v.b3.DELETE,id:p},y=function(n,t){var r=n.cryptoId,v=n.language,y=n.slug,g=function(n){return["timeline","post","currency","top","new-cdp",n.cryptoId]}({cryptoId:r}),Z=(0,i.useRef)({index:0}),m={cryptoId:r,overView:!1,type:l.h4.ALL,language:v,slug:y,index:Z.current.index},I=(0,a.useInfiniteQuery)(g,(function(n){var t=n.pageParam;return(0,d.PH)((0,u.Z)((0,e.Z)({},m,t),{index:Z.current.index})).then((function(n){var r=n||{},i=r.lastType,o=r.lastScore,a=r.tweetDTOList,c=r.topicsList;return Z.current.index=(0,f.E7)(null===t||void 0===t?void 0:t.lastType,i,Z.current.index),(0,s.Z)(a)&&(0,s.Z)(c)&&(i||o)?[(0,u.Z)((0,e.Z)({},h),{lastType:i,lastScore:o})]:(0,f.s)(a,c,{lastType:i,lastScore:o})}))}),(0,e.Z)({getNextPageParam:function(n){var t=null===n||void 0===n?void 0:n[n.length-1];if((null===t||void 0===t?void 0:t.lastType)||(null===t||void 0===t?void 0:t.lastScore))return{lastScore:null===t||void 0===t?void 0:t.lastScore,lastType:null===t||void 0===t?void 0:t.lastType}},onSettled:function(n,t){t||function(n,t,r){var e,u;if((0,f.Vx)()!==l.Eh.DESKTOP&&(!r||o.tq)){var i=null===n||void 0===n||null===(e=n.pages)||void 0===e?void 0:e[(null===n||void 0===n?void 0:n.pages.length)-1],a=null===i||void 0===i?void 0:i[(null===i||void 0===i?void 0:i.length)-1];(!n||0===(null===n||void 0===n||null===(u=n.pages)||void 0===u?void 0:u.length)||(null===a||void 0===a?void 0:a.lastScore)===p||(0,c.Z)(null===n||void 0===n?void 0:n.pages).length<l._t)&&t()}}(n,I.fetchNextPage)}},t));return I}},13300:function(n,t,r){r.d(t,{E7:function(){return Z},Vx:function(){return h},eL:function(){return m},s:function(){return g}});var e=r(62230),u=r(85244),i=(r(82066),r(50485),r(88536)),o=r(45956),a=(r(23263),r(38825)),c=(i.h8,r(7279)),s=r(87681),d=r(66056),v=r(15013),l=r(91077),f=r(55790),p=r(82062),h=function(){var n=window.innerWidth,t=function(n){return"number"===typeof n?n:Number(n.toString().replace("px",""))};return n>=t(s.AV.LARGE_MIN)?p.Eh.DESKTOP:n<t(s.AV.LARGE_MIN)&&n>=t(s.AV.MEDIUM_MIN)?p.Eh.MEDIUM_SCREEN:n<t(s.AV.MEDIUM_MIN)&&n>=t(s.AV.SMALL_MIN)?p.Eh.SMALL_SCREEN:p.Eh.MOBILE},y=function(n){return null===n||void 0===n?void 0:n.filter((function(n){return n.status===v.b3.NORMAL}))},g=function(n,t,r){var i=function(){var n;return null!==(n=a.Z.getQueryData("userInfo"))&&void 0!==n?n:(0,o.rm)()}(),s=y(n),v=!1,f=(0,d.I9)(s,(function(n){var t;return 1===n.config?n.gravityId:(null===n||void 0===n||null===(t=n.owner)||void 0===t?void 0:t.guid)?n.owner.guid:n.gravityId})).map((function(n){var t;return v&&(n.relatedTopic=null),n.relatedTopic&&(v=!0),(null===n||void 0===n||null===(t=n.owner)||void 0===t?void 0:t.guid)===(null===i||void 0===i?void 0:i.guid)&&(n.isYours=!0),(0,u.Z)((0,e.Z)({},n,r),{key:(0,l.Ki)()})}));return(0,c.Z)(t)||t.forEach((function(n,t){n.tweets.forEach((function(t){var r;(null===t||void 0===t||null===(r=t.owner)||void 0===r?void 0:r.guid)===(null===i||void 0===i?void 0:i.guid)&&(n.isYours=!0)})),f.splice(1+t,0,(0,u.Z)((0,e.Z)({},n,r),{key:(0,l.Ki)(),tweets:y(null===n||void 0===n?void 0:n.tweets)}))})),f},Z=function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return n?n===t?r+1:0:r+1},m=function(n,t){var r=(0,f.Z)((function(){return n[p.IB].gravityId!==p.B8.gravityId}),!0),e=!(0,c.Z)(t)&&r&&n.length>=p.IB;e&&n.splice(p.IB,0,p.B8);var u=(0,f.Z)((function(){return n[p.xU].gravityId!==p.uj.gravityId}),!0);!e&&u&&n.length>=p.xU&&n.splice(p.xU,0,p.uj),(0,f.Z)((function(){return n[p.sW].gravityId!==p.lW.gravityId}),!0)&&n.length>=p.sW&&n.splice(p.sW,0,p.lW)}},55137:function(n,t,r){r.d(t,{$c:function(){return e},D9:function(){return I},Ec:function(){return h},H7:function(){return g},mW:function(){return Z},qg:function(){return y},r9:function(){return m}});var e,u=r(22710),i=r(67557),o=r(62230),a=r(85244),c=r(81541),s=r(5163),d=r(82066),v=r(15798),l=r.n(v),f=r(54293),p=r(38825);!function(n){n[n.Article=1]="Article",n[n.Post=2]="Post"}(e||(e={}));var h=function(n){return["currencies","announcement",n]},y=function(n){var t=n.guid,r=n.options;return(0,d.useQuery)(h(t),(0,u.Z)((function(){return(0,s.__generator)(this,(function(n){return[2,(0,f.zh)({baseURL:"".concat(l().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/announcement/query",method:"POST",data:{projectAccountUid:t}}).then((function(n){var t;return(null===(t=n.data.data)||void 0===t?void 0:t.announcementDTOS)||[]})).catch((function(){return[]}))]}))})),(0,a.Z)((0,o.Z)({},r||{}),{enabled:(null===r||void 0===r?void 0:r.enabled)&&!!t}))},g=function(n,t){return(0,d.useQuery)(function(n){return["community","project-user","announcement",n]}(n),(function(){return(0,f.zh)({baseURL:"".concat(l().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/announcement/query",method:"POST",data:{cryptoId:n}}).then((function(n){return n.data.data||{}}))}),(0,o.Z)({enabled:Boolean(!!n)},t))},Z=function(n){p.Z.setQueriesData({predicate:function(n){var t;return null===(t=n.queryKey)||void 0===t?void 0:t.includes("announcement")}},(function(t){if(null===t||void 0===t?void 0:t.announcementDTOS){var r=t.announcementDTOS.map(n);return(0,a.Z)((0,o.Z)({},t),{announcementDTOS:r})}return t}))},m=function(n,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;p.Z.setQueriesData({predicate:function(n){var t;return null===(t=n.queryKey)||void 0===t?void 0:t.includes("announcement")}},(function(u){if(null===u||void 0===u?void 0:u.announcementDTOS){var c=u.announcementDTOS;return(0,a.Z)((0,o.Z)({},u),{announcementDTOS:null===c||void 0===c?void 0:c.map((function(u){var c,s;return(null===u||void 0===u?void 0:u.type)===e.Post&&(null===u||void 0===u||null===(c=u.tweetDTO)||void 0===c?void 0:c.gravityId)===n?(0,a.Z)((0,o.Z)({},u),{tweetDTO:(0,a.Z)((0,o.Z)({},null===u||void 0===u?void 0:u.tweetDTO),(0,i.Z)({},t,Number(null===u||void 0===u||null===(s=u.tweetDTO)||void 0===s?void 0:s[t])+r))}):u}))})}return u}))},I=function(n,t){p.Z.setQueriesData({predicate:function(n){var t;return null===(t=n.queryKey)||void 0===t?void 0:t.includes("announcement")}},(function(r){if((null===r||void 0===r?void 0:r.owner)||(null===r||void 0===r?void 0:r.announcementDTOS)){var u,i=r.announcementDTOS,o=r.owner;if(n)return{owner:o,announcementDTOS:null===i||void 0===i?void 0:i.filter((function(n){var r;return n.type===e.Post&&(null===(r=n.tweetDTO)||void 0===r?void 0:r.gravityId)!==t.gravityId}))};var a={type:e.Post,tweetDTO:t};return{owner:o,announcementDTOS:(u=[]).concat.apply(u,[a].concat((0,c.Z)(i))).filter(Boolean)}}return r}))}},66056:function(n,t,r){r.d(t,{I9:function(){return s},TV:function(){return o},XJ:function(){return a},lG:function(){return c}});var e=r(7279),u=r(1284),i=r(90772);function o(n){for(var t=n.length,r=0;0!=t;){var e;e=[n[r=Math.random()*t-->>>0],n[t]],n[t]=e[0],n[r]=e[1]}return n}function a(n,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,e=[],u=0;u<n-1;u++)e.push(u);var i=o(e),a=i[r];return a===t?i[r+1]:a}function c(n,t){if((0,e.Z)(n))return[];var r={};return n.reduce((function(n,e){var o=(0,u.Z)(t)?(0,i.Z)(e,t):null===t||void 0===t?void 0:t(e);return r[o]||(r[o]=!0,n.push(e)),n}),[])}function s(n,t){if((0,e.Z)(n))return[];var r=new Map;n.forEach((function(n){var e=(0,u.Z)(t)?(0,i.Z)(n,t):null===t||void 0===t?void 0:t(n);r.has(e)?r.get(e).push(n):r.set(e,[n])}));var o=[];return r.forEach((function(n){var t=n[Math.floor(Math.random()*n.length)];o.push(t)})),o}},23263:function(n,t,r){r.d(t,{Am:function(){return $},Ek:function(){return V},Ix:function(){return Y},Mr:function(){return U},OC:function(){return z},PH:function(){return N},R6:function(){return R},Sc:function(){return P},Te:function(){return w},WL:function(){return k},Wm:function(){return M},aF:function(){return H},jR:function(){return K},l7:function(){return C},qK:function(){return X},vG:function(){return W},vU:function(){return b},wt:function(){return J}});var e,u,i=r(66180),o=r(22710),a=r(95210),c=r(51012),s=r(62230),d=r(85244),v=r(22386),l=r(81541),f=r(47998),p=r(5163),h=r(82066),y=(r(11772),r(13300),r(55137)),g=(r(78250),r(17980)),Z=r(68050),m=r(6376),I=r(15798),L=r.n(I),A=r(88536),E=(r(64626),r(55790)),S=r(54293),T=r(38825),O=r(15013),D=r(57035),w={userInfo:"userInfo",all:["post"],currency:["post","currency"],cryptoId:function(n){return["post","currency",n]},currencyTrendingFeed:function(n,t,r){return["post","currency",n,"trending",t,r]},currencyLatestFeed:function(n,t,r){return["post","currency",n,"latest",t,{postType:r}]},feedLatest:function(n){return["post","currency",n,"latest"]},comments:["post","comment"],comment:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,l.Z)(w.comments).concat([n,"latest",{display:t}])},timeline:function(n,t){return["post","timeline",n,t]},userPosts:function(n,t,r){return["profile","post",n,t,{isYourSelf:r}]},coinPriceChart:function(n,t){return["coin","chart",n,t]},recomendedAccounts:["recommended","account"],coinStatsLite:function(n){return["coin","stats","light",n]},link:function(n){return["link",n]},userPinnedPost:function(n){return["post","pin",n]},postRepost:function(n){return["post","repost","list",n]},quotes:function(n){return["quotes",n]},owner:function(n){return["owner",n]},searchRecommendation:function(n){return["search","recommendation","account","post",n]},cryptoTweetAccount:function(n){return["crypto","account","tweet",n]},recommendedAccountsByCrypto:function(){return["recommended","account","crypto"]},followStatus:function(n,t){return["account","follow",{seflGuid:n,target:t}]},topPostArticle:function(n){return["post","article","topPostArticle",n]},queryIsProjectMainAccount:function(n){return["queryIsProjectMainAccount",n]},queryPost:function(n){return["post",n]}},C=function n(t){var r=this;(0,a.Z)(this,n),this.api=function(){for(var n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];return Promise.resolve()},this.query=function(n){return(0,h.useQuery)(r.key,r.api,n)},this.invalidate=function(){return T.Z.invalidateQueries(r.key)},this.mutation=function(n,t){return(0,h.useMutation)(r.key,n,(0,d.Z)((0,s.Z)({},t),{onSuccess:function(n,r,e){t.onSuccess&&t.onSuccess(n,r,e)}}))},this.key=t},R=(function(){var n=(0,o.Z)((function(n,t){return(0,p.__generator)(this,(function(n){switch(n.label){case 0:return[2,void 0];case 1:return[2,n.sent()]}}))}))}(),function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(n){var u;return(0,a.Z)(this,r),(u=t.call(this,["postTweet",{user:n}])).api=function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/post-crypto-tweet",method:"POST",data:n}).then((function(n){return n.data}))]}))}));return function(t){return n.apply(this,arguments)}}(),u.mutation=function(n,t){return(0,h.useMutation)(u.key,n,(0,d.Z)((0,s.Z)({},t),{onSuccess:function(n,r,u){if(n.data.success){n.data.data.isAnnouncement=r.setAsAnnouncement,t.onSuccess&&t.onSuccess(n,r,u);var i=n.data.data,o=i.parentId,a=i.gravityId;if((null===r||void 0===r?void 0:r.currencies)&&r.currencies.length){var c,s,d=null===r||void 0===r||null===(c=r.dexTokens)||void 0===c||null===(s=c[0])||void 0===s?void 0:s.address;r.currencies.forEach((function(n){var t=n.id,u=w.currencyLatestFeed(t,d,e.ALL);T.Z.getQueryData(u)||T.Z.setQueryData(["post","temp"],(0,m.pp)(i)),T.Z.setQueriesData({predicate:function(n){var u,i,o=null===(u=n.queryKey)||void 0===u?void 0:u[n.queryKey.length-1];return!(!o||!o.postType||o.postType===e.OFFICIAL||r.replyToGravityId)&&(null===(i=n.queryKey)||void 0===i?void 0:i[2])===t}},(function(n){return(0,m.q2)(n,(0,m.pp)(i))}))}))}if((null===r||void 0===r?void 0:r.dexTokens)&&r.dexTokens.length&&r.dexTokens.forEach((function(n){var t=n.id,r=n.address,u=w.currencyLatestFeed(t,r,e.ALL);T.Z.getQueryData(u)?T.Z.setQueryData(u,(function(n){return(0,m.q2)(n,(0,m.pp)(i))})):T.Z.setQueryData(["post","temp"],(0,m.pp)(i))})),o){var v=w.comment(o,r.commentDisplay||"");T.Z.getQueryState(v)&&T.Z.setQueryData(v,(function(n){return(0,m.q2)(n,(0,m.pp)(i,{isFirstLayerComment:!0}))}))}if(o&&r.rootId&&r.rootId!==o){var l=w.comment(r.rootId,r.commentDisplay||"");T.Z.getQueryData(l)&&T.Z.setQueryData(l,(function(n){return(0,m.zv)(n,(0,m.pp)(i,{hasMoreReply:!1}))}))}o&&((0,m.YX)(o,"commentCount"),(0,y.r9)(o,"commentCount",1));var f=r.repostTweetId;if(a&&f){T.Z.setQueryData(w.postRepost(f),(function(n){var t,r=(0,m.pp)(i);return(null===n||void 0===n?void 0:n.pages)?(0,m.q2)(n,r):(null===n||void 0===n?void 0:n.pages)&&0!==(null===n||void 0===n||null===(t=n.pages)||void 0===t?void 0:t.length)?n:{pages:[[r]]}})),(0,m.YX)(f,"repostCount"),(0,y.r9)(f,"repostCount",1)}}}}))},u}return r}(C));!function(n){n.ALL="ALL",n.OFFICIAL="OFFICIAL",n.SELF="SELF"}(e||(e={})),function(n){n.TOP="Top",n.LATEST="Latest"}(u||(u={}));var P,b=function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/condition/query",method:"POST",data:n}).then((function(t){var r,e,u=t.data,i=T.Z.getQueryData(["post","temp"]);return!n.lastScore&&i?(T.Z.removeQueries(["post","temp"]),[i].concat((0,l.Z)((null===(e=u.data)||void 0===e?void 0:e.tweetDTOList)||[]))):(null===(r=u.data)||void 0===r?void 0:r.tweetDTOList)||[]})).then((function(n){var t;return n.map((function(n){return t?(0,d.Z)((0,s.Z)({},n),{relatedTopic:null}):(n.relatedTopic&&(t=!0),n)}))}))]}))}));return function(t){return n.apply(this,arguments)}}(),_=function(n){var t=n.cryptoId,r=n.platform,e=n.address,u=n.language,i=(0,g.L)(),o="/v3/gravity/trending-posts/";return o+=t?n.cryptoId:r+"/"+encodeURIComponent(e),(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:o,method:"GET",params:{"over-view":!1,"last-score":n.lastScore,type:n.type,q:Math.floor((new Date).getTime()/1e3),experiment:i,languageCode:u}}).then((function(n){var t,r=n.data,e=T.Z.getQueryData("userInfo"),u=null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.lastScore;return r.data.tweetDTOList.map((function(n){return n.owner.guid===(null===e||void 0===e?void 0:e.guid)&&(n.isYours=!0),(0,d.Z)((0,s.Z)({},n),{lastScore:u})}))})).catch((function(n){return[]}))},N=function(n){var t=n.language,r=(0,g.L)();return(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/cdp/trending-posts/",method:"POST",data:(0,d.Z)((0,s.Z)({},n),{experiment:r,languageCode:t})}).then((function(n){return n.data.data}))},M=(function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/self/query",method:"POST",data:n}).then((function(n){return n.data.data.tweetDTOList}))]}))}))}(),function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(n){var e;return(0,a.Z)(this,r),(e=t.call(this,["post","currency",n])).api=function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/report",method:"POST",data:n}).then((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.data)||[]}))]}))}));return function(t){return n.apply(this,arguments)}}(),e.mutation=function(n,t){return(0,h.useMutation)(e.key,n,(0,d.Z)((0,s.Z)({},t),{onSuccess:function(n,r,e){t.onSuccess&&t.onSuccess(n,r,e)}}))},e.gravityId=n,e}return r}(C)),U=function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(n){var e;return(0,a.Z)(this,r),(e=t.call(this,["user","reported",n])).api=function(n){return(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/account-report",method:"POST",data:n}).then((function(n){var t=n.data;return(null===t||void 0===t?void 0:t.data)||[]}))},e.mutation=function(n,t){return(0,h.useMutation)(e.key,n,(0,d.Z)((0,s.Z)({},t),{onSuccess:function(n,r,e){t.onSuccess&&t.onSuccess(n,r,e)}}))},e.guid=n,e}return r}(C),k=function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(n){var e;return(0,a.Z)(this,r),(e=t.call(this,w.postRepost(n))).api=function(n){return(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/repost/query",method:"POST",data:n}).then((function(n){var t,r=n.data;return(null===r||void 0===r||null===(t=r.data)||void 0===t?void 0:t.tweetDTOList)||[]}))},e.infinityQuery=function(n){return(0,h.useInfiniteQuery)(e.key,(function(n){var t=n.pageParam,r={gravityId:e.gravityId,lastScore:t};return e.api(r)}),(0,d.Z)((0,s.Z)({},n),{getNextPageParam:function(n){var t=n[n.length-1];return null===t||void 0===t?void 0:t.postTime}}))},e.gravityId=Number(n),e}return r}(C);!function(n){n.all="all",n.account="account",n.post="post",n.guid="guid"}(P||(P={}));var F,j,Q=function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/searchAccount",method:"GET",params:(0,s.Z)({handleOnly:!1},n)}).then((function(n){return n.data.data||[]}),(function(n){}))]}))}));return function(t){return n.apply(this,arguments)}}(),q=(function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/profile/query",method:"POST",data:{guid:n}}).then((function(n){return n.data.data.gravityAccount})).catch((function(){return null}))]}))}))}(),function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/profile/query",method:"POST",data:{handle:n}}).then((function(n){return n.data.data.gravityAccount})).catch((function(){return null}))]}))}))}(),function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return n&&0!==n.length?[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/follow/status",method:"POST",data:{guids:n}}).then((function(n){return n.data.data||{}}),(function(n){}))]:[2,[]]}))}));return function(t){return n.apply(this,arguments)}}()),x=function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/search",method:"GET",params:n}).then((function(n){return n.data.data||[]}),(function(n){return[]}))]}))}));return function(t){return n.apply(this,arguments)}}(),B=function(){var n=(0,o.Z)((function(n){return(0,p.__generator)(this,(function(t){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"v3/gravity/like/status",method:"POST",data:{gravityIds:n}}).then((function(n){return n.data.data||[]}),(function(n){}))]}))}));return function(t){return n.apply(this,arguments)}}(),z=function(n){return(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/crypto/tweet-account",method:"POST",data:{cryptoId:n}}).then((function(n){return n.data.data})).then((function(n){return n||{}})).catch((function(n){return{}}))},K=function(n){return(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/account/recommend",method:"POST",data:{cryptoId:n}}).then((function(n){return n.data.data||{}}),(function(n){}))},W=function(){var n=(0,o.Z)((function(){return(0,p.__generator)(this,(function(n){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/user-info"),url:"v3/user-info/checkChangeProfileTip",method:"POST",data:{platform:"web"}}).then((function(n){return n.data.data}),(function(n){}))]}))}));return function(){return n.apply(this,arguments)}}(),G=function(n){return(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/vote/voteStatus",method:"POST",data:{tweetIdList:n}}).then((function(n){var t;return null===(t=n.data.data)||void 0===t?void 0:t.voteStatus}),(function(n){}))},H=function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(n,e,u,c){var f;(0,a.Z)(this,r),f=t.call(this,["search"].concat((0,l.Z)(n===P.all?["account","post"]:[n]),[e,u]));var y=(0,i.Z)(f);return f.api=function(){var n=(0,o.Z)((function(n){var t,r,e,u,i,a,c,l,f,h,g,Z,m,I,L,A,E,S,w,C;return(0,p.__generator)(this,(function(R){switch(R.label){case 0:return r=(t=n||{}).word,e=void 0===r?y.searchText:r,u=t.start,i=void 0===u?0:u,a=t.handleOnly,c=void 0!==a&&a,l=t.queryFollower,f=void 0===l||l,h=t.lastScore,g=void 0===h?"":h,Z=t.fullWord,m=void 0===Z?y.searchText:Z,i>999?[2,[]]:(I=!!T.Z.getQueryData("userInfo"),L=function(n,t,r){var e;return{voteSummary:(0,d.Z)((0,s.Z)({},t),{votes:null===t||void 0===t||null===(e=t.votes)||void 0===e?void 0:e.map((function(t){var e;return(0,d.Z)((0,s.Z)({},t),{checked:null===(e=null===r||void 0===r?void 0:r.find((function(t){return t.tweetId===n})))||void 0===e?void 0:e.itemIds.includes(t.id)})}))})}},A=function(){var n=(0,o.Z)((function(n){var t,r,e;return(0,p.__generator)(this,(function(u){switch(u.label){case 0:return[4,x((0,D.J)((0,d.Z)((0,s.Z)({},n),{languageCode:y.language,latestSort:"post"===y.searchType})))];case 1:return(null===(t=u.sent())||void 0===t?void 0:t.length)?I?[4,B(t.map((function(n){return n.gravityId})))]:[2,t.map((function(n){return(0,d.Z)((0,s.Z)({},n),{isLiked:!1})}))]:[2,[]];case 2:return r=u.sent(),[4,G(t.filter((function(n){return n.hasVote})).map((function(n){return n.gravityId})))];case 3:return e=u.sent(),[2,t.map((function(n){return(0,s.Z)((0,d.Z)((0,s.Z)({},n),{isLiked:null===r||void 0===r?void 0:r[n.gravityId]}),n.hasVote&&e?L(n.gravityId,n.voteSummary,e):{})}))||[]]}}))}));return function(t){return n.apply(this,arguments)}}(),E=function(){var n=(0,o.Z)((function(n){var t,r,e,u,i;return(0,p.__generator)(this,(function(o){switch(o.label){case 0:return t=n.word,r=n.start,e=n.handleOnly,t||y.cryptoId?[4,Q({word:t,start:r,handleOnly:e,cryptoId:y.cryptoId,fullWord:m})]:[2,[]];case 1:return(null===(u=o.sent())||void 0===u?void 0:u.length)?!!T.Z.getQueryData("userInfo")?f?[4,q(u.map((function(n){return n.guid})))]:[3,3]:[2,u.map((function(n){return(0,d.Z)((0,s.Z)({},n),{hasFollowed:!1})}))]:[2,[]];case 2:return i=o.sent(),[2,u.map((function(n){return(0,d.Z)((0,s.Z)({},n),{hasFollowed:null===i||void 0===i?void 0:i[n.guid]})}))];case 3:return[2,u];case 4:return[2]}}))}));return function(t){return n.apply(this,arguments)}}(),S=function(){var n=(0,o.Z)((function(){var n,t,r;return(0,p.__generator)(this,(function(e){switch(e.label){case 0:return y.cryptoId?(n={cryptoId:y.cryptoId,lastScore:g,overView:!1,type:O.h4.ALL},!!T.Z.getQueryData("userInfo")?[4,_(n)]:[2,_(n)]):[3,3];case 1:return t=e.sent(),[4,G(t.filter((function(n){return n.hasVote})).map((function(n){return n.gravityId})))];case 2:return r=e.sent(),[2,t.map((function(n){return(0,s.Z)({},n,n.hasVote&&r?L(n.gravityId,n.voteSummary,r):{})}))];case 3:return[2,A(C)];case 4:return[2]}}))}));return function(){return n.apply(this,arguments)}}(),w=null===e||void 0===e?void 0:e.trim().replace(/\s{2,}/g," ").split(" "),C={word:(null===w||void 0===w?void 0:w.filter((function(n){return!n.startsWith("#")&&!n.startsWith("$")||"$"===n||"#"===n})).join(","))||"",hashTag:(null===w||void 0===w?void 0:w.filter((function(n){return n.startsWith("#")&&n.length>1})).map((function(n){return n.replace("#","")})).join(","))||"",symbol:(null===w||void 0===w?void 0:w.filter((function(n){return n.startsWith("$")&&n.length>1})).map((function(n){return n.replace("$","")})).join(","))||"",start:i,fullWord:e,handleOnly:c},y.searchType===P.all&&0===C.start?[2,Promise.all([E(C),S()]).then((function(n){var t=(0,v.Z)(n,2),r=t[0],e=t[1];return[].concat(r.slice(0,3),e)}))]:y.searchType!==P.account?[3,2]:C.start>9?[2,[]]:[4,E(C)]);case 1:case 3:case 5:return[2,R.sent()];case 2:return y.searchType!==P.post?[3,4]:[4,A(C)];case 4:return y.searchType!==P.all||0===C.start?[3,6]:[4,S()];case 6:return[2,[]]}}))}));return function(t){return n.apply(this,arguments)}}(),f.infinityQuery=function(n){return(0,h.useInfiniteQuery)(f.key,(function(n){var t=n.pageParam;return f.api({word:f.searchText,start:(null===t||void 0===t?void 0:t.start)||0,lastScore:null===t||void 0===t?void 0:t.lastScore})}),(0,d.Z)((0,s.Z)({staleTime:5*A.h8},n),{getNextPageParam:function(n,t){var r=null===n||void 0===n?void 0:n[n.length-1];return r?{start:t.length,lastScore:null===r||void 0===r?void 0:r.lastScore}:void 0}}))},f.searchType=n,f.searchText=e,f.cryptoId=u,f.language=c,f}return r}(C),V=function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(){var n;return(0,a.Z)(this,r),(n=t.call(this,["watchlist"])).api=(0,o.Z)((function(){return(0,p.__generator)(this,(function(n){return[2,(0,S.zh)({url:"".concat(L().env.endpoints.javaApi,"/asset/v3/watchlist/query"),method:"post",data:{aux:16,watchListId:"",watchListType:"ORDINARY"}}).then((function(n){var t=n.data;return(0,E.Z)((function(){return t.data.watchLists[0].cryptoCurrencies||[]}))})).catch((function(n){return[]}))]}))})),n.query=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,h.useQuery)(n.key,n.api,t)},n.mutate=function(t){return(0,h.useMutation)((function(n){var t=(0,v.Z)(n,2),r=t[0],e=t[1];return(0,S.zh)({url:"".concat(L().env.endpoints.javaApi,"/asset/v3/watchlist/subscribe"),method:"post",data:{resourceId:r,resourceType:"CRYPTO",subscribeType:e?"SUBSCRIBE":"UNSUBSCRIBE"}}).then((function(n){return n.data}))}),(0,d.Z)((0,s.Z)({},t),{onSuccess:function(){for(var r=arguments.length,e=new Array(r),u=0;u<r;u++)e[u]=arguments[u];var i;t.onSuccess&&(i=t).onSuccess.apply(i,(0,l.Z)(e));T.Z.invalidateQueries(n.key)}}))},n}return r}(C),Y=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z.Z;return(0,S.zh)({baseURL:L().env.endpoints.javaApi,url:"/file/v3/file/get-pre-assigned-url",method:"post",data:{size:n.size,name:n.name}}).then((function(r){var e=r.data,u=(void 0===e?{}:e).data,i=u.url;return Promise.all([(0,S.Pk)({method:"put",url:i,data:new Blob([n],{type:n.type}),headers:{"Content-Type":n.type},onUploadProgress:t,timeout:3e4}),Promise.resolve(u)])})).then((function(n){var t=(0,v.Z)(n,2),r=t[0],e=t[1];return(0,d.Z)((0,s.Z)({},r),{presignData:e})}))};!function(n){n.Posts="Posts",n.Comments="Comments",n.Likes="Likes"}(F||(F={})),function(n){n[n.Posts=F.Posts]="Posts",n[n.Comments=F.Comments]="Comments",n[n.Likes=F.Likes]="Likes",n.Articles="Articles"}(j||(j={}));var J=function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(n){var e;(0,a.Z)(this,r),e=t.call(this,w.userPinnedPost(n));var u=(0,i.Z)(e);return e.api=(0,o.Z)((function(){var n;return(0,p.__generator)(this,(function(t){switch(t.label){case 0:return[4,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/pin/query",method:"POST",data:{guid:u.guid},suppressWarning:!0}).then((function(n){var t;return null===(t=n.data.data)||void 0===t?void 0:t[0]}))];case 1:return(n=t.sent())?[2,[n]]:[2]}}))})),e.query=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,h.useQuery)(e.key,e.api,(0,d.Z)((0,s.Z)({},n),{enabled:!!e.guid,select:function(n){return null===n||void 0===n?void 0:n[0]}}))},e.guid=n,e}return r}(C),$=function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(){var n;return(0,a.Z)(this,r),(n=t.call(this,["translatePostlang"])).api=function(n){return(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/translate-by-id",method:"POST",data:n}).then((function(n){return n.data.data}))},n.mutation=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,h.useMutation)(n.key,t,(0,d.Z)((0,s.Z)({},r),{onSuccess:function(n,t,e){(null===r||void 0===r?void 0:r.onSuccess)&&r.onSuccess(n,t,e)}}))},n}return r}(C),X=function(n){(0,c.Z)(r,n);var t=(0,f.Z)(r);function r(n){var e;(0,a.Z)(this,r),e=t.call(this,w.owner(n));var u=(0,i.Z)(e);return e.api=(0,o.Z)((function(){return(0,p.__generator)(this,(function(n){return[2,(0,S.zh)({baseURL:"".concat(L().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/query-owners-by-ids",method:"POST",data:{gravityIds:u.gravityIds}}).then((function(n){return n.data.data}))]}))})),e.query=function(n){return(0,h.useQuery)(e.key,e.api,(0,d.Z)((0,s.Z)({},n),{onSuccess:function(t,r,e){(null===n||void 0===n?void 0:n.onSuccess)&&n.onSuccess(t,r,e)}}))},e.gravityIds=n,e}return r}(C)},15013:function(n,t,r){var e,u,i,o,a,c,s,d;r.d(t,{H_:function(){return o},He:function(){return c},M3:function(){return d},Y5:function(){return l},b:function(){return v},b3:function(){return a},h4:function(){return e},uT:function(){return i}}),function(n){n.ALL="ALL",n.OFFICIAL="OFFICIAL"}(e||(e={})),function(n){n.ALL="ALL",n.OFFICIAL="OFFICIAL",n.SELF="SELF"}(u||(u={})),function(n){n[n.SCHEDULED=1]="SCHEDULED",n[n.ONGOING=2]="ONGOING",n[n.ENDED=3]="ENDED",n[n.DELETED=4]="DELETED"}(i||(i={})),function(n){n[n.COIN=1]="COIN",n[n.USER=2]="USER",n[n.HASHTAG=3]="HASHTAG"}(o||(o={})),function(n){n[n.NORMAL=0]="NORMAL",n[n.DELETE=3]="DELETE"}(a||(a={})),function(n){n[n.PROJECT=1]="PROJECT",n[n.PLACEHOLDER=2]="PLACEHOLDER"}(c||(c={})),function(n){n[n.NORMAL=0]="NORMAL",n[n.PROJECT=1]="PROJECT",n[n.KOL=2]="KOL",n[n.ORGANIZATION=3]="ORGANIZATION",n[n.MEDIA=4]="MEDIA",n[n.PLACEHOLDER=5]="PLACEHOLDER"}(s||(s={})),function(n){n.NONE="NONE",n.USER_BLOCKED="USER_BLOCKED",n.USER_BLOCKED_YOU="USER_BLOCKED_YOU"}(d||(d={}));var v,l;!function(n){n[n.GOOD=1]="GOOD",n[n.LIKE=2]="LIKE",n[n.HODL=3]="HODL",n[n.BUIDL=4]="BUIDL",n[n.FOMO=5]="FOMO",n[n.FUD=6]="FUD",n[n.CELEBRATIONICON=7]="CELEBRATIONICON"}(v||(v={})),function(n){n.Breaking="Breaking",n.Fire="Fire",n.DollarSign="Dollar Sign",n.New="New",n.LightBulb="Light Bulb"}(l||(l={}))},57035:function(n,t,r){r.d(t,{J:function(){return u}});var e=r(22386),u=function(n){var t={};return Object.entries(n).forEach((function(n){var r=(0,e.Z)(n,2),u=r[0],i=r[1];null!==i&&void 0!==i&&""!==i&&(t[u]=i)})),t}},6376:function(n,t,r){r.d(t,{I9:function(){return h},YX:function(){return I},bG:function(){return v},fO:function(){return f},i1:function(){return E},ie:function(){return Z},jP:function(){return L},pp:function(){return m},q2:function(){return y},zv:function(){return g}});var e=r(62230),u=r(85244),i=r(22386),o=r(81541),a=r(8936),c=(r(42488),r(38825)),s=r(15013),d=function(n,t,r){return(0,a.Z)(n)?n(r):void 0!==n?n:t},v=function(n,t,r,u){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,c=arguments.length>5?arguments[5]:void 0,s=function(t){(c&&c(t)||(null===t||void 0===t?void 0:t.gravityId)===n)&&(t[r]=d(u,String(Number(t[r]||"0")+i),t[r]))},v=function(n){var t,r;return s(n),(null===(t=n.pathTweets)||void 0===t?void 0:t.length)>0&&n.pathTweets.forEach(v),(null===(r=n.tweets)||void 0===r?void 0:r.length)>0&&n.tweets.forEach(v),n},l=function(t,r){return(0,a.Z)(t)?t(r):r.gravityId===n};return Array.isArray(t)?t.forEach(v):t.pages&&(t.pages=t.pages.map((function(n){return(null===n||void 0===n?void 0:n.find((function(n){return l(c,n)})))||(null===n||void 0===n?void 0:n.find((function(n){var t;return null===(t=n.tweets)||void 0===t?void 0:t.find((function(n){return l(c,n)}))})))?n.map(v):n}))),Array.isArray(t)?(0,o.Z)(t):(0,e.Z)({},t)},l=function(n,t){var r=!!n.isLiked;n.likeCount=String(Math.max(0,Number(n.likeCount||"0")+(void 0===t?r?-1:1:t?1:-1))),n.isLiked=!n.isLiked},f=function(n,t,r){return Array.isArray(n)?n.forEach((function(n){var e;n.gravityId===t?l(n,r):(null===(e=n.pathTweets)||void 0===e?void 0:e.length)>0&&n.pathTweets.forEach((function(n){n.gravityId===t&&l(n,r)}))})):n.pages&&n.pages.forEach((function(e){e.forEach((function(e){var u;e.gravityId===t?l(n,r):(null===(u=e.pathTweets)||void 0===u?void 0:u.length)>0&&e.pathTweets.forEach((function(n){n.gravityId===t&&l(n,r)}))}))})),Array.isArray(n)?(0,o.Z)(n):(0,e.Z)({},n)},p=function(n,t,r){return n.forEach((function(n){var e,u;null===(e=n.pathTweets)||void 0===e||e.forEach((function(n){("function"===typeof r&&r(n)||t&&n.gravityId===t)&&(n.status=s.b3.DELETE)})),null===(u=n.tweets)||void 0===u||u.forEach((function(n){("function"===typeof r&&r(n)||t&&n.gravityId===t)&&(n.status=s.b3.DELETE)}))})),(0,o.Z)(n)},h=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],u=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0;if(Array.isArray(n)){var a=n.filter((function(n){return i?!i(n):n.gravityId!==t})),c=p(a,t);return(0,o.Z)(c)}if(Array.isArray(null===n||void 0===n?void 0:n.pages))return n.pages.forEach((function(e,o){if(u){var a=e.map((function(n){return n.relatedCommentId===t||n.gravityId===t&&n.selfComment?void 0:(n.gravityId!==t||n.selfComment||(n.status=s.b3.DELETE),n)}));n.pages[o]=a.filter((function(n){return!!n}))}else if(r){var c=e.map((function(n){return n.gravityId===t?n.hottestReply||void 0!==n.hasMoreReply?(n.status=s.b3.DELETE,n):void 0:n}));n.pages[o]=c.filter((function(n){return!!n}))}else n.pages[o]=n.pages[o].filter((function(n){return i?!i(n):n.gravityId!==t})),n.pages[o]=p(n.pages[o],t,i)})),n.pages=(0,o.Z)(n.pages),(0,e.Z)({},n)},y=function(n,t){return Array.isArray(n)?[t].concat((0,o.Z)(n)):Array.isArray(null===n||void 0===n?void 0:n.pages)?(n.pages[0]=Array.isArray(n.pages[0])?[t].concat((0,o.Z)(n.pages[0])):[t],n.pages=(0,o.Z)(n.pages),(0,e.Z)({},n)):void 0},g=function(n,t){var r=function(n,t){var r=n.find((function(n){return n.gravityId===t.parentId}));if(r&&!r.hottestReply){var i=n.findIndex((function(n){return n.gravityId===t.parentId}));return(0,o.Z)(n.slice(0,i)).concat([(0,u.Z)((0,e.Z)({},r),{hottestReply:t,hasMoreReply:!0}),t],(0,o.Z)(n.slice(i+1)))}};if(Array.isArray(n))return r(n,t);if(Array.isArray(n.pages)){for(var i=0;i<n.pages.length;i++){var a=r(n.pages[i],t);if(n.pages[i]=a||n.pages[i],a)break}return n.pages=(0,o.Z)(n.pages),n}},Z=function(n){return n.vote&&!n.voteSummary&&(n.voteSummary={votes:n.vote.votes.map((function(n){return(0,u.Z)((0,e.Z)({},n),{checked:!1,itemCount:"0",percentCount:0})})),expiration:String(n.vote.expirationDate),isoExpiration:new Date(n.vote.expirationDate).toISOString(),totalCount:"0"}),n},m=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,e.Z)((0,u.Z)((0,e.Z)({},Z(n)),{commentCount:"0",repostCount:"0",likeCount:"0"}),t)},I=function(n,t,r,e,u){c.Z.getQueriesData({predicate:function(n){return function(n){if(!n)return!1;var t="post"===n[0]&&"currency"===n[1]||(null===n||void 0===n?void 0:n.includes("post"));return(0,a.Z)(u)?t||u(n):t}(n.queryKey)},active:!0}).forEach((function(u){var o=(0,i.Z)(u,2),a=o[0],s=o[1];if(s){var d=v(n,s,t,r,void 0,e);c.Z.setQueryData(a,d)}}))},L=function(n){c.Z.setQueriesData({predicate:function(n){return"live-collection"===n.queryKey[0]}},(function(t){if(t){for(var r=(null===t||void 0===t?void 0:t.upcomingLives)||[],i=0;i<r.length;i++){var o;if((null===(o=r[i])||void 0===o?void 0:o.gravityId)===n){r[i]=(0,u.Z)((0,e.Z)({},r[i]),{hasSetReminder:!0});break}}return(0,u.Z)((0,e.Z)({},t),{upcomingLives:r})}}))},A=function(n){return null===n||void 0===n?void 0:n.filter((function(n){return n.status===s.b3.NORMAL}))},E=function(n){return n?n.reduce((function(n,t){return(null===t||void 0===t?void 0:t.topicId)?(n.push((0,u.Z)((0,e.Z)({},t),{tweets:A(t.tweets)})),n):((null===t||void 0===t?void 0:t.status)!==s.b3.NORMAL||n.push(t),n)}),[]):[]}}}]);