scope360-core 0.0.229 → 0.0.231
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
|
@@ -21715,7 +21715,7 @@ const ev = /* @__PURE__ */ OR("line", Ll), PR = { class: "chart-container" }, tv
|
|
|
21715
21715
|
])
|
|
21716
21716
|
]));
|
|
21717
21717
|
}
|
|
21718
|
-
}, p5 = /* @__PURE__ */ Ue(C$, [["__scopeId", "data-v-139cca32"]]), bf = (t) => (xn("data-v-
|
|
21718
|
+
}, p5 = /* @__PURE__ */ Ue(C$, [["__scopeId", "data-v-139cca32"]]), bf = (t) => (xn("data-v-ac0909db"), t = t(), Sn(), t), A$ = { class: "winrate-widget" }, R$ = { class: "winrate-widget__winrate" }, E$ = { class: "winrate-widget__title-wrapper" }, $$ = /* @__PURE__ */ bf(() => /* @__PURE__ */ A("div", { class: "winrate-widget__title" }, "Daily Winrate", -1)), I$ = { class: "winrate-widget__chart" }, N$ = { class: "winrate-widget__data" }, L$ = { class: "winrate-widget__data_value" }, F$ = /* @__PURE__ */ bf(() => /* @__PURE__ */ A("div", { class: "winrate-widget__data_title" }, "Winrate", -1)), Y$ = { class: "winrate-widget__average-rr" }, V$ = { class: "winrate-widget__title-wrapper" }, B$ = /* @__PURE__ */ bf(() => /* @__PURE__ */ A("div", { class: "winrate-widget__title" }, "Average RR", -1)), W$ = {
|
|
21719
21719
|
__name: "WinrateWidget",
|
|
21720
21720
|
props: {
|
|
21721
21721
|
winrate: { type: Number, default: 0 },
|
|
@@ -21763,7 +21763,7 @@ const ev = /* @__PURE__ */ OR("line", Ll), PR = { class: "chart-container" }, tv
|
|
|
21763
21763
|
])
|
|
21764
21764
|
]));
|
|
21765
21765
|
}
|
|
21766
|
-
}, g5 = /* @__PURE__ */ Ue(W$, [["__scopeId", "data-v-
|
|
21766
|
+
}, g5 = /* @__PURE__ */ Ue(W$, [["__scopeId", "data-v-ac0909db"]]), z$ = (t) => (xn("data-v-e6d713b2"), t = t(), Sn(), t), H$ = { class: "average-rr-line-container" }, U$ = { class: "average-rr-line" }, j$ = {
|
|
21767
21767
|
key: 0,
|
|
21768
21768
|
class: "average-rr-line__progress"
|
|
21769
21769
|
}, q$ = /* @__PURE__ */ z$(() => /* @__PURE__ */ A("div", { class: "average-rr-line__dot" }, null, -1)), G$ = [
|
|
@@ -30018,7 +30018,14 @@ function Ba(t) {
|
|
|
30018
30018
|
function on(t, e = 2) {
|
|
30019
30019
|
return isNaN(+t) ? 0 : Math.floor(+t * 10 ** e) / 10 ** e;
|
|
30020
30020
|
}
|
|
30021
|
-
function _5(t) {
|
|
30021
|
+
function _5(t, e) {
|
|
30022
|
+
const n = parseFloat(t.entry_price), s = t.amount, i = t.balance_before, r = t.side;
|
|
30023
|
+
let a = 0;
|
|
30024
|
+
r === "SHORT" ? a = (n - e) * s : r === "LONG" && (a = (e - n) * s);
|
|
30025
|
+
const o = a / i * 100;
|
|
30026
|
+
return { pnl: a, pnlToBalanceRatio: o };
|
|
30027
|
+
}
|
|
30028
|
+
function v5(t) {
|
|
30022
30029
|
if (isNaN(+t))
|
|
30023
30030
|
return 0;
|
|
30024
30031
|
const e = parseFloat(String(t));
|
|
@@ -30042,19 +30049,19 @@ function Be(t, e, n = {}) {
|
|
|
30042
30049
|
let o, l;
|
|
30043
30050
|
return t ? (o = r === "$" ? Mu() : r, l = a === "$" ? Mu() : a, o + i.repeat(s) + l) : e;
|
|
30044
30051
|
}
|
|
30045
|
-
function
|
|
30052
|
+
function b5(t) {
|
|
30046
30053
|
return t.reduce((e, n, s) => s === 0 ? `key=${encodeURIComponent(n.id)}` : e + `&key=${encodeURIComponent(n.id)}`, "");
|
|
30047
30054
|
}
|
|
30048
|
-
function
|
|
30055
|
+
function w5(t) {
|
|
30049
30056
|
return new Date(t).getFullYear();
|
|
30050
30057
|
}
|
|
30051
|
-
function
|
|
30058
|
+
function k5(t) {
|
|
30052
30059
|
return Oe.fromISO(t, { setZone: !0 }).toFormat("dd LLLL, y, TT");
|
|
30053
30060
|
}
|
|
30054
30061
|
function LV(t) {
|
|
30055
30062
|
return Oe.fromISO(t, { setZone: !0 }).toFormat("dd/LL/y");
|
|
30056
30063
|
}
|
|
30057
|
-
function
|
|
30064
|
+
function x5(t) {
|
|
30058
30065
|
return [
|
|
30059
30066
|
"January",
|
|
30060
30067
|
"February",
|
|
@@ -30070,13 +30077,13 @@ function k5(t) {
|
|
|
30070
30077
|
"December"
|
|
30071
30078
|
][new Date(t).getMonth()];
|
|
30072
30079
|
}
|
|
30073
|
-
function
|
|
30080
|
+
function S5(t) {
|
|
30074
30081
|
return new Date(t).getDate();
|
|
30075
30082
|
}
|
|
30076
30083
|
function Kg(t) {
|
|
30077
30084
|
return Oe.fromISO(t, { setZone: !0 }).toFormat("cccc");
|
|
30078
30085
|
}
|
|
30079
|
-
function
|
|
30086
|
+
function M5(t) {
|
|
30080
30087
|
const e = new Date(t), s = /* @__PURE__ */ new Date() - e;
|
|
30081
30088
|
return Math.floor(s / (1e3 * 3600 * 24));
|
|
30082
30089
|
}
|
|
@@ -30109,18 +30116,9 @@ const ft = (t, e = {
|
|
|
30109
30116
|
let s = Math.abs(t);
|
|
30110
30117
|
return e.isFixed && (s = on(s)), e.isPercentage ? `${n}${s}%` : `${n}${Mu()}${on(s * Qf())}`;
|
|
30111
30118
|
};
|
|
30112
|
-
function
|
|
30113
|
-
const n = +new Date(e) - +new Date(t), s = Math.floor(n / (1e3 * 60 * 60 * 24)), i = Math.floor(
|
|
30114
|
-
|
|
30115
|
-
), r = Math.floor(n % (1e3 * 60 * 60) / (1e3 * 60)), a = Math.floor(n % (1e3 * 60) / 1e3);
|
|
30116
|
-
if (s > 0)
|
|
30117
|
-
return `${s} d`;
|
|
30118
|
-
if (i > 0)
|
|
30119
|
-
return `${i} h`;
|
|
30120
|
-
if (r > 0)
|
|
30121
|
-
return `${r} m`;
|
|
30122
|
-
if (a > 0)
|
|
30123
|
-
return `${a} s`;
|
|
30119
|
+
function T5(t, e) {
|
|
30120
|
+
const n = +new Date(e) - +new Date(t), s = Math.floor(n / (1e3 * 60 * 60 * 24)), i = Math.floor(n % (1e3 * 60 * 60 * 24) / (1e3 * 60 * 60)), r = Math.floor(n % (1e3 * 60 * 60) / (1e3 * 60)), a = Math.floor(n % (1e3 * 60) / 1e3), o = [];
|
|
30121
|
+
return s > 0 && o.push(`${s}D`), i > 0 && o.push(`${i}H`), r > 0 && o.push(`${r}M`), a > 0 && o.push(`${a}S`), o.join(" ");
|
|
30124
30122
|
}
|
|
30125
30123
|
function FV(t) {
|
|
30126
30124
|
const e = /^(.*?)(BTC|ETH|USDT|USD|USDC)$/, n = t.match(e);
|
|
@@ -30211,23 +30209,24 @@ export {
|
|
|
30211
30209
|
zf as WidgetChips,
|
|
30212
30210
|
g5 as WinrateWidget,
|
|
30213
30211
|
FV as addSlashToPair,
|
|
30214
|
-
|
|
30212
|
+
_5 as calculatePNL,
|
|
30213
|
+
T5 as calculateTimeDifference,
|
|
30215
30214
|
y5 as firebaseConfig,
|
|
30216
30215
|
LV as formatDate,
|
|
30217
30216
|
Qf as getCurrencyRate,
|
|
30218
30217
|
Mu as getCurrencySymbol,
|
|
30219
|
-
|
|
30218
|
+
S5 as getDate,
|
|
30220
30219
|
Kg as getDay,
|
|
30221
|
-
|
|
30222
|
-
|
|
30223
|
-
|
|
30220
|
+
M5 as getDaysDifference,
|
|
30221
|
+
w5 as getFullYear,
|
|
30222
|
+
x5 as getMonth,
|
|
30224
30223
|
Be as maskData,
|
|
30225
30224
|
Zg as numFormat,
|
|
30226
30225
|
sh as scopeInstance,
|
|
30227
|
-
|
|
30228
|
-
|
|
30226
|
+
k5 as toBaseDate,
|
|
30227
|
+
v5 as toDynamicFix,
|
|
30229
30228
|
on as toFix,
|
|
30230
|
-
|
|
30229
|
+
b5 as transformKeysToQuery,
|
|
30231
30230
|
Jb as useToast,
|
|
30232
30231
|
ft as withSign
|
|
30233
30232
|
};
|