1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5451],{98213:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/marketplace/sections/volume-chart/volume-chart.component",function(){return a(87463)}])},87463:function(e,t,a){"use strict";a.r(t);var n=a(85893),r=a(26390),l=a(25956),o=a(30033),i=a(96728),c=a(73241),s=a(48324),u=a(400),d=a(11e3),h=a(96486),m=a(30381),f=a.n(m),p=a(67294),v=a(86896),x=a(36764),b=a.n(x);let g=["#7997FF","#33DAFF","#60DC94","#D885FF","#FF9567","#FF4D4D","#EBD406"],y=function(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];return{grid:{left:48,right:0,bottom:20},tooltip:{trigger:"axis",padding:0,backgroundColor:"none",extraCssText:"box-shadow: none;",borderWidth:0,formatter(t,a,n){let r="",l=(0,h.cloneDeep)(t).sort((e,t)=>t.data[1]-e.data[1]);for(let o=0;o<l.length;o++){let i=l[o];r+="\n <div class='default-tooltip-item flex-center'>\n <div class='flex-center left'>\n ".concat(i.marker,"\n <span>").concat(i.seriesName,"</span>\n </div>\n <span>").concat(e?"$":"").concat((0,u.uf)(i.data[1],2),"</span>\n </div>\n ")}return"<div class='default-chart-tooltip tooltip'>\n <div class='default-tooltip-title flex-center'>\n <span>".concat(f().unix(l[0].data[2]/1e3).format("yyyy/MM/DD HH:mm"),"</span>\n </div>\n ").concat(r,"\n </div>")}},xAxis:{type:"time",boundaryGap:["0","3%"],axisLine:{show:!1},axisLabel:{show:!0,hideOverlap:!0},axisTick:{show:!1}},yAxis:[{type:"value",position:"left",splitLine:{show:!0,lineStyle:{type:"dashed"}},axisLabel:{formatter:(e,t)=>(0,u.dp)((0,h.round)(e,2))}}],series:[]}},_=e=>{let t=(0,v.Z)(),{state:{theme:a}}=(0,p.useContext)(i.kn),u=(0,p.useRef)(null),[m,f]=(0,p.useState)(s.l.Initial),[x,_]=(0,p.useState)(y(e.showUnit)),[D,w]=(0,p.useState)(),[E,k]=(0,p.useState)(),[C,S]=(0,p.useState)();(0,p.useEffect)(()=>{e.range&&S(e.range)},[e.range]),(0,p.useEffect)(()=>{(C||E)&&(f(s.l.Loading),M(C,E,e.chain))},[C,E,e.chain]),(0,p.useEffect)(()=>{if((0,h.isEmpty)(D))return;let t=(0,h.cloneDeep)(x),n=[],r=[];D.forEach((t,a)=>{let l=[];t.value.forEach(t=>{l.push([t.time,t[e.valueKey?e.valueKey:"volume"],t.time])});let i=(0,o.h3)();n.push({name:t.name,type:"line",data:l,lineStyle:{color:g[a]||i,width:2},itemStyle:{color:g[a]||i},showSymbol:!1,showAllSymbol:!0,smooth:!1}),r.push({name:t.name,itemStyle:{color:g[a]||i}})}),t.series=n,t.legend={data:r,itemGap:12,itemWidth:8,itemHeight:8,left:"-5",icon:"circle",show:!0,textStyle:{padding:0,fontSize:14,overflow:"truncate",color:(0,o.xJ)(a)}},t.yAxis[0].splitLine.lineStyle.color=(0,o.BE)(a),t.yAxis[0].axisLabel.color=(0,o.xJ)(a),t.xAxis.axisLabel.color=(0,o.xJ)(a),_(t),f(s.l.Success)},[D,a]);let{run:M}=(0,c.b)((t,a,n)=>{let r={};return r=a?{startDate:a[0].format("yyyy-MM-DD"),endDate:a[1].format("yyyy-MM-DD")}:{range:t},{url:e.url||"/nftscan/getMarketPlaceVolumeData",method:"get",params:{...r,chain:n},headers:{Chain:n}}},{onSuccess(e){if((0,h.isEmpty)(e)){f(s.l.Nodata);return}w(e)},onError(){f(s.l.Failed)}});return(0,n.jsx)(l.Z,{title:e.title?e.title:t.formatMessage({id:"text.Volume"}),periodList:[d.BR.D1,d.BR.D7,d.BR.MTH1,d.BR.MTH3,d.BR.Y1,d.BR.ALL],periodDefault:C,showCalendar:!0,periodChange(e){S(e),k(void 0)},dateChange(e){S(void 0),k(e)},children:(0,n.jsx)("div",{className:b().wrapper,children:(0,n.jsx)(r.Z,{chartReady(e){u.current=e},className:b().chartBox,status:m,options:x})})})};t.default=_},26390:function(e,t,a){"use strict";a.d(t,{Z:function(){return v}});var n=a(85893),r=a(26662),l=a(84031),o=a(67294),i=a(36505),c=a.n(i),s=a(48324),u=a(400),d=a(1858),h=a(98719),m=a.n(h);function f(e){return(0,n.jsx)("div",{className:m().mask+" ".concat(e.isLoading?m().active:""),children:(0,n.jsx)(d.Z,{})})}var p=a(14385);function v(e){let{className:t,options:a,style:i,status:d,chartReady:h=()=>{},logoRight:m,hideWatermark:v}=e,x=(0,r.X)(),b=(0,o.useRef)(null),g=(0,o.useCallback)(()=>{x&&b.current&&b.current.dispatchAction({type:"hideTip"})},[x,b.current]);return(0,n.jsxs)("div",{className:c().chart+" ".concat(t),style:i,children:[d===s.l.Loading&&(0,n.jsx)(f,{isLoading:!0}),(0,n.jsx)(p.Z,{status:d}),d!==s.l.Nodata&&d!==s.l.Loading&&d!=s.l.Failed&&(0,n.jsxs)("div",{className:c().echartDom,onTouchEnd:g,children:[!v&&(0,n.jsx)("img",{className:"".concat(c().chartLogo),style:{right:m||"8%"},src:"/images/logo-watermark.png"}),(0,n.jsx)(l.Z,{style:{height:"100%"},opts:{locale:"EN",renderer:"svg"},option:(0,u.G7)(a,!1),onChartReady(e){b.current=e,h(e)}})]})]})}},30033:function(e,t,a){"use strict";a.d(t,{BE:function(){return n}
1,h3:function(){return l},xJ:function(){return r}});let n=e=>"dark"===e?"#263145":"#f2f4f7",r=e=>"dark"===e?"#FFFFFF":"#777C85";function l(){return"rgba("+Math.floor(255*Math.random())+","+Math.floor(255*Math.random())+","+Math.floor(255*Math.random())+",1)"}},73241:function(e,t,a){"use strict";a.d(t,{b:function(){return C},v:function(){return L}});var n=a(67294),r=a(9639),l=a(73137),o=a(68214),i=a.n(o),c=a(86340),s=a(88065);let u=()=>"EEe/fErii6HHp4RXOxvUfg==",d=()=>{let e=["9","d","l","m","L","9","J","K","N","Y","j","d","c","9","n","f","U","w","=","="];return e.splice(6,0,...["P","c","5","V"]),e.join("")};var h=a(48764).Buffer;let m=a(42474),f=e=>{let t=v(10);if(!t)return 0;let a=t.charCodeAt(x(0,t.length-1)),n=e-(1023&e^(e>>10&1023)%1e3-a);return p(n)?n-x(1e3,1999):n},p=e=>51==String(e).charCodeAt(9)||57==String(e).charCodeAt(9),v=e=>{let t=m.randomBytes(Math.ceil(e/2));return t.toString("hex").slice(0,e)},x=(e,t)=>e+Math.abs(m.randomBytes(4).readInt32BE(0))%(t-e+1),b=e=>{let t=Object.keys(e).sort(),a={};for(let n=0;n<t.length;n++){let r=e[t[n]];a[t[n]]=(0,c.xb)(r)?"":r}return a},g=(e,t)=>{e[_("dUGdlhtaZ1X2Nk0cYnWD1aws")]=t},y=(e,t)=>{e[_("WUCd1hBaU1E2kktcSn0DVaZs")]=t},_=e=>{let t=e.split("").filter((e,t)=>t%2==0).join("");return h.from(t,"base64").toString()},D=()=>{let e=new Date().getTime();return f(e)},w=(e,t)=>{let a=b(E(e)),n=t%2==0?d():u(),r=Object.entries(a).map(e=>{let[t,a]=e;return"".concat(encodeURIComponent(t),"=").concat((0,s.WQ)(a))}).join("&").split("").sort().join(""),l=i()("".concat(n).concat(r).concat(t)).toString();return"".concat(l.substring(0,12)).concat(l.substring(l.length-12,l.length)).split("").map(e=>Math.random()>.6?e.toLocaleUpperCase():e).join("")},E=e=>e||{},k=e=>{let t={};for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&!(0,c.xb)(e[a])&&(t[a]=e[a]);return t},C=(e,t)=>{let{onSuccess:a,onError:o,debounceInterval:i}=t,[c,s]=(0,n.useState)(!1),u=(0,n.useContext)(r.z),d=(0,n.useMemo)(()=>u,[u]),h=(0,n.useRef)(new AbortController),m=()=>{h.current.abort()},f=(0,n.useRef)(null),p=i||100,v=(0,n.useCallback)(async function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];f.current&&clearTimeout(f.current),f.current=setTimeout(async()=>{s(!0);let t=e(...n);"get"==t.method&&(t.params=k(t.params));let r=t.headers||{};r.Chain=r.Chain||"ETH";let i=D(),c=w(t.params,i);g(r,i),y(r,c),t.headers=r;try{let u=await d.request(t);a(u,[...n])}catch(h){o?o(null==h?void 0:h.message):l.A.create({type:"waring",text:null==h?void 0:h.message})}finally{s(!1)}},p)},[]);return{cancel:m,run:v,loading:c}};var S=a(34936),M=a(62328);let L=(e,t,a,r)=>{let l=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!t)return;let a=(0,S.R)(t,"scroll"),n=void 0==r||(0,c.xb)(r)?100:r;return 0!=n&&a.pipe((0,M.b)(n)),l.current=a.subscribe(a=>{let n=t!==window?a.target:document.documentElement||document.body,r=n.scrollHeight,l=n.scrollTop,o=n.clientHeight;e({element:n,scrollHeight:r,scrollTop:l,clientHeight:o})}),()=>{var e;null===(e=l.current)||void 0===e||e.unsubscribe(),l.current=null}},a?[t,...a]:[t])}},11e3:function(e,t,a){"use strict";var n,r;a.d(t,{BR:function(){return l},Y3:function(){return n},rx:function(){return o}}),(r=n||(n={})).m15="15m",r.m30="30m",r.h1="1h",r.h4="4h",r.h6="6h",r.h12="12h",r.d1="1d",r.d3="3d",r.d7="7d",r.d30="30d",r.d90="90d",r.mth1="1mth",r.mth3="3mth",r.y1="1y",r.all="all";let l={MIN15:{label:"15min",value:n.m15},MIN30:{label:"30min",value:n.m30},H1:{label:"1h",value:n.h1},H4:{label:"4h",value:n.h4},H6:{label:"6h",value:n.h6},H12:{label:"12h",value:n.h12},D1:{label:"1d",value:n.d1},D3:{label:"3d",value:n.d3},D7:{label:"7d",value:n.d7},D30:{label:"30d",value:n.d30},D90:{label:"90d",value:n.d90},MTH1:{label:"1m",value:n.mth1},MTH3:{label:"3m",value:n.mth3},Y1:{label:"1y",value:n.y1},ALL:{label:"All",value:n.all}};function o(e){if(e)for(let t in l){let a=l[t];if(a.value===e)return a}return null}l.H1,l.H6,l.H12,l.D1,l.D3},36764:function(e){e.exports={wrapper:"volume-chart_wrapper__on38k",chartBox:"volume-chart_chartBox__jWWDE"}},36505:function(e){e.exports={chart:"chart-box_chart__w82N6",echartDom:"chart-box_echartDom__h2n07",watermark:"chart-box_watermark__czVba",noDataDom:"chart-box_noDataDom__0idPU",text:"chart-box_text__NBzdn",chartLogo:"chart-box_chartLogo__W_SI2"}},98719:function(e){e.exports={mask:"mask_mask__fSeBT",active:"mask_active__ywE5Q"}},86896:function(e,t,a){"use strict";a.d(t,{Z:function(){return o}});var n=a(67294),r=a(74806),l=a(680);function o(){var e=n.useContext(r._y);return(0,l.lq)(e),e}},42480:function(){}}
1,function(e){e.O(0,[3714,4936,4557,2106,1776,4031,399,9774,2888,179],function(){return e(e.s=98213)}),_N_E=e.O()}]);
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.