@burdenoff/microfe-healthybowl 2026.812.9 → 2026.812.11

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.
@@ -16,40 +16,40 @@ import { XAxis as f } from "../../../node_modules/recharts/es6/cartesian/XAxis.j
16
16
  import { YAxis as p } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
17
17
  import { ComposedChart as m } from "../../../node_modules/recharts/es6/chart/ComposedChart.js";
18
18
  import { useSatelliteApi as te } from "./useSatelliteApi.js";
19
- import { formatDate as ne, formatNdvi as h, formatTonnes as g, healthBandVariant as _, reasonLabel as v, severityVariant as y, trendArrow as b } from "./ndviColors.js";
20
- import { NdviHeatmapMap as x } from "./NdviHeatmapMap.js";
19
+ import { formatDate as h, formatNdvi as g, formatTonnes as _, healthBandVariant as ne, ndviSourceBadge as v, reasonLabel as y, severityVariant as b, trendArrow as x } from "./ndviColors.js";
20
+ import { NdviHeatmapMap as re } from "./NdviHeatmapMap.js";
21
21
  import { YieldSimulationPanel as S } from "./YieldSimulationPanel.js";
22
22
  import { NdviComparePanel as C } from "./NdviComparePanel.js";
23
23
  import { YieldReportPanel as w } from "./YieldReportPanel.js";
24
- import { useCallback as T, useEffect as re, useMemo as E, useState as D } from "react";
25
- import { ArrowLeft as ie, Bug as O, ClipboardList as ae, Minus as oe, RefreshCw as se, TrendingDown as ce, TrendingUp as k } from "lucide-react";
26
- import { useNavigate as A, useParams as j } from "react-router";
27
- import { jsx as M, jsxs as N } from "react/jsx-runtime";
28
- import { Button as P } from "@burdenoff/fe-libs/ui";
24
+ import { useCallback as T, useEffect as E, useMemo as D, useState as O } from "react";
25
+ import { ArrowLeft as ie, Bug as k, ClipboardList as ae, Minus as oe, RefreshCw as se, TrendingDown as ce, TrendingUp as le } from "lucide-react";
26
+ import { useNavigate as A, useParams as ue } from "react-router";
27
+ import { jsx as j, jsxs as M } from "react/jsx-runtime";
28
+ import { Button as N } from "@burdenoff/fe-libs/ui";
29
29
  //#region src/healthybowl/pages/satellite/SatelliteFieldDetailPage.tsx
30
- var F = () => {
31
- let { fieldId: s = "" } = j(), { api: c } = te(), l = A(), { buildPath: u } = e(), { toast: d } = o(), [f, p] = D(null), [m, g] = D(!0), [E, F] = D(null), [R, z] = D(!1), [B, V] = D("overview"), [H, U] = D(null), [W, G] = D(!1), K = T(async () => {
32
- F(null);
30
+ var P = () => {
31
+ let { fieldId: s = "" } = ue(), { api: c } = te(), l = A(), { buildPath: u } = e(), { toast: d } = o(), [f, p] = O(null), [m, _] = O(!0), [D, P] = O(null), [L, R] = O(!1), [z, B] = O("overview"), [V, H] = O(null), [U, W] = O(!1), G = T(async () => {
32
+ P(null);
33
33
  try {
34
34
  p(await c.getFieldCropHealth(s));
35
35
  } catch (e) {
36
- F(e instanceof Error ? e.message : "Failed to load field crop health.");
36
+ P(e instanceof Error ? e.message : "Failed to load field crop health.");
37
37
  } finally {
38
- g(!1);
38
+ _(!1);
39
39
  }
40
40
  }, [c, s]);
41
- re(() => {
42
- K();
43
- }, [K]);
44
- let le = T(async () => {
45
- z(!0);
41
+ E(() => {
42
+ G();
43
+ }, [G]);
44
+ let de = T(async () => {
45
+ R(!0);
46
46
  try {
47
47
  let e = (f?.timeline.length ?? 0) > 0, t = await c.refreshNdvi(s, e ? 0 : 5);
48
48
  d({
49
49
  title: "NDVI refreshed",
50
50
  description: `${t.readingsCreated} reading(s), ${t.stressedZonesDetected} stressed zone(s) detected.`,
51
51
  variant: "success"
52
- }), await K();
52
+ }), await G();
53
53
  } catch (e) {
54
54
  d({
55
55
  title: "Refresh failed",
@@ -57,23 +57,23 @@ var F = () => {
57
57
  variant: "error"
58
58
  });
59
59
  } finally {
60
- z(!1);
60
+ R(!1);
61
61
  }
62
62
  }, [
63
63
  c,
64
64
  s,
65
65
  f,
66
66
  d,
67
- K
68
- ]), q = T(async (e) => {
69
- if (H) {
70
- G(!0);
67
+ G
68
+ ]), K = T(async (e) => {
69
+ if (V) {
70
+ W(!0);
71
71
  try {
72
- await c.escalateZone(H.id, e), d({
72
+ await c.escalateZone(V.id, e), d({
73
73
  title: e === "PEST" ? "Pest issue created" : "Scouting task created",
74
- description: `${H.label} escalated. ${e === "PEST" ? "Track it under Pest Management." : "Track it under the field activity log."}`,
74
+ description: `${V.label} escalated. ${e === "PEST" ? "Track it under Pest Management." : "Track it under the field activity log."}`,
75
75
  variant: "success"
76
- }), U(null), await K();
76
+ }), H(null), await G();
77
77
  } catch (e) {
78
78
  d({
79
79
  title: "Escalation failed",
@@ -81,61 +81,61 @@ var F = () => {
81
81
  variant: "error"
82
82
  });
83
83
  } finally {
84
- G(!1);
84
+ W(!1);
85
85
  }
86
86
  }
87
87
  }, [
88
88
  c,
89
- H,
89
+ V,
90
90
  d,
91
- K
91
+ G
92
92
  ]);
93
- if (m) return /* @__PURE__ */ M(i, {});
94
- if (E) return /* @__PURE__ */ M(ee, {
93
+ if (m) return /* @__PURE__ */ j(i, {});
94
+ if (D) return /* @__PURE__ */ j(ee, {
95
95
  title: "Couldn't load field crop health",
96
- description: E,
97
- onRetry: () => void K()
96
+ description: D,
97
+ onRetry: () => void G()
98
98
  });
99
99
  if (!f) return null;
100
- let { field: J, healthScore: Y, latestReading: X, stressedZones: Z, timeline: Q, yieldForecast: $ } = f, ue = Y.trendDirection === "UP" ? k : Y.trendDirection === "DOWN" ? ce : oe;
101
- return /* @__PURE__ */ N(t, {
100
+ let { field: q, healthScore: J, latestReading: Y, stressedZones: X, timeline: Z, yieldForecast: Q } = f, $ = Y ? v(Y.source, Y.cloudCoverPct) : null, fe = J.trendDirection === "UP" ? le : J.trendDirection === "DOWN" ? ce : oe;
101
+ return /* @__PURE__ */ M(t, {
102
102
  title: "Satellite Crop Health & Yield Forecast",
103
- description: `Field: ${J.name} · ${J.areaAcres.toFixed(1)} ${J.unit}${J.cropName ? ` · ${J.cropName}${J.variety ? ` (${J.variety})` : ""}` : ""}${J.farmName ? ` · ${J.farmName}` : ""}`,
103
+ description: `Field: ${q.name} · ${q.areaAcres.toFixed(1)} ${q.unit}${q.cropName ? ` · ${q.cropName}${q.variety ? ` (${q.variety})` : ""}` : ""}${q.farmName ? ` · ${q.farmName}` : ""}`,
104
104
  helpPrompt: "Explain this field's NDVI heatmap, stressed zones, health score and yield forecast.",
105
- actions: /* @__PURE__ */ N("div", {
105
+ actions: /* @__PURE__ */ M("div", {
106
106
  className: "flex flex-wrap items-center gap-2",
107
- children: [/* @__PURE__ */ N(P, {
107
+ children: [/* @__PURE__ */ M(N, {
108
108
  variant: "ghost",
109
109
  size: "sm",
110
110
  onClick: () => l(u("satellite")),
111
- children: [/* @__PURE__ */ M(ie, { className: "me-1.5 h-4 w-4" }), " All fields"]
112
- }), /* @__PURE__ */ N(P, {
111
+ children: [/* @__PURE__ */ j(ie, { className: "me-1.5 h-4 w-4" }), " All fields"]
112
+ }), /* @__PURE__ */ M(N, {
113
113
  size: "sm",
114
- onClick: () => void le(),
115
- disabled: R,
116
- children: [/* @__PURE__ */ M(se, { className: `me-1.5 h-4 w-4 ${R ? "animate-spin" : ""}` }), " Refresh NDVI"]
114
+ onClick: () => void de(),
115
+ disabled: L,
116
+ children: [/* @__PURE__ */ j(se, { className: `me-1.5 h-4 w-4 ${L ? "animate-spin" : ""}` }), " Refresh NDVI"]
117
117
  })]
118
118
  }),
119
119
  children: [
120
- /* @__PURE__ */ M("div", {
120
+ /* @__PURE__ */ j("div", {
121
121
  className: "mb-4 flex flex-wrap gap-1 border-b border-border-subtle",
122
122
  children: [
123
123
  ["overview", "Overview"],
124
124
  ["simulation", "Yield Simulation"],
125
125
  ["compare", "NDVI Comparison"],
126
126
  ["report", "Season Report"]
127
- ].map(([e, t]) => /* @__PURE__ */ M("button", {
128
- onClick: () => V(e),
129
- className: `-mb-px border-b-2 px-3 py-2 text-sm font-medium transition-colors ${B === e ? "border-accent-teal text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
127
+ ].map(([e, t]) => /* @__PURE__ */ j("button", {
128
+ onClick: () => B(e),
129
+ className: `-mb-px border-b-2 px-3 py-2 text-sm font-medium transition-colors ${z === e ? "border-accent-teal text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
130
130
  children: t
131
131
  }, e))
132
132
  }),
133
- !J.hasBoundary && /* @__PURE__ */ N("div", {
133
+ !q.hasBoundary && /* @__PURE__ */ M("div", {
134
134
  className: "mb-4 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-text-primary",
135
135
  children: [
136
136
  "This field has no saved boundary yet, so no NDVI heatmap can be clipped to it. Draw the field boundary on the",
137
137
  " ",
138
- /* @__PURE__ */ M("button", {
138
+ /* @__PURE__ */ j("button", {
139
139
  className: "underline",
140
140
  onClick: () => l(u("field-map")),
141
141
  children: "Field Map"
@@ -144,181 +144,195 @@ var F = () => {
144
144
  "first."
145
145
  ]
146
146
  }),
147
- B === "overview" && /* @__PURE__ */ N("div", {
147
+ z === "overview" && /* @__PURE__ */ M("div", {
148
148
  className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
149
- children: [/* @__PURE__ */ N("div", {
149
+ children: [/* @__PURE__ */ M("div", {
150
150
  className: "lg:col-span-2",
151
- children: [/* @__PURE__ */ M(x, {
152
- boundary: J.boundary,
153
- grid: X?.grid ?? null,
154
- zones: Z,
155
- onZoneClick: (e) => {
156
- let t = Z.find((t) => t.id === e);
157
- t && U(t);
158
- }
159
- }), /* @__PURE__ */ M(r, {
160
- title: "NDVI over time",
161
- className: "mt-4",
162
- children: Q.length === 0 ? /* @__PURE__ */ M("p", {
163
- className: "py-6 text-center text-sm text-text-secondary",
164
- children: "No readings yet — refresh NDVI."
165
- }) : /* @__PURE__ */ M("div", {
166
- className: "flex gap-3 overflow-x-auto pb-1",
167
- children: Q.map((e) => /* @__PURE__ */ N("div", {
168
- className: "flex min-w-[92px] flex-col items-center",
169
- children: [
170
- /* @__PURE__ */ M(I, {
171
- band: e.healthBand,
172
- ndvi: e.meanNdvi
173
- }),
174
- /* @__PURE__ */ M("span", {
175
- className: "mt-1 text-xs font-medium text-text-primary",
176
- children: h(e.meanNdvi)
177
- }),
178
- /* @__PURE__ */ M("span", {
179
- className: "text-[11px] text-text-secondary",
180
- children: ne(e.capturedDate)
181
- })
182
- ]
183
- }, e.readingId))
151
+ children: [
152
+ Y && $ && /* @__PURE__ */ M("div", {
153
+ className: "mb-2 flex items-center justify-between gap-2",
154
+ children: [/* @__PURE__ */ M("span", {
155
+ className: "text-xs text-text-secondary",
156
+ children: ["Latest reading · ", h(Y.capturedDate)]
157
+ }), /* @__PURE__ */ j(n, {
158
+ label: $.label,
159
+ variant: $.variant,
160
+ dot: $.variant === "info"
161
+ })]
162
+ }),
163
+ /* @__PURE__ */ j(re, {
164
+ boundary: q.boundary,
165
+ grid: Y?.grid ?? null,
166
+ zones: X,
167
+ onZoneClick: (e) => {
168
+ let t = X.find((t) => t.id === e);
169
+ t && H(t);
170
+ }
171
+ }),
172
+ /* @__PURE__ */ j(r, {
173
+ title: "NDVI over time",
174
+ className: "mt-4",
175
+ children: Z.length === 0 ? /* @__PURE__ */ j("p", {
176
+ className: "py-6 text-center text-sm text-text-secondary",
177
+ children: "No readings yet — refresh NDVI."
178
+ }) : /* @__PURE__ */ j("div", {
179
+ className: "flex gap-3 overflow-x-auto pb-1",
180
+ children: Z.map((e) => /* @__PURE__ */ M("div", {
181
+ className: "flex min-w-[92px] flex-col items-center",
182
+ children: [
183
+ /* @__PURE__ */ j(F, {
184
+ band: e.healthBand,
185
+ ndvi: e.meanNdvi
186
+ }),
187
+ /* @__PURE__ */ j("span", {
188
+ className: "mt-1 text-xs font-medium text-text-primary",
189
+ children: g(e.meanNdvi)
190
+ }),
191
+ /* @__PURE__ */ j("span", {
192
+ className: "text-[11px] text-text-secondary",
193
+ children: h(e.capturedDate)
194
+ })
195
+ ]
196
+ }, e.readingId))
197
+ })
184
198
  })
185
- })]
186
- }), /* @__PURE__ */ N("div", {
199
+ ]
200
+ }), /* @__PURE__ */ M("div", {
187
201
  className: "flex flex-col gap-4",
188
202
  children: [
189
- /* @__PURE__ */ N(r, {
203
+ /* @__PURE__ */ M(r, {
190
204
  title: "Field Health Score",
191
- children: [/* @__PURE__ */ N("div", {
205
+ children: [/* @__PURE__ */ M("div", {
192
206
  className: "flex items-start justify-between",
193
- children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("div", {
207
+ children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("div", {
194
208
  className: "text-4xl font-bold tabular-nums text-text-primary",
195
209
  children: [
196
- h(Y.meanNdvi),
210
+ g(J.meanNdvi),
197
211
  " ",
198
- /* @__PURE__ */ M("span", {
212
+ /* @__PURE__ */ j("span", {
199
213
  className: "text-lg font-medium text-text-secondary",
200
214
  children: "NDVI"
201
215
  })
202
216
  ]
203
- }), /* @__PURE__ */ M("div", {
217
+ }), /* @__PURE__ */ j("div", {
204
218
  className: "mt-1",
205
- children: /* @__PURE__ */ M(n, {
206
- label: Y.healthLabel,
207
- variant: _(Y.healthBand)
219
+ children: /* @__PURE__ */ j(n, {
220
+ label: J.healthLabel,
221
+ variant: ne(J.healthBand)
208
222
  })
209
- })] }), /* @__PURE__ */ N("div", {
210
- className: `flex items-center gap-1 rounded-md px-2 py-1 text-sm ${Y.trendDirection === "DOWN" ? "text-destructive" : Y.trendDirection === "UP" ? "text-success" : "text-text-secondary"}`,
211
- children: [/* @__PURE__ */ M(ue, { className: "h-4 w-4" }), Y.readingsCount >= 2 ? `${Math.abs(Y.trendPct).toFixed(1)}%` : "—"]
223
+ })] }), /* @__PURE__ */ M("div", {
224
+ className: `flex items-center gap-1 rounded-md px-2 py-1 text-sm ${J.trendDirection === "DOWN" ? "text-destructive" : J.trendDirection === "UP" ? "text-success" : "text-text-secondary"}`,
225
+ children: [/* @__PURE__ */ j(fe, { className: "h-4 w-4" }), J.readingsCount >= 2 ? `${Math.abs(J.trendPct).toFixed(1)}%` : "—"]
212
226
  })]
213
- }), /* @__PURE__ */ M("p", {
227
+ }), /* @__PURE__ */ j("p", {
214
228
  className: "mt-2 text-xs text-text-secondary",
215
- children: Y.readingsCount >= 2 ? `${b(Y.trendDirection)} ${Y.trendDelta >= 0 ? "+" : ""}${Y.trendDelta.toFixed(2)} NDVI vs previous reading (${h(Y.previousNdvi)})` : `From ${Y.readingsCount} reading(s) — refresh again for a trend.`
229
+ children: J.readingsCount >= 2 ? `${x(J.trendDirection)} ${J.trendDelta >= 0 ? "+" : ""}${J.trendDelta.toFixed(2)} NDVI vs previous reading (${g(J.previousNdvi)})` : `From ${J.readingsCount} reading(s) — refresh again for a trend.`
216
230
  })]
217
231
  }),
218
- /* @__PURE__ */ M(r, {
219
- title: `Stressed Zones Detected: ${Z.length}`,
220
- children: Z.length === 0 ? /* @__PURE__ */ M("p", {
232
+ /* @__PURE__ */ j(r, {
233
+ title: `Stressed Zones Detected: ${X.length}`,
234
+ children: X.length === 0 ? /* @__PURE__ */ j("p", {
221
235
  className: "py-2 text-sm text-text-secondary",
222
236
  children: "No stressed zones on the latest reading. 🎉"
223
- }) : /* @__PURE__ */ M("ul", {
237
+ }) : /* @__PURE__ */ j("ul", {
224
238
  className: "space-y-2",
225
- children: Z.map((e) => /* @__PURE__ */ N("li", {
239
+ children: X.map((e) => /* @__PURE__ */ M("li", {
226
240
  className: "rounded-lg border border-border-subtle p-2.5",
227
241
  children: [
228
- /* @__PURE__ */ N("div", {
242
+ /* @__PURE__ */ M("div", {
229
243
  className: "flex items-center justify-between gap-2",
230
- children: [/* @__PURE__ */ N("span", {
244
+ children: [/* @__PURE__ */ M("span", {
231
245
  className: "flex items-center gap-2 text-sm font-medium text-text-primary",
232
246
  children: [
233
- /* @__PURE__ */ M("span", { className: `h-2.5 w-2.5 rounded-full ${e.severity === "HIGH" ? "bg-destructive" : e.severity === "MEDIUM" ? "bg-warning" : "bg-warning/60"}` }),
247
+ /* @__PURE__ */ j("span", { className: `h-2.5 w-2.5 rounded-full ${e.severity === "HIGH" ? "bg-destructive" : e.severity === "MEDIUM" ? "bg-warning" : "bg-warning/60"}` }),
234
248
  e.label,
235
249
  " — ",
236
- v(e.reason)
250
+ y(e.reason)
237
251
  ]
238
- }), /* @__PURE__ */ M(n, {
252
+ }), /* @__PURE__ */ j(n, {
239
253
  label: e.status,
240
- variant: e.status === "ESCALATED" ? "info" : y(e.severity)
254
+ variant: e.status === "ESCALATED" ? "info" : b(e.severity)
241
255
  })]
242
256
  }),
243
- /* @__PURE__ */ N("p", {
257
+ /* @__PURE__ */ M("p", {
244
258
  className: "mt-1 text-xs text-text-secondary",
245
259
  children: [
246
260
  e.reasonDetail,
247
261
  " · NDVI ",
248
- h(e.zoneNdvi),
262
+ g(e.zoneNdvi),
249
263
  " (",
250
264
  e.deltaPct,
251
265
  "% vs field avg)"
252
266
  ]
253
267
  }),
254
- e.status !== "ESCALATED" && /* @__PURE__ */ M("div", {
268
+ e.status !== "ESCALATED" && /* @__PURE__ */ j("div", {
255
269
  className: "mt-2 flex gap-2",
256
- children: /* @__PURE__ */ N(P, {
270
+ children: /* @__PURE__ */ M(N, {
257
271
  variant: "outline",
258
272
  size: "sm",
259
- onClick: () => U(e),
260
- children: [/* @__PURE__ */ M(O, { className: "me-1 h-3.5 w-3.5" }), " Escalate"]
273
+ onClick: () => H(e),
274
+ children: [/* @__PURE__ */ j(k, { className: "me-1 h-3.5 w-3.5" }), " Escalate"]
261
275
  })
262
276
  })
263
277
  ]
264
278
  }, e.id))
265
279
  })
266
280
  }),
267
- $ && /* @__PURE__ */ M(r, {
281
+ Q && /* @__PURE__ */ j(r, {
268
282
  title: "Yield Forecast",
269
- children: /* @__PURE__ */ M(L, { forecast: $ })
283
+ children: /* @__PURE__ */ j(I, { forecast: Q })
270
284
  })
271
285
  ]
272
286
  })]
273
287
  }),
274
- B === "simulation" && /* @__PURE__ */ M(S, {
288
+ z === "simulation" && /* @__PURE__ */ j(S, {
275
289
  fieldId: s,
276
- field: J,
277
- baseForecast: $
290
+ field: q,
291
+ baseForecast: Q
278
292
  }),
279
- B === "compare" && /* @__PURE__ */ M(C, { fieldId: s }),
280
- B === "report" && /* @__PURE__ */ M(w, { data: f }),
281
- H && /* @__PURE__ */ N(a, {
293
+ z === "compare" && /* @__PURE__ */ j(C, { fieldId: s }),
294
+ z === "report" && /* @__PURE__ */ j(w, { data: f }),
295
+ V && /* @__PURE__ */ M(a, {
282
296
  open: !0,
283
- onClose: () => U(null),
284
- title: `Escalate ${H.label}`,
297
+ onClose: () => H(null),
298
+ title: `Escalate ${V.label}`,
285
299
  children: [
286
- /* @__PURE__ */ M("p", {
300
+ /* @__PURE__ */ j("p", {
287
301
  className: "text-sm text-text-secondary",
288
- children: H.reasonDetail ?? v(H.reason)
302
+ children: V.reasonDetail ?? y(V.reason)
289
303
  }),
290
- /* @__PURE__ */ N("p", {
304
+ /* @__PURE__ */ M("p", {
291
305
  className: "mt-1 text-xs text-text-secondary",
292
306
  children: [
293
307
  "NDVI ",
294
- h(H.zoneNdvi),
308
+ g(V.zoneNdvi),
295
309
  " (",
296
- H.deltaPct,
310
+ V.deltaPct,
297
311
  "% vs field average)."
298
312
  ]
299
313
  }),
300
- /* @__PURE__ */ N("div", {
314
+ /* @__PURE__ */ M("div", {
301
315
  className: "mt-4 flex flex-col gap-2 sm:flex-row",
302
- children: [/* @__PURE__ */ N(P, {
316
+ children: [/* @__PURE__ */ M(N, {
303
317
  className: "flex-1",
304
- onClick: () => void q("PEST"),
305
- disabled: W,
306
- children: [/* @__PURE__ */ M(O, { className: "me-1.5 h-4 w-4" }), " Create Pest Issue"]
307
- }), /* @__PURE__ */ N(P, {
318
+ onClick: () => void K("PEST"),
319
+ disabled: U,
320
+ children: [/* @__PURE__ */ j(k, { className: "me-1.5 h-4 w-4" }), " Create Pest Issue"]
321
+ }), /* @__PURE__ */ M(N, {
308
322
  variant: "outline",
309
323
  className: "flex-1",
310
- onClick: () => void q("TASK"),
311
- disabled: W,
312
- children: [/* @__PURE__ */ M(ae, { className: "me-1.5 h-4 w-4" }), " Create Task"]
324
+ onClick: () => void K("TASK"),
325
+ disabled: U,
326
+ children: [/* @__PURE__ */ j(ae, { className: "me-1.5 h-4 w-4" }), " Create Task"]
313
327
  })]
314
328
  })
315
329
  ]
316
330
  })
317
331
  ]
318
332
  });
319
- }, I = ({ band: e, ndvi: t }) => {
333
+ }, F = ({ band: e, ndvi: t }) => {
320
334
  let n = e === "STRESSED" ? "#d73027" : e === "BELOW_AVERAGE" ? "#fee08b" : e === "EXCELLENT" ? "#1a9850" : "#66bd63";
321
- return /* @__PURE__ */ M("div", {
335
+ return /* @__PURE__ */ j("div", {
322
336
  className: "h-14 w-full rounded-md ring-1 ring-border-subtle",
323
337
  style: {
324
338
  background: `linear-gradient(135deg, ${n}, ${n}cc)`,
@@ -326,17 +340,17 @@ var F = () => {
326
340
  },
327
341
  "aria-hidden": !0
328
342
  });
329
- }, L = ({ forecast: e }) => {
330
- let t = E(() => (e?.trajectory ?? []).map((e) => ({
343
+ }, I = ({ forecast: e }) => {
344
+ let t = D(() => (e?.trajectory ?? []).map((e) => ({
331
345
  label: e.label,
332
346
  simulated: e.simulated,
333
347
  band: [e.lower, e.upper]
334
348
  })), [e]);
335
- return e ? /* @__PURE__ */ N("div", { children: [
336
- /* @__PURE__ */ M(c, {
349
+ return e ? /* @__PURE__ */ M("div", { children: [
350
+ /* @__PURE__ */ j(c, {
337
351
  width: "100%",
338
352
  height: 130,
339
- children: /* @__PURE__ */ N(m, {
353
+ children: /* @__PURE__ */ M(m, {
340
354
  data: t,
341
355
  margin: {
342
356
  top: 5,
@@ -345,37 +359,37 @@ var F = () => {
345
359
  bottom: 0
346
360
  },
347
361
  children: [
348
- /* @__PURE__ */ M("defs", { children: /* @__PURE__ */ N("linearGradient", {
362
+ /* @__PURE__ */ j("defs", { children: /* @__PURE__ */ M("linearGradient", {
349
363
  id: "yieldBand",
350
364
  x1: "0",
351
365
  y1: "0",
352
366
  x2: "0",
353
367
  y2: "1",
354
- children: [/* @__PURE__ */ M("stop", {
368
+ children: [/* @__PURE__ */ j("stop", {
355
369
  offset: "5%",
356
370
  stopColor: "var(--color-success)",
357
371
  stopOpacity: .28
358
- }), /* @__PURE__ */ M("stop", {
372
+ }), /* @__PURE__ */ j("stop", {
359
373
  offset: "95%",
360
374
  stopColor: "var(--color-success)",
361
375
  stopOpacity: .04
362
376
  })]
363
377
  }) }),
364
- /* @__PURE__ */ M(l, {
378
+ /* @__PURE__ */ j(l, {
365
379
  strokeDasharray: "3 3",
366
380
  className: "stroke-border"
367
381
  }),
368
- /* @__PURE__ */ M(f, {
382
+ /* @__PURE__ */ j(f, {
369
383
  dataKey: "label",
370
384
  className: "text-[10px]",
371
385
  tick: { fill: "currentColor" }
372
386
  }),
373
- /* @__PURE__ */ M(p, {
387
+ /* @__PURE__ */ j(p, {
374
388
  className: "text-[10px]",
375
389
  tick: { fill: "currentColor" },
376
390
  width: 28
377
391
  }),
378
- /* @__PURE__ */ M(s, {
392
+ /* @__PURE__ */ j(s, {
379
393
  contentStyle: {
380
394
  backgroundColor: "var(--color-card)",
381
395
  border: "1px solid var(--color-border)",
@@ -383,13 +397,13 @@ var F = () => {
383
397
  },
384
398
  labelStyle: { color: "var(--color-foreground)" }
385
399
  }),
386
- /* @__PURE__ */ M(d, {
400
+ /* @__PURE__ */ j(d, {
387
401
  dataKey: "band",
388
402
  stroke: "none",
389
403
  fill: "url(#yieldBand)",
390
404
  isAnimationActive: !1
391
405
  }),
392
- /* @__PURE__ */ M(u, {
406
+ /* @__PURE__ */ j(u, {
393
407
  dataKey: "simulated",
394
408
  stroke: "var(--color-success)",
395
409
  strokeWidth: 2,
@@ -399,39 +413,39 @@ var F = () => {
399
413
  ]
400
414
  })
401
415
  }),
402
- /* @__PURE__ */ N("div", {
416
+ /* @__PURE__ */ M("div", {
403
417
  className: "mt-2 flex items-end justify-between",
404
- children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ N("div", {
418
+ children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("div", {
405
419
  className: "text-3xl font-bold tabular-nums text-text-primary",
406
420
  children: [
407
- g(e.estimatedTonnes),
421
+ _(e.estimatedTonnes),
408
422
  " ",
409
- /* @__PURE__ */ M("span", {
423
+ /* @__PURE__ */ j("span", {
410
424
  className: "text-base font-medium text-text-secondary",
411
425
  children: "t"
412
426
  })
413
427
  ]
414
- }), /* @__PURE__ */ N("div", {
428
+ }), /* @__PURE__ */ M("div", {
415
429
  className: "text-xs text-text-secondary",
416
430
  children: [
417
431
  "± ",
418
- g(e.confidenceBand),
432
+ _(e.confidenceBand),
419
433
  " t · ",
420
434
  e.confidenceLabel.toLowerCase(),
421
435
  " confidence"
422
436
  ]
423
- })] }), e.harvestWindowLabel && /* @__PURE__ */ N("div", {
437
+ })] }), e.harvestWindowLabel && /* @__PURE__ */ M("div", {
424
438
  className: "text-end",
425
- children: [/* @__PURE__ */ M("div", {
439
+ children: [/* @__PURE__ */ j("div", {
426
440
  className: "text-xs text-text-secondary",
427
441
  children: "Harvest window"
428
- }), /* @__PURE__ */ M("div", {
442
+ }), /* @__PURE__ */ j("div", {
429
443
  className: "text-sm font-medium text-text-primary",
430
444
  children: e.harvestWindowLabel
431
445
  })]
432
446
  })]
433
447
  }),
434
- /* @__PURE__ */ N("p", {
448
+ /* @__PURE__ */ M("p", {
435
449
  className: "mt-2 text-[11px] leading-snug text-text-secondary",
436
450
  children: [
437
451
  "Estimate only — not a guarantee. ",
@@ -442,6 +456,6 @@ var F = () => {
442
456
  ] }) : null;
443
457
  };
444
458
  //#endregion
445
- export { F as SatelliteFieldDetailPage };
459
+ export { P as SatelliteFieldDetailPage };
446
460
 
447
461
  //# sourceMappingURL=SatelliteFieldDetailPage.js.map