@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.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 (63) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +209 -105
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/HomePage.js +4 -4
  4. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +1 -1
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +1 -1
  8. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
  10. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
  12. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +214 -214
  14. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  15. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +226 -230
  16. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  17. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +255 -256
  18. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  19. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +275 -278
  20. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +228 -446
  22. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  23. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +1 -1
  24. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  25. package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
  26. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  27. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
  28. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  29. package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
  30. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  32. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
  34. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
  36. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
  38. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
  40. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +304 -458
  42. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +1 -1
  44. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  45. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +2 -2
  46. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +361 -361
  48. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  49. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +226 -220
  50. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +15 -15
  52. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  53. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +2 -2
  54. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  55. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +252 -253
  56. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  57. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +3 -3
  58. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  59. package/package.json +1 -1
  60. package/dist/kadaikodi/mocks/data.js +0 -1517
  61. package/dist/kadaikodi/mocks/data.js.map +0 -1
  62. package/dist/kadaikodi/mocks/users.js +0 -34
  63. package/dist/kadaikodi/mocks/users.js.map +0 -1
@@ -1,14 +1,14 @@
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 { formatCurrency as r } from "../../utils/formatters.js";
5
- import { mockAdminAnalytics as i } from "../../mocks/data.js";
6
- import { useState as a } from "react";
7
- import { ArrowDownRight as o, ArrowUpRight as s, BarChart3 as c, CalendarDays as l, Clock as u, Download as d, IndianRupee as f, Percent as p, ShoppingCart as m, Star as h, Target as g, ThumbsUp as _, TrendingUp as v, Users as y } from "lucide-react";
8
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
9
- import { EmphasisPanel as C, NextSteps as w, PagePurpose as T } from "@burdenoff/fe-libs/ui";
4
+ import { useAdminAnalytics as r, useDashboardStats as i } from "../../hooks/useKadaikodiApi.js";
5
+ import { formatCurrency as a } from "../../utils/formatters.js";
6
+ import { useState as o } from "react";
7
+ import { ArrowDownRight as s, ArrowUpRight as c, BarChart3 as l, CalendarDays as u, Clock as d, Download as f, IndianRupee as p, Percent as m, ShoppingCart as h, Star as g, Target as _, ThumbsUp as v, TrendingUp as y, Users as b } from "lucide-react";
8
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
9
+ import { EmphasisPanel as w, NextSteps as T, PagePurpose as E } from "@burdenoff/fe-libs/ui";
10
10
  //#region src/kadaikodi/pages/cart-owner/AnalyticsDashboard.tsx
11
- var E = {
11
+ var D = {
12
12
  revenue: {
13
13
  today: 12450,
14
14
  week: 87150,
@@ -250,48 +250,48 @@ var E = {
250
250
  }
251
251
  ]
252
252
  }
253
- }, D = () => {
254
- let { navigateTo: D } = e(), [O, k] = a("week"), A = Math.max(...E.orders.popularTimes.map((e) => e.orders)), j = Math.max(...E.offerings.categories.map((e) => e.revenue)), M = Math.max(...E.performance.peakHours.map((e) => e.orders)), N = Math.max(...E.performance.peakDays.map((e) => e.orders)), P = (e) => `${e > 0 ? "+" : ""}${e}%`;
255
- return /* @__PURE__ */ S(n, {
253
+ }, O = () => {
254
+ let { navigateTo: O } = e(), { data: k } = r(), { data: A } = i(), [j, M] = o("week"), N = k?.orderTrends ?? [], P = k?.customerGrowth ?? [], F = Math.max(...D.orders.popularTimes.map((e) => e.orders)), I = Math.max(...D.offerings.categories.map((e) => e.revenue)), L = Math.max(...D.performance.peakHours.map((e) => e.orders)), R = Math.max(...D.performance.peakDays.map((e) => e.orders)), z = (e) => `${e > 0 ? "+" : ""}${e}%`;
255
+ return /* @__PURE__ */ C(n, {
256
256
  title: "Analytics Dashboard",
257
257
  description: "Business performance insights and data",
258
- actions: /* @__PURE__ */ S("div", {
258
+ actions: /* @__PURE__ */ C("div", {
259
259
  className: "flex items-center gap-2",
260
- children: [/* @__PURE__ */ S("select", {
261
- value: O,
262
- onChange: (e) => k(e.target.value),
260
+ children: [/* @__PURE__ */ C("select", {
261
+ value: j,
262
+ onChange: (e) => M(e.target.value),
263
263
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
264
264
  children: [
265
- /* @__PURE__ */ x("option", {
265
+ /* @__PURE__ */ S("option", {
266
266
  value: "today",
267
267
  children: "Today"
268
268
  }),
269
- /* @__PURE__ */ x("option", {
269
+ /* @__PURE__ */ S("option", {
270
270
  value: "week",
271
271
  children: "This Week"
272
272
  }),
273
- /* @__PURE__ */ x("option", {
273
+ /* @__PURE__ */ S("option", {
274
274
  value: "month",
275
275
  children: "This Month"
276
276
  }),
277
- /* @__PURE__ */ x("option", {
277
+ /* @__PURE__ */ S("option", {
278
278
  value: "year",
279
279
  children: "This Year"
280
280
  })
281
281
  ]
282
- }), /* @__PURE__ */ S("button", {
282
+ }), /* @__PURE__ */ C("button", {
283
283
  type: "button",
284
284
  onClick: () => alert("Export feature coming soon!"),
285
285
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-sm text-text-primary hover:bg-bg-sunken transition-colors",
286
- children: [/* @__PURE__ */ x(d, { className: "h-4 w-4" }), "Export"]
286
+ children: [/* @__PURE__ */ S(f, { className: "h-4 w-4" }), "Export"]
287
287
  })]
288
288
  }),
289
289
  children: [
290
- /* @__PURE__ */ x(T, {
290
+ /* @__PURE__ */ S(E, {
291
291
  className: "mb-6",
292
292
  children: "The performance story of your cart. Use this page to understand how your business is really doing — track revenue over time, see how orders break down, learn which hours are busiest so you can staff and stock accordingly, and spot your best-selling items. Change the date range to compare periods and act on what's growing (or slowing)."
293
293
  }),
294
- /* @__PURE__ */ x(w, {
294
+ /* @__PURE__ */ S(T, {
295
295
  storageKey: "kadaikodi-owner-analytics",
296
296
  className: "mb-6",
297
297
  steps: [
@@ -299,151 +299,151 @@ var E = {
299
299
  id: "inventory",
300
300
  label: "Restock your best-sellers",
301
301
  description: "Make sure popular items never run out.",
302
- onClick: () => D("/owner/inventory")
302
+ onClick: () => O("/owner/inventory")
303
303
  },
304
304
  {
305
305
  id: "orders",
306
306
  label: "Work through live orders",
307
307
  description: "Keep prep and delivery times sharp.",
308
- onClick: () => D("/owner/orders")
308
+ onClick: () => O("/owner/orders")
309
309
  },
310
310
  {
311
311
  id: "staff",
312
312
  label: "Plan staff for peak hours",
313
313
  description: "Cover the busiest times you see here.",
314
- onClick: () => D("/owner/staff")
314
+ onClick: () => O("/owner/staff")
315
315
  }
316
316
  ]
317
317
  }),
318
- /* @__PURE__ */ S("div", {
318
+ /* @__PURE__ */ C("div", {
319
319
  className: "space-y-6",
320
320
  children: [
321
- /* @__PURE__ */ S(C, { children: [/* @__PURE__ */ x("h2", {
321
+ /* @__PURE__ */ C(w, { children: [/* @__PURE__ */ S("h2", {
322
322
  className: "text-base font-semibold text-text-primary mb-3",
323
323
  children: "Revenue Overview"
324
- }), /* @__PURE__ */ x("div", {
324
+ }), /* @__PURE__ */ S("div", {
325
325
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
326
326
  children: [
327
327
  {
328
328
  label: "Today's Revenue",
329
- value: E.revenue.today,
330
- growth: E.revenue.growth.daily
329
+ value: D.revenue.today,
330
+ growth: D.revenue.growth.daily
331
331
  },
332
332
  {
333
333
  label: "This Week",
334
- value: E.revenue.week,
335
- growth: E.revenue.growth.weekly
334
+ value: D.revenue.week,
335
+ growth: D.revenue.growth.weekly
336
336
  },
337
337
  {
338
338
  label: "This Month",
339
- value: E.revenue.month,
340
- growth: E.revenue.growth.monthly
339
+ value: D.revenue.month,
340
+ growth: D.revenue.growth.monthly
341
341
  },
342
342
  {
343
343
  label: "This Year",
344
- value: E.revenue.year,
344
+ value: D.revenue.year,
345
345
  growth: null
346
346
  }
347
- ].map((e) => /* @__PURE__ */ S("div", {
347
+ ].map((e) => /* @__PURE__ */ C("div", {
348
348
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
349
349
  children: [
350
- /* @__PURE__ */ S("div", {
350
+ /* @__PURE__ */ C("div", {
351
351
  className: "flex items-center justify-between",
352
- children: [/* @__PURE__ */ x("div", {
352
+ children: [/* @__PURE__ */ S("div", {
353
353
  className: "rounded-md bg-accent p-2",
354
- children: /* @__PURE__ */ x(f, { className: "h-5 w-5 text-text-secondary" })
355
- }), e.growth !== null && /* @__PURE__ */ S("div", {
354
+ children: /* @__PURE__ */ S(p, { className: "h-5 w-5 text-text-secondary" })
355
+ }), e.growth !== null && /* @__PURE__ */ C("div", {
356
356
  className: t("flex items-center gap-1 text-xs font-medium", e.growth >= 0 ? "text-status-success-text" : "text-status-error-text"),
357
- children: [e.growth >= 0 ? /* @__PURE__ */ x(s, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ x(o, { className: "h-3.5 w-3.5" }), P(e.growth)]
357
+ children: [e.growth >= 0 ? /* @__PURE__ */ S(c, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ S(s, { className: "h-3.5 w-3.5" }), z(e.growth)]
358
358
  })]
359
359
  }),
360
- /* @__PURE__ */ x("p", {
360
+ /* @__PURE__ */ S("p", {
361
361
  className: "mt-3 text-2xl font-bold text-text-primary",
362
- children: r(e.value, { minimumFractionDigits: 0 })
362
+ children: a(e.value, { minimumFractionDigits: 0 })
363
363
  }),
364
- /* @__PURE__ */ x("p", {
364
+ /* @__PURE__ */ S("p", {
365
365
  className: "mt-1 text-sm text-text-secondary",
366
366
  children: e.label
367
367
  })
368
368
  ]
369
369
  }, e.label))
370
370
  })] }),
371
- /* @__PURE__ */ S("div", {
371
+ /* @__PURE__ */ C("div", {
372
372
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
373
- children: [/* @__PURE__ */ S("div", {
373
+ children: [/* @__PURE__ */ C("div", {
374
374
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
375
- children: [/* @__PURE__ */ x("div", {
375
+ children: [/* @__PURE__ */ S("div", {
376
376
  className: "border-b border-border-subtle px-5 py-4",
377
- children: /* @__PURE__ */ S("h2", {
377
+ children: /* @__PURE__ */ C("h2", {
378
378
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
379
- children: [/* @__PURE__ */ x(m, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
379
+ children: [/* @__PURE__ */ S(h, { className: "h-4 w-4 text-text-secondary" }), "Order Statistics"]
380
380
  })
381
- }), /* @__PURE__ */ S("div", {
381
+ }), /* @__PURE__ */ C("div", {
382
382
  className: "p-5",
383
- children: [/* @__PURE__ */ S("div", {
383
+ children: [/* @__PURE__ */ C("div", {
384
384
  className: "grid grid-cols-2 gap-4 mb-5",
385
385
  children: [
386
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
386
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
387
387
  className: "text-xs text-text-secondary",
388
388
  children: "Total Orders"
389
- }), /* @__PURE__ */ x("p", {
389
+ }), /* @__PURE__ */ S("p", {
390
390
  className: "text-2xl font-bold text-text-primary",
391
- children: E.orders.total
391
+ children: A?.totalOrders ?? 0
392
392
  })] }),
393
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
393
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
394
394
  className: "text-xs text-text-secondary",
395
395
  children: "Avg. Order Value"
396
- }), /* @__PURE__ */ x("p", {
396
+ }), /* @__PURE__ */ S("p", {
397
397
  className: "text-2xl font-bold text-text-primary",
398
- children: r(E.orders.averageValue, { minimumFractionDigits: 0 })
398
+ children: a(D.orders.averageValue, { minimumFractionDigits: 0 })
399
399
  })] }),
400
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
400
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
401
401
  className: "text-xs text-text-secondary",
402
402
  children: "Completed"
403
- }), /* @__PURE__ */ x("p", {
403
+ }), /* @__PURE__ */ S("p", {
404
404
  className: "text-xl font-bold text-status-success-text",
405
- children: E.orders.completed
405
+ children: D.orders.completed
406
406
  })] }),
407
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
407
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
408
408
  className: "text-xs text-text-secondary",
409
409
  children: "Cancelled"
410
- }), /* @__PURE__ */ x("p", {
410
+ }), /* @__PURE__ */ S("p", {
411
411
  className: "text-xl font-bold text-status-error-text",
412
- children: E.orders.cancelled
412
+ children: D.orders.cancelled
413
413
  })] })
414
414
  ]
415
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
415
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
416
416
  className: "text-xs text-text-secondary mb-1",
417
417
  children: "Avg. Preparation Time"
418
- }), /* @__PURE__ */ S("p", {
418
+ }), /* @__PURE__ */ C("p", {
419
419
  className: "text-sm font-medium text-text-primary",
420
- children: [E.orders.averagePreparationTime, " minutes"]
420
+ children: [D.orders.averagePreparationTime, " minutes"]
421
421
  })] })]
422
422
  })]
423
- }), /* @__PURE__ */ S("div", {
423
+ }), /* @__PURE__ */ C("div", {
424
424
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
425
- children: [/* @__PURE__ */ x("div", {
425
+ children: [/* @__PURE__ */ S("div", {
426
426
  className: "border-b border-border-subtle px-5 py-4",
427
- children: /* @__PURE__ */ S("h2", {
427
+ children: /* @__PURE__ */ C("h2", {
428
428
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
429
- children: [/* @__PURE__ */ x(u, { className: "h-4 w-4 text-text-secondary" }), "Popular Times"]
429
+ children: [/* @__PURE__ */ S(d, { className: "h-4 w-4 text-text-secondary" }), "Popular Times"]
430
430
  })
431
- }), /* @__PURE__ */ x("div", {
431
+ }), /* @__PURE__ */ S("div", {
432
432
  className: "p-5 space-y-2",
433
- children: E.orders.popularTimes.map((e) => {
434
- let n = e.orders / A * 100;
435
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
433
+ children: D.orders.popularTimes.map((e) => {
434
+ let n = e.orders / F * 100;
435
+ return /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
436
436
  className: "flex items-center justify-between text-xs mb-0.5",
437
- children: [/* @__PURE__ */ x("span", {
437
+ children: [/* @__PURE__ */ S("span", {
438
438
  className: "text-text-primary w-14",
439
439
  children: `${e.hour}:00`
440
- }), /* @__PURE__ */ S("span", {
440
+ }), /* @__PURE__ */ C("span", {
441
441
  className: "text-text-secondary",
442
442
  children: [e.orders, " orders"]
443
443
  })]
444
- }), /* @__PURE__ */ x("div", {
444
+ }), /* @__PURE__ */ S("div", {
445
445
  className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
446
- children: /* @__PURE__ */ x("div", {
446
+ children: /* @__PURE__ */ S("div", {
447
447
  className: t("h-full rounded-full transition-all", e.orders > 25 ? "bg-status-error-bg-subtle" : e.orders > 18 ? "bg-status-warning-bg-subtle" : "bg-status-success-bg-subtle"),
448
448
  style: { width: `${n}%` }
449
449
  })
@@ -452,78 +452,78 @@ var E = {
452
452
  })]
453
453
  })]
454
454
  }),
455
- /* @__PURE__ */ S("section", { children: [/* @__PURE__ */ x("h2", {
455
+ /* @__PURE__ */ C("section", { children: [/* @__PURE__ */ S("h2", {
456
456
  className: "text-base font-semibold text-text-primary mb-3",
457
457
  children: "Performance Metrics"
458
- }), /* @__PURE__ */ x("div", {
458
+ }), /* @__PURE__ */ S("div", {
459
459
  className: "grid grid-cols-2 lg:grid-cols-4 gap-4",
460
460
  children: [
461
461
  {
462
462
  label: "Acceptance Rate",
463
- value: `${E.performance.acceptanceRate}%`,
464
- icon: g,
463
+ value: `${D.performance.acceptanceRate}%`,
464
+ icon: _,
465
465
  color: "text-status-success-text"
466
466
  },
467
467
  {
468
468
  label: "Cancellation Rate",
469
- value: `${E.performance.cancellationRate}%`,
470
- icon: p,
469
+ value: `${D.performance.cancellationRate}%`,
470
+ icon: m,
471
471
  color: "text-status-error-text"
472
472
  },
473
473
  {
474
474
  label: "On-Time Delivery",
475
- value: `${E.performance.onTimeDeliveryRate}%`,
476
- icon: u,
475
+ value: `${D.performance.onTimeDeliveryRate}%`,
476
+ icon: d,
477
477
  color: "text-text-primary"
478
478
  },
479
479
  {
480
480
  label: "Average Rating",
481
- value: `${E.performance.averageRating}`,
482
- icon: h,
481
+ value: `${D.performance.averageRating}`,
482
+ icon: g,
483
483
  color: "text-status-warning-text"
484
484
  }
485
485
  ].map((e) => {
486
486
  let n = e.icon;
487
- return /* @__PURE__ */ S("div", {
487
+ return /* @__PURE__ */ C("div", {
488
488
  className: "rounded-lg border border-border-subtle bg-bg-surface p-5 shadow-sm",
489
- children: [/* @__PURE__ */ S("div", {
489
+ children: [/* @__PURE__ */ C("div", {
490
490
  className: "flex items-center gap-2 mb-2",
491
- children: [/* @__PURE__ */ x(n, { className: t("h-5 w-5", e.color) }), /* @__PURE__ */ x("span", {
491
+ children: [/* @__PURE__ */ S(n, { className: t("h-5 w-5", e.color) }), /* @__PURE__ */ S("span", {
492
492
  className: "text-xs text-text-secondary",
493
493
  children: e.label
494
494
  })]
495
- }), /* @__PURE__ */ x("p", {
495
+ }), /* @__PURE__ */ S("p", {
496
496
  className: t("text-2xl font-bold", e.color),
497
497
  children: e.value
498
498
  })]
499
499
  }, e.label);
500
500
  })
501
501
  })] }),
502
- /* @__PURE__ */ S("div", {
502
+ /* @__PURE__ */ C("div", {
503
503
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
504
- children: [/* @__PURE__ */ S("div", {
504
+ children: [/* @__PURE__ */ C("div", {
505
505
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
506
506
  children: [
507
- /* @__PURE__ */ x("div", {
507
+ /* @__PURE__ */ S("div", {
508
508
  className: "border-b border-border-subtle px-5 py-4",
509
- children: /* @__PURE__ */ S("h2", {
509
+ children: /* @__PURE__ */ C("h2", {
510
510
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
511
- children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), "Top Selling Offerings"]
511
+ children: [/* @__PURE__ */ S(y, { className: "h-4 w-4 text-text-secondary" }), "Top Selling Offerings"]
512
512
  })
513
513
  }),
514
- /* @__PURE__ */ x("div", {
514
+ /* @__PURE__ */ S("div", {
515
515
  className: "divide-y divide-border",
516
- children: E.offerings.topSelling.map((e, t) => /* @__PURE__ */ S("div", {
516
+ children: D.offerings.topSelling.map((e, t) => /* @__PURE__ */ C("div", {
517
517
  className: "flex items-center justify-between px-5 py-3",
518
- children: [/* @__PURE__ */ S("div", {
518
+ children: [/* @__PURE__ */ C("div", {
519
519
  className: "flex items-center gap-3",
520
- children: [/* @__PURE__ */ x("span", {
520
+ children: [/* @__PURE__ */ S("span", {
521
521
  className: "flex h-6 w-6 items-center justify-center rounded-full bg-bg-sunken text-xs font-medium text-text-secondary",
522
522
  children: t + 1
523
- }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
523
+ }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
524
524
  className: "text-sm font-medium text-text-primary",
525
525
  children: e.name
526
- }), /* @__PURE__ */ S("p", {
526
+ }), /* @__PURE__ */ C("p", {
527
527
  className: "text-xs text-text-secondary",
528
528
  children: [
529
529
  e.category,
@@ -532,64 +532,64 @@ var E = {
532
532
  " sold"
533
533
  ]
534
534
  })] })]
535
- }), /* @__PURE__ */ x("span", {
535
+ }), /* @__PURE__ */ S("span", {
536
536
  className: "text-sm font-medium text-text-primary",
537
- children: r(e.revenue, { minimumFractionDigits: 0 })
537
+ children: a(e.revenue, { minimumFractionDigits: 0 })
538
538
  })]
539
539
  }, e.id))
540
540
  }),
541
- /* @__PURE__ */ S("div", {
541
+ /* @__PURE__ */ C("div", {
542
542
  className: "border-t border-border-subtle px-5 py-3",
543
- children: [/* @__PURE__ */ x("p", {
543
+ children: [/* @__PURE__ */ S("p", {
544
544
  className: "text-xs font-medium text-text-secondary mb-2",
545
545
  children: "Least Selling"
546
- }), E.offerings.leastSelling.map((e) => /* @__PURE__ */ S("div", {
546
+ }), D.offerings.leastSelling.map((e) => /* @__PURE__ */ C("div", {
547
547
  className: "flex items-center justify-between py-1.5",
548
- children: [/* @__PURE__ */ x("span", {
548
+ children: [/* @__PURE__ */ S("span", {
549
549
  className: "text-xs text-text-secondary",
550
550
  children: e.name
551
- }), /* @__PURE__ */ S("span", {
551
+ }), /* @__PURE__ */ C("span", {
552
552
  className: "text-xs text-text-secondary",
553
553
  children: [
554
554
  e.quantity,
555
555
  " sold |",
556
556
  " ",
557
- r(e.revenue, { minimumFractionDigits: 0 })
557
+ a(e.revenue, { minimumFractionDigits: 0 })
558
558
  ]
559
559
  })]
560
560
  }, e.id))]
561
561
  })
562
562
  ]
563
- }), /* @__PURE__ */ S("div", {
563
+ }), /* @__PURE__ */ C("div", {
564
564
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
565
- children: [/* @__PURE__ */ x("div", {
565
+ children: [/* @__PURE__ */ S("div", {
566
566
  className: "border-b border-border-subtle px-5 py-4",
567
- children: /* @__PURE__ */ S("h2", {
567
+ children: /* @__PURE__ */ C("h2", {
568
568
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
569
- children: [/* @__PURE__ */ x(c, { className: "h-4 w-4 text-text-secondary" }), "Category Performance"]
569
+ children: [/* @__PURE__ */ S(l, { className: "h-4 w-4 text-text-secondary" }), "Category Performance"]
570
570
  })
571
- }), /* @__PURE__ */ x("div", {
571
+ }), /* @__PURE__ */ S("div", {
572
572
  className: "p-5 space-y-4",
573
- children: E.offerings.categories.map((e) => {
574
- let t = e.revenue / j * 100;
575
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
573
+ children: D.offerings.categories.map((e) => {
574
+ let t = e.revenue / I * 100;
575
+ return /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
576
576
  className: "flex items-center justify-between text-sm mb-1",
577
- children: [/* @__PURE__ */ x("span", {
577
+ children: [/* @__PURE__ */ S("span", {
578
578
  className: "text-text-primary",
579
579
  children: e.category
580
- }), /* @__PURE__ */ S("span", {
580
+ }), /* @__PURE__ */ C("span", {
581
581
  className: "text-text-secondary",
582
582
  children: [
583
- r(e.revenue, { minimumFractionDigits: 0 }),
583
+ a(e.revenue, { minimumFractionDigits: 0 }),
584
584
  " (",
585
585
  e.orders,
586
586
  " ",
587
587
  "orders)"
588
588
  ]
589
589
  })]
590
- }), /* @__PURE__ */ x("div", {
590
+ }), /* @__PURE__ */ S("div", {
591
591
  className: "h-2.5 rounded-full bg-bg-sunken overflow-hidden",
592
- children: /* @__PURE__ */ x("div", {
592
+ children: /* @__PURE__ */ S("div", {
593
593
  className: "h-full rounded-full bg-[var(--color-accent-soft)]",
594
594
  style: { width: `${t}%` }
595
595
  })
@@ -598,113 +598,113 @@ var E = {
598
598
  })]
599
599
  })]
600
600
  }),
601
- /* @__PURE__ */ S("div", {
601
+ /* @__PURE__ */ C("div", {
602
602
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
603
- children: [/* @__PURE__ */ S("div", {
603
+ children: [/* @__PURE__ */ C("div", {
604
604
  className: "lg:col-span-2 rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
605
- children: [/* @__PURE__ */ x("div", {
605
+ children: [/* @__PURE__ */ S("div", {
606
606
  className: "border-b border-border-subtle px-5 py-4",
607
- children: /* @__PURE__ */ S("h2", {
607
+ children: /* @__PURE__ */ C("h2", {
608
608
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
609
- children: [/* @__PURE__ */ x(y, { className: "h-4 w-4 text-text-secondary" }), "Customer Overview"]
609
+ children: [/* @__PURE__ */ S(b, { className: "h-4 w-4 text-text-secondary" }), "Customer Overview"]
610
610
  })
611
- }), /* @__PURE__ */ S("div", {
611
+ }), /* @__PURE__ */ C("div", {
612
612
  className: "p-5",
613
613
  children: [
614
- /* @__PURE__ */ S("div", {
614
+ /* @__PURE__ */ C("div", {
615
615
  className: "grid grid-cols-2 sm:grid-cols-4 gap-4 mb-5",
616
616
  children: [
617
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
617
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
618
618
  className: "text-xs text-text-secondary",
619
619
  children: "Total Customers"
620
- }), /* @__PURE__ */ x("p", {
620
+ }), /* @__PURE__ */ S("p", {
621
621
  className: "text-xl font-bold text-text-primary",
622
- children: E.customers.total
622
+ children: A?.activeCustomers ?? 0
623
623
  })] }),
624
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
624
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
625
625
  className: "text-xs text-text-secondary",
626
626
  children: "New This Month"
627
- }), /* @__PURE__ */ x("p", {
627
+ }), /* @__PURE__ */ S("p", {
628
628
  className: "text-xl font-bold text-text-primary",
629
- children: E.customers.new
629
+ children: D.customers.new
630
630
  })] }),
631
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
631
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
632
632
  className: "text-xs text-text-secondary",
633
633
  children: "Returning"
634
- }), /* @__PURE__ */ x("p", {
634
+ }), /* @__PURE__ */ S("p", {
635
635
  className: "text-xl font-bold text-status-success-text",
636
- children: E.customers.returning
636
+ children: D.customers.returning
637
637
  })] }),
638
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
638
+ /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
639
639
  className: "text-xs text-text-secondary",
640
640
  children: "Satisfaction"
641
- }), /* @__PURE__ */ S("p", {
641
+ }), /* @__PURE__ */ C("p", {
642
642
  className: "text-xl font-bold text-status-warning-text flex items-center gap-1",
643
- children: [/* @__PURE__ */ x(h, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), E.customers.satisfaction.rating]
643
+ children: [/* @__PURE__ */ S(g, { className: "h-4 w-4 fill-status-warning-text text-status-warning-text" }), D.customers.satisfaction.rating]
644
644
  })] })
645
645
  ]
646
646
  }),
647
- /* @__PURE__ */ x("p", {
647
+ /* @__PURE__ */ S("p", {
648
648
  className: "text-sm font-medium text-text-primary mb-2",
649
649
  children: "Top Customers"
650
650
  }),
651
- /* @__PURE__ */ x("div", {
651
+ /* @__PURE__ */ S("div", {
652
652
  className: "overflow-x-auto",
653
- children: /* @__PURE__ */ S("table", {
653
+ children: /* @__PURE__ */ C("table", {
654
654
  className: "w-full text-sm",
655
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
655
+ children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", {
656
656
  className: "border-b border-border-subtle",
657
657
  children: [
658
- /* @__PURE__ */ x("th", {
658
+ /* @__PURE__ */ S("th", {
659
659
  className: "py-2 text-left font-medium text-text-secondary",
660
660
  children: "#"
661
661
  }),
662
- /* @__PURE__ */ x("th", {
662
+ /* @__PURE__ */ S("th", {
663
663
  className: "py-2 text-left font-medium text-text-secondary",
664
664
  children: "Customer"
665
665
  }),
666
- /* @__PURE__ */ x("th", {
666
+ /* @__PURE__ */ S("th", {
667
667
  className: "py-2 text-right font-medium text-text-secondary",
668
668
  children: "Orders"
669
669
  }),
670
- /* @__PURE__ */ x("th", {
670
+ /* @__PURE__ */ S("th", {
671
671
  className: "py-2 text-right font-medium text-text-secondary",
672
672
  children: "Total Spent"
673
673
  })
674
674
  ]
675
- }) }), /* @__PURE__ */ x("tbody", { children: E.customers.topCustomers.map((e, t) => /* @__PURE__ */ S("tr", {
675
+ }) }), /* @__PURE__ */ S("tbody", { children: D.customers.topCustomers.map((e, t) => /* @__PURE__ */ C("tr", {
676
676
  className: "border-b border-border-subtle last:border-0",
677
677
  children: [
678
- /* @__PURE__ */ x("td", {
678
+ /* @__PURE__ */ S("td", {
679
679
  className: "py-2.5 text-text-secondary",
680
680
  children: t + 1
681
681
  }),
682
- /* @__PURE__ */ x("td", {
682
+ /* @__PURE__ */ S("td", {
683
683
  className: "py-2.5 font-medium text-text-primary",
684
684
  children: e.name
685
685
  }),
686
- /* @__PURE__ */ x("td", {
686
+ /* @__PURE__ */ S("td", {
687
687
  className: "py-2.5 text-right text-text-primary",
688
688
  children: e.orders
689
689
  }),
690
- /* @__PURE__ */ x("td", {
690
+ /* @__PURE__ */ S("td", {
691
691
  className: "py-2.5 text-right font-medium text-text-primary",
692
- children: r(e.totalSpent, { minimumFractionDigits: 0 })
692
+ children: a(e.totalSpent, { minimumFractionDigits: 0 })
693
693
  })
694
694
  ]
695
695
  }, e.id)) })]
696
696
  })
697
697
  }),
698
- /* @__PURE__ */ x("div", {
698
+ /* @__PURE__ */ S("div", {
699
699
  className: "mt-4 flex items-center gap-4 text-sm",
700
- children: /* @__PURE__ */ S("div", {
700
+ children: /* @__PURE__ */ C("div", {
701
701
  className: "flex items-center gap-1.5",
702
- children: [/* @__PURE__ */ x(_, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ S("span", {
702
+ children: [/* @__PURE__ */ S(v, { className: "h-4 w-4 text-status-success-text" }), /* @__PURE__ */ C("span", {
703
703
  className: "text-text-secondary",
704
704
  children: [
705
- E.customers.satisfaction.positiveReviews,
705
+ D.customers.satisfaction.positiveReviews,
706
706
  "/",
707
- E.customers.satisfaction.reviews,
707
+ D.customers.satisfaction.reviews,
708
708
  " positive reviews"
709
709
  ]
710
710
  })]
@@ -712,62 +712,62 @@ var E = {
712
712
  })
713
713
  ]
714
714
  })]
715
- }), /* @__PURE__ */ S("div", {
715
+ }), /* @__PURE__ */ C("div", {
716
716
  className: "space-y-6",
717
- children: [/* @__PURE__ */ S("div", {
717
+ children: [/* @__PURE__ */ C("div", {
718
718
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
719
- children: [/* @__PURE__ */ x("div", {
719
+ children: [/* @__PURE__ */ S("div", {
720
720
  className: "border-b border-border-subtle px-5 py-4",
721
- children: /* @__PURE__ */ S("h2", {
721
+ children: /* @__PURE__ */ C("h2", {
722
722
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
723
- children: [/* @__PURE__ */ x(u, { className: "h-4 w-4 text-text-secondary" }), "Peak Hours"]
723
+ children: [/* @__PURE__ */ S(d, { className: "h-4 w-4 text-text-secondary" }), "Peak Hours"]
724
724
  })
725
- }), /* @__PURE__ */ x("div", {
725
+ }), /* @__PURE__ */ S("div", {
726
726
  className: "p-5 space-y-3",
727
- children: E.performance.peakHours.map((e) => {
728
- let n = e.orders / M * 100;
729
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
727
+ children: D.performance.peakHours.map((e) => {
728
+ let n = e.orders / L * 100;
729
+ return /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
730
730
  className: "flex items-center justify-between text-xs mb-1",
731
- children: [/* @__PURE__ */ x("span", {
731
+ children: [/* @__PURE__ */ S("span", {
732
732
  className: "text-text-primary",
733
733
  children: e.hour
734
- }), /* @__PURE__ */ S("span", {
734
+ }), /* @__PURE__ */ C("span", {
735
735
  className: "text-text-secondary",
736
736
  children: [e.orders, " orders"]
737
737
  })]
738
- }), /* @__PURE__ */ x("div", {
738
+ }), /* @__PURE__ */ S("div", {
739
739
  className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
740
- children: /* @__PURE__ */ x("div", {
740
+ children: /* @__PURE__ */ S("div", {
741
741
  className: t("h-full rounded-full", e.orders > 28 ? "bg-status-error-bg-subtle" : e.orders > 22 ? "bg-status-warning-bg-subtle" : "bg-status-success-bg-subtle"),
742
742
  style: { width: `${n}%` }
743
743
  })
744
744
  })] }, e.hour);
745
745
  })
746
746
  })]
747
- }), /* @__PURE__ */ S("div", {
747
+ }), /* @__PURE__ */ C("div", {
748
748
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
749
- children: [/* @__PURE__ */ x("div", {
749
+ children: [/* @__PURE__ */ S("div", {
750
750
  className: "border-b border-border-subtle px-5 py-4",
751
- children: /* @__PURE__ */ S("h2", {
751
+ children: /* @__PURE__ */ C("h2", {
752
752
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
753
- children: [/* @__PURE__ */ x(l, { className: "h-4 w-4 text-text-secondary" }), "Peak Days"]
753
+ children: [/* @__PURE__ */ S(u, { className: "h-4 w-4 text-text-secondary" }), "Peak Days"]
754
754
  })
755
- }), /* @__PURE__ */ x("div", {
755
+ }), /* @__PURE__ */ S("div", {
756
756
  className: "p-5 space-y-3",
757
- children: E.performance.peakDays.map((e) => {
758
- let t = e.orders / N * 100;
759
- return /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
757
+ children: D.performance.peakDays.map((e) => {
758
+ let t = e.orders / R * 100;
759
+ return /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
760
760
  className: "flex items-center justify-between text-xs mb-1",
761
- children: [/* @__PURE__ */ x("span", {
761
+ children: [/* @__PURE__ */ S("span", {
762
762
  className: "text-text-primary",
763
763
  children: e.day
764
- }), /* @__PURE__ */ S("span", {
764
+ }), /* @__PURE__ */ C("span", {
765
765
  className: "text-text-secondary",
766
766
  children: [e.orders, " orders"]
767
767
  })]
768
- }), /* @__PURE__ */ x("div", {
768
+ }), /* @__PURE__ */ S("div", {
769
769
  className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
770
- children: /* @__PURE__ */ x("div", {
770
+ children: /* @__PURE__ */ S("div", {
771
771
  className: "h-full rounded-full bg-[var(--color-accent-soft)]",
772
772
  style: { width: `${t}%` }
773
773
  })
@@ -777,80 +777,80 @@ var E = {
777
777
  })]
778
778
  })]
779
779
  }),
780
- /* @__PURE__ */ S("div", {
780
+ /* @__PURE__ */ C("div", {
781
781
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
782
- children: [/* @__PURE__ */ x("div", {
782
+ children: [/* @__PURE__ */ S("div", {
783
783
  className: "border-b border-border-subtle px-5 py-4",
784
- children: /* @__PURE__ */ S("h2", {
784
+ children: /* @__PURE__ */ C("h2", {
785
785
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
786
- children: [/* @__PURE__ */ x(v, { className: "h-4 w-4 text-text-secondary" }), "Daily Order Trends"]
786
+ children: [/* @__PURE__ */ S(y, { className: "h-4 w-4 text-text-secondary" }), "Daily Order Trends"]
787
787
  })
788
- }), /* @__PURE__ */ x("div", {
788
+ }), /* @__PURE__ */ S("div", {
789
789
  className: "overflow-x-auto",
790
- children: /* @__PURE__ */ S("table", {
790
+ children: /* @__PURE__ */ C("table", {
791
791
  className: "w-full text-sm",
792
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
792
+ children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", {
793
793
  className: "border-b border-border-subtle",
794
794
  children: [
795
- /* @__PURE__ */ x("th", {
795
+ /* @__PURE__ */ S("th", {
796
796
  className: "px-5 py-2.5 text-left font-medium text-text-secondary",
797
797
  children: "Date"
798
798
  }),
799
- /* @__PURE__ */ x("th", {
799
+ /* @__PURE__ */ S("th", {
800
800
  className: "px-5 py-2.5 text-right font-medium text-text-secondary",
801
801
  children: "Orders"
802
802
  }),
803
- /* @__PURE__ */ x("th", {
803
+ /* @__PURE__ */ S("th", {
804
804
  className: "px-5 py-2.5 text-right font-medium text-text-secondary",
805
805
  children: "Revenue"
806
806
  })
807
807
  ]
808
- }) }), /* @__PURE__ */ x("tbody", { children: i.orderTrends.map((e) => /* @__PURE__ */ S("tr", {
808
+ }) }), /* @__PURE__ */ S("tbody", { children: N.map((e) => /* @__PURE__ */ C("tr", {
809
809
  className: "border-b border-border-subtle last:border-0",
810
810
  children: [
811
- /* @__PURE__ */ x("td", {
811
+ /* @__PURE__ */ S("td", {
812
812
  className: "px-5 py-2.5 text-text-primary",
813
813
  children: new Date(e.date).toLocaleDateString("en-IN", {
814
814
  day: "2-digit",
815
815
  month: "short"
816
816
  })
817
817
  }),
818
- /* @__PURE__ */ x("td", {
818
+ /* @__PURE__ */ S("td", {
819
819
  className: "px-5 py-2.5 text-right text-text-primary",
820
820
  children: e.orders
821
821
  }),
822
- /* @__PURE__ */ x("td", {
822
+ /* @__PURE__ */ S("td", {
823
823
  className: "px-5 py-2.5 text-right font-medium text-text-primary",
824
- children: r(e.revenue, { minimumFractionDigits: 0 })
824
+ children: a(e.revenue, { minimumFractionDigits: 0 })
825
825
  })
826
826
  ]
827
827
  }, e.date)) })]
828
828
  })
829
829
  })]
830
830
  }),
831
- /* @__PURE__ */ S("div", {
831
+ /* @__PURE__ */ C("div", {
832
832
  className: "rounded-lg border border-border-subtle bg-bg-surface shadow-sm",
833
- children: [/* @__PURE__ */ x("div", {
833
+ children: [/* @__PURE__ */ S("div", {
834
834
  className: "border-b border-border-subtle px-5 py-4",
835
- children: /* @__PURE__ */ S("h2", {
835
+ children: /* @__PURE__ */ C("h2", {
836
836
  className: "text-base font-semibold text-text-primary flex items-center gap-2",
837
- children: [/* @__PURE__ */ x(y, { className: "h-4 w-4 text-text-secondary" }), "Monthly Customer Growth"]
837
+ children: [/* @__PURE__ */ S(b, { className: "h-4 w-4 text-text-secondary" }), "Monthly Customer Growth"]
838
838
  })
839
- }), /* @__PURE__ */ S("div", {
839
+ }), /* @__PURE__ */ C("div", {
840
840
  className: "p-5",
841
- children: [/* @__PURE__ */ x("div", {
841
+ children: [/* @__PURE__ */ S("div", {
842
842
  className: "flex items-end gap-1.5 h-20",
843
- children: i.customerGrowth.map((e) => {
844
- let t = Math.max(...i.customerGrowth.map((e) => e.newCustomers));
845
- return /* @__PURE__ */ x("div", {
843
+ children: P.map((e) => {
844
+ let t = Math.max(...P.map((e) => e.newCustomers), 1);
845
+ return /* @__PURE__ */ S("div", {
846
846
  className: "flex-1 rounded-t bg-[var(--color-accent-soft)] hover:bg-[var(--color-accent-soft)] transition-colors cursor-default",
847
847
  style: { height: `${e.newCustomers / t * 100}%` },
848
848
  title: `${e.month}: ${e.newCustomers} new customers`
849
849
  }, e.month);
850
850
  })
851
- }), /* @__PURE__ */ x("div", {
851
+ }), /* @__PURE__ */ S("div", {
852
852
  className: "flex justify-between mt-2 text-xs text-text-secondary",
853
- children: i.customerGrowth.length > 0 && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("span", { children: i.customerGrowth[0].month }), /* @__PURE__ */ x("span", { children: i.customerGrowth[i.customerGrowth.length - 1].month })] })
853
+ children: P.length > 0 && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("span", { children: P[0].month }), /* @__PURE__ */ S("span", { children: P[P.length - 1].month })] })
854
854
  })]
855
855
  })]
856
856
  })
@@ -860,6 +860,6 @@ var E = {
860
860
  });
861
861
  };
862
862
  //#endregion
863
- export { D as AnalyticsDashboard };
863
+ export { O as AnalyticsDashboard };
864
864
 
865
865
  //# sourceMappingURL=AnalyticsDashboard.js.map