@burdenoff/microfe-atheletebridge 2026.626.1 → 2026.628.1

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 (162) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoot.js +49 -129
  2. package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
  3. package/dist/atheletebridge/AthleteBridgeRoutes.js +65 -184
  4. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  5. package/dist/atheletebridge/components/CursorPager.js +34 -0
  6. package/dist/atheletebridge/components/CursorPager.js.map +1 -0
  7. package/dist/atheletebridge/components/FilterSelect.js +22 -0
  8. package/dist/atheletebridge/components/FilterSelect.js.map +1 -0
  9. package/dist/atheletebridge/components/FixtureCard.js +76 -0
  10. package/dist/atheletebridge/components/FixtureCard.js.map +1 -0
  11. package/dist/atheletebridge/components/LoadingState.js +36 -0
  12. package/dist/atheletebridge/components/LoadingState.js.map +1 -0
  13. package/dist/atheletebridge/components/ProgramCard.js +69 -0
  14. package/dist/atheletebridge/components/ProgramCard.js.map +1 -0
  15. package/dist/atheletebridge/components/SessionCard.js +76 -0
  16. package/dist/atheletebridge/components/SessionCard.js.map +1 -0
  17. package/dist/atheletebridge/components/StatusBadge.js +44 -35
  18. package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
  19. package/dist/atheletebridge/components/TeamCard.js +81 -0
  20. package/dist/atheletebridge/components/TeamCard.js.map +1 -0
  21. package/dist/atheletebridge/components/domain.js +47 -0
  22. package/dist/atheletebridge/components/domain.js.map +1 -0
  23. package/dist/atheletebridge/components/form.js +29 -0
  24. package/dist/atheletebridge/components/form.js.map +1 -0
  25. package/dist/atheletebridge/context/AthleteBridgeContext.js +6 -6
  26. package/dist/atheletebridge/context/AthleteBridgeContext.js.map +1 -1
  27. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +342 -165
  28. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
  29. package/dist/atheletebridge/index.js +1 -1
  30. package/dist/atheletebridge/pages/DashboardPage.js +169 -0
  31. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -0
  32. package/dist/atheletebridge/pages/StandingsPage.js +166 -0
  33. package/dist/atheletebridge/pages/StandingsPage.js.map +1 -0
  34. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +201 -0
  35. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -0
  36. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +205 -0
  37. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -0
  38. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +92 -0
  39. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -0
  40. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +374 -0
  41. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -0
  42. package/dist/atheletebridge/pages/programs/ProgramFormPage.js +207 -0
  43. package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -0
  44. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +113 -0
  45. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -0
  46. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +224 -0
  47. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -0
  48. package/dist/atheletebridge/pages/sessions/SessionFormPage.js +206 -0
  49. package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -0
  50. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +92 -0
  51. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -0
  52. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +350 -0
  53. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -0
  54. package/dist/atheletebridge/pages/teams/TeamFormPage.js +222 -0
  55. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -0
  56. package/dist/atheletebridge/pages/teams/TeamsListPage.js +101 -0
  57. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -0
  58. package/dist/atheletebridge/store/atheletebridgeStore.js +2 -13
  59. package/dist/atheletebridge/store/atheletebridgeStore.js.map +1 -1
  60. package/dist/atheletebridge/utils/datetime.js +10 -0
  61. package/dist/atheletebridge/utils/datetime.js.map +1 -0
  62. package/dist/atheletebridge/utils/formatters.js +1 -4
  63. package/dist/atheletebridge/utils/formatters.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/atheletebridge/components/InvestmentCard.js +0 -96
  66. package/dist/atheletebridge/components/InvestmentCard.js.map +0 -1
  67. package/dist/atheletebridge/components/RatingDisplay.js +0 -35
  68. package/dist/atheletebridge/components/RatingDisplay.js.map +0 -1
  69. package/dist/atheletebridge/mocks/data.js +0 -1517
  70. package/dist/atheletebridge/mocks/data.js.map +0 -1
  71. package/dist/atheletebridge/mocks/users.js +0 -34
  72. package/dist/atheletebridge/mocks/users.js.map +0 -1
  73. package/dist/atheletebridge/pages/HomePage.js +0 -936
  74. package/dist/atheletebridge/pages/HomePage.js.map +0 -1
  75. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +0 -653
  76. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +0 -1
  77. package/dist/atheletebridge/pages/admin/AdminDashboard.js +0 -671
  78. package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +0 -1
  79. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +0 -429
  80. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +0 -1
  81. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +0 -667
  82. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +0 -1
  83. package/dist/atheletebridge/pages/admin/AdminProfilePage.js +0 -261
  84. package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +0 -1
  85. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +0 -653
  86. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +0 -1
  87. package/dist/atheletebridge/pages/admin/CartManagementPage.js +0 -876
  88. package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +0 -1
  89. package/dist/atheletebridge/pages/admin/UserManagementPage.js +0 -900
  90. package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +0 -1
  91. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +0 -839
  92. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  93. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +0 -704
  94. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  95. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +0 -792
  96. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  97. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  98. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  99. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +0 -633
  100. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  101. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +0 -913
  102. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  103. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +0 -881
  104. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +0 -1
  105. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +0 -841
  106. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +0 -1
  107. package/dist/atheletebridge/pages/common/HelpSupportPage.js +0 -1319
  108. package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +0 -1
  109. package/dist/atheletebridge/pages/common/NotificationCenterPage.js +0 -674
  110. package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +0 -1
  111. package/dist/atheletebridge/pages/common/SettingsPage.js +0 -972
  112. package/dist/atheletebridge/pages/common/SettingsPage.js.map +0 -1
  113. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +0 -602
  114. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +0 -1
  115. package/dist/atheletebridge/pages/customer/CartDetailPage.js +0 -656
  116. package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +0 -1
  117. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +0 -558
  118. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +0 -1
  119. package/dist/atheletebridge/pages/customer/CheckoutPage.js +0 -536
  120. package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +0 -1
  121. package/dist/atheletebridge/pages/customer/CustomerDashboard.js +0 -539
  122. package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +0 -1
  123. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +0 -657
  124. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +0 -1
  125. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +0 -635
  126. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +0 -1
  127. package/dist/atheletebridge/pages/customer/FavoritesPage.js +0 -486
  128. package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +0 -1
  129. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +0 -447
  130. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +0 -1
  131. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +0 -393
  132. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +0 -1
  133. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +0 -494
  134. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +0 -1
  135. package/dist/atheletebridge/pages/customer/ReviewsPage.js +0 -615
  136. package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +0 -1
  137. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +0 -451
  138. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +0 -1
  139. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +0 -881
  140. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +0 -1
  141. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  142. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  143. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +0 -686
  144. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  145. package/dist/atheletebridge/pages/investor/InvestorDashboard.js +0 -453
  146. package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +0 -1
  147. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +0 -405
  148. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  149. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +0 -577
  150. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +0 -1
  151. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +0 -1069
  152. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +0 -1
  153. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +0 -530
  154. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +0 -1
  155. package/dist/atheletebridge/pages/worker/WorkerDashboard.js +0 -669
  156. package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +0 -1
  157. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +0 -681
  158. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +0 -1
  159. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +0 -691
  160. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +0 -1
  161. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +0 -588
  162. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,686 +0,0 @@
1
- import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { MetricsCard as r } from "../../components/MetricsCard.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useCallback as a, useEffect as o, useState as s } from "react";
7
- import { Activity as c, ArrowDown as l, ArrowUp as u, BarChart3 as d, Calendar as f, Download as p, Lightbulb as m, PieChart as h, Shield as g, Target as _, TrendingUp as v, Wallet as y } from "lucide-react";
8
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
9
- import { EmphasisPanel as S, PagePurpose as C } from "@burdenoff/fe-libs/ui";
10
- //#region src/atheletebridge/pages/investor/InvestorAnalyticsPage.tsx
11
- var w = {
12
- portfolioMetrics: {
13
- totalValue: 283700,
14
- totalInvested: 255e3,
15
- totalReturns: 28700,
16
- averageRoi: 19.6,
17
- portfolioGrowth: 11.3,
18
- bestPerforming: "Biryani House",
19
- worstPerforming: "Healthy Bites"
20
- },
21
- performanceByCart: [
22
- {
23
- cartName: "Biryani House",
24
- investedAmount: 6e4,
25
- currentValue: 72e3,
26
- returns: 12e3,
27
- roi: 20
28
- },
29
- {
30
- cartName: "South Indian Express",
31
- investedAmount: 5e4,
32
- currentValue: 58500,
33
- returns: 8500,
34
- roi: 17
35
- },
36
- {
37
- cartName: "Pizza Corner",
38
- investedAmount: 75e3,
39
- currentValue: 82e3,
40
- returns: 7e3,
41
- roi: 9.3
42
- },
43
- {
44
- cartName: "Healthy Bites",
45
- investedAmount: 3e4,
46
- currentValue: 31200,
47
- returns: 1200,
48
- roi: 4
49
- },
50
- {
51
- cartName: "Street Food Junction",
52
- investedAmount: 4e4,
53
- currentValue: 4e4,
54
- returns: 0,
55
- roi: 0
56
- }
57
- ],
58
- performanceByCategory: [
59
- {
60
- category: "South Indian",
61
- investedAmount: 11e4,
62
- returns: 20500,
63
- percentage: 43.1
64
- },
65
- {
66
- category: "Fast Food",
67
- investedAmount: 75e3,
68
- returns: 7e3,
69
- percentage: 29.4
70
- },
71
- {
72
- category: "Street Food",
73
- investedAmount: 4e4,
74
- returns: 0,
75
- percentage: 15.7
76
- },
77
- {
78
- category: "Healthy Food",
79
- investedAmount: 3e4,
80
- returns: 1200,
81
- percentage: 11.8
82
- }
83
- ],
84
- monthlyPerformance: [
85
- {
86
- month: "Jun 2024",
87
- invested: 195e3,
88
- value: 202e3,
89
- returns: 7e3
90
- },
91
- {
92
- month: "Jul 2024",
93
- invested: 215e3,
94
- value: 228e3,
95
- returns: 13e3
96
- },
97
- {
98
- month: "Aug 2024",
99
- invested: 255e3,
100
- value: 265e3,
101
- returns: 1e4
102
- },
103
- {
104
- month: "Sep 2024",
105
- invested: 255e3,
106
- value: 275e3,
107
- returns: 2e4
108
- },
109
- {
110
- month: "Oct 2024",
111
- invested: 255e3,
112
- value: 28e4,
113
- returns: 25e3
114
- },
115
- {
116
- month: "Nov 2024",
117
- invested: 255e3,
118
- value: 283700,
119
- returns: 28700
120
- }
121
- ],
122
- riskAnalysis: {
123
- riskScore: 3.2,
124
- diversificationScore: 7.8,
125
- volatilityScore: 2.5,
126
- recommendations: [
127
- "Consider diversifying into more food categories",
128
- "Your portfolio shows good risk distribution",
129
- "Consider investing in carts from different locations",
130
- "Monitor underperforming investments closely",
131
- "Explore premium segment opportunities for higher returns"
132
- ]
133
- }
134
- };
135
- function T(e) {
136
- return e <= 2 ? {
137
- label: "Low Risk",
138
- color: "text-green-600 dark:text-green-400"
139
- } : e <= 4 ? {
140
- label: "Moderate Risk",
141
- color: "text-yellow-600 dark:text-yellow-400"
142
- } : {
143
- label: "High Risk",
144
- color: "text-red-600 dark:text-red-400"
145
- };
146
- }
147
- function E(e) {
148
- return e <= 2 ? "bg-green-500" : e <= 4 ? "bg-yellow-500" : "bg-red-500";
149
- }
150
- function D(e) {
151
- return e >= 8 ? {
152
- label: "Well Diversified",
153
- color: "text-green-600 dark:text-green-400"
154
- } : e >= 6 ? {
155
- label: "Moderately Diversified",
156
- color: "text-yellow-600 dark:text-yellow-400"
157
- } : {
158
- label: "Poorly Diversified",
159
- color: "text-red-600 dark:text-red-400"
160
- };
161
- }
162
- function O(e) {
163
- return e >= 8 ? "bg-green-500" : e >= 6 ? "bg-yellow-500" : "bg-red-500";
164
- }
165
- function k() {
166
- let { navigateTo: k } = e(), [A, j] = s(!0), [M, N] = s("6m"), [P, F] = s(null), [I, L] = s("idle");
167
- o(() => {
168
- j(!0);
169
- let e = setTimeout(() => {
170
- F(w), j(!1);
171
- }, 600);
172
- return () => clearTimeout(e);
173
- }, [M]);
174
- let R = a(() => {
175
- L("exporting"), setTimeout(() => {
176
- L("done"), setTimeout(() => L("idle"), 2e3);
177
- }, 1200);
178
- }, []);
179
- if (A || !P) return /* @__PURE__ */ b(n, {
180
- title: "Investment Analytics",
181
- description: "Loading analytics...",
182
- children: /* @__PURE__ */ b("div", {
183
- className: "flex items-center justify-center py-20",
184
- children: /* @__PURE__ */ x("div", {
185
- className: "text-center",
186
- children: [/* @__PURE__ */ b("div", { className: "mx-auto mb-4 h-12 w-12 animate-spin rounded-full border-b-2 border-primary" }), /* @__PURE__ */ b("p", {
187
- className: "text-sm text-text-secondary",
188
- children: "Loading analytics data..."
189
- })]
190
- })
191
- })
192
- });
193
- let z = T(P.riskAnalysis.riskScore), B = D(P.riskAnalysis.diversificationScore), V = [...P.performanceByCart].sort((e, t) => t.roi - e.roi);
194
- return /* @__PURE__ */ x(n, {
195
- title: "Investment Analytics",
196
- description: "Comprehensive analysis of your portfolio performance",
197
- actions: /* @__PURE__ */ x("div", {
198
- className: "flex items-center gap-3",
199
- children: [/* @__PURE__ */ x("select", {
200
- value: M,
201
- onChange: (e) => N(e.target.value),
202
- className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
203
- children: [
204
- /* @__PURE__ */ b("option", {
205
- value: "1m",
206
- children: "Last Month"
207
- }),
208
- /* @__PURE__ */ b("option", {
209
- value: "3m",
210
- children: "Last 3 Months"
211
- }),
212
- /* @__PURE__ */ b("option", {
213
- value: "6m",
214
- children: "Last 6 Months"
215
- }),
216
- /* @__PURE__ */ b("option", {
217
- value: "1y",
218
- children: "Last Year"
219
- }),
220
- /* @__PURE__ */ b("option", {
221
- value: "all",
222
- children: "All Time"
223
- })
224
- ]
225
- }), /* @__PURE__ */ x("button", {
226
- type: "button",
227
- onClick: R,
228
- disabled: I === "exporting",
229
- className: t("flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors", I === "exporting" ? "cursor-not-allowed bg-bg-sunken text-text-secondary" : I === "done" ? "bg-green-600 text-white" : "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90"),
230
- children: [/* @__PURE__ */ b(p, { className: "h-4 w-4" }), I === "exporting" ? "Exporting..." : I === "done" ? "Exported!" : "Export Report"]
231
- })]
232
- }),
233
- children: [
234
- /* @__PURE__ */ b(C, {
235
- className: "mb-6",
236
- children: "Understand how your money is really performing. Analyse portfolio value, returns and ROI over your chosen time range, spot your best and worst performers, gauge your risk exposure, and export the report. Use this to refine where you invest next."
237
- }),
238
- /* @__PURE__ */ b(S, { children: /* @__PURE__ */ x("div", {
239
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
240
- children: [
241
- /* @__PURE__ */ b(r, {
242
- icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
243
- value: i(P.portfolioMetrics.totalValue, { minimumFractionDigits: 0 }),
244
- label: "Portfolio Value",
245
- trend: "up",
246
- trendValue: `+${P.portfolioMetrics.portfolioGrowth}% total growth`
247
- }),
248
- /* @__PURE__ */ b(r, {
249
- icon: /* @__PURE__ */ b(v, { className: "h-5 w-5" }),
250
- value: i(P.portfolioMetrics.totalReturns, { minimumFractionDigits: 0 }),
251
- label: "Total Returns",
252
- trend: "up",
253
- trendValue: "Profit earned so far"
254
- }),
255
- /* @__PURE__ */ b(r, {
256
- icon: /* @__PURE__ */ b(_, { className: "h-5 w-5" }),
257
- value: `${P.portfolioMetrics.averageRoi}%`,
258
- label: "Average ROI",
259
- trend: "up",
260
- trendValue: "Across all investments"
261
- }),
262
- /* @__PURE__ */ b(r, {
263
- icon: /* @__PURE__ */ b(c, { className: "h-5 w-5" }),
264
- value: `${P.riskAnalysis.riskScore}/5`,
265
- label: "Risk Score",
266
- trend: "neutral",
267
- trendValue: z.label
268
- })
269
- ]
270
- }) }),
271
- /* @__PURE__ */ x("div", {
272
- className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
273
- children: [/* @__PURE__ */ x("div", {
274
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
275
- children: [/* @__PURE__ */ b("div", {
276
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-green-500/10",
277
- children: /* @__PURE__ */ b(u, { className: "h-5 w-5 text-green-600 dark:text-green-400" })
278
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
279
- className: "text-xs text-text-secondary",
280
- children: "Best Performing"
281
- }), /* @__PURE__ */ b("p", {
282
- className: "text-sm font-semibold text-green-600 dark:text-green-400",
283
- children: P.portfolioMetrics.bestPerforming
284
- })] })]
285
- }), /* @__PURE__ */ x("div", {
286
- className: "flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-surface p-4",
287
- children: [/* @__PURE__ */ b("div", {
288
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-red-500/10",
289
- children: /* @__PURE__ */ b(l, { className: "h-5 w-5 text-red-600 dark:text-red-400" })
290
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
291
- className: "text-xs text-text-secondary",
292
- children: "Worst Performing"
293
- }), /* @__PURE__ */ b("p", {
294
- className: "text-sm font-semibold text-text-primary",
295
- children: P.portfolioMetrics.worstPerforming
296
- })] })]
297
- })]
298
- }),
299
- /* @__PURE__ */ x("div", {
300
- className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
301
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
302
- className: "mb-4 flex items-center gap-2",
303
- children: [/* @__PURE__ */ b(d, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
304
- className: "text-lg font-semibold text-text-primary",
305
- children: "Performance by Cart"
306
- })]
307
- }), /* @__PURE__ */ b("div", {
308
- className: "space-y-3",
309
- children: V.map((e, n) => /* @__PURE__ */ x("div", {
310
- className: "flex items-center justify-between rounded-lg border border-border-subtle bg-bg-surface p-3",
311
- children: [/* @__PURE__ */ x("div", {
312
- className: "flex items-center gap-3",
313
- children: [/* @__PURE__ */ b("div", {
314
- className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
315
- children: n + 1
316
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
317
- className: "text-sm font-medium text-text-primary",
318
- children: e.cartName
319
- }), /* @__PURE__ */ x("p", {
320
- className: "text-xs text-text-secondary",
321
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
322
- })] })]
323
- }), /* @__PURE__ */ x("div", {
324
- className: "text-right",
325
- children: [/* @__PURE__ */ x("p", {
326
- className: t("text-sm font-semibold", e.returns >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
327
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
328
- }), /* @__PURE__ */ x("p", {
329
- className: t("text-xs", e.roi >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
330
- children: [
331
- e.roi >= 0 ? "+" : "",
332
- e.roi,
333
- "% ROI"
334
- ]
335
- })]
336
- })]
337
- }, e.cartName))
338
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
339
- className: "mb-4 flex items-center gap-2",
340
- children: [/* @__PURE__ */ b(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
341
- className: "text-lg font-semibold text-text-primary",
342
- children: "Category Distribution"
343
- })]
344
- }), /* @__PURE__ */ b("div", {
345
- className: "space-y-4",
346
- children: P.performanceByCategory.map((e) => /* @__PURE__ */ x("div", {
347
- className: "rounded-lg border border-border-subtle bg-bg-surface p-3",
348
- children: [
349
- /* @__PURE__ */ x("div", {
350
- className: "mb-2 flex items-center justify-between",
351
- children: [/* @__PURE__ */ b("span", {
352
- className: "text-sm font-medium text-text-primary",
353
- children: e.category
354
- }), /* @__PURE__ */ x("span", {
355
- className: "text-sm text-text-secondary",
356
- children: [e.percentage, "%"]
357
- })]
358
- }),
359
- /* @__PURE__ */ b("div", {
360
- className: "mb-2 h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
361
- children: /* @__PURE__ */ b("div", {
362
- className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
363
- style: { width: `${e.percentage}%` }
364
- })
365
- }),
366
- /* @__PURE__ */ x("div", {
367
- className: "flex items-center justify-between",
368
- children: [/* @__PURE__ */ x("span", {
369
- className: "text-xs text-text-secondary",
370
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
371
- }), /* @__PURE__ */ x("span", {
372
- className: t("text-xs font-semibold", e.returns >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
373
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
374
- })]
375
- })
376
- ]
377
- }, e.category))
378
- })] })]
379
- }),
380
- /* @__PURE__ */ x("section", {
381
- className: "mt-8",
382
- children: [/* @__PURE__ */ x("div", {
383
- className: "mb-4 flex items-center gap-2",
384
- children: [/* @__PURE__ */ b(f, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
385
- className: "text-lg font-semibold text-text-primary",
386
- children: "Portfolio Growth Trend"
387
- })]
388
- }), /* @__PURE__ */ b("div", {
389
- className: "overflow-hidden rounded-lg border border-border-subtle bg-bg-surface",
390
- children: /* @__PURE__ */ b("div", {
391
- className: "overflow-x-auto",
392
- children: /* @__PURE__ */ x("table", {
393
- className: "w-full",
394
- children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
395
- className: "border-b border-border-subtle bg-bg-sunken/50",
396
- children: [
397
- /* @__PURE__ */ b("th", {
398
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
399
- children: "Month"
400
- }),
401
- /* @__PURE__ */ b("th", {
402
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
403
- children: "Invested"
404
- }),
405
- /* @__PURE__ */ b("th", {
406
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
407
- children: "Portfolio Value"
408
- }),
409
- /* @__PURE__ */ b("th", {
410
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
411
- children: "Returns"
412
- }),
413
- /* @__PURE__ */ b("th", {
414
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
415
- children: "Growth %"
416
- })
417
- ]
418
- }) }), /* @__PURE__ */ b("tbody", {
419
- className: "divide-y divide-border",
420
- children: P.monthlyPerformance.map((e) => {
421
- let n = e.invested > 0 ? ((e.value - e.invested) / e.invested * 100).toFixed(1) : "0.0";
422
- return /* @__PURE__ */ x("tr", {
423
- className: "hover:bg-accent/50 transition-colors",
424
- children: [
425
- /* @__PURE__ */ b("td", {
426
- className: "whitespace-nowrap px-4 py-4 text-sm font-medium text-text-primary sm:px-6",
427
- children: e.month
428
- }),
429
- /* @__PURE__ */ b("td", {
430
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
431
- children: i(e.invested, { minimumFractionDigits: 0 })
432
- }),
433
- /* @__PURE__ */ b("td", {
434
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
435
- children: i(e.value, { minimumFractionDigits: 0 })
436
- }),
437
- /* @__PURE__ */ b("td", {
438
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
439
- children: /* @__PURE__ */ x("span", {
440
- className: t("font-semibold", e.returns >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
441
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
442
- })
443
- }),
444
- /* @__PURE__ */ b("td", {
445
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
446
- children: /* @__PURE__ */ x("span", {
447
- className: t("font-medium", parseFloat(n) >= 0 ? "text-green-600 dark:text-green-400" : "text-red-600 dark:text-red-400"),
448
- children: [
449
- parseFloat(n) >= 0 ? "+" : "",
450
- n,
451
- "%"
452
- ]
453
- })
454
- })
455
- ]
456
- }, e.month);
457
- })
458
- })]
459
- })
460
- })
461
- })]
462
- }),
463
- /* @__PURE__ */ x("div", {
464
- className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-2",
465
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
466
- className: "mb-4 flex items-center gap-2",
467
- children: [/* @__PURE__ */ b(g, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
468
- className: "text-lg font-semibold text-text-primary",
469
- children: "Risk Analysis"
470
- })]
471
- }), /* @__PURE__ */ b("div", {
472
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
473
- children: /* @__PURE__ */ x("div", {
474
- className: "space-y-5",
475
- children: [
476
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
477
- className: "mb-2 flex items-center justify-between",
478
- children: [/* @__PURE__ */ b("span", {
479
- className: "text-sm text-text-primary",
480
- children: "Risk Score"
481
- }), /* @__PURE__ */ x("span", {
482
- className: t("text-sm font-semibold", z.color),
483
- children: [
484
- P.riskAnalysis.riskScore,
485
- "/5 (",
486
- z.label,
487
- ")"
488
- ]
489
- })]
490
- }), /* @__PURE__ */ b("div", {
491
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
492
- children: /* @__PURE__ */ b("div", {
493
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.riskScore)),
494
- style: { width: `${P.riskAnalysis.riskScore / 5 * 100}%` }
495
- })
496
- })] }),
497
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
498
- className: "mb-2 flex items-center justify-between",
499
- children: [/* @__PURE__ */ b("span", {
500
- className: "text-sm text-text-primary",
501
- children: "Diversification"
502
- }), /* @__PURE__ */ x("span", {
503
- className: t("text-sm font-semibold", B.color),
504
- children: [
505
- P.riskAnalysis.diversificationScore,
506
- "/10 (",
507
- B.label,
508
- ")"
509
- ]
510
- })]
511
- }), /* @__PURE__ */ b("div", {
512
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
513
- children: /* @__PURE__ */ b("div", {
514
- className: t("h-full rounded-full transition-all duration-300", O(P.riskAnalysis.diversificationScore)),
515
- style: { width: `${P.riskAnalysis.diversificationScore / 10 * 100}%` }
516
- })
517
- })] }),
518
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
519
- className: "mb-2 flex items-center justify-between",
520
- children: [/* @__PURE__ */ b("span", {
521
- className: "text-sm text-text-primary",
522
- children: "Volatility"
523
- }), /* @__PURE__ */ x("span", {
524
- className: t("text-sm font-semibold", T(P.riskAnalysis.volatilityScore).color),
525
- children: [P.riskAnalysis.volatilityScore, "/5"]
526
- })]
527
- }), /* @__PURE__ */ b("div", {
528
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
529
- children: /* @__PURE__ */ b("div", {
530
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.volatilityScore)),
531
- style: { width: `${P.riskAnalysis.volatilityScore / 5 * 100}%` }
532
- })
533
- })] }),
534
- /* @__PURE__ */ x("div", {
535
- className: "grid grid-cols-2 gap-3 border-t border-border-subtle pt-4",
536
- children: [/* @__PURE__ */ x("div", {
537
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
538
- children: [/* @__PURE__ */ b("p", {
539
- className: "text-lg font-bold text-text-primary",
540
- children: P.performanceByCart.length
541
- }), /* @__PURE__ */ b("p", {
542
- className: "text-xs text-text-secondary",
543
- children: "Active Investments"
544
- })]
545
- }), /* @__PURE__ */ x("div", {
546
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
547
- children: [/* @__PURE__ */ b("p", {
548
- className: "text-lg font-bold text-text-primary",
549
- children: P.performanceByCategory.length
550
- }), /* @__PURE__ */ b("p", {
551
- className: "text-xs text-text-secondary",
552
- children: "Sectors Covered"
553
- })]
554
- })]
555
- })
556
- ]
557
- })
558
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
559
- className: "mb-4 flex items-center gap-2",
560
- children: [/* @__PURE__ */ b(m, { className: "h-5 w-5 text-yellow-500" }), /* @__PURE__ */ b("h2", {
561
- className: "text-lg font-semibold text-text-primary",
562
- children: "Recommendations"
563
- })]
564
- }), /* @__PURE__ */ x("div", {
565
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
566
- children: [/* @__PURE__ */ b("div", {
567
- className: "space-y-3",
568
- children: P.riskAnalysis.recommendations.map((e, t) => /* @__PURE__ */ x("div", {
569
- className: "flex items-start gap-3 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3",
570
- children: [/* @__PURE__ */ b("div", {
571
- className: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-action-primary-bg text-xs font-bold text-action-primary-text",
572
- children: t + 1
573
- }), /* @__PURE__ */ b("p", {
574
- className: "text-sm leading-relaxed text-text-primary",
575
- children: e
576
- })]
577
- }, t))
578
- }), /* @__PURE__ */ x("div", {
579
- className: "mt-5 rounded-lg border border-border-subtle bg-bg-sunken/50 p-4",
580
- children: [/* @__PURE__ */ b("h4", {
581
- className: "mb-2 text-sm font-semibold text-text-primary",
582
- children: "Overall Assessment"
583
- }), /* @__PURE__ */ x("div", {
584
- className: "space-y-2",
585
- children: [
586
- /* @__PURE__ */ x("div", {
587
- className: "flex items-center justify-between",
588
- children: [/* @__PURE__ */ b("span", {
589
- className: "text-xs text-text-secondary",
590
- children: "Portfolio Health"
591
- }), /* @__PURE__ */ x("div", {
592
- className: "flex items-center gap-2",
593
- children: [/* @__PURE__ */ b("div", {
594
- className: "flex gap-0.5",
595
- children: [
596
- 1,
597
- 2,
598
- 3,
599
- 4,
600
- 5
601
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-green-500" : "bg-bg-sunken") }, e))
602
- }), /* @__PURE__ */ b("span", {
603
- className: "text-xs font-medium text-text-primary",
604
- children: "4/5"
605
- })]
606
- })]
607
- }),
608
- /* @__PURE__ */ x("div", {
609
- className: "flex items-center justify-between",
610
- children: [/* @__PURE__ */ b("span", {
611
- className: "text-xs text-text-secondary",
612
- children: "Growth Potential"
613
- }), /* @__PURE__ */ x("div", {
614
- className: "flex items-center gap-2",
615
- children: [/* @__PURE__ */ b("div", {
616
- className: "flex gap-0.5",
617
- children: [
618
- 1,
619
- 2,
620
- 3,
621
- 4,
622
- 5
623
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 3 ? "bg-yellow-500" : "bg-bg-sunken") }, e))
624
- }), /* @__PURE__ */ b("span", {
625
- className: "text-xs font-medium text-text-primary",
626
- children: "3/5"
627
- })]
628
- })]
629
- }),
630
- /* @__PURE__ */ x("div", {
631
- className: "flex items-center justify-between",
632
- children: [/* @__PURE__ */ b("span", {
633
- className: "text-xs text-text-secondary",
634
- children: "Income Stability"
635
- }), /* @__PURE__ */ x("div", {
636
- className: "flex items-center gap-2",
637
- children: [/* @__PURE__ */ b("div", {
638
- className: "flex gap-0.5",
639
- children: [
640
- 1,
641
- 2,
642
- 3,
643
- 4,
644
- 5
645
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-green-500" : "bg-bg-sunken") }, e))
646
- }), /* @__PURE__ */ b("span", {
647
- className: "text-xs font-medium text-text-primary",
648
- children: "4/5"
649
- })]
650
- })]
651
- })
652
- ]
653
- })]
654
- })]
655
- })] })]
656
- }),
657
- /* @__PURE__ */ x("div", {
658
- className: "mt-8 flex flex-wrap gap-3",
659
- children: [
660
- /* @__PURE__ */ x("button", {
661
- type: "button",
662
- onClick: () => k("/investor/portfolio"),
663
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
664
- children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "View Portfolio"]
665
- }),
666
- /* @__PURE__ */ x("button", {
667
- type: "button",
668
- onClick: () => k("/investor/opportunities"),
669
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
670
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Browse Opportunities"]
671
- }),
672
- /* @__PURE__ */ x("button", {
673
- type: "button",
674
- onClick: () => k("/investor/investments"),
675
- className: "flex items-center gap-2 rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
676
- children: [/* @__PURE__ */ b(y, { className: "h-4 w-4" }), "My Investments"]
677
- })
678
- ]
679
- })
680
- ]
681
- });
682
- }
683
- //#endregion
684
- export { k as InvestorAnalyticsPage };
685
-
686
- //# sourceMappingURL=InvestorAnalyticsPage.js.map