@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.
Files changed (178) hide show
  1. package/dist/dev/main.d.ts +2 -0
  2. package/dist/dev/main.d.ts.map +1 -0
  3. package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts +5 -0
  4. package/dist/ecoimpacthub/EcoImpactHubRoot.d.ts.map +1 -0
  5. package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts +4 -0
  6. package/dist/ecoimpacthub/EcoImpactHubRoutes.d.ts.map +1 -0
  7. package/dist/ecoimpacthub/EcoImpactHubRoutes.js +48 -40
  8. package/dist/ecoimpacthub/EcoImpactHubRoutes.js.map +1 -1
  9. package/dist/ecoimpacthub/components/DataTable.d.ts +28 -0
  10. package/dist/ecoimpacthub/components/DataTable.d.ts.map +1 -0
  11. package/dist/ecoimpacthub/components/EcoDiscussion.d.ts +18 -0
  12. package/dist/ecoimpacthub/components/EcoDiscussion.d.ts.map +1 -0
  13. package/dist/ecoimpacthub/components/EcoTags.d.ts +17 -0
  14. package/dist/ecoimpacthub/components/EcoTags.d.ts.map +1 -0
  15. package/dist/ecoimpacthub/components/EmptyState.d.ts +18 -0
  16. package/dist/ecoimpacthub/components/EmptyState.d.ts.map +1 -0
  17. package/dist/ecoimpacthub/components/EvidenceUpload.d.ts +14 -0
  18. package/dist/ecoimpacthub/components/EvidenceUpload.d.ts.map +1 -0
  19. package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts +10 -0
  20. package/dist/ecoimpacthub/components/FeatureFlagGate.d.ts.map +1 -0
  21. package/dist/ecoimpacthub/components/FeatureFlagGate.js +8 -0
  22. package/dist/ecoimpacthub/components/FeatureFlagGate.js.map +1 -0
  23. package/dist/ecoimpacthub/components/FileLink.d.ts +15 -0
  24. package/dist/ecoimpacthub/components/FileLink.d.ts.map +1 -0
  25. package/dist/ecoimpacthub/components/FilterTabs.d.ts +18 -0
  26. package/dist/ecoimpacthub/components/FilterTabs.d.ts.map +1 -0
  27. package/dist/ecoimpacthub/components/MetricsCard.d.ts +23 -0
  28. package/dist/ecoimpacthub/components/MetricsCard.d.ts.map +1 -0
  29. package/dist/ecoimpacthub/components/MiniBar.d.ts +16 -0
  30. package/dist/ecoimpacthub/components/MiniBar.d.ts.map +1 -0
  31. package/dist/ecoimpacthub/components/PageLayout.d.ts +16 -0
  32. package/dist/ecoimpacthub/components/PageLayout.d.ts.map +1 -0
  33. package/dist/ecoimpacthub/components/Pagination.d.ts +22 -0
  34. package/dist/ecoimpacthub/components/Pagination.d.ts.map +1 -0
  35. package/dist/ecoimpacthub/components/StateViews.d.ts +24 -0
  36. package/dist/ecoimpacthub/components/StateViews.d.ts.map +1 -0
  37. package/dist/ecoimpacthub/components/StatusBadge.d.ts +9 -0
  38. package/dist/ecoimpacthub/components/StatusBadge.d.ts.map +1 -0
  39. package/dist/ecoimpacthub/components/Tabs.d.ts +17 -0
  40. package/dist/ecoimpacthub/components/Tabs.d.ts.map +1 -0
  41. package/dist/ecoimpacthub/components/index.d.ts +19 -0
  42. package/dist/ecoimpacthub/components/index.d.ts.map +1 -0
  43. package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts +16 -0
  44. package/dist/ecoimpacthub/context/EcoImpactHubContext.d.ts.map +1 -0
  45. package/dist/ecoimpacthub/context/index.d.ts +6 -0
  46. package/dist/ecoimpacthub/context/index.d.ts.map +1 -0
  47. package/dist/ecoimpacthub/hooks/index.d.ts +10 -0
  48. package/dist/ecoimpacthub/hooks/index.d.ts.map +1 -0
  49. package/dist/ecoimpacthub/hooks/useCursorPager.d.ts +33 -0
  50. package/dist/ecoimpacthub/hooks/useCursorPager.d.ts.map +1 -0
  51. package/dist/ecoimpacthub/hooks/useEcoComments.d.ts +36 -0
  52. package/dist/ecoimpacthub/hooks/useEcoComments.d.ts.map +1 -0
  53. package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts +47 -0
  54. package/dist/ecoimpacthub/hooks/useEcoFiles.d.ts.map +1 -0
  55. package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts +104 -0
  56. package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts.map +1 -0
  57. package/dist/ecoimpacthub/hooks/useEcoTags.d.ts +44 -0
  58. package/dist/ecoimpacthub/hooks/useEcoTags.d.ts.map +1 -0
  59. package/dist/ecoimpacthub/index.d.ts +10 -0
  60. package/dist/ecoimpacthub/index.d.ts.map +1 -0
  61. package/dist/ecoimpacthub/index.js +2 -0
  62. package/dist/ecoimpacthub/pages/DashboardPage.d.ts +10 -0
  63. package/dist/ecoimpacthub/pages/DashboardPage.d.ts.map +1 -0
  64. package/dist/ecoimpacthub/pages/DashboardPage.js +345 -189
  65. package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
  66. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts +9 -0
  67. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.d.ts.map +1 -0
  68. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js +58 -0
  69. package/dist/ecoimpacthub/pages/_shared/ConservationBadge.js.map +1 -0
  70. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts +23 -0
  71. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.d.ts.map +1 -0
  72. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js +70 -0
  73. package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js.map +1 -0
  74. package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts +9 -0
  75. package/dist/ecoimpacthub/pages/_shared/MethodBadge.d.ts.map +1 -0
  76. package/dist/ecoimpacthub/pages/_shared/MethodBadge.js +51 -0
  77. package/dist/ecoimpacthub/pages/_shared/MethodBadge.js.map +1 -0
  78. package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts +9 -0
  79. package/dist/ecoimpacthub/pages/_shared/TaxonChip.d.ts.map +1 -0
  80. package/dist/ecoimpacthub/pages/_shared/TaxonChip.js +29 -0
  81. package/dist/ecoimpacthub/pages/_shared/TaxonChip.js.map +1 -0
  82. package/dist/ecoimpacthub/pages/badges.d.ts +27 -0
  83. package/dist/ecoimpacthub/pages/badges.d.ts.map +1 -0
  84. package/dist/ecoimpacthub/pages/badges.js +71 -0
  85. package/dist/ecoimpacthub/pages/badges.js.map +1 -0
  86. package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts +15 -0
  87. package/dist/ecoimpacthub/pages/carbon/CarbonPage.d.ts.map +1 -0
  88. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +337 -300
  89. package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
  90. package/dist/ecoimpacthub/pages/carbonVisuals.d.ts +47 -0
  91. package/dist/ecoimpacthub/pages/carbonVisuals.d.ts.map +1 -0
  92. package/dist/ecoimpacthub/pages/carbonVisuals.js +89 -0
  93. package/dist/ecoimpacthub/pages/carbonVisuals.js.map +1 -0
  94. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts +12 -0
  95. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.d.ts.map +1 -0
  96. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +252 -218
  97. package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
  98. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts +8 -0
  99. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.d.ts.map +1 -0
  100. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +15 -12
  101. package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
  102. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts +6 -0
  103. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.d.ts.map +1 -0
  104. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js +168 -0
  105. package/dist/ecoimpacthub/pages/habitat/LifecycleProgress.js.map +1 -0
  106. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts +12 -0
  107. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.d.ts.map +1 -0
  108. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js +30 -17
  109. package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js.map +1 -1
  110. package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts +11 -0
  111. package/dist/ecoimpacthub/pages/observations/ObservationsPage.d.ts.map +1 -0
  112. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +236 -219
  113. package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
  114. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts +11 -0
  115. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.d.ts.map +1 -0
  116. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +248 -212
  117. package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
  118. package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts +8 -0
  119. package/dist/ecoimpacthub/pages/reports/ReportsPage.d.ts.map +1 -0
  120. package/dist/ecoimpacthub/pages/reports/ReportsPage.js +119 -118
  121. package/dist/ecoimpacthub/pages/reports/ReportsPage.js.map +1 -1
  122. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts +10 -0
  123. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.d.ts.map +1 -0
  124. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +498 -370
  125. package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
  126. package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts +8 -0
  127. package/dist/ecoimpacthub/pages/sites/SitesPage.d.ts.map +1 -0
  128. package/dist/ecoimpacthub/pages/sites/SitesPage.js +109 -99
  129. package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
  130. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts +22 -0
  131. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.d.ts.map +1 -0
  132. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js +64 -0
  133. package/dist/ecoimpacthub/pages/sites/siteTypeVisuals.js.map +1 -0
  134. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts +9 -0
  135. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.d.ts.map +1 -0
  136. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +275 -259
  137. package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
  138. package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts +8 -0
  139. package/dist/ecoimpacthub/pages/species/SpeciesPage.d.ts.map +1 -0
  140. package/dist/ecoimpacthub/pages/species/SpeciesPage.js +235 -177
  141. package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
  142. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts +33 -0
  143. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.d.ts.map +1 -0
  144. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js +42 -0
  145. package/dist/ecoimpacthub/services/createSandboxAssistantTransport.js.map +1 -0
  146. package/dist/ecoimpacthub/services/index.d.ts +6 -0
  147. package/dist/ecoimpacthub/services/index.d.ts.map +1 -0
  148. package/dist/ecoimpacthub/services/index.js +1 -0
  149. package/dist/ecoimpacthub/types/index.d.ts +417 -0
  150. package/dist/ecoimpacthub/types/index.d.ts.map +1 -0
  151. package/dist/ecoimpacthub/utils/cn.d.ts +4 -0
  152. package/dist/ecoimpacthub/utils/cn.d.ts.map +1 -0
  153. package/dist/ecoimpacthub/utils/formatters.d.ts +26 -0
  154. package/dist/ecoimpacthub/utils/formatters.d.ts.map +1 -0
  155. package/dist/ecoimpacthub/utils/i18n.d.ts +6 -0
  156. package/dist/ecoimpacthub/utils/i18n.d.ts.map +1 -0
  157. package/dist/ecoimpacthub/utils/index.d.ts +9 -0
  158. package/dist/ecoimpacthub/utils/index.d.ts.map +1 -0
  159. package/dist/ecoimpacthub/utils/navigation.d.ts +14 -0
  160. package/dist/ecoimpacthub/utils/navigation.d.ts.map +1 -0
  161. package/dist/generated/global-operations.d.ts +2 -0
  162. package/dist/generated/global-operations.d.ts.map +1 -0
  163. package/dist/generated/global-types.d.ts +18199 -0
  164. package/dist/generated/global-types.d.ts.map +1 -0
  165. package/dist/generated/wspace-operations.d.ts +2 -0
  166. package/dist/generated/wspace-operations.d.ts.map +1 -0
  167. package/dist/generated/wspace-types.d.ts +43046 -0
  168. package/dist/generated/wspace-types.d.ts.map +1 -0
  169. package/dist/index.d.ts +2 -0
  170. package/dist/index.d.ts.map +1 -0
  171. package/dist/index.js +2 -1
  172. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +305 -0
  173. package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +1 -0
  174. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +44 -33
  175. package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
  176. package/dist/node_modules/recharts/es6/util/ChartUtils.js +31 -23
  177. package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
  178. package/package.json +5 -1
@@ -1,37 +1,37 @@
1
1
  import { PageLayout as e } from "../../components/PageLayout.js";
2
2
  import { MetricsCard as t } from "../../components/MetricsCard.js";
3
- import { formatCo2e as n, formatDate as ee, formatEnumLabel as r, formatNumber as i } from "../../utils/formatters.js";
4
- import { StatusBadge as a } from "../../components/StatusBadge.js";
5
- import { MiniBar as te } from "../../components/MiniBar.js";
6
- import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js";
7
- import { EmptyState as c } from "../../components/EmptyState.js";
8
- import { useEcoCarbonEntries as ne, useEcoCarbonTotals as re, useEcoCreateEmissionFactor as ie, useEcoCreateReductionTarget as ae, useEcoEmissionFactors as oe, useEcoRecordCarbonEntry as se, useEcoReductionTargets as ce, useEcoSetReductionTargetStatus as le, useEcoSites as ue, useEcoVerifyCarbonEntry as de } from "../../hooks/useEcoImpactHubApi.js";
9
- import { useCursorPager as fe } from "../../hooks/useCursorPager.js";
3
+ import { formatCo2e as n, formatDate as r, formatEnumLabel as i, formatNumber as a, formatPercent as o } from "../../utils/formatters.js";
4
+ import { StatusBadge as s } from "../../components/StatusBadge.js";
5
+ import { ErrorView as c, LoadingView as l } from "../../components/StateViews.js";
6
+ import { EmptyState as ee } from "../../components/EmptyState.js";
7
+ import { Meter as te, SCOPE_HUE as ne, ScopeSplitBar as re } from "../carbonVisuals.js";
8
+ import { useEcoCarbonEntries as ie, useEcoCarbonTotals as ae, useEcoCreateEmissionFactor as oe, useEcoCreateReductionTarget as se, useEcoEmissionFactors as ce, useEcoRecordCarbonEntry as le, useEcoReductionTargets as ue, useEcoSetReductionTargetStatus as de, useEcoSites as fe, useEcoVerifyCarbonEntry as pe } from "../../hooks/useEcoImpactHubApi.js";
9
+ import { useCursorPager as me } from "../../hooks/useCursorPager.js";
10
10
  import "../../hooks/index.js";
11
- import { DataTable as l } from "../../components/DataTable.js";
12
- import { Tabs as pe } from "../../components/Tabs.js";
13
- import { Pagination as me } from "../../components/Pagination.js";
14
- import { useMemo as he, useState as u } from "react";
15
- import { Factory as d, Flame as ge, Leaf as _e, Plus as f, Target as ve, Truck as ye, Zap as be } from "lucide-react";
16
- import { Fragment as xe, jsx as p, jsxs as m } from "react/jsx-runtime";
17
- import { Button as h, Input as g, Label as _, ResponsiveDialog as v, ResponsiveDialogContent as Se, ResponsiveDialogDescription as y, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as Ce } from "@burdenoff/fe-libs/ui";
11
+ import { DataTable as u } from "../../components/DataTable.js";
12
+ import { Tabs as he } from "../../components/Tabs.js";
13
+ import { Pagination as ge } from "../../components/Pagination.js";
14
+ import { useMemo as _e, useState as d } from "react";
15
+ import { Factory as f, Flame as ve, Leaf as ye, Plus as p, Target as be, Truck as xe, Zap as Se } from "lucide-react";
16
+ import { Fragment as Ce, jsx as m, jsxs as h } from "react/jsx-runtime";
17
+ import { Button as g, Input as _, Label as v, ResponsiveDialog as we, ResponsiveDialogContent as y, ResponsiveDialogDescription as Te, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Select as C, SelectContent as w, SelectItem as T, SelectTrigger as E, SelectValue as D, Textarea as Ee } from "@burdenoff/fe-libs/ui";
18
18
  //#region src/ecoimpacthub/pages/carbon/CarbonPage.tsx
19
19
  var O = [
20
20
  "SCOPE_1",
21
21
  "SCOPE_2",
22
22
  "SCOPE_3"
23
- ], we = [
23
+ ], De = [
24
24
  "DRAFT",
25
25
  "RECORDED",
26
26
  "VERIFIED",
27
27
  "ADJUSTED"
28
- ], Te = [
28
+ ], Oe = [
29
29
  "PROPOSED",
30
30
  "ACTIVE",
31
31
  "ACHIEVED",
32
32
  "MISSED",
33
33
  "RETIRED"
34
- ], Ee = 25, De = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), k = {
34
+ ], ke = 25, Ae = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), k = {
35
35
  category: "",
36
36
  scope: "SCOPE_1",
37
37
  activityValue: "",
@@ -56,60 +56,80 @@ var O = [
56
56
  targetYear: "",
57
57
  unit: "",
58
58
  description: ""
59
- }, Oe = (e) => Math.max(0, Math.min(100, e));
60
- function M() {
61
- let [M, ke] = u("ledger"), [N, Ae] = u("ALL"), [P, je] = u("ALL"), [F, Me] = u("ALL"), I = fe(), [L, Ne] = u("ALL"), [R, Pe] = u("ALL"), [Fe, z] = u(!1), [B, V] = u(k), [Ie, H] = u(!1), [U, W] = u(A), [Le, G] = u(!1), [K, q] = u(j), [J, Y] = u(null), Re = ue({ pagination: {
59
+ }, je = (e) => Math.max(0, Math.min(100, e)), Me = {
60
+ PROPOSED: "var(--color-text-tertiary)",
61
+ ACTIVE: "var(--color-action-primary-bg)",
62
+ ACHIEVED: "var(--color-status-success-text)",
63
+ MISSED: "var(--color-status-error-text)",
64
+ RETIRED: "var(--color-text-tertiary)"
65
+ }, M = (e, t, n) => {
66
+ if (e == null || t == null || t <= 0) return;
67
+ let r = e / t * 100;
68
+ return /* @__PURE__ */ h("div", {
69
+ className: "space-y-2",
70
+ children: [/* @__PURE__ */ m(te, {
71
+ value: r,
72
+ color: ne[n],
73
+ height: 4
74
+ }), /* @__PURE__ */ h("p", {
75
+ className: "text-xs tabular-nums text-text-tertiary",
76
+ children: [o(r), " of total"]
77
+ })]
78
+ });
79
+ };
80
+ function N() {
81
+ let [o, ne] = d("ledger"), [N, Ne] = d("ALL"), [P, Pe] = d("ALL"), [F, Fe] = d("ALL"), I = me(), [L, Ie] = d("ALL"), [R, Le] = d("ALL"), [Re, z] = d(!1), [B, V] = d(k), [ze, H] = d(!1), [U, W] = d(A), [Be, G] = d(!1), [K, q] = d(j), [J, Y] = d(null), Ve = fe({ pagination: {
62
82
  limit: 100,
63
83
  offset: 0
64
- } }), ze = he(() => {
84
+ } }), He = _e(() => {
65
85
  let e = {};
66
- for (let t of Re.data?.items ?? []) e[t.id] = t.name;
86
+ for (let t of Ve.data?.items ?? []) e[t.id] = t.name;
67
87
  return e;
68
- }, [Re.data]), X = re(), Z = ne({
88
+ }, [Ve.data]), X = ae(), Z = ie({
69
89
  scope: N === "ALL" ? void 0 : N,
70
90
  siteId: F === "ALL" ? void 0 : F,
71
91
  status: P === "ALL" ? void 0 : P,
72
92
  pagination: {
73
- limit: Ee,
93
+ limit: ke,
74
94
  cursor: I.cursor
75
95
  }
76
- }), Be = Z.data?.items ?? [], Ve = oe(), Q = oe(L === "ALL" ? void 0 : L), He = Q.data ?? [], $ = ce(R === "ALL" ? void 0 : R), Ue = $.data ?? [], We = se(), Ge = de(), Ke = ie(), qe = ae(), Je = le(), Ye = () => {
96
+ }), Ue = Z.data?.items ?? [], We = ce(), Q = ce(L === "ALL" ? void 0 : L), Ge = Q.data ?? [], $ = ue(R === "ALL" ? void 0 : R), Ke = $.data ?? [], qe = le(), Je = pe(), Ye = oe(), Xe = se(), Ze = de(), Qe = () => {
77
97
  V({
78
98
  ...k,
79
- periodStart: De()
99
+ periodStart: Ae()
80
100
  }), Y(null), z(!0);
81
- }, Xe = () => {
101
+ }, $e = () => {
82
102
  W(A), Y(null), H(!0);
83
- }, Ze = () => {
103
+ }, et = () => {
84
104
  q(j), Y(null), G(!0);
85
- }, Qe = async () => {
105
+ }, tt = async () => {
86
106
  if (!B.category.trim() || !B.activityValue || !B.activityUnit.trim()) {
87
107
  Y("Category, activity value and unit are required.");
88
108
  return;
89
109
  }
90
110
  Y(null);
91
111
  try {
92
- await We.mutateAsync({
112
+ await qe.mutateAsync({
93
113
  category: B.category.trim(),
94
114
  scope: B.scope,
95
115
  activityValue: Number(B.activityValue),
96
116
  activityUnit: B.activityUnit.trim(),
97
117
  factorId: B.factorId || null,
98
118
  siteId: B.siteId || null,
99
- periodStart: new Date(B.periodStart || De()).toISOString(),
119
+ periodStart: new Date(B.periodStart || Ae()).toISOString(),
100
120
  notes: B.notes.trim() || null
101
121
  }), z(!1), V(k);
102
122
  } catch (e) {
103
123
  Y(e instanceof Error ? e.message : "Failed to record carbon entry.");
104
124
  }
105
- }, $e = async () => {
125
+ }, nt = async () => {
106
126
  if (!U.name.trim() || !U.activityUnit.trim() || !U.factorKgco2e) {
107
127
  Y("Name, activity unit and factor value are required.");
108
128
  return;
109
129
  }
110
130
  Y(null);
111
131
  try {
112
- await Ke.mutateAsync({
132
+ await Ye.mutateAsync({
113
133
  name: U.name.trim(),
114
134
  scope: U.scope,
115
135
  activityUnit: U.activityUnit.trim(),
@@ -120,7 +140,7 @@ function M() {
120
140
  } catch (e) {
121
141
  Y(e instanceof Error ? e.message : "Failed to create emission factor.");
122
142
  }
123
- }, et = async () => {
143
+ }, rt = async () => {
124
144
  if (!K.name.trim() || !K.metric.trim() || !K.baselineValue || !K.baselineYear || !K.targetValue || !K.targetYear || !K.unit.trim()) {
125
145
  Y("All fields except description are required.");
126
146
  return;
@@ -131,7 +151,7 @@ function M() {
131
151
  }
132
152
  Y(null);
133
153
  try {
134
- await qe.mutateAsync({
154
+ await Xe.mutateAsync({
135
155
  name: K.name.trim(),
136
156
  metric: K.metric.trim(),
137
157
  baselineValue: Number(K.baselineValue),
@@ -144,11 +164,11 @@ function M() {
144
164
  } catch (e) {
145
165
  Y(e instanceof Error ? e.message : "Failed to create reduction target.");
146
166
  }
147
- }, tt = [
167
+ }, it = [
148
168
  {
149
169
  key: "category",
150
170
  header: "Category",
151
- render: (e) => /* @__PURE__ */ p("span", {
171
+ render: (e) => /* @__PURE__ */ m("span", {
152
172
  className: "font-medium text-text-primary",
153
173
  children: e.category
154
174
  })
@@ -156,7 +176,7 @@ function M() {
156
176
  {
157
177
  key: "scope",
158
178
  header: "Scope",
159
- render: (e) => /* @__PURE__ */ p(a, { status: e.scope })
179
+ render: (e) => /* @__PURE__ */ m(s, { status: e.scope })
160
180
  },
161
181
  {
162
182
  key: "activity",
@@ -164,10 +184,10 @@ function M() {
164
184
  align: "right",
165
185
  hideOnMobile: !0,
166
186
  sortValue: (e) => e.activityValue,
167
- render: (e) => /* @__PURE__ */ m("span", {
187
+ render: (e) => /* @__PURE__ */ h("span", {
168
188
  className: "tabular-nums text-text-secondary",
169
189
  children: [
170
- i(e.activityValue),
190
+ a(e.activityValue),
171
191
  " ",
172
192
  e.activityUnit
173
193
  ]
@@ -178,7 +198,7 @@ function M() {
178
198
  header: "CO₂e",
179
199
  align: "right",
180
200
  sortValue: (e) => e.co2eKg,
181
- render: (e) => /* @__PURE__ */ p("span", {
201
+ render: (e) => /* @__PURE__ */ m("span", {
182
202
  className: "tabular-nums font-medium text-text-primary",
183
203
  children: n(e.co2eKg)
184
204
  })
@@ -186,23 +206,23 @@ function M() {
186
206
  {
187
207
  key: "status",
188
208
  header: "Status",
189
- render: (e) => /* @__PURE__ */ p(a, { status: e.status })
209
+ render: (e) => /* @__PURE__ */ m(s, { status: e.status })
190
210
  },
191
211
  {
192
212
  key: "period",
193
213
  header: "Period",
194
214
  align: "right",
195
215
  hideOnMobile: !0,
196
- render: (e) => /* @__PURE__ */ p("span", {
216
+ render: (e) => /* @__PURE__ */ m("span", {
197
217
  className: "text-text-tertiary",
198
- children: ee(e.periodStart)
218
+ children: r(e.periodStart)
199
219
  })
200
220
  },
201
221
  {
202
222
  key: "factor",
203
223
  header: "Factor",
204
224
  hideOnMobile: !0,
205
- render: (e) => /* @__PURE__ */ p("span", {
225
+ render: (e) => /* @__PURE__ */ m("span", {
206
226
  className: "text-text-secondary",
207
227
  children: e.factor?.name ?? "—"
208
228
  })
@@ -211,19 +231,19 @@ function M() {
211
231
  key: "verify",
212
232
  header: "",
213
233
  align: "right",
214
- render: (e) => e.status === "VERIFIED" ? null : /* @__PURE__ */ p(h, {
234
+ render: (e) => e.status === "VERIFIED" ? null : /* @__PURE__ */ m(g, {
215
235
  size: "sm",
216
236
  variant: "outline",
217
- onClick: () => Ge.mutate(e.id),
218
- disabled: Ge.isPending,
237
+ onClick: () => Je.mutate(e.id),
238
+ disabled: Je.isPending,
219
239
  children: "Verify"
220
240
  })
221
241
  }
222
- ], nt = [
242
+ ], at = [
223
243
  {
224
244
  key: "name",
225
245
  header: "Factor",
226
- render: (e) => /* @__PURE__ */ p("span", {
246
+ render: (e) => /* @__PURE__ */ m("span", {
227
247
  className: "font-medium text-text-primary",
228
248
  children: e.name
229
249
  })
@@ -231,7 +251,7 @@ function M() {
231
251
  {
232
252
  key: "scope",
233
253
  header: "Scope",
234
- render: (e) => /* @__PURE__ */ p(a, { status: e.scope })
254
+ render: (e) => /* @__PURE__ */ m(s, { status: e.scope })
235
255
  },
236
256
  {
237
257
  key: "value",
@@ -239,10 +259,10 @@ function M() {
239
259
  align: "right",
240
260
  hideOnMobile: !0,
241
261
  sortValue: (e) => e.factorKgco2e,
242
- render: (e) => /* @__PURE__ */ m("span", {
262
+ render: (e) => /* @__PURE__ */ h("span", {
243
263
  className: "tabular-nums text-text-secondary",
244
264
  children: [
245
- i(e.factorKgco2e),
265
+ a(e.factorKgco2e),
246
266
  " kg/",
247
267
  e.activityUnit
248
268
  ]
@@ -252,7 +272,7 @@ function M() {
252
272
  key: "source",
253
273
  header: "Source",
254
274
  hideOnMobile: !0,
255
- render: (e) => /* @__PURE__ */ p("span", {
275
+ render: (e) => /* @__PURE__ */ m("span", {
256
276
  className: "text-text-secondary",
257
277
  children: e.source ?? "—"
258
278
  })
@@ -262,7 +282,7 @@ function M() {
262
282
  header: "Valid year",
263
283
  align: "right",
264
284
  hideOnMobile: !0,
265
- render: (e) => /* @__PURE__ */ p("span", {
285
+ render: (e) => /* @__PURE__ */ m("span", {
266
286
  className: "tabular-nums text-text-tertiary",
267
287
  children: e.validYear ?? "—"
268
288
  })
@@ -271,13 +291,13 @@ function M() {
271
291
  key: "active",
272
292
  header: "Active",
273
293
  align: "right",
274
- render: (e) => e.isActive ? /* @__PURE__ */ p(a, { status: "OK" }) : /* @__PURE__ */ p(a, { status: "Inactive" })
294
+ render: (e) => e.isActive ? /* @__PURE__ */ m(s, { status: "OK" }) : /* @__PURE__ */ m(s, { status: "Inactive" })
275
295
  }
276
- ], rt = [
296
+ ], ot = [
277
297
  {
278
298
  key: "name",
279
299
  header: "Target",
280
- render: (e) => /* @__PURE__ */ p("span", {
300
+ render: (e) => /* @__PURE__ */ m("span", {
281
301
  className: "font-medium text-text-primary",
282
302
  children: e.name
283
303
  })
@@ -286,7 +306,7 @@ function M() {
286
306
  key: "metric",
287
307
  header: "Metric",
288
308
  hideOnMobile: !0,
289
- render: (e) => /* @__PURE__ */ p("span", {
309
+ render: (e) => /* @__PURE__ */ m("span", {
290
310
  className: "text-text-secondary",
291
311
  children: e.metric
292
312
  })
@@ -295,10 +315,10 @@ function M() {
295
315
  key: "baseline",
296
316
  header: "Baseline",
297
317
  hideOnMobile: !0,
298
- render: (e) => /* @__PURE__ */ m("span", {
318
+ render: (e) => /* @__PURE__ */ h("span", {
299
319
  className: "tabular-nums text-text-secondary",
300
320
  children: [
301
- i(e.baselineValue),
321
+ a(e.baselineValue),
302
322
  " ",
303
323
  e.unit,
304
324
  " @",
@@ -310,10 +330,10 @@ function M() {
310
330
  key: "target",
311
331
  header: "Target",
312
332
  hideOnMobile: !0,
313
- render: (e) => /* @__PURE__ */ m("span", {
333
+ render: (e) => /* @__PURE__ */ h("span", {
314
334
  className: "tabular-nums text-text-secondary",
315
335
  children: [
316
- i(e.targetValue),
336
+ a(e.targetValue),
317
337
  " ",
318
338
  e.unit,
319
339
  " @",
@@ -325,14 +345,16 @@ function M() {
325
345
  key: "reduction",
326
346
  header: "Planned reduction",
327
347
  render: (e) => {
328
- let t = e.baselineValue > 0 ? Oe((e.baselineValue - e.targetValue) / e.baselineValue * 100) : 0;
329
- return /* @__PURE__ */ m("div", {
330
- className: "flex min-w-[9rem] items-center gap-2",
331
- children: [/* @__PURE__ */ p(te, {
348
+ let t = e.baselineValue > 0 ? je((e.baselineValue - e.targetValue) / e.baselineValue * 100) : 0;
349
+ return /* @__PURE__ */ h("div", {
350
+ className: "flex min-w-[10rem] items-center gap-3",
351
+ children: [/* @__PURE__ */ m(te, {
332
352
  value: t,
353
+ color: Me[e.status] ?? "var(--color-action-primary-bg)",
354
+ height: 8,
333
355
  className: "flex-1"
334
- }), /* @__PURE__ */ m("span", {
335
- className: "w-11 shrink-0 text-right text-sm tabular-nums text-text-secondary",
356
+ }), /* @__PURE__ */ h("span", {
357
+ className: "w-11 shrink-0 text-right text-sm font-semibold tabular-nums text-text-primary",
336
358
  children: [Math.round(t), "%"]
337
359
  })]
338
360
  });
@@ -341,260 +363,275 @@ function M() {
341
363
  {
342
364
  key: "status",
343
365
  header: "Status",
344
- render: (e) => /* @__PURE__ */ p(a, { status: e.status })
366
+ render: (e) => /* @__PURE__ */ m(s, { status: e.status })
345
367
  },
346
368
  {
347
369
  key: "setStatus",
348
370
  header: "",
349
371
  align: "right",
350
- render: (e) => /* @__PURE__ */ m(C, {
372
+ render: (e) => /* @__PURE__ */ h(C, {
351
373
  value: e.status,
352
- onValueChange: (t) => Je.mutate({
374
+ onValueChange: (t) => Ze.mutate({
353
375
  id: e.id,
354
376
  status: t
355
377
  }),
356
- children: [/* @__PURE__ */ p(E, {
378
+ children: [/* @__PURE__ */ m(E, {
357
379
  className: "h-8 w-36",
358
- children: /* @__PURE__ */ p(D, {})
359
- }), /* @__PURE__ */ p(w, { children: Te.map((e) => /* @__PURE__ */ p(T, {
380
+ children: /* @__PURE__ */ m(D, {})
381
+ }), /* @__PURE__ */ m(w, { children: Oe.map((e) => /* @__PURE__ */ m(T, {
360
382
  value: e,
361
- children: r(e)
383
+ children: i(e)
362
384
  }, e)) })]
363
385
  })
364
386
  }
365
- ], it = [
387
+ ], st = [
366
388
  {
367
389
  value: "ledger",
368
390
  label: "Ledger",
369
- icon: /* @__PURE__ */ p(d, { className: "h-4 w-4" })
391
+ icon: /* @__PURE__ */ m(f, { className: "h-4 w-4" })
370
392
  },
371
393
  {
372
394
  value: "factors",
373
395
  label: "Emission factors",
374
- icon: /* @__PURE__ */ p(_e, { className: "h-4 w-4" }),
396
+ icon: /* @__PURE__ */ m(ye, { className: "h-4 w-4" }),
375
397
  count: Q.data?.length
376
398
  },
377
399
  {
378
400
  value: "targets",
379
401
  label: "Reduction targets",
380
- icon: /* @__PURE__ */ p(ve, { className: "h-4 w-4" }),
402
+ icon: /* @__PURE__ */ m(be, { className: "h-4 w-4" }),
381
403
  count: $.data?.length
382
404
  }
383
405
  ];
384
- return /* @__PURE__ */ m(e, {
406
+ return /* @__PURE__ */ h(e, {
385
407
  title: "Carbon & Sustainability",
386
408
  description: "Carbon ledger, emission factors & science-based reduction targets — GHG Protocol Scope 1 / 2 / 3.",
387
- actions: M === "ledger" ? /* @__PURE__ */ m(h, {
388
- onClick: Ye,
389
- children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " Record entry"]
390
- }) : M === "factors" ? /* @__PURE__ */ m(h, {
391
- onClick: Xe,
392
- children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " New factor"]
393
- }) : /* @__PURE__ */ m(h, {
394
- onClick: Ze,
395
- children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " New target"]
409
+ actions: o === "ledger" ? /* @__PURE__ */ h(g, {
410
+ onClick: Qe,
411
+ children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " Record entry"]
412
+ }) : o === "factors" ? /* @__PURE__ */ h(g, {
413
+ onClick: $e,
414
+ children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New factor"]
415
+ }) : /* @__PURE__ */ h(g, {
416
+ onClick: et,
417
+ children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New target"]
396
418
  }),
397
419
  children: [
398
- /* @__PURE__ */ m("div", {
420
+ /* @__PURE__ */ h("div", {
399
421
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
400
422
  children: [
401
- /* @__PURE__ */ p(t, {
402
- icon: /* @__PURE__ */ p(d, { className: "h-5 w-5" }),
423
+ /* @__PURE__ */ m(t, {
424
+ icon: /* @__PURE__ */ m(f, { className: "h-5 w-5" }),
403
425
  value: X.data ? n(X.data.total) : "—",
404
426
  label: "Total footprint",
405
- featured: !0
427
+ featured: !0,
428
+ footer: X.data && X.data.total > 0 ? /* @__PURE__ */ h("div", {
429
+ className: "space-y-2",
430
+ children: [/* @__PURE__ */ m(re, {
431
+ scope1: X.data.scope1,
432
+ scope2: X.data.scope2,
433
+ scope3: X.data.scope3,
434
+ height: 6
435
+ }), /* @__PURE__ */ m("p", {
436
+ className: "text-xs text-text-tertiary",
437
+ children: "Scope 1 · 2 · 3 split"
438
+ })]
439
+ }) : void 0
406
440
  }),
407
- /* @__PURE__ */ p(t, {
408
- icon: /* @__PURE__ */ p(ge, { className: "h-5 w-5" }),
441
+ /* @__PURE__ */ m(t, {
442
+ icon: /* @__PURE__ */ m(ve, { className: "h-5 w-5" }),
409
443
  value: X.data ? n(X.data.scope1) : "—",
410
- label: "Scope 1 · Direct"
444
+ label: "Scope 1 · Direct",
445
+ footer: M(X.data?.scope1, X.data?.total, "SCOPE_1")
411
446
  }),
412
- /* @__PURE__ */ p(t, {
413
- icon: /* @__PURE__ */ p(be, { className: "h-5 w-5" }),
447
+ /* @__PURE__ */ m(t, {
448
+ icon: /* @__PURE__ */ m(Se, { className: "h-5 w-5" }),
414
449
  value: X.data ? n(X.data.scope2) : "—",
415
- label: "Scope 2 · Purchased energy"
450
+ label: "Scope 2 · Purchased energy",
451
+ footer: M(X.data?.scope2, X.data?.total, "SCOPE_2")
416
452
  }),
417
- /* @__PURE__ */ p(t, {
418
- icon: /* @__PURE__ */ p(ye, { className: "h-5 w-5" }),
453
+ /* @__PURE__ */ m(t, {
454
+ icon: /* @__PURE__ */ m(xe, { className: "h-5 w-5" }),
419
455
  value: X.data ? n(X.data.scope3) : "—",
420
- label: "Scope 3 · Value chain"
456
+ label: "Scope 3 · Value chain",
457
+ footer: M(X.data?.scope3, X.data?.total, "SCOPE_3")
421
458
  })
422
459
  ]
423
460
  }),
424
- /* @__PURE__ */ p("div", {
461
+ /* @__PURE__ */ m("div", {
425
462
  className: "mt-6",
426
- children: /* @__PURE__ */ p(pe, {
427
- items: it,
428
- value: M,
429
- onChange: ke
463
+ children: /* @__PURE__ */ m(he, {
464
+ items: st,
465
+ value: o,
466
+ onChange: ne
430
467
  })
431
468
  }),
432
- M === "ledger" && /* @__PURE__ */ m("div", {
469
+ o === "ledger" && /* @__PURE__ */ h("div", {
433
470
  className: "mt-6",
434
- children: [/* @__PURE__ */ m("div", {
471
+ children: [/* @__PURE__ */ h("div", {
435
472
  className: "mb-5 flex flex-wrap items-center gap-3",
436
473
  children: [
437
- /* @__PURE__ */ m(C, {
474
+ /* @__PURE__ */ h(C, {
438
475
  value: N,
439
476
  onValueChange: (e) => {
440
- Ae(e), I.reset();
477
+ Ne(e), I.reset();
441
478
  },
442
- children: [/* @__PURE__ */ p(E, {
479
+ children: [/* @__PURE__ */ m(E, {
443
480
  className: "w-40",
444
- children: /* @__PURE__ */ p(D, { placeholder: "All scopes" })
445
- }), /* @__PURE__ */ m(w, { children: [/* @__PURE__ */ p(T, {
481
+ children: /* @__PURE__ */ m(D, { placeholder: "All scopes" })
482
+ }), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
446
483
  value: "ALL",
447
484
  children: "All scopes"
448
- }), O.map((e) => /* @__PURE__ */ p(T, {
485
+ }), O.map((e) => /* @__PURE__ */ m(T, {
449
486
  value: e,
450
- children: r(e)
487
+ children: i(e)
451
488
  }, e))] })]
452
489
  }),
453
- /* @__PURE__ */ m(C, {
490
+ /* @__PURE__ */ h(C, {
454
491
  value: P,
455
492
  onValueChange: (e) => {
456
- je(e), I.reset();
493
+ Pe(e), I.reset();
457
494
  },
458
- children: [/* @__PURE__ */ p(E, {
495
+ children: [/* @__PURE__ */ m(E, {
459
496
  className: "w-40",
460
- children: /* @__PURE__ */ p(D, { placeholder: "All statuses" })
461
- }), /* @__PURE__ */ m(w, { children: [/* @__PURE__ */ p(T, {
497
+ children: /* @__PURE__ */ m(D, { placeholder: "All statuses" })
498
+ }), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
462
499
  value: "ALL",
463
500
  children: "All statuses"
464
- }), we.map((e) => /* @__PURE__ */ p(T, {
501
+ }), De.map((e) => /* @__PURE__ */ m(T, {
465
502
  value: e,
466
- children: r(e)
503
+ children: i(e)
467
504
  }, e))] })]
468
505
  }),
469
- /* @__PURE__ */ m(C, {
506
+ /* @__PURE__ */ h(C, {
470
507
  value: F,
471
508
  onValueChange: (e) => {
472
- Me(e), I.reset();
509
+ Fe(e), I.reset();
473
510
  },
474
- children: [/* @__PURE__ */ p(E, {
511
+ children: [/* @__PURE__ */ m(E, {
475
512
  className: "w-48",
476
- children: /* @__PURE__ */ p(D, { placeholder: "All sites" })
477
- }), /* @__PURE__ */ m(w, { children: [/* @__PURE__ */ p(T, {
513
+ children: /* @__PURE__ */ m(D, { placeholder: "All sites" })
514
+ }), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
478
515
  value: "ALL",
479
516
  children: "All sites"
480
- }), Object.entries(ze).map(([e, t]) => /* @__PURE__ */ p(T, {
517
+ }), Object.entries(He).map(([e, t]) => /* @__PURE__ */ m(T, {
481
518
  value: e,
482
519
  children: t
483
520
  }, e))] })]
484
521
  })
485
522
  ]
486
- }), Z.isLoading ? /* @__PURE__ */ p(s, { label: "Loading carbon ledger…" }) : Z.isError ? /* @__PURE__ */ p(o, {
523
+ }), Z.isLoading ? /* @__PURE__ */ m(l, { label: "Loading carbon ledger…" }) : Z.isError ? /* @__PURE__ */ m(c, {
487
524
  message: "Couldn't load carbon entries.",
488
525
  onRetry: () => Z.refetch()
489
- }) : Be.length === 0 ? /* @__PURE__ */ p(c, {
526
+ }) : Ue.length === 0 ? /* @__PURE__ */ m(ee, {
490
527
  illustration: "empty-data",
491
- icon: /* @__PURE__ */ p(d, { className: "h-10 w-10" }),
528
+ icon: /* @__PURE__ */ m(f, { className: "h-10 w-10" }),
492
529
  title: "No carbon entries",
493
530
  description: N === "ALL" && P === "ALL" && F === "ALL" ? "Record activity to build your Scope 1–3 emissions ledger." : "No entries match these filters.",
494
- action: /* @__PURE__ */ m(h, {
495
- onClick: Ye,
496
- children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " Record entry"]
531
+ action: /* @__PURE__ */ h(g, {
532
+ onClick: Qe,
533
+ children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " Record entry"]
497
534
  })
498
- }) : /* @__PURE__ */ m(xe, { children: [/* @__PURE__ */ p(l, {
499
- columns: tt,
500
- rows: Be,
535
+ }) : /* @__PURE__ */ h(Ce, { children: [/* @__PURE__ */ m(u, {
536
+ columns: it,
537
+ rows: Ue,
501
538
  rowKey: (e) => e.id
502
- }), /* @__PURE__ */ p(me, {
539
+ }), /* @__PURE__ */ m(ge, {
503
540
  page: I.page,
504
- pageSize: Ee,
505
- itemCount: Be.length,
541
+ pageSize: ke,
542
+ itemCount: Ue.length,
506
543
  hasMore: Z.data?.pageInfo?.hasMore ?? !1,
507
544
  onPageChange: (e) => I.onPageChange(e, Z.data?.pageInfo?.cursor)
508
545
  })] })]
509
546
  }),
510
- M === "factors" && /* @__PURE__ */ m("div", {
547
+ o === "factors" && /* @__PURE__ */ h("div", {
511
548
  className: "mt-6",
512
- children: [/* @__PURE__ */ p("div", {
549
+ children: [/* @__PURE__ */ m("div", {
513
550
  className: "mb-5 flex flex-wrap items-center gap-3",
514
- children: /* @__PURE__ */ m(C, {
551
+ children: /* @__PURE__ */ h(C, {
515
552
  value: L,
516
- onValueChange: (e) => Ne(e),
517
- children: [/* @__PURE__ */ p(E, {
553
+ onValueChange: (e) => Ie(e),
554
+ children: [/* @__PURE__ */ m(E, {
518
555
  className: "w-40",
519
- children: /* @__PURE__ */ p(D, { placeholder: "All scopes" })
520
- }), /* @__PURE__ */ m(w, { children: [/* @__PURE__ */ p(T, {
556
+ children: /* @__PURE__ */ m(D, { placeholder: "All scopes" })
557
+ }), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
521
558
  value: "ALL",
522
559
  children: "All scopes"
523
- }), O.map((e) => /* @__PURE__ */ p(T, {
560
+ }), O.map((e) => /* @__PURE__ */ m(T, {
524
561
  value: e,
525
- children: r(e)
562
+ children: i(e)
526
563
  }, e))] })]
527
564
  })
528
- }), Q.isLoading ? /* @__PURE__ */ p(s, { label: "Loading emission factors…" }) : Q.isError ? /* @__PURE__ */ p(o, {
565
+ }), Q.isLoading ? /* @__PURE__ */ m(l, { label: "Loading emission factors…" }) : Q.isError ? /* @__PURE__ */ m(c, {
529
566
  message: "Couldn't load emission factors.",
530
567
  onRetry: () => Q.refetch()
531
- }) : He.length === 0 ? /* @__PURE__ */ p(c, {
568
+ }) : Ge.length === 0 ? /* @__PURE__ */ m(ee, {
532
569
  illustration: "empty-data",
533
- icon: /* @__PURE__ */ p(_e, { className: "h-10 w-10" }),
570
+ icon: /* @__PURE__ */ m(ye, { className: "h-10 w-10" }),
534
571
  title: "No emission factors",
535
572
  description: L === "ALL" ? "Add emission factors (kg CO₂e per activity unit) to convert activity into CO₂e." : "No emission factors match this scope.",
536
- action: /* @__PURE__ */ m(h, {
537
- onClick: Xe,
538
- children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " New factor"]
573
+ action: /* @__PURE__ */ h(g, {
574
+ onClick: $e,
575
+ children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New factor"]
539
576
  })
540
- }) : /* @__PURE__ */ p(l, {
541
- columns: nt,
542
- rows: He,
577
+ }) : /* @__PURE__ */ m(u, {
578
+ columns: at,
579
+ rows: Ge,
543
580
  rowKey: (e) => e.id
544
581
  })]
545
582
  }),
546
- M === "targets" && /* @__PURE__ */ m("div", {
583
+ o === "targets" && /* @__PURE__ */ h("div", {
547
584
  className: "mt-6",
548
- children: [/* @__PURE__ */ p("div", {
585
+ children: [/* @__PURE__ */ m("div", {
549
586
  className: "mb-5 flex flex-wrap items-center gap-3",
550
- children: /* @__PURE__ */ m(C, {
587
+ children: /* @__PURE__ */ h(C, {
551
588
  value: R,
552
- onValueChange: (e) => Pe(e),
553
- children: [/* @__PURE__ */ p(E, {
589
+ onValueChange: (e) => Le(e),
590
+ children: [/* @__PURE__ */ m(E, {
554
591
  className: "w-44",
555
- children: /* @__PURE__ */ p(D, { placeholder: "All statuses" })
556
- }), /* @__PURE__ */ m(w, { children: [/* @__PURE__ */ p(T, {
592
+ children: /* @__PURE__ */ m(D, { placeholder: "All statuses" })
593
+ }), /* @__PURE__ */ h(w, { children: [/* @__PURE__ */ m(T, {
557
594
  value: "ALL",
558
595
  children: "All statuses"
559
- }), Te.map((e) => /* @__PURE__ */ p(T, {
596
+ }), Oe.map((e) => /* @__PURE__ */ m(T, {
560
597
  value: e,
561
- children: r(e)
598
+ children: i(e)
562
599
  }, e))] })]
563
600
  })
564
- }), $.isLoading ? /* @__PURE__ */ p(s, { label: "Loading reduction targets…" }) : $.isError ? /* @__PURE__ */ p(o, {
601
+ }), $.isLoading ? /* @__PURE__ */ m(l, { label: "Loading reduction targets…" }) : $.isError ? /* @__PURE__ */ m(c, {
565
602
  message: "Couldn't load reduction targets.",
566
603
  onRetry: () => $.refetch()
567
- }) : Ue.length === 0 ? /* @__PURE__ */ p(c, {
604
+ }) : Ke.length === 0 ? /* @__PURE__ */ m(ee, {
568
605
  illustration: "empty-data",
569
- icon: /* @__PURE__ */ p(ve, { className: "h-10 w-10" }),
606
+ icon: /* @__PURE__ */ m(be, { className: "h-10 w-10" }),
570
607
  title: "No reduction targets",
571
608
  description: R === "ALL" ? "Set science-based reduction targets to track progress against a baseline." : "No targets match this status.",
572
- action: /* @__PURE__ */ m(h, {
573
- onClick: Ze,
574
- children: [/* @__PURE__ */ p(f, { className: "mr-1.5 h-4 w-4" }), " New target"]
609
+ action: /* @__PURE__ */ h(g, {
610
+ onClick: et,
611
+ children: [/* @__PURE__ */ m(p, { className: "mr-1.5 h-4 w-4" }), " New target"]
575
612
  })
576
- }) : /* @__PURE__ */ p(l, {
577
- columns: rt,
578
- rows: Ue,
613
+ }) : /* @__PURE__ */ m(u, {
614
+ columns: ot,
615
+ rows: Ke,
579
616
  rowKey: (e) => e.id
580
617
  })]
581
618
  }),
582
- /* @__PURE__ */ p(v, {
583
- open: Fe,
619
+ /* @__PURE__ */ m(we, {
620
+ open: Re,
584
621
  onOpenChange: (e) => {
585
622
  z(e), e || (V(k), Y(null));
586
623
  },
587
- children: /* @__PURE__ */ m(Se, { children: [
588
- /* @__PURE__ */ m(x, { children: [/* @__PURE__ */ p(S, { children: "Record carbon entry" }), /* @__PURE__ */ p(y, { children: "Log an activity — CO₂e is computed server-side from activity value × emission factor." })] }),
589
- /* @__PURE__ */ m("div", {
624
+ children: /* @__PURE__ */ h(y, { children: [
625
+ /* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m(S, { children: "Record carbon entry" }), /* @__PURE__ */ m(Te, { children: "Log an activity — CO₂e is computed server-side from activity value × emission factor." })] }),
626
+ /* @__PURE__ */ h("div", {
590
627
  className: "grid gap-4 py-2",
591
628
  children: [
592
- /* @__PURE__ */ m("div", {
629
+ /* @__PURE__ */ h("div", {
593
630
  className: "grid gap-1.5",
594
- children: [/* @__PURE__ */ p(_, {
631
+ children: [/* @__PURE__ */ m(v, {
595
632
  htmlFor: "ceCategory",
596
633
  children: "Category *"
597
- }), /* @__PURE__ */ p(g, {
634
+ }), /* @__PURE__ */ m(_, {
598
635
  id: "ceCategory",
599
636
  value: B.category,
600
637
  onChange: (e) => V({
@@ -604,33 +641,33 @@ function M() {
604
641
  placeholder: "Diesel generators"
605
642
  })]
606
643
  }),
607
- /* @__PURE__ */ m("div", {
644
+ /* @__PURE__ */ h("div", {
608
645
  className: "grid gap-2 sm:grid-cols-2",
609
- children: [/* @__PURE__ */ m("div", {
646
+ children: [/* @__PURE__ */ h("div", {
610
647
  className: "grid gap-1.5",
611
- children: [/* @__PURE__ */ p(_, {
648
+ children: [/* @__PURE__ */ m(v, {
612
649
  htmlFor: "ceScope",
613
650
  children: "Scope"
614
- }), /* @__PURE__ */ m(C, {
651
+ }), /* @__PURE__ */ h(C, {
615
652
  value: B.scope,
616
653
  onValueChange: (e) => V({
617
654
  ...B,
618
655
  scope: e
619
656
  }),
620
- children: [/* @__PURE__ */ p(E, {
657
+ children: [/* @__PURE__ */ m(E, {
621
658
  id: "ceScope",
622
- children: /* @__PURE__ */ p(D, {})
623
- }), /* @__PURE__ */ p(w, { children: O.map((e) => /* @__PURE__ */ p(T, {
659
+ children: /* @__PURE__ */ m(D, {})
660
+ }), /* @__PURE__ */ m(w, { children: O.map((e) => /* @__PURE__ */ m(T, {
624
661
  value: e,
625
- children: r(e)
662
+ children: i(e)
626
663
  }, e)) })]
627
664
  })]
628
- }), /* @__PURE__ */ m("div", {
665
+ }), /* @__PURE__ */ h("div", {
629
666
  className: "grid gap-1.5",
630
- children: [/* @__PURE__ */ p(_, {
667
+ children: [/* @__PURE__ */ m(v, {
631
668
  htmlFor: "cePeriod",
632
669
  children: "Period start"
633
- }), /* @__PURE__ */ p(g, {
670
+ }), /* @__PURE__ */ m(_, {
634
671
  id: "cePeriod",
635
672
  type: "date",
636
673
  value: B.periodStart,
@@ -641,14 +678,14 @@ function M() {
641
678
  })]
642
679
  })]
643
680
  }),
644
- /* @__PURE__ */ m("div", {
681
+ /* @__PURE__ */ h("div", {
645
682
  className: "grid gap-2 sm:grid-cols-2",
646
- children: [/* @__PURE__ */ m("div", {
683
+ children: [/* @__PURE__ */ h("div", {
647
684
  className: "grid gap-1.5",
648
- children: [/* @__PURE__ */ p(_, {
685
+ children: [/* @__PURE__ */ m(v, {
649
686
  htmlFor: "ceValue",
650
687
  children: "Activity value *"
651
- }), /* @__PURE__ */ p(g, {
688
+ }), /* @__PURE__ */ m(_, {
652
689
  id: "ceValue",
653
690
  type: "number",
654
691
  min: "0",
@@ -660,12 +697,12 @@ function M() {
660
697
  }),
661
698
  placeholder: "1200"
662
699
  })]
663
- }), /* @__PURE__ */ m("div", {
700
+ }), /* @__PURE__ */ h("div", {
664
701
  className: "grid gap-1.5",
665
- children: [/* @__PURE__ */ p(_, {
702
+ children: [/* @__PURE__ */ m(v, {
666
703
  htmlFor: "ceUnit",
667
704
  children: "Activity unit *"
668
- }), /* @__PURE__ */ p(g, {
705
+ }), /* @__PURE__ */ m(_, {
669
706
  id: "ceUnit",
670
707
  value: B.activityUnit,
671
708
  onChange: (e) => V({
@@ -676,54 +713,54 @@ function M() {
676
713
  })]
677
714
  })]
678
715
  }),
679
- /* @__PURE__ */ m("div", {
716
+ /* @__PURE__ */ h("div", {
680
717
  className: "grid gap-2 sm:grid-cols-2",
681
- children: [/* @__PURE__ */ m("div", {
718
+ children: [/* @__PURE__ */ h("div", {
682
719
  className: "grid gap-1.5",
683
- children: [/* @__PURE__ */ p(_, {
720
+ children: [/* @__PURE__ */ m(v, {
684
721
  htmlFor: "ceFactor",
685
722
  children: "Emission factor"
686
- }), /* @__PURE__ */ m(C, {
723
+ }), /* @__PURE__ */ h(C, {
687
724
  value: B.factorId,
688
725
  onValueChange: (e) => V({
689
726
  ...B,
690
727
  factorId: e
691
728
  }),
692
- children: [/* @__PURE__ */ p(E, {
729
+ children: [/* @__PURE__ */ m(E, {
693
730
  id: "ceFactor",
694
- children: /* @__PURE__ */ p(D, { placeholder: "Optional" })
695
- }), /* @__PURE__ */ p(w, { children: (Ve.data ?? []).map((e) => /* @__PURE__ */ p(T, {
731
+ children: /* @__PURE__ */ m(D, { placeholder: "Optional" })
732
+ }), /* @__PURE__ */ m(w, { children: (We.data ?? []).map((e) => /* @__PURE__ */ m(T, {
696
733
  value: e.id,
697
734
  children: e.name
698
735
  }, e.id)) })]
699
736
  })]
700
- }), /* @__PURE__ */ m("div", {
737
+ }), /* @__PURE__ */ h("div", {
701
738
  className: "grid gap-1.5",
702
- children: [/* @__PURE__ */ p(_, {
739
+ children: [/* @__PURE__ */ m(v, {
703
740
  htmlFor: "ceSite",
704
741
  children: "Site"
705
- }), /* @__PURE__ */ m(C, {
742
+ }), /* @__PURE__ */ h(C, {
706
743
  value: B.siteId,
707
744
  onValueChange: (e) => V({
708
745
  ...B,
709
746
  siteId: e
710
747
  }),
711
- children: [/* @__PURE__ */ p(E, {
748
+ children: [/* @__PURE__ */ m(E, {
712
749
  id: "ceSite",
713
- children: /* @__PURE__ */ p(D, { placeholder: "Optional" })
714
- }), /* @__PURE__ */ p(w, { children: Object.entries(ze).map(([e, t]) => /* @__PURE__ */ p(T, {
750
+ children: /* @__PURE__ */ m(D, { placeholder: "Optional" })
751
+ }), /* @__PURE__ */ m(w, { children: Object.entries(He).map(([e, t]) => /* @__PURE__ */ m(T, {
715
752
  value: e,
716
753
  children: t
717
754
  }, e)) })]
718
755
  })]
719
756
  })]
720
757
  }),
721
- /* @__PURE__ */ m("div", {
758
+ /* @__PURE__ */ h("div", {
722
759
  className: "grid gap-1.5",
723
- children: [/* @__PURE__ */ p(_, {
760
+ children: [/* @__PURE__ */ m(v, {
724
761
  htmlFor: "ceNotes",
725
762
  children: "Notes"
726
- }), /* @__PURE__ */ p(Ce, {
763
+ }), /* @__PURE__ */ m(Ee, {
727
764
  id: "ceNotes",
728
765
  rows: 2,
729
766
  value: B.notes,
@@ -734,39 +771,39 @@ function M() {
734
771
  placeholder: "Optional context about this entry."
735
772
  })]
736
773
  }),
737
- J && /* @__PURE__ */ p("p", {
774
+ J && /* @__PURE__ */ m("p", {
738
775
  className: "text-sm text-status-error-text",
739
776
  children: J
740
777
  })
741
778
  ]
742
779
  }),
743
- /* @__PURE__ */ m(b, { children: [/* @__PURE__ */ p(h, {
780
+ /* @__PURE__ */ h(b, { children: [/* @__PURE__ */ m(g, {
744
781
  variant: "outline",
745
782
  onClick: () => z(!1),
746
783
  children: "Cancel"
747
- }), /* @__PURE__ */ p(h, {
748
- onClick: Qe,
749
- disabled: We.isPending,
750
- children: We.isPending ? "Recording…" : "Record entry"
784
+ }), /* @__PURE__ */ m(g, {
785
+ onClick: tt,
786
+ disabled: qe.isPending,
787
+ children: qe.isPending ? "Recording…" : "Record entry"
751
788
  })] })
752
789
  ] })
753
790
  }),
754
- /* @__PURE__ */ p(v, {
755
- open: Ie,
791
+ /* @__PURE__ */ m(we, {
792
+ open: ze,
756
793
  onOpenChange: (e) => {
757
794
  H(e), e || (W(A), Y(null));
758
795
  },
759
- children: /* @__PURE__ */ m(Se, { children: [
760
- /* @__PURE__ */ m(x, { children: [/* @__PURE__ */ p(S, { children: "New emission factor" }), /* @__PURE__ */ p(y, { children: "Define kg CO₂e per activity unit — used to convert ledger activity into CO₂e." })] }),
761
- /* @__PURE__ */ m("div", {
796
+ children: /* @__PURE__ */ h(y, { children: [
797
+ /* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m(S, { children: "New emission factor" }), /* @__PURE__ */ m(Te, { children: "Define kg CO₂e per activity unit — used to convert ledger activity into CO₂e." })] }),
798
+ /* @__PURE__ */ h("div", {
762
799
  className: "grid gap-4 py-2",
763
800
  children: [
764
- /* @__PURE__ */ m("div", {
801
+ /* @__PURE__ */ h("div", {
765
802
  className: "grid gap-1.5",
766
- children: [/* @__PURE__ */ p(_, {
803
+ children: [/* @__PURE__ */ m(v, {
767
804
  htmlFor: "efName",
768
805
  children: "Name *"
769
- }), /* @__PURE__ */ p(g, {
806
+ }), /* @__PURE__ */ m(_, {
770
807
  id: "efName",
771
808
  value: U.name,
772
809
  onChange: (e) => W({
@@ -776,33 +813,33 @@ function M() {
776
813
  placeholder: "Diesel (stationary combustion)"
777
814
  })]
778
815
  }),
779
- /* @__PURE__ */ m("div", {
816
+ /* @__PURE__ */ h("div", {
780
817
  className: "grid gap-2 sm:grid-cols-2",
781
- children: [/* @__PURE__ */ m("div", {
818
+ children: [/* @__PURE__ */ h("div", {
782
819
  className: "grid gap-1.5",
783
- children: [/* @__PURE__ */ p(_, {
820
+ children: [/* @__PURE__ */ m(v, {
784
821
  htmlFor: "efScope",
785
822
  children: "Scope"
786
- }), /* @__PURE__ */ m(C, {
823
+ }), /* @__PURE__ */ h(C, {
787
824
  value: U.scope,
788
825
  onValueChange: (e) => W({
789
826
  ...U,
790
827
  scope: e
791
828
  }),
792
- children: [/* @__PURE__ */ p(E, {
829
+ children: [/* @__PURE__ */ m(E, {
793
830
  id: "efScope",
794
- children: /* @__PURE__ */ p(D, {})
795
- }), /* @__PURE__ */ p(w, { children: O.map((e) => /* @__PURE__ */ p(T, {
831
+ children: /* @__PURE__ */ m(D, {})
832
+ }), /* @__PURE__ */ m(w, { children: O.map((e) => /* @__PURE__ */ m(T, {
796
833
  value: e,
797
- children: r(e)
834
+ children: i(e)
798
835
  }, e)) })]
799
836
  })]
800
- }), /* @__PURE__ */ m("div", {
837
+ }), /* @__PURE__ */ h("div", {
801
838
  className: "grid gap-1.5",
802
- children: [/* @__PURE__ */ p(_, {
839
+ children: [/* @__PURE__ */ m(v, {
803
840
  htmlFor: "efUnit",
804
841
  children: "Activity unit *"
805
- }), /* @__PURE__ */ p(g, {
842
+ }), /* @__PURE__ */ m(_, {
806
843
  id: "efUnit",
807
844
  value: U.activityUnit,
808
845
  onChange: (e) => W({
@@ -813,14 +850,14 @@ function M() {
813
850
  })]
814
851
  })]
815
852
  }),
816
- /* @__PURE__ */ m("div", {
853
+ /* @__PURE__ */ h("div", {
817
854
  className: "grid gap-2 sm:grid-cols-2",
818
- children: [/* @__PURE__ */ m("div", {
855
+ children: [/* @__PURE__ */ h("div", {
819
856
  className: "grid gap-1.5",
820
- children: [/* @__PURE__ */ p(_, {
857
+ children: [/* @__PURE__ */ m(v, {
821
858
  htmlFor: "efFactor",
822
859
  children: "Factor (kg CO₂e / unit) *"
823
- }), /* @__PURE__ */ p(g, {
860
+ }), /* @__PURE__ */ m(_, {
824
861
  id: "efFactor",
825
862
  type: "number",
826
863
  min: "0",
@@ -832,12 +869,12 @@ function M() {
832
869
  }),
833
870
  placeholder: "2.68"
834
871
  })]
835
- }), /* @__PURE__ */ m("div", {
872
+ }), /* @__PURE__ */ h("div", {
836
873
  className: "grid gap-1.5",
837
- children: [/* @__PURE__ */ p(_, {
874
+ children: [/* @__PURE__ */ m(v, {
838
875
  htmlFor: "efYear",
839
876
  children: "Valid year"
840
- }), /* @__PURE__ */ p(g, {
877
+ }), /* @__PURE__ */ m(_, {
841
878
  id: "efYear",
842
879
  type: "number",
843
880
  step: "1",
@@ -850,12 +887,12 @@ function M() {
850
887
  })]
851
888
  })]
852
889
  }),
853
- /* @__PURE__ */ m("div", {
890
+ /* @__PURE__ */ h("div", {
854
891
  className: "grid gap-1.5",
855
- children: [/* @__PURE__ */ p(_, {
892
+ children: [/* @__PURE__ */ m(v, {
856
893
  htmlFor: "efSource",
857
894
  children: "Source"
858
- }), /* @__PURE__ */ p(g, {
895
+ }), /* @__PURE__ */ m(_, {
859
896
  id: "efSource",
860
897
  value: U.source,
861
898
  onChange: (e) => W({
@@ -865,41 +902,41 @@ function M() {
865
902
  placeholder: "DEFRA / IPCC / EPA"
866
903
  })]
867
904
  }),
868
- J && /* @__PURE__ */ p("p", {
905
+ J && /* @__PURE__ */ m("p", {
869
906
  className: "text-sm text-status-error-text",
870
907
  children: J
871
908
  })
872
909
  ]
873
910
  }),
874
- /* @__PURE__ */ m(b, { children: [/* @__PURE__ */ p(h, {
911
+ /* @__PURE__ */ h(b, { children: [/* @__PURE__ */ m(g, {
875
912
  variant: "outline",
876
913
  onClick: () => H(!1),
877
914
  children: "Cancel"
878
- }), /* @__PURE__ */ p(h, {
879
- onClick: $e,
880
- disabled: Ke.isPending,
881
- children: Ke.isPending ? "Creating…" : "Create factor"
915
+ }), /* @__PURE__ */ m(g, {
916
+ onClick: nt,
917
+ disabled: Ye.isPending,
918
+ children: Ye.isPending ? "Creating…" : "Create factor"
882
919
  })] })
883
920
  ] })
884
921
  }),
885
- /* @__PURE__ */ p(v, {
886
- open: Le,
922
+ /* @__PURE__ */ m(we, {
923
+ open: Be,
887
924
  onOpenChange: (e) => {
888
925
  G(e), e || (q(j), Y(null));
889
926
  },
890
- children: /* @__PURE__ */ m(Se, { children: [
891
- /* @__PURE__ */ m(x, { children: [/* @__PURE__ */ p(S, { children: "New reduction target" }), /* @__PURE__ */ p(y, { children: "Commit to a measurable reduction from a baseline to a target year." })] }),
892
- /* @__PURE__ */ m("div", {
927
+ children: /* @__PURE__ */ h(y, { children: [
928
+ /* @__PURE__ */ h(x, { children: [/* @__PURE__ */ m(S, { children: "New reduction target" }), /* @__PURE__ */ m(Te, { children: "Commit to a measurable reduction from a baseline to a target year." })] }),
929
+ /* @__PURE__ */ h("div", {
893
930
  className: "grid gap-4 py-2",
894
931
  children: [
895
- /* @__PURE__ */ m("div", {
932
+ /* @__PURE__ */ h("div", {
896
933
  className: "grid gap-2 sm:grid-cols-2",
897
- children: [/* @__PURE__ */ m("div", {
934
+ children: [/* @__PURE__ */ h("div", {
898
935
  className: "grid gap-1.5",
899
- children: [/* @__PURE__ */ p(_, {
936
+ children: [/* @__PURE__ */ m(v, {
900
937
  htmlFor: "rtName",
901
938
  children: "Name *"
902
- }), /* @__PURE__ */ p(g, {
939
+ }), /* @__PURE__ */ m(_, {
903
940
  id: "rtName",
904
941
  value: K.name,
905
942
  onChange: (e) => q({
@@ -908,12 +945,12 @@ function M() {
908
945
  }),
909
946
  placeholder: "Net-zero operations"
910
947
  })]
911
- }), /* @__PURE__ */ m("div", {
948
+ }), /* @__PURE__ */ h("div", {
912
949
  className: "grid gap-1.5",
913
- children: [/* @__PURE__ */ p(_, {
950
+ children: [/* @__PURE__ */ m(v, {
914
951
  htmlFor: "rtMetric",
915
952
  children: "Metric *"
916
- }), /* @__PURE__ */ p(g, {
953
+ }), /* @__PURE__ */ m(_, {
917
954
  id: "rtMetric",
918
955
  value: K.metric,
919
956
  onChange: (e) => q({
@@ -924,15 +961,15 @@ function M() {
924
961
  })]
925
962
  })]
926
963
  }),
927
- /* @__PURE__ */ m("div", {
964
+ /* @__PURE__ */ h("div", {
928
965
  className: "grid gap-2 sm:grid-cols-3",
929
966
  children: [
930
- /* @__PURE__ */ m("div", {
967
+ /* @__PURE__ */ h("div", {
931
968
  className: "grid gap-1.5",
932
- children: [/* @__PURE__ */ p(_, {
969
+ children: [/* @__PURE__ */ m(v, {
933
970
  htmlFor: "rtBaseVal",
934
971
  children: "Baseline value *"
935
- }), /* @__PURE__ */ p(g, {
972
+ }), /* @__PURE__ */ m(_, {
936
973
  id: "rtBaseVal",
937
974
  type: "number",
938
975
  step: "any",
@@ -944,12 +981,12 @@ function M() {
944
981
  placeholder: "1000"
945
982
  })]
946
983
  }),
947
- /* @__PURE__ */ m("div", {
984
+ /* @__PURE__ */ h("div", {
948
985
  className: "grid gap-1.5",
949
- children: [/* @__PURE__ */ p(_, {
986
+ children: [/* @__PURE__ */ m(v, {
950
987
  htmlFor: "rtBaseYear",
951
988
  children: "Baseline year *"
952
- }), /* @__PURE__ */ p(g, {
989
+ }), /* @__PURE__ */ m(_, {
953
990
  id: "rtBaseYear",
954
991
  type: "number",
955
992
  step: "1",
@@ -961,12 +998,12 @@ function M() {
961
998
  placeholder: "2024"
962
999
  })]
963
1000
  }),
964
- /* @__PURE__ */ m("div", {
1001
+ /* @__PURE__ */ h("div", {
965
1002
  className: "grid gap-1.5",
966
- children: [/* @__PURE__ */ p(_, {
1003
+ children: [/* @__PURE__ */ m(v, {
967
1004
  htmlFor: "rtUnit",
968
1005
  children: "Unit *"
969
- }), /* @__PURE__ */ p(g, {
1006
+ }), /* @__PURE__ */ m(_, {
970
1007
  id: "rtUnit",
971
1008
  value: K.unit,
972
1009
  onChange: (e) => q({
@@ -978,14 +1015,14 @@ function M() {
978
1015
  })
979
1016
  ]
980
1017
  }),
981
- /* @__PURE__ */ m("div", {
1018
+ /* @__PURE__ */ h("div", {
982
1019
  className: "grid gap-2 sm:grid-cols-2",
983
- children: [/* @__PURE__ */ m("div", {
1020
+ children: [/* @__PURE__ */ h("div", {
984
1021
  className: "grid gap-1.5",
985
- children: [/* @__PURE__ */ p(_, {
1022
+ children: [/* @__PURE__ */ m(v, {
986
1023
  htmlFor: "rtTargetVal",
987
1024
  children: "Target value *"
988
- }), /* @__PURE__ */ p(g, {
1025
+ }), /* @__PURE__ */ m(_, {
989
1026
  id: "rtTargetVal",
990
1027
  type: "number",
991
1028
  step: "any",
@@ -996,12 +1033,12 @@ function M() {
996
1033
  }),
997
1034
  placeholder: "0"
998
1035
  })]
999
- }), /* @__PURE__ */ m("div", {
1036
+ }), /* @__PURE__ */ h("div", {
1000
1037
  className: "grid gap-1.5",
1001
- children: [/* @__PURE__ */ p(_, {
1038
+ children: [/* @__PURE__ */ m(v, {
1002
1039
  htmlFor: "rtTargetYear",
1003
1040
  children: "Target year *"
1004
- }), /* @__PURE__ */ p(g, {
1041
+ }), /* @__PURE__ */ m(_, {
1005
1042
  id: "rtTargetYear",
1006
1043
  type: "number",
1007
1044
  step: "1",
@@ -1014,12 +1051,12 @@ function M() {
1014
1051
  })]
1015
1052
  })]
1016
1053
  }),
1017
- /* @__PURE__ */ m("div", {
1054
+ /* @__PURE__ */ h("div", {
1018
1055
  className: "grid gap-1.5",
1019
- children: [/* @__PURE__ */ p(_, {
1056
+ children: [/* @__PURE__ */ m(v, {
1020
1057
  htmlFor: "rtDesc",
1021
1058
  children: "Description"
1022
- }), /* @__PURE__ */ p(Ce, {
1059
+ }), /* @__PURE__ */ m(Ee, {
1023
1060
  id: "rtDesc",
1024
1061
  rows: 2,
1025
1062
  value: K.description,
@@ -1030,20 +1067,20 @@ function M() {
1030
1067
  placeholder: "Optional context about this target."
1031
1068
  })]
1032
1069
  }),
1033
- J && /* @__PURE__ */ p("p", {
1070
+ J && /* @__PURE__ */ m("p", {
1034
1071
  className: "text-sm text-status-error-text",
1035
1072
  children: J
1036
1073
  })
1037
1074
  ]
1038
1075
  }),
1039
- /* @__PURE__ */ m(b, { children: [/* @__PURE__ */ p(h, {
1076
+ /* @__PURE__ */ h(b, { children: [/* @__PURE__ */ m(g, {
1040
1077
  variant: "outline",
1041
1078
  onClick: () => G(!1),
1042
1079
  children: "Cancel"
1043
- }), /* @__PURE__ */ p(h, {
1044
- onClick: et,
1045
- disabled: qe.isPending,
1046
- children: qe.isPending ? "Creating…" : "Create target"
1080
+ }), /* @__PURE__ */ m(g, {
1081
+ onClick: rt,
1082
+ disabled: Xe.isPending,
1083
+ children: Xe.isPending ? "Creating…" : "Create target"
1047
1084
  })] })
1048
1085
  ] })
1049
1086
  })
@@ -1051,6 +1088,6 @@ function M() {
1051
1088
  });
1052
1089
  }
1053
1090
  //#endregion
1054
- export { M as CarbonPage };
1091
+ export { N as CarbonPage };
1055
1092
 
1056
1093
  //# sourceMappingURL=CarbonPage.js.map