@burdenoff/microfe-subscriberbot 2026.626.2 → 2026.629.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 (141) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
  3. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  4. package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
  5. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  6. package/dist/subscriberbot/components/StateViews.js +49 -0
  7. package/dist/subscriberbot/components/StateViews.js.map +1 -0
  8. package/dist/subscriberbot/components/StatusBadge.js +45 -47
  9. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  10. package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
  11. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  14. package/dist/subscriberbot/index.js +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +269 -0
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
  17. package/dist/subscriberbot/pages/InboxPage.js +186 -0
  18. package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
  19. package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
  20. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
  21. package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
  22. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
  23. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
  25. package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
  26. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
  27. package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
  28. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
  29. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
  30. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
  32. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
  34. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
  38. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
  40. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
  41. package/dist/subscriberbot/utils/formatters.js +50 -32
  42. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/subscriberbot/components/InvestmentCard.js +0 -97
  45. package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
  46. package/dist/subscriberbot/components/RatingDisplay.js +0 -35
  47. package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
  48. package/dist/subscriberbot/mocks/data.js +0 -1517
  49. package/dist/subscriberbot/mocks/data.js.map +0 -1
  50. package/dist/subscriberbot/mocks/users.js +0 -34
  51. package/dist/subscriberbot/mocks/users.js.map +0 -1
  52. package/dist/subscriberbot/pages/HomePage.js +0 -930
  53. package/dist/subscriberbot/pages/HomePage.js.map +0 -1
  54. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
  55. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
  56. package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
  57. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
  58. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
  59. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
  60. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
  61. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
  62. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
  63. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
  64. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
  65. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
  66. package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
  67. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
  68. package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
  69. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
  70. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
  71. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  72. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
  73. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  74. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
  75. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  76. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  77. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  78. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
  79. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  80. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
  81. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  82. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
  83. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
  84. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
  85. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
  86. package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
  87. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
  88. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
  89. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
  90. package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
  91. package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
  92. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
  93. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
  94. package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
  95. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
  96. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
  97. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
  98. package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
  99. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
  100. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
  101. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
  102. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
  103. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
  104. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
  105. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
  106. package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
  107. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
  108. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
  109. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
  110. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
  111. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
  112. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
  113. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
  114. package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
  115. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
  116. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
  117. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
  118. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
  119. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
  120. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
  121. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  122. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
  123. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  124. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
  125. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
  126. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
  127. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  128. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
  129. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
  130. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
  131. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
  132. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
  133. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
  134. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
  135. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
  136. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
  137. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
  138. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
  139. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
  140. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
  141. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,687 +0,0 @@
1
- import { useSubscriberBot as e } from "../../context/SubscriberBotContext.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/subscriberbot/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-status-success-text"
139
- } : e <= 4 ? {
140
- label: "Moderate Risk",
141
- color: "text-status-warning-text"
142
- } : {
143
- label: "High Risk",
144
- color: "text-status-error-text"
145
- };
146
- }
147
- function E(e) {
148
- return e <= 2 ? "bg-status-success-text" : e <= 4 ? "bg-status-warning-text" : "bg-status-error-text";
149
- }
150
- function D(e) {
151
- return e >= 8 ? {
152
- label: "Well Diversified",
153
- color: "text-status-success-text"
154
- } : e >= 6 ? {
155
- label: "Moderately Diversified",
156
- color: "text-status-warning-text"
157
- } : {
158
- label: "Poorly Diversified",
159
- color: "text-status-error-text"
160
- };
161
- }
162
- function O(e) {
163
- return e >= 8 ? "bg-status-success-text" : e >= 6 ? "bg-status-warning-text" : "bg-status-error-text";
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-seam 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-status-success-text text-text-inverse" : "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
- icon: /* @__PURE__ */ b(d, { className: "h-4 w-4" }),
236
- className: "mb-6",
237
- children: "The analytical lens on your investing. Track portfolio value and growth, average ROI and your overall risk score, then see which carts are your best and worst performers. Adjust the date range to study trends, and export a report when you want to review your strategy or share it with an advisor."
238
- }),
239
- /* @__PURE__ */ x(S, {
240
- className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
241
- children: [
242
- /* @__PURE__ */ b(r, {
243
- icon: /* @__PURE__ */ b(y, { className: "h-5 w-5" }),
244
- value: i(P.portfolioMetrics.totalValue, { minimumFractionDigits: 0 }),
245
- label: "Portfolio Value",
246
- trend: "up",
247
- trendValue: `+${P.portfolioMetrics.portfolioGrowth}% total growth`
248
- }),
249
- /* @__PURE__ */ b(r, {
250
- icon: /* @__PURE__ */ b(v, { className: "h-5 w-5" }),
251
- value: i(P.portfolioMetrics.totalReturns, { minimumFractionDigits: 0 }),
252
- label: "Total Returns",
253
- trend: "up",
254
- trendValue: "Profit earned so far"
255
- }),
256
- /* @__PURE__ */ b(r, {
257
- icon: /* @__PURE__ */ b(_, { className: "h-5 w-5" }),
258
- value: `${P.portfolioMetrics.averageRoi}%`,
259
- label: "Average ROI",
260
- trend: "up",
261
- trendValue: "Across all investments"
262
- }),
263
- /* @__PURE__ */ b(r, {
264
- icon: /* @__PURE__ */ b(c, { className: "h-5 w-5" }),
265
- value: `${P.riskAnalysis.riskScore}/5`,
266
- label: "Risk Score",
267
- trend: "neutral",
268
- trendValue: z.label
269
- })
270
- ]
271
- }),
272
- /* @__PURE__ */ x("div", {
273
- className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
274
- children: [/* @__PURE__ */ x("div", {
275
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4",
276
- children: [/* @__PURE__ */ b("div", {
277
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-success-bg/10",
278
- children: /* @__PURE__ */ b(u, { className: "h-5 w-5 text-status-success-text" })
279
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
280
- className: "text-xs text-text-secondary",
281
- children: "Best Performing"
282
- }), /* @__PURE__ */ b("p", {
283
- className: "text-sm font-semibold text-status-success-text",
284
- children: P.portfolioMetrics.bestPerforming
285
- })] })]
286
- }), /* @__PURE__ */ x("div", {
287
- className: "flex items-center gap-3 rounded-lg border border-border-seam bg-bg-surface p-4",
288
- children: [/* @__PURE__ */ b("div", {
289
- className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-status-error-bg/10",
290
- children: /* @__PURE__ */ b(l, { className: "h-5 w-5 text-status-error-text" })
291
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
292
- className: "text-xs text-text-secondary",
293
- children: "Worst Performing"
294
- }), /* @__PURE__ */ b("p", {
295
- className: "text-sm font-semibold text-text-primary",
296
- children: P.portfolioMetrics.worstPerforming
297
- })] })]
298
- })]
299
- }),
300
- /* @__PURE__ */ x("div", {
301
- className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-2",
302
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
303
- className: "mb-4 flex items-center gap-2",
304
- children: [/* @__PURE__ */ b(d, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
305
- className: "text-lg font-semibold text-text-primary",
306
- children: "Performance by Cart"
307
- })]
308
- }), /* @__PURE__ */ b("div", {
309
- className: "space-y-3",
310
- children: V.map((e, n) => /* @__PURE__ */ x("div", {
311
- className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-surface p-3",
312
- children: [/* @__PURE__ */ x("div", {
313
- className: "flex items-center gap-3",
314
- children: [/* @__PURE__ */ b("div", {
315
- 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",
316
- children: n + 1
317
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
318
- className: "text-sm font-medium text-text-primary",
319
- children: e.cartName
320
- }), /* @__PURE__ */ x("p", {
321
- className: "text-xs text-text-secondary",
322
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
323
- })] })]
324
- }), /* @__PURE__ */ x("div", {
325
- className: "text-right",
326
- children: [/* @__PURE__ */ x("p", {
327
- className: t("text-sm font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
328
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
329
- }), /* @__PURE__ */ x("p", {
330
- className: t("text-xs", e.roi >= 0 ? "text-status-success-text" : "text-status-error-text"),
331
- children: [
332
- e.roi >= 0 ? "+" : "",
333
- e.roi,
334
- "% ROI"
335
- ]
336
- })]
337
- })]
338
- }, e.cartName))
339
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
340
- className: "mb-4 flex items-center gap-2",
341
- children: [/* @__PURE__ */ b(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
342
- className: "text-lg font-semibold text-text-primary",
343
- children: "Category Distribution"
344
- })]
345
- }), /* @__PURE__ */ b("div", {
346
- className: "space-y-4",
347
- children: P.performanceByCategory.map((e) => /* @__PURE__ */ x("div", {
348
- className: "rounded-lg border border-border-seam bg-bg-surface p-3",
349
- children: [
350
- /* @__PURE__ */ x("div", {
351
- className: "mb-2 flex items-center justify-between",
352
- children: [/* @__PURE__ */ b("span", {
353
- className: "text-sm font-medium text-text-primary",
354
- children: e.category
355
- }), /* @__PURE__ */ x("span", {
356
- className: "text-sm text-text-secondary",
357
- children: [e.percentage, "%"]
358
- })]
359
- }),
360
- /* @__PURE__ */ b("div", {
361
- className: "mb-2 h-2 w-full overflow-hidden rounded-full bg-bg-sunken",
362
- children: /* @__PURE__ */ b("div", {
363
- className: "h-full rounded-full bg-action-primary-bg transition-all duration-300",
364
- style: { width: `${e.percentage}%` }
365
- })
366
- }),
367
- /* @__PURE__ */ x("div", {
368
- className: "flex items-center justify-between",
369
- children: [/* @__PURE__ */ x("span", {
370
- className: "text-xs text-text-secondary",
371
- children: [i(e.investedAmount, { minimumFractionDigits: 0 }), " invested"]
372
- }), /* @__PURE__ */ x("span", {
373
- className: t("text-xs font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
374
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
375
- })]
376
- })
377
- ]
378
- }, e.category))
379
- })] })]
380
- }),
381
- /* @__PURE__ */ x("section", {
382
- className: "mt-8",
383
- children: [/* @__PURE__ */ x("div", {
384
- className: "mb-4 flex items-center gap-2",
385
- children: [/* @__PURE__ */ b(f, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
386
- className: "text-lg font-semibold text-text-primary",
387
- children: "Portfolio Growth Trend"
388
- })]
389
- }), /* @__PURE__ */ b("div", {
390
- className: "overflow-hidden rounded-lg border border-border-seam bg-bg-surface",
391
- children: /* @__PURE__ */ b("div", {
392
- className: "overflow-x-auto",
393
- children: /* @__PURE__ */ x("table", {
394
- className: "w-full",
395
- children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
396
- className: "border-b border-border-seam bg-bg-sunken/50",
397
- children: [
398
- /* @__PURE__ */ b("th", {
399
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
400
- children: "Month"
401
- }),
402
- /* @__PURE__ */ b("th", {
403
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
404
- children: "Invested"
405
- }),
406
- /* @__PURE__ */ b("th", {
407
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
408
- children: "Portfolio Value"
409
- }),
410
- /* @__PURE__ */ b("th", {
411
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
412
- children: "Returns"
413
- }),
414
- /* @__PURE__ */ b("th", {
415
- className: "px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-text-secondary sm:px-6",
416
- children: "Growth %"
417
- })
418
- ]
419
- }) }), /* @__PURE__ */ b("tbody", {
420
- className: "divide-y divide-border",
421
- children: P.monthlyPerformance.map((e) => {
422
- let n = e.invested > 0 ? ((e.value - e.invested) / e.invested * 100).toFixed(1) : "0.0";
423
- return /* @__PURE__ */ x("tr", {
424
- className: "hover:bg-accent/50 transition-colors",
425
- children: [
426
- /* @__PURE__ */ b("td", {
427
- className: "whitespace-nowrap px-4 py-4 text-sm font-medium text-text-primary sm:px-6",
428
- children: e.month
429
- }),
430
- /* @__PURE__ */ b("td", {
431
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
432
- children: i(e.invested, { minimumFractionDigits: 0 })
433
- }),
434
- /* @__PURE__ */ b("td", {
435
- className: "whitespace-nowrap px-4 py-4 text-sm text-text-primary sm:px-6",
436
- children: i(e.value, { minimumFractionDigits: 0 })
437
- }),
438
- /* @__PURE__ */ b("td", {
439
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
440
- children: /* @__PURE__ */ x("span", {
441
- className: t("font-semibold", e.returns >= 0 ? "text-status-success-text" : "text-status-error-text"),
442
- children: [e.returns >= 0 ? "+" : "", i(e.returns, { minimumFractionDigits: 0 })]
443
- })
444
- }),
445
- /* @__PURE__ */ b("td", {
446
- className: "whitespace-nowrap px-4 py-4 text-sm sm:px-6",
447
- children: /* @__PURE__ */ x("span", {
448
- className: t("font-medium", parseFloat(n) >= 0 ? "text-status-success-text" : "text-status-error-text"),
449
- children: [
450
- parseFloat(n) >= 0 ? "+" : "",
451
- n,
452
- "%"
453
- ]
454
- })
455
- })
456
- ]
457
- }, e.month);
458
- })
459
- })]
460
- })
461
- })
462
- })]
463
- }),
464
- /* @__PURE__ */ x("div", {
465
- className: "mt-8 grid grid-cols-1 gap-6 lg:grid-cols-2",
466
- children: [/* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
467
- className: "mb-4 flex items-center gap-2",
468
- children: [/* @__PURE__ */ b(g, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ b("h2", {
469
- className: "text-lg font-semibold text-text-primary",
470
- children: "Risk Analysis"
471
- })]
472
- }), /* @__PURE__ */ b("div", {
473
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6",
474
- children: /* @__PURE__ */ x("div", {
475
- className: "space-y-5",
476
- children: [
477
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
478
- className: "mb-2 flex items-center justify-between",
479
- children: [/* @__PURE__ */ b("span", {
480
- className: "text-sm text-text-primary",
481
- children: "Risk Score"
482
- }), /* @__PURE__ */ x("span", {
483
- className: t("text-sm font-semibold", z.color),
484
- children: [
485
- P.riskAnalysis.riskScore,
486
- "/5 (",
487
- z.label,
488
- ")"
489
- ]
490
- })]
491
- }), /* @__PURE__ */ b("div", {
492
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
493
- children: /* @__PURE__ */ b("div", {
494
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.riskScore)),
495
- style: { width: `${P.riskAnalysis.riskScore / 5 * 100}%` }
496
- })
497
- })] }),
498
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
499
- className: "mb-2 flex items-center justify-between",
500
- children: [/* @__PURE__ */ b("span", {
501
- className: "text-sm text-text-primary",
502
- children: "Diversification"
503
- }), /* @__PURE__ */ x("span", {
504
- className: t("text-sm font-semibold", B.color),
505
- children: [
506
- P.riskAnalysis.diversificationScore,
507
- "/10 (",
508
- B.label,
509
- ")"
510
- ]
511
- })]
512
- }), /* @__PURE__ */ b("div", {
513
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
514
- children: /* @__PURE__ */ b("div", {
515
- className: t("h-full rounded-full transition-all duration-300", O(P.riskAnalysis.diversificationScore)),
516
- style: { width: `${P.riskAnalysis.diversificationScore / 10 * 100}%` }
517
- })
518
- })] }),
519
- /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("div", {
520
- className: "mb-2 flex items-center justify-between",
521
- children: [/* @__PURE__ */ b("span", {
522
- className: "text-sm text-text-primary",
523
- children: "Volatility"
524
- }), /* @__PURE__ */ x("span", {
525
- className: t("text-sm font-semibold", T(P.riskAnalysis.volatilityScore).color),
526
- children: [P.riskAnalysis.volatilityScore, "/5"]
527
- })]
528
- }), /* @__PURE__ */ b("div", {
529
- className: "h-3 w-full overflow-hidden rounded-full bg-bg-sunken",
530
- children: /* @__PURE__ */ b("div", {
531
- className: t("h-full rounded-full transition-all duration-300", E(P.riskAnalysis.volatilityScore)),
532
- style: { width: `${P.riskAnalysis.volatilityScore / 5 * 100}%` }
533
- })
534
- })] }),
535
- /* @__PURE__ */ x("div", {
536
- className: "grid grid-cols-2 gap-3 border-t border-border-seam pt-4",
537
- children: [/* @__PURE__ */ x("div", {
538
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
539
- children: [/* @__PURE__ */ b("p", {
540
- className: "text-lg font-bold text-text-primary",
541
- children: P.performanceByCart.length
542
- }), /* @__PURE__ */ b("p", {
543
- className: "text-xs text-text-secondary",
544
- children: "Active Investments"
545
- })]
546
- }), /* @__PURE__ */ x("div", {
547
- className: "rounded-lg bg-bg-sunken/50 p-3 text-center",
548
- children: [/* @__PURE__ */ b("p", {
549
- className: "text-lg font-bold text-text-primary",
550
- children: P.performanceByCategory.length
551
- }), /* @__PURE__ */ b("p", {
552
- className: "text-xs text-text-secondary",
553
- children: "Sectors Covered"
554
- })]
555
- })]
556
- })
557
- ]
558
- })
559
- })] }), /* @__PURE__ */ x("section", { children: [/* @__PURE__ */ x("div", {
560
- className: "mb-4 flex items-center gap-2",
561
- children: [/* @__PURE__ */ b(m, { className: "h-5 w-5 text-status-warning-text" }), /* @__PURE__ */ b("h2", {
562
- className: "text-lg font-semibold text-text-primary",
563
- children: "Recommendations"
564
- })]
565
- }), /* @__PURE__ */ x("div", {
566
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 sm:p-6",
567
- children: [/* @__PURE__ */ b("div", {
568
- className: "space-y-3",
569
- children: P.riskAnalysis.recommendations.map((e, t) => /* @__PURE__ */ x("div", {
570
- className: "flex items-start gap-3 rounded-lg border border-border-seam bg-bg-sunken/30 p-3",
571
- children: [/* @__PURE__ */ b("div", {
572
- 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",
573
- children: t + 1
574
- }), /* @__PURE__ */ b("p", {
575
- className: "text-sm leading-relaxed text-text-primary",
576
- children: e
577
- })]
578
- }, t))
579
- }), /* @__PURE__ */ x("div", {
580
- className: "mt-5 rounded-lg border border-border-seam bg-bg-sunken/50 p-4",
581
- children: [/* @__PURE__ */ b("h4", {
582
- className: "mb-2 text-sm font-semibold text-text-primary",
583
- children: "Overall Assessment"
584
- }), /* @__PURE__ */ x("div", {
585
- className: "space-y-2",
586
- children: [
587
- /* @__PURE__ */ x("div", {
588
- className: "flex items-center justify-between",
589
- children: [/* @__PURE__ */ b("span", {
590
- className: "text-xs text-text-secondary",
591
- children: "Portfolio Health"
592
- }), /* @__PURE__ */ x("div", {
593
- className: "flex items-center gap-2",
594
- children: [/* @__PURE__ */ b("div", {
595
- className: "flex gap-0.5",
596
- children: [
597
- 1,
598
- 2,
599
- 3,
600
- 4,
601
- 5
602
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-text" : "bg-bg-sunken") }, e))
603
- }), /* @__PURE__ */ b("span", {
604
- className: "text-xs font-medium text-text-primary",
605
- children: "4/5"
606
- })]
607
- })]
608
- }),
609
- /* @__PURE__ */ x("div", {
610
- className: "flex items-center justify-between",
611
- children: [/* @__PURE__ */ b("span", {
612
- className: "text-xs text-text-secondary",
613
- children: "Growth Potential"
614
- }), /* @__PURE__ */ x("div", {
615
- className: "flex items-center gap-2",
616
- children: [/* @__PURE__ */ b("div", {
617
- className: "flex gap-0.5",
618
- children: [
619
- 1,
620
- 2,
621
- 3,
622
- 4,
623
- 5
624
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 3 ? "bg-status-warning-text" : "bg-bg-sunken") }, e))
625
- }), /* @__PURE__ */ b("span", {
626
- className: "text-xs font-medium text-text-primary",
627
- children: "3/5"
628
- })]
629
- })]
630
- }),
631
- /* @__PURE__ */ x("div", {
632
- className: "flex items-center justify-between",
633
- children: [/* @__PURE__ */ b("span", {
634
- className: "text-xs text-text-secondary",
635
- children: "Income Stability"
636
- }), /* @__PURE__ */ x("div", {
637
- className: "flex items-center gap-2",
638
- children: [/* @__PURE__ */ b("div", {
639
- className: "flex gap-0.5",
640
- children: [
641
- 1,
642
- 2,
643
- 3,
644
- 4,
645
- 5
646
- ].map((e) => /* @__PURE__ */ b("div", { className: t("h-2 w-4 rounded-sm", e <= 4 ? "bg-status-success-text" : "bg-bg-sunken") }, e))
647
- }), /* @__PURE__ */ b("span", {
648
- className: "text-xs font-medium text-text-primary",
649
- children: "4/5"
650
- })]
651
- })]
652
- })
653
- ]
654
- })]
655
- })]
656
- })] })]
657
- }),
658
- /* @__PURE__ */ x("div", {
659
- className: "mt-8 flex flex-wrap gap-3",
660
- children: [
661
- /* @__PURE__ */ x("button", {
662
- type: "button",
663
- onClick: () => k("/investor/portfolio"),
664
- className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
665
- children: [/* @__PURE__ */ b(h, { className: "h-4 w-4" }), "View Portfolio"]
666
- }),
667
- /* @__PURE__ */ x("button", {
668
- type: "button",
669
- onClick: () => k("/investor/opportunities"),
670
- className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
671
- children: [/* @__PURE__ */ b(_, { className: "h-4 w-4" }), "Browse Opportunities"]
672
- }),
673
- /* @__PURE__ */ x("button", {
674
- type: "button",
675
- onClick: () => k("/investor/investments"),
676
- className: "flex items-center gap-2 rounded-lg border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
677
- children: [/* @__PURE__ */ b(y, { className: "h-4 w-4" }), "My Investments"]
678
- })
679
- ]
680
- })
681
- ]
682
- });
683
- }
684
- //#endregion
685
- export { k as InvestorAnalyticsPage };
686
-
687
- //# sourceMappingURL=InvestorAnalyticsPage.js.map