-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path11498-243558ae2b3e631.js.download
1 lines (1 loc) · 13.3 KB
/
11498-243558ae2b3e631.js.download
1
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[11498,54382],{6853:function(n,e,r){var t=r(95210),i=r(51012),o=r(47998),c=r(52322),u=r(2784),a=r(49948),l=r(94184),d=r.n(l),s=r(39097),v=r.n(s),f=r(27801),p=r(1284),h=r(15754),m=r(16091),g=r(64846),y=r.n(g),b=r(15798),w=r.n(b),x=r(68183),Z=function(n){(0,i.Z)(r,n);var e=(0,o.Z)(r);function r(){return(0,t.Z)(this,r),e.apply(this,arguments)}return r.prototype.render=function(){var n=this.props,e=n.lang,r=n.children,t=n.className,i=n.onClick,o=n.forwardRef,u=n.relOverride,a=n.title,l=n.style,s=n.scroll,g=void 0===s||s,b=n.isDisableLanguagePrefix,Z=void 0!==b&&b,k=(n.prefetch,n.forceRefresh),C=n.shallow,S=void 0!==C&&C,j=this.props.href;!Z&&(0,f.Z)(j,"/")&&"en"!==e&&(j="/".concat(e).concat(j));var P=this.props,q=P.target,N=P.rel,E=void 0===N?[]:N;(0,p.Z)(E)&&(E=[E]);var F=y()(j,!0).hostname;if(!q&&F&&!(0,x.Z)(F)){var L=!1;(0,h.Z)(w().links.referrerOk,(function(n){if((0,m.Z)(F,n))return L=!0,!1})),E.push("noopener nofollow"),L||E.push("noreferrer"),q="_blank"}var A=(0,c.jsx)("a",{ref:o,onClick:i,target:q,rel:u||E.join(" ")||void 0,href:j,title:a,style:l,className:d()(t,{"cmc-link":!0}),"data-qa-id":this.props["data-qa-id"],children:r});return!k&&j&&"/"===j[0]?(0,c.jsx)(v(),{href:j,scroll:g,shallow:S,children:A}):A},r}(u.PureComponent);e.Z=(0,a.connect)((function(n){return{lang:n.app.lang}}))(Z)},18638:function(n,e,r){var t=r(52322),i=r(54382),o=r(37881),c=r(48596),u=r(38167);e.Z=function(n){var e=n.price,r=(n.useSymbol,n.withoutWrapper),a=n.formatterProps,l=void 0===a?{}:a,d=(0,c.$T)(e,{usePriceAbbreviation:!0}),s=(0,c.$T)(e,l),v=(0,c.$T)(e,{useSymbol:!1,comma:!1}),f=Number(v)<=1e-9&&0!==Number(v)||s.length>d.length;return(0,t.jsx)(t.Fragment,{children:f?(0,t.jsx)(i.default,{content:(0,t.jsx)(o.ZP,{fontWeight:700,style:{padding:"10px"},children:s}),theme:"cmc",interactive:!0,appendTo:function(){return document.body},children:(0,t.jsx)("span",{className:"abbreviation-price",style:{cursor:"pointer"},children:(0,t.jsx)(u.ch,{price:s,children:d})})}):r?s:(0,t.jsx)("span",{children:s})})}},38167:function(n,e,r){r.d(e,{Ks:function(){return A},Zz:function(){return L},bv:function(){return F},ch:function(){return E}});var t=r(62230),i=r(85244),o=r(98240),c=r(75190),u=r(52322),a=r(2784),l=r(6853),d=r(36860),s=r(83216),v=r(3952),f=r(58382),p=r(31535),h=r(18638),m=r(54251),g=r(82740),y=r(48723),b=r(81751),w=r(58629);function x(){var n=(0,c.Z)(["\n 0% {\n // color: yellow;\n color: var(--changedColor);\n // background-color: yellow;\n }\n 40% {\n color: var(--changedColor);\n }\n 100% {\n color: var(--text-color);\n // background-color: transparent;\n }\n"]);return x=function(){return n},n}function Z(){var n=(0,c.Z)(["\n color: var(--text-color);\n &.rise {\n --changedColor: #16c784;\n }\n &.fall {\n --changedColor: #ea3943;\n }\n &.rise,\n &.fall {\n animation: "," 3s linear forwards;\n }\n\n a.cmc-link {\n color: inherit;\n }\n /* @media (max-width: ","px) {\n font-size: 24px;\n } */\n"]);return Z=function(){return n},n}var k=/[\d.,]/g,C=/[^\d.-]/g,S=function(n){return parseFloat(String(n).replace(C,""))},j=function(n){return String(n).replace(k,"")},P=(0,g.F4)(x()),q=g.ZP.div.withConfig({componentId:"sc-a0353bbc-0"})(Z(),P,y.AV.XSMALL),N=function(n,e){var r,t=n.quote?n.quote.USD:null===(r=n.quotes)||void 0===r?void 0:r[0],i=null===t||void 0===t?void 0:t.price;return n.market_pair_base&&e.baseCryptocurrencyId&&n.market_pair_base.currency_id!==e.baseCryptocurrencyId&&(i=null===t||void 0===t?void 0:t.price_quote),i},E=function(n){var e=n.price,r=n.children,c=n.disabled,l=(0,o.Z)(n,["price","children","disabled"]),d=function(n){var e=(0,a.useRef)(S(n)),r=(0,a.useRef)(j(n)),t=(0,a.useState)(""),i=t[0],o=t[1],c=(0,f.Z)();return(0,a.useEffect)((function(){var t=j(n),i=S(n);if(t!==r.current)return r.current=t,void(e.current=i);i>e.current?o("rise"):i<e.current&&o("fall");var u=setTimeout((function(){c()&&o("")}),3e3);return e.current=i,function(){clearTimeout(u)}}),[n]),i}(e);return(0,u.jsx)(q,(0,i.Z)((0,t.Z)({className:c?void 0:d},l),{children:r}))},F=function(n){var e,r,t,i,o,c=n.data,a=n.inViewPort,l=n.isATL;if(n.data&&!(null===(e=n.data)||void 0===e?void 0:e.quote)&&!(null===(r=n.data)||void 0===r||null===(t=r.quotes)||void 0===t?void 0:t[0]))return p.HY;var s=N(c,{}),f=(0,m.l)({id:c.id,key:"p",initData:{p:s,t:new Date(c.quote.USD.lastUpdated).getTime()},inViewPort:a}).value,g=(l?null===(i=n.data)||void 0===i?void 0:i.atl:null===(o=n.data)||void 0===o?void 0:o.ath)||0,y=l?f-g:g-f,b=(0,d.useCurrencyFormatter)(y,{displayingCurrency:(0,v.Y3)((function(){return c.symbol.toLowerCase()}),"")});return(0,u.jsxs)(E,{disabled:!0,price:b,style:{lineHeight:1.4},children:[f<g?"-":"+",(0,u.jsx)(h.Z,{price:y}),(0,u.jsx)("br",{}),(0,u.jsx)(w.Z,{value:0===g?999999999:(f-g)/g*100,isShowPrefix:!1,style:{fontSize:12},formatter:function(n){return"".concat(n>0?"+":"").concat((0,v.q1)(n,0),"%")}})]})},L=function(n){var e=n.price,r=void 0===e?0:e;return(0,u.jsx)(u.Fragment,{children:(0,d.useCurrencyFormatter)(r)})},A=function(n){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];try{var r=(0,s.p)(n,e);return n<b.Sp?b.V8:(0,v.q1)(n,r)}catch(t){return 0}};e.ZP=function(n){var e,r,t,i,o,c=n.data,s=n.params,f=void 0===s?{}:s,g=n.inViewPort,y=n.price,b=n.transform,w=void 0===b?function(n){return n}:b,x=n.useSymbol,Z=void 0===x||x,k=n.disabledAnimation,C=void 0!==k&&k;if(!y&&n.data&&!(null===(e=n.data)||void 0===e?void 0:e.quote)&&!(null===(r=n.data)||void 0===r||null===(t=r.quotes)||void 0===t?void 0:t[0]))return p.HY;var S=null!==y&&void 0!==y?y:N(c,f),j=(0,m.l)({id:c.id,key:"p",initData:{p:S,t:new Date(null===c||void 0===c||null===(i=c.quote)||void 0===i||null===(o=i.USD)||void 0===o?void 0:o.lastUpdated).getTime()},inViewPort:g}).value,P=(0,d.useCurrencyFormatter)(w(j),{displayingCurrency:(0,v.Y3)((function(){return c.symbol.toLowerCase()}),"")}),q=(0,a.useMemo)((function(){return function(n,e){var r="";return n.outlier_detected?r="*** ":e.showExclusions&&Array.isArray(n.exclusions)&&n.exclusions.includes("price")&&(r="* "),r}(c,f)}),[c,f]),F=c.slug?(0,u.jsxs)(l.Z,{href:"/currencies/".concat(c.slug,"/#markets"),forceRefresh:!0,children:[q,(0,u.jsx)(h.Z,{price:j,useSymbol:Z})]}):(0,u.jsxs)(a.Fragment,{children:[q,(0,u.jsx)(h.Z,{price:j,useSymbol:Z})]});return(0,u.jsx)(E,{disabled:C,price:P,children:F})}},58629:function(n,e,r){var t=r(75190),i=r(52322),o=(r(2784),r(82740)),c=r(31535);function u(){var n=(0,t.Z)(["\n white-space: nowrap;\n border-radius: 8px;\n padding: ",";\n background-color: ",";\n color: ",";\n span[class^='icon'] {\n margin-right: 1px;\n margin-left: 1px;\n }\n"]);return u=function(){return n},n}var a=o.ZP.span.withConfig({componentId:"sc-37eaf55b-0"})(u(),(function(n){return n.invert?"3px 10px":0}),(function(n){var e=n.invert,r=n.isUp;return e?r?"var(--up-color)":"var(--down-color)":void 0}),(function(n){var e=n.invert,r=n.isUp;return e?"#fff":r?"var(--up-color)":"var(--down-color)"}));e.Z=function(n){var e=n.value,r=n.invert,t=n.style,o=n.hide,u=n.isShowPrefix,l=void 0===u||u,d=n.formatter,s=void 0===d?function(n){return(null===n||void 0===n?void 0:n.toFixed(2).slice(n>=0?0:1))+"%"}:d,v=n.isPrivacy,f=void 0!==v&&v;if(void 0===e)return c.HY;var p=e>=0;return(0,i.jsx)(a,{style:t,invert:r,isUp:p,children:o||(0,i.jsxs)(i.Fragment,{children:[l&&(0,i.jsx)("span",{className:"icon-Caret-".concat(p?"up":"down"),style:{width:12,height:18,display:"inline-block"}}),f?"****":s(e)]})})}},58382:function(n,e,r){var t=r(2784);e.Z=function(n){var e=(0,t.useRef)(!1);return(0,t.useEffect)((function(){var r;return e.current=!0,n&&(r=n()),function(){e.current=!1,r&&"function"===typeof r&&r()}}),[]),function(){return e.current}}},48596:function(n,e,r){r.d(e,{$T:function(){return m},nB:function(){return h}});var t=r(22386),i=r(49948),o=r(81751),c=r(15798),u=r.n(c),a=r(64626),l=r(3952),d=r(47726),s=r(77705),v=function(n,e){var r=Math.abs(n);if(0===r)return 0;if(r<1){if(r<1e-18)return 4+(0,s.l)(r);var t=Math.min(4+(0,s.l)(r),18),i=r.toFixed(t).match(/0+$/);return t-(i?i[0].length:0)}return r<10&&e?4:2},f=function(n,e,r,t,i){return i?e+n+" "+(t?r.toUpperCase():""):e+(t?r:"")+n};function p(n){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2781,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!(0,l.pG)(n))return"-";var a=c.abbreviate,d=c.useSymbol,s=void 0===d||d,p=c.decimal,h=c.comma,m=void 0===h||h,g=c.usePriceAbbreviation,y=void 0!==g&&g,b=c.converted,w=c.usePrefix,x=c.displayingCurrency,Z=c.currency,k=c.formattedAsAnObject,C=(c.formattedAsString,c.decimal),S=u().currencies.map[i],j=u().currencies.isCrypto(Z||i),P=Z||(null===(e=u().currencies.map[S.id])||void 0===e?void 0:e.token),q=(null===S||void 0===S?void 0:S.symbol)===x?1:b?n:n/r,N=(null===S||void 0===S?void 0:S.symbol)===x?1:b?n:n/r,E=w?n>=0?"+ ":"- ":"";if(y&&Math.abs(N)<o.Y$&&0!==N){var F=Math.sign(N),L={1:"","-1":"-"};return N=j?"<".concat(L[F],"0.0\u202600001 ").concat(P):"<".concat(L[F]).concat(s?P:"","0.0\u202600001"),f(N,"","",!1,!1)}if(C="number"===typeof p?p:"function"===typeof p?p(N,j):v(N,j),a)N=(0,l.DH)(N,C);else{var A=N.toFixed(C);if(N=1===Number(A)&&N<1?String(N).slice(0,6):A,m){var D=(0,t.Z)(N.split("."),2),T=D[0],_=D[1],H=void 0===_?"":_;N=T.replace(/\B(?=(\d{3})+(?!\d))/g,",")+(H?".".concat(H):"")}}var R=w?String(N).replace("-",""):N;return y&&(R=0===Number(R)?"< 0.0\u202600001":R.slice(0,3)+"..."+R.slice(-5)),k?{value:R,convertedValue:q,prefix:E,token:P,useSymbol:s,isCrypto:j}:f(R,E,P,s,j)}function h(){var n,e=(0,i.useSelector)(d.PN),r=(null===e||void 0===e?void 0:e.id)||2781,t=null===(n=a.C.get(r))||void 0===n?void 0:n.p;return function(n,e){return p(n,t,r,e)}}function m(n){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=(0,i.useSelector)(d.PN),o=r.currencyId,c=o||(null===t||void 0===t?void 0:t.id)||2781,u=null===(e=a.C.get(c))||void 0===e?void 0:e.p;return p(n,u,c,r)}},20431:function(n,e,r){var t=r(2784);e.Z=function(n){var e=(0,t.useRef)(!1);return(0,t.useEffect)((function(){var r;return e.current=!0,n&&(r=n()),function(){e.current=!1,r&&"function"===typeof r&&r()}}),[]),function(){return e.current}}},54251:function(n,e,r){r.d(e,{l:function(){return a}});var t=r(62230),i=r(2784),o=r(20431),c=r(75588),u=r(64626);function a(n){var e=n.id,r=n.key,a=n.initData,l=n.inViewPort,d=void 0===l||l,s=u.C.get(e);var v=(0,t.Z)({t:Date.now()},a,s);(null===a||void 0===a?void 0:a.t)&&(null===s||void 0===s?void 0:s.t)&&a.t>s.t&&(v=(0,t.Z)({},s,a));var f=(0,i.useState)(v),p=f[0],h=f[1],m=(0,o.Z)(),g=(0,i.useMemo)((function(){return void 0!==e&&p&&r&&void 0!==p[r]?p[r]:v&&r&&v[r]||0}),[e,p,r,v]),y=(0,i.useRef)((function(n){m()&&h((function(e){return n.t>e.t?(0,t.Z)({},e,n):e}))}));return(0,i.useEffect)((function(){return d?u.C.subscribe({id:e,key:r},y.current):u.C.unsubscribe({id:e,key:r},y.current),function(){u.C.unsubscribe({id:e,key:r},y.current)}}),[d,e,r]),(0,c.Z)((function(){var n=u.C.get(e);h(n||v)}),[e]),{data:p,value:g}}},54382:function(n,e,r){r.r(e);var t=r(62230),i=r(85244),o=r(98240),c=r(22386),u=r(81541),a=r(52322),l=r(39721),d=r(2784),s=r(66582),v=r(82740),f=r(8112),p={strategy:"fixed",modifiers:[{name:"computeStyles",options:{adaptive:!1}}]},h=function(n){var e,r,o=(0,d.useState)(!1),c=o[0],s=o[1],f=(0,v.Fg)(),h={fn:function(){return{onShow:function(){return s(!0)},onHidden:function(){return s(!1)}}}},m=(0,i.Z)((0,t.Z)({},n),{className:"cmc-uikit-tippy "+(null!==(e=n.className)&&void 0!==e?e:"")+" "+(f.isDay?"cmc-uikit-theme-day":"cmc-uikit-theme-night")});(m.popperOptions=p,m.plugins=[h].concat((0,u.Z)(n.plugins||[])),n.render)?m.render=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return c&&n.render?(r=n).render.apply(r,(0,u.Z)(t)):""}:m.content=c?n.content:"";return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(l.ZP,(0,t.Z)({},m))})},m="popover-state";e.default=function(n){var e=n.placement,r=void 0===e?"bottom":e,u=n.content,l=n.children,v=n.singletonTarget,p=n.trigger,g=void 0===p?"mouseenter focus":p,y=n.onShown,b=n.onHidden,w=n.setVisible,x=n.hideOnClick,Z=(0,o.Z)(n,["placement","content","children","singletonTarget","trigger","onShown","onHidden","setVisible","hideOnClick"]),k=(0,c.Z)((0,f.$G)(),1)[0],C=(0,d.useRef)(null),S=(0,d.useRef)(null),j=function(n,e){e&&(n.stopPropagation(),e.hide(),w&&w(!1))},P=function(n){if(window.innerWidth<768){var e;document.body.style.overflow="hidden",window.history.pushState(m,""),S.current=function(e){e.state!==m&&j(e,n)},window.addEventListener("popstate",S.current),C.current=function(e){return j(e,n)},null===(e=n.popper)||void 0===e||e.addEventListener("click",C.current);var r=n.popper.querySelector(".tippy-box");if(r&&!r.querySelector(".close-button")){var t=document.createElement("button");t.textContent=k("Close"),t.classList.add("close-button"),t.addEventListener("click",C.current),r.appendChild(t),r.addEventListener("click",(function(n){n.stopPropagation()}))}}y&&y(n)},q=function(n){var e;window.innerWidth<768&&(document.body.style.overflow="",window.history.state===m&&window.history.back(),window.removeEventListener("popstate",S.current),null===(e=n.popper)||void 0===e||e.removeEventListener("click",C.current));b&&b(n)};return"undefined"!==typeof Z.visible?(0,a.jsx)(h,(0,i.Z)((0,t.Z)({content:u,singleton:v,placement:r},Z),{onShown:P,onHidden:q,children:l})):(0,a.jsx)(h,(0,i.Z)((0,t.Z)({content:u,singleton:v,trigger:"".concat(g," ").concat(s.tq?"click":""),placement:r,hideOnClick:x},Z),{onShown:P,onHidden:q,children:l}))}}}]);