@mx-cartographer/experiences 6.26.18-alpha.mega2 → 6.26.18-alpha.mega4

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 (98) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/dist/Account-DM32_5k9.mjs +30 -0
  3. package/dist/AccountDetailsContent-B_qRSB8l.mjs +677 -0
  4. package/dist/AccountDetailsHeader-CAm6ADMq.mjs +119 -0
  5. package/dist/AccountFields-Bb4pds0q.mjs +135 -0
  6. package/dist/AccountListItem-G7iAesaO.mjs +90 -0
  7. package/dist/AccountStore-RSanus_m.mjs +230 -0
  8. package/dist/Accounts-BfAQRG8R.mjs +9 -0
  9. package/dist/BeatApi-DLu87ijw.mjs +21 -0
  10. package/dist/BeatStore-By4aGoRM.mjs +81 -0
  11. package/dist/BudgetUtil-DcqclhiQ.mjs +101 -0
  12. package/dist/CashflowStore-D9Dpuz7X.mjs +91 -0
  13. package/dist/Category-5S6uwuXz.mjs +301 -0
  14. package/dist/CategorySelectorDrawer-DgrePTRg.mjs +397 -0
  15. package/dist/CategoryStore-B5EW6I1d.mjs +183 -0
  16. package/dist/CategoryUtil-DRyruNgi.mjs +78 -0
  17. package/dist/ConnectDrawer-DPnfeIfn.mjs +508 -0
  18. package/dist/ConnectionsDrawer-BCzpuNsK.mjs +52 -0
  19. package/dist/CurrencyInput-DzsPiUsU.mjs +83 -0
  20. package/dist/CurrencyText-YUhH2caW.mjs +20 -0
  21. package/dist/DateUtil-BcuH7ErC.mjs +48 -0
  22. package/dist/DebtsStore-C6VcBnpG.mjs +60 -0
  23. package/dist/Dialog-CWW597AF.mjs +123 -0
  24. package/dist/Donut-1UMNcG67.mjs +57 -0
  25. package/dist/Drawer-kEE73B87.mjs +113 -0
  26. package/dist/EmptyState-Dcb-o2tl.mjs +55 -0
  27. package/dist/Fetch-CkFKy79O.mjs +116 -0
  28. package/dist/FinstrongStore-mkALvztw.mjs +101 -0
  29. package/dist/GoalStore-DyCr4wNc.mjs +263 -0
  30. package/dist/HeaderCell-DjuifqHJ.mjs +6 -0
  31. package/dist/Help-DhcC-C05.mjs +320 -0
  32. package/dist/Help-toqAK5eD.mjs +3173 -0
  33. package/dist/IconBacking-B9oC6uL2.mjs +39 -0
  34. package/dist/InvestmentUtil-jOyOgzIB.mjs +134 -0
  35. package/dist/LineChart-CQWu5KoO.mjs +403 -0
  36. package/dist/ListItemAction-Df3OPMOW.mjs +69 -0
  37. package/dist/Loader-Dp1P2gNw.mjs +14 -0
  38. package/dist/Localization-2MODESHW.mjs +30 -0
  39. package/dist/ManageIncome-BVt_XQbo.mjs +535 -0
  40. package/dist/MerchantStore-DVH-QOf0.mjs +37 -0
  41. package/dist/MicroWidgetContainer-DaLW43tE.mjs +45 -0
  42. package/dist/MiniWidgetContainer-BcNPxZt2.mjs +39 -0
  43. package/dist/NetWorthStore-DE8CQBMM.mjs +150 -0
  44. package/dist/Notification-AMGWM1Al.mjs +78 -0
  45. package/dist/NotificationSettings-CPZN0l8X.mjs +667 -0
  46. package/dist/NotificationStore-DHtSGySy.mjs +67 -0
  47. package/dist/NumberFormatting-CtWHhyBX.mjs +40 -0
  48. package/dist/OriginalBalanceAction-s9sUxofR.mjs +115 -0
  49. package/dist/RecurringSettings-DIEsympT.mjs +57 -0
  50. package/dist/RecurringTransactionsStore-BKLD3OWo.mjs +263 -0
  51. package/dist/RepeatingTransaction-BPWfaB3f.mjs +282 -0
  52. package/dist/SearchBox-B2_zLv8-.mjs +42 -0
  53. package/dist/SettingsStore-CE7jDVFL.mjs +265 -0
  54. package/dist/SingleSegmentDonut-BgbLgwHi.mjs +69 -0
  55. package/dist/SpendingData-ByFCw95X.mjs +53 -0
  56. package/dist/StatusBar-BK_uYHAB.mjs +30 -0
  57. package/dist/TabContentContainer-j01JYR_7.mjs +21 -0
  58. package/dist/Transaction-C-5-Iuab.mjs +312 -0
  59. package/dist/TransactionApi-DbbcjI2L.mjs +86 -0
  60. package/dist/TransactionDetails-B5qfs9Zh.mjs +1283 -0
  61. package/dist/TransactionStore-BWi6_2Ny.mjs +669 -0
  62. package/dist/TrendsStore-Borh98aN.mjs +448 -0
  63. package/dist/ViewMoreMicroCard-CAPFNz-J.mjs +1959 -0
  64. package/dist/WidgetContainer-CmGNZW0M.mjs +548 -0
  65. package/dist/accounts/index.es.js +752 -0
  66. package/dist/analytics/index.es.js +171 -0
  67. package/dist/budgets/index.es.js +1070 -0
  68. package/dist/cashflow/index.es.js +1098 -0
  69. package/dist/categories/index.es.js +9 -0
  70. package/dist/common/context/hooks.d.ts +13 -13
  71. package/dist/common/index.es.js +1451 -0
  72. package/dist/dashboard/index.es.js +181 -0
  73. package/dist/debts/index.es.js +1460 -0
  74. package/dist/exportTransactionsToCSV-j4g8bdVZ.mjs +47 -0
  75. package/dist/finstrong/index.es.js +1455 -0
  76. package/dist/goals/index.es.js +1209 -0
  77. package/dist/help/components/content/section/index.d.ts +15 -15
  78. package/dist/help/index.es.js +14 -0
  79. package/dist/hooks-ClhFlg78.mjs +71 -0
  80. package/dist/index.d.ts +0 -22
  81. package/dist/insights/index.d.ts +1 -0
  82. package/dist/insights/index.es.js +4 -0
  83. package/dist/investments/index.es.js +1638 -0
  84. package/dist/merchants/index.es.js +79 -0
  85. package/dist/microinsights/index.es.js +16 -0
  86. package/dist/networth/index.es.js +542 -0
  87. package/dist/notifications/index.es.js +192 -0
  88. package/dist/recurringtransactions/index.es.js +879 -0
  89. package/dist/settings/index.es.js +879 -0
  90. package/dist/spending/index.es.js +570 -0
  91. package/dist/transactions/index.es.js +587 -0
  92. package/dist/trends/index.es.js +1103 -0
  93. package/dist/useCombineEvents-DaDBSR_1.mjs +92 -0
  94. package/dist/useDimensions-27p2evRx.mjs +36 -0
  95. package/dist/useScreenSize-B6JyS_Lj.mjs +36 -0
  96. package/package.json +155 -3
  97. package/dist/index.es.js +0 -30339
  98. package/dist/index.es.js.map +0 -1
@@ -0,0 +1,39 @@
1
+ import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
+ import d from "@mui/material/Box";
3
+ import m from "@mui/material/Stack";
4
+ const s = ({
5
+ backingSx: r,
6
+ children: i,
7
+ size: o,
8
+ sx: c
9
+ }) => /* @__PURE__ */ n(
10
+ m,
11
+ {
12
+ sx: {
13
+ display: "grid",
14
+ placeItems: "center",
15
+ zIndex: 3,
16
+ ...c
17
+ },
18
+ children: [
19
+ i,
20
+ /* @__PURE__ */ t(
21
+ d,
22
+ {
23
+ sx: {
24
+ backgroundColor: "common.white",
25
+ borderRadius: "50%",
26
+ height: o,
27
+ width: o,
28
+ gridRow: 1,
29
+ gridColumn: 1,
30
+ ...r
31
+ }
32
+ }
33
+ )
34
+ ]
35
+ }
36
+ ), x = s;
37
+ export {
38
+ x as I
39
+ };
@@ -0,0 +1,134 @@
1
+ import d from "numeral";
2
+ var m = /* @__PURE__ */ ((t) => (t.Stocks = "stocks", t.Bonds = "bonds", t))(m || {});
3
+ const V = {
4
+ UNKNOWN: 0,
5
+ LARGE_VALUE: 1,
6
+ LARGE_CORE: 2,
7
+ LARGE_GROWTH: 3,
8
+ MID_VALUE: 4,
9
+ MID_CORE: 5,
10
+ MID_GROWTH: 6,
11
+ SMALL_VALUE: 7,
12
+ SMALL_CORE: 8,
13
+ SMALL_GROWTH: 9
14
+ }, L = {
15
+ 0: "UNKNOWN",
16
+ 1: "LARGE_VALUE",
17
+ 2: "LARGE_CORE",
18
+ 3: "LARGE_GROWTH",
19
+ 4: "MID_VALUE",
20
+ 5: "MID_CORE",
21
+ 6: "MID_GROWTH",
22
+ 7: "SMALL_VALUE",
23
+ 8: "SMALL_CORE",
24
+ 9: "SMALL_GROWTH"
25
+ }, N = {
26
+ UNKNOWN: 0,
27
+ HIGH_LIMITED: 1,
28
+ HIGH_MODERATE: 2,
29
+ HIGH_EXTENSIVE: 3,
30
+ MEDIUM_LIMITED: 4,
31
+ MEDIUM_MODERATE: 5,
32
+ MEDIUM_EXTENSIVE: 6,
33
+ LOW_LIMITED: 7,
34
+ LOW_MODERATE: 8,
35
+ LOW_EXTENSIVE: 9
36
+ }, O = {
37
+ 0: "UNKNOWN",
38
+ 1: "HIGH_LIMITED",
39
+ 2: "HIGH_MODERATE",
40
+ 3: "HIGH_EXTENSIVE",
41
+ 4: "MEDIUM_LIMITED",
42
+ 5: "MEDIUM_MODERATE",
43
+ 6: "MEDIUM_EXTENSIVE",
44
+ 7: "LOW_LIMITED",
45
+ 8: "LOW_MODERATE",
46
+ 9: "LOW_EXTENSIVE"
47
+ }, A = (t, s = 3) => {
48
+ const a = Object.keys(t).map(Number).filter((e) => e !== 0).sort((e, c) => e - c), o = [];
49
+ for (let e = 0; e < a.length; e += s)
50
+ o.push(a.slice(e, e + s).map((c) => t[c]));
51
+ return o;
52
+ }, W = A(O), h = A(L), w = (t) => {
53
+ const s = M(t, g), a = M(t, f), o = (c, i) => {
54
+ const _ = c.reduce((n, r) => n + T(r), 0), u = c.reduce((n, r) => {
55
+ const l = i(r);
56
+ return Object.keys(l).forEach((E) => n[E] = (n[E] || 0) + l[E]), n;
57
+ }, {});
58
+ return Object.fromEntries(
59
+ Object.entries(u).map(([n, r]) => [n, r / _ * 100])
60
+ );
61
+ };
62
+ return {
63
+ stocks: o(s, D),
64
+ bonds: o(a, R)
65
+ };
66
+ }, S = (t) => {
67
+ const s = t.filter((e) => !isNaN(e.equity_classification)), a = t.filter((e) => !isNaN(e.fixed_income_classification)), o = (e, c, i) => e.reduce((_, u) => {
68
+ const n = c(u);
69
+ return Object.keys(i).forEach((r) => {
70
+ _[r] = (_[r] || 0) + (n[r] || 0);
71
+ }), _;
72
+ }, {});
73
+ return {
74
+ stocks: o(s, D, V),
75
+ bonds: o(a, R, N)
76
+ };
77
+ }, H = (t, s) => Object.fromEntries(
78
+ Object.entries(t).map(([a, o]) => [a, o * s / 100])
79
+ ), R = (t) => G(t, f, O), f = (t) => {
80
+ const s = t.fixed_income_classification;
81
+ return {
82
+ [O[s]]: 100
83
+ };
84
+ }, D = (t) => G(t, g, L), g = (t) => {
85
+ const {
86
+ large_core_weight: s,
87
+ large_growth_weight: a,
88
+ large_value_weight: o,
89
+ mid_core_weight: e,
90
+ mid_growth_weight: c,
91
+ mid_value_weight: i,
92
+ small_core_weight: _,
93
+ small_growth_weight: u,
94
+ small_value_weight: n,
95
+ unknown_weight: r,
96
+ equity_classification: l
97
+ } = t, E = {
98
+ LARGE_CORE: s ?? 0,
99
+ LARGE_GROWTH: a ?? 0,
100
+ LARGE_VALUE: o ?? 0,
101
+ MID_CORE: e ?? 0,
102
+ MID_GROWTH: c ?? 0,
103
+ MID_VALUE: i ?? 0,
104
+ SMALL_CORE: _ ?? 0,
105
+ SMALL_GROWTH: u ?? 0,
106
+ SMALL_VALUE: n ?? 0,
107
+ UNKNOWN: r ?? 0
108
+ };
109
+ return I(E) === 0 && l !== void 0 ? { [L[l]]: 100 } : E;
110
+ }, G = (t, s, a) => {
111
+ const o = s(t), e = T(t), c = H(o, e);
112
+ if (I(c) === 0) {
113
+ const i = String(
114
+ t.equity_classification ?? t.fixed_income_classification
115
+ );
116
+ if (!(i in a))
117
+ throw new Error(`Invalid classification key: ${i}`);
118
+ return { [a[i]]: e };
119
+ }
120
+ return c;
121
+ }, b = (t) => t.split("_").map((s) => s.charAt(0).toUpperCase() + s.slice(1).toLowerCase()).join(" "), p = (t) => t >= 1 ? `${d(t).format("0")}%` : "< 1%", T = (t) => t.calculated_market_value ?? t.market_value, M = (t, s) => t.filter((a) => {
122
+ const o = s(a), e = I(o);
123
+ return e > 80 && e < 120;
124
+ }), C = (t, s) => {
125
+ const a = s === m.Stocks ? h : W, o = t[s];
126
+ return !o || !o || Object.keys(o).length === 0 ? a.map((e) => e.map(() => "0%")) : a.map((e) => e.map((c) => p(o[c] ?? 0)));
127
+ }, I = (t) => Object.values(t).reduce((s, a) => s + a, 0);
128
+ export {
129
+ m as A,
130
+ w as a,
131
+ S as b,
132
+ b as f,
133
+ C as m
134
+ };
@@ -0,0 +1,403 @@
1
+ import { jsxs as r, Fragment as w, jsx as t } from "react/jsx-runtime";
2
+ import { useTheme as B } from "@mui/material/styles";
3
+ import { ResponsiveChartContainer as q, ChartsReferenceLine as J, AreaPlot as K, LinePlot as Z, MarkPlot as _, BarPlot as ee, ChartsXAxis as te, ChartsYAxis as ne, ChartsAxisHighlight as ae } from "@mui/x-charts";
4
+ import re from "@mui/material/useMediaQuery";
5
+ import { f as k } from "./NumberFormatting-CtWHhyBX.mjs";
6
+ import { observer as ie } from "mobx-react-lite";
7
+ import { Stack as b, Box as N, useTheme as oe } from "@mui/material";
8
+ import { Text as h } from "@mxenabled/mxui";
9
+ import { u as le } from "./hooks-ClhFlg78.mjs";
10
+ import { ChartsTooltip as se } from "@mui/x-charts/ChartsTooltip";
11
+ const ce = (e) => {
12
+ const a = B(), i = e.showLabel, o = e.style, m = Number(e.x), s = Number(e.y), d = e.handlers?.onMarkClick, f = e.handlers?.onMouseEnter, l = e.handlers?.onMouseLeave, c = re(a.breakpoints.up("sm")), x = e.valueFormatterString ? k(e.yData[e.dataIndex], e.valueFormatterString) : String(e.yData[e.dataIndex]), u = c ? a.typography.Small?.fontSize : a.typography.XSmall?.fontSize, v = u ? parseFloat(u.toString()) * 0.6 : 8, p = x.length * v + 8 + 8, L = 24, C = m - p / 2, D = s - 30;
13
+ return /* @__PURE__ */ r(w, { children: [
14
+ i && /* @__PURE__ */ r(w, { children: [
15
+ e.labelBackgroundColor && /* @__PURE__ */ t(
16
+ "rect",
17
+ {
18
+ fill: e.labelBackgroundColor,
19
+ height: L,
20
+ rx: "3",
21
+ width: p,
22
+ x: C,
23
+ y: D
24
+ }
25
+ ),
26
+ /* @__PURE__ */ t(
27
+ "text",
28
+ {
29
+ dominantBaseline: "middle",
30
+ fill: e.labelFontColor ? e.labelFontColor : a.palette.text.primary,
31
+ style: {
32
+ fontSize: e.labelFontSize ? e.labelFontSize : u
33
+ },
34
+ textAnchor: "middle",
35
+ x: m,
36
+ y: s - 28 + L / 2,
37
+ children: x
38
+ }
39
+ )
40
+ ] }),
41
+ /* @__PURE__ */ t(
42
+ "path",
43
+ {
44
+ cursor: d ? "pointer" : "unset",
45
+ d: "M4.514,0A4.514,4.514,0,1,1,-4.514,0A4.514,4.514,0,1,1,4.514,0",
46
+ height: "20px",
47
+ onClick: (I) => {
48
+ d?.(I, e.dataIndex);
49
+ },
50
+ onMouseEnter: () => {
51
+ f?.(e.dataIndex);
52
+ },
53
+ onMouseLeave: () => {
54
+ l?.();
55
+ },
56
+ style: {
57
+ fill: o?.fill ? o.fill : a.palette.background.paper,
58
+ stroke: o?.stroke ? o.stroke : a.palette.primary.main,
59
+ strokeWidth: 2,
60
+ transform: `translate(${e.x}px, ${e.y}px)`,
61
+ transformOrigin: `${e.x}px, ${e.y}px`,
62
+ filter: o?.filter ? o.filter : "none"
63
+ },
64
+ width: "20px"
65
+ }
66
+ )
67
+ ] });
68
+ }, de = (e) => /* @__PURE__ */ r(w, { children: [
69
+ /* @__PURE__ */ t("clipPath", { id: e.id, children: /* @__PURE__ */ t("rect", { height: e.height, width: e.width, x: "0", y: "0" }) }),
70
+ /* @__PURE__ */ t("g", { children: /* @__PURE__ */ t(
71
+ "path",
72
+ {
73
+ cursor: "unset",
74
+ d: e.d,
75
+ style: {
76
+ strokeWidth: 2,
77
+ strokeLinejoin: "round",
78
+ fill: "none",
79
+ stroke: e.lineColor ? e.lineColor : e.stroke,
80
+ transition: "opacity 0.2s ease-in, stroke 0.2s ease-in",
81
+ opacity: 1
82
+ }
83
+ }
84
+ ) })
85
+ ] }), he = ({
86
+ label: e,
87
+ customLegendVariant: a
88
+ }) => {
89
+ const i = a || "Small";
90
+ return typeof e == "string" ? /* @__PURE__ */ t(h, { variant: i, children: e }) : typeof e == "object" && e.amount && e.label ? /* @__PURE__ */ r(w, { children: [
91
+ /* @__PURE__ */ t(h, { variant: i, children: e.label }),
92
+ /* @__PURE__ */ t(h, { bold: !0, sx: { marginLeft: 8 }, variant: i, children: k(e.amount, "0,0") })
93
+ ] }) : null;
94
+ }, me = ({
95
+ average: e,
96
+ customLegendVariant: a,
97
+ labels: i = [],
98
+ series: o,
99
+ style: m,
100
+ title: s,
101
+ valueFormatterString: d
102
+ }) => {
103
+ const { common: f } = le(), l = a || "Small";
104
+ return /* @__PURE__ */ r(b, { style: { flexDirection: "row", gap: 24, ...m }, children: [
105
+ o.map((c, x) => {
106
+ const u = i[x];
107
+ return u ? /* @__PURE__ */ r(
108
+ b,
109
+ {
110
+ style: { alignItems: "center", flexDirection: "row", flexWrap: "wrap" },
111
+ children: [
112
+ /* @__PURE__ */ t(
113
+ N,
114
+ {
115
+ sx: {
116
+ width: 10,
117
+ height: 10,
118
+ backgroundColor: c.color,
119
+ marginRight: 8
120
+ }
121
+ }
122
+ ),
123
+ /* @__PURE__ */ t(he, { customLegendVariant: a, label: u })
124
+ ]
125
+ },
126
+ x
127
+ ) : null;
128
+ }),
129
+ e && /* @__PURE__ */ r(b, { sx: { alignItems: "center", flexDirection: "row" }, children: [
130
+ /* @__PURE__ */ t(h, { bold: !0, sx: { marginRight: 8 }, variant: l, children: "– –" }),
131
+ /* @__PURE__ */ r(h, { variant: l, children: [
132
+ s || f.average,
133
+ "  "
134
+ ] }),
135
+ /* @__PURE__ */ t(h, { bold: !0, variant: l, children: d ? k(e, d) : e })
136
+ ] })
137
+ ] });
138
+ }, ue = ie(me);
139
+ function fe({ labels: e = [], valueFormatterString: a = "0,0" }) {
140
+ const i = oe();
141
+ return /* @__PURE__ */ t(
142
+ se,
143
+ {
144
+ showCrosshair: !0,
145
+ slots: {
146
+ axisContent: (o) => {
147
+ const { axisValue: m, dataIndex: s, series: d } = o, f = s ?? 0;
148
+ return /* @__PURE__ */ r(
149
+ b,
150
+ {
151
+ sx: {
152
+ backgroundColor: i.palette.background.paper,
153
+ boxShadow: "0 2px 8px 0 rgba(0, 0, 0, 0.12)",
154
+ flexDirection: "column",
155
+ alignItems: "flex-start",
156
+ borderRadius: "4px",
157
+ width: 225,
158
+ gap: 8,
159
+ px: 16,
160
+ py: 12
161
+ },
162
+ children: [
163
+ /* @__PURE__ */ t(h, { variant: "H3", children: String(m) }),
164
+ d.map((l, c) => /* @__PURE__ */ r(
165
+ b,
166
+ {
167
+ sx: {
168
+ flexDirection: "row",
169
+ justifyContent: "space-between",
170
+ alignItems: "center",
171
+ alignSelf: "stretch",
172
+ gap: 8,
173
+ marginTop: 4
174
+ },
175
+ children: [
176
+ /* @__PURE__ */ r(b, { sx: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
177
+ /* @__PURE__ */ t(
178
+ N,
179
+ {
180
+ sx: {
181
+ width: "12px",
182
+ height: "12px",
183
+ backgroundColor: l.color,
184
+ borderRadius: "4px"
185
+ }
186
+ }
187
+ ),
188
+ /* @__PURE__ */ t(h, { variant: "Body", children: typeof e[c] == "string" ? e[c] : e[c]?.label })
189
+ ] }),
190
+ /* @__PURE__ */ t(h, { bold: !0, variant: "Body", children: k(l.data[f], a) })
191
+ ]
192
+ },
193
+ l.id
194
+ ))
195
+ ]
196
+ }
197
+ );
198
+ }
199
+ },
200
+ trigger: "axis"
201
+ }
202
+ );
203
+ }
204
+ const ve = ({
205
+ axisColor: e,
206
+ baseline: a = "max",
207
+ colors: i,
208
+ curveType: o = "linear",
209
+ customLegendVariant: m,
210
+ datasets: s,
211
+ height: d,
212
+ isGraphClippingXAxis: f = !1,
213
+ labels: l,
214
+ labelBackgroundColor: c,
215
+ labelFontColor: x,
216
+ labelFontSize: u,
217
+ margin: v,
218
+ markHandlers: A,
219
+ markStyles: $,
220
+ showArea: T = !1,
221
+ showAverage: p = !1,
222
+ showAxisHighlight: L = !1,
223
+ showBars: C = !1,
224
+ showLegend: D = !1,
225
+ showMarkLabel: I = !1,
226
+ showTooltip: E = !1,
227
+ showXAxis: F = !1,
228
+ showXAxisTicks: H = !1,
229
+ showYAxis: X = !1,
230
+ showYAxisTicks: Y = !1,
231
+ title: G,
232
+ useCustomMark: O = !1,
233
+ valueFormatterString: g,
234
+ width: Q
235
+ }) => {
236
+ const y = B(), U = s.flat().map((n) => n.x), M = s.flat().map((n) => n.y), z = Math.round(M.reduce((n, W) => W + n, 0) / M.length), P = Math.floor(Math.min(...M) / 100) * 100, j = Math.ceil(Math.max(...M) / 100) * 100, R = s.map((n, W) => ({
237
+ type: C ? "bar" : "line",
238
+ curve: o,
239
+ color: C ? y.palette.chart?.chart6 : i[W] ?? y.palette.primary.main,
240
+ data: n.map((S) => S.y),
241
+ area: T,
242
+ baseline: a,
243
+ showMark: !0,
244
+ valueFormatter: (S) => g ? k(S || 0, g) : String(S)
245
+ })), V = {
246
+ ...{
247
+ top: 60,
248
+ right: 35,
249
+ bottom: 50,
250
+ left: 50
251
+ },
252
+ ...v
253
+ };
254
+ return /* @__PURE__ */ r("div", { style: { position: "relative" }, children: [
255
+ /* @__PURE__ */ r(
256
+ q,
257
+ {
258
+ height: d,
259
+ margin: V,
260
+ series: R,
261
+ sx: {
262
+ p: 4,
263
+ "& .MuiBarLabel-root": {
264
+ fontSize: 10,
265
+ fontWeight: 600
266
+ },
267
+ "& .MuiAreaElement-root": {
268
+ opacity: 0.15
269
+ }
270
+ },
271
+ width: Q,
272
+ xAxis: [{ data: U, scaleType: C ? "band" : "point" }],
273
+ yAxis: [
274
+ {
275
+ min: f ? -22 : P,
276
+ max: j || 100,
277
+ colorMap: T && R.length < 2 ? {
278
+ type: "continuous",
279
+ min: P,
280
+ max: j,
281
+ color: [
282
+ y.palette.background.paper,
283
+ i[0] ?? y.palette.primary.main
284
+ ]
285
+ } : void 0,
286
+ valueFormatter: (n) => g ? k(n, g) : String(n)
287
+ }
288
+ ],
289
+ children: [
290
+ p && /* @__PURE__ */ t(
291
+ J,
292
+ {
293
+ lineStyle: {
294
+ stroke: c ? y.palette.neutral.main : y.palette.neutral.dark,
295
+ strokeDasharray: "10, 8",
296
+ strokeWidth: 2
297
+ },
298
+ y: z
299
+ }
300
+ ),
301
+ /* @__PURE__ */ t(K, {}),
302
+ /* @__PURE__ */ t(
303
+ Z,
304
+ {
305
+ slots: {
306
+ line: (n) => /* @__PURE__ */ t(
307
+ de,
308
+ {
309
+ ...n,
310
+ lineColor: n.ownerState.color ?? y.palette.primary.main
311
+ }
312
+ )
313
+ }
314
+ }
315
+ ),
316
+ /* @__PURE__ */ t(
317
+ _,
318
+ {
319
+ slots: O ? {
320
+ mark: (n) => /* @__PURE__ */ t(
321
+ ce,
322
+ {
323
+ handlers: A,
324
+ labelBackgroundColor: c,
325
+ labelFontColor: x,
326
+ labelFontSize: u,
327
+ showLabel: I,
328
+ style: $?.(n.dataIndex) ?? {},
329
+ valueFormatterString: g,
330
+ yData: M,
331
+ ...n
332
+ }
333
+ )
334
+ } : void 0
335
+ }
336
+ ),
337
+ /* @__PURE__ */ t(
338
+ ee,
339
+ {
340
+ barLabel: (n) => Number(n.value) > 0 ? `$${n.value}` : null,
341
+ borderRadius: 10
342
+ }
343
+ ),
344
+ /* @__PURE__ */ t(
345
+ te,
346
+ {
347
+ disableLine: !F,
348
+ disableTicks: !H,
349
+ slotProps: e ? {
350
+ axisLine: {
351
+ style: {
352
+ stroke: e
353
+ }
354
+ },
355
+ axisTick: {
356
+ style: {
357
+ stroke: e
358
+ }
359
+ }
360
+ } : {}
361
+ }
362
+ ),
363
+ /* @__PURE__ */ t(
364
+ ne,
365
+ {
366
+ disableLine: !X,
367
+ disableTicks: !Y,
368
+ slotProps: e ? {
369
+ axisLine: {
370
+ style: {
371
+ stroke: e
372
+ }
373
+ },
374
+ axisTick: {
375
+ style: {
376
+ stroke: e
377
+ }
378
+ }
379
+ } : {}
380
+ }
381
+ ),
382
+ L && /* @__PURE__ */ t(ae, { x: "line" }),
383
+ E && /* @__PURE__ */ t(fe, { labels: l, valueFormatterString: g })
384
+ ]
385
+ }
386
+ ),
387
+ D && /* @__PURE__ */ t(
388
+ ue,
389
+ {
390
+ average: p ? z : void 0,
391
+ customLegendVariant: m,
392
+ labels: l,
393
+ series: R,
394
+ style: { position: "absolute", top: 16, left: 16 },
395
+ title: G,
396
+ valueFormatterString: g
397
+ }
398
+ )
399
+ ] });
400
+ };
401
+ export {
402
+ ve as L
403
+ };
@@ -0,0 +1,69 @@
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import b from "react";
3
+ import { observer as v } from "mobx-react-lite";
4
+ import x from "@mui/material/ListItem";
5
+ import C from "@mui/material/ListItemButton";
6
+ import I from "@mui/material/ListItemText";
7
+ import L from "@mui/material/Stack";
8
+ import { ChevronRight as g } from "@mxenabled/mx-icons";
9
+ import { Text as m } from "@mxenabled/mxui";
10
+ import { a as j } from "./Dialog-CWW597AF.mjs";
11
+ import { u as P } from "./hooks-ClhFlg78.mjs";
12
+ const D = v(
13
+ ({
14
+ children: n,
15
+ isDisabled: i = !1,
16
+ isSaveDisabled: s = !1,
17
+ label: p,
18
+ onCancel: c,
19
+ onSave: l,
20
+ primaryText: f,
21
+ secondaryText: y,
22
+ zeroStateText: o
23
+ }) => {
24
+ const { common: a } = P(), [d, t] = b.useState(!1), h = () => {
25
+ t(!1), c?.();
26
+ }, u = () => {
27
+ t(!1), l();
28
+ };
29
+ return /* @__PURE__ */ e(x, { children: [
30
+ /* @__PURE__ */ e(C, { onClick: () => t(!i), children: [
31
+ /* @__PURE__ */ r(
32
+ I,
33
+ {
34
+ primary: /* @__PURE__ */ e(L, { alignItems: "center", direction: "row", justifyContent: "space-between", children: [
35
+ /* @__PURE__ */ r(m, { variant: "body1", children: f }),
36
+ /* @__PURE__ */ r(
37
+ m,
38
+ {
39
+ bold: !0,
40
+ color: o ? "primary.main" : "text.primary",
41
+ sx: { mr: 4 },
42
+ variant: "body1",
43
+ children: o || y
44
+ }
45
+ )
46
+ ] }),
47
+ primaryTypographyProps: { variant: "body1" }
48
+ }
49
+ ),
50
+ !i && !o && /* @__PURE__ */ r(g, {})
51
+ ] }),
52
+ /* @__PURE__ */ r(
53
+ j,
54
+ {
55
+ copy: { title: p, close_aria: a.close_aria },
56
+ disablePrimaryButton: s,
57
+ isOpen: d,
58
+ onClose: h,
59
+ onPrimaryAction: u,
60
+ primaryText: a.save_button,
61
+ children: n
62
+ }
63
+ )
64
+ ] });
65
+ }
66
+ );
67
+ export {
68
+ D as L
69
+ };
@@ -0,0 +1,14 @@
1
+ import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
+ import c from "@mui/material/CircularProgress";
3
+ import i from "@mui/material/Stack";
4
+ import { useTokens as m, Text as a } from "@mxenabled/mxui";
5
+ const p = ({ height: t = 250, label: r = "", size: e = 32 }) => {
6
+ const n = m();
7
+ return /* @__PURE__ */ s(i, { alignItems: "center", gap: n.Spacing.XLarge, height: t, justifyContent: "center", children: [
8
+ /* @__PURE__ */ o(c, { size: e }),
9
+ r && /* @__PURE__ */ o(a, { children: r })
10
+ ] });
11
+ }, x = p;
12
+ export {
13
+ x as L
14
+ };
@@ -0,0 +1,30 @@
1
+ import u from "react";
2
+ const y = /(?<static>.*?)(?<dynamic>(?:_\d+{(?:.*?)}))|(?<staticEnd>.+)/g, h = (n, ...e) => {
3
+ if (!n) return "";
4
+ const s = e.some((i) => typeof i != "string"), a = [...n.matchAll(y)].reduce(
5
+ (i, d, m) => {
6
+ const o = [...i], t = d.groups;
7
+ if (t?.static && o.push(t.static), t?.dynamic) {
8
+ const l = t.dynamic.indexOf("{"), p = t.dynamic.substring(l + 1, t.dynamic.length - 1), r = Number(t.dynamic.substring(1, l));
9
+ if (u.isValidElement(e[r - 1])) {
10
+ const f = e[r - 1], g = u.cloneElement(f, {
11
+ key: `${p}-${m}`
12
+ });
13
+ o.push(g);
14
+ } else
15
+ o.push(e[r - 1]);
16
+ }
17
+ return t?.staticEnd && o.push(t.staticEnd), o;
18
+ },
19
+ []
20
+ );
21
+ return s ? a : a.join("");
22
+ }, w = (n, e, s, ...c) => !n || !e ? "" : h(s === 1 ? n : e, ...c), E = () => {
23
+ const n = "en-us", e = ["en-us", "en-ca", "fr", "fr-ca", "es"], s = window?.app?.options?.language?.toLowerCase() ?? "", c = window.navigator.language.toLowerCase();
24
+ return s === "browser" && e.includes(c) ? c : e.includes(s) ? s : n;
25
+ };
26
+ export {
27
+ w as a,
28
+ h as b,
29
+ E as g
30
+ };