@backtest-kit/ui 9.8.1 → 9.8.3

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 (40) hide show
  1. package/README.md +254 -254
  2. package/build/index.cjs +1 -0
  3. package/build/index.mjs +1 -0
  4. package/build/modules/frontend/build/3rdparty/ace_1.4.12/ace.js +21337 -21337
  5. package/build/modules/frontend/build/3rdparty/ace_1.4.12/mode-javascript.js +797 -797
  6. package/build/modules/frontend/build/3rdparty/ace_1.4.12/theme-chrome.js +137 -137
  7. package/build/modules/frontend/build/3rdparty/ace_1.4.12/theme-twilight.js +115 -115
  8. package/build/modules/frontend/build/3rdparty/ace_1.4.12/worker-javascript.js +15012 -15012
  9. package/build/modules/frontend/build/3rdparty/qfchart_0.8.7/echarts.min.js +45 -45
  10. package/build/modules/frontend/build/assets/{Article-p9wBSUJx.js → Article-nF44Bhzs.js} +1 -1
  11. package/build/modules/frontend/build/assets/{Background-CxL7v5wI.js → Background-DT3hIWwy.js} +1 -1
  12. package/build/modules/frontend/build/assets/{IconPhoto-7nD78fuN.js → IconPhoto-DeS1EXAM.js} +1 -1
  13. package/build/modules/frontend/build/assets/{KeyboardArrowLeft-Cm4M4ZUj.js → KeyboardArrowLeft-D33Gu2l9.js} +1 -1
  14. package/build/modules/frontend/build/assets/{PictureAsPdfOutlined-HvkCkIuC.js → PictureAsPdfOutlined-otiLymXi.js} +1 -1
  15. package/build/modules/frontend/build/assets/{Refresh-B7S-vCHl.js → Refresh-Ci8GqzD_.js} +1 -1
  16. package/build/modules/frontend/build/assets/emitters-Fs38zfiG.js +1 -0
  17. package/build/modules/frontend/build/assets/hasRouteMatch-C5nvBKVM.js +1 -0
  18. package/build/modules/frontend/build/assets/{html2canvas-DAyjvRih.js → html2canvas-b89kRSoc.js} +1 -1
  19. package/build/modules/frontend/build/assets/{index-BTKKVouF.js → index-B46PEmT3.js} +1 -1
  20. package/build/modules/frontend/build/assets/{index-CVQGh-H0.js → index-BEVVzgtv.js} +1 -1
  21. package/build/modules/frontend/build/assets/index-BF7ijyG8.js +1 -0
  22. package/build/modules/frontend/build/assets/{index-cvCBd0qz.js → index-BHbczcFW.js} +1 -1
  23. package/build/modules/frontend/build/assets/{index-22ptgqop.js → index-CYhJz_27.js} +56 -56
  24. package/build/modules/frontend/build/assets/{index-DebVtRHa.js → index-ClCTBJDG.js} +1 -1
  25. package/build/modules/frontend/build/assets/index-Cx4mKyDI.js +1 -0
  26. package/build/modules/frontend/build/assets/{index-D_WV2kbu.js → index-DK0yzg18.js} +1 -1
  27. package/build/modules/frontend/build/assets/{index-YhkZzfiu.js → index-DQ4y6hpE.js} +1 -1
  28. package/build/modules/frontend/build/assets/{index-DXD8HuaM.js → index-XSHiFfmY.js} +1 -1
  29. package/build/modules/frontend/build/assets/{index-BgH6KXN7.js → index-aUhRWZqD.js} +1 -1
  30. package/build/modules/frontend/build/assets/{index-BlkLSLnO.js → index-fybQL467.js} +1 -1
  31. package/build/modules/frontend/build/assets/{index-VkkL4QJT.js → index-jOJ-VhE4.js} +1 -1
  32. package/build/modules/frontend/build/assets/{index.es-BQlso48L.js → index.es-BBkHVhy6.js} +1 -1
  33. package/build/modules/frontend/build/assets/{markdownit-Dh-L2bI_.js → markdownit-KRHYWAb-.js} +1 -1
  34. package/build/modules/frontend/build/index.html +87 -87
  35. package/build/modules/frontend/build/manifest.json +23 -23
  36. package/package.json +118 -118
  37. package/build/modules/frontend/build/assets/emitters-BvcEysQ4.js +0 -1
  38. package/build/modules/frontend/build/assets/hasRouteMatch-CVakrTG3.js +0 -1
  39. package/build/modules/frontend/build/assets/index-BK7NkRBF.js +0 -1
  40. package/build/modules/frontend/build/assets/index-D-ytL7rG.js +0 -1
package/package.json CHANGED
@@ -1,118 +1,118 @@
1
- {
2
- "name": "@backtest-kit/ui",
3
- "version": "9.8.1",
4
- "description": "Full-stack UI framework for visualizing cryptocurrency trading signals, backtests, and real-time market data. React dashboard with candlestick charts, signal tracking, and risk analysis.",
5
- "author": {
6
- "name": "Petr Tripolsky",
7
- "email": "tripolskypetr@gmail.com",
8
- "url": "https://github.com/tripolskypetr"
9
- },
10
- "funding": {
11
- "type": "individual",
12
- "url": "http://paypal.me/tripolskypetr"
13
- },
14
- "license": "MIT",
15
- "homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
16
- "keywords": [
17
- "backtest",
18
- "backtesting",
19
- "trading",
20
- "crypto",
21
- "cryptocurrency",
22
- "bitcoin",
23
- "ethereum",
24
- "dashboard",
25
- "ui",
26
- "react",
27
- "material-ui",
28
- "mui",
29
- "charts",
30
- "candlestick",
31
- "lightweight-charts",
32
- "signals",
33
- "trading-signals",
34
- "risk-management",
35
- "ccxt",
36
- "binance",
37
- "exchange",
38
- "visualization",
39
- "trading-bot",
40
- "algo-trading",
41
- "algorithmic-trading",
42
- "quantitative-trading"
43
- ],
44
- "files": [
45
- "build",
46
- "types.d.ts",
47
- "README.md"
48
- ],
49
- "repository": {
50
- "type": "git",
51
- "url": "https://github.com/tripolskypetr/backtest-kit",
52
- "documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
53
- },
54
- "bugs": {
55
- "url": "https://github.com/tripolskypetr/backtest-kit/issues"
56
- },
57
- "scripts": {
58
- "start": "npm run build && cross-env NODE_ENV=development CC_ENABLE_MOCK=1 npm run serve",
59
- "serve": "node ./scripts/mock.mjs",
60
- "build:modules": "npm run build:modules:win",
61
- "build:modules:win": "dotenv -e .env -- .\\scripts\\win\\build.bat && npm run build:copy && npm run build:postbuild",
62
- "build:modules:x": "dotenv -e .env -- sh ./scripts/linux/build.sh && npm run build:copy && npm run build:postbuild",
63
- "build:copy": "node ./scripts/copy.mjs",
64
- "build:postbuild": "node ./scripts/postbuild.mjs",
65
- "build": "rollup -c"
66
- },
67
- "main": "build/index.cjs",
68
- "module": "build/index.mjs",
69
- "source": "src/index.ts",
70
- "types": "./types.d.ts",
71
- "exports": {
72
- "require": "./build/index.cjs",
73
- "types": "./types.d.ts",
74
- "import": "./build/index.mjs",
75
- "default": "./build/index.cjs"
76
- },
77
- "devDependencies": {
78
- "@rollup/plugin-typescript": "11.1.6",
79
- "@rollup/plugin-terser": "0.4.4",
80
- "@types/finalhandler": "1.2.3",
81
- "@types/serve-handler": "6.1.4",
82
- "cross-env": "7.0.3",
83
- "@types/node": "22.9.0",
84
- "glob": "11.0.1",
85
- "rimraf": "6.0.1",
86
- "rollup": "3.29.5",
87
- "rollup-plugin-dts": "6.1.1",
88
- "rollup-plugin-peer-deps-external": "2.2.4",
89
- "ts-morph": "27.0.2",
90
- "tslib": "2.7.0",
91
- "typedoc": "0.27.9",
92
- "ccxt": "4.5.24",
93
- "touch": "3.1.1",
94
- "worker-testbed": "2.0.0",
95
- "backtest-kit": "9.8.1",
96
- "markdown-it": "14.1.0"
97
- },
98
- "peerDependencies": {
99
- "backtest-kit": "^9.8.1",
100
- "markdown-it": "^14.1.0",
101
- "ccxt": "^4.5.24",
102
- "typescript": "^5.0.0"
103
- },
104
- "dependencies": {
105
- "di-kit": "^1.1.1",
106
- "di-scoped": "^1.0.21",
107
- "functools-kit": "^2.3.0",
108
- "get-moment-stamp": "^1.1.2",
109
- "finalhandler": "^1.3.1",
110
- "serve-handler": "^6.1.6",
111
- "cryptocurrency-icons": "^0.18.1",
112
- "router": "^1.3.8",
113
- "micro": "^10.0.1"
114
- },
115
- "publishConfig": {
116
- "access": "public"
117
- }
118
- }
1
+ {
2
+ "name": "@backtest-kit/ui",
3
+ "version": "9.8.3",
4
+ "description": "Full-stack UI framework for visualizing cryptocurrency trading signals, backtests, and real-time market data. React dashboard with candlestick charts, signal tracking, and risk analysis.",
5
+ "author": {
6
+ "name": "Petr Tripolsky",
7
+ "email": "tripolskypetr@gmail.com",
8
+ "url": "https://github.com/tripolskypetr"
9
+ },
10
+ "funding": {
11
+ "type": "individual",
12
+ "url": "http://paypal.me/tripolskypetr"
13
+ },
14
+ "license": "MIT",
15
+ "homepage": "https://backtest-kit.github.io/documents/article_07_ai_news_trading_signals.html",
16
+ "keywords": [
17
+ "backtest",
18
+ "backtesting",
19
+ "trading",
20
+ "crypto",
21
+ "cryptocurrency",
22
+ "bitcoin",
23
+ "ethereum",
24
+ "dashboard",
25
+ "ui",
26
+ "react",
27
+ "material-ui",
28
+ "mui",
29
+ "charts",
30
+ "candlestick",
31
+ "lightweight-charts",
32
+ "signals",
33
+ "trading-signals",
34
+ "risk-management",
35
+ "ccxt",
36
+ "binance",
37
+ "exchange",
38
+ "visualization",
39
+ "trading-bot",
40
+ "algo-trading",
41
+ "algorithmic-trading",
42
+ "quantitative-trading"
43
+ ],
44
+ "files": [
45
+ "build",
46
+ "types.d.ts",
47
+ "README.md"
48
+ ],
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "https://github.com/tripolskypetr/backtest-kit",
52
+ "documentation": "https://github.com/tripolskypetr/backtest-kit/tree/master/docs"
53
+ },
54
+ "bugs": {
55
+ "url": "https://github.com/tripolskypetr/backtest-kit/issues"
56
+ },
57
+ "scripts": {
58
+ "start": "npm run build && cross-env NODE_ENV=development CC_ENABLE_MOCK=1 npm run serve",
59
+ "serve": "node ./scripts/mock.mjs",
60
+ "build:modules": "npm run build:modules:win",
61
+ "build:modules:win": "dotenv -e .env -- .\\scripts\\win\\build.bat && npm run build:copy && npm run build:postbuild",
62
+ "build:modules:x": "dotenv -e .env -- sh ./scripts/linux/build.sh && npm run build:copy && npm run build:postbuild",
63
+ "build:copy": "node ./scripts/copy.mjs",
64
+ "build:postbuild": "node ./scripts/postbuild.mjs",
65
+ "build": "rollup -c"
66
+ },
67
+ "main": "build/index.cjs",
68
+ "module": "build/index.mjs",
69
+ "source": "src/index.ts",
70
+ "types": "./types.d.ts",
71
+ "exports": {
72
+ "require": "./build/index.cjs",
73
+ "types": "./types.d.ts",
74
+ "import": "./build/index.mjs",
75
+ "default": "./build/index.cjs"
76
+ },
77
+ "devDependencies": {
78
+ "@rollup/plugin-typescript": "11.1.6",
79
+ "@rollup/plugin-terser": "0.4.4",
80
+ "@types/finalhandler": "1.2.3",
81
+ "@types/serve-handler": "6.1.4",
82
+ "cross-env": "7.0.3",
83
+ "@types/node": "22.9.0",
84
+ "glob": "11.0.1",
85
+ "rimraf": "6.0.1",
86
+ "rollup": "3.29.5",
87
+ "rollup-plugin-dts": "6.1.1",
88
+ "rollup-plugin-peer-deps-external": "2.2.4",
89
+ "ts-morph": "27.0.2",
90
+ "tslib": "2.7.0",
91
+ "typedoc": "0.27.9",
92
+ "ccxt": "4.5.24",
93
+ "touch": "3.1.1",
94
+ "worker-testbed": "2.0.0",
95
+ "backtest-kit": "9.8.3",
96
+ "markdown-it": "14.1.0"
97
+ },
98
+ "peerDependencies": {
99
+ "backtest-kit": "^9.8.3",
100
+ "markdown-it": "^14.1.0",
101
+ "ccxt": "^4.5.24",
102
+ "typescript": "^5.0.0"
103
+ },
104
+ "dependencies": {
105
+ "di-kit": "^1.1.1",
106
+ "di-scoped": "^1.0.21",
107
+ "functools-kit": "^2.3.0",
108
+ "get-moment-stamp": "^1.1.2",
109
+ "finalhandler": "^1.3.1",
110
+ "serve-handler": "^6.1.6",
111
+ "cryptocurrency-icons": "^0.18.1",
112
+ "router": "^1.3.8",
113
+ "micro": "^10.0.1"
114
+ },
115
+ "publishConfig": {
116
+ "access": "public"
117
+ }
118
+ }
@@ -1 +0,0 @@
1
- import{Z as o}from"./index-22ptgqop.js";const r=new o;export{r};
@@ -1 +0,0 @@
1
- import{i as a,br as e,bs as r}from"./index-22ptgqop.js";const s=(s,t=a.routerService.location.pathname)=>!!e(r.filter(({path:a})=>s.includes(a)),t);export{s as h};
@@ -1 +0,0 @@
1
- import{b as a,f as e,aQ as t,B as o,N as r,$ as n,T as i,al as s,K as c,F as l,aE as d,P as h,aF as p,aS as u,aT as w,av as b,Z as f,i as x,aw as g,a8 as v,aB as y,v as m,w as S,aU as k,aR as L,D as j,z}from"./index-22ptgqop.js";import{A}from"./Article-p9wBSUJx.js";import{C as R,R as H}from"./Refresh-B7S-vCHl.js";import{K as B}from"./KeyboardArrowLeft-Cm4M4ZUj.js";const C=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"),E=a=>{const t={color:"white",fontSize:28};switch(a.type){case"debug":return e(C,{sx:t});case"info":return e(u,{sx:t});case"warn":return e(p,{sx:t});default:return e(A,{sx:t})}},F=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:"clip",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:E(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:s(a.createdAt).format("HH:mm DD/MM/YYYY")})]}),e(r,{direction:"row",spacing:1,flexWrap:"wrap",children:e(c,{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}})]})})}),D=[{action:"download-action",label:"Download",icon:()=>e(z,{icon:j,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh manually",icon:()=>e(z,{icon:H,color:"#4caf50"})}],M=[{type:S.Link,action:"back-action",label:e(B,{sx:{display:"block"}})},{type:S.Link,action:"back-action",label:"Main"},{type:S.Link,action:"back-action",label:"Logs"},{type:S.Button,icon:k,action:"search-action",label:"Search"}],U=new f,Y=()=>{const[a,o]=w(""),{data:r,hasMore:n,loading:i,onSkip:s}=b({handler:async(e,t)=>{const o=await x.logViewService.getList(),r=g(e,t);for(const n of o)if(new RegExp(a.current,"i").test(n.topic)&&r([n]).done)break;return r().rows},onLoadStart:()=>x.layoutService.setAppbarLoader(!0),onLoadEnd:()=>x.layoutService.setAppbarLoader(!1),reloadSubject:U}),c=v(r),{execute:l}=y(async()=>{const a=new Blob([JSON.stringify(c.current,null,2)],{type:"application/json"}),e=URL.createObjectURL(a);x.layoutService.downloadFile(e,`logs_${Date.now()}.json`)},{onLoadStart:()=>x.layoutService.setAppbarLoader(!0),onLoadEnd:()=>x.layoutService.setAppbarLoader(!1)});return e(R,{children:[e(m,{items:M,actions:D,onAction:async a=>{"back-action"===a&&x.routerService.push("/"),"download-action"===a&&l(),"update-now"===a&&(o(""),await U.next()),"search-action"===a&&(async()=>{const a=await x.layoutService.prompt("Search keyword");if(a)return o(a),void U.next();o(""),U.next()})()}}),e(t,{sx:{height:"calc(100vh - 155px)"},withScrollbar:!0,minHeight:72,loading:i,onDataRequest:s,bufferSize:L,hasMore:n,children:r.map(a=>e(F,{data:a,sx:{mb:1}},a.id))})]})};export{Y as LogPage,Y as default};
@@ -1 +0,0 @@
1
- import{b as e,f as t,X as a,i as o,Y as i,Z as n,v as l,w as r,z as d,y as p,A as c,E as s,H as y,x as g,q as m,$ as h,T as u,l as f,B as b,a0 as x,P as w,a1 as v,a2 as k,O as B,a3 as M,a4 as S,a5 as L,a6 as R}from"./index-22ptgqop.js";import{h as V}from"./hasRouteMatch-CVakrTG3.js";import{P as D}from"./PictureAsPdfOutlined-HvkCkIuC.js";import{C as T,R as C}from"./Refresh-B7S-vCHl.js";import{K as A}from"./KeyboardArrowLeft-Cm4M4ZUj.js";const P=e(t("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61l-2.01-1.58zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6z"}),"Settings"),_=e(t("path",{d:"M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z"}),"Telegram"),E=144,O=[{type:r.Link,action:"back-action",label:t(A,{sx:{display:"block"}})},{type:r.Link,action:"back-action",label:"Dashboard"},{type:r.Link,action:"back-action",label:"Performance"},{type:r.Button,action:"download-pdf",label:"Download PDF",icon:D},{type:r.Fab,action:"setup-action",label:"Settings",icon:P}],j=[{action:"setup-action",label:"Settings",icon:()=>t(d,{icon:P,color:"#4caf50"})},{divider:!0},{action:"download-json",label:"Download JSON",icon:()=>t(d,{icon:p,color:"#4caf50"})},{action:"download-markdown",label:"Download Markdown",icon:()=>t(d,{icon:c,color:"#4caf50"})},{action:"download-pdf",label:"Download PDF",icon:()=>t(d,{icon:s,color:"#4caf50"})},{divider:!0},{action:"update-now",label:"Refresh",icon:()=>t(d,{icon:C,color:"#4caf50"})}],U=({name:e,title:t})=>({type:y.Box,sx:{display:"grid",gridTemplateColumns:"auto 1fr auto",paddingBottom:"8px",alignItems:"center"},fields:[{type:y.Typography,fieldBottomMargin:"0",typoVariant:"body1",placeholder:t},{type:y.Div},{type:y.Typography,typoVariant:"h6",style:{textAlign:"right",fontWeight:"bold"},fieldBottomMargin:"0",fieldRightMargin:"0",compute:({[e]:t})=>t||0===t?"totalEvents"===e?Number(t).toFixed(2):"totalDuration"===e||"avgDuration"===e?`${Number(t).toFixed(2)} ${x("ms")}`:t:"-",name:e}]}),F=({name:e,title:a})=>({type:y.Box,sx:{display:"grid",gridTemplateColumns:"auto 1fr auto",paddingBottom:"8px",alignItems:"center"},fields:[{type:y.Typography,fieldBottomMargin:"0",typoVariant:"body1",placeholder:a},{type:y.Div},{type:y.Component,style:{textAlign:"right",fontWeight:"bold"},fieldBottomMargin:"0",fieldRightMargin:"0",element:({[e]:a})=>{const o="github"===e,i=o?"#6A1B9A":"#24A1DE";return t(B,{size:"medium",disabled:!a,startIcon:t(h,{sx:{background:"#eee",height:"25px",width:"25px"},children:t(o?k:_,{sx:{color:i,fontSize:"16px !important",transform:"translate(-0.5px, 0px)"}})}),sx:{background:"white",color:i,"&:hover":{background:"white",color:i}},onClick:()=>{if(o)v(String(a));else{const e=String(a).replaceAll("@","");v(`https://t.me/${e}`)}},children:x(a?"Open":"Not configured")})},name:e}]}),I=[{type:y.Box,sx:{display:"flex",alignItems:"center",justifyContent:"center",height:"80vh"},child:{type:y.Layout,customLayout:({children:e})=>t(w,{sx:{width:"335px"},children:e}),fields:[{type:y.Component,element:()=>t(b,{sx:{background:e=>f(e.palette.background.paper,.13),display:"flex",alignItems:"center",flexDirection:"column",gap:1,p:1},children:[t(h,{sx:{height:E,width:E,marginTop:"36px",marginBottom:"36px"},src:"/logo/icon512_maskable.png"}),t(u,{variant:"subtitle2",sx:{opacity:.5},children:"Backtest Kit"})]})},{type:y.Layout,customLayout:({children:e})=>t(b,{p:1,children:e}),fields:[{type:y.Div,style:{height:"2px"}},{type:y.Div,style:{height:"12px"}},U({name:"totalEvents",title:x("Total events")}),U({name:"totalDuration",title:x("Total time")}),U({name:"avgDuration",title:x("Average time")}),F({name:"channel",title:x("Channel")}),F({name:"github",title:"GitHub"})]}]}}],H=new n,N=[{type:y.Group,fieldRightMargin:"1",phoneColumns:"12",tabletColumns:"12",desktopColumns:"6",fields:[{type:y.Paper,fieldBottomMargin:"1",fields:[{type:y.Typography,fieldBottomMargin:"1",typoVariant:"h6",placeholder:"Running mode"},{type:y.Typography,fieldBottomMargin:"1",isVisible:({running_mode:e})=>"backtest"===e,style:{color:"orange"},typoVariant:"body1",placeholder:"Historical data processing"},{type:y.Typography,fieldBottomMargin:"1",isVisible:({running_mode:e})=>"live"===e,style:{color:"green"},typoVariant:"body1",placeholder:"Real-time exchange integration"},{type:y.Typography,fieldBottomMargin:"1",isVisible:({running_mode:e})=>"none"===e,style:{color:"red"},typoVariant:"body1",placeholder:"UI only"},{type:y.Radio,readonly:!0,fieldBottomMargin:"0",name:"running_mode",radioValue:"backtest",title:"Historical data"},{type:y.Radio,readonly:!0,fieldBottomMargin:"0",name:"running_mode",radioValue:"live",title:"Real-time"},{type:y.Radio,readonly:!0,fieldBottomMargin:"0",name:"running_mode",radioValue:"none",title:"Frontend only"}]},{type:y.Paper,fieldBottomMargin:"1",innerPadding:"0px",fields:[{type:y.Box,sx:{paddingTop:"16px",paddingLeft:"16px",paddingRight:"16px"},fields:[{type:y.Typography,fieldBottomMargin:"1",typoVariant:"h6",placeholder:"Log mode"},{type:y.Typography,fieldBottomMargin:"2",style:{opacity:.5},typoVariant:"caption",placeholder:"Logs take up disk space but are needed for debugging"}]},...[{title:"JSONL files",description:"Files processed by Claude Code, HuggingFace, Parquet",name:"recent_enabled"},{title:"Markdown files",description:"Human-readable files. Useful when running without a GUI",name:"markdown_enabled"},{title:"Dump files",description:"Conversation dump with the AI agent used for trading signals",name:"dump_enabled"}].map(({name:e,title:t,description:a},o)=>(({title:e,description:t,name:a,idx:o})=>({type:y.Box,sx:{display:"grid",alignItems:"center",gridTemplateColumns:"1fr auto",paddingLeft:"16px",paddingRight:"16px",paddingTop:"4px",paddingBottom:"4px",background:e=>o%2==0?L(e.palette.getContrastText(e.palette.background.paper),.04):"transparent"},fields:[{type:y.Box,fields:[{type:y.Typography,fieldBottomMargin:"0",typoVariant:"body1",placeholder:e},{type:y.Typography,fieldBottomMargin:"0",style:{opacity:.5},typoVariant:"caption",placeholder:t}]},{type:y.Checkbox,readonly:!0,fieldBottomMargin:"0",fieldRightMargin:"0",title:"",name:a}]}))({name:e,title:t,description:a,idx:o}))]},{type:y.Paper,fieldBottomMargin:"1",fields:[{type:y.Typography,fieldBottomMargin:"1",typoVariant:"h6",placeholder:"User interface"},{type:y.Switch,readonly:!0,fieldBottomMargin:"0",title:"Save notifications",name:"notification_enabled"},{type:y.Typography,fieldBottomMargin:"1",style:{opacity:.5},typoVariant:"caption",placeholder:"Event history is saved to disk"},{type:y.Switch,readonly:!0,fieldBottomMargin:"0",title:"Save signals",name:"storage_enabled"},{type:y.Typography,fieldBottomMargin:"0",style:{opacity:.5},typoVariant:"caption",placeholder:"Latest signal state is saved to disk"}]}]},{type:y.Group,fieldRightMargin:"1",fieldBottomMargin:"2",phoneColumns:"12",tabletColumns:"12",desktopColumns:"6",fields:[{type:y.Paper,fieldBottomMargin:"1",fields:[{type:y.Typography,fieldBottomMargin:"3",typoVariant:"h6",placeholder:"Strategy"},{type:y.Typography,placeholder:"Broker"},{type:y.Outline,fieldBottomMargin:"3",fields:[{type:y.Checkbox,readonly:!0,fieldBottomMargin:"0",title:"Connected to mainnet (production)",name:"broker_enabled"}]},{type:y.Typography,placeholder:"Market signals"},{type:y.Outline,fieldBottomMargin:"4",fields:[{type:y.Checkbox,readonly:!0,fieldBottomMargin:"0",title:"Use BM25 for RAG",name:"memory_enabled"},{type:y.Checkbox,readonly:!0,fieldBottomMargin:"0",title:"Use stateful strategies",name:"state_enabled"},{type:y.Checkbox,readonly:!0,fieldBottomMargin:"0",title:"Save previous signal",name:"recent_enabled"}]}]},{type:y.Paper,fieldBottomMargin:"1",fields:[{type:y.Typography,fieldBottomMargin:"2",typoVariant:"h6",placeholder:"Risk management"},{type:y.Typography,fieldBottomMargin:"3",style:{opacity:.5},typoVariant:"body1",placeholder:"Use LONG or SHORT positions depending on market conditions"},{type:y.Checkbox,readonly:!0,fieldBottomMargin:"0",title:"Enable LONG",name:"enable_long"},{type:y.Checkbox,readonly:!0,fieldBottomMargin:"1",title:"Enable SHORT",name:"enable_short"}]}]},{type:y.Component,desktopHidden:!0,fieldBottomMargin:"5",fieldRightMargin:"1",element:({payload:e})=>{const a=M();return t(S,{variant:"contained",size:"large",startIcon:t(C,{}),onClick:async()=>{await e.handleReload(),a()},children:"Refresh"})}}],z=[{type:r.Link,action:"back-action",label:t(A,{sx:{display:"block"}})},{type:r.Link,action:"back-action",label:"Dashboard"},{type:r.Link,action:"back-action",label:"Performance"},{type:r.Link,action:"back-action",label:"Settings"},{type:r.Button,action:"update-now",label:"Refresh",icon:C}],G=[{action:"update-now",label:"Refresh",icon:()=>t(d,{icon:C,color:"#4caf50"})}],$=new n,J=async()=>{o.setupViewService.getSetupData.clear(),await $.next()},K=[{id:"search",element:()=>{const[e,{execute:n,loading:r}]=a(async()=>await o.performanceViewService.getPerformanceData(),{onLoadStart:()=>o.layoutService.setAppbarLoader(!0),onLoadEnd:()=>o.layoutService.setAppbarLoader(!1)});i(()=>H.subscribe(n));const[d,{execute:p,loading:c}]=a(async()=>await o.environmentViewService.getEnvironmentData());i(()=>H.subscribe(p));return t(T,{children:[t(l,{items:O,actions:j,onAction:async e=>{"back-action"===e&&o.routerService.push("/main"),"setup-action"===e&&o.routerService.push("/about/setup"),"update-now"===e&&await(async()=>{o.performanceViewService.getPerformanceData.clear(),o.performanceViewService.getPerformanceReport.clear(),o.environmentViewService.getEnvironmentData.clear(),await H.next()})(),"download-markdown"===e&&await(async()=>{const e=await o.performanceViewService.getPerformanceReport(),t=new Blob([e],{type:"text/plain"}),a=URL.createObjectURL(t);o.layoutService.downloadFile(a,`performance_${Date.now()}.md`)})(),"download-pdf"===e&&await(async()=>{const e=await o.performanceViewService.getPerformanceReport();await m(e)})(),"download-json"===e&&await(async()=>{const e=await o.performanceViewService.getPerformanceData(),t=JSON.stringify(e,null,2),a=new Blob([t],{type:"text/plain"}),i=URL.createObjectURL(a);o.layoutService.downloadFile(i,`performance_${Date.now()}.md`)})()}}),e&&d?r||c?null:t(g,{handler:()=>{const t=e.totalEvents>0?e.totalDuration/e.totalEvents:0;return{channel:d.telegram_channel,github:"https://github.com/tripolskypetr/backtest-kit",totalEvents:e.totalEvents,totalDuration:e.totalDuration,avgDuration:t}},fields:I}):null]})},isActive:e=>V(["/about"],e)},{id:"main",element:()=>{const[e,{execute:n,loading:r}]=a(async()=>await o.setupViewService.getSetupData(),{onLoadStart:()=>o.layoutService.setAppbarLoader(!0),onLoadEnd:()=>o.layoutService.setAppbarLoader(!1)});i(()=>$.subscribe(n));return t(T,{children:[t(l,{items:z,actions:G,onAction:async e=>{"back-action"===e&&o.routerService.push("/about"),"update-now"===e&&await J()}}),e?r?null:t(g,{handler:e,payload:()=>({handleReload:J}),fields:N}):null]})},isActive:e=>V(["/about/setup"],e)}],q=()=>t(R,{history:o.routerService,onLoadStart:()=>o.layoutService.setAppbarLoader(!0),onLoadEnd:()=>o.layoutService.setAppbarLoader(!1),routes:K});export{q as AboutPage,q as default};