1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[763],{78003:function(e,t,l){l.d(t,{kL:function(){return s.default},_M:function(){return u.ChartContext},UT:function(){return u.ChartProvider},UI:function(){return n.default},tg:function(){return c},O6:function(){return r.default},Ue:function(){return o.default}});var r=l(38066),n=l(26870),s=l(48117),i=l(57437);l(2265);var a=l(69674),d=l(16364),c=e=>{let{hdr_id:t,currency:l,period:r,avaragePriceTr:n,depthTr:s,children:c}=e;return(0,i.jsx)("section",{className:"wrapper",children:(0,i.jsxs)("div",{className:"w-full p-6 flex flex-col md:flex-row items-start gap-9 rounded-xl border-2 border-gray-3 bg-gray-4",children:[c,(0,i.jsxs)("div",{className:"w-full flex flex-col gap-12",children:[(0,i.jsx)(a.default,{avaragePriceTr:n,hdr_id:t,currency:l,period:r}),(0,i.jsx)(d.default,{hdr_id:t,depthTr:s})]})]})})},o=l(65464),u=l(91049)},91049:function(e,t,l){l.d(t,{ChartContext:function(){return s},ChartProvider:function(){return i}});var r=l(57437),n=l(2265);let s=n.createContext({}),i=e=>{let{children:t}=e,[l,i]=n.useState([]);return(0,r.jsx)(s.Provider,{value:{chart:l,setChart:i},children:t})}},26870:function(e,t,l){var r=l(2265),n=l(86660);t.default=r.memo(e=>{let{socketId:t,coins:l,hdr_ids:s,currency:i}=e,a=null!=s?s:null==l?void 0:l.map(e=>e.hdr_id);return r.useEffect(()=>{if(a&&a.length)return n.r.connect({socketId:t,hdr_ids:a,currency:i}),()=>n.r.disconnect(t)},[i,a,t]),null})},1176:function(e,t,l){l.d(t,{J:function(){return i},s:function(){return a}});var r=l(42353),n=l(29450);let s=e=>{switch(e){case n.Wk["4H"]:return{interval:"1m",count:240,aggregate:1};case n.Wk["24H"]:return{interval:"5m",count:288,aggregate:1};case n.Wk["7D"]:return{interval:"1h",count:168,aggregate:1};case n.Wk["1M"]:return{interval:"1h",count:360,aggregate:2};case n.Wk["3M"]:return{interval:"12h",count:180,aggregate:1};case n.Wk["1Y"]:return{interval:"1d",count:365,aggregate:1};case n.Wk.ALL:return{interval:"1d",count:365,aggregate:0};default:return{interval:"5m",count:288,aggregate:1}}},i=async(e,t,l,n)=>{let{interval:i,count:a,aggregate:d}=s(l);return await r.k9.getChart({hdr_id:e,currency:t,interval:i,count:a,aggregate:d,abortSignal:n})},a=async(e,t,l,n)=>{let{interval:i,count:a,aggregate:d}=s(l);return await r.k9.getCrossChart({base_hdr_id:e,quote_hdr_id:t,interval:i,count:a,aggregate:d,abortSignal:n})}},69674:function(e,t,l){var r=l(57437),n=l(61994),s=l(2265),i=l(60610),a=l(45664),d=l(72684),c=l(38066),o=l(78003);t.default=e=>{var t,l,u,h;let{hdr_id:m,currency:x,period:f,avaragePriceTr:p}=e,{chart:g}=s.useContext(o._M),v=Math.min(...g.map(e=>{var t;return Math.min((null==e?void 0:e.price)||0,(null===(t=g[0])||void 0===t?void 0:t.price)||0)})),j=Math.max(...g.map(e=>{var t;return Math.max((null==e?void 0:e.price)||0,(null===(t=g[0])||void 0===t?void 0:t.price)||0)})),b=null!==(u=null===(t=g[0])||void 0===t?void 0:t.price)&&void 0!==u?u:0,y=null!==(h=null===(l=g[g.length-1])||void 0===l?void 0:l.price)&&void 0!==h?h:0,k=g.length&&j-v>0?(y-v)/(j-v)*100:0,w=(0,a.dN)({amount:(y-b)/b*100,fractionDigits:2,isStrictFractionDigits:!0});return(0,r.jsxs)("div",{className:"w-full flex flex-col items-start gap-5",children:[(0,r.jsx)("h3",{className:"h4 text-gray-2",children:p.title}),(0,r.jsxs)("div",{className:"w-full flex flex-col justify-start gap-3",children:[(0,r.jsxs)("div",{className:"w-full h-7 flex justify-between text-white",children:[(0,r.jsx)(c.default,{hdr_id:m,currency:x,initialPrice:y}),(0,r.jsxs)("div",{className:(0,n.Z)("w-auto p-1 flex items-center justify-center gap-[0.25rem] rounded",w.negative?"text-red-dash bg-red-dark":"text-green bg-green-dark"),children:[(0,r.jsx)(d.Eh,{className:(0,n.Z)(w.negative?void 0:"rotate-180")}),(0,r.jsxs)("span",{className:"body_3",children:[w.markup,"%"]})]})]}),(0,r.jsx)(i.fC,{className:"w-full bg-gray-23 rounded-lg",value:k,children:(0,r.jsx)(i.z$,{className:"h-2 bg-[linear-gradient(to_right_bottom,#48B2FA,#B3F3ED)] rounded-lg",style:{width:"".concat(k,"%")}})}),(0,r.jsxs)("div",{className:"w-full flex justify-between",children:[(0,r.jsx)("div",{className:"body_1 text-gray-1",children:(0,a.dN)({amount:v,currency:x}).markup}),(0,r.jsx)("div",{className:"body_1 text-white",children:"".concat(p.range," ").concat(f)}),(0,r.jsx)("div",{className:"body_1 text-gray-1",children:(0,a.dN)({amount:j,currency:x}).markup})]})]})]})}},48117:function(e,t,l){l.d(t,{default:function(){return eO}});var r=l(57437),n=l(2265),s=l(72684),i=l(87994),a=l(9519),d=l(85060),c=l(20935),o=l(48514),u=l(16862),h=l(59923),m=l(85323),x=l(92269),f=l(1817),p=l(94462),g=l(83935),v=l(21858),j=l(75193),b=l(59570),y=l(54308),k=l(98345),w=l(58598),N=l(96914),_=l(68354),C=l(45664);let Z="transparent",M="#1F1F25",S="#BCBCBE",O="white",E="#3C6AFF",D="#3484EB",R="#FA7C5D",P="#FFA3A3",A={...f.j,background:Z,zIndex:1,padding:0},F=e=>new Date(1e3*e.time),I=e=>null==e?void 0:e.price,B=(0,b.Z)(e=>new Date(1e3*e.time)).left,T=(0,p.Z)(e=>{let{parentWidth:t,parentHeight:l,chart:s,chart2:x,currency:f,baseCoinName:p,compareCoinName:b,margin:T={top:20,right:60,bottom:30,left:60},isMobile:z,showTooltip:L,hideTooltip:W,tooltipData:q,tooltipTop:U=0,tooltipLeft:Y=0}=e,H=t||0,$=l||0,V=z?H:H-T.left-T.right,J=$-T.top-T.bottom,X=Math.min(...s.map(e=>I(e))),Q=Math.max(...s.map(e=>I(e))),G=Math.min(...x.map(e=>I(e))),K=Math.max(...x.map(e=>I(e))),ee=z?0:T.left,et=$-T.bottom,el=z?H:H-T.right,er=(0,n.useMemo)(()=>{let e=z?0:T.left,t=z?V:V+T.left;return(0,h.Z)({range:[e,t],domain:(0,y.Z)(s,F)})},[s,V,z,T.left]),en=(0,n.useMemo)(()=>{let e=z?0:T.left,t=z?V:V+T.left;return(0,h.Z)({range:[e,t],domain:(0,y.Z)(x,F)})},[x,V,z,T.left]),es=(0,n.useMemo)(()=>
1(0,m.Z)({range:[J+T.top,T.top],domain:[X,Q],nice:!0}),[J,T.top,X,Q]),ei=(0,n.useMemo)(()=>(0,m.Z)({range:[J+T.top,T.top],domain:[G,K],nice:!0}),[J,T.top,G,K]),[ea,ed]=n.useState({left:0,top:0,pointY:0,data:x[0]}),ec=(0,n.useCallback)(()=>W(),[W]),eo=(0,n.useCallback)(e=>{let{x:t,y:l}=(0,v.Z)(e)||{x:0,y:0},r=er.invert(t),n=B(s,r,1),i=s[n-1],a=s[n],d=i;a&&F(a)&&(d=r.valueOf()-F(i).valueOf()>F(a).valueOf()-r.valueOf()?a:i),L({tooltipData:d,tooltipLeft:t,tooltipTop:es(I(d))});let c=en.invert(t),o=B(x,c,1),u=x[o-1],h=x[o],m=u;h&&F(h)&&(m=c.valueOf()-F(u).valueOf()>F(h).valueOf()-c.valueOf()?h:u),ed({left:t,top:ei(I(m)),pointY:l,data:m})},[er,en,s,x,L,es,ei]),eu=n.useCallback(()=>es(I(s[s.length-1])),[s,es]),eh=n.useCallback(()=>ei(I(x[x.length-1])),[x,ei]);return!(H<10)&&s.length&&x.length?(0,r.jsxs)("div",{children:[(0,r.jsxs)("svg",{width:H,height:$,children:[(0,r.jsx)("rect",{x:0,y:0,width:H,height:$,fill:Z,rx:14}),(0,r.jsx)(j.Z,{id:"area-gradient",from:D,to:"#00398200",fromOpacity:.5,toOpacity:1}),(0,r.jsx)(j.Z,{id:"area-gradient2",from:P,to:"#72000000",fromOpacity:.5,toOpacity:1}),(0,r.jsx)(o.Z,{left:z?0:T.left,scale:es,width:V,stroke:M,strokeOpacity:1,pointerEvents:"none"}),(0,r.jsx)(u.Z,{top:T.top,scale:er,height:J,stroke:M,strokeOpacity:1,pointerEvents:"none"}),(0,r.jsx)(i.Z,{data:s,x:e=>{var t;return null!==(t=er(F(e)))&&void 0!==t?t:0},y:e=>{var t;return null!==(t=es(I(e)))&&void 0!==t?t:0},yScale:es,strokeWidth:2,stroke:E,fill:"url(#area-gradient)",curve:c.Z}),(0,r.jsx)(i.Z,{data:x,x:e=>{var t;return null!==(t=en(F(e)))&&void 0!==t?t:0},y:e=>{var t;return null!==(t=ei(I(e)))&&void 0!==t?t:0},yScale:ei,strokeWidth:2,stroke:R,fill:"url(#area-gradient2)",curve:c.Z}),z&&(0,r.jsx)(a.Z,{from:{x:ee,y:J+T.top},to:{x:el,y:J+T.top},stroke:M,strokeWidth:2.5,pointerEvents:"none"}),!z&&(0,r.jsx)(w.Z,{stroke:M,strokeWidth:2.5,tickStroke:M,tickLabelProps:{fill:S,fontSize:12,fontFamily:"var(--font-roboto)",textAnchor:"middle"},labelProps:{fontSize:18,strokeWidth:0,paintOrder:"stroke",fontFamily:"var(--font-roboto)",textAnchor:"start"},top:et,scale:er,numTicks:H>767?10:5}),(0,r.jsx)(N.Z,{stroke:M,strokeWidth:2.5,tickStroke:M,hideTicks:z,tickFormat:e=>"".concat(e),tickComponent:e=>{let{x:t,y:l,formattedValue:n}=e;return(0,C.dN)({amount:n,withTrailingZeroes:!0,getSvg:(e,n,s)=>(0,r.jsxs)("text",{x:t,y:l,fill:S,fontSize:12,textAnchor:z?"start":"end",children:[e,n&&(0,r.jsx)("tspan",{dy:4,fontSize:10,children:n}),s&&(0,r.jsx)("tspan",{dy:-4,fontSize:12,children:s})]})}).svg},tickLabelProps:{fill:S,fontSize:12,fontFamily:"var(--font-roboto)",textAnchor:z?"start":"end"},labelProps:{fontSize:18,strokeWidth:0,paintOrder:"stroke",fontFamily:"var(--font-roboto)",textAnchor:"start"},left:ee,scale:es,orientation:z?"right":"left",numTicks:H>767?10:5}),(0,r.jsx)(_.Z,{stroke:M,strokeWidth:2.5,tickStroke:M,hideTicks:z,tickFormat:e=>"".concat(e),tickComponent:e=>{let{x:t,y:l,formattedValue:n}=e;return(0,C.dN)({amount:n,withTrailingZeroes:!0,getSvg:(e,n,s)=>(0,r.jsxs)("text",{x:t,y:l,fill:S,fontSize:12,textAnchor:z?"end":"start",children:[e,n&&(0,r.jsx)("tspan",{dy:4,fontSize:10,children:n}),s&&(0,r.jsx)("tspan",{dy:-4,fontSize:12,children:s})]})}).svg},tickLabelProps:{fill:S,fontSize:12,fontFamily:"var(--font-roboto)",textAnchor:z?"end":"start"},labelProps:{fontSize:18,strokeWidth:0,paintOrder:"stroke",fontFamily:"var(--font-roboto)",textAnchor:"end"},left:el,scale:ei,orientation:z?"left":"right",numTicks:H>767?10:5}),!z&&(0,r.jsxs)("circle",{cx:el,cy:eu(),r:6,fill:E,fillOpacity:0,pointerEvents:"none",children:[(0,r.jsx)("animate",{id:"threshold_a_5",attributeName:"r",begin:"0s;threshold_a_6.end",dur:"0.5s",from:"6",to:"10"}),(0,r.jsx)("animate",{id:"threshold_a_8",attributeName:"fill-opacity",begin:"0s;threshold_a_6.end",dur:"0.5s",from:"0",to:"0.7"}),(0,r.jsx)("animate",{id:"threshold_a_6",attributeName:"r",begin:"threshold_a_5.end",dur:"0.5s",from:"10",to:"6"}),(0,r.jsx)("animate",{id:"threshold_a_7",attributeName:"fill-opacity",begin:"threshold_a_5.end",dur:"0.5s",from:"0.7",to:"0"})]}),!z&&(0,r.jsxs)("circle",{cx:el,cy:eh(),r:6,fill:R,fillOpacity:0,pointerEvents:"none",children:[(0,r.jsx)("animate",{id:"threshold_a_9",attributeName:"r",begin:"0s;threshold_a_10.end",dur:"0.5s",from:"6",to:"10"}),(0,r.jsx)("animate",{id:"threshold_a_12",attributeName:"fill-opacity",begin:"0s;threshold_a_10.end",dur:"0.5s",from:"0",to:"0.7"}),(0,r.jsx)("animate",{id:"threshold_a_10",attributeName:"r",begin:"threshold_a_9.end",dur:"0.5s",from:"10",to:"6"}),(0,r.jsx)("animate",{id:"threshold_a_11",attributeName:"fill-opacity",begin:"threshold_a_9.end",dur:"0.5s",from:"0.7",to:"0"})]}),(0,r.jsx)(d.Z,{x:z?0:T.left,y:T.top,width:V,height:J,fill:"transparent",rx:14,onTouchStart:eo,onTouchEnd:ec,onTouchMove:eo,onMouseMove:eo,onMouseLeave:ec}),q&&(0,r.jsxs)("g",{children:[(0,r.jsx)(a.Z,{from:{x:Y,y:T.top},to:{x:Y,y:J+T.top},stroke:"#616E82",strokeWidth:2,pointerEvents:"none",strokeDasharray:"5,2"}),(0,r.jsx)("circle",{cx:Y,cy:U+1,r:15,fill:O,fillOpacity:.3,pointerEvents:"none"}),(0,r.jsx)("circle",{cx:Y,cy:U,r:5,fill:E,stroke:O,strokeWidth:2,pointerEvents:"none"}),(0,r.jsx)("circle",{cx:ea.left,cy:ea.top+1,r:15,fill:O,fillOpacity:.3,pointerEvents:"none"}),(0,r.jsx)("circle",{cx:ea.left,cy:ea.top,r:5,fill:R,stroke:O,strokeWidth:2,pointerEvents:"none"})]})]}
1),(0,r.jsx)("div",{style:{top:eu()-7,left:z?ee:void 0,right:z?void 0:H-T.left+10,width:"auto",padding:"2px 4px",borderRadius:"12px",backgroundColor:D},className:"absolute body_2 text-gray-6 text-right md:text-right",children:(0,C.dN)({amount:I(s[s.length-1]),withTrailingZeroes:!0}).markup}),(0,r.jsx)("div",{style:{top:eh()-9,left:z?void 0:el+10,right:z?0:void 0,width:"auto",padding:"2px 4px",borderRadius:"12px",backgroundColor:P},className:"absolute body_2 text-gray-6",children:(0,C.dN)({amount:I(x[x.length-1]),withTrailingZeroes:!0}).markup}),q&&(0,r.jsx)("div",{children:(0,r.jsx)(g.Z,{top:ea.pointY-12,left:Y+12,style:A,children:(0,r.jsxs)("div",{className:"px-2 md:px-6 py-2 md:py-3 flex flex-col gap-2 items-stretch bg-gray-3 rounded-xl",children:[(0,r.jsxs)("div",{className:"pb-2 flex flex-row items-center justify-between md:gap-3 body_5 md:body_2 text-gray-2 border-b-2 border-gray-2",children:[(0,r.jsx)("span",{children:(0,k.i$)("%b %d, %Y")(F(q))}),(0,r.jsx)("span",{children:(0,k.i$)("%H:%M:%S")(F(q))})]}),(0,r.jsxs)("div",{className:"md:py-1 flex flex-col md:flex-row items-start md:items-center md:justify-between md:gap-3 body_5 md:body_2 text-white",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("div",{className:"w-2 md:w-3 h-2 md:h-3 rounded-full bg-blue-old"}),(0,r.jsx)("span",{children:b})]}),(0,r.jsx)("span",{children:(0,C.dN)({amount:I(q),currency:f}).markup})]}),(0,r.jsxs)("div",{className:"md:py-1 flex flex-col md:flex-row items-start md:items-center md:justify-between md:gap-3 body_5 md:body_2 text-white",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("div",{className:"w-2 md:w-3 h-2 md:h-3 rounded-full bg-red-dash"}),(0,r.jsx)("span",{children:p})]}),(0,r.jsx)("span",{children:(0,C.dN)({amount:I(ea.data),currency:f}).markup})]})]})},Math.random())})]}):null});var z=(0,x.Z)(T),L=l(61994),W=l(17197),q=l(24767),U=l(35417),Y=l(33145);let H="transparent",$="#1F1F25",V="#BCBCBE",J="white",X="#C5EA46",Q="#DA3539",G={...f.j,background:H,zIndex:1,padding:0,color:"white"},K=e=>new Date(1e3*((null==e?void 0:e.time)||0)),ee=e=>(null==e?void 0:e.price)||0,et=e=>(null==e?void 0:e.volume_24h)||0,el=(0,b.Z)(K).left,er=(0,p.Z)(e=>{var t,l,i;let{id:x,parentWidth:f,parentHeight:p,chart:b,initialChart:N,unlocks:Z,currency:M,margin:S={top:20,right:50,bottom:50,left:0},isMobile:O,isCrossCourse:E,showTooltip:D,hideTooltip:R,tooltipData:P,tooltipTop:A=0,tooltipLeft:F=0}=e,I=(0,n.useMemo)(()=>f||0,[f]),B=(0,n.useMemo)(()=>p||0,[p]),T=(0,n.useMemo)(()=>O?I:I-S.left-S.right,[O,S.left,S.right,I]),z=(0,n.useMemo)(()=>B-S.top-S.bottom,[B,S.bottom,S.top]),er=O?0:S.left,en=O?I:I-S.right,es=B-S.bottom,ei=n.useCallback(()=>{var e;return(null===(e=b[0])||void 0===e?void 0:e.price)||0},[b]),ea=Math.min(...b.map(e=>Math.min(ee(e),ei()))),ed=Math.max(...b.map(e=>Math.max(ee(e),ei()))),ec=(0,n.useMemo)(()=>{let e=O?0:S.left,t=O?T:T+S.left;return(0,h.Z)({range:[e,t],domain:(0,y.Z)(b,K)})},[b,T,O,S.left]),eo=(0,n.useMemo)(()=>(0,U.Z)({range:[S.left,T+S.left],domain:N.map(K),padding:.2}),[N,S.left,T]),eu=(0,n.useMemo)(()=>(0,m.Z)({range:[20,0],domain:[0,Math.max(...N.map(e=>Math.max(et(e),ei())))]}),[N,ei]),eh=(0,n.useMemo)(()=>(0,m.Z)({range:[z+S.top-20,S.top],domain:[ea,ed],nice:!0}),[z,S.top,ea,ed]),em=n.useCallback(()=>eh(ee(b[b.length-1])),[b,eh]),ex=n.useCallback(()=>{let e=b&&b[0]?b[0].time:0,t=b&&b[b.length-1]?b[b.length-1].time:0;return(Z&&Z[0]?Z[0].unlock_date:0)<e?ec(new Date(1e3*e)):ec(new Date(1e3*t))},[b,Z,ec]),ef=(null===(t=b[b.length-1])||void 0===t?void 0:t.price)<(null===(l=b[0])||void 0===l?void 0:l.price)?Q:X,ep=(0,n.useMemo)(()=>N.map(e=>{var t,l;let n=eo.bandwidth(),s=20-(null!==(t=eu(et(e)))&&void 0!==t?t:0),i=null!==(l=ec(K(e)))&&void 0!==l?l:0,a=20-s+z;return(0,r.jsx)(d.Z,{x:i,y:a,width:n,height:s,fill:"#616E82"},"bar-".concat(e.time))}),[ec,N,eo,eu,z]),eg=(0,n.useCallback)(e=>{let{x:t}=(0,v.Z)(e)||{x:0},l=ec.invert(t),r=el(b,l,1),n=b[r-1],s=b[r],i=n;s&&K(s)&&(i=l.valueOf()-K(n).valueOf()>K(s).valueOf()-l.valueOf()?s:n),D({tooltipData:i,tooltipLeft:t,tooltipTop:eh(ee(i))})},[ec,b,D,eh]),ev=(0,n.useCallback)(()=>{R()},[R]);return I<10||!b.length?null:(0,r.jsxs)("div",{children:[(0,r.jsxs)("svg",{width:I,height:B,children:[(0,r.jsx)("rect",{x:0,y:0,width:I,height:B,fill:H,rx:14}),(0,r.jsx)(j.Z,{id:"above-gradient",from:"#62B522",to:"#A1F161",fromOpacity:.3,toOpacity:0}),(0,r.jsx)(j.Z,{id:"below-gradient",from:"#7e4e4",to:"#FF6464",fromOpacity:0,toOpacity:.3}),(0,r.jsx)(o.Z,{left:O?0:S.left,scale:eh,width:T,height:z,stroke:$,strokeOpacity:1,pointerEvents:"none"}),(0,r.jsx)(u.Z,{top:S.top,scale:ec,width:T,height:z,stroke:$,strokeOpacity:1,pointerEvents:"none"}),(0,r.jsx)(q.Z,{id:x,data:b,x:e=>{var t;return null!==(t=ec(K(e)))&&void 0!==t?t:0},y0:e=>{var t;return null!==(t=eh(ee(e)))&&void 0!==t?t:0},y1:()=>{var e;return null!==(e=eh(ei()))&&void 0!==e?e:0}
1,clipAboveTo:S.top,clipBelowTo:z+S.bottom,curve:W.ZP,belowAreaProps:{fill:"url(#below-gradient)",stroke:Q,strokeWidth:1,curve:c.Z},aboveAreaProps:{fill:"url(#above-gradient)",stroke:X,strokeWidth:1,curve:c.Z}}),ep,(0,r.jsx)(a.Z,{from:{x:er,y:S.top},to:{x:er,y:z+S.top},stroke:$,strokeWidth:1.5,pointerEvents:"none"}),!O&&(0,r.jsx)(w.Z,{stroke:$,tickStroke:$,tickLabelProps:{fill:V,fontSize:12,fontFamily:"var(--font-roboto)",textAnchor:"start"},labelProps:{fontSize:18,strokeWidth:0,paintOrder:"stroke",fontFamily:"var(--font-roboto)",textAnchor:"start"},top:es,scale:ec,numTicks:I>767?10:5}),(0,r.jsx)(_.Z,{stroke:$,tickStroke:$,hideTicks:O,tickFormat:e=>"".concat(e),tickComponent:e=>{let{x:t,y:l,formattedValue:n}=e;return(0,C.dN)({amount:n,withTrailingZeroes:!0,getSvg:(e,n,s)=>(0,r.jsxs)("text",{x:t,y:l,fill:V,fontSize:12,textAnchor:O?"end":"start",children:[e,n&&(0,r.jsx)("tspan",{dy:4,fontSize:10,children:n}),s&&(0,r.jsx)("tspan",{dy:-4,fontSize:12,children:s})]})}).svg},tickLabelProps:{fill:V,fontSize:12,fontFamily:"var(--font-roboto)",textAnchor:O?"end":"start"},labelProps:{fontSize:18,strokeWidth:0,paintOrder:"stroke",fontFamily:"var(--font-roboto)",textAnchor:"end"},left:en,scale:eh,orientation:O?"left":"right",numTicks:I>767?10:5}),!O&&(0,r.jsxs)("circle",{cx:en,cy:em(),r:6,fill:ef,fillOpacity:0,pointerEvents:"none",children:[(0,r.jsx)("animate",{id:"threshold_a_1",attributeName:"r",begin:"0s;threshold_a_2.end",dur:"0.5s",from:"6",to:"10"}),(0,r.jsx)("animate",{id:"threshold_a_4",attributeName:"fill-opacity",begin:"0s;threshold_a_2.end",dur:"0.5s",from:"0",to:"0.7"}),(0,r.jsx)("animate",{id:"threshold_a_2",attributeName:"r",begin:"threshold_a_1.end",dur:"0.5s",from:"10",to:"6"}),(0,r.jsx)("animate",{id:"threshold_a_3",attributeName:"fill-opacity",begin:"threshold_a_1.end",dur:"0.5s",from:"0.7",to:"0"})]}),(0,r.jsx)(d.Z,{x:O?0:S.left,y:S.top,width:T,height:z,fill:"transparent",rx:14,onTouchStart:eg,onTouchEnd:ev,onTouchMove:eg,onMouseMove:eg,onMouseLeave:ev}),P&&(0,r.jsxs)("g",{children:[(0,r.jsx)(a.Z,{from:{x:F,y:S.top},to:{x:F,y:z+S.top},stroke:"#616E82",strokeWidth:2,pointerEvents:"none",strokeDasharray:"5,2"}),(0,r.jsx)("circle",{cx:F,cy:A+1,r:15,fill:J,fillOpacity:.3,pointerEvents:"none"}),(0,r.jsx)("circle",{cx:F,cy:A,r:3,fill:J,stroke:J,strokeWidth:2,pointerEvents:"none"})]})]}),(0,r.jsx)("div",{style:{top:em()-9,left:O?void 0:en+10,right:O?0:void 0,width:"auto",padding:"2px 4px",borderRadius:"12px",backgroundColor:ef},className:"absolute body_2 text-gray-6",children:(0,C.dN)({amount:ee(b[b.length-1]),withTrailingZeroes:!0}).markup}
1),Z&&Z[0]&&(0,r.jsx)("div",{style:{bottom:S.bottom+20-40,left:ex()},className:"absolute w-10 h-10 rounded-full overflow-hidden bg-gray-5",children:(0,r.jsx)(Y.default,{src:"/coin/unlock.png",alt:"unlock",fill:!0,sizes:"10vw"})}),Z&&Z[0]&&P&&(0,r.jsx)("div",{children:(0,r.jsx)(g.Z,{top:z+S.top,left:ex()+12,style:G,children:(0,r.jsxs)("div",{className:"px-2 md:px-3 py-2 md:py-3 flex flex-col gap-2 items-stretch bg-gray-3 rounded-xl",children:[(0,r.jsx)("div",{className:"pb-2 flex flex-row items-center justify-between md:gap-3 body_2 md:h4 text-white border-b-2 border-gray-2",children:(0,r.jsx)("p",{children:"Unlock"})}),(0,r.jsxs)("div",{className:"pb-2 flex flex-col md:flex-row items-start md:items-center md:justify-between md:gap-3 body_5 md:body_2 text-gray-2 border-b-2 border-gray-2",children:[(0,r.jsx)("p",{children:"Unlock Date"}),(0,r.jsx)("p",{children:(0,k.i$)("%b %d, %Y %H:%M")(new Date(1e3*Z[0].unlock_date))})]}),(0,r.jsxs)("div",{className:"md:py-1 flex flex-col md:flex-row items-start md:items-center md:justify-between md:gap-3 body_5 md:body_2 text-white",children:[(0,r.jsx)("p",{children:"Volume"}),(0,r.jsx)("p",{children:(0,C.dN)({amount:Z[0].unlock_tokens,fractionDigits:0}).markup})]}),(0,r.jsxs)("div",{className:"md:py-1 flex flex-col md:flex-row items-start md:items-center md:justify-between md:gap-3 body_5 md:body_2 text-white",children:[(0,r.jsx)("p",{children:"Percent"}),(0,r.jsxs)("p",{children:["+",(0,C.dN)({amount:Z[0].unlock_tokens_percent,fractionDigits:2,isStrictFractionDigits:!0}).markup,"%"]})]})]})},Math.random())}),P&&(0,r.jsx)("div",{children:(0,r.jsx)(g.Z,{top:A-12,left:F+12,style:G,children:(0,r.jsxs)("div",{className:"px-2 md:px-3 py-2 md:py-3 flex flex-col gap-2 items-stretch bg-gray-3 rounded-xl",children:[(0,r.jsxs)("div",{className:"pb-2 flex flex-row items-center justify-between md:gap-3 body_5 md:body_2 text-gray-2 border-b-2 border-gray-2",children:[(0,r.jsx)("span",{children:(0,k.i$)("%b %d, %Y")(K(P))}),(0,r.jsx)("span",{children:(0,k.i$)("%H:%M:%S")(K(P))})]}),(0,r.jsxs)("div",{className:"md:py-1 flex flex-col md:flex-row items-start md:items-center md:gap-3 body_5 md:body_2 text-white",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("div",{className:(0,L.Z)("w-2 md:w-3 h-2 md:h-3 rounded-full",P.price<(null===(i=b[0])||void 0===i?void 0:i.price)?"bg-red-dash":"bg-blue")}),(0,r.jsx)("span",{children:"".concat("Price"," (").concat(M,")")})]}),(0,r.jsx)("span",{children:(0,C.dN)({amount:P.price,currency:E?void 0:M}).markup})]}),P.volume_24h&&(0,r.jsxs)("div",{className:"md:py-1 flex flex-col md:flex-row items-start md:items-center md:gap-3 body_5 md:body_2 text-white",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 text-white",children:[(0,r.jsx)(s.Cy,{}),(0,r.jsx)("span",{children:"Volume 24h"})]}),(0,r.jsx)("span",{children:(0,C.dN)({amount:P.volume_24h,fractionDigits:0,currency:E?void 0:M}).markup})]})]})},Math.random())})]})});var en=(0,x.Z)(er),es=l(24029),ei=l(49713);let ea="transparent",ed="#1F1F25",ec="#BCBCBE",eo="#C5EA46",eu="#DA3539",eh={...f.j,background:ea,zIndex:1,padding:0,color:"white"},em=e=>new Date(1e3*((null==e?void 0:e.time)||0)),ex=(0,b.Z)(em).left,ef=e=>e.low,ep=e=>e.high,eg=e=>Math.min(e.open,e.close),ev=e=>Math.max(e.open,e.close),ej=e=>e.close,eb=(0,p.Z)(e=>{var t,l;let{parentWidth:s,parentHeight:i,chart:c,currency:x,margin:f={top:20,right:50,bottom:30,left:0},isMobile:p,tooltipOpen:j,tooltipLeft:b=0,tooltipTop:N=0,tooltipData:Z,showTooltip:M,hideTooltip:S}=e,O=n.useMemo(()=>s||0,[s]),E=n.useMemo(()=>i||0,[i]),D=n.useMemo(()=>O-f.left-f.right,[f.left,f.right,O]),R=n.useMemo(()=>E-f.top-f.bottom,[E,f.bottom,f.top]),P=n.useMemo(()=>c.length>49?c.length:49,[c.length]),A=n.useMemo(()=>D/P-D/P*.2,[P,D]),F=n.useMemo(()=>P/c.length,[c.length,P]),I=n.useMemo(()=>(D-D/F)/2,[D,F]),B=n.useMemo(()=>f.left+I,[I,f.left]),T=n.useMemo(()=>D+f.left-I-A,[A,I,f.left,D]),z=O-f.right,L=E-f.bottom,W=n.useMemo(()=>(0,h.Z)({range:[B,T],domain:(0,y.Z)(c,em)}),[B,T,c]),q=n.useMemo(()=>{let e=c.reduce((e,t)=>{let{high:l,low:r}=t;return e.push(l,r),e},[]);return[Math.min(...e),Math.max(...e)]},[c]),U=(0,m.Z)({range:[R+f.top,f.top],domain:q,nice:!0}),Y=n.useCallback(()=>U(ej(c[c.length-1])),[c,U]),H=n.useCallback(e=>{let{x:t}=(0,v.Z)(e)||{x:0},l=W.invert(t-A/2),r=ex(c,l,1),n=c[r-1],s=c[r],i=n;s&&em(s)&&(i=l.valueOf()-em(n).valueOf()>em(s).valueOf()-l.valueOf()?s:n),M({tooltipData:i,tooltipLeft:t,tooltipTop:U(i.open)}),(t>T+A||t<B)&&S()},[W,A,c,M,U,T,B,S]),$=(null===(t=c[c.length-1])||void 0===t?void 0:t.open)>(null===(l=c[c.length-1])||void 0===l?void 0:l.close)?eu:eo;return O<10||!c.length?null:(0,r.jsxs)("div",{style:{position:"relative"},children:[(0,r.jsxs)("svg",{width:O,height:E,children:[(0,r.jsx)("rect",{x:0,y:0,width:O,height:E,fill:ea,rx:14}),(0,r.jsx)(u.Z,{top:f.top,scale:W,width:D,height:R,stroke:ed,strokeOpacity:1,pointerEvents:"none"}),(0,r.jsx)(o.Z,{left:f.left,scale:U,width:D,height:R,stroke:ed,strokeOpacity:1,pointerEvents:"none"}),(0,r.jsx)(es.Z,{children:c.map((e,t)=>(0,r.jsx)("g",{children:(0,r.jsx)(ei.Z,{min:ef(e),max:ep(e),maxProps:{stroke:"transparent"},minProps:{stroke:"transparent"},left:W(em(e)),firstQuartile:eg(e),thirdQuartile:ev(e),medianProps:{className:"hidden"},boxWidth:A,fill:e.open<e.close?eo:eu,fillOpacity:.42,stroke:e.open<e.close?eo:eu,strokeWidth:1,valueScale:U})},"candlestickChart".concat(t)))}
1),!p&&(0,r.jsx)(w.Z,{stroke:ed,tickStroke:ed,tickLabelProps:{fill:ec,fontSize:12,fontFamily:"var(--font-roboto)",textAnchor:"start"},labelProps:{fontSize:18,strokeWidth:0,paintOrder:"stroke",fontFamily:"var(--font-roboto)",textAnchor:"start"},top:L,scale:W,numTicks:Math.ceil(c.length/5)}),(0,r.jsx)(_.Z,{stroke:ed,tickStroke:ed,hideTicks:p,tickFormat:e=>"".concat(e),tickComponent:e=>{let{x:t,y:l,formattedValue:n}=e;return(0,C.dN)({amount:n,withTrailingZeroes:!0,getSvg:(e,n,s)=>(0,r.jsxs)("text",{x:t,y:l,fill:ec,fontSize:12,textAnchor:p?"end":"start",children:[e,n&&(0,r.jsx)("tspan",{dy:4,fontSize:10,children:n}),s&&(0,r.jsx)("tspan",{dy:-4,fontSize:12,children:s})]})}).svg},tickLabelProps:{fill:ec,fontSize:12,fontFamily:"var(--font-roboto)",textAnchor:"start"},labelProps:{fontSize:18,strokeWidth:0,paintOrder:"stroke",fontFamily:"var(--font-roboto)",textAnchor:"end"},left:z,scale:U,orientation:"right",numTicks:O>767?10:5}),(0,r.jsx)(d.Z,{x:f.left,y:f.top,width:D,height:R,fill:"transparent",rx:14,onTouchStart:H,onTouchEnd:S,onTouchMove:H,onMouseMove:H,onMouseLeave:S}),Z&&(0,r.jsx)("g",{children:(0,r.jsx)(a.Z,{from:{x:b,y:f.top},to:{x:b,y:R+f.top},stroke:"#616E82",strokeWidth:2,pointerEvents:"none",strokeDasharray:"5,2"})})]}),(0,r.jsx)("div",{style:{top:Y()-9,left:z+7,width:"auto",padding:"2px 4px",borderRadius:"12px",backgroundColor:$},className:"absolute body_2 text-gray-6",children:(0,C.dN)({amount:ej(c[c.length-1]),withTrailingZeroes:!0}).markup}),j&&Z&&(0,r.jsx)(g.Z,{top:N-12,left:b+12,style:eh,children:(0,r.jsxs)("div",{className:"px-2 md:px-3 py-2 md:py-3 flex flex-col gap-2 items-stretch bg-gray-3 rounded-xl",children:[(0,r.jsxs)("div",{className:"pb-2 flex flex-row items-center justify-between md:gap-3 body_5 md:body_2 text-gray-2 border-b-2 border-gray-2",children:[(0,r.jsx)("span",{children:(0,k.i$)("%b %d, %Y")(em(Z))}),(0,r.jsx)("span",{children:(0,k.i$)("%H:%M")(em(Z))})]}),(0,r.jsxs)("div",{className:"md:py-1 flex flex-col items-start md:gap-3 body_5 md:body_2 text-white",children:[Z.high&&(0,r.jsxs)("div",{className:"w-full flex justify-between items-center gap-1",children:[(0,r.jsx)("div",{children:"O: "}),(0,r.jsx)("div",{children:(0,C.dN)({amount:Z.open,currency:x}).markup})]}),Z.high&&(0,r.jsxs)("div",{className:"w-full flex justify-between items-center gap-1",children:[(0,r.jsx)("div",{children:"H: "}),(0,r.jsx)("div",{children:(0,C.dN)({amount:Z.high,currency:x}).markup})]}),Z.high&&(0,r.jsxs)("div",{className:"w-full flex justify-between items-center gap-1",children:[(0,r.jsx)("div",{children:"L: "}),(0,r.jsx)("div",{children:(0,C.dN)({amount:Z.low,currency:x}).markup})]}),Z.high&&(0,r.jsxs)("div",{className:"w-full flex justify-between items-center gap-1",children:[(0,r.jsx)("div",{children:"C: "}),(0,r.jsx)("div",{children:(0,C.dN)({amount:Z.close,currency:x}).markup})]})]})]})},Math.random())]})});var ey=(0,x.Z)(eb),ek=l(29450),ew=l(86660),eN=l(86118),e_=l(42353),eC=l(91049),eZ=l(1176);let eM=e=>{let t=6*(0,C.dN)({amount:e,withTrailingZeroes:!0}).length+15;return t>55?t:55};var eS=e=>{let{hdr_id:t,currency:l,period:r,compare:s,crossCourse:i,isCandlestick:a,candlestickInterval:d}=e,[c,o]=n.useState(!0),[u,h]=n.useState(null),{chart:m,setChart:x}=n.useContext(eC.ChartContext),f=n.useRef([]),p=n.useRef(0),g=n.useRef(31536e3),[v,j]=n.useState([]),b=n.useRef(0),y=n.useRef(31536e3),[k,w]=n.useState([]),N=n.useRef(0),[_,Z]=n.useState([]),M=n.useRef([]),S=n.useRef(70),O=n.useRef(70),E=(0,eN.ac)(eN.zP.MOBILE);return n.useEffect(()=>{if(a||i)return;o(!0);let e=new AbortController,n=e=>{e.hdr_id===t&&x(t=>{let l=t.length-1,r=t[l],n=Math.ceil(Date.now()/1e3),s={...r,time:n,price:e.value};if(l-p.current==300){p.current+=1;let e=n-t[1].time>=g.current,l=t.slice(e?1:0,p.current);return l.push(s),l}return n===(null==r?void 0:r.time)?t:[...t,s]})};return Promise.all([(0,eZ.J)(t,l,r,e.signal),e_.k9.getUnlocksByHdrId({hdr_id:t})]).then(e=>{let[t,{unlocks:l}]=e;h(l),f.current=t,S.current=t.length?eM(t[0].price):70,x(t),p.current=t.length?t.length-1:0,g.current=t.length?t[t.length-1].time-t[0].time:31536e3,o(!1),ew.r.connected[ek.y0.COIN_PRICE].then(e=>{e&&ew.r.onMessage(ek.y0.COIN_PRICE,n)})}),()=>{e.abort(),ew.r.removeListener(ek.y0.COIN_PRICE,n)}},[t,l,r,i,a,x]),n.useEffect(()=>{if(i&&!s)return ew.r.disconnect(ek.y0.COIN_CROSS),ew.r.connect({socketId:ek.y0.COIN_CROSS,hdr_ids:[i.hdr_id,t],currency:l}),()=>ew.r.disconnect(ek.y0.COIN_CROSS)},[t,i,s,l]),n.useEffect(()=>{if(a||!i||s)return;o(!0);let e=new AbortController,l=e=>{e.hdr_id===i.hdr_id&&(N.current=e.value),e.hdr_id===t&&w(t=>{let l=t.length-1,r=t[l],n=Math.ceil(Date.now()/1e3),s=N.current?e.value/N.current:r.price,i={...r,time:n,price:s};if(l-p.current==300){p.current+=1;let e=n-t[1].time>=g.current,l=t.slice(e?1:0,p.current);return l.push(i),l}return n===(null==r?void 0:r.time)?t:[...t,i]})};return(0,eZ.s)(t,i.hdr_id,r,e.signal).then(e=>{f.current=[],S.current=e.length?eM(e[0].price):70,w(e),p.current=e.length?e.length-1:0,g.current=e.length?e[e.length-1].time-e[0].time:31536e3,o(!1),ew.r.connected[ek.y0.COIN_CROSS].then(e=>{e&&ew.r.onMessage(ek.y0.COIN_CROSS,l)})}),()=>{e.abort(),N.current=0,ew.r.removeListener(ek.y0.COIN_CROSS,l)}},[t,l,r,i,s,a]),n.useEffect(()=>{if(s&&!i)return ew.r.disconnect(ek.y0.COIN_COMPARE),ew.r.connect({socketId:ek.y0.COIN_COMPARE,hdr_ids:[s.hdr_id],currency:l}),()=>ew.r.disconnect(ek.y0.COIN_COMPARE)},[s,i,l]),n.useEffect(()=>{if(!s||a||i)return;o(!0);let e=new AbortController,t=e=>{e.hdr_id===s.hdr_id&&j(t=>{let l=t.length-1,r=t[l],n=Math.ceil(Date.now()/1e3),s={...r,time:n,price:e.value};if(l-b.current==300){b.current+=1;let e=n-t[1].time>=y.current,l=t.slice(e?1:0,b.current);return l.push(s),l}return n===(null==r?void 0:r.time)?t:[...t,s]})};return(0,eZ.J)(s.hdr_id,l,r,e.signal).then(e=>{j(t=>null!=e?e:t),b.current=(null==e?void 0:e.length)?e.length-1:0,y.current=(null==e?void 0:e.length)?e[e.length-1].time-e[0].time:31536e3,O.current=e.length?eM(e[0].price):70,o(!1),ew.r.connected[ek.y0.COIN_COMPARE].then(e=>{e&&ew.r.onMessage(ek.y0.COIN_COMPARE,t)})}),()=>e.abort()},[s,i,a,l,r]),n.useEffect(()=>{if(!a)return;o(!0);let e=new AbortController,r=e=>{e.hdr_id===t&&Z(t=>{if(!t.length)return t;let l=t[t.length-1],r=Math.ceil(Date.now()/1e3),n=(0,C.Rj)(d);if(l.time+(0,C.Rj)(d)<r)return[...t,{time:l.time+n,open:l.close,close:e.value,high:e.value>l.close?e.value:l.close,low:e.value<l.close?e.value:l.close}];let s=[...t];return l.time=l.time,l.close=e.value,l.high=e.value>l.high?e.value:l.high,l.low=e.value<l.low?e.value:l.low,s})};return e_.k9.getCandlestickChart({hdr_id:t,currency:l,interval:d,abortSignal:e.signal}).then(e=>{Z(e),M.current=e,S.current=e.length?eM(e[0].open):70,o(!1),ew.r.connected[ek.y0.COIN_PRICE].then(e=>{e&&ew.r.onMessage(ek.y0.COIN_PRICE,r)})}),()=>{e.abort(),ew.r.removeListener(ek.y0.COIN_PRICE,r)}},[a,d,l,r,t]),{isLoading:c,isMobile:E,initialChart:f,chart:m,chart2:v,unlocks:u,crossChart:k,candlestick:_,marginLeft:O,marginRight:S}},eO=e=>{let{hdr_id:t,currency:l,compare:n,crossCourse:i,isCandlestick:a,baseCoinName:d}=e,{isLoading:c,isMobile:o,initialChart:u,chart:h,chart2:m,unlocks:x,crossChart:f,candlestick:p,marginLeft:g,marginRight:v}=eS(e);return c?(0,r.jsx)("div",{className:"w-full h-full flex flex-col gap-3 items-center justify-center border border-gray-23 text-gray-23 rounded-xl",children:(0,r.jsx)(s.aC,{className:"w-full h-full"})}):a?(0,r.jsx)(ey,{chart:p,currency:l,margin:{top:20,right:v.current,bottom:o?10:50,left:0},isMobile:!!o}):i?(0,r.jsx)(en,{id:"ThresholdChart",initialChart:u.current,chart:f,currency:i.name,margin:{top:20,right:v.current,bottom:o?10:50,left:0},isMobile:!!o,isCrossCourse:!0}):n&&m?(0,r.jsx)(z,{chart:m,chart2:h,currency:l,baseCoinName:null!=d?d:t,compareCoinName:n.name,margin:{top:20,right:v.current,bottom:o?20:30,left:g.current},isMobile:!!o}):(0,r.jsx)(en,{id:"ThresholdChart",initialChart:u.current,chart:h,unlocks:x,currency:l,margin:{top:20,right:v.current,bottom:o?10:50,left:0},isMobile:!!o})}},38066:function(e,t,l){var r=l(57437),n=l(2265),s=l(29450),i=l(86660),a=l(45664);t.default=n.memo(e=>{let{hdr_id:t,currency:l,initialPrice:d,fractionDigits:c=2}=e,[o,u]=n.useState((0,a.dN)({amount:d,currency:l,fractionDigits:c,withCollapsingZeroes:!0})),[h,m]=n.useState();return n.useEffect(()=>{let e=e=>{e.hdr_id===t&&(u(t=>{let r=(0,a.dN)({amount:e.value,currency:l,fractionDigits:c,withCollapsingZeroes:!0});return r.value<t.value&&m("text-red"),r.value>t.value&&m("text-green"),r}),setTimeout(()=>m(void 0),500))};return i.r.connected[s.y0.COIN_PRICE].then(t=>{t&&i.r.onMessage(s.y0.COIN_PRICE,e)}),()=>i.r.removeListener(s.y0.COIN_PRICE,e)},[t,l,c]),(0,r.jsx)("span",{className:h,children:o.markup})})},40991:function(e,t,l){l.d(t,{default:function(){return b}});var r=l(57437),n=l(2265),s=l(29450),i=l(92106),a=l(78003),d=l(61994),c=e=>{let{translations:t,sortByRank:l,sortByName:n,sortByPrice:s,sortByChange1h:i,sortByChange24h:a,sortByChange7d:c,sortByMarketCap:o,sortByVolume24:u,sortBySupply:h}=e,{name:m,price:x,mobile:f,change1h:p,change7d:g,marketCap:v,volume24:j,supply:b,lastDay:y}=t;return(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"w-full body_1 text-right text-gray-2 border-b border-t border-gray-3",children:[(0,r.jsx)("th",{id:"rank",className:(0,d.Z)("w-8 md:w-[7%] lg:w-[6%] xl:w-[5%] md:min-w-[4.375rem] md:pl-[2.125rem] text-left py-2"),children:(0,r.jsx)("button",{className:"flex",onClick:l,children:"#"})}
1),(0,r.jsx)("th",{id:"name",className:(0,d.Z)("w-[55%] md:w-[21%] lg:w-[20%] 2xl:w-[17%] min-w-[7.75rem] md:min-w-[17.5rem] pl-[3.75rem] text-left"),children:(0,r.jsx)("button",{className:"flex",onClick:n,children:m})}),(0,r.jsxs)("th",{id:"price",className:(0,d.Z)("w-[40%] md:w-[11%] min-w-[8rem]"),children:[(0,r.jsx)("div",{className:"hidden md:flex w-full justify-end",children:(0,r.jsx)("button",{onClick:s,children:x})}),(0,r.jsx)("div",{className:"flex md:hidden w-full justify-end",children:(0,r.jsx)("button",{onClick:s,children:f})})]}),(0,r.jsx)("th",{id:"change1h",className:(0,d.Z)("hidden xl:table-cell w-[6%] min-w-[5rem]"),children:(0,r.jsx)("button",{onClick:i,children:p})}),(0,r.jsx)("th",{id:"change7d",className:(0,d.Z)("hidden 2xl:table-cell w-[6%] min-w-[5rem]"),children:(0,r.jsx)("button",{onClick:c,children:g})}),(0,r.jsx)("th",{id:"marketCap",className:(0,d.Z)("hidden md:table-cell w-[14%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:o,children:v})}),(0,r.jsx)("th",{id:"volume24h",className:(0,d.Z)("hidden lg:table-cell w-[12%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:u,children:j})}),(0,r.jsx)("th",{id:"circulatingSupply",className:(0,d.Z)("hidden 2lg:table-cell w-[6%] min-w-[5rem]"),children:(0,r.jsx)("button",{onClick:h,children:b})}),(0,r.jsx)("th",{id:"lastDayGraph",className:(0,d.Z)("hidden 2lg:table-cell w-[10%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:a,children:y})})]})})},o=l(33145),u=l(27648),h=l(45664),m=l(72684),x=l(52701),f=e=>{let{coin:t,currency:l,isDefaultCurrency:n,isChartLoading:s,chart:i,isMobile:c,lg:f,lg2:p,xl:g,xxl:v}=e,{name:j,cmc_rank:b,symbol:y,image:k,circulating_supply:w,quote:N}=t,_=(0,h.AX)(k,"/hodler.png"),{market_cap:C,volume_24h:Z,price:M,percent_change_1h:S,percent_change_24h:O,percent_change_7d:E}=N[l]||N.USD,D=(0,h.dN)({amount:S,fractionDigits:2,isStrictFractionDigits:!0}),R=(0,h.dN)({amount:O,fractionDigits:2,isStrictFractionDigits:!0}),P=(0,h.dN)({amount:E,fractionDigits:2,isStrictFractionDigits:!0}),A=n?"/".concat(t.hdr_id):"/".concat(t.hdr_id,"?cur=").concat(l);return(0,r.jsxs)("tr",{className:"body_1 text-right text-white border-b border-gray-3",children:[(0,r.jsx)("td",{className:"text-left",children:(0,r.jsx)(u.default,{href:A,className:"w-full py-5 flex items-center justify-start",children:(0,r.jsxs)("div",{className:"w-ful flex items-center justify-start md:gap-3 shrink-0",children:[(0,r.jsx)("div",{className:"hidden md:flex",children:(0,r.jsx)(m.Ux,{})}),(0,r.jsx)("span",{children:b})]})})}),(0,r.jsx)("td",{className:"text-left md:border-r md:border-gray-3",children:(0,r.jsx)(u.default,{href:A,className:"w-full py-5 flex items-center justify-start",children:(0,r.jsx)("div",{className:"w-full ml-3 flex flex-col gap-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,r.jsx)("div",{className:"relative w-9 h-9 shrink-0 rounded-full overflow-hidden",children:(0,r.jsx)(o.default,{src:_,alt:"".concat(j," logo"),fill:!0,sizes:"5vw"})}),(0,r.jsxs)("div",{className:"w-[calc(100%-3rem)] flex flex-col items-start",children:[(0,r.jsx)("h3",{className:"w-full body_1 md:h3 text-ellipsis overflow-hidden",children:j}),(0,r.jsx)("span",{className:"hidden md:flex body_1 text-gray-1",children:y})]})]})})})}),(0,r.jsx)("td",{className:"coin_td",children:(0,r.jsxs)(u.default,{href:A,className:"h-full pl-1 lg:pl-3 xl:pl-6 flex items-center",children:[!c&&(0,r.jsx)("div",{className:"hidden md:flex w-full justify-end text-ellipsis overflow-hidden",children:(0,r.jsx)("span",{className:"w-full text-ellipsis overflow-hidden",children:(0,r.jsx)(a.O6,{hdr_id:t.hdr_id,initialPrice:M,currency:l})})}),c&&(0,r.jsxs)("div",{className:"md:hidden w-full flex flex-col items-end gap-1",children:[(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)("span",{className:"body_1 w-full text-ellipsis overflow-hidden",children:(0,r.jsx)(a.O6,{hdr_id:t.hdr_id,initialPrice:M,currency:l})})}),(0,r.jsxs)("span",{className:(0,d.Z)(R.negative?"text-red":"text-green"),children:[R.negative?"-":"+",(0,r.jsxs)("span",{className:"body_3",children:[R.markup,"%"]})]})]})]})}),g&&(0,r.jsx)("td",{className:"coin_td hidden xl:table-cell",children:(0,r.jsx)(u.default,{href:A,className:"h-full pl-3 xl:pl-6 flex items-center justify-end",children:(0,r.jsxs)("div",{className:(0,d.Z)("w-[4.25rem] flex items-center justify-center gap-[0.25rem] py-2 rounded",D.negative?"text-red-dash bg-red-dark":"text-green bg-green-dark"),children:[(0,r.jsx)(m.Eh,{className:(0,d.Z)(D.negative?void 0:"rotate-180")}
1),(0,r.jsxs)("span",{className:"body_3",children:[D.markup,"%"]})]})})}),v&&(0,r.jsx)("td",{className:"coin_td hidden 2xl:table-cell",children:(0,r.jsx)(u.default,{href:A,className:"h-full pl-3 xl:pl-6 flex items-center justify-end",children:(0,r.jsxs)("div",{className:(0,d.Z)("w-[4.25rem] flex items-center justify-center gap-[0.25rem] py-2 rounded",P.negative?"text-red-dash bg-red-dark":"text-green bg-green-dark"),children:[(0,r.jsx)(m.Eh,{className:(0,d.Z)(P.negative?void 0:"rotate-180")}),(0,r.jsxs)("span",{className:"body_3",children:[P.markup,"%"]})]})})}),!c&&(0,r.jsx)("td",{className:"coin_td hidden md:table-cell",children:(0,r.jsx)(u.default,{className:"h-full pl-1 lg:pl-3 xl:pl-6 flex items-center",href:A,children:(0,r.jsx)("span",{className:"w-full",children:(0,h.dN)({amount:C,fractionDigits:0,currency:l}).markup})})}),f&&(0,r.jsx)("td",{className:"coin_td hidden lg:table-cell",children:(0,r.jsx)(u.default,{className:"h-full pl-3 xl:pl-6 flex items-center",href:A,children:(0,r.jsx)("span",{className:"w-full",children:(0,h.dN)({amount:Z,fractionDigits:0,currency:l}).markup})})}),p&&(0,r.jsx)("td",{className:"coin_td hidden 2lg:table-cell",children:(0,r.jsx)(u.default,{className:"h-full pl-3 xl:pl-6 flex items-center",href:A,children:(0,r.jsx)("span",{className:"w-full",children:(0,h.T4)(w)})})}),p&&(0,r.jsx)("td",{className:"coin_td hidden 2lg:table-cell ",children:(0,r.jsxs)(u.default,{className:"h-full py-2 pl-3 xl:pl-6 flex flex-col justify-center items-center",href:A,children:[(0,r.jsxs)("div",{className:(0,d.Z)("body_3",R.negative?"text-red":"text-green"),children:[(0,r.jsx)("span",{children:R.negative?"-":"+"}),(0,r.jsxs)("span",{children:[R.markup,"%"]})]}),(0,r.jsx)(x.yD,{chart:i,isLoading:s,desc:R.negative})]})})]})},p=e=>{let{currency:t,coins:l}=e,[r,s]=n.useState(l),i=n.useRef(!0),a=n.useRef(!1),d=n.useRef(!1),c=n.useRef(!1),o=n.useRef(!1),u=n.useRef(!1),h=n.useRef(!1),m=n.useRef(!1),x=n.useRef(!1),f=n.useCallback(()=>{s(e=>[...e.sort((e,t)=>{let l=e.cmc_rank,r=t.cmc_rank;return i.current?l-r:r-l})]),i.current=!i.current},[]),p=n.useCallback(()=>{s(e=>a.current?[...e.sort((e,t)=>e.name.localeCompare(t.name,"en",{sensitivity:"base"}))]:[...e.sort((e,t)=>t.name.localeCompare(e.name,"en",{sensitivity:"base"}))]),a.current=!a.current},[]),g=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.price,i=null===(n=l.quote[t])||void 0===n?void 0:n.price;return i&&s?d.current?s-i:i-s:0})]),d.current=!d.current},[t]),v=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.percent_change_1h,i=null===(n=l.quote[t])||void 0===n?void 0:n.percent_change_1h;return i&&s?c.current?s-i:i-s:0})]),c.current=!c.current},[t]),j=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.percent_change_24h,i=null===(n=l.quote[t])||void 0===n?void 0:n.percent_change_24h;return i&&s?o.current?s-i:i-s:0})]),o.current=!o.current},[t]),b=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.percent_change_7d,i=null===(n=l.quote[t])||void 0===n?void 0:n.percent_change_7d;return i&&s?u.current?s-i:i-s:0})]),u.current=!u.current},[t]);return{coinsState:r,sortByRank:f,sortByName:p,sortByPrice:g,sortByChange1h:v,sortByChange24h:j,sortByChange7d:b,sortByMarketCap:n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.market_cap,i=null===(n=l.quote[t])||void 0===n?void 0:n.market_cap;return i&&s?h.current?s-i:i-s:0})]),h.current=!h.current},[t]),sortByVolume24:n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.volume_24h,i=null===(n=l.quote[t])||void 0===n?void 0:n.volume_24h;return i&&s?m.current?s-i:i-s:0})]),m.current=!m.current},[t]),sortBySupply:n.useCallback(()=>{s(e=>[...e.sort((e,t)=>{let l=e.circulating_supply,r=t.circulating_supply;return x.current?r-l:l-r})]),x.current=!x.current},[])}},g=l(42353);let v=e=>e.reduce((e,t)=>(e[t.hdr_id]={isLoading:!0,chart:[]},e),{});var j=e=>{let{coins:t,currency:l}=e,[r,s]=n.useState(()=>v(t)),i=n.useCallback((e,t,l)=>
1{s(e=>{for(let t in e)e[t].isLoading=!0;return{...e}});let r=e.map(e=>e.hdr_id);(0,h.y4)(r).forEach(e=>g.k9.getCombinedChart({hdr_ids:e.join(","),currency:t,abortSignal:l}).then(t=>{s(l=>(e.forEach(e=>{if(l[e]){var r;l[e].chart=null!==(r=t[e])&&void 0!==r?r:[],l[e].isLoading=!1}}),{...l}))}))},[]);return n.useEffect(()=>{let e=new AbortController;return i(t,l,e.signal),()=>e.abort()},[t,l,i]),r},b=e=>{let{coins:t,currency:l,isDefaultCurrency:n,theadTranslations:d}=e,{coinsState:o,sortByRank:u,sortByName:h,sortByPrice:m,sortByChange1h:x,sortByChange24h:g,sortByChange7d:v,sortByMarketCap:b,sortByVolume24:y,sortBySupply:k}=p({coins:t,currency:l}),w=j({coins:t,currency:l}),{isMobile:N,lg:_,lg2:C,xl:Z,xxl:M}=(0,i.Fy)();return(0,r.jsxs)("table",{className:"w-full table-fixed",children:[(0,r.jsx)(a.UI,{socketId:s.y0.COIN_PRICE,coins:t,currency:l}),(0,r.jsx)(c,{translations:d,sortByRank:u,sortByName:h,sortByPrice:m,sortByChange1h:x,sortByChange24h:g,sortByChange7d:v,sortByMarketCap:b,sortByVolume24:y,sortBySupply:k}),(0,r.jsx)("tbody",{children:o.map(e=>(0,r.jsx)(f,{coin:e,currency:l,isDefaultCurrency:n,isChartLoading:w[e.hdr_id].isLoading,chart:w[e.hdr_id].chart,isMobile:N,lg:_,lg2:C,xl:Z,xxl:M},e.hdr_id))})]})}},16364:function(e,t,l){l.d(t,{default:function(){return c}});var r=l(57437),n=l(33145),s=l(2265),i=l(42353),a=l(45664),d=e=>{let[t,l]=s.useState(""),[r,n]=s.useState("");return s.useEffect(()=>{let t=new AbortController;return i.k9.getMarketDepth({hdr_id:e,abortSignal:t.signal}).then(e=>{e&&(l((0,a.dN)({amount:e.bids_volume,currency:"USD"}).value),n((0,a.dN)({amount:e.asks_volume,currency:"USD"}).value))}),()=>{t.abort()}},[e]),{asks:r,bids:t}},c=e=>{let{hdr_id:t,depthTr:l}=e,{asks:s,bids:i}=d(t);return(0,r.jsxs)("div",{className:"w-full flex flex-col items-start gap-5",children:[(0,r.jsx)("h3",{className:"h4 text-gray-2",children:l.title}),(0,r.jsxs)("div",{className:"w-full flex flex-col justify-start gap-3",children:[(0,r.jsxs)("div",{className:"w-full h-7 flex justify-between gap-2 text-white",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-gray-1",children:[(0,r.jsx)("h4",{className:"body_1",children:l.depthPositive}),(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(92deg, #56830E 0.72%, #A7D645 60.63%, #ECA130 99.04%)"},className:"p-1 rounded-md text-black body_2",children:s})]}),(0,r.jsxs)("div",{className:"w-auto flex items-center gap-2 text-gray-1",children:[(0,r.jsx)("div",{style:{backgroundImage:"linear-gradient(91deg, #E6A633 1.47%, #FF2323 88.55%, #FF3541 99.82%)"},className:"p-1 rounded-md text-black body_2",children:i}),(0,r.jsx)("h4",{className:"body_1 text-right",children:l.depthNegative})]})]}),(0,r.jsx)("div",{className:"w-full h-[1.25rem] relative",children:(0,r.jsx)(n.default,{src:"/coin/depth_chart.png",alt:"depth chart",fill:!0,sizes:"100vw"})})]})]})}},23491:function(e,t,l){l.d(t,{default:function(){return p}});var r=l(57437),n=l(2265),s=l(29450),i=l(92106),a=l(78003),d=l(61994),c=e=>{let{translations:t,sortByRank:l,sortByName:n,sortByExchange:s,sortByPrice:i,sortByChange1h:a,sortByChange24h:c,sortByVolume24:o,sortByAdded:u}=e,{name:h,price:m,mobile:x,change1h:f,change24h:p,added:g,listing:v,volume24:j,exchange:b}=t;return(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"w-full body_1 text-right text-gray-2 border-b border-t border-gray-3",children:[(0,r.jsx)("th",{id:"rank",className:(0,d.Z)("w-8 md:w-[7%] lg:w-[6%] xl:w-[5%] md:min-w-[4.375rem] md:pl-[2.125rem] text-left py-2"),children:(0,r.jsx)("button",{className:"flex",onClick:l,children:"#"})}),(0,r.jsx)("th",{id:"name",className:(0,d.Z)("w-[55%] md:w-[21%] lg:w-[20%] 2xl:w-[17%] min-w-[7.75rem] md:min-w-[17.5rem] pl-[3.75rem] text-left"),children:(0,r.jsx)("button",{className:"flex",onClick:n,children:h})}),(0,r.jsxs)("th",{id:"price",className:(0,d.Z)("w-[40%] md:w-[11%] min-w-[8rem]"),children:[(0,r.jsx)("div",{className:"hidden md:flex w-full justify-end",children:(0,r.jsx)("button",{onClick:i,children:m})}),(0,r.jsx)("div",{className:"flex md:hidden w-full justify-end",children:(0,r.jsx)("button",{onClick:i,children:x})})]}),(0,r.jsx)("th",{id:"change1h",className:(0,d.Z)("hidden 2xl:table-cell w-[6%
1] min-w-[5rem]"),children:(0,r.jsx)("button",{onClick:a,children:f})}),(0,r.jsx)("th",{id:"change24h",className:(0,d.Z)("hidden xl:table-cell w-[6%] min-w-[5rem]"),children:(0,r.jsx)("button",{onClick:c,children:p})}),(0,r.jsx)("th",{id:"volume24h",className:(0,d.Z)("hidden 2xl:table-cell w-[12%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:o,children:j})}),(0,r.jsx)("th",{id:"listing",className:(0,d.Z)("hidden lg:table-cell w-[6%] min-w-[5rem]"),children:(0,r.jsx)("button",{children:v})}),(0,r.jsx)("th",{id:"exchange",className:(0,d.Z)("hidden md:table-cell w-[10%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:s,children:b})}),(0,r.jsx)("th",{id:"added",className:(0,d.Z)("hidden md:table-cell w-[10%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:u,children:g})})]})})},o=l(33145),u=l(27648),h=l(45664),m=l(72684),x=e=>{let{coin:t,currency:l,isDefaultCurrency:n,isMobile:s,lg:i,xl:c,xxl:x,translations:f}=e,{name:p,cmc_rank:g,symbol:v,image:j,quote:b}=t,y=(0,h.AX)(j,"/hodler.png"),{volume_24h:k,price:w,percent_change_1h:N,percent_change_24h:_}=b[l]||b.USD,C=(0,h.dN)({amount:N,fractionDigits:2,isStrictFractionDigits:!0}),Z=(0,h.dN)({amount:_,fractionDigits:2,isStrictFractionDigits:!0}),M=(0,h.p6)({stamp:1718073503890,isSec:!1,withYear:!1,withTime:!0}),S=n?"/".concat(t.hdr_id):"/".concat(t.hdr_id,"?cur=").concat(l);return(0,r.jsxs)("tr",{className:"body_1 text-right text-white border-b border-gray-3",children:[(0,r.jsx)("td",{className:"text-left",children:(0,r.jsx)(u.default,{href:S,className:"w-full py-5 flex items-center justify-start",children:(0,r.jsxs)("div",{className:"w-ful flex items-center justify-start md:gap-3 shrink-0",children:[(0,r.jsx)("div",{className:"hidden md:flex",children:(0,r.jsx)(m.Ux,{})}),(0,r.jsx)("span",{children:g})]})})}),(0,r.jsx)("td",{className:"text-left md:border-r md:border-gray-3",children:(0,r.jsx)(u.default,{href:S,className:"w-full py-5 flex items-center justify-start",children:(0,r.jsx)("div",{className:"w-full ml-3 flex flex-col gap-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,r.jsx)("div",{className:"relative w-9 h-9 shrink-0 rounded-full overflow-hidden",children:(0,r.jsx)(o.default,{src:y,alt:"".concat(p," logo"),fill:!0,sizes:"5vw"})}),(0,r.jsxs)("div",{className:"w-[calc(100%-3rem)] flex flex-col items-start",children:[(0,r.jsx)("h3",{className:"w-full body_1 md:h3 text-ellipsis overflow-hidden",children:p}),(0,r.jsx)("span",{className:"hidden md:flex body_1 text-gray-1",children:v})]})]})})})}),(0,r.jsx)("td",{className:"coin_td",children:(0,r.jsxs)(u.default,{href:S,className:"h-full pl-1 lg:pl-3 xl:pl-6 flex items-center",children:[!s&&(0,r.jsx)("div",{className:"hidden md:flex w-full justify-end text-ellipsis overflow-hidden",children:(0,r.jsx)("span",{className:"w-full text-ellipsis overflow-hidden",children:(0,r.jsx)(a.O6,{hdr_id:t.hdr_id,initialPrice:w,currency:l})})}),s&&(0,r.jsxs)("div",{className:"md:hidden w-full flex flex-col items-end gap-1",children:[(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)("span",{className:"body_1 w-full text-ellipsis overflow-hidden",children:(0,r.jsx)(a.O6,{hdr_id:t.hdr_id,initialPrice:w,currency:l})})}),(0,r.jsxs)("span",{className:(0,d.Z)(Z.negative?"text-red":"text-green"),children:[Z.negative?"-":"+",(0,r.jsxs)("span",{className:"body_3",children:[Z.markup,"%"]})]})]})]})}),x&&(0,r.jsx)("td",{className:"coin_td hidden 2xl:table-cell",children:(0,r.jsx)(u.default,{href:S,className:"h-full pl-3 xl:pl-6 flex items-center justify-end",children:(0,r.jsxs)("div",{className:(0,d.Z)("w-[4.25rem] flex items-center justify-center gap-[0.25rem] py-2 rounded",C.negative?"text-red-dash bg-red-dark":"text-green bg-green-dark"),children:[(0,r.jsx)(m.Eh,{className:(0,d.Z)(C.negative?void 0:"rotate-180")}),(0,r.jsxs)("span",{className:"body_3",children:[C.markup,"%"]})]})})}),c&&(0,r.jsx)("td",{className:"coin_td hidden xl:table-cell",children:(0,r.jsx)(u.default,{href:S,className:"h-full pl-3 xl:pl-6 flex items-center justify-end",children:(0,r.jsxs)("div",{className:(0,d.Z)("w-[4.25rem] flex items-center justify-center gap-[0.25rem] py-2 rounded",Z.negative?"text-red-dash bg-red-dark":"text-green bg-green-dark"),children:[(0,r.jsx)(m.Eh,{className:(0,d.Z)(Z.negative?void 0:"rotate-180")}
1),(0,r.jsxs)("span",{className:"body_3",children:[Z.markup,"%"]})]})})}),x&&(0,r.jsx)("td",{className:"coin_td hidden 2xl:table-cell",children:(0,r.jsx)(u.default,{className:"h-full pl-3 xl:pl-6 flex items-center",href:S,children:(0,r.jsx)("span",{className:"w-full text-ellipsis overflow-hidden",children:(0,h.dN)({amount:k,fractionDigits:0,currency:l}).markup})})}),i&&(0,r.jsx)("td",{className:"coin_td hidden lg:table-cell",children:(0,r.jsx)(u.default,{className:"w-full h-full pl-3 xl:pl-6 flex items-center justify-end",href:S,children:(0,r.jsx)("div",{className:"p-1 rounded-lg",style:{backgroundImage:"linear-gradient(92deg, #56830E 0.72%, #A7D645 60.63%, #ECA130 99.04%)"},children:(0,r.jsxs)("div",{className:(0,d.Z)("p-1 flex flex-col items-center justify-center shrink-0 body_1 bg-gray-6",t.new_for_exchange?"invisible":"visible"),children:[(0,r.jsx)("div",{children:f.bodyFirst}),(0,r.jsx)("div",{children:f.bodyListing})]})})})}),!s&&(0,r.jsx)("td",{className:"coin_td hidden md:table-cell",children:(0,r.jsx)(u.default,{className:"h-full pl-3 xl:pl-6 flex items-center",href:S,children:(0,r.jsx)("span",{className:"w-full text-ellipsis overflow-hidden",children:t.exchange})})}),!s&&(0,r.jsx)("td",{className:"coin_td hidden md:table-cell",children:(0,r.jsx)(u.default,{className:"h-full pl-3 xl:pl-6 flex items-center",href:S,children:(0,r.jsx)("span",{className:"w-full",children:M})})})]})},f=e=>{let{currency:t,coins:l}=e,[r,s]=n.useState(l),i=n.useRef(!0),a=n.useRef(!1),d=n.useRef(!1),c=n.useRef(!1),o=n.useRef(!1),u=n.useRef(!1),h=n.useRef(!1),m=n.useRef(!1),x=n.useCallback(()=>{s(e=>[...e.sort((e,t)=>{let l=e.cmc_rank,r=t.cmc_rank;return i.current?l-r:r-l})]),i.current=!i.current},[]),f=n.useCallback(()=>{s(e=>a.current?[...e.sort((e,t)=>e.name.localeCompare(t.name,"en",{sensitivity:"base"}))]:[...e.sort((e,t)=>t.name.localeCompare(e.name,"en",{sensitivity:"base"}))]),a.current=!a.current},[]),p=n.useCallback(()=>{s(e=>d.current?[...e.sort((e,t)=>e.exchange.localeCompare(t.exchange,"en",{sensitivity:"base"}))]:[...e.sort((e,t)=>t.exchange.localeCompare(e.exchange,"en",{sensitivity:"base"}))]),d.current=!d.current},[]),g=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.price,i=null===(n=l.quote[t])||void 0===n?void 0:n.price;return i&&s?c.current?s-i:i-s:0})]),c.current=!c.current},[t]),v=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.percent_change_1h,i=null===(n=l.quote[t])||void 0===n?void 0:n.percent_change_1h;return i&&s?o.current?s-i:i-s:0})]),o.current=!o.current},[t]);return{coinsState:r,sortByRank:x,sortByName:f,sortByExchange:p,sortByPrice:g,sortByChange1h:v,sortByChange24h:n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.percent_change_24h,i=null===(n=l.quote[t])||void 0===n?void 0:n.percent_change_24h;return i&&s?u.current?s-i:i-s:0})]),u.current=!u.current},[t]),sortByVolume24:n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.volume_24h,i=null===(n=l.quote[t])||void 0===n?void 0:n.volume_24h;return i&&s?h.current?s-i:i-s:0})]),h.current=!h.current},[t]),sortByAdded:n.useCallback(()=>{s(e=>[...e.sort((e,t)=>m.current?e.created_at-t.created_at:t.created_at-e.created_at)]),m.current=!m.current},[])}},p=e=>{let{coins:t,currency:l,isDefaultCurrency:n,translations:d}=e,{coinsState:o,sortByRank:u,sortByName:h,sortByExchange:m,sortByPrice:p,sortByChange1h:g,sortByChange24h:v,sortByVolume24:j,sortByAdded:b}=f({coins:t,currency:l}),{isMobile:y,lg:k,xl:w,xxl:N}=(0,i.Fy)();return(0,r.jsxs)("table",{className:"w-full table-fixed",children:[(0,r.jsx)(a.UI,{socketId:s.y0.COIN_PRICE,coins:t,currency:l}),(0,r.jsx)(c,{translations:d,sortByRank:u,sortByName:h,sortByExchange:m,sortByPrice:p,sortByChange1h:g,sortByChange24h:v,sortByVolume24:j,sortByAdded:b}),(0,r.jsx)("tbody",{children:o.map(e=>(0,r.jsx)(x,{coin:e,currency:l,isDefaultCurrency:n,isMobile:y,lg:k,xl:w,xxl:N,translations:{bodyFirst:d.bodyFirst,bodyListing:d.bodyListing}},e.hdr_id))})]})}},69941:function(e,t,l){l.d(t,{default:function(){return p}});var r=l(57437),n=l(2265),s=l(29450),i=l(92106),a=l(78003),d=l(61994),c=e=>{let{translations:t,sortByRank:l,sortByName:n,sortByMarketCap:s,sortByPrice:i,sortByUnlockTockensPercent:a,sortByUnlockedPercent:c,sortByDate:o}=e,{name:u,price:h,mobile:m,marketCap:x,date:f,nextUnlock:p,unlockedLocked:g}=t;return(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"w-full body_1 text-right text-gray-2 border-b border-t border-gray-3",children:[(0,r.jsx)("th",{id:"rank",className:(0,d.Z)("w-8 md:w-[7%] lg:w-[6%] xl:w-[5%] md:min-w-[4.375rem] md:pl-[2.125rem] text-left py-2"),children:(0,r.jsx)("button",{className:"flex",onClick:l,children:"#"})}
1),(0,r.jsx)("th",{id:"name",className:(0,d.Z)("w-[55%] md:w-[21%] lg:w-[20%] 2xl:w-[17%] min-w-[7.75rem] md:min-w-[17.5rem] pl-[3.75rem] text-left"),children:(0,r.jsx)("button",{className:"flex",onClick:n,children:u})}),(0,r.jsxs)("th",{id:"price",className:(0,d.Z)("w-[40%] md:w-[15%] min-w-[8rem] md:hidden lg:table-cell"),children:[(0,r.jsx)("div",{className:"hidden lg:flex w-full justify-end",children:(0,r.jsx)("button",{onClick:i,children:h})}),(0,r.jsx)("div",{className:"flex md:hidden w-full justify-end",children:(0,r.jsx)("button",{onClick:i,children:m})})]}),(0,r.jsx)("th",{id:"marketCap",className:(0,d.Z)("hidden xl:table-cell w-[15%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:s,children:x})}),(0,r.jsx)("th",{id:"date",className:(0,d.Z)("hidden md:table-cell w-[10%] min-w-[5rem]"),children:(0,r.jsx)("button",{onClick:o,children:f})}),(0,r.jsx)("th",{id:"nextUnlock",className:(0,d.Z)("hidden md:table-cell w-[10%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:a,children:p})}),(0,r.jsx)("th",{id:"unlockedLocked",className:(0,d.Z)("hidden md:table-cell w-[15%] min-w-[8rem]"),children:(0,r.jsx)("button",{onClick:c,children:g})})]})})},o=l(33145),u=l(27648),h=l(45664),m=l(72684),x=e=>{let{coin:t,currency:l,isDefaultCurrency:n,isMobile:s,isTablet:i,xl:c,translations:x}=e,{name:f,cmc_rank:p,symbol:g,image:v,quote:j,unlock_date:b,unlocked_percent:y,unlock_tokens_percent:k,unlock_market_cap_share_percent:w,unlock_tokens:N}=t,_=(0,h.AX)(v,"/hodler.png"),{price:C,market_cap:Z,percent_change_24h:M}=j[l]||j.USD,S=(0,h.dN)({amount:M,fractionDigits:2,isStrictFractionDigits:!0}),O=(0,h.dN)({amount:k,fractionDigits:2,isStrictFractionDigits:!0}),E=(0,h.dN)({amount:w,fractionDigits:0,isStrictFractionDigits:!0}),D=(0,h.p6)({stamp:b,withTime:!1}),R=(0,h.p6)({stamp:b,withDay:!1,withMonth:!1,withYear:!1}),P=n?"/".concat(t.hdr_id):"/".concat(t.hdr_id,"?cur=").concat(l);return(0,r.jsxs)("tr",{className:"body_1 text-right text-white border-b border-gray-3",children:[(0,r.jsx)("td",{className:"text-left",children:(0,r.jsx)(u.default,{href:P,className:"w-full py-5 flex items-center justify-start",children:(0,r.jsxs)("div",{className:"w-ful flex items-center justify-start md:gap-3 shrink-0",children:[(0,r.jsx)("div",{className:"hidden md:flex",children:(0,r.jsx)(m.Ux,{})}),(0,r.jsx)("span",{children:p})]})})}),(0,r.jsx)("td",{className:"text-left md:border-r md:border-gray-3",children:(0,r.jsx)(u.default,{href:P,className:"w-full py-5 flex items-center justify-start",children:(0,r.jsx)("div",{className:"w-full ml-3 flex flex-col gap-3",children:(0,r.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,r.jsx)("div",{className:"relative w-9 h-9 shrink-0 rounded-full overflow-hidden",children:(0,r.jsx)(o.default,{src:_,alt:"".concat(f," logo"),fill:!0,sizes:"5vw"})}),(0,r.jsxs)("div",{className:"w-[calc(100%-3rem)] flex flex-col items-start",children:[(0,r.jsx)("h3",{className:"w-full body_1 md:h3 text-ellipsis overflow-hidden",children:f}),(0,r.jsx)("span",{className:"hidden md:flex body_1 text-gray-1",children:g})]})]})})})}),!i&&(0,r.jsx)("td",{className:"coin_td md:hidden lg:table-cell",children:(0,r.jsxs)(u.default,{href:P,className:"h-full pl-1 lg:pl-3 xl:pl-6 flex items-center",children:[!s&&(0,r.jsx)("div",{className:"hidden md:flex w-full justify-end text-ellipsis overflow-hidden",children:(0,r.jsx)("span",{className:"w-full text-ellipsis overflow-hidden",children:(0,r.jsx)(a.O6,{hdr_id:t.hdr_id,initialPrice:C,currency:l})})}),s&&(0,r.jsxs)("div",{className:"md:hidden w-full flex flex-col items-end gap-1",children:[(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)("span",{className:"body_1 w-full text-ellipsis overflow-hidden",children:(0,r.jsx)(a.O6,{hdr_id:t.hdr_id,initialPrice:C,currency:l})})}),(0,r.jsxs)("span",{className:(0,d.Z)(S.negative?"text-red":"text-green"),children:[S.negative?"-":"+",(0,r.jsxs)("span",{className:"body_3",children:[S.markup,"%"]})]})]})]})}),c&&(0,r.jsx)("td",{className:"coin_td hidden xl:table-cell",children:(0,r.jsx)(u.default,{className:"h-full pl-1 lg:pl-3 xl:pl-6 flex items-center",href:P,children:(0,r.jsx)("span",{className:"w-full",children:(0,h.dN)({amount:Z,fractionDigits:0,currency:l}).markup})})}),!s&&(0,r.jsx)("td",{className:"coin_td hidden md:table-cell",children:(0,r.jsxs)(u.default,{className:"h-full pl-1 lg:pl-3 xl:pl-6 flex flex-col items-end justify-center",href:P,children:[(0,r.jsx)("div",{className:"w-full text-ellipsis overflow-hidden",children:D}),(0,r.jsx)("div",{className:"w-full text-ellipsis overflow-hidden text-gray-2",children:R})]})}),!s&&(0,r.jsx)("td",{className:"coin_td hidden md:table-cell",children:(0,r.jsxs)(u.default,{className:"h-full pl-1 lg:pl-3 xl:pl-6 flex flex-col items-end justify-center",href:P,children:[(0,r.jsxs)("div",{className:"w-full text-ellipsis overflow-hidden",children:[(0,r.jsxs)("span",{className:"text-green",children:[O.markup,"% "]}),(0,r.jsx)("span",{className:"text-gray-2",children:(0,h.T4)(N)})]}),(0,r.jsx)("div",{className:"w-full text-ellipsis overflow-hidden",children:(0,h.dN)({amount:N*C,isCompact:!0,currency:l}).markup}),(0,r.jsx)("div",{className:"w-full text-ellipsis overflow-hidden",children:"".concat(E.markup,"% ").concat(x.ofMCaps)})]})}),!s&&(0,r.jsx)("td",{className:"coin_td hidden md:table-cell",children:(0,r.jsxs)(u.default,{className:"h-full pl-1 lg:pl-3 xl:pl-6 flex flex-col items-end justify-center gap-2",href:P,children:[(0,r.jsxs)("div",{className:"w-[80%] flex justify-between body_3",children:[(0,r.jsx)("div",{className:"text-green",children:Math.round(y)}),(0,r.jsx)("div",{className:"text-white",children:Math.round(100-y)})]}),(0,r.jsxs)("div",{className:"w-[80%] h-1 flex gap-1",children:[(0,r.jsx)("div",{className:"h-1 bg-green rounded-lg",style:{width:"".concat(y,"%")}}),(0,r.jsx)("div",{className:"h-1 bg-white rounded-lg",style:{width:"".concat(100-y,"%")}})]})]})})]})},f=e=>{let{currency:t,coins:l}=e,[r,s]=n.useState(l),i=n.useRef(!0),a=n.useRef(!1),d=n.useRef(!1),c=n.useRef(!1),o=n.useRef(!1),u=n.useRef(!1),h=n.useRef(!1),m=n.useCallback(()=>{s(e=>[...e.sort((e,t)=>
1{let l=e.cmc_rank,r=t.cmc_rank;return i.current?l-r:r-l})]),i.current=!i.current},[]),x=n.useCallback(()=>{s(e=>a.current?[...e.sort((e,t)=>e.name.localeCompare(t.name,"en",{sensitivity:"base"}))]:[...e.sort((e,t)=>t.name.localeCompare(e.name,"en",{sensitivity:"base"}))]),a.current=!a.current},[]),f=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.price,i=null===(n=l.quote[t])||void 0===n?void 0:n.price;return i&&s?d.current?s-i:i-s:0})]),d.current=!d.current},[t]),p=n.useCallback(()=>{s(e=>[...e.sort((e,l)=>{var r,n;let s=null===(r=e.quote[t])||void 0===r?void 0:r.market_cap,i=null===(n=l.quote[t])||void 0===n?void 0:n.market_cap;return i&&s?c.current?s-i:i-s:0})]),c.current=!c.current},[t]);return{coinsState:r,sortByRank:m,sortByName:x,sortByMarketCap:p,sortByPrice:f,sortByUnlockTockensPercent:n.useCallback(()=>{s(e=>[...e.sort((e,t)=>o.current?e.unlock_tokens_percent-t.unlock_tokens_percent:t.unlock_tokens_percent-e.unlock_tokens_percent)]),o.current=!o.current},[]),sortByUnlockedPercent:n.useCallback(()=>{s(e=>[...e.sort((e,t)=>u.current?e.unlocked_percent-t.unlocked_percent:t.unlocked_percent-e.unlocked_percent)]),u.current=!u.current},[]),sortByDate:n.useCallback(()=>{s(e=>[...e.sort((e,t)=>h.current?e.unlock_date-t.unlock_date:t.unlock_date-e.unlock_date)]),h.current=!h.current},[])}},p=e=>{let{coins:t,currency:l,isDefaultCurrency:n,translations:d}=e,{coinsState:o,sortByRank:u,sortByName:h,sortByMarketCap:m,sortByPrice:p,sortByUnlockTockensPercent:g,sortByUnlockedPercent:v,sortByDate:j}=f({coins:t,currency:l}),{isMobile:b,isTablet:y,xl:k}=(0,i.Fy)();return(0,r.jsxs)("table",{className:"w-full table-fixed",children:[(0,r.jsx)(a.UI,{socketId:s.y0.COIN_PRICE,coins:t,currency:l}),(0,r.jsx)(c,{translations:d,sortByRank:u,sortByName:h,sortByMarketCap:m,sortByPrice:p,sortByUnlockTockensPercent:g,sortByUnlockedPercent:v,sortByDate:j}),(0,r.jsx)("tbody",{children:o.map(e=>(0,r.jsx)(x,{coin:e,currency:l,isDefaultCurrency:n,isMobile:b,isTablet:y,xl:k,translations:{ofMCaps:d.ofMCaps}},e.hdr_id))})]})}},65464:function(e,t,l){var r=l(57437),n=l(2265),s=l(33145);t.default=e=>{let{votingTr:t}=e,[l,i]=n.useState(40),a=n.useCallback(()=>i(e=>100===e?e:e+1),[]),d=n.useCallback(()=>i(e=>0===e?e:e-1),[]);return(0,r.jsxs)("section",{className:"w-full flex flex-col gap-6",children:[(0,r.jsx)("h3",{className:"h4 text-white",children:t.title}),(0,r.jsxs)("div",{className:"w-full flex gap-6",children:[(0,r.jsx)("button",{className:"w-1/2 aspect-16/9 relative overflow-hidden rounded-xl",onClick:a,children:(0,r.jsx)(s.default,{src:"/coin/rise.png",alt:t.rise,fill:!0,sizes:"50vw"})}),(0,r.jsx)("button",{className:"w-1/2 aspect-16/9 relative overflow-hidden rounded-xl",onClick:d,children:(0,r.jsx)(s.default,{src:"/coin/fall.png",alt:t.fall,fill:!0,sizes:"50vw"})})]}),(0,r.jsxs)("div",{className:"w-full mt-[-0.75rem] flex gap-3 body_1 text-white text-center",children:[(0,r.jsx)("p",{className:"w-1/2",children:"".concat(t.rise," ").concat(l,"%")}),(0,r.jsx)("p",{className:"w-1/2",children:"".concat(t.fall," ").concat(100-l,"%")})]})]})}},52701:function(e,t,l){l.d(t,{Ee:function(){return o.default},F2:function(){return a.default},HR:function(){return h.default},Lt:function(){return i.default},Ph:function(){return n.default},TD:function(){return u.default},Vq:function(){return r.default},ho:function(){return d.default},mk:function(){return s.default},xf:function(){return c.default},yD:function(){return m.default}});var r=l(4161),n=l(91419),s=l(66748),i=l(6610),a=l(56563),d=l(56282),c=l(48983),o=l(90976),u=l(57373),h=l(62797),m=l(59971);l(37059)},86660:function(e,t,l){l.d(t,{r:function(){return a}});var r=l(93564),n=l(79985);let s="coins";class i{connect(e){let{socketId:t,hdr_ids:l,currency:i}=e;return this.connected[t]=new Promise(e=>{if(this.socket[t]){console.log("try connect, socket ".concat(t," is connected allready"));return}this.socket[t]=(0,r.io)(n.WU,{reconnection:!0,autoConnect:!1});let a=this.socket[t];null==a||a.connect(),null==a||a.on("connect",()=>{console.log("socket ".concat(t," is opened")),e(!0)}),null==a||a.on("connect_error",()=>{console.log("socket ".concat(t," connect error")),e(!1)}),null==a||a.emit(s,{hdr_id:l.join(","),currency:i})}),this.connected[t]}onMessage(e,t){var l;let r=this.socket[e];
1if(!r||!r.connected){console.log("try add listener, socket ".concat(e," is not connected"));return}console.log("add listener on Message to ".concat(e)),null===(l=this.socket[e])||void 0===l||l.on(s,t)}removeListener(e,t){var l;console.log("remove listener ".concat(e)),null===(l=this.socket[e])||void 0===l||l.off(s,t)}removeAllListeners(e){var t;null===(t=this.socket[e])||void 0===t||t.removeAllListeners(s)}disconnect(e){let t=this.socket[e];if(!t){console.log("try disconnect, socket ".concat(e," is not connected"));return}this.removeAllListeners(e),t.on("disconnect",()=>console.log("socket ".concat(e," is closed"))),t.close(),this.socket[e]=void 0,this.connected[e]=Promise.resolve(!1)}constructor(){this.socket={},this.connected={}}}var a=new i}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.