1"use strict";(self.webpackChunkdex_web=self.webpackChunkdex_web||[]).push([[1275],{8665:function(e,t,s){s.d(t,{aX:function(){return i},n3:function(){return o},nc:function(){return l},sK:function(){return n}});var r=s(47869),a=s(42651);function i(){return{type:a.UL,wsKey:a.uK,content:{sub:"market.overview"}}}function l(){return{type:a.FY,wsKey:a.uK,content:{unsub:"market.overview"}}}function n(e,t,s){const i=e&&e.get("business_type");let l;if(l=i===r.ao.SWAP?e.get("contract_code"):e.get("contract_short_type"),l)return r=>{s&&e&&r({type:a.FY,wsKey:a.uK,content:{unsub:`market.${l}.depth.${s}.sync`}}),t&&e&&(window.currentDepth=t,r({type:a.UL,wsKey:a.uK,content:{sub:`market.${l}.depth.${t}.sync`}}))}}function o(e,t){let s;if(s=(e&&e.get("business_type"))===r.ao.SWAP?e.get("contract_code"):e.get("contract_short_type"),s)return{type:a.FY,wsKey:a.uK,content:{unsub:`market.${s}.depth.${t}.sync`}}}},13866:function(e){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTJweCIgaGVpZ2h0PSIxMnB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+6Lev5b6Ec3ZnPC90aXRsZT4KICAgIDxnIGlkPSLotLnnjodWSVDnrYnnuqciIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSIwMuaIkeeahOi0ueeOhy3msLjnu60iIHRyYW5zZm9ybT0idHJhbnNsYXRlKC00MDYuMDAwMDAwLCAtNjQ1LjAwMDAwMCkiIGZpbGw9IiMzNTdDRTEiIGZpbGwtcnVsZT0ibm9uemVybyI+CiAgICAgICAgICAgIDxnIGlkPSLmiJHnmoTmiYvnu63otLkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDM5MC4wMDAwMDAsIDUxMi4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMC43OTYzODkxLDE0NSBDMjEuNTk4Nzg3NSwxNDMuMjU5MjM0IDI0LjQwMjMxNzksMTQwLjE0NTgxNyAyNi40MDQxOTcyLDEzOC41NTY1NjkgTDI3LjE5MDgzNjEsMTM3Ljk4NjExNiBDMjcuNTAwODM0NiwxMzcuNzg3MzQ1IDI3Ljc3MTgwMTMsMTM3LjY1MDk3NiAyNy45ODc5OTAyLDEzNy41OTM5MyBDMjgsMTM1LjcxMTQzOCAyOCwxMzQuMzE5MTUzIDI4LDEzMyBDMjcuMjU2MTQyNSwxMzMuNDUxOTA5IDI2LjUwNTUzMjgsMTM0LjA5MDEwMiAyNS43ODE5NDUxLDEzNC44MTc0MjkgTDI0Ljk0NDI2NDcsMTM1LjcxMTQzOCBDMjIuNTMxODExOSwxMzguNDI1NTM5IDIwLjYwOTQ5MDYsMTQxLjc3MDcwMiAyMC42MDk0OTA2LDE0MS43NzA3MDIgTDE5LjIwMDU5OTYsMTM4LjUzMzM4NiBMMTYsMTQwLjM4MTExMiBDMTcuMzU0MDk5OCwxNDAuOTU0MjQyIDE5LjQyNTc4MjUsMTQyLjk5ODA2MiAyMC43OTI2Mzk0LDE0NC45OTkwOTcgTDIwLjc5NjM4OTEsMTQ1IFoiIGlkPSLot6/lvoQiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"},20604:function(e,t,s){s.r(t),s.d(t,{default:function(){return It}});var r=s(74848),a=s(96540),i=s(69733),l=s(54625),n=s(39661),o=s(9404),c=s.n(o),d=s(95882),u=s(29925),p=s(86382),h=s(86236),g=s(42651),_=s(68746),m=s(76375),y=s(8665),x=s(3169),v=s(83969),T=s(67887),j=s(28103),S=s(13734),N=s(34063),f=s(85018),O=s(30476),b=s(22301),D=s(30434),C=s(39161),w=s(75328),M=s(28681),k=s(87813),A=s(92643),Y=s(65115),I=s(77755),G=s(47869),L=s(91549),E=s(40961),R=s(90961),U=s(5556),P=s.n(U),z=s(20805),F=s(9469);function H(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function $(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},r=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(s).filter(function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable}))),r.forEach(function(t){H(e,t,s[t])})}return e}function V(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,r)}return s}(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))}),e}const{isMobile:B}=(0,F.A)();class Q extends a.PureComponent{componentDidMount(){this.setselectListElWidth()}setselectListElWidth(){const{shouldBodyWrap:e,width:t,rootRef:s}=this.props,r=this.selectListEl.current,a=r.parentNode.parentNode.clientWidth;if(e){const e=s&&s.current&&s.current.clientWidth;r.style.width=`${t||e||100}px`}else r.style.width=`${a}px`}hoverEvent(e){const{hoverEvent:t,showType:s,isFlashOrder:r}=this.props;"hover"===s&&(e&&t&&t(),r?this.showOrHide(!1):this.showOrHide(e))}clickEvent(){const{clickEvent:e,showType:t}=this.props;"click"===t&&(!this.clickShow&&e&&e(),this.clickShow=!this.clickShow,this.showOrHide(this.clickShow))}touchEvent(){const{selectListCls:e}=this.state;this.showOrHide("new-select-slide-down"!==e)}blurEvent(){this.clickShow=!1,this.showOrHide(!1)}showOrHide(e){this.setselectListElWidth(),this.setState({arrowCls:e?"new-select-arrow-rotate":"new-select-arrow-rotate-reset",selectListCls:e?"new-select-slide-down":""})}renderSelectList(){const{selectListCls:e}=this.state,{selectList:t,theme:s,paddingStyle:a,bodyWrapperClassName:i,shouldBodyWrap:l,width:n,ulClassName:o}=this.props;let c;c=l?e=>({onMouseDown:t=>{t.preventDefault(),e.onClick(...e.clickArgs),this.hoverEvent(!1)}}):e=>({onClick:t=>{e.onClick(...e.clickArgs),this.hoverEvent(!1)}});const d=(0,r.jsx)("ul",{ref:this.selectListEl,className:`new-select-list ${o||""} ${e}`,children:t&&t.map(e=>(0,r.jsxs)("li",V($({style:a||{}},c(e)),{children:[(0,r.jsx)("span",{className:"number-font",onMouseEnter:t=>{e.tip&&(t.target.parentNode.children[1].style.display="block")},onMouseLeave:t=>{e.tip&&(t.target.parentNode.children[1].style.display="none")},children:e.itemText}),e.tip&&(0,r.jsxs)("div",{className:e.isTipLeft?"new-select-item-tip-left":"new-select-item-tip",children:[e.tip,(0,r.jsx)("span",{className:"new-select-item-tip-arrow"})]})]}),e.itemText))});if(!l)return d;const{top:u,left:p}=this.getBodyWrapModalTopLeft();return(0,r.jsx)(z.A,{theme:s,className:`new-select-body-wrap-modal-wrapper new-select-body-wrap-modal-wrapper-${s} ${i}`,width:n,top:u,left:p,children:d})}render(){const{arrowCls:e}=this.state,{theme:t,zIndex:s,className:a}=this.props,i=this.isSupportTouch?{onClick:this.touchEvent}:{onClick:this.clickEvent,onMouseLeave:()=>this.hoverEvent(!1),onMouseEnter:()=>this.hoverEvent(!0)};return(0,r.jsxs)("div",V($({tabIndex:0,ref:this.roolEl},i),{onBlur:this.blurEvent,className:`new-select-${t} ${B?"new-select-mobile":""} new-select ${a||""}`,style:{zIndex:s||v.p9X},children:[(0,r.jsxs)("div",{className:"new-select-arrow-wrapper",children:[(0,r.jsx)("span",{className:"new-select-arrow-line border-input"}),(0,r.jsx)("span",{className:`new-select-arrow ${e}`})]}),this.renderSelectList()]}))}constructor(e){super(e),H(this,"getBodyWrapModalTopLeft",()=>{if(!this.roolEl.current)return{top:0,left:0};const{top:e,left:t}=this.roolEl.current.getBoundingClientRect();return{top:e,left:t}}),this.state={arrowCls:"",selectListCls:""},this.isSupportTouch="ontouchstart"in window,this.clickShow=!1,this.selectListEl=a.createRef(),this.roolEl=a.createRef(),this.blurEvent=this.blurEvent.bind(this),this.clickEvent=this.clickEvent.bind(this),this.hoverEvent=this.hoverEvent.bind(this),this.touchEvent=this.touchEvent.bind(this),this.renderSelectList=this.renderSelectList.bind(this)}}H(Q,"defaultProps",{ulClassName:"",shouldBodyWrap:!1,bodyWrapperClassName:"",width:null,left:0,top:0}),Q.propsTypes={clickEvent:P().func,hoverEvent:P().func,showType:P().oneOf(["click","hover"]),theme:P().oneOf(["white","blue","night"]),selectList:P().arrayOf({tip:P().any,select:P().bool,onClick:P().func,clickArgs:P().array,itemText:P().string}),shouldBodyWrap:P().bool};var W,q,K,Z=Q,J=s(9937);class X extends a.Component{render(){const{el:e,children:t}=this.props;let s=0,a=0;if(e){const t=e.getBoundingClientRect();s=t.top,a=t.left}return(0,r.jsx)(z.A,{left:a,top:s,children:t})}}K={el:null}
1,(q="defaultProps")in(W=X)?Object.defineProperty(W,q,{value:K,enumerable:!0,configurable:!0,writable:!0}):W[q]=K;var ee=(0,i.Ng)(function(e){return(0,n.zH)({},e)})(X);class te extends a.PureComponent{priceInputChange(e){this.resetInputErrorBorder(e,!0);const{currentContract:t}=this.props;let s=e.target.value;s=(0,v.JXe)(t,v.WBG,s),void 0!==s&&this.setState({rivalOptimalType:!1,isFlashOrder:!1,closePrice:s})}priceInputFocus(e){this.setSingleLimitVolume("limit"),e?this.setState({rivalOptimalType:!1,isFlashOrder:!1}):this.setState({priceInputFocus:!0})}priceInputBlur(e,t){this.limitVolumeTip(t,/%/.test(t.toString())&&"noNeedToConvert"),this.resetInputErrorBorder(e),this.setState({priceInputFocus:!1})}setRivalPrice(e){this.setSingleLimitVolume(e);const{closeVolume:t}=this.state;this.setState({rivalOptimalType:e,isFlashOrder:!1,closePrice:""}),this.limitVolumeTip(t,/%/.test(t.toString())&&"noNeedToConvert")}setFlashPrice(e){const{currentContract:t}=this.props,{isFlashOrder:s,closeVolume:r}=this.state;this.setSingleLimitVolume("lightning"),s||(this.setState({isFlashOrder:!0,rivalOptimalType:!1,closePrice:""}),this.limitVolumeTip(r,/%/.test(r.toString())&&"noNeedToConvert"),this.percentClick(null,"100%",t))}volumeInputChange(e,t){const{tradingUnitType:s,projectType:r}=this.props,{rivalOptimalType:a,isFlashOrder:i,closeVolume:l}=this.state,n=i?"lightning":a||"limit";if(this.setSingleLimitVolume(n),t&&!t.target){const e=t;this.setState({closeVolume:e})}else{let a=t.target.value;if(Math.floor(this.getConverVolume(a))<=this.limitVolume?this.resetInputErrorBorder(t):this.limitVolumeTip(a),a?this.setState({isPercerntShow:!1}):this.setState({isPercerntShow:!0}),s===v._rs)a=1===a.length?a.replace(/[^1-9]/g,""):a.replace(/\D/g,""),a=(0,v.JXe)(e,v.Dw3,a);else if(s===v.x3H)a=(0,v.JXe)(e,v.Dw3,a);else{const t=r===v.I$g?v.IBb:v.rdU;a=(0,v.JXe)(e,v.Dw3,a,t,l)}(a||""===a)&&this.setState({closeVolume:a})}}volumeInputFocus(e){0===this.limitVolume&&this.setSingleLimitVolume("limit");const t=e.target.value;(/%/.test(t)||""===t)&&this.setState({isPercerntShow:!0})}volumeInputBlur(e,t){this.setState({isPercerntShow:!1})}limitVolumeTip(e,t,s){const{language:r,currentContract:a,tradingUnitType:i,projectType:l}=this.props,n=(0,v.Ov2)(a,"symbol");e="noNeedToConvert"===t?e:Math.floor(this.getConverVolume(e));const o=/%/.test(e.toString());s=s||(o?e.toString():null),e=/%/.test(e.toString())?this.getNumberVolume(e):e;const c=this.getFinalPrice(!0);let d="";if(i===v._rs)d=(0,T.YG)(r,"single_limit_volume").replace("{limitVolume}",this.limitVolume).replace("{unit}",(0,T.YG)(r,"sheet"));else if(i===v.x3H){const e=(0,v.Ov2)(a,"pair",""),t=(0,v.wUP)(e);d=(0,T.YG)(r,"single_limit_volume").replace("{limitVolume}",(0,v.u7z)({currentContract:a,convertedPrice:c,sheet:this.limitVolume,isFormat:!0})).replace("{unit}",t)}else{const e=l===v.I$g,t=(0,v.NGl)(a,c,i,this.limitVolume,!1,e);d=(0,T.YG)(r,"single_limit_volume").replace("{limitVolume}",(0,v.HwT)(a,t,!0,e?v.IBb:v.rdU)).replace("{unit}",n)}return e&&e>this.limitVolume?("100%"!==s?this.setState({volumeInputErrorTip:d},()=>{this.getDomNodeAndFocus(this.closeVolumnInputWrapper)}):this.getDomNodeAndBlur(this.closeVolumnInputWrapper),!0):(this.getDomNodeAndBlur(this.closeVolumnInputWrapper),!1)}setSingleLimitVolume(e){const{limitVolumeList:t,currentContract:s,projectType:r}=this.props;if(s)return t&&0!==t.size?void(0,v.X$e)(r,{contractFn:r=>{try{const r=t.toJS().find(t=>t.order_price_type===e).list.find(e=>e.symbol===s.get("symbol")).types.find(e=>e.contract_type===s.get("contract_type"));this.limitVolume=r.close_limit}catch(e){this.limitVolume=Number.MAX_VALUE}},swapFn:r=>{try{const r=t.toJS().find(t=>t.order_price_type===e).list.find(e=>e.symbol===s.get("symbol"));this.limitVolume=r.close_limit}catch(e){this.limitVolume=Number.MAX_VALUE}},linearSwapFn:r=>{try{const r=t.toJS().find(t=>t.order_price_type===e).list.find(e=>e.contract_code===s.get("contract_code"));this.limitVolume=r.close_limit}catch(e){this.limitVolume=Number.MAX_VALUE}}}):(this.buyLimitVolume=Number.MAX_VALUE,void(this.sellLimitVolume=Number.MAX_VALUE))}getDomNodeAndBlur(e){const t=E.findDOMNode(e.current),s=t.children[0],r=t.children[1].children[0];s.blur(),s.classList.remove("error"),r.style.display="none"}renderInputPercent(e){const t=[];return["10%","20%","50%","100%"].forEach((s,a)=>{t.push((0,r.jsx)("li",{className:"secondary-font",onMouseDown:t=>this.percentClick(t,s,e),children:s},`percent-li-${a}`))}),t}percentClick(e,t,s){const{positionData:r}=this.props,a=(0,v.Ov2)(r,"available"),i=Math.floor((0,L.lK)(a,t.replace("%",""))/100);this.limitVolumeTip(i,"noNeedToConvert",t),this.chooseClosePositionPercent(s,t,e)}chooseClosePositionPercent(e,t,s){s&&s.target&&s.target.parentNode&&this.setState({isPercerntShow:!1}),this.volumeInputChange(e,t)}getDomNodeAndFocus(e){const t=E.findDOMNode(e.current),s=E.findDOMNode(this.flashCloseButton.current),r=t.children[0],a=t.children[1].children[0];
1r.focus(),r.classList.add("error"),a.style.display="block";const i=setTimeout(()=>{clearTimeout(i),s.classList.add("error")},0),l=setTimeout(()=>{clearTimeout(l),a.style.display="none"},1e3)}resetInputErrorBorder(e,t){const s=E.findDOMNode(this.flashCloseButton.current);e.target&&e.target.classList.remove("error"),t&&s.classList.remove("error")}getFinalPrice(e){const{close:t}=this.props;let{closePrice:s,rivalOptimalType:r}=this.state;return s=!e&&r?"":s||t,s}getConverVolume(e){const{tradingUnitType:t,currentContract:s,projectType:r}=this.props,a=this.getFinalPrice(!0),i=(0,v.kuS)(r,!1,!1,!0);return t===v.EYu?e=(0,v.COx)(s,e,a,!0,i):t===v.x3H&&(e=(0,v.iGD)({currentContract:s,usdtNum:e,convertedPrice:a})),e}getNumberVolume(e){const{positionData:t}=this.props,s=(0,v.Ov2)(t,"available");return(e=(0,L.lK)(s,e.replace("%",""))/100)<1?Math.ceil(e):Math.floor(e)}orderConfirmCallback(){const{setOrderConfirm:e}=this.props;return(t,s,r)=>{e(t,s,r)}}closePositionClick(e){const{close:t,theme:s,subAccountOrder:a,subUid:i,askList:l,bidList:n,language:o,subUserId:c,tradingUnitType:u,orderConfirm:p,showAssetsTransfer:h,currentContract:g,currentUnit:_,querySubAllPosition:m,positionMode:y}=this.props;let{closePrice:x,closeVolume:j,rivalOptimalType:S,isFlashOrder:N,isCloseBtnCommiting:f}=this.state;if(f)return void d.A.tipWarn((0,T.YG)(o,"order_loading_tips"),s);j=String(j);const O=S||v.l_5;if(!S&&!N&&!x)return void this.getDomNodeAndFocus(this.closePriceInputWrapper);const b=e.get("lever_rate"),D=e.get("direction")===v.Ve5?v.$EK:v.Ve5;x=this.getFinalPrice();const C={openCloseType:N?v.$ZE:v.c1i},w=(0,v.Ov2)(e,"margin_mode"),M=w===v.jB4.CROSS;let k=!1,A=0;if(!j)return void this.setState({volumeInputErrorTip:(0,T.YG)(o,"order_board_rival_count_warn")},()=>{this.getDomNodeAndFocus(this.closeVolumnInputWrapper)});/%/.test(j)?(k="100%"===j,A=(0,v.Ov2)(e,"available"),j=(0,L.lK)(A,j.replace("%",""))/100):j=this.getConverVolume(j),j=j<1?Math.ceil(j):Math.floor(j);const Y=this.orderConfirmCallback(),I={theme:s,close:t,subUid:i,askList:l,positionMode:y,isOnlyReduce:!0,bidList:n,language:o,direction:D,currentUnit:_,orderConfirm:p,startCallback:()=>{this.setState({isCloseBtnCommiting:!0})},errorCallback:e=>{const{projectType:t,currentUnit:s}=this.props;if(this.setState({isCloseBtnCommiting:!1}),1047===e.errorCode){const a=(0,v.Ov2)(g,"contract_code"),i=(0,v.Ov2)(g,"symbol"),l=(0,v.kuS)(t,i,a,M?s:a),n=(0,v.kuS)(t,J.Qc,J.L_,M?J.g2:J.Fm),c=(0,r.jsx)("button",{onClick:()=>{h(l,n)},children:(0,T.YG)(o,"transfer")});d.A.noticeError((0,T.YG)(o,"notice_title"),e.errorMsg,c)}},planOrFlashOrTrackData:C,orderPriceType:O,tradingUnitType:u,successCallback:()=>{this.setState({rivalOptimalType:!1,isFlashOrder:!1,isPercerntShow:!1,closeVolume:"",isCloseBtnCommiting:!1}),setTimeout(()=>{m(c)},1e3)},price:x,leverageType:b,volume:j,isCloseSubAccount:!0,contract:g,currentBusinessType:(0,v.Ov2)(g,"business_type"),orderConfirmCallback:Y,crossOrIsolated:w,orderType:v.c1i};if(k){const e={checkMinVolume:1};a(Object.assign(I,e))}else{if(this.limitVolumeTip(j,"noNeedToConvert"))return;a(I)}}getTypeList(){const{orderBuyInstructionType:e,language:t}=this.props;return[{onClick:this.setRivalPrice,clickArgs:[v.KmS],itemText:(0,T.YG)(t,"market_price_short"),select:e===v.KmS,tip:!1},{onClick:this.setRivalPrice,clickArgs:[v.Vto],itemText:"BBO",select:e===v.Vto,tip:`BBO${(0,T.YG)(t,"colon")}${(0,T.YG)(t,"rival_price_explanation1")}${(0,T.YG)(t,"rival_price_explanation2")}`},{onClick:this.setRivalPrice,clickArgs:[v.LOh],select:e===v.LOh,itemText:(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",5),tip:!1},{onClick:this.setRivalPrice,clickArgs:[v.T5h],select:e===v.T5h,itemText:(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",10),tip:!1},{onClick:this.setRivalPrice,clickArgs:[v.u$q],select:e===v.u$q,itemText:(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",20),tip:!1}]}changeFlashCloseGear(){const{currentContract:e,getFlashCloseGearPosition:t}=this.props;e&&t(e.get("contract_code"))}render(){const{zIndex:e,language:t,rootStyle:s,positionData:i,flashCloseGear:l,currentContract:n}=this.props,{closePrice:o,closeVolume:c,isFlashOrder:d,isPercerntShow:u,priceInputFocus:p,rivalOptimalType:h,volumeInputErrorTip:g,isCloseBtnCommiting:_}=this.state,m=d?(0,T.YG)(t,"flash_close_order"):h===v.Vto?(0,T.YG)(t,"rival_price"):h===v.LOh?(0,T.YG)(t,"order_board_optimal_title_price").replace("{optimal}",5):h===v.T5h?(0,T.YG)(t,"order_board_optimal_title_price").replace("{optimal}",10):h===v.u$q?(0,T.YG)(t,"order_board_optimal_title_price").replace("{optimal}",20):h===v.KmS?(0,T.YG)(t,"market_price_short"):o,y=(0,v.Ov2)(i,"direction")===v.Ve5,x=(0,T.YG)(t,y?"close_long":"close_short"),j=this.getTypeList();return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("td",{style:{width:"132px"},children:(0,r.jsxs)("div",{className:"all-position-price-input-root-white",style:s,children:[(0,r.jsx)(R.A,{disableHover:!0,rootStyle:{width:"106px"},tooltipRootStyle:{bottom:"40px"},ref:this.closePriceInputWrapper,tip:(0,T.YG)(t,"order_board_rival_price_warn"),children:(0,r.jsx)("input",{className:"input price-input "+(h||d?"input-disabled-background secondary-font":""),value:m,readOnly:h||d,onClick:e=>{this.setSingleLimitVolume(v.l_5),this.getDomNodeAndBlur(this.closeVolumnInputWrapper),e.target.focu
1s(),this.priceInputFocus(e)},onChange:e=>this.priceInputChange(e),onFocus:()=>this.priceInputFocus(!1),onBlur:e=>this.priceInputBlur(e,c)})}),p&&(0,r.jsx)("span",{className:"price-input-line"}),(0,r.jsx)(Z,{shouldBodyWrap:!0,bodyWrapperClassName:"body-wrapper-position-order-form-list",ulClassName:"body-wrapper-ul-position-order-form-list",width:106,theme:v.CVM.WHITE,zIndex:e,showType:"hover",selectList:j}),(0,r.jsx)(k.A,{style:{width:"22px"},tip:`${(0,T.YG)(t,"market_price_close_order_explanation",{gear:l})}`,children:(0,r.jsx)("button",{ref:this.flashCloseButton,onClick:()=>{this.setFlashPrice()},onMouseEnter:this.changeFlashCloseGear,className:`icon-flash-close rival-price-button border-input ${d?"blue-font":"secondary-font"} ${p?"price-flash-close-blue-border":""}`})})]})}),(0,r.jsx)("td",{style:{width:"80px"},children:(0,r.jsxs)("div",{ref:this.volumeEl,className:"all-position-volume-input-root",children:[(0,r.jsx)(R.A,{disableHover:!0,tip:g,rootStyle:{width:"80px"},ref:this.closeVolumnInputWrapper,tooltipRootStyle:{bottom:"38px"},children:(0,r.jsx)("input",{className:"input volumn-input",value:c,onClick:e=>{this.volumeInputFocus(e)},onBlur:e=>{this.volumeInputBlur(e,c)},onChange:e=>this.volumeInputChange(n,e)})}),(0,r.jsx)(ee,{el:this.volumeEl&&this.volumeEl.current,children:(0,r.jsx)("ul",{className:"position-input-percent-box input-percent-box-white",style:{display:u?"block":"none"},children:this.renderInputPercent(n)})})]})}),(0,r.jsx)("td",{className:"sub-all-position-operate-wrap",children:(0,r.jsx)("div",{className:"close-order-button-wrap",children:(0,r.jsx)("button",{type:"button",style:_?v.bzS:{},className:`${y?"red-button":"green-button"} close-order-button close-order-button-${t}`,onClick:()=>{this.closePositionClick(i)},children:x})})})]})}constructor(e){super(e),this.state={rivalOptimalType:!1,isFlashOrder:!1,closePrice:"",isPercerntShow:!1,closeVolume:"",priceInputFocus:!1,volumeInputErrorTip:"",isCloseBtnCommiting:!1},this.limitVolume=Number.MAX_VALUE,this.closePriceInputWrapper=a.createRef(),this.closeVolumnInputWrapper=a.createRef(),this.flashCloseButton=a.createRef(),this.volumeEl=a.createRef(),this.setRivalPrice=this.setRivalPrice.bind(this),this.changeFlashCloseGear=this.changeFlashCloseGear.bind(this)}}var se=(0,i.Ng)(function(e){return{theme:v.CVM.WHITE,language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),orderConfirm:e.default.appReducer.get("orderConfirm")}},function(e){return(0,n.zH)({showAssetsTransfer:J.Sb},e)})(te),re=s(36206),ae=s(47576),ie=s(80907),le=s(47011),ne=s(11312),oe=s(64719),ce=s(73537),de=s(41609),ue=s(14444),pe=s(91407);function he(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function ge(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},r=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(s).filter(function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable}))),r.forEach(function(t){he(e,t,s[t])})}return e}function _e(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),s.push.apply(s,r)}return s}(Object(t)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))}),e}const me={limit:"transaction_limited_price_order",post_only:"trade_order_board_high_limit_post_only",ioc:"trade_order_board_high_limit_ioc",fok:"trade_order_board_high_limit_fok"},ye=(0,v.a_H)()||v.Dhg;function xe({close:e,theme:t,price:s,volume:i,subUid:l,bidList:n,askList:o,contract:c,language:d,direction:u,orderType:p,currentUnit:h,leverageType:g,isTakerMaker:_,orderConfirm:m,startCallback:y,errorCallback:x,crossOrIsolated:j,planOrFlashOrTrackData:S,orderPriceType:N,tradingUnitType:f,successCallback:O,orderHighLimitType:b,orderConfirmCallback:D,currentBusinessType:C,checkMinVolume:w=0,stopLosssData:M,positionList:k,positionMode:A=G.SA.DUAL_SIDE,isOnlyReduce:Y=!1}){if(!c)return void re.A.error((0,T.Tf)("not_found_contract"));const I=c.get("pair")||c.get("contract_code"),L=(0,v.wUP)(I)||G.Mk.USDT;if(0===parseFloat(s))return void re.A.error((0,T.Tf)("input_price_not_empty"));const{openCloseType:E}=S,R=(0,v.QgQ)({contract:c,language:d,type:C===v.e8W.FUTURES?"linear_futures":"linear_swap"}),U=(0,pe.A)(()=>
1ye===v.I$g?ie.GK[j]:ye===v.qIS?ie.$4:ye===v.Dhg?ie.yG:{});let P={};const z=U;if(P.sub_uid=String(l),E===v.$ZE)return P=Object.assign(P,{symbol:c.get("symbol"),contract_type:c.get("contract_type"),volume:i,direction:u,contract_code:c.get("contract_code"),order_price_type:b===v.eJy||b===v.Leh?`${N}_${b}`:"",check_min_volume:w,after_cancel_order:1}),void ve(z.LIGHTNING,d,t,P,y,O,x,E);if(E===v.c1i){if(P=Object.assign(P,{symbol:c.get("symbol"),contract_type:c.get("contract_type"),price:s,volume:i,direction:u,reduce_only:A===G.SA.SINGLE_SIDE&&Y?1:0,offset:A===G.SA.SINGLE_SIDE?v.nUc:p,lever_rate:"--"!==g?g:null,order_price_type:b?N===v.l_5||b===v.H2U?b:`${N}_${b}`:N,contract_code:c.get("contract_code"),check_min_volume:w}),u===v.Ve5){if(o.size>0&&(parseFloat(s)-o.get(0).get(0))/o.get(0).get(0)>.01&&"Y"!==m)return void ae.A.confirm({content:(0,T.Tf)("order_price_over_ask_price"),onOk:()=>{ve(z.LIMIT,d,t,P,y,O,x)},maskClosable:!1,okText:(0,T.Tf)("confirm"),cancelText:(0,T.Tf)("cancel"),width:480})}else if(n.size>0&&(parseFloat(s)-n.get(0).get(0))/n.get(0).get(0)<-.01&&"Y"!==m)return void ae.A.confirm({content:(0,T.Tf)("order_price_over_bid_price"),onOk:()=>{ve(z.LIMIT,d,t,P,y,O,x)},maskClosable:!1,okText:(0,T.Tf)("confirm"),cancelText:(0,T.Tf)("cancel"),width:480});if("Y"===m){let l={},m="";u===v.Ve5&&o.size>0&&(parseFloat(s)-o.get(0).get(0))/o.get(0).get(0)>.01&&(m=(0,T.Tf)("order_price_over_ask_price_new")),u===v.$EK&&n.size>0&&(parseFloat(s)-n.get(0).get(0))/n.get(0).get(0)<-.01&&(m=(0,T.Tf)("order_price_over_bid_price_new"));const S=s||e,C=(0,v.h6_)(f,(0,v.zKb)({currentContract:c,sheet:i}),i,(0,v.u7z)({currentContract:c,sheet:i,convertedPrice:S})),w=(0,v.h6_)(f,(0,v.u7z)({currentContract:c,sheet:i,convertedPrice:S}),(0,v.u7z)({currentContract:c,sheet:i,convertedPrice:S}),i),I=(0,v.h6_)(f,L,L,(0,T.Tf)("sheet")),G=(0,v.h6_)(f,P.symbol,(0,T.Tf)("sheet"),L);let E;if(p===v.c1i&&k&&k.size){const e=k.find(e=>{const t=(0,v.Ov2)(e,"direction");return(0,v.Ov2)(e,"contract_code")===c.get("contract_code")&&t!==u});E=e&&(0,v.Ov2)(e,"cost_open","")}l={isOpen:p===v._yM,contractName:R,priceUnit:h,volume:C,volumeUnit:G,convertedVolume:w,convertedVolumeUnit:I,occupiedAssets:p===v._yM?(0,v.Rig)({currentContract:c,price:S,volume:i,lever:g,isLinear:!0}):null,expectedProfit:p===v.c1i&&void 0!==E&&""!==E?(0,ne.y7)({currentContract:c,openPrice:E,closePrice:S,volume:i,lever:g,direction:u,isLinear:!0}):null,occupiedOrProfit:h},N===v.l_5&&(l.price=P.price),N===v.Vto&&(l.orderPriceTypeStr=P.direction===v.Ve5?(0,T.Tf)("latest_sell_first"):(0,T.Tf)("latest_buy_first")),N.match("optimal_")&&(l.orderPriceTypeStr=(0,T.Tf)("order_board_optimal_title").replace("{optimal}",N.split("_")[1]));const U=P.direction===v.Ve5?"green-font":"red-font",F="liq-price-id"+Math.floor(1e3*Math.random()),H=(0,oe.Ow)(_e(ge({language:d,liquidationPriceId:F,errorMessage:m},l),{stopLosssData:M,orderType:p,salesUnit:L,isLinear:!0,positionMode:A,isOnlyReduce:Y}));let $="limit";if(b){const e=P.order_price_type,t=e===v.H2U?[v.H2U]:e.split("_");$=t[t.length-1]}const V=(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("div",{className:"modal-title",children:[(0,r.jsx)("span",{children:(0,T.Tf)(me[$])}),(0,r.jsx)("span",{className:U,style:{paddingLeft:"16px"},children:(0,v.MlF)(P.direction,P.offset,A,d)})]}),(0,r.jsx)("div",{children:H}),(0,r.jsxs)("div",{className:"modal-check",onClick:e=>function(e,t,s){const r=e.target,a=e=>{re.A.error(e.errorMsg)};if("icon-unchecked"===r.className){if("function"==typeof t){t(s?0:"N",()=>{r.className="icon-checked"},a)}}else if("icon-checked"===r.className){"function"==typeof t&&t(s?1:"Y",()=>{r.className="icon-unchecked"},a)}}(e,D,_),children:[(0,r.jsx)("i",{className:"icon-unchecked",style:{marginRight:8}}),(0,r.jsx)("span",{children:(0,T.Tf)("click_no_more_order_confirm")})]})]});return ae.A.confirm({content:V,onOk:()=>{ve(z.LIMIT,d,t,P,y,O,x)},maskClosable:!1,okText:(0,T.Tf)("confirm"),cancelText:(0,T.Tf)("cancel"),width:480}),void(0,ce.hO)({projectType:ye,liquidationPriceId:F,params:_e(ge({},P),{price:S}),language:d,currentContract:c,isLinearCross:j===v.jB4.CROSS})}ve(z.LIMIT,d,t,P,y,O,x)}}function ve(e,t,s,r,a,i,l,n){new ue.A;
1"function"==typeof a&&a(),r.t=Date.now();const o=setTimeout(()=>{clearTimeout(o),le.ok.requestPost(e,r).then(e=>{n===v.$ZE?re.A.success((0,T.Tf)("flash_close_order_success")):re.A.success((0,T.Tf)("order_success")),"function"==typeof i&&i()}).catch(e=>{switch(e.errorCode){case 1060:case 1056:case 1059:case 1057:case 1058:case 1038:case 1048:case 1039:case 1053:case 1054:case 1040:case 1041:case 1104:case 1105:case 1042:case 1043:case 1044:case 1062:case 1051:case 1052:case 1055:case 1206:case 50202:case 50203:case 50205:case 50206:case 50207:case 50204:re.A.error(e.errorMsg||(0,T.Tf)("order_failed"));break;case 1045:re.A.error(e.errorMsg||(0,T.Tf)("leverage_available_tip"));break;case 1100:(0,de.k)(t,!0,e.errorMsg);break;case 1101:(0,de.k)(t,!1,e.errorMsg);break;case 9999:return;default:if(e.errorCode>=5e4)break;re.A.error(e.errorMsg||(0,T.Tf)("order_failed"))}"function"==typeof l&&l(e)})})}function Te(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const je=(0,v.a_H)()||v.Dhg,Se=je===v.I$g;class Ne extends a.PureComponent{UNSAFE_componentWillReceiveProps(e){const{subAccountData:t,language:s}=this.props;c().is(t,e.subAccountData)||this.queryData(e.subAccountData.get("user_id")),s!==e.language&&t.size>0&&this.queryData(t.get("user_id"))}componentDidMount(){const{subAccountData:e,getLimitVolumeListFn:t}=this.props;t(),e.size>0&&this.queryData(e.get("user_id"))}renderLoading(){const{language:e,allPositionData:t,isAllPositionLoading:s}=this.props;return s?(0,r.jsx)(A.A,{needLoadingHeight:t&&0===t.size}):(0,r.jsx)(M.A,{language:e,dataList:t})}renderDataList(){const{allPositionData:e,productMap:t,language:s,tradingUnitType:a,getFlashCloseGearPositionFn:i,usdtPriceData:l,convertedCurrency:n,rateUsdt:o,flashCloseGear:d,limitVolumeList:u,subAccountData:p,marketOverviewMap:h}=this.props,{pageIndex:g}=this.state,_=g-1;return e.map((m,y)=>{if(y>=10*g||y<10*_)return null;const x=m.get("contract_code"),j=(0,v.Ov2)(m,"symbol"),S=m.get("position_mode"),N=(0,v.kuS)(je,j,x.split("-")[0],""),f=m.get("contract_type");let O;if(Se){const e=m.get("business_type")||"swap",s=(0,v.Ov2)(m,"pair");O=(0,v.amw)({linearProductMap:t,businessType:e,pair:s})}else O=t.get(j);O=O?O.merge(m):null;const b=(0,v.Ov2)(m,"profit_rate");let D=(0,v.Ov2)(l,`${j.toLowerCase()}usdt`);D=(0,v.kuS)(je,D,D,1);const C=(0,v.Ov2)(m,"profit");let w=(0,v.HwT)(O,C),M=(0,v.ZVp)((0,v.Etd)((0,L.lK)(C,D),n,o)),k="main-list-font";b>0?(k="green-font",w="+"+w):b<0&&(k="red-font"),M="--"===M?M:`${b>0?"+":""}${M} ${n.toUpperCase()}`;const A=(0,v.Ov2)(m,"direction")===v.Ve5,Y=(0,v.kuS)(je,(0,v.MoM)(m),x,this.getLinearSwapShortType(O)),I=(0,v.Ov2)((0,v.Ov2)(h,Y),"close"),E=!("zh-CN"===s||"zh-HK"===s||"zh-TC"===s||"ko-KR"===s),R="futures"===m.get("business_type")?"linear_futures":"linear_swap",U=(0,v.kuS)(je,`${j}${E?" ":""}${(0,T.YG)(s,f)}·${(0,T.YG)(s,A?"much":"void")}·${(0,v.Ov2)(m,"lever_rate")}X`,`${(0,v.Vgt)(x)}·${(0,T.YG)(s,A?"much":"void")}·${(0,v.Ov2)(m,"lever_rate")}X`,`${(0,v.QgQ)({contract:m,language:s,type:R,shouldContractType:!0,shouldTime:!1})}·${(0,T.YG)(s,A?"much":"void")}·${(0,v.Ov2)(m,"lever_rate")}X`);let P="--",z="--";a===v.x3H?(P=(0,v.u7z)({currentContract:O,convertedPrice:I,sheet:(0,v.Ov2)(m,"volume"),isFormat:!0}),z=(0,v.u7z)({currentContract:O,convertedPrice:I,sheet:(0,v.Ov2)(m,"available"),isFormat:!0})):(P=(0,v.NGl)(O,I,a,(0,v.Ov2)(m,"volume"),!0,je===v.I$g),z=(0,v.NGl)(O,I,a,(0,v.Ov2)(m,"available"),!0,je===v.I$g));const F=(0,v.wUP)(x)||G.Mk.USDT,H=(0,v.Ov2)(p,"user_id"),$=(0,v.Ov2)(p,"uid");return(0,r.jsxs)("tr",{className:"table-body-line",children:[(0,r.jsxs)("td",{className:(A?"green-font":"red-font")+" thd-text-left",style:{paddingLeft:"30px",textIndent:0},children:[U,Se&&(0,r.jsx)("span",{className:"table-body-td-border-text",children:(0,v.WH_)((0,v.Ov2)(m,v.gOk),(0,r.jsx)("span",{className:"table-body-td-cross-isolated",children:(0,T.YG)(s,"full_position")}),(0,r.jsx)("span",{className:"table-body-td-cross-isolated",children:(0,T.YG)(s,"chase_position")}))})]}),(0,r.jsx)("td",{className:"td-right",children:(0,v.GWQ)(O,(0,v.Ov2)(m,"cost_open"))}),(0,r.jsx)("td",{className:"td-right",children:(0,v.GWQ)(O,(0,v.Ov2)(m,"cost_hold"))}),(0,r.jsxs)("td",{className:"td-right",children:[(0,v.HwT)(O,(0,v.Ov2)(m,"position_margin"))," ",N]}),(0,r.jsxs)("td",{className:"td-right",children:[(0,v.HwT)(O,(0,v.Ov2)(m,"profit_unreal"))," ",N]}),(0,r.jsxs)("td",{className:"td-right",children:[(0,r.jsxs)("p",{children:[w," ",N]}),(0,r.jsxs)("p",{className:"secondary-font",children:["â ",M]})]}),(0,r.jsx)("td",{className:`td-right ${k}`,children:(0,v.l9T)(b,"+")}),(0,r.jsxs)("td",{className:"td-right",children:[" ",z,"  ",(0,r.jsx)("span",{className:"secondary-font",children:"|"})," ",P]}),(0,r.jsx)(se,{close:I,subUid:$,positionMode:S,subAccountOrder:xe,positionData:m,subUserId:H,currentUnit:F,tableWrap:this.tableWrap,projectType:je,askList:c().fromJS([]),bidList:c().fromJS([]),flashCloseGear:d,limitVolumeList:u,tradingUnitType:a,currentContract:O,querySubAllPosition:this.queryData,zIndex:e.size-y,getFlashCloseGearPosition:i})]},y)})}goPage(e){this.setState({pageIndex:e})}render(){const{language:e,allPositionData:t,tradingUnitType:s}=this.props,{pageIndex:a,crossIsolatedType:i}=this.state,l=Math.ceil(t.size/10),n=G.Mk.USDT,o=(0,v.h6_)(s,(0,T.YG)(e,"transaction_data_query_ceil_
1coin"),(0,T.YG)(e,"sheet"),n),c=(0,v.kuS)(je,"USD","USD",""),d=(0,v.kuS)(je,(0,T.YG)(e,"transaction_data_query_ceil_coin"),(0,T.YG)(e,"transaction_data_query_ceil_coin"),"");return(0,r.jsxs)("div",{children:[Se&&(0,r.jsx)("div",{className:"sub-current-order-condition",children:(0,r.jsx)("div",{className:"select-condition-wrap",children:(0,r.jsx)(I.A,{rootStyle:{marginLeft:10},datas:(0,v.bmt)(e,v.jB4.ALL_CROSS_ISOLATED),value:i,onClickItem:this.onChangeInfoSwitchType})})}),(0,r.jsxs)("div",{className:"table-box",children:[(0,r.jsxs)("table",{className:""+(Se?"table-all-text-right":""),children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-two-line",children:[(0,r.jsx)("th",{children:(0,r.jsx)("p",{className:"item thd-text-left",children:(0,T.YG)(e,"contract")})}),(0,r.jsxs)("th",{className:"td-right",children:[(0,r.jsx)("div",{className:"item",children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"open_average_price_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"open_average_price")})})}),(0,r.jsx)("p",{children:c&&`(${c})`})]}),(0,r.jsxs)("th",{className:"td-right",children:[(0,r.jsx)("div",{className:"item",children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"position_average_price_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"position_average_price")})})}),(0,r.jsx)("p",{children:c&&`(${c})`})]}),(0,r.jsxs)("th",{className:"td-right",children:[(0,r.jsx)("div",{className:"item",children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"position_require_margin_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"position_margin_new")})})}),(0,r.jsx)("p",{children:d&&`(${d})`})]}),(0,r.jsxs)("th",{className:"td-right",children:[(0,r.jsx)("div",{className:"item",children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"unrealized_profit_loss_explanation1"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"unrealized_profit_loss")})})}),(0,r.jsx)("p",{children:d&&`(${d})`})]}),(0,r.jsxs)("th",{className:"td-right",children:[(0,r.jsx)("div",{className:"item",children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"profit_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"profit")})})}),(0,r.jsx)("p",{children:d&&`(${d})`})]}),(0,r.jsx)("th",{className:"td-right",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"profit_rate_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"profit_rate")})})})}),(0,r.jsxs)("th",{className:"td-right",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"has_close_position_volume_explanation"),children:(0,r.jsx)("u",{className:`tip-text ${e}`,children:(0,T.YG)(e,"has_close_position_volume")})}),"Â |Â ",(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"position_volume_explanation"),children:(0,r.jsx)("u",{className:`tip-text ${e}`,children:(0,T.YG)(e,"position_volume_total")})})]}),(0,r.jsxs)("p",{children:["(",o,")"]})]}),(0,r.jsx)("th",{style:{textAlign:"left"},children:(0,r.jsx)("div",{className:"item",children:(0,T.YG)(e,"price")})}),(0,r.jsxs)("th",{style:{textAlign:"left"},children:[(0,r.jsx)("div",{className:"item",children:(0,T.YG)(e,"volume")}),(0,r.jsxs)("p",{children:["(",o,")"]})]}),(0,r.jsx)("th",{className:"td-right",children:(0,r.jsx)("div",{className:"item",children:(0,T.YG)(e,"operate")})})]})}),(0,r.jsx)("tbody",{children:this.renderDataList()})]}),this.renderLoading(),(0,r.jsxs)("div",{className:"pagination-wrapper",children:[(0,r.jsx)("div",{}),(0,r.jsx)(Y.A,{language:e,totalPage:l,currentPage:a,onPageChange:e=>{this.goPage(e)}})]})]})]})}constructor(e){super(e),Te(this,"errorCallback",e=>{d.A.tipError(e.errorMsg)}),Te(this,"queryData",e=>{const{getSubAllPositionFn:t,subAccountData:s}=this.props,{crossIsolatedType:r}=this.state;(e=e||s.get("user_id"))&&(Se?t({subUserId:e},this.errorCallback,r):t({subUserId:e},this.errorCallback))}),Te(this,"onChangeInfoSwitchType",(e,t)=>{(0,v.b7U)(e.value),this.setState({crossIsolatedType:e.value},()=>{const{subAccountData:e}=this.props;e.size>0&&this.queryData(e.get("user_id"))})}),Te(this,"getLinearSwapShortType",e=>{const t=(0,v.Ov2)(e,"pair");let s="";switch((0,v.Ov2)(e,"contract_type")){case"this_week":s="-CW";break;case"next_week":s="-NW";break;case"quarter":s="-CQ";break;case"next_quarter":s="-NQ";break;case"swap":s=""}return`${t}${s}`}),this.state={pageIndex:1,crossIsolatedType:(0,v.m8r)(v.jB4.ALL_CROSS_ISOLATED)}}}var fe=(0,i.Ng)(function(e){let t=e.default.appReducer.get("convertedCurrency");return t="none"===t?"usd":t,{convertedCurrency:t,rateUsdt:e.default.appReducer.get("rateUsdt"),usdtPriceData:e.default.appReducer.get("usdtPriceData"),language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),allPositionData:(0,v.kuS)(je,e.default.subAccountDetailsReducer.get("allPositionData"),e.default.swapSubA
1ccountDetailsReducer.get("swapAllPositionData"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapAllPositionData")),isAllPositionLoading:(0,v.kuS)(je,e.default.subAccountDetailsReducer.get("isAllPositionLoading"),e.default.swapSubAccountDetailsReducer.get("swapIsAllPositionLoading"),e.default.linearSwapSubAccountDetailsReducer.get("linearIsAllPositionLoading")),productMap:(0,v.kuS)(je,e.default.appReducer.get("productMap"),e.default.appReducer.get("swapProductMap"),e.default.appReducer.get("linearProductMap")),tradingUnitType:(0,v.kuS)(je,e.default.tradeUnitReducer.get("tradingUnitType"),e.default.swapTradeUnitReducer.get("tradingUnitType"),e.default.linearSwapTradeUnitReducer.get("tradingUnitType")),flashCloseGear:(0,v.kuS)(je,e.default.tradeTransactionDataQueryReducer.get("flashCloseGear"),e.default.swapTradeTransactionDataQueryReducer.get("flashCloseGear"),e.default.linearSwapTradeTransactionDataQueryReducer.get("flashCloseGear")),limitVolumeList:(0,v.kuS)(je,e.default.tradeOrderBoardReducer.get("limitVolumeList"),e.default.swapTradeOrderBoardReducer.get("limitVolumeList"),e.default.linearSwapTradeOrderBoardReducer.get("limitVolumeList")),marketOverviewMap:(0,v.kuS)(je,e.default.tradeContractListReducer.get("marketOverviewMap"),e.default.swapTradeContractListReducer.get("marketOverviewMap"),e.default.linearSwapTradeContractListReducer.get("marketOverviewMap")),theme:v.CVM.WHITE}},function(e){const t=(0,v.kuS)(je,u.zR,p.Mg,h.am),s=(0,v.kuS)(je,C.getFlashCloseGearPosition,w.getFlashCloseGearPosition,D.getFlashCloseGearPosition),r=(0,v.kuS)(je,b.Kq,O.D9,f.ml);return(0,n.zH)({getSubAllPositionFn:t,getLimitVolumeListFn:r,getFlashCloseGearPositionFn:s},e)})(Ne),Oe=s(74353),be=s.n(Oe),De=s(67727),Ce=s(49722);function we(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}class Me extends a.PureComponent{returnModalTitleText(){const{revokeContract:e,revokeType:t}=this.state,{language:s}=this.props;let r,a;return this.getContractRadio().map(t=>{e===t.value&&(r=t.titleText)}),this.getTypeRadio().map(e=>{t===e.value&&(a=e.text)}),(0,T.YG)(s,"revoke_order_modal_title").replace("{project}",(0,T.YG)(s,"coin_delivery_future")).replace("{symbolType}",`<span class="yellow-font">${r}</span>`).replace("{orderType}",`<span class="yellow-font">${a}</span>`)}changeRevokeContract(e){const{revokeType:t,crossType:s,direction:r}=this.state;De.WL.setStorage("sub_account_contract_cancel_order_default_1",JSON.stringify({revokeContract:e,crossType:s,revokeType:t,direction:r})),this.setState({revokeContract:e})}changeRevokeType(e){const{revokeContract:t,crossType:s,direction:r}=this.state;De.WL.setStorage("sub_account_contract_cancel_order_default_1",JSON.stringify({revokeContract:t,crossType:s,revokeType:e,direction:r})),this.setState({revokeType:e})}changeDirection(e){const{revokeContract:t,crossType:s,revokeType:r}=this.state;De.WL.setStorage("sub_account_contract_cancel_order_default_1",JSON.stringify({revokeContract:t,crossType:s,revokeType:r,direction:e})),this.setState({direction:e})}render(){const{language:e,isShowRevokeAllModal:t,toggleRevokeAllModal:s}=this.props,{revokeContract:a,revokeType:i,direction:l}=this.state;if(!t)return null;let n,o,c;return this.getContractRadio().map(e=>{a===e.value&&(n=e.text)}),this.getTypeRadio().map(e=>{i===e.value&&(o=e.text)}),this.getDirection().map(e=>{l===e.value&&(c=e.text)}),c||this.setState({direction:""}),(0,r.jsx)(z.A,{children:(0,r.jsx)("div",{className:"sub-account-revoke-modal-wrapper",children:(0,r.jsxs)("div",{className:"revoke-modal-content",children:[(0,r.jsx)("i",{onClick:s,className:"modal-close"}),(0,r.jsx)("div",{className:"modal-title",dangerouslySetInnerHTML:{__html:(0,Ce.a)(this.returnModalTitleText())}}),(0,r.jsxs)("div",{className:"modal-content revoke-order-modal-content",children:[(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"contract")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getContractRadio(),showValueType:"out",value:n,rootClassName:"revoke-select-root",rootStyle:{marginRight:0},itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItem
1Click:({value:e})=>{this.changeRevokeContract(e)}})})]}),(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"financial_type_field")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getTypeRadio(),showValueType:"out",value:o,rootClassName:"revoke-select-root",itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeRevokeType(e)}})})]}),(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"direction")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getDirection(),showValueType:"out",value:c,rootClassName:"revoke-select-root",itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeDirection(e)}})})]})]}),(0,r.jsxs)("div",{className:"modal-footer",children:[(0,r.jsx)("button",{onClick:s,className:"modal-revoke-button",children:(0,T.YG)(e,"cancel")}),(0,r.jsx)("button",{onClick:this.onConfirm,className:"modal-confirm-button",children:(0,T.YG)(e,"confirm")})]})]})})})}constructor(e){super(e),we(this,"getContractRadio",()=>{const{language:e}=this.props;return[{value:"",text:(0,T.YG)(e,"all"),titleText:(0,T.YG)(e,"all_symbol_all_cycle")}]}),we(this,"getTypeRadio",()=>{const{language:e}=this.props;return[{value:"",text:(0,T.YG)(e,"all")},{value:"limit",text:(0,T.YG)(e,"limit_price")},{value:"trigger",text:(0,T.YG)(e,"plan")},{value:"tpsl_trigger",text:(0,T.YG)(e,"stop_loss_stop_profit")},{value:"track_trigger",text:(0,T.YG)(e,"track")}]}),we(this,"getDirection",()=>{const{language:e}=this.props,{revokeType:t}=this.state;return"tpsl_trigger"===t?[{value:"",text:(0,T.YG)(e,"all")},{value:"close_short",text:(0,T.YG)(e,"close_short")},{value:"close_long",text:(0,T.YG)(e,"close_long")}]:[{value:"",text:(0,T.YG)(e,"all")},{value:"open_long",text:(0,T.YG)(e,"open_long")},{value:"close_short",text:(0,T.YG)(e,"close_short")},{value:"open_short",text:(0,T.YG)(e,"open_short")},{value:"close_long",text:(0,T.YG)(e,"close_long")}]}),we(this,"onConfirm",()=>{const{theme:e,language:t,remvokeAllSubAccountOrder:s,queryData:r,toggleRevokeAllModal:a,subUserId:i}=this.props,{revokeType:l,direction:n}=this.state,o={};if(o.subUid=i,l&&(o.orderType=l),n)switch(n){case"open_long":o.offset=v.xL3.OPEN,o.direction=v.d_1.LONG;break;case"close_short":o.offset=v.xL3.CLOSE,o.direction=v.d_1.LONG;break;case"open_short":o.offset=v.xL3.OPEN,o.direction=v.d_1.SHORT;break;case"close_long":o.offset=v.xL3.CLOSE,o.direction=v.d_1.SHORT}s({requestParam:o,successCallback:s=>{s&&s.length>0?d.A.tipWarn(`${s.join("ã")} ${(0,T.YG)(t,"contracts_revoke_order_failed")}`,e):d.A.tipOk((0,T.YG)(t,"revoke_order_request_success"),e),setTimeout(()=>{r()},3e3)},errorCallback:s=>{const r=s||(0,T.YG)(t,"revoke_order_failed");d.A.tipWarn(r,e)}}),a()});const t=JSON.parse(De.WL.getStorage("sub_account_contract_cancel_order_default_1"))||{};if(t){const{revokeContract:e,revokeType:s,direction:r}=t;this.state={revokeContract:e||"",revokeType:s||"",direction:r||""}}else this.state={revokeContract:"",revokeType:"",direction:""}}}var ke=(0,i.Ng)(function(e){return{language:e.default.appReducer.get("language"),theme:e.default.appReducer.get("theme")}},function(e){return(0,n.zH)(C,e)})(Me);function Ae(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}class Ye extends a.PureComponent{returnModalTitleText(){const{language:e}=this.props,{revokeContract:t,revokeType:s}=this.state;let r,a;return this.getContractRadio().map(e=>{t===e.value&&(r=e.titleText)}),this.getTypeRadio().map(e=>{s===e.value&&(a=e.text)}),(0,T.YG)(e,"revoke_order_modal_title").replace("{project}",(0,T.YG)(e,"swap_s")).replace("{symbolType}",`<span class="yellow-font">${r}</span>`).replace("{orderType}",`<span class="yellow-font">${a}</span>`)}changeRevokeContract(e){const{revokeType:t,crossType:s,direction:r}=this.state;De.WL.setStorage("sub_account_swap_cancel_order_default_1",JSON.stringify({revokeContract:e,crossType:s,revokeType:t,direction:r})),this.setState({revokeContract:e})}changeRevokeType(e){const{revokeContract:t,crossType:s,direction:r}=this.state;De.WL.setStorage("sub_account_swap_cancel_order_default_1",JSON.stringify({revokeContract:t,crossType:s,revokeType:e,direction:r})),this.setState({revokeType:e})}changeDirection(e){const{revokeContract:t,crossType:s,revokeType:r}=this.state;De.WL.setStorage("sub_account_swap_cancel_order_default_1",JSON.stringify({revokeContract:t,crossType:s,revokeType:r,direction:e})),this.setState({direction:e})}render(){const{language:e,isShowRevokeAllModal:t,toggleRevokeAllModal:s}=this.props,{revokeContract:a,revokeType:i,direction:l}=this.state;if(!t)return null;let n,o,c;return this.getContractRadio().map(e=>{a===e.value&&(n=e.text)}),this.getTypeRadio().map(e=>{i===e.value&&(o=e.text)}),this.getDirection().map(e=>{l===e.value&&(c=e.text)}),c||this.setState({direction:""}),(0,r.jsx)(z.A,{children:(0,r.jsx)("div",{className:"swap-sub-account-revoke-modal-wrapper",children:(0,r.jsxs)("div",{className:"revoke-modal-content",children:[(0,r.jsx)("i",{onClick:s,className:"modal-close"}),(0,r.jsx)("div",{className:"modal-title",dangerouslySetInnerHTML:{__html:(0,Ce.a)(this.returnModalTitleText())}}),(0,r.jsxs)("div",{className:"modal-content revoke-order-modal-content",children:[(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"contract")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getContractRadio(),showValueType:"out",value:n,rootClassName:"revoke-select-root",rootStyle:{marginRight:0},itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItem
1Click:({value:e})=>{this.changeRevokeContract(e)}})})]}),(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"financial_type_field")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getTypeRadio(),showValueType:"out",value:o,rootClassName:"revoke-select-root",rootStyle:{marginRight:0},itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeRevokeType(e)}})})]}),(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"direction")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getDirection(),showValueType:"out",value:c,rootClassName:"revoke-select-root",itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeDirection(e)}})})]})]}),(0,r.jsxs)("div",{className:"modal-footer",children:[(0,r.jsx)("button",{onClick:s,className:"modal-revoke-button",children:(0,T.YG)(e,"cancel")}),(0,r.jsx)("button",{onClick:this.onConfirm,className:"modal-confirm-button",children:(0,T.YG)(e,"confirm")})]})]})})})}constructor(e){super(e),Ae(this,"getContractRadio",()=>{const{language:e}=this.props;return[{value:"",text:(0,T.YG)(e,"all"),titleText:(0,T.YG)(e,"all_symbol")}]}),Ae(this,"getTypeRadio",()=>{const{language:e}=this.props;return[{value:"",text:(0,T.YG)(e,"all")},{value:"limit",text:(0,T.YG)(e,"limit_price")},{value:"trigger",text:(0,T.YG)(e,"plan")},{value:"tpsl_trigger",text:(0,T.YG)(e,"stop_loss_stop_profit")},{value:"track_trigger",text:(0,T.YG)(e,"track")}]}),Ae(this,"getDirection",()=>{const{language:e}=this.props,{revokeType:t}=this.state;return"tpsl_trigger"===t?[{value:"",text:(0,T.YG)(e,"all")},{value:"close_short",text:(0,T.YG)(e,"close_short")},{value:"close_long",text:(0,T.YG)(e,"close_long")}]:[{value:"",text:(0,T.YG)(e,"all")},{value:"open_long",text:(0,T.YG)(e,"open_long")},{value:"close_short",text:(0,T.YG)(e,"close_short")},{value:"open_short",text:(0,T.YG)(e,"open_short")},{value:"close_long",text:(0,T.YG)(e,"close_long")}]}),Ae(this,"onConfirm",()=>{const{language:e,theme:t,remvokeAllSubAccountOrder:s,queryData:r,toggleRevokeAllModal:a,subUserId:i}=this.props,l={};l.subUid=i;const{revokeType:n,direction:o}=this.state;if(n&&(l.orderType=n),o)switch(o){case"open_long":l.offset=v.xL3.OPEN,l.direction=v.d_1.LONG;break;case"close_short":l.offset=v.xL3.CLOSE,l.direction=v.d_1.LONG;break;case"open_short":l.offset=v.xL3.OPEN,l.direction=v.d_1.SHORT;break;case"close_long":l.offset=v.xL3.CLOSE,l.direction=v.d_1.SHORT}s({requestParam:l,successCallback:s=>{s&&s.length>0?d.A.tipWarn(`${(0,T.YG)(e,"order_id")}${s.join("ã")}${(0,T.YG)(e,"revoke_order_failed")}`,t):d.A.tipOk((0,T.YG)(e,"revoke_order_request_success"),t),setTimeout(()=>{r()},3e3)},errorCallback:s=>{const r=s||(0,T.YG)(e,"revoke_order_failed");d.A.tipWarn(r,t)}}),a()});const t=JSON.parse(De.WL.getStorage("sub_account_swap_cancel_order_default_1"))||{};if(t){const{revokeContract:e,revokeType:s,direction:r}=t;this.state={revokeContract:e||"",revokeType:s||"",direction:r||""}}else this.state={revokeContract:"",revokeType:"",direction:""}}}var Ie=(0,i.Ng)(function(e){return{language:e.default.appReducer.get("language"),theme:e.default.appReducer.get("theme")}},function(e){return(0,n.zH)(w,e)})(Ye);function Ge(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}class Le extends a.PureComponent{changeRevokeContract(e){const{revokeType:t,crossType:s,direction:r}=this.state;De.WL.setStorage("sub_account_linear_swap_cancel_order_default_1",JSON.stringify({revokeContract:e,crossType:s,revokeType:t,direction:r})),this.setState({revokeContract:e})}changeRevokeCrossType(e){const{revokeType:t,revokeContract:s,direction:r}=this.state;De.WL.setStorage("sub_account_linear_swap_cancel_order_default_1",JSON.stringify({revokeContract:s,crossType:e,revokeType:t,direction:r})),this.setState({crossType:e})}changeRevokeType(e){const{revokeContract:t,crossType:s,direction:r}=this.state;De.WL.setStorage("sub_account_linear_swap_cancel_order_default_1",JSON.stringify({revokeContract:t,crossType:s,revokeType:e,direction:r})),this.setState({revokeType:e})}changeDirection(e){const{revokeContract:t,crossType:s,revokeType:r}=this.state;De.WL.setStorage("sub_account_linear_swap_cancel_order_default_1",JSON.stringify({revokeContract:t,crossType:s,revokeType:r,direction:e})),this.setState({direction:e})}render(){const{language:e,isShowRevokeAllModal:t,toggleRevokeAllModal:s}=this.props,{crossType:a,revokeContract:i,revokeType:l,direction:n}=this.state;if(!t)return null;let o,c,d,u;this.getCrossTypeRadio().map(e=>{a===e.value&&(o=e.text)}),this.getContractRadio().map(e=>{i===e.value&&(c=e.text)}),this.getTypeRadio().map(e=>{l===e.value&&(d=e.text)});const p=this.getDirection();return p.map(e=>{n===e.value&&(u=e.text)}),u||this.setState({direction:""}),(0,r.jsx)(z.A,{children:(0,r.jsx)("div",{className:"linear-swap-sub-account-revoke-modal-wrapper",children:(0,r.jsxs)("div",{className:"revoke-modal-content",children:[(0,r.jsx)("i",{onClick:s,className:"modal-close"}),(0,r.jsx)("div",{className:"modal-title",dangerouslySetInnerHTML:{__html:(0,Ce.a)(this.returnModalTitleText())}}),(0,r.jsxs)("div",{className:"modal-content revoke-order-modal-content",children:[(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"account")}
1)}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getCrossTypeRadio(),showValueType:"out",value:o,rootClassName:"revoke-select-root",rootStyle:{marginRight:0},itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeRevokeCrossType(e)}})})]}),(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"contract")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getContractRadio(),showValueType:"out",value:c,rootClassName:"revoke-select-root",rootStyle:{marginRight:0},itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeRevokeContract(e)}})})]}),(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"financial_type_field")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:this.getTypeRadio(),showValueType:"out",value:d,rootClassName:"revoke-select-root",rootStyle:{marginRight:0},itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeRevokeType(e)}})})]}),(0,r.jsxs)("div",{className:"revoke-order-list",children:[(0,r.jsx)("div",{className:"revoke-order-list-left",children:(0,r.jsx)("div",{children:(0,T.YG)(e,"direction")})}),(0,r.jsx)("div",{className:"revoke-order-list-right",children:(0,r.jsx)(j.A,{className:"select-wrapper",language:e,datas:p,showValueType:"out",value:u,rootClassName:"revoke-select-root",rootStyle:{marginRight:0},itemRootStyle:p.length>=5?{height:180}:{},itemClassName:"revoke-select-item",showKey:"text",disabled:!0,onSelectItemClick:({value:e})=>{this.changeDirection(e)}})})]})]}),(0,r.jsxs)("div",{className:"modal-footer",children:[(0,r.jsx)("button",{onClick:s,className:"modal-revoke-button",children:(0,T.YG)(e,"cancel")}),(0,r.jsx)("button",{onClick:this.onConfirm,className:"modal-confirm-button",children:(0,T.YG)(e,"confirm")})]})]})})})}constructor(e){super(e),Ge(this,"getContractRadio",()=>{const{language:e}=this.props;return[{value:"",text:(0,T.YG)(e,"all"),titleText:(0,T.YG)(e,"all_symbol")}]}),Ge(this,"getCrossTypeRadio",()=>{const{language:e}=this.props;return[{value:"",text:(0,T.YG)(e,"all"),titleText:(0,T.YG)(e,"cross_and_isolated")},{value:v.jB4.CROSS,text:(0,T.YG)(e,"cross"),titleText:(0,T.YG)(e,"cross")},{value:v.jB4.ISOLATED,text:(0,T.YG)(e,"isolated"),titleText:(0,T.YG)(e,"isolated")}]}),Ge(this,"getTypeRadio",()=>{const{language:e}=this.props;return[{value:"",text:(0,T.YG)(e,"all")},{value:"limit",text:(0,T.YG)(e,"limit_price")},{value:"trigger",text:(0,T.YG)(e,"plan")},{value:"tpsl_trigger",text:(0,T.YG)(e,"stop_loss_stop_profit")},{value:"track_trigger",text:(0,T.YG)(e,"track")}]}),Ge(this,"getDirection",()=>{const{language:e}=this.props,{revokeType:t}=this.state;return"tpsl_trigger"===t?[{value:"",text:(0,T.YG)(e,"all")},{value:"close_short",text:(0,T.YG)(e,"close_short")},{value:"close_long",text:(0,T.YG)(e,"close_long")}]:[{value:"",text:(0,T.YG)(e,"all")},{value:"open_long",text:(0,T.YG)(e,"open_long")},{value:"close_short",text:(0,T.YG)(e,"close_short")},{value:"open_short",text:(0,T.YG)(e,"open_short")},{value:"close_long",text:(0,T.YG)(e,"close_long")},{value:"buy",text:(0,T.YG)(e,"buy")},{value:"sell",text:(0,T.YG)(e,"sell")}]}),Ge(this,"returnModalTitleText",()=>{const{language:e}=this.props,{crossType:t,revokeContract:s,revokeType:r}=this.state;let a,i,l;return this.getCrossTypeRadio().map(e=>{t===e.value&&(l=e.titleText)}),this.getContractRadio().map(e=>{s===e.value&&(a=e.titleText)}),""===s&&""===t&&(a=(0,T.YG)(e,"all_symbol")),this.getTypeRadio().map(e=>{r===e.value&&(i=e.text)}),(0,T.YG)(e,"revoke_order_modal_title_linear_swap").replace("{project}",(0,T.YG)(e,"linear_swap_menu")).replace("{crossType}",`<span class="yellow-font">${l}</span>`).replace("{symbolType}",`<span class="yellow-font">${a}</span>`).replace("{orderType}",`<span class="yellow-font">${i}</span>`)}),Ge(this,"onConfirm",()=>{const{toggleRevokeAllModal:e,language:t,theme:s,remvokeAllSubAccountOrder:r,queryData:a,subUserId:i}=this.props,l={};l.subUid=i;const{crossType:n,revokeType:o,direction:c}=this.state;if(n&&(l.marginMode=n),o&&(l.orderType=o),c)switch(c){case"open_long":l.offset=v.xL3.OPEN,l.direction=v.d_1.LONG;break;case"close_short":l.offset=v.xL3.CLOSE,l.direction=v.d_1.LONG;break;case"open_short":l.offset=v.xL3.OPEN,l.direction=v.d_1.SHORT;break;case"close_long":l.offset=v.xL3.CLOSE,l.direction=v.d_1.SHORT;break;case"buy":l.offset=v.xL3.BOTH,l.direction=v.d_1.LONG;break;case"sell":l.offset=v.xL3.BOTH,l.direction=v.d_1.SHORT}r({requestParam:l,successCallback:e=>{e&&e.length>0?d.A.tipWarn(`${(0,T.YG)(t,"order_id")} ${e.join("ã")} ${(0,T.YG)(t,"revoke_order_failed")}`,s):d.A.tipOk((0,T.YG)(t,"revoke_order_request_success"),s),setTimeout(()=>{a()},3e3)},errorCallback:e=>{const r=e.errorMsg||(0,T.YG)(t,"revoke_order_failed");
1d.A.tipWarn(r,s)}}),e()});const t=JSON.parse(De.WL.getStorage("sub_account_linear_swap_cancel_order_default_1"))||{};if(t){const{revokeContract:e,revokeType:s,crossType:r,direction:a}=t;this.state={revokeContract:e||"",revokeType:s||"",crossType:r||"",direction:a||""}}else this.state={revokeContract:"",revokeType:"",crossType:"",direction:""}}}var Ee=(0,i.Ng)(function(e){return{language:e.default.appReducer.get("language"),theme:e.default.appReducer.get("theme")}},function(e){return(0,n.zH)(D,e)})(Le),Re=s(46709);const Ue=e=>{const{name:t,sortDirection:s,sortField:a,isOnlyDown:i}=e,l=t===a;return i?(0,r.jsx)("div",{className:"sort-wrapped",children:(0,r.jsx)("i",{className:"sort-by icon-sort-by "+(l&&"down"===s?"sort-by-active":"")})}):(0,r.jsxs)("div",{className:"sort-wrapped "+(l?`sort-active ${s}`:""),children:[(0,r.jsx)("i",{className:"sort-up"}),(0,r.jsx)("i",{className:"sort-down"})]})};Ue.propTypes={name:P().string,sortDirection:P().string,sortField:P().string,isOnlyDown:P().bool};var Pe=Ue,ze=s(13866),Fe=s(58501);function He(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const $e=(0,v.a_H)()||v.Dhg,Ve=[ke,Ie,Ee],Be=$e===v.I$g;class Qe extends a.PureComponent{UNSAFE_componentWillReceiveProps(e){const{subAccountData:t,language:s}=this.props;(0,o.is)(t,e.subAccountData)||this.queryData(1,e.subAccountData.get("user_id")),s!==e.language&&this.setState({orderTypeData:{orderType:0,value:(0,T.YG)(e.language,"transaction_limited_price_order")}},()=>{this.queryData()})}componentDidMount(){const{language:e}=this.props;this.setState({orderTypeData:{orderType:0,value:(0,T.YG)(e,"transaction_limited_price_order")}},()=>{this.queryData()})}queryData(e=1,t){const{getSubCurrentOrderFn:s,symbol:r,pair:a,subAccountData:i}=this.props,{orderTypeData:l,crossIsolatedType:n,sortDirection:o,sortField:c}=this.state,d=l.orderType,u={symbol:r,pair:a,subUserId:t=t||i.get("user_id"),pageIndex:e||1,orderType:d,sortBy:!!o&&c};u.exceedLimitCallback=this.exceedLimitCallback,t&&(Be?s(u,this.errorCallback,n):s(u,this.errorCallback)),this.setState({currentTableOrderTypeData:this.state.orderTypeData})}setOrderType(e){this.setState({orderTypeData:e})}getPlanOrderPrice(e,t){const{language:s}=this.props,r=(0,v.Ov2)(e,"order_price"),a=(0,v.Ov2)(e,"order_price_type");let i=(0,v.GWQ)(t,r);return"optimal_5"===a?i=(0,T.YG)(s,"order_board_optimal_title").replace("{optimal}",5):"optimal_10"===a?i=(0,T.YG)(s,"order_board_optimal_title").replace("{optimal}",10):"optimal_20"===a&&(i=(0,T.YG)(s,"order_board_optimal_title").replace("{optimal}",20)),i}getTrackOrderPrice(e){const{language:t}=this.props,s=(0,v.Ov2)(e,"order_price_type");let r=(0,T.YG)(t,"formula_price");return"optimal_5"===s?r=(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",5):"optimal_10"===s?r=(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",10):"optimal_20"===s&&(r=(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",20)),r}renderLoading(){const{language:e,currentOrderData:t,isCurrentOrderLoading:s}=this.props;return s?(0,r.jsx)(A.A,{needLoadingHeight:t&&0===t.size}):(0,r.jsx)(M.A,{language:e,dataList:t})}renderLimitTable(){let{language:e,theme:t,currentOrderData:s,productMap:i,symbol:l,pair:n,tradingUnitType:o,usdtPriceData:c,convertedCurrency:d,rateUsdt:u}=this.props;const{sortDirection:p,sortField:h}=this.state;let g,_,m,y=(0,v.kuS)($e,"USD","USD",_);if(l)l=s&&s.get(0)&&s.get(0).get("symbol")||l,n=s&&s.get(0)&&(s.get(0).get("pair")||s.get(0).get("contract_code"))||n,_=(0,v.wUP)(n)||G.Mk.USDT,g=(0,v.h6_)(o,l,(0,T.YG)(e,"sheet"),_),m=(0,v.kuS)($e,l,l,_),y=(0,v.kuS)($e,"USD","USD",_);else{const t=(0,T.YG)(e,"transaction_data_query_ceil_coin");g=(0,v.h6_)(o,t,(0,T.YG)(e,"sheet"),_),m=(0,v.kuS)($e,t,t,_)}return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-two-line",children:[(0,r.jsx)("th",{className:"thd-text-left thd-padding-right0",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"contract")})})}),(0,r.jsx)("th",{className:"thd-padding-horizontal10",children:(0,r.jsx)("p",{className:"item",children:(0,T.YG)(e,"transaction_leverage")})}),(0,r.jsx)("th",{style:{width:"170px"},className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("order_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_time")}
1),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"order_time",sortDirection:p||"down",sortField:h||"order_time"})]})}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("update_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"update_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"update_time",sortDirection:p,sortField:h})]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"trade_type")})})}),$e===v.I$g&&(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"only_lighten_up")})})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsx)("p",{className:"item",children:(0,T.YG)(e,"entrust_type")})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_volume")}),g&&(0,r.jsxs)("p",{children:["(",g,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_price")}),y&&(0,r.jsxs)("p",{children:["(",y,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"trade_volume")}),g&&(0,r.jsxs)("p",{children:["(",g,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"deal_average_price")}),y&&(0,r.jsxs)("p",{children:["(",y,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"frozen_margin_new")}),m&&(0,r.jsxs)("p",{className:"hidden",children:["(",m,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"formality_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"formality")})}),m&&(0,r.jsxs)("p",{className:"hidden",children:["(",m,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"close_rate")})})}),(0,r.jsx)("th",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"operate")})})})]})}),(0,r.jsx)("tbody",{children:s.map((s,a)=>{const l=(0,v.Ov2)(s,"direction")===v.Ve5,n=(0,v.Ov2)(s,"price"),p=(0,v.Ov2)(s,"fee"),h=(0,v.Ov2)(s,"symbol"),g=(0,v.Ov2)(s,"contract_code");let _;if(Be){const e=s.get("pair")||g,t=s.get("business_type")||"swap";_=(0,v.amw)({linearProductMap:i,businessType:t,pair:e})}else _=i.get(h);let m=(0,v.HwT)(_,p,!1,v.pTR),y=(0,v.Ov2)(c,`${h.toLowerCase()}usdt`);y=(0,v.kuS)($e,y,y,1);let x=(0,v.ZVp)((0,v.Etd)((0,L.lK)(p,y),d,u));p>0&&(m="+"+m),x="--"===x?x:`${p>0?"+":""}${x} ${d.toUpperCase()}`;let j=(0,L.lK)((0,L.y4)((0,v.Ov2)(s,"trade_volume"),(0,v.Ov2)(s,"volume")),100);j=0===+j?0:+j>0&&+j<1?1:Math.floor(+j);const S="futures"===s.get("business_type")?"linear_futures":"linear_swap",N=(0,v.kuS)($e,`${h}${(0,v.uM5)(s,!0)}`,(0,v.Vgt)(g),(0,v.QgQ)({contract:s,language:e,type:S,shouldContractType:!1}));let f,O;return o===v.x3H?(f=(0,v.u7z)({currentContract:_,convertedPrice:n,sheet:(0,v.Ov2)(s,"volume"),isFormat:!0}),O=(0,v.u7z)({currentContract:_,convertedPrice:(0,v.Ov2)(s,"trade_avg_price"),sheet:(0,v.Ov2)(s,"trade_volume"),isFormat:!0})):(f=(0,v.NGl)(_,n,o,(0,v.Ov2)(s,"volume"),!0,$e===v.I$g),O=(0,v.NGl)(_,(0,v.Ov2)(s,"trade_avg_price"),o,(0,v.Ov2)(s,"trade_volume"),!0,$e===v.I$g)),(0,r.jsxs)("tr",{className:"table-body-line number-font",children:[(0,r.jsx)("td",{className:"thd-text-left thd-padding-right0",children:N}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.Ov2)(s,"lever_rate")}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsx)("p",{children:be().tzTrans(s.get("created_at")).format("YYYY-MM-DD HH:mm:ss")})}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsx)("p",{children:be().tzTrans(s.get("update_time")).format("YYYY-MM-DD HH:mm:ss")})}),(0,r.jsx)("td",{className:(l?"green-font":"red-font")+" thd-text-left",children:(0,v.MlF)(s,e)}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:s,language:e})}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.Uy)((0,v.Ov2)(s,"order_source"),(0,v.Ov2)(s,"order_price_type"),e)}),(0,r.jsx)("td",{children:f}),(0,r.jsx)("td",{children:(0,v.GWQ)(_,n)}),(0,r.jsx)("td",{children:O}),(0,r.jsx)("td",{children:(0,v.GWQ)(_,(0,v.Ov2)(s,"trade_avg_price"))}),(0,r.jsx)("td",{children:(0,v.HwT)(_,(0,v.Ov2)(s,"margin_frozen"))}),(0,r.jsxs)("td",{children:[m,(0,r.jsxs)("div",{className:"secondary-font",children:["â ",x]})]}),(0,r.jsx)("td",{style:{paddingTop:15},children:(0,r.jsx)(Re.A,{theme:t,value:j,rootStyle:{width:"54px",marginLeft:"auto"}})}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{onClick:()=>this.revokeOrderClick(s),className:"thd-revoke",children:(0,T.YG)(e,"revoke")})})]},a.toString())})})]})}renderPlanTable(){let e,t,{language:s,symbol:i,pair:l,currentOrderData:n,productMap:o,tradingUnitType:c}=this.props,d=(0,v.kuS)($e,"USD","USD",t);if(i)i=n&&n.get(0)&&n.get(0).get("symbol")||i,l=n&&n.get(0)&&(n.get(0).get("pair")||n.get(0).get("contract_code"))||l,t=(0,v.wUP)(l)||G.Mk.USDT,e=(0,v.h6_)(c,i,(0,T.YG)(s,"sheet"),t),d=(0,v.kuS)($e,"USD","USD",t);
1else{const r=(0,T.YG)(s,"transaction_data_query_ceil_coin");e=(0,v.h6_)(c,r,(0,T.YG)(s,"sheet"),t)}return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"contract")})})}),(0,r.jsx)("td",{children:(0,r.jsx)("p",{className:"item thd-padding-horizontal10",children:(0,T.YG)(s,"transaction_leverage")})}),(0,r.jsx)("td",{style:{width:"170px",paddingLeft:"10px"},className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"order_time")})})}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"trade_type")})})}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"only_lighten_up")})})}),(0,r.jsx)("td",{children:(0,r.jsxs)("p",{className:"item",children:[(0,T.YG)(s,"trigger_condition"),d&&(0,r.jsxs)("p",{children:["(",d,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(s,"order_volume")}),e&&(0,r.jsxs)("p",{children:["(",e,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(s,"order_price")}),d&&(0,r.jsxs)("p",{children:["(",d,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"status")})})}),(0,r.jsx)("td",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"operate")})})})]})}),(0,r.jsx)("tbody",{children:n.map((e,t)=>{const a=(0,v.Ov2)(e,"symbol"),i=(0,v.Ov2)(e,"contract_code");let l;if(Be){const t=e.get("pair")||i,s=e.get("business_type")||"swap";l=(0,v.amw)({linearProductMap:o,businessType:s,pair:t})}else l=o.get(a);const n=(0,v.Ov2)(e,"direction")===v.Ve5,d=(0,v.Ov2)(e,"trigger_price");let u=(0,v.Ov2)(e,"trigger_type");u="ge"===u?"â¥":"â¤";const p=this.getPlanOrderPrice(e,l),h="futures"===e.get("business_type")?"linear_futures":"linear_swap",g=(0,v.kuS)($e,`${a}${(0,v.uM5)(e,!0)}`,(0,v.Vgt)(i),(0,v.QgQ)({contract:e,language:s,type:h,shouldContractType:!1}));let _;return _=c===v.x3H?(0,v.u7z)({currentContract:l,convertedPrice:(0,v.Ov2)(e,"order_price")||(0,v.Ov2)(e,"trigger_price"),sheet:(0,v.Ov2)(e,"volume"),isFormat:!0}):(0,v.NGl)(l,(0,v.Ov2)(e,"order_price")||(0,v.Ov2)(e,"trigger_price"),c,(0,v.Ov2)(e,"volume"),!0,$e===v.I$g),(0,r.jsxs)("tr",{className:"table-body-line number-font",children:[(0,r.jsx)("td",{className:"thd-text-left",children:g}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.Ov2)(e,"lever_rate")}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsxs)("p",{children:[be().tzTrans(e.get("created_at")).format("YYYY-MM-DD")," ",be().tzTrans(e.get("created_at")).format("HH:mm:ss")]})}),(0,r.jsx)("td",{className:(n?"green-font":"red-font")+" thd-text-left",children:(0,v.MlF)(e,s)}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:e,language:s})}),(0,r.jsx)("td",{children:`${u} ${(0,v.GWQ)(l,d)}`}),(0,r.jsx)("td",{children:_}),(0,r.jsx)("td",{children:p}),(0,r.jsx)("td",{children:(0,oe.Fj)(e,s)}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{onClick:()=>this.revokeOrderClick(e),className:"thd-revoke",children:(0,T.YG)(s,"revoke")})})]},t.toString())})})]})}renderStopLossTable(){let e,t,{language:s,symbol:i,pair:l,currentOrderData:n,productMap:o,tradingUnitType:c}=this.props,d=(0,v.kuS)($e,"USD","USD",t);if(i)i=n&&n.get(0)&&n.get(0).get("symbol")||i,l=n&&n.get(0)&&(n.get(0).get("pair")||n.get(0).get("contract_code"))||l,t=(0,v.wUP)(l)||G.Mk.USDT,e=(0,v.h6_)(c,i,(0,T.YG)(s,"sheet"),t),d=(0,v.kuS)($e,"USD","USD",t);else{const r=(0,T.YG)(s,"transaction_data_query_ceil_coin");e=(0,v.h6_)(c,r,(0,T.YG)(s,"sheet"),t)}return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"contract")})})}),(0,r.jsx)("td",{children:(0,r.jsx)("p",{className:"item thd-padding-horizontal10",children:(0,T.YG)(s,"transaction_leverage")})}),(0,r.jsx)("td",{style:{width:"170px",paddingLeft:"10px"},className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"order_time")}
1)})}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"trade_type")})})}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"only_lighten_up")})})}),(0,r.jsx)("td",{children:(0,r.jsxs)("p",{className:"item",children:[(0,T.YG)(s,"trigger_condition"),d&&(0,r.jsxs)("p",{children:["(",d,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(s,"order_volume")}),e&&(0,r.jsxs)("p",{children:["(",e,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(s,"order_price")}),d&&(0,r.jsxs)("p",{children:["(",d,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"status")})})}),(0,r.jsx)("td",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"operate")})})})]})}),(0,r.jsx)("tbody",{children:n.map((e,t)=>{const a=(0,v.Ov2)(e,"symbol"),i=(0,v.Ov2)(e,"contract_code");let l;if(Be){const t=e.get("pair")||i,s=e.get("business_type")||"swap";l=(0,v.amw)({linearProductMap:o,businessType:s,pair:t})}else l=o.get(a);const n=(0,v.Ov2)(e,"direction")===v.Ve5,d=(0,v.Ov2)(e,"trigger_price");let u=(0,v.Ov2)(e,"trigger_type");u="ge"===u?"â¥":"â¤";const p=this.getPlanOrderPrice(e,l),h="futures"===e.get("business_type")?"linear_futures":"linear_swap",g=(0,v.kuS)($e,`${a}${(0,v.uM5)(e,!0)}`,(0,v.Vgt)(i),(0,v.QgQ)({contract:e,language:s,type:h,shouldContractType:!1}));let _;return _=c===v.x3H?(0,v.u7z)({currentContract:l,convertedPrice:(0,v.Ov2)(e,"order_price")||(0,v.Ov2)(e,"trigger_price"),sheet:(0,v.Ov2)(e,"volume"),isFormat:!0}):(0,v.NGl)(l,(0,v.Ov2)(e,"order_price")||(0,v.Ov2)(e,"trigger_price"),c,(0,v.Ov2)(e,"volume"),!0,$e===v.I$g),(0,r.jsxs)("tr",{className:"table-body-line number-font",children:[(0,r.jsx)("td",{className:"thd-text-left",children:g}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.Ov2)(e,"lever_rate")}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsxs)("p",{children:[be().tzTrans(e.get("created_at")).format("YYYY-MM-DD")," ",be().tzTrans(e.get("created_at")).format("HH:mm:ss")]})}),(0,r.jsx)("td",{className:(n?"green-font":"red-font")+" thd-text-left",children:(0,v.MlF)(e,s)}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:e,language:s})}),(0,r.jsx)("td",{children:`${u} ${(0,v.GWQ)(l,d)}`}),(0,r.jsx)("td",{children:_}),(0,r.jsx)("td",{children:p}),(0,r.jsx)("td",{children:(0,oe.Fj)(e,s)}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{onClick:()=>this.revokeOrderClick(e),className:"thd-revoke",children:(0,T.YG)(s,"revoke")})})]},t.toString())})})]})}renderTrackTable(){let e,t,{language:s,symbol:i,pair:l,currentOrderData:n,productMap:o,tradingUnitType:c}=this.props,d=(0,v.kuS)($e,"USD","USD",t);if(i)i=n&&n.get(0)&&n.get(0).get("symbol")||i,l=n&&n.get(0)&&(n.get(0).get("pair")||n.get(0).get("contract_code"))||l,t=(0,v.wUP)(l)||G.Mk.USDT,e=(0,v.h6_)(c,i,(0,T.YG)(s,"sheet"),t),d=(0,v.kuS)($e,"USD","USD",t);else{const r=(0,T.YG)(s,"transaction_data_query_ceil_coin");e=(0,v.h6_)(c,r,(0,T.YG)(s,"sheet"),t)}return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"contract")})})}),(0,r.jsx)("td",{children:(0,r.jsx)("p",{className:"item thd-padding-horizontal10",children:(0,T.YG)(s,"transaction_leverage")})}),(0,r.jsx)("td",{style:{width:"170px",paddingLeft:"10px"},className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"order_time")})})}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"trade_type")})})}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"only_lighten_up")})})}),(0,r.jsx)("td",{children:(0,r.jsxs)("p",{className:"item",children:[(0,T.YG)(s,"active_condition"),d&&(0,r.jsxs)("p",{children:["(",d,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsx)("p",{className:"item",children:(0,T.YG)(s,"callback_ratio")})}),(0,r.jsx)("td",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(s,"order_volume")}),e&&(0,r.jsxs)("p",{children:["(",e,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(s,"order_price")}),d&&(0,r.jsxs)("p",{children:["(",d,")"]})]})}),(0,r.jsx)("td",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"status")})})}),(0,r.jsx)("td",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(s,"operate")})})})]})}),(0,r.jsx)("tbody",{children:n.map((e,t)=>{const a=(0,v.Ov2)(e,"symbol"),i=(0,v.Ov2)(e,"contract_code");let l;if(Be){const t=e.get("pair")||i,s=e.get("business_type")||"swap";
1l=(0,v.amw)({linearProductMap:o,businessType:s,pair:t})}else l=o.get(a);const n=(0,v.Ov2)(e,"direction")===v.Ve5,d=(0,v.Ov2)(e,"active_price");let u=(0,v.Ov2)(e,"active_type");const p=(0,v.Ov2)(e,"is_active");u="ge"===u?"â¥":"â¤";const h=this.getTrackOrderPrice(e),g="futures"===e.get("business_type")?"linear_futures":"linear_swap",_=(0,v.kuS)($e,`${a}${(0,v.uM5)(e,!0)}`,(0,v.Vgt)(i),(0,v.QgQ)({contract:e,language:s,type:g,shouldContractType:!1}));let m;return m=c===v.x3H?(0,v.u7z)({currentContract:l,convertedPrice:(0,v.Ov2)(e,"active_price"),sheet:(0,v.Ov2)(e,"volume"),isFormat:!0}):(0,v.NGl)(l,(0,v.Ov2)(e,"active_price"),c,(0,v.Ov2)(e,"volume"),!0,$e===v.I$g),(0,r.jsxs)("tr",{className:"table-body-line number-font",children:[(0,r.jsx)("td",{className:"thd-text-left",children:_}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.Ov2)(e,"lever_rate")}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsxs)("p",{children:[be().tzTrans(e.get("created_at")).format("YYYY-MM-DD")," ",be().tzTrans(e.get("created_at")).format("HH:mm:ss")]})}),(0,r.jsx)("td",{className:(n?"green-font":"red-font")+" thd-text-left",children:(0,v.MlF)(e,s)}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:e,language:s})}),(0,r.jsxs)("td",{children:[1===p?(0,r.jsx)("img",{src:ze,className:"tickicon"}):(0,r.jsx)("span",{className:"place-holder"}),`${u} ${(0,v.GWQ)(l,d)}`]}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.l9T)((0,v.Ov2)(e,"callback_rate"),"",1)}),(0,r.jsx)("td",{children:m}),(0,r.jsx)("td",{children:h}),(0,r.jsx)("td",{children:1===p?(0,T.YG)(s,"wait_entrust"):(0,T.YG)(s,"waiting_activation")}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{onClick:()=>this.revokeOrderClick(e),className:"thd-revoke",children:(0,T.YG)(s,"revoke")})})]},t.toString())})})]})}renderMarketPriceTable(){let{language:e,theme:t,currentOrderData:s,productMap:i,symbol:l,pair:n,tradingUnitType:o,usdtPriceData:c,convertedCurrency:d,rateUsdt:u}=this.props;const{sortDirection:p,sortField:h}=this.state;let g,_,m,y=(0,v.kuS)($e,"USD","USD",_);if(l)l=s&&s.get(0)&&s.get(0).get("symbol")||l,n=s&&s.get(0)&&(s.get(0).get("pair")||s.get(0).get("contract_code"))||n,_=(0,v.wUP)(n)||G.Mk.USDT,g=(0,v.h6_)(o,l,(0,T.YG)(e,"sheet"),_),m=(0,v.kuS)($e,l,l,_),y=(0,v.kuS)($e,"USD","USD",_);else{const t=(0,T.YG)(e,"transaction_data_query_ceil_coin");g=(0,v.h6_)(o,t,(0,T.YG)(e,"sheet"),_),m=(0,v.kuS)($e,t,t,_)}return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-two-line",children:[(0,r.jsx)("th",{className:"thd-text-left thd-padding-right0",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"contract")})})}),(0,r.jsx)("th",{className:"thd-padding-horizontal10",children:(0,r.jsx)("p",{className:"item",children:(0,T.YG)(e,"transaction_leverage")})}),(0,r.jsx)("th",{style:{width:"170px"},className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("order_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"order_time",sortDirection:p||"down",sortField:h||"order_time"})]})}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("update_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"update_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"update_time",sortDirection:p,sortField:h})]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"trade_type")})})}),$e===v.I$g&&(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"only_lighten_up")})})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsx)("p",{className:"item",children:(0,T.YG)(e,"entrust_type")})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_volume")}),g&&(0,r.jsxs)("p",{children:["(",g,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_price")}),y&&(0,r.jsxs)("p",{children:["(",y,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"trade_volume")}),g&&(0,r.jsxs)("p",{children:["(",g,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"deal_average_price")}),y&&(0,r.jsxs)("p",{children:["(",y,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"frozen_margin_new")}),m&&(0,r.jsxs)("p",{className:"hidden",children:["(",m,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{className:"item",children:[(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"formality_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"formality")}
1)}),m&&(0,r.jsxs)("p",{className:"hidden",children:["(",m,")"]})]})}),(0,r.jsx)("th",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"close_rate")})})}),(0,r.jsx)("th",{children:(0,r.jsx)("div",{className:"item",children:(0,r.jsx)("span",{children:(0,T.YG)(e,"operate")})})})]})}),(0,r.jsx)("tbody",{children:s.map((s,a)=>{const l=(0,v.Ov2)(s,"direction")===v.Ve5,n=(0,v.Ov2)(s,"price"),p=(0,v.Ov2)(s,"fee"),h=(0,v.Ov2)(s,"symbol"),g=(0,v.Ov2)(s,"contract_code");let _;if(Be){const e=s.get("pair")||g,t=s.get("business_type")||"swap";_=(0,v.amw)({linearProductMap:i,businessType:t,pair:e})}else _=i.get(h);let m=(0,v.HwT)(_,p,!1,v.pTR),y=(0,v.Ov2)(c,`${h.toLowerCase()}usdt`);y=(0,v.kuS)($e,y,y,1);let x=(0,v.ZVp)((0,v.Etd)((0,L.lK)(p,y),d,u));p>0&&(m="+"+m),x="--"===x?x:`${p>0?"+":""}${x} ${d.toUpperCase()}`;let j=(0,L.lK)((0,L.y4)((0,v.Ov2)(s,"trade_volume"),(0,v.Ov2)(s,"volume")),100);j=0===+j?0:+j>0&&+j<1?1:Math.floor(+j);const S="futures"===s.get("business_type")?"linear_futures":"linear_swap",N=(0,v.kuS)($e,`${h}${(0,v.uM5)(s,!0)}`,(0,v.Vgt)(g),(0,v.QgQ)({contract:s,language:e,type:S,shouldContractType:!1}));let f,O;return o===v.x3H?(f=(0,v.u7z)({currentContract:_,convertedPrice:n,sheet:(0,v.Ov2)(s,"volume"),isFormat:!0}),O=(0,v.u7z)({currentContract:_,convertedPrice:(0,v.Ov2)(s,"trade_avg_price"),sheet:(0,v.Ov2)(s,"trade_volume"),isFormat:!0})):(f=(0,v.NGl)(_,n,o,(0,v.Ov2)(s,"volume"),!0,$e===v.I$g),O=(0,v.NGl)(_,(0,v.Ov2)(s,"trade_avg_price"),o,(0,v.Ov2)(s,"trade_volume"),!0,$e===v.I$g)),(0,r.jsxs)("tr",{className:"table-body-line number-font",children:[(0,r.jsx)("td",{className:"thd-text-left thd-padding-right0",children:N}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.Ov2)(s,"lever_rate")}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsx)("p",{children:be().tzTrans(s.get("created_at")).format("YYYY-MM-DD HH:mm:ss")})}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsx)("p",{children:be().tzTrans(s.get("update_time")).format("YYYY-MM-DD HH:mm:ss")})}),(0,r.jsx)("td",{className:(l?"green-font":"red-font")+" thd-text-left",children:(0,v.MlF)(s,e)}),$e===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:s,language:e})}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.Uy)((0,v.Ov2)(s,"order_source"),(0,v.Ov2)(s,"order_price_type"),e)}),(0,r.jsx)("td",{children:f}),(0,r.jsx)("td",{children:(0,T.YG)(e,"market_price_short")}),(0,r.jsx)("td",{children:O}),(0,r.jsx)("td",{children:(0,v.GWQ)(_,(0,v.Ov2)(s,"trade_avg_price"))}),(0,r.jsx)("td",{children:(0,v.HwT)(_,(0,v.Ov2)(s,"margin_frozen"))}),(0,r.jsxs)("td",{children:[m,(0,r.jsxs)("div",{className:"secondary-font",children:["â ",x]})]}),(0,r.jsx)("td",{style:{paddingTop:15},children:(0,r.jsx)(Re.A,{theme:t,value:j,rootStyle:{width:"54px",marginLeft:"auto"}})}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{onClick:()=>this.revokeOrderClick(s),className:"thd-revoke",children:(0,T.YG)(e,"revoke")})})]},a.toString())})})]})}revokeOrderClick(e){const{subAccountRevokeOrderFn:t,language:s,theme:r,subAccountData:a,pageIndexCurrentOrder:i}=this.props,{orderType:l}=this.state.currentTableOrderTypeData;t(e,l,a.get("uid"),()=>{d.A.tipOk((0,T.YG)(s,"revoke_order_request_success"),r),setTimeout(()=>{this.queryData(i)},1e3)},e=>{const t=e||(0,T.YG)(s,"revoke_order_failed");d.A.tipWarn(t,r)})}renderTable(){const{curOrderType:e}=this.props;return 0===e?this.renderLimitTable():1===e?this.renderPlanTable():2===e?this.renderStopLossTable():3===e?this.renderTrackTable():4===e?this.renderMarketPriceTable():void 0}render(){const{language:e,totalPageCurrentOrder:t,pageIndexCurrentOrder:s,isCurrentOrderLoading:a,setSymbolFn:i,symbol:l,pair:n,curOrderType:o,linearProductList:c}=this.props,{orderTypeData:d,crossIsolatedType:u}=this.state;let p,h;if(Be){p=(0,v.BQq)(c,u,1).map(e=>({key:e,value:(0,v.Vgt)(e)})),p=p.unshift({key:"",value:(0,T.YG)(e,"all")});const t=p.find(e=>e.key===n);h=t?t.value:"",t||i(p.get(0)&&p.get(0).key)}else{p=this.props.symbolList.map(e=>({key:e,value:(0,v.Vgt)(e)})),p=p.unshift({key:"",value:(0,T.YG)(e,"all")});const t=p.find(e=>e.key===l);h=t?t.value:"",t||i(p.get(0)&&p.get(0).key)}const g=[{orderType:0,value:(0,T.YG)(e,"transaction_limited_price_order")},{orderType:1,value:(0,T.YG)(e,"plan_order")},{orderType:2,value:(0,T.YG)(e,"stop_loss_stop_profit")},{orderType:3,value:(0,T.YG)(e,"track_order")}];return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"sub-current-order-condition",children:[(0,r.jsxs)("div",{className:"select-condition-wrap",children:[Be&&(0,r.jsx)(I.A,{rootStyle:{marginLeft:10},datas:(0,v.bmt)(e,v.jB4.CROSS_ISOLATED),value:u,onClickItem:this.onChangeInfoSwitchType}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(e,"futures")}),(0,r.jsx)(j.A,{language:e,canFilter:!0,datas:p,showValueType:"out",value:h,rootClassName:"center-page-select-root",rootStyle:{marginRight:0},itemClassName:"center-page-select-item",showKey:"value",onSelectItem
1Click:e=>{i(e.key)}})]}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(e,"order_type")}),(0,r.jsx)(j.A,{language:e,datas:g,showValueType:"out",value:d.value,rootClassName:"center-page-select-root",rootStyle:{marginRight:0},itemClassName:"center-page-select-item",showKey:"value",onSelectItemClick:e=>this.setOrderType(e)})]})]}),(0,r.jsxs)("div",{className:"sub-current-order-condition-btn-wrapper",children:[(0,r.jsx)("button",{className:"blue-button query-button",style:{marginRight:0},onClick:()=>{this.queryData()},children:(0,T.YG)(e,"query")}),(0,r.jsx)("button",{className:"revoke-btn",onClick:this.toggleRevokeAllModal,children:(0,T.YG)(e,"revoke_all_order")})]})]}),(0,r.jsxs)("div",{className:"table-box "+(0===o?"table-box-head-extra":""),children:[(0,r.jsx)(Fe.M,{fixColumnData:[0],tdFixClassName:"content-fix-shadow-border",children:(0,r.jsx)("table",{className:"table-all-text-right",children:this.renderTable()})}),this.renderLoading(),(0,r.jsxs)("div",{className:"pagination-wrapper",children:[(0,r.jsx)("div",{}),(0,r.jsx)(Y.A,{language:e,totalPage:t,currentPage:s,isLoading:a,onPageChange:e=>{this.queryData(e)}})]})]}),(0,v.kuS)($e,this.subAccountRevokeAllOrderEl(0),this.subAccountRevokeAllOrderEl(1),this.subAccountRevokeAllOrderEl(2))]})}constructor(e){super(e),He(this,"errorCallback",e=>{d.A.tipError(e.errorMsg)}),He(this,"exceedLimitCallback",e=>{const{language:t,setSymbolFn:s}=this.props;s(e),d.A.noticeWarn((0,T.YG)(t,"current_order_exceed_limit")),this.queryData(1)}),He(this,"onChangeInfoSwitchType",(e,t)=>{(0,v.b7U)(e.value);const{pair:s,setSymbolFn:r,linearProductList:a}=this.props;(0,v.HKu)(a,e.value,s)!==s&&r(""),this.setState({crossIsolatedType:e.value},()=>{this.queryData()})}),He(this,"sort",e=>()=>{const{sortField:t,sortDirection:s}=this.state;"update_time"===e?t===e?"down"===s&&this.setState({sortField:"",sortDirection:""},()=>{this.queryData()}):this.setState({sortDirection:"down",sortField:e},()=>{this.queryData()}):"order_time"===e&&(t&&t!==e?this.setState({sortField:"",sortDirection:""},()=>{this.queryData()}):this.setState({sortField:"update_time",sortDirection:"down"},()=>{this.queryData()}))}),He(this,"toggleRevokeAllModal",()=>{this.setState({isShowRevokeAllModal:!this.state.isShowRevokeAllModal})}),He(this,"subAccountRevokeAllOrderEl",e=>{const{subAccountData:t}=this.props,{isShowRevokeAllModal:s}=this.state,a=t.get("uid"),i=Ve[e];return(0,r.jsx)(i,{subUserId:a,queryData:()=>this.queryData(),toggleRevokeAllModal:this.toggleRevokeAllModal,isShowRevokeAllModal:s})}),this.state={orderTypeData:{},crossIsolatedType:(0,v.m8r)(v.jB4.CROSS_ISOLATED),sortDirection:"",sortField:"",isShowRevokeAllModal:!1,currentTableOrderTypeData:{}}}}var We=(0,i.Ng)(function(e){let t=e.default.appReducer.get("convertedCurrency");return t="none"===t?"usd":t,{convertedCurrency:t,rateUsdt:e.default.appReducer.get("rateUsdt"),usdtPriceData:e.default.appReducer.get("usdtPriceData"),language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),symbolList:(0,v.kuS)($e,e.default.appReducer.get("symbolList"),e.default.appReducer.get("swapSymbolList"),e.default.appReducer.get("linearSymbolList")),linearProductList:e.default.appReducer.get("linearProductList"),productMap:(0,v.kuS)($e,e.default.appReducer.get("productMap"),e.default.appReducer.get("swapProductMap"),e.default.appReducer.get("linearProductMap")),currentOrderData:(0,v.kuS)($e,e.default.subAccountDetailsReducer.get("currentOrderData"),e.default.swapSubAccountDetailsReducer.get("swapCurrentOrderData"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapCurrentOrderData")),curOrderType:(0,v.kuS)($e,e.default.subAccountDetailsReducer.get("curOrderType"),e.default.swapSubAccountDetailsReducer.get("swapCurOrderType"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapCurOrderType")),symbol:(0,v.kuS)($e,e.default.subAccountDetailsReducer.get("symbol"),e.default.swapSubAccountDetailsReducer.get("swapSymbol"),(0,v.pOZ)(e.default.linearSwapSubA
1ccountDetailsReducer.get("pair"))),pair:e.default.linearSwapSubAccountDetailsReducer.get("pair"),isCurrentOrderLoading:(0,v.kuS)($e,e.default.subAccountDetailsReducer.get("isCurrentOrderLoading"),e.default.swapSubAccountDetailsReducer.get("swapIsCurrentOrderLoading"),e.default.linearSwapSubAccountDetailsReducer.get("linearIsCurrentOrderLoading")),pageIndexCurrentOrder:(0,v.kuS)($e,e.default.subAccountDetailsReducer.get("pageIndexCurrentOrder"),e.default.swapSubAccountDetailsReducer.get("swapPageIndexCurrentOrder"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapPageIndexCurrentOrder")),totalPageCurrentOrder:(0,v.kuS)($e,e.default.subAccountDetailsReducer.get("totalPageCurrentOrder"),e.default.swapSubAccountDetailsReducer.get("swapTotalPageCurrentOrder"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapTotalPageCurrentOrder")),tradingUnitType:(0,v.kuS)($e,e.default.tradeUnitReducer.get("tradingUnitType"),e.default.swapTradeUnitReducer.get("tradingUnitType"),e.default.linearSwapTradeUnitReducer.get("tradingUnitType")),theme:"white"}},function(e){const t=(0,v.kuS)($e,u.s7,p.ts,h.Zp),s=(0,v.kuS)($e,u.jO,p.qi,h.RD),r=(0,v.kuS)($e,u.qL,p.dT,h.iq);return(0,n.zH)({getSubCurrentOrderFn:t,setSymbolFn:s,subAccountRevokeOrderFn:r},e)})(Qe),qe=s(65272),Ke=s(97373),Ze=s(10417);function Je(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const Xe=(0,v.a_H)()||v.Dhg,et=Xe===v.I$g;class tt extends a.PureComponent{componentDidMount(){const{language:e}=this.props;this.setState({tradeType:{value:(0,T.YG)(e,"all"),tradeType:0},dealType:{value:(0,T.YG)(e,"all"),dealType:""},dateType:{value:(0,T.YG)(e,"current_seven_day"),dateType:v.$zK}},()=>{this.queryData()})}UNSAFE_componentWillReceiveProps(e){const{subAccountData:t,language:s}=this.props;(0,o.is)(t,e.subAccountData)||this.queryData(1,e.subAccountData.get("user_id")),s!==e.language&&this.setState({tradeType:{value:(0,T.YG)(e.language,"all"),tradeType:0},dealType:{value:(0,T.YG)(e.language,"all"),dealType:""},dateType:{value:(0,T.YG)(e.language,"current_seven_day"),dateType:v.$zK}},()=>{this.queryData()})}queryData(e=1,t){const{getSubDealOrderFn:s,subAccountData:r,symbol:a,pair:i}=this.props;let{tradeType:l,dealType:n,dateType:o,crossIsolatedType:c}=this.state;l=l.tradeType,n=n.dealType;const d={symbol:a,pair:i,tradeType:l,dealType:n,createDate:o.dateType,subUserId:t=t||r.get("user_id"),pageIndex:e||1};t&&(et?s(d,this.errorCallback,c):s(d,this.errorCallback))}setTradeType(e){this.setState({tradeType:e})}setDealType(e){this.setState({dealType:e})}setDateType(e){this.setState({dateType:e})}renderLoading(){const{language:e,dealOrder:t,isSubDealLoading:s}=this.props;return s?(0,r.jsx)(A.A,{needLoadingHeight:t&&0===t.size}):(0,r.jsx)(M.A,{language:e,dataList:t})}renderDataList(){let{language:e,dealOrder:t,symbol:s,pair:i,productMap:l,getDealOrderDetailListFn:n,subAccountData:o,tradingUnitType:c,usdtPriceData:d,convertedCurrency:u,rateUsdt:p}=this.props;const h=o.get("user_id");let g=(0,v.wUP)(i)||"USDT";t&&t.get(0)&&(s=(0,v.kuS)(Xe,t.get(0).get("symbol"),t.get(0).get("contract_code").split("-")[0],t.get(0).get("contract_code").split("-")[0]),i=t.get(0).get("pair")||t.get(0).get("contract_code"),g=(0,v.wUP)(i)||"USDT");const _=(0,v.h6_)(c,s,(0,T.YG)(e,"sheet"),g),m=(0,v.kuS)(Xe,"USD","USD",g),y=(0,v.kuS)(Xe,s,s,g);return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-two-line",children:[(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"contract")}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trade_time")}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trade_type")}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"trade_volume"),"(",_,")"]}),(0,r.jsxs)("th",{className:"thd-padding-horizontal10",children:[(0,T.YG)(e,"trade_price"),"(",m,")"]}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10",children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"transaction_type_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"transaction_type")})})}),(0,r.jsxs)("th",{children:[(0,r.jsx)(Ze.A,{language:e}),(0,r.jsxs)("p",{children:["(",y,")"]})]}),(0,r.jsx)("th",{children:(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"formality_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"formality")}
1)})}),(0,r.jsx)("th",{children:(0,T.YG)(e,"operate")})]})}),t.map((t,a)=>{const i=(0,v.Ov2)(t,"create_date"),o="buy"===t.get("direction")?"green-font":"red-font",g="close"===(0,v.Ov2)(t,"offset");let _;if(et){const e=t.get("pair")||t.get("contract_code"),s=t.get("business_type")||"swap";_=(0,v.amw)({linearProductMap:l,businessType:s,pair:e})}else _=l.get(s);let m=(0,v.Ov2)(d,`${s.toLowerCase()}usdt`);m=(0,v.kuS)(Xe,m,m,1);const y=(0,oe.W7)({orderData:t,contract:_,isClose:g,profitKey:"offset_profitloss",isShowFiat:!0,indexPrice:m,rateUsdt:p,convertedCurrency:u}),{finalCloseProfitAndRealProfitText:x}=y,j=(0,v.Ov2)(t,"trade_fee"),S=(0,v.Ov2)(t,"fee_asset"),N=(0,v.Ov2)(t,"remark2"),f="USDT"===S,O=f?j:(0,L.lK)(j,N),b=f?"USDT":(0,T.YG)(e,"ht_deduction").replace("HT",S);let D=`${(0,v.HwT)(_,j,!0,v.pTR)} ${b}`,C=(0,v.ZVp)((0,v.Etd)(O,u,p));j>0&&(D="+"+D),C="--"===C?C:`${j>0?"+":""}${C} ${u.toUpperCase()}`;const w=t.get("contract_code"),M="futures"===t.get("business_type")?"linear_futures":"linear_swap",k=(0,v.kuS)(Xe,`${s}${(0,v.uM5)(t,!0)}`,(0,v.Vgt)(w),(0,v.QgQ)({contract:t,language:e,type:M,shouldContractType:!1}));let A;return A=c===v.x3H?(0,v.u7z)({currentContract:_,convertedPrice:(0,v.Ov2)(t,"trade_price"),sheet:(0,v.Ov2)(t,"trade_volume"),isFormat:!0}):(0,v.NGl)(_,(0,v.Ov2)(t,"trade_price"),c,(0,v.Ov2)(t,"trade_volume"),!0,Xe===v.I$g),(0,r.jsxs)("tr",{className:"table-body-line",children:[(0,r.jsx)("td",{className:"thd-text-left",children:k}),(0,r.jsxs)("td",{className:"thd-text-left",children:[be().tzTrans(i).format("YYYY-MM-DD")," ",be().tzTrans(i).format("HH:mm:ss")]}),(0,r.jsx)("td",{className:`${o} thd-text-left`,children:(0,v.MlF)(t,e)}),(0,r.jsx)("td",{children:A}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.GWQ)(_,(0,v.Ov2)(t,"trade_price"))}),(0,r.jsx)("td",{className:"thd-text-left thd-padding-horizontal10",children:(0,v.Ov2)(t,"role")}),(0,r.jsx)("td",{children:x}),(0,r.jsxs)("td",{children:[D,(0,r.jsxs)("div",{className:"secondary-font",children:["â ",C]})]}),(0,r.jsx)("td",{className:"right",children:(0,r.jsx)("button",{className:"transparent-button",onClick:()=>{if(et){const{crossIsolatedType:e}=this.state;n("subAccount",t,h,e)}else n("subAccount",t,h)},children:(0,T.YG)(e,"look")})})]},a)})]})}render(){const{language:e,totalPageSubDeal:t,pageIndexSubDeal:s,isSubDealLoading:a,symbol:i,pair:l,setSymbolFn:n,linearProductList:o}=this.props,{tradeType:c,dealType:d,dateType:u,crossIsolatedType:p}=this.state;let h,g;if(et){h=(0,v.BQq)(o,p,1).map(e=>({key:e,value:(0,v.Vgt)(e)}));const e=h.find(e=>e.key===l);g=e?e.value:"",e||n(h.get(0)&&h.get(0).key)}else{h=this.props.symbolList.map(e=>({key:e,value:e}));const e=h.find(e=>e.key===i);g=e?e.value:"",e||n(h.get(0)&&h.get(0).key)}const _=[{value:(0,T.YG)(e,"all"),tradeType:0},{value:(0,T.YG)(e,"buying_long"),tradeType:Ke.BUY_OPEN_LONG},{value:(0,T.YG)(e,"short_selling"),tradeType:Ke.SELL_OPEN_SHORT},{value:(0,T.YG)(e,"buying_long_close_position"),tradeType:Ke.BUY_CLOSE_SHORT},{value:(0,T.YG)(e,"short_selling_close_position"),tradeType:Ke.SELL_CLOSE_LONG},{value:(0,T.YG)(e,"buy"),tradeType:Ke.BUY_OPEN},{value:(0,T.YG)(e,"sell"),tradeType:Ke.SELL_OPEN},{value:(0,T.YG)(e,"force_buy_close"),tradeType:Ke.FORCE_SELL_CLOSE},{value:(0,T.YG)(e,"force_sell_close"),tradeType:Ke.FORCE_BUY_CLOSE}],m=[{value:(0,T.YG)(e,"all"),dealType:""},{value:"Taker",dealType:Ke.DEAL_TYPE_TAKER},{value:"Maker",dealType:Ke.DEAL_TYPE_MAKER}],y=this.dateData=[{value:(0,T.YG)(e,"current_seven_day"),dateType:v.$zK},{value:(0,T.YG)(e,"current_three_month"),dateType:v.qeR}];return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"sub-current-order-condition",children:[(0,r.jsxs)("div",{className:"select-condition-wrap",children:[et&&(0,r.jsx)(I.A,{rootStyle:{marginLeft:10},datas:(0,v.bmt)(e,v.jB4.CROSS_ISOLATED),value:p,onClickItem:this.onChangeInfoSwitchType}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(e,"variety")}),(0,r.jsx)(j.A,{language:e,canFilter:!0,datas:h,showValueType:"out",value:g,rootClassName:"center-page-select-root",rootStyle:{marginRight:0},itemClassName:"center-page-select-item",showKey:"value",onSelectItem
1Click:e=>n(e.key)})]}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(e,"trade_type")}),(0,r.jsx)(j.A,{datas:_,value:c.value,showValueType:"out",rootClassName:"center-page-select-root",rootStyle:{width:120},itemStyle:{width:120},showKey:"value",onSelectItemClick:e=>this.setTradeType(e)})]}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(e,"transaction_type")}),(0,r.jsx)(j.A,{datas:m,value:d.value,showValueType:"out",rootClassName:"center-page-select-root",rootStyle:{width:120},itemStyle:{width:120},showKey:"value",onSelectItemClick:e=>this.setDealType(e)})]}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(e,"date")}),(0,r.jsx)(j.A,{datas:y,value:u.value,showValueType:"out",rootClassName:"center-page-select-root",rootStyle:{width:120},itemStyle:{width:120},showKey:"value",onSelectItemClick:e=>this.setDateType(e)})]})]}),(0,r.jsxs)("div",{className:"select-btn-wrap",children:[(0,r.jsx)("button",{className:"blue-button query-button",onClick:()=>{this.queryData()},children:(0,T.YG)(e,"query")}),(0,r.jsx)(k.A,{widthAuto:!0,align:"right",offset:5,tip:(0,T.YG)(e,"export_deal_order_recode"),children:(0,r.jsx)("i",{className:"icon-export blue-font",style:{fontSize:"20px"},onClick:this.exportClick})})]})]}),(0,r.jsxs)("div",{className:"table-box table-box-head-extra",children:[(0,r.jsx)("table",{className:"table-all-text-right",children:this.renderDataList()}),this.renderLoading(),(0,r.jsxs)("div",{className:"pagination-wrapper",children:[(0,r.jsx)("div",{}),(0,r.jsx)(Y.A,{language:e,totalPage:t,currentPage:s,isLoading:a,onPageChange:e=>{this.queryData(e)}})]})]})]})}constructor(e){super(e),Je(this,"errorCallback",e=>{d.A.tipError(e.errorMsg)}),Je(this,"exportClick",()=>{const{theme:e,language:t,symbol:s,pair:r,exportSubDealOrderFn:a,subAccountData:i}=this.props;let{tradeType:l,dealType:n,dateType:o,crossIsolatedType:c}=this.state;l=l.tradeType,n=n.dealType;const u=o.dateType,p=i.get("user_id");if(!p)return;const h=e=>{if(navigator.msSaveBlob)navigator.msSaveBlob(e,"hisorder.xls");else{const t=window.URL.createObjectURL(e),s=document.createElement("a");s.download="dealRecord.xls",s.href=t,document.body.appendChild(s),s.click(),document.body.removeChild(s)}},g=s=>{d.A.tipWarn(s&&s.err_msg||(0,T.YG)(t,"export_data_failed"),e)},_={symbol:s,pair:r,tradeType:l,dealType:n,createDate:u,subUserId:p};et?a(_,h,g,c):a(_,h,g)}),Je(this,"onChangeInfoSwitchType",(e,t)=>{(0,v.b7U)(e.value);const{pair:s,setSymbolFn:r,linearProductList:a}=this.props,i=(0,v.HKu)(a,e.value,s);i!==s&&r(i),this.setState({crossIsolatedType:e.value},()=>{this.queryData()})}),this.state={tradeType:{},dealType:{},dateType:{},crossIsolatedType:(0,v.m8r)(v.jB4.CROSS_ISOLATED)}}}var st=(0,i.Ng)(function(e){let t=e.default.appReducer.get("convertedCurrency");return t="none"===t?"usd":t,{convertedCurrency:t,rateUsdt:e.default.appReducer.get("rateUsdt"),usdtPriceData:e.default.appReducer.get("usdtPriceData"),language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),dealOrder:(0,v.kuS)(Xe,e.default.subAccountDetailsReducer.get("dealOrder"),e.default.swapSubAccountDetailsReducer.get("swapDealOrder"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapDealOrder")),symbolList:(0,v.kuS)(Xe,e.default.appReducer.get("symbolList"),e.default.appReducer.get("swapSymbolList"),e.default.appReducer.get("linearSymbolList")),linearProductList:e.default.appReducer.get("linearProductList"),symbol:(0,v.kuS)(Xe,e.default.subAccountDetailsReducer.get("symbol"),e.default.swapSubAccountDetailsReducer.get("swapSymbol"),(0,v.pOZ)(e.default.linearSwapSubAccountDetailsReducer.get("pair"))),pair:e.default.linearSwapSubAccountDetailsReducer.get("pair"),pageIndexSubDeal:(0,v.kuS)(Xe,e.default.subAccountDetailsReducer.get("pageIndexSubDeal"),e.default.swapSubA
1ccountDetailsReducer.get("swapPageIndexSubDeal"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapPageIndexSubDeal")),totalPageSubDeal:(0,v.kuS)(Xe,e.default.subAccountDetailsReducer.get("totalPageSubDeal"),e.default.swapSubAccountDetailsReducer.get("swapTotalPageSubDeal"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapTotalPageSubDeal")),productMap:(0,v.kuS)(Xe,e.default.appReducer.get("productMap"),e.default.appReducer.get("swapProductMap"),e.default.appReducer.get("linearProductMap")),isSubDealLoading:(0,v.kuS)(Xe,e.default.subAccountDetailsReducer.get("isSubDealLoading"),e.default.swapSubAccountDetailsReducer.get("swapIsSubDealLoading"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapSubDealLoading")),tradingUnitType:(0,v.kuS)(Xe,e.default.tradeUnitReducer.get("tradingUnitType"),e.default.swapTradeUnitReducer.get("tradingUnitType"),e.default.linearSwapTradeUnitReducer.get("tradingUnitType")),theme:"white"}},function(e){const t=(0,v.kuS)(Xe,u.jI,p.Oy,h.aJ),s=(0,v.kuS)(Xe,u.jO,p.qi,h.RD),r=(0,v.kuS)(Xe,u.tD,p.qc,h.I_),a=(0,v.kuS)(Xe,qe.getDealOrderDetailList,qe.getSwapDealOrderDetailList,qe.getLinearSwapDealOrderDetailList);return(0,n.zH)({getSubDealOrderFn:t,setSymbolFn:s,exportSubDealOrderFn:r,getDealOrderDetailListFn:a},e)})(tt),rt=s(46942),at=s.n(rt),it=s(88905),lt=s(58559),nt=s(87023),ot=s(87342);function ct(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const dt=(0,v.a_H)()||v.Dhg,ut=[it.OPEN_LONG,it.OPEN_SHORT,it.CLOSE_LONG,it.CLOSE_SHORT,it.OPEN_TAKER_FEE,it.OPEN_MAKER_FEE,it.CLOSE_TAKER_FEE,it.CLOSE_MAKER_FEE,it.EXPLOSION_CLOSE_LONG,it.EXPLOSION_CLOSE_SHORT,it.MONEY_IN,it.MONEY_OUT,dt===v.Dhg?it.UNDUE_PROFIT_LOSS_LONG:it.SWAP_UNDUE_PROFIT_LOSS_LONG,dt===v.Dhg?it.UNDUE_PROFIT_LOSS_SHORT:it.SWAP_UNDUE_PROFIT_LOSS_SHORT,it.DUE_PROFIT_LOSS,it.APPORTION,it.ACTIVITY_AWARD,it.DIVIDEND,dt===v.I$g?it.MERGE_TO_MAINACCOUNT:it.TRANSFER_TO_MAINACCOUNT,dt===v.I$g?it.MERGE_FROM_MAINACCOUNT:it.TRANSFER_FROM_MAINACCOUNT,it.SYSTEM];dt===v.Dhg?ut.push(it.DELIVERY_FEE,it.DELIVERY_CLOSE_LONG,it.DELIVERY_CLOSE_SHORT):dt===v.qIS?ut.push(it.FUND_RATE):dt===v.I$g&&(ut.push(it.FUND_RATE,it.DELIVERY_FEE,it.TRANSFER_FROM_OTHER_MAIN_USDT_ACCOUNT,it.TRANSFER_TO_OTHER_MAIN_USDT_ACCOUNT),ut.push(it.MERGE_TO_SUBACCOUNT,it.MERGE_FROM_SUBACCOUNT,it.AUTO_EXCHANGE,it.MONEY_IN_TRAIL_FUND_REDEEM,it.MONEY_OUT_TRAIL_FUND_BACK,it.ADL_CLOSE_LONG,it.ADL_CLOSE_SHORT,it.MARGIN_INCRESE,it.MARGIN_DECREASE,it.SWAP_SYSTEM));const pt=[it.SYSTEM,it.DIVIDEND,it.DUE_PROFIT_LOSS,it.ACTIVITY_AWARD,it.MONEY_IN,it.MONEY_OUT,it.MERGE_TO_MAINACCOUNT,it.MERGE_FROM_MAINACCOUNT,it.TRANSFER_TO_OTHER_MAIN_USDT_ACCOUNT,it.TRANSFER_FROM_OTHER_MAIN_USDT_ACCOUNT],ht=dt===v.I$g,gt=dt===v.qIS;class _t extends a.PureComponent{componentDidMount(){const{crossIsolatedType:e}=this.state,{language:t,pair:s}=this.props;let r=[];r=dt===v.I$g&&e===v.jB4.CROSS&&""!==s?[it.DUE_PROFIT_LOSS,it.MONEY_IN,it.MONEY_OUT,it.TRANSFER_FROM_OTHER_MAIN_USDT_ACCOUNT,it.TRANSFER_TO_OTHER_MAIN_USDT_ACCOUNT,it.MERGE_TO_MAINACCOUNT,it.MERGE_FROM_MAINACCOUNT,it.ACTIVITY_AWARD,it.DIVIDEND,it.SYSTEM]:[it.DUE_PROFIT_LOSS],this.setState({noIncludeTypes:r}),this.setTradeType(ut.filter(e=>!r.includes(e)),it.DUE_PROFIT_LOSS,"remove"),(0,nt.zg)().then(e=>{this.setState({multiAssetsMarginAccountSupportTokens:e})}),this.setState({dateType:{value:(0,T.YG)(t,"current_seven_day"),dateType:v.$zK}},()=>{this.queryData()})}UNSAFE_componentWillReceiveProps(e){const{subAccountData:t,language:s}=this.props;if(!(0,o.is)(t,e.subAccountData)){const t=e.subAccountData.get("user_id");this.queryData(1,t)}s!==e.language&&this.setState({dateType:{value:(0,T.YG)(e.language,"current_seven_day"),dateType:v.$zK}},()=>{this.queryData()}),ht&&this.props.isFinacialRecordLoading&&!e.isFinacialRecordLoading&&(this.LinearSwapCrossSymbol=e.symbol)}queryData(e=1,t){const{getSubFinacialRecordFn:s,subAccountData:r,symbol:a,pair:i,language:l}=this.props,{moneyType:n,dateType:o,accountValue:c}=this.state;if(0===n.length)return void d.A.tipWarn((0,T.YG)(l,"financial_type_without_condition"));
1const u=o.dateType,p={symbol:a,pair:i,accountValue:c,subUserId:t=t||r.get("user_id"),pageIndex:e||1,moneyType:n,createDate:u};if(t)if(ht){const{crossIsolatedType:e}=this.state;this.setState({accountValueReal:c}),s(p,this.errorCallback,e)}else s(p,this.errorCallback)}renderLoading(){const{language:e,finacialRecord:t,isFinacialRecordLoading:s}=this.props;return s?(0,r.jsx)(A.A,{needLoadingHeight:t&&0===t.size}):(0,r.jsx)(M.A,{language:e,dataList:t})}setDateType(e){this.setState({dateType:e})}renderDataList(){let{finacialRecord:e,language:t,symbol:s,productMap:i,tradingUnitType:l}=this.props;const{crossIsolatedType:n,accountValueReal:o}=this.state;if(!i||0===i.size)return;s=e&&e.get(0)&&e.get(0).get("symbol")||s;const c=o;let d=l===v._rs?(0,T.YG)(t,"sheet"):s;const u=(0,v.kuS)(dt,(0,T.YG)(t,"trade_type"),(0,T.YG)(t,"trade_type"),(0,T.YG)(t,"change_type"));(0,v.kuS)(dt,s,s,c);!ht||n!==v.jB4.CROSS||l===v._rs||"USDT"!==s&&"HUSD"!==s&&""!==s&&""!==this.LinearSwapCrossSymbol||(d=""===this.LinearSwapCrossSymbol?(0,T.YG)(t,"transaction_data_query_ceil_coin"):this.LinearSwapCrossSymbol);const p=(0,v.kuS)(dt,(0,T.YG)(t,"sheet_volume"),(0,T.YG)(t,"sheet_volume"),`${(0,T.YG)(t,"volume")}`);return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsx)("th",{width:"150px",children:(0,r.jsx)("p",{className:"item",children:(0,T.YG)(t,"contract")})}),(0,r.jsx)("th",{children:(0,T.YG)(t,"time")}),(0,r.jsx)("th",{children:u}),(0,r.jsx)("th",{style:{textAlign:ht?"right":"left"},children:p})]})}),e.map((e,s)=>{const a=(0,v.Ov2)(e,"money_type"),n=a===it.OPEN_LONG||a===it.OPEN_SHORT||a===it.CLOSE_LONG||a===it.CLOSE_SHORT||a===it.DELIVERY_CLOSE_LONG||a===it.DELIVERY_CLOSE_SHORT||a===it.EXPLOSION_CLOSE_LONG||a===it.EXPLOSION_CLOSE_SHORT,o=(0,v.Ov2)(e,"money"),c=e.get("contract_code"),d=(0,v.kuS)(dt,(0,v.Ov2)(e,"symbol"),c&&c.split("-")[0],c&&c.split("-")[0]);let u,p;if(ht){const t=e.get("business_type")||"swap",s=e.get("pair")||e.get("contract_code");u=(0,v.amw)({linearProductMap:i,businessType:t,pair:s})}else u=i.get(d);const h="futures"===e.get("business_type")?"linear_futures":"linear_swap";let g;const _=[it.MONEY_IN,it.MONEY_OUT].includes(a);g="USDT"===c?(0,T.YG)(t,"linear_swap_cross"):_?d:h===v.e8W.SWAP?(0,v.QgQ)({contract:e,language:t,type:"linear_swap",shouldTime:!1}):(0,v.QgQ)({contract:e,language:t,type:"linear_futures",shouldContractType:!1,shouldTime:!0}),!ht||"USDT"!==d&&"HUSD"!==d?p=v.AzJ:(g=(0,T.YG)(t,"USDT"===d?"linear_swap_cross":"linear_swap_husd_cross"),p=v.emG,u={});let m=(0,v.HwT)(u,o,!0,p),y="";o<0?y="red-font":o>0&&(y="green-font",m="+"+m);const x=(0,v.Vgt)((0,v.Ov2)(e,"from_margin_account")),j=(0,v.Vgt)((0,v.Ov2)(e,"to_margin_account")),S=(0,v.Ov2)(e,"amount"),N=l===v._rs?(0,T.YG)(t,"sheet"):d,f=l===v.x3H?v.EYu:l,O=(0,v.Ov2)(e,"pair",""),b=(0,v.amw)({linearProductMap:i,businessType:v.e8W.SWAP,pair:O||c}),D=n?(0,v.NGl)(b,close,f,S,!0,!0):(0,v.ZVp)((0,L.Hk)(Math.abs(Number(o)),8)),C=`${(0,ot.A)(n?S:o).gt(0)?"+":""}${D}${n?`(${N})`:(0,v.Ov2)(e,"asset")?`(${(0,v.Ov2)(e,"asset")})`:""}`,w=n?S:o,M=at()({"up-color":(0,ot.A)(w).gt(0),"down-color":(0,ot.A)(w).lt(0)});return(0,r.jsxs)("tr",{className:"table-body-line",children:[(0,r.jsx)("td",{children:g}),(0,r.jsx)("td",{children:be().tzTrans((0,v.Ov2)(e,"created_at")).format("YYYY-MM-DD HH:mm:ss")}),(0,r.jsx)("td",{children:(0,it.formatFinancialRecordTradeType)(a,t,x,j,ht,gt)}),(0,r.jsx)("td",{style:{textAlign:ht?"right":"left"},className:M,children:C})]},s)})]})}render(){const{language:e,totalPageFinacialRecord:t,pageIndexFinacialRecord:s,isFinacialRecordLoading:i,symbol:l,pair:n,setSymbolFn:o,userInfo:c}=this.props,{moneyType:d,dateType:u,crossIsolatedType:p,accountValue:h,noIncludeTypes:g,multiAssetsMarginAccountSupportTokens:_}=this.state,m=p===v.jB4.CROSS,y=ht&&p===v.jB4.CROSS;let x,S=[],N="",f="";if(ht){let t,s=this.getPairList();if(m){S=_.map(t=>({key:t,value:"USDT"===t?(0,T.YG)(e,"linear_swap_cross"):t}));const r=S.find(e=>e.key===h);N=r?r.value:"",s=this.getPairList(),t=s.find(e=>e.key===n),f=t?t.value:""}else t=s.find(e=>e.key===n),f=t?t.value:"";t||o(s.get(0)&&s.get(0).key),x=s}else{x=this.props.symbolListWidthNotTradable.map(e=>({key:e,value:e}));const e=x.find(e=>e.key===l);f=e?e.value:"",!e&&x.size&&o(x.get(0).key)}const O=[{value:(0,T.YG)(e,"current_seven_day"),dateType:v.$zK},{value:(0,T.YG)(e,"current_three_month"),dateType:v.qeR}],b=[[{value:(0,T.YG)(e,"all"),tradeType:0}],[{value:(0,T.YG)(e,"open_long"),tradeType:it.OPEN_LONG},{value:(0,T.YG)(e,"open_short"),tradeType:it.OPEN_SHORT},{value:(0,T.YG)(e,"close_long"),tradeType:it.CLOSE_LONG},{value:(0,T.YG)(e,"close_short"),tradeType:it.CLOSE_SHORT}],[{value:(0,T.YG)(e,"open_taker_fee"),tradeType:it.OPEN_TAKER_FEE},{value:(0,T.YG)(e,"open_maker_fee"),tradeType:it.OPEN_MAKER_FEE},{value:(0,T.YG)(e,"close_taker_fee"),tradeType:it.CLOSE_TAKER_FEE},{value:(0,T.YG)(e,"close_maker_fee"),tradeType:it.CLOSE_MAKER_FEE}],[{value:(0,T.YG)(e,"delivery_close_long"),tradeType:it.DELIVERY_CLOSE_LONG},{value:(0,T.YG)(e,"delivery_close_short"),tradeType:it.DELIVERY_CLOSE_SHORT},{value:(0,T.YG)(e,"delivery_fee"),tradeType:it.DELIVERY_FEE},{value:(0,T.YG)(e,"undue_profit_loss_long"),tradeType:it.UNDUE_PROFIT_LOSS_LONG},{value:(0,T.YG)(e,"undue_profit_loss_short"),tradeType:it.UNDUE_PROFIT_LOSS_SHORT},{value:(0,T.YG)(e,"due_profit_loss"),tradeType:it.DUE_PROFIT_LOSS}],[{value:(0,T.YG)(e,"force_buy_close"),tradeType:it.EXPLOSION_CLOSE_LONG},{value:(0,T.YG)(e,"force_sell_close"),tradeType:it.EXPLOSION_CLOSE_SHORT}],[{value:(0,T.YG)(e,"money_in"),tradeType:it.MONEY_IN},{value:(0,T.YG)(e,"money_out"),tradeType:it.MONEY_OUT},{value:(0,T.YG)(e,"transfer_to_mainaccount"),tradeType:it.TRANSFER_TO_MAINACCOUNT},{value:(0,T.YG)(e,"transfer_fom_mainaccount"),tradeType:it.TRANSFER_FROM_MAINACCOUNT}],[{value:(0,T.YG)(e,"apportion"),tradeType:it.APPORTION},{value:(0,T.YG)(e,"activity_award"),tradeType:it.ACTIVITY_AWARD},{value:(0,T.YG)(e,"dividend"),tradeType:it.DIVIDEND},{value:(0,T.YG)(e,"system"),tradeType:it.SYSTEM}]],D=[[{value:(0,T.YG)(e,"all"),tradeType:0}],[{value:(0,T.YG)(e,"open_long"),tradeType:it.OPEN_LONG},{value:(0,T.YG)(e,"open_short"),tradeType:it.OPEN_SHORT},{value:(0,T.YG)(e,"close_long"),tradeType:it.CLOSE_LONG},{value:(0,T.YG)(e,"close_short"),tradeType:it.CLOSE_SHORT}],[{value:(0,T.YG)(e,"open_taker_fee"),tradeType:it.OPEN_TAKER_FEE},{value:(0,T.YG)(e,"open_maker_fee"),tradeType:it.OPEN_MAKER_FEE},{value:(0,T.YG)(e,"close_taker_fee"),tradeType:it.CLOSE_TAKER_FEE},{value:(0,T.YG)(e,"close_maker_fee"),tradeType:it.CLOSE_MAKER_FEE}],[{value:(0,T.YG)(e,"fund_rate"),tradeType:it.FUND_RATE}],[{value:(0,T.YG)(e,"force_buy_close"),tradeType:it.EXPLOSION_CLOSE_LONG},{value:(0,T.YG)(e,"force_sell_close"),tradeType:it.EXPLOSION_CLOSE_SHORT}],[{value:(0,T.YG)(e,"money_in"),tradeType:it.MONEY_IN},{value:(0,T.YG)(e,"money_out"),tradeType:it.MONEY_OUT},{value:(0,T.YG)(e,"transfer_to_mainaccount"),tradeType:it.TRANSFER_TO_MAINACCOUNT},{value:(0,T.YG)(e,"transfer_fom_mainaccount"),tradeType:it.TRANSFER_FROM_MAINACCOUNT}],[{value:(0,T.YG)(e,"apportion"),tradeType:it.APPORTION},{value:(0,T.YG)(e,"activity_award"),tradeType:it.ACTIVITY_AWARD},{value:(0,T.YG)(e,"dividend"),tradeType:it.DIVIDEND},{value:(0,T.YG)(e,"system"),tradeType:it.SYSTEM}]],C=[[{value:(0,T.YG)(e,"all"),tradeType:0}],[{value:(0,T.YG)(e,"open_long"),tradeType:it.OPEN_LONG},{value:(0,T.YG)(e,"open_short"),tradeType:it.OPEN_SHORT},{value:(0,T.YG)(e,"close_long"),tradeType:it.CLOSE_LONG},{value:(0,T.YG)(e,"close_short"),tradeType:it.CLOSE_SHORT}],[{value:(0,T.YG)(e,"open_taker_fee"),tradeType:it.OPEN_TAKER_FEE},{value:(0,T.YG)(e,"open_maker_fee"),tradeType:it.OPEN_MAKER_FEE},{value:(0,T.YG)(e,"close_taker_fee"),tradeType:it.CLOSE_TAKER_FEE},{value:(0,T.YG)(e,"close_maker_fee"),tradeType:it.CLOSE_MAKER_FEE}],[{value:(0,T.YG)(e,"fund_rate"),tradeType:it.FUND_RATE}],[{value:(0,T.YG)(e,"force_buy_close"),tradeType:it.EXPLOSION_CLOSE_LONG},{value:(0,T.YG)(e,"force_sell_close"),tradeType:it.EXPLOSION_CLOSE_SHORT}],this.getLinearSwapTradeType5Datas(c,e),[{value:(0,T.YG)(e,"apportion"),tradeType:it.APPORTION},{value:(0,T.YG)(e,"activity_award"),tradeType:it.ACTIVITY_AWARD},{value:(0,T.YG)(e,"dividend"),tradeType:it.DIVIDEND},{value:(0,T.YG)(e,"system"),tradeType:it.SWAP_SYSTEM},{value:(0,T.YG)(e,"fee_exchange"),tradeType:it.MONEY_IN_TRAIL_FUND_REDEEM},{value:(0,T.YG)(e,"fee_recycle"),tradeType:it.MONEY_OUT_TRAIL_FUND_BACK}],[{value:`ADL${(0,T.YG)(e,"close_long")}`,tradeType:it.ADL_CLOSE_LONG},{value:`ADL${(0,T.YG)(e,"close_short")}`,tradeType:it.ADL_CLOSE_SHORT}],[{value:(0,T.YG)(e,"increase_margin"),tradeType:it.MARGIN_INCRESE},{value:(0,T.YG)(e,"decrease_margin"),tradeType:it.MARGIN_DECREASE}]],w=(0,v.kuS)(dt,b,D,C);let M,A=d,G=null;switch(d.indexOf(0)>-1&&(A=[0,...ut],G=(0,T.YG)(e,"all")),e){case"vi-VI":case"ru-RU":M=300;break;default:M=200}return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("div",{className:"sub-current-order-condition",children:[ht&&(0,r.jsx)(I.A,{rootStyle:{marginRight:"6px",marginLeft:10},datas:(0,v.bmt)(e,v.jB4.CROSS_ISOLATED),value:p,onClickItem:this.onChangeInfoSwitchType}),(0,r.jsxs)("div",{className:"select-condition-wrap",children:[ht&&m&&(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title",style:{marginLeft:"16
1px"},children:(0,T.YG)(e,"account")}),(0,r.jsx)(j.A,{language:e,datas:S,showValueType:"out",value:N,rootClassName:"center-page-select-root",rootStyle:{marginRight:0},itemClassName:"center-page-select-item",showKey:"value",onSelectItemClick:this.onChangeAccount})]}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title",children:(0,T.YG)(e,"futures")}),(0,r.jsx)(j.A,{language:e,canFilter:!0,datas:x,showValueType:"out",value:f,rootClassName:"center-page-select-root",rootStyle:{marginRight:0},showKey:"value",itemClassName:"center-page-select-item",onSelectItemClick:t=>{const s=t.key;y?s===(0,T.YG)(e,"all")?(o(""),this.setTradeType(ut.filter(e=>!g.includes(e)),1,"remove")):(o(s),this.setTradeType(ut.filter(e=>!g.includes(e)&&!pt.includes(e)),1,"remove")):o(s)}})]}),(0,r.jsxs)("div",{className:`select-condition-symbol ${e}`,children:[(0,r.jsx)("span",{className:"center-page-select-title",children:(0,T.YG)(e,"change_type")}),(0,r.jsx)(lt.A,{keyField:"tradeType",valueText:G,shouldCenter:!0,datas:w,rootStyle:{width:160},centerLeft:M,rootClassName:"center-page-select-root",value:A,onSelectItemClick:this.setTradeType})]}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title",children:(0,T.YG)(e,"date")}),(0,r.jsx)(j.A,{datas:O,value:u.value,showValueType:"out",rootClassName:"center-page-select-root",rootStyle:{width:150},itemStyle:{width:150},showKey:"value",onSelectItemClick:e=>this.setDateType(e)})]})]}),(0,r.jsxs)("div",{className:"select-btn-wrap",children:[(0,r.jsx)("button",{className:"blue-button query-button",onClick:()=>{this.queryData()},children:(0,T.YG)(e,"query")}),(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"export"),offset:5,align:"right",widthAuto:!0,children:(0,r.jsx)("i",{className:"icon-export blue-font",style:{fontSize:"20px"},onClick:this.exportClick})})]})]}),(0,r.jsxs)("div",{className:"table-box",children:[(0,r.jsx)("table",{children:this.renderDataList()}),this.renderLoading(),(0,r.jsxs)("div",{className:"pagination-wrapper",children:[(0,r.jsx)("div",{style:{color:"#8A8A8E",fontSize:"12px",width:"840px"},children:(0,T.YG)(e,dt===v.Dhg?"financial_record_table_tip":"swap_financial_record_table_tip")}),(0,r.jsx)(Y.A,{language:e,totalPage:t,currentPage:s,isLoading:i,ref:e=>{this.contractOrderPagination=e},onPageChange:e=>{this.queryData(e)}})]})]})]})}constructor(e){super(e),ct(this,"errorCallback",e=>{d.A.tipError(e.errorMsg)}),ct(this,"exportClick",()=>{const{theme:e,language:t,symbol:s,pair:r,exportSubFinacialRecordFn:a,subAccountData:i}=this.props,{moneyType:l,dateType:n,crossIsolatedType:o,accountValue:c}=this.state;if(0===l.length)return void d.A.tipWarn((0,T.YG)(t,"financial_type_without_condition"));const u=n.dateType,p=i.get("user_id");if(!p)return;const h=e=>{if(navigator.msSaveBlob)navigator.msSaveBlob(e,"hisorder.xls");else{const t=window.URL.createObjectURL(e),s=document.createElement("a");s.download="finaceRecord.xls",s.href=t,document.body.appendChild(s),s.click(),document.body.removeChild(s)}},g=s=>{d.A.tipWarn(s&&s.err_msg||(0,T.YG)(t,"export_data_failed"),e)},_={symbol:s,pair:r,accountValue:c,subUserId:p,moneyType:l,createDate:u};ht?a(_,h,g,o):a(_,h,g)}),ct(this,"setTradeType",(e,t,s)=>{if(0===t&&"remove"===s)return void this.setState({moneyType:[]});if(0===t&&"add"===s)return void this.setState({moneyType:[0]});const r=e.filter(e=>0!==e);r.size===ut.length||r.length===ut.length?this.setState({moneyType:[0]}):this.setState({moneyType:r})}),ct(this,"onChangeInfoSwitchType",(e,t)=>{(0,v.b7U)(e.value);const{pair:s,setSymbolFn:r,linearProductList:a}=this.props,i=(0,v.HKu)(a,e.value,s);i!==s&&r(e.value===v.jB4.CROSS?"":i),this.setState({crossIsolatedType:e.value},()=>{this.queryData()})}),ct(this,"onChangeAccount",e=>{this.setState({accountValue:e.key},()=>{const{crossIsolatedType:e}=this.state,{symbol:t,setSymbolFn:s,linearProductList:r}=this.props,a=(0,v.BQq)(r,e,1).map(e=>({key:e,value:(0,v.Vgt)(e)}));let i=t;a.includes(i)||(i=a.get(0)),i!==t&&s(i)})}),ct(this,"getPairList",({props:e,isOnlyPair:t=!1}={})=>{const{linearProductList:s,language:r}=e||this.props,{crossIsolatedType:a,accountValue:i}=this.state;let l;if(a===v.jB4.CROSS){const e=s?s.filter(e=>e.get("currency")===i):null;l=(0,v.BQq)(e,a).map(e=>({key:e,value:(0,v.Vgt)(e)})),l=l&&l.unshift({key:"",value:(0,T.YG)(r,"all")})}else l=(0,v.BQq)(s,a).map(e=>({key:e,value:(0,v.Vgt)(e)}));return t&&(l=l.map(e=>e.key)),l}),ct(this,"getLinearSwapTradeType5Datas",(e,t)=>{const s=e&&2===e.get("uc_user_type");return[...[{value:(0,T.YG)(t,"money_in"),tradeType:it.MONEY_IN},{value:(0,T.YG)(t,"money_out"),tradeType:it.MONEY_OUT},{value:(0,T.YG)(t,"usdt_transfer_to_account"),tradeType:it.TRANSFER_FROM_OTHER_MAIN_USDT_ACCOUNT},{value:(0,T.YG)(t,"usdt_transfer_from_account"),tradeType:it.TRANSFER_TO_OTHER_MAIN_USDT_ACCOUNT}],...s?[{value:(0,T.YG)(t,"transfer_to_mainaccount"),tradeType:it.MERGE_TO_MAINACCOUNT},{value:(0,T.YG)(t,"transfer_fom_mainaccount"),tradeType:it.MERGE_FROM_MAINACCOUNT}]:[{value:(0,T.YG)(t,"transfer_to_subaccount"),tradeType:it.MERGE_TO_SUBACCOUNT},{value:(0,T.YG)(t,"transfer_from_subaccount"),tradeType:it.MERGE_FROM_SUBACCOUNT}],{value:(0,T.YG)(t,"auto_exchange"),tradeType:it.AUTO_EXCHANGE}]}),this.state={moneyType:[0],dateType:{},crossIsolatedType:(0,v.m8r)(v.jB4.CROSS_ISOLATED),accountValue:"USDT",accountValueReal:"USDT",noIncludeTypes:[],multiAssetsMarginAccountSupportTokens:[]},this.LinearSwapCrossSymbol=e.symbol}}var mt=(0,i.Ng)(function(e){return{language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),linearProductList:e.default.appReducer.get("linearProductList"),finacialRecord:(0,v.kuS)(dt,e.default.subAccountDetailsReducer.get("finacialRecord"),e.default.swapSubA
1ccountDetailsReducer.get("swapFinacialRecord"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapFinacialRecord")),symbolListWidthNotTradable:(0,v.kuS)(dt,e.default.appReducer.get("symbolListWidthNotTradable"),e.default.appReducer.get("swapSymbolListWidthNotTradable"),e.default.appReducer.get("linearSymbolListWidthNotTradable")),symbol:(0,v.kuS)(dt,e.default.subAccountDetailsReducer.get("symbol"),e.default.swapSubAccountDetailsReducer.get("swapSymbol"),(0,v.pOZ)(e.default.linearSwapSubAccountDetailsReducer.get("pair"))),pair:e.default.linearSwapSubAccountDetailsReducer.get("pair"),pageIndexFinacialRecord:(0,v.kuS)(dt,e.default.subAccountDetailsReducer.get("pageIndexFinacialRecord"),e.default.swapSubAccountDetailsReducer.get("swapPageIndexFinacialRecord"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapPageIndexFinacialRecord")),totalPageFinacialRecord:(0,v.kuS)(dt,e.default.subAccountDetailsReducer.get("totalPageFinacialRecord"),e.default.swapSubAccountDetailsReducer.get("swapTotalPageFinacialRecord"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapTotalPageFinacialRecord")),isFinacialRecordLoading:(0,v.kuS)(dt,e.default.subAccountDetailsReducer.get("isFinacialRecordLoading"),e.default.swapSubAccountDetailsReducer.get("swapIsFinacialRecordLoading"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapFinacialRecordLoading")),theme:"white",productMap:(0,v.kuS)(dt,e.default.appReducer.get("productMap"),e.default.appReducer.get("swapProductMap"),e.default.appReducer.get("linearProductMap")),tradingUnitType:(0,v.kuS)(dt,e.default.tradeUnitReducer.get("tradingUnitType"),e.default.swapTradeUnitReducer.get("tradingUnitType"),e.default.linearSwapTradeUnitReducer.get("tradingUnitType"))}},function(e){const t=(0,v.kuS)(dt,u.vy,p.MY,h.jb),s=(0,v.kuS)(dt,u.jO,p.qi,h.RD),r=(0,v.kuS)(dt,u.zG,p.Yc,h.Bu);return(0,n.zH)({getSubFinacialRecordFn:t,setSymbolFn:s,exportSubFinacialRecordFn:r},e)})(_t),yt=s(36266);function xt(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const vt=(0,v.a_H)()||v.Dhg,Tt=vt===v.I$g;class jt extends a.PureComponent{UNSAFE_componentWillReceiveProps(e){const{subAccountData:t,language:s}=this.props;c().is(t,e.subAccountData)||this.queryData(e.subAccountData.get("user_id")),s!==e.language&&t.size>0&&this.queryData(t.get("user_id"))}componentDidMount(){const{subAccountData:e}=this.props;e.size>0&&this.queryData(e.get("user_id"))}queryData(e){const{getSubAccountAssetsInfoFn:t,subAccountData:s}=this.props;(e=e||s.get("user_id"))&&(Tt?this.getLinearSwapUserIshit(e).then(async s=>{const r=s.some(e=>"9"===e.scene&&e.is_hit||"1"===e.scene&&e.is_hit);if(this.setState({isUnifiedOrMultiAssets:r}),r){const t=await(0,yt.LA)(e);this.setState({unifiedAccountAssets:t})}else{const{crossIsolatedType:s}=this.state;t({subUserId:e},()=>{},this.errorCallback,s)}}).catch(s=>{const{crossIsolatedType:r}=this.state;t({subUserId:e},()=>{},this.errorCallback,r)}):t({subUserId:e},()=>{},this.errorCallback))}renderLoading(){const{language:e,subAccountAssetList:t,isAssetInfoLoading:s}=this.props;return s?(0,r.jsx)(A.A,{needLoadingHeight:t&&0===t.size}):(0,r.jsx)(M.A,{language:e,dataList:t})}renderUnifiedAccountAssets(){const{language:e}=this.props,{unifiedAccountAssets:t=[]}=this.state;return(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"currency")}),(0,r.jsx)("th",{children:(0,T.YG)(e,"wallet_balance")}),(0,r.jsx)("th",{children:(0,T.YG)(e,"linear_swap_assets_all_assets_thead_total_equity")})]})}),(0,r.jsx)("tbody",{children:t.map(e=>(0,r.jsxs)("tr",{className:"table-body-line",children:[(0,r.jsx)("td",{className:"thd-text-left",children:(0,r.jsx)("span",{children:e.margin_asset})}),(0,r.jsxs)("td",{children:[(0,v.ZVp)((0,L.Hk)(e.margin_static,v.UtD))," (",e.margin_asset,")"]}),(0,r.jsxs)("td",{children:[(0,v.ZVp)((0,L.Hk)(e.margin_balance,v.UtD))," (",e.margin_asset,")"]})]},e.margin_asset))})]})})}renderDataList(){const{subAccountAssetList:e,productMap:t,language:s,convertedCurrency:a,rateUsdt:i,usdtPriceData:l,linearSwapUserIshit:n,linearSwapSupportNewRiskRate:o,swapSupportNewRiskRate:c,contractSupportNewRiskRate:d}=this.props;if(!t||0===t.size)return;const{pageIndex:u,sortField:p,sortDirection:h}=this.state,g=u-1;
1e.forEach(e=>{let s="--",r="--";if(Tt){const t=(0,v.Ov2)(e,"margin_balance"),a=(0,v.Ov2)(e,"margin_asset");if(l){const e=l.get("btcusdt")||1,i=l.get(a.toLowerCase()+"usdt")||1;r=(0,L.lK)(t,i),s=(0,L.Hk)("BTC"===a?t:(0,L.y4)(r,e),8)}}else{const a=(0,v.Ov2)(e,"symbol"),i=t.get(a);if(!i)return;const n=(0,v.Ov2)(e,"margin_balance"),o=a.toLowerCase()+"usdt",c=l&&l.get(o);if(r=(0,L.lK)((0,L.Hk)(n,Tt?v.U1m:i.get("other_amount_precision")),c),r=(0,v.kuS)(vt,r,r,n),l){const e=l.get("btcusdt")||1;let t;t="BTC"===a.toUpperCase()?(0,L.Hk)(n,8):(0,L.Hk)((0,L.y4)(r,e),8),s=(0,v.kuS)(vt,t,t,(0,L.Hk)((0,L.y4)(r,e),8))}}e.btcAsset=(0,v.ZVp)(s),e.usdAsset=r});let _=e;return p&&(_=_.sort((e,t)=>{let s="";switch(p){case"contract_account_rights":s="margin_balance";break;case"rights_convert_into":s="btcAsset";break;case"margin_rate_new":s=Tt&&n&&o||!Tt&&c||!Tt&&d?"new_risk_rate":"risk_rate"}let r=Number((0,v.Ov2)(e,s)),a=Number((0,v.Ov2)(t,s));return"btcAsset"===s&&(r=e.btcAsset,a=t.btcAsset),"up"===h?(window.isNaN(r)&&(r=1/0),window.isNaN(a)&&(a=1/0),r-a):(window.isNaN(r)&&(r=-1/0),window.isNaN(a)&&(a=-1/0),a-r)})),_.map((e,l)=>{if(l>=10*u||l<10*g)return null;let p,h=(0,v.Ov2)(e,"symbol");if("--"===h&&(h=(0,v.Ov2)(e,"margin_asset")),Tt){const s=e.get("business_type")||"swap";p=(0,v.amw)({linearProductMap:t,businessType:s,pair:h})}else p=t.get(h);let _=(0,v.Ov2)(e,"risk_rate");Tt||(c||d)&&(_=(0,v.Ov2)(e,"new_risk_rate"));const m=(0,oe.vq)(_,c||d),y=(0,v.Ov2)(e,v.gOk)===v.jB4.CROSS;if(!y&&!p)return null;const x=(0,v.GWQ)(p,(0,v.Ov2)(e,"liquidation_price")),j=y?v.Gco:x,S=(0,v.kuS)(vt,"USD","USD","");let N=(0,v.Ov2)(e,"margin_balance");const f=(0,v.Ov2)(e,"margin_account"),O=(0,v.Ov2)(e,"margin_asset");let b=(0,v.Ov2)(e,"contract_code");"--"===b&&(b=O+"-USDT");const D=(0,v.kuS)(vt,h,h,(0,v.Vgt)(b));N=(0,v.HwT)(p,N);const C=(0,v.ZVp)((0,v.Etd)(e.usdAsset,a,i));let w=(0,v.HwT)(p,(0,v.Ov2)(e,"margin_position")),M=(0,v.HwT)(p,(0,v.Ov2)(e,"margin_frozen")),A=(0,v.HwT)(p,(0,v.Ov2)(e,"profit_unreal")),Y=(0,v.HwT)(p,(0,v.Ov2)(e,"profit_real"));return y&&(N=(0,v.ZVp)((0,L.Hk)(N,v.UtD)),w=(0,v.ZVp)((0,L.Hk)(w,v.UtD)),M=(0,v.ZVp)((0,L.Hk)(M,v.UtD)),A=(0,v.ZVp)((0,L.Hk)(A,v.UtD)),Y=(0,v.ZVp)((0,L.Hk)(Y,v.UtD))),(0,r.jsxs)("tr",{className:"table-body-line",children:[(0,r.jsx)("td",{className:"thd-text-left thd-padding-right0",children:y?(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",height:"32px"},children:[(0,r.jsx)("span",{style:{marginRight:"6px"},children:"USDT"===f?(0,T.YG)(s,"linear_swap_cross"):f}),(0,r.jsx)(k.A,{tip:"USDT"===f?(0,T.YG)(s,"linear_swap_cross_tip"):"",children:(0,r.jsx)("i",{className:"icon-warn-info secondary-font"})})]}):D}),(0,r.jsx)("td",{className:"table-body-td-nowrap thd-padding-rigth13",children:(0,r.jsx)("p",{children:N})}),(0,r.jsxs)("td",{className:"thd-padding-rigth13",children:[(0,r.jsx)("p",{children:e.btcAsset}),(0,r.jsx)("p",{className:"secondary-font",children:`â ${C} ${"--"===C?"":a.toUpperCase()}`})]}),(0,r.jsx)("td",{children:y?v.Gco:(0,v.HwT)(p,(0,v.Ov2)(e,"margin_available"))}),(0,r.jsx)("td",{children:w}),(0,r.jsx)("td",{children:M}),(0,r.jsx)("td",{children:A}),(0,r.jsx)("td",{children:Y}),(0,r.jsx)("td",{className:"thd-padding-rigth13",children:(0,r.jsxs)("span",{className:m,children:[(0,r.jsx)("span",{style:{marginRight:"10px"},children:(0,v.l9T)(_,"")}),!(Tt&&n&&o||!Tt&&c||!Tt&&d)&&_<.3?(0,r.jsx)(k.A,{tip:(0,T.YG)(s,"margin_rate_under_30"),widthAuto:!0,children:(0,r.jsx)("span",{className:"icon-warn invariant-red-font"})}):null]})}),(0,r.jsxs)("td",{className:"--"!==j?m:"",children:[j," ","--"===j?"":S]})]},l)})}goPage(e){this.setState({pageIndex:e})}render(){const{language:e,subAccountAssetList:t,linearSwapUserIshit:s,linearSwapSupportNewRiskRate:a,swapSupportNewRiskRate:i,contractSupportNewRiskRate:l}=this.props,{sortDirection:n,sortField:o,isUnifiedOrMultiAssets:c}=this.state,{pageIndex:d}=this.state,u=Math.ceil(t.size/10),p=(0,v.kuS)(vt,(0,T.YG)(e,"variety"),(0,T.YG)(e,"variety"),(0,T.YG)(e,"account")),h=(0,v.kuS)(vt,"","","");return(0,r.jsx)("div",{children:c?this.renderUnifiedAccountAssets():(0,r.jsxs)("div",{className:"table-box",children:[(0,r.jsxs)("table",{className:""+(Tt?"table-all-text-right":""),children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsx)("th",{className:"thd-text-left thd-padding-right0",children:p}),(0,r.jsx)("th",{className:"pointer sub-asset-info-table-head",style:Tt?{justifyContent:"flex-end"}:{},onClick:this.sort("contract_account_rights"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,v.kuS)(vt,(0,T.YG)(e,"future_contract_account_rights"),(0,T.YG)(e,"swap_contract_account_rights"),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,T.YG)(e,"linear_contract_account_rights")}),(0,r.jsx)("div",{children:h})]})),(0,r.jsx)(Pe,{name:"contract_account_rights",sortDirection:n,sortField:o})]})}),(0,r.jsx)("th",{className:"pointer",onClick:this.sort("rights_convert_into"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"rights_convert_into_2")}),(0,r.jsx)(Pe,{name:"rights_convert_into",sortDirection:n,sortField:o})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,T.YG)(e,"free_margin_new")}),(0,r.jsx)("div",{children:h})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,T.YG)(e,"position_margin_new")}),(0,r.jsx)("div",{children:h})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,T.YG)(e,"frozen_margin_new")}),(0,r.jsx)("div",{children:h})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,T.YG)(e,"unrealized_profit_loss")}),(0,r.jsx)("div",{children:h})]})}),(0,r.jsx)("th",{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,T.YG)(e,"has_realized_profit_loss")}),(0,r.jsx)("div",{children:h})]})}),(0,r.jsx)("th",{className:"pointer",onClick:this.sort("margin_rate_new"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,T.YG)(e,Tt&&s&&a||!Tt&&i||!Tt&&l?"linear_swap_assets_margin_rate":"margin_rate_new"),(0,r.jsx)(Pe,{name:"margin_rate_new",sortDirection:n,sortField:o})]})}),(0,r.jsx)("th",{className:"right",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:(0,T.YG)(e,"predication_strong_parity")}),(0,r.jsx)("div",{children:h})]})})]})}),this.renderDataList()]}),this.renderLoading(),(0,r.jsxs)("div",{className:"pagination-wrapper",children:[(0,r.jsx)("div",{}),(0,r.jsx)(Y.A,{language:e,totalPage:u,currentPage:d,onPageChange:e=>{this.goPage(e)}})]})]})})}constructor(e){super(e),xt(this,"errorCallback",e=>
1{d.A.tipError(e.errorMsg)}),xt(this,"getLinearSwapUserIshit",e=>{const t=[G.Sf.IS_UNIFIED_ACCOUNT,G.Sf.SUPPORT_UNIFIED_ACCOUNT,G.Sf.SUPPORT_NEW_RISK_RATE,G.Sf.SUPPORT_HT_DEDUCTION,G.Sf.LINEAR_SWAP_SUPPORT_SWITCH_MULTI_ASSETS_MARGIN].join(",");return le.ok.requestPost("linear_swap_user_ishit",function(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},r=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(s).filter(function(e){return Object.getOwnPropertyDescriptor(s,e).enumerable}))),r.forEach(function(t){xt(e,t,s[t])})}return e}({scene:t},e?{sub_user_id:e}:{}))}),xt(this,"onChangeInfoSwitchType",(e,t)=>{(0,v.b7U)(e.value),this.setState({pageIndex:1,sortField:"",sortDirection:"",crossIsolatedType:e.value},()=>{const{subAccountData:e}=this.props;e.size>0&&this.queryData(e.get("user_id"))})}),xt(this,"sort",e=>()=>{const{sortField:t,sortDirection:s}=this.state;"margin_rate_new"!==e?e===t?"down"===s?this.setState({sortDirection:"up"}):"up"===s?this.setState({sortField:"",sortDirection:""}):this.setState({sortDirection:"down"}):this.setState({sortField:e,sortDirection:"down"}):t===e?"up"===s?this.setState({sortDirection:"down"}):"down"===s?this.setState({sortField:"",sortDirection:""}):this.setState({sortField:e,sortDirection:"up"}):this.setState({sortDirection:"up",sortField:e})}),this.state={pageIndex:1,sortField:"",sortDirection:"",crossIsolatedType:v.jB4.ALL,isUnifiedOrMultiAssets:!1,unifiedAccountAssets:[]}}}var St=(0,i.Ng)(function(e){return{theme:"white",convertedCurrency:e.default.appReducer.get("convertedCurrency"),rateUsdt:e.default.appReducer.get("rateUsdt"),language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),subAccountAssetList:(0,v.kuS)(vt,e.default.subAccountDetailsReducer.get("subAccountAssetList"),e.default.swapSubAccountDetailsReducer.get("swapSubAccountAssetList"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapSubAccountAssetList")),isAssetInfoLoading:(0,v.kuS)(vt,e.default.subAccountDetailsReducer.get("isAssetInfoLoading"),e.default.swapSubAccountDetailsReducer.get("swapIsAssetInfoLoading"),e.default.linearSwapSubAccountDetailsReducer.get("linearIsAssetInfoLoading")),productMap:(0,v.kuS)(vt,e.default.appReducer.get("productMap"),e.default.appReducer.get("swapProductMap"),e.default.appReducer.get("linearProductMap")),usdtPriceData:(0,v.kuS)(vt,e.default.subAccountDetailsReducer.get("usdtPriceData"),e.default.swapSubAccountDetailsReducer.get("usdtPriceData"),e.default.linearSwapSubAccountDetailsReducer.get("usdtPriceData")),linearSwapUserIshit:e.default.appReducer.get("linearSwapUserIshit"),linearSwapSupportNewRiskRate:e.default.appReducer.get("linearSwapSupportNewRiskRate"),swapSupportNewRiskRate:e.default.appReducer.get("swapSupportNewRiskRate"),contractSupportNewRiskRate:e.default.appReducer.get("contractSupportNewRiskRate")}},function(e){const t=(0,v.kuS)(vt,u.lR,p.q2,h.A8);return(0,n.zH)({getSubAccountAssetsInfoFn:t},e)})(jt),Nt=s(85516),ft=s(49563),Ot=s(21904),bt=s(74513);function Dt(e,t,s){return t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}const Ct=(0,v.a_H)()||v.Dhg,wt=Ct===v.I$g;class Mt extends a.PureComponent{UNSAFE_componentWillReceiveProps(e){const{subAccountData:t,language:s}=this.props;if(!(0,o.is)(t,e.subAccountData)){const t=e.subAccountData.get("user_id");this.queryData(1,t)}s!==e.language&&this.setState({tradeType:{value:(0,T.YG)(e.language,"all"),tradeType:0},dateType:{value:(0,T.YG)(e.language,"current_seven_day"),dateType:v.$zK},statusType:{value:(0,T.YG)(e.language,"all"),statusType:0},orderType:{orderType:0,value:(0,T.YG)(e.language,"transaction_limited_price_order")}},()=>{this.queryData()})}componentDidMount(){const{language:e}=this.props;this.setState({tradeType:{value:(0,T.YG)(e,"all"),tradeType:0},dateType:{value:(0,T.YG)(e,"current_seven_day"),dateType:v.$zK},statusType:{value:(0,T.YG)(e,"all"),statusType:0},orderType:{orderType:0,value:(0,T.YG)(e,"transaction_limited_price_order")}},()=>{this.queryData()})}queryData(e=1,t){const{getSubHistoryOrderFn:s,getSubHistoryTriggerOrderFn:r,getSubHistoryTrackOrderFn:a,getSubHistoryStopLossOrderFn:i,getSubHistoryMarketPriceOrderFn:l,subAccountData:n,symbol:o,pair:c}=this.props;let{tradeType:d,statusType:u,dateType:p,orderType:h,crossIsolatedType:g,sortDirection:_,sortField:m}=this.state;d=d.tradeType;let y=u.statusType;h=h.orderType;
1const x={symbol:o,pair:c,tradeType:d,status:y,createDate:p.dateType,subUserId:t=t||n.get("user_id"),pageIndex:e||1,orderType:h,sortBy:!!_&&m};0===h&&t?wt?s(x,this.errorCallback,g):s(x,this.errorCallback):1===h&&t?wt?r(x,this.errorCallback,g):r(x,this.errorCallback):2===h&&t?wt?i(x,this.errorCallback,g):i(x,this.errorCallback):3===h&&t?wt?a(x,this.errorCallback,g):a(x,this.errorCallback):4===h&&t&&(wt?l(x,this.errorCallback,g):l(x,this.errorCallback))}setTradeType(e){this.setState({tradeType:e})}setStatusType(e){this.setState({statusType:e})}setDateType(e){this.setState({dateType:e})}setOrderType(e){const{language:t}=this.props;this.setState({orderType:e,tradeType:{value:(0,T.YG)(t,"all"),tradeType:0},statusType:{value:(0,T.YG)(t,"all"),statusType:0}})}getPlanOrderPrice(e,t){const{language:s}=this.props;let r=(0,v.Ov2)(e,"order_price");const a=(0,v.Ov2)(e,"order_price_type");let i=(0,v.GWQ)(t,r);return"optimal_5"===a?i=(0,T.YG)(s,"order_board_optimal_title").replace("{optimal}",5):"optimal_10"===a?i=(0,T.YG)(s,"order_board_optimal_title").replace("{optimal}",10):"optimal_20"===a&&(i=(0,T.YG)(s,"order_board_optimal_title").replace("{optimal}",20)),i}getTrackOrderPrice(e){const{language:t}=this.props;let s="--";const r=(0,v.Ov2)(e,"order_price_type");return"formula_price"===r?s=e.get("formula_price")||(0,T.YG)(t,"formula_price"):"optimal_5"===r?s=(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",5):"optimal_10"===r?s=(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",10):"optimal_20"===r&&(s=(0,T.YG)(t,"order_board_optimal_title").replace("{optimal}",20)),s}renderLoading(){const{language:e,historyOrder:t,isHistoryOrderLoading:s}=this.props;return s?(0,r.jsx)(A.A,{needLoadingHeight:t&&0===t.size}):(0,r.jsx)(M.A,{language:e,dataList:t})}renderLimitTable(){let{language:e,historyOrder:t,productMap:s,getHistoryTradeDetailList:i,symbol:l,pair:n,subAccountData:o,tradingUnitType:c,usdtPriceData:d,convertedCurrency:u,rateUsdt:p}=this.props;const{sortDirection:h,sortField:g}=this.state,_=o.get("user_id");l=t&&t.get(0)&&t.get(0).get("symbol")||l,n=t&&t.get(0)&&(t.get(0).get("pair")||t.get(0).get("contract_code"))||n;const m=(0,v.wUP)(n)||G.Mk.USDT,y=(0,v.h6_)(c,l,(0,T.YG)(e,"sheet"),m),x=(0,v.kuS)(Ct,"USD","USD",m),j=(0,v.kuS)(Ct,l,l,m);return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-two-line",children:[(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"contract")}),(0,r.jsx)("th",{className:"thd-padding-horizontal10",children:(0,T.YG)(e,"transaction_leverage")}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("order_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"order_time",sortDirection:h||"down",sortField:g||"order_time"})]})}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("update_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"update_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"update_time",sortDirection:h,sortField:g})]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trade_type")}),Ct===v.I$g&&(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"only_lighten_up")}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"entrust_type")}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"order_volume"),(0,r.jsxs)("p",{children:["(",y,")"]})]}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"order_price"),(0,r.jsxs)("p",{children:["(",x,")"]})]}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"trade_volume"),(0,r.jsxs)("p",{children:["(",y,")"]})]}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"deal_average_price"),(0,r.jsxs)("p",{children:["(",x,")"]})]}),(0,r.jsxs)("th",{children:[(0,r.jsx)(Ze.A,{language:e}),(0,r.jsxs)("p",{children:["(",j,")"]})]}),(0,r.jsxs)("th",{className:"thd-padding-horizontal10",children:[(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"formality_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"formality")}
1)}),(0,r.jsxs)("p",{children:["(",j,")"]})]}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10",children:(0,T.YG)(e,"status")}),(0,r.jsx)("th",{children:(0,T.YG)(e,"operate")})]})}),t.map((t,a)=>{t.subUserId=_;const l=t.get("contract_code"),n=Ct===v.Dhg?(0,v.Ov2)(t,"symbol"):l.split("-")[0];let o;if(wt){const e=t.get("pair")||l,r=t.get("business_type")||"swap";o=(0,v.amw)({linearProductMap:s,businessType:r,pair:e})}else o=s.get(n);let h=(0,v.Ov2)(d,`${n.toLowerCase()}usdt`);h=(0,v.kuS)(Ct,h,h,1);const g=(0,v.Ov2)(t,"create_date"),m=(0,v.Ov2)(t,"update_time"),y=(0,v.Ov2)(t,"liquidation_type");let x="buy"===t.get("direction")?"green-font":"red-font";const j=(0,v.Ov2)(t,"status"),S=(0,v.Ov2)(t,"order_source"),N=4===j||5===j||6===j?"green-font":"",f=(4===j||5===j||6===j)&&"settlement"!==S&&"1"!==y,O=(0,v.Ov2)(t,"fee");let b="risk"===S?"4"===y?(0,v.Ov2)(t,"price"):"--":(0,v.Ov2)(t,"price"),D="risk"===S?"4"===y&&7!==j?(0,v.Ov2)(t,"trade_avg_price"):"--":(0,v.Ov2)(t,"trade_avg_price"),C=(0,v.HwT)(o,O,!0,v.pTR),w=(0,v.ZVp)((0,v.Etd)((0,L.lK)(O,h),u,p));O>0&&(C="+"+C),w="--"===w?w:`${O>0?"+":""}${w} ${u.toUpperCase()}`;const M="close"===(0,v.Ov2)(t,"offset");let k=7===(0,v.Ov2)(t,"status");const A=(0,oe.W7)({orderData:t,contract:o,isClose:M,isWithdraw:k,isShowFiat:!0,indexPrice:h,rateUsdt:p,convertedCurrency:u});let{finalCloseProfitAndRealProfitText:Y}=A;x=k?"secondary-font":x;const I="futures"===t.get("business_type")?"linear_futures":"linear_swap",G=(0,v.kuS)(Ct,`${n}${(0,v.uM5)(t,!0)}`,(0,v.Vgt)(l),(0,v.QgQ)({contract:t,language:e,type:I,shouldContractType:!1})),E=(0,v.kuS)(Ct,Ot.PAGE_FROM_SUB_ACCOUNT_LIMIT,ft.PAGE_FROM_SWAP_SUB_ACCOUNT_LIMIT,bt.Qh);let R,U;return c===v.x3H?(R=(0,v.u7z)({currentContract:o,convertedPrice:(0,v.Ov2)(t,"price"),sheet:(0,v.Ov2)(t,"volume"),isFormat:!0}),U=(0,v.u7z)({currentContract:o,convertedPrice:(0,v.Ov2)(t,"trade_avg_price"),sheet:(0,v.Ov2)(t,"trade_volume"),isFormat:!0})):(R=(0,v.NGl)(o,(0,v.Ov2)(t,"price"),c,(0,v.Ov2)(t,"volume"),!0,Ct===v.I$g),U=(0,v.NGl)(o,(0,v.Ov2)(t,"trade_avg_price"),c,(0,v.Ov2)(t,"trade_volume"),!0,Ct===v.I$g)),(0,r.jsxs)("tr",{className:"table-body-line "+(k?"secondary-font":""),children:[(0,r.jsx)("td",{className:"thd-text-left",children:G}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.Ov2)(t,"lever_rate")}),(0,r.jsxs)("td",{className:"thd-text-left thd-padding-horizontal10",children:[be().tzTrans(g).format("YYYY-MM-DD")," ",be().tzTrans(g).format("HH:mm:ss")]}),(0,r.jsxs)("td",{className:"thd-text-left thd-padding-horizontal10",children:[be().tzTrans(m).format("YYYY-MM-DD")," ",be().tzTrans(m).format("HH:mm:ss")]}),(0,r.jsx)("td",{className:`${x} thd-text-left`,children:(0,v.MlF)(t,e)}),Ct===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:t,language:e})}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.Uy)((0,v.Ov2)(t,"order_source"),(0,v.Ov2)(t,"order_price_type"),e)}),(0,r.jsx)("td",{children:R}),(0,r.jsx)("td",{children:(0,v.GWQ)(o,b)}),(0,r.jsx)("td",{children:U}),(0,r.jsx)("td",{children:(0,v.GWQ)(o,D)}),(0,r.jsx)("td",{children:Y}),(0,r.jsxs)("td",{className:"thd-padding-horizontal10",children:[C,(0,r.jsxs)("div",{className:"secondary-font",children:["â ",w]})]}),(0,r.jsx)("td",{className:`${N} thd-text-left thd-padding-horizontal10`,children:(0,oe.wH)(t,e)}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{className:"transparent-button",style:{display:f?"":"none"},onClick:()=>{if(wt){const{crossIsolatedType:e}=this.state;i(t,E,null,e)}else i(t,E)},children:(0,T.YG)(e,"look")})})]},a)})]})}renderPlanTable(){let{language:e,historyOrder:t,productMap:s,getHistoryTradeDetailList:i,subAccountData:l,tradingUnitType:n,symbol:o,pair:c}=this.props;const{sortDirection:d,sortField:u}=this.state,p=l.get("user_id");o=t&&t.get(0)&&t.get(0).get("symbol")||o,c=t&&t.get(0)&&(t.get(0).get("pair")||t.get(0).get("contract_code"))||c;const h=(0,v.wUP)(c)||G.Mk.USDT,g=(0,v.h6_)(n,o,(0,T.YG)(e,"sheet"),h),_=(0,v.kuS)(Ct,"USD","USD",h);return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsxs)("th",{className:"thd-text-left",children:[" ",(0,T.YG)(e,"contract")]}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"transaction_leverage")}),(0,r.jsx)("th",{className:"thd-text-left pointer",onClick:this.sort("order_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_time")}
1),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"order_time",sortDirection:d||"down",sortField:u||"order_time"})]})}),(0,r.jsx)("th",{className:"thd-text-left pointer",onClick:this.sort("update_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"update_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"update_time",sortDirection:d,sortField:u})]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trade_type")}),Ct===v.I$g&&(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"only_lighten_up")}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsxs)("div",{className:"item",children:[(0,T.YG)(e,"trigger_condition"),"(",_,")"]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trigger_time")}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"order_volume"),"(",g,")"]}),(0,r.jsxs)("th",{style:{paddingLeft:"10px"},children:[(0,T.YG)(e,"order_price"),"(",_,")"]}),(0,r.jsx)("th",{className:"thd-text-left",style:{paddingLeft:"10px"},children:(0,T.YG)(e,"status")}),(0,r.jsx)("th",{children:(0,T.YG)(e,"operate")})]})}),t.map((t,a)=>{t.subUserId=p;const l=t.get("contract_code"),o=(0,v.kuS)(Ct,(0,v.Ov2)(t,"symbol"),l.split("-")[0],l.split("-")[0]);let c;if(wt){const e=t.get("pair")||l,r=t.get("business_type")||"swap";c=(0,v.amw)({linearProductMap:s,businessType:r,pair:e})}else c=s.get(o);let d=(0,v.Ov2)(t,"trigger_price"),u=(0,v.Ov2)(t,"trigger_type");u="ge"===u?"â¥":"â¤";const h=(0,v.Ov2)(t,"created_at"),g=(0,v.Ov2)(t,"triggered_at"),_=(0,v.Ov2)(t,"update_time");let m="buy"===t.get("direction")?"green-font":"red-font";const y=(0,v.Ov2)(t,"status"),x=(0,v.Ov2)(t,"order_source"),j=4===y?"green-font":5===y?"red-font":"",S=(4===y||5===y)&&"settlement"!==x,N=this.getPlanOrderPrice(t,c);let f=6===(0,v.Ov2)(t,"status");m=f?"secondary-font":m;const O="futures"===t.get("business_type")?"linear_futures":"linear_swap",b=(0,v.kuS)(Ct,`${o}${(0,v.uM5)(t,!0)}`,(0,v.Vgt)(l),(0,v.QgQ)({contract:t,language:e,type:O,shouldContractType:!1})),D=(0,v.kuS)(Ct,Ot.PAGE_FROM_SUB_ACCOUNT_PLAN,ft.PAGE_FROM_SWAP_SUB_ACCOUNT_PLAN,bt.YA);let C;return C=n===v.x3H?(0,v.u7z)({currentContract:c,convertedPrice:(0,v.Ov2)(t,"order_price")||(0,v.Ov2)(t,"trigger_price"),sheet:(0,v.Ov2)(t,"volume"),isFormat:!0}):(0,v.NGl)(c,(0,v.Ov2)(t,"order_price")||(0,v.Ov2)(t,"trigger_price"),n,(0,v.Ov2)(t,"volume"),!0,Ct===v.I$g),(0,r.jsxs)("tr",{className:"table-body-line "+(f?"secondary-font":""),children:[(0,r.jsx)("td",{className:"thd-text-left",children:b}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,v.Ov2)(t,"lever_rate")}),(0,r.jsxs)("td",{className:"thd-text-left",children:[be().tzTrans(h).format("YYYY-MM-DD")," ",be().tzTrans(h).format("HH:mm:ss")]}),(0,r.jsxs)("td",{className:"thd-text-left thd-padding-horizontal10",children:[be().tzTrans(_).format("YYYY-MM-DD")," ",be().tzTrans(_).format("HH:mm:ss")]}),(0,r.jsx)("td",{className:`${m} thd-text-left`,children:(0,v.MlF)(t,e)}),Ct===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:t,language:e})}),(0,r.jsx)("td",{className:"thd-text-left",children:`${u} ${(0,v.GWQ)(c,d)}`}),(0,r.jsx)("td",{className:"thd-text-left",children:"--"===g?g:(0,r.jsxs)("div",{children:[be().tzTrans(g).format("YYYY-MM-DD")," ",be().tzTrans(g).format("HH:mm:ss")]})}),(0,r.jsx)("td",{children:C}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:N}),(0,r.jsx)("td",{className:`${j} thd-text-left thd-padding-horizontal10`,children:(0,oe.Fj)(t,e)}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{className:"transparent-button",style:{display:S?"":"none"},onClick:()=>{if(wt){const{crossIsolatedType:e}=this.state;i(t,D,5===y&&(0,v.Ov2)(t,"fail_reason"),e)}else i(t,D,5===y&&(0,v.Ov2)(t,"fail_reason"))},children:(0,T.YG)(e,"look")})})]},a)})]})}renderStopLossTable(){let{language:e,historyOrder:t,productMap:s,subAccountData:i,tradingUnitType:l,symbol:n,pair:o,getHistoryTradeDetailList:c}=this.props;const{sortDirection:d,sortField:u}=this.state,p=i.get("user_id");n=t&&t.get(0)&&t.get(0).get("symbol")||n,o=t&&t.get(0)&&(t.get(0).get("pair")||t.get(0).get("contract_code"))||o;const h=(0,v.wUP)(o)||G.Mk.USDT,g=(0,v.h6_)(l,n,(0,T.YG)(e,"sheet"),h),_=(0,v.kuS)(Ct,"USD","USD",h),m=(0,v.kuS)(Ct,Ot.PAGE_FROM_SUB_ACCOUNT_TPSL,ft.PAGE_FROM_SWAP_SUB_ACCOUNT_TPSL,bt.Cn);return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsxs)("th",{className:"thd-text-left",children:[" ",(0,T.YG)(e,"contract")]}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"transaction_leverage")}),(0,r.jsx)("th",{className:"thd-text-left pointer",onClick:this.sort("order_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_time")}
1),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"order_time",sortDirection:d||"down",sortField:u||"order_time"})]})}),(0,r.jsx)("th",{className:"thd-text-left pointer",onClick:this.sort("update_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"update_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"update_time",sortDirection:d,sortField:u})]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trade_type")}),Ct===v.I$g&&(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"only_lighten_up")}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsxs)("div",{className:"item",children:[(0,T.YG)(e,"trigger_condition"),"(",_,")"]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trigger_time")}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"order_volume"),"(",g,")"]}),(0,r.jsxs)("th",{style:{paddingLeft:"10px"},children:[(0,T.YG)(e,"order_price"),"(",_,")"]}),(0,r.jsx)("th",{className:"thd-text-left",style:{paddingLeft:"10px"},children:(0,T.YG)(e,"status")}),(0,r.jsx)("th",{children:(0,T.YG)(e,"operate")})]})}),t.map((t,a)=>{t.subUserId=p;const i=t.get("contract_code"),n=(0,v.kuS)(Ct,(0,v.Ov2)(t,"symbol"),i.split("-")[0],i.split("-")[0]);let o;if(wt){const e=t.get("pair")||i,r=t.get("business_type")||"swap";o=(0,v.amw)({linearProductMap:s,businessType:r,pair:e})}else o=s.get(n);let d=(0,v.Ov2)(t,"trigger_price"),u=(0,v.Ov2)(t,"trigger_type");u="ge"===u?"â¥":"â¤";const h=(0,v.Ov2)(t,"created_at"),g=(0,v.Ov2)(t,"update_time"),_=(0,v.Ov2)(t,"triggered_at");let y="buy"===t.get("direction")?"green-font":"red-font";const x=(0,v.Ov2)(t,"status"),j=4===x?"green-font":5===x?"red-font":"",S=this.getPlanOrderPrice(t,o);let N=6===(0,v.Ov2)(t,"status")||11===(0,v.Ov2)(t,"status");const f=(0,v.Ov2)(t,"order_source"),O=(4===x||5===x)&&"settlement"!==f;y=N?"secondary-font":y;const b="futures"===t.get("business_type")?"linear_futures":"linear_swap",D=(0,v.kuS)(Ct,`${n}${(0,v.uM5)(t,!0)}`,(0,v.Vgt)(i),(0,v.QgQ)({contract:t,language:e,type:b,shouldContractType:!1}));let C;return C=l===v.x3H?(0,v.u7z)({currentContract:o,convertedPrice:(0,v.Ov2)(t,"order_price")||(0,v.Ov2)(t,"trigger_price"),sheet:(0,v.Ov2)(t,"volume"),isFormat:!0}):(0,v.NGl)(o,(0,v.Ov2)(t,"order_price")||(0,v.Ov2)(t,"trigger_price"),l,(0,v.Ov2)(t,"volume"),!0,Ct===v.I$g),(0,r.jsxs)("tr",{className:"table-body-line "+(N?"secondary-font":""),children:[(0,r.jsx)("td",{className:"thd-text-left",children:D}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,v.Ov2)(t,"lever_rate")}),(0,r.jsxs)("td",{className:"thd-text-left",children:[be().tzTrans(h).format("YYYY-MM-DD")," ",be().tzTrans(h).format("HH:mm:ss")]}),(0,r.jsxs)("td",{className:"thd-text-left",children:[be().tzTrans(g).format("YYYY-MM-DD")," ",be().tzTrans(g).format("HH:mm:ss")]}),(0,r.jsx)("td",{className:`${y} thd-text-left`,children:(0,v.MlF)(t,e)}),Ct===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:t,language:e})}),(0,r.jsx)("td",{className:"thd-text-left",children:`${u} ${(0,v.GWQ)(o,d)}`}),(0,r.jsx)("td",{className:"thd-text-left",children:"--"===_?_:(0,r.jsxs)("div",{children:[be().tzTrans(_).format("YYYY-MM-DD")," ",be().tzTrans(_).format("HH:mm:ss")]})}),(0,r.jsx)("td",{children:C}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",style:{paddingLeft:"10px"},children:S}),(0,r.jsx)("td",{className:`${j} thd-text-left thd-padding-horizontal10`,children:(0,oe.lT)(t,e).text}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{className:"transparent-button",style:{display:O?"":"none"},onClick:()=>{if(wt){const{crossIsolatedType:e}=this.state;c(t,m,5===x&&(0,v.Ov2)(t,"fail_reason"),e)}else c(t,m,5===x&&(0,v.Ov2)(t,"fail_reason"))},children:(0,T.YG)(e,"look")})})]},a)})]})}renderTrackTable(){let{language:e,historyOrder:t,productMap:s,getHistoryTradeDetailList:i,subAccountData:l,tradingUnitType:n,symbol:o,pair:c}=this.props;const{sortDirection:d,sortField:u}=this.state,p=l.get("user_id");o=t&&t.get(0)&&t.get(0).get("symbol")||o,c=t&&t.get(0)&&(t.get(0).get("pair")||t.get(0).get("contract_code"))||c;const h=(0,v.wUP)(c)||G.Mk.USDT,g=(0,v.h6_)(n,o,(0,T.YG)(e,"sheet"),h),_=(0,v.kuS)(Ct,"USD","USD",h);return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-line",children:[(0,r.jsxs)("th",{className:"thd-text-left",children:[" ",(0,T.YG)(e,"contract")]}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"transaction_leverage")}),(0,r.jsx)("th",{className:"thd-text-left pointer",onClick:this.sort("order_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_time")}
1),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"order_time",sortDirection:d||"down",sortField:u||"order_time"})]})}),(0,r.jsx)("th",{className:"thd-text-left pointer",onClick:this.sort("update_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"update_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"update_time",sortDirection:d,sortField:u})]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trade_type")}),Ct===v.I$g&&(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"only_lighten_up")}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsxs)("div",{className:"item",children:[(0,T.YG)(e,"active_condition"),"(",_,")"]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,r.jsx)("div",{className:"item",children:(0,T.YG)(e,"callback_ratio")})}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"order_volume"),"(",g,")"]}),(0,r.jsxs)("th",{style:{paddingLeft:"10px"},children:[(0,T.YG)(e,"order_price"),"(",_,")"]}),(0,r.jsx)("th",{className:"thd-text-left",style:{paddingLeft:"10px"},children:(0,T.YG)(e,"status")}),(0,r.jsx)("th",{children:(0,T.YG)(e,"operate")})]})}),t.map((t,a)=>{t.subUserId=p;const l=t.get("contract_code"),o=(0,v.kuS)(Ct,(0,v.Ov2)(t,"symbol"),l.split("-")[0],l.split("-")[0]);let c;if(wt){const e=t.get("pair")||l,r=t.get("business_type")||"swap";c=(0,v.amw)({linearProductMap:s,businessType:r,pair:e})}else c=s.get(o);let d=(0,v.Ov2)(t,"active_price"),u=(0,v.Ov2)(t,"active_type");u="ge"===u?"â¥":"â¤";const h=(0,v.Ov2)(t,"created_at"),g=(0,v.Ov2)(t,"update_time");let _="buy"===t.get("direction")?"green-font":"red-font";const m=(0,v.Ov2)(t,"status"),y=(0,v.Ov2)(t,"order_source"),x=4===m?"green-font":5===m?"red-font":"",j=(4===m||5===m)&&"settlement"!==y,S=this.getTrackOrderPrice(t,c);let N=6===(0,v.Ov2)(t,"status");_=N?"secondary-font":_;const f="futures"===t.get("business_type")?"linear_futures":"linear_swap",O=(0,v.kuS)(Ct,`${o}${(0,v.uM5)(t,!0)}`,(0,v.Vgt)(l),(0,v.QgQ)({contract:t,language:e,type:f,shouldContractType:!1})),b=(0,v.kuS)(Ct,Ot.PAGE_FROM_SUB_ACCOUNT_TRACK,ft.PAGE_FROM_SWAP_SUB_ACCOUNT_TRACK,bt.qA);let D;return D=n===v.x3H?(0,v.u7z)({currentContract:c,convertedPrice:t.get("formula_price")||d,sheet:(0,v.Ov2)(t,"volume"),isFormat:!0}):(0,v.NGl)(c,t.get("formula_price")||d,n,(0,v.Ov2)(t,"volume"),!0,Ct===v.I$g),(0,r.jsxs)("tr",{className:"table-body-line "+(N?"secondary-font":""),children:[(0,r.jsx)("td",{className:"thd-text-left",children:O}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,v.Ov2)(t,"lever_rate")}),(0,r.jsxs)("td",{className:"thd-text-left",children:[be().tzTrans(h).format("YYYY-MM-DD")," ",be().tzTrans(h).format("HH:mm:ss")]}),(0,r.jsxs)("td",{className:"thd-text-left thd-padding-horizontal10",children:[be().tzTrans(g).format("YYYY-MM-DD")," ",be().tzTrans(g).format("HH:mm:ss")]}),(0,r.jsx)("td",{className:`${_} thd-text-left`,children:(0,v.MlF)(t,e)}),Ct===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:t,language:e})}),(0,r.jsx)("td",{className:"thd-text-left",children:`${u} ${(0,v.GWQ)(c,d)}`}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,v.l9T)((0,v.Ov2)(t,"callback_rate"),"",1)}),(0,r.jsx)("td",{children:D}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:S}),(0,r.jsx)("td",{className:`${x} thd-text-left thd-padding-horizontal10`,children:(0,oe.Fj)(t,e)}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{className:"transparent-button",style:{display:j?"":"none"},onClick:()=>{if(wt){const{crossIsolatedType:e}=this.state;i(t,b,5===m&&(0,v.Ov2)(t,"fail_reason"),e)}else i(t,b,5===m&&(0,v.Ov2)(t,"fail_reason"))},children:(0,T.YG)(e,"look")})})]},a)})]})}renderMarketPriceTable(){let{language:e,historyOrder:t,productMap:s,getHistoryTradeDetailList:i,symbol:l,pair:n,subAccountData:o,tradingUnitType:c,usdtPriceData:d,convertedCurrency:u,rateUsdt:p}=this.props;const{sortDirection:h,sortField:g}=this.state,_=o.get("user_id");l=t&&t.get(0)&&t.get(0).get("symbol")||l,n=t&&t.get(0)&&(t.get(0).get("pair")||t.get(0).get("contract_code"))||n;const m=(0,v.wUP)(n)||G.Mk.USDT,y=(0,v.h6_)(c,l,(0,T.YG)(e,"sheet"),m),x=(0,v.kuS)(Ct,"USD","USD",m),j=(0,v.kuS)(Ct,l,l,m);return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"table-head-two-line",children:[(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"contract")}),(0,r.jsx)("th",{className:"thd-padding-horizontal10",children:(0,T.YG)(e,"transaction_leverage")}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("order_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"order_time")}
1),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"order_time",sortDirection:h||"down",sortField:g||"order_time"})]})}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10 pointer",onClick:this.sort("update_time"),children:(0,r.jsxs)("div",{className:"thead-sort",children:[(0,r.jsx)("span",{children:(0,T.YG)(e,"update_time")}),(0,r.jsx)(Pe,{isOnlyDown:!0,name:"update_time",sortDirection:h,sortField:g})]})}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"trade_type")}),Ct===v.I$g&&(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"only_lighten_up")}),(0,r.jsx)("th",{className:"thd-text-left",children:(0,T.YG)(e,"entrust_type")}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"order_volume"),(0,r.jsxs)("p",{children:["(",y,")"]})]}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"order_price"),(0,r.jsxs)("p",{children:["(",x,")"]})]}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"trade_volume"),(0,r.jsxs)("p",{children:["(",y,")"]})]}),(0,r.jsxs)("th",{children:[(0,T.YG)(e,"deal_average_price"),(0,r.jsxs)("p",{children:["(",x,")"]})]}),(0,r.jsxs)("th",{children:[(0,r.jsx)(Ze.A,{language:e}),(0,r.jsxs)("p",{children:["(",j,")"]})]}),(0,r.jsxs)("th",{className:"thd-padding-horizontal10",children:[(0,r.jsx)(k.A,{tip:(0,T.YG)(e,"formality_explanation"),children:(0,r.jsx)("u",{className:"tip-text",children:(0,T.YG)(e,"formality")})}),(0,r.jsxs)("p",{children:["(",j,")"]})]}),(0,r.jsx)("th",{className:"thd-text-left thd-padding-horizontal10",children:(0,T.YG)(e,"status")}),(0,r.jsx)("th",{children:(0,T.YG)(e,"operate")})]})}),t.map((t,a)=>{t.subUserId=_;const l=t.get("contract_code"),n=Ct===v.Dhg?(0,v.Ov2)(t,"symbol"):l.split("-")[0];let o;if(wt){const e=t.get("pair")||l,r=t.get("business_type")||"swap";o=(0,v.amw)({linearProductMap:s,businessType:r,pair:e})}else o=s.get(n);let h=(0,v.Ov2)(d,`${n.toLowerCase()}usdt`);h=(0,v.kuS)(Ct,h,h,1);const g=(0,v.Ov2)(t,"create_date"),m=(0,v.Ov2)(t,"update_time"),y=(0,v.Ov2)(t,"liquidation_type");let x="buy"===t.get("direction")?"green-font":"red-font";const j=(0,v.Ov2)(t,"status"),S=(0,v.Ov2)(t,"order_source"),N=4===j||5===j||6===j?"green-font":"",f=(4===j||5===j||6===j)&&"settlement"!==S&&"1"!==y,O=(0,v.Ov2)(t,"fee");"risk"===S?"4"===y&&(0,v.Ov2)(t,"price"):(0,v.Ov2)(t,"price");let b="risk"===S?"4"===y&&7!==j?(0,v.Ov2)(t,"trade_avg_price"):"--":(0,v.Ov2)(t,"trade_avg_price"),D=(0,v.HwT)(o,O,!0,v.pTR),C=(0,v.ZVp)((0,v.Etd)((0,L.lK)(O,h),u,p));O>0&&(D="+"+D),C="--"===C?C:`${O>0?"+":""}${C} ${u.toUpperCase()}`;const w="close"===(0,v.Ov2)(t,"offset");let M=7===(0,v.Ov2)(t,"status");const k=(0,oe.W7)({orderData:t,contract:o,isClose:w,isWithdraw:M,isShowFiat:!0,indexPrice:h,rateUsdt:p,convertedCurrency:u});let{finalCloseProfitAndRealProfitText:A}=k;x=M?"secondary-font":x;const Y="futures"===t.get("business_type")?"linear_futures":"linear_swap",I=(0,v.kuS)(Ct,`${n}${(0,v.uM5)(t,!0)}`,(0,v.Vgt)(l),(0,v.QgQ)({contract:t,language:e,type:Y,shouldContractType:!1})),G=(0,v.kuS)(Ct,Ot.PAGE_FROM_SUB_ACCOUNT_LIMIT,ft.PAGE_FROM_SWAP_SUB_ACCOUNT_LIMIT,bt.Qh);let E,R;return c===v.x3H?(E=(0,v.u7z)({currentContract:o,convertedPrice:(0,v.Ov2)(t,"price"),sheet:(0,v.Ov2)(t,"volume"),isFormat:!0}),R=(0,v.u7z)({currentContract:o,convertedPrice:(0,v.Ov2)(t,"trade_avg_price"),sheet:(0,v.Ov2)(t,"trade_volume"),isFormat:!0})):(E=(0,v.NGl)(o,(0,v.Ov2)(t,"price"),c,(0,v.Ov2)(t,"volume"),!0,Ct===v.I$g),R=(0,v.NGl)(o,(0,v.Ov2)(t,"trade_avg_price"),c,(0,v.Ov2)(t,"trade_volume"),!0,Ct===v.I$g)),(0,r.jsxs)("tr",{className:"table-body-line "+(M?"secondary-font":""),children:[(0,r.jsx)("td",{className:"thd-text-left",children:I}),(0,r.jsx)("td",{className:"thd-padding-horizontal10",children:(0,v.Ov2)(t,"lever_rate")}),(0,r.jsxs)("td",{className:"thd-text-left thd-padding-horizontal10",children:[be().tzTrans(g).format("YYYY-MM-DD")," ",be().tzTrans(g).format("HH:mm:ss")]}),(0,r.jsxs)("td",{className:"thd-text-left thd-padding-horizontal10",children:[be().tzTrans(m).format("YYYY-MM-DD")," ",be().tzTrans(m).format("HH:mm:ss")]}),(0,r.jsx)("td",{className:`${x} thd-text-left`,children:(0,v.MlF)(t,e)}),Ct===v.I$g&&(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.mB)({data:t,language:e})}),(0,r.jsx)("td",{className:"thd-text-left",children:(0,oe.Uy)((0,v.Ov2)(t,"order_source"),(0,v.Ov2)(t,"order_price_type"),e)}),(0,r.jsx)("td",{children:E}),(0,r.jsx)("td",{children:(0,T.YG)(e,"market_price_short")}),(0,r.jsx)("td",{children:R}),(0,r.jsx)("td",{children:(0,v.GWQ)(o,b)}),(0,r.jsx)("td",{children:A}),(0,r.jsxs)("td",{className:"thd-padding-horizontal10",children:[D,(0,r.jsxs)("div",{className:"secondary-font",children:["â ",C]})]}),(0,r.jsx)("td",{className:`${N} thd-text-left thd-padding-horizontal10`,children:(0,oe.wH)(t,e)}),(0,r.jsx)("td",{children:(0,r.jsx)("button",{className:"transparent-button",style:{display:f?"":"none"},onClick:()=>
1{if(wt){const{crossIsolatedType:e}=this.state;i(t,G,null,e)}else i(t,G)},children:(0,T.YG)(e,"look")})})]},a)})]})}renderTable(){const{hisOrderType:e}=this.props;return 0===e?this.renderLimitTable():1===e?this.renderPlanTable():2===e?this.renderStopLossTable():3===e?this.renderTrackTable():4===e?this.renderMarketPriceTable():void 0}render(){const{symbol:e,pair:t,language:s,setSymbolFn:a,totalPageHistoryOrder:i,pageIndexHistoryOrder:l,isHistoryOrderLoading:n,linearProductList:o}=this.props,{tradeType:c,statusType:d,dateType:u,orderType:p,crossIsolatedType:h}=this.state;let g,_;if(wt){g=(0,v.BQq)(o,h,1).map(e=>({key:e,value:(0,v.Vgt)(e)}));const e=g.find(e=>e.key===t);_=e?e.value:"",e||a(g.get(0)&&g.get(0).key)}else{g=this.props.symbolList.map(e=>({key:e,value:e}));const t=g.find(t=>t.key===e);_=t?t.value:"",t||a(g.get(0)&&g.get(0).key)}const m=(0,v.kuS)(Ct,[{value:(0,T.YG)(s,"all"),tradeType:0},{value:(0,T.YG)(s,"buying_long"),tradeType:Nt.BUY_OPEN_LONG},{value:(0,T.YG)(s,"short_selling"),tradeType:Nt.SELL_OPEN_SHORT},{value:(0,T.YG)(s,"buying_long_close_position"),tradeType:Nt.BUY_CLOSE_SHORT},{value:(0,T.YG)(s,"short_selling_close_position"),tradeType:Nt.SELL_CLOSE_LONG},{value:(0,T.YG)(s,"force_buy_close"),tradeType:Nt.FORCE_SELL_CLOSE},{value:(0,T.YG)(s,"force_sell_close"),tradeType:Nt.FORCE_BUY_CLOSE},{value:(0,T.YG)(s,"reduce_force_more"),tradeType:Nt.REDUCE_CLOSE_MORE},{value:(0,T.YG)(s,"reduce_force_less"),tradeType:Nt.REDUCE_CLOSE_LESS}],[{value:(0,T.YG)(s,"all"),tradeType:0},{value:(0,T.YG)(s,"buying_long"),tradeType:Nt.BUY_OPEN_LONG},{value:(0,T.YG)(s,"short_selling"),tradeType:Nt.SELL_OPEN_SHORT},{value:(0,T.YG)(s,"buying_long_close_position"),tradeType:Nt.BUY_CLOSE_SHORT},{value:(0,T.YG)(s,"short_selling_close_position"),tradeType:Nt.SELL_CLOSE_LONG},{value:(0,T.YG)(s,"force_buy_close"),tradeType:Nt.FORCE_SELL_CLOSE},{value:(0,T.YG)(s,"force_sell_close"),tradeType:Nt.FORCE_BUY_CLOSE},{value:(0,T.YG)(s,"reduce_force_more"),tradeType:Nt.REDUCE_CLOSE_MORE},{value:(0,T.YG)(s,"reduce_force_less"),tradeType:Nt.REDUCE_CLOSE_LESS},{value:(0,T.YG)(s,"delivery_close_long"),tradeType:Nt.DELIVERY_CLOSE_LONG},{value:(0,T.YG)(s,"delivery_close_short"),tradeType:Nt.DELIVERY_CLOSE_SHORT}],[{value:(0,T.YG)(s,"all"),tradeType:0},{value:(0,T.YG)(s,"buying_long"),tradeType:Nt.BUY_OPEN_LONG},{value:(0,T.YG)(s,"short_selling"),tradeType:Nt.SELL_OPEN_SHORT},{value:(0,T.YG)(s,"buying_long_close_position"),tradeType:Nt.BUY_CLOSE_SHORT},{value:(0,T.YG)(s,"short_selling_close_position"),tradeType:Nt.SELL_CLOSE_LONG},{value:(0,T.YG)(s,"buy"),tradeType:Nt.BUY_OPEN},{value:(0,T.YG)(s,"sell"),tradeType:Nt.SELL_OPEN},{value:(0,T.YG)(s,"force_buy_close"),tradeType:Nt.FORCE_SELL_CLOSE},{value:(0,T.YG)(s,"force_sell_close"),tradeType:Nt.FORCE_BUY_CLOSE},{value:(0,T.YG)(s,"reduce_force_more"),tradeType:Nt.REDUCE_CLOSE_MORE},{value:(0,T.YG)(s,"reduce_force_less"),tradeType:Nt.REDUCE_CLOSE_LESS},{value:(0,T.YG)(s,"delivery_close_long"),tradeType:Nt.DELIVERY_CLOSE_LONG},{value:(0,T.YG)(s,"delivery_close_short"),tradeType:Nt.DELIVERY_CLOSE_SHORT}]),y=(0,v.kuS)(Ct,[{value:(0,T.YG)(s,"all"),tradeType:0},{value:(0,T.YG)(s,"buying_long"),tradeType:Nt.BUY_OPEN_LONG},{value:(0,T.YG)(s,"short_selling"),tradeType:Nt.SELL_OPEN_SHORT},{value:(0,T.YG)(s,"buying_long_close_position"),tradeType:Nt.BUY_CLOSE_SHORT},{value:(0,T.YG)(s,"short_selling_close_position"),tradeType:Nt.SELL_CLOSE_LONG}],[{value:(0,T.YG)(s,"all"),tradeType:0},{value:(0,T.YG)(s,"buying_long"),tradeType:Nt.BUY_OPEN_LONG},{value:(0,T.YG)(s,"short_selling"),tradeType:Nt.SELL_OPEN_SHORT},{value:(0,T.YG)(s,"buying_long_close_position"),tradeType:Nt.BUY_CLOSE_SHORT},{value:(0,T.YG)(s,"short_selling_close_position"),tradeType:Nt.SELL_CLOSE_LONG}],[{value:(0,T.YG)(s,"all"),tradeType:0},{value:(0,T.YG)(s,"buying_long"),tradeType:Nt.BUY_OPEN_LONG},{value:(0,T.YG)(s,"short_selling"),tradeType:Nt.SELL_OPEN_SHORT},{value:(0,T.YG)(s,"buying_long_close_position"),tradeType:Nt.BUY_CLOSE_SHORT},{value:(0,T.YG)(s,"short_selling_close_position"),tradeType:Nt.SELL_CLOSE_LONG},{value:(0,T.YG)(s,"buy"),tradeType:Nt.BUY_OPEN},{value:(0,T.YG)(s,"sell"),tradeType:Nt.SELL_OPEN}]),x=[{value:(0,T.YG)(s,"all"),tradeType:0},{value:(0,T.YG)(s,"stop_profit_close_buy"),tradeType:Nt.STOP_PROFIT_CLOSE_LONG},{value:(0,T.YG)(s,"stop_profit_close_sell"),tradeType:Nt.STOP_PROFIT_CLOSE_SHORT},{value:(0,T.YG)(s,"stop_loss_close_buy"),tradeType:Nt.STOP_LOSS_CLOSE_LONG},{value:(0,T.YG)(s,"stop_loss_close_sell"),tradeType:Nt.STOP_LOSS_CLOSE_SHORT}];let S=0===p.orderType?m:y;S=0===p.orderType?m:2===p.orderType?x:y;const N=[{value:(0,T.YG)(s,"all"),statusType:0},{value:(0,T.YG)(s,"partial_transaction_partial_withdrawal"),statusType:Nt.STATUS_PART_CANCELLED},{value:(0,T.YG)(s,"all_deal"),statusType:Nt.STATUS_ALL_TRADED},{value:(0,T.YG)(s,"has_withdrawal"),statusType:Nt.STATUS_ALL_CANCELLED}],f=[{value:(0,T.YG)(s,"all"),statusType:0},{value:(0,T.YG)(s,"entrusted"),statusType:Nt.ENTRUST},{value:(0,T.YG)(s,"fail_entrust"),statusType:Nt.FAIL_ENTRUST},{value:(0,T.YG)(s,"has_withdrawal"),statusType:Nt.PLAN_STATUS_ALL_CANCELLED}],O=[{value:(0,T.YG)(s,"all"),statusType:0},{value:(0,T.YG)(s,"entrusted"),statusType:Nt.ENTRUST},{value:(0,T.YG)(s,"fail_entrust"),statusType:Nt.FAIL_ENTRUST},{value:(0,T.YG)(s,"has_withdrawal"),statusType:Nt.STOP_LOSS_STATUS_ALL_CANCELLED},{value:(0,T.YG)(s,"has_failure"),statusType:Nt.STOP_LOSS_ALL_FAILURE}];let b;b=0===p.orderType?N:2===p.orderType?O:4===p.orderType?N:f;const D=[{orderType:0,value:(0,T.YG)(s,"transaction_limited_price_order")},{orderType:1,value:(0,T.YG)(s,"plan_order")},{orderType:2,value:(0,T.YG)(s,"stop_loss_stop_profit")},{orderType:3,value:(0,T.YG)(s,"track_order")},{orderType:4,value:(0,T.YG)(s,"market_price_order")}],C=[{value:(0,T.YG)(s,"current_seven_day"),dateType:v.$zK},{value:(0,T.YG)(s,"current_three_month"),dateType:v.qeR}],w=0===p.orderType?(0,T.YG)(s,"export_limit_order_recode"):1===p.orderType?(0,T.YG)(s,"export_plan_order_recode"):3===p.orderType?(0,T.YG)(s,"export_track_order_recode"):(0,T.YG)(s,"export_stop_loss_recode"),M="zh-CN"===s?120:"vi-VI"===s?80:100,A="ru-RU"===s||"vi-VI"===s?80:100;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"sub-current-order-condition",children:[(0,r.jsxs)("div",{className:"select-condition-wrap",children:[wt&&(0,r.jsx)(I.A,{rootStyle:{marginLeft:10},datas:(0,v.bmt)(s,v.jB4.CROSS_ISOLATED),value:h,onClickItem:this.onChangeInfoSwitchType}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(s,"futures")}
1),(0,r.jsx)(j.A,{language:s,canFilter:!0,datas:g,showValueType:"out",value:_,rootClassName:"center-page-select-root",rootStyle:{width:80},itemStyle:{width:80,marginRight:0},itemClassName:"center-page-select-item",showKey:"value",onSelectItemClick:e=>a(e.key)})]}),(0,r.jsxs)("div",{className:"select-condition-symbol",children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(s,"order_type")}),(0,r.jsx)(j.A,{language:s,datas:D,showValueType:"out",value:p.value,rootClassName:"center-page-select-root",rootStyle:{width:M,marginRight:0},itemStyle:{width:M},showKey:"value",onSelectItemClick:e=>this.setOrderType(e)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(s,"trade_type")}),(0,r.jsx)(j.A,{datas:S,value:c.value,showValueType:"out",rootClassName:"center-page-select-root",rootStyle:{width:M,marginRight:0},itemStyle:{width:M},showKey:"value",onSelectItemClick:e=>this.setTradeType(e)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(s,"status")}),(0,r.jsx)(j.A,{datas:b,value:d.value,showValueType:"out",rootClassName:"center-page-select-root",rootStyle:{width:M,marginRight:0},itemStyle:{width:M},showKey:"value",onSelectItemClick:e=>this.setStatusType(e)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(s,"date")}),(0,r.jsx)(j.A,{datas:C,value:u.value,showValueType:"out",rootClassName:"center-page-select-root",rootStyle:{width:A,marginRight:0},itemStyle:{width:A},showKey:"value",onSelectItemClick:e=>this.setDateType(e)})]})]}),(0,r.jsxs)("div",{className:"select-btn-wrap",children:[(0,r.jsx)("button",{className:"blue-button query-button",onClick:()=>{this.queryData()},children:(0,T.YG)(s,"query")}),(0,r.jsx)(k.A,{widthAuto:!0,align:"right",offset:5,tip:w,children:(0,r.jsx)("i",{className:"icon-export blue-font",style:{fontSize:"20px"},onClick:this.exportClick})})]})]}),(0,r.jsxs)("div",{className:"table-box table-box-head-extra",children:[(0,r.jsx)(Fe.M,{fixColumnData:[0,-1],tdFixClassName:"content-fix-shadow-border",children:(0,r.jsx)("table",{className:"table-all-text-right",children:this.renderTable()})}),this.renderLoading(),(0,r.jsxs)("div",{className:"pagination-wrapper",children:[(0,r.jsx)("div",{className:"sub-contract-order-notice",children:(0,T.YG)(s,0===p.orderType?"contract_order_limit_price":1===p.orderType?"contract_order_plan_commission_old":2===p.orderType?"contract_order_loss_stop_commission_old":"contract_order_track_commission_old")}),(0,r.jsx)(Y.A,{language:s,totalPage:i,currentPage:l,isLoading:n,ref:e=>{this.contractOrderPagination=e},onPageChange:e=>{this.queryData(e)}})]})]})]})}constructor(e){super(e),Dt(this,"errorCallback",e=>{d.A.tipError(e.errorMsg)}),Dt(this,"onChangeInfoSwitchType",(e,t)=>{(0,v.b7U)(e.value);const{pair:s,setSymbolFn:r,linearProductList:a}=this.props,i=(0,v.HKu)(a,e.value,s);i!==s&&r(i),this.setState({crossIsolatedType:e.value},()=>{this.queryData()})}),Dt(this,"exportClick",()=>{const{theme:e,language:t,symbol:s,pair:r,exportSubContractOrderFn:a,subAccountData:i,tradingUnitType:l}=this.props;let{orderType:n,dateType:o,statusType:c,tradeType:u,crossIsolatedType:p,sortDirection:h,sortField:g}=this.state;u=u.tradeType;let _=c.statusType;const m=o.dateType,y=i.get("user_id");if(!y)return;n=n.orderType;const x=e=>{if(navigator.msSaveBlob)navigator.msSaveBlob(e,"hisorder.xls");else{let t=window.URL.createObjectURL(e),s=document.createElement("a");s.download="hisorder.xls",s.href=t,document.body.appendChild(s),s.click(),document.body.removeChild(s)}},j=s=>{d.A.tipWarn(s&&s.err_msg||(0,T.YG)(t,"export_data_failed"),e)},S={symbol:s,pair:r,tradeType:u,status:_,createDate:m,subUserId:y,orderType:n,sortBy:!!h&&g};a(S,x,j,wt?p:l===v.EYu?1:2)}),Dt(this,"sort",e=>()=>{const{sortField:t,sortDirection:s}=this.state;"update_time"===e?t===e?"down"===s?this.setState({sortField:"",sortDirection:""},()=>{this.queryData()}):this.setState({sortField:e,sortDirection:"down"},()=>{this.queryData()}):this.setState({sortDirection:"down",sortField:e},()=>{this.queryData()}):"order_time"===e&&(t&&t!==e?this.setState({sortField:"",sortDirection:""},()=>{this.queryData()}):this.setState({sortField:"update_time",sortDirection:"down"},()=>{this.queryData()}))}),this.state={tradeType:{},dateType:{},statusType:{},orderType:{},crossIsolatedType:(0,v.m8r)(v.jB4.CROSS_ISOLATED),sortDirection:"",sortField:""}}}const kt=[fe,We,(0,i.Ng)(function(e){let t=e.default.appReducer.get("convertedCurrency");return t="none"===t?"usd":t,{convertedCurrency:t,rateUsdt:e.default.appReducer.get("rateUsdt"),usdtPriceData:e.default.appReducer.get("usdtPriceData"),language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),productMap:(0,v.kuS)(Ct,e.default.appReducer.get("productMap"),e.default.appReducer.get("swapProductMap"),e.default.appReducer.get("linearProductMap")),symbolList:(0,v.kuS)(Ct,e.default.appReducer.get("symbolList"),e.default.appReducer.get("swapSymbolList"),e.default.appReducer.get("linearSymbolList")),historyOrder:(0,v.kuS)(Ct,e.default.subAccountDetailsReducer.get("historyOrder"),e.default.swapSubA
1ccountDetailsReducer.get("swapHistoryOrder"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapHistoryOrder")),linearProductList:e.default.appReducer.get("linearProductList"),symbol:(0,v.kuS)(Ct,e.default.subAccountDetailsReducer.get("symbol"),e.default.swapSubAccountDetailsReducer.get("swapSymbol"),(0,v.pOZ)(e.default.linearSwapSubAccountDetailsReducer.get("pair"))),pair:e.default.linearSwapSubAccountDetailsReducer.get("pair"),hisOrderType:(0,v.kuS)(Ct,e.default.subAccountDetailsReducer.get("hisOrderType"),e.default.swapSubAccountDetailsReducer.get("swapHisOrderType"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapHisOrderType")),isHistoryOrderLoading:(0,v.kuS)(Ct,e.default.subAccountDetailsReducer.get("isHistoryOrderLoading"),e.default.swapSubAccountDetailsReducer.get("swapIsHistoryOrderLoading"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapIsHistoryOrderLoading")),pageIndexHistoryOrder:(0,v.kuS)(Ct,e.default.subAccountDetailsReducer.get("pageIndexHistoryOrder"),e.default.swapSubAccountDetailsReducer.get("swapPageIndexHistoryOrder"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapPageIndexHistoryOrder")),totalPageHistoryOrder:(0,v.kuS)(Ct,e.default.subAccountDetailsReducer.get("totalPageHistoryOrder"),e.default.swapSubAccountDetailsReducer.get("swapTotalPageHistoryOrder"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapTotalPageHistoryOrder")),tradingUnitType:(0,v.kuS)(Ct,e.default.tradeUnitReducer.get("tradingUnitType"),e.default.swapTradeUnitReducer.get("tradingUnitType"),e.default.linearSwapTradeUnitReducer.get("tradingUnitType"))}},function(e){const t=(0,v.kuS)(Ct,u.Hw,p.wu,h.U3),s=(0,v.kuS)(Ct,u.jO,p.qi,h.RD),r=(0,v.kuS)(Ct,u.XD,p.K$,h.Si),a=(0,v.kuS)(Ct,u.E8,p.bs,h.DD),i=(0,v.kuS)(Ct,u.f2,p.e,h.mX),l=(0,v.kuS)(Ct,u.C4,p.l1,h.Bq),o=(0,v.kuS)(Ct,u.uz,p.VC,h.Rh),c=(0,v.kuS)(Ct,Ot.getHistoryTradeDetailList,ft.getHistoryTradeDetailList,bt.KD);return(0,n.zH)({getSubHistoryOrderFn:t,getSubHistoryTriggerOrderFn:r,getSubHistoryStopLossOrderFn:a,getSubHistoryTrackOrderFn:l,setSymbolFn:s,exportSubContractOrderFn:i,getSubHistoryMarketPriceOrderFn:o,getHistoryTradeDetailList:c},e)})(Mt),st,St,mt],At=(0,v.a_H)()||v.Dhg;class Yt extends a.PureComponent{componentDidMount(){const{language:e,location:t,history:s,loginStatus:r,subAccountData:a,getOverviewData:i,isWebSocketOpenObj:l,setSubAccountDataFn:n,getSubAuthAccountListFn:o,subscribeMarketOverview:c,subscribeSwapMarketOverview:d,subscribeLinearSwapMarketOverview:u}=this.props,p=t.hash&&t.hash.substring(1),h=(0,v.kuS)(At,S.l0,S.jA,S.xj);r===x.AUTH_STATUS_LOGIN_SUCCESS&&(o(),i()),t.state&&t.state.subAccountData?0===a.size&&n(t.state.subAccountData):p?this.setState({subName:p}):s.push(`/${e}${h}`),l.get(g.Sq)&&c(),l.get(g.v)&&d(),l.get(g.uK)&&u()}UNSAFE_componentWillReceiveProps(e){const{subName:t}=this.state,{theme:s,history:r,language:a,loginStatus:i,subAccountList:l,subAccountData:n,getOverviewData:o,isWebSocketOpenObj:u,setSubAccountDataFn:p,getSubAuthAccountListFn:h,subscribeMarketOverview:_,subscribeSwapMarketOverview:m,subscribeLinearSwapMarketOverview:y}=this.props;if(i!==x.AUTH_STATUS_LOGIN_SUCCESS&&e.loginStatus===x.AUTH_STATUS_LOGIN_SUCCESS&&(h(),o()),!u.get(g.Sq)&&e.isWebSocketOpenObj.get(g.Sq)&&_(),!u.get(g.v)&&e.isWebSocketOpenObj.get(g.v)&&m(),!u.get(g.uK)&&e.isWebSocketOpenObj.get(g.uK)&&y(),!c().is(n,e.subAccountData)){const t=e.subAccountData.get("account_name");location.hash=`#${t}`,location.state={subAccountData:e.subAccountData.toJS()},r.push(location)}if(a!==e.language&&i===x.AUTH_STATUS_LOGIN_SUCCESS&&h(),t&&0===l.size&&!c().is(l,e.subAccountList)){const i=e.subAccountList.toJS();let l=!1;i.forEach(e=>{t===e.account_name&&(p(e),l=!0)});const n=(0,v.kuS)(At,S.l0,S.jA,S.xj),o=[{text:(0,T.YG)(a,"cancel"),status:"cancel",onClick:()=>{0!==i.length&&p(i[0])}},{text:(0,T.YG)(a,"open_right_now"),status:"confirm",onClick:()=>{r.push(`/${a}${n}`)}}];if(!l){const e=(0,v.kuS)(At,"sub_account_need_open_future","sub_account_need_open_swap","sub_account_need_open_linear_swap"),r=(0,T.YG)(a,e).replace("{subName}",t);d.A.alert(r,s,o)}}}setShowIndex(e){this.setState({detailsShowIndex:e})}componentWillUnmount(){const{disconnectWebSocket:e,unsubscribeMarketOverview:t,unsubscribeSwapMarketOverview:s,unsubscribeLinearSwapMarketOverview:r}=this.props,a=(0,v.kuS)(At,g.Sq,g.v,g.uK);(0,v.X$e)(At,{unsubscribeMarketOverview:t,unsubscribeSwapMarketOverview:s,unsubscribeLinearSwapMarketOverview:r}),e([a])}render(){const{language:e,subAccountList:t,setSubAccountDataFn:s,subAccountData:a}=this.props,{detailsShowIndex:i}=this.state,n=t.toJS(),o=kt[i],c=location.hash&&location.hash.substring(1),d=[{buttonText:"linear_swap_menu",path:`${S.I4}#${c}`},{buttonText:"coin_delivery_future",path:`${S.Kw}#${c}`},{buttonText:"coin_swap",path:`${S.Cv}#${c}`}],u=(0,v.kuS)(At,S.l0,S.jA,S.xj);return(0,r.jsx)("div",{className:"page-wrap-list",children:(0,r.jsxs)("div",{className:"subaccount-details center-page-wrap",children:[(0,r.jsx)(S.iK,{subTitle:"sub_account_details",btnGroup:d,icon:N,language:e}),(0,r.jsx)("div",{className:"center-page subaccount-center-page",children:(0,r.jsxs)("div",{className:"subaccount-details-content content-background",children:[(0,r.jsxs)("div",{className:"subaccount-details-title",children:[(0,r.jsx)(l.N_,{to:{pathname:`/${e}${u}`,replace:!0},children:(0,r.jsxs)("button",{className:"back-button transparent-button",style:{backgroundColor:"white"},children:[(0,r.jsx)("i",{className:"icon-back"}),(0,r.jsxs)("span",{children:[" ",(0,T.YG)(e,"back_to")]})]})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"center-page-select-title secondary-font",children:(0,T.YG)(e,"sub_account")}
1),(0,r.jsx)(j.A,{language:e,showKey:"account_name",linkFilter:"uid",canFilter:!0,datas:n,showValueType:"out",value:a&&a.get("account_name"),rootClassName:"center-page-select-root",rootStyle:{marginRight:0,width:"150px",backgroundColor:"white"},onSelectItemClick:e=>{s(e)}})]})]}),(0,r.jsxs)("div",{className:"subaccount-details-wrap-border",children:[(0,r.jsxs)("div",{className:"details-btn-wrap",children:[(0,r.jsx)("button",{className:`details-btn ${0===i&&"active"}`,onClick:()=>{this.setShowIndex(0)},children:(0,T.YG)(e,"transaction_all_hold_position")}),(0,r.jsx)("button",{className:`details-btn ${1===i&&"active"}`,onClick:()=>{this.setShowIndex(1)},children:(0,T.YG)(e,"current_order")}),(0,r.jsx)("button",{className:`details-btn ${2===i&&"active"}`,onClick:()=>{this.setShowIndex(2)},children:(0,T.YG)(e,"history_order")}),(0,r.jsx)("button",{className:`details-btn ${3===i&&"active"}`,onClick:()=>{this.setShowIndex(3)},children:(0,T.YG)(e,"trade_record")}),(0,r.jsx)("button",{className:`details-btn ${4===i&&"active"}`,onClick:()=>{this.setShowIndex(4)},children:(0,T.YG)(e,"assets")}),(0,r.jsx)("button",{className:`details-btn ${5===i&&"active"}`,onClick:()=>{this.setShowIndex(5)},children:(0,T.YG)(e,"financial_record")})]}),(0,r.jsx)("div",{className:"center-page-table-wrap",children:(0,r.jsx)(o,{subAccountData:a})})]})]})})]})})}constructor(e){super(e);const{connectWebSocket:t}=e;t([(0,v.kuS)(At,g.Sq,g.v,g.uK)]),this.state={detailsShowIndex:0,subName:null}}}var It=(0,i.Ng)(function(e){return{language:e.default.appReducer.get("language"),loginStatus:e.default.appReducer.get("loginStatus"),isWebSocketOpenObj:e.default.webSocketReducer.get("isWebSocketOpenObj"),subAccountList:(0,v.kuS)(At,e.default.subAccountDetailsReducer.get("subAccountList"),e.default.swapSubAccountDetailsReducer.get("swapSubAccountList"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapSubAccountList")),subAccountData:(0,v.kuS)(At,e.default.subAccountDetailsReducer.get("subAccountData"),e.default.swapSubAccountDetailsReducer.get("swapSubAccountData"),e.default.linearSwapSubAccountDetailsReducer.get("linearSwapSubAccountData")),theme:e.default.appReducer.get("theme")}},function(e){const t=(0,v.kuS)(At,u.K0,p.fS,h.VW),s=(0,v.kuS)(At,u.mh,p.Dv,h.jK);return(0,n.zH)({getOverviewData:x.getOverviewData,connectWebSocket:g.o9,setSubAccountDataFn:s,disconnectWebSocket:g.oK,getSubAuthAccountListFn:t,subscribeMarketOverview:_.eY,subscribeSwapMarketOverview:m.JB,subscribeLinearSwapMarketOverview:y.aX,unsubscribeMarketOverview:_.zz,unsubscribeSwapMarketOverview:m.eh,unsubscribeLinearSwapMarketOverview:y.nc},e)})(Yt)},34063:function(e){e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDU4ICg4NDY2MykgLSBodHRwczovL3NrZXRjaC5jb20gLS0+CiAgICA8dGl0bGU+5a2Q6LSm5Y+3c3ZnPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGcgaWQ9IuS4quS6uuS4reW/gyIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IjA05a2Q6LSm5Y+3LeawuOe7rSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTM2MC4wMDAwMDAsIC05NC4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9IuWvvOiIqiI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i5LqM57qn5a+86IiqIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgzNjAuMDAwMDAwLCA3NC4wMDAwMDApIj4KICAgICAgICAgICAgICAgICAgICA8ZyBpZD0i5a2Q6LSm5Y+3IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwLjAwMDAwMCwgMjAuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgICAgIDxyZWN0IGlkPSJSZWN0YW5nbGUtNy1Db3B5LTE0MyIgb3BhY2l0eT0iMC4xOTk4NzciIHg9IjAiIHk9IjAiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PC9yZWN0PgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTQuNTM2MTY2NywxNy4wMjA1NTM3IEMxNC45NjAxNzI3LDE3LjM3NTIwNDggMTUuNDU4OTM2LDE3LjY0NTUyMDEgMTYuMDA1NDc4LDE3LjgwNjM5ODMgTDE1Ljg4MzYxNTEsMTcuOTA5MDM3NCBDMTQuMjg2MjU3OCwxOS4yMTUwNTc5IDEyLjIzNTk3MDYsMjAgMTAsMjAgQzcuNzA2NjAwMjEsMjAgNS42MDg1NDQ2NSwxOS4xNzQyMTg5IDMuOTk0MjA1MjMsMTcuODA3Mzc4NCBDNC41NDEwNjQwMSwxNy42NDU1MjAxIDUuMDM5ODI3MjcsMTcuMzc1MjA0OCA1LjQ2NDczNTk3LDE3LjAyMTE5ODIgQzYuNzM1NjI1MzcsMTcuOTM4ODkxNSA4LjMwMzY5MTQzLDE4LjQ4MTAxMjcgMTAsMTguNDgxMDEyNyBDMTEuNjk2MzA4NiwxOC40ODEwMTI3IDEzLjI2NDM3NDYsMTcuOTM4ODkxNSAxNC41MzYxNjY3L
1DE3LjAyMDU1MzcgWiBNMi44MjA1MTI4MiwxMS4xMzkyNDA1IEM0LjM3ODIzOTA0LDExLjEzOTI0MDUgNS42NDEwMjU2NCwxMi4zODYwNDI1IDUuNjQxMDI1NjQsMTMuOTI0MDUwNiBDNS42NDEwMjU2NCwxNS40NjIwNTg4IDQuMzc4MjM5MDQsMTYuNzA4ODYwOCAyLjgyMDUxMjgyLDE2LjcwODg2MDggQzEuMjYyNzg2NiwxNi43MDg4NjA4IDAsMTUuNDYyMDU4OCAwLDEzLjkyNDA1MDYgQzAsMTIuMzg2MDQyNSAxLjI2Mjc4NjYsMTEuMTM5MjQwNSAyLjgyMDUxMjgyLDExLjEzOTI0MDUgWiBNMi44MjA1MTI4MiwxMi42NTgyMjc4IEMyLjExMjQ1NTQ1LDEyLjY1ODIyNzggMS41Mzg0NjE1NCwxMy4yMjQ5NTYgMS41Mzg0NjE1NCwxMy45MjQwNTA2IEMxLjUzODQ2MTU0LDE0LjYyMzE0NTMgMi4xMTI0NTU0NSwxNS4xODk4NzM0IDIuODIwNTEyODIsMTUuMTg5ODczNCBDMy41Mjg1NzAxOSwxNS4xODk4NzM0IDQuMTAyNTY0MSwxNC42MjMxNDUzIDQuMTAyNTY0MSwxMy45MjQwNTA2IEM0LjEwMjU2NDEsMTMuMjI0OTU2IDMuNTI4NTcwMTksMTIuNjU4MjI3OCAyLjgyMDUxMjgyLDEyLjY1ODIyNzggWiBNMTQuMTAxMjM4OSwyLjcxODg2MzQ2IEMxNy4wMDUyMTEsNC4xNDMxNzE0NiAxOS4wNDE2OTM1LDcuMDMyODgyNDIgMTkuMjE4Mjk2NiwxMC40MDgxNjgzIEMxOC43Mzg3ODM3LDEwLjEzNjg1MzcgMTguMjAwNDkzMiw5Ljk1ODYyNTE4IDE3LjYyNjcwOCw5Ljg5NzIwNzgyIEMxNy4zMTEzNDg4LDcuNDkyNTY3NjIgMTUuODU0ODEzLDUuNDQwMzQ5NDMgMTMuODEwODgzMiw0LjI4NzE4NDcyIEMxMy45OTkwNjgzLDMuODIzMDAyMjggMTQuMTAyNTY0MSwzLjMxNTgzOTU4IDE0LjEwMjU2NDEsMi43ODQ4MTAxMyBMMTQuMTAxMjM4OSwyLjcxODg2MzQ2IFogTTUuODk4NzYxMTIsMi43MTg4NjM0NiBDNS44OTc2MTA1NCwyLjc0MTIyMjUzIDUuODk3NDM1OSwyLjc2Mjk5NjE5IDUuODk3NDM1OSwyLjc4NDgxMDEzIEM1Ljg5NzQzNTksMy4zMTU4Mzk1OCA2LjAwMDkzMTY3LDMuODIzMDAyMjggNi4xODkwOTQsNC4yODc3MDczNyBDNC4xNDUxODQzMyw1LjQ0MDQxMTM2IDIuNjg4NjUwODQsNy40OTI1NzQ5NiAyLjM3MjE3NDE4LDkuODk4MTcwODYgQzEuNzk5NTA2NzksOS45NTg2MjUxOCAxLjI2MTIxNjM0LDEwLjEzNjg1MzcgMC43ODMzMTgxOTksMTAuNDA3MzExMSBDMC45NTgzMDY0NzMsNy4wMzI4ODI0MiAyLjk5NDc4OTAzLDQuMTQzMTcxNDYgNS44OTg3NjExMiwyLjcxODg2MzQ2IFogTTEwLDAgQzExLjU1NzcyNjIsMCAxMi44MjA1MTI4LDEuMjQ2ODAxOTYgMTIuODIwNTEyOCwyLjc4NDgxMDEzIEMxMi44MjA1MTI4LDQuMzIyODE4MjkgMTEuNTU3NzI2Miw1LjU2OTYyMDI1IDEwLDUuNTY5NjIwMjUgQzguNDQyMjczNzgsNS41Njk2MjAyNSA3LjE3OTQ4NzE4LDQuMzIyODE4MjkgNy4xNzk0ODcxOCwyLjc4NDgxMDEzIEM3LjE3OTQ4NzE4LDEuMjQ2ODAxOTYgOC40NDIyNzM3OCwwIDEwLDAgWiBNMTAsMS41MTg5ODczNCBDOS4yOTE5NDI2MywxLjUxODk4NzM0IDguNzE3OTQ4NzIsMi4wODU3MTU1MSA4LjcxNzk0ODcyLDIuNzg0ODEwMTMgQzguNzE3OTQ4NzIsMy40ODM5MDQ3NSA5LjI5MTk0MjYzLDQuMDUwNjMyOTEgMTAsNC4wNTA2MzI5MSBDMTAuNzA4MDU3NCw0LjA1MDYzMjkxIDExLjI4MjA1MTMsMy40ODM5MDQ3NSAxMS4yODIwNTEzLDIuNzg0ODEwMTMgQzExLjI4MjA1MTMsMi4wODU3MTU1MSAxMC43MDgwNTc0LDEuNTE4OTg3MzQgMTAsMS41MTg5ODczNCBaIiBpZD0iQ29tYmluZWQtU2hhcGUiIGZpbGw9IiNGRkZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PC9wYXRoPgogICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPSJNMTcuMTc5NDg3MiwxMS4xMzkyNDA1IEMxOC43MzcyMTM0LDExLjEzOTI0MDUgMjAsMTIuMzg2MDQyNSAyMCwxMy45MjQwNTA2IEMyMCwxNS40NjIwNTg4IDE4LjczNzIxMzQsMTYuNzA4ODYwOCAxNy4xNzk0ODcyLDE2LjcwODg2MDggQzE1LjYyMTc2MSwxNi43MDg4NjA4IDE0LjM1ODk3NDQsMTUuNDYyMDU4OCAxNC4zNTg5NzQ0LDEzLjkyNDA1MDYgQzE0LjM1ODk3NDQsMTIuMzg2MDQyNSAxNS42MjE3NjEsMTEuMTM5MjQwNSAxNy4xNzk0ODcyLDExLjEzOTI0MDUgWiBNMTcuMTc5NDg3MiwxMi42NTgyMjc4IEMxNi40NzE0Mjk4LDEyLjY1ODIyNzggMTUuODk3NDM1OSwxMy4yMjQ5NTYgMTUuODk3NDM1OSwxMy45MjQwNTA2IEMxNS44OTc0MzU5LDE0LjYyMzE0NTMgMTYuNDcxNDI5OCwxNS4xODk4NzM0IDE3LjE3OTQ4NzIsMTUuMTg5ODczNCBDMTcuODg3NTQ0NiwxNS4xODk4NzM0IDE4LjQ2MTUzODUsMTQuNjIzMTQ1MyAxOC40NjE1Mzg1LDEzLjkyNDA1MDYgQzE4LjQ2MTUzODUsMTMuMjI0OTU2IDE3Ljg4NzU0NDYsMTIuNjU4MjI3OCAxNy4xNzk0ODcyLDEyLjY1ODIyNzggWiIgaWQ9IuW9oueKtue7k+WQiCIgZmlsbD0iIzM1N0NFMSIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8L2c+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4="},41609:function(e,t,s){s.d(t,{A:function(){return y},k:function(){return x}});var r=s(74848),a=s(96540),i=s(47576),l=s(36206),n=s(8810),o=s(24569),c=s(84235),d=s(31664),u=s(82611),p=s(14444),h=s(67887),g=s(51148),_=s(83969),m=s(58279);function y(e=!1){const t=(0,u.A)(),{language:s}=(0,n.A)(),{isCross:h}=(0,o.A)(),{salesUnit:g,symbol:y}=(0,d.A)(["salesUnit","symbol"]),{projectType:v,isLinearSwap:T}=(0,c.A)();let j=null;const S=(0,a.useCallback)(e=>{l.A.error(t("notice_title"),(0,r.jsx)("div",{children:(0,r.jsx)("p",{children:e})}))},[v,T,g,y,h]);return(0,a.useCallback)(a=>{const{errorCode:n,errorMsg:o,direction:c}=a;new p.A;if([1060,1056,1059,1057,1058,1038,1048,1039,1053,1054,1040,1041,1104,1105,1044,1062,1051,1052,1055,1206,50202,50203,50205,50206,50207,50204].includes(n))l.A.error(o||t("order_failed"));else if(1047===n)S(o);else if(1045===n)l.A.error(o||t("leverage_available_tip"));else if(1100===n)x(s,!0,o);else if(1101===n)x(s,!1,o);else{if(9999===n)return;if(n>5e4)i.A.confirm({title:t("notice_title"),content:o,onOk:()=>{(0,m.QE)("CONTRACT_OPEN_ACCOUNT_ORDER")},okText:t("confirm"),hiddenCancel:!0});else if([1900].includes(n)){const[e,s]=o.split(";");s?j=i.A.confirm({title:t("notice_title"),content:(0,r.jsxs)("div",{children:[t(c===_.Ve5?"contract_order_limit_alert":"contract_order_short_limit_alert",{limit:e}),(0,r.jsx)("a",{className:"blue-font",target:"_blank",rel:"noopener noreferrer",onClick:()=>(e=>{j&&j.destroy(),window.open(e)})(s),children:t("contract_apple_raise_limit")})]}),okText:t("i_know"),hiddenCancel:!0}):l.A.error(o||t("order_failed"))}else l.A.error(o||t("order_failed"))}if(e)throw new Error(a)},[S])}function x(e,t,s){const i=(0,h.YG)(e,"notice_title"),n=t?(0,h.YG)(e,"open_position"):(0,h.YG)(e,"close_position"),o=s||`${(0,h.YG)(e,"user_not_order_power",{orderType:n})}${(0,h.YG)(e,"contact_customer_service")}`,c=(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("p",{children:o}),(0,r.jsx)("a",{className:"blue-font",target:"_blank",rel:"noopener noreferrer",href:(0,g.Qh)("connection_us",e,!1),children:(0,h.YG)(e,"submit_request")})]});l.A.error(i,c,{duration:null})}},68746:function(e,t,s){s.d(t,{eY:function(){return i},lt:function(){return n},qF:function(){return o},zz:function(){return l}});var r=s(42651),a=s(83969);function i(){return{type:r.UL,wsKey:r.Sq,content:{sub:"market.overview"}}}function l(){return{type:r.FY,wsKey:r.Sq,content:{unsub:"market.overview"}}}function n(e,t,s){return i=>{s&&e&&i({type:r.FY,wsKey:r.Sq,content:{unsub:`market.${(0,a.Ov2)(e,"contract_short_type")}.depth.${s}.sync`}}),t&&e&&(window.currentDepth=t,i({type:r.UL,wsKey:r.Sq,content:{sub:`market.${(0,a.Ov2)(e,"contract_short_type")}.depth.${t}.sync`}}))}}function o(e,t){return{type:r.FY,wsKey:r.Sq,content:{unsub:`market.${(0,a.Ov2)(e,"contract_short_type")}.depth.${t}.sync`}}}},69952:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjYwIiBoZWlnaHQ9IjYwIiBmaWxsPSIjQzRDNEM0IiBmaWxsLW9wYWNpdHk9IjAuMDEiLz4KPHBhdGggZD0iTTQ4IDM4SDU2TDQ4IDU2VjM4WiIgZmlsbD0iIzhBOEE4RSIvPgo8cmVjdCB4PSI0IiB5PSI0IiB3aWR0aD0iNDQiIGhlaWdodD0iNTIiIGZpbGw9IiNGOUZCRkMiLz4KPHBhdGggZD0iTTEwIDQ2TDEwIDQxTDMwIDQxTDMwIDQ2TDEwIDQ2WiIgZmlsbD0idmFyKC0tZGV4Yy1wcmltYXJ5LWZvbnQtY29sb3IpIi8+CjxwYXRoIGQ9Ik0xMCAzNkwxMCAzMUw0MiAzMUw0MiAzNkwxMCAzNloiIGZpbGw9IiMwMTczRTUiLz4KPHJlY3QgeD0iMTEiIHk9IjEwIiB3aWR0aD0iMiIgaGVpZ2h0PSI1IiBmaWxsPSIjOEE4QThFIi8+CjxyZWN0IHg9IjE1IiB5PSIxMCIgd2lkdGg9IjIiIGhlaWdodD0iNSIgZmlsbD0iIzhBOEE4RSIvPgo8cmVjdCB4PSIxOSIgeT0iMTAiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM4QThBOEUiLz4KPC9zdmc+Cg=="},76375:function(e,t,s){s.d(t,{JB:function(){return a},Je:function(){return l},eh:function(){return i},uD:function(){return n}});var r=s(42651);function a(){return{type:r.UL,wsKey:r.v,content:{sub:"market.overview"}}}function i(){return{type:r.FY,wsKey:r.v,content:{unsub:"market.overview"}}}function l(e,t,s){return a=>{s&&e&&a({type:r.FY,wsKey:r.v,content:{unsub:`market.${e.get("contract_code")}.depth.${s}.sync`}}),t&&e&&(window.currentDepth=t,a({type:r.UL,wsKey:r.v,content:{sub:`market.${e.get("contract_code")}.depth.${t}.sync`}}))}}function n(e,t){return{type:r.FY,wsKey:r.v,content:{unsub:`market.${e.get("contract_code")}.depth.${t}.sync`}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.