@burdenoff/microfe-healthybowl 2026.714.1 → 2026.714.3

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 (47) hide show
  1. package/dist/healthybowl/HealthyBowlRoutes.js +123 -107
  2. package/dist/healthybowl/HealthyBowlRoutes.js.map +1 -1
  3. package/dist/healthybowl/hooks/useOrderPayments.js +87 -0
  4. package/dist/healthybowl/hooks/useOrderPayments.js.map +1 -0
  5. package/dist/healthybowl/hooks/useSharedMarket.js +54 -0
  6. package/dist/healthybowl/hooks/useSharedMarket.js.map +1 -0
  7. package/dist/healthybowl/pages/marketplace/MarketplacePage.js +484 -432
  8. package/dist/healthybowl/pages/marketplace/MarketplacePage.js.map +1 -1
  9. package/dist/healthybowl/pages/marketplace/OrdersPage.js +400 -267
  10. package/dist/healthybowl/pages/marketplace/OrdersPage.js.map +1 -1
  11. package/dist/healthybowl/pages/marketplace/SharedMarketView.js +247 -0
  12. package/dist/healthybowl/pages/marketplace/SharedMarketView.js.map +1 -0
  13. package/dist/healthybowl/pages/satellite/CropHealthAlertsPage.js +188 -0
  14. package/dist/healthybowl/pages/satellite/CropHealthAlertsPage.js.map +1 -0
  15. package/dist/healthybowl/pages/satellite/NdviComparePanel.js +196 -0
  16. package/dist/healthybowl/pages/satellite/NdviComparePanel.js.map +1 -0
  17. package/dist/healthybowl/pages/satellite/NdviGridThumbnail.js +44 -0
  18. package/dist/healthybowl/pages/satellite/NdviGridThumbnail.js.map +1 -0
  19. package/dist/healthybowl/pages/satellite/NdviHeatmapMap.js +144 -0
  20. package/dist/healthybowl/pages/satellite/NdviHeatmapMap.js.map +1 -0
  21. package/dist/healthybowl/pages/satellite/SatelliteCropHealthPage.js +278 -0
  22. package/dist/healthybowl/pages/satellite/SatelliteCropHealthPage.js.map +1 -0
  23. package/dist/healthybowl/pages/satellite/SatelliteFieldDetailPage.js +447 -0
  24. package/dist/healthybowl/pages/satellite/SatelliteFieldDetailPage.js.map +1 -0
  25. package/dist/healthybowl/pages/satellite/SatelliteSettingsPage.js +252 -0
  26. package/dist/healthybowl/pages/satellite/SatelliteSettingsPage.js.map +1 -0
  27. package/dist/healthybowl/pages/satellite/YieldReportPanel.js +236 -0
  28. package/dist/healthybowl/pages/satellite/YieldReportPanel.js.map +1 -0
  29. package/dist/healthybowl/pages/satellite/YieldSimulationPanel.js +363 -0
  30. package/dist/healthybowl/pages/satellite/YieldSimulationPanel.js.map +1 -0
  31. package/dist/healthybowl/pages/satellite/ndviColors.js +116 -0
  32. package/dist/healthybowl/pages/satellite/ndviColors.js.map +1 -0
  33. package/dist/healthybowl/pages/satellite/satelliteApi.js +191 -0
  34. package/dist/healthybowl/pages/satellite/satelliteApi.js.map +1 -0
  35. package/dist/healthybowl/pages/satellite/useSatelliteApi.js +15 -0
  36. package/dist/healthybowl/pages/satellite/useSatelliteApi.js.map +1 -0
  37. package/dist/node_modules/recharts/es6/cartesian/Scatter.js +368 -0
  38. package/dist/node_modules/recharts/es6/cartesian/Scatter.js.map +1 -0
  39. package/dist/node_modules/recharts/es6/cartesian/ZAxis.js +103 -0
  40. package/dist/node_modules/recharts/es6/cartesian/ZAxis.js.map +1 -0
  41. package/dist/node_modules/recharts/es6/chart/ComposedChart.js +38 -0
  42. package/dist/node_modules/recharts/es6/chart/ComposedChart.js.map +1 -0
  43. package/dist/node_modules/recharts/es6/util/DataUtils.js +12 -2
  44. package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -1
  45. package/dist/node_modules/recharts/es6/util/ScatterUtils.js +48 -0
  46. package/dist/node_modules/recharts/es6/util/ScatterUtils.js.map +1 -0
  47. package/package.json +1 -1
@@ -5,25 +5,27 @@ import { StatCard as a } from "../../components/StatCard.js";
5
5
  import { StatusBadge as o } from "../../components/StatusBadge.js";
6
6
  import { EmptyState as ee } from "../../components/EmptyState.js";
7
7
  import { ErrorState as s } from "../../components/ErrorState.js";
8
- import { ToastContainer as te } from "../../components/Toast.js";
9
- import { useConfirm as ne } from "../../components/ConfirmDialog.js";
10
- import { Breadcrumbs as re } from "../../components/Breadcrumbs.js";
11
- import { Modal as c } from "../../components/Modal.js";
12
- import { HBEntityTags as l } from "../../components/HBEntityTags.js";
13
- import { useToast as ie } from "../../hooks/useToast.js";
8
+ import { ToastContainer as c } from "../../components/Toast.js";
9
+ import { useConfirm as te } from "../../components/ConfirmDialog.js";
10
+ import { Breadcrumbs as ne } from "../../components/Breadcrumbs.js";
11
+ import { Modal as re } from "../../components/Modal.js";
12
+ import { HBEntityTags as ie } from "../../components/HBEntityTags.js";
13
+ import { useToast as ae } from "../../hooks/useToast.js";
14
14
  import "../../components/index.js";
15
- import { useHealthyBowlData as ae } from "../../hooks/useHealthyBowlData.js";
16
- import { useHealthyBowlStore as oe } from "../../store/healthybowlStore.js";
17
- import { isNative as u, nativeNotify as d, nativeToast as se } from "../../../utils/nativeBridge.js";
15
+ import { useHealthyBowlData as oe } from "../../hooks/useHealthyBowlData.js";
16
+ import { useHealthyBowlStore as se } from "../../store/healthybowlStore.js";
17
+ import { isNative as l, nativeNotify as u, nativeToast as d } from "../../../utils/nativeBridge.js";
18
18
  import { AuctionsView as ce } from "./AuctionsView.js";
19
- import { useCallback as le, useEffect as ue, useMemo as de, useRef as fe, useState as f } from "react";
20
- import { useI18n as pe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
- import { ArrowUpDown as me, Award as he, Check as ge, ChevronDown as _e, Eye as ve, Gavel as ye, Heart as be, Info as xe, Leaf as Se, Minus as Ce, Package as we, Pencil as Te, Plus as Ee, Search as De, ShoppingCart as p, Star as m, Store as h, Tags as Oe, Trash2 as ke, X as Ae } from "lucide-react";
22
- import { useNavigate as je } from "react-router-dom";
23
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
24
- import { Button as y, Select as Me, SelectContent as Ne, SelectItem as Pe, SelectTrigger as Fe, SelectValue as Ie } from "@burdenoff/fe-libs/ui";
19
+ import { useSetListingShared as le, useSharedMarketListings as ue } from "../../hooks/useSharedMarket.js";
20
+ import { SharedMarketView as de } from "./SharedMarketView.js";
21
+ import { useCallback as f, useEffect as fe, useMemo as pe, useRef as me, useState as p } from "react";
22
+ import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { ArrowUpDown as ge, Award as _e, Check as ve, ChevronDown as ye, Eye as be, Gavel as xe, Globe as m, Heart as Se, Info as Ce, Leaf as we, Minus as Te, Package as Ee, Pencil as De, Plus as Oe, Search as ke, ShoppingCart as h, Star as g, Store as _, Tags as Ae, Trash2 as je, X as Me } from "lucide-react";
24
+ import { useNavigate as Ne } from "react-router-dom";
25
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
26
+ import { Button as x, Select as Pe, SelectContent as Fe, SelectItem as Ie, SelectTrigger as Le, SelectValue as Re } from "@burdenoff/fe-libs/ui";
25
27
  //#region src/healthybowl/pages/marketplace/MarketplacePage.tsx
26
- var Le = [
28
+ var ze = [
27
29
  "Vegetables",
28
30
  "Fruits",
29
31
  "Herbs",
@@ -31,7 +33,7 @@ var Le = [
31
33
  "Seeds",
32
34
  "Supplies",
33
35
  "Pest Control"
34
- ], b = {
36
+ ], S = {
35
37
  name: "",
36
38
  category: "Vegetables",
37
39
  price: "",
@@ -41,7 +43,7 @@ var Le = [
41
43
  location: "",
42
44
  description: "",
43
45
  organicCertified: !1
44
- }, Re = [
46
+ }, Be = [
45
47
  "All",
46
48
  "Vegetables",
47
49
  "Fruits",
@@ -51,36 +53,36 @@ var Le = [
51
53
  "Supplies",
52
54
  "Pest Control"
53
55
  ];
54
- function x(t) {
55
- return Array.from({ length: 5 }, (n, r) => /* @__PURE__ */ _(m, { className: e("h-3 w-3", r < Math.round(t) ? "fill-warning text-warning" : "text-text-secondary") }, r));
56
+ function Ve(t) {
57
+ return Array.from({ length: 5 }, (n, r) => /* @__PURE__ */ y(g, { className: e("h-3 w-3", r < Math.round(t) ? "fill-warning text-warning" : "text-text-secondary") }, r));
56
58
  }
57
- var S = () => {
58
- let { marketplaceProducts: S, loading: C, errors: ze, createMarketplaceProduct: Be, updateMarketplaceProduct: Ve, deleteMarketplaceProduct: He } = ae(), { t: w } = pe(), Ue = ne(), T = le((e, t, n) => {
59
- let r = w(e, t, n);
59
+ var C = () => {
60
+ let { marketplaceProducts: C, loading: He, errors: Ue, createMarketplaceProduct: We, updateMarketplaceProduct: Ge, deleteMarketplaceProduct: Ke } = oe(), { t: qe } = he(), Je = te(), w = f((e, t, n) => {
61
+ let r = qe(e, t, n);
60
62
  return r === e ? t : r;
61
- }, [w]), We = de(() => ({
62
- "price-asc": T("healthybowl.marketplace.overview.sort.priceAsc", "Price: Low → High"),
63
- "price-desc": T("healthybowl.marketplace.overview.sort.priceDesc", "Price: High → Low"),
64
- rating: T("healthybowl.marketplace.overview.sort.rating", "Highest Rated"),
65
- reviews: T("healthybowl.marketplace.overview.sort.reviews", "Most Reviewed")
66
- }), [T]), Ge = de(() => ({
67
- All: T("healthybowl.common.all", "All"),
68
- Vegetables: T("healthybowl.marketplace.overview.categories.vegetables", "Vegetables"),
69
- Fruits: T("healthybowl.marketplace.overview.categories.fruits", "Fruits"),
70
- Herbs: T("healthybowl.marketplace.overview.categories.herbs", "Herbs"),
71
- "Dairy & Eggs": T("healthybowl.marketplace.overview.categories.dairyEggs", "Dairy & Eggs"),
72
- Seeds: T("healthybowl.marketplace.overview.categories.seeds", "Seeds"),
73
- Supplies: T("healthybowl.marketplace.overview.categories.supplies", "Supplies"),
74
- "Pest Control": T("healthybowl.marketplace.overview.categories.pestControl", "Pest Control")
75
- }), [T]), E = le((e) => Ge[e] ?? e, [Ge]), [D, Ke] = f("fixed"), [O, k] = f(""), [A, qe] = f("All"), [j, Je] = f(null), [M, Ye] = f("rating"), [Xe, N] = f(!1), [Ze, Qe] = f(/* @__PURE__ */ new Set()), [$e, et] = f({}), [P, F] = f(null), [tt, I] = f(!1), [L, R] = f(null), [z, B] = f(b), [V, H] = f(!1), U = (e, t) => {
76
- B((n) => ({
63
+ }, [qe]), Ye = pe(() => ({
64
+ "price-asc": w("healthybowl.marketplace.overview.sort.priceAsc", "Price: Low → High"),
65
+ "price-desc": w("healthybowl.marketplace.overview.sort.priceDesc", "Price: High → Low"),
66
+ rating: w("healthybowl.marketplace.overview.sort.rating", "Highest Rated"),
67
+ reviews: w("healthybowl.marketplace.overview.sort.reviews", "Most Reviewed")
68
+ }), [w]), Xe = pe(() => ({
69
+ All: w("healthybowl.common.all", "All"),
70
+ Vegetables: w("healthybowl.marketplace.overview.categories.vegetables", "Vegetables"),
71
+ Fruits: w("healthybowl.marketplace.overview.categories.fruits", "Fruits"),
72
+ Herbs: w("healthybowl.marketplace.overview.categories.herbs", "Herbs"),
73
+ "Dairy & Eggs": w("healthybowl.marketplace.overview.categories.dairyEggs", "Dairy & Eggs"),
74
+ Seeds: w("healthybowl.marketplace.overview.categories.seeds", "Seeds"),
75
+ Supplies: w("healthybowl.marketplace.overview.categories.supplies", "Supplies"),
76
+ "Pest Control": w("healthybowl.marketplace.overview.categories.pestControl", "Pest Control")
77
+ }), [w]), T = f((e) => Xe[e] ?? e, [Xe]), [E, D] = p("fixed"), [O, k] = p(""), [A, j] = p("All"), [M, Ze] = p(null), [N, Qe] = p("rating"), [$e, P] = p(!1), [et, tt] = p(/* @__PURE__ */ new Set()), [nt, rt] = p({}), [F, I] = p(null), [it, L] = p(!1), [R, z] = p(null), [B, V] = p(S), [H, U] = p(!1), W = (e, t) => {
78
+ V((n) => ({
77
79
  ...n,
78
80
  [e]: t
79
81
  }));
80
- }, nt = () => {
81
- R(null), B(b), I(!0);
82
- }, rt = (e) => {
83
- R(e), B({
82
+ }, at = () => {
83
+ z(null), V(S), L(!0);
84
+ }, ot = (e) => {
85
+ z(e), V({
84
86
  name: e.name ?? "",
85
87
  category: e.category ?? "Vegetables",
86
88
  price: String(e.price ?? ""),
@@ -90,666 +92,716 @@ var S = () => {
90
92
  location: e.location ?? "",
91
93
  description: e.description ?? "",
92
94
  organicCertified: !!e.organicCertified
93
- }), I(!0);
94
- }, W = () => {
95
- I(!1), R(null), B(b);
96
- }, it = async () => {
97
- let e = Number(z.price), t = Number(z.stock);
98
- if (!z.name.trim() || !z.seller.trim() || !z.price || !z.stock) {
95
+ }), L(!0);
96
+ }, G = () => {
97
+ L(!1), z(null), V(S);
98
+ }, st = async () => {
99
+ let e = Number(B.price), t = Number(B.stock);
100
+ if (!B.name.trim() || !B.seller.trim() || !B.price || !B.stock) {
99
101
  X({
100
- title: T("healthybowl.marketplace.overview.toast.missingFields.title", "Missing required fields"),
101
- description: T("healthybowl.marketplace.overview.toast.missingFields.description", "Product name, seller, price, and quantity available are required."),
102
+ title: w("healthybowl.marketplace.overview.toast.missingFields.title", "Missing required fields"),
103
+ description: w("healthybowl.marketplace.overview.toast.missingFields.description", "Product name, seller, price, and quantity available are required."),
102
104
  variant: "warning"
103
105
  });
104
106
  return;
105
107
  }
106
108
  if (Number.isNaN(e) || e < 0 || Number.isNaN(t) || t < 0) {
107
109
  X({
108
- title: T("healthybowl.marketplace.overview.toast.invalidValues.title", "Invalid values"),
109
- description: T("healthybowl.marketplace.overview.toast.invalidValues.description", "Price and quantity must be positive numbers."),
110
+ title: w("healthybowl.marketplace.overview.toast.invalidValues.title", "Invalid values"),
111
+ description: w("healthybowl.marketplace.overview.toast.invalidValues.description", "Price and quantity must be positive numbers."),
110
112
  variant: "warning"
111
113
  });
112
114
  return;
113
115
  }
114
- H(!0);
116
+ U(!0);
115
117
  try {
116
- L ? (await Ve({
117
- id: L.id,
118
- name: z.name.trim(),
119
- category: z.category,
118
+ R ? (await Ge({
119
+ id: R.id,
120
+ name: B.name.trim(),
121
+ category: B.category,
120
122
  price: e,
121
- unit: z.unit.trim() || "unit",
123
+ unit: B.unit.trim() || "unit",
122
124
  stock: t,
123
- seller: z.seller.trim(),
124
- location: z.location.trim() || void 0,
125
- description: z.description.trim() || void 0,
126
- organicCertified: z.organicCertified
125
+ seller: B.seller.trim(),
126
+ location: B.location.trim() || void 0,
127
+ description: B.description.trim() || void 0,
128
+ organicCertified: B.organicCertified
127
129
  }), X({
128
- title: T("healthybowl.marketplace.overview.toast.listingUpdated.title", "Listing updated"),
129
- description: T("healthybowl.marketplace.overview.toast.listingUpdated.description", "{{name}} has been updated.", { name: z.name.trim() }),
130
+ title: w("healthybowl.marketplace.overview.toast.listingUpdated.title", "Listing updated"),
131
+ description: w("healthybowl.marketplace.overview.toast.listingUpdated.description", "{{name}} has been updated.", { name: B.name.trim() }),
130
132
  variant: "success"
131
- })) : (await Be({
132
- name: z.name.trim(),
133
- category: z.category,
133
+ })) : (await We({
134
+ name: B.name.trim(),
135
+ category: B.category,
134
136
  price: e,
135
- unit: z.unit.trim() || "unit",
137
+ unit: B.unit.trim() || "unit",
136
138
  stock: t,
137
- seller: z.seller.trim(),
138
- location: z.location.trim() || void 0,
139
- description: z.description.trim() || "",
140
- organicCertified: z.organicCertified,
139
+ seller: B.seller.trim(),
140
+ location: B.location.trim() || void 0,
141
+ description: B.description.trim() || "",
142
+ organicCertified: B.organicCertified,
141
143
  rating: 0,
142
144
  reviews: 0,
143
145
  sellerRating: 0
144
146
  }), X({
145
- title: T("healthybowl.marketplace.overview.toast.listingPublished.title", "Listing published"),
146
- description: T("healthybowl.marketplace.overview.toast.listingPublished.description", "{{name}} is now live in the marketplace.", { name: z.name.trim() }),
147
+ title: w("healthybowl.marketplace.overview.toast.listingPublished.title", "Listing published"),
148
+ description: w("healthybowl.marketplace.overview.toast.listingPublished.description", "{{name}} is now live in the marketplace.", { name: B.name.trim() }),
147
149
  variant: "success"
148
- })), W();
150
+ })), G();
149
151
  } catch (e) {
150
152
  X({
151
- title: L ? T("healthybowl.marketplace.overview.toast.updateFailed.title", "Update failed") : T("healthybowl.marketplace.overview.toast.publishFailed.title", "Publish failed"),
153
+ title: R ? w("healthybowl.marketplace.overview.toast.updateFailed.title", "Update failed") : w("healthybowl.marketplace.overview.toast.publishFailed.title", "Publish failed"),
152
154
  description: String(e),
153
155
  variant: "error"
154
156
  });
155
157
  } finally {
156
- H(!1);
158
+ U(!1);
157
159
  }
158
- }, at = async (e) => {
159
- if (await Ue({
160
- title: T("healthybowl.marketplace.overview.delete.confirm.title", "Delete listing?"),
161
- message: T("healthybowl.marketplace.overview.delete.confirm.message", "{{name}} will be permanently removed from the marketplace.", { name: e.name ?? T("healthybowl.marketplace.overview.delete.confirm.fallbackName", "This listing") }),
162
- okButtonTitle: T("healthybowl.common.delete", "Delete"),
163
- cancelButtonTitle: T("healthybowl.common.cancel", "Cancel")
160
+ }, ct = async (e) => {
161
+ if (await Je({
162
+ title: w("healthybowl.marketplace.overview.delete.confirm.title", "Delete listing?"),
163
+ message: w("healthybowl.marketplace.overview.delete.confirm.message", "{{name}} will be permanently removed from the marketplace.", { name: e.name ?? w("healthybowl.marketplace.overview.delete.confirm.fallbackName", "This listing") }),
164
+ okButtonTitle: w("healthybowl.common.delete", "Delete"),
165
+ cancelButtonTitle: w("healthybowl.common.cancel", "Cancel")
164
166
  }) !== !1) {
165
- H(!0);
167
+ U(!0);
166
168
  try {
167
- await He(e.id), X({
168
- title: T("healthybowl.marketplace.overview.toast.listingDeleted.title", "Listing deleted"),
169
- description: T("healthybowl.marketplace.overview.toast.listingDeleted.description", "{{name}} has been removed.", { name: e.name ?? T("healthybowl.marketplace.overview.toast.listingDeleted.fallbackName", "Listing") }),
169
+ await Ke(e.id), X({
170
+ title: w("healthybowl.marketplace.overview.toast.listingDeleted.title", "Listing deleted"),
171
+ description: w("healthybowl.marketplace.overview.toast.listingDeleted.description", "{{name}} has been removed.", { name: e.name ?? w("healthybowl.marketplace.overview.toast.listingDeleted.fallbackName", "Listing") }),
170
172
  variant: "success"
171
- }), u() && (se(T("healthybowl.marketplace.overview.toast.listingDeleted.title", "Listing deleted")), d("success"));
173
+ }), l() && (d(w("healthybowl.marketplace.overview.toast.listingDeleted.title", "Listing deleted")), u("success"));
172
174
  } catch (e) {
173
175
  X({
174
- title: T("healthybowl.marketplace.overview.toast.deleteFailed.title", "Delete failed"),
176
+ title: w("healthybowl.marketplace.overview.toast.deleteFailed.title", "Delete failed"),
175
177
  description: String(e),
176
178
  variant: "error"
177
- }), u() && (se(T("healthybowl.marketplace.overview.toast.deleteFailed.title", "Delete failed")), d("error"));
179
+ }), l() && (d(w("healthybowl.marketplace.overview.toast.deleteFailed.title", "Delete failed")), u("error"));
178
180
  } finally {
179
- H(!1);
181
+ U(!1);
180
182
  }
181
183
  }
182
- }, G = fe(null), K = je(), { buildPath: q } = r(), { addToCart: ot, cart: J, wishlist: Y, toggleWishlist: st } = oe(), { toasts: ct, toast: X, dismiss: lt } = ie(), ut = J.reduce((e, t) => e + t.quantity, 0);
183
- ue(() => {
184
+ }, { sharedListingIds: lt, refetch: ut } = ue(), { setListingShared: dt } = le(), [ft, pt] = p({}), [mt, ht] = p(null), gt = f((e) => ft[e.id] ?? lt.has(e.id), [ft, lt]), _t = async (e) => {
185
+ let t = !gt(e);
186
+ ht(e.id);
187
+ try {
188
+ await dt(e.id, t), pt((n) => ({
189
+ ...n,
190
+ [e.id]: t
191
+ })), await ut(), X({
192
+ title: t ? w("healthybowl.marketplace.shared.toast.published.title", "Published to the shared market") : w("healthybowl.marketplace.shared.toast.unpublished.title", "Removed from the shared market"),
193
+ description: t ? w("healthybowl.marketplace.shared.toast.published.description", "{{name}} is now visible to buyers on every farm.", { name: e.name }) : w("healthybowl.marketplace.shared.toast.unpublished.description", "{{name}} is back to being visible only on your farm.", { name: e.name }),
194
+ variant: "success"
195
+ });
196
+ } catch (e) {
197
+ X({
198
+ title: w("healthybowl.marketplace.shared.toast.failed.title", "Could not update sharing"),
199
+ description: e instanceof Error ? e.message : String(e),
200
+ variant: "error"
201
+ });
202
+ } finally {
203
+ ht(null);
204
+ }
205
+ }, K = me(null), q = Ne(), { buildPath: J } = r(), { addToCart: vt, cart: yt, wishlist: Y, toggleWishlist: bt } = se(), { toasts: xt, toast: X, dismiss: St } = ae(), Ct = yt.reduce((e, t) => e + t.quantity, 0);
206
+ fe(() => {
184
207
  let e = (e) => {
185
- G.current && !G.current.contains(e.target) && N(!1);
208
+ K.current && !K.current.contains(e.target) && P(!1);
186
209
  };
187
210
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
188
211
  }, []);
189
- let dt = Array.from(S.flatMap((e) => e.entityTags ?? []).reduce((e, t) => e.has(t.key) ? e : e.set(t.key, t.label), /* @__PURE__ */ new Map()).entries()).map(([e, t]) => ({
212
+ let wt = Array.from(C.flatMap((e) => e.entityTags ?? []).reduce((e, t) => e.has(t.key) ? e : e.set(t.key, t.label), /* @__PURE__ */ new Map()).entries()).map(([e, t]) => ({
190
213
  key: e,
191
214
  label: t
192
- })), Z = S.filter((e) => {
193
- let t = (e.name ?? "").toLowerCase().includes(O.toLowerCase()) || (e.seller ?? "").toLowerCase().includes(O.toLowerCase()) || (e.description ?? "").toLowerCase().includes(O.toLowerCase()), n = A === "All" || e.category === A, r = !j || (e.entityTags ?? []).some((e) => e.key === j);
215
+ })), Z = C.filter((e) => {
216
+ let t = (e.name ?? "").toLowerCase().includes(O.toLowerCase()) || (e.seller ?? "").toLowerCase().includes(O.toLowerCase()) || (e.description ?? "").toLowerCase().includes(O.toLowerCase()), n = A === "All" || e.category === A, r = !M || (e.entityTags ?? []).some((e) => e.key === M);
194
217
  return t && n && r;
195
218
  }).sort((e, t) => {
196
- switch (M) {
219
+ switch (N) {
197
220
  case "price-asc": return e.price - t.price;
198
221
  case "price-desc": return t.price - e.price;
199
222
  case "rating": return t.rating - e.rating;
200
223
  case "reviews": return t.reviews - e.reviews;
201
224
  default: return 0;
202
225
  }
203
- }), Q = S.length, ft = new Set(S.map((e) => e.category)).size, pt = Q > 0 ? S.reduce((e, t) => e + t.rating, 0) / Q : 0, mt = S.filter((e) => e.organicCertified).length, ht = (e) => $e[e] ?? 1, gt = (e, t) => {
204
- et((n) => ({
226
+ }), Q = C.length, Tt = new Set(C.map((e) => e.category)).size, Et = Q > 0 ? C.reduce((e, t) => e + t.rating, 0) / Q : 0, Dt = C.filter((e) => e.organicCertified).length, Ot = (e) => nt[e] ?? 1, kt = (e, t) => {
227
+ rt((n) => ({
205
228
  ...n,
206
229
  [e]: Math.max(1, t)
207
230
  }));
208
231
  }, $ = (e) => {
209
- let t = ht(e.id);
210
- for (let n = 0; n < t; n++) ot({
232
+ let t = Ot(e.id);
233
+ for (let n = 0; n < t; n++) vt({
211
234
  productId: e.id,
212
235
  name: e.name,
213
236
  price: e.price,
214
237
  unit: e.unit,
215
238
  seller: e.seller
216
239
  });
217
- Qe((t) => new Set(t).add(e.id)), X({
218
- title: T("healthybowl.marketplace.overview.toast.addedToCart.title", "Added to cart (this session)"),
219
- description: T("healthybowl.marketplace.overview.toast.addedToCart.description", "{{qty}}× {{name}}. Cart isn't saved yet — it resets on refresh.", {
240
+ tt((t) => new Set(t).add(e.id)), X({
241
+ title: w("healthybowl.marketplace.overview.toast.addedToCart.title", "Added to cart (this session)"),
242
+ description: w("healthybowl.marketplace.overview.toast.addedToCart.description", "{{qty}}× {{name}}. Cart isn't saved yet — it resets on refresh.", {
220
243
  qty: t,
221
244
  name: e.name
222
245
  }),
223
246
  variant: "info"
224
247
  }), setTimeout(() => {
225
- Qe((t) => {
248
+ tt((t) => {
226
249
  let n = new Set(t);
227
250
  return n.delete(e.id), n;
228
251
  });
229
252
  }, 1500);
230
- }, _t = (e) => {
253
+ }, At = (e) => {
231
254
  let t = Y.has(e.id);
232
- st(e.id), X(t ? {
233
- title: T("healthybowl.marketplace.overview.toast.removedFromWishlist.title", "Removed from wishlist"),
255
+ bt(e.id), X(t ? {
256
+ title: w("healthybowl.marketplace.overview.toast.removedFromWishlist.title", "Removed from wishlist"),
234
257
  description: e.name,
235
258
  variant: "info"
236
259
  } : {
237
- title: T("healthybowl.marketplace.overview.toast.addedToWishlist.title", "Added to wishlist (this session)"),
238
- description: T("healthybowl.marketplace.overview.toast.addedToWishlist.description", "{{name}}. Wishlist isn't saved yet — it resets on refresh.", { name: e.name }),
260
+ title: w("healthybowl.marketplace.overview.toast.addedToWishlist.title", "Added to wishlist (this session)"),
261
+ description: w("healthybowl.marketplace.overview.toast.addedToWishlist.description", "{{name}}. Wishlist isn't saved yet — it resets on refresh.", { name: e.name }),
239
262
  variant: "info"
240
263
  });
241
264
  };
242
- return /* @__PURE__ */ v(i, {
243
- title: T("healthybowl.marketplace.title", "Marketplace"),
244
- description: T("healthybowl.marketplace.description", "Browse organic products from verified sellers"),
265
+ return /* @__PURE__ */ b(i, {
266
+ title: w("healthybowl.marketplace.title", "Marketplace"),
267
+ description: w("healthybowl.marketplace.description", "Browse organic products from verified sellers"),
245
268
  purpose: "Buy organic inputs and produce from verified sellers — seeds, supplies and goods from other farms. Browse, compare and order what your farm needs, with sellers vetted so you can buy with confidence.",
246
- actions: /* @__PURE__ */ v("div", {
269
+ actions: /* @__PURE__ */ b("div", {
247
270
  className: "flex items-center gap-2",
248
271
  children: [
249
- /* @__PURE__ */ v(y, {
272
+ /* @__PURE__ */ b(x, {
250
273
  variant: "outline",
251
- onClick: nt,
252
- children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), T("healthybowl.marketplace.actions.listProduct", "List a Product")]
274
+ onClick: at,
275
+ children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), w("healthybowl.marketplace.actions.listProduct", "List a Product")]
253
276
  }),
254
- /* @__PURE__ */ v(y, {
277
+ /* @__PURE__ */ b(x, {
255
278
  variant: "outline",
256
- onClick: () => K(q("marketplace/wishlist")),
279
+ onClick: () => q(J("marketplace/wishlist")),
257
280
  children: [
258
- /* @__PURE__ */ _(be, { className: "h-4 w-4" }),
259
- T("healthybowl.marketplace.actions.wishlist", "Wishlist"),
260
- Y.size > 0 && /* @__PURE__ */ _("span", {
281
+ /* @__PURE__ */ y(Se, { className: "h-4 w-4" }),
282
+ w("healthybowl.marketplace.actions.wishlist", "Wishlist"),
283
+ Y.size > 0 && /* @__PURE__ */ y("span", {
261
284
  className: "ml-0.5 rounded-full bg-bg-sunken px-1.5 text-xs font-bold text-text-primary",
262
285
  children: Y.size
263
286
  })
264
287
  ]
265
288
  }),
266
- /* @__PURE__ */ v(y, {
289
+ /* @__PURE__ */ b(x, {
267
290
  className: "relative",
268
- onClick: () => K(q("marketplace/cart")),
291
+ onClick: () => q(J("marketplace/cart")),
269
292
  children: [
270
- /* @__PURE__ */ _(p, { className: "h-4 w-4" }),
271
- T("healthybowl.marketplace.actions.cart", "Cart"),
272
- ut > 0 && /* @__PURE__ */ _("span", {
293
+ /* @__PURE__ */ y(h, { className: "h-4 w-4" }),
294
+ w("healthybowl.marketplace.actions.cart", "Cart"),
295
+ Ct > 0 && /* @__PURE__ */ y("span", {
273
296
  className: "absolute -right-1.5 -top-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-foreground text-[10px] font-bold text-background",
274
- children: ut
297
+ children: Ct
275
298
  })
276
299
  ]
277
300
  })
278
301
  ]
279
302
  }),
280
303
  children: [
281
- /* @__PURE__ */ _(re, { items: [{ label: T("healthybowl.marketplace.breadcrumb", "Marketplace") }] }),
282
- /* @__PURE__ */ v("div", {
304
+ /* @__PURE__ */ y(ne, { items: [{ label: w("healthybowl.marketplace.breadcrumb", "Marketplace") }] }),
305
+ /* @__PURE__ */ b("div", {
283
306
  className: "flex items-center gap-1 border-b border-border-subtle",
284
- children: [/* @__PURE__ */ v("button", {
285
- type: "button",
286
- onClick: () => Ke("fixed"),
287
- className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", D === "fixed" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
288
- children: [/* @__PURE__ */ _(h, { className: "h-4 w-4" }), T("healthybowl.marketplace.tabs.fixed", "Fixed-Price Listings")]
289
- }), /* @__PURE__ */ v("button", {
290
- type: "button",
291
- onClick: () => Ke("auctions"),
292
- className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", D === "auctions" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
293
- children: [/* @__PURE__ */ _(ye, { className: "h-4 w-4" }), T("healthybowl.marketplace.tabs.auctions", "Live Auctions")]
294
- })]
307
+ children: [
308
+ /* @__PURE__ */ b("button", {
309
+ type: "button",
310
+ onClick: () => D("fixed"),
311
+ className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", E === "fixed" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
312
+ children: [/* @__PURE__ */ y(_, { className: "h-4 w-4" }), w("healthybowl.marketplace.tabs.fixed", "Fixed-Price Listings")]
313
+ }),
314
+ /* @__PURE__ */ b("button", {
315
+ type: "button",
316
+ onClick: () => D("auctions"),
317
+ className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", E === "auctions" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
318
+ children: [/* @__PURE__ */ y(xe, { className: "h-4 w-4" }), w("healthybowl.marketplace.tabs.auctions", "Live Auctions")]
319
+ }),
320
+ /* @__PURE__ */ b("button", {
321
+ type: "button",
322
+ onClick: () => D("shared"),
323
+ className: e("flex items-center gap-1.5 border-b-2 px-4 py-2 text-sm font-medium transition-colors", E === "shared" ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"),
324
+ children: [/* @__PURE__ */ y(m, { className: "h-4 w-4" }), w("healthybowl.marketplace.tabs.shared", "Shared Market (All Farms)")]
325
+ })
326
+ ]
295
327
  }),
296
- D === "auctions" && /* @__PURE__ */ _(ce, { products: S }),
297
- D === "fixed" && /* @__PURE__ */ v(g, { children: [
298
- /* @__PURE__ */ v("div", {
328
+ E === "auctions" && /* @__PURE__ */ y(ce, { products: C }),
329
+ E === "shared" && /* @__PURE__ */ y(de, {}),
330
+ E === "fixed" && /* @__PURE__ */ b(v, { children: [
331
+ /* @__PURE__ */ b("div", {
299
332
  className: "flex items-start gap-2 rounded-lg border border-border-subtle bg-bg-sunken/40 p-3 text-xs text-text-secondary",
300
- children: [/* @__PURE__ */ _(xe, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ _("p", { children: T("healthybowl.marketplace.overview.scopeNotice", "Product listings are saved and shared across the marketplace, and checking out from the cart places a real order (payment is arranged separately). Cart and wishlist are kept only for this browser session (not saved yet) and reset on refresh.") })]
333
+ children: [/* @__PURE__ */ y(Ce, { className: "mt-0.5 h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ y("p", { children: w("healthybowl.marketplace.overview.scopeNotice", "Product listings are saved, and checking out from the cart places a real order you can pay for from the Orders page. Publish a listing to the Shared Market to make it visible to buyers on other farms. Cart and wishlist are kept only for this browser session (not saved yet) and reset on refresh.") })]
301
334
  }),
302
- /* @__PURE__ */ v("div", {
335
+ /* @__PURE__ */ b("div", {
303
336
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
304
337
  children: [
305
- /* @__PURE__ */ _(a, {
338
+ /* @__PURE__ */ y(a, {
306
339
  hero: !0,
307
- label: T("healthybowl.marketplace.stats.totalProducts", "Total Products"),
340
+ label: w("healthybowl.marketplace.stats.totalProducts", "Total Products"),
308
341
  value: Q,
309
- icon: /* @__PURE__ */ _(we, { className: "h-5 w-5" })
342
+ icon: /* @__PURE__ */ y(Ee, { className: "h-5 w-5" })
310
343
  }),
311
- /* @__PURE__ */ _(a, {
312
- label: T("healthybowl.marketplace.stats.categories", "Categories"),
313
- value: ft,
314
- icon: /* @__PURE__ */ _(Oe, { className: "h-5 w-5" })
344
+ /* @__PURE__ */ y(a, {
345
+ label: w("healthybowl.marketplace.stats.categories", "Categories"),
346
+ value: Tt,
347
+ icon: /* @__PURE__ */ y(Ae, { className: "h-5 w-5" })
315
348
  }),
316
- /* @__PURE__ */ _(a, {
317
- label: T("healthybowl.marketplace.stats.avgRating", "Avg Rating"),
318
- value: pt.toFixed(1),
319
- icon: /* @__PURE__ */ _(m, { className: "h-5 w-5" })
349
+ /* @__PURE__ */ y(a, {
350
+ label: w("healthybowl.marketplace.stats.avgRating", "Avg Rating"),
351
+ value: Et.toFixed(1),
352
+ icon: /* @__PURE__ */ y(g, { className: "h-5 w-5" })
320
353
  }),
321
- /* @__PURE__ */ _(a, {
322
- label: T("healthybowl.marketplace.stats.organicCertified", "Organic Certified"),
323
- value: mt,
324
- icon: /* @__PURE__ */ _(he, { className: "h-5 w-5" })
354
+ /* @__PURE__ */ y(a, {
355
+ label: w("healthybowl.marketplace.stats.organicCertified", "Organic Certified"),
356
+ value: Dt,
357
+ icon: /* @__PURE__ */ y(_e, { className: "h-5 w-5" })
325
358
  })
326
359
  ]
327
360
  }),
328
- /* @__PURE__ */ v("div", {
361
+ /* @__PURE__ */ b("div", {
329
362
  className: "flex flex-col gap-4 rounded-lg border border-border-subtle bg-bg-surface p-4 sm:flex-row sm:items-center sm:justify-between",
330
- children: [/* @__PURE__ */ v("div", {
363
+ children: [/* @__PURE__ */ b("div", {
331
364
  className: "flex flex-1 flex-wrap items-center gap-3",
332
- children: [/* @__PURE__ */ v("div", {
365
+ children: [/* @__PURE__ */ b("div", {
333
366
  className: "relative",
334
367
  children: [
335
- /* @__PURE__ */ _(De, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }),
336
- /* @__PURE__ */ _("input", {
368
+ /* @__PURE__ */ y(ke, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }),
369
+ /* @__PURE__ */ y("input", {
337
370
  type: "text",
338
- placeholder: T("healthybowl.marketplace.search.placeholder", "Search products or sellers..."),
371
+ placeholder: w("healthybowl.marketplace.search.placeholder", "Search products or sellers..."),
339
372
  value: O,
340
373
  onChange: (e) => k(e.target.value),
341
374
  className: "w-64 rounded-md border border-border-subtle bg-bg-surface py-2 pl-10 pr-8 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
342
375
  }),
343
- O && /* @__PURE__ */ _(y, {
376
+ O && /* @__PURE__ */ y(x, {
344
377
  variant: "ghost",
345
378
  size: "icon-sm",
346
379
  onClick: () => k(""),
347
- "aria-label": T("healthybowl.marketplace.search.clearAria", "Clear search"),
380
+ "aria-label": w("healthybowl.marketplace.search.clearAria", "Clear search"),
348
381
  className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
349
- children: /* @__PURE__ */ _(Ae, { className: "h-3.5 w-3.5" })
382
+ children: /* @__PURE__ */ y(Me, { className: "h-3.5 w-3.5" })
350
383
  })
351
384
  ]
352
- }), /* @__PURE__ */ v("div", {
385
+ }), /* @__PURE__ */ b("div", {
353
386
  className: "relative",
354
- ref: G,
355
- children: [/* @__PURE__ */ v(y, {
387
+ ref: K,
388
+ children: [/* @__PURE__ */ b(x, {
356
389
  variant: "outline",
357
- onClick: () => N(!Xe),
390
+ onClick: () => P(!$e),
358
391
  children: [
359
- /* @__PURE__ */ _(me, { className: "h-3.5 w-3.5 text-text-secondary" }),
360
- We[M],
361
- /* @__PURE__ */ _(_e, { className: "h-3.5 w-3.5 text-text-secondary" })
392
+ /* @__PURE__ */ y(ge, { className: "h-3.5 w-3.5 text-text-secondary" }),
393
+ Ye[N],
394
+ /* @__PURE__ */ y(ye, { className: "h-3.5 w-3.5 text-text-secondary" })
362
395
  ]
363
- }), Xe && /* @__PURE__ */ _("div", {
396
+ }), $e && /* @__PURE__ */ y("div", {
364
397
  className: "absolute left-0 z-20 mt-1 w-48 rounded-md border border-border-subtle bg-bg-surface shadow-lg",
365
- children: Object.entries(We).map(([t, n]) => /* @__PURE__ */ _("button", {
398
+ children: Object.entries(Ye).map(([t, n]) => /* @__PURE__ */ y("button", {
366
399
  type: "button",
367
400
  onClick: () => {
368
- Ye(t), N(!1);
401
+ Qe(t), P(!1);
369
402
  },
370
- className: e("flex w-full items-center px-3 py-2 text-sm hover:bg-bg-sunken/50", M === t ? "font-medium text-primary" : "text-text-primary"),
403
+ className: e("flex w-full items-center px-3 py-2 text-sm hover:bg-bg-sunken/50", N === t ? "font-medium text-primary" : "text-text-primary"),
371
404
  children: n
372
405
  }, t))
373
406
  })]
374
407
  })]
375
- }), /* @__PURE__ */ _("span", {
408
+ }), /* @__PURE__ */ y("span", {
376
409
  className: "text-xs text-text-secondary",
377
- children: T("healthybowl.marketplace.overview.resultCount", "Showing {{shown}} of {{total}} products", {
410
+ children: w("healthybowl.marketplace.overview.resultCount", "Showing {{shown}} of {{total}} products", {
378
411
  shown: Z.length,
379
412
  total: Q
380
413
  })
381
414
  })]
382
415
  }),
383
- /* @__PURE__ */ _("div", {
416
+ /* @__PURE__ */ y("div", {
384
417
  className: "flex flex-wrap gap-1.5",
385
- children: Re.map((t) => /* @__PURE__ */ _("button", {
418
+ children: Be.map((t) => /* @__PURE__ */ y("button", {
386
419
  type: "button",
387
- onClick: () => qe(t),
420
+ onClick: () => j(t),
388
421
  className: e("rounded-full px-3 py-1 text-xs font-medium transition-colors", A === t ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-secondary hover:text-text-primary hover:bg-bg-sunken/50"),
389
- children: E(t)
422
+ children: T(t)
390
423
  }, t))
391
424
  }),
392
- dt.length > 0 && /* @__PURE__ */ v("div", {
425
+ wt.length > 0 && /* @__PURE__ */ b("div", {
393
426
  className: "flex flex-wrap items-center gap-1.5",
394
427
  children: [
395
- /* @__PURE__ */ v("span", {
428
+ /* @__PURE__ */ b("span", {
396
429
  className: "flex items-center gap-1 text-xs font-medium text-text-secondary",
397
430
  children: [
398
- /* @__PURE__ */ _(Oe, { className: "h-3.5 w-3.5" }),
431
+ /* @__PURE__ */ y(Ae, { className: "h-3.5 w-3.5" }),
399
432
  " ",
400
- T("healthybowl.marketplace.overview.tagFilter.label", "Tags:")
433
+ w("healthybowl.marketplace.overview.tagFilter.label", "Tags:")
401
434
  ]
402
435
  }),
403
- dt.map((t) => /* @__PURE__ */ _("button", {
436
+ wt.map((t) => /* @__PURE__ */ y("button", {
404
437
  type: "button",
405
- onClick: () => Je((e) => e === t.key ? null : t.key),
406
- className: e("rounded-full px-3 py-1 text-xs font-medium transition-colors", j === t.key ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-secondary hover:text-text-primary hover:bg-bg-sunken/50"),
438
+ onClick: () => Ze((e) => e === t.key ? null : t.key),
439
+ className: e("rounded-full px-3 py-1 text-xs font-medium transition-colors", M === t.key ? "bg-action-primary-bg text-action-primary-text" : "border border-border-subtle text-text-secondary hover:text-text-primary hover:bg-bg-sunken/50"),
407
440
  children: t.label
408
441
  }, t.key)),
409
- j && /* @__PURE__ */ v(y, {
442
+ M && /* @__PURE__ */ b(x, {
410
443
  variant: "ghost",
411
444
  size: "sm",
412
- onClick: () => Je(null),
445
+ onClick: () => Ze(null),
413
446
  className: "gap-0.5 text-text-secondary hover:text-text-primary",
414
447
  children: [
415
- /* @__PURE__ */ _(Ae, { className: "h-3 w-3" }),
448
+ /* @__PURE__ */ y(Me, { className: "h-3 w-3" }),
416
449
  " ",
417
- T("healthybowl.marketplace.overview.tagFilter.clear", "Clear")
450
+ w("healthybowl.marketplace.overview.tagFilter.clear", "Clear")
418
451
  ]
419
452
  })
420
453
  ]
421
454
  }),
422
- Z.length > 0 ? /* @__PURE__ */ _("div", {
455
+ Z.length > 0 ? /* @__PURE__ */ y("div", {
423
456
  className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
424
457
  children: Z.map((r) => {
425
- let i = Ze.has(r.id), a = J.some((e) => e.productId === r.id), ee = Y.has(r.id), s = ht(r.id);
426
- return /* @__PURE__ */ v("div", {
458
+ let i = et.has(r.id), a = yt.some((e) => e.productId === r.id), ee = Y.has(r.id), s = Ot(r.id), c = gt(r);
459
+ return /* @__PURE__ */ b("div", {
427
460
  className: "flex flex-col rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm transition-shadow hover:shadow-md",
428
461
  children: [
429
- /* @__PURE__ */ v("div", {
462
+ /* @__PURE__ */ b("div", {
430
463
  className: "flex items-start justify-between",
431
- children: [/* @__PURE__ */ _(y, {
464
+ children: [/* @__PURE__ */ y(x, {
432
465
  variant: "ghost",
433
466
  size: "sm",
434
- onClick: () => F(r),
467
+ onClick: () => I(r),
435
468
  className: "h-auto justify-start px-0 py-0 text-left text-sm font-semibold text-text-primary hover:bg-transparent hover:underline",
436
469
  children: r.name
437
- }), /* @__PURE__ */ v("div", {
470
+ }), /* @__PURE__ */ b("div", {
438
471
  className: "flex items-center gap-1.5",
439
- children: [r.organicCertified && /* @__PURE__ */ v("span", {
440
- className: "flex items-center gap-0.5 rounded-full bg-success-subtle px-1.5 py-0.5 text-[10px] font-medium text-success",
441
- children: [
442
- /* @__PURE__ */ _(Se, { className: "h-2.5 w-2.5" }),
443
- " ",
444
- T("healthybowl.marketplace.overview.badge.organic", "Organic")
445
- ]
446
- }), /* @__PURE__ */ _(y, {
447
- variant: "ghost",
448
- size: "icon-sm",
449
- onClick: () => _t(r),
450
- "aria-label": T("healthybowl.marketplace.overview.card.wishlistAria", "Toggle wishlist"),
451
- className: "text-text-secondary hover:text-text-primary",
452
- children: /* @__PURE__ */ _(be, { className: e("h-4 w-4 transition-colors", ee && "fill-destructive text-status-error-text") })
453
- })]
472
+ children: [
473
+ c && /* @__PURE__ */ b("span", {
474
+ className: "flex items-center gap-0.5 rounded-full bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium text-text-primary",
475
+ children: [
476
+ /* @__PURE__ */ y(m, { className: "h-2.5 w-2.5" }),
477
+ " ",
478
+ w("healthybowl.marketplace.shared.badge.shared", "Shared")
479
+ ]
480
+ }),
481
+ r.organicCertified && /* @__PURE__ */ b("span", {
482
+ className: "flex items-center gap-0.5 rounded-full bg-success-subtle px-1.5 py-0.5 text-[10px] font-medium text-success",
483
+ children: [
484
+ /* @__PURE__ */ y(we, { className: "h-2.5 w-2.5" }),
485
+ " ",
486
+ w("healthybowl.marketplace.overview.badge.organic", "Organic")
487
+ ]
488
+ }),
489
+ /* @__PURE__ */ y(x, {
490
+ variant: "ghost",
491
+ size: "icon-sm",
492
+ onClick: () => At(r),
493
+ "aria-label": w("healthybowl.marketplace.overview.card.wishlistAria", "Toggle wishlist"),
494
+ className: "text-text-secondary hover:text-text-primary",
495
+ children: /* @__PURE__ */ y(Se, { className: e("h-4 w-4 transition-colors", ee && "fill-destructive text-status-error-text") })
496
+ })
497
+ ]
454
498
  })]
455
499
  }),
456
- /* @__PURE__ */ _("div", {
500
+ /* @__PURE__ */ y("div", {
457
501
  className: "mt-1.5",
458
- children: /* @__PURE__ */ _(o, {
459
- label: E(r.category),
502
+ children: /* @__PURE__ */ y(o, {
503
+ label: T(r.category),
460
504
  variant: "muted"
461
505
  })
462
506
  }),
463
- /* @__PURE__ */ _(l, {
507
+ /* @__PURE__ */ y(ie, {
464
508
  readOnly: !0,
465
509
  entityType: "MARKETPLACE_PRODUCT",
466
510
  entityId: r.id,
467
511
  tags: r.entityTags ?? [],
468
512
  className: "mt-1.5"
469
513
  }),
470
- /* @__PURE__ */ v("div", {
514
+ /* @__PURE__ */ b("div", {
471
515
  className: "mt-2 flex items-center justify-between",
472
- children: [/* @__PURE__ */ _("p", {
516
+ children: [/* @__PURE__ */ y("p", {
473
517
  className: "text-xs text-text-secondary",
474
518
  children: r.seller
475
- }), /* @__PURE__ */ _("div", {
519
+ }), /* @__PURE__ */ y("div", {
476
520
  className: "flex items-center gap-0.5",
477
- children: x(r.sellerRating)
521
+ children: Ve(r.sellerRating)
478
522
  })]
479
523
  }),
480
- /* @__PURE__ */ v("p", {
524
+ /* @__PURE__ */ b("p", {
481
525
  className: "mt-2 text-lg font-bold text-text-primary",
482
- children: [t(r.price), /* @__PURE__ */ v("span", {
526
+ children: [t(r.price), /* @__PURE__ */ b("span", {
483
527
  className: "text-xs font-normal text-text-secondary",
484
528
  children: ["/", r.unit]
485
529
  })]
486
530
  }),
487
- /* @__PURE__ */ v("div", {
531
+ /* @__PURE__ */ b("div", {
488
532
  className: "mt-1.5 flex items-center gap-2",
489
- children: [/* @__PURE__ */ v("div", {
533
+ children: [/* @__PURE__ */ b("div", {
490
534
  className: "flex items-center gap-1",
491
- children: [/* @__PURE__ */ _(m, { className: "h-3 w-3 fill-warning text-warning" }), /* @__PURE__ */ _("span", {
535
+ children: [/* @__PURE__ */ y(g, { className: "h-3 w-3 fill-warning text-warning" }), /* @__PURE__ */ y("span", {
492
536
  className: "text-xs font-medium text-text-primary",
493
537
  children: r.rating
494
538
  })]
495
- }), /* @__PURE__ */ _("span", {
539
+ }), /* @__PURE__ */ y("span", {
496
540
  className: "text-xs text-text-secondary",
497
- children: T("healthybowl.marketplace.overview.reviewsCount", "({{count}} reviews)", { count: n(r.reviews) })
541
+ children: w("healthybowl.marketplace.overview.reviewsCount", "({{count}} reviews)", { count: n(r.reviews) })
498
542
  })]
499
543
  }),
500
- /* @__PURE__ */ _("div", {
544
+ /* @__PURE__ */ y("div", {
501
545
  className: "mt-2",
502
- children: /* @__PURE__ */ _(o, {
503
- label: r.stock === 0 ? T("healthybowl.marketplace.overview.stock.outOfStock", "Out of Stock") : r.stock < 50 ? T("healthybowl.marketplace.overview.stock.lowStock", "Low Stock ({{count}})", { count: r.stock }) : T("healthybowl.marketplace.overview.stock.inStock", "In Stock"),
546
+ children: /* @__PURE__ */ y(o, {
547
+ label: r.stock === 0 ? w("healthybowl.marketplace.overview.stock.outOfStock", "Out of Stock") : r.stock < 50 ? w("healthybowl.marketplace.overview.stock.lowStock", "Low Stock ({{count}})", { count: r.stock }) : w("healthybowl.marketplace.overview.stock.inStock", "In Stock"),
504
548
  variant: r.stock === 0 ? "error" : r.stock < 50 ? "warning" : "success",
505
549
  dot: !0
506
550
  })
507
551
  }),
508
- /* @__PURE__ */ v("div", {
552
+ /* @__PURE__ */ b("div", {
509
553
  className: "mt-3 flex items-center gap-2",
510
- children: [/* @__PURE__ */ _("span", {
554
+ children: [/* @__PURE__ */ y("span", {
511
555
  className: "text-xs text-text-secondary",
512
- children: T("healthybowl.marketplace.overview.card.qty", "Qty:")
513
- }), /* @__PURE__ */ v("div", {
556
+ children: w("healthybowl.marketplace.overview.card.qty", "Qty:")
557
+ }), /* @__PURE__ */ b("div", {
514
558
  className: "flex items-center rounded-md border border-border-subtle",
515
559
  children: [
516
- /* @__PURE__ */ _(y, {
560
+ /* @__PURE__ */ y(x, {
517
561
  variant: "ghost",
518
562
  size: "icon-sm",
519
- onClick: () => gt(r.id, s - 1),
563
+ onClick: () => kt(r.id, s - 1),
520
564
  disabled: s <= 1,
521
- "aria-label": T("healthybowl.marketplace.overview.card.decreaseQtyAria", "Decrease quantity"),
565
+ "aria-label": w("healthybowl.marketplace.overview.card.decreaseQtyAria", "Decrease quantity"),
522
566
  className: "rounded-l-md rounded-r-none text-text-secondary",
523
- children: /* @__PURE__ */ _(Ce, { className: "h-3 w-3" })
567
+ children: /* @__PURE__ */ y(Te, { className: "h-3 w-3" })
524
568
  }),
525
- /* @__PURE__ */ _("span", {
569
+ /* @__PURE__ */ y("span", {
526
570
  className: "min-w-[2rem] text-center text-xs font-medium text-text-primary",
527
571
  children: s
528
572
  }),
529
- /* @__PURE__ */ _(y, {
573
+ /* @__PURE__ */ y(x, {
530
574
  variant: "ghost",
531
575
  size: "icon-sm",
532
- onClick: () => gt(r.id, s + 1),
576
+ onClick: () => kt(r.id, s + 1),
533
577
  disabled: s >= r.stock,
534
- "aria-label": T("healthybowl.marketplace.overview.card.increaseQtyAria", "Increase quantity"),
578
+ "aria-label": w("healthybowl.marketplace.overview.card.increaseQtyAria", "Increase quantity"),
535
579
  className: "rounded-l-none rounded-r-md text-text-secondary",
536
- children: /* @__PURE__ */ _(Ee, { className: "h-3 w-3" })
580
+ children: /* @__PURE__ */ y(Oe, { className: "h-3 w-3" })
537
581
  })
538
582
  ]
539
583
  })]
540
584
  }),
541
- /* @__PURE__ */ v("div", {
585
+ /* @__PURE__ */ b("div", {
542
586
  className: "mt-3 flex items-center gap-2",
543
- children: [/* @__PURE__ */ _(y, {
587
+ children: [/* @__PURE__ */ y(x, {
544
588
  onClick: () => $(r),
545
589
  disabled: r.stock === 0,
546
590
  className: e("flex-1", i ? "bg-success text-white hover:bg-success" : a ? "border border-border-subtle bg-bg-sunken text-text-primary hover:bg-bg-sunken/80" : ""),
547
- children: i ? /* @__PURE__ */ v(g, { children: [
548
- /* @__PURE__ */ _(ge, { className: "h-3 w-3" }),
591
+ children: i ? /* @__PURE__ */ b(v, { children: [
592
+ /* @__PURE__ */ y(ve, { className: "h-3 w-3" }),
549
593
  " ",
550
- T("healthybowl.marketplace.overview.card.added", "Added")
551
- ] }) : a ? /* @__PURE__ */ v(g, { children: [
552
- /* @__PURE__ */ _(p, { className: "h-3 w-3" }),
594
+ w("healthybowl.marketplace.overview.card.added", "Added")
595
+ ] }) : a ? /* @__PURE__ */ b(v, { children: [
596
+ /* @__PURE__ */ y(h, { className: "h-3 w-3" }),
553
597
  " ",
554
- T("healthybowl.marketplace.overview.card.addMore", "Add More")
555
- ] }) : /* @__PURE__ */ v(g, { children: [
556
- /* @__PURE__ */ _(p, { className: "h-3 w-3" }),
598
+ w("healthybowl.marketplace.overview.card.addMore", "Add More")
599
+ ] }) : /* @__PURE__ */ b(v, { children: [
600
+ /* @__PURE__ */ y(h, { className: "h-3 w-3" }),
557
601
  " ",
558
- T("healthybowl.marketplace.overview.card.addToCart", "Add to Cart")
602
+ w("healthybowl.marketplace.overview.card.addToCart", "Add to Cart")
559
603
  ] })
560
- }), /* @__PURE__ */ _(y, {
604
+ }), /* @__PURE__ */ y(x, {
561
605
  variant: "outline",
562
606
  size: "icon-sm",
563
- onClick: () => F(r),
607
+ onClick: () => I(r),
564
608
  className: "text-text-secondary hover:text-text-primary",
565
- "aria-label": T("healthybowl.marketplace.overview.card.quickViewAria", "Quick view"),
566
- children: /* @__PURE__ */ _(ve, { className: "h-3.5 w-3.5" })
609
+ "aria-label": w("healthybowl.marketplace.overview.card.quickViewAria", "Quick view"),
610
+ children: /* @__PURE__ */ y(be, { className: "h-3.5 w-3.5" })
567
611
  })]
568
612
  }),
569
- /* @__PURE__ */ v("div", {
613
+ /* @__PURE__ */ b(x, {
614
+ variant: "outline",
615
+ size: "sm",
616
+ onClick: () => void _t(r),
617
+ disabled: mt === r.id,
618
+ className: e("mt-2 w-full", c && "border-success text-success hover:text-success"),
619
+ children: [/* @__PURE__ */ y(m, { className: "h-3 w-3" }), mt === r.id ? w("healthybowl.marketplace.shared.card.saving", "Saving...") : c ? w("healthybowl.marketplace.shared.card.unpublish", "Remove from Shared Market") : w("healthybowl.marketplace.shared.card.publish", "Publish to Shared Market")]
620
+ }),
621
+ /* @__PURE__ */ b("div", {
570
622
  className: "mt-2 flex items-center gap-2 border-t border-border-subtle pt-2",
571
- children: [/* @__PURE__ */ v(y, {
623
+ children: [/* @__PURE__ */ b(x, {
572
624
  variant: "outline",
573
625
  size: "sm",
574
- onClick: () => rt(r),
575
- disabled: V,
626
+ onClick: () => ot(r),
627
+ disabled: H,
576
628
  className: "flex-1 text-text-secondary hover:text-text-primary",
577
629
  children: [
578
- /* @__PURE__ */ _(Te, { className: "h-3 w-3" }),
630
+ /* @__PURE__ */ y(De, { className: "h-3 w-3" }),
579
631
  " ",
580
- T("healthybowl.marketplace.overview.card.editListing", "Edit Listing")
632
+ w("healthybowl.marketplace.overview.card.editListing", "Edit Listing")
581
633
  ]
582
- }), /* @__PURE__ */ _(y, {
634
+ }), /* @__PURE__ */ y(x, {
583
635
  variant: "ghost",
584
636
  size: "icon-sm",
585
- onClick: () => at(r),
586
- disabled: V,
637
+ onClick: () => ct(r),
638
+ disabled: H,
587
639
  className: "text-status-error-text hover:bg-status-error-bg/10 hover:text-status-error-text",
588
- "aria-label": T("healthybowl.marketplace.overview.card.deleteListingAria", "Delete listing"),
589
- children: /* @__PURE__ */ _(ke, { className: "h-3 w-3" })
640
+ "aria-label": w("healthybowl.marketplace.overview.card.deleteListingAria", "Delete listing"),
641
+ children: /* @__PURE__ */ y(je, { className: "h-3 w-3" })
590
642
  })]
591
643
  })
592
644
  ]
593
645
  }, r.id);
594
646
  })
595
- }) : ze.marketplace ? /* @__PURE__ */ _(s, {}) : /* @__PURE__ */ _(ee, {
647
+ }) : Ue.marketplace ? /* @__PURE__ */ y(s, {}) : /* @__PURE__ */ y(ee, {
596
648
  illustration: "empty-files",
597
- title: O || A !== "All" ? T("healthybowl.marketplace.overview.emptyState.noResults.title", "No products found") : T("healthybowl.marketplace.overview.emptyState.noListings.title", "No listings yet"),
598
- description: O || A !== "All" ? T("healthybowl.marketplace.overview.emptyState.noResults.description", "Try adjusting your search or category filters.") : C ? T("healthybowl.marketplace.overview.emptyState.loading", "Loading marketplace products...") : T("healthybowl.marketplace.overview.emptyState.noListings.description", "No products have been listed yet. Be the first to list your farm produce for buyers to discover."),
599
- action: O || A !== "All" ? /* @__PURE__ */ _(y, {
649
+ title: O || A !== "All" ? w("healthybowl.marketplace.overview.emptyState.noResults.title", "No products found") : w("healthybowl.marketplace.overview.emptyState.noListings.title", "No listings yet"),
650
+ description: O || A !== "All" ? w("healthybowl.marketplace.overview.emptyState.noResults.description", "Try adjusting your search or category filters.") : He ? w("healthybowl.marketplace.overview.emptyState.loading", "Loading marketplace products...") : w("healthybowl.marketplace.overview.emptyState.noListings.description", "No products have been listed yet. Be the first to list your farm produce for buyers to discover."),
651
+ action: O || A !== "All" ? /* @__PURE__ */ y(x, {
600
652
  onClick: () => {
601
- k(""), qe("All");
653
+ k(""), j("All");
602
654
  },
603
- children: T("healthybowl.marketplace.overview.emptyState.clearFilters", "Clear Filters")
604
- }) : C ? void 0 : /* @__PURE__ */ v(y, {
605
- onClick: nt,
655
+ children: w("healthybowl.marketplace.overview.emptyState.clearFilters", "Clear Filters")
656
+ }) : He ? void 0 : /* @__PURE__ */ b(x, {
657
+ onClick: at,
606
658
  children: [
607
- /* @__PURE__ */ _(h, { className: "h-4 w-4" }),
659
+ /* @__PURE__ */ y(_, { className: "h-4 w-4" }),
608
660
  " ",
609
- T("healthybowl.marketplace.overview.actions.listProduct", "List a Product")
661
+ w("healthybowl.marketplace.overview.actions.listProduct", "List a Product")
610
662
  ]
611
663
  })
612
664
  })
613
665
  ] }),
614
- /* @__PURE__ */ _(c, {
615
- open: !!P,
616
- onClose: () => F(null),
617
- title: P?.name ?? "",
618
- description: P ? E(P.category) : void 0,
666
+ /* @__PURE__ */ y(re, {
667
+ open: !!F,
668
+ onClose: () => I(null),
669
+ title: F?.name ?? "",
670
+ description: F ? T(F.category) : void 0,
619
671
  size: "lg",
620
- footer: P ? /* @__PURE__ */ v(g, { children: [
621
- /* @__PURE__ */ _(y, {
672
+ footer: F ? /* @__PURE__ */ b(v, { children: [
673
+ /* @__PURE__ */ y(x, {
622
674
  variant: "outline",
623
- onClick: () => F(null),
675
+ onClick: () => I(null),
624
676
  className: "text-text-secondary hover:text-text-primary",
625
- children: T("healthybowl.common.close", "Close")
677
+ children: w("healthybowl.common.close", "Close")
626
678
  }),
627
- /* @__PURE__ */ _(y, {
679
+ /* @__PURE__ */ y(x, {
628
680
  variant: "outline",
629
681
  onClick: () => {
630
- K(q(`marketplace/${P.id}`)), F(null);
682
+ q(J(`marketplace/${F.id}`)), I(null);
631
683
  },
632
- children: T("healthybowl.marketplace.overview.quickView.viewFullDetails", "View Full Details")
684
+ children: w("healthybowl.marketplace.overview.quickView.viewFullDetails", "View Full Details")
633
685
  }),
634
- /* @__PURE__ */ v(y, {
686
+ /* @__PURE__ */ b(x, {
635
687
  onClick: () => {
636
- $(P), F(null);
688
+ $(F), I(null);
637
689
  },
638
- disabled: P.stock === 0,
690
+ disabled: F.stock === 0,
639
691
  children: [
640
- /* @__PURE__ */ _(p, { className: "h-4 w-4" }),
692
+ /* @__PURE__ */ y(h, { className: "h-4 w-4" }),
641
693
  " ",
642
- T("healthybowl.marketplace.overview.card.addToCart", "Add to Cart")
694
+ w("healthybowl.marketplace.overview.card.addToCart", "Add to Cart")
643
695
  ]
644
696
  })
645
697
  ] }) : void 0,
646
- children: P && /* @__PURE__ */ v("div", {
698
+ children: F && /* @__PURE__ */ b("div", {
647
699
  className: "space-y-4",
648
700
  children: [
649
- /* @__PURE__ */ v("div", {
701
+ /* @__PURE__ */ b("div", {
650
702
  className: "flex flex-wrap items-center gap-2",
651
703
  children: [
652
- P.organicCertified && /* @__PURE__ */ v("span", {
704
+ F.organicCertified && /* @__PURE__ */ b("span", {
653
705
  className: "flex items-center gap-1 rounded-full bg-success-subtle px-2.5 py-0.5 text-xs font-medium text-success",
654
706
  children: [
655
- /* @__PURE__ */ _(Se, { className: "h-3 w-3" }),
707
+ /* @__PURE__ */ y(we, { className: "h-3 w-3" }),
656
708
  " ",
657
- T("healthybowl.marketplace.overview.badge.organicCertified", "Organic Certified")
709
+ w("healthybowl.marketplace.overview.badge.organicCertified", "Organic Certified")
658
710
  ]
659
711
  }),
660
- /* @__PURE__ */ _(o, {
661
- label: E(P.category),
712
+ /* @__PURE__ */ y(o, {
713
+ label: T(F.category),
662
714
  variant: "muted"
663
715
  }),
664
- /* @__PURE__ */ _(o, {
665
- label: P.stock > 0 ? T("healthybowl.marketplace.overview.quickView.inStockCount", "{{count}} in stock", { count: P.stock }) : T("healthybowl.marketplace.overview.stock.outOfStock", "Out of Stock"),
666
- variant: P.stock > 0 ? "success" : "error",
716
+ /* @__PURE__ */ y(o, {
717
+ label: F.stock > 0 ? w("healthybowl.marketplace.overview.quickView.inStockCount", "{{count}} in stock", { count: F.stock }) : w("healthybowl.marketplace.overview.stock.outOfStock", "Out of Stock"),
718
+ variant: F.stock > 0 ? "success" : "error",
667
719
  dot: !0
668
720
  })
669
721
  ]
670
722
  }),
671
- /* @__PURE__ */ v("div", {
723
+ /* @__PURE__ */ b("div", {
672
724
  className: "flex items-baseline gap-3",
673
- children: [/* @__PURE__ */ _("span", {
725
+ children: [/* @__PURE__ */ y("span", {
674
726
  className: "text-2xl font-bold text-text-primary",
675
- children: t(P.price)
676
- }), /* @__PURE__ */ v("span", {
727
+ children: t(F.price)
728
+ }), /* @__PURE__ */ b("span", {
677
729
  className: "text-sm text-text-secondary",
678
- children: ["/ ", P.unit]
730
+ children: ["/ ", F.unit]
679
731
  })]
680
732
  }),
681
- /* @__PURE__ */ v("div", {
733
+ /* @__PURE__ */ b("div", {
682
734
  className: "flex items-center gap-2",
683
735
  children: [
684
- /* @__PURE__ */ _("div", {
736
+ /* @__PURE__ */ y("div", {
685
737
  className: "flex",
686
- children: x(P.rating)
738
+ children: Ve(F.rating)
687
739
  }),
688
- /* @__PURE__ */ _("span", {
740
+ /* @__PURE__ */ y("span", {
689
741
  className: "text-sm font-medium text-text-primary",
690
- children: P.rating
742
+ children: F.rating
691
743
  }),
692
- /* @__PURE__ */ _("span", {
744
+ /* @__PURE__ */ y("span", {
693
745
  className: "text-sm text-text-secondary",
694
- children: T("healthybowl.marketplace.overview.reviewsCount", "({{count}} reviews)", { count: n(P.reviews) })
746
+ children: w("healthybowl.marketplace.overview.reviewsCount", "({{count}} reviews)", { count: n(F.reviews) })
695
747
  })
696
748
  ]
697
749
  }),
698
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h4", {
750
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
699
751
  className: "text-sm font-medium text-text-primary",
700
- children: T("healthybowl.marketplace.overview.quickView.description", "Description")
701
- }), /* @__PURE__ */ _("p", {
752
+ children: w("healthybowl.marketplace.overview.quickView.description", "Description")
753
+ }), /* @__PURE__ */ y("p", {
702
754
  className: "mt-1 text-sm text-text-secondary",
703
- children: P.description
755
+ children: F.description
704
756
  })] }),
705
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h4", {
757
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h4", {
706
758
  className: "text-sm font-medium text-text-primary",
707
- children: T("healthybowl.marketplace.overview.quickView.tags", "Tags")
708
- }), /* @__PURE__ */ _(l, {
759
+ children: w("healthybowl.marketplace.overview.quickView.tags", "Tags")
760
+ }), /* @__PURE__ */ y(ie, {
709
761
  entityType: "MARKETPLACE_PRODUCT",
710
- entityId: P.id,
711
- tags: P.entityTags ?? [],
762
+ entityId: F.id,
763
+ tags: F.entityTags ?? [],
712
764
  className: "mt-1.5"
713
765
  })] }),
714
- /* @__PURE__ */ v("div", {
766
+ /* @__PURE__ */ b("div", {
715
767
  className: "rounded-lg border border-border-subtle bg-bg-sunken/50 p-3",
716
- children: [/* @__PURE__ */ _("h4", {
768
+ children: [/* @__PURE__ */ y("h4", {
717
769
  className: "text-sm font-medium text-text-primary",
718
- children: T("healthybowl.marketplace.overview.quickView.sellerInfo", "Seller Information")
719
- }), /* @__PURE__ */ v("div", {
770
+ children: w("healthybowl.marketplace.overview.quickView.sellerInfo", "Seller Information")
771
+ }), /* @__PURE__ */ b("div", {
720
772
  className: "mt-2 space-y-1 text-sm",
721
773
  children: [
722
- /* @__PURE__ */ v("div", {
774
+ /* @__PURE__ */ b("div", {
723
775
  className: "flex items-center justify-between",
724
- children: [/* @__PURE__ */ _("span", {
776
+ children: [/* @__PURE__ */ y("span", {
725
777
  className: "text-text-secondary",
726
- children: T("healthybowl.marketplace.overview.quickView.seller", "Seller")
727
- }), /* @__PURE__ */ _("span", {
778
+ children: w("healthybowl.marketplace.overview.quickView.seller", "Seller")
779
+ }), /* @__PURE__ */ y("span", {
728
780
  className: "font-medium text-text-primary",
729
- children: P.seller
781
+ children: F.seller
730
782
  })]
731
783
  }),
732
- /* @__PURE__ */ v("div", {
784
+ /* @__PURE__ */ b("div", {
733
785
  className: "flex items-center justify-between",
734
- children: [/* @__PURE__ */ _("span", {
786
+ children: [/* @__PURE__ */ y("span", {
735
787
  className: "text-text-secondary",
736
- children: T("healthybowl.marketplace.overview.quickView.sellerRating", "Seller Rating")
737
- }), /* @__PURE__ */ v("div", {
788
+ children: w("healthybowl.marketplace.overview.quickView.sellerRating", "Seller Rating")
789
+ }), /* @__PURE__ */ b("div", {
738
790
  className: "flex items-center gap-1",
739
- children: [/* @__PURE__ */ _(m, { className: "h-3 w-3 fill-warning text-warning" }), /* @__PURE__ */ _("span", {
791
+ children: [/* @__PURE__ */ y(g, { className: "h-3 w-3 fill-warning text-warning" }), /* @__PURE__ */ y("span", {
740
792
  className: "font-medium text-text-primary",
741
- children: P.sellerRating
793
+ children: F.sellerRating
742
794
  })]
743
795
  })]
744
796
  }),
745
- /* @__PURE__ */ v("div", {
797
+ /* @__PURE__ */ b("div", {
746
798
  className: "flex items-center justify-between",
747
- children: [/* @__PURE__ */ _("span", {
799
+ children: [/* @__PURE__ */ y("span", {
748
800
  className: "text-text-secondary",
749
- children: T("healthybowl.marketplace.overview.quickView.location", "Location")
750
- }), /* @__PURE__ */ _("span", {
801
+ children: w("healthybowl.marketplace.overview.quickView.location", "Location")
802
+ }), /* @__PURE__ */ y("span", {
751
803
  className: "text-text-primary",
752
- children: P.location
804
+ children: F.location
753
805
  })]
754
806
  })
755
807
  ]
@@ -758,123 +810,123 @@ var S = () => {
758
810
  ]
759
811
  })
760
812
  }),
761
- /* @__PURE__ */ _(c, {
762
- open: tt,
763
- onClose: W,
764
- title: L ? T("healthybowl.marketplace.overview.sellerModal.editTitle", "Edit {{name}}", { name: L.name }) : T("healthybowl.marketplace.overview.actions.listProduct", "List a Product"),
765
- description: L ? T("healthybowl.marketplace.overview.sellerModal.editDescription", "Update this marketplace listing. Changes are saved and persist after refresh.") : T("healthybowl.marketplace.overview.sellerModal.createDescription", "Publish your farm produce to the marketplace. Listings are saved and persist after refresh."),
813
+ /* @__PURE__ */ y(re, {
814
+ open: it,
815
+ onClose: G,
816
+ title: R ? w("healthybowl.marketplace.overview.sellerModal.editTitle", "Edit {{name}}", { name: R.name }) : w("healthybowl.marketplace.overview.actions.listProduct", "List a Product"),
817
+ description: R ? w("healthybowl.marketplace.overview.sellerModal.editDescription", "Update this marketplace listing. Changes are saved and persist after refresh.") : w("healthybowl.marketplace.overview.sellerModal.createDescription", "Publish your farm produce to the marketplace. Listings are saved and persist after refresh."),
766
818
  size: "xl",
767
- footer: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(y, {
819
+ footer: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(x, {
768
820
  variant: "outline",
769
- onClick: W,
821
+ onClick: G,
770
822
  className: "text-text-secondary hover:text-text-primary",
771
- children: T("healthybowl.common.cancel", "Cancel")
772
- }), /* @__PURE__ */ _(y, {
773
- onClick: it,
774
- disabled: V,
775
- children: V ? T("healthybowl.marketplace.overview.sellerModal.saving", "Saving...") : L ? T("healthybowl.marketplace.overview.sellerModal.saveChanges", "Save Changes") : T("healthybowl.marketplace.overview.sellerModal.publishListing", "Publish Listing")
823
+ children: w("healthybowl.common.cancel", "Cancel")
824
+ }), /* @__PURE__ */ y(x, {
825
+ onClick: st,
826
+ disabled: H,
827
+ children: H ? w("healthybowl.marketplace.overview.sellerModal.saving", "Saving...") : R ? w("healthybowl.marketplace.overview.sellerModal.saveChanges", "Save Changes") : w("healthybowl.marketplace.overview.sellerModal.publishListing", "Publish Listing")
776
828
  })] }),
777
- children: /* @__PURE__ */ v("div", {
829
+ children: /* @__PURE__ */ b("div", {
778
830
  className: "grid gap-4 sm:grid-cols-2",
779
831
  children: [
780
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
832
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
781
833
  className: "text-sm font-medium text-text-primary",
782
- children: T("healthybowl.marketplace.overview.form.name.label", "Product Name *")
783
- }), /* @__PURE__ */ _("input", {
834
+ children: w("healthybowl.marketplace.overview.form.name.label", "Product Name *")
835
+ }), /* @__PURE__ */ y("input", {
784
836
  type: "text",
785
- value: z.name,
786
- onChange: (e) => U("name", e.target.value),
787
- placeholder: T("healthybowl.marketplace.overview.form.name.placeholder", "e.g., Organic Tomato"),
837
+ value: B.name,
838
+ onChange: (e) => W("name", e.target.value),
839
+ placeholder: w("healthybowl.marketplace.overview.form.name.placeholder", "e.g., Organic Tomato"),
788
840
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
789
841
  })] }),
790
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
842
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
791
843
  className: "text-sm font-medium text-text-primary",
792
- children: T("healthybowl.marketplace.overview.form.category.label", "Category")
793
- }), /* @__PURE__ */ v(Me, {
794
- value: z.category,
795
- onValueChange: (e) => U("category", e),
796
- children: [/* @__PURE__ */ _(Fe, {
844
+ children: w("healthybowl.marketplace.overview.form.category.label", "Category")
845
+ }), /* @__PURE__ */ b(Pe, {
846
+ value: B.category,
847
+ onValueChange: (e) => W("category", e),
848
+ children: [/* @__PURE__ */ y(Le, {
797
849
  className: "mt-1 w-full",
798
- children: /* @__PURE__ */ _(Ie, { placeholder: T("healthybowl.marketplace.overview.form.category.label", "Category") })
799
- }), /* @__PURE__ */ _(Ne, { children: Le.map((e) => /* @__PURE__ */ _(Pe, {
850
+ children: /* @__PURE__ */ y(Re, { placeholder: w("healthybowl.marketplace.overview.form.category.label", "Category") })
851
+ }), /* @__PURE__ */ y(Fe, { children: ze.map((e) => /* @__PURE__ */ y(Ie, {
800
852
  value: e,
801
- children: E(e)
853
+ children: T(e)
802
854
  }, e)) })]
803
855
  })] }),
804
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
856
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
805
857
  className: "text-sm font-medium text-text-primary",
806
- children: T("healthybowl.marketplace.overview.form.price.label", "Price *")
807
- }), /* @__PURE__ */ _("input", {
858
+ children: w("healthybowl.marketplace.overview.form.price.label", "Price *")
859
+ }), /* @__PURE__ */ y("input", {
808
860
  type: "number",
809
861
  min: 0,
810
862
  step: "0.01",
811
- value: z.price,
812
- onChange: (e) => U("price", e.target.value),
813
- placeholder: T("healthybowl.marketplace.overview.form.price.placeholder", "e.g., 75"),
863
+ value: B.price,
864
+ onChange: (e) => W("price", e.target.value),
865
+ placeholder: w("healthybowl.marketplace.overview.form.price.placeholder", "e.g., 75"),
814
866
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
815
867
  })] }),
816
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
868
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
817
869
  className: "text-sm font-medium text-text-primary",
818
- children: T("healthybowl.marketplace.overview.form.unit.label", "Unit")
819
- }), /* @__PURE__ */ _("input", {
870
+ children: w("healthybowl.marketplace.overview.form.unit.label", "Unit")
871
+ }), /* @__PURE__ */ y("input", {
820
872
  type: "text",
821
- value: z.unit,
822
- onChange: (e) => U("unit", e.target.value),
823
- placeholder: T("healthybowl.marketplace.overview.form.unit.placeholder", "e.g., kg"),
873
+ value: B.unit,
874
+ onChange: (e) => W("unit", e.target.value),
875
+ placeholder: w("healthybowl.marketplace.overview.form.unit.placeholder", "e.g., kg"),
824
876
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
825
877
  })] }),
826
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
878
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
827
879
  className: "text-sm font-medium text-text-primary",
828
- children: T("healthybowl.marketplace.overview.form.stock.label", "Quantity Available *")
829
- }), /* @__PURE__ */ _("input", {
880
+ children: w("healthybowl.marketplace.overview.form.stock.label", "Quantity Available *")
881
+ }), /* @__PURE__ */ y("input", {
830
882
  type: "number",
831
883
  min: 0,
832
- value: z.stock,
833
- onChange: (e) => U("stock", e.target.value),
834
- placeholder: T("healthybowl.marketplace.overview.form.stock.placeholder", "e.g., 1000"),
884
+ value: B.stock,
885
+ onChange: (e) => W("stock", e.target.value),
886
+ placeholder: w("healthybowl.marketplace.overview.form.stock.placeholder", "e.g., 1000"),
835
887
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
836
888
  })] }),
837
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
889
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
838
890
  className: "text-sm font-medium text-text-primary",
839
- children: T("healthybowl.marketplace.overview.form.seller.label", "Seller / Farm *")
840
- }), /* @__PURE__ */ _("input", {
891
+ children: w("healthybowl.marketplace.overview.form.seller.label", "Seller / Farm *")
892
+ }), /* @__PURE__ */ y("input", {
841
893
  type: "text",
842
- value: z.seller,
843
- onChange: (e) => U("seller", e.target.value),
844
- placeholder: T("healthybowl.marketplace.overview.form.seller.placeholder", "e.g., Green Valley Farm"),
894
+ value: B.seller,
895
+ onChange: (e) => W("seller", e.target.value),
896
+ placeholder: w("healthybowl.marketplace.overview.form.seller.placeholder", "e.g., Green Valley Farm"),
845
897
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
846
898
  })] }),
847
- /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
899
+ /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
848
900
  className: "text-sm font-medium text-text-primary",
849
- children: T("healthybowl.marketplace.overview.form.location.label", "Location")
850
- }), /* @__PURE__ */ _("input", {
901
+ children: w("healthybowl.marketplace.overview.form.location.label", "Location")
902
+ }), /* @__PURE__ */ y("input", {
851
903
  type: "text",
852
- value: z.location,
853
- onChange: (e) => U("location", e.target.value),
854
- placeholder: T("healthybowl.marketplace.overview.form.location.placeholder", "e.g., Pune, Maharashtra"),
904
+ value: B.location,
905
+ onChange: (e) => W("location", e.target.value),
906
+ placeholder: w("healthybowl.marketplace.overview.form.location.placeholder", "e.g., Pune, Maharashtra"),
855
907
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
856
908
  })] }),
857
- /* @__PURE__ */ _("div", {
909
+ /* @__PURE__ */ y("div", {
858
910
  className: "flex items-end",
859
- children: /* @__PURE__ */ v("label", {
911
+ children: /* @__PURE__ */ b("label", {
860
912
  className: "flex items-center gap-2 text-sm font-medium text-text-primary",
861
- children: [/* @__PURE__ */ _("input", {
913
+ children: [/* @__PURE__ */ y("input", {
862
914
  type: "checkbox",
863
- checked: z.organicCertified,
864
- onChange: (e) => U("organicCertified", e.target.checked),
915
+ checked: B.organicCertified,
916
+ onChange: (e) => W("organicCertified", e.target.checked),
865
917
  className: "h-4 w-4 rounded border-border-subtle text-primary focus:ring-[var(--color-focus-ring)]"
866
- }), T("healthybowl.marketplace.overview.form.organicCertified.label", "Organic certified")]
918
+ }), w("healthybowl.marketplace.overview.form.organicCertified.label", "Organic certified")]
867
919
  })
868
920
  }),
869
- /* @__PURE__ */ v("div", {
921
+ /* @__PURE__ */ b("div", {
870
922
  className: "sm:col-span-2",
871
- children: [/* @__PURE__ */ _("label", {
923
+ children: [/* @__PURE__ */ y("label", {
872
924
  className: "text-sm font-medium text-text-primary",
873
- children: T("healthybowl.marketplace.overview.form.description.label", "Description")
874
- }), /* @__PURE__ */ _("textarea", {
875
- value: z.description,
876
- onChange: (e) => U("description", e.target.value),
877
- placeholder: T("healthybowl.marketplace.overview.form.description.placeholder", "Describe your produce, quality, and any certifications..."),
925
+ children: w("healthybowl.marketplace.overview.form.description.label", "Description")
926
+ }), /* @__PURE__ */ y("textarea", {
927
+ value: B.description,
928
+ onChange: (e) => W("description", e.target.value),
929
+ placeholder: w("healthybowl.marketplace.overview.form.description.placeholder", "Describe your produce, quality, and any certifications..."),
878
930
  rows: 3,
879
931
  className: "mt-1 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
880
932
  })]
@@ -882,14 +934,14 @@ var S = () => {
882
934
  ]
883
935
  })
884
936
  }),
885
- /* @__PURE__ */ _(te, {
886
- toasts: ct,
887
- onDismiss: lt
937
+ /* @__PURE__ */ y(c, {
938
+ toasts: xt,
939
+ onDismiss: St
888
940
  })
889
941
  ]
890
942
  });
891
943
  };
892
944
  //#endregion
893
- export { S as MarketplacePage };
945
+ export { C as MarketplacePage };
894
946
 
895
947
  //# sourceMappingURL=MarketplacePage.js.map