-
Notifications
You must be signed in to change notification settings - Fork 0
/
src__pages__PPP__AutoTrade.async.js
1 lines (1 loc) · 77.2 KB
/
src__pages__PPP__AutoTrade.async.js
1
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5457],{22452:function(e,r,t){var a=t(1413),n=t(91),s=t(62435),l=t(66758),o=t(56499),i=t(86074),c=["fieldProps","proFieldProps"],u="dateTime",m=s.forwardRef((function(e,r){var t=e.fieldProps,m=e.proFieldProps,d=(0,n.Z)(e,c),p=(0,s.useContext)(l.Z);return(0,i.jsx)(o.Z,(0,a.Z)({ref:r,fieldProps:(0,a.Z)({getPopupContainer:p.getPopupContainer},t),valueType:u,proFieldProps:m,filedConfig:{valueType:u,customLightMode:!0}},d))}));r.Z=m},64317:function(e,r,t){var a=t(1413),n=t(91),s=t(22270),l=t(62435),o=t(66758),i=t(56499),c=t(86074),u=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],m=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],d=function(e,r){var t=e.fieldProps,m=e.children,d=e.params,p=e.proFieldProps,f=e.mode,v=e.valueEnum,x=e.request,g=e.showSearch,b=e.options,h=(0,n.Z)(e,u),y=(0,l.useContext)(o.Z);return(0,c.jsx)(i.Z,(0,a.Z)((0,a.Z)({valueEnum:(0,s.h)(v),request:x,params:d,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,a.Z)({options:b,mode:f,showSearch:g,getPopupContainer:y.getPopupContainer},t),ref:r,proFieldProps:p},h),{},{children:m}))},p=l.forwardRef((function(e,r){var t=e.fieldProps,u=e.children,d=e.params,p=e.proFieldProps,f=e.mode,v=e.valueEnum,x=e.request,g=e.options,b=(0,n.Z)(e,m),h=(0,a.Z)({options:g,mode:f||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},t),y=(0,l.useContext)(o.Z);return(0,c.jsx)(i.Z,(0,a.Z)((0,a.Z)({valueEnum:(0,s.h)(v),request:x,params:d,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,a.Z)({getPopupContainer:y.getPopupContainer},h),ref:r,proFieldProps:p},b),{},{children:u}))})),f=l.forwardRef(d);f.SearchSelect=p,f.displayName="ProFormComponent",r.Z=f},67939:function(e,r,t){t.r(r);var a=t(19632),n=t.n(a),s=t(97857),l=t.n(s),o=t(15009),i=t.n(o),c=t(99289),u=t.n(c),m=t(5574),d=t.n(m),p=t(80059),f=t(75633),v=t(64119),x=t(87603),g=t(25035),b=t(98165),h=t(11774),y=t(38345),j=t(97269),T=t(64317),w=t(5966),k=t(31199),S=t(52688),Z=t(90672),N=t(22452),F=t(59530),I=t(80507),C=t(45360),P=t(83062),V=t(7134),O=t(15867),R=t(4393),_=t(84567),z=t(27484),L=t.n(z),Y=t(70178),q=t.n(Y),D=t(62435),M=t(51409),H=t(86074);L().extend(q());r.default=function(){var e=C.ZP.useMessage(),r=d()(e,2),t=r[0],a=r[1],s=(0,F.useSelector)((function(e){return e.global.contractKit})),o=(0,F.useSelector)((function(e){return e.global.account})),c=(0,F.useSelector)((function(e){return e.global.session})),m=(0,F.useSelector)((function(e){return e.global.privateKey})),z=(0,F.useSelector)((function(e){return e.ppp.vipAccounts})),Y=(0,F.useSelector)((function(e){return e.ppp.accessAccounts})),q=(0,f.N)(),E=(0,D.useState)(!1),$=d()(E,2),U=$[0],J=$[1],W=(0,D.useState)(!1),A=d()(W,2),B=A[0],K=A[1],Q=(0,D.useState)([]),G=d()(Q,2),X=G[0],ee=G[1],re=(0,D.useState)({}),te=d()(re,2),ae=te[0],ne=te[1],se=(0,D.useState)(!1),le=d()(se,2),oe=le[0],ie=le[1],ce=(0,D.useState)(!1),ue=d()(ce,2),me=ue[0],de=ue[1],pe=(0,D.useState)(null),fe=d()(pe,2),ve=fe[0],xe=fe[1],ge=(0,D.useState)(),be=d()(ge,2),he=be[0],ye=be[1],je=(0,D.useState)({buy:"买入",sell:"卖出"}),Te=d()(je,2),we=Te[0],ke=Te[1],Se=(0,D.useState)(""),Ze=d()(Se,2),Ne=Ze[0],Fe=Ze[1],Ie=(0,D.useState)(""),Ce=d()(Ie,2),Pe=Ce[0],Ve=Ce[1],Oe=(0,D.useState)(!1),Re=d()(Oe,2),_e=Re[0],ze=Re[1],Le=(0,D.useState)(!1),Ye=d()(Le,2),qe=Ye[0],De=Ye[1],Me=(0,D.useState)(null),He=d()(Me,2),Ee=He[0],$e=He[1],Ue=(0,D.useState)(),Je=d()(Ue,2),We=Je[0],Ae=Je[1],Be=(0,D.useState)({buy:"买入",sell:"卖出"}),Ke=d()(Be,2),Qe=Ke[0],Ge=Ke[1],Xe=(0,D.useState)(""),er=d()(Xe,2),rr=er[0],tr=er[1],ar=(0,D.useState)(0),nr=d()(ar,2),sr=nr[0],lr=nr[1],or=(0,D.useState)(""),ir=d()(or,2),cr=ir[0],ur=ir[1],mr=(0,D.useState)(!1),dr=d()(mr,2),pr=dr[0],fr=dr[1],vr=(0,D.useState)(!1),xr=d()(vr,2),gr=xr[0],br=xr[1],hr=(0,D.useState)(null),yr=d()(hr,2),jr=yr[0],Tr=yr[1],wr=(0,D.useState)(),kr=d()(wr,2),Sr=kr[0],Zr=kr[1],Nr=(0,D.useState)({buy:"买入",sell:"卖出"}),Fr=d()(Nr,2),Ir=Fr[0],Cr=Fr[1],Pr=(0,D.useState)(""),Vr=d()(Pr,2),Or=Vr[0],Rr=Vr[1],_r=(0,D.useState)(0),zr=d()(_r,2),Lr=zr[0],Yr=zr[1],qr=(0,D.useState)(""),Dr=d()(qr,2),Mr=Dr[0],Hr=Dr[1],Er=(0,D.useState)(!1),$r=d()(Er,2),Ur=$r[0],Jr=$r[1],Wr=(0,D.useState)(!1),Ar=d()(Wr,2),Br=Ar[0],Kr=Ar[1],Qr=(0,D.useState)(null),Gr=d()(Qr,2),Xr=Gr[0],et=Gr[1],rt=(0,D.useState)(),tt=d()(rt,2),at=tt[0],nt=tt[1],st=(0,D.useState)({buy:"买入",sell:"卖出"}),lt=d()(st,2),ot=lt[0],it=lt[1],ct=(0,D.useState)({buy:"买入",sell:"卖出"}),ut=d()(ct,2),mt=ut[0],dt=ut[1],pt=(0,D.useState)(""),ft=d()(pt,2),vt=ft[0],xt=ft[1],gt=(0,D.useState)(""),bt=d()(gt,2),ht=bt[0],yt=bt[1],jt=(0,D.useState)(""),Tt=d()(jt,2),wt=Tt[0],kt=Tt[1],St=(0,D.useState)(0),Zt=d()(St,2),Nt=Zt[0],Ft=Zt[1],It=(0,D.useState)(""),Ct=d()(It,2),Pt=Ct[0],Vt=Ct[1],Ot=(0,D.useState)(!1),Rt=d()(Ot,2),_t=Rt[0],zt=Rt[1],Lt=(0,D.useRef)(0),Yt=(0,D.useRef)(),qt=(0,D.useRef)(0),Dt=(0,D.useRef)(0),Mt=(0,D.useRef)(),Ht=(0,D.useRef)(!1),Et=(0,D.useRef)(""),$t=(0,D.useRef)(),Ut=(0,D.useRef)(),Jt=(0,D.useRef)(!1),Wt=(0,D.useRef)(""),At=(0,D.useRef)(),Bt=(0,D.useRef)(),Kt=(0,D.useRef)(!1),Qt=(0,D.useRef)(""),Gt=(0,D.useRef)(0),Xt=(0,D.useRef)(),ea=(0,D.useRef)(0),ra=(0,D.useRef)(0),ta=(0,D.useRef)(),aa=(0,D.useRef)(),na=(0,D.useRef)(!1),sa=(0,D.useRef)(!1),la=(0,D.useRef)(""),oa=(0,F.useIntl)(),ia=oa.formatMessage({id:"coffee.inputException"}),ca=oa.formatMessage({id:"common.intlPleaseConnectWallet"}),ua=oa.formatMessage({id:"common.intlPleaseConnectNetwork"}),ma=(0,D.useCallback)((function(){var e;Lt.current=0,null===(e=Yt.current)||void 0===e||e.resetFields(),(0,M.gr)(qt.current),(0,M.gr)(Dt.current),Mt.current=void 0,Ht.current=!1,Et.current="",ie(!1),de(!1),xe(null),ye(void 0),ke({}),Fe(""),Ve("")}),[]),da=(0,D.useCallback)((function(){var e;null===(e=$t.current)||void 0===e||e.resetFields(),Ut.current=void 0,Jt.current=!1,Wt.current="",ze(!1),De(!1),$e(null),Ae(void 0),Ge({}),tr(""),lr(0),ur("")}),[]),pa=(0,D.useCallback)((function(){var e;null===(e=At.current)||void 0===e||e.resetFields(),Bt.current=void 0,Kt.current=!1,Qt.current="",fr(!1),br(!1),Tr(null),Zr(void 0),Cr({}),Rr(""),Yr(0),Hr("")}),[]),fa=(0,D.useCallback)((function(){var e;Gt.current=0,null===(e=Xt.current)||void 0===e||e.resetFields(),(0,M.gr)(ea.current),(0,M.gr)(ra.current),ta.current=void 0,aa.current=void 0,na.current=!1,sa.current=!1,la.current="",Jr(!1),Kr(!1),et(null),nt(void 0),it({}),dt({}),xt(""),yt(""),kt(""),Ft(0),Vt("")}),[]),va=(0,D.useCallback)(function(){var e=u()(i()().mark((function e(r){var a,n,s,l,o,c,u,m,d,p,f,x;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,K(!0),e.next=4,r.load("swapswapswap");case 4:return a=e.sent,e.next=7,r.load("dfs3protocol");case 7:return n=e.sent,s=a.table("markets"),l=n.table("projects"),e.next=12,s.all();case 12:return o=e.sent,e.next=15,l.all();case 15:c=e.sent,u={},c.forEach((function(e){var r=e.max_token_supply.symbol.name;u[r]=e.token_url})),m=[],"usdtusdtusdt-USDT-8",p="eosio.token-DFS-8",f=[],(d={})["usdtusdtusdt-USDT-8"]=1,d[p]=(0,v.ri)(o[0].reserve0)/(0,v.ri)(o[0].reserve1),o.forEach((function(e){var r=e.contract0.toString(),t=e.contract1.toString(),a=r+"-"+e.sym0.name+"-"+e.sym0.precision,n=t+"-"+e.sym1.name+"-"+e.sym1.precision;m.includes(a)||m.push(a),m.includes(n)||m.push(n);var s=(0,v.ri)(e.reserve0),l=(0,v.ri)(e.reserve1);"eosio.token"===r?d.hasOwnProperty(n)||(d[n]=s/l*d[p]):"eosio.token"===t?d.hasOwnProperty(a)||(d[a]=l/s*d[p]):"usdtusdtusdt"===r?d.hasOwnProperty(n)||(d[n]=s/l):"usdtusdtusdt"===t?d.hasOwnProperty(a)||(d[a]=l/s):f.push({key0:a,key1:n,value0:s,value1:l})})),f.forEach((function(e){var r=e.key0,t=e.key1,a=e.value0,n=e.value1;d.hasOwnProperty(r)&&!d.hasOwnProperty(t)?d[t]=a/n*d[r]:!d.hasOwnProperty(r)&&d.hasOwnProperty(t)?d[r]=n/a*d[t]:d.hasOwnProperty(r)||d.hasOwnProperty(t)||(d[r]=0,d[t]=0)})),Object.keys(d).forEach((function(e){Number.isNaN(d[e])&&(d[e]=0)})),o.sort((function(e,r){var t=e.contract0.toString(),a=e.contract1.toString(),n=r.contract0.toString(),s=r.contract1.toString(),l=e.sym0.name,o=e.sym1.name,i=r.sym0.name,c=r.sym1.name,u=t+"-"+l+"-"+e.sym0.precision,m=a+"-"+o+"-"+e.sym1.precision,p=n+"-"+i+"-"+r.sym0.precision,f=s+"-"+c+"-"+r.sym1.precision,x=(0,v.ri)(e.reserve0),g=(0,v.ri)(e.reserve1),b=(0,v.ri)(r.reserve0),h=(0,v.ri)(r.reserve1),y=x*d[u]+g*d[m];return b*d[p]+h*d[f]-y})),x={},o.forEach((function(e){var r=e.mid.toNumber(),t=e.contract0.toString(),a=e.contract1.toString(),n=e.sym0.name,s=e.sym1.name,l=e.sym0.precision,o=e.sym1.precision,i=e.reserve0.toString(),c=e.reserve1.toString(),m="".concat(a,"-").concat(s),d="dfsppptokens"===a?u[s]:"https://dfs.land/assets/tokens/".concat(m,".png");"USDT"===n&&"DFS"!==s||(x["swap-".concat(r)]="".concat(r,"_").concat(t,"_").concat(n,"_").concat(l,"_").concat(i,"_").concat(a,"_").concat(s,"_").concat(o,"_").concat(c,"_").concat(d))})),ne(x),ee(o),K(!1),e.next=40;break;case 36:e.prev=36,e.t0=e.catch(0),K(!1),(0,v.Tv)(e.t0,t,"handleValueEnum");case 40:case"end":return e.stop()}}),e,null,[[0,36]])})));return function(r){return e.apply(this,arguments)}}(),[]),xa=(0,D.useCallback)((function(e){var r,t=L()().format("MM-DDTHH:mm:ss"),a="[".concat(t,"]: ").concat(e,"\n");Et.current=a+Et.current,null===(r=Yt.current)||void 0===r||r.setFieldValue("logTx",Et.current),q()}),[q]),ga=(0,D.useCallback)((function(e){var r,t=L()().format("MM-DDTHH:mm:ss"),a="[".concat(t,"]: ").concat(e,"\n");Wt.current=a+Wt.current,null===(r=$t.current)||void 0===r||r.setFieldValue("logTime",Wt.current),q()}),[q]),ba=(0,D.useCallback)((function(e){var r,t=L()().format("MM-DDTHH:mm:ss"),a="[".concat(t,"]: ").concat(e,"\n");Qt.current=a+Qt.current,null===(r=At.current)||void 0===r||r.setFieldValue("logInterval",Qt.current),q()}),[q]),ha=(0,D.useCallback)((function(e){var r,t=L()().format("MM-DDTHH:mm:ss"),a="[".concat(t,"]: ").concat(e,"\n");la.current=a+la.current,null===(r=Xt.current)||void 0===r||r.setFieldValue("logIntervalTx",la.current),q()}),[q]),ya=(0,D.useCallback)((function(){Ht.current=!1,(0,M.gr)(qt.current),(0,M.gr)(Dt.current),xa("停止监控")}),[xa]),ja=(0,D.useCallback)((function(){Jt.current=!1,ur(""),lr(0),ga("停止运行")}),[ga]),Ta=(0,D.useCallback)((function(){Kt.current=!1,Hr(""),Yr(0),ba("停止运行")}),[ba]),wa=(0,D.useCallback)((function(){na.current=!1,Vt(""),Ft(0),ha("间隔交易停止运行")}),[ha]),ka=(0,D.useCallback)((function(){sa.current=!1,(0,M.gr)(ea.current),(0,M.gr)(ra.current),ha("大单交易停止运行")}),[ha]),Sa=(0,D.useCallback)((function(){wa(),ka()}),[wa,ka]),Za=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,l,u,m,d,p,f,x,g,b,h,y,j,T,w,k;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(r=Yt.current)||void 0===r?void 0:r.getFieldValue("midTx"),!o||!a){e.next=32;break}return e.prev=2,s=a.split("-")[1],de(!0),l=X.filter((function(e){return e.mid.toString()===s}))[0],u=l.contract0.toString(),m=l.contract1.toString(),d=l.reserve0.symbol.name,p=l.reserve1.symbol.name,f=l.reserve0.symbol.precision,x=l.reserve1.symbol.precision,g=o.accountName.toString(),e.next=15,c.client.v1.chain.get_currency_balance(u,g,d);case 15:return b=e.sent,e.next=18,c.client.v1.chain.get_currency_balance(m,g,p);case 18:h=e.sent,y="",h.length?(y+=h[0].toString(),T=h[0]):(w=I.xR.from(0,I.xR.Symbol.fromParts(p,x)),y+=w.toString(),T=w),y+=" / ",b.length?(y+=b[0].toString(),j=b[0]):(k=I.xR.from(0,I.xR.Symbol.fromParts(d,f)),y+=k.toString(),j=k),null===(n=Yt.current)||void 0===n||n.setFieldValue("balanceTx",y),ye({asset0:j,asset1:T}),de(!1),e.next=32;break;case 28:e.prev=28,e.t0=e.catch(2),de(!1),(0,v.Tv)(e.t0,t,"handleUpdateBalanceTx");case 32:case"end":return e.stop()}}),e,null,[[2,28]])}))),[o,X,t]),Na=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,l,u,m,d,p,f,x,g,b,h,y,j,T,w,k;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(r=$t.current)||void 0===r?void 0:r.getFieldValue("midTime"),!o||!a){e.next=32;break}return e.prev=2,s=a.split("-")[1],De(!0),l=X.filter((function(e){return e.mid.toString()===s}))[0],u=l.contract0.toString(),m=l.contract1.toString(),d=l.reserve0.symbol.name,p=l.reserve1.symbol.name,f=l.reserve0.symbol.precision,x=l.reserve1.symbol.precision,g=o.accountName.toString(),e.next=15,c.client.v1.chain.get_currency_balance(u,g,d);case 15:return b=e.sent,e.next=18,c.client.v1.chain.get_currency_balance(m,g,p);case 18:h=e.sent,y="",h.length?(y+=h[0].toString(),T=h[0]):(w=I.xR.from(0,I.xR.Symbol.fromParts(p,x)),y+=w.toString(),T=w),y+=" / ",b.length?(y+=b[0].toString(),j=b[0]):(k=I.xR.from(0,I.xR.Symbol.fromParts(d,f)),y+=k.toString(),j=k),null===(n=$t.current)||void 0===n||n.setFieldValue("balanceTime",y),Ae({asset0:j,asset1:T}),De(!1),e.next=32;break;case 28:e.prev=28,e.t0=e.catch(2),De(!1),(0,v.Tv)(e.t0,t,"handleUpdateBalanceTime");case 32:case"end":return e.stop()}}),e,null,[[2,28]])}))),[o,X,t]),Fa=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,l,u,m,d,p,f,x,g,b,h,y,j,T,w,k;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(r=At.current)||void 0===r?void 0:r.getFieldValue("midInterval"),!o||!a){e.next=32;break}return e.prev=2,s=a.split("-")[1],br(!0),l=X.filter((function(e){return e.mid.toString()===s}))[0],u=l.contract0.toString(),m=l.contract1.toString(),d=l.reserve0.symbol.name,p=l.reserve1.symbol.name,f=l.reserve0.symbol.precision,x=l.reserve1.symbol.precision,g=o.accountName.toString(),e.next=15,c.client.v1.chain.get_currency_balance(u,g,d);case 15:return b=e.sent,e.next=18,c.client.v1.chain.get_currency_balance(m,g,p);case 18:h=e.sent,y="",h.length?(y+=h[0].toString(),T=h[0]):(w=I.xR.from(0,I.xR.Symbol.fromParts(p,x)),y+=w.toString(),T=w),y+=" / ",b.length?(y+=b[0].toString(),j=b[0]):(k=I.xR.from(0,I.xR.Symbol.fromParts(d,f)),y+=k.toString(),j=k),null===(n=At.current)||void 0===n||n.setFieldValue("balanceInterval",y),Zr({asset0:j,asset1:T}),br(!1),e.next=32;break;case 28:e.prev=28,e.t0=e.catch(2),br(!1),(0,v.Tv)(e.t0,t,"handleUpdateBalanceInterval");case 32:case"end":return e.stop()}}),e,null,[[2,28]])}))),[o,X,t]),Ia=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,l,u,m,d,p,f,x,g,b,h,y,j,T,w,k,S,Z,N,F;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=null===(r=Xt.current)||void 0===r?void 0:r.getFieldsValue(),n=a.midIntervalTx,s=a.triggerOperateIntervalTx1,!o||!n){e.next=33;break}return e.prev=2,u=n.split("-")[1],Kr(!0),m=X.filter((function(e){return e.mid.toString()===u}))[0],d=m.contract0.toString(),p=m.contract1.toString(),f=m.reserve0.symbol.name,x=m.reserve1.symbol.name,g=m.reserve0.symbol.precision,b=m.reserve1.symbol.precision,h=o.accountName.toString(),e.next=15,c.client.v1.chain.get_currency_balance(d,h,f);case 15:return y=e.sent,e.next=18,c.client.v1.chain.get_currency_balance(p,h,x);case 18:j=e.sent,T="",j.length?(T+=j[0].toString(),k=j[0]):(S=I.xR.from(0,I.xR.Symbol.fromParts(x,b)),T+=S.toString(),k=S),T+=" / ",y.length?(T+=y[0].toString(),w=y[0]):(Z=I.xR.from(0,I.xR.Symbol.fromParts(f,g)),T+=Z.toString(),w=Z),_t&&s&&("buy"===s?null===(N=Xt.current)||void 0===N||N.setFieldValue("operateNumberIntervalTx1",w.value):null===(F=Xt.current)||void 0===F||F.setFieldValue("operateNumberIntervalTx1",k.value)),null===(l=Xt.current)||void 0===l||l.setFieldValue("balanceIntervalTx",T),nt({asset0:w,asset1:k}),Kr(!1),e.next=33;break;case 29:e.prev=29,e.t0=e.catch(2),Kr(!1),(0,v.Tv)(e.t0,t,"handleUpdateBalanceIntervalTx");case 33:case"end":return e.stop()}}),e,null,[[2,29]])}))),[o,X,t,_t]),Ca=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,s,u,p,f,x,g,b,h,y,j,T,w,k,S,Z,N,F,C,P,V,O,R,_,Y,q,D,H,E,$,U,J,W,A,B,K,Q,G,X,ee;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(0,M.gr)(qt.current),Ht.current){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Za();case 6:if(xa("创建交易"),c&&c.broadcast){e.next=14;break}return t.error("".concat(ca)),xa("".concat(ca)),ya(),e.abrupt("return");case 14:if(o){e.next=19;break}return t.error("".concat(ua)),xa("".concat(ua)),ya(),e.abrupt("return");case 19:if("owner"===(a=c.permissionLevel.permission.toString())||"active"===a){e.next=25;break}return t.error("permission权限必须是owner或者active"),xa("permission权限必须是owner或者active"),ya(),e.abrupt("return");case 25:for(ie(!0),s=null===(r=Yt.current)||void 0===r?void 0:r.getFieldsValue(),u=s.midTx,p=s.triggerOperateTx,f=s.operateNumberTx,x=s.splitTx,b=(g=he).asset0,h=g.asset1,y=c.actor.toString(),j=null==ve?void 0:ve.contract0.toString(),T=null==ve?void 0:ve.contract1.toString(),w=z.includes(y)?0:.003*f,Z=null,N="","buy"===p?(f>b.value&&(t.error("".concat(b.symbol.name,"余额不足")),xa("".concat(b.symbol.name,"余额不足"))),N=j,Z=I.xR.from(w,b.symbol),k=f-w,S=b.symbol):"sell"===p&&(f>h.value&&(t.error("".concat(h.symbol.name,"余额不足")),xa("".concat(b.symbol.name,"余额不足"))),N=T,Z=I.xR.from(w,h.symbol),k=f-w,S=h.symbol),F="swap:".concat(u.split("-")[1],":0"),C=[],P=[],V=0,O=0;O<x;++O)R=k/x*(Math.random()+1/x),O===x-1?R=k-V:V+=R,_={account:N,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:y,to:"swapswapswap",quantity:I.xR.from(R,S),memo:F})},Y=I.aU.from(_),C.push(Y),P.push(_);return q={account:N,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:y,to:"davidaccount",quantity:Z,memo:"swap fee"})},D=I.aU.from(q),H={account:"dfsfreecpu11",name:"freecpu",authorization:[{actor:"dfs.service",permission:"cpu"},c.permissionLevel],data:v._9.from({user:y})},E=I.aU.from(H),e.next=46,c.client.v1.chain.get_info();case 46:return $=e.sent,U=$.getTransactionHeader(),J=L()().add(3600,"seconds").utc().format("YYYY-MM-DDTHH:mm:ss"),B=[],K=z.includes(y)?[E].concat(C):[E].concat(C,[D]),W=I.YW.from(l()(l()({},U),{},{expiration:J,actions:K})),B[0]=m.signDigest(W.signingDigest(c.chain.id.toString())),e.next=55,(0,v.zI)(c.transact({transaction:W},{broadcast:!1,transactPlugins:[]}));case 55:if(Q=e.sent,G=d()(Q,2),X=G[0],ee=G[1],!X){e.next=65;break}return t.error(X),ie(!1),xa(X),ya(),e.abrupt("return");case 65:A=I.uQ.from(l()(l()({},W),{},{signatures:[].concat(B,n()(ee.signatures))})),Mt.current=A,ie(!1),z.includes(y)?xa(JSON.stringify([H].concat(P))):xa(JSON.stringify([H].concat(P,[q]))),qt.current=(0,M.iK)(Ca,3e6),e.next=78;break;case 72:e.prev=72,e.t0=e.catch(0),ie(!1),(0,v.Tv)(e.t0,t,"handleCreateTransactionTx"),xa(e.t0),ya();case 78:case"end":return e.stop()}}),e,null,[[0,72]])}))),[c,o,ve,he,v.Tv,xa,Za,ya]),Pa=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,s,u,p,f,x,g,b,h,y,j,T,w,k,S,Z,N,F,C,P,V,O,R,_,Y,q,D,M,H,E,$,U,J,W,A,B,K,Q,G,X;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,Jt.current){e.next=3;break}return e.abrupt("return");case 3:if(ga("创建交易"),c&&c.broadcast){e.next=11;break}return t.error("".concat(ca)),ga("".concat(ca)),ja(),e.abrupt("return");case 11:if(o){e.next=16;break}return t.error("".concat(ua)),ga("".concat(ua)),ja(),e.abrupt("return");case 16:if("owner"===(a=c.permissionLevel.permission.toString())||"active"===a){e.next=22;break}return t.error("permission权限必须是owner或者active"),ga("permission权限必须是owner或者active"),ja(),e.abrupt("return");case 22:for(ze(!0),s=null===(r=$t.current)||void 0===r?void 0:r.getFieldsValue(),u=s.midTime,p=s.triggerOperateTime,f=s.operateNumberTime,x=s.splitTime,b=(g=We).asset0,h=g.asset1,y=c.actor.toString(),j=null==Ee?void 0:Ee.contract0.toString(),T=null==Ee?void 0:Ee.contract1.toString(),w=z.includes(y)?0:.003*f,Z=null,N="","buy"===p?(f>b.value&&(t.error("".concat(b.symbol.name,"余额不足")),ga("".concat(b.symbol.name,"余额不足"))),N=j,Z=I.xR.from(w,b.symbol),k=f-w,S=b.symbol):"sell"===p&&(f>h.value&&(t.error("".concat(h.symbol.name,"余额不足")),ga("".concat(b.symbol.name,"余额不足"))),N=T,Z=I.xR.from(w,h.symbol),k=f-w,S=h.symbol),F="swap:".concat(u.split("-")[1],":0"),C=[],P=[],V=0,O=0;O<x;++O)R=k/x*(Math.random()+1/x),O===x-1?R=1===x?k:k-V:V+=R,_={account:N,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:y,to:"swapswapswap",quantity:I.xR.from(R,S),memo:F})},Y=I.aU.from(_),C.push(Y),P.push(_);return q={account:N,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:y,to:"davidaccount",quantity:Z,memo:"swap fee"})},D=I.aU.from(q),M={account:"dfsfreecpu11",name:"freecpu",authorization:[{actor:"dfs.service",permission:"cpu"},c.permissionLevel],data:v._9.from({user:y})},H=I.aU.from(M),e.next=43,c.client.v1.chain.get_info();case 43:return E=e.sent,$=E.getTransactionHeader(),U=L()().add(3600,"seconds").utc().format("YYYY-MM-DDTHH:mm:ss"),A=[],B=z.includes(y)?[H].concat(C):[H].concat(C,[D]),J=I.YW.from(l()(l()({},$),{},{expiration:U,actions:B})),A[0]=m.signDigest(J.signingDigest(c.chain.id.toString())),e.next=52,(0,v.zI)(c.transact({transaction:J},{broadcast:!1,transactPlugins:[]}));case 52:if(K=e.sent,Q=d()(K,2),G=Q[0],X=Q[1],!G){e.next=62;break}return t.error(G),ze(!1),ga(G),ja(),e.abrupt("return");case 62:W=I.uQ.from(l()(l()({},J),{},{signatures:[].concat(A,n()(X.signatures))})),Ut.current=W,ze(!1),ga(JSON.stringify([M].concat(P,[q]))),e.next=74;break;case 68:e.prev=68,e.t0=e.catch(0),ze(!1),(0,v.Tv)(e.t0,t,"handleCreateTransactionTime"),ga(e.t0),ja();case 74:case"end":return e.stop()}}),e,null,[[0,68]])}))),[c,o,Ee,We,v.Tv,ga,ja]),Va=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,s,u,p,f,x,g,b,h,y,j,T,w,k,S,Z,N,F,C,P,V,O,R,_,Y,q,D,M,H,E,$,U,J,W,A,B,K,Q,G,X,ee;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,Kt.current){e.next=3;break}return e.abrupt("return");case 3:if(ba("创建交易"),c&&c.broadcast){e.next=11;break}return t.error("".concat(ca)),ba("".concat(ca)),Ta(),e.abrupt("return");case 11:if(o){e.next=16;break}return t.error("".concat(ua)),ba("".concat(ua)),Ta(),e.abrupt("return");case 16:if("owner"===(a=c.permissionLevel.permission.toString())||"active"===a){e.next=22;break}return t.error("permission权限必须是owner或者active"),ba("permission权限必须是owner或者active"),Ta(),e.abrupt("return");case 22:for(fr(!0),s=null===(r=At.current)||void 0===r?void 0:r.getFieldsValue(),u=s.midInterval,p=s.triggerOperateInterval,f=s.operateNumberInterval,x=s.splitInterval,g=s.existInterval,h=(b=Sr).asset0,y=b.asset1,j=c.actor.toString(),T=null==jr?void 0:jr.contract0.toString(),w=null==jr?void 0:jr.contract1.toString(),k=z.includes(j)?0:.003*f,N=null,F="","buy"===p?(f>h.value&&(t.error("".concat(h.symbol.name,"余额不足")),ba("".concat(h.symbol.name,"余额不足")),g&&Ta()),F=T,N=I.xR.from(k,h.symbol),S=f-k,Z=h.symbol):"sell"===p&&(f>y.value&&(t.error("".concat(y.symbol.name,"余额不足")),ba("".concat(h.symbol.name,"余额不足")),g&&Ta()),F=w,N=I.xR.from(k,y.symbol),S=f-k,Z=y.symbol),C="swap:".concat(u.split("-")[1],":0"),P=[],V=[],O=0,R=0;R<x;++R)_=S/x*(Math.random()+1/x),R===x-1?_=1===x?S:S-O:O+=_,Y={account:F,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:j,to:"swapswapswap",quantity:I.xR.from(_,Z),memo:C})},q=I.aU.from(Y),P.push(q),V.push(Y);return D={account:F,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:j,to:"davidaccount",quantity:N,memo:"swap fee"})},M=I.aU.from(D),H={account:"dfsfreecpu11",name:"freecpu",authorization:[{actor:"dfs.service",permission:"cpu"},c.permissionLevel],data:v._9.from({user:j})},E=I.aU.from(H),e.next=43,c.client.v1.chain.get_info();case 43:return $=e.sent,U=$.getTransactionHeader(),J=L()().add(3600,"seconds").utc().format("YYYY-MM-DDTHH:mm:ss"),B=[],K=z.includes(j)?[E].concat(P):[E].concat(P,[M]),W=I.YW.from(l()(l()({},U),{},{expiration:J,actions:K})),B[0]=m.signDigest(W.signingDigest(c.chain.id.toString())),e.next=52,(0,v.zI)(c.transact({transaction:W},{broadcast:!1,transactPlugins:[]}));case 52:if(Q=e.sent,G=d()(Q,2),X=G[0],ee=G[1],!X){e.next=62;break}return t.error(X),fr(!1),ba(X),Ta(),e.abrupt("return");case 62:A=I.uQ.from(l()(l()({},W),{},{signatures:[].concat(B,n()(ee.signatures))})),Bt.current=A,fr(!1),ba(JSON.stringify([H].concat(V,[D]))),e.next=74;break;case 68:e.prev=68,e.t0=e.catch(0),fr(!1),(0,v.Tv)(e.t0,t,"handleCreateTransactionInterval"),ba(e.t0),Ta();case 74:case"end":return e.stop()}}),e,null,[[0,68]])}))),[c,o,jr,Sr,v.Tv,ba,Ta]),Oa=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,s,u,p,f,x,g,b,h,y,j,T,w,k,S,Z,N,F,C,P,V,O,R,_,Y,q,D,M,H,E,$,U,J,W,A,B,K,Q,G,X,ee;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,na.current){e.next=3;break}return e.abrupt("return");case 3:if(ha("创建交易"),c&&c.broadcast){e.next=11;break}return t.error("".concat(ca)),ha("".concat(ca)),wa(),e.abrupt("return");case 11:if(o){e.next=16;break}return t.error("".concat(ua)),ha("".concat(ua)),wa(),e.abrupt("return");case 16:if("owner"===(a=c.permissionLevel.permission.toString())||"active"===a){e.next=22;break}return t.error("permission权限必须是owner或者active"),ha("permission权限必须是owner或者active"),wa(),e.abrupt("return");case 22:for(Jr(!0),s=null===(r=Xt.current)||void 0===r?void 0:r.getFieldsValue(),u=s.midIntervalTx,p=s.triggerOperateIntervalTx0,f=s.operateNumberIntervalTx0,x=s.splitIntervalTx0,g=s.existIntervalTx0,h=(b=at).asset0,y=b.asset1,j=c.actor.toString(),T=null==Xr?void 0:Xr.contract0.toString(),w=null==Xr?void 0:Xr.contract1.toString(),k=z.includes(j)?0:.003*f,N=null,F="","buy"===p?(f>h.value&&(t.error("".concat(h.symbol.name,"余额不足")),ha("".concat(h.symbol.name,"余额不足")),g&&wa()),F=T,N=I.xR.from(k,h.symbol),S=f-k,Z=h.symbol):"sell"===p&&(f>y.value&&(t.error("".concat(y.symbol.name,"余额不足")),ha("".concat(h.symbol.name,"余额不足")),g&&wa()),F=w,N=I.xR.from(k,y.symbol),S=f-k,Z=y.symbol),C="swap:".concat(u.split("-")[1],":0"),P=[],V=[],O=0,R=0;R<x;++R)_=S/x*(Math.random()+1/x),R===x-1?_=1===x?S:S-O:O+=_,Y={account:F,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:j,to:"swapswapswap",quantity:I.xR.from(_,Z),memo:C})},q=I.aU.from(Y),P.push(q),V.push(Y);return D={account:F,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:j,to:"davidaccount",quantity:N,memo:"swap fee"})},M=I.aU.from(D),H={account:"dfsfreecpu11",name:"freecpu",authorization:[{actor:"dfs.service",permission:"cpu"},c.permissionLevel],data:v._9.from({user:j})},E=I.aU.from(H),e.next=43,c.client.v1.chain.get_info();case 43:return $=e.sent,U=$.getTransactionHeader(),J=L()().add(3600,"seconds").utc().format("YYYY-MM-DDTHH:mm:ss"),B=[],K=z.includes(j)?[E].concat(P):[E].concat(P,[M]),W=I.YW.from(l()(l()({},U),{},{expiration:J,actions:K})),B[0]=m.signDigest(W.signingDigest(c.chain.id.toString())),e.next=52,(0,v.zI)(c.transact({transaction:W},{broadcast:!1,transactPlugins:[]}));case 52:if(Q=e.sent,G=d()(Q,2),X=G[0],ee=G[1],!X){e.next=62;break}return t.error(X),Jr(!1),ha(X),wa(),e.abrupt("return");case 62:A=I.uQ.from(l()(l()({},W),{},{signatures:[].concat(B,n()(ee.signatures))})),ta.current=A,Jr(!1),ha(JSON.stringify([H].concat(V,[D]))),e.next=74;break;case 68:e.prev=68,e.t0=e.catch(0),Jr(!1),(0,v.Tv)(e.t0,t,"handleCreateTransactionIntervalTx0"),ha(e.t0),wa();case 74:case"end":return e.stop()}}),e,null,[[0,68]])}))),[c,o,Xr,at,v.Tv,ha,wa]),Ra=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,s,u,p,f,x,g,b,h,y,j,T,w,k,S,Z,N,F,C,P,V,O,R,_,Y,q,D,H,E,$,U,J,W,A,B,K,Q,G,X,ee;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(0,M.gr)(ea.current),sa.current){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,Ia();case 6:if(ha("创建交易"),c&&c.broadcast){e.next=14;break}return t.error("".concat(ca)),ha("".concat(ca)),ka(),e.abrupt("return");case 14:if(o){e.next=19;break}return t.error("".concat(ua)),ha("".concat(ua)),ka(),e.abrupt("return");case 19:if("owner"===(a=c.permissionLevel.permission.toString())||"active"===a){e.next=25;break}return t.error("permission权限必须是owner或者active"),ha("permission权限必须是owner或者active"),ka(),e.abrupt("return");case 25:for(Jr(!0),s=null===(r=Xt.current)||void 0===r?void 0:r.getFieldsValue(),u=s.midIntervalTx,p=s.triggerOperateIntervalTx1,f=s.operateNumberIntervalTx1,x=s.splitIntervalTx1,b=(g=at).asset0,h=g.asset1,y=c.actor.toString(),j=null==Xr?void 0:Xr.contract0.toString(),T=null==Xr?void 0:Xr.contract1.toString(),w=z.includes(y)?0:.003*f,Z=null,N="","buy"===p?(f>b.value&&(t.error("".concat(b.symbol.name,"余额不足")),ha("".concat(b.symbol.name,"余额不足"))),N=j,Z=I.xR.from(w,b.symbol),k=f-w,S=b.symbol):"sell"===p&&(f>h.value&&(t.error("".concat(h.symbol.name,"余额不足")),ha("".concat(b.symbol.name,"余额不足"))),N=T,Z=I.xR.from(w,h.symbol),k=f-w,S=h.symbol),F="swap:".concat(u.split("-")[1],":0"),C=[],P=[],V=0,O=0;O<x;++O)R=k/x*(Math.random()+1/x),O===x-1?R=k-V:V+=R,_={account:N,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:y,to:"swapswapswap",quantity:I.xR.from(R,S),memo:F})},Y=I.aU.from(_),C.push(Y),P.push(_);return q={account:N,name:"transfer",authorization:[c.permissionLevel],data:v.FE.from({from:y,to:"davidaccount",quantity:Z,memo:"swap fee"})},D=I.aU.from(q),H={account:"dfsfreecpu11",name:"freecpu",authorization:[{actor:"dfs.service",permission:"cpu"},c.permissionLevel],data:v._9.from({user:y})},E=I.aU.from(H),e.next=46,c.client.v1.chain.get_info();case 46:return $=e.sent,U=$.getTransactionHeader(),J=L()().add(3600,"seconds").utc().format("YYYY-MM-DDTHH:mm:ss"),B=[],K=z.includes(y)?[E].concat(C):[E].concat(C,[D]),W=I.YW.from(l()(l()({},U),{},{expiration:J,actions:K})),B[0]=m.signDigest(W.signingDigest(c.chain.id.toString())),e.next=55,(0,v.zI)(c.transact({transaction:W},{broadcast:!1,transactPlugins:[]}));case 55:if(Q=e.sent,G=d()(Q,2),X=G[0],ee=G[1],!X){e.next=65;break}return t.error(X),Jr(!1),ha(X),ka(),e.abrupt("return");case 65:A=I.uQ.from(l()(l()({},W),{},{signatures:[].concat(B,n()(ee.signatures))})),aa.current=A,Jr(!1),z.includes(y)?ha(JSON.stringify([H].concat(P))):ha(JSON.stringify([H].concat(P,[q]))),ea.current=(0,M.iK)(Ra,3e6),e.next=78;break;case 72:e.prev=72,e.t0=e.catch(0),Jr(!1),(0,v.Tv)(e.t0,t,"handleCreateTransactionIntervalTx1"),ha(e.t0),ka();case 78:case"end":return e.stop()}}),e,null,[[0,72]])}))),[c,o,ve,he,v.Tv,ha,Ia,ka]),_a=(0,D.useCallback)(u()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ht.current){e.next=2;break}return e.abrupt("return");case 2:return xa("发送交易"),e.abrupt("return",c.client.v1.chain.push_transaction(Mt.current).then((function(e){e&&e.processed&&"executed"===e.processed.receipt.status?xa("交易成功"):xa("交易失败")})).catch((function(e){if(e instanceof Error){if(e.message.includes("eosio_assert_message assertion failure")){var r=e.details[0].message;xa(r)}}else xa(e)})));case 4:case"end":return e.stop()}}),e)}))),[c,xa]),za=(0,D.useCallback)(u()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Jt.current){e.next=2;break}return e.abrupt("return");case 2:return ga("发送交易"),e.abrupt("return",c.client.v1.chain.push_transaction(Ut.current).then((function(e){e&&e.processed&&"executed"===e.processed.receipt.status?ga("交易成功"):ga("交易失败")})).catch((function(e){if(e instanceof Error){if(e.message.includes("eosio_assert_message assertion failure")){var r=e.details[0].message;ga(r)}}else ga(e)})));case 4:case"end":return e.stop()}}),e)}))),[c,ga]),La=(0,D.useCallback)(u()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Kt.current){e.next=2;break}return e.abrupt("return");case 2:return ba("发送交易"),e.abrupt("return",c.client.v1.chain.push_transaction(Bt.current).then((function(e){e&&e.processed&&"executed"===e.processed.receipt.status?ba("交易成功"):ba("交易失败")})).catch((function(e){if(e instanceof Error){if(e.message.includes("eosio_assert_message assertion failure")){var r=e.details[0].message;ba(r)}}else ba(e)})));case 4:case"end":return e.stop()}}),e)}))),[c,ba]),Ya=(0,D.useCallback)(u()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(na.current){e.next=2;break}return e.abrupt("return");case 2:return ha("发送交易"),e.abrupt("return",c.client.v1.chain.push_transaction(ta.current).then((function(e){e&&e.processed&&"executed"===e.processed.receipt.status?ha("交易成功"):ha("交易失败")})).catch((function(e){if(e instanceof Error){if(e.message.includes("eosio_assert_message assertion failure")){var r=e.details[0].message;ha(r)}}else ha(e)})));case 4:case"end":return e.stop()}}),e)}))),[c,ha]),qa=(0,D.useCallback)(u()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(sa.current){e.next=2;break}return e.abrupt("return");case 2:return ha("发送交易"),e.abrupt("return",c.client.v1.chain.push_transaction(aa.current).then((function(e){e&&e.processed&&"executed"===e.processed.receipt.status?ha("交易成功"):ha("交易失败")})).catch((function(e){if(e instanceof Error){if(e.message.includes("eosio_assert_message assertion failure")){var r=e.details[0].message;ha(r)}}else ha(e)})));case 4:case"end":return e.stop()}}),e)}))),[c,ha]),Da=(0,D.useCallback)((function(e,r){var t=e.filter((function(e){return e.id>r}));if(t.length){for(var a=0;a<t.length;++a)t[a].create_time=L().utc(t[a].create_time).local().format("MM-DDTHH:mm:ss");xa(JSON.stringify(t))}}),[xa]),Ma=(0,D.useCallback)((function(e,r){var t=e.filter((function(e){return e.id>r}));if(t.length){for(var a=0;a<t.length;++a)t[a].create_time=L().utc(t[a].create_time).local().format("MM-DDTHH:mm:ss");ha(JSON.stringify(t))}}),[ha]),Ha=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,l,u,m,d,p,f,x,g,b,h,y,j,T,w,k,S;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,Ht.current){e.next=3;break}return e.abrupt("return");case 3:return xa("监控交易"),a=null===(r=Yt.current)||void 0===r?void 0:r.getFieldsValue(),n=a.midTx,s=a.triggerConditionTx,l=a.triggerNumberTx,u=a.intervalTx,m=a.loopTx,d=a.limitTx,p=null==ve?void 0:ve.sym0.name,f=null==ve?void 0:ve.sym1.name,e.next=9,c.client.v1.chain.get_table_rows({code:"loglogloglog",table:"logs",scope:"loglogloglog",key_type:"i64",index_position:"secondary",lower_bound:I.zM.from(n.split("-")[1]),upper_bound:I.zM.from(n.split("-")[1]),limit:d,reverse:!0});case 9:if(x=e.sent,g=x.rows,b=g[0].id,h=0,y=!1,Lt.current){e.next=18;break}return Lt.current=b,Ha(),e.abrupt("return");case 18:j=0;case 19:if(!(j<g.length)){e.next=35;break}if(T=g[j].id,w=g[j].user,k=I.xR.from(g[j].in),S=I.xR.from(g[j].out),w!==o.accountName.toString()){e.next=26;break}return e.abrupt("continue",32);case 26:if(T!==Lt.current){e.next=31;break}return y=!0,e.abrupt("break",35);case 31:"buy"===s?k.symbol.name===p?h+=k.value:h-=S.value:"sell"===s&&(k.symbol.name===f?h+=k.value:h-=S.value);case 32:++j,e.next=19;break;case 35:if(Ht.current){e.next=37;break}return e.abrupt("return");case 37:if(!(y&&h>=l)){e.next=54;break}return e.next=40,_a();case 40:if(Da(g,Lt.current),xa("交易结束"),!m){e.next=49;break}return Lt.current=b,e.next=46,Ca();case 46:Ha(),e.next=51;break;case 49:xa("监控结束"),ya();case 51:Za(),e.next=57;break;case 54:Da(g,Lt.current),Lt.current=b,Dt.current=(0,M.iK)(Ha,1e3*u);case 57:e.next=64;break;case 59:e.prev=59,e.t0=e.catch(0),(0,v.Tv)(e.t0,t,"handleMonitorSwapTx"),xa(e.t0),ya();case 64:case"end":return e.stop()}}),e,null,[[0,59]])}))),[c,ve,o,_a,Ca,Za,xa,q,Da,ya]),Ea=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,l,u,m,d,p,f,x,g,b,h,y,j,T,w,k,S;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,sa.current){e.next=3;break}return e.abrupt("return");case 3:return ha("监控交易"),a=null===(r=Xt.current)||void 0===r?void 0:r.getFieldsValue(),n=a.midIntervalTx,s=a.triggerConditionIntervalTx1,l=a.triggerNumberIntervalTx1,u=a.intervalIntervalTx1,m=a.loopIntervalTx1,d=a.limitIntervalTx1,p=null==Xr?void 0:Xr.sym0.name,f=null==Xr?void 0:Xr.sym1.name,e.next=9,c.client.v1.chain.get_table_rows({code:"loglogloglog",table:"logs",scope:"loglogloglog",key_type:"i64",index_position:"secondary",lower_bound:I.zM.from(n.split("-")[1]),upper_bound:I.zM.from(n.split("-")[1]),limit:d,reverse:!0});case 9:if(x=e.sent,g=x.rows,b=g[0].id,h=0,y=!1,Gt.current){e.next=18;break}return Gt.current=b,Ea(),e.abrupt("return");case 18:j=0;case 19:if(!(j<g.length)){e.next=35;break}if(T=g[j].id,w=g[j].user,k=I.xR.from(g[j].in),S=I.xR.from(g[j].out),w!==o.accountName.toString()){e.next=26;break}return e.abrupt("continue",32);case 26:if(T!==Gt.current){e.next=31;break}return y=!0,e.abrupt("break",35);case 31:"buy"===s?k.symbol.name===p?h+=k.value:h-=S.value:"sell"===s&&(k.symbol.name===f?h+=k.value:h-=S.value);case 32:++j,e.next=19;break;case 35:if(sa.current){e.next=37;break}return e.abrupt("return");case 37:if(!(y&&h>=l)){e.next=57;break}if(!_t){e.next=41;break}return e.next=41,Ra();case 41:return e.next=43,qa();case 43:if(Ma(g,Gt.current),ha("交易结束"),!m||!na.current){e.next=52;break}return Gt.current=b,e.next=49,Ra();case 49:Ea(),e.next=54;break;case 52:ha("监控结束"),ka();case 54:Ia(),e.next=60;break;case 57:Ma(g,Gt.current),Gt.current=b,ra.current=(0,M.iK)(Ea,1e3*u);case 60:e.next=67;break;case 62:e.prev=62,e.t0=e.catch(0),(0,v.Tv)(e.t0,t,"handleMonitorSwapIntervalTx1"),ha(e.t0),ka();case 67:case"end":return e.stop()}}),e,null,[[0,62]])}))),[c,Xr,o,qa,Ra,Ia,ha,q,Ma,ka,_t]),$a=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,o,c,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Pa();case 2:return e.next=4,za();case 4:return e.next=6,Na();case 6:if(Jt.current){e.next=8;break}return e.abrupt("return");case 8:ga("交易结束"),(a=null===(r=$t.current)||void 0===r?void 0:r.getFieldsValue()).loopTime?(s=a.triggerConditionTime.add(1,"days"),ur(s.format("YYYY-MM-DDTHH:mm:ss")),lr(s.valueOf()),null===(n=$t.current)||void 0===n||n.setFieldValue("triggerConditionTime",s),ga(JSON.stringify(l()(l()({},a),{},{logTime:""}))),c=(o=We).asset0,u=o.asset1,"buy"===a.triggerOperateTime?a.operateNumberTime>c.value&&(t.error("".concat(c.symbol.name,"余额不足")),ga("".concat(c.symbol.name,"余额不足"))):"sell"===a.triggerOperateTime&&a.operateNumberTime>u.value&&(t.error("".concat(u.symbol.name,"余额不足")),ga("".concat(c.symbol.name,"余额不足")))):(ga("运行结束"),ja());case 11:case"end":return e.stop()}}),e)}))),[Pa,za,Na,ja]),Ua=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,o,c;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Va();case 2:return e.next=4,La();case 4:return e.next=6,Fa();case 6:if(Kt.current){e.next=8;break}return e.abrupt("return");case 8:ba("交易结束"),a=null===(r=At.current)||void 0===r?void 0:r.getFieldsValue(),n=L()().add(a.triggerConditionInterval,"seconds"),Hr(n.format("YYYY-MM-DDTHH:mm:ss")),Yr(n.valueOf()),ba(JSON.stringify(l()(l()({},a),{},{logInterval:""}))),o=(s=Sr).asset0,c=s.asset1,"buy"===a.triggerOperateInterval?a.operateNumberInterval>o.value&&(t.error("".concat(o.symbol.name,"余额不足")),ba("".concat(o.symbol.name,"余额不足")),a.existInterval&&Ta()):"sell"===a.triggerOperateInterval&&a.operateNumberInterval>c.value&&(t.error("".concat(c.symbol.name,"余额不足")),ba("".concat(o.symbol.name,"余额不足")),a.existInterval&&Ta());case 16:case"end":return e.stop()}}),e)}))),[Va,La,Fa,Ta]),Ja=(0,D.useCallback)(u()(i()().mark((function e(){var r,a,n,s,o,c;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Oa();case 2:return e.next=4,Ya();case 4:return e.next=6,Ia();case 6:if(na.current){e.next=8;break}return e.abrupt("return");case 8:ha("交易结束"),a=null===(r=Xt.current)||void 0===r?void 0:r.getFieldsValue(),n=L()().add(a.triggerConditionIntervalTx0,"seconds"),Vt(n.format("YYYY-MM-DDTHH:mm:ss")),Ft(n.valueOf()),ha(JSON.stringify(l()(l()({},a),{},{logIntervalTx:""}))),o=(s=at).asset0,c=s.asset1,"buy"===a.triggerOperateIntervalTx0?a.operateNumberIntervalTx0>o.value&&(t.error("".concat(o.symbol.name,"余额不足")),ha("".concat(o.symbol.name,"余额不足")),a.existIntervalTx0&&wa()):"sell"===a.triggerOperateIntervalTx0&&a.operateNumberIntervalTx0>c.value&&(t.error("".concat(c.symbol.name,"余额不足")),ha("".concat(o.symbol.name,"余额不足")),a.existIntervalTx0&&wa());case 16:case"end":return e.stop()}}),e)}))),[Oa,Ya,Ia,wa]),Wa=(0,D.useCallback)(function(){var e=u()(i()().mark((function e(r){var a,n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c&&c.broadcast){e.next=6;break}return t.error("".concat(ca)),e.abrupt("return");case 6:if(o){e.next=9;break}return t.error("".concat(ua)),e.abrupt("return");case 9:if("owner"===(n=c.permissionLevel.permission.toString())||"active"===n){e.next=13;break}return t.error("permission权限必须是owner或者active"),e.abrupt("return");case 13:return Lt.current=0,null===(a=Yt.current)||void 0===a||a.setFieldValue("logTx",""),(0,M.gr)(qt.current),(0,M.gr)(Dt.current),Mt.current=void 0,Ht.current=!0,Et.current="",xa(JSON.stringify(l()(l()({},r),{},{logTx:""}))),e.next=23,Ca();case 23:return Ha(),e.abrupt("return",!0);case 27:return e.prev=27,e.t0=e.catch(0),ie(!1),(0,v.Tv)(e.t0,t,"handleFinishTx"),e.abrupt("return",!1);case 32:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(r){return e.apply(this,arguments)}}(),[c,o,Ca,Ha,xa]),Aa=(0,D.useCallback)(function(){var e=u()(i()().mark((function e(r){var a,n,s,u,m,d,p,f,x,g;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c&&c.broadcast){e.next=6;break}return t.error("".concat(ca)),e.abrupt("return");case 6:if(o){e.next=9;break}return t.error("".concat(ua)),e.abrupt("return");case 9:if("owner"===(s=c.permissionLevel.permission.toString())||"active"===s){e.next=13;break}return t.error("permission权限必须是owner或者active"),e.abrupt("return");case 13:return null===(a=$t.current)||void 0===a||a.setFieldValue("logTime",""),Ut.current=void 0,Jt.current=!0,Wt.current="",u=null===(n=$t.current)||void 0===n?void 0:n.getFieldValue("triggerConditionTime"),ur(u.format("YYYY-MM-DDTHH:mm:ss")),lr(u.valueOf()),ga(JSON.stringify(l()(l()({},r),{},{logTime:""}))),d=(m=r).triggerOperateTime,p=m.operateNumberTime,x=(f=We).asset0,g=f.asset1,"buy"===d?p>x.value&&(t.error("".concat(x.symbol.name,"余额不足")),ga("".concat(x.symbol.name,"余额不足"))):"sell"===d&&p>g.value&&(t.error("".concat(g.symbol.name,"余额不足")),ga("".concat(x.symbol.name,"余额不足"))),e.abrupt("return",!0);case 27:return e.prev=27,e.t0=e.catch(0),ie(!1),(0,v.Tv)(e.t0,t,"handleFinishTime"),e.abrupt("return",!1);case 32:case"end":return e.stop()}}),e,null,[[0,27]])})));return function(r){return e.apply(this,arguments)}}(),[c,o,ga,We]),Ba=(0,D.useCallback)(function(){var e=u()(i()().mark((function e(r){var a,n,s,u,m,d,p,f,x,g,b;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c&&c.broadcast){e.next=6;break}return t.error("".concat(ca)),e.abrupt("return");case 6:if(o){e.next=9;break}return t.error("".concat(ua)),e.abrupt("return");case 9:if("owner"===(n=c.permissionLevel.permission.toString())||"active"===n){e.next=13;break}return t.error("permission权限必须是owner或者active"),e.abrupt("return");case 13:return null===(a=At.current)||void 0===a||a.setFieldValue("logInterval",""),Bt.current=void 0,Kt.current=!0,Qt.current="",u=(s=r).triggerOperateInterval,m=s.operateNumberInterval,d=s.buyNowInterval,p=s.existInterval,ba(JSON.stringify(l()(l()({},r),{},{logInterval:""}))),d?Ua():(f=L()().add(r.triggerConditionInterval,"seconds"),Hr(f.format("YYYY-MM-DDTHH:mm:ss")),Yr(f.valueOf()),g=(x=Sr).asset0,b=x.asset1,"buy"===u?m>g.value&&(t.error("".concat(g.symbol.name,"余额不足")),ba("".concat(g.symbol.name,"余额不足")),p&&Ta()):"sell"===u&&m>b.value&&(t.error("".concat(b.symbol.name,"余额不足")),ba("".concat(g.symbol.name,"余额不足")),p&&Ta())),e.abrupt("return",!0);case 23:return e.prev=23,e.t0=e.catch(0),fr(!1),(0,v.Tv)(e.t0,t,"handleFinishInterval"),e.abrupt("return",!1);case 28:case"end":return e.stop()}}),e,null,[[0,23]])})));return function(r){return e.apply(this,arguments)}}(),[c,o,ba,Sr,Ua,Ta]),Ka=(0,D.useCallback)(function(){var e=u()(i()().mark((function e(r){var a,n,s,u,m,d,p,f,x,g,b;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,c&&c.broadcast){e.next=6;break}return t.error("".concat(ca)),e.abrupt("return");case 6:if(o){e.next=9;break}return t.error("".concat(ua)),e.abrupt("return");case 9:if("owner"===(n=c.permissionLevel.permission.toString())||"active"===n){e.next=13;break}return t.error("permission权限必须是owner或者active"),e.abrupt("return");case 13:return Gt.current=0,null===(a=Xt.current)||void 0===a||a.setFieldValue("logIntervalTx",""),(0,M.gr)(ea.current),(0,M.gr)(ra.current),ta.current=void 0,aa.current=void 0,na.current=!0,sa.current=!0,la.current="",u=(s=r).triggerOperateIntervalTx0,m=s.operateNumberIntervalTx0,d=s.buyNowIntervalTx0,p=s.existIntervalTx0,ha(JSON.stringify(l()(l()({},r),{},{logIntervalTx:""}))),d?Ja():(f=L()().add(r.triggerConditionIntervalTx0,"seconds"),Vt(f.format("YYYY-MM-DDTHH:mm:ss")),Ft(f.valueOf()),g=(x=at).asset0,b=x.asset1,"buy"===u?m>g.value&&(t.error("".concat(g.symbol.name,"余额不足")),ha("".concat(g.symbol.name,"余额不足")),p&&wa()):"sell"===u&&m>b.value&&(t.error("".concat(b.symbol.name,"余额不足")),ha("".concat(g.symbol.name,"余额不足")),p&&wa())),e.next=27,Ra();case 27:return Ea(),e.abrupt("return",!0);case 31:return e.prev=31,e.t0=e.catch(0),Jr(!1),(0,v.Tv)(e.t0,t,"handleFinishIntervalTx"),e.abrupt("return",!1);case 36:case"end":return e.stop()}}),e,null,[[0,31]])})));return function(r){return e.apply(this,arguments)}}(),[c,o,Ea,ha,at,Ja,wa,ka,_t,Ra]),Qa=(0,D.useCallback)((function(){s&&!B&&va(s)}),[va,s]),Ga=(0,D.useCallback)((function(e){if(e.hasOwnProperty("midTx")){var r,t,a,n,s,l,o,i,c=null===(r=Yt.current)||void 0===r?void 0:r.getFieldValue("midTx").split("-")[1],u=X.filter((function(e){return e.mid.toString()===c}))[0],m=u.reserve0.toString(),d=u.reserve1.toString(),p=u.reserve1.symbol.name;null===(t=Yt.current)||void 0===t||t.setFieldValue("liquidityTx",d+" / "+m),null===(a=Yt.current)||void 0===a||a.setFieldValue("balanceTx",""),null===(n=Yt.current)||void 0===n||n.setFieldValue("triggerConditionTx",""),null===(s=Yt.current)||void 0===s||s.setFieldValue("triggerNumberTx",""),null===(l=Yt.current)||void 0===l||l.setFieldValue("triggerOperateTx",""),null===(o=Yt.current)||void 0===o||o.setFieldValue("operateNumberTx",""),null===(i=Yt.current)||void 0===i||i.setFieldValue("logTx",""),Et.current="",xe(u),ke({buy:"买入 "+p,sell:"卖出 "+p}),Fe(""),Ve(""),Za()}if(e.hasOwnProperty("triggerConditionTx")){var f,v=null===(f=Yt.current)||void 0===f?void 0:f.getFieldValue("triggerConditionTx");if(ve){var x=ve.sym0.name,g=ve.sym1.name;"buy"===v?Fe(x):"sell"===v&&Fe(g)}}if(e.hasOwnProperty("triggerOperateTx")){var b,h=null===(b=Yt.current)||void 0===b?void 0:b.getFieldValue("triggerOperateTx");if(ve){var y=ve.sym0.name,j=ve.sym1.name;"buy"===h?Ve(y):"sell"===h&&Ve(j)}}}),[X,ve,Za]),Xa=(0,D.useCallback)((function(e){if(e.hasOwnProperty("midTime")){var r,t,a,n,s,l,o=null===(r=$t.current)||void 0===r?void 0:r.getFieldValue("midTime").split("-")[1],i=X.filter((function(e){return e.mid.toString()===o}))[0],c=i.reserve0.toString(),u=i.reserve1.toString(),m=i.reserve1.symbol.name;null===(t=$t.current)||void 0===t||t.setFieldValue("liquidityTime",u+" / "+c),null===(a=$t.current)||void 0===a||a.setFieldValue("balanceTime",""),null===(n=$t.current)||void 0===n||n.setFieldValue("triggerOperateTime",""),null===(s=$t.current)||void 0===s||s.setFieldValue("operateNumberTime",""),null===(l=$t.current)||void 0===l||l.setFieldValue("logTime",""),Wt.current="",$e(i),Ge({buy:"买入 "+m,sell:"卖出 "+m}),tr(""),Na()}if(e.hasOwnProperty("triggerOperateTime")){var d,p=null===(d=$t.current)||void 0===d?void 0:d.getFieldValue("triggerOperateTime");if(Ee){var f=Ee.sym0.name,v=Ee.sym1.name;"buy"===p?tr(f):"sell"===p&&tr(v)}}}),[X,Ee,Na]),en=(0,D.useCallback)((function(e){if(e.hasOwnProperty("midInterval")){var r,t,a,n,s,l,o=null===(r=At.current)||void 0===r?void 0:r.getFieldValue("midInterval").split("-")[1],i=X.filter((function(e){return e.mid.toString()===o}))[0],c=i.reserve0.toString(),u=i.reserve1.toString(),m=i.reserve1.symbol.name;null===(t=At.current)||void 0===t||t.setFieldValue("liquidityInterval",u+" / "+c),null===(a=At.current)||void 0===a||a.setFieldValue("balanceInterval",""),null===(n=At.current)||void 0===n||n.setFieldValue("triggerOperateInterval",""),null===(s=At.current)||void 0===s||s.setFieldValue("operateNumberInterval",""),null===(l=At.current)||void 0===l||l.setFieldValue("logInterval",""),Qt.current="",Tr(i),Cr({buy:"买入 "+m,sell:"卖出 "+m}),Rr(""),Fa()}if(e.hasOwnProperty("triggerOperateInterval")){var d,p=null===(d=At.current)||void 0===d?void 0:d.getFieldValue("triggerOperateInterval");if(jr){var f=jr.sym0.name,v=jr.sym1.name;"buy"===p?Rr(f):"sell"===p&&Rr(v)}}}),[X,jr,Fa]),rn=(0,D.useCallback)((function(e){if(e.hasOwnProperty("midIntervalTx")){var r,t,a,n,s,l,o,i,c,u,m=null===(r=Xt.current)||void 0===r?void 0:r.getFieldValue("midIntervalTx").split("-")[1],d=X.filter((function(e){return e.mid.toString()===m}))[0],p=d.reserve0.toString(),f=d.reserve1.toString(),v=d.reserve1.symbol.name;null===(t=Xt.current)||void 0===t||t.setFieldValue("liquidityIntervalTx",f+" / "+p),null===(a=Xt.current)||void 0===a||a.setFieldValue("balanceIntervalTx",""),null===(n=Xt.current)||void 0===n||n.setFieldValue("triggerConditionIntervalTx1",""),null===(s=Xt.current)||void 0===s||s.setFieldValue("triggerNumberIntervalTx1",""),null===(l=Xt.current)||void 0===l||l.setFieldValue("triggerOperateIntervalTx0",""),null===(o=Xt.current)||void 0===o||o.setFieldValue("triggerOperateIntervalTx1",""),null===(i=Xt.current)||void 0===i||i.setFieldValue("operateNumberIntervalTx0",""),null===(c=Xt.current)||void 0===c||c.setFieldValue("operateNumberIntervalTx1",""),null===(u=Xt.current)||void 0===u||u.setFieldValue("logIntervalTx",""),la.current="",et(d),it({buy:"买入 "+v,sell:"卖出 "+v}),dt({buy:"买入 "+v,sell:"卖出 "+v}),yt(""),kt(""),xt(""),Ia()}if(e.hasOwnProperty("triggerOperateIntervalTx0")){var x,g=null===(x=Xt.current)||void 0===x?void 0:x.getFieldValue("triggerOperateIntervalTx0");if(Xr){var b=Xr.sym0.name,h=Xr.sym1.name;"buy"===g?yt(b):"sell"===g&&yt(h)}}if(e.hasOwnProperty("triggerConditionIntervalTx1")){var y,j=null===(y=Xt.current)||void 0===y?void 0:y.getFieldValue("triggerConditionIntervalTx1");if(Xr){var T=Xr.sym0.name,w=Xr.sym1.name;"buy"===j?xt(T):"sell"===j&&xt(w)}}if(e.hasOwnProperty("triggerOperateIntervalTx1")){var k,S,Z,N,F=null===(k=Xt.current)||void 0===k?void 0:k.getFieldsValue(),I=F.midIntervalTx,C=F.triggerOperateIntervalTx1;if(Xr){var P=Xr.sym0.name,V=Xr.sym1.name;"buy"===C?kt(P):"sell"===C&&kt(V)}if(_t&&I&&C&&at)if("buy"===C)null===(S=Xt.current)||void 0===S||S.setFieldValue("operateNumberIntervalTx1",at.asset0.value);else null===(Z=Xt.current)||void 0===Z||Z.setFieldValue("operateNumberIntervalTx1",at.asset1.value);else null===(N=Xt.current)||void 0===N||N.setFieldValue("operateNumberIntervalTx1",0)}}),[X,Xr,Ia,_t,at]),tn=(0,D.useCallback)((function(){if(U){if(o){var e=o.accountName.toString();return!!Y.includes(e)||(J(!1),!1)}return!0}if(o){var r=o.accountName.toString();return!!Y.includes(r)&&(J(!0),!0)}return!1}),[o,U,Y]),an=(0,D.useCallback)((function(){var e=L()().format("YYYY-MM-DDTHH:mm:ss"),r=Et.current,t="data:,".concat(r),a=document.createElement("a");a.href=t,a.download="log_".concat(e,".json"),a.click()}),[]),nn=(0,D.useCallback)((function(){var e=L()().format("YYYY-MM-DDTHH:mm:ss"),r=Wt.current,t="data:,".concat(r),a=document.createElement("a");a.href=t,a.download="log_".concat(e,".json"),a.click()}),[]),sn=(0,D.useCallback)((function(){var e=L()().format("YYYY-MM-DDTHH:mm:ss"),r=Qt.current,t="data:,".concat(r),a=document.createElement("a");a.href=t,a.download="log_".concat(e,".json"),a.click()}),[]),ln=(0,D.useCallback)((function(){var e=L()().format("YYYY-MM-DDTHH:mm:ss"),r=la.current,t="data:,".concat(r),a=document.createElement("a");a.href=t,a.download="log_".concat(e,".json"),a.click()}),[]),on=(0,D.useCallback)((function(e){var r,t,a,n,s,l=null===(r=Xt.current)||void 0===r?void 0:r.getFieldsValue(),o=l.midIntervalTx,i=l.triggerOperateIntervalTx1;e.target.checked&&o&&i&&at?"buy"===i?null===(a=Xt.current)||void 0===a||a.setFieldValue("operateNumberIntervalTx1",at.asset0.value):null===(n=Xt.current)||void 0===n||n.setFieldValue("operateNumberIntervalTx1",at.asset1.value):null===(s=Xt.current)||void 0===s||s.setFieldValue("operateNumberIntervalTx1",0);null===(t=Xt.current)||void 0===t||t.validateFields(["operateNumberIntervalTx1"]),zt(e.target.checked)}),[at]);return(0,D.useEffect)((function(){!s||Object.keys(ae).length||B||va(s)}),[va,ae,s,B]),(0,D.useEffect)((function(){return function(){(0,M.gr)(qt.current),(0,M.gr)(Dt.current),(0,M.gr)(ea.current),(0,M.gr)(ra.current)}}),[]),(0,H.jsx)(h._z,{className:"",ghost:!0,children:tn()?(0,H.jsxs)("div",{className:"flex flex-wrap justify-center gap-5",children:[(0,H.jsxs)(y.Z,{title:(0,H.jsx)("div",{className:" font-semibold text-lg hardline",children:"使用说明"}),style:{maxWidth:"400px"},children:[(0,H.jsx)("div",{children:"1. 操作步骤如下:"}),(0,H.jsxs)("div",{className:"ml-3",children:['a)进入"工具-简易钱包"页面 ',(0,H.jsx)(x.Z,{})," ","导入私钥 ",(0,H.jsx)(x.Z,{})," 点击右上角钱包图标"," ",(0,H.jsx)(x.Z,{})," 选择账号进行连接;"]}),(0,H.jsxs)("div",{className:"ml-3",children:['b)进入"PPP-自动交易"页面 ',(0,H.jsx)(x.Z,{})," ","选择相应的工具 ",(0,H.jsx)(x.Z,{})," 按需求填入相应的栏位"," ",(0,H.jsx)(x.Z,{})," 点击启动按钮。"]}),(0,H.jsx)("div",{className:"mt-3",children:"2. 注意事项:"}),(0,H.jsx)("div",{className:"ml-3",children:"a)自动交易需要用户导入私钥才可以正常执行。私钥只保存在浏览器的数据库中,不会上传到服务器,请评估好风险后再使用;"}),(0,H.jsx)("div",{className:"ml-3",children:"b)每次切换账号前,都需要先断开账号的连接。"}),(0,H.jsx)("div",{className:"mt-3",children:"3. 费用说明:"}),(0,H.jsx)("div",{className:"ml-3",children:"每次成功的交易会收取0.3%费用。例如使用工具花费100 USDT买入 DFS,则工具会收取0.3 USDT作为费用。"})]}),(0,H.jsxs)(y.Z,{title:(0,H.jsxs)("div",{className:" font-semibold text-lg hardline",children:["大单交易",(0,H.jsx)(P.Z,{placement:"topLeft",title:"监听交易大单自动进行买卖操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),style:{maxWidth:"400px"},children:[(0,H.jsxs)(j.A,{formRef:Yt,onFinish:Wa,onValuesChange:Ga,onReset:ma,loading:oe,disabled:Ht.current,layout:"vertical",initialValues:{intervalTx:1,limitTx:10,splitTx:3,loopTx:!0},submitter:{searchConfig:{submitText:"启动"},render:function(e,r){return[r[1],r[0]]}},children:[(0,H.jsx)(T.Z,{name:"midTx",label:(0,H.jsxs)("div",{children:["交易对",(0,H.jsx)(b.Z,{spin:B,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Qa})]}),valueEnum:ae,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1,showSearch:!0,filterOption:function(e,r){var t=r.label.split("_"),a=t[0],n=t[6];return(a.padStart(3,"0")+n).toLowerCase().includes(e.toLowerCase())},optionItemRender:function(e){var r=e.label.split("_"),t=r[0],a=r[2],n=r[6],s=r[9];return(0,H.jsxs)("div",{className:"flex items-center",children:[(0,H.jsx)("div",{className:"mr-2",children:t.padStart(3,"0")}),(0,H.jsx)(V.C,{className:"mr-2",size:"default",src:s}),(0,H.jsx)("div",{children:"".concat(n,"/").concat(a)})]})}}}),(0,H.jsx)(w.Z,{name:"liquidityTx",label:"资金池",placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsx)(w.Z,{name:"balanceTx",label:(0,H.jsxs)("div",{children:["账号余额",(0,H.jsx)(b.Z,{spin:me,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Za})]}),placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsx)(T.Z,{name:"triggerConditionTx",label:(0,H.jsxs)("div",{children:["触发条件",(0,H.jsx)(P.Z,{placement:"topLeft",title:"链上出现大单买入或者大单卖出",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),valueEnum:we,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1}}),(0,H.jsx)(k.Z,{name:"triggerNumberTx",label:(0,H.jsxs)("div",{children:["触发数量",Ne,"(大于等于)",(0,H.jsx)(P.Z,{placement:"topLeft",title:"出现大单买入或者大单卖出,并且数量大于等于指定值时触发",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:Ne,min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+(\.\d{1,8})?$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(T.Z,{name:"triggerOperateTx",label:(0,H.jsxs)("div",{children:["触发操作",(0,H.jsx)(P.Z,{placement:"topLeft",title:"触发条件满足后,账号将要进行的操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),valueEnum:we,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1}}),(0,H.jsx)(k.Z,{name:"operateNumberTx",label:(0,H.jsxs)("div",{children:["操作数量",Pe,(0,H.jsx)(P.Z,{placement:"topLeft",title:"触发条件满足后,账号将要进行买入或者卖出的数量",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:Pe,min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+(\.\d{1,8})?$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(k.Z,{name:"splitTx",label:(0,H.jsxs)("div",{children:["拆分数量",(0,H.jsx)(P.Z,{placement:"topLeft",title:"将当前操作数量,平均分成多少笔进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:Pe,min:1,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:3}}),(0,H.jsx)(k.Z,{name:"intervalTx",label:(0,H.jsxs)("div",{children:["监控间隔时间(秒)",(0,H.jsx)(P.Z,{placement:"topLeft",title:"监控链上交易的时间间隔",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:1}}),(0,H.jsx)(k.Z,{name:"limitTx",label:(0,H.jsxs)("div",{children:["每次读取交易数",(0,H.jsx)(P.Z,{placement:"topLeft",title:"每次读取监控对象的最新交易数量",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:5,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:10}}),(0,H.jsx)(S.Z,{name:"loopTx",label:(0,H.jsxs)("div",{children:["是否循环运行",(0,H.jsx)(P.Z,{placement:"topLeft",title:"交易成功或者失败后,是否继续进行监控",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!0}}),(0,H.jsx)(Z.Z,{name:"logTx",label:"日志信息",placeholder:"",fieldProps:{autoSize:{maxRows:6,minRows:6},allowClear:!0,autoFocus:!1,size:"large",readOnly:!0}})]}),(0,H.jsxs)("div",{className:"mt-2 ",children:[(0,H.jsx)(O.ZP,{type:"primary",className:"mr-2",onClick:ya,children:"停止"}),(0,H.jsx)(O.ZP,{onClick:an,children:"下载"}),","]})]}),(0,H.jsxs)(y.Z,{title:(0,H.jsxs)("div",{className:" font-semibold text-lg hardline",children:["定时交易",(0,H.jsx)(P.Z,{placement:"topLeft",title:"在指定的时间自动进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),style:{maxWidth:"400px"},children:[(0,H.jsxs)(j.A,{formRef:$t,onFinish:Aa,onValuesChange:Xa,onReset:da,loading:_e,disabled:Jt.current,layout:"vertical",initialValues:{splitTime:3,loopTime:!0},submitter:{searchConfig:{submitText:"启动"},render:function(e,r){return[r[1],r[0]]}},children:[(0,H.jsx)(T.Z,{name:"midTime",label:(0,H.jsxs)("div",{children:["交易对",(0,H.jsx)(b.Z,{spin:B,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Qa})]}),valueEnum:ae,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1,showSearch:!0,filterOption:function(e,r){var t=r.label.split("_"),a=t[0],n=t[6];return(a.padStart(3,"0")+n).toLowerCase().includes(e.toLowerCase())},optionItemRender:function(e){var r=e.label.split("_"),t=r[0],a=r[2],n=r[6],s=r[9];return(0,H.jsxs)("div",{className:"flex items-center",children:[(0,H.jsx)("div",{className:"mr-2",children:t.padStart(3,"0")}),(0,H.jsx)(V.C,{className:"mr-2",size:"default",src:s}),(0,H.jsx)("div",{children:"".concat(n,"/").concat(a)})]})}}}),(0,H.jsx)(w.Z,{name:"liquidityTime",label:"资金池",placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsx)(w.Z,{name:"balanceTime",label:(0,H.jsxs)("div",{children:["账号余额",(0,H.jsx)(b.Z,{spin:qe,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Na})]}),placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsx)(N.Z,{name:"triggerConditionTime",label:(0,H.jsxs)("div",{children:["触发时间",(0,H.jsx)(P.Z,{placement:"topLeft",title:"在指定时间点自动进行交易操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1},width:"100%"}),(0,H.jsx)(T.Z,{name:"triggerOperateTime",label:(0,H.jsxs)("div",{children:["触发操作",(0,H.jsx)(P.Z,{placement:"topLeft",title:"触发条件满足后,账号将要进行的操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),valueEnum:Qe,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1}}),(0,H.jsx)(k.Z,{name:"operateNumberTime",label:(0,H.jsxs)("div",{children:["操作数量",rr,(0,H.jsx)(P.Z,{placement:"topLeft",title:"触发条件满足后,账号将要进行买入或者卖出的数量",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:rr,min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+(\.\d{1,8})?$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(k.Z,{name:"splitTime",label:(0,H.jsxs)("div",{children:["拆分数量",(0,H.jsx)(P.Z,{placement:"topLeft",title:"将当前操作数量,平均分成多少笔进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:rr,min:1,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:3}}),(0,H.jsx)(S.Z,{name:"loopTime",label:(0,H.jsxs)("div",{children:["是否循环运行",(0,H.jsx)(P.Z,{placement:"topLeft",title:"交易成功或者失败后,是否继续进行监控",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!0}}),(0,H.jsx)(j.A.Item,{label:"倒计时",children:(0,H.jsxs)("div",{className:"flex items-center gap-x-5 flex-wrap",children:[(0,H.jsx)(p.Wo,{className:"text-2xl",value:sr,onFinish:$a}),(0,H.jsx)("div",{className:"text-2xl",children:"".concat(cr)})]})}),(0,H.jsx)(Z.Z,{name:"logTime",label:"日志信息",placeholder:"",fieldProps:{autoSize:{maxRows:6,minRows:6},allowClear:!0,autoFocus:!1,size:"large",readOnly:!0}})]}),(0,H.jsxs)("div",{className:"mt-2 ",children:[(0,H.jsx)(O.ZP,{type:"primary",className:"mr-2",onClick:ja,children:"停止"}),(0,H.jsx)(O.ZP,{onClick:nn,children:"下载"}),","]})]}),(0,H.jsxs)(y.Z,{title:(0,H.jsxs)("div",{className:" font-semibold text-lg hardline",children:["间隔交易",(0,H.jsx)(P.Z,{placement:"topLeft",title:"以固定的间隔时间自动进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),style:{maxWidth:"400px"},children:[(0,H.jsxs)(j.A,{formRef:At,onFinish:Ba,onValuesChange:en,onReset:pa,loading:pr,disabled:Kt.current,layout:"vertical",initialValues:{splitInterval:2,buyNowInterval:!1,existInterval:!0},submitter:{searchConfig:{submitText:"启动"},render:function(e,r){return[r[1],r[0]]}},children:[(0,H.jsx)(T.Z,{name:"midInterval",label:(0,H.jsxs)("div",{children:["交易对",(0,H.jsx)(b.Z,{spin:B,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Qa})]}),valueEnum:ae,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1,showSearch:!0,filterOption:function(e,r){var t=r.label.split("_"),a=t[0],n=t[6];return(a.padStart(3,"0")+n).toLowerCase().includes(e.toLowerCase())},optionItemRender:function(e){var r=e.label.split("_"),t=r[0],a=r[2],n=r[6],s=r[9];return(0,H.jsxs)("div",{className:"flex items-center",children:[(0,H.jsx)("div",{className:"mr-2",children:t.padStart(3,"0")}),(0,H.jsx)(V.C,{className:"mr-2",size:"default",src:s}),(0,H.jsx)("div",{children:"".concat(n,"/").concat(a)})]})}}}),(0,H.jsx)(w.Z,{name:"liquidityInterval",label:"资金池",placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsx)(w.Z,{name:"balanceInterval",label:(0,H.jsxs)("div",{children:["账号余额",(0,H.jsx)(b.Z,{spin:gr,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Fa})]}),placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsx)(k.Z,{name:"triggerConditionInterval",label:(0,H.jsxs)("div",{children:["间隔时间(秒)",(0,H.jsx)(P.Z,{placement:"topLeft",title:"在指定间隔时间自动进行交易操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:1,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(T.Z,{name:"triggerOperateInterval",label:(0,H.jsxs)("div",{children:["间隔操作",(0,H.jsx)(P.Z,{placement:"topLeft",title:"间隔时间满足后,账号将要进行的操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),valueEnum:Ir,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1}}),(0,H.jsx)(k.Z,{name:"operateNumberInterval",label:(0,H.jsxs)("div",{children:["操作数量",Or,(0,H.jsx)(P.Z,{placement:"topLeft",title:"间隔时间满足后,账号将要进行买入或者卖出的数量",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:Or,min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+(\.\d{1,8})?$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(k.Z,{name:"splitInterval",label:(0,H.jsxs)("div",{children:["拆分数量",(0,H.jsx)(P.Z,{placement:"topLeft",title:"将当前操作数量,平均分成多少笔进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:1,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:2}}),(0,H.jsx)(S.Z,{name:"existInterval",label:(0,H.jsxs)("div",{children:["余额不足是否自动退出",(0,H.jsx)(P.Z,{placement:"topLeft",title:"账号余额不足是否自动退出",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!0}}),(0,H.jsx)(S.Z,{name:"buyNowInterval",label:(0,H.jsxs)("div",{children:["是否立即买入",(0,H.jsx)(P.Z,{placement:"topLeft",title:"启动后,是否立即进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!1}}),(0,H.jsx)(j.A.Item,{label:"倒计时",children:(0,H.jsxs)("div",{className:"flex items-center gap-x-5 flex-wrap",children:[(0,H.jsx)(p.Wo,{className:"text-2xl",value:Lr,onFinish:Ua}),(0,H.jsx)("div",{className:"text-2xl",children:"".concat(Mr)})]})}),(0,H.jsx)(Z.Z,{name:"logInterval",label:"日志信息",placeholder:"",fieldProps:{autoSize:{maxRows:6,minRows:6},allowClear:!0,autoFocus:!1,size:"large",readOnly:!0}})]}),(0,H.jsxs)("div",{className:"mt-2 ",children:[(0,H.jsx)(O.ZP,{type:"primary",className:"mr-2",onClick:Ta,children:"停止"}),(0,H.jsx)(O.ZP,{onClick:sn,children:"下载"}),","]})]}),(0,H.jsxs)(y.Z,{title:(0,H.jsxs)("div",{className:" font-semibold text-lg hardline",children:["间隔交易+大单交易",(0,H.jsx)(P.Z,{placement:"topLeft",title:"以固定的间隔时间自动进行交易,遇到大单后立刻进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),style:{maxWidth:"400px"},children:[(0,H.jsxs)(j.A,{formRef:Xt,onFinish:Ka,onValuesChange:rn,onReset:fa,loading:Ur,disabled:na.current||sa.current,layout:"vertical",initialValues:{splitIntervalTx0:2,splitIntervalTx1:3,buyNowIntervalTx0:!1,existIntervalTx0:!0,intervalIntervalTx1:1,limitIntervalTx1:10,loopIntervalTx1:!1},submitter:{searchConfig:{submitText:"启动"},render:function(e,r){return[r[1],r[0]]}},children:[(0,H.jsx)(T.Z,{name:"midIntervalTx",label:(0,H.jsxs)("div",{children:["交易对",(0,H.jsx)(b.Z,{spin:B,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Qa})]}),valueEnum:ae,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1,showSearch:!0,filterOption:function(e,r){var t=r.label.split("_"),a=t[0],n=t[6];return(a.padStart(3,"0")+n).toLowerCase().includes(e.toLowerCase())},optionItemRender:function(e){var r=e.label.split("_"),t=r[0],a=r[2],n=r[6],s=r[9];return(0,H.jsxs)("div",{className:"flex items-center",children:[(0,H.jsx)("div",{className:"mr-2",children:t.padStart(3,"0")}),(0,H.jsx)(V.C,{className:"mr-2",size:"default",src:s}),(0,H.jsx)("div",{children:"".concat(n,"/").concat(a)})]})}}}),(0,H.jsx)(w.Z,{name:"liquidityIntervalTx",label:"资金池",placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsx)(w.Z,{name:"balanceIntervalTx",label:(0,H.jsxs)("div",{children:["账号余额",(0,H.jsx)(b.Z,{spin:Br,className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"},onClick:Ia})]}),placeholder:"",fieldProps:{size:"large",autoFocus:!1,defaultValue:"",readOnly:!0}}),(0,H.jsxs)(R.Z,{title:"间隔交易",className:"mb-6",bodyStyle:{paddingLeft:"15px",paddingRight:"15px",paddingTop:"15px",paddingBottom:"0"},headStyle:{padding:"20px"},children:[(0,H.jsx)(k.Z,{name:"triggerConditionIntervalTx0",label:(0,H.jsxs)("div",{children:["间隔时间(秒)",(0,H.jsx)(P.Z,{placement:"topLeft",title:"在指定间隔时间自动进行交易操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:1,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(T.Z,{name:"triggerOperateIntervalTx0",label:(0,H.jsxs)("div",{children:["间隔操作",(0,H.jsx)(P.Z,{placement:"topLeft",title:"间隔时间满足后,账号将要进行的操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),valueEnum:ot,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1}}),(0,H.jsx)(k.Z,{name:"operateNumberIntervalTx0",label:(0,H.jsxs)("div",{children:["操作数量",ht,(0,H.jsx)(P.Z,{placement:"topLeft",title:"间隔时间满足后,账号将要进行买入或者卖出的数量",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:ht,min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+(\.\d{1,8})?$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(k.Z,{name:"splitIntervalTx0",label:(0,H.jsxs)("div",{children:["拆分数量",(0,H.jsx)(P.Z,{placement:"topLeft",title:"将当前操作数量,平均分成多少笔进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:1,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:2}}),(0,H.jsx)(S.Z,{name:"existIntervalTx0",label:(0,H.jsxs)("div",{children:["余额不足是否自动退出",(0,H.jsx)(P.Z,{placement:"topLeft",title:"账号余额不足是否自动退出,只退出间隔交易,大单交易不影响。但如果大单交易触发完成后,发现间隔交易已停止,则大单交易也会自动停止。",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!0}}),(0,H.jsx)(S.Z,{name:"buyNowIntervalTx0",label:(0,H.jsxs)("div",{children:["是否立即买入",(0,H.jsx)(P.Z,{placement:"topLeft",title:"启动后,是否立即进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!1}})]}),(0,H.jsxs)(R.Z,{title:"大单交易",className:"mb-6",bodyStyle:{paddingLeft:"15px",paddingRight:"15px",paddingTop:"15px",paddingBottom:"0"},headStyle:{padding:"20px"},children:[(0,H.jsx)(T.Z,{name:"triggerConditionIntervalTx1",label:(0,H.jsxs)("div",{children:["触发条件",(0,H.jsx)(P.Z,{placement:"topLeft",title:"链上出现大单买入或者大单卖出",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),valueEnum:mt,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1}}),(0,H.jsx)(k.Z,{name:"triggerNumberIntervalTx1",label:(0,H.jsxs)("div",{children:["触发数量",vt,"(大于等于)",(0,H.jsx)(P.Z,{placement:"topLeft",title:"出现大单买入或者大单卖出,并且数量大于等于指定值时触发",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:vt,min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+(\.\d{1,8})?$/}],fieldProps:{autoFocus:!1,size:"large"}}),(0,H.jsx)(T.Z,{name:"triggerOperateIntervalTx1",label:(0,H.jsxs)("div",{children:["触发操作",(0,H.jsx)(P.Z,{placement:"topLeft",title:"触发条件满足后,账号将要进行的操作",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),valueEnum:mt,placeholder:"",rules:[{required:!0,whitespace:!0,message:"".concat(ia),pattern:/^.+$/}],fieldProps:{size:"large",autoFocus:!1}}),(0,H.jsx)(k.Z,{name:"operateNumberIntervalTx1",label:(0,H.jsxs)("div",{className:"flex justify-center",children:[(0,H.jsxs)("div",{className:"mr-3",children:["操作数量",wt]}),(0,H.jsx)(_.Z,{checked:_t,onChange:on,children:"全部"}),(0,H.jsx)(P.Z,{placement:"topLeft",title:"触发条件满足后,账号将要进行买入或者卖出的数量,默认为全部",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:wt,min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+(\.\d{1,8})?$/}],fieldProps:{autoFocus:!1,size:"large",disabled:_t}}),(0,H.jsx)(k.Z,{name:"splitIntervalTx1",label:(0,H.jsxs)("div",{children:["拆分数量",(0,H.jsx)(P.Z,{placement:"topLeft",title:"将当前操作数量,平均分成多少笔进行交易",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:1,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:3}}),(0,H.jsx)(k.Z,{name:"intervalIntervalTx1",label:(0,H.jsxs)("div",{children:["监控间隔时间(秒)",(0,H.jsx)(P.Z,{placement:"topLeft",title:"监控链上交易的时间间隔",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:0,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:1}}),(0,H.jsx)(k.Z,{name:"limitIntervalTx1",label:(0,H.jsxs)("div",{children:["每次读取交易数",(0,H.jsx)(P.Z,{placement:"topLeft",title:"每次读取监控对象的最新交易数量",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),placeholder:"",min:5,rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^\d+$/}],fieldProps:{autoFocus:!1,size:"large",defaultValue:10}}),(0,H.jsx)(S.Z,{name:"loopIntervalTx1",label:(0,H.jsxs)("div",{children:["是否循环运行",(0,H.jsx)(P.Z,{placement:"topLeft",title:"交易成功或者失败后,是否继续进行监控",children:(0,H.jsx)(g.Z,{className:"ml-[8px] hover:cursor-pointer",style:{color:"#1677ff"}})})]}),rules:[{required:!0,message:"".concat(ia),whitespace:!0,pattern:/^true|false$/}],fieldProps:{autoFocus:!1,defaultValue:!0}})]}),(0,H.jsx)(j.A.Item,{label:"倒计时",children:(0,H.jsxs)("div",{className:"flex items-center gap-x-5 flex-wrap",children:[(0,H.jsx)(p.Wo,{className:"text-2xl",value:Nt,onFinish:Ja}),(0,H.jsx)("div",{className:"text-2xl",children:"".concat(Pt)})]})}),(0,H.jsx)(Z.Z,{name:"logIntervalTx",label:"日志信息",placeholder:"",fieldProps:{autoSize:{maxRows:6,minRows:6},allowClear:!0,autoFocus:!1,size:"large",readOnly:!0}})]}),(0,H.jsxs)("div",{className:"mt-2 ",children:[(0,H.jsx)(O.ZP,{type:"primary",className:"mr-2",onClick:Sa,children:"停止"}),(0,H.jsx)(O.ZP,{onClick:ln,children:"下载"}),","]})]}),a]}):(0,H.jsx)("div",{children:"此工具为收费功能,有需要请联系开发者。"})})}}}]);