@burdenoff/microfe-theglobalfuel 2026.705.2 → 2026.705.4

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 (80) hide show
  1. package/dist/theglobalfuel/TheGlobalFuelRoot.js +54 -46
  2. package/dist/theglobalfuel/TheGlobalFuelRoot.js.map +1 -1
  3. package/dist/theglobalfuel/TheGlobalFuelRoutes.js +10 -6
  4. package/dist/theglobalfuel/TheGlobalFuelRoutes.js.map +1 -1
  5. package/dist/theglobalfuel/components/DataTable.js +126 -58
  6. package/dist/theglobalfuel/components/DataTable.js.map +1 -1
  7. package/dist/theglobalfuel/components/EmptyState.js +4 -4
  8. package/dist/theglobalfuel/components/EmptyState.js.map +1 -1
  9. package/dist/theglobalfuel/components/MetricsCard.js +2 -2
  10. package/dist/theglobalfuel/components/MetricsCard.js.map +1 -1
  11. package/dist/theglobalfuel/components/WorldMap.js +115 -0
  12. package/dist/theglobalfuel/components/WorldMap.js.map +1 -0
  13. package/dist/theglobalfuel/components/index.js +9 -0
  14. package/dist/theglobalfuel/components/viz/AllocationBar.js +68 -0
  15. package/dist/theglobalfuel/components/viz/AllocationBar.js.map +1 -0
  16. package/dist/theglobalfuel/components/viz/AreaChart.js +102 -0
  17. package/dist/theglobalfuel/components/viz/AreaChart.js.map +1 -0
  18. package/dist/theglobalfuel/components/viz/AvatarStack.js +2 -0
  19. package/dist/theglobalfuel/components/viz/BarChart.js +4 -0
  20. package/dist/theglobalfuel/components/viz/CertificateCard.js +4 -0
  21. package/dist/theglobalfuel/components/viz/DonutChart.js +109 -0
  22. package/dist/theglobalfuel/components/viz/DonutChart.js.map +1 -0
  23. package/dist/theglobalfuel/components/viz/HBarFunnel.js +3 -0
  24. package/dist/theglobalfuel/components/viz/Heatmap.js +3 -0
  25. package/dist/theglobalfuel/components/viz/KanbanBoard.js +2 -0
  26. package/dist/theglobalfuel/components/viz/LineChart.js +4 -0
  27. package/dist/theglobalfuel/components/viz/OrgTree.js +2 -0
  28. package/dist/theglobalfuel/components/viz/PathSteps.js +68 -0
  29. package/dist/theglobalfuel/components/viz/PathSteps.js.map +1 -0
  30. package/dist/theglobalfuel/components/viz/ProgressRing.js +6 -0
  31. package/dist/theglobalfuel/components/viz/ProgressRing.js.map +1 -0
  32. package/dist/theglobalfuel/components/viz/RatingStars.js +3 -0
  33. package/dist/theglobalfuel/components/viz/SegmentedTabs.js +3 -0
  34. package/dist/theglobalfuel/components/viz/SkillBar.js +3 -0
  35. package/dist/theglobalfuel/components/viz/Sparkline.js +74 -0
  36. package/dist/theglobalfuel/components/viz/Sparkline.js.map +1 -0
  37. package/dist/theglobalfuel/components/viz/StatCard.js +3 -0
  38. package/dist/theglobalfuel/components/viz/StepProgress.js +64 -0
  39. package/dist/theglobalfuel/components/viz/StepProgress.js.map +1 -0
  40. package/dist/theglobalfuel/components/viz/Timeline.js +66 -0
  41. package/dist/theglobalfuel/components/viz/Timeline.js.map +1 -0
  42. package/dist/theglobalfuel/components/viz/index.js +23 -0
  43. package/dist/theglobalfuel/components/viz/lib/Avatar.js +1 -0
  44. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.js +119 -0
  45. package/dist/theglobalfuel/components/viz/lib/CartesianFrame.js.map +1 -0
  46. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.js +35 -0
  47. package/dist/theglobalfuel/components/viz/lib/ResponsiveSvg.js.map +1 -0
  48. package/dist/theglobalfuel/components/viz/lib/format.js +17 -0
  49. package/dist/theglobalfuel/components/viz/lib/format.js.map +1 -0
  50. package/dist/theglobalfuel/components/viz/lib/geometry.js +61 -0
  51. package/dist/theglobalfuel/components/viz/lib/geometry.js.map +1 -0
  52. package/dist/theglobalfuel/components/viz/lib/hooks.js +39 -0
  53. package/dist/theglobalfuel/components/viz/lib/hooks.js.map +1 -0
  54. package/dist/theglobalfuel/components/viz/lib/palette.js +27 -0
  55. package/dist/theglobalfuel/components/viz/lib/palette.js.map +1 -0
  56. package/dist/theglobalfuel/hooks/useCursorPager.js +6 -15
  57. package/dist/theglobalfuel/hooks/useCursorPager.js.map +1 -1
  58. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js +431 -316
  59. package/dist/theglobalfuel/pages/assets/AssetDetailPage.js.map +1 -1
  60. package/dist/theglobalfuel/pages/assets/AssetsPage.js +99 -99
  61. package/dist/theglobalfuel/pages/assets/AssetsPage.js.map +1 -1
  62. package/dist/theglobalfuel/pages/compliance/CompliancePage.js +250 -250
  63. package/dist/theglobalfuel/pages/compliance/CompliancePage.js.map +1 -1
  64. package/dist/theglobalfuel/pages/contracts/ContractsPage.js +2 -2
  65. package/dist/theglobalfuel/pages/contracts/ContractsPage.js.map +1 -1
  66. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js +525 -227
  67. package/dist/theglobalfuel/pages/dashboard/DashboardPage.js.map +1 -1
  68. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js +255 -206
  69. package/dist/theglobalfuel/pages/emissions/EmissionsPage.js.map +1 -1
  70. package/dist/theglobalfuel/pages/inventory/InventoryPage.js +60 -60
  71. package/dist/theglobalfuel/pages/inventory/InventoryPage.js.map +1 -1
  72. package/dist/theglobalfuel/pages/production/ProductionPage.js +2 -2
  73. package/dist/theglobalfuel/pages/production/ProductionPage.js.map +1 -1
  74. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js +465 -0
  75. package/dist/theglobalfuel/pages/provenance/ProvenancePage.js.map +1 -0
  76. package/dist/theglobalfuel/pages/reserves/ReservesPage.js +152 -152
  77. package/dist/theglobalfuel/pages/reserves/ReservesPage.js.map +1 -1
  78. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js +356 -227
  79. package/dist/theglobalfuel/pages/shipments/ShipmentsPage.js.map +1 -1
  80. package/package.json +1 -1
@@ -1,27 +1,28 @@
1
1
  import { useTheGlobalFuel as e } from "../../context/TheGlobalFuelContext.js";
2
2
  import { PageLayout as t } from "../../components/PageLayout.js";
3
3
  import { MetricsCard as n } from "../../components/MetricsCard.js";
4
- import { formatCoords as ee, formatDate as r, formatEnumLabel as i, formatNumber as a, formatPercent as te, formatRelativeTime as o, formatTonnesCo2e as ne, formatVolume as s, toBackendDate as c } from "../../utils/formatters.js";
5
- import { StatusBadge as l } from "../../components/StatusBadge.js";
6
- import { DataTable as u } from "../../components/DataTable.js";
7
- import { ErrorView as re, LoadingView as d, Section as f } from "../../components/StateViews.js";
8
- import { EmptyState as p } from "../../components/EmptyState.js";
4
+ import { formatCoords as ee, formatDate as r, formatEnumLabel as i, formatNumber as a, formatPercent as o, formatRelativeTime as s, formatTonnesCo2e as te, formatVolume as c, toBackendDate as l } from "../../utils/formatters.js";
5
+ import { StatusBadge as u } from "../../components/StatusBadge.js";
6
+ import { DataTable as d } from "../../components/DataTable.js";
7
+ import { ErrorView as ne, LoadingView as f, Section as p } from "../../components/StateViews.js";
8
+ import { EmptyState as m } from "../../components/EmptyState.js";
9
9
  import "../../context/index.js";
10
- import { useTheAsset as ie, useTheCreateReserveEstimate as ae, useTheEmissionRecords as oe, useTheRecordProduction as se, useTheRetireAsset as ce, useTheTransitionAsset as le } from "../../hooks/useTheGlobalFuelApi.js";
11
- import { useNotify as ue } from "../../hooks/useNotify.js";
10
+ import { useTheAsset as re, useTheCreateReserveEstimate as ie, useTheEmissionRecords as ae, useTheRecordProduction as oe, useTheRetireAsset as se, useTheTransitionAsset as ce } from "../../hooks/useTheGlobalFuelApi.js";
11
+ import { useNotify as le } from "../../hooks/useNotify.js";
12
12
  import "../../hooks/index.js";
13
- import { ASSET_TRANSITIONS as de, nextStatuses as fe } from "../../utils/transitions.js";
14
- import { Tabs as pe } from "../../components/Tabs.js";
15
- import { TheDiscussion as me } from "../../components/TheDiscussion.js";
16
- import { TheTags as he } from "../../components/TheTags.js";
13
+ import { ASSET_TRANSITIONS as ue, nextStatuses as de } from "../../utils/transitions.js";
14
+ import { Tabs as fe } from "../../components/Tabs.js";
15
+ import { TheDiscussion as pe } from "../../components/TheDiscussion.js";
16
+ import { TheTags as me } from "../../components/TheTags.js";
17
+ import { WorldMap as he } from "../../components/WorldMap.js";
17
18
  import "../../components/index.js";
18
- import { useState as m } from "react";
19
- import { Activity as ge, Archive as _e, ArrowLeft as h, CalendarClock as ve, Factory as g, Fuel as ye, Gauge as be, Layers as _, MapPin as xe, MessageSquare as Se, Percent as Ce, Plus as v, Tag as we } from "lucide-react";
20
- import { useParams as Te } from "react-router-dom";
21
- import { Fragment as Ee, jsx as y, jsxs as b } from "react/jsx-runtime";
22
- import { Button as x, GlassCard as De, Input as S, Label as C, ResponsiveDialog as Oe, ResponsiveDialogContent as ke, ResponsiveDialogDescription as Ae, ResponsiveDialogFooter as je, ResponsiveDialogHeader as Me, ResponsiveDialogTitle as Ne, Select as w, SelectContent as T, SelectItem as E, SelectTrigger as D, SelectValue as O, Textarea as k } from "@burdenoff/fe-libs/ui";
19
+ import { useState as h } from "react";
20
+ import { Activity as ge, Archive as _e, ArrowLeft as ve, CalendarClock as ye, Factory as be, Fuel as xe, Gauge as Se, Layers as Ce, MapPin as we, MessageSquare as Te, Percent as Ee, Plus as g, Tag as De } from "lucide-react";
21
+ import { useParams as Oe } from "react-router-dom";
22
+ import { Fragment as ke, jsx as _, jsxs as v } from "react/jsx-runtime";
23
+ import { Button as y, GlassCard as b, Input as x, Label as S, ResponsiveDialog as C, ResponsiveDialogContent as w, ResponsiveDialogDescription as Ae, ResponsiveDialogFooter as je, ResponsiveDialogHeader as Me, ResponsiveDialogTitle as Ne, Select as T, SelectContent as E, SelectItem as D, SelectTrigger as O, SelectValue as k, Textarea as Pe } from "@burdenoff/fe-libs/ui";
23
24
  //#region src/theglobalfuel/pages/assets/AssetDetailPage.tsx
24
- var A = [
25
+ var Fe = [
25
26
  "BARRELS",
26
27
  "CUBIC_METERS",
27
28
  "TONNES",
@@ -29,15 +30,27 @@ var A = [
29
30
  "MWH",
30
31
  "GJ",
31
32
  "MCF"
32
- ], Pe = [
33
+ ], Ie = [
33
34
  "PROVED",
34
35
  "PROBABLE",
35
36
  "POSSIBLE",
36
37
  "CONTINGENT",
37
38
  "PROSPECTIVE"
38
- ], j = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
39
+ ], A = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
40
+ function j({ label: e, value: t }) {
41
+ return /* @__PURE__ */ v("div", {
42
+ className: "flex flex-col gap-0.5 border-b border-border-seam/60 py-2.5 last:border-b-0",
43
+ children: [/* @__PURE__ */ _("dt", {
44
+ className: "text-xs font-medium uppercase tracking-wide text-text-tertiary",
45
+ children: e
46
+ }), /* @__PURE__ */ _("dd", {
47
+ className: "truncate text-sm text-text-primary",
48
+ children: t
49
+ })]
50
+ });
51
+ }
39
52
  function M() {
40
- let { id: M } = Te(), { navigateTo: N } = e(), P = ue(), { data: F, isLoading: Fe, isError: I, refetch: Ie } = ie(M), L = oe({ assetId: M }), Le = le(), Re = ce(), R = se(), z = ae(), [B, ze] = m("production"), [V, H] = m(null), [Be, U] = m(!1), [W, G] = m({
53
+ let { id: M } = Oe(), { navigateTo: N } = e(), P = le(), { data: F, isLoading: Le, isError: Re, refetch: ze } = re(M), I = ae({ assetId: M }), Be = ce(), Ve = se(), L = oe(), R = ie(), [z, He] = h("production"), [B, V] = h(null), [Ue, H] = h(!1), [U, W] = h({
41
54
  periodStart: "",
42
55
  periodEnd: "",
43
56
  volume: "",
@@ -45,7 +58,7 @@ function M() {
45
58
  grade: "",
46
59
  downtimeHours: "",
47
60
  notes: ""
48
- }), [Ve, K] = m(!1), [q, J] = m({
61
+ }), [We, G] = h(!1), [K, q] = h({
49
62
  category: "PROVED",
50
63
  asOfDate: "",
51
64
  recoverable: "",
@@ -54,53 +67,58 @@ function M() {
54
67
  methodology: "",
55
68
  notes: ""
56
69
  });
57
- if (Fe) return /* @__PURE__ */ y(t, {
70
+ if (Le) return /* @__PURE__ */ _(t, {
58
71
  title: "Asset",
59
- children: /* @__PURE__ */ y(d, { label: "Loading asset…" })
72
+ children: /* @__PURE__ */ _(f, { label: "Loading asset…" })
60
73
  });
61
- if (I || !F) return /* @__PURE__ */ y(t, {
74
+ if (Re || !F) return /* @__PURE__ */ _(t, {
62
75
  title: "Asset",
63
- actions: /* @__PURE__ */ b(x, {
76
+ actions: /* @__PURE__ */ v(y, {
64
77
  variant: "ghost",
65
78
  onClick: () => N("assets"),
66
- children: [/* @__PURE__ */ y(h, { className: "mr-1.5 h-4 w-4" }), " Back"]
79
+ children: [/* @__PURE__ */ _(ve, { className: "mr-1.5 h-4 w-4" }), " Back"]
67
80
  }),
68
- children: I ? /* @__PURE__ */ y(re, {
81
+ children: Re ? /* @__PURE__ */ _(ne, {
69
82
  message: "This asset could not be loaded.",
70
- onRetry: () => Ie()
71
- }) : /* @__PURE__ */ y(p, {
83
+ onRetry: () => ze()
84
+ }) : /* @__PURE__ */ _(m, {
72
85
  illustration: "empty-search",
73
- icon: /* @__PURE__ */ y(ye, { className: "h-10 w-10" }),
86
+ icon: /* @__PURE__ */ _(xe, { className: "h-10 w-10" }),
74
87
  title: "Asset not found",
75
88
  description: "This asset may have been retired or you may not have access to it.",
76
- action: /* @__PURE__ */ y(x, {
89
+ action: /* @__PURE__ */ _(y, {
77
90
  onClick: () => N("assets"),
78
91
  children: "Back to assets"
79
92
  })
80
93
  })
81
94
  });
82
- let Y = F.productionRecords ?? [], X = F.reserveEstimates ?? [], Z = L.data?.items ?? [], He = F.status === "RETIRED", Ue = fe(de, F.status), We = () => {
83
- H(null), G({
84
- periodStart: j(),
85
- periodEnd: j(),
95
+ let J = F.productionRecords ?? [], Y = F.reserveEstimates ?? [], X = I.data?.items ?? [], Ge = F.status === "RETIRED", Ke = de(ue, F.status), qe = typeof F.latitude == "number" && typeof F.longitude == "number" ? {
96
+ lat: F.latitude,
97
+ lng: F.longitude,
98
+ label: F.name,
99
+ primary: !0
100
+ } : null, Je = () => {
101
+ V(null), W({
102
+ periodStart: A(),
103
+ periodEnd: A(),
86
104
  volume: "",
87
105
  unit: F.capacityUnit,
88
106
  grade: "",
89
107
  downtimeHours: "",
90
108
  notes: ""
91
- }), U(!0);
92
- }, Ge = () => {
93
- H(null), J({
109
+ }), H(!0);
110
+ }, Z = () => {
111
+ V(null), q({
94
112
  category: "PROVED",
95
- asOfDate: j(),
113
+ asOfDate: A(),
96
114
  recoverable: "",
97
115
  recoveryFactor: "",
98
116
  unit: F.capacityUnit,
99
117
  methodology: "",
100
118
  notes: ""
101
- }), K(!0);
119
+ }), G(!0);
102
120
  }, Q = () => {
103
- U(!1), H(null), G({
121
+ H(!1), V(null), W({
104
122
  periodStart: "",
105
123
  periodEnd: "",
106
124
  volume: "",
@@ -110,7 +128,7 @@ function M() {
110
128
  notes: ""
111
129
  });
112
130
  }, $ = () => {
113
- K(!1), H(null), J({
131
+ G(!1), V(null), q({
114
132
  category: "PROVED",
115
133
  asOfDate: "",
116
134
  recoverable: "",
@@ -119,87 +137,87 @@ function M() {
119
137
  methodology: "",
120
138
  notes: ""
121
139
  });
122
- }, Ke = async (e) => {
140
+ }, Ye = async (e) => {
123
141
  if (!(!M || e === F.status)) {
124
- H(null);
142
+ V(null);
125
143
  try {
126
- await Le.mutateAsync({
144
+ await Be.mutateAsync({
127
145
  id: M,
128
146
  status: e
129
147
  }), P.success(`Status changed to ${i(e)}`);
130
148
  } catch (e) {
131
- P.fromError(e), H(e instanceof Error ? e.message : "Failed to change asset status.");
149
+ P.fromError(e), V(e instanceof Error ? e.message : "Failed to change asset status.");
132
150
  }
133
151
  }
134
- }, qe = async () => {
152
+ }, Xe = async () => {
135
153
  if (M && window.confirm(`Retire ${F.name}? This marks the asset as decommissioned.`)) {
136
- H(null);
154
+ V(null);
137
155
  try {
138
- await Re.mutateAsync(M), P.success("Asset retired"), N("assets");
156
+ await Ve.mutateAsync(M), P.success("Asset retired"), N("assets");
139
157
  } catch (e) {
140
- P.fromError(e), H(e instanceof Error ? e.message : "Failed to retire asset.");
158
+ P.fromError(e), V(e instanceof Error ? e.message : "Failed to retire asset.");
141
159
  }
142
160
  }
143
- }, Je = async () => {
144
- let e = c(W.periodStart), t = c(W.periodEnd);
161
+ }, Ze = async () => {
162
+ let e = l(U.periodStart), t = l(U.periodEnd);
145
163
  if (!M || !e || !t) {
146
- H("Period start and period end are required.");
164
+ V("Period start and period end are required.");
147
165
  return;
148
166
  }
149
- let n = Number(W.volume);
150
- if (!W.volume || !Number.isFinite(n) || n <= 0) {
167
+ let n = Number(U.volume);
168
+ if (!U.volume || !Number.isFinite(n) || n <= 0) {
151
169
  let e = "Volume must be greater than zero.";
152
- H(e), P.error(e);
170
+ V(e), P.error(e);
153
171
  return;
154
172
  }
155
- H(null);
173
+ V(null);
156
174
  try {
157
- await R.mutateAsync({
175
+ await L.mutateAsync({
158
176
  assetId: M,
159
177
  periodStart: e,
160
178
  periodEnd: t,
161
179
  volume: n,
162
- unit: W.unit,
163
- grade: W.grade ? Number(W.grade) : null,
164
- downtimeHours: W.downtimeHours ? Number(W.downtimeHours) : null,
165
- notes: W.notes.trim() || null
180
+ unit: U.unit,
181
+ grade: U.grade ? Number(U.grade) : null,
182
+ downtimeHours: U.downtimeHours ? Number(U.downtimeHours) : null,
183
+ notes: U.notes.trim() || null
166
184
  }), P.success("Production recorded"), Q();
167
185
  } catch (e) {
168
- P.fromError(e), H(e instanceof Error ? e.message : "Failed to record production.");
186
+ P.fromError(e), V(e instanceof Error ? e.message : "Failed to record production.");
169
187
  }
170
- }, Ye = async () => {
171
- let e = c(q.asOfDate);
188
+ }, Qe = async () => {
189
+ let e = l(K.asOfDate);
172
190
  if (!M || !e) {
173
- H("As-of date is required.");
191
+ V("As-of date is required.");
174
192
  return;
175
193
  }
176
- let t = Number(q.recoverable);
177
- if (!q.recoverable || !Number.isFinite(t) || t <= 0) {
194
+ let t = Number(K.recoverable);
195
+ if (!K.recoverable || !Number.isFinite(t) || t <= 0) {
178
196
  let e = "Recoverable volume must be greater than zero.";
179
- H(e), P.error(e);
197
+ V(e), P.error(e);
180
198
  return;
181
199
  }
182
- H(null);
200
+ V(null);
183
201
  try {
184
- await z.mutateAsync({
202
+ await R.mutateAsync({
185
203
  assetId: M,
186
- category: q.category,
204
+ category: K.category,
187
205
  asOfDate: e,
188
206
  recoverable: t,
189
- recoveryFactor: q.recoveryFactor ? Number(q.recoveryFactor) : null,
190
- unit: q.unit,
191
- methodology: q.methodology.trim() || null,
192
- notes: q.notes.trim() || null
207
+ recoveryFactor: K.recoveryFactor ? Number(K.recoveryFactor) : null,
208
+ unit: K.unit,
209
+ methodology: K.methodology.trim() || null,
210
+ notes: K.notes.trim() || null
193
211
  }), P.success("Reserve estimate added"), $();
194
212
  } catch (e) {
195
- P.fromError(e), H(e instanceof Error ? e.message : "Failed to add reserve estimate.");
213
+ P.fromError(e), V(e instanceof Error ? e.message : "Failed to add reserve estimate.");
196
214
  }
197
- }, Xe = [
215
+ }, $e = [
198
216
  {
199
217
  key: "period",
200
218
  header: "Period",
201
219
  sortValue: (e) => new Date(e.periodEnd || e.createdAt).getTime(),
202
- render: (e) => /* @__PURE__ */ b("span", {
220
+ render: (e) => /* @__PURE__ */ v("span", {
203
221
  className: "font-medium text-text-primary",
204
222
  children: [
205
223
  r(e.periodStart),
@@ -213,9 +231,9 @@ function M() {
213
231
  header: "Volume",
214
232
  align: "right",
215
233
  sortValue: (e) => e.volume,
216
- render: (e) => /* @__PURE__ */ y("span", {
234
+ render: (e) => /* @__PURE__ */ _("span", {
217
235
  className: "tabular-nums font-medium text-text-primary",
218
- children: s(e.volume, e.unit)
236
+ children: c(e.volume, e.unit)
219
237
  })
220
238
  },
221
239
  {
@@ -223,10 +241,10 @@ function M() {
223
241
  header: "Grade",
224
242
  align: "right",
225
243
  hideOnMobile: !0,
226
- render: (e) => e.grade == null ? /* @__PURE__ */ y("span", {
244
+ render: (e) => e.grade == null ? /* @__PURE__ */ _("span", {
227
245
  className: "text-text-tertiary",
228
246
  children: "—"
229
- }) : /* @__PURE__ */ y("span", {
247
+ }) : /* @__PURE__ */ _("span", {
230
248
  className: "tabular-nums text-text-secondary",
231
249
  children: a(e.grade)
232
250
  })
@@ -237,7 +255,7 @@ function M() {
237
255
  align: "right",
238
256
  hideOnMobile: !0,
239
257
  sortValue: (e) => e.downtimeHours,
240
- render: (e) => /* @__PURE__ */ b("span", {
258
+ render: (e) => /* @__PURE__ */ v("span", {
241
259
  className: "tabular-nums text-text-secondary",
242
260
  children: [a(e.downtimeHours), " h"]
243
261
  })
@@ -246,10 +264,10 @@ function M() {
246
264
  key: "notes",
247
265
  header: "Notes",
248
266
  hideOnMobile: !0,
249
- render: (e) => e.notes ? /* @__PURE__ */ y("span", {
267
+ render: (e) => e.notes ? /* @__PURE__ */ _("span", {
250
268
  className: "block max-w-[16rem] truncate text-text-secondary",
251
269
  children: e.notes
252
- }) : /* @__PURE__ */ y("span", {
270
+ }) : /* @__PURE__ */ _("span", {
253
271
  className: "text-text-tertiary",
254
272
  children: "—"
255
273
  })
@@ -259,21 +277,21 @@ function M() {
259
277
  header: "Recorded",
260
278
  align: "right",
261
279
  hideOnMobile: !0,
262
- render: (e) => /* @__PURE__ */ y("span", {
280
+ render: (e) => /* @__PURE__ */ _("span", {
263
281
  className: "text-text-tertiary",
264
- children: o(e.createdAt)
282
+ children: s(e.createdAt)
265
283
  })
266
284
  }
267
- ], Ze = [
285
+ ], et = [
268
286
  {
269
287
  key: "category",
270
288
  header: "Category",
271
- render: (e) => /* @__PURE__ */ y(l, { status: e.category })
289
+ render: (e) => /* @__PURE__ */ _(u, { status: e.category })
272
290
  },
273
291
  {
274
292
  key: "asOf",
275
293
  header: "As of",
276
- render: (e) => /* @__PURE__ */ y("span", {
294
+ render: (e) => /* @__PURE__ */ _("span", {
277
295
  className: "text-text-secondary",
278
296
  children: r(e.asOfDate)
279
297
  })
@@ -283,9 +301,9 @@ function M() {
283
301
  header: "Recoverable",
284
302
  align: "right",
285
303
  sortValue: (e) => e.recoverable,
286
- render: (e) => /* @__PURE__ */ y("span", {
304
+ render: (e) => /* @__PURE__ */ _("span", {
287
305
  className: "tabular-nums font-medium text-text-primary",
288
- children: s(e.recoverable, e.unit)
306
+ children: c(e.recoverable, e.unit)
289
307
  })
290
308
  },
291
309
  {
@@ -293,22 +311,22 @@ function M() {
293
311
  header: "Recovery factor",
294
312
  align: "right",
295
313
  hideOnMobile: !0,
296
- render: (e) => e.recoveryFactor == null ? /* @__PURE__ */ y("span", {
314
+ render: (e) => e.recoveryFactor == null ? /* @__PURE__ */ _("span", {
297
315
  className: "text-text-tertiary",
298
316
  children: "—"
299
- }) : /* @__PURE__ */ y("span", {
317
+ }) : /* @__PURE__ */ _("span", {
300
318
  className: "tabular-nums text-text-secondary",
301
- children: te(e.recoveryFactor)
319
+ children: o(e.recoveryFactor)
302
320
  })
303
321
  },
304
322
  {
305
323
  key: "methodology",
306
324
  header: "Methodology",
307
325
  hideOnMobile: !0,
308
- render: (e) => e.methodology ? /* @__PURE__ */ y("span", {
326
+ render: (e) => e.methodology ? /* @__PURE__ */ _("span", {
309
327
  className: "block max-w-[14rem] truncate text-text-secondary",
310
328
  children: e.methodology
311
- }) : /* @__PURE__ */ y("span", {
329
+ }) : /* @__PURE__ */ _("span", {
312
330
  className: "text-text-tertiary",
313
331
  children: "—"
314
332
  })
@@ -318,32 +336,32 @@ function M() {
318
336
  header: "Added",
319
337
  align: "right",
320
338
  hideOnMobile: !0,
321
- render: (e) => /* @__PURE__ */ y("span", {
339
+ render: (e) => /* @__PURE__ */ _("span", {
322
340
  className: "text-text-tertiary",
323
- children: o(e.createdAt)
341
+ children: s(e.createdAt)
324
342
  })
325
343
  }
326
- ], Qe = [
344
+ ], tt = [
327
345
  {
328
346
  key: "scope",
329
347
  header: "Scope",
330
- render: (e) => /* @__PURE__ */ y(l, { status: e.scope })
348
+ render: (e) => /* @__PURE__ */ _(u, { status: e.scope })
331
349
  },
332
350
  {
333
351
  key: "co2e",
334
352
  header: "CO₂e",
335
353
  align: "right",
336
354
  sortValue: (e) => e.co2eTonnes,
337
- render: (e) => /* @__PURE__ */ y("span", {
355
+ render: (e) => /* @__PURE__ */ _("span", {
338
356
  className: "tabular-nums font-medium text-text-primary",
339
- children: ne(e.co2eTonnes)
357
+ children: te(e.co2eTonnes)
340
358
  })
341
359
  },
342
360
  {
343
361
  key: "period",
344
362
  header: "Period",
345
363
  hideOnMobile: !0,
346
- render: (e) => /* @__PURE__ */ b("span", {
364
+ render: (e) => /* @__PURE__ */ v("span", {
347
365
  className: "text-text-secondary",
348
366
  children: [
349
367
  r(e.periodStart),
@@ -356,7 +374,7 @@ function M() {
356
374
  key: "source",
357
375
  header: "Source",
358
376
  hideOnMobile: !0,
359
- render: (e) => /* @__PURE__ */ y("span", {
377
+ render: (e) => /* @__PURE__ */ _("span", {
360
378
  className: "text-text-secondary",
361
379
  children: e.source ?? "—"
362
380
  })
@@ -364,10 +382,10 @@ function M() {
364
382
  {
365
383
  key: "verified",
366
384
  header: "Verified",
367
- render: (e) => e.verified ? /* @__PURE__ */ y("span", {
385
+ render: (e) => e.verified ? /* @__PURE__ */ _("span", {
368
386
  className: "text-sm font-medium text-status-success-text",
369
387
  children: "Verified"
370
- }) : /* @__PURE__ */ y("span", {
388
+ }) : /* @__PURE__ */ _("span", {
371
389
  className: "text-sm text-text-tertiary",
372
390
  children: "Unverified"
373
391
  })
@@ -377,142 +395,239 @@ function M() {
377
395
  header: "Recorded",
378
396
  align: "right",
379
397
  hideOnMobile: !0,
380
- render: (e) => /* @__PURE__ */ y("span", {
398
+ render: (e) => /* @__PURE__ */ _("span", {
381
399
  className: "text-text-tertiary",
382
- children: o(e.createdAt)
400
+ children: s(e.createdAt)
383
401
  })
384
402
  }
385
- ], $e = [
403
+ ], nt = [
386
404
  {
387
405
  value: "production",
388
406
  label: "Production",
389
- icon: /* @__PURE__ */ y(ge, { className: "h-4 w-4" }),
390
- count: Y.length
407
+ icon: /* @__PURE__ */ _(ge, { className: "h-4 w-4" }),
408
+ count: J.length
391
409
  },
392
410
  {
393
411
  value: "reserves",
394
412
  label: "Reserves",
395
- icon: /* @__PURE__ */ y(_, { className: "h-4 w-4" }),
396
- count: X.length
413
+ icon: /* @__PURE__ */ _(Ce, { className: "h-4 w-4" }),
414
+ count: Y.length
397
415
  },
398
416
  {
399
417
  value: "emissions",
400
418
  label: "Emissions",
401
- icon: /* @__PURE__ */ y(g, { className: "h-4 w-4" }),
402
- count: Z.length
419
+ icon: /* @__PURE__ */ _(be, { className: "h-4 w-4" }),
420
+ count: X.length
403
421
  },
404
422
  {
405
423
  value: "tags",
406
424
  label: "Tags",
407
- icon: /* @__PURE__ */ y(we, { className: "h-4 w-4" })
425
+ icon: /* @__PURE__ */ _(De, { className: "h-4 w-4" })
408
426
  },
409
427
  {
410
428
  value: "discussion",
411
429
  label: "Discussion",
412
- icon: /* @__PURE__ */ y(Se, { className: "h-4 w-4" })
430
+ icon: /* @__PURE__ */ _(Te, { className: "h-4 w-4" })
413
431
  }
414
432
  ];
415
- return /* @__PURE__ */ b(t, {
433
+ return /* @__PURE__ */ v(t, {
416
434
  title: F.name,
417
435
  description: [F.code, i(F.kind)].filter(Boolean).join(" · "),
418
- actions: /* @__PURE__ */ b(Ee, { children: [
419
- /* @__PURE__ */ y(l, { status: F.status }),
420
- !He && Ue.length > 0 && /* @__PURE__ */ b(w, {
436
+ actions: /* @__PURE__ */ v(ke, { children: [
437
+ /* @__PURE__ */ _(u, { status: F.status }),
438
+ !Ge && Ke.length > 0 && /* @__PURE__ */ v(T, {
421
439
  value: F.status,
422
- onValueChange: (e) => Ke(e),
423
- children: [/* @__PURE__ */ y(D, {
440
+ onValueChange: (e) => Ye(e),
441
+ children: [/* @__PURE__ */ _(O, {
424
442
  className: "h-9 w-44",
425
443
  "aria-label": "Change asset status",
426
- children: /* @__PURE__ */ y(O, { placeholder: "Change status" })
427
- }), /* @__PURE__ */ b(T, { children: [/* @__PURE__ */ y(E, {
444
+ children: /* @__PURE__ */ _(k, { placeholder: "Change status" })
445
+ }), /* @__PURE__ */ v(E, { children: [/* @__PURE__ */ _(D, {
428
446
  value: F.status,
429
447
  disabled: !0,
430
448
  children: i(F.status)
431
- }), Ue.map((e) => /* @__PURE__ */ y(E, {
449
+ }), Ke.map((e) => /* @__PURE__ */ _(D, {
432
450
  value: e,
433
451
  children: i(e)
434
452
  }, e))] })]
435
453
  }),
436
- !He && /* @__PURE__ */ b(x, {
454
+ !Ge && /* @__PURE__ */ v(y, {
437
455
  variant: "ghost",
438
- onClick: qe,
439
- disabled: Re.isPending,
456
+ onClick: Xe,
457
+ disabled: Ve.isPending,
440
458
  className: "text-status-error-text hover:text-status-error-text",
441
- children: [/* @__PURE__ */ y(_e, { className: "mr-1.5 h-4 w-4" }), " Retire"]
459
+ children: [/* @__PURE__ */ _(_e, { className: "mr-1.5 h-4 w-4" }), " Retire"]
442
460
  }),
443
- /* @__PURE__ */ b(x, {
461
+ /* @__PURE__ */ v(y, {
444
462
  variant: "ghost",
445
463
  onClick: () => N("assets"),
446
- children: [/* @__PURE__ */ y(h, { className: "mr-1.5 h-4 w-4" }), " Back"]
464
+ children: [/* @__PURE__ */ _(ve, { className: "mr-1.5 h-4 w-4" }), " Back"]
447
465
  })
448
466
  ] }),
449
467
  children: [
450
- /* @__PURE__ */ b("div", {
468
+ /* @__PURE__ */ v("div", {
451
469
  className: "grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",
452
470
  children: [
453
- /* @__PURE__ */ y(n, {
454
- icon: /* @__PURE__ */ y(be, { className: "h-5 w-5" }),
455
- value: F.capacityPerDay > 0 ? `${s(F.capacityPerDay, F.capacityUnit)}/day` : "—",
471
+ /* @__PURE__ */ _(n, {
472
+ icon: /* @__PURE__ */ _(Se, { className: "h-5 w-5" }),
473
+ value: F.capacityPerDay > 0 ? `${c(F.capacityPerDay, F.capacityUnit)}/day` : "—",
456
474
  label: "Capacity"
457
475
  }),
458
- /* @__PURE__ */ y(n, {
459
- icon: /* @__PURE__ */ y(Ce, { className: "h-5 w-5" }),
460
- value: te(F.workingInterestPct),
476
+ /* @__PURE__ */ _(n, {
477
+ icon: /* @__PURE__ */ _(Ee, { className: "h-5 w-5" }),
478
+ value: o(F.workingInterestPct),
461
479
  label: "Working interest"
462
480
  }),
463
- /* @__PURE__ */ y(n, {
464
- icon: /* @__PURE__ */ y(ye, { className: "h-5 w-5" }),
481
+ /* @__PURE__ */ _(n, {
482
+ icon: /* @__PURE__ */ _(xe, { className: "h-5 w-5" }),
465
483
  value: i(F.commodity),
466
484
  label: "Commodity"
467
485
  }),
468
- /* @__PURE__ */ y(n, {
469
- icon: /* @__PURE__ */ y(ve, { className: "h-5 w-5" }),
486
+ /* @__PURE__ */ _(n, {
487
+ icon: /* @__PURE__ */ _(ye, { className: "h-5 w-5" }),
470
488
  value: r(F.commissionedAt),
471
489
  label: "Commissioned"
472
490
  }),
473
- /* @__PURE__ */ y(n, {
474
- icon: /* @__PURE__ */ y(xe, { className: "h-5 w-5" }),
491
+ /* @__PURE__ */ _(n, {
492
+ icon: /* @__PURE__ */ _(we, { className: "h-5 w-5" }),
475
493
  value: ee(F.latitude, F.longitude),
476
494
  label: "Location",
477
- footer: F.location ? /* @__PURE__ */ y("p", {
495
+ footer: F.location ? /* @__PURE__ */ _("p", {
478
496
  className: "truncate text-xs text-text-tertiary",
479
497
  children: F.location
480
498
  }) : void 0
481
499
  })
482
500
  ]
483
501
  }),
484
- V && /* @__PURE__ */ y("p", {
502
+ /* @__PURE__ */ v("div", {
503
+ className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
504
+ children: [/* @__PURE__ */ v(b, {
505
+ treatment: "glass",
506
+ className: "p-6 lg:col-span-2",
507
+ children: [/* @__PURE__ */ _("h2", {
508
+ className: "mb-2 text-base font-semibold text-text-primary",
509
+ children: "Asset details"
510
+ }), /* @__PURE__ */ v("dl", {
511
+ className: "grid grid-cols-1 gap-x-8 sm:grid-cols-2",
512
+ children: [
513
+ /* @__PURE__ */ _(j, {
514
+ label: "Asset code",
515
+ value: F.code || "—"
516
+ }),
517
+ /* @__PURE__ */ _(j, {
518
+ label: "Kind",
519
+ value: i(F.kind)
520
+ }),
521
+ /* @__PURE__ */ _(j, {
522
+ label: "Commodity",
523
+ value: i(F.commodity)
524
+ }),
525
+ /* @__PURE__ */ _(j, {
526
+ label: "Status",
527
+ value: /* @__PURE__ */ _(u, { status: F.status })
528
+ }),
529
+ /* @__PURE__ */ _(j, {
530
+ label: "Capacity / day",
531
+ value: F.capacityPerDay > 0 ? `${c(F.capacityPerDay, F.capacityUnit)}/day` : "—"
532
+ }),
533
+ /* @__PURE__ */ _(j, {
534
+ label: "Working interest",
535
+ value: o(F.workingInterestPct)
536
+ }),
537
+ /* @__PURE__ */ _(j, {
538
+ label: "Operator lead",
539
+ value: F.operatorLeadId ? /* @__PURE__ */ _("span", {
540
+ className: "font-mono text-xs",
541
+ title: F.operatorLeadId,
542
+ children: F.operatorLeadId
543
+ }) : "—"
544
+ }),
545
+ /* @__PURE__ */ _(j, {
546
+ label: "Location",
547
+ value: F.location || "—"
548
+ }),
549
+ /* @__PURE__ */ _(j, {
550
+ label: "Coordinates",
551
+ value: ee(F.latitude, F.longitude)
552
+ }),
553
+ /* @__PURE__ */ _(j, {
554
+ label: "Commissioned",
555
+ value: r(F.commissionedAt)
556
+ }),
557
+ /* @__PURE__ */ _(j, {
558
+ label: "Decommissioned",
559
+ value: r(F.decommissionedAt)
560
+ }),
561
+ /* @__PURE__ */ _(j, {
562
+ label: "Registered",
563
+ value: /* @__PURE__ */ _("span", {
564
+ title: r(F.createdAt),
565
+ children: s(F.createdAt)
566
+ })
567
+ }),
568
+ /* @__PURE__ */ _(j, {
569
+ label: "Last updated",
570
+ value: /* @__PURE__ */ _("span", {
571
+ title: r(F.updatedAt),
572
+ children: s(F.updatedAt)
573
+ })
574
+ })
575
+ ]
576
+ })]
577
+ }), /* @__PURE__ */ v(b, {
578
+ treatment: "glass",
579
+ className: "flex flex-col gap-3 p-6",
580
+ children: [
581
+ /* @__PURE__ */ v("div", {
582
+ className: "flex items-center gap-2",
583
+ children: [/* @__PURE__ */ _(we, { className: "h-4 w-4 text-accent" }), /* @__PURE__ */ _("h2", {
584
+ className: "text-base font-semibold text-text-primary",
585
+ children: "Location"
586
+ })]
587
+ }),
588
+ qe ? /* @__PURE__ */ _(he, { points: [qe] }) : /* @__PURE__ */ _("div", {
589
+ className: "flex flex-1 items-center justify-center rounded-xl border border-dashed border-border-seam py-10 text-center text-sm text-text-secondary",
590
+ children: "No coordinates recorded for this asset."
591
+ }),
592
+ F.location && /* @__PURE__ */ _("p", {
593
+ className: "text-xs text-text-tertiary",
594
+ children: F.location
595
+ })
596
+ ]
597
+ })]
598
+ }),
599
+ B && /* @__PURE__ */ _("p", {
485
600
  className: "mt-4 text-sm text-status-error-text",
486
- children: V
601
+ children: B
487
602
  }),
488
- /* @__PURE__ */ y("div", {
603
+ /* @__PURE__ */ _("div", {
489
604
  className: "mt-6",
490
- children: /* @__PURE__ */ y(pe, {
491
- items: $e,
492
- value: B,
493
- onChange: ze
605
+ children: /* @__PURE__ */ _(fe, {
606
+ items: nt,
607
+ value: z,
608
+ onChange: He
494
609
  })
495
610
  }),
496
- B === "production" && /* @__PURE__ */ y(f, {
611
+ z === "production" && /* @__PURE__ */ _(p, {
497
612
  title: "Production",
498
613
  description: "Volumes produced per reporting period, with grade & downtime.",
499
- action: /* @__PURE__ */ b(x, {
614
+ action: /* @__PURE__ */ v(y, {
500
615
  size: "sm",
501
- onClick: We,
502
- children: [/* @__PURE__ */ y(v, { className: "mr-1.5 h-4 w-4" }), " Record production"]
616
+ onClick: Je,
617
+ children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
503
618
  }),
504
- children: Y.length === 0 ? /* @__PURE__ */ y(p, {
619
+ children: J.length === 0 ? /* @__PURE__ */ _(m, {
505
620
  illustration: "empty-data",
506
- icon: /* @__PURE__ */ y(ge, { className: "h-10 w-10" }),
621
+ icon: /* @__PURE__ */ _(ge, { className: "h-10 w-10" }),
507
622
  title: "No production recorded",
508
623
  description: "Record a production period to start tracking volumes for this asset.",
509
- action: /* @__PURE__ */ b(x, {
510
- onClick: We,
511
- children: [/* @__PURE__ */ y(v, { className: "mr-1.5 h-4 w-4" }), " Record production"]
624
+ action: /* @__PURE__ */ v(y, {
625
+ onClick: Je,
626
+ children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Record production"]
512
627
  })
513
- }) : /* @__PURE__ */ y(u, {
514
- columns: Xe,
515
- rows: Y,
628
+ }) : /* @__PURE__ */ _(d, {
629
+ columns: $e,
630
+ rows: J,
516
631
  rowKey: (e) => e.id,
517
632
  defaultSort: {
518
633
  key: "period",
@@ -520,335 +635,335 @@ function M() {
520
635
  }
521
636
  })
522
637
  }),
523
- B === "reserves" && /* @__PURE__ */ y(f, {
638
+ z === "reserves" && /* @__PURE__ */ _(p, {
524
639
  title: "Reserve estimates",
525
640
  description: "Recoverable volumes by SPE-PRMS reserve category & as-of date.",
526
- action: /* @__PURE__ */ b(x, {
641
+ action: /* @__PURE__ */ v(y, {
527
642
  size: "sm",
528
- onClick: Ge,
529
- children: [/* @__PURE__ */ y(v, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
643
+ onClick: Z,
644
+ children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
530
645
  }),
531
- children: X.length === 0 ? /* @__PURE__ */ y(p, {
646
+ children: Y.length === 0 ? /* @__PURE__ */ _(m, {
532
647
  illustration: "empty-data",
533
- icon: /* @__PURE__ */ y(_, { className: "h-10 w-10" }),
648
+ icon: /* @__PURE__ */ _(Ce, { className: "h-10 w-10" }),
534
649
  title: "No reserve estimates",
535
650
  description: "Add a reserve estimate to record recoverable volumes for this asset.",
536
- action: /* @__PURE__ */ b(x, {
537
- onClick: Ge,
538
- children: [/* @__PURE__ */ y(v, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
651
+ action: /* @__PURE__ */ v(y, {
652
+ onClick: Z,
653
+ children: [/* @__PURE__ */ _(g, { className: "mr-1.5 h-4 w-4" }), " Add reserve estimate"]
539
654
  })
540
- }) : /* @__PURE__ */ y(u, {
541
- columns: Ze,
542
- rows: X,
655
+ }) : /* @__PURE__ */ _(d, {
656
+ columns: et,
657
+ rows: Y,
543
658
  rowKey: (e) => e.id
544
659
  })
545
660
  }),
546
- B === "emissions" && /* @__PURE__ */ y(f, {
661
+ z === "emissions" && /* @__PURE__ */ _(p, {
547
662
  title: "Emissions",
548
663
  description: "GHG emission records attributed to this asset (Scope 1 / 2 / 3).",
549
- children: L.isLoading ? /* @__PURE__ */ y(d, { label: "Loading emissions…" }) : L.isError ? /* @__PURE__ */ y(re, {
664
+ children: I.isLoading ? /* @__PURE__ */ _(f, { label: "Loading emissions…" }) : I.isError ? /* @__PURE__ */ _(ne, {
550
665
  message: "Couldn't load emission records.",
551
- onRetry: () => L.refetch()
552
- }) : Z.length === 0 ? /* @__PURE__ */ y(p, {
666
+ onRetry: () => I.refetch()
667
+ }) : X.length === 0 ? /* @__PURE__ */ _(m, {
553
668
  illustration: "empty-data",
554
- icon: /* @__PURE__ */ y(g, { className: "h-10 w-10" }),
669
+ icon: /* @__PURE__ */ _(be, { className: "h-10 w-10" }),
555
670
  title: "No emissions recorded",
556
671
  description: "Emission records attributed to this asset will appear here."
557
- }) : /* @__PURE__ */ y(u, {
558
- columns: Qe,
559
- rows: Z,
672
+ }) : /* @__PURE__ */ _(d, {
673
+ columns: tt,
674
+ rows: X,
560
675
  rowKey: (e) => e.id
561
676
  })
562
677
  }),
563
- B === "tags" && /* @__PURE__ */ y(f, {
678
+ z === "tags" && /* @__PURE__ */ _(p, {
564
679
  title: "Tags",
565
680
  description: "Label this asset for search, grouping & reporting.",
566
- children: /* @__PURE__ */ y(De, {
681
+ children: /* @__PURE__ */ _(b, {
567
682
  treatment: "glass",
568
683
  className: "p-6",
569
- children: /* @__PURE__ */ y(he, {
684
+ children: /* @__PURE__ */ _(me, {
570
685
  entityType: "theglobalfuel-asset",
571
686
  entityId: F.id
572
687
  })
573
688
  })
574
689
  }),
575
- B === "discussion" && /* @__PURE__ */ y("div", {
690
+ z === "discussion" && /* @__PURE__ */ _("div", {
576
691
  className: "mt-8",
577
- children: /* @__PURE__ */ y(me, {
692
+ children: /* @__PURE__ */ _(pe, {
578
693
  entityType: "theglobalfuel-asset",
579
694
  entityId: F.id,
580
695
  title: "Discussion",
581
696
  description: "Notes & coordination for this asset."
582
697
  })
583
698
  }),
584
- /* @__PURE__ */ y(Oe, {
585
- open: Be,
586
- onOpenChange: (e) => e ? U(!0) : Q(),
587
- children: /* @__PURE__ */ b(ke, { children: [
588
- /* @__PURE__ */ b(Me, { children: [/* @__PURE__ */ y(Ne, { children: "Record production" }), /* @__PURE__ */ b(Ae, { children: [
699
+ /* @__PURE__ */ _(C, {
700
+ open: Ue,
701
+ onOpenChange: (e) => e ? H(!0) : Q(),
702
+ children: /* @__PURE__ */ v(w, { children: [
703
+ /* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Record production" }), /* @__PURE__ */ v(Ae, { children: [
589
704
  "Log a production period for ",
590
705
  F.name,
591
706
  "."
592
707
  ] })] }),
593
- /* @__PURE__ */ b("form", {
708
+ /* @__PURE__ */ v("form", {
594
709
  id: "recordProductionForm",
595
710
  onSubmit: (e) => {
596
- e.preventDefault(), Je();
711
+ e.preventDefault(), Ze();
597
712
  },
598
713
  className: "grid gap-4 py-2",
599
714
  children: [
600
- /* @__PURE__ */ b("div", {
715
+ /* @__PURE__ */ v("div", {
601
716
  className: "grid gap-2 sm:grid-cols-2",
602
- children: [/* @__PURE__ */ b("div", {
717
+ children: [/* @__PURE__ */ v("div", {
603
718
  className: "grid gap-1.5",
604
- children: [/* @__PURE__ */ y(C, {
719
+ children: [/* @__PURE__ */ _(S, {
605
720
  htmlFor: "prodStart",
606
721
  children: "Period start *"
607
- }), /* @__PURE__ */ y(S, {
722
+ }), /* @__PURE__ */ _(x, {
608
723
  id: "prodStart",
609
724
  type: "date",
610
- value: W.periodStart,
611
- onChange: (e) => G({
612
- ...W,
725
+ value: U.periodStart,
726
+ onChange: (e) => W({
727
+ ...U,
613
728
  periodStart: e.target.value
614
729
  })
615
730
  })]
616
- }), /* @__PURE__ */ b("div", {
731
+ }), /* @__PURE__ */ v("div", {
617
732
  className: "grid gap-1.5",
618
- children: [/* @__PURE__ */ y(C, {
733
+ children: [/* @__PURE__ */ _(S, {
619
734
  htmlFor: "prodEnd",
620
735
  children: "Period end *"
621
- }), /* @__PURE__ */ y(S, {
736
+ }), /* @__PURE__ */ _(x, {
622
737
  id: "prodEnd",
623
738
  type: "date",
624
- value: W.periodEnd,
625
- onChange: (e) => G({
626
- ...W,
739
+ value: U.periodEnd,
740
+ onChange: (e) => W({
741
+ ...U,
627
742
  periodEnd: e.target.value
628
743
  })
629
744
  })]
630
745
  })]
631
746
  }),
632
- /* @__PURE__ */ b("div", {
747
+ /* @__PURE__ */ v("div", {
633
748
  className: "grid gap-2 sm:grid-cols-2",
634
- children: [/* @__PURE__ */ b("div", {
749
+ children: [/* @__PURE__ */ v("div", {
635
750
  className: "grid gap-1.5",
636
- children: [/* @__PURE__ */ y(C, {
751
+ children: [/* @__PURE__ */ _(S, {
637
752
  htmlFor: "prodVolume",
638
753
  children: "Volume *"
639
- }), /* @__PURE__ */ y(S, {
754
+ }), /* @__PURE__ */ _(x, {
640
755
  id: "prodVolume",
641
756
  type: "number",
642
757
  min: "0",
643
758
  step: "any",
644
- value: W.volume,
645
- onChange: (e) => G({
646
- ...W,
759
+ value: U.volume,
760
+ onChange: (e) => W({
761
+ ...U,
647
762
  volume: e.target.value
648
763
  }),
649
764
  placeholder: "118500"
650
765
  })]
651
- }), /* @__PURE__ */ b("div", {
766
+ }), /* @__PURE__ */ v("div", {
652
767
  className: "grid gap-1.5",
653
- children: [/* @__PURE__ */ y(C, {
768
+ children: [/* @__PURE__ */ _(S, {
654
769
  htmlFor: "prodUnit",
655
770
  children: "Unit"
656
- }), /* @__PURE__ */ b(w, {
657
- value: W.unit,
658
- onValueChange: (e) => G({
659
- ...W,
771
+ }), /* @__PURE__ */ v(T, {
772
+ value: U.unit,
773
+ onValueChange: (e) => W({
774
+ ...U,
660
775
  unit: e
661
776
  }),
662
- children: [/* @__PURE__ */ y(D, {
777
+ children: [/* @__PURE__ */ _(O, {
663
778
  id: "prodUnit",
664
- children: /* @__PURE__ */ y(O, {})
665
- }), /* @__PURE__ */ y(T, { children: A.map((e) => /* @__PURE__ */ y(E, {
779
+ children: /* @__PURE__ */ _(k, {})
780
+ }), /* @__PURE__ */ _(E, { children: Fe.map((e) => /* @__PURE__ */ _(D, {
666
781
  value: e,
667
782
  children: i(e)
668
783
  }, e)) })]
669
784
  })]
670
785
  })]
671
786
  }),
672
- /* @__PURE__ */ b("div", {
787
+ /* @__PURE__ */ v("div", {
673
788
  className: "grid gap-2 sm:grid-cols-2",
674
- children: [/* @__PURE__ */ b("div", {
789
+ children: [/* @__PURE__ */ v("div", {
675
790
  className: "grid gap-1.5",
676
- children: [/* @__PURE__ */ y(C, {
791
+ children: [/* @__PURE__ */ _(S, {
677
792
  htmlFor: "prodGrade",
678
793
  children: "Grade"
679
- }), /* @__PURE__ */ y(S, {
794
+ }), /* @__PURE__ */ _(x, {
680
795
  id: "prodGrade",
681
796
  type: "number",
682
797
  step: "any",
683
- value: W.grade,
684
- onChange: (e) => G({
685
- ...W,
798
+ value: U.grade,
799
+ onChange: (e) => W({
800
+ ...U,
686
801
  grade: e.target.value
687
802
  }),
688
803
  placeholder: "Optional (e.g. API / assay)"
689
804
  })]
690
- }), /* @__PURE__ */ b("div", {
805
+ }), /* @__PURE__ */ v("div", {
691
806
  className: "grid gap-1.5",
692
- children: [/* @__PURE__ */ y(C, {
807
+ children: [/* @__PURE__ */ _(S, {
693
808
  htmlFor: "prodDowntime",
694
809
  children: "Downtime (hours)"
695
- }), /* @__PURE__ */ y(S, {
810
+ }), /* @__PURE__ */ _(x, {
696
811
  id: "prodDowntime",
697
812
  type: "number",
698
813
  min: "0",
699
814
  step: "any",
700
- value: W.downtimeHours,
701
- onChange: (e) => G({
702
- ...W,
815
+ value: U.downtimeHours,
816
+ onChange: (e) => W({
817
+ ...U,
703
818
  downtimeHours: e.target.value
704
819
  }),
705
820
  placeholder: "0"
706
821
  })]
707
822
  })]
708
823
  }),
709
- /* @__PURE__ */ b("div", {
824
+ /* @__PURE__ */ v("div", {
710
825
  className: "grid gap-1.5",
711
- children: [/* @__PURE__ */ y(C, {
826
+ children: [/* @__PURE__ */ _(S, {
712
827
  htmlFor: "prodNotes",
713
828
  children: "Notes"
714
- }), /* @__PURE__ */ y(k, {
829
+ }), /* @__PURE__ */ _(Pe, {
715
830
  id: "prodNotes",
716
831
  rows: 2,
717
- value: W.notes,
718
- onChange: (e) => G({
719
- ...W,
832
+ value: U.notes,
833
+ onChange: (e) => W({
834
+ ...U,
720
835
  notes: e.target.value
721
836
  }),
722
837
  placeholder: "Optional context about this period."
723
838
  })]
724
839
  }),
725
- V && Be && /* @__PURE__ */ y("p", {
840
+ B && Ue && /* @__PURE__ */ _("p", {
726
841
  className: "text-sm text-status-error-text",
727
- children: V
842
+ children: B
728
843
  })
729
844
  ]
730
845
  }),
731
- /* @__PURE__ */ b(je, { children: [/* @__PURE__ */ y(x, {
846
+ /* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
732
847
  variant: "outline",
733
848
  type: "button",
734
849
  onClick: Q,
735
850
  children: "Cancel"
736
- }), /* @__PURE__ */ y(x, {
851
+ }), /* @__PURE__ */ _(y, {
737
852
  type: "submit",
738
853
  form: "recordProductionForm",
739
- disabled: R.isPending,
740
- children: R.isPending ? "Recording…" : "Record production"
854
+ disabled: L.isPending,
855
+ children: L.isPending ? "Recording…" : "Record production"
741
856
  })] })
742
857
  ] })
743
858
  }),
744
- /* @__PURE__ */ y(Oe, {
745
- open: Ve,
746
- onOpenChange: (e) => e ? K(!0) : $(),
747
- children: /* @__PURE__ */ b(ke, { children: [
748
- /* @__PURE__ */ b(Me, { children: [/* @__PURE__ */ y(Ne, { children: "Add reserve estimate" }), /* @__PURE__ */ b(Ae, { children: [
859
+ /* @__PURE__ */ _(C, {
860
+ open: We,
861
+ onOpenChange: (e) => e ? G(!0) : $(),
862
+ children: /* @__PURE__ */ v(w, { children: [
863
+ /* @__PURE__ */ v(Me, { children: [/* @__PURE__ */ _(Ne, { children: "Add reserve estimate" }), /* @__PURE__ */ v(Ae, { children: [
749
864
  "Record a recoverable-volume estimate for ",
750
865
  F.name,
751
866
  "."
752
867
  ] })] }),
753
- /* @__PURE__ */ b("form", {
868
+ /* @__PURE__ */ v("form", {
754
869
  id: "reserveEstimateForm",
755
870
  onSubmit: (e) => {
756
- e.preventDefault(), Ye();
871
+ e.preventDefault(), Qe();
757
872
  },
758
873
  className: "grid gap-4 py-2",
759
874
  children: [
760
- /* @__PURE__ */ b("div", {
875
+ /* @__PURE__ */ v("div", {
761
876
  className: "grid gap-2 sm:grid-cols-2",
762
- children: [/* @__PURE__ */ b("div", {
877
+ children: [/* @__PURE__ */ v("div", {
763
878
  className: "grid gap-1.5",
764
- children: [/* @__PURE__ */ y(C, {
879
+ children: [/* @__PURE__ */ _(S, {
765
880
  htmlFor: "resCategory",
766
881
  children: "Category"
767
- }), /* @__PURE__ */ b(w, {
768
- value: q.category,
769
- onValueChange: (e) => J({
770
- ...q,
882
+ }), /* @__PURE__ */ v(T, {
883
+ value: K.category,
884
+ onValueChange: (e) => q({
885
+ ...K,
771
886
  category: e
772
887
  }),
773
- children: [/* @__PURE__ */ y(D, {
888
+ children: [/* @__PURE__ */ _(O, {
774
889
  id: "resCategory",
775
- children: /* @__PURE__ */ y(O, {})
776
- }), /* @__PURE__ */ y(T, { children: Pe.map((e) => /* @__PURE__ */ y(E, {
890
+ children: /* @__PURE__ */ _(k, {})
891
+ }), /* @__PURE__ */ _(E, { children: Ie.map((e) => /* @__PURE__ */ _(D, {
777
892
  value: e,
778
893
  children: i(e)
779
894
  }, e)) })]
780
895
  })]
781
- }), /* @__PURE__ */ b("div", {
896
+ }), /* @__PURE__ */ v("div", {
782
897
  className: "grid gap-1.5",
783
- children: [/* @__PURE__ */ y(C, {
898
+ children: [/* @__PURE__ */ _(S, {
784
899
  htmlFor: "resAsOf",
785
900
  children: "As-of date *"
786
- }), /* @__PURE__ */ y(S, {
901
+ }), /* @__PURE__ */ _(x, {
787
902
  id: "resAsOf",
788
903
  type: "date",
789
- value: q.asOfDate,
790
- onChange: (e) => J({
791
- ...q,
904
+ value: K.asOfDate,
905
+ onChange: (e) => q({
906
+ ...K,
792
907
  asOfDate: e.target.value
793
908
  })
794
909
  })]
795
910
  })]
796
911
  }),
797
- /* @__PURE__ */ b("div", {
912
+ /* @__PURE__ */ v("div", {
798
913
  className: "grid gap-2 sm:grid-cols-3",
799
914
  children: [
800
- /* @__PURE__ */ b("div", {
915
+ /* @__PURE__ */ v("div", {
801
916
  className: "grid gap-1.5",
802
- children: [/* @__PURE__ */ y(C, {
917
+ children: [/* @__PURE__ */ _(S, {
803
918
  htmlFor: "resRecoverable",
804
919
  children: "Recoverable *"
805
- }), /* @__PURE__ */ y(S, {
920
+ }), /* @__PURE__ */ _(x, {
806
921
  id: "resRecoverable",
807
922
  type: "number",
808
923
  min: "0",
809
924
  step: "any",
810
- value: q.recoverable,
811
- onChange: (e) => J({
812
- ...q,
925
+ value: K.recoverable,
926
+ onChange: (e) => q({
927
+ ...K,
813
928
  recoverable: e.target.value
814
929
  }),
815
930
  placeholder: "2400000"
816
931
  })]
817
932
  }),
818
- /* @__PURE__ */ b("div", {
933
+ /* @__PURE__ */ v("div", {
819
934
  className: "grid gap-1.5",
820
- children: [/* @__PURE__ */ y(C, {
935
+ children: [/* @__PURE__ */ _(S, {
821
936
  htmlFor: "resUnit",
822
937
  children: "Unit"
823
- }), /* @__PURE__ */ b(w, {
824
- value: q.unit,
825
- onValueChange: (e) => J({
826
- ...q,
938
+ }), /* @__PURE__ */ v(T, {
939
+ value: K.unit,
940
+ onValueChange: (e) => q({
941
+ ...K,
827
942
  unit: e
828
943
  }),
829
- children: [/* @__PURE__ */ y(D, {
944
+ children: [/* @__PURE__ */ _(O, {
830
945
  id: "resUnit",
831
- children: /* @__PURE__ */ y(O, {})
832
- }), /* @__PURE__ */ y(T, { children: A.map((e) => /* @__PURE__ */ y(E, {
946
+ children: /* @__PURE__ */ _(k, {})
947
+ }), /* @__PURE__ */ _(E, { children: Fe.map((e) => /* @__PURE__ */ _(D, {
833
948
  value: e,
834
949
  children: i(e)
835
950
  }, e)) })]
836
951
  })]
837
952
  }),
838
- /* @__PURE__ */ b("div", {
953
+ /* @__PURE__ */ v("div", {
839
954
  className: "grid gap-1.5",
840
- children: [/* @__PURE__ */ y(C, {
955
+ children: [/* @__PURE__ */ _(S, {
841
956
  htmlFor: "resFactor",
842
957
  children: "Recovery factor (%)"
843
- }), /* @__PURE__ */ y(S, {
958
+ }), /* @__PURE__ */ _(x, {
844
959
  id: "resFactor",
845
960
  type: "number",
846
961
  min: "0",
847
962
  max: "100",
848
963
  step: "any",
849
- value: q.recoveryFactor,
850
- onChange: (e) => J({
851
- ...q,
964
+ value: K.recoveryFactor,
965
+ onChange: (e) => q({
966
+ ...K,
852
967
  recoveryFactor: e.target.value
853
968
  }),
854
969
  placeholder: "35"
@@ -856,53 +971,53 @@ function M() {
856
971
  })
857
972
  ]
858
973
  }),
859
- /* @__PURE__ */ b("div", {
974
+ /* @__PURE__ */ v("div", {
860
975
  className: "grid gap-1.5",
861
- children: [/* @__PURE__ */ y(C, {
976
+ children: [/* @__PURE__ */ _(S, {
862
977
  htmlFor: "resMethodology",
863
978
  children: "Methodology"
864
- }), /* @__PURE__ */ y(S, {
979
+ }), /* @__PURE__ */ _(x, {
865
980
  id: "resMethodology",
866
- value: q.methodology,
867
- onChange: (e) => J({
868
- ...q,
981
+ value: K.methodology,
982
+ onChange: (e) => q({
983
+ ...K,
869
984
  methodology: e.target.value
870
985
  }),
871
986
  placeholder: "Volumetric / material balance / decline curve"
872
987
  })]
873
988
  }),
874
- /* @__PURE__ */ b("div", {
989
+ /* @__PURE__ */ v("div", {
875
990
  className: "grid gap-1.5",
876
- children: [/* @__PURE__ */ y(C, {
991
+ children: [/* @__PURE__ */ _(S, {
877
992
  htmlFor: "resNotes",
878
993
  children: "Notes"
879
- }), /* @__PURE__ */ y(k, {
994
+ }), /* @__PURE__ */ _(Pe, {
880
995
  id: "resNotes",
881
996
  rows: 2,
882
- value: q.notes,
883
- onChange: (e) => J({
884
- ...q,
997
+ value: K.notes,
998
+ onChange: (e) => q({
999
+ ...K,
885
1000
  notes: e.target.value
886
1001
  }),
887
1002
  placeholder: "Optional context about this estimate."
888
1003
  })]
889
1004
  }),
890
- V && Ve && /* @__PURE__ */ y("p", {
1005
+ B && We && /* @__PURE__ */ _("p", {
891
1006
  className: "text-sm text-status-error-text",
892
- children: V
1007
+ children: B
893
1008
  })
894
1009
  ]
895
1010
  }),
896
- /* @__PURE__ */ b(je, { children: [/* @__PURE__ */ y(x, {
1011
+ /* @__PURE__ */ v(je, { children: [/* @__PURE__ */ _(y, {
897
1012
  variant: "outline",
898
1013
  type: "button",
899
1014
  onClick: $,
900
1015
  children: "Cancel"
901
- }), /* @__PURE__ */ y(x, {
1016
+ }), /* @__PURE__ */ _(y, {
902
1017
  type: "submit",
903
1018
  form: "reserveEstimateForm",
904
- disabled: z.isPending,
905
- children: z.isPending ? "Adding…" : "Add estimate"
1019
+ disabled: R.isPending,
1020
+ children: R.isPending ? "Adding…" : "Add estimate"
906
1021
  })] })
907
1022
  ] })
908
1023
  })