-
Notifications
You must be signed in to change notification settings - Fork 0
/
src__pages__Log__JIUBurn.async.js
1 lines (1 loc) · 16.3 KB
/
src__pages__Log__JIUBurn.async.js
1
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1211,9515],{80652:function(t,e,n){var a=n(62435),r=n(20701),i=n(11924),c=n(79360),s=n(24770),o=n(79642),l=function(t,e){var n={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.indexOf(a)<0&&(n[a]=t[a]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(t);r<a.length;r++)e.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(t,a[r])&&(n[a[r]]=t[a[r]])}return n},u=(0,a.forwardRef)((function(t,e){var n=t.chartRef,u=t.style,d=void 0===u?{height:"inherit"}:u,m=t.className,x=t.loading,f=t.loadingTemplate,y=t.errorTemplate,p=l(t,["chartRef","style","className","loading","loadingTemplate","errorTemplate"]),h=(0,i.Z)(r.x1,p),g=h.chart,b=h.container;return(0,a.useEffect)((function(){(0,c.J)(n,g.current)}),[g.current]),(0,a.useImperativeHandle)(e,(function(){return{getChart:function(){return g.current}}})),a.createElement(s.Z,{errorTemplate:y},x&&a.createElement(o.Z,{loadingTemplate:f,theme:t.theme}),a.createElement("div",{className:m,style:d,ref:b}))}));e.Z=u},6466:function(t,e,n){n.d(e,{Z:function(){return S}});var a=n(4942),r=n(1413),i=n(91),c=n(28459),s=n(93967),o=n.n(s),l=n(62435),u=n(63330),d=n(44962),m=n(98082),x=function(t){return(0,a.Z)({},t.componentCls,{display:"flex",flexDirection:"column",justifyContent:"flex-end",marginBlock:t.marginLG,marginInline:0,color:t.colorText,fontWeight:"500",fontSize:"20px",lineHeight:"38px"})};var f=n(86074),y=function(t){var e=t.className,n=t.style,a=void 0===n?{}:n,i=t.children,s=(0,(0,l.useContext)(c.ZP.ConfigContext).getPrefixCls)("pro-card-operation"),u=function(t){return(0,m.Xj)("ProCardOperation",(function(e){var n=(0,r.Z)((0,r.Z)({},e),{},{componentCls:".".concat(t)});return[x(n)]}))}(s),d=u.wrapSSR,y=u.hashId,p=o()(s,e,y);return d((0,f.jsx)("div",{className:p,style:a,children:i}))},p=n(10357),h=function(t){return(0,a.Z)({},t.componentCls,{"&-chart":{display:"flex",flexDirection:"column",marginBlockStart:8,marginBlockEnd:8,"&-left":{marginBlockStart:0,marginInlineEnd:"16px"},"&-right":{marginBlockStart:0,marginInlineStart:"16px"}},"&-content":{display:"flex",flexDirection:"column","&-horizontal":(0,a.Z)({flexDirection:"row"},"".concat(t.componentCls,"-chart"),{alignItems:"center",alignSelf:"flex-start"})},"&-footer":{marginBlockStart:8,paddingBlockStart:"16px",borderBlockStart:"rgba(0, 0, 0, 0.08) solid ".concat(t.colorBorder)}})};var g=["children","statistic","className","chart","chartPlacement","footer"],b=function(t){var e,n=t.children,s=t.statistic,d=t.className,x=t.chart,y=t.chartPlacement,b=t.footer,S=(0,i.Z)(t,g),j=(0,(0,l.useContext)(c.ZP.ConfigContext).getPrefixCls)("pro-statistic-card"),Z=function(t){return(0,m.Xj)("StatisticCard",(function(e){var n=(0,r.Z)((0,r.Z)({},e),{},{componentCls:".".concat(t)});return[h(n)]}))}(j),v=Z.wrapSSR,C=Z.hashId,N=o()(j,d,C),E=s&&(0,f.jsx)(p.Z,(0,r.Z)({layout:"vertical"},s)),D=o()("".concat(j,"-chart"),C,(e={},(0,a.Z)(e,"".concat(j,"-chart-left"),"left"===y&&x&&s),(0,a.Z)(e,"".concat(j,"-chart-right"),"right"===y&&x&&s),e)),I=x&&(0,f.jsx)("div",{className:D,children:x}),F=o()("".concat(j,"-content "),C,(0,a.Z)({},"".concat(j,"-content-horizontal"),"left"===y||"right"===y)),k=(I||E)&&("left"===y?(0,f.jsxs)("div",{className:F,children:[I,E]}):(0,f.jsxs)("div",{className:F,children:[E,I]})),M=b&&(0,f.jsx)("div",{className:"".concat(j,"-footer ").concat(C).trim(),children:b});return v((0,f.jsxs)(u.Z,(0,r.Z)((0,r.Z)({className:N},S),{},{children:[k,n,M]})))};b.Statistic=p.Z,b.Divider=d.Z,b.Operation=y,b.isProCard=!0,b.Group=function(t){return(0,f.jsx)(b,(0,r.Z)({bodyStyle:{padding:0}},t))};var S=b},10357:function(t,e,n){n.d(e,{Z:function(){return g}});var a=n(1413),r=n(4942),i=n(91),c=n(25035),s=n(28459),o=n(83062),l=n(40411),u=n(55054),d=n(93967),m=n.n(d),x=n(62435),f=n(98082),y=function(t){var e,n,a;return(0,r.Z)({},t.componentCls,(a={display:"flex",fontSize:t.fontSize,"& + &":{marginBlockStart:4},"&-tip":{marginInlineStart:4},"&-wrapper":(0,r.Z)({display:"flex",width:"100%"},"".concat(t.componentCls,"-status"),{width:"14px"}),"&-icon":{marginInlineEnd:16},"&-trend-icon":{width:0,height:0,borderInlineEnd:"3.5px solid transparent",borderBlockEnd:"9px solid #000",borderInlineStart:"3.5px solid transparent","&-up":{transform:"rotate(0deg)"},"&-down":{transform:"rotate(180deg)"}},"&-content":(0,r.Z)({width:"100%"},"".concat(t.antCls,"-statistic-content"),{"&-value-int":{fontSize:t.fontSizeHeading3}}),"&-description":{width:"100%"}},(0,r.Z)(a,"".concat(t.antCls,"-statistic-title"),{color:t.colorText}),(0,r.Z)(a,"&-trend-up",(0,r.Z)({},"".concat(t.antCls,"-statistic-content"),(0,r.Z)({color:"#f5222d"},"".concat(t.componentCls,"-trend-icon"),{borderBlockEndColor:"#f5222d"}))),(0,r.Z)(a,"&-trend-down",(0,r.Z)({},"".concat(t.antCls,"-statistic-content"),(0,r.Z)({color:"#389e0d"},"".concat(t.componentCls,"-trend-icon"),{borderBlockEndColor:"#52c41a"}))),(0,r.Z)(a,"& &-layout-horizontal",(e={display:"flex",justifyContent:"space-between"},(0,r.Z)(e,"".concat(t.antCls,"-statistic-title"),{marginBlockEnd:0}),(0,r.Z)(e,"".concat(t.antCls,"-statistic-content-value"),{fontWeight:500}),(0,r.Z)(e,"".concat(t.antCls,"-statistic-title,").concat(t.antCls,"-statistic-content,").concat(t.antCls,"-statistic-content-suffix,").concat(t.antCls,"-statistic-content-prefix,").concat(t.antCls,"-statistic-content-value-decimal"),{fontSize:t.fontSize}),e)),(0,r.Z)(a,"& &-layout-inline",(n={display:"inline-flex",color:t.colorTextSecondary},(0,r.Z)(n,"".concat(t.antCls,"-statistic-title"),{marginInlineEnd:"6px",marginBlockEnd:0}),(0,r.Z)(n,"".concat(t.antCls,"-statistic-content"),{color:t.colorTextSecondary}),(0,r.Z)(n,"".concat(t.antCls,"-statistic-title,").concat(t.antCls,"-statistic-content,").concat(t.antCls,"-statistic-content-suffix,").concat(t.antCls,"-statistic-content-prefix,").concat(t.antCls,"-statistic-content-value-decimal"),{fontSize:t.fontSizeSM}),n)),a))};var p=n(86074),h=["className","layout","style","description","children","title","tip","status","trend","prefix","icon"],g=function(t){var e,n=t.className,d=t.layout,g=void 0===d?"inline":d,b=t.style,S=t.description,j=(t.children,t.title),Z=t.tip,v=t.status,C=t.trend,N=t.prefix,E=t.icon,D=(0,i.Z)(t,h),I=(0,(0,x.useContext)(s.ZP.ConfigContext).getPrefixCls)("pro-card-statistic"),F=function(t){return(0,f.Xj)("Statistic",(function(e){var n=(0,a.Z)((0,a.Z)({},e),{},{componentCls:".".concat(t)});return[y(n)]}))}(I),k=F.wrapSSR,M=F.hashId,_=m()(I,n,M),B=m()("".concat(I,"-status"),M),w=m()("".concat(I,"-icon"),M),P=m()("".concat(I,"-wrapper"),M),U=m()("".concat(I,"-content"),M),J=m()(M,(e={},(0,r.Z)(e,"".concat(I,"-layout-").concat(g),g),(0,r.Z)(e,"".concat(I,"-trend-").concat(C),C),e)),T=Z&&(0,p.jsx)(o.Z,{title:Z,children:(0,p.jsx)(c.Z,{className:"".concat(I,"-tip ").concat(M).trim()})}),O=m()("".concat(I,"-trend-icon"),M,(0,r.Z)({},"".concat(I,"-trend-icon-").concat(C),C)),z=C&&(0,p.jsx)("div",{className:O}),R=v&&(0,p.jsx)("div",{className:B,children:(0,p.jsx)(l.Z,{status:v,text:null})}),q=E&&(0,p.jsx)("div",{className:w,children:E});return k((0,p.jsxs)("div",{className:_,style:b,children:[q,(0,p.jsxs)("div",{className:P,children:[R,(0,p.jsxs)("div",{className:U,children:[(0,p.jsx)(u.Z,(0,a.Z)({title:(j||T)&&(0,p.jsxs)(p.Fragment,{children:[j,T]}),prefix:(z||N)&&(0,p.jsxs)(p.Fragment,{children:[z,N]}),className:J},D)),S&&(0,p.jsx)("div",{className:"".concat(I,"-description ").concat(M).trim(),children:S})]})]})]}))}},51369:function(t,e,n){n.r(e);var a=n(97857),r=n.n(a),i=n(15009),c=n.n(i),s=n(99289),o=n.n(s),l=n(5574),u=n.n(l),d=n(25450),m=n(64119),x=n(80652),f=n(11774),y=n(38345),p=n(6466),h=n(92340),g=n(59530),b=n(45360),S=n(57953),j=n(71230),Z=n(15746),v=n(32983),C=n(27484),N=n.n(C),E=n(70178),D=n.n(E),I=n(62435),F=(n(15933),n(86074));N().extend(D());e.default=function(){var t=b.ZP.useMessage(),e=u()(t,2),n=e[0],a=e[1],i=(0,I.useState)(!1),s=u()(i,2),l=s[0],C=s[1],E=(0,g.useDispatch)(),D=(0,g.useNavigate)(),k=(0,g.useSelector)((function(t){return t.global.contractKit})),M=(0,g.useSelector)((function(t){return t.jiuburn.dataSource})),_=(0,g.useSelector)((function(t){return t.jiuburn.dailyDFSDataSource})),B=(0,g.useSelector)((function(t){return t.jiuburn.weeklyDFSDataSource})),w=(0,g.useSelector)((function(t){return t.jiuburn.monthlyDFSDataSource})),P=(0,g.useSelector)((function(t){return t.jiuburn.dailyJIUDataSource})),U=(0,g.useSelector)((function(t){return t.jiuburn.weeklyJIUDataSource})),J=(0,g.useSelector)((function(t){return t.jiuburn.monthlyJIUDataSource})),T=(0,g.useSelector)((function(t){return t.jiuburn.totals})),O=(0,g.useIntl)(),z=O.formatMessage({id:"jiuburn.intlType"}),R=O.formatMessage({id:"jiuburn.intlQuantity"}),q=O.formatMessage({id:"jiuburn.intlExecTime"}),A=O.formatMessage({id:"jiuburn.intlTrxId"}),Q=O.formatMessage({id:"jiuburn.intlDailyJIUBurn"}),G=O.formatMessage({id:"jiuburn.intlWeeklyJIUBurn"}),L=O.formatMessage({id:"jiuburn.intlMonthlyJIUBurn"}),W=O.formatMessage({id:"jiuburn.intlDailyDFSBuy"}),Y=O.formatMessage({id:"jiuburn.intlWeeklyDFSBuy"}),H=O.formatMessage({id:"jiuburn.intlMonthlyDFSBuy"}),X=O.formatMessage({id:"jiuburn.intlBuyQuantity"}),K=O.formatMessage({id:"jiuburn.intlBurnQuantity"}),V=O.formatMessage({id:"jiuburn.intlBuyCount"}),$=O.formatMessage({id:"jiuburn.intlBurnCount"}),tt=(0,I.useCallback)(function(){var t=o()(c()().mark((function t(e){var a,r,i,s,o,l,u,x,f,y,p,h,g,b,S;return c()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,a=[],r=[],i=[],s=[],o=[],l=[],u=[],x={},f={},y={},t.next=13,e.load("crowdfunding");case 13:return p=t.sent,h=p.table("records"),g=p.table("totals"),t.next=18,h.all();case 18:return b=t.sent,t.next=21,g.all();case 21:S=t.sent,E(d.N.setTotals({buyQuantity:S[0].buy_quantity.toString(),buyQuantitySymbol:S[0].buy_quantity.symbol.name,buyQuantityAmount:S[0].buy_quantity.value,burnQuantity:S[0].burn_quantity.toString(),burnQuantitySymbol:S[0].burn_quantity.symbol.name,burnQuantityAmount:S[0].burn_quantity.value,buyCount:S[0].buy_count.toNumber(),burnCount:S[0].burn_count.toNumber()})),b.forEach((function(t,e){var n=N().utc(t.exec_time.toString()).local().format(),r=N().utc(t.exec_time.toString()).local().format().slice(0,10),i=N().utc(t.exec_time.toString()).local().format("YYYY-ww"),c=N().utc(t.exec_time.toString()).local().format().slice(0,7),s=t.quantity.symbol.name,o=t.quantity.value;if(a.push({key:e,id:t.id.toNumber(),type:t.type,quantity:t.quantity.toString(),symbol:s,amount:o,trxid:t.trxid.toString(),exec_time:n}),x.hasOwnProperty(r))x[r][s]+=o;else{var l={DFS:0,JIU:0};l[s]+=o,x[r]=l}if(f.hasOwnProperty(i))f[i][s]+=o;else{var u={DFS:0,JIU:0};u[s]+=o,f[i]=u}if(y.hasOwnProperty(c))y[c][s]+=o;else{var d={DFS:0,JIU:0};d[s]+=o,y[c]=d}})),Object.keys(x).forEach((function(t){r.push({day:t,value:x[t].DFS,category:"DFS"}),o.push({day:t,value:x[t].JIU,category:"JIU"})})),Object.keys(f).forEach((function(t){i.push({day:t,value:f[t].DFS,category:"DFS"}),l.push({day:t,value:f[t].JIU,category:"JIU"})})),Object.keys(y).forEach((function(t){s.push({day:t,value:y[t].DFS,category:"DFS"}),u.push({day:t,value:y[t].JIU,category:"JIU"})})),a.sort((function(t,e){return N().utc(e.exec_time).unix()-N().utc(t.exec_time).unix()})),E(d.N.setDataSource(a)),E(d.N.setDailyDFSDataSource(r)),E(d.N.setWeeklyDFSDataSource(i)),E(d.N.setMonthlyDFSDataSource(s)),E(d.N.setDailyJIUDataSource(o)),E(d.N.setWeeklyJIUDataSource(l)),E(d.N.setMonthlyJIUDataSource(u)),C(!1),t.next=42;break;case 38:t.prev=38,t.t0=t.catch(0),C(!1),(0,m.Tv)(t.t0,n,"handleGetBurnLog");case 42:case"end":return t.stop()}}),t,null,[[0,38]])})));return function(e){return t.apply(this,arguments)}}(),[n]);(0,I.useEffect)((function(){k?(M.length?C(!1):C(!0),tt(k)):C(!0)}),[k]);var et=(0,I.useMemo)((function(){return[{title:"#",dataIndex:"key",key:"key",render:function(t,e,n){return(0,F.jsx)("span",{children:n+1})}},{title:"".concat(z),dataIndex:"type",key:"type",filters:[{text:"BUY",value:"BUY"},{text:"BURN",value:"BURN"}],onFilter:function(t,e){return t===e.type},render:function(t,e){return(0,F.jsx)("span",{children:e.type})}},{title:"".concat(R),dataIndex:"quantity",key:"quantity",filters:[{text:"DFS",value:"DFS"},{text:"JIU",value:"JIU"}],onFilter:function(t,e){return t===e.symbol},sorter:function(t,e){return e.amount-t.amount},render:function(t,e){return(0,F.jsx)("span",{children:e.quantity})}},{title:"".concat(q),dataIndex:"exec_time",key:"exec_time",sorter:function(t,e){return N().utc(t.exec_time).unix()-N().utc(e.exec_time).unix()},render:function(t,e){return(0,F.jsx)("span",{children:e.exec_time})}},{title:"".concat(A),dataIndex:"trxid",key:"trxid",render:function(t,e){return(0,F.jsx)("a",{onClick:function(){return D("/query/transaction?search=".concat(e.trxid,"&tab=summary"))},children:e.trxid.slice(0,8)})}}]}),[]),nt={data:_,xField:"day",xAxis:{type:"time",mask:"MM-DD"},yField:"value",meta:{value:{formatter:function(t){return(0,m.CE)(t.toFixed(0))}}},seriesField:"category",slider:{start:0,end:1},smooth:!0,label:{}},at={data:B,xField:"day",yField:"value",meta:{value:{formatter:function(t){return(0,m.CE)(t.toFixed(0))}}},seriesField:"category",slider:{start:0,end:1},smooth:!0,label:{}},rt={data:w,xField:"day",yField:"value",meta:{value:{formatter:function(t){return(0,m.CE)(t.toFixed(0))}}},seriesField:"category",slider:{start:0,end:1},smooth:!0,label:{}},it={data:P,xField:"day",xAxis:{type:"time",mask:"MM-DD"},yField:"value",meta:{value:{formatter:function(t){return(0,m.CE)(t.toFixed(0))}}},seriesField:"category",slider:{start:0,end:1},smooth:!0,label:{}},ct={data:U,xField:"day",yField:"value",meta:{value:{formatter:function(t){return(0,m.CE)(t.toFixed(0))}}},seriesField:"category",slider:{start:0,end:1},smooth:!0,label:{}},st={data:J,xField:"day",yField:"value",meta:{value:{formatter:function(t){return(0,m.CE)(t.toFixed(0))}}},seriesField:"category",slider:{start:0,end:1},smooth:!0,label:{}};return(0,F.jsxs)(f._z,{className:"jiuburn",ghost:!0,children:[(0,F.jsxs)(S.Z,{size:"large",spinning:l,children:[(0,F.jsx)(y.Z,{headerBordered:!0,headStyle:{justifyContent:"center"},className:"mb-3",children:(0,F.jsxs)(j.Z,{gutter:10,children:[(0,F.jsx)(Z.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,F.jsx)(p.Z,{layout:"center",statistic:{title:(0,F.jsx)("div",{className:"text-center",children:X}),value:"".concat((0,m.CE)(T.buyQuantityAmount.toFixed(0))+" "+T.buyQuantitySymbol)}})}),(0,F.jsx)(Z.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,F.jsx)(p.Z,{layout:"center",statistic:{title:(0,F.jsx)("div",{className:"text-center",children:V}),value:T.buyCount}})}),(0,F.jsx)(Z.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,F.jsx)(p.Z,{layout:"center",statistic:{title:(0,F.jsx)("div",{className:"text-center",children:K}),value:"".concat((0,m.CE)(T.burnQuantityAmount.toFixed(0))+" "+T.burnQuantitySymbol)}})}),(0,F.jsx)(Z.Z,{lg:{span:"6"},md:{span:"12"},sm:{span:"12"},xs:{span:"12"},children:(0,F.jsx)(p.Z,{layout:"center",statistic:{title:(0,F.jsx)("div",{className:"text-center",children:$}),value:T.burnCount}})})]})}),(0,F.jsx)(y.Z,{className:"mb-3",title:(0,F.jsx)("span",{className:" font-semibold",children:Q}),children:P.length?(0,F.jsx)(x.Z,r()(r()({},it),{},{loading:l})):(0,F.jsx)(v.Z,{image:v.Z.PRESENTED_IMAGE_SIMPLE})}),(0,F.jsx)(y.Z,{className:"mb-3",title:(0,F.jsx)("span",{className:" font-semibold",children:G}),children:U.length?(0,F.jsx)(x.Z,r()(r()({},ct),{},{loading:l})):(0,F.jsx)(v.Z,{image:v.Z.PRESENTED_IMAGE_SIMPLE})}),(0,F.jsx)(y.Z,{className:"mb-3",title:(0,F.jsx)("span",{className:" font-semibold",children:L}),children:J.length?(0,F.jsx)(x.Z,r()(r()({},st),{},{loading:l})):(0,F.jsx)(v.Z,{image:v.Z.PRESENTED_IMAGE_SIMPLE})}),(0,F.jsx)(y.Z,{className:"mb-3",title:(0,F.jsx)("span",{className:" font-semibold",children:W}),children:_.length?(0,F.jsx)(x.Z,r()(r()({},nt),{},{loading:l})):(0,F.jsx)(v.Z,{image:v.Z.PRESENTED_IMAGE_SIMPLE})}),(0,F.jsx)(y.Z,{className:"mb-3",title:(0,F.jsx)("span",{className:" font-semibold",children:Y}),children:B.length?(0,F.jsx)(x.Z,r()(r()({},at),{},{loading:l})):(0,F.jsx)(v.Z,{image:v.Z.PRESENTED_IMAGE_SIMPLE})}),(0,F.jsx)(y.Z,{className:"mb-3",title:(0,F.jsx)("span",{className:" font-semibold",children:H}),children:w.length?(0,F.jsx)(x.Z,r()(r()({},rt),{},{loading:l})):(0,F.jsx)(v.Z,{image:v.Z.PRESENTED_IMAGE_SIMPLE})})]}),(0,F.jsx)(h.Z,{className:"mb-3",scroll:{x:!0},size:"small",columns:et,dataSource:M,defaultData:[],search:!1,options:!1,pagination:{pageSize:100},tableAlertRender:!1,tableAlertOptionRender:!1,loading:{spinning:l,size:"large"}}),a]})}},15933:function(){}}]);