@loczer/storefront-sdk 0.197.0 → 0.199.0

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 (63) hide show
  1. package/dist/StorefrontContext.d.ts +483 -0
  2. package/dist/StorefrontContext.d.ts.map +1 -0
  3. package/dist/StorefrontContext.js +39 -0
  4. package/dist/StorefrontProvider.d.ts +6 -486
  5. package/dist/StorefrontProvider.d.ts.map +1 -1
  6. package/dist/StorefrontProvider.js +34 -67
  7. package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-j1CgFGLe.js → MorphingModalWizard-DOH1GYVR.js} +1 -0
  8. package/dist/components/AboutSection/index.js +5 -5
  9. package/dist/components/BikeProductCard/index.d.ts +2 -1
  10. package/dist/components/BikeProductCard/index.d.ts.map +1 -1
  11. package/dist/components/BikeProductCard/index.js +28 -28
  12. package/dist/components/BookingBikeQuickAddCard/index.d.ts +19 -0
  13. package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -0
  14. package/dist/components/BookingBikeQuickAddCard/index.js +174 -0
  15. package/dist/components/BookingBikeVariantDialog/index.d.ts +5 -2
  16. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  17. package/dist/components/BookingBikeVariantDialog/index.js +85 -93
  18. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  19. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  20. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
  21. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
  22. package/dist/components/ContactSection/index.js +107 -107
  23. package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
  24. package/dist/components/ContractSaleDocument/Invoice.js +117 -111
  25. package/dist/components/Header/index.js +4 -4
  26. package/dist/components/Layout/index.d.ts.map +1 -1
  27. package/dist/components/Layout/index.js +47 -40
  28. package/dist/components/PlatformFooter/index.js +1 -1
  29. package/dist/components/ProductPriceBadge/index.d.ts +2 -1
  30. package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
  31. package/dist/components/ProductPriceBadge/index.js +72 -70
  32. package/dist/components/TestimonialsSection/index.js +1 -1
  33. package/dist/i18n/en.d.ts +3 -0
  34. package/dist/i18n/en.d.ts.map +1 -1
  35. package/dist/i18n/en.js +3 -0
  36. package/dist/i18n/fr.d.ts +3 -0
  37. package/dist/i18n/fr.d.ts.map +1 -1
  38. package/dist/i18n/fr.js +3 -0
  39. package/dist/index.d.ts +19 -2
  40. package/dist/index.js +59 -58
  41. package/dist/lib/cartSummary.js +7 -7
  42. package/dist/lib/products.d.ts +6 -0
  43. package/dist/lib/products.d.ts.map +1 -1
  44. package/dist/lib/products.js +36 -32
  45. package/dist/lib/toast.d.ts +9 -0
  46. package/dist/lib/toast.d.ts.map +1 -0
  47. package/dist/lib/toast.js +13 -0
  48. package/dist/pages/BookingPage.d.ts.map +1 -1
  49. package/dist/pages/BookingPage.js +323 -396
  50. package/dist/pages/CheckoutPage.js +217 -217
  51. package/dist/pages/CheckoutPaymentPage.js +124 -124
  52. package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
  53. package/dist/pages/ContractSaleDocumentPage.js +83 -83
  54. package/dist/pages/ErrorPage.d.ts.map +1 -1
  55. package/dist/pages/ErrorPage.js +13 -13
  56. package/dist/pages/HomePage.js +6 -3
  57. package/dist/pages/NotFoundPage.js +1 -1
  58. package/dist/pages/ProductPage.d.ts.map +1 -1
  59. package/dist/pages/ProductPage.js +177 -165
  60. package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +1 -1
  61. package/dist/storefront.css +1 -1
  62. package/dist/ui/button.js +3 -3
  63. package/package.json +3 -1
@@ -1,14 +1,14 @@
1
1
  import { Button as e } from "../ui/button.js";
2
2
  import { normalizeStorefrontI18nLanguage as t } from "../i18n/I18nProvider.js";
3
- import { Card as n } from "../ui/card.js";
4
- import { ContractSaleDocument as r } from "../components/ContractSaleDocument/Invoice.js";
3
+ import { toast as n } from "../lib/toast.js";
4
+ import { Card as r } from "../ui/card.js";
5
+ import { ContractSaleDocument as i } from "../components/ContractSaleDocument/Invoice.js";
5
6
  import "../components/ContractSaleDocument/index.js";
6
- import { apiGet as i, apiPost as a } from "../lib/apiCall.js";
7
- import { Spinner as o } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
8
- import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as s, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as c, GET_CONTRACT_SALE_DOCUMENT_ROUTE as l, acceptContractSaleDocumentResponseSchema as u, contractSaleDocumentApiSchema as d, getContractSaleDocumentResponseSchema as f } from "../lib/contractSaleDocumentApi.js";
9
- import { useEffect as p, useState as m } from "react";
10
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
11
- import { toast as _ } from "@rpcbase/client";
7
+ import { apiGet as a, apiPost as o } from "../lib/apiCall.js";
8
+ import { Spinner as s } from "../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
9
+ import { ACCEPT_CONTRACT_SALE_DOCUMENT_ROUTE as c, DOWNLOAD_CONTRACT_SALE_DOCUMENT_PDF_ROUTE as l, GET_CONTRACT_SALE_DOCUMENT_ROUTE as u, acceptContractSaleDocumentResponseSchema as d, contractSaleDocumentApiSchema as f, getContractSaleDocumentResponseSchema as p } from "../lib/contractSaleDocumentApi.js";
10
+ import { useEffect as m, useState as h } from "react";
11
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
12
12
  import { Link as v, useLoaderData as y, useLocation as b, useNavigate as x } from "@rpcbase/router";
13
13
  import { useTranslation as S } from "react-i18next";
14
14
  import { cn as C } from "@rpcbase/ui";
@@ -21,7 +21,7 @@ var O = (e) => new URLSearchParams(e).get("pdf") === "1", k = (e) => t(new URLSe
21
21
  }, j = (e) => {
22
22
  let t = typeof e?.req?.originalUrl == "string" ? e.req.originalUrl : "";
23
23
  return t ? k(new URL(t, "http://localhost").search) : typeof window < "u" ? k(window.location.search) : null;
24
- }, M = (e, t, n, r) => `${c}?${new URLSearchParams({
24
+ }, M = (e, t, n, r) => `${l}?${new URLSearchParams({
25
25
  storeSlug: e,
26
26
  referenceId: t,
27
27
  saleDocumentId: n,
@@ -40,7 +40,7 @@ var O = (e) => new URLSearchParams(e).get("pdf") === "1", k = (e) => t(new URLSe
40
40
  return i;
41
41
  }
42
42
  return e.match(/filename="([^"]+)"/i)?.[1] ?? e.match(/filename=([^;]+)/i)?.[1]?.trim() ?? r;
43
- }, F = (e) => /* @__PURE__ */ h(o, {
43
+ }, F = (e) => /* @__PURE__ */ g(s, {
44
44
  className: "size-4",
45
45
  "aria-hidden": "true",
46
46
  "data-testid": e
@@ -55,25 +55,25 @@ var O = (e) => new URLSearchParams(e).get("pdf") === "1", k = (e) => t(new URLSe
55
55
  labelKey: "docs_contract_sale_language_option_fr"
56
56
  };
57
57
  function R({ selectedLanguage: t, onChange: n }) {
58
- let { t: r } = S(), [i, a] = m(!1), o = I.find((e) => e.code === t) ?? L;
59
- return /* @__PURE__ */ g(D.Root, {
58
+ let { t: r } = S(), [i, a] = h(!1), o = I.find((e) => e.code === t) ?? L;
59
+ return /* @__PURE__ */ _(D.Root, {
60
60
  open: i,
61
61
  onOpenChange: a,
62
- children: [/* @__PURE__ */ h(D.Trigger, {
62
+ children: [/* @__PURE__ */ g(D.Trigger, {
63
63
  nativeButton: !0,
64
- render: /* @__PURE__ */ g(e, {
64
+ render: /* @__PURE__ */ _(e, {
65
65
  variant: "outline",
66
66
  size: "sm",
67
67
  type: "button",
68
68
  "aria-label": r("docs_contract_sale_language_selector_label"),
69
69
  className: "h-9 gap-1 bg-background/80 px-2 uppercase",
70
70
  "data-testid": "contract-sale-document-language-trigger",
71
- children: [/* @__PURE__ */ h("span", { children: o.code }), /* @__PURE__ */ h(T, {
71
+ children: [/* @__PURE__ */ g("span", { children: o.code }), /* @__PURE__ */ g(T, {
72
72
  className: "h-4 w-4",
73
73
  "aria-hidden": "true"
74
74
  })]
75
75
  })
76
- }), /* @__PURE__ */ h(D.Portal, { children: /* @__PURE__ */ h(D.Positioner, {
76
+ }), /* @__PURE__ */ g(D.Portal, { children: /* @__PURE__ */ g(D.Positioner, {
77
77
  align: "end",
78
78
  sideOffset: 4,
79
79
  positionMethod: "fixed",
@@ -84,20 +84,20 @@ function R({ selectedLanguage: t, onChange: n }) {
84
84
  align: "shift",
85
85
  fallbackAxisSide: "none"
86
86
  },
87
- children: /* @__PURE__ */ h(D.Popup, {
88
- render: (e, t) => /* @__PURE__ */ h("div", {
87
+ children: /* @__PURE__ */ g(D.Popup, {
88
+ render: (e, t) => /* @__PURE__ */ g("div", {
89
89
  ...e,
90
90
  "data-menu-content": "",
91
91
  "data-state": t.open ? "open" : "closed"
92
92
  }),
93
93
  className: "z-50 min-w-36 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md transition-opacity duration-75 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 data-[instant]:transition-none",
94
- children: I.map((e) => /* @__PURE__ */ g(D.Item, {
94
+ children: I.map((e) => /* @__PURE__ */ _(D.Item, {
95
95
  onClick: (t) => {
96
96
  t.defaultPrevented || (n(e.code), a(!1));
97
97
  },
98
98
  "data-testid": `contract-sale-document-language-option-${e.code}`,
99
99
  className: C("relative flex cursor-pointer select-none items-center justify-between gap-3 whitespace-nowrap rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground", t === e.code && "bg-accent"),
100
- children: [/* @__PURE__ */ h("span", { children: r(e.labelKey) }), /* @__PURE__ */ h("span", {
100
+ children: [/* @__PURE__ */ g("span", { children: r(e.labelKey) }), /* @__PURE__ */ g("span", {
101
101
  className: "text-2xs uppercase text-muted-foreground",
102
102
  children: e.code
103
103
  })]
@@ -107,27 +107,27 @@ function R({ selectedLanguage: t, onChange: n }) {
107
107
  });
108
108
  }
109
109
  var z = (async ({ ctx: e, params: t }) => {
110
- let n = typeof t.storeSlug == "string" ? t.storeSlug.trim().toLowerCase() : "", r = typeof t.referenceId == "string" ? t.referenceId.trim() : "", a = typeof t.saleDocumentId == "string" ? t.saleDocumentId.trim() : "", o = A(e), s = j(e);
111
- if (!n || !r || !a) return {
110
+ let n = typeof t.storeSlug == "string" ? t.storeSlug.trim().toLowerCase() : "", r = typeof t.referenceId == "string" ? t.referenceId.trim() : "", i = typeof t.saleDocumentId == "string" ? t.saleDocumentId.trim() : "", o = A(e), s = j(e);
111
+ if (!n || !r || !i) return {
112
112
  storeSlug: n,
113
113
  referenceId: r,
114
- saleDocumentId: a,
114
+ saleDocumentId: i,
115
115
  pdfMode: o,
116
116
  documentLanguage: s,
117
117
  document: null,
118
118
  error: null
119
119
  };
120
120
  try {
121
- let t = await i(l, {
121
+ let t = await a(u, {
122
122
  storeSlug: n,
123
123
  referenceId: r,
124
- saleDocumentId: a,
124
+ saleDocumentId: i,
125
125
  ...s ? { lang: s } : {}
126
- }, e), c = f.parse(t);
126
+ }, e), c = p.parse(t);
127
127
  return !c.success || !c.document ? {
128
128
  storeSlug: n,
129
129
  referenceId: r,
130
- saleDocumentId: a,
130
+ saleDocumentId: i,
131
131
  pdfMode: o,
132
132
  documentLanguage: s,
133
133
  document: null,
@@ -135,7 +135,7 @@ var z = (async ({ ctx: e, params: t }) => {
135
135
  } : {
136
136
  storeSlug: n,
137
137
  referenceId: r,
138
- saleDocumentId: a,
138
+ saleDocumentId: i,
139
139
  pdfMode: o,
140
140
  documentLanguage: s,
141
141
  document: c.document,
@@ -145,7 +145,7 @@ var z = (async ({ ctx: e, params: t }) => {
145
145
  return console.error("Failed to load storefront contract sale document", e), {
146
146
  storeSlug: n,
147
147
  referenceId: r,
148
- saleDocumentId: a,
148
+ saleDocumentId: i,
149
149
  pdfMode: o,
150
150
  documentLanguage: s,
151
151
  document: null,
@@ -153,56 +153,56 @@ var z = (async ({ ctx: e, params: t }) => {
153
153
  };
154
154
  }
155
155
  }), B = (e) => {
156
- let t = d.safeParse(e);
156
+ let t = f.safeParse(e);
157
157
  return t.success ? t.data : null;
158
158
  };
159
159
  function V() {
160
- let { t: i, i18n: o } = S(), c = y(), l = b(), d = x(), { storeSlug: f, referenceId: C, saleDocumentId: T } = c, D = c.pdfMode || O(l.search), [A, j] = m(B(c.document)), [I, L] = m(null), [z, V] = m(!1), [H, U] = m(c.error), W = k(l.search) ?? t(A?.language?.customer) ?? c.documentLanguage ?? t(o.language) ?? "fr", G = f && C && T ? M(f, C, T, W) : null, K = f && C && T ? N(f, C, T, W) : "";
161
- p(() => {
162
- j(B(c.document)), U(c.error);
163
- }, [c.document, c.error]), p(() => {
164
- t(o.language) !== W && o.changeLanguage(W);
165
- }, [o, W]);
160
+ let { t: a, i18n: s } = S(), l = y(), u = b(), f = x(), { storeSlug: p, referenceId: C, saleDocumentId: T } = l, D = l.pdfMode || O(u.search), [A, j] = h(B(l.document)), [I, L] = h(null), [z, V] = h(!1), [H, U] = h(l.error), W = k(u.search) ?? t(A?.language?.customer) ?? l.documentLanguage ?? t(s.language) ?? "fr", G = p && C && T ? M(p, C, T, W) : null, K = p && C && T ? N(p, C, T, W) : "";
161
+ m(() => {
162
+ j(B(l.document)), U(l.error);
163
+ }, [l.document, l.error]), m(() => {
164
+ t(s.language) !== W && s.changeLanguage(W);
165
+ }, [s, W]);
166
166
  let q = (e) => {
167
167
  if (e === W) return;
168
- o.changeLanguage(e);
169
- let t = new URLSearchParams(l.search);
168
+ s.changeLanguage(e);
169
+ let t = new URLSearchParams(u.search);
170
170
  t.set("lang", e);
171
171
  let n = t.toString();
172
- d(`${l.pathname}${n ? `?${n}` : ""}${l.hash || ""}`, { replace: !0 });
172
+ f(`${u.pathname}${n ? `?${n}` : ""}${u.hash || ""}`, { replace: !0 });
173
173
  };
174
- if (!A) return /* @__PURE__ */ h("div", {
174
+ if (!A) return /* @__PURE__ */ g("div", {
175
175
  className: "mx-auto max-w-3xl px-4 py-14 sm:px-6",
176
- children: /* @__PURE__ */ h(n, {
176
+ children: /* @__PURE__ */ g(r, {
177
177
  className: "border-slate-200 bg-white p-5 shadow-sm sm:p-6",
178
- children: /* @__PURE__ */ g("div", {
178
+ children: /* @__PURE__ */ _("div", {
179
179
  className: "space-y-4",
180
180
  children: [
181
- /* @__PURE__ */ h("h1", {
181
+ /* @__PURE__ */ g("h1", {
182
182
  className: "text-lg font-semibold text-slate-950",
183
- children: /* @__PURE__ */ h("span", { children: i("docs_contract_sale_not_found_title") })
183
+ children: /* @__PURE__ */ g("span", { children: a("docs_contract_sale_not_found_title") })
184
184
  }),
185
- /* @__PURE__ */ h("p", {
185
+ /* @__PURE__ */ g("p", {
186
186
  className: "text-sm text-destructive",
187
- children: /* @__PURE__ */ h("span", { children: H ?? i("docs_contract_sale_load_error") })
187
+ children: /* @__PURE__ */ g("span", { children: H ?? a("docs_contract_sale_load_error") })
188
188
  }),
189
- /* @__PURE__ */ h(v, {
190
- to: `/${f ?? ""}`,
191
- children: /* @__PURE__ */ g(e, {
189
+ /* @__PURE__ */ g(v, {
190
+ to: `/${p ?? ""}`,
191
+ children: /* @__PURE__ */ _(e, {
192
192
  className: "gap-2",
193
- children: [/* @__PURE__ */ h(w, {
193
+ children: [/* @__PURE__ */ g(w, {
194
194
  className: "h-4 w-4",
195
195
  "aria-hidden": "true"
196
- }), /* @__PURE__ */ h("span", { children: i("docs_contract_sale_back_to_storefront") })]
196
+ }), /* @__PURE__ */ g("span", { children: a("docs_contract_sale_back_to_storefront") })]
197
197
  })
198
198
  })
199
199
  ]
200
200
  })
201
201
  })
202
202
  });
203
- if (D) return /* @__PURE__ */ h("div", {
203
+ if (D) return /* @__PURE__ */ g("div", {
204
204
  className: "min-h-screen bg-white",
205
- children: /* @__PURE__ */ h(r, {
205
+ children: /* @__PURE__ */ g(i, {
206
206
  data: A,
207
207
  renderMode: "pdf",
208
208
  publicDocumentUrl: K
@@ -211,52 +211,52 @@ function V() {
211
211
  let J = async () => {
212
212
  if (!G || z) return;
213
213
  V(!0);
214
- let e = _.loading(i("docs_contract_sale_preparing_pdf"), { icon: F() });
214
+ let e = n.loading(a("docs_contract_sale_preparing_pdf"), { icon: F() });
215
215
  try {
216
216
  let t = await fetch(G, {
217
217
  method: "GET",
218
218
  credentials: "include"
219
219
  });
220
220
  if (!t.ok) throw Error(`PDF request failed with status ${t.status}`);
221
- let n = await t.blob(), r = window.URL.createObjectURL(n), i = window.document.createElement("a");
222
- i.href = r, i.download = P(t.headers.get("content-disposition"), A.saleDocumentNumber, A.kind), window.document.body.appendChild(i), i.click(), i.remove(), _.dismiss(e), window.setTimeout(() => {
223
- window.URL.revokeObjectURL(r);
221
+ let r = await t.blob(), i = window.URL.createObjectURL(r), a = window.document.createElement("a");
222
+ a.href = i, a.download = P(t.headers.get("content-disposition"), A.saleDocumentNumber, A.kind), window.document.body.appendChild(a), a.click(), a.remove(), n.dismiss(e), window.setTimeout(() => {
223
+ window.URL.revokeObjectURL(i);
224
224
  }, 0);
225
225
  } catch (t) {
226
- console.error("Failed to download storefront contract sale document PDF", t), _.dismiss(e), _.error(i("docs_contract_sale_download_pdf_error"));
226
+ console.error("Failed to download storefront contract sale document PDF", t), n.dismiss(e), n.error(a("docs_contract_sale_download_pdf_error"));
227
227
  } finally {
228
228
  V(!1);
229
229
  }
230
230
  };
231
- return /* @__PURE__ */ g("div", {
231
+ return /* @__PURE__ */ _("div", {
232
232
  className: "flex h-dvh min-h-0 flex-col overflow-hidden bg-gradient-to-br from-slate-100 via-slate-100 to-slate-200",
233
- children: [/* @__PURE__ */ g("div", {
233
+ children: [/* @__PURE__ */ _("div", {
234
234
  className: "fixed inset-x-0 top-0 z-40 flex h-14 items-center justify-between gap-3 border-b border-border bg-background/70 px-4 backdrop-blur-xl backdrop-saturate-125 supports-[backdrop-filter]:bg-background/55 sm:px-6",
235
- children: [/* @__PURE__ */ g(v, {
236
- to: `/${f ?? ""}`,
235
+ children: [/* @__PURE__ */ _(v, {
236
+ to: `/${p ?? ""}`,
237
237
  className: "inline-flex items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950",
238
- children: [/* @__PURE__ */ h(w, {
238
+ children: [/* @__PURE__ */ g(w, {
239
239
  className: "h-4 w-4",
240
240
  "aria-hidden": "true"
241
- }), /* @__PURE__ */ h("span", { children: i("docs_contract_sale_back_to_storefront") })]
242
- }), /* @__PURE__ */ g("div", {
241
+ }), /* @__PURE__ */ g("span", { children: a("docs_contract_sale_back_to_storefront") })]
242
+ }), /* @__PURE__ */ _("div", {
243
243
  className: "flex min-w-0 items-center gap-2",
244
244
  children: [
245
- H ? /* @__PURE__ */ h("span", {
245
+ H ? /* @__PURE__ */ g("span", {
246
246
  className: "max-w-[min(44vw,24rem)] truncate text-right text-sm text-destructive",
247
247
  children: H
248
- }) : I === "signature" ? /* @__PURE__ */ h("span", {
248
+ }) : I === "signature" ? /* @__PURE__ */ g("span", {
249
249
  className: "max-w-[min(44vw,24rem)] truncate text-right text-sm text-slate-600",
250
- children: i("docs_contract_sale_submitting_signature")
251
- }) : I === "acceptance" ? /* @__PURE__ */ h("span", {
250
+ children: a("docs_contract_sale_submitting_signature")
251
+ }) : I === "acceptance" ? /* @__PURE__ */ g("span", {
252
252
  className: "max-w-[min(44vw,24rem)] truncate text-right text-sm text-slate-600",
253
- children: i("docs_contract_sale_submitting_acceptance")
253
+ children: a("docs_contract_sale_submitting_acceptance")
254
254
  }) : null,
255
- /* @__PURE__ */ h(R, {
255
+ /* @__PURE__ */ g(R, {
256
256
  selectedLanguage: W,
257
257
  onChange: q
258
258
  }),
259
- G ? /* @__PURE__ */ g(e, {
259
+ G ? /* @__PURE__ */ _(e, {
260
260
  variant: "outline",
261
261
  size: "sm",
262
262
  type: "button",
@@ -267,15 +267,15 @@ function V() {
267
267
  className: "h-9 bg-background/80 px-3",
268
268
  "data-testid": "contract-sale-document-download-pdf",
269
269
  children: [
270
- z ? F("contract-sale-document-download-spinner") : /* @__PURE__ */ h(E, {
270
+ z ? F("contract-sale-document-download-spinner") : /* @__PURE__ */ g(E, {
271
271
  className: "h-4 w-4",
272
272
  "aria-hidden": "true"
273
273
  }),
274
- /* @__PURE__ */ h("span", {
274
+ /* @__PURE__ */ g("span", {
275
275
  className: "hidden sm:inline",
276
- children: i("docs_contract_sale_download_pdf")
276
+ children: a("docs_contract_sale_download_pdf")
277
277
  }),
278
- /* @__PURE__ */ h("span", {
278
+ /* @__PURE__ */ g("span", {
279
279
  className: "sm:hidden",
280
280
  children: "PDF"
281
281
  })
@@ -283,19 +283,19 @@ function V() {
283
283
  }) : null
284
284
  ]
285
285
  })]
286
- }), /* @__PURE__ */ h("div", {
286
+ }), /* @__PURE__ */ g("div", {
287
287
  className: "min-h-0 flex-1",
288
- children: /* @__PURE__ */ h(r, {
288
+ children: /* @__PURE__ */ g(i, {
289
289
  data: A,
290
290
  heightMode: "parent",
291
291
  publicDocumentUrl: K,
292
292
  onAccept: async (e) => {
293
- let t = e.mode === "signature" ? i("docs_contract_sale_signature_submit_error") : i("docs_contract_sale_acceptance_submit_error");
294
- if (!f || !C || !T) throw Error(t);
293
+ let t = e.mode === "signature" ? a("docs_contract_sale_signature_submit_error") : a("docs_contract_sale_acceptance_submit_error");
294
+ if (!p || !C || !T) throw Error(t);
295
295
  L(e.mode);
296
296
  try {
297
- let n = await a(s, {
298
- storeSlug: f,
297
+ let n = await o(c, {
298
+ storeSlug: p,
299
299
  referenceId: C,
300
300
  saleDocumentId: T,
301
301
  lang: W,
@@ -305,7 +305,7 @@ function V() {
305
305
  phone: e.phone,
306
306
  signature: e.signature
307
307
  } : { mode: "acceptance" }
308
- }), r = u.parse(n);
308
+ }), r = d.parse(n);
309
309
  if (!r.success) {
310
310
  let e = r.message ?? t;
311
311
  if (r.document) return j(r.document), U(e), r.document;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorPage.d.ts","sourceRoot":"","sources":["../../src/pages/ErrorPage.tsx"],"names":[],"mappings":"AA4HA,MAAM,CAAC,OAAO,UAAU,SAAS,4CA2EhC"}
1
+ {"version":3,"file":"ErrorPage.d.ts","sourceRoot":"","sources":["../../src/pages/ErrorPage.tsx"],"names":[],"mappings":"AA4HA,MAAM,CAAC,OAAO,UAAU,SAAS,4CA+EhC"}
@@ -43,8 +43,8 @@ function _(e) {
43
43
  description: "store_unavailable_description"
44
44
  };
45
45
  case "unknown": return {
46
- title: "store_not_found_title",
47
- description: "store_not_found_description"
46
+ title: "generic_not_found_title",
47
+ description: "generic_not_found_description"
48
48
  };
49
49
  }
50
50
  }
@@ -52,14 +52,14 @@ function v(e) {
52
52
  return null;
53
53
  }
54
54
  function y() {
55
- let { t: e } = c(), { storeSlug: a } = o(), f = s(), p = h(f), m = p === 404, y = g(f, p), b = y !== null, x = v(f), S = y ? _(y.status) : null, C = S?.title ?? (m ? "not_found_title" : "error_title"), w = S?.description ?? (m ? "not_found_description" : "error_description"), T = y?.status === "moved" ? y.replacementSlug : void 0, E = b ? T ? `/${encodeURIComponent(T)}` : null : `/${a ?? ""}`, D = T ? "go_to_moved_storefront" : "back_to_home";
55
+ let { t: e } = c(), { storeSlug: a } = o(), f = s(), p = h(f), m = p === 404, y = g(f, p), b = y !== null, x = y !== null && y.status !== "unknown", S = v(f), C = y ? _(y.status) : null, w = C?.title ?? (m ? "not_found_title" : "error_title"), T = C?.description ?? (m ? "not_found_description" : "error_description"), E = y?.status === "moved" ? y.replacementSlug : void 0, D = x ? E ? `/${encodeURIComponent(E)}` : null : y?.status === "unknown" ? null : `/${a ?? ""}`, O = E ? "go_to_moved_storefront" : "back_to_home";
56
56
  return t(() => {
57
57
  document.documentElement.setAttribute("data-hydrated", "true"), b && document.querySelectorAll("vite-error-overlay").forEach((e) => {
58
58
  e.remove();
59
- }), m || (console.error(f), console.error(x));
59
+ }), m || (console.error(f), console.error(S));
60
60
  }, [
61
61
  f,
62
- x,
62
+ S,
63
63
  m,
64
64
  b
65
65
  ]), /* @__PURE__ */ n("div", {
@@ -79,27 +79,27 @@ function y() {
79
79
  children: [
80
80
  /* @__PURE__ */ n("h1", {
81
81
  className: "text-2xl font-semibold tracking-tight",
82
- children: /* @__PURE__ */ n("span", { children: e(C) })
82
+ children: /* @__PURE__ */ n("span", { children: e(w) })
83
83
  }),
84
84
  /* @__PURE__ */ n("p", {
85
85
  className: "text-muted-foreground",
86
- children: /* @__PURE__ */ n("span", { children: e(w, { store: a }) })
86
+ children: /* @__PURE__ */ n("span", { children: e(T, { store: a }) })
87
87
  }),
88
- b ? /* @__PURE__ */ n("p", {
88
+ x ? /* @__PURE__ */ n("p", {
89
89
  className: "text-sm text-muted-foreground",
90
90
  children: /* @__PURE__ */ n("span", { children: e("store_unavailable_contact") })
91
91
  }) : null
92
92
  ]
93
93
  }),
94
- E ? /* @__PURE__ */ n("div", {
94
+ D ? /* @__PURE__ */ n("div", {
95
95
  className: "flex justify-center",
96
96
  children: /* @__PURE__ */ r(i, {
97
- to: E,
98
- className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow transition hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
99
- children: [n(T ? d : u, {
97
+ to: D,
98
+ className: "inline-flex items-center gap-2 rounded-xl bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow transition hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
99
+ children: [n(E ? d : u, {
100
100
  className: "h-4 w-4",
101
101
  "aria-hidden": "true"
102
- }), /* @__PURE__ */ n("span", { children: e(D) })]
102
+ }), /* @__PURE__ */ n("span", { children: e(O) })]
103
103
  })
104
104
  }) : null
105
105
  ]
@@ -1,6 +1,6 @@
1
1
  import { BOOKING_SEARCH_KEYS as e, applyBookingParamsToSearch as t, createBookingPeriodConfigFromStorefrontConfiguration as n, getBookingParamsFromSearch as r, getDefaultBookingParamsForStorefrontConfiguration as i, resolveBookingSearchParamsFromSessionStorage as a, writeBookingSearchParamsToSessionStorage as o } from "../lib/booking.js";
2
- import { getAvailabilityVariant as ee } from "../lib/utils.js";
3
2
  import { getLocalizedValue as s } from "../localization.js";
3
+ import { getAvailabilityVariant as ee } from "../lib/utils.js";
4
4
  import { buildStorefrontImageUrl as c } from "../lib/storefrontImage.js";
5
5
  import "../lib/storefrontMissingValues.js";
6
6
  import { Badge as l } from "../ui/badge.js";
@@ -14,7 +14,7 @@ import { BookingEndTimeField as oe } from "../components/BookingPeriodSelector/c
14
14
  import { BookingTimeSlotsStatus as se } from "../components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
15
15
  import "../components/BookingPeriodSelector/index.js";
16
16
  import { DeliveryAddressSelector as ce } from "../components/DeliveryAddressSelector/index.js";
17
- import { useStorefront as le, useStorefrontProducts as ue } from "../StorefrontProvider.js";
17
+ import { useStorefront as le, useStorefrontProducts as ue } from "../StorefrontContext.js";
18
18
  import { ContactSection as de } from "../components/ContactSection/index.js";
19
19
  import { TestimonialsSection as fe } from "../components/TestimonialsSection/index.js";
20
20
  import { AboutSection as pe } from "../components/AboutSection/index.js";
@@ -639,7 +639,10 @@ function O() {
639
639
  }),
640
640
  /* @__PURE__ */ _("div", {
641
641
  className: "flex items-center justify-between gap-2",
642
- children: /* @__PURE__ */ _(ge, { prices: e.prices })
642
+ children: /* @__PURE__ */ _(ge, {
643
+ prices: e.prices,
644
+ openOnHover: !1
645
+ })
643
646
  })
644
647
  ]
645
648
  }, e.id);
@@ -31,7 +31,7 @@ function s() {
31
31
  className: "flex justify-center",
32
32
  children: /* @__PURE__ */ t(n, {
33
33
  to: `/${c ?? ""}`,
34
- className: "inline-flex items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow transition hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
34
+ className: "inline-flex items-center gap-2 rounded-xl bg-primary px-4 py-2 text-sm font-medium text-primary-foreground shadow transition hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
35
35
  children: [/* @__PURE__ */ e(o, {
36
36
  className: "h-4 w-4",
37
37
  "aria-hidden": "true"
@@ -1 +1 @@
1
- {"version":3,"file":"ProductPage.d.ts","sourceRoot":"","sources":["../../src/pages/ProductPage.tsx"],"names":[],"mappings":"AA0HA,MAAM,CAAC,OAAO,UAAU,WAAW,4CA4WlC"}
1
+ {"version":3,"file":"ProductPage.d.ts","sourceRoot":"","sources":["../../src/pages/ProductPage.tsx"],"names":[],"mappings":"AA+HA,MAAM,CAAC,OAAO,UAAU,WAAW,4CAqXlC"}