@burdenoff/microfe-kadaikodi 2026.802.1 → 2026.830.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 (58) hide show
  1. package/dist/kadaikodi/KadaikodiRoot.d.ts.map +1 -1
  2. package/dist/kadaikodi/KadaikodiRoot.js +69 -72
  3. package/dist/kadaikodi/KadaikodiRoot.js.map +1 -1
  4. package/dist/kadaikodi/components/InvestmentCard.d.ts.map +1 -1
  5. package/dist/kadaikodi/components/InvestmentCard.js +58 -54
  6. package/dist/kadaikodi/components/InvestmentCard.js.map +1 -1
  7. package/dist/kadaikodi/components/OrderCard.d.ts.map +1 -1
  8. package/dist/kadaikodi/components/StatusBadge.d.ts.map +1 -1
  9. package/dist/kadaikodi/components/StatusBadge.js +25 -14
  10. package/dist/kadaikodi/components/StatusBadge.js.map +1 -1
  11. package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts +24 -0
  12. package/dist/kadaikodi/hooks/useKadaikodiApi.d.ts.map +1 -1
  13. package/dist/kadaikodi/hooks/useKadaikodiApi.js +177 -132
  14. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  15. package/dist/kadaikodi/pages/HomePage.d.ts.map +1 -1
  16. package/dist/kadaikodi/pages/HomePage.js +284 -282
  17. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  18. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.d.ts +7 -2
  19. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.d.ts.map +1 -1
  20. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +319 -228
  21. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  22. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +1 -1
  23. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  24. package/dist/kadaikodi/pages/admin/CartManagementPage.d.ts +10 -4
  25. package/dist/kadaikodi/pages/admin/CartManagementPage.d.ts.map +1 -1
  26. package/dist/kadaikodi/pages/admin/CartManagementPage.js +320 -279
  27. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.d.ts.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js +365 -292
  30. package/dist/kadaikodi/pages/cart-owner/MerchantOnboardingPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.d.ts +7 -2
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.d.ts.map +1 -1
  33. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +300 -158
  34. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/common/SettingsPage.js +286 -286
  36. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/customer/CartDetailPage.d.ts.map +1 -1
  38. package/dist/kadaikodi/pages/customer/CartDetailPage.js +3 -3
  39. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  40. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.d.ts +13 -3
  41. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.d.ts.map +1 -1
  42. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +270 -220
  43. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  44. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +97 -97
  45. package/dist/kadaikodi/pages/customer/OrderTrackingPage.d.ts.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +1 -1
  47. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/worker/TaskDetailsPage.d.ts +5 -3
  49. package/dist/kadaikodi/pages/worker/TaskDetailsPage.d.ts.map +1 -1
  50. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +286 -199
  51. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  52. package/dist/kadaikodi/types/index.d.ts +46 -2
  53. package/dist/kadaikodi/types/index.d.ts.map +1 -1
  54. package/dist/shared/hooks/useTr.d.ts +2 -0
  55. package/dist/shared/hooks/useTr.d.ts.map +1 -0
  56. package/dist/shared/hooks/useTr.js +14 -0
  57. package/dist/shared/hooks/useTr.js.map +1 -0
  58. package/package.json +2 -2
@@ -1,116 +1,158 @@
1
1
  import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { useAdminAnalytics as r, useDashboardStats as i, useOrders as a, useProviders as o } from "../../hooks/useKadaikodiApi.js";
5
- import { formatCurrency as s } from "../../utils/formatters.js";
6
- import { MetricsCard as c } from "../../components/MetricsCard.js";
7
- import { AreaChart as l } from "../../components/viz/AreaChart.js";
8
- import { HBarFunnel as u } from "../../components/viz/HBarFunnel.js";
9
- import { DonutChart as d } from "../../components/viz/DonutChart.js";
4
+ import { useAdminAnalytics as r, useDashboardStats as i, useOrders as a, useProviders as ee } from "../../hooks/useKadaikodiApi.js";
5
+ import { formatCurrency as o } from "../../utils/formatters.js";
6
+ import { MetricsCard as s } from "../../components/MetricsCard.js";
7
+ import { AreaChart as c } from "../../components/viz/AreaChart.js";
8
+ import { HBarFunnel as l } from "../../components/viz/HBarFunnel.js";
9
+ import { DonutChart as te } from "../../components/viz/DonutChart.js";
10
10
  import "../../components/viz/index.js";
11
- import { useMemo as f, useState as p } from "react";
12
- import { Award as ee, BarChart3 as m, IndianRupee as h, Loader2 as g, ShoppingBag as _, Star as v, Store as y, TrendingUp as b, Users as x, Zap as te } from "lucide-react";
13
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
14
- import { EmphasisPanel as w, GlassCard as T, NextSteps as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
11
+ import { useMemo as u, useState as d } from "react";
12
+ import { Award as ne, BarChart3 as f, CalendarRange as re, IndianRupee as p, Loader2 as ie, ShoppingBag as ae, Star as m, Store as h, TrendingUp as g, Users as _, Zap as v } from "lucide-react";
13
+ import { Fragment as oe, jsx as y, jsxs as b } from "react/jsx-runtime";
14
+ import { EmphasisPanel as se, GlassCard as x, NextSteps as S, PagePurpose as ce } from "@burdenoff/fe-libs/ui";
15
15
  //#region src/kadaikodi/pages/admin/AdminAnalyticsPage.tsx
16
- var O = 1440 * 60 * 1e3, k = (e) => e.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()), A = (e) => {
16
+ var C = 1440 * 60 * 1e3, w = [
17
+ {
18
+ id: "7",
19
+ label: "Last 7 days",
20
+ days: 7
21
+ },
22
+ {
23
+ id: "30",
24
+ label: "Last 30 days",
25
+ days: 30
26
+ },
27
+ {
28
+ id: "90",
29
+ label: "Last 90 days",
30
+ days: 90
31
+ }
32
+ ], T = (e) => e.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()), E = (e) => {
17
33
  let t = new Date(e);
18
34
  return t.setHours(0, 0, 0, 0), t.getTime();
19
- }, j = (e) => new Date(e).toLocaleDateString("en-IN", {
35
+ }, D = (e) => new Date(e).toLocaleDateString("en-IN", {
20
36
  day: "numeric",
21
37
  month: "short"
22
38
  });
23
- function M() {
24
- let { navigateTo: M } = e(), { data: N, isLoading: P } = i(), { data: F, isLoading: I } = r(), { data: L = [], isLoading: R } = o(), { data: z = [], isLoading: B } = a({}), [V, H] = p("overview"), U = P || I || R || B, W = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : s(e, { minimumFractionDigits: 0 }), G = f(() => {
25
- let e = z.length, t = z.filter((e) => e.status === "delivered").length, n = z.filter((e) => e.status === "cancelled").length, r = z.filter((e) => e.status === "pending" || e.status === "confirmed").length, i = /* @__PURE__ */ new Date();
39
+ function O() {
40
+ let { navigateTo: O } = e(), { data: k, isLoading: A } = i(), { data: j, isLoading: le } = r(), { data: M = [], isLoading: ue } = ee(), { data: N = [], isLoading: de } = a({}), [P, F] = d("overview"), [I, L] = d("30"), R = u(() => w.find((e) => e.id === I)?.days ?? 30, [I]), z = u(() => w.find((e) => e.id === I)?.label ?? "Last 30 days", [I]), B = A || le || ue || de, V = (e) => e >= 1e7 ? `₹${(e / 1e7).toFixed(1)}Cr` : e >= 1e5 ? `₹${(e / 1e5).toFixed(1)}L` : o(e, { minimumFractionDigits: 0 }), H = u(() => {
41
+ let e = N.length, t = N.filter((e) => e.status === "delivered").length, n = N.filter((e) => e.status === "cancelled").length, r = N.filter((e) => e.status === "pending" || e.status === "confirmed").length, i = /* @__PURE__ */ new Date();
26
42
  return i.setHours(0, 0, 0, 0), {
27
43
  total: e,
28
44
  completed: t,
29
45
  cancelled: n,
30
46
  pending: r,
31
- ordersToday: z.filter((e) => new Date(e.orderDate).getTime() >= i.getTime()).length,
32
- avgOrderValue: N && N.totalOrders > 0 ? N.totalRevenue / N.totalOrders : 0
47
+ ordersToday: N.filter((e) => new Date(e.orderDate).getTime() >= i.getTime()).length,
48
+ avgOrderValue: k && k.totalOrders > 0 ? k.totalRevenue / k.totalOrders : 0
33
49
  };
34
- }, [z, N]), K = f(() => L.filter((e) => !e.isOpen).length, [L]), q = F?.topProviders ?? [], J = F?.customerGrowth?.customers ?? 0, Y = f(() => {
35
- let e = Object.entries(F?.categoryDistribution ?? {}), t = e.reduce((e, [, t]) => e + t, 0);
50
+ }, [N, k]), U = u(() => M.filter((e) => !e.isOpen).length, [M]), W = j?.topProviders ?? [], fe = j?.customerGrowth?.customers ?? 0, G = u(() => {
51
+ let e = Object.entries(j?.categoryDistribution ?? {}), t = e.reduce((e, [, t]) => e + t, 0);
36
52
  return e.map(([e, n]) => ({
37
53
  category: e,
38
54
  count: n,
39
55
  percentage: t > 0 ? n / t * 100 : 0
40
56
  })).sort((e, t) => t.count - e.count);
41
- }, [F]), X = (e) => e.replace(/_/g, " ").toLowerCase(), Z = (e, t) => t > 0 ? e / t * 100 : 0, Q = f(() => Object.entries(F?.categoryDistribution ?? {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
42
- label: k(e),
57
+ }, [j]), K = (e) => e.replace(/_/g, " ").toLowerCase(), q = (e, t) => t > 0 ? e / t * 100 : 0, J = u(() => Object.entries(j?.categoryDistribution ?? {}).sort((e, t) => t[1] - e[1]).map(([e, t]) => ({
58
+ label: T(e),
43
59
  value: t
44
- })), [F]), ne = f(() => Q.reduce((e, t) => e + t.value, 0), [Q]), { gmvTrend: re, volumeTrend: ie } = f(() => {
45
- let e = A(/* @__PURE__ */ new Date()), t = e - 29 * O, n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
46
- for (let i = t; i <= e; i += O) n.set(i, 0), r.set(i, 0);
47
- for (let e of z) {
48
- let t = A(new Date(e.orderDate));
49
- n.has(t) && (n.set(t, (n.get(t) ?? 0) + (e.total ?? 0)), r.set(t, (r.get(t) ?? 0) + 1));
60
+ })), [j]), Y = u(() => J.reduce((e, t) => e + t.value, 0), [J]), X = u(() => E(/* @__PURE__ */ new Date()) - (R - 1) * C, [R]), { gmvTrend: pe, volumeTrend: me } = u(() => {
61
+ let e = E(/* @__PURE__ */ new Date()), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map();
62
+ for (let r = X; r <= e; r += C) t.set(r, 0), n.set(r, 0);
63
+ for (let e of N) {
64
+ let r = E(new Date(e.orderDate));
65
+ t.has(r) && (t.set(r, (t.get(r) ?? 0) + (e.total ?? 0)), n.set(r, (n.get(r) ?? 0) + 1));
50
66
  }
51
67
  return {
52
- gmvTrend: [...n.entries()].map(([e, t]) => ({
53
- label: j(e),
68
+ gmvTrend: [...t.entries()].map(([e, t]) => ({
69
+ label: D(e),
54
70
  value: t
55
71
  })),
56
- volumeTrend: [...r.entries()].map(([e, t]) => ({
57
- label: j(e),
72
+ volumeTrend: [...n.entries()].map(([e, t]) => ({
73
+ label: D(e),
58
74
  value: t
59
75
  }))
60
76
  };
61
- }, [z]), $ = f(() => {
62
- let e = new Map(L.map((e) => [e.id, e.category])), t = /* @__PURE__ */ new Map();
63
- for (let n of z) {
77
+ }, [N, X]), Z = u(() => {
78
+ let e = j?.orderTrends ?? [];
79
+ if (e.length === 0) return [];
80
+ let t = E(/* @__PURE__ */ new Date()), n = /* @__PURE__ */ new Map();
81
+ for (let t of e) {
82
+ let e = t.customerId;
83
+ if (!e) continue;
84
+ let r = E(new Date(t.createdAt));
85
+ if (Number.isNaN(r)) continue;
86
+ let i = n.get(e);
87
+ (i === void 0 || r < i) && n.set(e, r);
88
+ }
89
+ if (n.size === 0) return [];
90
+ let r = [...n.values()], i = [];
91
+ for (let e = X; e <= t; e += C) i.push({
92
+ label: D(e),
93
+ value: r.filter((t) => t <= e).length
94
+ });
95
+ return i;
96
+ }, [j, X]), Q = u(() => ({
97
+ count: M.filter((e) => {
98
+ if (!e.createdAt) return !1;
99
+ let t = new Date(e.createdAt).getTime();
100
+ return !Number.isNaN(t) && t >= X;
101
+ }).length,
102
+ isFloor: M.length >= 100
103
+ }), [M, X]), $ = u(() => {
104
+ let e = new Map(M.map((e) => [e.id, e.category])), t = /* @__PURE__ */ new Map();
105
+ for (let n of N) {
64
106
  let r = e.get(n.cartId) ?? "OTHER";
65
107
  t.set(r, (t.get(r) ?? 0) + (n.total ?? 0));
66
108
  }
67
109
  return [...t.entries()].filter(([, e]) => e > 0).sort((e, t) => t[1] - e[1]).slice(0, 6).map(([e, t]) => ({
68
- label: k(e),
110
+ label: T(e),
69
111
  value: t
70
112
  }));
71
- }, [z, L]), ae = (e) => e < 3 ? /* @__PURE__ */ S(ee, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ S(m, { className: "h-5 w-5 text-text-secondary" });
72
- if (U || !N) return /* @__PURE__ */ S(n, {
113
+ }, [N, M]), he = (e) => e < 3 ? /* @__PURE__ */ y(ne, { className: "h-5 w-5 text-status-warning-text" }) : /* @__PURE__ */ y(f, { className: "h-5 w-5 text-text-secondary" });
114
+ if (B || !k) return /* @__PURE__ */ y(n, {
73
115
  title: "Platform Analytics",
74
116
  description: "Loading analytics...",
75
- children: /* @__PURE__ */ C("div", {
117
+ children: /* @__PURE__ */ b("div", {
76
118
  className: "flex flex-col items-center justify-center py-20",
77
- children: [/* @__PURE__ */ S(g, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ S("p", {
119
+ children: [/* @__PURE__ */ y(ie, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ y("p", {
78
120
  className: "text-text-secondary",
79
121
  children: "Loading analytics..."
80
122
  })]
81
123
  })
82
124
  });
83
- let oe = [
125
+ let ge = [
84
126
  {
85
127
  key: "overview",
86
128
  label: "Overview",
87
- icon: m
129
+ icon: f
88
130
  },
89
131
  {
90
132
  key: "revenue",
91
133
  label: "Revenue",
92
- icon: h
134
+ icon: p
93
135
  },
94
136
  {
95
137
  key: "users",
96
138
  label: "Users",
97
- icon: x
139
+ icon: _
98
140
  },
99
141
  {
100
142
  key: "performance",
101
143
  label: "Performance",
102
- icon: te
144
+ icon: v
103
145
  }
104
146
  ];
105
- return /* @__PURE__ */ C(n, {
147
+ return /* @__PURE__ */ b(n, {
106
148
  title: "Platform Analytics",
107
149
  description: "Comprehensive platform metrics and trends",
108
150
  children: [
109
- /* @__PURE__ */ S(D, {
151
+ /* @__PURE__ */ y(ce, {
110
152
  className: "mb-6",
111
153
  children: "Your bird's-eye view of how Kadaikodi is performing. Spot revenue and order trends, see which carts and categories drive the most business, and understand where customers are growing — so you can decide where to invest and which carts to promote. Switch tabs to drill into revenue, users, and operational performance."
112
154
  }),
113
- /* @__PURE__ */ S(E, {
155
+ /* @__PURE__ */ y(S, {
114
156
  storageKey: "kadaikodi-admin-analytics",
115
157
  className: "mb-6",
116
158
  steps: [
@@ -118,403 +160,452 @@ function M() {
118
160
  id: "review-carts",
119
161
  label: "Review top-performing carts",
120
162
  description: "See which carts drive the most revenue and orders.",
121
- onClick: () => H("overview")
163
+ onClick: () => F("overview")
122
164
  },
123
165
  {
124
166
  id: "check-revenue",
125
167
  label: "Break down revenue by category",
126
168
  description: "Find your strongest categories in the Revenue tab.",
127
- onClick: () => H("revenue")
169
+ onClick: () => F("revenue")
128
170
  },
129
171
  {
130
172
  id: "manage-carts",
131
173
  label: "Approve pending carts",
132
174
  description: "Onboard the carts waiting for review.",
133
- onClick: () => M("/admin/carts"),
134
- done: K === 0
175
+ onClick: () => O("/admin/carts"),
176
+ done: U === 0
135
177
  }
136
178
  ]
137
179
  }),
138
- /* @__PURE__ */ S("div", {
139
- className: "flex justify-end mb-6",
140
- children: /* @__PURE__ */ C("span", {
180
+ /* @__PURE__ */ b("div", {
181
+ className: "mb-6 flex flex-wrap items-center justify-end gap-3",
182
+ children: [/* @__PURE__ */ b("span", {
141
183
  className: "text-sm text-text-secondary",
142
184
  children: ["Last updated: ", (/* @__PURE__ */ new Date()).toLocaleString("en-IN")]
143
- })
185
+ }), /* @__PURE__ */ b("label", {
186
+ className: "flex items-center gap-2 text-sm text-text-secondary",
187
+ children: [
188
+ /* @__PURE__ */ y(re, { className: "h-4 w-4" }),
189
+ /* @__PURE__ */ y("span", {
190
+ className: "sr-only",
191
+ children: "Reporting period"
192
+ }),
193
+ /* @__PURE__ */ y("select", {
194
+ value: I,
195
+ onChange: (e) => L(e.target.value),
196
+ 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)]",
197
+ children: w.map((e) => /* @__PURE__ */ y("option", {
198
+ value: e.id,
199
+ children: e.label
200
+ }, e.id))
201
+ })
202
+ ]
203
+ })]
144
204
  }),
145
- /* @__PURE__ */ C(w, {
205
+ /* @__PURE__ */ b(se, {
146
206
  className: "mb-8",
147
- children: [/* @__PURE__ */ S("h2", {
207
+ children: [/* @__PURE__ */ y("h2", {
148
208
  className: "mb-4 text-lg font-semibold text-text-primary",
149
209
  children: "Key Metrics"
150
- }), /* @__PURE__ */ C("div", {
151
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
210
+ }), /* @__PURE__ */ b("div", {
211
+ className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-4",
152
212
  children: [
153
- /* @__PURE__ */ S(c, {
213
+ /* @__PURE__ */ y(s, {
154
214
  featured: !0,
155
- icon: /* @__PURE__ */ S(h, { className: "h-5 w-5" }),
156
- value: W(N.totalRevenue),
215
+ icon: /* @__PURE__ */ y(p, { className: "h-5 w-5" }),
216
+ value: V(k.totalRevenue),
157
217
  label: "Total Revenue"
158
218
  }),
159
- /* @__PURE__ */ S(c, {
160
- icon: /* @__PURE__ */ S(_, { className: "h-5 w-5" }),
161
- value: (N.totalOrders ?? 0).toLocaleString("en-IN"),
219
+ /* @__PURE__ */ y(s, {
220
+ icon: /* @__PURE__ */ y(ae, { className: "h-5 w-5" }),
221
+ value: (k.totalOrders ?? 0).toLocaleString("en-IN"),
162
222
  label: "Total Orders"
163
223
  }),
164
- /* @__PURE__ */ S(c, {
165
- icon: /* @__PURE__ */ S(x, { className: "h-5 w-5" }),
166
- value: (N.activeCustomers ?? 0).toLocaleString("en-IN"),
224
+ /* @__PURE__ */ y(s, {
225
+ icon: /* @__PURE__ */ y(_, { className: "h-5 w-5" }),
226
+ value: (k.activeCustomers ?? 0).toLocaleString("en-IN"),
167
227
  label: "Active Customers"
168
228
  }),
169
- /* @__PURE__ */ S(c, {
170
- icon: /* @__PURE__ */ S(y, { className: "h-5 w-5" }),
171
- value: (N.activeProviders ?? 0).toLocaleString("en-IN"),
229
+ /* @__PURE__ */ y(s, {
230
+ icon: /* @__PURE__ */ y(h, { className: "h-5 w-5" }),
231
+ value: (k.activeProviders ?? 0).toLocaleString("en-IN"),
172
232
  label: "Active Carts",
173
- trendValue: `${K} pending`
233
+ trendValue: `${U} pending`
234
+ }),
235
+ /* @__PURE__ */ y(s, {
236
+ icon: /* @__PURE__ */ y(g, { className: "h-5 w-5" }),
237
+ value: `${Q.count.toLocaleString("en-IN")}${Q.isFloor ? "+" : ""}`,
238
+ label: "New Carts",
239
+ trendValue: Q.isFloor ? `${z.toLowerCase()} · of carts loaded` : z.toLowerCase()
174
240
  })
175
241
  ]
176
242
  })]
177
243
  }),
178
- /* @__PURE__ */ C("div", {
244
+ /* @__PURE__ */ b("div", {
179
245
  className: "mb-8 grid grid-cols-1 gap-6 lg:grid-cols-2",
180
246
  children: [
181
- /* @__PURE__ */ C(T, {
247
+ /* @__PURE__ */ b(x, {
182
248
  treatment: "plain",
183
249
  className: "p-6",
184
- children: [/* @__PURE__ */ S("h3", {
250
+ children: [/* @__PURE__ */ y("h3", {
185
251
  className: "mb-4 text-base font-semibold text-text-primary",
186
252
  children: "Category Distribution"
187
- }), Q.length > 0 ? /* @__PURE__ */ S(d, {
188
- segments: Q,
189
- centerLabel: ne.toLocaleString("en-IN"),
253
+ }), J.length > 0 ? /* @__PURE__ */ y(te, {
254
+ segments: J,
255
+ centerLabel: Y.toLocaleString("en-IN"),
190
256
  centerCaption: "carts",
191
257
  valueFormatter: (e) => e.toLocaleString("en-IN")
192
- }) : /* @__PURE__ */ S("p", {
258
+ }) : /* @__PURE__ */ y("p", {
193
259
  className: "text-sm text-text-secondary",
194
260
  children: "Category breakdown will appear here as carts are onboarded."
195
261
  })]
196
262
  }),
197
- /* @__PURE__ */ C(T, {
263
+ /* @__PURE__ */ b(x, {
198
264
  treatment: "plain",
199
265
  className: "p-6",
200
- children: [/* @__PURE__ */ C("div", {
266
+ children: [/* @__PURE__ */ b("div", {
201
267
  className: "mb-4 flex items-center justify-between gap-2",
202
- children: [/* @__PURE__ */ S("h3", {
268
+ children: [/* @__PURE__ */ y("h3", {
203
269
  className: "text-base font-semibold text-text-primary",
204
270
  children: "GMV over time"
205
- }), /* @__PURE__ */ S("span", {
271
+ }), /* @__PURE__ */ y("span", {
206
272
  className: "text-xs text-text-muted",
207
- children: "Last 30 days"
273
+ children: z
208
274
  })]
209
- }), z.length > 0 ? /* @__PURE__ */ S(l, {
210
- series: re,
275
+ }), N.length > 0 ? /* @__PURE__ */ y(c, {
276
+ series: pe,
211
277
  height: 200,
212
- valueFormatter: (e) => W(e),
213
- title: "Gross merchandise value per day over the last 30 days"
214
- }) : /* @__PURE__ */ S("p", {
278
+ valueFormatter: (e) => V(e),
279
+ title: `Gross merchandise value per day, ${z.toLowerCase()}`
280
+ }) : /* @__PURE__ */ y("p", {
215
281
  className: "text-sm text-text-secondary",
216
282
  children: "GMV will chart here once orders are placed."
217
283
  })]
218
284
  }),
219
- /* @__PURE__ */ C(T, {
285
+ /* @__PURE__ */ b(x, {
286
+ treatment: "plain",
287
+ className: "p-6",
288
+ children: [/* @__PURE__ */ b("div", {
289
+ className: "mb-4 flex items-center justify-between gap-2",
290
+ children: [/* @__PURE__ */ y("h3", {
291
+ className: "text-base font-semibold text-text-primary",
292
+ children: "Customer Growth"
293
+ }), /* @__PURE__ */ y("span", {
294
+ className: "text-xs text-text-muted",
295
+ children: z
296
+ })]
297
+ }), Z.length > 0 ? /* @__PURE__ */ b(oe, { children: [/* @__PURE__ */ y(c, {
298
+ series: Z,
299
+ height: 200,
300
+ valueFormatter: (e) => e.toLocaleString("en-IN"),
301
+ title: `Cumulative distinct ordering customers, ${z.toLowerCase()}`
302
+ }), /* @__PURE__ */ y("p", {
303
+ className: "mt-3 text-xs text-text-muted",
304
+ children: "Distinct customers seen in the recent order stream, cumulative by day."
305
+ })] }) : /* @__PURE__ */ y("p", {
306
+ className: "text-sm text-text-secondary",
307
+ children: "Customer growth will chart here once orders carry customers."
308
+ })]
309
+ }),
310
+ /* @__PURE__ */ b(x, {
220
311
  treatment: "plain",
221
312
  className: "p-6",
222
- children: [/* @__PURE__ */ C("div", {
313
+ children: [/* @__PURE__ */ b("div", {
223
314
  className: "mb-4 flex items-center justify-between gap-2",
224
- children: [/* @__PURE__ */ S("h3", {
315
+ children: [/* @__PURE__ */ y("h3", {
225
316
  className: "text-base font-semibold text-text-primary",
226
317
  children: "Order Volume"
227
- }), /* @__PURE__ */ S("span", {
318
+ }), /* @__PURE__ */ y("span", {
228
319
  className: "text-xs text-text-muted",
229
- children: "Last 30 days"
320
+ children: z
230
321
  })]
231
- }), z.length > 0 ? /* @__PURE__ */ S(l, {
232
- series: ie,
322
+ }), N.length > 0 ? /* @__PURE__ */ y(c, {
323
+ series: me,
233
324
  height: 200,
234
325
  valueFormatter: (e) => e.toLocaleString("en-IN"),
235
- title: "Order volume per day over the last 30 days"
236
- }) : /* @__PURE__ */ S("p", {
326
+ title: `Order volume per day, ${z.toLowerCase()}`
327
+ }) : /* @__PURE__ */ y("p", {
237
328
  className: "text-sm text-text-secondary",
238
329
  children: "Order volume will chart here once orders are placed."
239
330
  })]
240
331
  }),
241
- /* @__PURE__ */ C(T, {
332
+ /* @__PURE__ */ b(x, {
242
333
  treatment: "plain",
243
334
  className: "p-6",
244
- children: [/* @__PURE__ */ S("h3", {
335
+ children: [/* @__PURE__ */ y("h3", {
245
336
  className: "mb-4 text-base font-semibold text-text-primary",
246
337
  children: "Top Categories by Revenue"
247
- }), $.length > 0 ? /* @__PURE__ */ S(u, {
338
+ }), $.length > 0 ? /* @__PURE__ */ y(l, {
248
339
  stages: $,
249
340
  showConversion: !1,
250
- valueFormatter: (e) => W(e)
251
- }) : /* @__PURE__ */ S("p", {
341
+ valueFormatter: (e) => V(e)
342
+ }) : /* @__PURE__ */ y("p", {
252
343
  className: "text-sm text-text-secondary",
253
344
  children: "Category revenue will rank here as orders come in."
254
345
  })]
255
346
  })
256
347
  ]
257
348
  }),
258
- /* @__PURE__ */ C("div", {
349
+ /* @__PURE__ */ b("div", {
259
350
  className: "rounded-lg border border-border-subtle bg-bg-surface mb-8",
260
- children: [/* @__PURE__ */ S("div", {
351
+ children: [/* @__PURE__ */ y("div", {
261
352
  className: "border-b border-border-subtle",
262
- children: /* @__PURE__ */ S("nav", {
353
+ children: /* @__PURE__ */ y("nav", {
263
354
  className: "flex -mb-px overflow-x-auto",
264
- children: oe.map((e) => {
355
+ children: ge.map((e) => {
265
356
  let n = e.icon;
266
- return /* @__PURE__ */ C("button", {
357
+ return /* @__PURE__ */ b("button", {
267
358
  type: "button",
268
- onClick: () => H(e.key),
269
- className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors", V === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
270
- children: [/* @__PURE__ */ S(n, { className: "h-4 w-4" }), /* @__PURE__ */ S("span", {
359
+ onClick: () => F(e.key),
360
+ className: t("flex items-center gap-2 py-3 px-4 sm:px-6 text-sm font-medium whitespace-nowrap border-b-2 transition-colors", P === e.key ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
361
+ children: [/* @__PURE__ */ y(n, { className: "h-4 w-4" }), /* @__PURE__ */ y("span", {
271
362
  className: "hidden sm:inline",
272
363
  children: e.label
273
364
  })]
274
365
  }, e.key);
275
366
  })
276
367
  })
277
- }), /* @__PURE__ */ C("div", {
368
+ }), /* @__PURE__ */ b("div", {
278
369
  className: "p-4 sm:p-6",
279
370
  children: [
280
- V === "overview" && /* @__PURE__ */ C("div", {
371
+ P === "overview" && /* @__PURE__ */ b("div", {
281
372
  className: "space-y-8",
282
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
373
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
283
374
  className: "text-lg font-semibold text-text-primary mb-4",
284
375
  children: "Order Status Distribution"
285
- }), G.total > 0 ? /* @__PURE__ */ C("div", {
376
+ }), H.total > 0 ? /* @__PURE__ */ b("div", {
286
377
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
287
378
  children: [
288
- /* @__PURE__ */ C("div", {
379
+ /* @__PURE__ */ b("div", {
289
380
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4",
290
381
  children: [
291
- /* @__PURE__ */ S("p", {
382
+ /* @__PURE__ */ y("p", {
292
383
  className: "text-sm text-status-success-text",
293
384
  children: "Completed Orders"
294
385
  }),
295
- /* @__PURE__ */ S("p", {
386
+ /* @__PURE__ */ y("p", {
296
387
  className: "text-2xl font-bold text-status-success-text",
297
- children: G.completed.toLocaleString("en-IN")
388
+ children: H.completed.toLocaleString("en-IN")
298
389
  }),
299
- /* @__PURE__ */ C("p", {
390
+ /* @__PURE__ */ b("p", {
300
391
  className: "text-sm text-status-success-text/80",
301
- children: [Z(G.completed, G.total).toFixed(1), "% of total"]
392
+ children: [q(H.completed, H.total).toFixed(1), "% of total"]
302
393
  })
303
394
  ]
304
395
  }),
305
- /* @__PURE__ */ C("div", {
396
+ /* @__PURE__ */ b("div", {
306
397
  className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4",
307
398
  children: [
308
- /* @__PURE__ */ S("p", {
399
+ /* @__PURE__ */ y("p", {
309
400
  className: "text-sm text-status-warning-text",
310
401
  children: "Pending Orders"
311
402
  }),
312
- /* @__PURE__ */ S("p", {
403
+ /* @__PURE__ */ y("p", {
313
404
  className: "text-2xl font-bold text-status-warning-text",
314
- children: G.pending.toLocaleString("en-IN")
405
+ children: H.pending.toLocaleString("en-IN")
315
406
  }),
316
- /* @__PURE__ */ C("p", {
407
+ /* @__PURE__ */ b("p", {
317
408
  className: "text-sm text-status-warning-text/80",
318
- children: [Z(G.pending, G.total).toFixed(1), "% of total"]
409
+ children: [q(H.pending, H.total).toFixed(1), "% of total"]
319
410
  })
320
411
  ]
321
412
  }),
322
- /* @__PURE__ */ C("div", {
413
+ /* @__PURE__ */ b("div", {
323
414
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle p-4",
324
415
  children: [
325
- /* @__PURE__ */ S("p", {
416
+ /* @__PURE__ */ y("p", {
326
417
  className: "text-sm text-status-error-text",
327
418
  children: "Cancelled Orders"
328
419
  }),
329
- /* @__PURE__ */ S("p", {
420
+ /* @__PURE__ */ y("p", {
330
421
  className: "text-2xl font-bold text-status-error-text",
331
- children: G.cancelled.toLocaleString("en-IN")
422
+ children: H.cancelled.toLocaleString("en-IN")
332
423
  }),
333
- /* @__PURE__ */ C("p", {
424
+ /* @__PURE__ */ b("p", {
334
425
  className: "text-sm text-status-error-text/80",
335
- children: [Z(G.cancelled, G.total).toFixed(1), "% of total"]
426
+ children: [q(H.cancelled, H.total).toFixed(1), "% of total"]
336
427
  })
337
428
  ]
338
429
  })
339
430
  ]
340
- }) : /* @__PURE__ */ S("p", {
431
+ }) : /* @__PURE__ */ y("p", {
341
432
  className: "text-sm text-text-secondary",
342
433
  children: "Order breakdowns will appear here once orders are placed."
343
- })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
434
+ })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
344
435
  className: "text-lg font-semibold text-text-primary mb-4",
345
436
  children: "Top Performing Carts"
346
- }), q.length > 0 ? /* @__PURE__ */ S("div", {
437
+ }), W.length > 0 ? /* @__PURE__ */ y("div", {
347
438
  className: "rounded-lg border border-border-subtle overflow-hidden",
348
- children: /* @__PURE__ */ C("table", {
439
+ children: /* @__PURE__ */ b("table", {
349
440
  className: "w-full",
350
- children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", {
441
+ children: [/* @__PURE__ */ y("thead", { children: /* @__PURE__ */ b("tr", {
351
442
  className: "border-b border-border-subtle bg-bg-sunken/50",
352
443
  children: [
353
- /* @__PURE__ */ S("th", {
444
+ /* @__PURE__ */ y("th", {
354
445
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
355
446
  children: "Cart Name"
356
447
  }),
357
- /* @__PURE__ */ S("th", {
448
+ /* @__PURE__ */ y("th", {
358
449
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase",
359
450
  children: "Category"
360
451
  }),
361
- /* @__PURE__ */ S("th", {
452
+ /* @__PURE__ */ y("th", {
362
453
  className: "px-4 py-3 text-right text-xs font-medium text-text-secondary uppercase",
363
454
  children: "Rating"
364
455
  })
365
456
  ]
366
- }) }), /* @__PURE__ */ S("tbody", {
457
+ }) }), /* @__PURE__ */ y("tbody", {
367
458
  className: "divide-y divide-border",
368
- children: q.map((e, t) => /* @__PURE__ */ C("tr", {
459
+ children: W.map((e, t) => /* @__PURE__ */ b("tr", {
369
460
  className: "hover:bg-accent/50 transition-colors",
370
461
  children: [
371
- /* @__PURE__ */ S("td", {
462
+ /* @__PURE__ */ y("td", {
372
463
  className: "px-4 py-3",
373
- children: /* @__PURE__ */ C("div", {
464
+ children: /* @__PURE__ */ b("div", {
374
465
  className: "flex items-center gap-2",
375
- children: [ae(t), /* @__PURE__ */ S("span", {
466
+ children: [he(t), /* @__PURE__ */ y("span", {
376
467
  className: "text-sm font-medium text-text-primary",
377
468
  children: e.name
378
469
  })]
379
470
  })
380
471
  }),
381
- /* @__PURE__ */ S("td", {
472
+ /* @__PURE__ */ y("td", {
382
473
  className: "px-4 py-3 text-sm text-left text-text-secondary capitalize",
383
- children: X(e.category)
474
+ children: K(e.category)
384
475
  }),
385
- /* @__PURE__ */ S("td", {
476
+ /* @__PURE__ */ y("td", {
386
477
  className: "px-4 py-3 text-sm text-right text-text-primary",
387
- children: /* @__PURE__ */ C("span", {
478
+ children: /* @__PURE__ */ b("span", {
388
479
  className: "flex items-center justify-end gap-1",
389
- children: [/* @__PURE__ */ S(v, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
480
+ children: [/* @__PURE__ */ y(m, { className: "h-3.5 w-3.5 fill-status-warning-text text-status-warning-text" }), (e.rating ?? 0).toFixed(1)]
390
481
  })
391
482
  })
392
483
  ]
393
484
  }, e.id))
394
485
  })]
395
486
  })
396
- }) : /* @__PURE__ */ S("p", {
487
+ }) : /* @__PURE__ */ y("p", {
397
488
  className: "text-sm text-text-secondary",
398
489
  children: "Top-performing carts will be ranked here once orders start flowing."
399
490
  })] })]
400
491
  }),
401
- V === "revenue" && /* @__PURE__ */ C("div", {
492
+ P === "revenue" && /* @__PURE__ */ b("div", {
402
493
  className: "space-y-8",
403
- children: [/* @__PURE__ */ C("div", {
494
+ children: [/* @__PURE__ */ b("div", {
404
495
  className: "grid grid-cols-1 md:grid-cols-3 gap-4",
405
496
  children: [
406
- /* @__PURE__ */ C("div", {
497
+ /* @__PURE__ */ b("div", {
407
498
  className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-6",
408
- children: [/* @__PURE__ */ S("h4", {
499
+ children: [/* @__PURE__ */ y("h4", {
409
500
  className: "text-sm font-medium text-text-primary mb-2",
410
501
  children: "Total Revenue"
411
- }), /* @__PURE__ */ S("p", {
502
+ }), /* @__PURE__ */ y("p", {
412
503
  className: "text-2xl font-bold text-text-primary",
413
- children: W(N.totalRevenue)
504
+ children: V(k.totalRevenue)
414
505
  })]
415
506
  }),
416
- /* @__PURE__ */ C("div", {
507
+ /* @__PURE__ */ b("div", {
417
508
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
418
- children: [/* @__PURE__ */ S("h4", {
509
+ children: [/* @__PURE__ */ y("h4", {
419
510
  className: "text-sm font-medium text-text-secondary mb-2",
420
511
  children: "Total Orders"
421
- }), /* @__PURE__ */ S("p", {
512
+ }), /* @__PURE__ */ y("p", {
422
513
  className: "text-2xl font-bold text-text-primary",
423
- children: (N.totalOrders ?? 0).toLocaleString("en-IN")
514
+ children: (k.totalOrders ?? 0).toLocaleString("en-IN")
424
515
  })]
425
516
  }),
426
- /* @__PURE__ */ C("div", {
517
+ /* @__PURE__ */ b("div", {
427
518
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-6",
428
- children: [/* @__PURE__ */ S("h4", {
519
+ children: [/* @__PURE__ */ y("h4", {
429
520
  className: "text-sm font-medium text-status-success-text mb-2",
430
521
  children: "Average Order Value"
431
- }), /* @__PURE__ */ S("p", {
522
+ }), /* @__PURE__ */ y("p", {
432
523
  className: "text-2xl font-bold text-status-success-text",
433
- children: W(G.avgOrderValue)
524
+ children: V(H.avgOrderValue)
434
525
  })]
435
526
  })
436
527
  ]
437
- }), $.length > 0 ? /* @__PURE__ */ C("div", { children: [
438
- /* @__PURE__ */ S("h4", {
528
+ }), $.length > 0 ? /* @__PURE__ */ b("div", { children: [
529
+ /* @__PURE__ */ y("h4", {
439
530
  className: "mb-3 text-sm font-semibold text-text-primary",
440
531
  children: "Revenue by Category"
441
532
  }),
442
- /* @__PURE__ */ S(u, {
533
+ /* @__PURE__ */ y(l, {
443
534
  stages: $,
444
535
  showConversion: !1,
445
- valueFormatter: (e) => W(e)
536
+ valueFormatter: (e) => V(e)
446
537
  }),
447
- /* @__PURE__ */ S("p", {
538
+ /* @__PURE__ */ y("p", {
448
539
  className: "mt-3 text-xs text-text-muted",
449
540
  children: "Derived by attributing each order's value to its cart's category."
450
541
  })
451
- ] }) : /* @__PURE__ */ S("p", {
542
+ ] }) : /* @__PURE__ */ y("p", {
452
543
  className: "text-sm text-text-secondary",
453
544
  children: "Revenue by category will appear here as orders come in."
454
545
  })]
455
546
  }),
456
- V === "users" && /* @__PURE__ */ C("div", {
547
+ P === "users" && /* @__PURE__ */ b("div", {
457
548
  className: "space-y-8",
458
549
  children: [
459
- /* @__PURE__ */ C("div", {
550
+ /* @__PURE__ */ b("div", {
460
551
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
461
- children: [/* @__PURE__ */ C("div", {
552
+ children: [/* @__PURE__ */ b("div", {
462
553
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
463
- children: [/* @__PURE__ */ C("div", {
554
+ children: [/* @__PURE__ */ b("div", {
464
555
  className: "flex items-center gap-2 mb-2",
465
- children: [/* @__PURE__ */ S(x, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ S("h4", {
556
+ children: [/* @__PURE__ */ y(_, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ y("h4", {
466
557
  className: "text-sm font-medium text-text-secondary",
467
558
  children: "Active Customers"
468
559
  })]
469
- }), /* @__PURE__ */ S("p", {
560
+ }), /* @__PURE__ */ y("p", {
470
561
  className: "text-3xl font-bold text-text-primary",
471
- children: (N.activeCustomers ?? 0).toLocaleString("en-IN")
562
+ children: (k.activeCustomers ?? 0).toLocaleString("en-IN")
472
563
  })]
473
- }), /* @__PURE__ */ C("div", {
564
+ }), /* @__PURE__ */ b("div", {
474
565
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-6",
475
- children: [/* @__PURE__ */ C("div", {
566
+ children: [/* @__PURE__ */ b("div", {
476
567
  className: "flex items-center gap-2 mb-2",
477
- children: [/* @__PURE__ */ S(y, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ S("h4", {
568
+ children: [/* @__PURE__ */ y(h, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ y("h4", {
478
569
  className: "text-sm font-medium text-text-secondary",
479
570
  children: "Active Cart Owners"
480
571
  })]
481
- }), /* @__PURE__ */ S("p", {
572
+ }), /* @__PURE__ */ y("p", {
482
573
  className: "text-3xl font-bold text-text-primary",
483
- children: (N.activeProviders ?? 0).toLocaleString("en-IN")
574
+ children: (k.activeProviders ?? 0).toLocaleString("en-IN")
484
575
  })]
485
576
  })]
486
577
  }),
487
- /* @__PURE__ */ C("div", {
578
+ /* @__PURE__ */ b("div", {
488
579
  className: "rounded-lg border border-border-subtle bg-bg-sunken/20 p-6",
489
580
  children: [
490
- /* @__PURE__ */ C("div", {
581
+ /* @__PURE__ */ b("div", {
491
582
  className: "flex items-center gap-2 mb-2",
492
- children: [/* @__PURE__ */ S(x, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ S("h3", {
583
+ children: [/* @__PURE__ */ y(_, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ y("h3", {
493
584
  className: "text-sm font-medium text-text-secondary",
494
585
  children: "Total Customers"
495
586
  })]
496
587
  }),
497
- /* @__PURE__ */ S("p", {
588
+ /* @__PURE__ */ y("p", {
498
589
  className: "text-3xl font-bold text-text-primary",
499
- children: J.toLocaleString("en-IN")
590
+ children: fe.toLocaleString("en-IN")
500
591
  }),
501
- /* @__PURE__ */ S("p", {
592
+ /* @__PURE__ */ y("p", {
502
593
  className: "mt-1 text-sm text-text-secondary",
503
594
  children: "Customers on the platform to date."
504
595
  })
505
596
  ]
506
597
  }),
507
- Y.length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h3", {
598
+ G.length > 0 && /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h3", {
508
599
  className: "text-lg font-semibold text-text-primary mb-4",
509
600
  children: "Cart Category Distribution"
510
- }), /* @__PURE__ */ S("div", {
601
+ }), /* @__PURE__ */ y("div", {
511
602
  className: "space-y-3",
512
- children: Y.map((e) => /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
603
+ children: G.map((e) => /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("div", {
513
604
  className: "flex items-center justify-between mb-1",
514
- children: [/* @__PURE__ */ S("span", {
605
+ children: [/* @__PURE__ */ y("span", {
515
606
  className: "text-sm font-medium text-text-primary capitalize",
516
- children: X(e.category)
517
- }), /* @__PURE__ */ C("span", {
607
+ children: K(e.category)
608
+ }), /* @__PURE__ */ b("span", {
518
609
  className: "text-sm text-text-secondary",
519
610
  children: [
520
611
  (e.count ?? 0).toLocaleString("en-IN"),
@@ -523,9 +614,9 @@ function M() {
523
614
  "%)"
524
615
  ]
525
616
  })]
526
- }), /* @__PURE__ */ S("div", {
617
+ }), /* @__PURE__ */ y("div", {
527
618
  className: "w-full bg-bg-sunken rounded-full h-2",
528
- children: /* @__PURE__ */ S("div", {
619
+ children: /* @__PURE__ */ y("div", {
529
620
  className: "bg-action-primary-bg h-2 rounded-full transition-all duration-300",
530
621
  style: { width: `${e.percentage}%` }
531
622
  })
@@ -533,91 +624,91 @@ function M() {
533
624
  })] })
534
625
  ]
535
626
  }),
536
- V === "performance" && /* @__PURE__ */ C("div", {
627
+ P === "performance" && /* @__PURE__ */ b("div", {
537
628
  className: "space-y-8",
538
- children: [/* @__PURE__ */ C("div", {
629
+ children: [/* @__PURE__ */ b("div", {
539
630
  className: "grid grid-cols-1 md:grid-cols-3 gap-6",
540
631
  children: [
541
- /* @__PURE__ */ C("div", {
632
+ /* @__PURE__ */ b("div", {
542
633
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
543
634
  children: [
544
- /* @__PURE__ */ C("div", {
635
+ /* @__PURE__ */ b("div", {
545
636
  className: "flex items-center gap-2 mb-2",
546
- children: [/* @__PURE__ */ S(v, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("h4", {
637
+ children: [/* @__PURE__ */ y(m, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ y("h4", {
547
638
  className: "text-sm font-medium text-text-secondary",
548
639
  children: "Customer Satisfaction"
549
640
  })]
550
641
  }),
551
- /* @__PURE__ */ C("p", {
642
+ /* @__PURE__ */ b("p", {
552
643
  className: "text-3xl font-bold text-text-primary flex items-center gap-1",
553
- children: [/* @__PURE__ */ S(v, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), N.avgRating > 0 ? N.avgRating.toFixed(1) : "—"]
644
+ children: [/* @__PURE__ */ y(m, { className: "h-6 w-6 fill-status-warning-text text-status-warning-text" }), k.avgRating > 0 ? k.avgRating.toFixed(1) : "—"]
554
645
  }),
555
- /* @__PURE__ */ S("p", {
646
+ /* @__PURE__ */ y("p", {
556
647
  className: "text-sm text-text-secondary mt-1",
557
648
  children: "Average rating across carts"
558
649
  })
559
650
  ]
560
651
  }),
561
- /* @__PURE__ */ C("div", {
652
+ /* @__PURE__ */ b("div", {
562
653
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
563
654
  children: [
564
- /* @__PURE__ */ C("div", {
655
+ /* @__PURE__ */ b("div", {
565
656
  className: "flex items-center gap-2 mb-2",
566
- children: [/* @__PURE__ */ S(b, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("h4", {
657
+ children: [/* @__PURE__ */ y(g, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ y("h4", {
567
658
  className: "text-sm font-medium text-text-secondary",
568
659
  children: "Completion Rate"
569
660
  })]
570
661
  }),
571
- /* @__PURE__ */ S("p", {
662
+ /* @__PURE__ */ y("p", {
572
663
  className: "text-3xl font-bold text-text-primary",
573
- children: G.total > 0 ? `${Z(G.completed, G.total).toFixed(1)}%` : "—"
664
+ children: H.total > 0 ? `${q(H.completed, H.total).toFixed(1)}%` : "—"
574
665
  }),
575
- /* @__PURE__ */ S("p", {
666
+ /* @__PURE__ */ y("p", {
576
667
  className: "text-sm text-text-secondary mt-1",
577
668
  children: "Orders delivered"
578
669
  })
579
670
  ]
580
671
  }),
581
- /* @__PURE__ */ C("div", {
672
+ /* @__PURE__ */ b("div", {
582
673
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
583
674
  children: [
584
- /* @__PURE__ */ C("div", {
675
+ /* @__PURE__ */ b("div", {
585
676
  className: "flex items-center gap-2 mb-2",
586
- children: [/* @__PURE__ */ S(m, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ S("h4", {
677
+ children: [/* @__PURE__ */ y(f, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ y("h4", {
587
678
  className: "text-sm font-medium text-text-secondary",
588
679
  children: "Cancellation Rate"
589
680
  })]
590
681
  }),
591
- /* @__PURE__ */ S("p", {
682
+ /* @__PURE__ */ y("p", {
592
683
  className: "text-3xl font-bold text-text-primary",
593
- children: G.total > 0 ? `${Z(G.cancelled, G.total).toFixed(1)}%` : "—"
684
+ children: H.total > 0 ? `${q(H.cancelled, H.total).toFixed(1)}%` : "—"
594
685
  }),
595
- /* @__PURE__ */ S("p", {
686
+ /* @__PURE__ */ y("p", {
596
687
  className: "text-sm text-text-secondary mt-1",
597
688
  children: "Orders cancelled"
598
689
  })
599
690
  ]
600
691
  })
601
692
  ]
602
- }), /* @__PURE__ */ C("div", {
693
+ }), /* @__PURE__ */ b("div", {
603
694
  className: "rounded-lg border border-border-subtle bg-bg-surface p-6",
604
- children: [/* @__PURE__ */ S("h3", {
695
+ children: [/* @__PURE__ */ y("h3", {
605
696
  className: "text-lg font-semibold text-text-primary mb-4",
606
697
  children: "Today's Activity"
607
- }), /* @__PURE__ */ C("div", {
698
+ }), /* @__PURE__ */ b("div", {
608
699
  className: "grid grid-cols-1 md:grid-cols-2 gap-6",
609
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
700
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
610
701
  className: "text-sm text-text-secondary mb-2",
611
702
  children: "Orders Today"
612
- }), /* @__PURE__ */ S("p", {
703
+ }), /* @__PURE__ */ y("p", {
613
704
  className: "text-3xl font-bold text-text-primary",
614
- children: G.ordersToday.toLocaleString("en-IN")
615
- })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
705
+ children: H.ordersToday.toLocaleString("en-IN")
706
+ })] }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
616
707
  className: "text-sm text-text-secondary mb-2",
617
708
  children: "Pending Orders"
618
- }), /* @__PURE__ */ S("p", {
709
+ }), /* @__PURE__ */ y("p", {
619
710
  className: "text-3xl font-bold text-status-warning-text",
620
- children: (N.pendingOrders ?? 0).toLocaleString("en-IN")
711
+ children: (k.pendingOrders ?? 0).toLocaleString("en-IN")
621
712
  })] })]
622
713
  })]
623
714
  })]
@@ -629,6 +720,6 @@ function M() {
629
720
  });
630
721
  }
631
722
  //#endregion
632
- export { M as AdminAnalyticsPage };
723
+ export { O as AdminAnalyticsPage };
633
724
 
634
725
  //# sourceMappingURL=AdminAnalyticsPage.js.map