@burdenoff/microfe-healthybowl 2026.812.14 → 2026.812.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"HealthyBowlRoutes.js","names":[],"sources":["../../src/healthybowl/HealthyBowlRoutes.tsx"],"sourcesContent":["/**\n * HealthyBowl Routes\n * All route definitions with lazy loading.\n * @module healthybowl\n */\n\nimport { lazy, Suspense } from 'react';\nimport { Routes, Route, Link, Navigate, useLocation } from 'react-router';\nimport { Tractor } from 'lucide-react';\nimport { useBasePath } from './hooks/useBasePath';\nimport { useHealthyBowl } from './context/HealthyBowlContext';\nimport { PageLoader } from './components';\n\n// Eagerly load the home page\nimport { HomePage } from './pages/HomePage';\nconst GettingStartedPage = lazy(() =>\n import('./pages/GettingStartedPage').then((m) => ({ default: m.GettingStartedPage }))\n);\nconst FarmProfilePage = lazy(() =>\n import('./pages/farm/FarmProfilePage').then((m) => ({ default: m.FarmProfilePage }))\n);\n\n// ── Crops ──────────────────────────────────────────────────────────────────\nconst CropsPage = lazy(() => import('./pages/crops/CropsPage').then((m) => ({ default: m.CropsPage })));\nconst CropDetailsPage = lazy(() =>\n import('./pages/crops/CropDetailsPage').then((m) => ({ default: m.CropDetailsPage }))\n);\nconst CropFieldsPage = lazy(() => import('./pages/crops/CropFieldsPage').then((m) => ({ default: m.CropFieldsPage })));\nconst FieldDetailsPage = lazy(() =>\n import('./pages/crops/FieldDetailsPage').then((m) => ({ default: m.FieldDetailsPage }))\n);\nconst CropPlanningPage = lazy(() =>\n import('./pages/crops/CropPlanningPage').then((m) => ({ default: m.CropPlanningPage }))\n);\nconst PlanningDetailsPage = lazy(() =>\n import('./pages/crops/PlanningDetailsPage').then((m) => ({ default: m.PlanningDetailsPage }))\n);\nconst CropHarvestPage = lazy(() =>\n import('./pages/crops/CropHarvestPage').then((m) => ({ default: m.CropHarvestPage }))\n);\nconst HarvestDetailsPage = lazy(() =>\n import('./pages/crops/HarvestDetailsPage').then((m) => ({ default: m.HarvestDetailsPage }))\n);\n\n// ── Livestock ──────────────────────────────────────────────────────────────\nconst LivestockDashboardPage = lazy(() =>\n import('./pages/livestock/LivestockDashboardPage').then((m) => ({ default: m.LivestockDashboardPage }))\n);\nconst AnimalRegistryPage = lazy(() =>\n import('./pages/livestock/AnimalRegistryPage').then((m) => ({ default: m.AnimalRegistryPage }))\n);\nconst AnimalDetailsPage = lazy(() =>\n import('./pages/livestock/AnimalDetailsPage').then((m) => ({ default: m.AnimalDetailsPage }))\n);\nconst HealthRecordsPage = lazy(() =>\n import('./pages/livestock/HealthRecordsPage').then((m) => ({ default: m.HealthRecordsPage }))\n);\nconst VaccinationSchedulePage = lazy(() =>\n import('./pages/livestock/VaccinationSchedulePage').then((m) => ({ default: m.VaccinationSchedulePage }))\n);\nconst BreedingManagementPage = lazy(() =>\n import('./pages/livestock/BreedingManagementPage').then((m) => ({ default: m.BreedingManagementPage }))\n);\nconst FeedManagementPage = lazy(() =>\n import('./pages/livestock/FeedManagementPage').then((m) => ({ default: m.FeedManagementPage }))\n);\nconst ProductionTrackingPage = lazy(() =>\n import('./pages/livestock/ProductionTrackingPage').then((m) => ({ default: m.ProductionTrackingPage }))\n);\n// Livestock — Medication Withdrawal Alerts (BOFF-2885)\nconst WithdrawalAlertsPage = lazy(() =>\n import('./pages/livestock/WithdrawalAlertsPage').then((m) => ({ default: m.WithdrawalAlertsPage }))\n);\nconst MedicationLibraryPage = lazy(() =>\n import('./pages/livestock/MedicationLibraryPage').then((m) => ({ default: m.MedicationLibraryPage }))\n);\nconst WithdrawalCalendarPage = lazy(() =>\n import('./pages/livestock/WithdrawalCalendarPage').then((m) => ({ default: m.WithdrawalCalendarPage }))\n);\n// Livestock — Grazing management (BOFF-5970)\nconst GrazingPage = lazy(() => import('./pages/livestock/GrazingPage').then((m) => ({ default: m.GrazingPage })));\nconst HerdDepthPage = lazy(() => import('./pages/livestock/HerdDepthPage').then((m) => ({ default: m.HerdDepthPage })));\nconst AnimalDepthPage = lazy(() =>\n import('./pages/livestock/AnimalDepthPage').then((m) => ({ default: m.AnimalDepthPage }))\n);\nconst LivestockAnalyticsPage = lazy(() =>\n import('./pages/livestock/LivestockAnalyticsPage').then((m) => ({ default: m.LivestockAnalyticsPage }))\n);\n\n// ── Buyer/Supplier CRM (BOFF-2890 · J-1) ─────────────────────────────────────\nconst ContactsPage = lazy(() => import('./pages/contacts/ContactsPage').then((m) => ({ default: m.ContactsPage })));\nconst ContactDetailPage = lazy(() =>\n import('./pages/contacts/ContactDetailPage').then((m) => ({ default: m.ContactDetailPage }))\n);\n\n// ── Warehouse Storage (BOFF-2890 · K-1) ──────────────────────────────────────\nconst StoragePage = lazy(() => import('./pages/storage/StoragePage').then((m) => ({ default: m.StoragePage })));\nconst StorageLotDetailPage = lazy(() =>\n import('./pages/storage/StorageLotDetailPage').then((m) => ({ default: m.StorageLotDetailPage }))\n);\n\n// ── Field Map (GIS boundaries) ───────────────────────────────────────────────\nconst FieldMapPage = lazy(() => import('./pages/fields/FieldMapPage').then((m) => ({ default: m.FieldMapPage })));\n\n// ── Satellite Crop Health & Yield Forecast (BOFF-2886) ───────────────────────\nconst SatelliteCropHealthPage = lazy(() =>\n import('./pages/satellite/SatelliteCropHealthPage').then((m) => ({ default: m.SatelliteCropHealthPage }))\n);\nconst SatelliteFieldDetailPage = lazy(() =>\n import('./pages/satellite/SatelliteFieldDetailPage').then((m) => ({ default: m.SatelliteFieldDetailPage }))\n);\nconst CropHealthAlertsPage = lazy(() =>\n import('./pages/satellite/CropHealthAlertsPage').then((m) => ({ default: m.CropHealthAlertsPage }))\n);\nconst SatelliteSettingsPage = lazy(() =>\n import('./pages/satellite/SatelliteSettingsPage').then((m) => ({ default: m.SatelliteSettingsPage }))\n);\n\n// ── Field Capture — Offline mode (BOFF-2883) ─────────────────────────────────\nconst FieldCapturePage = lazy(() =>\n import('./pages/field-capture/FieldCapturePage').then((m) => ({ default: m.FieldCapturePage }))\n);\n// The SERVER-backed observation log (BOFF-6048) — everything else here shows the device outbox.\nconst ObservationLogPage = lazy(() =>\n import('./pages/field-capture/ObservationLogPage').then((m) => ({ default: m.ObservationLogPage }))\n);\nconst PendingSyncPage = lazy(() =>\n import('./pages/field-capture/PendingSyncPage').then((m) => ({ default: m.PendingSyncPage }))\n);\nconst SyncHistoryPage = lazy(() =>\n import('./pages/field-capture/SyncHistoryPage').then((m) => ({ default: m.SyncHistoryPage }))\n);\nconst OfflineSettingsPage = lazy(() =>\n import('./pages/field-capture/OfflineSettingsPage').then((m) => ({ default: m.OfflineSettingsPage }))\n);\nconst ConflictReviewPage = lazy(() =>\n import('./pages/field-capture/ConflictReviewPage').then((m) => ({ default: m.ConflictReviewPage }))\n);\n\n// ── Terrace & Home Garden (roadmap 27 · BOFF-4695) ───────────────────────────\nconst GardenDashboardPage = lazy(() =>\n import('./pages/terrace/GardenDashboardPage').then((m) => ({ default: m.GardenDashboardPage }))\n);\nconst MyGardensPage = lazy(() => import('./pages/terrace/MyGardensPage').then((m) => ({ default: m.MyGardensPage })));\nconst GrowSpacesPage = lazy(() =>\n import('./pages/terrace/GrowSpacesPage').then((m) => ({ default: m.GrowSpacesPage }))\n);\nconst GardenPlantingsPage = lazy(() =>\n import('./pages/terrace/PlantingsPage').then((m) => ({ default: m.PlantingsPage }))\n);\nconst PlantingDetailPage = lazy(() =>\n import('./pages/terrace/PlantingDetailPage').then((m) => ({ default: m.PlantingDetailPage }))\n);\nconst CareSchedulePage = lazy(() =>\n import('./pages/terrace/CareSchedulePage').then((m) => ({ default: m.CareSchedulePage }))\n);\nconst GardenHarvestsPage = lazy(() =>\n import('./pages/terrace/HarvestsPage').then((m) => ({ default: m.HarvestsPage }))\n);\nconst CompostInputsPage = lazy(() =>\n import('./pages/terrace/CompostInputsPage').then((m) => ({ default: m.CompostInputsPage }))\n);\nconst WhatToGrowPage = lazy(() =>\n import('./pages/terrace/WhatToGrowPage').then((m) => ({ default: m.WhatToGrowPage }))\n);\nconst GardenJournalPage = lazy(() =>\n import('./pages/terrace/GardenJournalPage').then((m) => ({ default: m.GardenJournalPage }))\n);\n\n// ── Master Plant List (variety catalog) ──────────────────────────────────────\nconst PlantCatalogPage = lazy(() =>\n import('./pages/catalog/PlantCatalogPage').then((m) => ({ default: m.PlantCatalogPage }))\n);\n\n// ── Nursery / Seed provenance + Suppliers (roadmap #5) ────────────────────────\nconst SuppliersPage = lazy(() => import('./pages/suppliers/SuppliersPage').then((m) => ({ default: m.SuppliersPage })));\nconst NurseryProvenancePage = lazy(() =>\n import('./pages/nursery/NurseryProvenancePage').then((m) => ({ default: m.NurseryProvenancePage }))\n);\n\n// ── Irrigation Scheduling & Automation (roadmap #3, Phase A) ──────────────────\nconst IrrigationPage = lazy(() =>\n import('./pages/irrigation/IrrigationPage').then((m) => ({ default: m.IrrigationPage }))\n);\n\n// ── Weather ────────────────────────────────────────────────────────────────\nconst WeatherOverviewPage = lazy(() =>\n import('./pages/weather/WeatherOverviewPage').then((m) => ({ default: m.WeatherOverviewPage }))\n);\nconst WeatherForecastPage = lazy(() =>\n import('./pages/weather/WeatherForecastPage').then((m) => ({ default: m.WeatherForecastPage }))\n);\nconst WeatherAlertsPage = lazy(() =>\n import('./pages/weather/WeatherAlertsPage').then((m) => ({ default: m.WeatherAlertsPage }))\n);\nconst WeatherHistoryPage = lazy(() =>\n import('./pages/weather/WeatherHistoryPage').then((m) => ({ default: m.WeatherHistoryPage }))\n);\n// Weather Early-Warning Alert Rules (DEWS — roadmap #20)\nconst WeatherAlertRulesPage = lazy(() =>\n import('./pages/weather/WeatherAlertRulesPage').then((m) => ({ default: m.WeatherAlertRulesPage }))\n);\n// Historical Weather & Early Warning (BOFF-2892)\nconst FrostRiskCalendarPage = lazy(() =>\n import('./pages/weather/FrostRiskCalendarPage').then((m) => ({ default: m.FrostRiskCalendarPage }))\n);\nconst WeatherAnomalyReportPage = lazy(() =>\n import('./pages/weather/WeatherAnomalyReportPage').then((m) => ({ default: m.WeatherAnomalyReportPage }))\n);\nconst WeatherAlertHistoryPage = lazy(() =>\n import('./pages/weather/WeatherAlertHistoryPage').then((m) => ({ default: m.WeatherAlertHistoryPage }))\n);\nconst WeatherSettingsPage = lazy(() =>\n import('./pages/weather/WeatherSettingsPage').then((m) => ({ default: m.WeatherSettingsPage }))\n);\n\n// ── Distribution & Sales Channels (BOFF-2884) ────────────────────────────────\nconst DistributionOverviewPage = lazy(() =>\n import('./pages/distribution/DistributionOverviewPage').then((m) => ({ default: m.DistributionOverviewPage }))\n);\nconst CsaPlansPage = lazy(() => import('./pages/distribution/CsaPlansPage').then((m) => ({ default: m.CsaPlansPage })));\nconst CsaPlanDetailPage = lazy(() =>\n import('./pages/distribution/CsaPlanDetailPage').then((m) => ({ default: m.CsaPlanDetailPage }))\n);\nconst WholesaleOrdersPage = lazy(() =>\n import('./pages/distribution/WholesaleOrdersPage').then((m) => ({ default: m.WholesaleOrdersPage }))\n);\nconst DeliveryRoutesPage = lazy(() =>\n import('./pages/distribution/DeliveryRoutesPage').then((m) => ({ default: m.DeliveryRoutesPage }))\n);\nconst DeliveryRouteDetailPage = lazy(() =>\n import('./pages/distribution/DeliveryRouteDetailPage').then((m) => ({ default: m.DeliveryRouteDetailPage }))\n);\n// CSA collection points + per-date manifest (BOFF-6021, over the BOFF-5978 backend).\nconst PickupLocationsPage = lazy(() =>\n import('./pages/distribution/PickupLocationsPage').then((m) => ({ default: m.PickupLocationsPage }))\n);\nconst PickupManifestPage = lazy(() =>\n import('./pages/distribution/PickupManifestPage').then((m) => ({ default: m.PickupManifestPage }))\n);\n\n// ── Inputs & Insurance (BOFF-2897) ───────────────────────────────────────────\nconst InputsInsuranceOverviewPage = lazy(() =>\n import('./pages/inputs-insurance/InputsInsuranceOverviewPage').then((m) => ({\n default: m.InputsInsuranceOverviewPage,\n }))\n);\nconst PmfbyApplyPage = lazy(() =>\n import('./pages/inputs-insurance/PmfbyApplyPage').then((m) => ({ default: m.PmfbyApplyPage }))\n);\nconst PolicyClaimsPage = lazy(() =>\n import('./pages/inputs-insurance/PolicyClaimsPage').then((m) => ({ default: m.PolicyClaimsPage }))\n);\nconst ClaimDetailPage = lazy(() =>\n import('./pages/inputs-insurance/ClaimDetailPage').then((m) => ({ default: m.ClaimDetailPage }))\n);\nconst LoanFacilitationPage = lazy(() =>\n import('./pages/inputs-insurance/LoanFacilitationPage').then((m) => ({ default: m.LoanFacilitationPage }))\n);\n\n// ── Marketplace (UC-08) ──────────────────────────────────────────────────────\nconst MarketplacePage = lazy(() =>\n import('./pages/marketplace/MarketplacePage').then((m) => ({ default: m.MarketplacePage }))\n);\nconst ProductDetailPage = lazy(() =>\n import('./pages/marketplace/ProductDetailPage').then((m) => ({ default: m.ProductDetailPage }))\n);\nconst CartPage = lazy(() => import('./pages/marketplace/CartPage').then((m) => ({ default: m.CartPage })));\nconst WishlistPage = lazy(() => import('./pages/marketplace/WishlistPage').then((m) => ({ default: m.WishlistPage })));\nconst OrdersPage = lazy(() => import('./pages/marketplace/OrdersPage').then((m) => ({ default: m.OrdersPage })));\n\n// ── Agri-Inputs Store (roadmap #26 / BOFF-2898) — buy-side commerce ──────────\nconst AgriInputsStorePage = lazy(() =>\n import('./pages/agri-inputs/AgriInputsStorePage').then((m) => ({ default: m.AgriInputsStorePage }))\n);\n\n// ── Financial ──────────────────────────────────────────────────────────────\nconst FinancialDashboardPage = lazy(() =>\n import('./pages/financial/FinancialDashboardPage').then((m) => ({ default: m.FinancialDashboardPage }))\n);\nconst TransactionsPage = lazy(() =>\n import('./pages/financial/TransactionsPage').then((m) => ({ default: m.TransactionsPage }))\n);\nconst BudgetManagementPage = lazy(() =>\n import('./pages/financial/BudgetManagementPage').then((m) => ({ default: m.BudgetManagementPage }))\n);\nconst InvoiceManagementPage = lazy(() =>\n import('./pages/financial/InvoiceManagementPage').then((m) => ({ default: m.InvoiceManagementPage }))\n);\nconst FinancialReportsPage = lazy(() =>\n import('./pages/financial/FinancialReportsPage').then((m) => ({ default: m.FinancialReportsPage }))\n);\nconst FinancierAccessPage = lazy(() =>\n import('./pages/financial/FinancierAccessPage').then((m) => ({ default: m.FinancierAccessPage }))\n);\nconst FarmAccountingPage = lazy(() =>\n import('./pages/financial/FarmAccountingPage').then((m) => ({ default: m.FarmAccountingPage }))\n);\nconst GeneralLedgerPage = lazy(() =>\n import('./pages/financial/GeneralLedgerPage').then((m) => ({ default: m.GeneralLedgerPage }))\n);\nconst ChartOfAccountsPage = lazy(() =>\n import('./pages/financial/ChartOfAccountsPage').then((m) => ({ default: m.ChartOfAccountsPage }))\n);\nconst CostByCropPage = lazy(() =>\n import('./pages/financial/CostByCropPage').then((m) => ({ default: m.CostByCropPage }))\n);\nconst ProfitLossPage = lazy(() =>\n import('./pages/financial/ProfitLossPage').then((m) => ({ default: m.ProfitLossPage }))\n);\nconst CoopOverviewPage = lazy(() =>\n import('./pages/coop/CoopOverviewPage').then((m) => ({ default: m.CoopOverviewPage }))\n);\nconst AggregationLotBuilderPage = lazy(() =>\n import('./pages/coop/AggregationLotBuilderPage').then((m) => ({ default: m.AggregationLotBuilderPage }))\n);\nconst CoopMemberDetailPage = lazy(() =>\n import('./pages/coop/CoopMemberDetailPage').then((m) => ({ default: m.CoopMemberDetailPage }))\n);\nconst FinancialStatementsPage = lazy(() =>\n import('./pages/financial/FinancialStatementsPage').then((m) => ({ default: m.FinancialStatementsPage }))\n);\n\nconst BankReconciliationPage = lazy(() =>\n import('./pages/financial/BankReconciliationPage').then((m) => ({ default: m.BankReconciliationPage }))\n);\nconst AccountingIntegrationsPage = lazy(() =>\n import('./pages/financial/AccountingIntegrationsPage').then((m) => ({ default: m.AccountingIntegrationsPage }))\n);\n\n// ── Credits & Payments wallet (roadmap #08 / BOFF-2880) ──────────────────────\nconst CreditsWalletPage = lazy(() =>\n import('./pages/wallet/CreditsWalletPage').then((m) => ({ default: m.CreditsWalletPage }))\n);\n\n// ── Financier (B2B2C bridge) ─────────────────────────────────────────────────\nconst FinancierPage = lazy(() => import('./pages/financier/FinancierPage').then((m) => ({ default: m.FinancierPage })));\n\n// ── Analytics ──────────────────────────────────────────────────────────────\nconst AnalyticsOverviewPage = lazy(() =>\n import('./pages/analytics/AnalyticsOverviewPage').then((m) => ({ default: m.AnalyticsOverviewPage }))\n);\nconst AnalyticsDashboardPage = lazy(() =>\n import('./pages/analytics/AnalyticsDashboardPage').then((m) => ({ default: m.AnalyticsDashboardPage }))\n);\nconst ReportsPage = lazy(() => import('./pages/analytics/ReportsPage').then((m) => ({ default: m.ReportsPage })));\nconst InsightsPage = lazy(() => import('./pages/analytics/InsightsPage').then((m) => ({ default: m.InsightsPage })));\nconst ExportPage = lazy(() => import('./pages/analytics/ExportPage').then((m) => ({ default: m.ExportPage })));\n\n// ── Reports & API (roadmap #19 — report builder + developer API/webhooks) ────\nconst ReportsApiPage = lazy(() =>\n import('./pages/reports-api/ReportsApiPage').then((m) => ({ default: m.ReportsApiPage }))\n);\n\n// ── Market Prices — Mandi price intelligence (roadmap #28 · BOFF-4715) ───────\nconst MarketPricesPage = lazy(() =>\n import('./pages/market/MarketPricesPage').then((m) => ({ default: m.MarketPricesPage }))\n);\n\n// ── Contracts — Contract & Managed Farming (roadmap #29 · BOFF-4718) ─────────\nconst ContractsPage = lazy(() => import('./pages/contracts/ContractsPage').then((m) => ({ default: m.ContractsPage })));\n\n// ── Soil Health ────────────────────────────────────────────────────────────\nconst SoilDashboardPage = lazy(() =>\n import('./pages/soil/SoilDashboardPage').then((m) => ({ default: m.SoilDashboardPage }))\n);\nconst SoilTestsPage = lazy(() => import('./pages/soil/SoilTestsPage').then((m) => ({ default: m.SoilTestsPage })));\nconst SoilMonitoringPage = lazy(() =>\n import('./pages/soil/SoilMonitoringPage').then((m) => ({ default: m.SoilMonitoringPage }))\n);\nconst SoilRecommendationsPage = lazy(() =>\n import('./pages/soil/SoilRecommendationsPage').then((m) => ({ default: m.SoilRecommendationsPage }))\n);\nconst FieldSensorsPage = lazy(() =>\n import('./pages/soil/FieldSensorsPage').then((m) => ({ default: m.FieldSensorsPage }))\n);\n\n// ── Pest Management ───────────────────────────────────────────────────────\nconst PestOverviewPage = lazy(() =>\n import('./pages/pest-management/PestOverviewPage').then((m) => ({ default: m.PestOverviewPage }))\n);\nconst PestIssuesPage = lazy(() =>\n import('./pages/pest-management/PestIssuesPage').then((m) => ({ default: m.PestIssuesPage }))\n);\nconst TreatmentLibraryPage = lazy(() =>\n import('./pages/pest-management/TreatmentLibraryPage').then((m) => ({ default: m.TreatmentLibraryPage }))\n);\nconst PestMonitoringPage = lazy(() =>\n import('./pages/pest-management/PestMonitoringPage').then((m) => ({ default: m.PestMonitoringPage }))\n);\nconst AiPestDetectionPage = lazy(() =>\n import('./pages/pest-management/AiPestDetectionPage').then((m) => ({ default: m.AiPestDetectionPage }))\n);\n\n// ── Production ─────────────────────────────────────────────────────────────\nconst ProductionPlanningPage = lazy(() =>\n import('./pages/production/ProductionPlanningPage').then((m) => ({ default: m.ProductionPlanningPage }))\n);\nconst ValueAddedProductsPage = lazy(() =>\n import('./pages/production/ValueAddedProductsPage').then((m) => ({ default: m.ValueAddedProductsPage }))\n);\nconst RecipeManagementPage = lazy(() =>\n import('./pages/production/RecipeManagementPage').then((m) => ({ default: m.RecipeManagementPage }))\n);\nconst ProductionBatchesPage = lazy(() =>\n import('./pages/production/ProductionBatchesPage').then((m) => ({ default: m.ProductionBatchesPage }))\n);\nconst ProductionSchedulePage = lazy(() =>\n import('./pages/production/ProductionSchedulePage').then((m) => ({ default: m.ProductionSchedulePage }))\n);\n\n// ── Products ───────────────────────────────────────────────────────────────\nconst ProductsOverviewPage = lazy(() =>\n import('./pages/products/ProductsOverviewPage').then((m) => ({ default: m.ProductsOverviewPage }))\n);\nconst InventoryPage = lazy(() => import('./pages/products/InventoryPage').then((m) => ({ default: m.InventoryPage })));\nconst BatchesPage = lazy(() => import('./pages/products/BatchesPage').then((m) => ({ default: m.BatchesPage })));\nconst QualityPage = lazy(() => import('./pages/products/QualityPage').then((m) => ({ default: m.QualityPage })));\n\n// ── Traceability (UC-11) ─────────────────────────────────────────────────────\nconst BatchTrackingPage = lazy(() =>\n import('./pages/traceability/BatchTrackingPage').then((m) => ({ default: m.BatchTrackingPage }))\n);\nconst SupplyChainPage = lazy(() =>\n import('./pages/traceability/SupplyChainPage').then((m) => ({ default: m.SupplyChainPage }))\n);\nconst TraceTrackingPage = lazy(() =>\n import('./pages/traceability/TraceTrackingPage').then((m) => ({ default: m.TraceTrackingPage }))\n);\nconst QRCodesPage = lazy(() => import('./pages/traceability/QRCodesPage').then((m) => ({ default: m.QRCodesPage })));\nconst TraceLedgerPage = lazy(() =>\n import('./pages/traceability/TraceLedgerPage').then((m) => ({ default: m.TraceLedgerPage }))\n);\nconst TracePortalSettingsPage = lazy(() =>\n import('./pages/traceability/TracePortalSettingsPage').then((m) => ({ default: m.TracePortalSettingsPage }))\n);\n\n// ── Compliance ─────────────────────────────────────────────────────────────\nconst ComplianceOverviewPage = lazy(() =>\n import('./pages/compliance/ComplianceOverviewPage').then((m) => ({ default: m.ComplianceOverviewPage }))\n);\nconst OrganicCertificationPage = lazy(() =>\n import('./pages/compliance/OrganicCertificationPage').then((m) => ({ default: m.OrganicCertificationPage }))\n);\nconst CertificationStandardDetailPage = lazy(() =>\n import('./pages/compliance/CertificationStandardDetailPage').then((m) => ({\n default: m.CertificationStandardDetailPage,\n }))\n);\nconst IcsGroupsPage = lazy(() =>\n import('./pages/compliance/IcsGroupsPage').then((m) => ({ default: m.IcsGroupsPage }))\n);\nconst IcsGroupDetailPage = lazy(() =>\n import('./pages/compliance/IcsGroupDetailPage').then((m) => ({ default: m.IcsGroupDetailPage }))\n);\nconst IcsGrowerWizardPage = lazy(() =>\n import('./pages/compliance/IcsGrowerWizardPage').then((m) => ({ default: m.IcsGrowerWizardPage }))\n);\nconst IcsGrowerDetailPage = lazy(() =>\n import('./pages/compliance/IcsGrowerDetailPage').then((m) => ({ default: m.IcsGrowerDetailPage }))\n);\nconst ComplianceAlertsPage = lazy(() =>\n import('./pages/compliance/ComplianceAlertsPage').then((m) => ({ default: m.ComplianceAlertsPage }))\n);\nconst InspectionCalendarPage = lazy(() =>\n import('./pages/compliance/InspectionCalendarPage').then((m) => ({ default: m.InspectionCalendarPage }))\n);\nconst CertificatesOfOriginPage = lazy(() =>\n import('./pages/compliance/CertificatesOfOriginPage').then((m) => ({ default: m.CertificatesOfOriginPage }))\n);\nconst ComplianceAuditsPage = lazy(() =>\n import('./pages/compliance/ComplianceAuditsPage').then((m) => ({ default: m.ComplianceAuditsPage }))\n);\nconst ComplianceDocumentsPage = lazy(() =>\n import('./pages/compliance/ComplianceDocumentsPage').then((m) => ({ default: m.ComplianceDocumentsPage }))\n);\n\n// ── Sustainability — Carbon & Climate (BOFF-2896) ─────────────────────────────\nconst SustainabilityOverviewPage = lazy(() =>\n import('./pages/sustainability/SustainabilityOverviewPage').then((m) => ({ default: m.SustainabilityOverviewPage }))\n);\nconst CarbonGhgPage = lazy(() =>\n import('./pages/sustainability/CarbonGhgPage').then((m) => ({ default: m.CarbonGhgPage }))\n);\nconst SoilCarbonPage = lazy(() =>\n import('./pages/sustainability/SoilCarbonPage').then((m) => ({ default: m.SoilCarbonPage }))\n);\nconst CarbonCreditLedgerPage = lazy(() =>\n import('./pages/sustainability/CarbonCreditLedgerPage').then((m) => ({ default: m.CarbonCreditLedgerPage }))\n);\nconst GenerateCreditWizardPage = lazy(() =>\n import('./pages/sustainability/GenerateCreditWizardPage').then((m) => ({ default: m.GenerateCreditWizardPage }))\n);\nconst EudrDueDiligencePage = lazy(() =>\n import('./pages/sustainability/EudrDueDiligencePage').then((m) => ({ default: m.EudrDueDiligencePage }))\n);\n\n// ── Government Schemes ─────────────────────────────────────────────────────\nconst SchemesOverviewPage = lazy(() =>\n import('./pages/government-schemes/SchemesOverviewPage').then((m) => ({ default: m.SchemesOverviewPage }))\n);\nconst SchemeDiscoveryPage = lazy(() =>\n import('./pages/government-schemes/SchemeDiscoveryPage').then((m) => ({ default: m.SchemeDiscoveryPage }))\n);\nconst SchemeDetailsPage = lazy(() =>\n import('./pages/government-schemes/SchemeDetailsPage').then((m) => ({ default: m.SchemeDetailsPage }))\n);\nconst ApplicationTrackingPage = lazy(() =>\n import('./pages/government-schemes/ApplicationTrackingPage').then((m) => ({ default: m.ApplicationTrackingPage }))\n);\nconst TrainingProgramsPage = lazy(() =>\n import('./pages/government-schemes/TrainingProgramsPage').then((m) => ({ default: m.TrainingProgramsPage }))\n);\nconst GovernmentDashboardPage = lazy(() =>\n import('./pages/government-schemes/GovernmentDashboardPage').then((m) => ({ default: m.GovernmentDashboardPage }))\n);\nconst CommunicationPage = lazy(() =>\n import('./pages/government-schemes/CommunicationPage').then((m) => ({ default: m.CommunicationPage }))\n);\nconst AccessibilitySettingsPage = lazy(() =>\n import('./pages/government-schemes/AccessibilitySettingsPage').then((m) => ({ default: m.AccessibilitySettingsPage }))\n);\nconst SchemeAdminPage = lazy(() =>\n import('./pages/government-schemes/SchemeAdminPage').then((m) => ({ default: m.SchemeAdminPage }))\n);\n\n// ── Network (UC-12) ──────────────────────────────────────────────────────────\nconst NetworkOverviewPage = lazy(() =>\n import('./pages/network/NetworkOverviewPage').then((m) => ({ default: m.NetworkOverviewPage }))\n);\nconst CommunityPage = lazy(() => import('./pages/network/CommunityPage').then((m) => ({ default: m.CommunityPage })));\nconst ExpertsPage = lazy(() => import('./pages/network/ExpertsPage').then((m) => ({ default: m.ExpertsPage })));\nconst MentorsPage = lazy(() => import('./pages/network/MentorsPage').then((m) => ({ default: m.MentorsPage })));\nconst EventsPage = lazy(() => import('./pages/network/EventsPage').then((m) => ({ default: m.EventsPage })));\nconst CohortsPage = lazy(() => import('./pages/network/CohortsPage').then((m) => ({ default: m.CohortsPage })));\n\n// ── Farm Tasks (PlanMagnet embed) ─────────────────────────────────────────────\nconst TasksPage = lazy(() => import('./pages/tasks/TasksPage').then((m) => ({ default: m.TasksPage })));\n\n// ── Consultant advisory (UC-16) ──────────────────────────────────────────────\nconst ConsultantClientsPage = lazy(() =>\n import('./pages/consultant/ConsultantClientsPage').then((m) => ({ default: m.ConsultantClientsPage }))\n);\nconst ConsultantDiagnosisPage = lazy(() =>\n import('./pages/consultant/ConsultantDiagnosisPage').then((m) => ({ default: m.ConsultantDiagnosisPage }))\n);\nconst FarmerAdvisorsPage = lazy(() =>\n import('./pages/consultant/FarmerAdvisorsPage').then((m) => ({ default: m.FarmerAdvisorsPage }))\n);\n\n// ── 404 Not Found ────────────────────────────────────────────────────────\nfunction NotFoundPage() {\n const { buildPath } = useBasePath();\n return (\n <div className=\"flex min-h-[60vh] flex-col items-center justify-center gap-4 p-12 text-center\">\n <h1 className=\"text-6xl font-bold tracking-tight text-text-primary\">404</h1>\n <h2 className=\"text-xl font-semibold text-text-primary\">Page not found</h2>\n <p className=\"max-w-md text-sm text-text-secondary\">\n The page you&apos;re looking for doesn&apos;t exist or has been moved.\n </p>\n <Link\n to={buildPath('')}\n className=\"mt-4 inline-flex items-center rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text shadow-sm hover:bg-action-primary-bg/90 transition-colors\"\n >\n Go to Dashboard\n </Link>\n </div>\n );\n}\n\n// ============================================================================\n// Routes\n// ============================================================================\n\n/**\n * Shown when HealthyBowl is opened without an active workspace (e.g. a\n * direct/bookmarked hit on a session with no persisted context). Most HB\n * routes are workspace-scoped, so rendering them would fire a wall of\n * `WORKSPACE_REQUIRED` errors + toasts — instead we show a single honest\n * prompt pointing at the shell's workspace switcher.\n */\nfunction WorkspaceRequiredGate() {\n return (\n <div className=\"flex min-h-[60vh] flex-col items-center justify-center gap-4 p-8 text-center\">\n <div className=\"flex h-16 w-16 items-center justify-center rounded-full bg-bg-sunken\">\n <Tractor className=\"h-8 w-8 text-text-secondary\" />\n </div>\n <div className=\"max-w-md space-y-1.5\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Choose a workspace</h2>\n <p className=\"text-sm text-text-secondary\">\n HealthyBowl needs an active workspace to load your farm. Select one from the workspace switcher in the top bar\n to continue.\n </p>\n </div>\n </div>\n );\n}\n\nexport function HealthyBowlRoutes() {\n const { workspaceId } = useHealthyBowl();\n const { pathname } = useLocation();\n // Financier (UC-14) and consultant (UC-16) partners are never workspace\n // members and their pages use self-scoped queries (no workspaceId), so they\n // must reach their routes without an active workspace. Every other route is\n // workspace-scoped — without a workspace we show the gate instead of firing\n // a wall of WORKSPACE_REQUIRED queries.\n const isSelfScopedPartnerRoute = /(?:^|\\/)(?:financier|consultant)(?:\\/|$)/.test(pathname);\n if (!workspaceId && !isSelfScopedPartnerRoute) {\n return <WorkspaceRequiredGate />;\n }\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Dashboard — the product index IS the dashboard (one canonical URL). */}\n <Route index element={<HomePage />} />\n {/* Back-compat redirect: the dashboard used to live at /dashboard; keep\n old bookmarks/history working by redirecting to the index. */}\n <Route path=\"dashboard\" element={<Navigate to=\"..\" replace />} />\n <Route path=\"getting-started\" element={<GettingStartedPage />} />\n <Route path=\"farm\" element={<FarmProfilePage />} />\n\n {/* Crops */}\n <Route path=\"crops\" element={<CropsPage />} />\n <Route path=\"crops/:cropId\" element={<CropDetailsPage />} />\n <Route path=\"crops/fields\" element={<CropFieldsPage />} />\n <Route path=\"crops/fields/:fieldId\" element={<FieldDetailsPage />} />\n <Route path=\"crops/planning\" element={<CropPlanningPage />} />\n <Route path=\"crops/planning/:planId\" element={<PlanningDetailsPage />} />\n <Route path=\"crops/harvest\" element={<CropHarvestPage />} />\n <Route path=\"crops/harvest/:harvestId\" element={<HarvestDetailsPage />} />\n\n {/* Livestock */}\n <Route path=\"livestock\" element={<LivestockDashboardPage />} />\n <Route path=\"livestock/analytics\" element={<LivestockAnalyticsPage />} />\n <Route path=\"livestock/animals\" element={<AnimalRegistryPage />} />\n <Route path=\"livestock/animals/:animalId\" element={<AnimalDetailsPage />} />\n <Route path=\"livestock/health\" element={<HealthRecordsPage />} />\n <Route path=\"livestock/vaccination\" element={<VaccinationSchedulePage />} />\n <Route path=\"livestock/vaccinations\" element={<VaccinationSchedulePage />} />\n <Route path=\"livestock/breeding\" element={<BreedingManagementPage />} />\n <Route path=\"livestock/feed\" element={<FeedManagementPage />} />\n <Route path=\"livestock/production\" element={<ProductionTrackingPage />} />\n <Route path=\"livestock/withdrawal-alerts\" element={<WithdrawalAlertsPage />} />\n <Route path=\"livestock/withdrawal-alerts/library\" element={<MedicationLibraryPage />} />\n <Route path=\"livestock/withdrawal-alerts/calendar\" element={<WithdrawalCalendarPage />} />\n <Route path=\"livestock/grazing\" element={<GrazingPage />} />\n <Route path=\"livestock/records\" element={<HerdDepthPage />} />\n <Route path=\"livestock/records/:animalId\" element={<AnimalDepthPage />} />\n\n {/* Field Map — draw/manage field boundaries on satellite (GIS) */}\n <Route path=\"field-map\" element={<FieldMapPage />} />\n\n {/* Satellite Crop Health & Yield Forecast (BOFF-2886) — NDVI heatmap, stressed\n zones, health score, yield forecast + simulation. Static sub-routes first so\n 'alerts'/'settings' aren't shadowed by the ':fieldId' detail route. */}\n <Route path=\"satellite\" element={<SatelliteCropHealthPage />} />\n <Route path=\"satellite/alerts\" element={<CropHealthAlertsPage />} />\n <Route path=\"satellite/settings\" element={<SatelliteSettingsPage />} />\n <Route path=\"satellite/:fieldId\" element={<SatelliteFieldDetailPage />} />\n\n {/* Field Capture — offline-first capture + sync (BOFF-2883). More specific\n routes first so 'conflicts/:clientId' and the tabs aren't shadowed. */}\n <Route path=\"field-capture\" element={<FieldCapturePage />} />\n <Route path=\"field-capture/log\" element={<ObservationLogPage />} />\n <Route path=\"field-capture/pending\" element={<PendingSyncPage />} />\n <Route path=\"field-capture/history\" element={<SyncHistoryPage />} />\n <Route path=\"field-capture/settings\" element={<OfflineSettingsPage />} />\n <Route path=\"field-capture/conflicts/:clientId\" element={<ConflictReviewPage />} />\n\n {/* Terrace & Home Garden (roadmap 27 · BOFF-4695) — the home-grower surface.\n The :plantingId detail route is declared before the bare list route's\n siblings so the more specific path always wins. */}\n <Route path=\"garden\" element={<GardenDashboardPage />} />\n <Route path=\"garden/gardens\" element={<MyGardensPage />} />\n <Route path=\"garden/spaces\" element={<GrowSpacesPage />} />\n <Route path=\"garden/plantings/:plantingId\" element={<PlantingDetailPage />} />\n <Route path=\"garden/plantings\" element={<GardenPlantingsPage />} />\n <Route path=\"garden/care\" element={<CareSchedulePage />} />\n <Route path=\"garden/harvests\" element={<GardenHarvestsPage />} />\n <Route path=\"garden/compost\" element={<CompostInputsPage />} />\n <Route path=\"garden/planner\" element={<WhatToGrowPage />} />\n <Route path=\"garden/journal\" element={<GardenJournalPage />} />\n\n {/* Master Plant List — editable variety catalog with spacing/maturity defaults */}\n <Route path=\"plant-catalog\" element={<PlantCatalogPage />} />\n\n {/* Nursery / Seed provenance + Suppliers (roadmap #5) */}\n <Route path=\"suppliers\" element={<SuppliersPage />} />\n <Route path=\"nursery\" element={<NurseryProvenancePage />} />\n\n {/* Irrigation Scheduling & Automation (roadmap #3, Phase A) */}\n <Route path=\"irrigation\" element={<IrrigationPage />} />\n\n {/* Weather */}\n <Route path=\"weather\" element={<WeatherOverviewPage />} />\n <Route path=\"weather/forecast\" element={<WeatherForecastPage />} />\n <Route path=\"weather/alerts\" element={<WeatherAlertsPage />} />\n <Route path=\"weather/alert-rules\" element={<WeatherAlertRulesPage />} />\n <Route path=\"weather/history\" element={<WeatherHistoryPage />} />\n {/* Historical Weather & Early Warning (BOFF-2892) */}\n <Route path=\"weather/calendar\" element={<FrostRiskCalendarPage />} />\n <Route path=\"weather/anomaly\" element={<WeatherAnomalyReportPage />} />\n <Route path=\"weather/alert-history\" element={<WeatherAlertHistoryPage />} />\n <Route path=\"weather/settings\" element={<WeatherSettingsPage />} />\n\n {/* Marketplace (UC-08) — listings persist; cart/wishlist session-only; checkout unavailable */}\n <Route path=\"marketplace\" element={<MarketplacePage />} />\n <Route path=\"marketplace/cart\" element={<CartPage />} />\n <Route path=\"marketplace/wishlist\" element={<WishlistPage />} />\n <Route path=\"marketplace/orders\" element={<OrdersPage />} />\n <Route path=\"marketplace/:productId\" element={<ProductDetailPage />} />\n\n {/* Agri-Inputs Store (roadmap #26 / BOFF-2898) — buy seeds/fertilizer/bio-pesticides/tools/\n irrigation. Composes global-store catalog + global-billing checkout (reuses the\n marketplace cart/order/payment flow); HB owns only this storefront + delivery address. */}\n <Route path=\"agri-inputs\" element={<AgriInputsStorePage />} />\n\n {/* Distribution & Sales Channels (BOFF-2884) — CSA boxes, wholesale, delivery routes */}\n {/* Buyer/Supplier CRM (BOFF-2890 · J-1) */}\n <Route path=\"contacts\" element={<ContactsPage />} />\n <Route path=\"contacts/:contactId\" element={<ContactDetailPage />} />\n\n {/* Warehouse Storage (BOFF-2890 · K-1) */}\n <Route path=\"storage\" element={<StoragePage />} />\n <Route path=\"storage/lots/:lotId\" element={<StorageLotDetailPage />} />\n\n <Route path=\"distribution\" element={<DistributionOverviewPage />} />\n <Route path=\"distribution/csa\" element={<CsaPlansPage />} />\n <Route path=\"distribution/csa/:planId\" element={<CsaPlanDetailPage />} />\n <Route path=\"distribution/wholesale\" element={<WholesaleOrdersPage />} />\n <Route path=\"distribution/routes\" element={<DeliveryRoutesPage />} />\n <Route path=\"distribution/routes/:routeId\" element={<DeliveryRouteDetailPage />} />\n <Route path=\"distribution/pickup\" element={<PickupLocationsPage />} />\n <Route path=\"distribution/manifest\" element={<PickupManifestPage />} />\n\n {/* Inputs & Insurance (BOFF-2897) — input plans, PMFBY, claims, loan facilitation */}\n <Route path=\"inputs-insurance\" element={<InputsInsuranceOverviewPage />} />\n <Route path=\"inputs-insurance/apply\" element={<PmfbyApplyPage />} />\n <Route path=\"inputs-insurance/policies/:policyId/claims\" element={<PolicyClaimsPage />} />\n <Route path=\"inputs-insurance/claims/:claimId\" element={<ClaimDetailPage />} />\n <Route path=\"inputs-insurance/loans\" element={<LoanFacilitationPage />} />\n\n {/* Financial */}\n <Route path=\"financial\" element={<FinancialDashboardPage />} />\n <Route path=\"financial/transactions\" element={<TransactionsPage />} />\n <Route path=\"financial/budgets\" element={<BudgetManagementPage />} />\n <Route path=\"financial/invoices\" element={<InvoiceManagementPage />} />\n <Route path=\"financial/reports\" element={<FinancialReportsPage />} />\n <Route path=\"financial/financier-access\" element={<FinancierAccessPage />} />\n {/* BOFF-6023 — cooperative / FPO aggregation. */}\n <Route path=\"coop\" element={<CoopOverviewPage />} />\n <Route path=\"coop/lots/:lotId\" element={<AggregationLotBuilderPage />} />\n <Route path=\"coop/members/:membershipId\" element={<CoopMemberDetailPage />} />\n <Route path=\"financial/accounting\" element={<FarmAccountingPage />} />\n <Route path=\"financial/ledger\" element={<GeneralLedgerPage />} />\n <Route path=\"financial/chart-of-accounts\" element={<ChartOfAccountsPage />} />\n <Route path=\"financial/cost-by-crop\" element={<CostByCropPage />} />\n <Route path=\"financial/profit-loss\" element={<ProfitLossPage />} />\n {/* BOFF-6026 — balance sheet, cash flow and trial balance. */}\n <Route path=\"financial/statements\" element={<FinancialStatementsPage />} />\n {/* BOFF-6025 — proving the ledger against the bank. */}\n <Route path=\"financial/reconciliation\" element={<BankReconciliationPage />} />\n <Route path=\"financial/accounting-integrations\" element={<AccountingIntegrationsPage />} />\n\n {/* Credits & Payments wallet (#08) — reads global-billing credits; Razorpay top-up + payout */}\n <Route path=\"wallet\" element={<CreditsWalletPage />} />\n\n {/* Financier portfolio (B2B2C bridge) */}\n <Route path=\"financier\" element={<FinancierPage />} />\n\n {/* Farm Tasks — embeds the composed PlanMagnet TasksPage over wspace-planmagnet-svc */}\n <Route path=\"tasks\" element={<TasksPage />} />\n\n {/* Consultant advisory (UC-16) */}\n <Route path=\"consultant\" element={<ConsultantClientsPage />} />\n <Route path=\"consultant/clients\" element={<ConsultantClientsPage />} />\n <Route path=\"consultant/clients/:workspaceId\" element={<ConsultantDiagnosisPage />} />\n <Route path=\"advisors\" element={<FarmerAdvisorsPage />} />\n\n {/* Analytics */}\n <Route path=\"analytics\" element={<AnalyticsOverviewPage />} />\n <Route path=\"analytics/dashboard\" element={<AnalyticsDashboardPage />} />\n <Route path=\"analytics/reports\" element={<ReportsPage />} />\n <Route path=\"analytics/insights\" element={<InsightsPage />} />\n <Route path=\"analytics/export\" element={<ExportPage />} />\n\n {/* Reports & API (roadmap #19 — report builder + developer API/webhooks) */}\n <Route path=\"reports-api\" element={<ReportsApiPage />} />\n\n {/* Field Sensors (live probe monitoring — BOFF-2894) */}\n <Route path=\"field-sensors\" element={<FieldSensorsPage />} />\n\n {/* Market Prices — Mandi / Market-Price Intelligence (roadmap #28 · BOFF-4715) */}\n <Route path=\"market-prices\" element={<MarketPricesPage />} />\n\n {/* Contracts — Contract & Managed Farming (roadmap #29 · BOFF-4718) */}\n <Route path=\"contracts\" element={<ContractsPage />} />\n\n {/* Soil Health */}\n <Route path=\"soil\" element={<SoilDashboardPage />} />\n <Route path=\"soil/tests\" element={<SoilTestsPage />} />\n <Route path=\"soil/monitoring\" element={<SoilMonitoringPage />} />\n <Route path=\"soil/recommendations\" element={<SoilRecommendationsPage />} />\n\n {/* Pest Management */}\n <Route path=\"pest-management\" element={<PestOverviewPage />} />\n <Route path=\"pest-management/issues\" element={<PestIssuesPage />} />\n <Route path=\"pest-management/ai-detection\" element={<AiPestDetectionPage />} />\n <Route path=\"pest-management/treatments\" element={<TreatmentLibraryPage />} />\n <Route path=\"pest-management/monitoring\" element={<PestMonitoringPage />} />\n\n {/* Production */}\n <Route path=\"production\" element={<ProductionPlanningPage />} />\n <Route path=\"production/value-added\" element={<ValueAddedProductsPage />} />\n <Route path=\"production/recipes\" element={<RecipeManagementPage />} />\n <Route path=\"production/batches\" element={<ProductionBatchesPage />} />\n <Route path=\"production/schedule\" element={<ProductionSchedulePage />} />\n\n {/* Products */}\n <Route path=\"products\" element={<ProductsOverviewPage />} />\n <Route path=\"products/inventory\" element={<InventoryPage />} />\n <Route path=\"products/batches\" element={<BatchesPage />} />\n <Route path=\"products/quality\" element={<QualityPage />} />\n\n {/* Traceability (UC-11 + BOFF-2879) — real scannable QR + public farm-to-fork portal.\n The consumer-facing portal itself is NOT here: it is an unauthenticated route\n (`/b/:slug`) mounted by the app shell outside every workspace guard. */}\n <Route path=\"traceability\" element={<BatchTrackingPage />} />\n <Route path=\"traceability/supply-chain\" element={<SupplyChainPage />} />\n <Route path=\"traceability/qr-codes\" element={<QRCodesPage />} />\n <Route path=\"traceability/ledger\" element={<TraceLedgerPage />} />\n <Route path=\"traceability/portal-settings\" element={<TracePortalSettingsPage />} />\n <Route path=\"traceability/tracking\" element={<TraceTrackingPage />} />\n\n {/* Compliance */}\n <Route path=\"compliance\" element={<ComplianceOverviewPage />} />\n <Route path=\"compliance/certifications\" element={<OrganicCertificationPage />} />\n <Route path=\"compliance/certifications/:certificationId\" element={<CertificationStandardDetailPage />} />\n {/* More specific ICS routes first: 'growers/new' must not be captured by ':groupId'. */}\n <Route path=\"compliance/ics\" element={<IcsGroupsPage />} />\n <Route path=\"compliance/ics/growers/new\" element={<IcsGrowerWizardPage />} />\n <Route path=\"compliance/ics/growers/:growerId\" element={<IcsGrowerDetailPage />} />\n <Route path=\"compliance/ics/:groupId\" element={<IcsGroupDetailPage />} />\n <Route path=\"compliance/alerts\" element={<ComplianceAlertsPage />} />\n <Route path=\"compliance/inspections\" element={<InspectionCalendarPage />} />\n <Route path=\"compliance/origin\" element={<CertificatesOfOriginPage />} />\n <Route path=\"compliance/audits\" element={<ComplianceAuditsPage />} />\n <Route path=\"compliance/documents\" element={<ComplianceDocumentsPage />} />\n\n {/* Sustainability — Carbon & Climate (BOFF-2896). More specific 'credits/generate'\n before any deeper credit routes so the wizard is not shadowed. */}\n <Route path=\"sustainability\" element={<SustainabilityOverviewPage />} />\n <Route path=\"sustainability/carbon\" element={<CarbonGhgPage />} />\n <Route path=\"sustainability/soil-carbon\" element={<SoilCarbonPage />} />\n <Route path=\"sustainability/credits/generate\" element={<GenerateCreditWizardPage />} />\n <Route path=\"sustainability/credits\" element={<CarbonCreditLedgerPage />} />\n <Route path=\"sustainability/eudr\" element={<EudrDueDiligencePage />} />\n\n {/* Government Schemes */}\n <Route path=\"government-schemes\" element={<SchemesOverviewPage />} />\n <Route path=\"government-schemes/discover\" element={<SchemeDiscoveryPage />} />\n <Route path=\"government-schemes/schemes/:schemeId\" element={<SchemeDetailsPage />} />\n <Route path=\"government-schemes/applications\" element={<ApplicationTrackingPage />} />\n <Route path=\"government-schemes/training\" element={<TrainingProgramsPage />} />\n <Route path=\"government-schemes/dashboard\" element={<GovernmentDashboardPage />} />\n <Route path=\"government-schemes/communication\" element={<CommunicationPage />} />\n <Route path=\"government-schemes/accessibility\" element={<AccessibilitySettingsPage />} />\n <Route path=\"government-schemes/admin\" element={<SchemeAdminPage />} />\n\n {/* Network (UC-12) — community posts persist; expert/mentor/event actions honest placeholders */}\n <Route path=\"network\" element={<NetworkOverviewPage />} />\n <Route path=\"network/community\" element={<CommunityPage />} />\n <Route path=\"network/experts\" element={<ExpertsPage />} />\n <Route path=\"network/mentors\" element={<MentorsPage />} />\n <Route path=\"network/events\" element={<EventsPage />} />\n {/* Farmer Cohorts — reuse of wspace-groups-svc (frontend-direct via gateway) */}\n <Route path=\"network/cohorts\" element={<CohortsPage />} />\n\n {/* Catch-all: show 404 page */}\n <Route path=\"*\" element={<NotFoundPage />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAM,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CACtF,EACK,IAAkB,QACtB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACrF,EAGK,IAAY,QAAW,OAAO,8BAA2B,MAAM,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,EACjG,IAAkB,QACtB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACtF,EACK,IAAiB,QAAW,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,EAChH,IAAmB,QACvB,OAAO,qCAAkC,MA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tsx"],"sourcesContent":["/**\n * HealthyBowl Routes\n * All route definitions with lazy loading.\n * @module healthybowl\n */\n\nimport { lazy, Suspense } from 'react';\nimport { Routes, Route, Link, Navigate, useLocation } from 'react-router';\nimport { Tractor } from 'lucide-react';\nimport { useBasePath } from './hooks/useBasePath';\nimport { useHealthyBowl } from './context/HealthyBowlContext';\nimport { PageLoader } from './components';\n\n// Eagerly load the home page\nimport { HomePage } from './pages/HomePage';\nconst GettingStartedPage = lazy(() =>\n import('./pages/GettingStartedPage').then((m) => ({ default: m.GettingStartedPage }))\n);\nconst FarmProfilePage = lazy(() =>\n import('./pages/farm/FarmProfilePage').then((m) => ({ default: m.FarmProfilePage }))\n);\n\n// ── Crops ──────────────────────────────────────────────────────────────────\nconst CropsPage = lazy(() => import('./pages/crops/CropsPage').then((m) => ({ default: m.CropsPage })));\nconst CropDetailsPage = lazy(() =>\n import('./pages/crops/CropDetailsPage').then((m) => ({ default: m.CropDetailsPage }))\n);\nconst CropFieldsPage = lazy(() => import('./pages/crops/CropFieldsPage').then((m) => ({ default: m.CropFieldsPage })));\nconst FieldDetailsPage = lazy(() =>\n import('./pages/crops/FieldDetailsPage').then((m) => ({ default: m.FieldDetailsPage }))\n);\nconst CropPlanningPage = lazy(() =>\n import('./pages/crops/CropPlanningPage').then((m) => ({ default: m.CropPlanningPage }))\n);\nconst PlanningDetailsPage = lazy(() =>\n import('./pages/crops/PlanningDetailsPage').then((m) => ({ default: m.PlanningDetailsPage }))\n);\nconst CropHarvestPage = lazy(() =>\n import('./pages/crops/CropHarvestPage').then((m) => ({ default: m.CropHarvestPage }))\n);\nconst HarvestDetailsPage = lazy(() =>\n import('./pages/crops/HarvestDetailsPage').then((m) => ({ default: m.HarvestDetailsPage }))\n);\n\n// ── Livestock ──────────────────────────────────────────────────────────────\nconst LivestockDashboardPage = lazy(() =>\n import('./pages/livestock/LivestockDashboardPage').then((m) => ({ default: m.LivestockDashboardPage }))\n);\nconst AnimalRegistryPage = lazy(() =>\n import('./pages/livestock/AnimalRegistryPage').then((m) => ({ default: m.AnimalRegistryPage }))\n);\nconst AnimalDetailsPage = lazy(() =>\n import('./pages/livestock/AnimalDetailsPage').then((m) => ({ default: m.AnimalDetailsPage }))\n);\nconst HealthRecordsPage = lazy(() =>\n import('./pages/livestock/HealthRecordsPage').then((m) => ({ default: m.HealthRecordsPage }))\n);\nconst VaccinationSchedulePage = lazy(() =>\n import('./pages/livestock/VaccinationSchedulePage').then((m) => ({ default: m.VaccinationSchedulePage }))\n);\nconst BreedingManagementPage = lazy(() =>\n import('./pages/livestock/BreedingManagementPage').then((m) => ({ default: m.BreedingManagementPage }))\n);\nconst FeedManagementPage = lazy(() =>\n import('./pages/livestock/FeedManagementPage').then((m) => ({ default: m.FeedManagementPage }))\n);\nconst ProductionTrackingPage = lazy(() =>\n import('./pages/livestock/ProductionTrackingPage').then((m) => ({ default: m.ProductionTrackingPage }))\n);\n// Livestock — Medication Withdrawal Alerts (BOFF-2885)\nconst WithdrawalAlertsPage = lazy(() =>\n import('./pages/livestock/WithdrawalAlertsPage').then((m) => ({ default: m.WithdrawalAlertsPage }))\n);\nconst MedicationLibraryPage = lazy(() =>\n import('./pages/livestock/MedicationLibraryPage').then((m) => ({ default: m.MedicationLibraryPage }))\n);\nconst WithdrawalCalendarPage = lazy(() =>\n import('./pages/livestock/WithdrawalCalendarPage').then((m) => ({ default: m.WithdrawalCalendarPage }))\n);\n// Livestock — Grazing management (BOFF-5970)\nconst GrazingPage = lazy(() => import('./pages/livestock/GrazingPage').then((m) => ({ default: m.GrazingPage })));\nconst HerdDepthPage = lazy(() => import('./pages/livestock/HerdDepthPage').then((m) => ({ default: m.HerdDepthPage })));\nconst AnimalDepthPage = lazy(() =>\n import('./pages/livestock/AnimalDepthPage').then((m) => ({ default: m.AnimalDepthPage }))\n);\nconst LivestockAnalyticsPage = lazy(() =>\n import('./pages/livestock/LivestockAnalyticsPage').then((m) => ({ default: m.LivestockAnalyticsPage }))\n);\n\n// ── Buyer/Supplier CRM (BOFF-2890 · J-1) ─────────────────────────────────────\nconst ContactsPage = lazy(() => import('./pages/contacts/ContactsPage').then((m) => ({ default: m.ContactsPage })));\nconst ContactDetailPage = lazy(() =>\n import('./pages/contacts/ContactDetailPage').then((m) => ({ default: m.ContactDetailPage }))\n);\n\n// ── Warehouse Storage (BOFF-2890 · K-1) ──────────────────────────────────────\nconst StoragePage = lazy(() => import('./pages/storage/StoragePage').then((m) => ({ default: m.StoragePage })));\nconst StorageLotDetailPage = lazy(() =>\n import('./pages/storage/StorageLotDetailPage').then((m) => ({ default: m.StorageLotDetailPage }))\n);\n\n// ── Field Map (GIS boundaries) ───────────────────────────────────────────────\nconst FieldMapPage = lazy(() => import('./pages/fields/FieldMapPage').then((m) => ({ default: m.FieldMapPage })));\n\n// ── Satellite Crop Health & Yield Forecast (BOFF-2886) ───────────────────────\nconst SatelliteCropHealthPage = lazy(() =>\n import('./pages/satellite/SatelliteCropHealthPage').then((m) => ({ default: m.SatelliteCropHealthPage }))\n);\nconst SatelliteFieldDetailPage = lazy(() =>\n import('./pages/satellite/SatelliteFieldDetailPage').then((m) => ({ default: m.SatelliteFieldDetailPage }))\n);\nconst CropHealthAlertsPage = lazy(() =>\n import('./pages/satellite/CropHealthAlertsPage').then((m) => ({ default: m.CropHealthAlertsPage }))\n);\nconst SatelliteSettingsPage = lazy(() =>\n import('./pages/satellite/SatelliteSettingsPage').then((m) => ({ default: m.SatelliteSettingsPage }))\n);\n\n// ── Field Capture — Offline mode (BOFF-2883) ─────────────────────────────────\nconst FieldCapturePage = lazy(() =>\n import('./pages/field-capture/FieldCapturePage').then((m) => ({ default: m.FieldCapturePage }))\n);\n// The SERVER-backed observation log (BOFF-6048) — everything else here shows the device outbox.\nconst ObservationLogPage = lazy(() =>\n import('./pages/field-capture/ObservationLogPage').then((m) => ({ default: m.ObservationLogPage }))\n);\nconst PendingSyncPage = lazy(() =>\n import('./pages/field-capture/PendingSyncPage').then((m) => ({ default: m.PendingSyncPage }))\n);\nconst SyncHistoryPage = lazy(() =>\n import('./pages/field-capture/SyncHistoryPage').then((m) => ({ default: m.SyncHistoryPage }))\n);\nconst OfflineSettingsPage = lazy(() =>\n import('./pages/field-capture/OfflineSettingsPage').then((m) => ({ default: m.OfflineSettingsPage }))\n);\nconst ConflictReviewPage = lazy(() =>\n import('./pages/field-capture/ConflictReviewPage').then((m) => ({ default: m.ConflictReviewPage }))\n);\n\n// ── Terrace & Home Garden (roadmap 27 · BOFF-4695) ───────────────────────────\nconst GardenDashboardPage = lazy(() =>\n import('./pages/terrace/GardenDashboardPage').then((m) => ({ default: m.GardenDashboardPage }))\n);\nconst MyGardensPage = lazy(() => import('./pages/terrace/MyGardensPage').then((m) => ({ default: m.MyGardensPage })));\nconst GrowSpacesPage = lazy(() =>\n import('./pages/terrace/GrowSpacesPage').then((m) => ({ default: m.GrowSpacesPage }))\n);\nconst GardenPlantingsPage = lazy(() =>\n import('./pages/terrace/PlantingsPage').then((m) => ({ default: m.PlantingsPage }))\n);\nconst PlantingDetailPage = lazy(() =>\n import('./pages/terrace/PlantingDetailPage').then((m) => ({ default: m.PlantingDetailPage }))\n);\nconst CareSchedulePage = lazy(() =>\n import('./pages/terrace/CareSchedulePage').then((m) => ({ default: m.CareSchedulePage }))\n);\nconst GardenHarvestsPage = lazy(() =>\n import('./pages/terrace/HarvestsPage').then((m) => ({ default: m.HarvestsPage }))\n);\nconst CompostInputsPage = lazy(() =>\n import('./pages/terrace/CompostInputsPage').then((m) => ({ default: m.CompostInputsPage }))\n);\nconst WhatToGrowPage = lazy(() =>\n import('./pages/terrace/WhatToGrowPage').then((m) => ({ default: m.WhatToGrowPage }))\n);\nconst GardenJournalPage = lazy(() =>\n import('./pages/terrace/GardenJournalPage').then((m) => ({ default: m.GardenJournalPage }))\n);\n\n// ── Master Plant List (variety catalog) ──────────────────────────────────────\nconst PlantCatalogPage = lazy(() =>\n import('./pages/catalog/PlantCatalogPage').then((m) => ({ default: m.PlantCatalogPage }))\n);\n\n// ── Nursery / Seed provenance + Suppliers (roadmap #5) ────────────────────────\nconst SuppliersPage = lazy(() => import('./pages/suppliers/SuppliersPage').then((m) => ({ default: m.SuppliersPage })));\nconst NurseryProvenancePage = lazy(() =>\n import('./pages/nursery/NurseryProvenancePage').then((m) => ({ default: m.NurseryProvenancePage }))\n);\n\n// ── Irrigation Scheduling & Automation (roadmap #3, Phase A) ──────────────────\nconst IrrigationPage = lazy(() =>\n import('./pages/irrigation/IrrigationPage').then((m) => ({ default: m.IrrigationPage }))\n);\n\n// ── Weather ────────────────────────────────────────────────────────────────\nconst WeatherOverviewPage = lazy(() =>\n import('./pages/weather/WeatherOverviewPage').then((m) => ({ default: m.WeatherOverviewPage }))\n);\nconst WeatherForecastPage = lazy(() =>\n import('./pages/weather/WeatherForecastPage').then((m) => ({ default: m.WeatherForecastPage }))\n);\nconst WeatherAlertsPage = lazy(() =>\n import('./pages/weather/WeatherAlertsPage').then((m) => ({ default: m.WeatherAlertsPage }))\n);\nconst WeatherHistoryPage = lazy(() =>\n import('./pages/weather/WeatherHistoryPage').then((m) => ({ default: m.WeatherHistoryPage }))\n);\n// Weather Early-Warning Alert Rules (DEWS — roadmap #20)\nconst WeatherAlertRulesPage = lazy(() =>\n import('./pages/weather/WeatherAlertRulesPage').then((m) => ({ default: m.WeatherAlertRulesPage }))\n);\n// Historical Weather & Early Warning (BOFF-2892)\nconst FrostRiskCalendarPage = lazy(() =>\n import('./pages/weather/FrostRiskCalendarPage').then((m) => ({ default: m.FrostRiskCalendarPage }))\n);\nconst WeatherAnomalyReportPage = lazy(() =>\n import('./pages/weather/WeatherAnomalyReportPage').then((m) => ({ default: m.WeatherAnomalyReportPage }))\n);\nconst WeatherAlertHistoryPage = lazy(() =>\n import('./pages/weather/WeatherAlertHistoryPage').then((m) => ({ default: m.WeatherAlertHistoryPage }))\n);\nconst WeatherSettingsPage = lazy(() =>\n import('./pages/weather/WeatherSettingsPage').then((m) => ({ default: m.WeatherSettingsPage }))\n);\n\n// ── Distribution & Sales Channels (BOFF-2884) ────────────────────────────────\nconst DistributionOverviewPage = lazy(() =>\n import('./pages/distribution/DistributionOverviewPage').then((m) => ({ default: m.DistributionOverviewPage }))\n);\nconst CsaPlansPage = lazy(() => import('./pages/distribution/CsaPlansPage').then((m) => ({ default: m.CsaPlansPage })));\nconst CsaPlanDetailPage = lazy(() =>\n import('./pages/distribution/CsaPlanDetailPage').then((m) => ({ default: m.CsaPlanDetailPage }))\n);\nconst WholesaleOrdersPage = lazy(() =>\n import('./pages/distribution/WholesaleOrdersPage').then((m) => ({ default: m.WholesaleOrdersPage }))\n);\nconst DeliveryRoutesPage = lazy(() =>\n import('./pages/distribution/DeliveryRoutesPage').then((m) => ({ default: m.DeliveryRoutesPage }))\n);\nconst DeliveryRouteDetailPage = lazy(() =>\n import('./pages/distribution/DeliveryRouteDetailPage').then((m) => ({ default: m.DeliveryRouteDetailPage }))\n);\n// CSA collection points + per-date manifest (BOFF-6021, over the BOFF-5978 backend).\nconst PickupLocationsPage = lazy(() =>\n import('./pages/distribution/PickupLocationsPage').then((m) => ({ default: m.PickupLocationsPage }))\n);\nconst PickupManifestPage = lazy(() =>\n import('./pages/distribution/PickupManifestPage').then((m) => ({ default: m.PickupManifestPage }))\n);\n\n// ── Inputs & Insurance (BOFF-2897) ───────────────────────────────────────────\nconst InputsInsuranceOverviewPage = lazy(() =>\n import('./pages/inputs-insurance/InputsInsuranceOverviewPage').then((m) => ({\n default: m.InputsInsuranceOverviewPage,\n }))\n);\nconst PmfbyApplyPage = lazy(() =>\n import('./pages/inputs-insurance/PmfbyApplyPage').then((m) => ({ default: m.PmfbyApplyPage }))\n);\nconst PolicyClaimsPage = lazy(() =>\n import('./pages/inputs-insurance/PolicyClaimsPage').then((m) => ({ default: m.PolicyClaimsPage }))\n);\nconst ClaimDetailPage = lazy(() =>\n import('./pages/inputs-insurance/ClaimDetailPage').then((m) => ({ default: m.ClaimDetailPage }))\n);\nconst LoanFacilitationPage = lazy(() =>\n import('./pages/inputs-insurance/LoanFacilitationPage').then((m) => ({ default: m.LoanFacilitationPage }))\n);\n\n// ── Marketplace (UC-08) ──────────────────────────────────────────────────────\nconst MarketplacePage = lazy(() =>\n import('./pages/marketplace/MarketplacePage').then((m) => ({ default: m.MarketplacePage }))\n);\nconst ProductDetailPage = lazy(() =>\n import('./pages/marketplace/ProductDetailPage').then((m) => ({ default: m.ProductDetailPage }))\n);\nconst CartPage = lazy(() => import('./pages/marketplace/CartPage').then((m) => ({ default: m.CartPage })));\nconst WishlistPage = lazy(() => import('./pages/marketplace/WishlistPage').then((m) => ({ default: m.WishlistPage })));\nconst OrdersPage = lazy(() => import('./pages/marketplace/OrdersPage').then((m) => ({ default: m.OrdersPage })));\n\n// ── Agri-Inputs Store (roadmap #26 / BOFF-2898) — buy-side commerce ──────────\nconst AgriInputsStorePage = lazy(() =>\n import('./pages/agri-inputs/AgriInputsStorePage').then((m) => ({ default: m.AgriInputsStorePage }))\n);\n\n// ── Financial ──────────────────────────────────────────────────────────────\nconst FinancialDashboardPage = lazy(() =>\n import('./pages/financial/FinancialDashboardPage').then((m) => ({ default: m.FinancialDashboardPage }))\n);\nconst TransactionsPage = lazy(() =>\n import('./pages/financial/TransactionsPage').then((m) => ({ default: m.TransactionsPage }))\n);\nconst BudgetManagementPage = lazy(() =>\n import('./pages/financial/BudgetManagementPage').then((m) => ({ default: m.BudgetManagementPage }))\n);\nconst InvoiceManagementPage = lazy(() =>\n import('./pages/financial/InvoiceManagementPage').then((m) => ({ default: m.InvoiceManagementPage }))\n);\nconst FinancialReportsPage = lazy(() =>\n import('./pages/financial/FinancialReportsPage').then((m) => ({ default: m.FinancialReportsPage }))\n);\nconst FinancierAccessPage = lazy(() =>\n import('./pages/financial/FinancierAccessPage').then((m) => ({ default: m.FinancierAccessPage }))\n);\nconst FarmAccountingPage = lazy(() =>\n import('./pages/financial/FarmAccountingPage').then((m) => ({ default: m.FarmAccountingPage }))\n);\nconst GeneralLedgerPage = lazy(() =>\n import('./pages/financial/GeneralLedgerPage').then((m) => ({ default: m.GeneralLedgerPage }))\n);\nconst ChartOfAccountsPage = lazy(() =>\n import('./pages/financial/ChartOfAccountsPage').then((m) => ({ default: m.ChartOfAccountsPage }))\n);\nconst CostByCropPage = lazy(() =>\n import('./pages/financial/CostByCropPage').then((m) => ({ default: m.CostByCropPage }))\n);\nconst ProfitLossPage = lazy(() =>\n import('./pages/financial/ProfitLossPage').then((m) => ({ default: m.ProfitLossPage }))\n);\nconst CoopOverviewPage = lazy(() =>\n import('./pages/coop/CoopOverviewPage').then((m) => ({ default: m.CoopOverviewPage }))\n);\nconst AggregationLotBuilderPage = lazy(() =>\n import('./pages/coop/AggregationLotBuilderPage').then((m) => ({ default: m.AggregationLotBuilderPage }))\n);\nconst CoopMemberDetailPage = lazy(() =>\n import('./pages/coop/CoopMemberDetailPage').then((m) => ({ default: m.CoopMemberDetailPage }))\n);\nconst FinancialStatementsPage = lazy(() =>\n import('./pages/financial/FinancialStatementsPage').then((m) => ({ default: m.FinancialStatementsPage }))\n);\n\nconst BankReconciliationPage = lazy(() =>\n import('./pages/financial/BankReconciliationPage').then((m) => ({ default: m.BankReconciliationPage }))\n);\nconst AccountingIntegrationsPage = lazy(() =>\n import('./pages/financial/AccountingIntegrationsPage').then((m) => ({ default: m.AccountingIntegrationsPage }))\n);\n\n// ── Credits & Payments wallet (roadmap #08 / BOFF-2880) ──────────────────────\nconst CreditsWalletPage = lazy(() =>\n import('./pages/wallet/CreditsWalletPage').then((m) => ({ default: m.CreditsWalletPage }))\n);\n\n// ── Financier (B2B2C bridge) ─────────────────────────────────────────────────\nconst FinancierPage = lazy(() => import('./pages/financier/FinancierPage').then((m) => ({ default: m.FinancierPage })));\n\n// ── Analytics ──────────────────────────────────────────────────────────────\nconst AnalyticsOverviewPage = lazy(() =>\n import('./pages/analytics/AnalyticsOverviewPage').then((m) => ({ default: m.AnalyticsOverviewPage }))\n);\nconst AnalyticsDashboardPage = lazy(() =>\n import('./pages/analytics/AnalyticsDashboardPage').then((m) => ({ default: m.AnalyticsDashboardPage }))\n);\nconst ReportsPage = lazy(() => import('./pages/analytics/ReportsPage').then((m) => ({ default: m.ReportsPage })));\nconst InsightsPage = lazy(() => import('./pages/analytics/InsightsPage').then((m) => ({ default: m.InsightsPage })));\nconst ExportPage = lazy(() => import('./pages/analytics/ExportPage').then((m) => ({ default: m.ExportPage })));\n\n// ── Reports & API (roadmap #19 — report builder + developer API/webhooks) ────\nconst ReportsApiPage = lazy(() =>\n import('./pages/reports-api/ReportsApiPage').then((m) => ({ default: m.ReportsApiPage }))\n);\n\n// ── Market Prices — Mandi price intelligence (roadmap #28 · BOFF-4715) ───────\nconst MarketPricesPage = lazy(() =>\n import('./pages/market/MarketPricesPage').then((m) => ({ default: m.MarketPricesPage }))\n);\n\n// ── Contracts — Contract & Managed Farming (roadmap #29 · BOFF-4718) ─────────\nconst ContractsPage = lazy(() => import('./pages/contracts/ContractsPage').then((m) => ({ default: m.ContractsPage })));\n\n// ── Soil Health ────────────────────────────────────────────────────────────\nconst SoilDashboardPage = lazy(() =>\n import('./pages/soil/SoilDashboardPage').then((m) => ({ default: m.SoilDashboardPage }))\n);\nconst SoilTestsPage = lazy(() => import('./pages/soil/SoilTestsPage').then((m) => ({ default: m.SoilTestsPage })));\nconst SoilMonitoringPage = lazy(() =>\n import('./pages/soil/SoilMonitoringPage').then((m) => ({ default: m.SoilMonitoringPage }))\n);\nconst SoilRecommendationsPage = lazy(() =>\n import('./pages/soil/SoilRecommendationsPage').then((m) => ({ default: m.SoilRecommendationsPage }))\n);\nconst FieldSensorsPage = lazy(() =>\n import('./pages/soil/FieldSensorsPage').then((m) => ({ default: m.FieldSensorsPage }))\n);\n\n// ── Pest Management ───────────────────────────────────────────────────────\nconst PestOverviewPage = lazy(() =>\n import('./pages/pest-management/PestOverviewPage').then((m) => ({ default: m.PestOverviewPage }))\n);\nconst PestIssuesPage = lazy(() =>\n import('./pages/pest-management/PestIssuesPage').then((m) => ({ default: m.PestIssuesPage }))\n);\nconst TreatmentLibraryPage = lazy(() =>\n import('./pages/pest-management/TreatmentLibraryPage').then((m) => ({ default: m.TreatmentLibraryPage }))\n);\nconst PestMonitoringPage = lazy(() =>\n import('./pages/pest-management/PestMonitoringPage').then((m) => ({ default: m.PestMonitoringPage }))\n);\nconst AiPestDetectionPage = lazy(() =>\n import('./pages/pest-management/AiPestDetectionPage').then((m) => ({ default: m.AiPestDetectionPage }))\n);\n\n// ── Production ─────────────────────────────────────────────────────────────\nconst ProductionPlanningPage = lazy(() =>\n import('./pages/production/ProductionPlanningPage').then((m) => ({ default: m.ProductionPlanningPage }))\n);\nconst ValueAddedProductsPage = lazy(() =>\n import('./pages/production/ValueAddedProductsPage').then((m) => ({ default: m.ValueAddedProductsPage }))\n);\nconst RecipeManagementPage = lazy(() =>\n import('./pages/production/RecipeManagementPage').then((m) => ({ default: m.RecipeManagementPage }))\n);\nconst ProductionBatchesPage = lazy(() =>\n import('./pages/production/ProductionBatchesPage').then((m) => ({ default: m.ProductionBatchesPage }))\n);\nconst ProductionSchedulePage = lazy(() =>\n import('./pages/production/ProductionSchedulePage').then((m) => ({ default: m.ProductionSchedulePage }))\n);\n\n// ── Products ───────────────────────────────────────────────────────────────\nconst ProductsOverviewPage = lazy(() =>\n import('./pages/products/ProductsOverviewPage').then((m) => ({ default: m.ProductsOverviewPage }))\n);\nconst InventoryPage = lazy(() => import('./pages/products/InventoryPage').then((m) => ({ default: m.InventoryPage })));\nconst BatchesPage = lazy(() => import('./pages/products/BatchesPage').then((m) => ({ default: m.BatchesPage })));\nconst QualityPage = lazy(() => import('./pages/products/QualityPage').then((m) => ({ default: m.QualityPage })));\n\n// ── Traceability (UC-11) ─────────────────────────────────────────────────────\nconst BatchTrackingPage = lazy(() =>\n import('./pages/traceability/BatchTrackingPage').then((m) => ({ default: m.BatchTrackingPage }))\n);\nconst SupplyChainPage = lazy(() =>\n import('./pages/traceability/SupplyChainPage').then((m) => ({ default: m.SupplyChainPage }))\n);\nconst TraceTrackingPage = lazy(() =>\n import('./pages/traceability/TraceTrackingPage').then((m) => ({ default: m.TraceTrackingPage }))\n);\nconst QRCodesPage = lazy(() => import('./pages/traceability/QRCodesPage').then((m) => ({ default: m.QRCodesPage })));\nconst TraceLedgerPage = lazy(() =>\n import('./pages/traceability/TraceLedgerPage').then((m) => ({ default: m.TraceLedgerPage }))\n);\nconst TracePortalSettingsPage = lazy(() =>\n import('./pages/traceability/TracePortalSettingsPage').then((m) => ({ default: m.TracePortalSettingsPage }))\n);\n\n// ── Compliance ─────────────────────────────────────────────────────────────\nconst ComplianceOverviewPage = lazy(() =>\n import('./pages/compliance/ComplianceOverviewPage').then((m) => ({ default: m.ComplianceOverviewPage }))\n);\nconst OrganicCertificationPage = lazy(() =>\n import('./pages/compliance/OrganicCertificationPage').then((m) => ({ default: m.OrganicCertificationPage }))\n);\nconst CertificationStandardDetailPage = lazy(() =>\n import('./pages/compliance/CertificationStandardDetailPage').then((m) => ({\n default: m.CertificationStandardDetailPage,\n }))\n);\nconst IcsGroupsPage = lazy(() =>\n import('./pages/compliance/IcsGroupsPage').then((m) => ({ default: m.IcsGroupsPage }))\n);\nconst IcsGroupDetailPage = lazy(() =>\n import('./pages/compliance/IcsGroupDetailPage').then((m) => ({ default: m.IcsGroupDetailPage }))\n);\nconst IcsGrowerWizardPage = lazy(() =>\n import('./pages/compliance/IcsGrowerWizardPage').then((m) => ({ default: m.IcsGrowerWizardPage }))\n);\nconst IcsGrowerDetailPage = lazy(() =>\n import('./pages/compliance/IcsGrowerDetailPage').then((m) => ({ default: m.IcsGrowerDetailPage }))\n);\nconst ComplianceAlertsPage = lazy(() =>\n import('./pages/compliance/ComplianceAlertsPage').then((m) => ({ default: m.ComplianceAlertsPage }))\n);\nconst InspectionCalendarPage = lazy(() =>\n import('./pages/compliance/InspectionCalendarPage').then((m) => ({ default: m.InspectionCalendarPage }))\n);\nconst CertificatesOfOriginPage = lazy(() =>\n import('./pages/compliance/CertificatesOfOriginPage').then((m) => ({ default: m.CertificatesOfOriginPage }))\n);\nconst ComplianceAuditsPage = lazy(() =>\n import('./pages/compliance/ComplianceAuditsPage').then((m) => ({ default: m.ComplianceAuditsPage }))\n);\nconst ComplianceDocumentsPage = lazy(() =>\n import('./pages/compliance/ComplianceDocumentsPage').then((m) => ({ default: m.ComplianceDocumentsPage }))\n);\n\n// ── Sustainability — Carbon & Climate (BOFF-2896) ─────────────────────────────\nconst SustainabilityOverviewPage = lazy(() =>\n import('./pages/sustainability/SustainabilityOverviewPage').then((m) => ({ default: m.SustainabilityOverviewPage }))\n);\nconst CarbonGhgPage = lazy(() =>\n import('./pages/sustainability/CarbonGhgPage').then((m) => ({ default: m.CarbonGhgPage }))\n);\nconst SoilCarbonPage = lazy(() =>\n import('./pages/sustainability/SoilCarbonPage').then((m) => ({ default: m.SoilCarbonPage }))\n);\nconst CarbonCreditLedgerPage = lazy(() =>\n import('./pages/sustainability/CarbonCreditLedgerPage').then((m) => ({ default: m.CarbonCreditLedgerPage }))\n);\nconst GenerateCreditWizardPage = lazy(() =>\n import('./pages/sustainability/GenerateCreditWizardPage').then((m) => ({ default: m.GenerateCreditWizardPage }))\n);\nconst EudrDueDiligencePage = lazy(() =>\n import('./pages/sustainability/EudrDueDiligencePage').then((m) => ({ default: m.EudrDueDiligencePage }))\n);\n\n// ── Government Schemes ─────────────────────────────────────────────────────\nconst SchemesOverviewPage = lazy(() =>\n import('./pages/government-schemes/SchemesOverviewPage').then((m) => ({ default: m.SchemesOverviewPage }))\n);\nconst SchemeDiscoveryPage = lazy(() =>\n import('./pages/government-schemes/SchemeDiscoveryPage').then((m) => ({ default: m.SchemeDiscoveryPage }))\n);\nconst SchemeDetailsPage = lazy(() =>\n import('./pages/government-schemes/SchemeDetailsPage').then((m) => ({ default: m.SchemeDetailsPage }))\n);\nconst ApplicationTrackingPage = lazy(() =>\n import('./pages/government-schemes/ApplicationTrackingPage').then((m) => ({ default: m.ApplicationTrackingPage }))\n);\nconst TrainingProgramsPage = lazy(() =>\n import('./pages/government-schemes/TrainingProgramsPage').then((m) => ({ default: m.TrainingProgramsPage }))\n);\nconst GovernmentDashboardPage = lazy(() =>\n import('./pages/government-schemes/GovernmentDashboardPage').then((m) => ({ default: m.GovernmentDashboardPage }))\n);\nconst CommunicationPage = lazy(() =>\n import('./pages/government-schemes/CommunicationPage').then((m) => ({ default: m.CommunicationPage }))\n);\nconst AccessibilitySettingsPage = lazy(() =>\n import('./pages/government-schemes/AccessibilitySettingsPage').then((m) => ({ default: m.AccessibilitySettingsPage }))\n);\nconst SchemeAdminPage = lazy(() =>\n import('./pages/government-schemes/SchemeAdminPage').then((m) => ({ default: m.SchemeAdminPage }))\n);\n\n// ── Network (UC-12) ──────────────────────────────────────────────────────────\nconst NetworkOverviewPage = lazy(() =>\n import('./pages/network/NetworkOverviewPage').then((m) => ({ default: m.NetworkOverviewPage }))\n);\nconst CommunityPage = lazy(() => import('./pages/network/CommunityPage').then((m) => ({ default: m.CommunityPage })));\nconst ExpertsPage = lazy(() => import('./pages/network/ExpertsPage').then((m) => ({ default: m.ExpertsPage })));\nconst MentorsPage = lazy(() => import('./pages/network/MentorsPage').then((m) => ({ default: m.MentorsPage })));\nconst EventsPage = lazy(() => import('./pages/network/EventsPage').then((m) => ({ default: m.EventsPage })));\nconst CohortsPage = lazy(() => import('./pages/network/CohortsPage').then((m) => ({ default: m.CohortsPage })));\n\n// ── Farm Tasks (PlanMagnet embed) ─────────────────────────────────────────────\nconst TasksPage = lazy(() => import('./pages/tasks/TasksPage').then((m) => ({ default: m.TasksPage })));\n\n// ── Consultant advisory (UC-16) ──────────────────────────────────────────────\nconst ConsultantClientsPage = lazy(() =>\n import('./pages/consultant/ConsultantClientsPage').then((m) => ({ default: m.ConsultantClientsPage }))\n);\nconst ConsultantDiagnosisPage = lazy(() =>\n import('./pages/consultant/ConsultantDiagnosisPage').then((m) => ({ default: m.ConsultantDiagnosisPage }))\n);\nconst FarmerAdvisorsPage = lazy(() =>\n import('./pages/consultant/FarmerAdvisorsPage').then((m) => ({ default: m.FarmerAdvisorsPage }))\n);\n\n// ── 404 Not Found ────────────────────────────────────────────────────────\nfunction NotFoundPage() {\n const { buildPath } = useBasePath();\n return (\n <div className=\"flex min-h-[60vh] flex-col items-center justify-center gap-4 p-12 text-center\">\n <h1 className=\"text-6xl font-bold tracking-tight text-text-primary\">404</h1>\n <h2 className=\"text-xl font-semibold text-text-primary\">Page not found</h2>\n <p className=\"max-w-md text-sm text-text-secondary\">\n The page you&apos;re looking for doesn&apos;t exist or has been moved.\n </p>\n <Link\n to={buildPath('')}\n className=\"mt-4 inline-flex items-center rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text shadow-sm hover:bg-action-primary-bg/90 transition-colors\"\n >\n Go to Dashboard\n </Link>\n </div>\n );\n}\n\n// ============================================================================\n// Routes\n// ============================================================================\n\n/**\n * Shown when HealthyBowl is opened without an active workspace (e.g. a\n * direct/bookmarked hit on a session with no persisted context). Most HB\n * routes are workspace-scoped, so rendering them would fire a wall of\n * `WORKSPACE_REQUIRED` errors + toasts — instead we show a single honest\n * prompt pointing at the shell's workspace switcher.\n */\nfunction WorkspaceRequiredGate() {\n return (\n <div className=\"flex min-h-[60vh] flex-col items-center justify-center gap-4 p-8 text-center\">\n <div className=\"flex h-16 w-16 items-center justify-center rounded-full bg-bg-sunken\">\n <Tractor className=\"h-8 w-8 text-text-secondary\" />\n </div>\n <div className=\"max-w-md space-y-1.5\">\n <h2 className=\"text-lg font-semibold text-text-primary\">Choose a workspace</h2>\n <p className=\"text-sm text-text-secondary\">\n HealthyBowl needs an active workspace to load your farm. Select one from the workspace switcher in the top bar\n to continue.\n </p>\n </div>\n </div>\n );\n}\n\nexport function HealthyBowlRoutes() {\n const { workspaceId } = useHealthyBowl();\n const { pathname } = useLocation();\n // Financier (UC-14) and consultant (UC-16) partners are never workspace\n // members and their pages use self-scoped queries (no workspaceId), so they\n // must reach their routes without an active workspace. Every other route is\n // workspace-scoped — without a workspace we show the gate instead of firing\n // a wall of WORKSPACE_REQUIRED queries.\n const isSelfScopedPartnerRoute = /(?:^|\\/)(?:financier|consultant)(?:\\/|$)/.test(pathname);\n if (!workspaceId && !isSelfScopedPartnerRoute) {\n return <WorkspaceRequiredGate />;\n }\n return (\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Dashboard — the product index IS the dashboard (one canonical URL). */}\n <Route index element={<HomePage />} />\n {/* Back-compat redirect: the dashboard used to live at /dashboard; keep\n old bookmarks/history working by redirecting to the index. */}\n <Route path=\"dashboard\" element={<Navigate to=\"..\" replace />} />\n <Route path=\"getting-started\" element={<GettingStartedPage />} />\n <Route path=\"farm\" element={<FarmProfilePage />} />\n\n {/* Crops */}\n <Route path=\"crops\" element={<CropsPage />} />\n <Route path=\"crops/:cropId\" element={<CropDetailsPage />} />\n <Route path=\"crops/fields\" element={<CropFieldsPage />} />\n <Route path=\"crops/fields/:fieldId\" element={<FieldDetailsPage />} />\n <Route path=\"crops/planning\" element={<CropPlanningPage />} />\n <Route path=\"crops/planning/:planId\" element={<PlanningDetailsPage />} />\n <Route path=\"crops/harvest\" element={<CropHarvestPage />} />\n <Route path=\"crops/harvest/:harvestId\" element={<HarvestDetailsPage />} />\n\n {/* Livestock */}\n <Route path=\"livestock\" element={<LivestockDashboardPage />} />\n <Route path=\"livestock/analytics\" element={<LivestockAnalyticsPage />} />\n <Route path=\"livestock/animals\" element={<AnimalRegistryPage />} />\n <Route path=\"livestock/animals/:animalId\" element={<AnimalDetailsPage />} />\n <Route path=\"livestock/health\" element={<HealthRecordsPage />} />\n <Route path=\"livestock/vaccination\" element={<VaccinationSchedulePage />} />\n <Route path=\"livestock/vaccinations\" element={<VaccinationSchedulePage />} />\n <Route path=\"livestock/breeding\" element={<BreedingManagementPage />} />\n <Route path=\"livestock/feed\" element={<FeedManagementPage />} />\n <Route path=\"livestock/production\" element={<ProductionTrackingPage />} />\n <Route path=\"livestock/withdrawal-alerts\" element={<WithdrawalAlertsPage />} />\n <Route path=\"livestock/withdrawal-alerts/library\" element={<MedicationLibraryPage />} />\n <Route path=\"livestock/withdrawal-alerts/calendar\" element={<WithdrawalCalendarPage />} />\n <Route path=\"livestock/grazing\" element={<GrazingPage />} />\n <Route path=\"livestock/records\" element={<HerdDepthPage />} />\n <Route path=\"livestock/records/:animalId\" element={<AnimalDepthPage />} />\n\n {/* Field Map — draw/manage field boundaries on satellite (GIS) */}\n <Route path=\"field-map\" element={<FieldMapPage />} />\n\n {/* Satellite Crop Health & Yield Forecast (BOFF-2886) — NDVI heatmap, stressed\n zones, health score, yield forecast + simulation. Static sub-routes first so\n 'alerts'/'settings' aren't shadowed by the ':fieldId' detail route. */}\n <Route path=\"satellite\" element={<SatelliteCropHealthPage />} />\n <Route path=\"satellite/alerts\" element={<CropHealthAlertsPage />} />\n <Route path=\"satellite/settings\" element={<SatelliteSettingsPage />} />\n <Route path=\"satellite/:fieldId\" element={<SatelliteFieldDetailPage />} />\n\n {/* Field Capture — offline-first capture + sync (BOFF-2883). More specific\n routes first so 'conflicts/:clientId' and the tabs aren't shadowed. */}\n <Route path=\"field-capture\" element={<FieldCapturePage />} />\n <Route path=\"field-capture/log\" element={<ObservationLogPage />} />\n <Route path=\"field-capture/pending\" element={<PendingSyncPage />} />\n <Route path=\"field-capture/history\" element={<SyncHistoryPage />} />\n <Route path=\"field-capture/settings\" element={<OfflineSettingsPage />} />\n <Route path=\"field-capture/conflicts/:clientId\" element={<ConflictReviewPage />} />\n\n {/* Terrace & Home Garden (roadmap 27 · BOFF-4695) — the home-grower surface.\n The :plantingId detail route is declared before the bare list route's\n siblings so the more specific path always wins. */}\n <Route path=\"garden\" element={<GardenDashboardPage />} />\n <Route path=\"garden/gardens\" element={<MyGardensPage />} />\n <Route path=\"garden/spaces\" element={<GrowSpacesPage />} />\n <Route path=\"garden/plantings/:plantingId\" element={<PlantingDetailPage />} />\n <Route path=\"garden/plantings\" element={<GardenPlantingsPage />} />\n <Route path=\"garden/care\" element={<CareSchedulePage />} />\n <Route path=\"garden/harvests\" element={<GardenHarvestsPage />} />\n <Route path=\"garden/compost\" element={<CompostInputsPage />} />\n <Route path=\"garden/planner\" element={<WhatToGrowPage />} />\n <Route path=\"garden/journal\" element={<GardenJournalPage />} />\n\n {/* Master Plant List — editable variety catalog with spacing/maturity defaults */}\n <Route path=\"plant-catalog\" element={<PlantCatalogPage />} />\n\n {/* Nursery / Seed provenance + Suppliers (roadmap #5) */}\n <Route path=\"suppliers\" element={<SuppliersPage />} />\n <Route path=\"nursery\" element={<NurseryProvenancePage />} />\n\n {/* Irrigation Scheduling & Automation (roadmap #3, Phase A) */}\n <Route path=\"irrigation\" element={<IrrigationPage />} />\n\n {/* Weather */}\n <Route path=\"weather\" element={<WeatherOverviewPage />} />\n <Route path=\"weather/forecast\" element={<WeatherForecastPage />} />\n <Route path=\"weather/alerts\" element={<WeatherAlertsPage />} />\n <Route path=\"weather/alert-rules\" element={<WeatherAlertRulesPage />} />\n <Route path=\"weather/history\" element={<WeatherHistoryPage />} />\n {/* Historical Weather & Early Warning (BOFF-2892) */}\n <Route path=\"weather/calendar\" element={<FrostRiskCalendarPage />} />\n <Route path=\"weather/anomaly\" element={<WeatherAnomalyReportPage />} />\n <Route path=\"weather/alert-history\" element={<WeatherAlertHistoryPage />} />\n <Route path=\"weather/settings\" element={<WeatherSettingsPage />} />\n\n {/* Marketplace (UC-08) — listings persist; cart/wishlist session-only; checkout unavailable */}\n <Route path=\"marketplace\" element={<MarketplacePage />} />\n <Route path=\"marketplace/cart\" element={<CartPage />} />\n <Route path=\"marketplace/wishlist\" element={<WishlistPage />} />\n <Route path=\"marketplace/orders\" element={<OrdersPage />} />\n <Route path=\"marketplace/:productId\" element={<ProductDetailPage />} />\n\n {/* Agri-Inputs Store (roadmap #26 / BOFF-2898) — buy seeds/fertilizer/bio-pesticides/tools/\n irrigation. Composes global-store catalog + global-billing checkout (reuses the\n marketplace cart/order/payment flow); this increment adds no HB tables, but the order\n it places IS an HB Order row (paymentStatus/billingOrderId/paidAt). */}\n <Route path=\"agri-inputs\" element={<AgriInputsStorePage />} />\n\n {/* Distribution & Sales Channels (BOFF-2884) — CSA boxes, wholesale, delivery routes */}\n {/* Buyer/Supplier CRM (BOFF-2890 · J-1) */}\n <Route path=\"contacts\" element={<ContactsPage />} />\n <Route path=\"contacts/:contactId\" element={<ContactDetailPage />} />\n\n {/* Warehouse Storage (BOFF-2890 · K-1) */}\n <Route path=\"storage\" element={<StoragePage />} />\n <Route path=\"storage/lots/:lotId\" element={<StorageLotDetailPage />} />\n\n <Route path=\"distribution\" element={<DistributionOverviewPage />} />\n <Route path=\"distribution/csa\" element={<CsaPlansPage />} />\n <Route path=\"distribution/csa/:planId\" element={<CsaPlanDetailPage />} />\n <Route path=\"distribution/wholesale\" element={<WholesaleOrdersPage />} />\n <Route path=\"distribution/routes\" element={<DeliveryRoutesPage />} />\n <Route path=\"distribution/routes/:routeId\" element={<DeliveryRouteDetailPage />} />\n <Route path=\"distribution/pickup\" element={<PickupLocationsPage />} />\n <Route path=\"distribution/manifest\" element={<PickupManifestPage />} />\n\n {/* Inputs & Insurance (BOFF-2897) — input plans, PMFBY, claims, loan facilitation */}\n <Route path=\"inputs-insurance\" element={<InputsInsuranceOverviewPage />} />\n <Route path=\"inputs-insurance/apply\" element={<PmfbyApplyPage />} />\n <Route path=\"inputs-insurance/policies/:policyId/claims\" element={<PolicyClaimsPage />} />\n <Route path=\"inputs-insurance/claims/:claimId\" element={<ClaimDetailPage />} />\n <Route path=\"inputs-insurance/loans\" element={<LoanFacilitationPage />} />\n\n {/* Financial */}\n <Route path=\"financial\" element={<FinancialDashboardPage />} />\n <Route path=\"financial/transactions\" element={<TransactionsPage />} />\n <Route path=\"financial/budgets\" element={<BudgetManagementPage />} />\n <Route path=\"financial/invoices\" element={<InvoiceManagementPage />} />\n <Route path=\"financial/reports\" element={<FinancialReportsPage />} />\n <Route path=\"financial/financier-access\" element={<FinancierAccessPage />} />\n {/* BOFF-6023 — cooperative / FPO aggregation. */}\n <Route path=\"coop\" element={<CoopOverviewPage />} />\n <Route path=\"coop/lots/:lotId\" element={<AggregationLotBuilderPage />} />\n <Route path=\"coop/members/:membershipId\" element={<CoopMemberDetailPage />} />\n <Route path=\"financial/accounting\" element={<FarmAccountingPage />} />\n <Route path=\"financial/ledger\" element={<GeneralLedgerPage />} />\n <Route path=\"financial/chart-of-accounts\" element={<ChartOfAccountsPage />} />\n <Route path=\"financial/cost-by-crop\" element={<CostByCropPage />} />\n <Route path=\"financial/profit-loss\" element={<ProfitLossPage />} />\n {/* BOFF-6026 — balance sheet, cash flow and trial balance. */}\n <Route path=\"financial/statements\" element={<FinancialStatementsPage />} />\n {/* BOFF-6025 — proving the ledger against the bank. */}\n <Route path=\"financial/reconciliation\" element={<BankReconciliationPage />} />\n <Route path=\"financial/accounting-integrations\" element={<AccountingIntegrationsPage />} />\n\n {/* Credits & Payments wallet (#08) — reads global-billing credits; Razorpay top-up + payout */}\n <Route path=\"wallet\" element={<CreditsWalletPage />} />\n\n {/* Financier portfolio (B2B2C bridge) */}\n <Route path=\"financier\" element={<FinancierPage />} />\n\n {/* Farm Tasks — embeds the composed PlanMagnet TasksPage over wspace-planmagnet-svc */}\n <Route path=\"tasks\" element={<TasksPage />} />\n\n {/* Consultant advisory (UC-16) */}\n <Route path=\"consultant\" element={<ConsultantClientsPage />} />\n <Route path=\"consultant/clients\" element={<ConsultantClientsPage />} />\n <Route path=\"consultant/clients/:workspaceId\" element={<ConsultantDiagnosisPage />} />\n <Route path=\"advisors\" element={<FarmerAdvisorsPage />} />\n\n {/* Analytics */}\n <Route path=\"analytics\" element={<AnalyticsOverviewPage />} />\n <Route path=\"analytics/dashboard\" element={<AnalyticsDashboardPage />} />\n <Route path=\"analytics/reports\" element={<ReportsPage />} />\n <Route path=\"analytics/insights\" element={<InsightsPage />} />\n <Route path=\"analytics/export\" element={<ExportPage />} />\n\n {/* Reports & API (roadmap #19 — report builder + developer API/webhooks) */}\n <Route path=\"reports-api\" element={<ReportsApiPage />} />\n\n {/* Field Sensors (live probe monitoring — BOFF-2894) */}\n <Route path=\"field-sensors\" element={<FieldSensorsPage />} />\n\n {/* Market Prices — Mandi / Market-Price Intelligence (roadmap #28 · BOFF-4715) */}\n <Route path=\"market-prices\" element={<MarketPricesPage />} />\n\n {/* Contracts — Contract & Managed Farming (roadmap #29 · BOFF-4718) */}\n <Route path=\"contracts\" element={<ContractsPage />} />\n\n {/* Soil Health */}\n <Route path=\"soil\" element={<SoilDashboardPage />} />\n <Route path=\"soil/tests\" element={<SoilTestsPage />} />\n <Route path=\"soil/monitoring\" element={<SoilMonitoringPage />} />\n <Route path=\"soil/recommendations\" element={<SoilRecommendationsPage />} />\n\n {/* Pest Management */}\n <Route path=\"pest-management\" element={<PestOverviewPage />} />\n <Route path=\"pest-management/issues\" element={<PestIssuesPage />} />\n <Route path=\"pest-management/ai-detection\" element={<AiPestDetectionPage />} />\n <Route path=\"pest-management/treatments\" element={<TreatmentLibraryPage />} />\n <Route path=\"pest-management/monitoring\" element={<PestMonitoringPage />} />\n\n {/* Production */}\n <Route path=\"production\" element={<ProductionPlanningPage />} />\n <Route path=\"production/value-added\" element={<ValueAddedProductsPage />} />\n <Route path=\"production/recipes\" element={<RecipeManagementPage />} />\n <Route path=\"production/batches\" element={<ProductionBatchesPage />} />\n <Route path=\"production/schedule\" element={<ProductionSchedulePage />} />\n\n {/* Products */}\n <Route path=\"products\" element={<ProductsOverviewPage />} />\n <Route path=\"products/inventory\" element={<InventoryPage />} />\n <Route path=\"products/batches\" element={<BatchesPage />} />\n <Route path=\"products/quality\" element={<QualityPage />} />\n\n {/* Traceability (UC-11 + BOFF-2879) — real scannable QR + public farm-to-fork portal.\n The consumer-facing portal itself is NOT here: it is an unauthenticated route\n (`/b/:slug`) mounted by the app shell outside every workspace guard. */}\n <Route path=\"traceability\" element={<BatchTrackingPage />} />\n <Route path=\"traceability/supply-chain\" element={<SupplyChainPage />} />\n <Route path=\"traceability/qr-codes\" element={<QRCodesPage />} />\n <Route path=\"traceability/ledger\" element={<TraceLedgerPage />} />\n <Route path=\"traceability/portal-settings\" element={<TracePortalSettingsPage />} />\n <Route path=\"traceability/tracking\" element={<TraceTrackingPage />} />\n\n {/* Compliance */}\n <Route path=\"compliance\" element={<ComplianceOverviewPage />} />\n <Route path=\"compliance/certifications\" element={<OrganicCertificationPage />} />\n <Route path=\"compliance/certifications/:certificationId\" element={<CertificationStandardDetailPage />} />\n {/* More specific ICS routes first: 'growers/new' must not be captured by ':groupId'. */}\n <Route path=\"compliance/ics\" element={<IcsGroupsPage />} />\n <Route path=\"compliance/ics/growers/new\" element={<IcsGrowerWizardPage />} />\n <Route path=\"compliance/ics/growers/:growerId\" element={<IcsGrowerDetailPage />} />\n <Route path=\"compliance/ics/:groupId\" element={<IcsGroupDetailPage />} />\n <Route path=\"compliance/alerts\" element={<ComplianceAlertsPage />} />\n <Route path=\"compliance/inspections\" element={<InspectionCalendarPage />} />\n <Route path=\"compliance/origin\" element={<CertificatesOfOriginPage />} />\n <Route path=\"compliance/audits\" element={<ComplianceAuditsPage />} />\n <Route path=\"compliance/documents\" element={<ComplianceDocumentsPage />} />\n\n {/* Sustainability — Carbon & Climate (BOFF-2896). More specific 'credits/generate'\n before any deeper credit routes so the wizard is not shadowed. */}\n <Route path=\"sustainability\" element={<SustainabilityOverviewPage />} />\n <Route path=\"sustainability/carbon\" element={<CarbonGhgPage />} />\n <Route path=\"sustainability/soil-carbon\" element={<SoilCarbonPage />} />\n <Route path=\"sustainability/credits/generate\" element={<GenerateCreditWizardPage />} />\n <Route path=\"sustainability/credits\" element={<CarbonCreditLedgerPage />} />\n <Route path=\"sustainability/eudr\" element={<EudrDueDiligencePage />} />\n\n {/* Government Schemes */}\n <Route path=\"government-schemes\" element={<SchemesOverviewPage />} />\n <Route path=\"government-schemes/discover\" element={<SchemeDiscoveryPage />} />\n <Route path=\"government-schemes/schemes/:schemeId\" element={<SchemeDetailsPage />} />\n <Route path=\"government-schemes/applications\" element={<ApplicationTrackingPage />} />\n <Route path=\"government-schemes/training\" element={<TrainingProgramsPage />} />\n <Route path=\"government-schemes/dashboard\" element={<GovernmentDashboardPage />} />\n <Route path=\"government-schemes/communication\" element={<CommunicationPage />} />\n <Route path=\"government-schemes/accessibility\" element={<AccessibilitySettingsPage />} />\n <Route path=\"government-schemes/admin\" element={<SchemeAdminPage />} />\n\n {/* Network (UC-12) — community posts persist; expert/mentor/event actions honest placeholders */}\n <Route path=\"network\" element={<NetworkOverviewPage />} />\n <Route path=\"network/community\" element={<CommunityPage />} />\n <Route path=\"network/experts\" element={<ExpertsPage />} />\n <Route path=\"network/mentors\" element={<MentorsPage />} />\n <Route path=\"network/events\" element={<EventsPage />} />\n {/* Farmer Cohorts — reuse of wspace-groups-svc (frontend-direct via gateway) */}\n <Route path=\"network/cohorts\" element={<CohortsPage />} />\n\n {/* Catch-all: show 404 page */}\n <Route path=\"*\" element={<NotFoundPage />} />\n </Routes>\n </Suspense>\n );\n}\n"],"mappings":";;;;;;;;;;AAeA,IAAM,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CACtF,EACK,IAAkB,QACtB,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACrF,EAGK,IAAY,QAAW,OAAO,8BAA2B,MAAM,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,EACjG,IAAkB,QACtB,OAAO,oCAAiC,MAAM,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CACtF,EACK,IAAiB,QAAW,OAAO,mCAAgC,MAAM,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,EAChH,IAAmB,QACvB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CACxF,EACK,IAAmB,QACvB,OAAO,qCAAkC,MAAM,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,CACxF,EACK,IAAsB,QAC1B,OAAO,wCAAqC,MAAM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,SAAS,kBAAC,IAAD,EAAwB,CAAA;IAAI,CAAA;GAC/E,kBAAC,GAAD;IAAO,MAAK;IAA+B,SAAS,kBAAC,IAAD,EAA2B,CAAA;IAAI,CAAA;GACnF,kBAAC,GAAD;IAAO,MAAK;IAAmC,SAAS,kBAAC,IAAD,EAAqB,CAAA;IAAI,CAAA;GACjF,kBAAC,GAAD;IAAO,MAAK;IAAmC,SAAS,kBAAC,IAAD,EAA6B,CAAA;IAAI,CAAA;GACzF,kBAAC,GAAD;IAAO,MAAK;IAA2B,SAAS,kBAAC,IAAD,EAAmB,CAAA;IAAI,CAAA;GAGvE,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,IAAD,EAAuB,CAAA;IAAI,CAAA;GAC1D,kBAAC,GAAD;IAAO,MAAK;IAAoB,SAAS,kBAAC,IAAD,EAAiB,CAAA;IAAI,CAAA;GAC9D,kBAAC,GAAD;IAAO,MAAK;IAAkB,SAAS,kBAAC,IAAD,EAAe,CAAA;IAAI,CAAA;GAC1D,kBAAC,GAAD;IAAO,MAAK;IAAkB,SAAS,kBAAC,IAAD,EAAe,CAAA;IAAI,CAAA;GAC1D,kBAAC,GAAD;IAAO,MAAK;IAAiB,SAAS,kBAAC,IAAD,EAAc,CAAA;IAAI,CAAA;GAExD,kBAAC,GAAD;IAAO,MAAK;IAAkB,SAAS,kBAAC,IAAD,EAAe,CAAA;IAAI,CAAA;GAG1D,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,IAAD,EAAgB,CAAA;IAAI,CAAA;GACtC,EAAA,CAAA;EACA,CAAA"}
@@ -301,7 +301,7 @@ var M = "all", N = () => {
301
301
  }),
302
302
  /* @__PURE__ */ A("div", {
303
303
  className: "flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-3 text-xs text-text-secondary",
304
- children: [/* @__PURE__ */ k(w, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ k("p", { children: N("healthybowl.agriInputs.footerNote", "Products are served from the platform store catalog. Checkout and payment run through the platform billing rail — HealthyBowl keeps no separate product, order or payment records.") })]
304
+ children: [/* @__PURE__ */ k(w, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ k("p", { children: N("healthybowl.agriInputs.footerNote", "Products are served from the platform store catalog. HealthyBowl adds no product, order or payment tables for the store; your order is recorded on your HealthyBowl account and paid on the platform billing rail.") })]
305
305
  }),
306
306
  /* @__PURE__ */ k(o, {
307
307
  toasts: I,
@@ -1 +1 @@
1
- {"version":3,"file":"AgriInputsStorePage.js","names":[],"sources":["../../../../src/healthybowl/pages/agri-inputs/AgriInputsStorePage.tsx"],"sourcesContent":["/**\n * Agri-Inputs Store (roadmap #26 / BOFF-2898) — the BUY side of commerce.\n *\n * A farmer buys the supplies needed to run the farm — seeds, organic fertilizer, bio-pesticides,\n * hand tools and irrigation kits — without leaving HealthyBowl. This composes the platform\n * commerce stack: the catalog is the platform `global-store-svc` (read via the PUBLIC `browseStore`\n * query in {@link useAgriInputs}), and checkout reuses the EXISTING marketplace cart + order +\n * global-billing flow (the shared Zustand cart and the `/marketplace/cart` checkout). HealthyBowl\n * owns only this storefront and the delivery-address wiring — no product/order/payment tables here.\n *\n * Agri-inputs are physical products whose `category` is one of the five fixed `agri-` slugs; the\n * `agri-` prefix keeps them out of the sell-side produce Marketplace.\n *\n * @module healthybowl\n */\nimport { useMemo, useState, type FC } from 'react';\nimport { useNavigate } from 'react-router';\nimport { ShoppingCart, Leaf, Plus, Minus, Trash2, X, Package, MapPin, Sprout, ShieldCheck, Store } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { PageLayout, StatCard, EmptyState, ErrorState, PageLoader } from '../../components';\nimport { ToastContainer } from '../../components/Toast';\nimport { useToast } from '../../hooks/useToast';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { useHealthyBowlStore } from '../../store/healthybowlStore';\nimport { formatCurrency, HB_DEFAULT_CURRENCY, resolveLineCurrency, cn } from '../../utils/helpers';\nimport {\n useAgriInputs,\n useAgriCategoryCounts,\n AGRI_INPUT_CATEGORIES,\n AGRI_CATEGORY_LABELS,\n type AgriInputItem,\n} from '../../hooks/useAgriInputs';\n\nconst ALL = 'all';\n\nexport const AgriInputsStorePage: FC = () => {\n const { t } = useI18n();\n const navigate = useNavigate();\n const { buildPath } = useBasePath();\n const { toasts, toast, dismiss } = useToast();\n\n const { products, loading, error, refetch } = useAgriInputs();\n const counts = useAgriCategoryCounts(products);\n const { farm } = useHealthyBowlData();\n const { cart, addToCart, updateCartQuantity, removeFromCart, clearCart, getCartItemCount } = useHealthyBowlStore();\n\n const [activeCategory, setActiveCategory] = useState<string>(ALL);\n const [cartOpen, setCartOpen] = useState(false);\n // Delivery defaults to the farm's location (HealthyBowl owns the delivery-address wiring).\n const defaultAddress = [farm.name, farm.location].filter(Boolean).join(', ');\n const [address, setAddress] = useState('');\n\n const visible = useMemo(\n () => (activeCategory === ALL ? products : products.filter((p) => p.category === activeCategory)),\n [products, activeCategory]\n );\n\n const cartCount = getCartItemCount();\n const subtotal = cart.reduce((sum, item) => sum + item.price * item.quantity, 0);\n const cartCurrency = resolveLineCurrency(cart);\n const organicCount = useMemo(() => products.filter((p) => p.organicCertified).length, [products]);\n\n const handleAdd = (p: AgriInputItem) => {\n addToCart({\n productId: p.id,\n name: p.name,\n price: p.price,\n unit: 'unit',\n seller: p.brand ?? t('healthybowl.agriInputs.seller', 'Agri-Inputs Store'),\n // Store products carry a real currency — keep it on the line so the cart\n // and the subtotal label the price the way the store priced it.\n currency: p.currency,\n });\n toast({\n title: t('healthybowl.agriInputs.toast.added.title', 'Added to cart'),\n description: t('healthybowl.agriInputs.toast.added.description', '{{name}} added to your cart.', {\n name: p.name,\n }),\n variant: 'success',\n });\n setCartOpen(true);\n };\n\n const handleCheckout = () => {\n // Reuse the EXISTING marketplace cart → order → global-billing checkout flow.\n navigate(buildPath('marketplace/cart'));\n };\n\n const tabs: { key: string; label: string; count: number }[] = [\n { key: ALL, label: t('healthybowl.agriInputs.tab.all', 'All'), count: products.length },\n ...AGRI_INPUT_CATEGORIES.map((slug) => ({\n key: slug,\n label: t(`healthybowl.agriInputs.tab.${slug}`, AGRI_CATEGORY_LABELS[slug]),\n count: counts[slug] ?? 0,\n })),\n ];\n\n const cartButton = (\n <Button variant=\"outline\" size=\"sm\" onClick={() => setCartOpen(true)} className=\"relative\">\n <ShoppingCart className=\"h-4 w-4\" />\n {t('healthybowl.agriInputs.cart.open', 'Cart')}\n {cartCount > 0 && (\n <span className=\"ms-1 inline-flex h-5 min-w-[1.25rem] items-center justify-center rounded-full bg-action-primary-bg px-1.5 text-[11px] font-semibold text-action-primary-text\">\n {cartCount}\n </span>\n )}\n </Button>\n );\n\n return (\n <PageLayout\n title={t('healthybowl.agriInputs.title', 'Agri-Inputs Store')}\n description={t(\n 'healthybowl.agriInputs.description',\n 'Buy seeds, organic fertilizer, bio-pesticides, tools and irrigation — delivered to your farm.'\n )}\n purpose=\"Order the supplies you need to run the farm — this is the buy side of commerce, powered by the platform store and billing. Add items to your cart, set a delivery address, and check out.\"\n actions={cartButton}\n >\n {/* Stats */}\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n <StatCard\n hero\n label={t('healthybowl.agriInputs.stats.products', 'Products')}\n value={products.length}\n icon={<Package className=\"h-5 w-5\" />}\n />\n <StatCard\n label={t('healthybowl.agriInputs.stats.categories', 'Categories')}\n value={AGRI_INPUT_CATEGORIES.length}\n icon={<Sprout className=\"h-5 w-5\" />}\n />\n <StatCard\n label={t('healthybowl.agriInputs.stats.organic', 'Organic Certified')}\n value={organicCount}\n icon={<Leaf className=\"h-5 w-5\" />}\n />\n <StatCard\n label={t('healthybowl.agriInputs.stats.inCart', 'In Cart')}\n value={cartCount}\n icon={<ShoppingCart className=\"h-5 w-5\" />}\n />\n </div>\n\n {/* Sub-category filter tabs */}\n <div className=\"flex flex-wrap gap-1.5\">\n {tabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n onClick={() => setActiveCategory(tab.key)}\n className={cn(\n 'rounded-full px-3 py-1 text-xs font-medium transition-colors',\n activeCategory === tab.key\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'border border-border-subtle text-text-secondary hover:bg-bg-sunken/50 hover:text-text-primary'\n )}\n >\n {tab.label}\n {tab.count > 0 ? ` (${tab.count})` : ''}\n </button>\n ))}\n </div>\n\n {/* Product grid */}\n {loading && products.length === 0 ? (\n <PageLoader />\n ) : error && products.length === 0 ? (\n <ErrorState onRetry={() => refetch()} />\n ) : visible.length === 0 ? (\n <EmptyState\n illustration=\"empty-files\"\n title={t('healthybowl.agriInputs.empty.title', 'No agri-inputs to show')}\n description={t(\n 'healthybowl.agriInputs.empty.description',\n 'No products in this category yet. Check back soon — suppliers list new inputs from the Seller Portal.'\n )}\n />\n ) : (\n <div className=\"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4\">\n {visible.map((p) => (\n <div\n key={p.id}\n className=\"flex flex-col overflow-hidden rounded-lg border border-border-subtle bg-bg-surface shadow-sm transition-shadow hover:shadow-md\"\n >\n {/* Image */}\n <div className=\"relative flex h-36 items-center justify-center bg-bg-sunken\">\n {p.icon ? (\n <img\n src={p.icon}\n alt={p.name}\n loading=\"lazy\"\n className=\"h-full w-full object-cover\"\n onError={(e) => {\n // Fall back to the placeholder icon if the image can't load.\n e.currentTarget.style.display = 'none';\n }}\n />\n ) : (\n <Sprout className=\"h-8 w-8 text-text-muted\" />\n )}\n {p.organicCertified && (\n <span className=\"absolute start-2 top-2 flex items-center gap-0.5 rounded-full bg-success-subtle px-2 py-0.5 text-[10px] font-medium text-success\">\n <Leaf className=\"h-2.5 w-2.5\" />\n {t('healthybowl.agriInputs.badge.organic', 'Organic Certified')}\n </span>\n )}\n </div>\n\n {/* Body */}\n <div className=\"flex flex-1 flex-col gap-1.5 p-3\">\n <p className=\"line-clamp-2 text-sm font-semibold text-text-primary\">{p.name}</p>\n {p.brand && <p className=\"text-xs text-text-secondary\">{p.brand}</p>}\n {p.description && <p className=\"line-clamp-2 text-xs text-text-secondary\">{p.description}</p>}\n <div className=\"mt-auto flex items-center justify-between pt-2\">\n <span className=\"text-base font-bold text-text-primary\">{formatCurrency(p.price, p.currency)}</span>\n <span className=\"text-[10px] text-text-secondary\">\n {p.stockQuantity && p.stockQuantity > 0\n ? t('healthybowl.agriInputs.inStock', 'In stock')\n : t('healthybowl.agriInputs.outOfStock', 'Out of stock')}\n </span>\n </div>\n <Button\n size=\"sm\"\n className=\"mt-2 w-full\"\n onClick={() => handleAdd(p)}\n disabled={!(p.stockQuantity && p.stockQuantity > 0)}\n >\n <ShoppingCart className=\"h-3.5 w-3.5\" />\n {t('healthybowl.agriInputs.card.addToCart', 'Add to Cart')}\n </Button>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Cart drawer */}\n {cartOpen && (\n <div className=\"fixed inset-0 z-50 flex justify-end\" role=\"dialog\" aria-modal=\"true\">\n {/* Scrim */}\n <button\n type=\"button\"\n aria-label={t('healthybowl.agriInputs.cart.close', 'Close cart')}\n className=\"absolute inset-0 bg-black/40\"\n onClick={() => setCartOpen(false)}\n />\n {/* Panel */}\n <div className=\"relative flex h-full w-full max-w-md flex-col bg-bg-surface shadow-xl\">\n <div className=\"flex items-center justify-between border-b border-border-subtle p-4\">\n <h2 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <ShoppingCart className=\"h-4 w-4\" />\n {t('healthybowl.agriInputs.cart.title', 'Your Cart')}\n {cartCount > 0 ? ` (${cartCount})` : ''}\n </h2>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n onClick={() => setCartOpen(false)}\n aria-label={t('healthybowl.agriInputs.cart.close', 'Close cart')}\n >\n <X className=\"h-4 w-4\" />\n </Button>\n </div>\n\n {cart.length === 0 ? (\n <div className=\"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center\">\n <ShoppingCart className=\"h-10 w-10 text-text-muted\" />\n <p className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.agriInputs.cart.empty.title', 'Your cart is empty')}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.agriInputs.cart.empty.description', 'Add agri-inputs to get started.')}\n </p>\n </div>\n ) : (\n <>\n {/* Items */}\n <div className=\"flex-1 space-y-3 overflow-y-auto p-4\">\n {cart.map((item) => (\n <div\n key={item.id}\n className=\"flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3\"\n >\n <div className=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken\">\n <Package className=\"h-4 w-4 text-text-secondary\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium text-text-primary\">{item.name}</p>\n <p className=\"text-xs text-text-secondary\">\n {formatCurrency(item.price, item.currency ?? HB_DEFAULT_CURRENCY)}\n </p>\n </div>\n <div className=\"flex items-center gap-1\">\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('healthybowl.agriInputs.cart.decrease', 'Decrease quantity')}\n onClick={() => updateCartQuantity(item.productId, item.quantity - 1)}\n >\n <Minus className=\"h-3 w-3\" />\n </Button>\n <span className=\"min-w-[1.75rem] text-center text-sm font-semibold text-text-primary\">\n {item.quantity}\n </span>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('healthybowl.agriInputs.cart.increase', 'Increase quantity')}\n onClick={() => updateCartQuantity(item.productId, item.quantity + 1)}\n >\n <Plus className=\"h-3 w-3\" />\n </Button>\n </div>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={t('healthybowl.agriInputs.cart.remove', 'Remove item')}\n onClick={() => removeFromCart(item.productId)}\n className=\"text-status-error-text hover:text-status-error-text\"\n >\n <Trash2 className=\"h-4 w-4\" />\n </Button>\n </div>\n ))}\n </div>\n\n {/* Footer: address + subtotal + checkout */}\n <div className=\"space-y-3 border-t border-border-subtle p-4\">\n <div>\n <label\n htmlFor=\"agri-delivery-address\"\n className=\"mb-1 flex items-center gap-1.5 text-xs font-medium text-text-secondary\"\n >\n <MapPin className=\"h-3.5 w-3.5\" />\n {t('healthybowl.agriInputs.cart.deliverTo', 'Deliver to')}\n </label>\n <textarea\n id=\"agri-delivery-address\"\n rows={2}\n value={address || defaultAddress}\n onChange={(e) => setAddress(e.target.value)}\n placeholder={t(\n 'healthybowl.agriInputs.cart.addressPlaceholder',\n 'Delivery address (defaults to your farm location)'\n )}\n className=\"w-full resize-none rounded-md border border-border-subtle bg-bg-surface p-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n <p className=\"mt-1 text-[10px] text-text-secondary\">\n {t('healthybowl.agriInputs.cart.addressHint', 'Defaults to your farm location — edit if needed.')}\n </p>\n </div>\n\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">{t('healthybowl.agriInputs.cart.subtotal', 'Subtotal')}</span>\n <span className=\"text-base font-bold text-text-primary\">\n {formatCurrency(subtotal, cartCurrency)}\n </span>\n </div>\n\n <Button className=\"w-full\" onClick={handleCheckout} disabled={cart.length === 0}>\n {t('healthybowl.agriInputs.cart.checkout', 'Proceed to Checkout')}\n </Button>\n\n <button\n type=\"button\"\n onClick={clearCart}\n className=\"w-full text-center text-xs text-text-secondary hover:text-status-error-text\"\n >\n {t('healthybowl.agriInputs.cart.clear', 'Clear cart')}\n </button>\n\n {/* Powered-by caption (mockup §6) */}\n <p className=\"flex items-center justify-center gap-1.5 text-[11px] text-text-secondary\">\n <ShieldCheck className=\"h-3.5 w-3.5\" />\n {t('healthybowl.agriInputs.cart.poweredBy', 'Powered by Global Store + Billing')}\n </p>\n </div>\n </>\n )}\n </div>\n </div>\n )}\n\n {/* Footer note */}\n <div className=\"flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-3 text-xs text-text-secondary\">\n <Store className=\"mt-0.5 h-4 w-4 shrink-0 text-text-secondary\" />\n <p>\n {t(\n 'healthybowl.agriInputs.footerNote',\n 'Products are served from the platform store catalog. Checkout and payment run through the platform billing rail — HealthyBowl keeps no separate product, order or payment records.'\n )}\n </p>\n </div>\n\n <ToastContainer toasts={toasts} onDismiss={dismiss} />\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAmCA,IAAM,IAAM,OAEC,UAAgC;CAC3C,IAAM,EAAE,SAAM,GAAS,EACjB,IAAW,GAAa,EACxB,EAAE,iBAAc,GAAa,EAC7B,EAAE,WAAQ,UAAO,eAAY,GAAU,EAEvC,EAAE,aAAU,aAAS,UAAO,eAAY,GAAe,EACvD,IAAS,EAAsB,EAAS,EACxC,EAAE,YAAS,GAAoB,EAC/B,EAAE,SAAM,cAAW,uBAAoB,mBAAgB,cAAW,wBAAqB,GAAqB,EAE5G,CAAC,GAAgB,MAAqB,EAAiB,EAAI,EAC3D,CAAC,IAAU,KAAe,EAAS,GAAM,EAEzC,KAAiB,CAAC,EAAK,MAAM,EAAK,SAAS,CAAC,OAAO,QAAQ,CAAC,KAAK,KAAK,EACtE,CAAC,IAAS,MAAc,EAAS,GAAG,EAEpC,IAAU,QACP,MAAmB,IAAM,IAAW,EAAS,QAAQ,MAAM,EAAE,aAAa,EAAe,EAChG,CAAC,GAAU,EAAe,CAC3B,EAEK,IAAY,GAAkB,EAC9B,KAAW,EAAK,QAAQ,GAAK,MAAS,IAAM,EAAK,QAAQ,EAAK,UAAU,EAAE,EAC1E,KAAe,EAAoB,EAAK,EACxC,KAAe,QAAc,EAAS,QAAQ,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,EAAS,CAAC,EAE3F,MAAa,MAAqB;AAkBtC,EAjBA,EAAU;GACR,WAAW,EAAE;GACb,MAAM,EAAE;GACR,OAAO,EAAE;GACT,MAAM;GACN,QAAQ,EAAE,SAA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CAAA;GAC3C"}
1
+ {"version":3,"file":"AgriInputsStorePage.js","names":[],"sources":["../../../../src/healthybowl/pages/agri-inputs/AgriInputsStorePage.tsx"],"sourcesContent":["/**\n * Agri-Inputs Store (roadmap #26 / BOFF-2898) — the BUY side of commerce.\n *\n * A farmer buys the supplies needed to run the farm — seeds, organic fertilizer, bio-pesticides,\n * hand tools and irrigation kits — without leaving HealthyBowl. This composes the platform\n * commerce stack: the catalog is the platform `global-store-svc` (read via the PUBLIC `browseStore`\n * query in {@link useAgriInputs}), and checkout reuses the EXISTING marketplace cart + order +\n * global-billing flow (the shared Zustand cart and the `/marketplace/cart` checkout). This\n * increment adds no HealthyBowl tables, but the order it places IS an HB `Order` row, carrying\n * `paymentStatus`/`billingOrderId`/`paidAt`.\n *\n * Agri-inputs are physical products whose `category` is one of the five fixed `agri-` slugs; the\n * `agri-` prefix keeps them out of the sell-side produce Marketplace.\n *\n * @module healthybowl\n */\nimport { useMemo, useState, type FC } from 'react';\nimport { useNavigate } from 'react-router';\nimport { ShoppingCart, Leaf, Plus, Minus, Trash2, X, Package, MapPin, Sprout, ShieldCheck, Store } from 'lucide-react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { PageLayout, StatCard, EmptyState, ErrorState, PageLoader } from '../../components';\nimport { ToastContainer } from '../../components/Toast';\nimport { useToast } from '../../hooks/useToast';\nimport { useBasePath } from '../../hooks/useBasePath';\nimport { useHealthyBowlData } from '../../hooks/useHealthyBowlData';\nimport { useHealthyBowlStore } from '../../store/healthybowlStore';\nimport { formatCurrency, HB_DEFAULT_CURRENCY, resolveLineCurrency, cn } from '../../utils/helpers';\nimport {\n useAgriInputs,\n useAgriCategoryCounts,\n AGRI_INPUT_CATEGORIES,\n AGRI_CATEGORY_LABELS,\n type AgriInputItem,\n} from '../../hooks/useAgriInputs';\n\nconst ALL = 'all';\n\nexport const AgriInputsStorePage: FC = () => {\n const { t } = useI18n();\n const navigate = useNavigate();\n const { buildPath } = useBasePath();\n const { toasts, toast, dismiss } = useToast();\n\n const { products, loading, error, refetch } = useAgriInputs();\n const counts = useAgriCategoryCounts(products);\n const { farm } = useHealthyBowlData();\n const { cart, addToCart, updateCartQuantity, removeFromCart, clearCart, getCartItemCount } = useHealthyBowlStore();\n\n const [activeCategory, setActiveCategory] = useState<string>(ALL);\n const [cartOpen, setCartOpen] = useState(false);\n // Delivery defaults to the farm's location (HealthyBowl owns the delivery-address wiring).\n const defaultAddress = [farm.name, farm.location].filter(Boolean).join(', ');\n const [address, setAddress] = useState('');\n\n const visible = useMemo(\n () => (activeCategory === ALL ? products : products.filter((p) => p.category === activeCategory)),\n [products, activeCategory]\n );\n\n const cartCount = getCartItemCount();\n const subtotal = cart.reduce((sum, item) => sum + item.price * item.quantity, 0);\n const cartCurrency = resolveLineCurrency(cart);\n const organicCount = useMemo(() => products.filter((p) => p.organicCertified).length, [products]);\n\n const handleAdd = (p: AgriInputItem) => {\n addToCart({\n productId: p.id,\n name: p.name,\n price: p.price,\n unit: 'unit',\n seller: p.brand ?? t('healthybowl.agriInputs.seller', 'Agri-Inputs Store'),\n // Store products carry a real currency — keep it on the line so the cart\n // and the subtotal label the price the way the store priced it.\n currency: p.currency,\n });\n toast({\n title: t('healthybowl.agriInputs.toast.added.title', 'Added to cart'),\n description: t('healthybowl.agriInputs.toast.added.description', '{{name}} added to your cart.', {\n name: p.name,\n }),\n variant: 'success',\n });\n setCartOpen(true);\n };\n\n const handleCheckout = () => {\n // Reuse the EXISTING marketplace cart → order → global-billing checkout flow.\n navigate(buildPath('marketplace/cart'));\n };\n\n const tabs: { key: string; label: string; count: number }[] = [\n { key: ALL, label: t('healthybowl.agriInputs.tab.all', 'All'), count: products.length },\n ...AGRI_INPUT_CATEGORIES.map((slug) => ({\n key: slug,\n label: t(`healthybowl.agriInputs.tab.${slug}`, AGRI_CATEGORY_LABELS[slug]),\n count: counts[slug] ?? 0,\n })),\n ];\n\n const cartButton = (\n <Button variant=\"outline\" size=\"sm\" onClick={() => setCartOpen(true)} className=\"relative\">\n <ShoppingCart className=\"h-4 w-4\" />\n {t('healthybowl.agriInputs.cart.open', 'Cart')}\n {cartCount > 0 && (\n <span className=\"ms-1 inline-flex h-5 min-w-[1.25rem] items-center justify-center rounded-full bg-action-primary-bg px-1.5 text-[11px] font-semibold text-action-primary-text\">\n {cartCount}\n </span>\n )}\n </Button>\n );\n\n return (\n <PageLayout\n title={t('healthybowl.agriInputs.title', 'Agri-Inputs Store')}\n description={t(\n 'healthybowl.agriInputs.description',\n 'Buy seeds, organic fertilizer, bio-pesticides, tools and irrigation — delivered to your farm.'\n )}\n purpose=\"Order the supplies you need to run the farm — this is the buy side of commerce, powered by the platform store and billing. Add items to your cart, set a delivery address, and check out.\"\n actions={cartButton}\n >\n {/* Stats */}\n <div className=\"grid grid-cols-2 gap-4 lg:grid-cols-4\">\n <StatCard\n hero\n label={t('healthybowl.agriInputs.stats.products', 'Products')}\n value={products.length}\n icon={<Package className=\"h-5 w-5\" />}\n />\n <StatCard\n label={t('healthybowl.agriInputs.stats.categories', 'Categories')}\n value={AGRI_INPUT_CATEGORIES.length}\n icon={<Sprout className=\"h-5 w-5\" />}\n />\n <StatCard\n label={t('healthybowl.agriInputs.stats.organic', 'Organic Certified')}\n value={organicCount}\n icon={<Leaf className=\"h-5 w-5\" />}\n />\n <StatCard\n label={t('healthybowl.agriInputs.stats.inCart', 'In Cart')}\n value={cartCount}\n icon={<ShoppingCart className=\"h-5 w-5\" />}\n />\n </div>\n\n {/* Sub-category filter tabs */}\n <div className=\"flex flex-wrap gap-1.5\">\n {tabs.map((tab) => (\n <button\n key={tab.key}\n type=\"button\"\n onClick={() => setActiveCategory(tab.key)}\n className={cn(\n 'rounded-full px-3 py-1 text-xs font-medium transition-colors',\n activeCategory === tab.key\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'border border-border-subtle text-text-secondary hover:bg-bg-sunken/50 hover:text-text-primary'\n )}\n >\n {tab.label}\n {tab.count > 0 ? ` (${tab.count})` : ''}\n </button>\n ))}\n </div>\n\n {/* Product grid */}\n {loading && products.length === 0 ? (\n <PageLoader />\n ) : error && products.length === 0 ? (\n <ErrorState onRetry={() => refetch()} />\n ) : visible.length === 0 ? (\n <EmptyState\n illustration=\"empty-files\"\n title={t('healthybowl.agriInputs.empty.title', 'No agri-inputs to show')}\n description={t(\n 'healthybowl.agriInputs.empty.description',\n 'No products in this category yet. Check back soon — suppliers list new inputs from the Seller Portal.'\n )}\n />\n ) : (\n <div className=\"grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4\">\n {visible.map((p) => (\n <div\n key={p.id}\n className=\"flex flex-col overflow-hidden rounded-lg border border-border-subtle bg-bg-surface shadow-sm transition-shadow hover:shadow-md\"\n >\n {/* Image */}\n <div className=\"relative flex h-36 items-center justify-center bg-bg-sunken\">\n {p.icon ? (\n <img\n src={p.icon}\n alt={p.name}\n loading=\"lazy\"\n className=\"h-full w-full object-cover\"\n onError={(e) => {\n // Fall back to the placeholder icon if the image can't load.\n e.currentTarget.style.display = 'none';\n }}\n />\n ) : (\n <Sprout className=\"h-8 w-8 text-text-muted\" />\n )}\n {p.organicCertified && (\n <span className=\"absolute start-2 top-2 flex items-center gap-0.5 rounded-full bg-success-subtle px-2 py-0.5 text-[10px] font-medium text-success\">\n <Leaf className=\"h-2.5 w-2.5\" />\n {t('healthybowl.agriInputs.badge.organic', 'Organic Certified')}\n </span>\n )}\n </div>\n\n {/* Body */}\n <div className=\"flex flex-1 flex-col gap-1.5 p-3\">\n <p className=\"line-clamp-2 text-sm font-semibold text-text-primary\">{p.name}</p>\n {p.brand && <p className=\"text-xs text-text-secondary\">{p.brand}</p>}\n {p.description && <p className=\"line-clamp-2 text-xs text-text-secondary\">{p.description}</p>}\n <div className=\"mt-auto flex items-center justify-between pt-2\">\n <span className=\"text-base font-bold text-text-primary\">{formatCurrency(p.price, p.currency)}</span>\n <span className=\"text-[10px] text-text-secondary\">\n {p.stockQuantity && p.stockQuantity > 0\n ? t('healthybowl.agriInputs.inStock', 'In stock')\n : t('healthybowl.agriInputs.outOfStock', 'Out of stock')}\n </span>\n </div>\n <Button\n size=\"sm\"\n className=\"mt-2 w-full\"\n onClick={() => handleAdd(p)}\n disabled={!(p.stockQuantity && p.stockQuantity > 0)}\n >\n <ShoppingCart className=\"h-3.5 w-3.5\" />\n {t('healthybowl.agriInputs.card.addToCart', 'Add to Cart')}\n </Button>\n </div>\n </div>\n ))}\n </div>\n )}\n\n {/* Cart drawer */}\n {cartOpen && (\n <div className=\"fixed inset-0 z-50 flex justify-end\" role=\"dialog\" aria-modal=\"true\">\n {/* Scrim */}\n <button\n type=\"button\"\n aria-label={t('healthybowl.agriInputs.cart.close', 'Close cart')}\n className=\"absolute inset-0 bg-black/40\"\n onClick={() => setCartOpen(false)}\n />\n {/* Panel */}\n <div className=\"relative flex h-full w-full max-w-md flex-col bg-bg-surface shadow-xl\">\n <div className=\"flex items-center justify-between border-b border-border-subtle p-4\">\n <h2 className=\"flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <ShoppingCart className=\"h-4 w-4\" />\n {t('healthybowl.agriInputs.cart.title', 'Your Cart')}\n {cartCount > 0 ? ` (${cartCount})` : ''}\n </h2>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n onClick={() => setCartOpen(false)}\n aria-label={t('healthybowl.agriInputs.cart.close', 'Close cart')}\n >\n <X className=\"h-4 w-4\" />\n </Button>\n </div>\n\n {cart.length === 0 ? (\n <div className=\"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center\">\n <ShoppingCart className=\"h-10 w-10 text-text-muted\" />\n <p className=\"text-sm font-medium text-text-primary\">\n {t('healthybowl.agriInputs.cart.empty.title', 'Your cart is empty')}\n </p>\n <p className=\"text-xs text-text-secondary\">\n {t('healthybowl.agriInputs.cart.empty.description', 'Add agri-inputs to get started.')}\n </p>\n </div>\n ) : (\n <>\n {/* Items */}\n <div className=\"flex-1 space-y-3 overflow-y-auto p-4\">\n {cart.map((item) => (\n <div\n key={item.id}\n className=\"flex items-center gap-3 rounded-lg border border-border-subtle bg-bg-sunken/30 p-3\"\n >\n <div className=\"flex h-9 w-9 shrink-0 items-center justify-center rounded-md bg-bg-sunken\">\n <Package className=\"h-4 w-4 text-text-secondary\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"truncate text-sm font-medium text-text-primary\">{item.name}</p>\n <p className=\"text-xs text-text-secondary\">\n {formatCurrency(item.price, item.currency ?? HB_DEFAULT_CURRENCY)}\n </p>\n </div>\n <div className=\"flex items-center gap-1\">\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('healthybowl.agriInputs.cart.decrease', 'Decrease quantity')}\n onClick={() => updateCartQuantity(item.productId, item.quantity - 1)}\n >\n <Minus className=\"h-3 w-3\" />\n </Button>\n <span className=\"min-w-[1.75rem] text-center text-sm font-semibold text-text-primary\">\n {item.quantity}\n </span>\n <Button\n variant=\"outline\"\n size=\"icon-sm\"\n aria-label={t('healthybowl.agriInputs.cart.increase', 'Increase quantity')}\n onClick={() => updateCartQuantity(item.productId, item.quantity + 1)}\n >\n <Plus className=\"h-3 w-3\" />\n </Button>\n </div>\n <Button\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={t('healthybowl.agriInputs.cart.remove', 'Remove item')}\n onClick={() => removeFromCart(item.productId)}\n className=\"text-status-error-text hover:text-status-error-text\"\n >\n <Trash2 className=\"h-4 w-4\" />\n </Button>\n </div>\n ))}\n </div>\n\n {/* Footer: address + subtotal + checkout */}\n <div className=\"space-y-3 border-t border-border-subtle p-4\">\n <div>\n <label\n htmlFor=\"agri-delivery-address\"\n className=\"mb-1 flex items-center gap-1.5 text-xs font-medium text-text-secondary\"\n >\n <MapPin className=\"h-3.5 w-3.5\" />\n {t('healthybowl.agriInputs.cart.deliverTo', 'Deliver to')}\n </label>\n <textarea\n id=\"agri-delivery-address\"\n rows={2}\n value={address || defaultAddress}\n onChange={(e) => setAddress(e.target.value)}\n placeholder={t(\n 'healthybowl.agriInputs.cart.addressPlaceholder',\n 'Delivery address (defaults to your farm location)'\n )}\n className=\"w-full resize-none rounded-md border border-border-subtle bg-bg-surface p-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n />\n <p className=\"mt-1 text-[10px] text-text-secondary\">\n {t('healthybowl.agriInputs.cart.addressHint', 'Defaults to your farm location — edit if needed.')}\n </p>\n </div>\n\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">{t('healthybowl.agriInputs.cart.subtotal', 'Subtotal')}</span>\n <span className=\"text-base font-bold text-text-primary\">\n {formatCurrency(subtotal, cartCurrency)}\n </span>\n </div>\n\n <Button className=\"w-full\" onClick={handleCheckout} disabled={cart.length === 0}>\n {t('healthybowl.agriInputs.cart.checkout', 'Proceed to Checkout')}\n </Button>\n\n <button\n type=\"button\"\n onClick={clearCart}\n className=\"w-full text-center text-xs text-text-secondary hover:text-status-error-text\"\n >\n {t('healthybowl.agriInputs.cart.clear', 'Clear cart')}\n </button>\n\n {/* Powered-by caption (mockup §6) */}\n <p className=\"flex items-center justify-center gap-1.5 text-[11px] text-text-secondary\">\n <ShieldCheck className=\"h-3.5 w-3.5\" />\n {t('healthybowl.agriInputs.cart.poweredBy', 'Powered by Global Store + Billing')}\n </p>\n </div>\n </>\n )}\n </div>\n </div>\n )}\n\n {/* Footer note */}\n <div className=\"flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-3 text-xs text-text-secondary\">\n <Store className=\"mt-0.5 h-4 w-4 shrink-0 text-text-secondary\" />\n <p>\n {t(\n 'healthybowl.agriInputs.footerNote',\n 'Products are served from the platform store catalog. HealthyBowl adds no product, order or payment tables for the store; your order is recorded on your HealthyBowl account and paid on the platform billing rail.'\n )}\n </p>\n </div>\n\n <ToastContainer toasts={toasts} onDismiss={dismiss} />\n </PageLayout>\n );\n};\n"],"mappings":";;;;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;SACE,IAAG;SACH,MAAM;SACN,OAAO,MAAW;SAClB,WAAW,MAAM,GAAW,EAAE,OAAO,MAAM;SAC3C,aAAa,EACX,kDACA,oDACD;SACD,WAAU;SACV,CAAA;QACF,kBAAC,KAAD;SAAG,WAAU;mBACV,EAAE,2CAA2C,mDAAmD;SAC/F,CAAA;QACA,EAAA,CAAA;OAEN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,QAAD;SAAM,WAAU;mBAAuB,EAAE,wCAAwC,WAAW;SAAQ,CAAA,EACpG,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAe,IAAU,GAAa;SAClC,CAAA,CACH;;OAEN,kBAAC,GAAD;QAAQ,WAAU;QAAS,SAAS;QAAgB,UAAU,EAAK,WAAW;kBAC3E,EAAE,wCAAwC,sBAAsB;QAC1D,CAAA;OAET,kBAAC,UAAD;QACE,MAAK;QACL,SAAS;QACT,WAAU;kBAET,EAAE,qCAAqC,aAAa;QAC9C,CAAA;OAGT,kBAAC,KAAD;QAAG,WAAU;kBAAb,CACE,kBAAC,GAAD,EAAa,WAAU,eAAgB,CAAA,EACtC,EAAE,yCAAyC,oCAAoC,CAC9E;;OACA;QACL,EAAA,CAAA,CAED;OACF;;GAIR,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAO,WAAU,+CAAgD,CAAA,EACjE,kBAAC,KAAD,EAAA,UACG,EACC,qCACA,qNACD,EACC,CAAA,CACA;;GAEN,kBAAC,GAAD;IAAwB;IAAQ,WAAW;IAAW,CAAA;GAC3C"}
@@ -351,10 +351,10 @@ var A = [
351
351
  className: "mt-4 border-t border-border-subtle pt-4",
352
352
  children: [/* @__PURE__ */ O("h4", {
353
353
  className: "mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary",
354
- children: P("healthybowl.livestock.fertility.due.title", "Due in the next 30 days")
354
+ children: P("healthybowl.livestock.fertility.due.title", "Due soon, and overdue")
355
355
  }), Y.length === 0 ? /* @__PURE__ */ O("p", {
356
356
  className: "text-xs text-text-secondary",
357
- children: P("healthybowl.livestock.fertility.due.empty", "No confirmed or mated pregnancy is due in the next 30 days.")
357
+ children: P("healthybowl.livestock.fertility.due.empty", "No open pregnancy is due in the next 30 days, and none is overdue.")
358
358
  }) : /* @__PURE__ */ O("ul", {
359
359
  className: "flex flex-col gap-1.5",
360
360
  children: Y.map((e) => {
@@ -371,9 +371,9 @@ var A = [
371
371
  children: e.expectedDeliveryDate
372
372
  }), /* @__PURE__ */ k("span", {
373
373
  className: `tabular-nums ${j[t]}`,
374
- children: [P(n.key, n.defaultValue), t !== "OVERDUE" && /* @__PURE__ */ k("span", {
374
+ children: [P(n.key, n.defaultValue), Number.isFinite(e.daysUntilDue) && /* @__PURE__ */ k("span", {
375
375
  className: "text-text-secondary",
376
- children: [" ", P("healthybowl.livestock.fertility.due.inDays", "({{n}}d)", { n: String(e.daysUntilDue) })]
376
+ children: [" ", t === "OVERDUE" ? P("healthybowl.livestock.fertility.due.byDays", "(by {{n}}d)", { n: String(Math.abs(e.daysUntilDue)) }) : P("healthybowl.livestock.fertility.due.inDays", "({{n}}d)", { n: String(e.daysUntilDue) })]
377
377
  })]
378
378
  })]
379
379
  })]
@@ -1 +1 @@
1
- {"version":3,"file":"FertilityCard.js","names":[],"sources":["../../../../src/healthybowl/pages/livestock/FertilityCard.tsx"],"sourcesContent":["/**\n * Fertility card (BOFF-6008).\n *\n * The fourth card beside growth, feed and herd statistics. Growth says how fast animals gain, feed\n * says what that gain cost, herd statistics says what the herd is made of — this says whether it is\n * actually breeding, which is the number a farmer culls on.\n *\n * The backend for this shipped without any UI, so until now no user of HealthyBowl could see a\n * single fertility figure.\n *\n * Deliberate choices:\n * - **The calving interval prints its reason, never a number, whenever the backend supplies one.**\n * A DELIVERED record with no delivery date merges two births into one gap and OVERSTATES the\n * interval — the direction that hides a fertility problem behind a figure reading as merely\n * mediocre. `calvingIntervalDisplay` owns that predicate and is unit-tested; the card cannot\n * reach the number when a reason exists. Same treatment as herd statistics gives mortality.\n * - **An unmeasured rate renders as an em dash; a measured zero renders as `0%`.** Four services\n * and nothing in calf is the most urgent thing this card can say, and it must not be flattened\n * into the same appearance as \"we have no breeding data\".\n * - **The empty state is decided by breeding ACTIVITY, not by a falsy rate** (`hasFertilityData`).\n * Deciding it on `conceptionRatePct` would print \"No breeding records yet\" over a barren herd.\n * - **Two y-axes on the trend, unlike the herd-turnover chart's one.** There, entries and exits\n * were both counts of animals and shared a scale honestly. Here counts and a percentage have no\n * common scale, so the rate rides its own right-hand axis, fixed to 0–100 so a good month and a\n * bad month are comparable across reloads rather than rescaled to whatever happened.\n * - **Due-soon is a worklist, not a chart.** It answers \"who do I check on this week\", so it is\n * ordered soonest-first and banded by urgency, with a passed due date called out rather than\n * folded into \"later\".\n * - A query error is surfaced as an error, never as the empty state — \"no breeding records\" is a\n * statement about the farm and must not be shown when the truth is \"we could not load\".\n */\n\nimport { useMemo, useState, type FC } from 'react';\nimport { Bar, CartesianGrid, ComposedChart, Legend, Line, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ChartCard } from '../../components/ChartCard';\nimport { AnalyticsControls } from '../../components/AnalyticsControls';\nimport { formatNumber } from '../../utils/helpers';\nimport { downloadCsv } from '../../utils/download';\nimport { NOT_MEASURED, optionalMetric } from '../../utils/optionalMetric';\nimport {\n calvingIntervalDisplay,\n dueSoonUrgency,\n dueSoonUrgencyText,\n fertilityCsvRows,\n FERTILITY_CSV_HEADERS,\n hasFertilityData,\n orderedDueSoon,\n orderedFertilityBuckets,\n pregnancyLossDisplay,\n type DueSoonUrgency,\n} from '../../utils/fertility';\nimport { useHealthyBowlFertility } from '../../hooks/useHealthyBowlFertility';\nimport type { GrowthGranularity } from '../../hooks/useHealthyBowlLivestockGrowth';\n\nconst GRANULARITIES: GrowthGranularity[] = ['DAY', 'WEEK', 'MONTH'];\n\n/**\n * Urgency → text colour. Only OVERDUE and IMMINENT earn a status colour; the rest stay neutral.\n *\n * Keyed on the union rather than `string` so adding a band to `DueSoonUrgency` fails the build here\n * instead of silently rendering an unstyled row.\n */\nconst URGENCY_CLASS: Record<DueSoonUrgency, string> = {\n OVERDUE: 'text-status-error-text',\n IMMINENT: 'text-status-warning-text',\n SOON: 'text-text-primary',\n LATER: 'text-text-secondary',\n};\n\ninterface FertilityCardProps {\n groupId?: string | null;\n className?: string;\n}\n\nexport const FertilityCard: FC<FertilityCardProps> = ({ groupId = null, className }) => {\n const { t } = useI18n();\n const [granularity, setGranularity] = useState<GrowthGranularity>('MONTH');\n const [from, setFrom] = useState('');\n const [to, setTo] = useState('');\n const { fertility, dueSoon, trend, truncated, workspaceReady, loading, error } = useHealthyBowlFertility({\n groupId,\n granularity,\n from: from || null,\n to: to || null,\n });\n\n const trendData = useMemo(() => orderedFertilityBuckets(trend), [trend]);\n const dueSoonRows = useMemo(() => orderedDueSoon(dueSoon), [dueSoon]);\n\n const hasData = hasFertilityData({\n services: fertility?.services,\n deliveries: fertility?.deliveries,\n damsWithInterval: fertility?.damsWithInterval,\n dueSoonCount: dueSoonRows.length,\n trendCount: trendData.length,\n });\n\n const interval = fertility ? calvingIntervalDisplay(fertility) : null;\n const loss = fertility ? pregnancyLossDisplay(fertility) : null;\n\n const handleExportCsv = () => {\n if (!fertility) return;\n downloadCsv(\n `livestock-fertility-${new Date().toISOString().slice(0, 10)}.csv`,\n [...FERTILITY_CSV_HEADERS],\n fertilityCsvRows({\n services: fertility.services,\n conceived: fertility.conceived,\n conceptionRatePct: fertility.conceptionRatePct,\n deliveries: fertility.deliveries,\n trend: trendData,\n })\n );\n };\n\n const granularityToggle = (\n <div className=\"flex items-center gap-1\">\n {GRANULARITIES.map((g) => (\n <button\n key={g}\n type=\"button\"\n onClick={() => setGranularity(g)}\n aria-pressed={granularity === g}\n className={`min-h-[32px] rounded-md px-2 py-1 text-xs transition-colors ${\n granularity === g\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'text-text-secondary hover:bg-bg-sunken/50'\n }`}\n >\n {t(`healthybowl.livestock.fertility.granularity.${g.toLowerCase()}`, g.charAt(0) + g.slice(1).toLowerCase())}\n </button>\n ))}\n </div>\n );\n\n return (\n <ChartCard\n title={t('healthybowl.livestock.fertility.title', 'Fertility')}\n description={t(\n 'healthybowl.livestock.fertility.description',\n 'Whether the herd is actually breeding — conception, calving interval, litter size and who is due.'\n )}\n actions={\n <AnalyticsControls\n from={from}\n to={to}\n onFromChange={setFrom}\n onToChange={setTo}\n onExportCsv={handleExportCsv}\n exportDisabled={!fertility || !hasData}\n >\n {granularityToggle}\n </AnalyticsControls>\n }\n className={className}\n >\n {error ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.error.title', 'Could not load fertility analytics')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">{error.message}</p>\n </div>\n ) : !workspaceReady || (loading && !hasData) ? (\n <p className=\"py-8 text-center text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.loading', 'Loading fertility analytics…')}\n </p>\n ) : !hasData ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.empty.title', 'No breeding records yet')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.empty.hint',\n 'Record a mating on the Breeding page, then set its outcome — delivery date and offspring — to see conception, calving interval and litter size here.'\n )}\n </p>\n </div>\n ) : (\n <>\n {truncated && (\n <p className=\"mb-3 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.truncated',\n 'This herd has more breeding records than one view can load, so every figure below covers only part of it. Narrow the date range or filter by group for an exact figure.'\n )}\n </p>\n )}\n\n {/* Headline — conception is what a farmer checks first. */}\n <dl className=\"mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.conceptionRate', 'Conception rate')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.conceptionRatePct, { decimals: 1, unit: '%' })}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofServices', '{{c}} of {{s}} services', {\n c: String(fertility?.conceived ?? 0),\n s: String(fertility?.services ?? 0),\n })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.servicesPerConception', 'Services per conception')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.servicesPerConception, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.calvingInterval', 'Mean calving interval')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Never reachable when a reason exists — see calvingIntervalDisplay. */}\n {interval?.available\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(interval.meanDays),\n })\n : NOT_MEASURED}\n </dd>\n {interval?.available && interval.medianDays !== null && (\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.median', 'median {{n}}', {\n n: optionalMetric(interval.medianDays, { decimals: 0 }),\n })}\n </dd>\n )}\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.pregnancyLoss', 'Pregnancy loss')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Unreachable while a reason exists — the raw figure is a structural 0, not a\n measurement, and printing it would read as a herd that lost nothing. */}\n {loss?.available ? optionalMetric(loss.ratePct, { decimals: 1, unit: '%' }) : NOT_MEASURED}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofConfirmed', 'of confirmed pregnancies')}\n </dd>\n </div>\n </dl>\n\n {/* The reason IS the value in both of these — never a blank, and never a number. */}\n {interval && !interval.available && interval.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{interval.reason}</p>\n )}\n {loss && !loss.available && loss.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{loss.reason}</p>\n )}\n\n {/* Trend — counts as bars, rate as its own axis. */}\n <div className=\"border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.trend.title', 'Services and conceptions')}\n </h4>\n {trendData.length === 0 ? (\n <p className=\"py-4 text-center text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.trend.empty',\n 'No service in this period carries a mating date, so there is nothing to plot over time.'\n )}\n </p>\n ) : (\n <ResponsiveContainer width=\"100%\" height={220}>\n <ComposedChart data={trendData} margin={{ top: 5, right: 20, left: 0, bottom: 5 }}>\n <CartesianGrid strokeDasharray=\"3 3\" stroke=\"var(--color-border)\" />\n <XAxis dataKey=\"bucket\" tick={{ fontSize: 11 }} stroke=\"var(--color-muted-foreground)\" />\n <YAxis\n yAxisId=\"count\"\n allowDecimals={false}\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n {/* Fixed 0–100 so two periods are comparable, not rescaled to whatever happened. */}\n <YAxis\n yAxisId=\"rate\"\n orientation=\"right\"\n domain={[0, 100]}\n unit=\"%\"\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n <Tooltip\n cursor={{ fill: 'var(--color-muted)', opacity: 0.2 }}\n contentStyle={{\n backgroundColor: 'var(--color-card)',\n border: '1px solid var(--color-border)',\n borderRadius: 8,\n fontSize: 12,\n }}\n labelStyle={{ color: 'var(--color-foreground)' }}\n formatter={(value: number | string, name: string) => [\n typeof value === 'number' ? formatNumber(value) : String(value ?? NOT_MEASURED),\n name,\n ]}\n />\n <Legend wrapperStyle={{ fontSize: 11 }} />\n <Bar\n yAxisId=\"count\"\n dataKey=\"services\"\n name={t('healthybowl.livestock.fertility.trend.services', 'Services')}\n fill=\"var(--color-chart-1)\"\n radius={[4, 4, 0, 0]}\n />\n <Bar\n yAxisId=\"count\"\n dataKey=\"conceived\"\n name={t('healthybowl.livestock.fertility.trend.conceived', 'Conceived')}\n fill=\"var(--color-chart-2)\"\n radius={[4, 4, 0, 0]}\n />\n <Line\n yAxisId=\"rate\"\n type=\"monotone\"\n dataKey=\"conceptionRatePct\"\n name={t('healthybowl.livestock.fertility.trend.rate', 'Conception rate %')}\n stroke=\"var(--color-chart-3)\"\n strokeWidth={2}\n dot={false}\n connectNulls={false}\n />\n </ComposedChart>\n </ResponsiveContainer>\n )}\n </div>\n\n {/* Litter and first calving. */}\n <div className=\"mt-4 grid grid-cols-1 gap-4 border-t border-border-subtle pt-4 sm:grid-cols-2\">\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.title', 'Litter size')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.born', 'Mean born')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringBorn, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.live', 'Mean born alive')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringLive, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.perinatal', 'Perinatal mortality')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.perinatalMortalityPct, { decimals: 1, unit: '%' })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.deliveries', 'Deliveries')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.deliveries ?? 0)}\n </dd>\n </div>\n </dl>\n {/* The denominator caveat, as animalsWithoutAge is for the age chart. */}\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.litter.coverage',\n '{{counted}} of {{total}} deliveries recorded how many were born — the averages are of those.',\n {\n counted: String(fertility?.deliveriesWithCounts ?? 0),\n total: String(fertility?.deliveries ?? 0),\n }\n )}\n </p>\n </div>\n\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.title', 'Age at first calving')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.mean', 'Mean')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {fertility?.meanAgeAtFirstCalvingDays !== null && fertility?.meanAgeAtFirstCalvingDays !== undefined\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(fertility.meanAgeAtFirstCalvingDays),\n })\n : NOT_MEASURED}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.median', 'Median')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.medianAgeAtFirstCalvingDays, { decimals: 0 })}\n </dd>\n </div>\n <div className=\"col-span-2\">\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.dams', 'Dams with a first calving')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.damsWithFirstCalving ?? 0)}\n <span className=\"ms-2 text-xs font-normal text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.intervalDams', '· {{n}} with an interval', {\n n: String(fertility?.damsWithInterval ?? 0),\n })}\n </span>\n </dd>\n </div>\n </dl>\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.firstCalving.coverage',\n 'Only dams whose own date of birth is recorded can contribute — an unknown birth date makes the age unknowable.'\n )}\n </p>\n </div>\n </div>\n\n {/* Due soon — a worklist, soonest first. */}\n <div className=\"mt-4 border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.due.title', 'Due in the next 30 days')}\n </h4>\n {dueSoonRows.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.due.empty',\n 'No confirmed or mated pregnancy is due in the next 30 days.'\n )}\n </p>\n ) : (\n <ul className=\"flex flex-col gap-1.5\">\n {dueSoonRows.map((row) => {\n const urgency = dueSoonUrgency(row.daysUntilDue);\n const label = dueSoonUrgencyText(urgency);\n return (\n <li\n key={`${row.animalId}:${row.expectedDeliveryDate}`}\n className=\"flex flex-wrap items-baseline justify-between gap-2 text-xs\"\n >\n <span className=\"font-medium text-text-primary\">{row.animalId}</span>\n <span className=\"flex items-baseline gap-2\">\n <span className=\"tabular-nums text-text-secondary\">{row.expectedDeliveryDate}</span>\n <span className={`tabular-nums ${URGENCY_CLASS[urgency]}`}>\n {t(label.key, label.defaultValue)}\n {urgency !== 'OVERDUE' && (\n <span className=\"text-text-secondary\">\n {' '}\n {t('healthybowl.livestock.fertility.due.inDays', '({{n}}d)', {\n n: String(row.daysUntilDue),\n })}\n </span>\n )}\n </span>\n </span>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n </ChartCard>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuDA,IAAM,IAAqC;CAAC;CAAO;CAAQ;CAAQ,EAQ7D,I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Q;AACzC,aACE,kBAAC,MAAD;OAEE,WAAU;iBAFZ,CAIE,kBAAC,QAAD;QAAM,WAAU;kBAAiC,EAAI;QAAgB,CAAA,EACrE,kBAAC,QAAD;QAAM,WAAU;kBAAhB,CACE,kBAAC,QAAD;SAAM,WAAU;mBAAoC,EAAI;SAA4B,CAAA,EACpF,kBAAC,QAAD;SAAM,WAAW,gBAAgB,EAAc;mBAA/C,CACG,EAAE,EAAM,KAAK,EAAM,aAAa,EAChC,MAAY,aACX,kBAAC,QAAD;UAAM,WAAU;oBAAhB,CACG,KACA,EAAE,8CAA8C,YAAY,EAC3D,GAAG,OAAO,EAAI,aAAa,EAC5B,CAAC,CACG;YAEJ;WACF;UACJ;SAlBE,GAAG,EAAI,SAAS,GAAG,EAAI,uBAkBzB;OAEP;KACC,CAAA,CAEH;;GACL,EAAA,CAAA,GArTH,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cACV,EAAE,+CAA+C,0BAA0B;IAC1E,CAAA,EACJ,kBAAC,KAAD;IAAG,WAAU;cACV,EACC,8CACA,uJACD;IACC,CAAA,CACA;;EA6SE,CAAA"}
1
+ {"version":3,"file":"FertilityCard.js","names":[],"sources":["../../../../src/healthybowl/pages/livestock/FertilityCard.tsx"],"sourcesContent":["/**\n * Fertility card (BOFF-6008).\n *\n * The fourth card beside growth, feed and herd statistics. Growth says how fast animals gain, feed\n * says what that gain cost, herd statistics says what the herd is made of — this says whether it is\n * actually breeding, which is the number a farmer culls on.\n *\n * The backend for this shipped without any UI, so until now no user of HealthyBowl could see a\n * single fertility figure.\n *\n * Deliberate choices:\n * - **The calving interval prints its reason, never a number, whenever the backend supplies one.**\n * A DELIVERED record with no delivery date merges two births into one gap and OVERSTATES the\n * interval — the direction that hides a fertility problem behind a figure reading as merely\n * mediocre. `calvingIntervalDisplay` owns that predicate and is unit-tested; the card cannot\n * reach the number when a reason exists. Same treatment as herd statistics gives mortality.\n * - **An unmeasured rate renders as an em dash; a measured zero renders as `0%`.** Four services\n * and nothing in calf is the most urgent thing this card can say, and it must not be flattened\n * into the same appearance as \"we have no breeding data\".\n * - **The empty state is decided by breeding ACTIVITY, not by a falsy rate** (`hasFertilityData`).\n * Deciding it on `conceptionRatePct` would print \"No breeding records yet\" over a barren herd.\n * - **Two y-axes on the trend, unlike the herd-turnover chart's one.** There, entries and exits\n * were both counts of animals and shared a scale honestly. Here counts and a percentage have no\n * common scale, so the rate rides its own right-hand axis, fixed to 0–100 so a good month and a\n * bad month are comparable across reloads rather than rescaled to whatever happened.\n * - **Due-soon is a worklist, not a chart.** It answers \"who do I check on this week\", so it is\n * ordered soonest-first and banded by urgency, with a passed due date called out rather than\n * folded into \"later\".\n * - A query error is surfaced as an error, never as the empty state — \"no breeding records\" is a\n * statement about the farm and must not be shown when the truth is \"we could not load\".\n */\n\nimport { useMemo, useState, type FC } from 'react';\nimport { Bar, CartesianGrid, ComposedChart, Legend, Line, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ChartCard } from '../../components/ChartCard';\nimport { AnalyticsControls } from '../../components/AnalyticsControls';\nimport { formatNumber } from '../../utils/helpers';\nimport { downloadCsv } from '../../utils/download';\nimport { NOT_MEASURED, optionalMetric } from '../../utils/optionalMetric';\nimport {\n calvingIntervalDisplay,\n dueSoonUrgency,\n dueSoonUrgencyText,\n fertilityCsvRows,\n FERTILITY_CSV_HEADERS,\n hasFertilityData,\n orderedDueSoon,\n orderedFertilityBuckets,\n pregnancyLossDisplay,\n type DueSoonUrgency,\n} from '../../utils/fertility';\nimport { useHealthyBowlFertility } from '../../hooks/useHealthyBowlFertility';\nimport type { GrowthGranularity } from '../../hooks/useHealthyBowlLivestockGrowth';\n\nconst GRANULARITIES: GrowthGranularity[] = ['DAY', 'WEEK', 'MONTH'];\n\n/**\n * Urgency → text colour. Only OVERDUE and IMMINENT earn a status colour; the rest stay neutral.\n *\n * Keyed on the union rather than `string` so adding a band to `DueSoonUrgency` fails the build here\n * instead of silently rendering an unstyled row.\n */\nconst URGENCY_CLASS: Record<DueSoonUrgency, string> = {\n OVERDUE: 'text-status-error-text',\n IMMINENT: 'text-status-warning-text',\n SOON: 'text-text-primary',\n LATER: 'text-text-secondary',\n};\n\ninterface FertilityCardProps {\n groupId?: string | null;\n className?: string;\n}\n\nexport const FertilityCard: FC<FertilityCardProps> = ({ groupId = null, className }) => {\n const { t } = useI18n();\n const [granularity, setGranularity] = useState<GrowthGranularity>('MONTH');\n const [from, setFrom] = useState('');\n const [to, setTo] = useState('');\n const { fertility, dueSoon, trend, truncated, workspaceReady, loading, error } = useHealthyBowlFertility({\n groupId,\n granularity,\n from: from || null,\n to: to || null,\n });\n\n const trendData = useMemo(() => orderedFertilityBuckets(trend), [trend]);\n const dueSoonRows = useMemo(() => orderedDueSoon(dueSoon), [dueSoon]);\n\n const hasData = hasFertilityData({\n services: fertility?.services,\n deliveries: fertility?.deliveries,\n damsWithInterval: fertility?.damsWithInterval,\n dueSoonCount: dueSoonRows.length,\n trendCount: trendData.length,\n });\n\n const interval = fertility ? calvingIntervalDisplay(fertility) : null;\n const loss = fertility ? pregnancyLossDisplay(fertility) : null;\n\n const handleExportCsv = () => {\n if (!fertility) return;\n downloadCsv(\n `livestock-fertility-${new Date().toISOString().slice(0, 10)}.csv`,\n [...FERTILITY_CSV_HEADERS],\n fertilityCsvRows({\n services: fertility.services,\n conceived: fertility.conceived,\n conceptionRatePct: fertility.conceptionRatePct,\n deliveries: fertility.deliveries,\n trend: trendData,\n })\n );\n };\n\n const granularityToggle = (\n <div className=\"flex items-center gap-1\">\n {GRANULARITIES.map((g) => (\n <button\n key={g}\n type=\"button\"\n onClick={() => setGranularity(g)}\n aria-pressed={granularity === g}\n className={`min-h-[32px] rounded-md px-2 py-1 text-xs transition-colors ${\n granularity === g\n ? 'bg-action-primary-bg text-action-primary-text'\n : 'text-text-secondary hover:bg-bg-sunken/50'\n }`}\n >\n {t(`healthybowl.livestock.fertility.granularity.${g.toLowerCase()}`, g.charAt(0) + g.slice(1).toLowerCase())}\n </button>\n ))}\n </div>\n );\n\n return (\n <ChartCard\n title={t('healthybowl.livestock.fertility.title', 'Fertility')}\n description={t(\n 'healthybowl.livestock.fertility.description',\n 'Whether the herd is actually breeding — conception, calving interval, litter size and who is due.'\n )}\n actions={\n <AnalyticsControls\n from={from}\n to={to}\n onFromChange={setFrom}\n onToChange={setTo}\n onExportCsv={handleExportCsv}\n exportDisabled={!fertility || !hasData}\n >\n {granularityToggle}\n </AnalyticsControls>\n }\n className={className}\n >\n {error ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.error.title', 'Could not load fertility analytics')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">{error.message}</p>\n </div>\n ) : !workspaceReady || (loading && !hasData) ? (\n <p className=\"py-8 text-center text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.loading', 'Loading fertility analytics…')}\n </p>\n ) : !hasData ? (\n <div className=\"py-8 text-center\">\n <p className=\"text-sm text-text-primary\">\n {t('healthybowl.livestock.fertility.empty.title', 'No breeding records yet')}\n </p>\n <p className=\"mt-1 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.empty.hint',\n 'Record a mating on the Breeding page, then set its outcome — delivery date and offspring — to see conception, calving interval and litter size here.'\n )}\n </p>\n </div>\n ) : (\n <>\n {truncated && (\n <p className=\"mb-3 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.truncated',\n 'This herd has more breeding records than one view can load, so every figure below covers only part of it. Narrow the date range or filter by group for an exact figure.'\n )}\n </p>\n )}\n\n {/* Headline — conception is what a farmer checks first. */}\n <dl className=\"mb-4 grid grid-cols-2 gap-3 sm:grid-cols-4\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.conceptionRate', 'Conception rate')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.conceptionRatePct, { decimals: 1, unit: '%' })}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofServices', '{{c}} of {{s}} services', {\n c: String(fertility?.conceived ?? 0),\n s: String(fertility?.services ?? 0),\n })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.servicesPerConception', 'Services per conception')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.servicesPerConception, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.calvingInterval', 'Mean calving interval')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Never reachable when a reason exists — see calvingIntervalDisplay. */}\n {interval?.available\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(interval.meanDays),\n })\n : NOT_MEASURED}\n </dd>\n {interval?.available && interval.medianDays !== null && (\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.median', 'median {{n}}', {\n n: optionalMetric(interval.medianDays, { decimals: 0 }),\n })}\n </dd>\n )}\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.pregnancyLoss', 'Pregnancy loss')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {/* Unreachable while a reason exists — the raw figure is a structural 0, not a\n measurement, and printing it would read as a herd that lost nothing. */}\n {loss?.available ? optionalMetric(loss.ratePct, { decimals: 1, unit: '%' }) : NOT_MEASURED}\n </dd>\n <dd className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.summary.ofConfirmed', 'of confirmed pregnancies')}\n </dd>\n </div>\n </dl>\n\n {/* The reason IS the value in both of these — never a blank, and never a number. */}\n {interval && !interval.available && interval.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{interval.reason}</p>\n )}\n {loss && !loss.available && loss.reason && (\n <p className=\"mb-4 rounded-md bg-bg-sunken/60 px-3 py-2 text-xs text-text-secondary\">{loss.reason}</p>\n )}\n\n {/* Trend — counts as bars, rate as its own axis. */}\n <div className=\"border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.trend.title', 'Services and conceptions')}\n </h4>\n {trendData.length === 0 ? (\n <p className=\"py-4 text-center text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.trend.empty',\n 'No service in this period carries a mating date, so there is nothing to plot over time.'\n )}\n </p>\n ) : (\n <ResponsiveContainer width=\"100%\" height={220}>\n <ComposedChart data={trendData} margin={{ top: 5, right: 20, left: 0, bottom: 5 }}>\n <CartesianGrid strokeDasharray=\"3 3\" stroke=\"var(--color-border)\" />\n <XAxis dataKey=\"bucket\" tick={{ fontSize: 11 }} stroke=\"var(--color-muted-foreground)\" />\n <YAxis\n yAxisId=\"count\"\n allowDecimals={false}\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n {/* Fixed 0–100 so two periods are comparable, not rescaled to whatever happened. */}\n <YAxis\n yAxisId=\"rate\"\n orientation=\"right\"\n domain={[0, 100]}\n unit=\"%\"\n tick={{ fontSize: 11 }}\n stroke=\"var(--color-muted-foreground)\"\n />\n <Tooltip\n cursor={{ fill: 'var(--color-muted)', opacity: 0.2 }}\n contentStyle={{\n backgroundColor: 'var(--color-card)',\n border: '1px solid var(--color-border)',\n borderRadius: 8,\n fontSize: 12,\n }}\n labelStyle={{ color: 'var(--color-foreground)' }}\n formatter={(value: number | string, name: string) => [\n typeof value === 'number' ? formatNumber(value) : String(value ?? NOT_MEASURED),\n name,\n ]}\n />\n <Legend wrapperStyle={{ fontSize: 11 }} />\n <Bar\n yAxisId=\"count\"\n dataKey=\"services\"\n name={t('healthybowl.livestock.fertility.trend.services', 'Services')}\n fill=\"var(--color-chart-1)\"\n radius={[4, 4, 0, 0]}\n />\n <Bar\n yAxisId=\"count\"\n dataKey=\"conceived\"\n name={t('healthybowl.livestock.fertility.trend.conceived', 'Conceived')}\n fill=\"var(--color-chart-2)\"\n radius={[4, 4, 0, 0]}\n />\n <Line\n yAxisId=\"rate\"\n type=\"monotone\"\n dataKey=\"conceptionRatePct\"\n name={t('healthybowl.livestock.fertility.trend.rate', 'Conception rate %')}\n stroke=\"var(--color-chart-3)\"\n strokeWidth={2}\n dot={false}\n connectNulls={false}\n />\n </ComposedChart>\n </ResponsiveContainer>\n )}\n </div>\n\n {/* Litter and first calving. */}\n <div className=\"mt-4 grid grid-cols-1 gap-4 border-t border-border-subtle pt-4 sm:grid-cols-2\">\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.title', 'Litter size')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.born', 'Mean born')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringBorn, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.live', 'Mean born alive')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.meanOffspringLive, { decimals: 1 })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.perinatal', 'Perinatal mortality')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.perinatalMortalityPct, { decimals: 1, unit: '%' })}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.litter.deliveries', 'Deliveries')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.deliveries ?? 0)}\n </dd>\n </div>\n </dl>\n {/* The denominator caveat, as animalsWithoutAge is for the age chart. */}\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.litter.coverage',\n '{{counted}} of {{total}} deliveries recorded how many were born — the averages are of those.',\n {\n counted: String(fertility?.deliveriesWithCounts ?? 0),\n total: String(fertility?.deliveries ?? 0),\n }\n )}\n </p>\n </div>\n\n <div>\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.title', 'Age at first calving')}\n </h4>\n <dl className=\"grid grid-cols-2 gap-3\">\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.mean', 'Mean')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {fertility?.meanAgeAtFirstCalvingDays !== null && fertility?.meanAgeAtFirstCalvingDays !== undefined\n ? t('healthybowl.livestock.fertility.summary.days', '{{n}} days', {\n n: formatNumber(fertility.meanAgeAtFirstCalvingDays),\n })\n : NOT_MEASURED}\n </dd>\n </div>\n <div>\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.median', 'Median')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {optionalMetric(fertility?.medianAgeAtFirstCalvingDays, { decimals: 0 })}\n </dd>\n </div>\n <div className=\"col-span-2\">\n <dt className=\"text-xs text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.dams', 'Dams with a first calving')}\n </dt>\n <dd className=\"text-sm font-medium tabular-nums text-text-primary\">\n {formatNumber(fertility?.damsWithFirstCalving ?? 0)}\n <span className=\"ms-2 text-xs font-normal text-text-secondary\">\n {t('healthybowl.livestock.fertility.firstCalving.intervalDams', '· {{n}} with an interval', {\n n: String(fertility?.damsWithInterval ?? 0),\n })}\n </span>\n </dd>\n </div>\n </dl>\n <p className=\"mt-2 text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.firstCalving.coverage',\n 'Only dams whose own date of birth is recorded can contribute — an unknown birth date makes the age unknowable.'\n )}\n </p>\n </div>\n </div>\n\n {/* Due soon — a worklist, soonest first. */}\n <div className=\"mt-4 border-t border-border-subtle pt-4\">\n <h4 className=\"mb-2 text-xs font-medium uppercase tracking-wide text-text-secondary\">\n {t('healthybowl.livestock.fertility.due.title', 'Due soon, and overdue')}\n </h4>\n {dueSoonRows.length === 0 ? (\n <p className=\"text-xs text-text-secondary\">\n {t(\n 'healthybowl.livestock.fertility.due.empty',\n 'No open pregnancy is due in the next 30 days, and none is overdue.'\n )}\n </p>\n ) : (\n <ul className=\"flex flex-col gap-1.5\">\n {dueSoonRows.map((row) => {\n const urgency = dueSoonUrgency(row.daysUntilDue);\n const label = dueSoonUrgencyText(urgency);\n return (\n <li\n key={`${row.animalId}:${row.expectedDeliveryDate}`}\n className=\"flex flex-wrap items-baseline justify-between gap-2 text-xs\"\n >\n <span className=\"font-medium text-text-primary\">{row.animalId}</span>\n <span className=\"flex items-baseline gap-2\">\n <span className=\"tabular-nums text-text-secondary\">{row.expectedDeliveryDate}</span>\n <span className={`tabular-nums ${URGENCY_CLASS[urgency]}`}>\n {t(label.key, label.defaultValue)}\n {/* BOFF-6280 — an overdue row must say BY HOW MUCH. \"Overdue\" alone reads\n the same at three days as at three weeks, and those call for very\n different action. `daysUntilDue` is negative here, so it is negated\n for display rather than shown as \"-19d\". */}\n {/* Only when the count is a real number. `dueSoonUrgency` deliberately\n bands a non-finite value as OVERDUE rather than dropping the row, so\n the day count has to tolerate one too — otherwise the defence that\n keeps the row visible renders \"(by NaNd)\" next to it. */}\n {Number.isFinite(row.daysUntilDue) && (\n <span className=\"text-text-secondary\">\n {' '}\n {urgency === 'OVERDUE'\n ? t('healthybowl.livestock.fertility.due.byDays', '(by {{n}}d)', {\n n: String(Math.abs(row.daysUntilDue)),\n })\n : t('healthybowl.livestock.fertility.due.inDays', '({{n}}d)', {\n n: String(row.daysUntilDue),\n })}\n </span>\n )}\n </span>\n </span>\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n </ChartCard>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuDA,IAAM,IAAqC;CAAC;CAAO;CAAQ;CAAQ,EAQ7D,IAAgD;CACpD,SAAS;CACT,UAAU;CACV,MAAM;CACN,OAAO;CACR,EAOY,KAAyC,EAAE,aAAU,MAAM,mBAAgB;CACtF,IAAM,EAAE,SAAM,GAAS,EACjB,CAAC,GAAa,KAAkB,EAA4B,QAAQ,EACpE,CAAC,GAAM,KAAW,EAAS,GAAG,EAC9B,CAAC,GAAI,KAAS,EAAS,GAAG,EAC1B,EAAE,cAAW,YAAS,UAAO,cAAW,mBAAgB,YAAS,aAAU,EAAwB;EACvG;EACA;EACA,MAAM,KAAQ;EACd,IAAI,KAAM;EACX,CAAC,EAEI,IAAY,QAAc,EAAwB,EAAM,EAAE,CAAC,EAAM,CAAC,EAClE,IAAc,QAAc,EAAe,EAAQ,EAAE,CAAC,EAAQ,CAAC,EAE/D,IAAU,EAAiB;EAC/B,UAAU,GAAW;EACrB,YAAY,GAAW;EACvB,kBAAkB,GAAW;EAC7B,cAAc,EAAY;EAC1B,YAAY,EAAU;EACvB,CAAC,EAEI,IAAW,IAAY,EAAuB,EAAU,GAAG,MAC3D,IAAO,IAAY,EAAqB,EAAU,GAAG,MAErD,UAAwB;AACvB,OACL,EACE,wCAAuB,IAAI,MAAM,EAAC,aAAa,CAAC,MAAM,GAAG,GAAG,CAAC,OAC7D,CAAC,GAAG,EAAsB,EAC1B,EAAiB;GACf,UAAU,EAAU;GACpB,WAAW,EAAU;GACrB,mBAAmB,EAAU;GAC7B,YAAY,EAAU;GACtB,OAAO;GACR,CAAC,CACH;IA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
3
- "version": "2026.812.14",
3
+ "version": "2026.812.16",
4
4
  "description": "Burdenoff HealthyBowl Microfrontend - Comprehensive organic farming and agro-foods management platform",
5
5
  "type": "module",
6
6
  "files": [