scope360-core 0.0.227 → 0.0.229
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.
package/dist/scope360-core.js
CHANGED
|
@@ -20894,10 +20894,14 @@ const ev = /* @__PURE__ */ OR("line", Ll), PR = { class: "chart-container" }, tv
|
|
|
20894
20894
|
let p = [];
|
|
20895
20895
|
switch (e.dataType) {
|
|
20896
20896
|
case "balanceChartData":
|
|
20897
|
-
|
|
20897
|
+
d.length === 0 ? p = [0, 0] : p = d.map((g) => (h.add(g.date), on(g.balance * Qf(), 2)));
|
|
20898
20898
|
break;
|
|
20899
20899
|
case "performanceChartData":
|
|
20900
|
-
|
|
20900
|
+
d.length === 0 ? p = [0, 0] : p = d.reduce((g, y, w) => {
|
|
20901
|
+
h.add(y.date);
|
|
20902
|
+
const b = w ? g[w - 1] : 0, T = on(b + y.pnl_to_deposit, 2);
|
|
20903
|
+
return g.push(T), g;
|
|
20904
|
+
}, []);
|
|
20901
20905
|
break;
|
|
20902
20906
|
}
|
|
20903
20907
|
f.push({
|
|
@@ -30014,14 +30018,7 @@ function Ba(t) {
|
|
|
30014
30018
|
function on(t, e = 2) {
|
|
30015
30019
|
return isNaN(+t) ? 0 : Math.floor(+t * 10 ** e) / 10 ** e;
|
|
30016
30020
|
}
|
|
30017
|
-
function _5(t
|
|
30018
|
-
const n = parseFloat(t.entry_price), s = t.amount, i = t.balance_before, r = t.side;
|
|
30019
|
-
let a = 0;
|
|
30020
|
-
r === "SHORT" ? a = (n - e) * s : r === "LONG" && (a = (e - n) * s);
|
|
30021
|
-
const o = a / i * 100;
|
|
30022
|
-
return { pnl: a, pnlToBalanceRatio: o };
|
|
30023
|
-
}
|
|
30024
|
-
function v5(t) {
|
|
30021
|
+
function _5(t) {
|
|
30025
30022
|
if (isNaN(+t))
|
|
30026
30023
|
return 0;
|
|
30027
30024
|
const e = parseFloat(String(t));
|
|
@@ -30045,19 +30042,19 @@ function Be(t, e, n = {}) {
|
|
|
30045
30042
|
let o, l;
|
|
30046
30043
|
return t ? (o = r === "$" ? Mu() : r, l = a === "$" ? Mu() : a, o + i.repeat(s) + l) : e;
|
|
30047
30044
|
}
|
|
30048
|
-
function
|
|
30045
|
+
function v5(t) {
|
|
30049
30046
|
return t.reduce((e, n, s) => s === 0 ? `key=${encodeURIComponent(n.id)}` : e + `&key=${encodeURIComponent(n.id)}`, "");
|
|
30050
30047
|
}
|
|
30051
|
-
function
|
|
30048
|
+
function b5(t) {
|
|
30052
30049
|
return new Date(t).getFullYear();
|
|
30053
30050
|
}
|
|
30054
|
-
function
|
|
30051
|
+
function w5(t) {
|
|
30055
30052
|
return Oe.fromISO(t, { setZone: !0 }).toFormat("dd LLLL, y, TT");
|
|
30056
30053
|
}
|
|
30057
30054
|
function LV(t) {
|
|
30058
30055
|
return Oe.fromISO(t, { setZone: !0 }).toFormat("dd/LL/y");
|
|
30059
30056
|
}
|
|
30060
|
-
function
|
|
30057
|
+
function k5(t) {
|
|
30061
30058
|
return [
|
|
30062
30059
|
"January",
|
|
30063
30060
|
"February",
|
|
@@ -30073,13 +30070,13 @@ function x5(t) {
|
|
|
30073
30070
|
"December"
|
|
30074
30071
|
][new Date(t).getMonth()];
|
|
30075
30072
|
}
|
|
30076
|
-
function
|
|
30073
|
+
function x5(t) {
|
|
30077
30074
|
return new Date(t).getDate();
|
|
30078
30075
|
}
|
|
30079
30076
|
function Kg(t) {
|
|
30080
30077
|
return Oe.fromISO(t, { setZone: !0 }).toFormat("cccc");
|
|
30081
30078
|
}
|
|
30082
|
-
function
|
|
30079
|
+
function S5(t) {
|
|
30083
30080
|
const e = new Date(t), s = /* @__PURE__ */ new Date() - e;
|
|
30084
30081
|
return Math.floor(s / (1e3 * 3600 * 24));
|
|
30085
30082
|
}
|
|
@@ -30112,7 +30109,7 @@ const ft = (t, e = {
|
|
|
30112
30109
|
let s = Math.abs(t);
|
|
30113
30110
|
return e.isFixed && (s = on(s)), e.isPercentage ? `${n}${s}%` : `${n}${Mu()}${on(s * Qf())}`;
|
|
30114
30111
|
};
|
|
30115
|
-
function
|
|
30112
|
+
function M5(t, e) {
|
|
30116
30113
|
const n = +new Date(e) - +new Date(t), s = Math.floor(n / (1e3 * 60 * 60 * 24)), i = Math.floor(
|
|
30117
30114
|
n % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)
|
|
30118
30115
|
), r = Math.floor(n % (1e3 * 60 * 60) / (1e3 * 60)), a = Math.floor(n % (1e3 * 60) / 1e3);
|
|
@@ -30214,24 +30211,23 @@ export {
|
|
|
30214
30211
|
zf as WidgetChips,
|
|
30215
30212
|
g5 as WinrateWidget,
|
|
30216
30213
|
FV as addSlashToPair,
|
|
30217
|
-
|
|
30218
|
-
T5 as calculateTimeDifference,
|
|
30214
|
+
M5 as calculateTimeDifference,
|
|
30219
30215
|
y5 as firebaseConfig,
|
|
30220
30216
|
LV as formatDate,
|
|
30221
30217
|
Qf as getCurrencyRate,
|
|
30222
30218
|
Mu as getCurrencySymbol,
|
|
30223
|
-
|
|
30219
|
+
x5 as getDate,
|
|
30224
30220
|
Kg as getDay,
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30221
|
+
S5 as getDaysDifference,
|
|
30222
|
+
b5 as getFullYear,
|
|
30223
|
+
k5 as getMonth,
|
|
30228
30224
|
Be as maskData,
|
|
30229
30225
|
Zg as numFormat,
|
|
30230
30226
|
sh as scopeInstance,
|
|
30231
|
-
|
|
30232
|
-
|
|
30227
|
+
w5 as toBaseDate,
|
|
30228
|
+
_5 as toDynamicFix,
|
|
30233
30229
|
on as toFix,
|
|
30234
|
-
|
|
30230
|
+
v5 as transformKeysToQuery,
|
|
30235
30231
|
Jb as useToast,
|
|
30236
30232
|
ft as withSign
|
|
30237
30233
|
};
|