@burdenoff/microfe-ecoimpacthub 2026.704.4 → 2026.709.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/main.d.ts +2 -0
- package/dist/dev/main.d.ts.map +1 -0
- package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts +5 -0
- package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts.map +1 -0
- package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts +4 -0
- package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts.map +1 -0
- package/dist/ecoimpacthub/EcoImpactHubRoutes.js +48 -40
- package/dist/ecoimpacthub/EcoImpactHubRoutes.js.map +1 -1
- package/dist/ecoimpacthub/components/DataTable.d.ts +28 -0
- package/dist/ecoimpacthub/components/DataTable.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EcoDiscussion.d.ts +18 -0
- package/dist/ecoimpacthub/components/EcoDiscussion.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EcoTags.d.ts +17 -0
- package/dist/ecoimpacthub/components/EcoTags.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EmptyState.d.ts +18 -0
- package/dist/ecoimpacthub/components/EmptyState.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/EvidenceUpload.d.ts +14 -0
- package/dist/ecoimpacthub/components/EvidenceUpload.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts +10 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.js +8 -0
- package/dist/ecoimpacthub/components/FeatureFlagGate.js.map +1 -0
- package/dist/ecoimpacthub/components/FileLink.d.ts +15 -0
- package/dist/ecoimpacthub/components/FileLink.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/FilterTabs.d.ts +18 -0
- package/dist/ecoimpacthub/components/FilterTabs.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/MetricsCard.d.ts +23 -0
- package/dist/ecoimpacthub/components/MetricsCard.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/MiniBar.d.ts +16 -0
- package/dist/ecoimpacthub/components/MiniBar.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/PageLayout.d.ts +16 -0
- package/dist/ecoimpacthub/components/PageLayout.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/Pagination.d.ts +22 -0
- package/dist/ecoimpacthub/components/Pagination.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/StateViews.d.ts +24 -0
- package/dist/ecoimpacthub/components/StateViews.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/StatusBadge.d.ts +9 -0
- package/dist/ecoimpacthub/components/StatusBadge.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/Tabs.d.ts +17 -0
- package/dist/ecoimpacthub/components/Tabs.d.ts.map +1 -0
- package/dist/ecoimpacthub/components/index.d.ts +19 -0
- package/dist/ecoimpacthub/components/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts +16 -0
- package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts.map +1 -0
- package/dist/ecoimpacthub/context/index.d.ts +6 -0
- package/dist/ecoimpacthub/context/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/index.d.ts +10 -0
- package/dist/ecoimpacthub/hooks/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useCursorPager.d.ts +33 -0
- package/dist/ecoimpacthub/hooks/useCursorPager.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoComments.d.ts +36 -0
- package/dist/ecoimpacthub/hooks/useEcoComments.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts +47 -0
- package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts +104 -0
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts.map +1 -0
- package/dist/ecoimpacthub/hooks/useEcoTags.d.ts +44 -0
- package/dist/ecoimpacthub/hooks/useEcoTags.d.ts.map +1 -0
- package/dist/ecoimpacthub/index.d.ts +10 -0
- package/dist/ecoimpacthub/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/index.js +2 -0
- package/dist/ecoimpacthub/pages/DashboardPage.d.ts +10 -0
- package/dist/ecoimpacthub/pages/DashboardPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/DashboardPage.js +345 -189
- package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts +9 -0
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js +58 -0
- package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts +23 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js +70 -0
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts +9 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.js +51 -0
- package/dist/ecoimpacthub/pages/_shared/MethodBadge.js.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts +9 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.js +29 -0
- package/dist/ecoimpacthub/pages/_shared/TaxonChip.js.map +1 -0
- package/dist/ecoimpacthub/pages/badges.d.ts +27 -0
- package/dist/ecoimpacthub/pages/badges.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/badges.js +71 -0
- package/dist/ecoimpacthub/pages/badges.js.map +1 -0
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts +15 -0
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +337 -300
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/carbonVisuals.d.ts +47 -0
- package/dist/ecoimpacthub/pages/carbonVisuals.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/carbonVisuals.js +89 -0
- package/dist/ecoimpacthub/pages/carbonVisuals.js.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts +12 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +252 -218
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +15 -12
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts +6 -0
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js +168 -0
- package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js.map +1 -0
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts +12 -0
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js +30 -17
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts +11 -0
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +236 -219
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts +11 -0
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +248 -212
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js +119 -118
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts +10 -0
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +498 -370
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/sites/SitesPage.js +109 -99
- package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts +22 -0
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js +64 -0
- package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js.map +1 -0
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts +9 -0
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +275 -259
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts +8 -0
- package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts.map +1 -0
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js +235 -177
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts +33 -0
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts.map +1 -0
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js +42 -0
- package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/ecoimpacthub/services/index.d.ts +6 -0
- package/dist/ecoimpacthub/services/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/services/index.js +1 -0
- package/dist/ecoimpacthub/types/index.d.ts +417 -0
- package/dist/ecoimpacthub/types/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/cn.d.ts +4 -0
- package/dist/ecoimpacthub/utils/cn.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/formatters.d.ts +26 -0
- package/dist/ecoimpacthub/utils/formatters.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/i18n.d.ts +6 -0
- package/dist/ecoimpacthub/utils/i18n.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/index.d.ts +9 -0
- package/dist/ecoimpacthub/utils/index.d.ts.map +1 -0
- package/dist/ecoimpacthub/utils/navigation.d.ts +14 -0
- package/dist/ecoimpacthub/utils/navigation.d.ts.map +1 -0
- package/dist/generated/global-operations.d.ts +2 -0
- package/dist/generated/global-operations.d.ts.map +1 -0
- package/dist/generated/global-types.d.ts +18199 -0
- package/dist/generated/global-types.d.ts.map +1 -0
- package/dist/generated/wspace-operations.d.ts +2 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -0
- package/dist/generated/wspace-types.d.ts +43046 -0
- package/dist/generated/wspace-types.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +305 -0
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -0
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +44 -33
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +31 -23
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
- package/package.json +5 -1
|
@@ -3,60 +3,67 @@ import { Tooltip as t } from "../../node_modules/recharts/es6/component/Tooltip.
|
|
|
3
3
|
import { ResponsiveContainer as n } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
4
4
|
import { Cell as r } from "../../node_modules/recharts/es6/component/Cell.js";
|
|
5
5
|
import { LabelList as i } from "../../node_modules/recharts/es6/component/LabelList.js";
|
|
6
|
-
import { Bar as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { Bar as a } from "../../node_modules/recharts/es6/cartesian/Bar.js";
|
|
7
|
+
import { CartesianGrid as o } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
8
|
+
import { XAxis as s } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
9
|
+
import { YAxis as ee } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
10
|
+
import { BarChart as te } from "../../node_modules/recharts/es6/chart/BarChart.js";
|
|
10
11
|
import { PageLayout as c } from "../components/PageLayout.js";
|
|
11
12
|
import { MetricsCard as l } from "../components/MetricsCard.js";
|
|
12
|
-
import { formatCo2e as u, formatEnumLabel as
|
|
13
|
-
import { StatusBadge as
|
|
14
|
-
import { MiniBar as
|
|
15
|
-
import { LoadingView as
|
|
16
|
-
import { EmptyState as
|
|
13
|
+
import { formatCo2e as u, formatEnumLabel as d, formatNumber as f, formatPercent as p, formatRelativeTime as m } from "../utils/formatters.js";
|
|
14
|
+
import { StatusBadge as h } from "../components/StatusBadge.js";
|
|
15
|
+
import { MiniBar as g } from "../components/MiniBar.js";
|
|
16
|
+
import { LoadingView as ne, Section as _ } from "../components/StateViews.js";
|
|
17
|
+
import { EmptyState as v } from "../components/EmptyState.js";
|
|
18
|
+
import { Meter as re, SCOPE_HUE as y, ScopeLegend as ie, ScopeSplitBar as b } from "./carbonVisuals.js";
|
|
17
19
|
import "../context/index.js";
|
|
18
|
-
import { useEcoCarbonTotals as
|
|
20
|
+
import { useEcoCarbonTotals as x, useEcoHabitatProjects as ae, useEcoMeasurements as oe, useEcoObservations as S, useEcoSensors as C, useEcoSites as w, useEcoSpecies as se } from "../hooks/useEcoImpactHubApi.js";
|
|
19
21
|
import "../hooks/index.js";
|
|
20
|
-
import { useMemo as
|
|
21
|
-
import { ArrowRight as T, Binoculars as
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { GlassCard as
|
|
22
|
+
import { useMemo as ce } from "react";
|
|
23
|
+
import { ArrowRight as T, Binoculars as E, Factory as D, MapPin as le, PawPrint as ue, Radio as de, ShieldCheck as fe, Trees as pe, TriangleAlert as O } from "lucide-react";
|
|
24
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
25
|
+
import { GlassCard as M } from "@burdenoff/fe-libs/ui";
|
|
24
26
|
//#region src/ecoimpacthub/pages/DashboardPage.tsx
|
|
25
|
-
var
|
|
27
|
+
var N = new Set([
|
|
26
28
|
"PLANNED",
|
|
27
29
|
"IN_PROGRESS",
|
|
28
30
|
"MONITORING"
|
|
29
|
-
]),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
]), P = {
|
|
32
|
+
LEAST_CONCERN: "var(--color-status-success-text)",
|
|
33
|
+
NEAR_THREATENED: "var(--color-accent-teal)",
|
|
34
|
+
VULNERABLE: "var(--color-status-warning-text)",
|
|
35
|
+
ENDANGERED: "var(--color-status-error-text)",
|
|
36
|
+
CRITICALLY_ENDANGERED: "var(--color-status-error-text)",
|
|
37
|
+
EXTINCT_IN_WILD: "var(--color-text-tertiary)",
|
|
38
|
+
DATA_DEFICIENT: "var(--color-text-tertiary)",
|
|
39
|
+
NOT_EVALUATED: "var(--color-text-tertiary)"
|
|
33
40
|
};
|
|
34
|
-
function
|
|
35
|
-
let { navigateTo:
|
|
41
|
+
function F() {
|
|
42
|
+
let { navigateTo: F, currentUser: I } = e(), L = w({ pagination: {
|
|
36
43
|
limit: 100,
|
|
37
44
|
offset: 0
|
|
38
|
-
} }),
|
|
45
|
+
} }), R = se({ pagination: {
|
|
39
46
|
limit: 100,
|
|
40
47
|
offset: 0
|
|
41
|
-
} }),
|
|
48
|
+
} }), z = ae(), B = x(), V = oe({
|
|
42
49
|
breachesOnly: !0,
|
|
43
50
|
pagination: {
|
|
44
51
|
limit: 6,
|
|
45
52
|
offset: 0
|
|
46
53
|
}
|
|
47
|
-
}),
|
|
54
|
+
}), me = S({ pagination: {
|
|
48
55
|
limit: 6,
|
|
49
56
|
offset: 0
|
|
50
|
-
} }),
|
|
57
|
+
} }), he = C(), H = L.data?.items ?? [], U = R.data?.items ?? [], W = z.data ?? [], G = he.data ?? [], K = H.filter((e) => e.status === "ACTIVE").length, ge = U.filter((e) => e.isPriority).length, q = U.filter((e) => [
|
|
51
58
|
"VULNERABLE",
|
|
52
59
|
"ENDANGERED",
|
|
53
60
|
"CRITICALLY_ENDANGERED"
|
|
54
|
-
].includes(e.conservationStatus)).length,
|
|
61
|
+
].includes(e.conservationStatus)).length, J = W.filter((e) => N.has(e.status)).length, Y = G.filter((e) => e.status === "ONLINE").length, X = G.filter((e) => [
|
|
55
62
|
"OFFLINE",
|
|
56
63
|
"DEGRADED",
|
|
57
64
|
"MAINTENANCE"
|
|
58
|
-
].includes(e.status)).length, Z =
|
|
59
|
-
let e =
|
|
65
|
+
].includes(e.status)).length, Z = ce(() => {
|
|
66
|
+
let e = B.data;
|
|
60
67
|
return e ? [
|
|
61
68
|
{
|
|
62
69
|
scope: "SCOPE_1",
|
|
@@ -74,128 +81,231 @@ function I() {
|
|
|
74
81
|
kg: e.scope3
|
|
75
82
|
}
|
|
76
83
|
] : [];
|
|
77
|
-
}, [
|
|
78
|
-
if (
|
|
84
|
+
}, [B.data]);
|
|
85
|
+
if (L.isLoading && R.isLoading && z.isLoading && B.isLoading) return /* @__PURE__ */ A(c, {
|
|
79
86
|
title: "EcoImpactHub",
|
|
80
87
|
titleGradient: !0,
|
|
81
88
|
aurora: !0,
|
|
82
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ A(ne, { label: "Loading your impact overview…" })
|
|
83
90
|
});
|
|
84
|
-
let
|
|
85
|
-
return /* @__PURE__ */
|
|
91
|
+
let _e = I?.firstName || I?.name || "there", Q = V.data?.items ?? [], $ = me.data?.items ?? [];
|
|
92
|
+
return /* @__PURE__ */ j(c, {
|
|
86
93
|
title: "EcoImpactHub",
|
|
87
94
|
titleGradient: !0,
|
|
88
95
|
aurora: !0,
|
|
89
|
-
description: `Welcome back, ${
|
|
96
|
+
description: `Welcome back, ${_e} — your environment, conservation & sustainability control room.`,
|
|
90
97
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ j("div", {
|
|
92
99
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6",
|
|
93
100
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
icon: /* @__PURE__ */
|
|
96
|
-
value:
|
|
101
|
+
/* @__PURE__ */ A(l, {
|
|
102
|
+
icon: /* @__PURE__ */ A(le, { className: "h-5 w-5" }),
|
|
103
|
+
value: L.data?.pageInfo?.hasMore ? `${H.length}+` : f(H.length),
|
|
97
104
|
label: "Monitored sites",
|
|
98
|
-
footer: /* @__PURE__ */
|
|
99
|
-
className: "
|
|
100
|
-
children: [
|
|
105
|
+
footer: /* @__PURE__ */ j("div", {
|
|
106
|
+
className: "space-y-2",
|
|
107
|
+
children: [/* @__PURE__ */ A(g, {
|
|
108
|
+
value: H.length ? K / H.length * 100 : 0,
|
|
109
|
+
height: 4,
|
|
110
|
+
barClassName: "bg-action-primary-bg"
|
|
111
|
+
}), /* @__PURE__ */ j("p", {
|
|
112
|
+
className: "text-xs text-text-tertiary",
|
|
113
|
+
children: [/* @__PURE__ */ A("span", {
|
|
114
|
+
className: "tabular-nums text-text-secondary",
|
|
115
|
+
children: K
|
|
116
|
+
}), " active"]
|
|
117
|
+
})]
|
|
101
118
|
})
|
|
102
119
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
icon: /* @__PURE__ */
|
|
105
|
-
value:
|
|
120
|
+
/* @__PURE__ */ A(l, {
|
|
121
|
+
icon: /* @__PURE__ */ A(ue, { className: "h-5 w-5" }),
|
|
122
|
+
value: R.data?.pageInfo?.hasMore ? `${U.length}+` : f(U.length),
|
|
106
123
|
label: "Species tracked",
|
|
107
|
-
accent:
|
|
108
|
-
footer: /* @__PURE__ */
|
|
109
|
-
className: "
|
|
110
|
-
children: [
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
124
|
+
accent: q > 0 ? "warning" : void 0,
|
|
125
|
+
footer: /* @__PURE__ */ j("div", {
|
|
126
|
+
className: "space-y-2",
|
|
127
|
+
children: [/* @__PURE__ */ A(g, {
|
|
128
|
+
value: U.length ? q / U.length * 100 : 0,
|
|
129
|
+
height: 4,
|
|
130
|
+
barClassName: "bg-status-warning-text"
|
|
131
|
+
}), /* @__PURE__ */ j("p", {
|
|
132
|
+
className: "text-xs text-text-tertiary",
|
|
133
|
+
children: [
|
|
134
|
+
/* @__PURE__ */ A("span", {
|
|
135
|
+
className: "tabular-nums text-text-secondary",
|
|
136
|
+
children: ge
|
|
137
|
+
}),
|
|
138
|
+
" priority ·",
|
|
139
|
+
" ",
|
|
140
|
+
/* @__PURE__ */ A("span", {
|
|
141
|
+
className: "tabular-nums text-text-secondary",
|
|
142
|
+
children: q
|
|
143
|
+
}),
|
|
144
|
+
" threatened"
|
|
145
|
+
]
|
|
146
|
+
})]
|
|
116
147
|
})
|
|
117
148
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
icon: /* @__PURE__ */
|
|
120
|
-
value:
|
|
149
|
+
/* @__PURE__ */ A(l, {
|
|
150
|
+
icon: /* @__PURE__ */ A(pe, { className: "h-5 w-5" }),
|
|
151
|
+
value: f(J),
|
|
121
152
|
label: "Active habitat projects",
|
|
122
|
-
footer: /* @__PURE__ */
|
|
123
|
-
className: "
|
|
124
|
-
children: [
|
|
153
|
+
footer: /* @__PURE__ */ j("div", {
|
|
154
|
+
className: "space-y-2",
|
|
155
|
+
children: [/* @__PURE__ */ A(g, {
|
|
156
|
+
value: W.length ? J / W.length * 100 : 0,
|
|
157
|
+
height: 4,
|
|
158
|
+
barClassName: "bg-action-primary-bg"
|
|
159
|
+
}), /* @__PURE__ */ j("p", {
|
|
160
|
+
className: "text-xs text-text-tertiary",
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ A("span", {
|
|
163
|
+
className: "tabular-nums text-text-secondary",
|
|
164
|
+
children: f(W.length)
|
|
165
|
+
}),
|
|
166
|
+
" ",
|
|
167
|
+
"total"
|
|
168
|
+
]
|
|
169
|
+
})]
|
|
125
170
|
})
|
|
126
171
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
icon: /* @__PURE__ */
|
|
129
|
-
value:
|
|
172
|
+
/* @__PURE__ */ A(l, {
|
|
173
|
+
icon: /* @__PURE__ */ A(D, { className: "h-5 w-5" }),
|
|
174
|
+
value: B.data ? u(B.data.total) : "—",
|
|
130
175
|
label: "Total footprint",
|
|
131
|
-
featured: !0
|
|
176
|
+
featured: !0,
|
|
177
|
+
footer: B.data && B.data.total > 0 ? /* @__PURE__ */ j("div", {
|
|
178
|
+
className: "space-y-2",
|
|
179
|
+
children: [/* @__PURE__ */ A(b, {
|
|
180
|
+
scope1: B.data.scope1,
|
|
181
|
+
scope2: B.data.scope2,
|
|
182
|
+
scope3: B.data.scope3,
|
|
183
|
+
height: 6
|
|
184
|
+
}), /* @__PURE__ */ A("p", {
|
|
185
|
+
className: "text-xs text-text-tertiary",
|
|
186
|
+
children: "Scope 1 · 2 · 3 split"
|
|
187
|
+
})]
|
|
188
|
+
}) : void 0
|
|
132
189
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
icon: /* @__PURE__ */
|
|
135
|
-
value:
|
|
190
|
+
/* @__PURE__ */ A(l, {
|
|
191
|
+
icon: /* @__PURE__ */ A(de, { className: "h-5 w-5" }),
|
|
192
|
+
value: f(Y),
|
|
136
193
|
label: "Sensors online",
|
|
137
194
|
accent: X > 0 ? "warning" : "success",
|
|
138
|
-
footer: /* @__PURE__ */
|
|
139
|
-
className: "
|
|
140
|
-
children: [
|
|
195
|
+
footer: /* @__PURE__ */ j("div", {
|
|
196
|
+
className: "space-y-2",
|
|
197
|
+
children: [/* @__PURE__ */ A(g, {
|
|
198
|
+
value: G.length ? Y / G.length * 100 : 0,
|
|
199
|
+
height: 4,
|
|
200
|
+
barClassName: "bg-status-success-text"
|
|
201
|
+
}), /* @__PURE__ */ j("p", {
|
|
202
|
+
className: "text-xs text-text-tertiary",
|
|
203
|
+
children: [/* @__PURE__ */ A("span", {
|
|
204
|
+
className: "tabular-nums text-text-secondary",
|
|
205
|
+
children: X
|
|
206
|
+
}), " need attention"]
|
|
207
|
+
})]
|
|
141
208
|
})
|
|
142
209
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
icon: /* @__PURE__ */
|
|
145
|
-
value:
|
|
210
|
+
/* @__PURE__ */ A(l, {
|
|
211
|
+
icon: /* @__PURE__ */ A(O, { className: "h-5 w-5" }),
|
|
212
|
+
value: V.data?.pageInfo?.hasMore ? `${Q.length}+` : f(Q.length),
|
|
146
213
|
label: "Open breaches",
|
|
147
|
-
accent: Q.length > 0 ? "error" : "success"
|
|
214
|
+
accent: Q.length > 0 ? "error" : "success",
|
|
215
|
+
footer: /* @__PURE__ */ A("p", {
|
|
216
|
+
className: Q.length > 0 ? "text-xs font-medium text-status-error-text" : "text-xs text-text-tertiary",
|
|
217
|
+
children: Q.length > 0 ? "Needs attention" : "All parameters in range"
|
|
218
|
+
})
|
|
148
219
|
})
|
|
149
220
|
]
|
|
150
221
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ j("div", {
|
|
152
223
|
className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
153
|
-
children: [/* @__PURE__ */ M
|
|
224
|
+
children: [/* @__PURE__ */ j(M, {
|
|
154
225
|
treatment: "glass",
|
|
155
226
|
className: "p-6 lg:col-span-2",
|
|
156
|
-
children: [/* @__PURE__ */
|
|
157
|
-
className: "mb-4 flex items-
|
|
158
|
-
children: [/* @__PURE__ */
|
|
227
|
+
children: [/* @__PURE__ */ j("div", {
|
|
228
|
+
className: "mb-4 flex flex-wrap items-start justify-between gap-3",
|
|
229
|
+
children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h2", {
|
|
159
230
|
className: "text-base font-semibold text-text-primary",
|
|
160
231
|
children: "Carbon footprint by scope"
|
|
161
|
-
}), /* @__PURE__ */
|
|
232
|
+
}), /* @__PURE__ */ A("p", {
|
|
162
233
|
className: "mt-0.5 text-sm text-text-secondary",
|
|
163
234
|
children: "GHG Protocol Scope 1 / 2 / 3 emissions (CO₂e)."
|
|
164
|
-
})] }), /* @__PURE__ */
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
235
|
+
})] }), /* @__PURE__ */ j("div", {
|
|
236
|
+
className: "flex items-center gap-4",
|
|
237
|
+
children: [B.data && B.data.total > 0 && /* @__PURE__ */ j("div", {
|
|
238
|
+
className: "text-right",
|
|
239
|
+
children: [/* @__PURE__ */ A("p", {
|
|
240
|
+
className: "text-lg font-semibold tabular-nums text-text-primary",
|
|
241
|
+
children: u(B.data.total)
|
|
242
|
+
}), /* @__PURE__ */ A("p", {
|
|
243
|
+
className: "text-xs text-text-tertiary",
|
|
244
|
+
children: "total"
|
|
245
|
+
})]
|
|
246
|
+
}), /* @__PURE__ */ j("button", {
|
|
247
|
+
type: "button",
|
|
248
|
+
onClick: () => F("carbon"),
|
|
249
|
+
className: "inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",
|
|
250
|
+
children: ["Ledger ", /* @__PURE__ */ A(T, { className: "h-4 w-4" })]
|
|
251
|
+
})]
|
|
169
252
|
})]
|
|
170
|
-
}), Z.every((e) => e.kg === 0) ? /* @__PURE__ */
|
|
253
|
+
}), Z.every((e) => e.kg === 0) ? /* @__PURE__ */ A(v, {
|
|
171
254
|
illustration: "empty-data",
|
|
172
|
-
icon: /* @__PURE__ */
|
|
255
|
+
icon: /* @__PURE__ */ A(D, { className: "h-10 w-10" }),
|
|
173
256
|
title: "No carbon entries yet",
|
|
174
257
|
description: "Record activity in the carbon ledger to see your Scope 1–3 footprint here."
|
|
175
|
-
}) : /* @__PURE__ */ j("div", {
|
|
258
|
+
}) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("div", {
|
|
176
259
|
className: "h-56",
|
|
177
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ A(n, {
|
|
178
261
|
width: "100%",
|
|
179
262
|
height: "100%",
|
|
180
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ j(te, {
|
|
181
264
|
data: Z,
|
|
182
265
|
margin: {
|
|
183
|
-
top:
|
|
266
|
+
top: 20,
|
|
184
267
|
right: 8,
|
|
185
268
|
left: 8,
|
|
186
269
|
bottom: 0
|
|
187
270
|
},
|
|
188
271
|
children: [
|
|
189
|
-
/* @__PURE__ */ j(
|
|
272
|
+
/* @__PURE__ */ A("defs", { children: Z.map((e) => /* @__PURE__ */ j("linearGradient", {
|
|
273
|
+
id: `ecoScopeGrad-${e.scope}`,
|
|
274
|
+
x1: "0",
|
|
275
|
+
y1: "0",
|
|
276
|
+
x2: "0",
|
|
277
|
+
y2: "1",
|
|
278
|
+
children: [/* @__PURE__ */ A("stop", {
|
|
279
|
+
offset: "0%",
|
|
280
|
+
style: {
|
|
281
|
+
stopColor: y[e.scope],
|
|
282
|
+
stopOpacity: 1
|
|
283
|
+
}
|
|
284
|
+
}), /* @__PURE__ */ A("stop", {
|
|
285
|
+
offset: "100%",
|
|
286
|
+
style: {
|
|
287
|
+
stopColor: y[e.scope],
|
|
288
|
+
stopOpacity: .55
|
|
289
|
+
}
|
|
290
|
+
})]
|
|
291
|
+
}, e.scope)) }),
|
|
292
|
+
/* @__PURE__ */ A(o, {
|
|
293
|
+
vertical: !1,
|
|
294
|
+
stroke: "var(--color-border-seam)",
|
|
295
|
+
strokeOpacity: .6,
|
|
296
|
+
strokeDasharray: "3 4"
|
|
297
|
+
}),
|
|
298
|
+
/* @__PURE__ */ A(s, {
|
|
190
299
|
dataKey: "label",
|
|
191
300
|
tick: {
|
|
192
301
|
fill: "var(--color-text-secondary)",
|
|
193
302
|
fontSize: 12
|
|
194
303
|
},
|
|
195
304
|
axisLine: { stroke: "var(--color-border-seam)" },
|
|
196
|
-
tickLine: !1
|
|
305
|
+
tickLine: !1,
|
|
306
|
+
dy: 4
|
|
197
307
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ A(ee, {
|
|
199
309
|
tick: {
|
|
200
310
|
fill: "var(--color-text-tertiary)",
|
|
201
311
|
fontSize: 11
|
|
@@ -205,7 +315,7 @@ function I() {
|
|
|
205
315
|
width: 48,
|
|
206
316
|
tickFormatter: (e) => e >= 1e3 ? `${Math.round(e / 1e3)}t` : `${e}`
|
|
207
317
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ A(t, {
|
|
209
319
|
cursor: {
|
|
210
320
|
fill: "var(--color-bg-sunken)",
|
|
211
321
|
opacity: .4
|
|
@@ -218,149 +328,195 @@ function I() {
|
|
|
218
328
|
},
|
|
219
329
|
formatter: (e) => [u(e), "Emissions"]
|
|
220
330
|
}),
|
|
221
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ j(a, {
|
|
222
332
|
dataKey: "kg",
|
|
223
333
|
radius: [
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
334
|
+
8,
|
|
335
|
+
8,
|
|
336
|
+
2,
|
|
337
|
+
2
|
|
228
338
|
],
|
|
229
|
-
maxBarSize:
|
|
230
|
-
children: [Z.map((e) => /* @__PURE__ */
|
|
339
|
+
maxBarSize: 72,
|
|
340
|
+
children: [Z.map((e) => /* @__PURE__ */ A(r, { fill: `url(#ecoScopeGrad-${e.scope})` }, e.scope)), /* @__PURE__ */ A(i, {
|
|
231
341
|
dataKey: "kg",
|
|
232
342
|
position: "top",
|
|
233
343
|
formatter: (e) => e > 0 ? u(e) : "",
|
|
234
344
|
style: {
|
|
235
345
|
fill: "var(--color-text-secondary)",
|
|
236
|
-
fontSize: 11
|
|
346
|
+
fontSize: 11,
|
|
347
|
+
fontWeight: 600
|
|
237
348
|
}
|
|
238
349
|
})]
|
|
239
350
|
})
|
|
240
351
|
]
|
|
241
352
|
})
|
|
242
353
|
})
|
|
243
|
-
})
|
|
244
|
-
|
|
354
|
+
}), /* @__PURE__ */ A(ie, {
|
|
355
|
+
data: Z,
|
|
356
|
+
className: "mt-4 border-t border-border-seam pt-4"
|
|
357
|
+
})] })]
|
|
358
|
+
}), /* @__PURE__ */ j(M, {
|
|
245
359
|
treatment: "glass",
|
|
246
360
|
className: "p-6",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
248
|
-
className: "mb-4 flex items-center justify-between",
|
|
249
|
-
children: [/* @__PURE__ */ j("
|
|
250
|
-
className: "
|
|
251
|
-
children: "
|
|
252
|
-
|
|
361
|
+
children: [/* @__PURE__ */ j("div", {
|
|
362
|
+
className: "mb-4 flex items-center justify-between gap-3",
|
|
363
|
+
children: [/* @__PURE__ */ j("div", {
|
|
364
|
+
className: "flex items-center gap-2",
|
|
365
|
+
children: [/* @__PURE__ */ A("h2", {
|
|
366
|
+
className: "text-base font-semibold text-text-primary",
|
|
367
|
+
children: "Recent breaches"
|
|
368
|
+
}), Q.length > 0 && /* @__PURE__ */ A("span", {
|
|
369
|
+
className: "rounded-full bg-status-error-bg-subtle px-2 py-0.5 text-xs font-medium tabular-nums text-status-error-text",
|
|
370
|
+
children: V.data?.pageInfo?.hasMore ? `${Q.length}+` : Q.length
|
|
371
|
+
})]
|
|
372
|
+
}), /* @__PURE__ */ j("button", {
|
|
253
373
|
type: "button",
|
|
254
|
-
onClick: () =>
|
|
374
|
+
onClick: () => F("monitoring"),
|
|
255
375
|
className: "inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",
|
|
256
|
-
children: ["Monitoring ", /* @__PURE__ */
|
|
376
|
+
children: ["Monitoring ", /* @__PURE__ */ A(T, { className: "h-4 w-4" })]
|
|
257
377
|
})]
|
|
258
|
-
}), Q.length === 0 ? /* @__PURE__ */
|
|
259
|
-
className: "flex flex-col items-center justify-center py-
|
|
260
|
-
children: [
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
378
|
+
}), Q.length === 0 ? /* @__PURE__ */ j("div", {
|
|
379
|
+
className: "flex flex-col items-center justify-center rounded-xl border border-dashed border-border-seam py-10 text-center",
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ A("span", {
|
|
382
|
+
className: "flex size-12 items-center justify-center rounded-full bg-status-success-bg-subtle",
|
|
383
|
+
children: /* @__PURE__ */ A(fe, { className: "h-6 w-6 text-status-success-text" })
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ A("p", {
|
|
386
|
+
className: "mt-3 text-sm font-medium text-text-primary",
|
|
387
|
+
children: "All parameters in range"
|
|
388
|
+
}),
|
|
389
|
+
/* @__PURE__ */ A("p", {
|
|
390
|
+
className: "mt-1 text-xs text-text-tertiary",
|
|
391
|
+
children: "No open threshold breaches."
|
|
392
|
+
})
|
|
393
|
+
]
|
|
394
|
+
}) : /* @__PURE__ */ A("ul", {
|
|
395
|
+
className: "space-y-2.5",
|
|
396
|
+
children: Q.map((e) => /* @__PURE__ */ j("li", {
|
|
397
|
+
className: "flex items-start justify-between gap-3 rounded-xl bg-bg-sunken/50 p-3",
|
|
398
|
+
children: [/* @__PURE__ */ j("div", {
|
|
399
|
+
className: "flex min-w-0 items-start gap-2.5",
|
|
400
|
+
children: [/* @__PURE__ */ A("span", {
|
|
401
|
+
"aria-hidden": "true",
|
|
402
|
+
className: "mt-1.5 size-2 shrink-0 rounded-full bg-status-error-text motion-safe:animate-vc-glow-pulse"
|
|
403
|
+
}), /* @__PURE__ */ j("div", {
|
|
404
|
+
className: "min-w-0",
|
|
405
|
+
children: [/* @__PURE__ */ A("p", {
|
|
406
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
407
|
+
children: e.parameter
|
|
408
|
+
}), /* @__PURE__ */ j("p", {
|
|
409
|
+
className: "text-xs text-text-tertiary",
|
|
410
|
+
children: [
|
|
411
|
+
/* @__PURE__ */ j("span", {
|
|
412
|
+
className: "tabular-nums",
|
|
413
|
+
children: [
|
|
414
|
+
f(e.value),
|
|
415
|
+
" ",
|
|
416
|
+
e.unit
|
|
417
|
+
]
|
|
418
|
+
}),
|
|
419
|
+
" ",
|
|
420
|
+
"· ",
|
|
421
|
+
m(e.recordedAt)
|
|
422
|
+
]
|
|
423
|
+
})]
|
|
282
424
|
})]
|
|
283
|
-
}), /* @__PURE__ */
|
|
425
|
+
}), /* @__PURE__ */ A(h, { status: "BREACH" })]
|
|
284
426
|
}, e.id))
|
|
285
427
|
})]
|
|
286
428
|
})]
|
|
287
429
|
}),
|
|
288
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ A(_, {
|
|
289
431
|
title: "Recent field observations",
|
|
290
432
|
description: "Latest wildlife & biodiversity sightings recorded across your sites.",
|
|
291
|
-
action: /* @__PURE__ */
|
|
433
|
+
action: /* @__PURE__ */ j("button", {
|
|
292
434
|
type: "button",
|
|
293
|
-
onClick: () =>
|
|
435
|
+
onClick: () => F("observations"),
|
|
294
436
|
className: "inline-flex items-center gap-1 text-sm font-medium text-accent hover:underline",
|
|
295
|
-
children: ["All observations ", /* @__PURE__ */
|
|
437
|
+
children: ["All observations ", /* @__PURE__ */ A(T, { className: "h-4 w-4" })]
|
|
296
438
|
}),
|
|
297
|
-
children: $.length === 0 ? /* @__PURE__ */
|
|
439
|
+
children: $.length === 0 ? /* @__PURE__ */ A(v, {
|
|
298
440
|
illustration: "empty-data",
|
|
299
|
-
icon: /* @__PURE__ */
|
|
441
|
+
icon: /* @__PURE__ */ A(E, { className: "h-10 w-10" }),
|
|
300
442
|
title: "No observations yet",
|
|
301
443
|
description: "Record your first field observation to build your biodiversity dataset."
|
|
302
|
-
}) : /* @__PURE__ */
|
|
444
|
+
}) : /* @__PURE__ */ A("div", {
|
|
303
445
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
304
|
-
children: $.map((e) => /* @__PURE__ */ M
|
|
446
|
+
children: $.map((e) => /* @__PURE__ */ j(M, {
|
|
305
447
|
treatment: "plain",
|
|
306
|
-
className: "p-4",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
448
|
+
className: "p-4 transition-shadow hover:shadow-float",
|
|
449
|
+
children: [/* @__PURE__ */ j("div", {
|
|
308
450
|
className: "flex items-start justify-between gap-2",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
310
|
-
className: "min-w-0",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
312
|
-
className: "
|
|
313
|
-
children:
|
|
314
|
-
}),
|
|
315
|
-
className: "
|
|
316
|
-
children:
|
|
451
|
+
children: [/* @__PURE__ */ j("div", {
|
|
452
|
+
className: "flex min-w-0 items-start gap-2.5",
|
|
453
|
+
children: [/* @__PURE__ */ A("span", {
|
|
454
|
+
className: "mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-accent",
|
|
455
|
+
children: /* @__PURE__ */ A(E, { className: "h-4 w-4" })
|
|
456
|
+
}), /* @__PURE__ */ j("div", {
|
|
457
|
+
className: "min-w-0",
|
|
458
|
+
children: [/* @__PURE__ */ A("p", {
|
|
459
|
+
className: "truncate text-sm font-semibold text-text-primary",
|
|
460
|
+
children: e.species?.commonName ?? "Unknown species"
|
|
461
|
+
}), e.species?.scientificName && /* @__PURE__ */ A("p", {
|
|
462
|
+
className: "truncate text-xs italic text-text-tertiary",
|
|
463
|
+
children: e.species.scientificName
|
|
464
|
+
})]
|
|
317
465
|
})]
|
|
318
|
-
}), /* @__PURE__ */ M("span", {
|
|
319
|
-
className: "shrink-0 rounded-full bg-bg-sunken px-2 py-0.5 text-xs tabular-nums text-text-secondary",
|
|
320
|
-
children: ["×", d(e.count)]
|
|
321
|
-
})]
|
|
322
|
-
}), /* @__PURE__ */ M("div", {
|
|
323
|
-
className: "mt-3 flex items-center justify-between",
|
|
324
|
-
children: [/* @__PURE__ */ j("span", {
|
|
325
|
-
className: "text-xs text-text-tertiary",
|
|
326
|
-
children: te(e.method)
|
|
327
466
|
}), /* @__PURE__ */ j("span", {
|
|
467
|
+
className: "shrink-0 rounded-full bg-[var(--color-accent-soft)] px-2 py-0.5 text-xs font-medium tabular-nums text-text-primary",
|
|
468
|
+
children: ["×", f(e.count)]
|
|
469
|
+
})]
|
|
470
|
+
}), /* @__PURE__ */ j("div", {
|
|
471
|
+
className: "mt-3 flex items-center justify-between border-t border-border-seam/70 pt-2.5",
|
|
472
|
+
children: [/* @__PURE__ */ A("span", {
|
|
473
|
+
className: "rounded-full bg-bg-sunken px-2 py-0.5 text-xs text-text-secondary",
|
|
474
|
+
children: d(e.method)
|
|
475
|
+
}), /* @__PURE__ */ A("span", {
|
|
328
476
|
className: "text-xs text-text-tertiary",
|
|
329
|
-
children:
|
|
477
|
+
children: m(e.observedAt)
|
|
330
478
|
})]
|
|
331
479
|
})]
|
|
332
480
|
}, e.id))
|
|
333
481
|
})
|
|
334
482
|
}),
|
|
335
|
-
|
|
483
|
+
U.length > 0 && /* @__PURE__ */ A(_, {
|
|
336
484
|
title: "Conservation status",
|
|
337
485
|
description: "Distribution of tracked species by IUCN-style status.",
|
|
338
|
-
children: /* @__PURE__ */
|
|
486
|
+
children: /* @__PURE__ */ A(M, {
|
|
339
487
|
treatment: "plain",
|
|
340
488
|
className: "p-6",
|
|
341
|
-
children: /* @__PURE__ */
|
|
342
|
-
className: "space-y-3",
|
|
489
|
+
children: /* @__PURE__ */ A("div", {
|
|
490
|
+
className: "space-y-3.5",
|
|
343
491
|
children: (() => {
|
|
344
492
|
let e = /* @__PURE__ */ new Map();
|
|
345
|
-
for (let t of
|
|
346
|
-
let t =
|
|
347
|
-
return [...e.entries()].sort((e, t) => t[1] - e[1]).map(([e, n]) =>
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
493
|
+
for (let t of U) e.set(t.conservationStatus, (e.get(t.conservationStatus) ?? 0) + 1);
|
|
494
|
+
let t = U.length;
|
|
495
|
+
return [...e.entries()].sort((e, t) => t[1] - e[1]).map(([e, n]) => {
|
|
496
|
+
let r = n / t * 100, i = P[e] ?? "var(--color-text-tertiary)";
|
|
497
|
+
return /* @__PURE__ */ j("div", {
|
|
498
|
+
className: "flex items-center gap-3 sm:gap-4",
|
|
499
|
+
children: [
|
|
500
|
+
/* @__PURE__ */ A("div", {
|
|
501
|
+
className: "w-36 shrink-0 sm:w-48",
|
|
502
|
+
children: /* @__PURE__ */ A(h, { status: e })
|
|
503
|
+
}),
|
|
504
|
+
/* @__PURE__ */ A(re, {
|
|
505
|
+
value: r,
|
|
506
|
+
color: i,
|
|
507
|
+
className: "flex-1"
|
|
508
|
+
}),
|
|
509
|
+
/* @__PURE__ */ A("span", {
|
|
510
|
+
className: "w-9 shrink-0 text-right text-sm font-medium tabular-nums text-text-primary",
|
|
511
|
+
children: n
|
|
512
|
+
}),
|
|
513
|
+
/* @__PURE__ */ A("span", {
|
|
514
|
+
className: "hidden w-12 shrink-0 text-right text-xs tabular-nums text-text-tertiary sm:inline",
|
|
515
|
+
children: p(r)
|
|
516
|
+
})
|
|
517
|
+
]
|
|
518
|
+
}, e);
|
|
519
|
+
});
|
|
364
520
|
})()
|
|
365
521
|
})
|
|
366
522
|
})
|
|
@@ -369,6 +525,6 @@ function I() {
|
|
|
369
525
|
});
|
|
370
526
|
}
|
|
371
527
|
//#endregion
|
|
372
|
-
export {
|
|
528
|
+
export { F as DashboardPage };
|
|
373
529
|
|
|
374
530
|
//# sourceMappingURL=DashboardPage.js.map
|