forked from Romeo-Rosete/EXCHANGE-SECURITY
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
59391-fab6b1410fff674.js.download
1 lines (1 loc) · 31.4 KB
/
59391-fab6b1410fff674.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[59391],{19188:function(n,t,e){e.d(t,{rh:function(){return l}});var i=e(62230),r=e(52322),o=e(2784),a=e(66038),c=e(73463),u=e.n(c),l=o.createContext({watchlist:{data:[]},isIdInWatchlist:function(){return!1},addWatchlistItem:function(){return Promise.resolve()},removeWatchlistItem:function(){return Promise.resolve()},toggleWatchlist:function(){return Promise.resolve()},isWatchlistFinishedLoading:!1});t.ZP=function(n){var t=function(t){var e=(0,a.Z)(),o=e.watchlist,c=e.isIdInWatchlist,u=e.addWatchlistItem,s=e.removeWatchlistItem,d=e.isWatchlistFinishedLoading,f=e.toggleWatchlist;return(0,r.jsx)(l.Provider,{value:{watchlist:o,isIdInWatchlist:c,addWatchlistItem:u,removeWatchlistItem:s,isWatchlistFinishedLoading:d,toggleWatchlist:f},children:(0,r.jsx)(n,(0,i.Z)({},t))})};return u()(t,n),t}},71466:function(n,t,e){e.d(t,{v:function(){return s}});var i=e(75190),r=e(52322),o=e(28316),a=e(82740),c=e(48723);function u(){var n=(0,i.Z)(["\n max-width: 432px;\n background: var(--theme-light-color);\n position: fixed;\n top: 40px;\n /* left: 50%;\n transform: translateX(-50%); */\n left: 0;\n right: 0;\n margin: 0 auto;\n border-radius: 8px;\n /* color: var(--color-neutral-1); */\n transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);\n z-index: 2000;\n text-align: center;\n &.show {\n top: 73px;\n }\n word-break: break-word;\n text-align: left;\n\n @media (max-width: ","px) {\n max-width: 93.6%;\n }\n"]);return u=function(){return n},n}var l=a.ZP.div.withConfig({componentId:"sc-991bf51e-0"})(u(),c.AV.XSMALL),s=function(n){var t,e=n.title,i=n.duration,a=n.children,c=n.style,u=document.createElement("div");document.body.appendChild(u),requestAnimationFrame((function(){t&&(t.className=t.className+" show")})),setTimeout((function(){o.unmountComponentAtNode(u),u.parentNode&&u.parentNode.removeChild(u)}),i||2e3),o.render((0,r.jsx)(l,{style:c,ref:function(n){return t=n},children:(0,r.jsx)("div",{children:e||a})}),u)}},46866:function(n,t,e){var i=e(62230),r=e(52322),o=e(2784),a=e(15798),c=o.lazy((function(){return Promise.all([e.e(50480),e.e(81611),e.e(98172),e.e(40491),e.e(55959),e.e(52505),e.e(83910),e.e(97563),e.e(62378)]).then(e.bind(e,63191))}));t.Z=function(n){return a.isServer?null:(0,r.jsx)(o.Suspense,{fallback:!1,children:(0,r.jsx)(c,(0,i.Z)({},n))})}},46153:function(n,t,e){e.d(t,{y:function(){return i}});var i={RecommendToast:"toast",FollowModal:"FollowModal",Follow:"Follow"}},59551:function(n,t,e){e.d(t,{E:function(){return o}});var i=e(75190);function r(){var n=(0,i.Z)(["\ndisplay: flex;\nalign-items: center;\npadding: 10px 12px;\nbackground: var(--bg-color);\nbox-shadow: 0px 8px 24px rgba(88, 102, 126, 0.08), 0px 4px 8px rgba(88, 102, 126, 0.08),\n 0px 1px 2px rgba(88, 102, 126, 0.08), 0px 0px 0px 0.5px rgba(88, 102, 126, 0.04);\nborder-radius: 8px;\nwidth: 100%;\nimg {\n position: relative;\n width: 24px;\n &:nth-child(1) {\n width: 28px;\n }\n}\n"]);return r=function(){return n},n}var o=e(82740).ZP.div.withConfig({componentId:"sc-6cea48d0-0"})(r())},6426:function(n,t,e){var i=e(62230),r=e(85244),o=e(98240),a=e(75190),c=e(52322),u=e(2784),l=e(82740);function s(){var n=(0,a.Z)(["100% { transform: rotate(360deg) }"]);return s=function(){return n},n}function d(){var n=(0,a.Z)(["\n width: 16px;\n height: 16px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n\n & > * {\n width: 12px;\n height: 12px;\n padding: 2px;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n background: #000;\n background: linear-gradient(0deg, "," 50%, #000000aa 100%);\n animation: "," 1s linear 0s infinite;\n\n & > * {\n width: 100%;\n height: 100%;\n background-color: ",";\n border-radius: 50%;\n }\n }\n"]);return d=function(){return n},n}var f=(0,l.F4)(s()),h=l.ZP.div.withConfig({componentId:"sc-53eee1cc-0"})(d(),(function(n){return n.theme.v2.surface2Color}),f,(function(n){return n.theme.v2.surface2Color})),p=u.forwardRef((function(n,t){var e=n.style,a=(0,o.Z)(n,["style"]);return(0,c.jsx)(h,(0,r.Z)((0,i.Z)({ref:t,style:(0,r.Z)((0,i.Z)({},e||{}),{width:n.fullWidth?"100%":void 0})},a),{children:(0,c.jsx)("div",{children:(0,c.jsx)("div",{})})}))}));t.Z=p},59391:function(n,t,e){e.d(t,{q:function(){return J},Z:function(){return nn}});var i=e(75190),r=e(81541),o=e(52322),a=e(2784),c=e(49948),u=e(82740),l=e(38789),s=e(48840),d=e(71466),f=e(46866),h=e(46153),p=e(59551),v=e(68879),g=e(27419),m=e(99355),x=e(37814),w=e(74001),y=e(97271),Z=e(63960),b=e(62230),I=e(85244),S=e(98240),C=e(28316),P=e(87681),L=e(15798),W=e(48723);function j(){var n=(0,i.Z)(["\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(10, 30, 66, 0.4);\n z-index: ",";\n"]);return j=function(){return n},n}function k(){var n=(0,i.Z)(["\n max-width: 432px;\n background: var(--control-background-color);\n position: fixed;\n ","\n margin: 0 auto;\n border-radius: 8px;\n transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);\n z-index: 2000;\n text-align: center;\n box-shadow: 0px 1px 2px rgba(128, 138, 157, 0.12), 0px 8px 32px rgba(128, 138, 157, 0.24);\n word-break: break-word;\n &.show {\n /* transform: translateY(73px); */\n }\n ","\n"]);return k=function(){return n},n}var F={left:"left:18px;top:0;right:0;",right:"right:18px;top:0;right:0;",top:"top:18px;left:0;right:0;",bottom:"bottom:18px;left:0;right:0;"},T=u.ZP.div.withConfig({componentId:"sc-d5a2a1d5-0"})(j(),W.W5.MODAL),A=u.ZP.div.withConfig({componentId:"sc-d5a2a1d5-1"})(k(),(function(n){return"".concat(F[n.placement])}),(0,P.CC)("\n max-width: 93.6%;\n ")),_=function(n){var t=n.children,e=n.placement,i=n.onClickMask,r=n.onCloseCallBack,a=(0,S.Z)(n,["children","placement","onClickMask","onCloseCallBack"]);return(0,o.jsx)(T,{onClick:function(){i&&i(),r&&r()},children:(0,o.jsx)(A,(0,I.Z)((0,b.Z)({onClick:function(n){n.stopPropagation()},placement:e,className:"show"},a),{children:(0,o.jsx)("div",{children:t})}))})},z=function(n){var t=n.style,e=n.children,i=n.placement,r=void 0===i?"bottom":i,a=n.onCloseCallBack;if(L.isServer)return null;var c,u=document.createElement("div");document.body.appendChild(u),requestAnimationFrame((function(){c&&(c.className=c.className+" show")}));var l=function(){C.unmountComponentAtNode(u),u.parentNode&&u.parentNode.removeChild(u),a&&a()};C.render((0,o.jsx)(_,{onClick:function(n){var t;n.stopPropagation(),"manualClose"===(null===(t=n.target)||void 0===t?void 0:t.id)&&l()},placement:r,style:t,ref:function(n){return c=n},onClickMask:l,children:e}),u)},E=e(78250),D=e(37067),N=e(73764),U=e(8354),R=e(25084),B=e(8112),O=e(43961),q=(e(71939),e(19188)),M=e(47726);e(6426);function G(){var n=(0,i.Z)(["\n img {\n width: 213px;\n }\n p {\n margin: 0 auto;\n }\n p:nth-child(2) {\n color: #3861fb;\n font-size: 18px;\n }\n p:nth-child(3) {\n font-size: 24px;\n font-weight: 700;\n margin: 4px auto 8px;\n }\n p:nth-child(4) {\n color: var(--color-light-neutral-6);\n font-size: 14px;\n }\n"]);return G=function(){return n},n}function Q(){var n=(0,i.Z)(["\n & > div {\n &:first-child {\n font-weight: 600;\n font-size: 14px;\n color: var(--control-caret-color);\n display: flex;\n align-items: center;\n }\n &:nth-child(2) {\n font-weight: 400;\n font-size: 12px;\n color: var(--text-color-sub-1);\n margin-top: 4px;\n }\n &:nth-child(3) {\n margin-top: 12px;\n background: var(--theme-color);\n border-radius: 8px;\n font-weight: 600;\n font-size: 12px;\n color: var(--color-primary-white);\n padding: 10px;\n text-align: center;\n cursor: pointer;\n }\n }\n\n ","\n"]);return Q=function(){return n},n}function V(){var n=(0,i.Z)([""]);return V=function(){return n},n}var Y=(0,w.Z)((function(){return Promise.all([e.e(97209),e.e(72976),e.e(41761)]).then(e.bind(e,41761))}),!1,(function(){return(0,o.jsx)(o.Fragment,{})})),$=(u.ZP.div.withConfig({componentId:"sc-b8460745-0"})(G()),u.ZP.div.withConfig({componentId:"sc-b8460745-1"})(Q(),(0,P.CC)("\n flex-direction: column;\n justify-content: center;\n padding:16px 20px;\n & > div {\n &:nth-child(2) {\n margin-top: 6px;\n text-align: left;\n line-height: 17px;\n }\n &:nth-child(3) {\n margin-top: 6px;\n line-height: 17px;\n }\n }\n"))),X=u.ZP.span.withConfig({componentId:"sc-b8460745-2"})(V()),J=function(n){var t=n.t,e=n.InvokeSignUp;return(0,o.jsxs)($,{children:[(0,o.jsxs)("div",{children:[t("Added to Watchlist"),(0,o.jsx)(s.Z,{size:"20px",style:{color:"#16C784",margin:"0px 0px 0px 7px"}})]}),(0,o.jsx)("div",{children:t("Wanna keep this Watchlist? Just sign up in a few easy steps!")}),(0,o.jsx)("div",{onClick:e,children:t("Create an account")})]})},H=0,K=0;var nn=function(n){var t,e,i=n.data,u=n.useButtonText,s=void 0===u?void 0:u,w=n.selectedWatchListItem,b=void 0===w?void 0:w,I=n.useTooltip,S=n.accountInfo,C=(0,a.useRef)(!0),P=(0,a.useState)(!1),L=P[0],W=P[1],j=(0,D.O)({guid:null===S||void 0===S||null===(t=S.gravityAccount)||void 0===t?void 0:t.guid}),k=j.hasFollowed,F=j.updateStatus,T=(0,N.u)((function(){W(!0)})),A=T.fn,_=T.flag,G=i.id,Q=(i.slug,i.name),V=(i.rank,i.contentType),$=(0,c.useDispatch)(),nn=a.useContext(q.rh),tn=nn.isIdInWatchlist,en=nn.isWatchlistFinishedLoading,rn=(e=null===S||void 0===S?void 0:S.gravityAccount,(0,U.Z)(e)?h.y.RecommendToast:h.y.FollowModal),on=(0,O.fp)("noLoginWatchlistIds")||[],an=(0,O.fp)("noLoginWatchlistDexpairIds")||[],cn=(0,c.useSelector)(M.jC),un=tn(G)||("dexPair"===V?an.includes(G):on.includes(G))&&!cn,ln=((0,c.useSelector)(M.wL).data,(0,a.useState)(!1)),sn=ln[0],dn=ln[1],fn=(0,B.$G)().t;if(i.fake)return(0,o.jsx)(Z.f,{isStarred:!0,useTooltip:!1});var hn=function(){$((0,g.b_)({action:"SIGNUP"}))};(0,a.useEffect)((function(){var n=(0,O.fp)("noLoginWatchlistIds")||[],t=(0,O.fp)("noLoginWatchlistDexpairIds")||[],e=(0,O.fp)("clickStarNumber"),i=(0,O.fp)("clickStarDexpairNumber");"dexPair"!==V&&(n.length>=20||e>=2)?H+=1:"dexPair"===V&&(t.length>=20||i>=2)&&(K+=1)}),[]);var pn=function(n){var t=function(){(0,d.v)({children:(0,o.jsxs)(p.E,{children:[(0,o.jsxs)("div",{style:{display:"flex",alignItems:"center",marginRight:10},children:[(0,o.jsx)("img",{style:{zIndex:9},src:(0,y.NE)("/cloud/img/watchlist/".concat(un?"removeStarIcon":"starIcon",".png"))}),(0,o.jsx)("img",{style:{right:5},src:(0,y.pt)("/static/img/coins/64x64/".concat(i.id,".png"))})]}),(0,o.jsxs)("div",{style:{fontWeight:500,fontSize:14,color:"var(--color-primary-black)"},children:[Q," has been ",un?"removed":"added"," the main Watchlist !"]})]}),style:{background:"var(--bg-color)"}})};cn?en&&(C.current&&(dn(!0),C.current=!1,$((0,v.subscribeWatchList)(un?"UNSUBSCRIBE":"SUBSCRIBE","CRYPTO",G,null===b||void 0===b?void 0:b.watchListId,(function(n){"error"===n?(0,d.v)({children:(0,o.jsx)(p.E,{children:(0,o.jsx)("div",{children:"Failed to add to the main Watchlist, please try again later."})}),style:{background:"var(--bg-color)"}}):un||(A(),function(){var n;(null===S||void 0===S||null===(n=S.gravityAccount)||void 0===n?void 0:n.guid)&&!k&&F(!0)}()),C.current=!0,dn(!1)}))),(0,R.nS)({category:R.Eh.WatchList,action:"click",label:un?"cdp_removed_from_watchlist":"cdp_added_to_watchlist"})),_?(0,x.vP)()&&t():(0,x.vP)()&&un&&t()):function(n){var t=n.id,e=(0,O.fp)("noLoginWatchlistIds")||[],i=(0,O.fp)("watchlistPopUpTime"),a=(0,O.fp)("clickStarNumber")||0,c=(0,O.fp)("noLoginWatchlistDexpairIds")||[],u=(0,O.fp)("watchlistDexpairPopUpTime"),l=(0,O.fp)("clickStarDexpairNumber")||0;if(!un&&"dexPair"!==V&&e.length>=20)return H+=1,(0,E.v)({title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:fn("20 coins is as far as we can go, buddy.")}),(0,o.jsx)("div",{children:fn("Sign up for a CoinMarketCap account to add more.")})]}),type:"normal"});if(!un&&"dexPair"===V&&c.length>=20)return K+=1,(0,E.v)({title:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{children:fn("20 dex pairs is as far as we can go, buddy.")}),(0,o.jsx)("div",{children:fn("Sign up for a CoinMarketCap account to add more.")})]}),type:"normal"});if(dn(!0),un){if("dexPair"!==V){H+=1;var s=e.findIndex((function(n){return n===t}));e.splice(s,1),(0,O.qQ)("noLoginWatchlistIds",e),!i&&a<2&&setTimeout((function(){H=0}),150),(0,R.nS)({category:R.Eh.WatchList,action:"click",label:"cdp_removed_from_watchlist"})}else if("dexPair"===V){K+=1;var d=e.findIndex((function(n){return n===t}));e.splice(d,1),(0,O.qQ)("noLoginWatchlistDexpairIds",e),!u&&l<2&&setTimeout((function(){K=0}),150)}}else if("dexPair"!==V){!i&&a<2?((0,x.ZP)()&&(m.Z.sendEvent({category:"Watchlist",action:"Watchlist_Guest_SignUpButton",label:"type =Banner"}),z({children:(0,o.jsx)(J,{InvokeSignUp:hn,t:fn})})),(0,O.qQ)("clickStarNumber",a+1),(0,O.qQ)("watchlistPopUpTime",+new Date,(new Date).getTime()+864e5),m.Z.sendEvent({category:"Watchlist",action:"Watchlist_Guest_SignUpButton",label:"type=Popup;url:".concat(location.href,";")})):H+=1;var f=Array.from(new Set([t].concat((0,r.Z)(e))));(0,O.qQ)("noLoginWatchlistIds",f),(0,R.nS)({category:R.Eh.WatchList,action:"click",label:"cdp_added_to_watchlist"})}else{!u&&l<2?((0,x.ZP)()&&(m.Z.sendEvent({category:"Watchlist",action:"Watchlist_Guest_SignUpButton",label:"type =Banner"}),z({children:(0,o.jsx)(J,{InvokeSignUp:hn,t:fn})})),(0,O.qQ)("clickStarDexpairNumber",l+1),(0,O.qQ)("watchlistDexpairPopUpTime",+new Date,(new Date).getTime()+864e5),m.Z.sendEvent({category:"Watchlist",action:"Watchlist_Guest_SignUpButton",label:"type=Popup;url:".concat(location.href,";")})):K+=1;var h=Array.from(new Set([t].concat((0,r.Z)(c))));(0,O.qQ)("noLoginWatchlistDexpairIds",h),m.Z.sendEvent({category:"Watchlist",action:"Watchlist_Guest_AddDexpair",label:"url:".concat(location.href,";crypto_id:").concat(t)})}setTimeout((function(){dn(!1)}),1e3)}({id:G})};return(0,o.jsxs)(X,{children:[("dexPair"===V||H||cn||(0,x.ZP)())&&("dexPair"!==V||K||cn||(0,x.ZP)())?(0,o.jsx)(Z.f,{isStarred:un,onClick:pn,useButtonText:s,useTooltip:I,isLoading:sn,"data-btnname":cn?null:"watchlistStarIcon","data-page":cn?null:"watchlistStarIconPage",name:"dexPair"!==V||cn?"":"Main Dex Pair"}):(0,o.jsx)(Y,{placement:"bottomLeft",content:(0,o.jsx)(J,{InvokeSignUp:hn,t:fn}),trigger:"click",overlayInnerStyle:{background:l.colorSurface1,boxShadow:l.shadowOverlay,width:251,padding:"16px 20px"},showArrow:!1,overlayStyle:{opacity:1},children:(0,o.jsx)(Z.f,{isStarred:un,onClick:pn,useButtonText:s,useTooltip:I,isLoading:sn,"data-btnname":cn?null:"watchlistStarIcon","data-page":cn?null:"watchlistStarIconPage",name:"dexPair"!==V||cn?"":"Main Dex Pair"})}),(0,o.jsx)(f.Z,{open:L,coinData:{name:Q,id:G},accountInfo:S,onClose:function(){W(!1)},type:rn})]})}},66038:function(n,t,e){var i=e(62230),r=e(85244),o=e(81541),a=e(2784),c=e(49948),u=e(1367),l=e(22222),s=e(68879),d=e(86818),f=e(47726),h=(0,l.P1)((function(n){return n.watchlist}),(function(n){return(0,r.Z)((0,i.Z)({},n),{data:(0,u.Z)(n.data,"cryptocurrencyId")})})),p=function(n){return{watchlist:h(n),loggedIn:(0,f.jC)(n),isUserFinishLogin:(0,f.$J)(n),isWatchlistFinishedLoading:(0,f.BU)(n),user:(0,f.is)(n)}};t.Z=function(){var n=(0,c.useSelector)(p),t=n.watchlist,e=n.loggedIn,i=n.isWatchlistFinishedLoading,r=(0,a.useRef)(!1),u=(0,c.useSelector)(f.jC),l=(0,c.useDispatch)();(0,a.useEffect)((function(){!u||t.data.length||(0,d.eg)(d.gW.watchlistLoading)?!u&&r.current&&l((0,s.setWatchlist)([])):((0,d.X3)(d.gW.watchlistLoading,!0),l((0,s.getWatchlist)("",(function(){return(0,d.X3)(d.gW.watchlistLoading,!1)})))),r.current||(r.current=!0)}),[u,t.data.length]);var h=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new Promise((function(r){var a=t.data.map((function(n){return n.cryptocurrencyId}));(0,o.Z)(a).concat([n]);e&&l((0,s.subscribeWatchList)("SUBSCRIBE","CRYPTO",n,i,(function(n){return r(n)})))}))},v=function(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return new Promise((function(r){t.data.find((function(t){return t.cryptocurrencyId===n}));e&&l((0,s.subscribeWatchList)("UNSUBSCRIBE","CRYPTO",n,i,(function(n){return r(n)})))}))},g=function(n){return!!t.loaded&&!!t.data.find((function(t){return t.cryptocurrencyId===n}))};return{watchlist:t,addWatchlistItem:h,removeWatchlistItem:v,isIdInWatchlist:g,isWatchlistFinishedLoading:i,toggleWatchlist:function(n,e){return t.loaded?g(n)?v(n,e):h(n,e):Promise.resolve()}}}},63960:function(n,t,e){e.d(t,{f:function(){return m}});var i=e(62230),r=e(85244),o=e(98240),a=e(75190),c=e(52322),u=(e(2784),e(82740)),l=e(97028),s=e(54382),d=e(15925),f=(e(78250),e(63082),e(20194)),h=(e(25084),e(71939),e(3070));e(23263);function p(){var n=(0,a.Z)(["\n img {\n width: 213px;\n }\n p {\n margin: 0 auto;\n }\n p:nth-child(2) {\n color: #3861fb;\n font-size: 18px;\n }\n p:nth-child(3) {\n font-size: 24px;\n font-weight: 700;\n margin: 4px auto 8px;\n }\n p:nth-child(4) {\n color: var(--color-light-neutral-6);\n font-size: 14px;\n }\n"]);return p=function(){return n},n}function v(){var n=(0,a.Z)(["\n }\n span {\n font-size: 16px;\n line-height: 100%;\n }\n\n span::before {\n vertical-align: baseline;\n margin-bottom: 2px;\n }\n"]);return v=function(){return n},n}u.ZP.div.withConfig({componentId:"sc-3651ae30-0"})(p());var g=u.ZP.span.withConfig({componentId:"sc-3651ae30-1"})(v());function m(n){var t=n.isStarred,e=n.onClick,a=n.name,u=n.useButtonText,p=n.useTooltip,v=void 0===p||p,m=n.isLoading,x=n.placement,w=void 0===x?"bottom":x,y=n.offset,Z=void 0===y?[0,15]:y,b=(0,o.Z)(n,["isStarred","onClick","name","useButtonText","useTooltip","isLoading","placement","offset"]),I=(0,f.Z)().t;a=a||I("Main");var S=m?(0,c.jsx)(d.Z,{size:"sm",style:{width:14,height:22,marginRight:0}}):(0,c.jsx)("span",{className:"icon-Star".concat(t?"-Filled":""),style:{color:t?"#f6b87e":"var(--color-light-neutral-4)"}}),C=I(t?"Remove from {{name}} Watchlist":"Add to {{name}} Watchlist and follow coin",{name:a}),P=function(n){var t=n.children;return u?(0,c.jsx)(l.Z,{size:"sm",variant:"outline",style:{width:"36px"},className:"icon-button",children:(0,c.jsxs)(c.Fragment,{children:[v?null:C+" ",v?null:(0,c.jsx)(c.Fragment,{children:"\xa0"}),t]})}):t},L=(0,c.jsx)(g,(0,r.Z)((0,i.Z)({},b),{onClick:function(n){n.preventDefault(),n.stopPropagation(),e&&e()},children:(0,c.jsx)(P,{children:S})}));return v&&w?(0,c.jsx)(s.default,{placement:w,singletonTarget:void 0,content:C,offset:Z,touch:!0,theme:"info",disabled:(0,h.ZP)(),children:L}):L}},37067:function(n,t,e){e.d(t,{O:function(){return l}});var i=e(62230),r=e(2784),o=e(87612),a=e(11924),c=e(74615),u=e(29105);function l(n){var t=n.guid,e=n.enabled,l=void 0===e||e,s=n.onUnfollowCb,d=void 0===s?function(){}:s,f=n.onFollowCb,h=void 0===f?function(){}:f,p=(0,r.useContext)(o.gX),v=p.userInfo,g=p.invokeLogin,m=(null===v||void 0===v?void 0:v.guid)||"",x=(0,c.Z)({guids:[t||""],selfGuid:m},{enabled:Boolean(t&&m&&l),select:function(n){var t;return!!(null===n||void 0===n||null===(t=n[0])||void 0===t?void 0:t.hasFollowed)}}),w=x.data,y=x.isLoading,Z=x.refetch,b=x.isFetching,I=(0,a.Z)({onSuccess:function(){w?d():h()}}).mutateAsync,S=(0,r.useCallback)((function(n){(null===v||void 0===v?void 0:v.id)?I((0,i.Z)({guid:t,following:!w,selfGuid:m},n)):g()}),[I,t,m,w]);return{hasFollowed:w,toggleFollowFn:S,isLoading:y,isFetching:b,refetch:Z,updateStatus:function(n){return(0,u.H)(n,[t||""])}}}},73764:function(n,t,e){e.d(t,{u:function(){return o}});var i=e(2784),r=!1,o=function(n){(0,i.useEffect)((function(){return function(){r=!1}}),[]);var t=(0,i.useCallback)((function(){r||(n(),r=!0)}),[n]),e=(0,i.useCallback)((function(n){r=n}),[]);return{fn:t,flag:r,setFlag:e}}},12998:function(n,t,e){var i=e(81541),r={comment:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return["post","comment",n,"latest",{display:t}]},currencyLatestFeed:function(n,t,e){return["post","currency",n,"latest",t,{postType:e}]},currencyTrendingFeed:function(n,t,e){return["post","currency",n,"trending",t,e]},timeline:function(n,t){return["post","timeline",n,t]},postSecondaryComments:function(n){return["post","secondaryComment",n]},postRepost:function(n){return["post","repost",n]},gravitySearch:function(n,t,e){return["search"].concat((0,i.Z)(n),[t,e])},searchAccount:function(n,t,e){return["search","account",t,{selfGuid:e,searchType:n}]},coinPriceChart:function(n,t){return["coin","chart",n,t]},coinStatsLite:function(n){return["coin","stats","light",n]},trendingSearch:function(){return["trendingSearch"]},postDetail:function(n){return["post",n]},userPosts:function(n,t,e){return["profile","post",n,t,{isYourSelf:e}]},userArticles:function(n){return["articles",n]},recommendedAccounts:function(){return["recommended","account"]},topPostArticle:function(n){return["post","article","topPostArticle",n]},quotes:function(n){return["quotes",n]},postOwner:function(n){return["owner",n]},queryIsProjectMainAccount:function(n){return["queryIsProjectMainAccount",n]},businessSwitch:function(){return["community","businessSwitch"]},giphy:function(n){return["giphy",n]},queryAvatarFrameEvents:function(){return["queryAvatarFrameEvents"]},followings:function(){return["followings"]},watchlist:function(){return["watchlist"]},followList:function(n){return["account","follow",n]},followStatus:function(n){return["account","follow",{target:n}]},pinnedPost:function(){return["post","pinned"]},fuzzyTopic:function(n){return["search","fuzzy","topic",n]},globalSearch:function(n){return["community","search","global",n]},NFTSearch:function(n){return["community","search","NFT",n]}};t.Z=r},11924:function(n,t,e){e.d(t,{Z:function(){return g}});var i=e(62230),r=e(85244),o=e(82066),a=e(15798),c=e.n(a),u=e(54293),l=function(n){return(null===n||void 0===n?void 0:n.guidList)?(0,u.zh)({baseURL:"".concat(c().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/multi-follow",method:"POST",data:n}).then((function(n){var t=n.data;return null===t||void 0===t?void 0:t.data})):(0,u.zh)({baseURL:"".concat(c().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/follow",method:"POST",data:n}).then((function(n){var t=n.data;return null===t||void 0===t?void 0:t.data}))},s=e(67557),d=e(1367),f=e(38825),h=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e?"followings":"followers";return(0,i.Z)({},n,n[r]?(0,s.Z)({},r,p(n,t.following,r,e)):{},e?{}:{hasFollowed:n.guid===t.guid?t.following:n.hasFollowed})},p=function(n,t,e,i){return n.hasFollowed!==t||i?String(!0===t?Number(n[e])+1:Math.max(0,Number(n[e])-1)):n[e]},v=function(n){var t=function(t){var e;return(0,d.Z)(null===n||void 0===n||null===(e=n.guidList)||void 0===e?void 0:e.map((function(t){return{guid:t,hasFollowed:null===n||void 0===n?void 0:n.following}})).concat(t||[]),"guid")},e=function(t){return t.guid===n.guid||t.guid===n.selfGuid?h(t,{guid:t.guid===n.selfGuid?n.selfGuid:n.guid,following:n.following},t.guid===n.selfGuid):t};f.Z.setQueriesData({predicate:function(n){var t;return null===(t=n.queryKey)||void 0===t?void 0:t.includes("account")}},(function(o){if(o)return Array.isArray(o)?(null===n||void 0===n?void 0:n.guidList)?t(o):o.map(e):(null===o||void 0===o?void 0:o.pages)?(null===n||void 0===n?void 0:n.guidList)?(0,r.Z)((0,i.Z)({},o),{pages:o.pages.concat(t())}):(0,r.Z)((0,i.Z)({},o),{pages:o.pages.map((function(n){return n.map(e)}))}):(null===n||void 0===n?void 0:n.guidList)?t(o):h(o,{guid:o.guid===n.guid?n.guid:n.selfGuid,following:n.following},o.guid===n.selfGuid)}))},g=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.useMutation)(["account","follow"],(function(n){return l(n)}),(0,r.Z)((0,i.Z)({},n),{onSuccess:function(t,e,i){(null===n||void 0===n?void 0:n.onSuccess)&&n.onSuccess(t,e,i)},onMutate:function(n){v(n)},onError:function(n,t,e){var o=(0,r.Z)((0,i.Z)({},t),{following:!t.following});v(o)}}))}},29105:function(n,t,e){e.d(t,{H:function(){return l}});var i=e(62230),r=e(85244),o=e(65741),a=e(38825),c=e(12998),u=e(79986),l=function(n,t){a.Z.setQueriesData({predicate:function(n){return(0,o.Z)(n.queryKey,c.Z.followStatus(t))}},(function(t){return Array.isArray(t)?null===t||void 0===t?void 0:t.map((function(t){return(0,r.Z)((0,i.Z)({},t),{hasFollowed:n})})):t}))};t.Z=function(n){var t=n.guids;return n.selfGuid?(0,u.gb)(t).then((function(n){return Object.keys(n).map((function(t){return{guid:t,hasFollowed:n[t]}}))})):t.map((function(n){return{guid:n,hasFollowed:!1}}))}},74615:function(n,t,e){var i=e(62230),r=e(82066),o=e(12998),a=e(29105);t.Z=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.guids;return(0,r.useQuery)(o.Z.followStatus(e),(function(){return(0,a.Z)(n)}),(0,i.Z)({staleTime:3e4},t))}},79986:function(n,t,e){e.d(t,{gb:function(){return I}});var i,r=e(22710),o=e(62230),a=e(85244),c=e(22386),u=e(81541),l=e(5163),s=e(15798),d=e.n(s),f=e(54293),h=e(57035),p=e(38825),v=e(17980);!function(n){n.ALL="ALL",n.OFFICIAL="OFFICIAL"}(i||(i={}));var g,m=function(n){var t=n.cryptoId,e=n.platform,i=n.address,r=n.language,c=(0,v.L)(),u="/v3/gravity/trending-posts/";return u+=t?n.cryptoId:e+"/"+encodeURIComponent(i),(0,f.zh)({baseURL:"".concat(d().env.endpoints.javaApi,"/gravity"),url:u,method:"GET",params:{"over-view":!1,"last-score":n.lastScore,type:n.type,q:Math.floor((new Date).getTime()/1e3),experiment:c,languageCode:r}}).then((function(n){var t,e=n.data,i=p.Z.getQueryData("userInfo"),r=null===e||void 0===e||null===(t=e.data)||void 0===t?void 0:t.lastScore;return e.data.tweetDTOList.map((function(n){return n.owner.guid===(null===i||void 0===i?void 0:i.guid)&&(n.isYours=!0),(0,a.Z)((0,o.Z)({},n),{lastScore:r})}))})).catch((function(n){return[]}))};!function(n){n[n.NORMAL=0]="NORMAL",n[n.DELETE=3]="DELETE"}(g||(g={}));var x,w=function(){var n=(0,r.Z)((function(n){return(0,l.__generator)(this,(function(t){return[2,(0,f.zh)({baseURL:"".concat(d().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)}}(),y=function(){var n=(0,r.Z)((function(n){return(0,l.__generator)(this,(function(t){return[2,(0,f.zh)({baseURL:"".concat(d().env.endpoints.javaApi,"/gravity"),url:"v3/gravity/like/status",method:"POST",data:{gravityIds:n}}).then((function(n){return n.data.data||[]}),(function(n){return[]}))]}))}));return function(t){return n.apply(this,arguments)}}(),Z=function(n){return(0,f.zh)({baseURL:"".concat(d().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){}))},b=function(){var n=(0,r.Z)((function(n){return(0,l.__generator)(this,(function(t){return[2,(0,f.zh)({baseURL:"".concat(d().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/searchAccount",method:"GET",params:(0,o.Z)({handleOnly:!1},n)}).then((function(n){return n.data.data||[]}),(function(n){return[]}))]}))}));return function(t){return n.apply(this,arguments)}}(),I=function(){var n=(0,r.Z)((function(n){return(0,l.__generator)(this,(function(t){return n&&0!==n.length?[2,(0,f.zh)({baseURL:"".concat(d().env.endpoints.javaApi,"/gravity"),url:"/v3/gravity/follow/status",method:"POST",data:{guids:n}}).then((function(n){return n.data.data||{}}),(function(n){return{}}))]:[2,[]]}))}));return function(t){return n.apply(this,arguments)}}(),S=function(n,t,e){var i;return{voteSummary:(0,a.Z)((0,o.Z)({},t),{votes:null===t||void 0===t||null===(i=t.votes)||void 0===i?void 0:i.map((function(t){var i;return(0,a.Z)((0,o.Z)({},t),{checked:null===(i=null===e||void 0===e?void 0:e.find((function(t){return t.tweetId===n})))||void 0===i?void 0:i.itemIds.includes(t.id)})}))})}};!function(n){n.all="all",n.account="account",n.post="post",n.guid="guid"}(x||(x={}));!function(){var n=(0,r.Z)((function(n){var t,e,s,d,f,v,g,C,P,L,W,j,k,F,T,A,_,z,E,D;return(0,l.__generator)(this,(function(N){switch(N.label){case 0:return e=(t=n||{}).searchType,s=t.cryptoId,d=t.language,f=t.word,v=t.start,g=void 0===v?0:v,C=t.handleOnly,P=void 0!==C&&C,L=t.queryFollower,W=void 0===L||L,j=t.lastScore,k=void 0===j?"":j,F=t.fullWord,g>999?[2,[]]:(T=!!p.Z.getQueryData("userInfo"),A=function(){var n=(0,r.Z)((function(n){var t,i,r;return(0,l.__generator)(this,(function(c){switch(c.label){case 0:return[4,w((0,h.J)((0,a.Z)((0,o.Z)({},n),{languageCode:d,latestSort:"post"===e})))];case 1:return(null===(t=c.sent())||void 0===t?void 0:t.length)?T?[4,y(t.map((function(n){return n.gravityId})))]:[2,t.map((function(n){return(0,a.Z)((0,o.Z)({},n),{isLiked:!1})}))]:[2,[]];case 2:return i=c.sent(),[4,Z(t.filter((function(n){return n.hasVote})).map((function(n){return n.gravityId})))];case 3:return r=c.sent(),[2,t.map((function(n){return(0,o.Z)((0,a.Z)((0,o.Z)({},n),{isLiked:null===i||void 0===i?void 0:i[n.gravityId]}),n.hasVote&&r?S(n.gravityId,n.voteSummary,r):{})}))||[]]}}))}));return function(t){return n.apply(this,arguments)}}(),_=function(){var n=(0,r.Z)((function(n){var t,e,i,r,c;return(0,l.__generator)(this,(function(u){switch(u.label){case 0:return t=n.word,e=n.start,i=n.handleOnly,t||s?[4,b({word:t,start:e,handleOnly:i,cryptoId:s,fullWord:F})]:[2,[]];case 1:return(null===(r=u.sent())||void 0===r?void 0:r.length)?!!p.Z.getQueryData("userInfo")?W?[4,I(r.map((function(n){return n.guid})))]:[3,3]:[2,r.map((function(n){return(0,a.Z)((0,o.Z)({},n),{hasFollowed:!1})}))]:[2,[]];case 2:return c=u.sent(),[2,r.map((function(n){return(0,a.Z)((0,o.Z)({},n),{hasFollowed:null===c||void 0===c?void 0:c[n.guid]})}))];case 3:return[2,r];case 4:return[2]}}))}));return function(t){return n.apply(this,arguments)}}(),z=function(){var n=(0,r.Z)((function(){var n,t,e;return(0,l.__generator)(this,(function(r){switch(r.label){case 0:return s?(n={cryptoId:s,lastScore:k,overView:!1,type:i.ALL},!!p.Z.getQueryData("userInfo")?[4,m(n)]:[2,m(n)]):[3,3];case 1:return t=r.sent(),[4,Z(t.filter((function(n){return n.hasVote})).map((function(n){return n.gravityId})))];case 2:return e=r.sent(),[2,t.map((function(n){return(0,o.Z)({},n,n.hasVote&&e?S(n.gravityId,n.voteSummary,e):{})}))];case 3:return[2,A(D)];case 4:return[2]}}))}));return function(){return n.apply(this,arguments)}}(),E=null===f||void 0===f?void 0:f.trim().replace(/\s{2,}/g," ").split(" "),D={word:(null===E||void 0===E?void 0:E.filter((function(n){return!n.startsWith("#")&&!n.startsWith("$")||"$"===n||"#"===n})).join(","))||"",hashTag:(null===E||void 0===E?void 0:E.filter((function(n){return n.startsWith("#")&&n.length>1})).map((function(n){return n.replace("#","")})).join(","))||"",symbol:(null===E||void 0===E?void 0:E.filter((function(n){return n.startsWith("$")&&n.length>1})).map((function(n){return n.replace("$","")})).join(","))||"",start:g,fullWord:f,handleOnly:P},e===x.all&&0===D.start?[2,Promise.all([_(D),z()]).then((function(n){var t=(0,c.Z)(n,2),e=t[0],i=t[1];return(0,u.Z)(e.slice(0,3)).concat((0,u.Z)(i))}))]:e!==x.account?[3,2]:D.start>9?[2,[]]:[4,_(D)]);case 1:case 3:case 5:return[2,N.sent()];case 2:return e!==x.post?[3,4]:[4,A(D)];case 4:return e!==x.all||0===D.start?[3,6]:[4,z()];case 6:return[2,[]]}}))}))}()},97028:function(n,t,e){var i=e(62230),r=e(85244),o=e(98240),a=e(75190),c=e(52322),u=e(2784),l=e(82740),s=e(54604),d=e(83821),f=e(81730);function h(){var n=(0,a.Z)(["\n border-radius: ",";\n padding: 0;\n\n ","\n\n ","\n"]);return h=function(){return n},n}var p=(0,l.ZP)(f.ZP).withConfig({componentId:"sc-126cfa71-0"})(h(),(function(n){return n.rounded?"50%":"8px"}),(0,d.ZP)({prop:"size",variants:{sm:{width:"32px"},md:{width:"40px"},lg:{width:"48px"},xl:{width:"48px"},xxl:{width:"56px"}}}),s.ZP),v={sm:"16px",md:"20px",lg:"24px",xl:"24px",xxl:"28px"},g=function(n){var t=n.as,e=n.children,a=(0,o.Z)(n,["as","children"]);return(0,c.jsx)(p,(0,r.Z)((0,i.Z)({},a),{forwardedAs:t,children:u.isValidElement(e)?u.cloneElement(e,{size:v[a.size||"md"]}):e}))};g.defaultProps={size:"md",rounded:!1},t.Z=g}}]);