@loczer/storefront-sdk 0.188.0 → 0.189.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 (46) hide show
  1. package/dist/chunks/ui/dist/Map/{MapContent-QPkuTBvK.js → MapContent-PK-ptOx6.js} +126 -94
  2. package/dist/chunks/ui/dist/Map/mapboxError-oRn0l3EE.js +25 -0
  3. package/dist/chunks/ui/dist/{Map-BXmRf5Ep.js → Map-BwXj49kV.js} +1 -1
  4. package/dist/components/BookingBikeVariantDialog/index.d.ts +2 -1
  5. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  6. package/dist/components/BookingBikeVariantDialog/index.js +39 -38
  7. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
  8. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +32 -30
  9. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.d.ts.map +1 -1
  10. package/dist/components/BookingPeriodSelector/components/BookingMobileDateDrawer.js +127 -122
  11. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
  12. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +32 -30
  13. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts +7 -0
  14. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.d.ts.map +1 -0
  15. package/dist/components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js +29 -0
  16. package/dist/components/BookingPeriodSelector/index.d.ts +2 -1
  17. package/dist/components/BookingPeriodSelector/index.d.ts.map +1 -1
  18. package/dist/components/BookingPeriodSelector/index.js +15 -14
  19. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +11 -0
  20. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  21. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +280 -216
  22. package/dist/components/ContactSection/index.d.ts.map +1 -1
  23. package/dist/components/ContactSection/index.js +120 -116
  24. package/dist/components/Header/index.d.ts.map +1 -1
  25. package/dist/components/Header/index.js +35 -35
  26. package/dist/components/Map/index.js +1 -1
  27. package/dist/i18n/en.d.ts +5 -0
  28. package/dist/i18n/en.d.ts.map +1 -1
  29. package/dist/i18n/en.js +5 -0
  30. package/dist/i18n/fr.d.ts +5 -0
  31. package/dist/i18n/fr.d.ts.map +1 -1
  32. package/dist/i18n/fr.js +5 -0
  33. package/dist/index.d.ts +29 -0
  34. package/dist/index.js +26 -25
  35. package/dist/lib/fetchStorefrontTimeSlots.d.ts.map +1 -1
  36. package/dist/lib/fetchStorefrontTimeSlots.js +2 -1
  37. package/dist/pages/BookingPage.d.ts.map +1 -1
  38. package/dist/pages/BookingPage.js +109 -95
  39. package/dist/pages/CheckoutPage.d.ts.map +1 -1
  40. package/dist/pages/CheckoutPage.js +229 -231
  41. package/dist/pages/HomePage.d.ts.map +1 -1
  42. package/dist/pages/HomePage.js +304 -275
  43. package/dist/pages/ProductPage.d.ts.map +1 -1
  44. package/dist/pages/ProductPage.js +60 -52
  45. package/dist/storefront.css +1 -1
  46. package/package.json +1 -1
@@ -1,48 +1,49 @@
1
- import { applyBookingParamsToSearch as e, createBookingPeriodConfigFromStorefrontConfiguration as t, getBookingParamsFromSearch as n, getDefaultBookingParamsForStorefrontConfiguration as r, resolveBookingSearchParamsFromSessionStorage as i, writeBookingSearchParamsToSessionStorage as a } from "../lib/booking.js";
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
2
  import { getAvailabilityVariant as ee } from "../lib/utils.js";
3
- import { getLocalizedValue as o } from "../localization.js";
4
- import { buildStorefrontImageUrl as s } from "../lib/storefrontImage.js";
3
+ import { getLocalizedValue as s } from "../localization.js";
4
+ import { buildStorefrontImageUrl as c } from "../lib/storefrontImage.js";
5
5
  import "../lib/storefrontMissingValues.js";
6
- import { Badge as c } from "../ui/badge.js";
7
- import { Button as l } from "../ui/button.js";
8
- import { usePlaygroundDevSettings as u } from "../lib/playgroundDevSettings.js";
9
- import { BookingPeriodProvider as te } from "../components/BookingPeriodSelector/BookingPeriodContext.js";
10
- import { BookingStartDateField as ne } from "../components/BookingPeriodSelector/components/BookingStartDateField.js";
11
- import { BookingStartTimeField as re } from "../components/BookingPeriodSelector/components/BookingStartTimeField.js";
12
- import { BookingEndDateField as ie } from "../components/BookingPeriodSelector/components/BookingEndDateField.js";
13
- import { BookingEndTimeField as ae } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
6
+ import { Badge as l } from "../ui/badge.js";
7
+ import { Button as u } from "../ui/button.js";
8
+ import { usePlaygroundDevSettings as te } from "../lib/playgroundDevSettings.js";
9
+ import { BookingPeriodProvider as ne, useBookingPeriod as d } from "../components/BookingPeriodSelector/BookingPeriodContext.js";
10
+ import { BookingStartDateField as re } from "../components/BookingPeriodSelector/components/BookingStartDateField.js";
11
+ import { BookingStartTimeField as ie } from "../components/BookingPeriodSelector/components/BookingStartTimeField.js";
12
+ import { BookingEndDateField as ae } from "../components/BookingPeriodSelector/components/BookingEndDateField.js";
13
+ import { BookingEndTimeField as oe } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
14
+ import { BookingTimeSlotsStatus as se } from "../components/BookingPeriodSelector/components/BookingTimeSlotsStatus.js";
14
15
  import "../components/BookingPeriodSelector/index.js";
15
- import { DeliveryAddressSelector as oe } from "../components/DeliveryAddressSelector/index.js";
16
- import { useStorefront as se, useStorefrontProducts as ce } from "../StorefrontProvider.js";
17
- import { ContactSection as le } from "../components/ContactSection/index.js";
18
- import { TestimonialsSection as ue } from "../components/TestimonialsSection/index.js";
19
- import { AboutSection as de } from "../components/AboutSection/index.js";
20
- import { Card as fe } from "../ui/card.js";
21
- import { ProductWarningNotice as pe } from "../components/ProductWarningNotice/index.js";
22
- import { ProductPriceBadge as me } from "../components/ProductPriceBadge/index.js";
23
- import d from "../chunks/assets/playground-hero-preview-kf4c9tSc.js";
24
- import { resolveProductImageContainerStyle as f } from "../lib/productImageStyles.js";
25
- import { BikeProductCard as he } from "../components/BikeProductCard/index.js";
26
- import { StorefrontCancellationPolicyNotice as ge } from "../components/StorefrontCancellationPolicyNotice/index.js";
27
- import { StorefrontInsuranceNotice as _e } from "../components/StorefrontInsuranceNotice/index.js";
28
- import { createStorefrontTimeSlotsFetcher as ve } from "../lib/fetchStorefrontTimeSlots.js";
29
- import { FulfillmentSection as ye } from "../components/FulfillmentSection/index.js";
30
- import { useEffect as be, useMemo as p, useRef as xe, useState as m } from "react";
31
- import { Fragment as Se, jsx as h, jsxs as g } from "react/jsx-runtime";
32
- import { cn as _ } from "@rpcbase/ui";
33
- import { useMediaQuery as Ce } from "@rpcbase/client";
34
- import { Link as v, useLocation as we, useNavigate as Te, useParams as Ee, useSearchParams as De } from "@rpcbase/router";
35
- import { useTranslation as Oe } from "react-i18next";
36
- import { ArrowRight as y, Bike as b, Clock as ke, MapPin as Ae, ShieldCheck as je, Truck as Me } from "lucide-react";
16
+ import { DeliveryAddressSelector as ce } from "../components/DeliveryAddressSelector/index.js";
17
+ import { useStorefront as le, useStorefrontProducts as ue } from "../StorefrontProvider.js";
18
+ import { ContactSection as de } from "../components/ContactSection/index.js";
19
+ import { TestimonialsSection as fe } from "../components/TestimonialsSection/index.js";
20
+ import { AboutSection as pe } from "../components/AboutSection/index.js";
21
+ import { Card as me } from "../ui/card.js";
22
+ import { ProductWarningNotice as he } from "../components/ProductWarningNotice/index.js";
23
+ import { ProductPriceBadge as ge } from "../components/ProductPriceBadge/index.js";
24
+ import f from "../chunks/assets/playground-hero-preview-kf4c9tSc.js";
25
+ import { resolveProductImageContainerStyle as _e } from "../lib/productImageStyles.js";
26
+ import { BikeProductCard as ve } from "../components/BikeProductCard/index.js";
27
+ import { StorefrontCancellationPolicyNotice as ye } from "../components/StorefrontCancellationPolicyNotice/index.js";
28
+ import { StorefrontInsuranceNotice as be } from "../components/StorefrontInsuranceNotice/index.js";
29
+ import { createStorefrontTimeSlotsFetcher as xe } from "../lib/fetchStorefrontTimeSlots.js";
30
+ import { FulfillmentSection as Se } from "../components/FulfillmentSection/index.js";
31
+ import { useEffect as Ce, useMemo as p, useRef as we, useState as m } from "react";
32
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
33
+ import { cn as v } from "@rpcbase/ui";
34
+ import { useMediaQuery as Te } from "@rpcbase/client";
35
+ import { Link as y, useLocation as Ee, useNavigate as De, useParams as Oe, useSearchParams as ke } from "@rpcbase/router";
36
+ import { useTranslation as Ae } from "react-i18next";
37
+ import { ArrowRight as b, Bike as je, Clock as Me, MapPin as Ne, ShieldCheck as Pe, Truck as Fe } from "lucide-react";
37
38
  //#region src/pages/HomePage.tsx
38
- var x = (e) => String(e).padStart(2, "0"), Ne = "text-2xs font-semibold uppercase tracking-wide text-slate-600", Pe = "h-10", S = 6, C = 5, Fe = [
39
+ var x = (e) => String(e).padStart(2, "0"), Ie = "text-2xs font-semibold uppercase tracking-wide text-slate-600", Le = "h-10", S = 6, C = 5, w = [
39
40
  15,
40
41
  25,
41
42
  42,
42
43
  66,
43
44
  33,
44
45
  54
45
- ], w = [
46
+ ], T = [
46
47
  "4 / 5",
47
48
  "1 / 1",
48
49
  "3 / 4",
@@ -51,50 +52,64 @@ var x = (e) => String(e).padStart(2, "0"), Ne = "text-2xs font-semibold uppercas
51
52
  "4 / 3",
52
53
  "9 / 16",
53
54
  "6 / 7"
54
- ], T = (e) => `${e.getFullYear()}-${x(e.getMonth() + 1)}-${x(e.getDate())}`, E = (e) => {
55
+ ], Re = ({ buttonRef: e, className: t, label: n, onSubmit: r }) => {
56
+ let { canCommitTimeSlots: i, startTime: a, endTime: o } = d();
57
+ return /* @__PURE__ */ _(u, {
58
+ ref: e,
59
+ className: v("gap-2", t),
60
+ disabled: !i || !a || !o,
61
+ onClick: r,
62
+ children: [/* @__PURE__ */ g("span", { children: n }), /* @__PURE__ */ g(b, {
63
+ className: "h-4 w-4",
64
+ "aria-hidden": "true"
65
+ })]
66
+ });
67
+ }, E = (e) => `${e.getFullYear()}-${x(e.getMonth() + 1)}-${x(e.getDate())}`, D = (e) => {
55
68
  if (!e) return;
56
69
  let t = e.match(/^(\d{4})-(\d{2})-(\d{2})$/);
57
70
  if (!t) return;
58
71
  let n = Number(t[1]), r = Number(t[2]), i = Number(t[3]), a = new Date(n, r - 1, i);
59
72
  if (!(Number.isNaN(a.getTime()) || a.getFullYear() !== n || a.getMonth() !== r - 1 || a.getDate() !== i)) return a;
60
- }, Ie = (e) => {
61
- let t = e.length > 0 ? e : [d];
73
+ }, ze = (e) => {
74
+ let t = e.length > 0 ? e : [f];
62
75
  return Array.from({ length: S }, (e, n) => Array.from({ length: C }, (e, r) => {
63
76
  let i = n * C + r;
64
77
  return {
65
- aspectRatio: w[(i + n) % w.length] ?? w[0],
78
+ aspectRatio: T[(i + n) % T.length] ?? T[0],
66
79
  src: t[i % t.length] ?? "data:image/svg+xml,%3csvg%20width='1600'%20height='1066'%20viewBox='0%200%201600%201066'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230F172A'/%3e%3cstop%20offset='1'%20stop-color='%23164E63'/%3e%3c/linearGradient%3e%3clinearGradient%20id='road'%20x1='0'%20y1='740'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23334155'/%3e%3cstop%20offset='1'%20stop-color='%230F172A'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20width='1600'%20height='1066'%20fill='url(%23bg)'/%3e%3cpath%20d='M0%20675C233%20555%20420%20530%20590%20551C752%20571%20930%20635%201088%20632C1252%20629%201423%20559%201600%20498V1066H0V675Z'%20fill='%231E293B'%20opacity='0.7'/%3e%3cpath%20d='M0%20792C213%20710%20393%20686%20573%20697C760%20708%20945%20760%201123%20761C1286%20762%201437%20722%201600%20666V1066H0V792Z'%20fill='url(%23road)'/%3e%3ccircle%20cx='440'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3ccircle%20cx='740'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3cpath%20d='M440%20620L560%20520L650%20620H740M560%20520L610%20445M595%20470H665'%20stroke='%23F8FAFC'%20stroke-width='18'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3ccircle%20cx='980'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3ccircle%20cx='1240'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3cpath%20d='M980%20700L1078%20616L1156%20700H1240M1078%20616L1122%20556M1112%20574H1172'%20stroke='%23E2E8F0'%20stroke-width='14'%20stroke-linecap='round'%20stroke-linejoin='round'%20opacity='0.7'/%3e%3c/svg%3e"
67
80
  };
68
81
  }));
69
82
  };
70
- function D() {
71
- let { t: d, i18n: x } = Oe(), { storeSlug: S } = Ee(), C = we(), { storefrontConfiguration: w } = se(), D = w.shop.address?.trim() ?? "", O = w.workspace?.workspaceLanguage, { bikes: k, accessories: A } = ce(), [j] = De(), Le = Te(), M = p(() => i(j, S), [j, S]), Re = p(() => t(w), [w]), N = p(() => r(w), [w]), P = p(() => E(N.start_date), [N.start_date]), ze = p(() => E(N.end_date) ?? P, [N.end_date, P]), F = w.settings.fulfillmentModes.includes("delivery"), Be = w.settings.deliveryDisabledReason.trim(), I = p(() => n(M, N), [N, M]), [L, Ve] = m(() => I.fulfillment === "delivery" && F ? "delivery" : "pickup"), [R, He] = m(() => E(M.get("start_date")) ?? P), [z, Ue] = m(() => M.get("start_time") ?? N.start_time), [B, We] = m(() => {
72
- let e = E(M.get("start_date")) ?? P;
73
- return E(M.get("end_date")) ?? e ?? ze;
74
- }), [V, Ge] = m(() => M.get("end_time") ?? N.end_time), [H, U] = m(() => I.start_address), [W, G] = m(() => I.end_address), K = xe(null), Ke = p(() => k.slice(0, 4), [k]), { heroMode: qe } = u(), Je = qe ?? w.content?.heroMode ?? "current_booking_hero", q = Je === "vertical_marquee_hero", J = Je === "booking_bar_overlay_hero" || q, Ye = Ce("(min-width: 1024px)"), Xe = ve(S), Ze = p(() => ({
83
+ function O() {
84
+ let { t: d, i18n: f } = Ae(), { storeSlug: x } = Oe(), S = Ee(), { storefrontConfiguration: C } = le(), T = C.shop.address?.trim() ?? "", O = C.workspace?.workspaceLanguage, { bikes: k, accessories: Be } = ue(), [A, Ve] = ke(), He = De(), j = p(() => a(A, x), [A, x]), Ue = p(() => n(C), [C]), M = p(() => i(C), [C]), N = p(() => D(M.start_date), [M.start_date]), We = p(() => D(M.end_date) ?? N, [M.end_date, N]), P = C.settings.fulfillmentModes.includes("delivery"), F = C.settings.deliveryDisabledReason.trim(), I = p(() => r(j, M), [M, j]), [L, Ge] = m(() => I.fulfillment === "delivery" && P ? "delivery" : "pickup"), [R, Ke] = m(() => D(j.get("start_date")) ?? N), [z, qe] = m(() => j.get("start_time") ?? M.start_time), [B, Je] = m(() => {
85
+ let e = D(j.get("start_date")) ?? N;
86
+ return D(j.get("end_date")) ?? e ?? We;
87
+ }), [V, Ye] = m(() => j.get("end_time") ?? M.end_time), [Xe, Ze] = m(void 0), [H, U] = m(() => I.start_address), [W, G] = m(() => I.end_address), K = we(null), Qe = p(() => k.slice(0, 4), [k]), { heroMode: $e } = te(), et = $e ?? C.content?.heroMode ?? "current_booking_hero", q = et === "vertical_marquee_hero", J = et === "booking_bar_overlay_hero" || q, tt = Te("(min-width: 1024px)"), nt = xe(x), rt = p(() => ({
75
88
  startDate: d("booking_start_date"),
76
89
  pickStartDate: d("booking_start_date"),
77
90
  startTime: d("booking_start_time"),
78
91
  endDate: d("booking_end_date"),
79
92
  pickEndDate: d("booking_end_date"),
80
93
  endTime: d("booking_end_time"),
81
- selectedDaysTooltip: ({ count: e }) => d("booking_selected_days_tooltip", { count: e })
82
- }), [x.language, d]), Y = p(() => {
83
- let t = R ?? P ?? /* @__PURE__ */ new Date(), n = B ?? t;
84
- return e(new URLSearchParams(), {
85
- fulfillment: L === "delivery" && F ? "delivery" : "pickup",
86
- start_date: T(t),
87
- start_time: z || N.start_time,
88
- end_date: T(n),
89
- end_time: V || N.end_time,
94
+ selectedDaysTooltip: ({ count: e }) => d("booking_selected_days_tooltip", { count: e }),
95
+ timeSlotsLoading: d("booking_time_slots_loading"),
96
+ timeSlotsUnavailable: d("booking_time_slots_unavailable"),
97
+ timeSlotsLoadError: d("booking_time_slots_load_error"),
98
+ retryTimeSlots: d("booking_time_slots_retry")
99
+ }), [f.language, d]), Y = p(() => {
100
+ let e = R ?? N ?? /* @__PURE__ */ new Date(), n = B ?? e;
101
+ return t(new URLSearchParams(), {
102
+ fulfillment: L === "delivery" && P ? "delivery" : "pickup",
103
+ start_date: E(e),
104
+ start_time: z,
105
+ end_date: E(n),
106
+ end_time: V,
90
107
  start_address: H,
91
108
  end_address: W
92
109
  });
93
110
  }, [
94
- N.end_time,
95
- N.start_time,
111
+ N,
96
112
  P,
97
- F,
98
113
  W,
99
114
  B,
100
115
  V,
@@ -102,166 +117,179 @@ function D() {
102
117
  H,
103
118
  R,
104
119
  z
105
- ]), Qe = Y.toString(), $e = Qe ? `?${Qe}` : "";
106
- be(() => {
107
- a(S, Y);
108
- }, [Y, S]);
109
- let et = {
120
+ ]), it = Y.toString(), at = it ? `?${it}` : "";
121
+ Ce(() => {
122
+ o(x, Y);
123
+ }, [Y, x]), Ce(() => {
124
+ let t = new URLSearchParams(A);
125
+ for (let n of e) t.delete(n);
126
+ for (let [e, n] of Y.entries()) t.set(e, n);
127
+ t.toString() !== A.toString() && Ve(t, { replace: !0 });
128
+ }, [
129
+ Y,
130
+ A,
131
+ Ve
132
+ ]);
133
+ let ot = `${R ? E(R) : ""}:${B ? E(B) : ""}`, st = Xe === ot && !!(z && V), ct = {
110
134
  startDate: R,
111
- onStartDateChange: He,
135
+ onStartDateChange: Ke,
112
136
  startTime: z,
113
- onStartTimeChange: Ue,
137
+ onStartTimeChange: qe,
114
138
  endDate: B,
115
- onEndDateChange: We,
139
+ onEndDateChange: Je,
116
140
  endTime: V,
117
- onEndTimeChange: Ge,
141
+ onEndTimeChange: Ye,
118
142
  onEndTimeCommit: () => {
119
143
  K.current?.focus({ preventScroll: !0 });
120
144
  },
121
- bookingPeriodConfig: Re,
122
- fetchTimeSlots: Xe,
123
- labels: Ze,
124
- localeCode: x.language
145
+ bookingPeriodConfig: Ue,
146
+ fetchTimeSlots: nt,
147
+ onTimeSlotsAvailabilityChange: (e) => {
148
+ Ze(e ? ot : void 0);
149
+ },
150
+ labels: rt,
151
+ localeCode: f.language
125
152
  }, X = () => {
126
- let e = new URLSearchParams(j);
153
+ if (!st) return;
154
+ let e = new URLSearchParams(A);
127
155
  for (let [t, n] of Y.entries()) e.set(t, n);
128
- Le(`/${S ?? ""}/booking?${e.toString()}#booking-products`);
129
- }, tt = (e) => `/${S ?? ""}/products/${e}`, Z = { backTo: `${C.pathname}${C.search}${C.hash}` }, nt = /* @__PURE__ */ g("div", { children: [
130
- /* @__PURE__ */ g("div", {
156
+ He(`/${x ?? ""}/booking?${e.toString()}#booking-products`);
157
+ }, lt = (e) => `/${x ?? ""}/products/${e}`, Z = { backTo: `${S.pathname}${S.search}${S.hash}` }, ut = /* @__PURE__ */ _("div", { children: [
158
+ /* @__PURE__ */ _("div", {
131
159
  className: "flex items-center gap-2",
132
- children: [/* @__PURE__ */ g(c, {
160
+ children: [/* @__PURE__ */ _(l, {
133
161
  variant: "secondary",
134
- children: [/* @__PURE__ */ h(ke, {
162
+ children: [/* @__PURE__ */ g(Me, {
135
163
  className: "h-3 w-3",
136
164
  "aria-hidden": "true"
137
- }), /* @__PURE__ */ h("span", { children: d("status_open") })]
138
- }), /* @__PURE__ */ g(c, {
165
+ }), /* @__PURE__ */ g("span", { children: d("status_open") })]
166
+ }), /* @__PURE__ */ _(l, {
139
167
  variant: "outline",
140
- className: _(!D && "border-destructive/40 text-destructive"),
141
- children: [/* @__PURE__ */ h(Ae, {
168
+ className: v(!T && "border-destructive/40 text-destructive"),
169
+ children: [/* @__PURE__ */ g(Ne, {
142
170
  className: "h-3 w-3",
143
171
  "aria-hidden": "true"
144
- }), /* @__PURE__ */ h("span", { children: D || "[Missing shop address]" })]
172
+ }), /* @__PURE__ */ g("span", { children: T || "[Missing shop address]" })]
145
173
  })]
146
174
  }),
147
- /* @__PURE__ */ h("h1", {
175
+ /* @__PURE__ */ g("h1", {
148
176
  className: "mt-4 text-3xl font-semibold tracking-tight sm:text-4xl",
149
- children: /* @__PURE__ */ h("span", { children: d("hero_title") })
177
+ children: /* @__PURE__ */ g("span", { children: d("hero_title") })
150
178
  }),
151
- /* @__PURE__ */ h("p", {
179
+ /* @__PURE__ */ g("p", {
152
180
  className: "mt-3 text-sm text-slate-700 sm:text-base",
153
- children: /* @__PURE__ */ h("span", { children: d("hero_description") })
181
+ children: /* @__PURE__ */ g("span", { children: d("hero_description") })
154
182
  }),
155
- /* @__PURE__ */ h("div", {
156
- className: _("mt-6", !J && "rounded-xl border bg-white/70 p-3"),
157
- children: /* @__PURE__ */ g("ul", {
158
- className: _("space-y-3", J && "space-y-2"),
183
+ /* @__PURE__ */ g("div", {
184
+ className: v("mt-6", !J && "rounded-xl border bg-white/70 p-3"),
185
+ children: /* @__PURE__ */ _("ul", {
186
+ className: v("space-y-3", J && "space-y-2"),
159
187
  "data-testid": "storefront-home-trust-features",
160
188
  children: [
161
- /* @__PURE__ */ g("li", {
189
+ /* @__PURE__ */ _("li", {
162
190
  className: "flex items-start gap-3",
163
191
  "data-testid": "storefront-secure-payment-notice",
164
- children: [/* @__PURE__ */ h(je, {
192
+ children: [/* @__PURE__ */ g(Pe, {
165
193
  className: "mt-0.5 h-5 w-5 text-success",
166
194
  "aria-hidden": "true"
167
- }), /* @__PURE__ */ g("div", {
195
+ }), /* @__PURE__ */ _("div", {
168
196
  className: "flex flex-col gap-0.5",
169
- children: [/* @__PURE__ */ h("p", {
197
+ children: [/* @__PURE__ */ g("p", {
170
198
  className: "text-sm font-medium text-slate-950",
171
- children: /* @__PURE__ */ h("span", { children: d("feature_secure_payment_title") })
172
- }), /* @__PURE__ */ h("p", {
199
+ children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_title") })
200
+ }), /* @__PURE__ */ g("p", {
173
201
  className: "text-xs text-slate-600",
174
- children: /* @__PURE__ */ h("span", { children: d("feature_secure_payment_description") })
202
+ children: /* @__PURE__ */ g("span", { children: d("feature_secure_payment_description") })
175
203
  })]
176
204
  })]
177
205
  }),
178
- /* @__PURE__ */ h(ge, {
179
- policy: w.bookingEngine.cancellationPolicy,
180
- className: _(!J && "border-t border-slate-200/70 pt-3")
206
+ /* @__PURE__ */ g(ye, {
207
+ policy: C.bookingEngine.cancellationPolicy,
208
+ className: v(!J && "border-t border-slate-200/70 pt-3")
181
209
  }),
182
- F ? /* @__PURE__ */ g("li", {
183
- className: _("flex items-start gap-3", !J && "border-t border-slate-200/70 pt-3"),
210
+ P ? /* @__PURE__ */ _("li", {
211
+ className: v("flex items-start gap-3", !J && "border-t border-slate-200/70 pt-3"),
184
212
  "data-testid": "storefront-delivery-notice",
185
- children: [/* @__PURE__ */ h(Me, {
213
+ children: [/* @__PURE__ */ g(Fe, {
186
214
  className: "mt-0.5 h-5 w-5 text-slate-900",
187
215
  "aria-hidden": "true"
188
- }), /* @__PURE__ */ g("div", {
216
+ }), /* @__PURE__ */ _("div", {
189
217
  className: "flex flex-col gap-0.5",
190
- children: [/* @__PURE__ */ h("p", {
218
+ children: [/* @__PURE__ */ g("p", {
191
219
  className: "text-sm font-medium text-slate-950",
192
- children: /* @__PURE__ */ h("span", { children: d("feature_delivery_title") })
193
- }), /* @__PURE__ */ h("p", {
220
+ children: /* @__PURE__ */ g("span", { children: d("feature_delivery_title") })
221
+ }), /* @__PURE__ */ g("p", {
194
222
  className: "text-xs text-slate-600",
195
- children: /* @__PURE__ */ h("span", { children: d("feature_delivery_description") })
223
+ children: /* @__PURE__ */ g("span", { children: d("feature_delivery_description") })
196
224
  })]
197
225
  })]
198
226
  }) : null,
199
- /* @__PURE__ */ h(_e, {
227
+ /* @__PURE__ */ g(be, {
200
228
  bikes: k,
201
- currency: w.bookingEngine.currency,
202
- className: _(!J && "border-t border-slate-200/70 pt-3")
229
+ currency: C.bookingEngine.currency,
230
+ className: v(!J && "border-t border-slate-200/70 pt-3")
203
231
  })
204
232
  ]
205
233
  })
206
234
  })
207
- ] }), Q = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ h(te, {
208
- ...et,
209
- labelClassName: Ne,
210
- inputClassName: Pe,
211
- children: /* @__PURE__ */ g("div", {
235
+ ] }), dt = ({ className: e, showSubmitButton: t = !1, submitButtonClassName: n }) => /* @__PURE__ */ g(ne, {
236
+ ...ct,
237
+ labelClassName: Ie,
238
+ inputClassName: Le,
239
+ children: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
212
240
  className: e,
213
241
  children: [
214
- /* @__PURE__ */ h("div", {
242
+ /* @__PURE__ */ g("div", {
215
243
  className: "min-w-0",
216
- children: /* @__PURE__ */ h(ne, {})
244
+ children: /* @__PURE__ */ g(re, {})
217
245
  }),
218
- /* @__PURE__ */ h(re, {}),
219
- /* @__PURE__ */ h("div", {
246
+ /* @__PURE__ */ g(ie, {}),
247
+ /* @__PURE__ */ g("div", {
220
248
  className: "min-w-0",
221
- children: /* @__PURE__ */ h(ie, {})
249
+ children: /* @__PURE__ */ g(ae, {})
222
250
  }),
223
- /* @__PURE__ */ h(ae, {}),
224
- t ? /* @__PURE__ */ g(l, {
225
- ref: K,
226
- className: _("gap-2", n),
227
- onClick: X,
228
- children: [/* @__PURE__ */ h("span", { children: d("booking_submit") }), /* @__PURE__ */ h(y, {
229
- className: "h-4 w-4",
230
- "aria-hidden": "true"
231
- })]
251
+ /* @__PURE__ */ g(oe, {}),
252
+ t ? /* @__PURE__ */ g(Re, {
253
+ buttonRef: K,
254
+ className: n,
255
+ label: d("booking_submit"),
256
+ onSubmit: X
232
257
  }) : null
233
258
  ]
234
- })
235
- }), rt = (e) => F ? /* @__PURE__ */ h(oe, {
259
+ }), /* @__PURE__ */ g(se, {
260
+ className: "mt-2",
261
+ testId: "booking-home-time-slots-status"
262
+ })] })
263
+ }), Q = (e) => P ? /* @__PURE__ */ g(ce, {
236
264
  open: L === "delivery",
237
265
  className: "sm:min-h-[6.75rem]",
238
- inputClassName: `${Pe} bg-white`,
239
- labelClassName: Ne,
266
+ inputClassName: `${Le} bg-white`,
267
+ labelClassName: Ie,
240
268
  startAddress: H,
241
269
  onStartAddressChange: U,
242
270
  returnAddress: W,
243
271
  onReturnAddressChange: G,
244
272
  testIdPrefix: e
245
- }) : null, it = rt("storefront-home-fulfillment-delivery-address"), at = rt("storefront-home-compact-fulfillment-delivery-address"), ot = /* @__PURE__ */ g(fe, {
273
+ }) : null, ft = Q("storefront-home-fulfillment-delivery-address"), pt = Q("storefront-home-compact-fulfillment-delivery-address"), mt = /* @__PURE__ */ _(me, {
246
274
  className: "border-slate-200 bg-white/80 shadow-none",
247
- children: [/* @__PURE__ */ g("div", {
275
+ children: [/* @__PURE__ */ _("div", {
248
276
  className: "border-b border-slate-200 px-4 py-4",
249
- children: [/* @__PURE__ */ h("p", {
277
+ children: [/* @__PURE__ */ g("p", {
250
278
  className: "text-sm font-semibold text-slate-950",
251
- children: /* @__PURE__ */ h("span", { children: d("booking_title") })
252
- }), /* @__PURE__ */ h("p", {
279
+ children: /* @__PURE__ */ g("span", { children: d("booking_title") })
280
+ }), /* @__PURE__ */ g("p", {
253
281
  className: "mt-1 text-xs text-slate-600",
254
- children: /* @__PURE__ */ h("span", { children: d("booking_subtitle") })
282
+ children: /* @__PURE__ */ g("span", { children: d("booking_subtitle") })
255
283
  })]
256
- }), /* @__PURE__ */ g("div", {
284
+ }), /* @__PURE__ */ _("div", {
257
285
  className: "grid gap-4 px-4 py-4",
258
286
  children: [
259
- /* @__PURE__ */ h(ye, {
287
+ /* @__PURE__ */ g(Se, {
260
288
  value: L,
261
- onValueChange: Ve,
262
- pickupAddress: D,
263
- deliveryEnabled: F,
264
- deliveryDisabledReason: Be,
289
+ onValueChange: Ge,
290
+ pickupAddress: T,
291
+ deliveryEnabled: P,
292
+ deliveryDisabledReason: F,
265
293
  startAddress: H,
266
294
  onStartAddressChange: U,
267
295
  endAddress: W,
@@ -269,34 +297,35 @@ function D() {
269
297
  showDeliveryAddressSelector: !1,
270
298
  testIdPrefix: "storefront-home-fulfillment"
271
299
  }),
272
- Q({ className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px] xl:items-start" }),
273
- it,
274
- /* @__PURE__ */ h("p", {
300
+ dt({ className: "grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px] xl:items-start" }),
301
+ ft,
302
+ /* @__PURE__ */ g("p", {
275
303
  className: "text-xs text-slate-600",
276
- children: /* @__PURE__ */ h("span", { children: d("booking_minimum_duration", { hours: 4 }) })
304
+ children: /* @__PURE__ */ g("span", { children: d("booking_minimum_duration", { hours: 4 }) })
277
305
  }),
278
- /* @__PURE__ */ g(l, {
306
+ /* @__PURE__ */ _(u, {
279
307
  ref: K,
280
308
  className: "h-11 w-fit justify-self-start rounded-xl text-sm font-semibold gap-2",
309
+ disabled: !st,
281
310
  onClick: X,
282
- children: [/* @__PURE__ */ h("span", { children: d("booking_submit") }), /* @__PURE__ */ h(y, {
311
+ children: [/* @__PURE__ */ g("span", { children: d("booking_submit") }), /* @__PURE__ */ g(b, {
283
312
  className: "h-4 w-4",
284
313
  "aria-hidden": "true"
285
314
  })]
286
315
  })
287
316
  ]
288
317
  })]
289
- }), st = /* @__PURE__ */ h(fe, {
318
+ }), ht = /* @__PURE__ */ g(me, {
290
319
  className: "border-slate-200 bg-white/95 shadow-xl",
291
- children: /* @__PURE__ */ g("div", {
320
+ children: /* @__PURE__ */ _("div", {
292
321
  className: "grid gap-3 p-4",
293
322
  children: [
294
- /* @__PURE__ */ h("div", { children: /* @__PURE__ */ h(ye, {
323
+ /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g(Se, {
295
324
  value: L,
296
- onValueChange: Ve,
297
- pickupAddress: D,
298
- deliveryEnabled: F,
299
- deliveryDisabledReason: Be,
325
+ onValueChange: Ge,
326
+ pickupAddress: T,
327
+ deliveryEnabled: P,
328
+ deliveryDisabledReason: F,
300
329
  startAddress: H,
301
330
  onStartAddressChange: U,
302
331
  endAddress: W,
@@ -304,16 +333,16 @@ function D() {
304
333
  showDeliveryAddressSelector: !1,
305
334
  testIdPrefix: "storefront-home-compact-fulfillment"
306
335
  }) }),
307
- Q({
336
+ dt({
308
337
  className: "grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px_auto] xl:items-end",
309
338
  showSubmitButton: !0,
310
339
  submitButtonClassName: "h-10 rounded-xl text-sm font-semibold xl:self-end"
311
340
  }),
312
- at
341
+ pt
313
342
  ]
314
343
  })
315
- }), $ = (w.content?.galleryImageIds ?? []).map((e) => s(e, S ?? w.storeSlug)).filter((e) => e.length > 0), ct = [...k, ...A].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12), lt = Ie($.length > 0 ? $ : ct), ut = $[0] ?? "data:image/svg+xml,%3csvg%20width='1600'%20height='1066'%20viewBox='0%200%201600%201066'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230F172A'/%3e%3cstop%20offset='1'%20stop-color='%23164E63'/%3e%3c/linearGradient%3e%3clinearGradient%20id='road'%20x1='0'%20y1='740'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23334155'/%3e%3cstop%20offset='1'%20stop-color='%230F172A'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20width='1600'%20height='1066'%20fill='url(%23bg)'/%3e%3cpath%20d='M0%20675C233%20555%20420%20530%20590%20551C752%20571%20930%20635%201088%20632C1252%20629%201423%20559%201600%20498V1066H0V675Z'%20fill='%231E293B'%20opacity='0.7'/%3e%3cpath%20d='M0%20792C213%20710%20393%20686%20573%20697C760%20708%20945%20760%201123%20761C1286%20762%201437%20722%201600%20666V1066H0V792Z'%20fill='url(%23road)'/%3e%3ccircle%20cx='440'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3ccircle%20cx='740'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3cpath%20d='M440%20620L560%20520L650%20620H740M560%20520L610%20445M595%20470H665'%20stroke='%23F8FAFC'%20stroke-width='18'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3ccircle%20cx='980'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3ccircle%20cx='1240'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3cpath%20d='M980%20700L1078%20616L1156%20700H1240M1078%20616L1122%20556M1112%20574H1172'%20stroke='%23E2E8F0'%20stroke-width='14'%20stroke-linecap='round'%20stroke-linejoin='round'%20opacity='0.7'/%3e%3c/svg%3e", dt = q ? /* @__PURE__ */ h("style", { children: "\n @keyframes storefront-hero-marquee-up {\n 0% { transform: translateY(0); }\n 100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n }\n @keyframes storefront-hero-marquee-down {\n 0% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n 100% { transform: translateY(0); }\n }\n .storefront-hero-marquee-track {\n animation: storefront-hero-marquee-up var(--storefront-hero-marquee-duration, 32s) linear infinite;\n will-change: transform;\n }\n .storefront-hero-marquee-track-reverse {\n animation-name: storefront-hero-marquee-down;\n }\n @media (prefers-reduced-motion: reduce) {\n .storefront-hero-marquee-track,\n .storefront-hero-marquee-track-reverse {\n animation: none !important;\n transform: none !important;\n }\n }\n " }) : null, ft = (e) => /* @__PURE__ */ h("div", {
316
- className: _("relative h-full min-h-[340px] overflow-hidden", e),
344
+ }), $ = (C.content?.galleryImageIds ?? []).map((e) => c(e, x ?? C.storeSlug)).filter((e) => e.length > 0), gt = [...k, ...Be].flatMap((e) => Array.isArray(e.images) ? e.images : []).filter((e) => typeof e == "string" && e.trim().length > 0).map((e) => e.trim()).slice(0, 12), _t = ze($.length > 0 ? $ : gt), vt = $[0] ?? "data:image/svg+xml,%3csvg%20width='1600'%20height='1066'%20viewBox='0%200%201600%201066'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdefs%3e%3clinearGradient%20id='bg'%20x1='0'%20y1='0'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%230F172A'/%3e%3cstop%20offset='1'%20stop-color='%23164E63'/%3e%3c/linearGradient%3e%3clinearGradient%20id='road'%20x1='0'%20y1='740'%20x2='1600'%20y2='1066'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23334155'/%3e%3cstop%20offset='1'%20stop-color='%230F172A'/%3e%3c/linearGradient%3e%3c/defs%3e%3crect%20width='1600'%20height='1066'%20fill='url(%23bg)'/%3e%3cpath%20d='M0%20675C233%20555%20420%20530%20590%20551C752%20571%20930%20635%201088%20632C1252%20629%201423%20559%201600%20498V1066H0V675Z'%20fill='%231E293B'%20opacity='0.7'/%3e%3cpath%20d='M0%20792C213%20710%20393%20686%20573%20697C760%20708%20945%20760%201123%20761C1286%20762%201437%20722%201600%20666V1066H0V792Z'%20fill='url(%23road)'/%3e%3ccircle%20cx='440'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3ccircle%20cx='740'%20cy='620'%20r='92'%20stroke='%23F8FAFC'%20stroke-width='18'%20opacity='0.8'/%3e%3cpath%20d='M440%20620L560%20520L650%20620H740M560%20520L610%20445M595%20470H665'%20stroke='%23F8FAFC'%20stroke-width='18'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3ccircle%20cx='980'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3ccircle%20cx='1240'%20cy='700'%20r='80'%20stroke='%23E2E8F0'%20stroke-width='14'%20opacity='0.7'/%3e%3cpath%20d='M980%20700L1078%20616L1156%20700H1240M1078%20616L1122%20556M1112%20574H1172'%20stroke='%23E2E8F0'%20stroke-width='14'%20stroke-linecap='round'%20stroke-linejoin='round'%20opacity='0.7'/%3e%3c/svg%3e", yt = q ? /* @__PURE__ */ g("style", { children: "\n @keyframes storefront-hero-marquee-up {\n 0% { transform: translateY(0); }\n 100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n }\n @keyframes storefront-hero-marquee-down {\n 0% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }\n 100% { transform: translateY(0); }\n }\n .storefront-hero-marquee-track {\n animation: storefront-hero-marquee-up var(--storefront-hero-marquee-duration, 32s) linear infinite;\n will-change: transform;\n }\n .storefront-hero-marquee-track-reverse {\n animation-name: storefront-hero-marquee-down;\n }\n @media (prefers-reduced-motion: reduce) {\n .storefront-hero-marquee-track,\n .storefront-hero-marquee-track-reverse {\n animation: none !important;\n transform: none !important;\n }\n }\n " }) : null, bt = (e) => /* @__PURE__ */ g("div", {
345
+ className: v("relative h-full min-h-[340px] overflow-hidden", e),
317
346
  style: {
318
347
  WebkitMaskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
319
348
  maskImage: "linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%)",
@@ -323,194 +352,194 @@ function D() {
323
352
  maskSize: "100% 100%"
324
353
  },
325
354
  "aria-hidden": "true",
326
- children: /* @__PURE__ */ h("div", {
355
+ children: /* @__PURE__ */ g("div", {
327
356
  className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6",
328
- children: lt.map((e, t) => {
329
- let n = Fe[t % Fe.length] ?? 32, r = [...e, ...e];
330
- return /* @__PURE__ */ h("div", {
331
- className: _("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
332
- children: /* @__PURE__ */ h("div", {
333
- className: _("storefront-hero-marquee-track flex flex-col gap-[var(--storefront-hero-marquee-gap)]", t % 2 == 1 && "storefront-hero-marquee-track-reverse"),
357
+ children: _t.map((e, t) => {
358
+ let n = w[t % w.length] ?? 32, r = [...e, ...e];
359
+ return /* @__PURE__ */ g("div", {
360
+ className: v("relative min-h-0 overflow-hidden", t === 2 && "hidden md:block", t >= 3 && "hidden lg:block"),
361
+ children: /* @__PURE__ */ g("div", {
362
+ className: v("storefront-hero-marquee-track flex flex-col gap-[var(--storefront-hero-marquee-gap)]", t % 2 == 1 && "storefront-hero-marquee-track-reverse"),
334
363
  style: {
335
364
  "--storefront-hero-marquee-duration": `${n}s`,
336
365
  "--storefront-hero-marquee-gap": "0.75rem"
337
366
  },
338
- children: r.map((n, r) => /* @__PURE__ */ g("div", {
367
+ children: r.map((n, r) => /* @__PURE__ */ _("div", {
339
368
  className: "group relative overflow-hidden rounded-[1.35rem] border border-white/40 bg-transparent",
340
369
  style: { aspectRatio: n.aspectRatio },
341
370
  children: [
342
- /* @__PURE__ */ h("div", { className: "absolute inset-0 bg-linear-to-b from-white/22 via-transparent to-transparent" }),
343
- /* @__PURE__ */ h("img", {
371
+ /* @__PURE__ */ g("div", { className: "absolute inset-0 bg-linear-to-b from-white/22 via-transparent to-transparent" }),
372
+ /* @__PURE__ */ g("img", {
344
373
  src: n.src,
345
374
  alt: "",
346
375
  className: "absolute inset-0 h-full w-full object-cover opacity-90 saturate-[1.05] transition-transform duration-700 group-hover:scale-[1.04]",
347
376
  loading: r < e.length ? "eager" : "lazy"
348
377
  }),
349
- /* @__PURE__ */ h("div", { className: "absolute inset-0 bg-linear-to-t from-slate-950/40 via-slate-950/10 to-white/10" })
378
+ /* @__PURE__ */ g("div", { className: "absolute inset-0 bg-linear-to-t from-slate-950/40 via-slate-950/10 to-white/10" })
350
379
  ]
351
380
  }, `hero-marquee-tile-${t}-${r}`))
352
381
  })
353
382
  }, `hero-marquee-column-${t}`);
354
383
  })
355
384
  })
356
- }), pt = q ? /* @__PURE__ */ h("div", {
385
+ }), xt = q ? /* @__PURE__ */ g("div", {
357
386
  className: "pointer-events-none absolute inset-0 hidden lg:block",
358
387
  "aria-hidden": "true",
359
- children: /* @__PURE__ */ g("div", {
388
+ children: /* @__PURE__ */ _("div", {
360
389
  className: "mx-auto grid h-full max-w-7xl grid-cols-12 gap-8 px-4 sm:px-6",
361
- children: [/* @__PURE__ */ h("div", { className: "lg:col-span-5" }), /* @__PURE__ */ h("div", {
390
+ children: [/* @__PURE__ */ g("div", { className: "lg:col-span-5" }), /* @__PURE__ */ g("div", {
362
391
  className: "lg:col-span-7",
363
- children: ft()
392
+ children: bt()
364
393
  })]
365
394
  })
366
- }) : null, mt = q ? /* @__PURE__ */ g(Se, { children: [/* @__PURE__ */ h("div", {
395
+ }) : null, St = q ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
367
396
  className: "lg:hidden",
368
- children: ft()
369
- }), /* @__PURE__ */ h("div", {
397
+ children: bt()
398
+ }), /* @__PURE__ */ g("div", {
370
399
  className: "hidden min-h-[510px] lg:block",
371
400
  "aria-hidden": "true"
372
- })] }) : /* @__PURE__ */ g("div", {
401
+ })] }) : /* @__PURE__ */ _("div", {
373
402
  className: "relative min-h-[340px] overflow-hidden rounded-3xl border border-slate-200 bg-slate-900 shadow-sm lg:min-h-[510px]",
374
- children: [/* @__PURE__ */ h("img", {
375
- src: ut,
403
+ children: [/* @__PURE__ */ g("img", {
404
+ src: vt,
376
405
  alt: "",
377
406
  className: "absolute inset-0 h-full w-full object-cover",
378
407
  "aria-hidden": "true"
379
- }), /* @__PURE__ */ h("div", {
408
+ }), /* @__PURE__ */ g("div", {
380
409
  className: "absolute inset-0 bg-linear-to-t from-slate-900/45 via-slate-900/15 to-transparent",
381
410
  "aria-hidden": "true"
382
411
  })]
383
412
  });
384
- return /* @__PURE__ */ g(Se, { children: [
385
- /* @__PURE__ */ g("section", {
413
+ return /* @__PURE__ */ _(h, { children: [
414
+ /* @__PURE__ */ _("section", {
386
415
  className: "relative overflow-hidden border-b border-slate-200",
387
416
  children: [
388
- /* @__PURE__ */ h("div", {
417
+ /* @__PURE__ */ g("div", {
389
418
  className: "absolute inset-0 bg-linear-to-b from-slate-50 to-white",
390
419
  "aria-hidden": "true"
391
420
  }),
392
- /* @__PURE__ */ h("div", {
421
+ /* @__PURE__ */ g("div", {
393
422
  className: "absolute inset-0 opacity-[0.07]",
394
423
  style: { backgroundImage: "radial-gradient(circle at 20% 20%, rgba(15, 23, 42, 0.9) 0px, transparent 55%), radial-gradient(circle at 80% 35%, rgba(14, 116, 144, 0.9) 0px, transparent 55%), radial-gradient(circle at 55% 85%, rgba(99, 102, 241, 0.9) 0px, transparent 55%)" },
395
424
  "aria-hidden": "true"
396
425
  }),
397
- dt,
398
- pt,
399
- J ? /* @__PURE__ */ g("div", {
426
+ yt,
427
+ xt,
428
+ J ? /* @__PURE__ */ _("div", {
400
429
  className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14",
401
- children: [/* @__PURE__ */ g("div", {
430
+ children: [/* @__PURE__ */ _("div", {
402
431
  className: "lg:col-span-5",
403
- children: [nt, Ye ? /* @__PURE__ */ h("div", {
432
+ children: [ut, tt ? /* @__PURE__ */ g("div", {
404
433
  className: "mt-7",
405
- children: /* @__PURE__ */ h("div", {
434
+ children: /* @__PURE__ */ g("div", {
406
435
  className: "relative z-20 w-[calc(100%+24rem)] max-w-none",
407
- children: st
436
+ children: ht
408
437
  })
409
438
  }) : null]
410
- }), /* @__PURE__ */ g("div", {
411
- className: _("lg:col-span-7", !q && "lg:pt-4"),
412
- children: [mt, Ye ? null : /* @__PURE__ */ h("div", {
439
+ }), /* @__PURE__ */ _("div", {
440
+ className: v("lg:col-span-7", !q && "lg:pt-4"),
441
+ children: [St, tt ? null : /* @__PURE__ */ g("div", {
413
442
  className: "mt-4",
414
- children: st
443
+ children: ht
415
444
  })]
416
445
  })]
417
- }) : /* @__PURE__ */ g("div", {
446
+ }) : /* @__PURE__ */ _("div", {
418
447
  className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:items-center lg:py-14",
419
- children: [/* @__PURE__ */ h("div", {
448
+ children: [/* @__PURE__ */ g("div", {
420
449
  className: "lg:col-span-5",
421
- children: nt
422
- }), /* @__PURE__ */ h("div", {
450
+ children: ut
451
+ }), /* @__PURE__ */ g("div", {
423
452
  className: "lg:col-span-7",
424
- children: ot
453
+ children: mt
425
454
  })]
426
455
  })
427
456
  ]
428
457
  }),
429
- /* @__PURE__ */ g("section", {
458
+ /* @__PURE__ */ _("section", {
430
459
  id: "featured",
431
460
  className: "mx-auto max-w-7xl scroll-mt-16 px-4 py-10 sm:scroll-mt-20 sm:px-6",
432
- children: [/* @__PURE__ */ g("div", {
461
+ children: [/* @__PURE__ */ _("div", {
433
462
  className: "flex items-center justify-between gap-3",
434
- children: [/* @__PURE__ */ g("div", {
463
+ children: [/* @__PURE__ */ _("div", {
435
464
  className: "space-y-1",
436
- children: [/* @__PURE__ */ h("h2", {
465
+ children: [/* @__PURE__ */ g("h2", {
437
466
  className: "text-xl font-semibold tracking-tight",
438
- children: /* @__PURE__ */ h("span", { children: d("featured_title") })
439
- }), /* @__PURE__ */ h("p", {
467
+ children: /* @__PURE__ */ g("span", { children: d("featured_title") })
468
+ }), /* @__PURE__ */ g("p", {
440
469
  className: "text-sm text-slate-600",
441
- children: /* @__PURE__ */ h("span", { children: d("featured_description") })
470
+ children: /* @__PURE__ */ g("span", { children: d("featured_description") })
442
471
  })]
443
- }), /* @__PURE__ */ g(v, {
472
+ }), /* @__PURE__ */ _(y, {
444
473
  className: "hidden items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950 sm:inline-flex",
445
- to: `/${S ?? ""}/booking${$e}`,
446
- children: [/* @__PURE__ */ h("span", { children: d("featured_view_all") }), /* @__PURE__ */ h(y, {
474
+ to: `/${x ?? ""}/booking${at}`,
475
+ children: [/* @__PURE__ */ g("span", { children: d("featured_view_all") }), /* @__PURE__ */ g(b, {
447
476
  className: "h-4 w-4",
448
477
  "aria-hidden": "true"
449
478
  })]
450
479
  })]
451
- }), /* @__PURE__ */ h("div", {
480
+ }), /* @__PURE__ */ g("div", {
452
481
  className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
453
- children: Ke.map((e) => {
454
- let t = e.id, n = e.slug, r = o(e.name, x.language, O), i = o(e.description, x.language, O), a = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", s = f(e.primaryImageStyle), l = ee(e.availabilityStatus), u = tt(n);
455
- return /* @__PURE__ */ g("div", {
482
+ children: Qe.map((e) => {
483
+ let t = e.id, n = e.slug, r = s(e.name, f.language, O), i = s(e.description, f.language, O), a = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", o = _e(e.primaryImageStyle), c = ee(e.availabilityStatus), u = lt(n);
484
+ return /* @__PURE__ */ _("div", {
456
485
  className: "group flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 text-left shadow-sm transition hover:border-slate-400",
457
486
  children: [
458
- /* @__PURE__ */ h(v, {
487
+ /* @__PURE__ */ g(y, {
459
488
  to: u,
460
489
  state: Z,
461
490
  className: "block",
462
- children: /* @__PURE__ */ h("span", {
463
- className: _("relative block aspect-[1618/1000] overflow-hidden rounded-xl", s.className),
464
- style: s.style,
465
- children: a ? /* @__PURE__ */ h("img", {
491
+ children: /* @__PURE__ */ g("span", {
492
+ className: v("relative block aspect-[1618/1000] overflow-hidden rounded-xl", o.className),
493
+ style: o.style,
494
+ children: a ? /* @__PURE__ */ g("img", {
466
495
  src: a,
467
496
  alt: r,
468
497
  className: "absolute inset-0 h-full w-full object-contain p-1",
469
498
  loading: "lazy"
470
- }) : /* @__PURE__ */ h("span", {
499
+ }) : /* @__PURE__ */ g("span", {
471
500
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
472
- children: /* @__PURE__ */ h(b, {
501
+ children: /* @__PURE__ */ g(je, {
473
502
  className: "h-8 w-8",
474
503
  "aria-hidden": "true"
475
504
  })
476
505
  })
477
506
  })
478
507
  }),
479
- /* @__PURE__ */ g("span", {
508
+ /* @__PURE__ */ _("span", {
480
509
  className: "flex flex-1 flex-col gap-1",
481
510
  children: [
482
- /* @__PURE__ */ h(v, {
511
+ /* @__PURE__ */ g(y, {
483
512
  to: u,
484
513
  state: Z,
485
514
  className: "text-sm font-semibold text-slate-950 hover:text-slate-700",
486
- children: /* @__PURE__ */ h("span", { children: r })
515
+ children: /* @__PURE__ */ g("span", { children: r })
487
516
  }),
488
- /* @__PURE__ */ h(me, {
517
+ /* @__PURE__ */ g(ge, {
489
518
  prices: e.prices,
490
519
  className: "self-start"
491
520
  }),
492
- /* @__PURE__ */ h("span", {
521
+ /* @__PURE__ */ g("span", {
493
522
  className: "line-clamp-2 text-xs text-slate-600",
494
523
  children: i
495
524
  })
496
525
  ]
497
526
  }),
498
- /* @__PURE__ */ g("span", {
527
+ /* @__PURE__ */ _("span", {
499
528
  className: "flex flex-wrap items-center gap-x-2 gap-y-1",
500
529
  children: [
501
- /* @__PURE__ */ h(c, {
502
- variant: l.variant,
503
- children: /* @__PURE__ */ h("span", { children: d(l.labelKey) })
530
+ /* @__PURE__ */ g(l, {
531
+ variant: c.variant,
532
+ children: /* @__PURE__ */ g("span", { children: d(c.labelKey) })
504
533
  }),
505
- /* @__PURE__ */ h("span", {
534
+ /* @__PURE__ */ g("span", {
506
535
  className: "text-slate-400",
507
536
  children: "·"
508
537
  }),
509
- /* @__PURE__ */ h(v, {
538
+ /* @__PURE__ */ g(y, {
510
539
  to: u,
511
540
  state: Z,
512
541
  className: "text-xs font-medium text-slate-700 hover:text-slate-950",
513
- children: /* @__PURE__ */ h("span", { children: d("product_details_link") })
542
+ children: /* @__PURE__ */ g("span", { children: d("product_details_link") })
514
543
  })
515
544
  ]
516
545
  })
@@ -519,28 +548,28 @@ function D() {
519
548
  })
520
549
  })]
521
550
  }),
522
- /* @__PURE__ */ h("section", {
551
+ /* @__PURE__ */ g("section", {
523
552
  id: "products",
524
553
  className: "border-t bg-slate-50/60 scroll-mt-16 sm:scroll-mt-20",
525
- children: /* @__PURE__ */ g("div", {
554
+ children: /* @__PURE__ */ _("div", {
526
555
  className: "mx-auto max-w-7xl px-4 py-10 sm:px-6",
527
- children: [/* @__PURE__ */ h("div", {
556
+ children: [/* @__PURE__ */ g("div", {
528
557
  className: "flex flex-col gap-3 sm:flex-row sm:items-end sm:justify-between",
529
- children: /* @__PURE__ */ g("div", {
558
+ children: /* @__PURE__ */ _("div", {
530
559
  className: "space-y-1",
531
- children: [/* @__PURE__ */ h("h2", {
560
+ children: [/* @__PURE__ */ g("h2", {
532
561
  className: "text-xl font-semibold tracking-tight",
533
- children: /* @__PURE__ */ h("span", { children: d("products_title") })
534
- }), /* @__PURE__ */ h("p", {
562
+ children: /* @__PURE__ */ g("span", { children: d("products_title") })
563
+ }), /* @__PURE__ */ g("p", {
535
564
  className: "text-sm text-slate-600",
536
- children: /* @__PURE__ */ h("span", { children: d("products_description") })
565
+ children: /* @__PURE__ */ g("span", { children: d("products_description") })
537
566
  })]
538
567
  })
539
- }), /* @__PURE__ */ h("div", {
568
+ }), /* @__PURE__ */ g("div", {
540
569
  className: "mt-6 grid gap-4 md:grid-cols-2",
541
- children: k.map((e) => /* @__PURE__ */ h(he, {
570
+ children: k.map((e) => /* @__PURE__ */ g(ve, {
542
571
  bike: e,
543
- detailsPath: tt(e.slug),
572
+ detailsPath: lt(e.slug),
544
573
  productDetailsLinkState: Z,
545
574
  fallbackLanguage: O,
546
575
  onAction: X
@@ -548,73 +577,73 @@ function D() {
548
577
  })]
549
578
  })
550
579
  }),
551
- /* @__PURE__ */ g("section", {
580
+ /* @__PURE__ */ _("section", {
552
581
  className: "mx-auto max-w-7xl px-4 py-10 sm:px-6",
553
- children: [/* @__PURE__ */ h("div", {
582
+ children: [/* @__PURE__ */ g("div", {
554
583
  className: "flex flex-col gap-2 sm:flex-row sm:items-end sm:justify-between",
555
- children: /* @__PURE__ */ g("div", {
584
+ children: /* @__PURE__ */ _("div", {
556
585
  className: "space-y-1",
557
- children: [/* @__PURE__ */ h("h2", {
586
+ children: [/* @__PURE__ */ g("h2", {
558
587
  className: "text-xl font-semibold tracking-tight",
559
- children: /* @__PURE__ */ h("span", { children: d("accessories_title") })
560
- }), /* @__PURE__ */ h("p", {
588
+ children: /* @__PURE__ */ g("span", { children: d("accessories_title") })
589
+ }), /* @__PURE__ */ g("p", {
561
590
  className: "text-sm text-slate-600",
562
- children: /* @__PURE__ */ h("span", { children: d("accessories_description") })
591
+ children: /* @__PURE__ */ g("span", { children: d("accessories_description") })
563
592
  })]
564
593
  })
565
- }), /* @__PURE__ */ h("div", {
594
+ }), /* @__PURE__ */ g("div", {
566
595
  className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
567
- children: A.slice(0, 4).map((e) => {
568
- let t = o(e.name, x.language, O), n = o(e.description, x.language, O), r = o(e.warning, x.language, O), i = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", a = f(e.primaryImageStyle);
569
- return /* @__PURE__ */ g("div", {
596
+ children: Be.slice(0, 4).map((e) => {
597
+ let t = s(e.name, f.language, O), n = s(e.description, f.language, O), r = s(e.warning, f.language, O), i = typeof e.images?.[0] == "string" ? e.images[0].trim() : "", a = _e(e.primaryImageStyle);
598
+ return /* @__PURE__ */ _("div", {
570
599
  className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm",
571
600
  children: [
572
- /* @__PURE__ */ h("div", {
573
- className: _("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
601
+ /* @__PURE__ */ g("div", {
602
+ className: v("relative aspect-[1618/1000] overflow-hidden rounded-xl", a.className),
574
603
  style: a.style,
575
- children: i ? /* @__PURE__ */ h("img", {
604
+ children: i ? /* @__PURE__ */ g("img", {
576
605
  src: i,
577
606
  alt: t,
578
607
  className: "absolute inset-0 h-full w-full object-contain p-1",
579
608
  loading: "lazy"
580
- }) : /* @__PURE__ */ h("div", {
609
+ }) : /* @__PURE__ */ g("div", {
581
610
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
582
- children: /* @__PURE__ */ h(b, {
611
+ children: /* @__PURE__ */ g(je, {
583
612
  className: "h-8 w-8",
584
613
  "aria-hidden": "true"
585
614
  })
586
615
  })
587
616
  }),
588
- /* @__PURE__ */ g("div", {
617
+ /* @__PURE__ */ _("div", {
589
618
  className: "flex flex-1 flex-col gap-1",
590
619
  children: [
591
- /* @__PURE__ */ h("p", {
620
+ /* @__PURE__ */ g("p", {
592
621
  className: "text-sm font-semibold text-slate-950",
593
- children: /* @__PURE__ */ h("span", { children: t })
622
+ children: /* @__PURE__ */ g("span", { children: t })
594
623
  }),
595
- /* @__PURE__ */ h("p", {
624
+ /* @__PURE__ */ g("p", {
596
625
  className: "line-clamp-2 text-xs text-slate-600",
597
- children: /* @__PURE__ */ h("span", { children: n })
626
+ children: /* @__PURE__ */ g("span", { children: n })
598
627
  }),
599
- /* @__PURE__ */ h(pe, {
628
+ /* @__PURE__ */ g(he, {
600
629
  warning: r,
601
630
  className: "mt-1"
602
631
  })
603
632
  ]
604
633
  }),
605
- /* @__PURE__ */ h("div", {
634
+ /* @__PURE__ */ g("div", {
606
635
  className: "flex items-center justify-between gap-2",
607
- children: /* @__PURE__ */ h(me, { prices: e.prices })
636
+ children: /* @__PURE__ */ g(ge, { prices: e.prices })
608
637
  })
609
638
  ]
610
639
  }, e.id);
611
640
  })
612
641
  })]
613
642
  }),
614
- /* @__PURE__ */ h(de, {}),
615
- /* @__PURE__ */ h(ue, {}),
616
- /* @__PURE__ */ h(le, { storeSlug: S ?? "" })
643
+ /* @__PURE__ */ g(pe, {}),
644
+ /* @__PURE__ */ g(fe, {}),
645
+ /* @__PURE__ */ g(de, { storeSlug: x ?? "" })
617
646
  ] });
618
647
  }
619
648
  //#endregion
620
- export { D as default };
649
+ export { O as default };