PageSourceSearch

https://www.xstable.ai/_next/static/chunks/8210.d6c18a82889eb185.js

js xstable.ai collected 2026-10-05 14:39:31 UTC 67,282 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8210],{2250:(e,t,s)=>{s.d(t,{B:()=>l,N:()=>r});var a=s(76273);function l(e){if(null==e||""===e)return!1;let t=Number(e);return Number.isFinite(t)&&0!==t}function r(e,t,s){let r=(0,a.gF)(e,t);return l(s)?(0,a.gF)(r,null!=s?s:0):r}},6033:(e,t,s)=>{s.d(t,{A:()=>n});var a,l=s(20801);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let n=function(e){return l.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),a||(a=l.createElement("path",{fill:"currentColor",d:"M12 6a2 2 0 1 0-1.985-1.753L5.388 6.56a2 2 0 1 0 0 2.88l4.627 2.313Q10 11.873 10 12a2 2 0 1 0 .612-1.44L5.985 8.247a2 2 0 0 0 0-.494l4.627-2.313c.36.347.849.56 1.388.56"})))}},20481:(e,t,s)=>{s.d(t,{A:()=>i});var a,l,r=s(20801);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let i=function(e){return r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:32,height:24,fill:"none"},e),a||(a=r.createElement("rect",{width:32,height:24,fill:"#EEF1F4",rx:4})),l||(l=r.createElement("path",{fill:"#212529",d:"M20.667 9.667a2.333 2.333 0 1 0-2.316-2.045l-5.398 2.698a2.333 2.333 0 1 0 0 3.359l5.398 2.7q-.018.141-.018.288a2.333 2.333 0 1 0 .714-1.68l-5.398-2.699a2.3 2.3 0 0 0 0-.576l5.398-2.7c.42.406.99.655 1.62.655"})))}},28972:(e,t,s)=>{s.r(t),s.d(t,{default:()=>B});
1var a=s(80069),l=s(34852),r=s(95702),n=s(99065),i=s(20801),c=s(66926),d=s(96197),o=s(81999),x=s(78937),m=s(40470),h=s(93857),p=s(87671),u=s(58205),f=s(34202),N=s(83046),g=s(85246),j=s(81430),v=s(83548),b=s(2250),y=s(34733);let w=()=>{let{t:e,i18n:t}=(0,c.Bd)(),s=(0,v.l)(e=>e.isMobile),[l,r]=(0,i.useState)([]),d=(0,j.WG)(e=>e.assetDetailPageNum),[x,m]=(0,i.useState)(!0),[h,w]=(0,i.useState)(!0),_=(0,i.useRef)(null),k=(0,i.useRef)(!1),C=(0,i.useRef)(d),S=(0,i.useRef)(h),[E,P]=(0,i.useState)(0),[A,T]=(0,i.useState)({first:0,rows:20,page:0,sortField:null,sortOrder:null,filters:null}),D=t=>{switch(t){case"DEPOSIT":return e("assets.asset_detail_deposit");case"WITHDRAW":return e("assets.asset_detail_withdrawal");case"OPEN_POSITION":return e("assets.asset_detail_open_position");case"CLOSE_POSITION":return e("trade.close_position");case"FUNDING_FEE":return e("partner.holding_fee");case"SELF_COMMISSION":return e("assets.asset_detail_rebate_income");case"CLAIM_COMMISSION":return e("assets.asset_detail_commission_income");case"CARD_FEE_REBATE":return e("assets.asset_detail_fee_rebate_voucher");case"CARD_LOSS_REBATE":return e("assets.asset_detail_loss_rebate_voucher");case"VIOLATION_PENALTIES":return e("assets.asset_detail_balance_adjustment");case"WITHDRAW_REJECT":return e("assets.asset_detail_withdrawal_reversal");case"WELFARE_DEPOSIT":return e("assets.asset_detail_reward");case"SYSTEM_GRANT":return e("assets.asset_detail_grant");default:return""}},U=(0,i.useCallback)(e=>{_.current&&_.current.disconnect(),e&&(_.current=new IntersectionObserver(e=>{e[0].isIntersecting&&(()=>{if(k.current||!S.current)return;k.current=!0;let e=C.current+1;(0,j.vm)(e,!0).then(e=>{e&&(C.current=e.pageNum,r(t=>[...t,...e.items]),P(e.total),w((e.pageNum-1)*e.pageSize+e.items.length<e.total))}).finally(()=>{k.current=!1})})()},{threshold:.1}),_.current.observe(e))},[]);return(0,i.useEffect)(()=>{k.current||(k.current=!0,(0,j.vm)(A.page+1).then(e=>{e&&(r(e.items),P(e.total),w((e.pageNum-1)*e.pageSize+e.items.length<e.total))}).finally(()=>{m(!1),k.current=!1}))},[A]),(0,i.useEffect)(()=>{C.current=d},[d]),(0,i.useEffect)(()=>{S.current=h},[h]),(0,i.useEffect)(()=>{0===d&&(r([]),T({first:0,rows:20,page:0,sortField:null,sortOrder:null,filters:null}))},[d]),(0,a.jsx)(a.Fragment,{children:x?(0,a.jsx)("div",{className:"text-text-dark h-[200px] flex items-center justify-center",children:(0,a.jsx)(N.A,{className:"w-12 h-12"})}):l.length<=0?(0,a.jsx)("div",{className:"text-text-dark w-full h-[200px] mt-[6%] flex items-center justify-center",children:(0,a.jsx)(f.A,{text:e("assets.no_details_yet")})}):s?(0,a.jsxs)("div",{className:"w-full h-full flex flex-col items-center gap-3 px-4",children:[(0,a.jsx)("div",{className:"text-text-light text-sm font-normal border border-border-color rounded-2xl py-1 px-4",children:(0,a.jsx)(c.x6,{i18nKey:"referrals.referred_history_delay",components:{white:(0,a.jsx)("span",{className:"text-text-dark font-medium"})}})}),l.map(t=>(0,a.jsxs)("div",{className:"flex flex-col w-full h-fit bg-position-item-background text-xs text-text-dark py-3 px-4 rounded-xl border border-block-background",children:[(0,a.jsx)("span",{className:"text-text-light text-xs",children:(0,y.Ey)(t.timestamp)}),(0,a.jsxs)("div",{className:"flex justify-between mt-3",children:[(0,a.jsx)("span",{className:"text-text-light text-sm",children:e("assets.action_type")}),(0,a.jsx)("span",{className:"text-text-dark text-sm font-semibold",children:D(t.type)})]}),(0,a.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,a.jsx)("span",{className:"text-text-light text-sm",children:e("assets.action_amount")}),(0,a.jsx)("span",{className:"text-sm font-semibold ".concat(Number(t.amount)>0?"text-[#2EBD85]":"text-[#E43C5A]"),children:"".concat(0===Number(t.amount)?"0.00":(0,y.Ix)(t.amount,2,"truncate")," USD")})]}),(t=>{var s;let l="fee-tip-".concat(t.id),r=(0,b.B)(t.lpFee);return(0,a.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"text-text-light text-sm",children:e("trade.fee")}),(0,a.jsx)(o.A,{className:"ml-1.5 m-assets-fee-tip"})]}),(0,a.jsx)(n.m,{target:".".concat(l),position:"top",pt:{root:{className:"w-[200px]"}},children:(0,a.jsxs)("div",{className:"font-medium text-[12px]",children:[(0,a.jsx)("div",{children:e("trade.fee_details")}),(0,a.jsxs)("div",{className:"grid grid-cols-2 mt-1",children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.trading_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fee,2,"truncate")," USD")}
1),(0,a.jsx)("div",{className:"pb-1",children:e("trade.holding_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fundingFee,2,"truncate")," USD")}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.lp_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(null!=(s=t.lpFee)?s:0,2,"truncate")," USD")})]})]})]})}),(0,a.jsx)("span",{className:"".concat(l," text-text-dark text-sm font-semibold underline decoration-dotted decoration-0.5 underline-offset-2"),children:"".concat((0,y.Ix)((0,b.N)(t.fee,t.fundingFee,t.lpFee),2,"truncate")," USD")})]})})(t),(0,a.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,a.jsx)("span",{className:"text-text-light text-sm",children:e("assets.total_position_margin")}),(0,a.jsx)("span",{className:"text-text-dark text-sm font-semibold",children:"".concat((0,y.tu)(t.usedMargin)," USD")})]}),(0,a.jsxs)("div",{className:"flex justify-between mt-1",children:[(0,a.jsx)("span",{className:"text-text-light text-sm",children:e("assets.available_balance")}),(0,a.jsx)("span",{className:"text-text-dark text-sm font-semibold",children:"".concat((0,y.tu)(t.availableBalance)," USD")})]})]},t.id)),(0,a.jsx)(n.m,{target:".m-assets-fee-tip",position:"bottom",content:e("assets.asset_fee_tip")}),h&&(0,a.jsx)("div",{ref:U,className:"h-10 w-full pb-6 text-center text-sm text-text-light",children:e("trade.load_more_loading")}),!h&&(0,a.jsx)("div",{className:"h-10 w-full flex items-center justify-center mb-3 text-sm text-text-light",children:e("trade.load_more_end")})]}):(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"text-text-light text-base font-normal",children:(0,a.jsx)(c.x6,{i18nKey:"referrals.referred_history_delay",components:{white:(0,a.jsx)("span",{className:"text-text-dark font-medium"})}})}),(0,a.jsxs)("div",{className:"relative w-full h-full customer-table mt-3",children:[(0,a.jsxs)(u.b,{value:l,pt:{wrapper:()=>({className:"border border-panel-border-color rounded-[12px]"}),thead:()=>({className:"!border-b !border-panel-border-color"}),bodyRow:()=>({className:"hover:!bg-token-list-item-hover-color"})},lazy:!0,first:A.first,onPage:e=>{T(e)},paginator:!0,totalRecords:E,rows:20,rowsPerPageOptions:[5,10,25,50],paginatorTemplate:{layout:" PrevPageLink PageLinks NextPageLink ",RowsPerPageDropdown:e=>(0,a.jsxs)("div",{className:"flex align-items-center",children:[(0,a.jsx)(n.m,{target:".slider>.p-slider-handle",content:"".concat(e.value," / page"),position:"top",event:"focus"}),(0,a.jsxs)("span",{className:"mr-3",style:{color:"var(--text-color)",userSelect:"none"},children:["Items per page:"," "]})]}),CurrentPageReport:e=>(0,a.jsxs)("span",{style:{color:"var(--text-color)",userSelect:"none",width:"120px",textAlign:"center"},children:[e.first," ","-",e.last," ","of",e.totalRecords]})},scrollable:!0,scrollHeight:"flex",children:[(0,a.jsx)(p.V,{header:e("trade.time"),body:e=>(0,a.jsx)("div",{className:"flex relative h-[50px] items-center px-4 text-text-light",children:(0,y.Ey)(e.timestamp)}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !py-0 !rounded-tl-lg !rounded-bl-lg"}),bodyCell:()=>({className:"text-sm !p-0 !h-[70px]"})}}),(0,a.jsx)(p.V,{header:e("assets.action_type"),body:e=>(0,a.jsx)("div",{className:"flex px-4 text-text-dark",children:"".concat(D(e.type))}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !py-0"}),bodyCell:()=>({className:"text-sm !p-0 !h-[70px]"})}}),(0,a.jsx)(p.V,{header:e("assets.action_amount"),body:e=>(0,a.jsx)("div",{className:"flex px-4 ".concat(Number(e.amount)>0?"text-[#2EBD85]":"text-[#E43C5A]"),children:"".concat(0===Number(e.amount)?"0.00":(0,y.Ix)(e.amount,2,"truncate")," USD")}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !py-0"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px]"})}}),(0,a.jsx)(p.V,{header:()=>(0,a.jsx)("div",{className:"flex items-center whitespace-pre-wrap ",children:(0,a.jsx)("span",{children:e("trade.fee")})}),body:t=>{var s;let l="fee-tip-".concat(t.id),r=(0,b.B)(t.lpFee);return(0,a.jsxs)("div",{className:"flex px-4 whitespace-pre-wrap ",children:[(0,a.jsx)(n.m,{target:".".concat(l),position:"top",pt:{root:{className:"w-[200px]"}},children:(0,a.jsxs)("div",{className:"font-medium text-[12px]",children:[(0,a.jsx)("div",{children:e("trade.fee_details")}),(0,a.jsxs)("div",{className:"grid grid-cols-2 mt-1",children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.trading_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fee,2,"truncate")," USD")}
1),(0,a.jsx)("div",{className:"pb-1",children:e("trade.holding_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fundingFee,2,"truncate")," USD")}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.lp_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(null!=(s=t.lpFee)?s:0,2,"truncate")," USD")})]})]})]})}),(0,a.jsx)("span",{className:"".concat(l," underline decoration-dotted decoration-0.5 underline-offset-2"),children:"".concat((0,y.Ix)((0,b.N)(t.fee,t.fundingFee,t.lpFee),2,"truncate")," USD")})]})},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !py-0"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px]"})}}),(0,a.jsx)(p.V,{header:e("assets.total_position_margin"),body:e=>(0,a.jsx)("div",{className:"flex px-4",children:"".concat((0,y.tu)(e.usedMargin)," USD")}),style:{width:"14%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal whitespace-pre-wrap"}),headerCell:()=>({className:"!h-[50px] !py-0"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px]"})}}),(0,a.jsx)(p.V,{header:e("assets.available_balance"),body:e=>(0,a.jsx)("div",{className:"flex px-4 w-full justify-end",children:"".concat((0,y.tu)(e.availableBalance)," USD")}),style:{width:"14%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal whitespace-pre-wrap"}),headerCell:()=>({className:"!h-[50px] !py-0"}),headerContent:()=>({className:"!flex justify-end"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px]"})}})]},t.language),(0,a.jsx)(g.A,{num:E,className:"text-text-light text-xs absolute bottom-0 h-11 flex items-center ml-7"})]})]})})};var _=s(30481);let k=s.p+"static/media/ic_deposit_arrow.e8a6f846.svg",C=s.p+"static/media/ic_withdraw_arrow.51b1dc19.svg",S=()=>{let{t:e}=(0,c.Bd)(),t=(0,v.l)(e=>e.isMobile),[s,l]=(0,i.useState)([]),r=(0,j.WG)(e=>e.fundingPageNum),[d,o]=(0,i.useState)(!0),[x,m]=(0,i.useState)(0),[h,b]=(0,i.useState)(!0),w=(0,i.useRef)(null),S=(0,i.useRef)(!1),E=(0,i.useRef)(r),P=(0,i.useRef)(h),[A,T]=(0,i.useState)({first:0,rows:20,page:0,sortField:null,sortOrder:null,filters:null}),D=t=>(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("img",{className:"w-2.5 h-2.5",src:"withdraw"===t.recordType?C:k,alt:""}),(0,a.jsx)("span",{className:"text-sm ".concat("withdraw"===t.recordType?"text-[#FF7500]":"text-[#2ebd85]"),children:"withdraw"===t.recordType?e("home.withdrawal"):e("home.deposit")})]}),U=t=>(0,a.jsx)("div",{className:"flex w-full justify-end",children:(0,a.jsx)("span",{className:"text-[11px] font-medium px-2 py-0.5 rounded-[12px] ".concat("pending"===t.status||"processing"===t.status?"text-[#1A91F3] bg-[#1A91F333]":"success"===t.status?"text-[#2ebd85] bg-[#2ebd8533]":"text-[#E43C5A] bg-[#E43C5A33]"),children:"pending"===t.status||"processing"===t.status?e("assets.processing"):"success"===t.status?e("assets.completed"):e("assets.failed")})}),O=(0,i.useCallback)(e=>{w.current&&w.current.disconnect(),e&&(w.current=new IntersectionObserver(e=>{e[0].isIntersecting&&(()=>{if(S.current||!P.current)return;S.current=!0;let e=E.current+1;(0,j.wz)(e,!0).then(e=>{e&&e.items&&(E.current=e.pageNum,l(t=>[...t,...e.items]),m(e.total),b((e.pageNum-1)*e.pageSize+e.items.length<e.total))}).finally(()=>{S.current=!1})})()},{threshold:1}),w.current.observe(e))},[]);return(0,i.useEffect)(()=>{S.current||(S.current=!0,(0,j.wz)(A.page+1).then(e=>{e&&e.items&&(l(e.items),m(e.total),b((e.pageNum-1)*e.pageSize+e.items.length<e.total))}).finally(()=>{o(!1),S.current=!1}))},[A]),(0,i.useEffect)(()=>{E.current=r},[r]),(0,i.useEffect)(()=>{P.current=h},[h]),(0,i.useEffect)(()=>{0===r&&(l([]),T({first:0,rows:20,page:0,sortField:null,sortOrder:null,filters:null}))},[r]),(0,a.jsx)(a.Fragment,{children:d?(0,a.jsx)("div",{className:"text-text-dark h-[200px] flex items-center justify-center",children:(0,a.jsx)(N.A,{className:"w-12 h-12"})}):s.length<=0?(0,a.jsx)("div",{className:"text-text-dark w-full h-[200px] mt-[6%] flex items-center justify-center",children:(0,a.jsx)(f.A,{text:e("trade.no_history_yet")})}):t?(0,a.jsxs)("div",{className:"w-full h-full flex flex-col items-center gap-3 px-4",children:[s.map(t=>(0,a.jsxs)("div",{className:"flex flex-col w-full h-fit bg-position-item-background text-xs text-text-dark p-4 rounded-xl border border-block-background",children:[(0,a.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-row items-center",children:[(0,a.jsx)("div",{className:"font-semibold",children:D(t)}),(0,a.jsx)("div",{className:"ml-3 text-text-light",children:(0,y.Ey)(t.timestamp)})]}),(0,a.jsx)("div",{children:U(t)})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between mt-3",children:[(0,a.jsx)("div",{className:"text-sm text-text-light",children:e("assets.amount")}),(0,a.jsx)("div",{className:"text-base font-semibold",children:"".concat((0,y.hE)(t.grossAmount)," USD")}
1)]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between mt-1",children:[(0,a.jsx)("div",{className:"text-sm text-text-light",children:e("assets.network")}),(0,a.jsx)("div",{className:"text-sm font-medium",children:t.network})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between mt-1",children:[(0,a.jsx)("div",{className:"text-sm text-text-light",children:e("trade.fee")}),(0,a.jsx)("div",{className:"text-sm font-medium",children:"".concat((0,y.hE)(t.fee)," USD")})]})]},t.timestamp)),h&&(0,a.jsx)("div",{ref:O,className:"h-10 w-full pb-6 text-center text-sm text-text-light",children:e("trade.load_more_loading")}),!h&&(0,a.jsx)("div",{className:"h-10 w-full flex items-center justify-center mb-3 text-sm text-text-light",children:e("trade.load_more_end")})]}):(0,a.jsxs)("div",{className:"relative w-full h-full customer-table",children:[(0,a.jsxs)(u.b,{value:s,pt:{wrapper:()=>({className:"border border-panel-border-color rounded-[12px]"}),thead:()=>({className:"!border-b !border-panel-border-color"}),bodyRow:()=>({className:"hover:!bg-token-list-item-hover-color"})},lazy:!0,first:A.first,onPage:e=>{T(e)},paginator:!0,totalRecords:x,rows:20,rowsPerPageOptions:[5,10,25,50],paginatorTemplate:{layout:" PrevPageLink PageLinks NextPageLink ",RowsPerPageDropdown:e=>(0,a.jsxs)("div",{className:"flex align-items-center",children:[(0,a.jsx)(n.m,{target:".slider>.p-slider-handle",content:"".concat(e.value," / page"),position:"top",event:"focus"}),(0,a.jsxs)("span",{className:"mr-3",style:{color:"var(--text-color)",userSelect:"none"},children:["Items per page:"," "]})]}),CurrentPageReport:e=>(0,a.jsxs)("span",{style:{color:"var(--text-color)",userSelect:"none",width:"120px",textAlign:"center"},children:[e.first," ","-",e.last," ","of",e.totalRecords]})},scrollable:!0,scrollHeight:"flex",children:[(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("span",{className:"text-sm text-text-light",children:(0,y.Ey)(e.timestamp)}),header:e("trade.time"),style:{width:"25%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tl-lg !rounded-bl-lg"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px]"})}}),(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("span",{className:"text-sm text-text-dark",children:e.network}),header:e("assets.network"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px]"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px]"})}}),(0,a.jsx)(p.V,{body:D,header:e("assets.direction"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px]"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px]"})}}),(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("span",{className:"text-sm text-text-dark",children:"".concat((0,y.tu)(e.grossAmount)," USD")}),header:e("assets.amount"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px]"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px]"})}}),(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("span",{className:"text-sm text-text-dark",children:"".concat((0,y.tu)(e.fee)," USD")}),header:e("trade.fee"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px]"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px]"})}}),(0,a.jsx)(p.V,{body:U,header:e("partner.status"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tr-lg !rounded-br-lg"}),headerContent:()=>({className:"flex justify-end"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px]"})}})]},_.Ay.language),(0,a.jsx)(g.A,{num:x,className:"text-text-light text-xs absolute bottom-0 h-11 flex items-center ml-7"})]})})};var E=s(70140),P=s(38767),A=s(20481),T=s(6033),D=s(98503),U=s(76055),O=s(39580),F=s(41886),I=s(57454),R=s(76273),z=s(41028);let V=()=>{let{t:e,i18n:t}=(0,c.Bd)(),s=(0,v.l)(e=>e.isMobile),l=(0,r.useRouter)(),d=(0,j.WG)(e=>e.positionList),o=(0,j.WG)(e=>e.tokenMap),{showClosePositionDialog:x,showEditOpenOrderTPSLDialog:m,showShareProfitDialog:h}=(0,U.s)(),[b,w]=(0,i.useState)(!0),[_,k]=(0,i.useState)(""),C=(0,i.useRef)(0),S=(0,I.kH)(e=>e.userInfo),V=(null==S?void 0:S.accountType)===0,M=e=>(0,z.U)(e.quantity,o[e.symbol]),L=t=>(0,a.jsxs)("div",{className:"flex items-center whitespace-pre-wrap ".concat("long"===t.positionSide?"text-[#2ebd85]":"text-[#E43C5A]"),
1children:["".concat("long"===t.positionSide?e("trade.long"):e("trade.short"),"  ").concat(t.leverage,"x"),s&&(0,a.jsx)("span",{className:"hidden bg-dialog-input-background rounded-[4px] text-xs text-text-dark px-1.5 ml-2 py-[1px]",children:"cross"===t.marginMode?e("trade.cross"):e("trade.isolated")})]}),H=e=>{let t=e.unrealizedPnl>0?"text-[#2ebd85]":"text-[#E43C5A]";return(0,a.jsxs)("div",{className:"flex w-full items-center gap-1 ".concat(t),children:[(0,a.jsx)("div",{className:"flex md:whitespace-pre-wrap",children:"".concat((0,y.ax)(e.unrealizedPnl,2),"\n(").concat((0,y.wd)(e.returnRate),"%)")}),!V&&(0,a.jsx)("button",{type:"button",className:"hidden h-7 w-7 cursor-pointer items-center justify-center rounded-md opacity-100 transition-opacity hover:opacity-60 md:flex",onClick:()=>q(e),children:(0,a.jsx)(T.A,{className:"w-3.5 h-3.5 fill-current text-text-light"})})]})},q=async t=>{var s;if(V)return;let a=_;if(!a){try{let e=await (0,E.ir)();a=(null==e?void 0:e.inviteCode)||""}catch(t){(0,F.P0)("error",e("home.network_error"));return}a&&k(a)}if(!a)return;let l=t.returnRate?"".concat((t.returnRate>0?"+":"")+(0,y.Ix)(t.returnRate,2,"up"),"%"):"".concat((t.unrealizedPnl>0?"+":"")+(0,y.Ix)(t.unrealizedPnl/t.margin*100,2,"up"),"%"),r=new Date,n=r.getUTCFullYear(),i=String(r.getUTCMonth()+1).padStart(2,"0"),c=String(r.getUTCDate()).padStart(2,"0"),d=String(r.getUTCHours()).padStart(2,"0"),o=String(r.getUTCMinutes()).padStart(2,"0"),x=String(r.getUTCSeconds()).padStart(2,"0"),m="".concat(n,"/").concat(i,"/").concat(c," (UTC+0)").concat(d,":").concat(o,":").concat(x);h({referralCode:a,symbol:t.symbol,side:null==(s=t.positionSide)?void 0:s.toUpperCase(),leverage:Number(t.leverage),profitPercent:l,profitAmount:"".concat(t.unrealizedPnl>0?"+":"").concat((0,y.Ix)(t.unrealizedPnl,2,"up")," USD"),entryPrice:"".concat((0,y.hE)(t.showEntryPrice,t.pricePrecision||2)," USD"),closePrice:"".concat((0,y.hE)(t.currentRate,t.pricePrecision||2,!0,"round")," USD"),displayName:(null==S?void 0:S.accountAddress)?(0,y.UQ)(S.accountAddress):"Anonymous",time:m,isOpenPosition:!0})},B=e=>{(0,D.$s)(D.t$),x(e,()=>{})},W=e=>{let t,s;(e.takeProfitStopLossOrders||[]).forEach(a=>{"take_profit_market"===a.type?t=Number((0,y.oT)(e.positionSide,(null==a?void 0:a.triggerPrice)||0,(null==a?void 0:a.spread)||0)):"stop_market"===a.type&&(s=Number((0,y.oT)(e.positionSide,(null==a?void 0:a.triggerPrice)||0,(null==a?void 0:a.spread)||0)))});let l=void 0===t?"--":(0,y.hE)(t,e.pricePrecision),r=void 0===s?"--":(0,y.hE)(s,e.pricePrecision),n="".concat(l," / ").concat(r);return(0,a.jsxs)("div",{className:"flex flex-row items-center cursor-pointer w-full justify-end",onClick:()=>$(1,e),children:[(0,a.jsx)("span",{className:"text-text-dark underline decoration-dotted decoration-0.5 underline-offset-2",children:n}),(0,a.jsx)(P.A,{className:"ml-2 h-4 w-4 shrink-0 text-text-light fill-current"})]})},$=(e,t)=>{(0,D.$s)(D.FQ),(0,D.$s)(D.eN),m(0,t.positionId,e=>{e&&!O.z.isConnected()&&(G(),Y())})},G=async()=>{0===C.current&&w(!0),await (0,j.cR)(),w(!1)},Y=async()=>{(0,I.W5)()&&await (0,j.n7)()},Q=e=>{l.push("/trade/".concat((0,y.vT)(e.symbol),"?posId=").concat(e.positionId))};return(0,i.useEffect)(()=>(G(),()=>{}),[]),(0,a.jsx)(a.Fragment,{children:b?(0,a.jsx)("div",{className:"text-text-dark h-[200px] flex items-center justify-center",children:(0,a.jsx)(N.A,{className:"w-12 h-12"})}):d.length<=0?(0,a.jsx)("div",{className:"text-text-dark w-full h-[200px] mt-[6%] flex items-center justify-center",children:(0,a.jsx)(f.A,{text:e("trade.no_positions_yet")})}):s?(0,a.jsx)("div",{className:"w-full flex flex-col items-center px-4 ",children:d.map(t=>(0,a.jsxs)("div",{className:"flex flex-col w-full bg-position-item-background text-xs text-text-dark py-3 px-4 mb-3 rounded-xl border border-block-background",children:[(0,a.jsxs)("div",{className:"flex row items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"flex row items-center",children:(0,a.jsx)("div",{className:"text-sm font-bold",children:t.symbol})}),(0,a.jsx)("div",{className:"flex",children:L(t)})]}),!V&&(0,a.jsx)(A.A,{className:"cursor-pointer",onClick:e=>q(t)})]}),(0,a.jsxs)("div",{className:"flex flex-row mt-3 relative",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"text-text-light font-medium",children:e("trade.current_rate")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat((0,y.hE)(t.currentRate,t.pricePrecision,!0,"round"))})]}),(0,a.jsxs)("div",{className:"flex flex-col ml-auto items-end",children:[(0,a.jsx)("div",{className:"text-text-light font-medium",children:e("trade.enter_price")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat((0,y.hE)((0,y.Ik)(t.positionSide,t.entryPrice,0),t.pricePrecision))})]})]}),(0,a.jsxs)("div",{className:"flex flex-row mt-3 relative",children:[(0,a.jsxs)("div",{className:"flex flex-col ",children:[(0,a.jsx)("div",{className:"text-text-light font-medium",children:e("trade.size")}),(0,a.jsx)("div",{className:"font-semibold",children:M(t)})]}),(0,a.jsxs)("div",{className:"flex flex-col ml-auto items-end",children:[(0,a.jsx)("div",{className:"text-text-light font-medium",children:e("trade.collateral")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat((0,y.hE)(t.margin)," USD")}
1)]})]}),(0,a.jsxs)("div",{className:"flex flex-row mt-3 relative",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"text-text-light font-medium",children:e("trade.position_value")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat((0,y.hE)((0,R.ez)(t.marketPrice,t.quantity))," USD")})]}),(0,a.jsxs)("div",{className:"flex flex-col ml-auto items-end",children:[(0,a.jsx)(n.m,{target:".mobile-liq-price-tip",position:"top",content:e("trade.liq_price_tip"),pt:{root:{className:"w-[280px]"}}}),(0,a.jsx)("div",{className:"text-text-light font-medium text-right underline decoration-dotted mobile-liq-price-tip",children:e("trade.liq_price")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat(0!==t.liquidationPrice?(0,y.hE)(t.liquidationPrice,t.pricePrecision||2):"--")})]})]}),(0,a.jsxs)("div",{className:"border-t border-border-color mt-3 pt-3 rounded-lg gap-0.5 flex flex-col",children:[(0,a.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,a.jsx)("div",{className:"text-text-dark font-medium",children:e("trade.pnl")}),(0,a.jsx)("div",{className:"font-semibold text-sm",children:H(t)})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center",children:[(0,a.jsx)("div",{className:"text-text-dark font-medium",children:e("trade.tp_sl")}),(0,a.jsx)("div",{className:"font-semibold",children:W(t)})]})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between mt-3 gap-2 font-medium",children:[(0,a.jsx)("div",{className:"h-9 flex-1 flex justify-center items-center bg-dialog-cancel-background rounded-lg text-text-dark",onClick:()=>$(1,t),children:e("trade.tp_sl")}),(0,a.jsx)("div",{className:"h-9 flex-1 flex justify-center items-center bg-dialog-cancel-background rounded-lg text-text-dark",onClick:()=>{x(t,()=>{})},children:e("trade.close_position")})]})]},t.positionId))}):(0,a.jsxs)("div",{className:"relative h-full w-full customer-table",children:[(0,a.jsxs)(u.b,{value:d,pt:{wrapper:()=>({className:"border border-panel-border-color rounded-[12px]"}),thead:()=>({className:"!bg-main-background !border-b !border-panel-border-color"}),bodyRow:()=>({className:"hover:!bg-token-list-item-hover-color"})},paginator:!0,totalRecords:d.length,rows:20,rowsPerPageOptions:[5,10,25,50],paginatorTemplate:{layout:" PrevPageLink PageLinks NextPageLink ",RowsPerPageDropdown:e=>(0,a.jsxs)("div",{className:"flex align-items-center",children:[(0,a.jsx)(n.m,{target:".slider>.p-slider-handle",content:"".concat(e.value," / page"),position:"top",event:"focus"}),(0,a.jsxs)("span",{className:"mr-3",style:{color:"var(--text-color)",userSelect:"none"},children:["Items per page:"," "]})]}),CurrentPageReport:e=>(0,a.jsxs)("span",{style:{color:"var(--text-color)",userSelect:"none",width:"120px",textAlign:"center"},children:[e.first," ","-",e.last," ","of",e.totalRecords]})},scrollable:!0,scrollHeight:"flex",children:[(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("div",{className:"flex text-text-dark cursor-pointer",onClick:()=>Q(e),children:"".concat((0,y.vT)(e.symbol))}),header:e("trade.coin"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tl-lg !rounded-bl-lg !pl-4 !pr-2"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px] !pl-4 !pr-2"})}}),(0,a.jsx)(p.V,{body:e=>{let t=M(e);return(0,a.jsx)("div",{className:"flex text-text-dark",children:t})},header:e("trade.size"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:L,header:e("trade.direction"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-light text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:e=>{let t=(0,R.ez)(e.marketPrice,e.quantity);return(0,a.jsx)("div",{className:"flex text-text-dark",children:"".concat((0,y.hE)(t)," USD")})},header:e("trade.position_value"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("div",{className:"flex text-text-dark",children:"".concat((0,y.hE)((0,y.Ik)(e.positionSide,e.entryPrice,0),e.pricePrecision))}),header:e("trade.enter_price"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("div",{className:"flex text-text-dark",children:"".concat((0,y.hE)(e.currentRate,e.pricePrecision,!0,"round"))}),header:e("trade.current_rate"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("div",{className:"flex flex-col text-text-dark",children:(0,a.jsx)("span",{children:"".concat((0,y.hE)(e.margin)," USD")}
1)}),header:e("trade.collateral"),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:H,header:e("trade.pnl"),style:{width:"15%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:e=>(0,a.jsx)("div",{className:"flex text-text-dark",children:"".concat(0!==e.liquidationPrice?(0,y.hE)(e.liquidationPrice,e.pricePrecision||2):"--")}),header:(0,a.jsxs)("div",{className:"text-text-light text-xs py-1 underline decoration-dotted",children:[(0,a.jsx)(n.m,{target:".liq-price-tip",position:"top",content:e("trade.liq_price_tip"),pt:{root:{className:"w-[280px]"}}}),(0,a.jsx)("span",{className:"liq-price-tip",children:e("trade.liq_price")})]}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:t=>(0,a.jsxs)("div",{className:"w-fit flex flex-row",children:[(0,a.jsx)("div",{className:"w-fit flex text-xs text-[#2ebd85] font-medium cursor-pointer underline decoration-dotted decoration-0.5 underline-offset-2",onClick:()=>B(t),children:e("trade.market_price")}),(0,a.jsx)("div",{className:"w-fit text-xs text-[#2ebd85] font-medium ml-2.5 cursor-pointer underline decoration-dotted decoration-0.5 underline-offset-2 hidden",onClick:()=>$(0,t),children:e("trade.limit")})]}),header:e("trade.close_position"),style:{width:"9%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !p-2"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !p-2"})}}),(0,a.jsx)(p.V,{body:W,header:e("trade.tp_sl"),style:{width:"16%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tr-lg !rounded-br-lg !pr-4 !pl-2"}),headerContent:()=>({className:"flex justify-end"}),bodyCell:()=>({className:"text-text-dark text-sm !h-[70px] !pr-4 !pl-2"})}})]},t.language),(0,a.jsx)(g.A,{num:d.length,className:"text-text-light text-xs absolute bottom-0 h-11 flex items-center ml-7"})]})})};var M=s(75608),L=s(78192);let H=()=>{let{t:e,i18n:t}=(0,c.Bd)(),{showTransactionDetailsDialog:s,showShareProfitDialog:l}=(0,U.s)(),d=(0,v.l)(e=>e.isMobile),[o,x]=(0,i.useState)([]),[m,h]=(0,i.useState)(!0),[w,_]=(0,i.useState)(!0),[k,C]=(0,i.useState)(""),S=(0,i.useRef)(null),P=(0,i.useRef)(0),D=(0,I.kH)(e=>e.userInfo),O=(null==D?void 0:D.accountType)===0,R=(0,j.WG)(e=>e.tokenMap),V=(0,r.useRouter)(),[H,q]=(0,i.useState)(0),[B,W]=(0,i.useState)({first:0,rows:20,page:0,sortField:null,sortOrder:null,filters:null}),$=e=>(0,z.U)(e.quantity,R[e.symbol]),G=(t,s)=>{let l="";"open"===t.tradeType&&"long"===t.positionSide?l=e("trade.open_long"):"open"===t.tradeType&&"short"===t.positionSide?l=e("trade.open_short"):"close"===t.tradeType&&"long"===t.positionSide?l=e("trade.close_long"):"close"===t.tradeType&&"short"===t.positionSide&&(l=e("trade.close_short"));let r="open"===t.tradeType&&"long"===t.positionSide||"close"===t.tradeType&&"short"===t.positionSide;return(0,a.jsx)("div",{className:"flex  ".concat(0===s?"whitespace-pre-wrap":""," ").concat(r?"text-[#2ebd85]":"text-[#E43C5A]"),children:"".concat("liquidation"===t.orderTypeDetail?e("trade.order_liquidation"):"").concat(l,"  ").concat(t.leverage,"x")})},Y=async t=>{if(O)return;let s=await (0,L.T)(t,k,e,D);if(!s)return void(0,F.P0)("error",e("home.network_error"));s.referralCode&&!k&&C(s.referralCode),l(s)},Q=e=>{V.push("/trade/".concat((0,y.vT)(e.symbol)))},K=(0,i.useCallback)(e=>{S.current&&S.current.disconnect(),e&&(S.current=new IntersectionObserver(e=>{e[0].isIntersecting&&(console.log("tradehistory load more"),(0,E.l9)({pageNum:P.current+1,pageSize:20}).then(e=>{e&&(x(t=>[...t,...e.items]),q(e.total),P.current=e.pageNum,_((e.pageNum-1)*e.pageSize+e.items.length<e.total))}).finally(()=>{}))},{threshold:1}),S.current.observe(e))},[]);return(0,i.useEffect)(()=>{(0,E.l9)({pageNum:B.page+1,pageSize:20}).then(e=>{e&&(x(e.items),q(e.total),P.current=e.pageNum,_((e.pageNum-1)*e.pageSize+e.items.length<e.total))}).finally(()=>{h(!1)})},[B]),(0,a.jsx)(a.Fragment,{children:m?(0,a.jsx)("div",{className:"text-text-dark h-[200px] flex items-center justify-center",children:(0,a.jsx)(N.A,{className:"w-12 h-12"})}):o.length<=0?(0,a.jsx)("div",{className:"text-text-dark w-full h-[200px] mt-[6%] flex items-center justify-center",children:(0,a.jsx)(f.A,{text:e("trade.no_orders_yet")})}):d?(0,a.jsxs)("div",{className:"w-full h-full flex flex-col items-center gap-3 px-4",children:[o.map(t=>(0,a.jsxs)("div",{className:"flex flex-col w-full h-fit bg-position-item-background text-xs text-text-dark py-3 px-4 roun
1ded-xl border border-block-background",children:[(0,a.jsxs)("div",{className:"flex row items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"flex row items-center",children:(0,a.jsx)("div",{className:"text-sm font-bold",children:t.symbol})}),(0,a.jsx)("div",{className:"flex",children:G(t,1)})]}),"close"!==t.tradeType||O?(0,a.jsx)("div",{className:"w-4 h-4"}):(0,a.jsx)(A.A,{className:"cursor-pointer",onClick:()=>Y(t)})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between mt-3 font-medium",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.time")}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"font-semibold",children:(0,y.Ey)(t.timestamp)}),t.txHash&&(0,a.jsx)("div",{onClick:()=>s(t.txHash),className:"hover:opacity-80 transition-opacity cursor-pointer",children:(0,a.jsx)(M.A,{className:"w-3.5 h-2.75 fill-current"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col ml-auto items-end",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.collateral")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat((0,y.tu)(t.margin)," USD")})]})]}),(0,a.jsxs)("div",{className:"flex flex-row relative mt-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.price")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat((0,y.tu)(t.price,t.pricePrecision))})]}),(0,a.jsxs)("div",{className:"flex flex-col ml-auto items-end",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.size")}),(0,a.jsx)("div",{className:"font-semibold",children:$(t)})]})]}),(0,a.jsxs)("div",{className:"flex flex-row relative mt-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.trade_value")}),(0,a.jsx)("div",{className:"font-semibold",children:"".concat((0,y.tu)(t.cost)," USD")})]}),(t=>{var s;let l="fee-tip-".concat(t.id),r=(0,b.B)(t.lpFee);return(0,a.jsxs)("div",{className:"flex flex-col ml-auto items-end",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.fee")}),(0,a.jsx)(n.m,{target:".".concat(l),position:"top",pt:{root:{className:"w-[200px]"}},children:(0,a.jsxs)("div",{className:"font-medium text-[12px]",children:[(0,a.jsx)("div",{children:e("trade.fee_details")}),(0,a.jsxs)("div",{className:"grid grid-cols-2 mt-1",children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.trading_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fee,2,"truncate")," USD")}),(0,a.jsx)("div",{className:"pb-1",children:e("trade.holding_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fundingFee,2,"truncate")," USD")}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.lp_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(null!=(s=t.lpFee)?s:0,2,"truncate")," USD")})]})]})]})}),(0,a.jsx)("span",{className:"".concat(l," font-semibold underline decoration-dotted decoration-0.5 underline-offset-2"),children:"".concat((0,y.Ix)((0,b.N)(t.fee,t.fundingFee,t.lpFee),2,"truncate")," USD")})]})})(t)]}),(0,a.jsx)("div",{className:"flex flex-row relative mt-3",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.position_pnl")}),(e=>{let t=e.positionPnl,s="open"===e.tradeType,l=s?"text-text-dark":Number(t)>0?"text-[#2ebd85]":0>Number(t)?"text-[#E43C5A]":"text-text-dark";return(0,a.jsx)("div",{className:"font-semibold ".concat(l),children:"".concat(s?"0":(0,y.Ix)(t,2,"truncate")," USD")})})(t)]})}),(0,a.jsxs)("div",{className:"flex flex-row justify-between mt-3 border-t border-border-color pt-3",children:[(0,a.jsx)("div",{className:"text-text-light",children:e("trade.closed_pnl")}),(0,a.jsx)("div",{className:"close"===t.tradeType&&t.realizedPnl>0?"text-[#2ebd85]":"close"===t.tradeType&&t.realizedPnl<0?"text-[#E43C5A]":"text-text-dark",children:(0,a.jsx)("span",{className:"text-sm font-semibold",children:"".concat((0,y.Ix)(t.realizedPnl,2,"up")," USD")}
1)})]})]},t.id)),w&&(0,a.jsx)("div",{ref:K,className:"h-10 w-full pb-6 text-center text-sm text-text-light",children:e("trade.load_more_loading")}),!w&&(0,a.jsx)("div",{className:"h-10 w-full flex items-center justify-center mb-3 text-sm text-text-light",children:e("trade.load_more_end")})]}):(0,a.jsxs)("div",{className:"relative w-full h-full customer-table",children:[(0,a.jsxs)(u.b,{value:o,pt:{wrapper:()=>({className:"border border-panel-border-color rounded-[12px]"}),thead:()=>({className:"!bg-main-background !border-b !border-panel-border-color"}),bodyRow:()=>({className:"hover:!bg-token-list-item-hover-color"})},lazy:!0,first:B.first,onPage:e=>{var t,s,a;W({first:null!=(t=e.first)?t:0,rows:null!=(s=e.rows)?s:20,page:null!=(a=e.page)?a:0,sortField:null,sortOrder:null,filters:null})},paginator:!0,totalRecords:H,rows:20,rowsPerPageOptions:[5,10,25,50],paginatorTemplate:{layout:" PrevPageLink PageLinks NextPageLink ",RowsPerPageDropdown:e=>(0,a.jsxs)("div",{className:"flex align-items-center",children:[(0,a.jsx)(n.m,{target:".slider>.p-slider-handle",content:"".concat(e.value," / page"),position:"top",event:"focus"}),(0,a.jsxs)("span",{className:"mr-3",style:{color:"var(--text-color)",userSelect:"none"},children:["Items per page:"," "]})]}),CurrentPageReport:e=>(0,a.jsxs)("span",{style:{color:"var(--text-color)",userSelect:"none",width:"120px",textAlign:"center"},children:[e.first," ","-",e.last," ","of",e.totalRecords]})},scrollable:!0,scrollHeight:"flex",children:[(0,a.jsx)(p.V,{header:e("trade.time"),body:e=>{let[t,l]=(0,y.Ey)(e.timestamp).split(" ");return(0,a.jsxs)("div",{className:"flex flex-col justify-center",children:[(0,a.jsx)("div",{className:"text-text-light text-xs",children:t}),(0,a.jsxs)("div",{className:"flex items-center gap-1 text-text-dark text-xs",children:[(0,a.jsx)("span",{children:l}),e.txHash&&(0,a.jsx)("div",{onClick:()=>{e.txHash&&(d?s(e.txHash):window.open("/tx/".concat(e.txHash),"_blank"))},className:"hover:opacity-80 transition-opacity cursor-pointer",children:(0,a.jsx)(M.A,{className:"w-3.5 h-2.75 fill-current"})})]})]})},style:{width:"120px"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tl-lg !rounded-bl-lg !pl-4 !pr-2"}),bodyCell:()=>({className:"text-sm !p-0 !h-[70px] !pl-4 !pr-2"})}}),(0,a.jsx)(p.V,{header:e("trade.coin"),body:e=>(0,a.jsx)("div",{className:"flex text-text-dark cursor-pointer",onClick:()=>Q(e),children:"".concat((0,y.vT)(e.symbol))}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !px-2"}),bodyCell:()=>({className:"text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.size"),body:e=>(0,a.jsx)("div",{className:"flex text-text-dark",children:$(e)}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !px-2"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.direction"),body:e=>G(e,0),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !px-2"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.price"),body:e=>(0,a.jsx)("div",{className:"flex",children:"".concat((0,y.tu)(e.price,e.pricePrecision))}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !px-2"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.trade_value"),body:e=>(0,a.jsx)("div",{className:"flex",children:"".concat((0,y.tu)(e.cost)," USD")}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !px-2"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.collateral"),body:e=>(0,a.jsx)("div",{className:"flex",children:"".concat((0,y.tu)(e.margin)," USD")}),pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !px-2"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.fee"),body:t=>{var s;let l="fee-tip-".concat(t.id),r=(0,b.B)(t.lpFee);return(0,a.jsxs)("div",{className:"flex text-text-dark",children:[(0,a.jsx)(n.m,{target:".".concat(l),position:"top",pt:{root:{className:"w-[200px]"}},children:(0,a.jsxs)("div",{className:"font-medium text-[12px]",children:[(0,a.jsx)("div",{children:e("trade.fee_details")}),(0,a.jsxs)("div",{className:"grid grid-cols-2 mt-1",children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.trading_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fee,2,"truncate")," USD")}
1),(0,a.jsx)("div",{className:"pb-1",children:e("trade.holding_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(t.fundingFee,2,"truncate")," USD")}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"pb-1",children:e("trade.lp_fee")}),(0,a.jsx)("div",{className:"pb-1 ml-auto font-semibold",children:"".concat((0,y.Ix)(null!=(s=t.lpFee)?s:0,2,"truncate")," USD")})]})]})]})}),(0,a.jsx)("span",{className:"".concat(l," underline decoration-dotted decoration-0.5 underline-offset-2"),children:"".concat((0,y.Ix)((0,b.N)(t.fee,t.fundingFee,t.lpFee),2,"truncate")," USD")})]})},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !px-2"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.position_pnl"),body:e=>{let t=e.positionPnl,s="open"===e.tradeType,l=s?"text-text-dark":Number(t)>0?"text-[#2ebd85]":0>Number(t)?"text-[#E43C5A]":"text-text-dark";return(0,a.jsx)("div",{className:"flex ".concat(l),children:"".concat(s?"0":(0,y.Ix)(t,2,"truncate")," USD")})},style:{width:"10%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal"}),headerCell:()=>({className:"!h-[50px] !rounded-tr-lg !rounded-br-lg !px-2"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !px-2"})}}),(0,a.jsx)(p.V,{header:e("trade.closed_pnl"),body:e=>{let t="close"===e.tradeType,s=t&&e.realizedPnl>0?"text-[#2ebd85]":t&&e.realizedPnl<0?"text-[#E43C5A]":"text-text-dark";return(0,a.jsxs)("div",{className:"flex w-full justify-end items-center gap-1 ".concat(s),children:[(0,a.jsx)("span",{className:"text-right",children:"".concat((0,y.Ix)(e.realizedPnl,2,"up")," USD")}),t&&!O?(0,a.jsx)("button",{type:"button",className:"flex h-7 w-7 cursor-pointer items-center justify-center rounded-md opacity-100 transition-opacity hover:opacity-60",onClick:()=>Y(e),children:(0,a.jsx)(T.A,{className:"w-3.5 h-3.5 fill-current text-text-light"})}):(0,a.jsx)("div",{className:"h-7 w-7"})]})},style:{width:"11%"},pt:{headerTitle:()=>({className:"text-text-light text-xs font-normal text-right"}),headerCell:()=>({className:"!h-[50px] !rounded-tr-lg !rounded-br-lg !pl-2 !pr-4"}),headerContent:()=>({className:"flex justify-end"}),bodyCell:()=>({className:"text-text-dark text-sm !p-0 !h-[70px] !pl-2 !pr-4"})}})]},t.language),(0,a.jsx)(g.A,{num:H,className:"text-text-light text-xs absolute bottom-0 h-11 flex items-center ml-7"})]})})};var q=s(72103);function B(){let{t:e}=(0,c.Bd)(),{theme:t}=(0,l.D)(),s=(0,v.l)(e=>e.isMobile),p=(0,I.kH)(e=>e.userInfo),u=(0,I.kH)(e=>e.totalBalance),f=(0,I.kH)(e=>e.crossAvailableBalance),N=(0,j.WG)(e=>e.positionList),[g,b]=(0,i.useState)(0),{showSelectWalletDialog:_,showDepositDialog:k,showWithdrawalDialog:C,showActiveCodeDialog:E}=(0,U.s)(),P=(0,r.useSearchParams)(),A=P.get("p")||"0",[T,O]=(0,i.useState)(Number(A||0)),F=P.get("ref"),z=[e("trade.holder_position"),e("assets.trade_history"),e("assets.funding_history"),e("assets.asset_detail")],M=()=>(null==p?void 0:p.totalRealizedPnl)||0,L=()=>{(0,D.$s)(D.H$),p&&2!==p.accountType?p.isActive?k(!p.accountAddress):E():_()},B=()=>{(0,D.$s)(D.nB),p&&2!==p.accountType?p.isActive?C():E():_()},W=e=>{let t=e.index;switch(O(t),t){case 0:(0,D.$s)(D.OY,{tab:"positions"});break;case 1:(0,D.$s)(D.OY,{tab:"trade_history"});break;case 2:(0,D.$s)(D.OY,{tab:"deposits/withdrawals"});break;case 3:(0,D.$s)(D.OY,{tab:"funds_detail"})}};(0,i.useEffect)(()=>{let e;e=0,N&&N.length>0&&N.forEach(t=>{e=Number((0,R.gF)(e,t.unrealizedPnl||0))}),b(e)},[N]),(0,i.useEffect)(()=>{(0,D.$s)(D.eK),window.history.replaceState(null,"",F?"/portfolio?ref=".concat(F):"/portfolio")},[]);let $="light"===t?x.A:m.A;return(0,a.jsx)("div",{className:"flex justify-center w-full h-[calc(100svh-122px)] md:h-[calc(100svh-112px)]",children:p?(0,a.jsxs)("div",{className:"flex flex-col w-full py-0 md:py-4 md:p-2.5 h-full overflow-y-auto md:items-center",children:[!s&&(0,a.jsxs)("div",{className:"flex flex-col w-[1316px] px-4",children:[(0,a.jsx)("div",{className:"flex items-center text-text-dark text-[32px] leading-[38px] font-semibold md:pt-4 rounded-t-xl flex-shrink-0",children:e("assets.my_assets")}),(0,a.jsxs)("div",{className:"flex flex-col justify-between px-8 py-4 mt-4 md:mt-8 border border-border-color md:border-panel-border-color roun
1ded-[12px]",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.estimated_total_value")}),(0,a.jsx)("span",{className:"text-text-dark text-[32px] font-bold mt-1",children:"".concat((0,y.Ix)(u,2,"down",!0)," USD")})]}),!(0,I.Iv)()&&(0,a.jsxs)("div",{className:"flex gap-[9px] h-10 ml-auto",children:[(0,a.jsxs)("div",{className:"flex main-button rounded-lg px-4 py-2 font-medium gap-1.5 items-center justify-center cursor-pointer",onClick:L,children:[(0,a.jsx)(d.A,{className:"text-[#212529]"}),(0,a.jsx)("span",{children:e("home.deposit")})]}),(0,a.jsxs)("div",{className:"flex bg-withdraw-button-color rounded-lg px-4 py-2 font-medium gap-1.5 text-text-dark items-center justify-center cursor-pointer",onClick:B,children:[(0,a.jsx)(h.A,{className:"text-text-dark"}),(0,a.jsx)("span",{children:e("home.withdrawal")})]})]})]}),(0,a.jsx)("div",{className:"w-full h-[1px] border-t border-panel-border-color border-dashed mt-3"}),(0,a.jsxs)("div",{className:"flex mt-3 items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsx)("div",{className:"flex flex-row items-center",children:(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.available_balance")})}),(0,a.jsx)("span",{className:"text-text-dark text-xl font-semibold mt-1",children:"".concat((0,y.Ix)(f,2,"down",!0)," USD")})]}),(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("trade.trial_funds")}),(0,a.jsx)(o.A,{className:"ml-1.5 assets-trial-funds-tip"}),(0,a.jsx)(n.m,{target:".assets-trial-funds-tip",position:"top",content:e("assets.trial_funds_tip"),pt:{root:{className:"w-[200px] -mt-1.5"},arrow:{className:"border-t-white!"}}})]}),(0,a.jsx)("div",{className:"flex items-baseline whitespace-pre-wrap",children:(0,a.jsx)("span",{className:"text-xl font-semibold mt-1 text-text-dark ",children:"".concat((0,y.Ix)((0,I.Aq)(p))," USD")})})]}),(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.total_pnL")}),(0,a.jsx)("div",{className:"flex items-baseline whitespace-pre-wrap",children:(0,a.jsx)("span",{className:"text-xl font-semibold mt-1 ".concat(M()>0?"text-[#2EBD85]":0>M()?"text-[#E43C5A]":"text-text-dark"),children:"".concat((0,y.AV)(M()))})})]}),(0,a.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.total_position_pnl")}),(0,a.jsx)("span",{className:"text-xl font-semibold mt-1 ".concat(g>0?"text-[#2EBD85]":g<0?"text-[#E43C5A]":"text-text-dark"),children:"".concat((0,y.AV)(g))})]})]})]}),(0,a.jsxs)("div",{className:"mt-1 rounded-b-xl flex flex-col h-full overflow-hidden",children:[(0,a.jsx)("div",{className:"sticky top-0 mt-9 bg-main-background",children:(0,a.jsx)(q.A,{tabs:z,value:T,showNum:!1,onChange:W,showTabLine:!1})}),0===T&&(0,a.jsx)(V,{}),1===T&&(0,a.jsx)(H,{}),2===T&&(0,a.jsx)(S,{}),3===T&&(0,a.jsx)(w,{})]})]}),s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col shrink-0 px-4",children:[(0,a.jsx)("div",{className:"bg-block-background rounded-xl p-4 mt-4",children:(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.estimated_total_value")}),(0,a.jsx)("span",{className:"text-text-dark text-2xl font-semibold mt-1",children:"".concat((0,y.tu)(u)," USD")}),(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center mt-4 border-t border-dashed border-panel-border-color pt-4",children:[(0,a.jsx)("div",{className:"flex flex-row items-center",children:(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.available_balance")})}),(0,a.jsx)("span",{className:"text-text-dark text-[14px] font-semibold",children:"".concat((0,y.tu)(f)," USD")})]}),(0,a.jsxs)("div",{className:"flex justify-between items-center mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("trade.trial_funds")}),(0,a.jsx)(o.A,{className:"ml-1.5 assets-trial-funds-tip"}),(0,a.jsx)(n.m,{target:".assets-trial-funds-tip",position:"top",content:e("assets.trial_funds_tip"),pt:{root:{className:"w-[200px] -mt-1.5"},arrow:{className:"border-t-white!"}}})]}),(0,a.jsx)("div",{className:"flex items-baseline whitespace-pre-wrap",children:(0,a.jsx)("span",{className:"text-[14px] font-semibold text-text-dark ",children:"".concat((0,y.tu)((0,I.Aq)(p))," USD")}
1)})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center mt-2",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.total_pnL")}),(0,a.jsx)("div",{className:"flex items-baseline whitespace-pre-wrap",children:(0,a.jsx)("span",{className:"text-[14px] font-medium ".concat(M()>0?"text-[#2EBD85]":0>M()?"text-[#E43C5A]":"text-text-dark"),children:"".concat((0,y.AV)(M()))})})]}),(0,a.jsxs)("div",{className:"flex flex-row justify-between items-center mt-2",children:[(0,a.jsx)("span",{className:"text-[14px] text-text-light",children:e("assets.total_position_pnl")}),(0,a.jsx)("span",{className:"text-[14px] font-medium ".concat(g>0?"text-[#2EBD85]":g<0?"text-[#E43C5A]":"text-text-dark"),children:"".concat((0,y.AV)(g))})]})]})}),!(0,I.Iv)()&&(0,a.jsxs)("div",{className:"w-full flex gap-2.5 mt-4",children:[(0,a.jsxs)("div",{className:"flex-1 flex main-button rounded-lg px-4 py-2  gap-1.5 font-medium items-center justify-center cursor-pointer",onClick:L,children:[(0,a.jsx)(d.A,{className:"text-[#212529]"}),(0,a.jsx)("span",{children:e("home.deposit")})]}),(0,a.jsxs)("div",{className:"flex-1 flex bg-withdraw-button-color rounded-lg px-4 py-2 gap-1.5 text-text-dark font-medium items-center justify-center cursor-pointer",onClick:B,children:[(0,a.jsx)(h.A,{className:"text-text-dark"}),(0,a.jsx)("span",{children:e("home.withdrawal")})]})]})]}),(0,a.jsx)("div",{className:"sticky top-0 mt-8 bg-main-background z-5",children:(0,a.jsx)(q.A,{tabs:z,value:T,showNum:!1,onChange:W})}),0===T&&(0,a.jsx)(V,{}),1===T&&(0,a.jsx)(H,{}),2===T&&(0,a.jsx)(S,{}),3===T&&(0,a.jsx)(w,{})]})]}):(0,a.jsx)("div",{className:"w-full h-full flex items-center justify-center px-4",children:(0,a.jsxs)("div",{className:"w-full max-w-[1316px] h-[250px] md:h-[276px] flex flex-col items-center justify-center rounded-lg px-5",children:[(0,a.jsx)($,{className:"w-[56px] h-auto"}),(0,a.jsx)("span",{className:"mt-4 text-center text-[24px] md:text-[26px] leading-[30px] md:leading-[32px] font-semibold text-text-dark",children:e("assets.connect_wallet_title")}),(0,a.jsx)("span",{className:"mt-4 text-center text-[14px] leading-5 text-text-light",children:e("assets.connect_wallet_description")}),(0,a.jsx)("span",{className:"w-[220px] md:w-[290px] text-center mt-9 whitespace-nowrap main-button rounded-lg text-[16px] leading-5 py-[12px] cursor-pointer font-medium",onClick:()=>{(0,D.$s)(D.QC),_()},children:e("assets.connect_wallet_button")})]})})})}},38767:(e,t,s)=>{s.d(t,{A:()=>n});var a,l=s(20801);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let n=function(e){return l.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none"},e),a||(a=l.createElement("path",{fill:"currentColor",d:"M7.756 5.426a.5.5 0 0 1 .707 0l2.11 2.111a.5.5 0 0 1 0 .707l-4.357 4.358h7.082a.7.7 0 0 1 0 1.4h-8.8L4.477 14H2.5a.5.5 0 0 1-.5-.5v-2.11a.5.5 0 0 1 .146-.354zM11.04 2.143a.5.5 0 0 1 .706 0l2.111 2.11a.5.5 0 0 1 0 .708l-1.646 1.645a.5.5 0 0 1-.707 0L9.393 4.495a.5.5 0 0 1 0-.707z"})))}},40470:(e,t,s)=>{s.d(t,{A:()=>m});var a,l,r,n,i,c,d,o=s(20801);function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let m=function(e){return o.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:52,height:48,fill:"none"},e),a||(a=o.createElement("path",{fill:"#8D8E92",fillOpacity:.6,d:"M22.384 2.381c2.982-1.84 7.038-1.842 10.02 0l9.375 5.788-5.057-.036c-1.41-.01-2.91-.01-4.51-.01h-9.637c-1.6 0-3.1 0-4.51.01l-5.057.036zm9.19 1.166c-2.48-1.53-5.881-1.53-8.36 0l-5.16 3.186c1.417-.01 2.922-.01 4.521-.01h9.637c1.599 0 3.104 0 4.52.01z"})),l||(l=o.createElement("path",{fill:"#8D8E92",fillOpacity:.6,fillRule:"evenodd",d:"M43 24.7a2 2 0 1 1-4 0 2 2 0 0 1 4 0",clipRule:"evenodd"})),r||(r=o.createElement("path",{stroke:"#8D8E92",strokeLinecap:"round",strokeWidth:1.4,d:"M14.086 15.7h9.75"})),n||(n=o.createElement("path",{fill:"#8D8E92",d:"m49 29.9-.002 1.578c-.012 3.453-.107 5.356-.87 6.853a8 8 0 0 1-3.496 3.496c-1.498.763-3.4.858-6.854.87L36.2 42.7H19.247q.266-.68.44-1.4H36.2c2.263 0 3.877 0 5.14-.104 1.248-.102 2.03-.296 2.656-.615a6.6 6.6 0 0 0 2.885-2.885c.318-.625.513-1.408.615-2.655.103-1.264.104-2.877.104-5.14v-.2H49zM37.778 6.7c3.454.012 5.356.107 6.854.87a8 8 0 0 1 3.496 3.496C49 12.78 49 15.02 49 19.5v.2h-1.4v-.2c0-2.263 0-3.877-.104-5.14-.102-1.248-.297-2.03-.615-2.656a6.6 6.6 0 0 0-2.885-2.885c-.625-.318-1.408
1-.513-2.655-.615C40.077 8.1 38.463 8.1 36.2 8.1H16.8c-2.263 0-3.877 0-5.14.103-1.248.102-2.03.297-2.656.615a6.6 6.6 0 0 0-2.885 2.885c-.318.625-.513 1.408-.615 2.655C5.4 15.622 5.4 17.236 5.4 19.5v8.805q-.725.252-1.4.598V19.5c0-4.2 0-6.432.719-8.104l.153-.328A8 8 0 0 1 8.09 7.721l.28-.15c1.71-.872 3.95-.872 8.43-.872H36.2z"})),i||(i=o.createElement("path",{stroke:"#8D8E92",strokeWidth:1.4,d:"M40 19.4h9a2.3 2.3 0 0 1 2.3 2.3v6a2.3 2.3 0 0 1-2.3 2.299h-9a5.3 5.3 0 1 1 0-10.6Z"})),c||(c=o.createElement("circle",{cx:9,cy:38.699,r:8.3,stroke:"#8D8E92",strokeOpacity:.6,strokeWidth:1.4})),d||(d=o.createElement("path",{fill:"#8D8E92",fillOpacity:.6,d:"M8.997 34a.7.7 0 0 1 .7.7v3.298h3.3a.7.7 0 0 1 0 1.4h-3.3V42.7a.7.7 0 0 1-1.4 0v-3.302h-3.3a.7.7 0 0 1 0-1.4h3.3V34.7a.7.7 0 0 1 .7-.7"})))}},75608:(e,t,s)=>{s.d(t,{A:()=>i});var a,l,r=s(20801);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let i=function(e){return r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:14,height:11,fill:"none"},e),a||(a=r.createElement("g",{clipPath:"url(#ic_solana_tx_svg__a)"},r.createElement("path",{fill:"url(#ic_solana_tx_svg__b)",d:"M2.273 8.397a.46.46 0 0 1 .323-.135H13.77a.228.228 0 0 1 .224.274.23.23 0 0 1-.062.117l-2.207 2.213A.46.46 0 0 1 11.4 11H.228a.228.228 0 0 1-.224-.273.23.23 0 0 1 .062-.117z"}),r.createElement("path",{fill:"url(#ic_solana_tx_svg__c)",d:"M2.273.134A.47.47 0 0 1 2.596 0H13.77a.228.228 0 0 1 .224.274.23.23 0 0 1-.062.118l-2.207 2.212a.46.46 0 0 1-.324.135H.228a.228.228 0 0 1-.224-.273.23.23 0 0 1 .062-.118z"}),r.createElement("path",{fill:"url(#ic_solana_tx_svg__d)",d:"M11.725 4.24a.46.46 0 0 0-.324-.135H.23a.23.23 0 0 0-.225.275.23.23 0 0 0 .063.117L2.274 6.71a.46.46 0 0 0 .324.134H13.77a.228.228 0 0 0 .225-.274.23.23 0 0 0-.063-.118z"}))),l||(l=r.createElement("defs",null,r.createElement("linearGradient",{id:"ic_solana_tx_svg__b",x1:12.702,x2:4.938,y1:-1.32,y2:13.511,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#00FFA3"}),r.createElement("stop",{offset:1,stopColor:"#DC1FFF"})),r.createElement("linearGradient",{id:"ic_solana_tx_svg__c",x1:9.321,x2:1.557,y1:-3.091,y2:11.741,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#00FFA3"}),r.createElement("stop",{offset:1,stopColor:"#DC1FFF"})),r.createElement("linearGradient",{id:"ic_solana_tx_svg__d",x1:11.002,x2:3.238,y1:-2.211,y2:12.621,gradientUnits:"userSpaceOnUse"},r.createElement("stop",{stopColor:"#00FFA3"}),r.createElement("stop",{offset:1,stopColor:"#DC1FFF"})),r.createElement("clipPath",{id:"ic_solana_tx_svg__a"},r.createElement("path",{fill:"#fff",d:"M0 0h14v11H0z"})))))}},78192:(e,t,s)=>{s.d(t,{T:()=>r});var a=s(70140),l=s(34733);async function r(e,t,s,r){var n;let i=t;if(!i)try{let e=await (0,a.ir)();i=(null==e?void 0:e.inviteCode)||""}catch(e){return null}if(!i)return null;let c=e.returnRate?"".concat((Number.parseFloat(e.returnRate)>0?"+":"")+e.returnRate,"%"):"".concat((e.realizedPnl>0?"+":"")+(0,l.Ix)(e.margin>0?e.realizedPnl/e.margin*100:0,2,"up"),"%"),d=new Date,o=d.getUTCFullYear(),x=String(d.getUTCMonth()+1).padStart(2,"0"),m=String(d.getUTCDate()).padStart(2,"0"),h=String(d.getUTCHours()).padStart(2,"0"),p=String(d.getUTCMinutes()).padStart(2,"0"),u=String(d.getUTCSeconds()).padStart(2,"0"),f="".concat(o,"/").concat(x,"/").concat(m," (UTC+0)").concat(h,":").concat(p,":").concat(u);return{referralCode:i,symbol:e.symbol,side:null==(n=e.positionSide)?void 0:n.toUpperCase(),leverage:e.leverage,profitPercent:c,profitAmount:"".concat(e.realizedPnl>0?"+":"").concat((0,l.Ix)(e.realizedPnl,2,"up")," USD"),entryPrice:"".concat((0,l.tu)(e.entryPrice,e.pricePrecision||2)," USD"),closePrice:"".concat((0,l.tu)(e.price,e.pricePrecision||2)," USD"),displayName:(null==r?void 0:r.accountAddress)?(0,l.UQ)(r.accountAddress):"Anonymous",time:f,isOpenPosition:!1}}},78937:(e,t,s)=>{s.d(t,{A:()=>m});var a,l,r,n,i,c,d,o=s(20801);function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let m=function(e){return o.createElement("svg",x({xmlns:"http://www.w3.org/2000/svg",width:52,height:48,fill:"none"},e),a||(a=o.createElement("path",{fill:"#6C757D",fillOpacity:.6,d:"M22.384 2.381c2.982-1.84 7.038-1.842 10.02 0l9.375 5.788-5.057-.036c-1.41-.01-2.91-.01-4.51-.01h-9.637c-1.6 0-3.1 0-4.51.01l-5.057.036zm9.19 1.166c-2.48-1.53-5.881-1.53-8.36 0l-5.16 3.186c1.417-.01 2.922-.01 4.521-.01h9.637c1.599 0 3.104 0 4.52.01z"})),l||(l=o.createElement("path",{fill:"#6C757D",fillOpacity:.6,fillRule:"evenodd",d:"M43 24.7a2 2 0 1 1-4 0 2 2 
10 0 1 4 0",clipRule:"evenodd"})),r||(r=o.createElement("path",{stroke:"#6C757D",strokeLinecap:"round",strokeWidth:1.4,d:"M14.086 15.7h9.75"})),n||(n=o.createElement("path",{fill:"#6C757D",d:"m49 29.9-.002 1.578c-.012 3.453-.107 5.356-.87 6.853a8 8 0 0 1-3.496 3.496c-1.498.763-3.4.858-6.854.87L36.2 42.7H19.247q.266-.68.44-1.4H36.2c2.263 0 3.877 0 5.14-.104 1.248-.102 2.03-.296 2.656-.615a6.6 6.6 0 0 0 2.885-2.885c.318-.625.513-1.408.615-2.655.103-1.264.104-2.877.104-5.14v-.2H49zM37.778 6.7c3.454.012 5.356.107 6.854.87a8 8 0 0 1 3.496 3.496C49 12.78 49 15.02 49 19.5v.2h-1.4v-.2c0-2.263 0-3.877-.104-5.14-.102-1.248-.297-2.03-.615-2.656a6.6 6.6 0 0 0-2.885-2.885c-.625-.318-1.408-.513-2.655-.615C40.077 8.1 38.463 8.1 36.2 8.1H16.8c-2.263 0-3.877 0-5.14.103-1.248.102-2.03.297-2.656.615a6.6 6.6 0 0 0-2.885 2.885c-.318.625-.513 1.408-.615 2.655C5.4 15.622 5.4 17.236 5.4 19.5v8.805q-.725.252-1.4.598V19.5c0-4.2 0-6.432.719-8.104l.153-.328A8 8 0 0 1 8.09 7.721l.28-.15c1.71-.872 3.95-.872 8.43-.872H36.2z"})),i||(i=o.createElement("path",{stroke:"#6C757D",strokeWidth:1.4,d:"M40 19.4h9a2.3 2.3 0 0 1 2.3 2.3v6a2.3 2.3 0 0 1-2.3 2.299h-9a5.3 5.3 0 1 1 0-10.6Z"})),c||(c=o.createElement("circle",{cx:9,cy:38.699,r:8.3,stroke:"#6C757D",strokeOpacity:.6,strokeWidth:1.4})),d||(d=o.createElement("path",{fill:"#6C757D",fillOpacity:.6,d:"M8.997 34a.7.7 0 0 1 .7.7v3.298h3.3a.7.7 0 0 1 0 1.4h-3.3V42.7a.7.7 0 0 1-1.4 0v-3.302h-3.3a.7.7 0 0 1 0-1.4h3.3V34.7a.7.7 0 0 1 .7-.7"})))}},85246:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(80069);s(20801);var l=s(66926);let r=e=>{let{num:t,className:s}=e,{t:r}=(0,l.Bd)();return(0,a.jsx)("div",{className:"".concat(s),children:"".concat(r(t>1?"assets.total_data_num":"assets.total_data_num1",{num:t}))})}},93857:(e,t,s)=>{s.d(t,{A:()=>n});var a,l=s(20801);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let n=function(e){return l.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none"},e),a||(a=l.createElement("path",{fill:"currentColor",d:"M12.247 12.249a.583.583 0 1 1 0 1.166h-10.5a.583.583 0 0 1 0-1.166zM7.01.583h.03a1 1 0 0 1 .084.013L7.14.6a.6.6 0 0 1 .27.153l4.083 4.083a.583.583 0 1 1-.825.825L7.581 2.574v7.341a.583.583 0 0 1-1.167 0V2.574L3.327 5.66a.583.583 0 1 1-.825-.825L6.585.753A.6.6 0 0 1 6.706.66l.026-.014a.6.6 0 0 1 .115-.044l.03-.007.018-.004a1 1 0 0 1 .09-.008l.012-.001z"})))}},96197:(e,t,s)=>{s.d(t,{A:()=>n});var a,l=s(20801);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e}).apply(null,arguments)}let n=function(e){return l.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",width:14,height:14,fill:"none"},e),a||(a=l.createElement("path",{fill:"currentColor",d:"M12.247 12.249a.583.583 0 1 1 0 1.166h-10.5a.583.583 0 0 1 0-1.166zM6.997.582c.323 0 .584.261.584.583v7.342l3.087-3.087a.583.583 0 1 1 .825.824L7.41 10.328a.6.6 0 0 1-.242.145l-.036.01q-.01 0-.02.004l-.018.003a.6.6 0 0 1-.193 0l-.019-.003-.02-.005q-.018-.004-.035-.009a.6.6 0 0 1-.242-.145L2.502 6.244a.583.583 0 1 1 .825-.824l3.087 3.087V1.165c0-.322.261-.583.583-.583"})))}}}]);

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.