scope360-core 0.0.227 → 0.0.228

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