@backtest-kit/ui 5.6.2 → 5.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/build/index.cjs +1036 -134
  2. package/build/index.mjs +1037 -135
  3. package/build/modules/frontend/build/3rdparty/ace_1.4.12/ace.js +21338 -0
  4. package/build/modules/frontend/build/3rdparty/ace_1.4.12/mode-javascript.js +798 -0
  5. package/build/modules/frontend/build/3rdparty/ace_1.4.12/theme-chrome.js +138 -0
  6. package/build/modules/frontend/build/3rdparty/ace_1.4.12/theme-twilight.js +116 -0
  7. package/build/modules/frontend/build/3rdparty/ace_1.4.12/worker-javascript.js +15012 -0
  8. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-100.woff +0 -0
  9. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-100.woff2 +0 -0
  10. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-100italic.woff +0 -0
  11. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-100italic.woff2 +0 -0
  12. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-300.woff +0 -0
  13. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-300.woff2 +0 -0
  14. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-300italic.woff +0 -0
  15. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-300italic.woff2 +0 -0
  16. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-400.woff +0 -0
  17. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-400.woff2 +0 -0
  18. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-400italic.woff +0 -0
  19. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-400italic.woff2 +0 -0
  20. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-500.woff +0 -0
  21. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-500.woff2 +0 -0
  22. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-500italic.woff +0 -0
  23. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-500italic.woff2 +0 -0
  24. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-700.woff +0 -0
  25. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-700.woff2 +0 -0
  26. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-700italic.woff +0 -0
  27. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-700italic.woff2 +0 -0
  28. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-900.woff +0 -0
  29. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-900.woff2 +0 -0
  30. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-900italic.woff +0 -0
  31. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/files/roboto-latin-900italic.woff2 +0 -0
  32. package/build/modules/frontend/build/3rdparty/typeface-roboto_0.0.75/typeface-roboto.css +156 -0
  33. package/build/modules/frontend/build/assets/Article-DwCWbgig.js +1 -0
  34. package/build/modules/frontend/build/assets/{Background-B8kVLoJC.js → Background-BUWczIMa.js} +1 -1
  35. package/build/modules/frontend/build/assets/Container-DgcBaXwp.js +1 -0
  36. package/build/modules/frontend/build/assets/IconPhoto-Dg1OJT1g.js +1 -0
  37. package/build/modules/frontend/build/assets/{KeyboardArrowLeft-NcptneCW.js → KeyboardArrowLeft-DqH7VCRG.js} +1 -1
  38. package/build/modules/frontend/build/assets/Refresh-ASwi3YWH.js +1 -0
  39. package/build/modules/frontend/build/assets/emitters-EUI31qkt.js +1 -0
  40. package/build/modules/frontend/build/assets/hasRouteMatch-B_-PodjM.js +1 -0
  41. package/build/modules/frontend/build/assets/html2canvas-D67h2MXz.js +1 -0
  42. package/build/modules/frontend/build/assets/index-BXhzoqHB.js +17 -0
  43. package/build/modules/frontend/build/assets/index-BbMctGny.js +1 -0
  44. package/build/modules/frontend/build/assets/index-BjGW-SeZ.js +1560 -0
  45. package/build/modules/frontend/build/assets/index-CGTWcCfJ.js +1 -0
  46. package/build/modules/frontend/build/assets/index-CQbPy5z-.js +1 -0
  47. package/build/modules/frontend/build/assets/index-CYVGtlJR.js +1 -0
  48. package/build/modules/frontend/build/assets/index-CxqvOyvF.js +1 -0
  49. package/build/modules/frontend/build/assets/index-DoQ6TdNT.js +1 -0
  50. package/build/modules/frontend/build/assets/index-Dxunm9la.js +1 -0
  51. package/build/modules/frontend/build/assets/index-lFLkJBoZ.js +1 -0
  52. package/build/modules/frontend/build/assets/index-nAktdNIS.js +1 -0
  53. package/build/modules/frontend/build/assets/{index.es-BkDLGtAB.js → index.es-_Mw9_y9J.js} +2 -2
  54. package/build/modules/frontend/build/assets/markdownit-DnsUyAuX.js +1 -0
  55. package/build/modules/frontend/build/index.html +8 -2
  56. package/package.json +3 -3
  57. package/types.d.ts +80 -1
  58. package/build/modules/frontend/build/assets/IconPhoto-yqTcSjsj.js +0 -1
  59. package/build/modules/frontend/build/assets/Refresh-B-6VzYmL.js +0 -1
  60. package/build/modules/frontend/build/assets/hasRouteMatch-Cap76DHx.js +0 -1
  61. package/build/modules/frontend/build/assets/html2canvas-AeHV6o40.js +0 -1
  62. package/build/modules/frontend/build/assets/index-3FabZvCh.js +0 -1
  63. package/build/modules/frontend/build/assets/index-BSt5rIe0.js +0 -231
  64. package/build/modules/frontend/build/assets/index-BfdHWVzz.js +0 -1331
  65. package/build/modules/frontend/build/assets/index-BjR0gQPx.js +0 -1
  66. package/build/modules/frontend/build/assets/index-Bov2Mvu5.js +0 -1
  67. package/build/modules/frontend/build/assets/index-DTb7GKw2.js +0 -1
  68. package/build/modules/frontend/build/assets/index-eGg7QpVp.js +0 -1
  69. package/build/modules/frontend/build/assets/index-mEY60b54.js +0 -1
  70. package/build/modules/frontend/build/assets/markdownit-_uLqTUbF.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,f as a,P as i,B as r,S as n,a8 as t,T as s,G as l,C as c,_ as o,F as d,a9 as p,aa as m,ab as u,ac as b,ad as v,ae as g,af as y,a6 as h,ag as k,ah as $,ai as f,aj as x,ak as S,al as _,am as C,i as P,a1 as w,j as L,a2 as A,q as z,Z as O,an as j,ao as E,I as F}from"./index-BSt5rIe0.js";import{C as T,R as B}from"./Refresh-B-6VzYmL.js";import{K as R}from"./KeyboardArrowLeft-NcptneCW.js";const D=e=>{const i={color:"white",fontSize:28};switch(e.type){case"signal.opened":case"partial_profit.available":case"partial_profit.commit":return a(_,{sx:i});case"signal.closed":case"signal_sync.close":case"close_pending.commit":return a(h,{sx:i});case"signal.scheduled":return a(C,{sx:i});case"signal.cancelled":case"cancel_scheduled.commit":return a(k,{sx:i});case"partial_loss.available":case"partial_loss.commit":case"average_buy.commit":return a(x,{sx:i});case"breakeven.available":case"breakeven.commit":return a(S,{sx:i});case"activate_scheduled.commit":case"signal_sync.open":return a($,{sx:i});case"trailing_stop.commit":case"trailing_take.commit":return a(f,{sx:i});case"risk.rejection":return a(y,{sx:i});case"error.info":case"error.validation":return a(g,{sx:i});case"error.critical":return a(v,{sx:i});default:return a(b,{sx:i})}},U=e=>{switch(e.type){case"signal.opened":return`${o("Opened")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.closed":return`${o("Closed")} ${e.symbol} (${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%)`;case"signal.scheduled":return`${o("Scheduled")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.cancelled":return`${o("Cancelled")} ${e.symbol}`;case"partial_profit.available":return`${o("Partial profit")} ${e.level}% ${e.symbol}`;case"partial_profit.commit":return`${o("Profit fixed")} ${e.percentToClose}% ${e.symbol}`;case"partial_loss.available":return`${o("Partial loss")} ${e.level}% ${e.symbol}`;case"partial_loss.commit":return`${o("Loss fixed")} ${e.percentToClose}% ${e.symbol}`;case"breakeven.available":return`${o("Breakeven available")} ${e.symbol}`;case"breakeven.commit":return`${o("Breakeven set")} ${e.symbol}`;case"activate_scheduled.commit":return`${o("Activated")} ${e.position.toUpperCase()} ${e.symbol}`;case"average_buy.commit":return`${o("Average Buy")} ${e.symbol}`;case"trailing_stop.commit":return`${o("Trailing stop")} ${e.symbol}`;case"trailing_take.commit":return`${o("Trailing take")} ${e.symbol}`;case"signal_sync.open":return`${o("Sync Open")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal_sync.close":return`${o("Sync Close")} ${e.symbol} (${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%)`;case"cancel_scheduled.commit":return`${o("Cancel Scheduled")} ${e.symbol}`;case"close_pending.commit":return`${o("Close Pending")} ${e.symbol}`;case"risk.rejection":return`${o("Rejected")} ${e.position.toUpperCase()} ${e.symbol}`;case"error.info":return`${o("Error")}: ${e.message}`;case"error.validation":return`${o("Validation")}: ${e.message}`;case"error.critical":return`${o("Critical")}: ${e.message}`;default:return o("Unknown")}},W=e=>{switch(e.type){case"signal.opened":return o("Signal Opened");case"signal.closed":return o("Signal Closed");case"signal.scheduled":return o("Signal Scheduled");case"signal.cancelled":return o("Signal Cancelled");case"partial_profit.available":return o("Partial Profit Available");case"partial_profit.commit":return o("Partial Profit Commit");case"partial_loss.available":return o("Partial Loss Available");case"partial_loss.commit":return o("Partial Loss Commit");case"breakeven.available":return o("Breakeven Available");case"breakeven.commit":return o("Breakeven Commit");case"activate_scheduled.commit":return o("Activated Scheduled");case"average_buy.commit":return o("Average Buy");case"trailing_stop.commit":return o("Trailing Stop");case"trailing_take.commit":return o("Trailing Take");case"signal_sync.open":return o("Signal Sync Open");case"signal_sync.close":return o("Signal Sync Close");case"cancel_scheduled.commit":return o("Cancel Scheduled");case"close_pending.commit":return o("Close Pending");case"risk.rejection":return o("Risk Rejection");case"error.info":return o("Info Error");case"error.validation":return o("Validation Error");case"error.critical":return o("Critical Error");default:return o("Unknown")}},I=e=>"symbol"in e,M=e=>"position"in e,N=e=>"priceOpen"in e&&"priceTakeProfit"in e&&"priceStopLoss"in e,Y=e=>"pnlPercentage"in e,H=e=>"level"in e,V=e=>"percentToClose"in e,q=e=>"currentPrice"in e,K=e=>"duration"in e,G=e=>"closeReason"in e,Z=e=>"cancelReason"in e,J=e=>"priceClose"in e,Q=e=>"percentShift"in e,X=e=>"note"in e&&!!e.note,ee=e=>"message"in e,ae=e=>"rejectionNote"in e,ie=e=>"activePositionCount"in e,re=e=>"effectivePriceOpen"in e,ne=e=>"totalEntries"in e&&e.totalEntries>1,te=e=>"originalPriceOpen"in e&&"priceOpen"in e&&e.originalPriceOpen!==e.priceOpen,se=e=>"totalPartials"in e&&e.totalPartials>0,le=e=>"cost"in e,ce=e=>"pnlPriceOpen"in e&&"pnlPriceClose"in e&&"pnlCost"in e&&"pnlEntries"in e,oe=e.forwardRef(({item:e,className:b,style:v,sx:g},y)=>{const h=(e=>{switch(e.type){case"signal.opened":case"activate_scheduled.commit":case"signal_sync.open":return"#4CAF50";case"signal.closed":case"signal_sync.close":return"#2196F3";case"signal.scheduled":case"average_buy.commit":case"error.info":case"error.validation":return"#FF9800";case"signal.cancelled":case"cancel_scheduled.commit":default:return"#9E9E9E";case"partial_profit.available":case"partial_profit.commit":return"#8BC34A";case"partial_loss.available":case"partial_loss.commit":return"#FF5722";case"breakeven.available":case"breakeven.commit":return"#00BCD4";case"trailing_stop.commit":case"trailing_take.commit":return"#673AB7";case"close_pending.commit":return"#607D8B";case"risk.rejection":return"#F44336";case"error.critical":return"#D32F2F"}})(e),k=(e=>"timestamp"in e)(e)?e.timestamp:Date.now();return a("div",{className:b,style:v,ref:y,children:a(i,{variant:"outlined",onClick:()=>(e=>{switch(e.type){case"risk.rejection":P.layoutService.pickRisk(e.id);break;case"signal.opened":P.layoutService.pickSignalOpened(e.id);break;case"signal.closed":P.layoutService.pickSignalClosed(e.id);break;case"signal.scheduled":P.layoutService.pickSignalScheduled(e.id);break;case"signal.cancelled":P.layoutService.pickSignalCancelled(e.id);break;case"partial_profit.available":P.layoutService.pickPartialProfitAvailable(e.id);break;case"partial_profit.commit":P.layoutService.pickPartialProfitCommit(e.id);break;case"partial_loss.available":P.layoutService.pickPartialLossAvailable(e.id);break;case"partial_loss.commit":P.layoutService.pickPartialLossCommit(e.id);break;case"breakeven.available":P.layoutService.pickBreakevenAvailable(e.id);break;case"breakeven.commit":P.layoutService.pickBreakevenCommit(e.id);break;case"trailing_stop.commit":P.layoutService.pickTrailingStop(e.id);break;case"trailing_take.commit":P.layoutService.pickTrailingTake(e.id);break;case"activate_scheduled.commit":P.layoutService.pickActivateScheduled(e.id);break;case"average_buy.commit":P.layoutService.pickAverageBuyCommit(e.id);break;case"signal_sync.open":P.layoutService.pickSignalSyncOpen(e.id);break;case"signal_sync.close":P.layoutService.pickSignalSyncClose(e.id);break;case"cancel_scheduled.commit":P.layoutService.pickCancelScheduled(e.id);break;case"close_pending.commit":P.layoutService.pickClosePending(e.id)}})(e),sx:{transition:"box-shadow 0.2s ease",cursor:"pointer",display:"flex",alignItems:"stretch",justifyContent:"stretch","&:hover":{boxShadow:4},...g},children:a(r,{sx:{flex:1,position:"relative",overflow:"hidden",height:"100%",width:"100%",borderRadius:"12px"},children:[a(n,{direction:"row",spacing:2,sx:{p:2},children:[a(t,{sx:{width:56,height:56,background:h},children:D(e)}),a(n,{flex:1,spacing:1,children:[a(n,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[a(s,{variant:"h6",sx:{fontWeight:600},children:U(e)}),a(s,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap",ml:2},children:l(k).format("HH:mm DD/MM/YYYY")})]}),a(n,{direction:"row",spacing:1,flexWrap:"wrap",children:[a(c,{size:"small",label:W(e),sx:{background:h,color:"white",fontWeight:500}}),I(e)&&a(c,{size:"small",label:e.symbol,variant:"outlined"}),M(e)&&a(c,{size:"small",label:e.position.toUpperCase(),variant:"outlined",color:"long"===e.position?"success":"error"}),Y(e)&&a(c,{size:"small",label:`PnL: ${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`,color:e.pnlPercentage>=0?"success":"error",variant:"outlined"}),H(e)&&a(c,{size:"small",label:`${o("Level")}: ${e.level}%`,variant:"outlined"}),V(e)&&a(c,{size:"small",label:`${o("Close")}: ${e.percentToClose}%`,variant:"outlined"}),K(e)&&a(c,{size:"small",label:`${o("Duration")}: ${e.duration} ${o("min")}`,variant:"outlined"}),G(e)&&a(c,{size:"small",label:e.closeReason,variant:"outlined",color:"info"}),Z(e)&&a(c,{size:"small",label:e.cancelReason,variant:"outlined",color:"info"}),Q(e)&&a(c,{size:"small",label:`${o("Shift")}: ${e.percentShift>0?"+":""}${e.percentShift}%`,variant:"outlined"}),ie(e)&&a(c,{size:"small",label:`${o("Active")}: ${e.activePositionCount}`,variant:"outlined"}),ne(e)&&a(c,{size:"small",label:`${o("Entries")}: ${e.totalEntries}`,variant:"outlined"}),se(e)&&a(c,{size:"small",label:`${o("Partials")}: ${e.totalPartials}`,variant:"outlined"}),le(e)&&a(c,{size:"small",label:`${o("Cost")}: ${e.cost.toFixed(2)}$`,variant:"outlined"}),re(e)&&a(c,{size:"small",label:`${o("Avg entry")}: ${e.effectivePriceOpen}`,variant:"outlined",color:"warning"}),te(e)&&a(c,{size:"small",label:`${o("Orig entry")}: ${e.originalPriceOpen}`,variant:"outlined"})]}),N(e)&&a(d,{children:[a(p,{sx:{my:1}}),a(n,{direction:"row",spacing:3,flexWrap:"wrap",children:[a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("Entry"),":"," "]}),e.priceOpen]}),J(e)&&a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("Close"),":"," "]}),e.priceClose]}),q(e)&&a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("Current"),":"," "]}),e.currentPrice]}),a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("Take Profit"),":"," "]}),e.priceTakeProfit]}),a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("Stop Loss"),":"," "]}),e.priceStopLoss]})]})]}),ce(e)&&a(d,{children:[a(p,{sx:{my:1}}),a(n,{direction:"row",spacing:3,flexWrap:"wrap",children:[a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("PnL Entry"),":"," "]}),e.pnlPriceOpen]}),a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("PnL Exit"),":"," "]}),e.pnlPriceClose]}),a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("PnL"),":"," "]}),a(s,{component:"span",color:e.pnlCost>=0?"success.main":"error.main",children:[e.pnlCost>=0?"+":"",e.pnlCost.toFixed(2),"$"]})]}),a(s,{variant:"body2",children:[a(s,{component:"span",color:"text.secondary",children:[o("Invested"),":"," "]}),e.pnlEntries.toFixed(2),"$"]})]})]})]})]}),X(e)&&a(r,{sx:{px:2,pb:2},children:[a(p,{sx:{mb:1.5}}),a(r,{component:"pre",sx:{m:0,whiteSpace:"pre-wrap",wordWrap:"break-word"},children:a(m,{style:{textWrap:"wrap"},config:u,handler:()=>e.note})})]}),ae(e)&&a(r,{sx:{px:2,pb:2},children:[a(p,{sx:{mb:1.5}}),a(s,{variant:"body2",color:"error",children:e.rejectionNote})]}),ee(e)&&!X(e)&&a(r,{sx:{px:2,pb:2},children:[a(p,{sx:{mb:1.5}}),a(s,{variant:"body2",color:"text.secondary",children:e.message})]}),a(r,{sx:{position:"absolute",top:0,left:0,bottom:0,width:6,zIndex:1,background:h}})]})})})}),de=[{action:"update-now",label:"Refresh manually",icon:()=>a(F,{icon:B,color:"#4caf50"})}],pe=[{type:O.Link,action:"back-action",label:a(R,{sx:{display:"block"}})},{type:O.Link,action:"back-action",label:"Main"},{type:O.Link,action:"back-action",label:"Notifications"}],me=new L,ue=()=>{const{data:e,hasMore:i,loading:r,onSkip:n}=w({handler:async(e,a)=>{const i=await P.notificationViewService.getList(),r=A(e,a);for(const n of i)if(r([n]).done)break;return r().rows},onLoadStart:()=>P.layoutService.setAppbarLoader(!0),onLoadEnd:()=>P.layoutService.setAppbarLoader(!1),reloadSubject:me});return a(T,{children:[a(z,{items:pe,actions:de,onAction:async e=>{"back-action"===e&&P.routerService.push("/"),"update-now"===e&&await me.next()}}),a(j,{sx:{height:"calc(100vh - 155px)"},withScrollbar:!0,minHeight:72,loading:r,onDataRequest:n,bufferSize:E,hasMore:i,children:e.map(e=>a(oe,{item:e,sx:{mb:1}},e.id))})]})};export{ue as NotificationPage,ue as default};
@@ -1 +0,0 @@
1
- import{ar as a,n as t,i as e,f as o,q as s,Z as i,m as n,M as r,I as l,T as c,as as d,b as p,B as u,F as m,C as b,e as h,S as y,a as g,d as S,l as v,g as f,h as L,at as w,au as k,X as x,j as A,D as C,av as N,aw as j}from"./index-BSt5rIe0.js";import{h as R}from"./hasRouteMatch-Cap76DHx.js";import{I as $}from"./IconPhoto-yqTcSjsj.js";import{C as F,R as M}from"./Refresh-B-6VzYmL.js";import{K as B}from"./KeyboardArrowLeft-NcptneCW.js";import{B as E}from"./Background-B8kVLoJC.js";const H="trade-gpt__groupHeader",_="trade-gpt__groupRoot",G="trade-gpt__symbolImage",I=n()({root:{[`& .${_}:hover .${H}`]:{opacity:"1 !important"}}});function V(a){return L(a,"#000000")>L(a,"#FFFFFF")}const O=[{type:i.Link,action:"back-action",label:o(B,{sx:{display:"block"}})},{type:i.Link,action:"back-action",label:"Main"},{type:i.Link,action:"back-action",label:"Status"}],z=[{action:"update-now",label:"Refresh",icon:()=>o(l,{icon:M,color:"#4caf50"})}],D=(a,t)=>({type:r.Group,className:_,sx:{p:2},tabletColumns:"12",desktopColumns:"3",fields:[{type:r.Component,className:H,style:{transition:"opacity 500ms",opacity:.5},element:()=>o(y,{direction:"row",children:[o(b,{variant:"outlined",size:"small",color:"info",label:`${h.bullet} ${a}`,sx:{mb:1,pr:.5,fontSize:"14px",background:"white",cursor:"not-allowed"}}),o(u,{flex:1})]})},{type:r.Group,fields:t.map(({symbol:a,label:t,to:s,color:i})=>((a,t,s,i)=>({type:r.Component,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>o(f,{component:g,onClick:()=>{e.routerService.push(`/status/${t}`)},sx:{width:"100%",background:i,color:"white",fontWeight:"bold",fontSize:"14px",height:"75px",minHeight:"75px",textWrap:"wrap",padding:"16px",[`& .${G}`]:{transition:"filter 500ms"},"&:hover":{background:()=>V(i)?S(i,.33):v(i,.33),[`& .${G}`]:{transition:"filter 500ms",filter:V(i)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:o($,{className:G,symbol:a}),children:s})}))(a,s,t,i))}]}),U=[{type:i.Link,action:"back-action",label:o(B,{sx:{display:"block"}})},{type:i.Link,action:"back-action",label:"Main"},{type:i.Link,action:"back-action",label:"Status"},{type:i.Link,action:"back-action",compute:a=>a?`${String(a.symbol).toUpperCase()} (${a.strategyName})`:"Live"}],K=[{action:"download-action",label:"Download",icon:()=>o(l,{icon:C,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>o(l,{icon:M,color:"#4caf50"})}],P=new A,T=[{id:"status",element:({params:a})=>{const[i]=t(async()=>{const t=await e.statusViewService.getStatusMap();return w.get(t,a.id,null)},{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[a.id]}),[n,{loading:r,execute:l}]=t(async()=>await e.statusViewService.getStatusOne(a.id),{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[a.id]}),b=k(async()=>{if(!n)return;const a=new Blob([JSON.stringify(n,null,2)],{type:"application/json"}),t=URL.createObjectURL(a);e.layoutService.downloadFile(t,`status_${Date.now()}.json`)});x(()=>P.subscribe(l));return o(F,{children:[o(s,{items:U,actions:K,payload:i,onAction:async a=>{"back-action"===a&&((async()=>{1!==(await e.statusViewService.getStatusList()).length?e.routerService.push("/status"):e.routerService.push("/")})(),e.routerService.push("/")),"update-now"===a&&await P.next(),"download-action"===a&&await b()}}),r?o(d,{children:o(c,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):n?o(m,{children:[o(p,{handler:n,fields:N}),o(u,{paddingBottom:"24px"})]}):o(d,{children:o(c,{variant:"h6",sx:{opacity:.5},children:"No pending signal"})}),o(E,{})]})},isActive:a=>R(["/status/:id"],a),isAvailable:()=>!1},{id:"main",element:()=>{const{classes:i}=I(),{reloadTrigger:n,doReload:l}=a();t(async()=>{const a=await e.statusViewService.getStatusList();if(1===a.length){const[{id:t}]=a;e.routerService.push(`/status/${t}`)}},{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[n]});const[b,{loading:h}]=t(async()=>await(async()=>{const[a,t]=await Promise.all([e.symbolGlobalService.getSymbolMap(),e.statusViewService.getStatusList()]),o={};t.forEach(t=>{const e=a[t.symbol],s=t.strategyName;o[s]||(o[s]=[]),o[s].push({symbol:t.symbol,label:(null==e?void 0:e.displayName)||t.symbol,color:(null==e?void 0:e.color)||"#ccc",to:t.id})});const s=Object.entries(o).sort(([,a],[,t])=>t.length-a.length),i=[],n=[],l=[];return s.forEach(([a,t],e)=>{const o=D(a,t);e%2==0?i.push(o):n.push(o),l.push(o)}),[{type:r.Group,columns:"6",className:"tabletLeftColumn",phoneHidden:!0,desktopHidden:!0,fields:i},{type:r.Group,columns:"6",className:"tabletRightColumn",phoneHidden:!0,desktopHidden:!0,fields:n},{type:r.Group,columns:"12",className:"wideColumn",tabletHidden:!0,fields:l}]})(),{onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),deps:[n]});return o(F,{children:[o(s,{items:O,actions:z,onAction:a=>{"back-action"===a&&e.routerService.push("/"),"update-now"===a&&l()}}),h||!b?o(d,{children:o(c,{variant:"h6",sx:{opacity:.5},children:"Loading..."})}):b.length?o(m,{children:[o(p,{className:i.root,fields:b},n),o(u,{paddingBottom:"24px"})]}):o(d,{children:o(c,{variant:"h6",sx:{opacity:.5},children:"No pending signals"})})]})},isActive:a=>R(["/status"],a),isAvailable:()=>!1}],W=({id:a})=>o(j,{history:e.routerService,onLoadStart:()=>e.layoutService.setAppbarLoader(!0),onLoadEnd:()=>e.layoutService.setAppbarLoader(!1),routes:T,params:{id:a}});export{W as StatusPage,W as default};
@@ -1 +0,0 @@
1
- import{c as a,f as e,an as t,B as o,S as r,a8 as n,T as i,G as c,C as s,F as l,a9 as d,P as h,ac as p,ap as u,aq as w,a1 as b,j as v,i as f,a2 as x,z as g,a7 as y,q as m,Z as S,ao as L,D as k,I as z}from"./index-BSt5rIe0.js";import{C as H,R as j}from"./Refresh-B-6VzYmL.js";import{K as C}from"./KeyboardArrowLeft-NcptneCW.js";const A=a(e("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"}),"Article"),R=a(e("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"}),"BugReport"),M=a(e("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),B=a=>{const t={color:"white",fontSize:28};switch(a.type){case"debug":return e(R,{sx:t});case"info":return e(u,{sx:t});case"warn":return e(p,{sx:t});default:return e(A,{sx:t})}},D=t.virtualize(({data:a,sx:t})=>{const p=(a=>{switch(a.type){case"debug":default:return"#9E9E9E";case"info":return"#2196F3";case"warn":return"#FF9800";case"log":return"#4CAF50"}})(a);return e(h,{variant:"outlined",sx:{display:"flex",alignItems:"stretch",justifyContent:"stretch",...t},children:e(o,{sx:{flex:1,position:"relative",overflow:"hidden",height:"100%",width:"100%",borderRadius:"12px"},children:[e(r,{direction:"row",spacing:2,sx:{p:2},children:[e(n,{sx:{width:56,height:56,background:p},children:B(a)}),e(r,{flex:1,spacing:1,children:[e(r,{direction:"row",justifyContent:"space-between",alignItems:"flex-start",children:[e(i,{variant:"h6",sx:{fontWeight:600,wordBreak:"break-all"},children:a.topic}),e(i,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"nowrap",ml:2},children:c(a.createdAt).format("HH:mm DD/MM/YYYY")})]}),e(r,{direction:"row",spacing:1,flexWrap:"wrap",children:e(s,{size:"small",label:a.type.toUpperCase(),sx:{background:p,color:"white",fontWeight:500}})}),a.args.length>0&&e(l,{children:[e(d,{sx:{my:1}}),e(o,{component:"pre",sx:{m:0,fontSize:"0.75rem",whiteSpace:"pre-wrap",wordBreak:"break-all",color:"text.secondary"},children:JSON.stringify(1===a.args.length?a.args[0]:a.args,null,2)})]})]})]}),e(o,{sx:{position:"absolute",top:0,left:0,bottom:0,width:6,zIndex:1,background:p}})]})})}),E=[{action:"download-action",label:"Download",icon:()=>e(z,{icon:k,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh manually",icon:()=>e(z,{icon:j,color:"#4caf50"})}],F=[{type:S.Link,action:"back-action",label:e(C,{sx:{display:"block"}})},{type:S.Link,action:"back-action",label:"Main"},{type:S.Link,action:"back-action",label:"Logs"},{type:S.Button,icon:M,action:"search-action",label:"Search"}],I=new v,V=()=>{const[a,o]=w(""),{data:r,hasMore:n,loading:i,onSkip:c}=b({handler:async(e,t)=>{const o=await f.logViewService.getList(),r=x(e,t);for(const n of o)if(new RegExp(a.current,"i").test(n.topic)&&r([n]).done)break;return r().rows},onLoadStart:()=>f.layoutService.setAppbarLoader(!0),onLoadEnd:()=>f.layoutService.setAppbarLoader(!1),reloadSubject:I}),s=g(r),{execute:l}=y(async()=>{const a=new Blob([JSON.stringify(s.current,null,2)],{type:"application/json"}),e=URL.createObjectURL(a);f.layoutService.downloadFile(e,`logs_${Date.now()}.json`)},{onLoadStart:()=>f.layoutService.setAppbarLoader(!0),onLoadEnd:()=>f.layoutService.setAppbarLoader(!1)});return e(H,{children:[e(m,{items:F,actions:E,onAction:async a=>{"back-action"===a&&f.routerService.push("/"),"download-action"===a&&l(),"update-now"===a&&(o(""),await I.next()),"search-action"===a&&(async()=>{const a=await f.layoutService.prompt("Search keyword");if(a)return o(a),void I.next();o(""),I.next()})()}}),e(t,{sx:{height:"calc(100vh - 155px)"},withScrollbar:!0,minHeight:72,loading:i,onDataRequest:c,bufferSize:L,hasMore:n,children:r.map(a=>e(D,{data:a,sx:{mb:1}},a.id))})]})};export{V as LogPage,V as default};
@@ -1 +0,0 @@
1
- import{c as e,f as a,j as o,Z as t,q as n,D as i,I as r,k as s,n as l,i as c,z as d,X as p,R as h,J as m,L as u,o as b,p as g,B as y,T as v,v as x,d as f,l as k,s as S,h as w,t as L,u as P,w as z,x as R,y as $,F as D,A as j,E as C}from"./index-BSt5rIe0.js";import{R as T,C as F}from"./Refresh-B-6VzYmL.js";import{K as O}from"./KeyboardArrowLeft-NcptneCW.js";import{I as W}from"./IconPhoto-yqTcSjsj.js";import{B as A}from"./Background-B8kVLoJC.js";const B=e(a("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"}),"Dashboard"),E=e(a("path",{d:"M3 10h11v2H3v-2zm0-2h11V6H3v2zm0 8h7v-2H3v2zm15.01-3.13.71-.71c.39-.39 1.02-.39 1.41 0l.71.71c.39.39.39 1.02 0 1.41l-.71.71-2.12-2.12zm-.71.71-5.3 5.3V21h2.12l5.3-5.3-2.12-2.12z"}),"EditNote"),H=new o,I=[{type:t.Link,action:"back-action",label:a(O,{sx:{display:"block"}})},{type:t.Link,action:"back-action",label:"Main"},{type:t.Link,action:"back-action",label:"Overview"}],M=[{action:"download-action",label:"Download",icon:()=>a(r,{icon:i,color:"#4caf50"})},{divider:!0},{action:"dashboard-action",label:"Dashboard",icon:()=>a(r,{icon:B,color:"#4caf50"})},{action:"logs-action",label:"Logs",icon:()=>a(r,{icon:E,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>a(r,{icon:T,color:"#4caf50"})}],N=()=>a(n,{items:I,actions:M,onAction:H.next});const V=({data:{type:e},setLoading:o})=>{const{elementRef:t,size:n}=s({closest:".MuiContainer-root",compute:e=>(e.height-=150,e)}),[i,{loading:r,execute:j}]=l(async()=>{if("live"===e){return(await c.storageViewService.listSignalLive()).filter(e=>"closed"===e.status)}return(await c.storageViewService.listSignalBacktest()).filter(e=>"closed"===e.status)},{onLoadStart:()=>o(!0),onLoadEnd:()=>o(!1),deps:[e]}),C=d(i),T=d(e);p(()=>H.subscribe(e=>{if("update-now"===e&&j(),"download-action"===e){const e=new Blob([JSON.stringify(C.current,null,2)],{type:"application/json"}),a=URL.createObjectURL(e);c.layoutService.downloadFile(a,`signals_${T.current}_${Date.now()}.json`)}"dashboard-action"===e&&c.routerService.push(`/dashboard/${T.current}`),"logs-action"===e&&c.routerService.push("/logs"),"back-action"===e&&c.routerService.push("/main")}));const F=h.useMemo(()=>i?i.reduce((e,a)=>(e[a.symbol]||(e[a.symbol]=[]),e[a.symbol].push(a),e),{}):{},[i]),O=e=>{const o=F[e]||[];return o.length?a(D,{children:o.map((o,t)=>{return a(L,{sx:{background:e=>t%2==1?z(e.palette.getContrastText(e.palette.background.paper),.02):void 0},onClick:()=>c.layoutService.pickSignal(o.id),children:[a(b,{primary:a(y,{sx:{display:"flex",gap:2,flexWrap:"wrap",alignItems:"center"},children:[a(v,{variant:"body2",component:"span",sx:{fontWeight:"bold",px:1,py:.5,borderRadius:1,background:"long"===o.position?"#1976D2":"#F57C00",color:"white"},children:"long"===o.position?"LONG":"SHORT"}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Entry:"}),P(o.priceOpen),"$",o.originalPriceOpen!==o.priceOpen&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[P(o.originalPriceOpen),"$"]})]}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"success.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"TP:"}),P(o.priceTakeProfit),"$",o.originalPriceTakeProfit!==o.priceTakeProfit&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[P(o.originalPriceTakeProfit),"$"]})]}),a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium",color:"error.main"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"SL:"}),P(o.priceStopLoss),"$",o.originalPriceStopLoss!==o.priceStopLoss&&a(y,{component:"span",sx:{color:"text.disabled",ml:.5,fontSize:"0.75em",textDecoration:"line-through"},children:[P(o.originalPriceStopLoss),"$"]})]}),"pnl"in o&&a(v,{variant:"body2",component:"span",sx:{fontWeight:"medium"},children:[a(y,{component:"span",sx:{color:"text.secondary",mr:.5},children:"Invested:"}),P(o.pnl.pnlEntries),"$"]}),"pnl"in o&&a(v,{variant:"body2",component:"span",sx:{fontWeight:"bold",px:1,py:.5,borderRadius:1,background:o.pnl.pnlPercentage>=0?z("#4caf50",.15):z("#f44336",.15),color:o.pnl.pnlPercentage>=0?"#2e7d32":"#c62828"},children:["PNL: ",o.pnl.pnlPercentage>=0?"+":"",o.pnl.pnlPercentage.toFixed(2),"%"," / ",o.pnl.pnlCost>=0?"+":"",P(o.pnl.pnlCost),"$"]}),o.totalEntries>1&&a(v,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:z("#2196f3",.15),color:"#1565c0"},children:["DCA×",o.totalEntries]}),o.totalPartials>0&&a(v,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:z("#9c27b0",.15),color:"#6a1b9a"},children:["Partial×",o.totalPartials]}),a(v,{variant:"caption",component:"span",sx:{px:1,py:.25,borderRadius:.5,background:"opened"===o.status?z("#4caf50",.2):"scheduled"===o.status?z("#ff9800",.2):"closed"===o.status?z("#9e9e9e",.2):z("#f44336",.2),color:"opened"===o.status?"#2e7d32":"scheduled"===o.status?"#e65100":"closed"===o.status?"#616161":"#c62828"},children:o.status})]}),secondary:a(v,{pt:.5,variant:"subtitle2",sx:{opacity:.5},children:(n=o.createdAt,new Date(n).toLocaleString([],{year:"numeric",month:"numeric",day:"numeric",hourCycle:"h24",hour:"2-digit",minute:"2-digit",second:"2-digit"}))})}),a(R,{disableRipple:!0,children:a($,{})})]},`item-${e}-${o.id}`);var n})}):a(u,{children:a(b,{sx:{"& .MuiTypography-body2":{maxWidth:"435px"}},primary:"No signals",secondary:"Signals will be displayed here after they appear"})})};return r?null:a(S,{ref:t,sx:{width:"100%",maxHeight:n.height,overflowX:"hidden",overflowY:"auto",scrollbarWidth:"thin",bgcolor:"background.paper",position:"relative","& ul":{padding:0}},subheader:a("li",{}),children:a(m,{deps:[F],children:async()=>{const o=Object.keys(F),t=await c.symbolGlobalService.getSymbolMap();return o.length?o.map(e=>{var o,n,i;const r=null==(o=t[e])?void 0:o.color,s=(null==(n=F[e])?void 0:n.length)||0;return a("li",{children:a("ul",{children:[a(g,{sx:{background:(l=r,w(l,"#000000")>w(l,"#FFFFFF")?f(r,.1):k(r,.1)),color:"white !important",zIndex:9,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[a(y,{sx:{position:"relative",paddingRight:"8px"},children:a(W,{symbol:e})}),(null==(i=t[e])?void 0:i.displayName)||e,a(y,{flex:1}),a(v,{variant:"body2",sx:{fontWeight:"medium"},children:x(s,{one:"Signal",two:"Signals",many:"Signals"})})]}),a(y,{sx:{marginTop:"16px",marginBottom:"16px"},children:O(e)})]})},`section-${e}`);var l}):a(u,{children:a(b,{primary:"No signals yet",secondary:"live"===e?"Live signals will be displayed here":"Backtest signals will be displayed here"})})}})})},G=C(),J=(e,a)=>e.some(e=>e.includes(a)),K=[{id:"backtest",element:V,isActive:e=>J(["/backtest"],e)},{id:"live",element:V,isActive:e=>J(["/live"],e)}],U=[{id:"backtest",label:"Backtest"},{id:"live",label:"Live"}],X=()=>{p(()=>G.replace("/backtest"));return a(F,{children:[a(j,{withScroll:!0,sx:{height:"calc(100vh - 105px)"},BeforePaper:N,onLoadStart:()=>c.layoutService.setAppbarLoader(!0),onLoadEnd:()=>c.layoutService.setAppbarLoader(!1),routes:K,tabs:U,history:G,initialData:()=>({backtest:{type:"backtest"},live:{type:"live"}}),onTabChange:(e,a)=>{"backtest"===e&&a.replace("/backtest"),"live"===e&&a.replace("/live")}}),a(A,{})]})};export{X as OverviewPage,X as default};
@@ -1 +0,0 @@
1
- import{c as o,f as t,r as c,q as a,Z as i,b as e,B as n,m as s,i as l,I as r,M as h,C as p,e as v,S as m,a as d,d as z,l as u,g as f,h as b}from"./index-BSt5rIe0.js";import{C as M,R as g}from"./Refresh-B-6VzYmL.js";const y=o([t("path",{d:"M13 17c-1.1 0-2-.9-2-2V9c0-1.1.9-2 2-2h6V5H5v14h14v-2h-6z",opacity:".3"}),t("path",{d:"M21 7.28V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-2.28c.59-.35 1-.98 1-1.72V9c0-.74-.41-1.38-1-1.72zM20 9v6h-7V9h7zM5 19V5h14v2h-6c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h6v2H5z"}),t("circle",{cx:"16",cy:"12",r:"1.5"})],"AccountBalanceWalletTwoTone"),H=o([t("path",{d:"M8 6h8v6H8zm11 8H5c-.55 0-1 .45-1 1v3h16v-3c0-.55-.45-1-1-1zm-1 3c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z",opacity:".3"}),t("path",{d:"M19 12h-1V4H6v8H5c-1.66 0-3 1.34-3 3v5h20v-5c0-1.66-1.34-3-3-3zM8 6h8v6H8V6zm12 12H4v-3c0-.55.45-1 1-1h14c.55 0 1 .45 1 1v3z"}),t("circle",{cx:"18",cy:"16",r:"1"})],"AdfScannerTwoTone"),C=o([t("path",{d:"M12 4c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8zm0 14.5c-.83 0-1.5-.67-1.5-1.5h3c0 .83-.67 1.5-1.5 1.5zm5-2.5H7v-2h1v-2.61C8 9.27 9.03 7.47 11 7v-.5c0-.57.43-1 1-1s1 .43 1 1V7c1.97.47 3 2.28 3 4.39V14h1v2z",opacity:".3"}),t("path",{d:"M12 18.5c.83 0 1.5-.67 1.5-1.5h-3c0 .83.67 1.5 1.5 1.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4-8.61c0-2.11-1.03-3.92-3-4.39v-.5c0-.57-.43-1-1-1s-1 .43-1 1V7c-1.97.47-3 2.27-3 4.39V14H7v2h10v-2h-1v-2.61zM14 14h-4v-3c0-1.1.9-2 2-2s2 .9 2 2v3z"})],"CircleNotificationsTwoTone"),V=o([t("path",{d:"M19 5H5v14h14V5zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z",opacity:".3"}),t("path",{d:"M3 5v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2zm2 0h14v14H5V5zm2 5h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"})],"InsertChartTwoTone"),w=o(t("path",{d:"M7.58 4.08 6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}),"NotificationsActive"),x=o(t(c.Fragment,{children:[t("path",{d:"M12 20c4.41 0 8-3.59 8-8s-3.59-8-8-8-8 3.59-8 8 3.59 8 8 8zM10 7.5l6 4.5-6 4.5v-9z",opacity:".3"}),t("path",{d:"M12 22c5.52 0 10-4.48 10-10S17.52 2 12 2 2 6.48 2 12s4.48 10 10 10zm0-18c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8zm-2 3.5v9l6-4.5z"})]}),"PlayCircleFilledWhiteTwoTone"),S=o(t("path",{d:"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-8.9-5h7.45c.75 0 1.41-.41 1.75-1.03L21 4.96 19.25 4l-3.7 7H8.53L4.27 2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2zM12 2l4 4-4 4-1.41-1.41L12.17 7H8V5h4.17l-1.59-1.59L12 2z"}),"ShoppingCartCheckout"),k=o([t("path",{d:"M4 18h16V8H4v10zm8-3h6v2h-6v-2zm-5.91-4.59L7.5 9l4 4-4 4-1.41-1.41L8.67 13l-2.58-2.59z",opacity:".3"}),t("path",{d:"M12 15h6v2h-6z"}),t("path",{d:"M20 4H4c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm0 14H4V8h16v10z"}),t("path",{d:"m7.5 17 4-4-4-4-1.41 1.41L8.67 13l-2.58 2.59z"})],"TerminalTwoTone"),F="trade-gpt__groupHeader",T="trade-gpt__groupRoot",L="trade-gpt__symbolImage",N=s()({root:{[`& .${T}:hover .${F}`]:{opacity:"1 !important"}}});function A(o){return b(o,"#000000")>b(o,"#FFFFFF")}const R=[{type:i.Link,action:"back-action",label:"Main"},{type:i.Link,action:"back-action",label:"Navigation"}],$=[{action:"status-action",label:"Status",icon:()=>t(r,{icon:S,color:"#4caf50"})},{divider:!0},{action:"notification-action",label:"Notifications",icon:()=>t(r,{icon:w,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>t(r,{icon:g,color:"#4caf50"})}],_=(o,c)=>({type:h.Group,className:T,sx:{p:2},desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",fields:[{type:h.Component,className:F,style:{transition:"opacity 500ms",opacity:.5},element:()=>t(m,{direction:"row",children:[t(p,{variant:"outlined",size:"medium",color:"info",label:`${v.bullet} ${o}`,sx:{mb:1,pr:.5,fontSize:"16px",background:"white",cursor:"not-allowed"}}),t(n,{flex:1})]})},{type:h.Group,fields:c.map(({label:o,to:c,color:a,icon:i})=>((o,c,a,i)=>({type:h.Component,desktopColumns:"6",tabletColumns:"12",phoneColumns:"12",fieldRightMargin:"1",fieldBottomMargin:"1",element:()=>t(f,{component:d,onClick:()=>{l.routerService.push(o)},sx:{width:"100%",background:a,color:"white",fontWeight:"bold",fontSize:"18px",height:"75px",minHeight:"125px",textWrap:"wrap",padding:"16px",[`& .${L}`]:{transition:"filter 500ms"},"&:hover":{background:()=>A(a)?z(a,.33):u(a,.33),[`& .${L}`]:{transition:"filter 500ms",filter:A(a)?"brightness(0.7) contrast(1.2)":"brightness(1.3) contrast(0.5)"}},transition:"background 500ms"},startIcon:t(i,{className:L}),children:c})}))(c,o,a,i))}]}),B=[{label:"Notifications",to:"/notifications",color:"#F7931A",icon:C},{label:"Pending Status",to:"/status",color:"#6F42C1",icon:x}],P=[{label:"Markdown Reports",to:"/report",color:"#0090FF",icon:H}],I=[_("Application",[{label:"Portfolio Overview",to:"/overview",color:"#0033AD",icon:y},{label:"PNL Performance",to:"/dashboard",color:"#E6007A",icon:V},{label:"System Logs",to:"/logs",color:"#58BF00",icon:k}]),_("Live",B),_("Other",P)],W=()=>{const{classes:o}=N();return t(M,{children:[t(a,{items:R,actions:$,onAction:async o=>{"notification-action"===o&&l.routerService.push("/notifications"),"status-action"===o&&l.routerService.push("/status")}}),t(e,{className:o.root,fields:I,payload:()=>({history:history})}),t(n,{paddingBottom:"24px"})]})};export{W as MainPage,W as default};
@@ -1 +0,0 @@
1
- import{aD as e,b1 as t}from"./index-BSt5rIe0.js";function r(e,t){for(var r=0;r<t.length;r++){const o=t[r];if("string"!=typeof o&&!Array.isArray(o))for(const t in o)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(o,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var o=t();const n=r({__proto__:null,default:e(o)},[o]);export{n as m};