@loczer/storefront-sdk 0.165.0 → 0.167.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.
- package/dist/components/BikeProductCard/index.d.ts.map +1 -1
- package/dist/components/BikeProductCard/index.js +40 -45
- package/dist/components/ContactSection/index.d.ts.map +1 -1
- package/dist/components/ContactSection/index.js +73 -98
- package/dist/components/DelayedReveal/index.js +1 -1
- package/dist/components/Footer/index.d.ts +2 -1
- package/dist/components/Footer/index.d.ts.map +1 -1
- package/dist/components/Footer/index.js +38 -48
- package/dist/components/Header/index.d.ts +2 -1
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +56 -63
- package/dist/components/Layout/index.d.ts.map +1 -1
- package/dist/components/Layout/index.js +35 -26
- package/dist/components/StorefrontCancellationPolicyNotice/index.js +2 -2
- package/dist/i18n/en.d.ts +2 -4
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +5 -7
- package/dist/i18n/fr.d.ts +2 -4
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +5 -7
- package/dist/index.d.ts +8 -10
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPage.js +171 -179
- package/dist/pages/CheckoutPaymentPage.d.ts.map +1 -1
- package/dist/pages/CheckoutPaymentPage.js +124 -145
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/HomePage.js +186 -174
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
package/dist/pages/HomePage.js
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e, Fragment as
|
|
2
|
-
import { useMemo as h, useState as b, useRef as
|
|
3
|
-
import { useMediaQuery as
|
|
4
|
-
import { useParams as
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as h, useState as b, useRef as Ue, useEffect as je } from "react";
|
|
3
|
+
import { useMediaQuery as Ve } from "@rpcbase/client";
|
|
4
|
+
import { useParams as ze, useLocation as Ye, useSearchParams as Qe, useNavigate as We, Link as M } from "@rpcbase/router";
|
|
5
5
|
import { cn as m } from "@rpcbase/ui";
|
|
6
|
-
import { Clock as
|
|
7
|
-
import { useTranslation as
|
|
6
|
+
import { Clock as Ke, MapPin as Ge, ShieldCheck as Je, Umbrella as Xe, Truck as Ze, ArrowRight as z, Bike as de } from "lucide-react";
|
|
7
|
+
import { useTranslation as et } from "react-i18next";
|
|
8
8
|
import W from "../chunks/assets/playground-hero-preview.svg-DNbSwXV5.js";
|
|
9
|
-
import { getAvailabilityVariant as
|
|
10
|
-
import { getStorefrontPreset as
|
|
9
|
+
import { getAvailabilityVariant as tt } from "../lib/utils.js";
|
|
10
|
+
import { getStorefrontPreset as at } from "../data/config.js";
|
|
11
11
|
import { getLocalizedValue as A } from "../localization.js";
|
|
12
|
-
import { AboutSection as
|
|
13
|
-
import { BikeProductCard as
|
|
14
|
-
import { ContactSection as
|
|
15
|
-
import { ProductPriceBadge as
|
|
16
|
-
import { ProductWarningNotice as
|
|
17
|
-
import { resolveStorefrontCancellationPolicyTeaserTier as nt, StorefrontCancellationPolicyNotice as
|
|
18
|
-
import { TestimonialsSection as
|
|
19
|
-
import { BookingPeriodProvider as
|
|
20
|
-
import { BookingStartDateField as
|
|
21
|
-
import { BookingStartTimeField as
|
|
22
|
-
import { BookingEndDateField as
|
|
23
|
-
import { BookingEndTimeField as
|
|
12
|
+
import { AboutSection as rt } from "../components/AboutSection/index.js";
|
|
13
|
+
import { BikeProductCard as st } from "../components/BikeProductCard/index.js";
|
|
14
|
+
import { ContactSection as it } from "../components/ContactSection/index.js";
|
|
15
|
+
import { ProductPriceBadge as ce } from "../components/ProductPriceBadge/index.js";
|
|
16
|
+
import { ProductWarningNotice as lt } from "../components/ProductWarningNotice/index.js";
|
|
17
|
+
import { resolveStorefrontCancellationPolicyTeaserTier as nt, StorefrontCancellationPolicyNotice as ot } from "../components/StorefrontCancellationPolicyNotice/index.js";
|
|
18
|
+
import { TestimonialsSection as dt } from "../components/TestimonialsSection/index.js";
|
|
19
|
+
import { BookingPeriodProvider as ct } from "../components/BookingPeriodSelector/BookingPeriodContext.js";
|
|
20
|
+
import { BookingStartDateField as mt } from "../components/BookingPeriodSelector/components/BookingStartDateField.js";
|
|
21
|
+
import { BookingStartTimeField as ht } from "../components/BookingPeriodSelector/components/BookingStartTimeField.js";
|
|
22
|
+
import { BookingEndDateField as pt } from "../components/BookingPeriodSelector/components/BookingEndDateField.js";
|
|
23
|
+
import { BookingEndTimeField as gt } from "../components/BookingPeriodSelector/components/BookingEndTimeField.js";
|
|
24
24
|
import "../components/BookingPeriodSelector/components/BookingMobileDateDrawer.js";
|
|
25
25
|
import { Badge as Y } from "../ui/badge.js";
|
|
26
|
-
import { Button as
|
|
27
|
-
import { Card as
|
|
28
|
-
import { resolveBookingSearchParamsFromSessionStorage as
|
|
29
|
-
import { createStorefrontTimeSlotsFetcher as
|
|
30
|
-
import { resolveProductImageContainerStyle as
|
|
31
|
-
import { usePlaygroundDevSettings as
|
|
32
|
-
import { useStorefront as
|
|
33
|
-
import { FulfillmentSection as
|
|
34
|
-
import { DeliveryAddressSelector as
|
|
35
|
-
const
|
|
26
|
+
import { Button as me } from "../ui/button.js";
|
|
27
|
+
import { Card as he } from "../ui/card.js";
|
|
28
|
+
import { resolveBookingSearchParamsFromSessionStorage as ut, createBookingPeriodConfigFromStorefrontConfiguration as ft, getDefaultBookingParamsForStorefrontConfiguration as xt, getBookingParamsFromSearch as vt, applyBookingParamsToSearch as bt, writeBookingSearchParamsToSessionStorage as Nt } from "../lib/booking.js";
|
|
29
|
+
import { createStorefrontTimeSlotsFetcher as _t } from "../lib/fetchStorefrontTimeSlots.js";
|
|
30
|
+
import { resolveProductImageContainerStyle as pe } from "../lib/productImageStyles.js";
|
|
31
|
+
import { usePlaygroundDevSettings as kt } from "../lib/playgroundDevSettings.js";
|
|
32
|
+
import { useStorefront as yt, useStorefrontProducts as wt } from "../StorefrontProvider.js";
|
|
33
|
+
import { FulfillmentSection as ge } from "../components/FulfillmentSection/index.js";
|
|
34
|
+
import { DeliveryAddressSelector as St } from "../components/DeliveryAddressSelector/index.js";
|
|
35
|
+
const ue = (a) => String(a).padStart(2, "0"), fe = "text-2xs font-semibold uppercase tracking-wide text-slate-600", xe = "h-10", Pt = 6, ve = 5, be = [15, 25, 42, 66, 33, 54], Q = ["4 / 5", "1 / 1", "3 / 4", "5 / 4", "7 / 9", "4 / 3", "9 / 16", "6 / 7"], Ne = (a) => `${a.getFullYear()}-${ue(a.getMonth() + 1)}-${ue(a.getDate())}`, E = (a) => {
|
|
36
36
|
if (!a)
|
|
37
37
|
return;
|
|
38
38
|
const i = a.match(/^(\d{4})-(\d{2})-(\d{2})$/);
|
|
39
39
|
if (!i)
|
|
40
40
|
return;
|
|
41
|
-
const
|
|
42
|
-
if (!(Number.isNaN(o.getTime()) || o.getFullYear() !==
|
|
41
|
+
const l = Number(i[1]), p = Number(i[2]), d = Number(i[3]), o = new Date(l, p - 1, d);
|
|
42
|
+
if (!(Number.isNaN(o.getTime()) || o.getFullYear() !== l || o.getMonth() !== p - 1 || o.getDate() !== d))
|
|
43
43
|
return o;
|
|
44
44
|
}, Ct = (a) => {
|
|
45
45
|
const i = a.length > 0 ? a : [W];
|
|
46
|
-
return Array.from({ length:
|
|
47
|
-
const u = p *
|
|
46
|
+
return Array.from({ length: Pt }, (l, p) => Array.from({ length: ve }, (d, o) => {
|
|
47
|
+
const u = p * ve + o;
|
|
48
48
|
return {
|
|
49
49
|
aspectRatio: Q[(u + p) % Q.length] ?? Q[0],
|
|
50
50
|
src: i[u % i.length] ?? W
|
|
51
51
|
};
|
|
52
52
|
}));
|
|
53
53
|
};
|
|
54
|
-
function
|
|
55
|
-
const { t: a, i18n: i } =
|
|
56
|
-
() =>
|
|
57
|
-
[
|
|
58
|
-
), x = h(() =>
|
|
59
|
-
() =>
|
|
54
|
+
function da() {
|
|
55
|
+
const { t: a, i18n: i } = et(), { storeSlug: l } = ze(), p = Ye(), { storefrontConfiguration: d } = yt(), o = d.workspace?.workspaceLanguage, { bikes: u, accessories: K } = wt(), [R] = Qe(), _e = We(), f = h(
|
|
56
|
+
() => ut(R, l),
|
|
57
|
+
[R, l]
|
|
58
|
+
), x = h(() => at(l), [l]), ke = h(
|
|
59
|
+
() => ft(d),
|
|
60
60
|
[d]
|
|
61
61
|
), c = h(
|
|
62
|
-
() =>
|
|
62
|
+
() => xt(d),
|
|
63
63
|
[d]
|
|
64
|
-
), N = h(() => E(c.start_date), [c.start_date]),
|
|
64
|
+
), N = h(() => E(c.start_date), [c.start_date]), ye = h(
|
|
65
65
|
() => E(c.end_date) ?? N,
|
|
66
66
|
[c.end_date, N]
|
|
67
|
-
), v = d.settings.fulfillmentModes.includes("delivery"), G = d.settings.deliveryDisabledReason.trim(),
|
|
68
|
-
() =>
|
|
67
|
+
), v = d.settings.fulfillmentModes.includes("delivery"), G = d.settings.deliveryDisabledReason.trim(), we = !!nt(d.bookingEngine.cancellationPolicy), q = h(
|
|
68
|
+
() => vt(f, c),
|
|
69
69
|
[c, f]
|
|
70
70
|
), [w, J] = b(
|
|
71
|
-
() =>
|
|
72
|
-
), [
|
|
71
|
+
() => q.fulfillment === "delivery" && v ? "delivery" : "pickup"
|
|
72
|
+
), [L, Se] = b(
|
|
73
73
|
() => E(f.get("start_date")) ?? N
|
|
74
|
-
), [
|
|
74
|
+
), [F, Pe] = b(() => f.get("start_time") ?? c.start_time), [O, Ce] = b(() => {
|
|
75
75
|
const t = E(f.get("start_date")) ?? N;
|
|
76
|
-
return E(f.get("end_date")) ?? t ??
|
|
77
|
-
}), [
|
|
76
|
+
return E(f.get("end_date")) ?? t ?? ye;
|
|
77
|
+
}), [$, De] = b(() => f.get("end_time") ?? c.end_time), [S, I] = b(() => q.start_address), [P, H] = b(() => q.end_address), U = Ue(null), Ae = h(() => u.slice(0, 4), [u]), { heroMode: X } = kt(), C = X === "vertical_marquee_hero", _ = X === "booking_bar_overlay_hero" || C, Z = Ve("(min-width: 1024px)"), Ee = _t(l), Be = h(
|
|
78
78
|
() => ({
|
|
79
79
|
startDate: a("booking_start_date"),
|
|
80
80
|
pickStartDate: a("booking_start_date"),
|
|
@@ -86,134 +86,134 @@ function oa() {
|
|
|
86
86
|
}),
|
|
87
87
|
[i.language, a]
|
|
88
88
|
), B = h(() => {
|
|
89
|
-
const
|
|
90
|
-
return
|
|
89
|
+
const n = L ?? (N ?? /* @__PURE__ */ new Date()), s = O ?? n;
|
|
90
|
+
return bt(new URLSearchParams(), {
|
|
91
91
|
fulfillment: w === "delivery" && v ? "delivery" : "pickup",
|
|
92
|
-
start_date:
|
|
93
|
-
start_time:
|
|
94
|
-
end_date:
|
|
95
|
-
end_time:
|
|
92
|
+
start_date: Ne(n),
|
|
93
|
+
start_time: F || c.start_time,
|
|
94
|
+
end_date: Ne(s),
|
|
95
|
+
end_time: $ || c.end_time,
|
|
96
96
|
start_address: S,
|
|
97
|
-
end_address:
|
|
97
|
+
end_address: P
|
|
98
98
|
});
|
|
99
99
|
}, [
|
|
100
100
|
c.end_time,
|
|
101
101
|
c.start_time,
|
|
102
102
|
N,
|
|
103
103
|
v,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
P,
|
|
105
|
+
O,
|
|
106
|
+
$,
|
|
107
107
|
w,
|
|
108
108
|
S,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
]), ee = B.toString(),
|
|
109
|
+
L,
|
|
110
|
+
F
|
|
111
|
+
]), ee = B.toString(), Te = ee ? `?${ee}` : "";
|
|
112
112
|
je(() => {
|
|
113
|
-
|
|
114
|
-
}, [B,
|
|
115
|
-
const
|
|
116
|
-
startDate:
|
|
117
|
-
onStartDateChange:
|
|
118
|
-
startTime:
|
|
119
|
-
onStartTimeChange:
|
|
120
|
-
endDate:
|
|
113
|
+
Nt(l, B);
|
|
114
|
+
}, [B, l]);
|
|
115
|
+
const Me = {
|
|
116
|
+
startDate: L,
|
|
117
|
+
onStartDateChange: Se,
|
|
118
|
+
startTime: F,
|
|
119
|
+
onStartTimeChange: Pe,
|
|
120
|
+
endDate: O,
|
|
121
121
|
onEndDateChange: Ce,
|
|
122
|
-
endTime:
|
|
123
|
-
onEndTimeChange:
|
|
122
|
+
endTime: $,
|
|
123
|
+
onEndTimeChange: De,
|
|
124
124
|
onEndTimeCommit: () => {
|
|
125
|
-
|
|
125
|
+
U.current?.focus({ preventScroll: !0 });
|
|
126
126
|
},
|
|
127
|
-
bookingPeriodConfig:
|
|
128
|
-
fetchTimeSlots:
|
|
129
|
-
labels:
|
|
127
|
+
bookingPeriodConfig: ke,
|
|
128
|
+
fetchTimeSlots: Ee,
|
|
129
|
+
labels: Be,
|
|
130
130
|
localeCode: i.language
|
|
131
|
-
},
|
|
132
|
-
const t = new URLSearchParams(
|
|
133
|
-
for (const [
|
|
134
|
-
t.set(
|
|
135
|
-
|
|
136
|
-
},
|
|
131
|
+
}, j = () => {
|
|
132
|
+
const t = new URLSearchParams(R);
|
|
133
|
+
for (const [n, s] of B.entries())
|
|
134
|
+
t.set(n, s);
|
|
135
|
+
_e(`/${l ?? ""}/booking?${t.toString()}#booking-products`);
|
|
136
|
+
}, te = (t) => `/${l ?? ""}/products/${t}`, T = {
|
|
137
137
|
backTo: `${p.pathname}${p.search}${p.hash}`
|
|
138
|
-
},
|
|
138
|
+
}, ae = /* @__PURE__ */ r("div", { children: [
|
|
139
139
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
140
140
|
/* @__PURE__ */ r(Y, { variant: "secondary", children: [
|
|
141
|
-
/* @__PURE__ */ e(
|
|
141
|
+
/* @__PURE__ */ e(Ke, { className: "h-3 w-3", "aria-hidden": "true" }),
|
|
142
142
|
/* @__PURE__ */ e("span", { children: a("status_open") })
|
|
143
143
|
] }),
|
|
144
144
|
/* @__PURE__ */ r(Y, { variant: "outline", children: [
|
|
145
|
-
/* @__PURE__ */ e(
|
|
145
|
+
/* @__PURE__ */ e(Ge, { className: "h-3 w-3", "aria-hidden": "true" }),
|
|
146
146
|
/* @__PURE__ */ e("span", { children: x.address })
|
|
147
147
|
] })
|
|
148
148
|
] }),
|
|
149
149
|
/* @__PURE__ */ e("h1", { className: "mt-4 text-3xl font-semibold tracking-tight sm:text-4xl", children: /* @__PURE__ */ e("span", { children: a("hero_title", { fallback: x.hero_title }) }) }),
|
|
150
150
|
/* @__PURE__ */ e("p", { className: "mt-3 text-sm text-slate-700 sm:text-base", children: /* @__PURE__ */ e("span", { children: a("hero_description", { fallback: x.hero_description }) }) }),
|
|
151
151
|
/* @__PURE__ */ e("div", { className: m("mt-6", !_ && "rounded-xl border bg-white/70 p-3"), children: /* @__PURE__ */ r("ul", { className: m("space-y-3", _ && "space-y-2"), children: [
|
|
152
|
-
/* @__PURE__ */ e(
|
|
153
|
-
|
|
154
|
-
/* @__PURE__ */ e(
|
|
152
|
+
/* @__PURE__ */ e(ot, { policy: d.bookingEngine.cancellationPolicy }),
|
|
153
|
+
/* @__PURE__ */ r("li", { className: m("flex items-start gap-3", !_ && we && "border-t border-slate-200/70 pt-3"), children: [
|
|
154
|
+
/* @__PURE__ */ e(Je, { className: "mt-0.5 h-5 w-5 text-emerald-600", "aria-hidden": "true" }),
|
|
155
155
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
156
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a("
|
|
157
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("
|
|
156
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a("feature_secure_payment_title") }) }),
|
|
157
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("feature_secure_payment_description") }) })
|
|
158
158
|
] })
|
|
159
159
|
] }),
|
|
160
|
-
/* @__PURE__ */ r("li", { className:
|
|
161
|
-
/* @__PURE__ */ e(
|
|
160
|
+
!_ && /* @__PURE__ */ r("li", { className: "flex items-start gap-3 border-t border-slate-200/70 pt-3", children: [
|
|
161
|
+
/* @__PURE__ */ e(Xe, { className: "mt-0.5 h-5 w-5 text-emerald-600", "aria-hidden": "true" }),
|
|
162
162
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
163
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a("
|
|
164
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("
|
|
163
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a("feature_guarantee_insurance_title") }) }),
|
|
164
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("feature_guarantee_insurance_description") }) })
|
|
165
165
|
] })
|
|
166
166
|
] }),
|
|
167
167
|
v ? /* @__PURE__ */ r("li", { className: m("flex items-start gap-3", !_ && "border-t border-slate-200/70 pt-3"), children: [
|
|
168
|
-
/* @__PURE__ */ e(
|
|
168
|
+
/* @__PURE__ */ e(Ze, { className: "mt-0.5 h-5 w-5 text-slate-900", "aria-hidden": "true" }),
|
|
169
169
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
170
170
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium text-slate-950", children: /* @__PURE__ */ e("span", { children: a("feature_delivery_title") }) }),
|
|
171
171
|
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("feature_delivery_description") }) })
|
|
172
172
|
] })
|
|
173
173
|
] }) : null
|
|
174
174
|
] }) })
|
|
175
|
-
] }),
|
|
175
|
+
] }), re = ({
|
|
176
176
|
className: t,
|
|
177
|
-
showSubmitButton:
|
|
177
|
+
showSubmitButton: n = !1,
|
|
178
178
|
submitButtonClassName: s
|
|
179
179
|
}) => /* @__PURE__ */ e(
|
|
180
|
-
|
|
180
|
+
ct,
|
|
181
181
|
{
|
|
182
|
-
...
|
|
183
|
-
labelClassName:
|
|
184
|
-
inputClassName:
|
|
182
|
+
...Me,
|
|
183
|
+
labelClassName: fe,
|
|
184
|
+
inputClassName: xe,
|
|
185
185
|
children: /* @__PURE__ */ r("div", { className: t, children: [
|
|
186
|
-
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(
|
|
187
|
-
/* @__PURE__ */ e(
|
|
188
|
-
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(
|
|
189
|
-
/* @__PURE__ */ e(
|
|
190
|
-
|
|
186
|
+
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(mt, {}) }),
|
|
187
|
+
/* @__PURE__ */ e(ht, {}),
|
|
188
|
+
/* @__PURE__ */ e("div", { className: "min-w-0", children: /* @__PURE__ */ e(pt, {}) }),
|
|
189
|
+
/* @__PURE__ */ e(gt, {}),
|
|
190
|
+
n ? /* @__PURE__ */ r(me, { ref: U, className: m("gap-2", s), onClick: j, children: [
|
|
191
191
|
/* @__PURE__ */ e("span", { children: a("booking_submit") }),
|
|
192
192
|
/* @__PURE__ */ e(z, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
193
193
|
] }) : null
|
|
194
194
|
] })
|
|
195
195
|
}
|
|
196
|
-
),
|
|
197
|
-
|
|
196
|
+
), se = (t) => v ? /* @__PURE__ */ e(
|
|
197
|
+
St,
|
|
198
198
|
{
|
|
199
199
|
open: w === "delivery",
|
|
200
200
|
className: "sm:min-h-[6.75rem]",
|
|
201
|
-
inputClassName: `${
|
|
202
|
-
labelClassName:
|
|
201
|
+
inputClassName: `${xe} bg-white`,
|
|
202
|
+
labelClassName: fe,
|
|
203
203
|
startAddress: S,
|
|
204
|
-
onStartAddressChange:
|
|
205
|
-
returnAddress:
|
|
206
|
-
onReturnAddressChange:
|
|
204
|
+
onStartAddressChange: I,
|
|
205
|
+
returnAddress: P,
|
|
206
|
+
onReturnAddressChange: H,
|
|
207
207
|
testIdPrefix: t
|
|
208
208
|
}
|
|
209
|
-
) : null,
|
|
209
|
+
) : null, Re = se("storefront-home-fulfillment-delivery-address"), qe = se("storefront-home-compact-fulfillment-delivery-address"), Le = /* @__PURE__ */ r(he, { className: "border-slate-200 bg-white/80 shadow-sm", children: [
|
|
210
210
|
/* @__PURE__ */ r("div", { className: "border-b border-slate-200 px-4 py-4", children: [
|
|
211
211
|
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: a("booking_title") }) }),
|
|
212
212
|
/* @__PURE__ */ e("p", { className: "mt-1 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("booking_subtitle") }) })
|
|
213
213
|
] }),
|
|
214
214
|
/* @__PURE__ */ r("div", { className: "grid gap-4 px-4 py-4", children: [
|
|
215
215
|
/* @__PURE__ */ e(
|
|
216
|
-
|
|
216
|
+
ge,
|
|
217
217
|
{
|
|
218
218
|
value: w,
|
|
219
219
|
onValueChange: J,
|
|
@@ -221,26 +221,26 @@ function oa() {
|
|
|
221
221
|
deliveryEnabled: v,
|
|
222
222
|
deliveryDisabledReason: G,
|
|
223
223
|
startAddress: S,
|
|
224
|
-
onStartAddressChange:
|
|
225
|
-
endAddress:
|
|
226
|
-
onEndAddressChange:
|
|
224
|
+
onStartAddressChange: I,
|
|
225
|
+
endAddress: P,
|
|
226
|
+
onEndAddressChange: H,
|
|
227
227
|
showDeliveryAddressSelector: !1,
|
|
228
228
|
testIdPrefix: "storefront-home-fulfillment"
|
|
229
229
|
}
|
|
230
230
|
),
|
|
231
|
-
|
|
231
|
+
re({
|
|
232
232
|
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"
|
|
233
233
|
}),
|
|
234
|
-
|
|
234
|
+
Re,
|
|
235
235
|
/* @__PURE__ */ e("p", { className: "text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: a("booking_minimum_duration", { hours: 4 }) }) }),
|
|
236
|
-
/* @__PURE__ */ r(
|
|
236
|
+
/* @__PURE__ */ r(me, { ref: U, className: "h-11 rounded-xl text-sm font-semibold gap-2", onClick: j, children: [
|
|
237
237
|
/* @__PURE__ */ e("span", { children: a("booking_submit") }),
|
|
238
238
|
/* @__PURE__ */ e(z, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
239
239
|
] })
|
|
240
240
|
] })
|
|
241
|
-
] }),
|
|
241
|
+
] }), ie = /* @__PURE__ */ e(he, { className: "border-slate-200 bg-white/95 shadow-xl", children: /* @__PURE__ */ r("div", { className: "grid gap-3 p-4", children: [
|
|
242
242
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
243
|
-
|
|
243
|
+
ge,
|
|
244
244
|
{
|
|
245
245
|
value: w,
|
|
246
246
|
onValueChange: J,
|
|
@@ -248,20 +248,20 @@ function oa() {
|
|
|
248
248
|
deliveryEnabled: v,
|
|
249
249
|
deliveryDisabledReason: G,
|
|
250
250
|
startAddress: S,
|
|
251
|
-
onStartAddressChange:
|
|
252
|
-
endAddress:
|
|
253
|
-
onEndAddressChange:
|
|
251
|
+
onStartAddressChange: I,
|
|
252
|
+
endAddress: P,
|
|
253
|
+
onEndAddressChange: H,
|
|
254
254
|
showDeliveryAddressSelector: !1,
|
|
255
255
|
testIdPrefix: "storefront-home-compact-fulfillment"
|
|
256
256
|
}
|
|
257
257
|
) }),
|
|
258
|
-
|
|
258
|
+
re({
|
|
259
259
|
className: "grid gap-3 md:grid-cols-2 xl:grid-cols-[minmax(0,1fr)_150px_minmax(0,1fr)_150px_auto] xl:items-end",
|
|
260
260
|
showSubmitButton: !0,
|
|
261
261
|
submitButtonClassName: "h-10 rounded-xl text-sm font-semibold xl:self-end"
|
|
262
262
|
}),
|
|
263
|
-
|
|
264
|
-
] }) }),
|
|
263
|
+
qe
|
|
264
|
+
] }) }), Fe = [...u, ...K].flatMap((t) => Array.isArray(t.images) ? t.images : []).filter((t) => typeof t == "string" && t.trim().length > 0).map((t) => t.trim()).slice(0, 12), Oe = Ct(Fe), $e = C ? /* @__PURE__ */ e("style", { children: `
|
|
265
265
|
@keyframes storefront-hero-marquee-up {
|
|
266
266
|
0% { transform: translateY(0); }
|
|
267
267
|
100% { transform: translateY(calc(-50% - (var(--storefront-hero-marquee-gap) / 2))); }
|
|
@@ -284,7 +284,7 @@ function oa() {
|
|
|
284
284
|
transform: none !important;
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
` }) : null,
|
|
287
|
+
` }) : null, le = (t) => /* @__PURE__ */ e(
|
|
288
288
|
"div",
|
|
289
289
|
{
|
|
290
290
|
className: m("relative h-full min-h-[340px] overflow-hidden", t),
|
|
@@ -297,8 +297,8 @@ function oa() {
|
|
|
297
297
|
maskSize: "100% 100%"
|
|
298
298
|
},
|
|
299
299
|
"aria-hidden": "true",
|
|
300
|
-
children: /* @__PURE__ */ e("div", { className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6", children:
|
|
301
|
-
const k =
|
|
300
|
+
children: /* @__PURE__ */ e("div", { className: "absolute inset-0 grid grid-cols-2 gap-3 md:grid-cols-3 lg:grid-cols-6", children: Oe.map((n, s) => {
|
|
301
|
+
const k = be[s % be.length] ?? 32, y = [...n, ...n];
|
|
302
302
|
return /* @__PURE__ */ e(
|
|
303
303
|
"div",
|
|
304
304
|
{
|
|
@@ -331,7 +331,7 @@ function oa() {
|
|
|
331
331
|
src: g.src,
|
|
332
332
|
alt: "",
|
|
333
333
|
className: "absolute inset-0 h-full w-full object-cover opacity-90 saturate-[1.05] transition-transform duration-700 group-hover:scale-[1.04]",
|
|
334
|
-
loading: D <
|
|
334
|
+
loading: D < n.length ? "eager" : "lazy"
|
|
335
335
|
}
|
|
336
336
|
),
|
|
337
337
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-linear-to-t from-slate-950/40 via-slate-950/10 to-white/10" })
|
|
@@ -346,11 +346,11 @@ function oa() {
|
|
|
346
346
|
);
|
|
347
347
|
}) })
|
|
348
348
|
}
|
|
349
|
-
),
|
|
349
|
+
), Ie = C ? /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-0 hidden lg:block", "aria-hidden": "true", children: /* @__PURE__ */ r("div", { className: "mx-auto grid h-full max-w-7xl grid-cols-12 gap-8 px-4 sm:px-6", children: [
|
|
350
350
|
/* @__PURE__ */ e("div", { className: "lg:col-span-5" }),
|
|
351
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children:
|
|
352
|
-
] }) }) : null,
|
|
353
|
-
/* @__PURE__ */ e("div", { className: "lg:hidden", children:
|
|
351
|
+
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children: le() })
|
|
352
|
+
] }) }) : null, He = C ? /* @__PURE__ */ r(oe, { children: [
|
|
353
|
+
/* @__PURE__ */ e("div", { className: "lg:hidden", children: le() }),
|
|
354
354
|
/* @__PURE__ */ e("div", { className: "hidden min-h-[510px] lg:block", "aria-hidden": "true" })
|
|
355
355
|
] }) : /* @__PURE__ */ r("div", { className: "relative min-h-[340px] overflow-hidden rounded-3xl border border-slate-200 bg-slate-900 shadow-sm lg:min-h-[510px]", children: [
|
|
356
356
|
/* @__PURE__ */ e(
|
|
@@ -363,7 +363,7 @@ function oa() {
|
|
|
363
363
|
),
|
|
364
364
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-linear-to-t from-slate-900/45 via-slate-900/15 to-transparent", "aria-hidden": "true" })
|
|
365
365
|
] });
|
|
366
|
-
return /* @__PURE__ */ r(
|
|
366
|
+
return /* @__PURE__ */ r(oe, { children: [
|
|
367
367
|
/* @__PURE__ */ r("section", { className: "relative overflow-hidden border-b border-slate-200", children: [
|
|
368
368
|
/* @__PURE__ */ e("div", { className: "absolute inset-0 bg-linear-to-b from-slate-50 to-white", "aria-hidden": "true" }),
|
|
369
369
|
/* @__PURE__ */ e(
|
|
@@ -376,20 +376,20 @@ function oa() {
|
|
|
376
376
|
"aria-hidden": "true"
|
|
377
377
|
}
|
|
378
378
|
),
|
|
379
|
-
Oe,
|
|
380
379
|
$e,
|
|
380
|
+
Ie,
|
|
381
381
|
_ ? /* @__PURE__ */ r("div", { className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14", children: [
|
|
382
382
|
/* @__PURE__ */ r("div", { className: "lg:col-span-5", children: [
|
|
383
|
-
|
|
384
|
-
Z ? /* @__PURE__ */ e("div", { className: "mt-7", children: /* @__PURE__ */ e("div", { className: "relative z-20 w-[calc(100%+24rem)] max-w-none", children:
|
|
383
|
+
ae,
|
|
384
|
+
Z ? /* @__PURE__ */ e("div", { className: "mt-7", children: /* @__PURE__ */ e("div", { className: "relative z-20 w-[calc(100%+24rem)] max-w-none", children: ie }) }) : null
|
|
385
385
|
] }),
|
|
386
|
-
/* @__PURE__ */ r("div", { className: m("lg:col-span-7", !
|
|
387
|
-
|
|
388
|
-
Z ? null : /* @__PURE__ */ e("div", { className: "mt-4", children:
|
|
386
|
+
/* @__PURE__ */ r("div", { className: m("lg:col-span-7", !C && "lg:pt-4"), children: [
|
|
387
|
+
He,
|
|
388
|
+
Z ? null : /* @__PURE__ */ e("div", { className: "mt-4", children: ie })
|
|
389
389
|
] })
|
|
390
|
-
] }) : /* @__PURE__ */ r("div", { className: "relative mx-auto grid max-w-7xl gap-8 px-4 py-10 sm:px-6 lg:grid-cols-12 lg:py-14", children: [
|
|
391
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-5", children:
|
|
392
|
-
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children:
|
|
390
|
+
] }) : /* @__PURE__ */ r("div", { 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", children: [
|
|
391
|
+
/* @__PURE__ */ e("div", { className: "lg:col-span-5", children: ae }),
|
|
392
|
+
/* @__PURE__ */ e("div", { className: "lg:col-span-7", children: Le })
|
|
393
393
|
] })
|
|
394
394
|
] }),
|
|
395
395
|
/* @__PURE__ */ r("section", { id: "featured", className: "mx-auto max-w-7xl scroll-mt-16 px-4 py-10 sm:scroll-mt-20 sm:px-6", children: [
|
|
@@ -399,10 +399,10 @@ function oa() {
|
|
|
399
399
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: a("featured_description") }) })
|
|
400
400
|
] }),
|
|
401
401
|
/* @__PURE__ */ r(
|
|
402
|
-
|
|
402
|
+
M,
|
|
403
403
|
{
|
|
404
404
|
className: "hidden items-center gap-2 text-sm font-medium text-slate-700 hover:text-slate-950 sm:inline-flex",
|
|
405
|
-
to: `/${
|
|
405
|
+
to: `/${l ?? ""}/booking${Te}`,
|
|
406
406
|
children: [
|
|
407
407
|
/* @__PURE__ */ e("span", { children: a("featured_view_all") }),
|
|
408
408
|
/* @__PURE__ */ e(z, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
@@ -410,46 +410,58 @@ function oa() {
|
|
|
410
410
|
}
|
|
411
411
|
)
|
|
412
412
|
] }),
|
|
413
|
-
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children:
|
|
414
|
-
const
|
|
413
|
+
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: Ae.map((t) => {
|
|
414
|
+
const n = t.id, s = t.slug, k = A(t.name, i.language, o), y = A(t.description, i.language, o), g = typeof t.images?.[0] == "string" ? t.images[0].trim() : "", D = pe(t.primaryImageStyle), ne = tt(t.availabilityStatus), V = te(s);
|
|
415
415
|
return /* @__PURE__ */ r(
|
|
416
416
|
"div",
|
|
417
417
|
{
|
|
418
418
|
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",
|
|
419
419
|
children: [
|
|
420
420
|
/* @__PURE__ */ e(
|
|
421
|
-
|
|
421
|
+
M,
|
|
422
422
|
{
|
|
423
|
-
to:
|
|
424
|
-
state:
|
|
423
|
+
to: V,
|
|
424
|
+
state: T,
|
|
425
425
|
className: "block",
|
|
426
426
|
children: /* @__PURE__ */ e(
|
|
427
427
|
"span",
|
|
428
428
|
{
|
|
429
429
|
className: m("relative block aspect-[1618/1000] overflow-hidden rounded-xl", D.className),
|
|
430
430
|
style: D.style,
|
|
431
|
-
children: g ? /* @__PURE__ */ e("img", { src: g, alt: k, className: "absolute inset-0 h-full w-full object-contain p-1", loading: "lazy" }) : /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-slate-400", children: /* @__PURE__ */ e(
|
|
431
|
+
children: g ? /* @__PURE__ */ e("img", { src: g, alt: k, className: "absolute inset-0 h-full w-full object-contain p-1", loading: "lazy" }) : /* @__PURE__ */ e("span", { className: "absolute inset-0 flex items-center justify-center text-slate-400", children: /* @__PURE__ */ e(de, { className: "h-8 w-8", "aria-hidden": "true" }) })
|
|
432
432
|
}
|
|
433
433
|
)
|
|
434
434
|
}
|
|
435
435
|
),
|
|
436
436
|
/* @__PURE__ */ r("span", { className: "flex flex-1 flex-col gap-1", children: [
|
|
437
437
|
/* @__PURE__ */ e(
|
|
438
|
-
|
|
438
|
+
M,
|
|
439
439
|
{
|
|
440
|
-
to:
|
|
441
|
-
state:
|
|
440
|
+
to: V,
|
|
441
|
+
state: T,
|
|
442
442
|
className: "text-sm font-semibold text-slate-950 hover:text-slate-700",
|
|
443
443
|
children: /* @__PURE__ */ e("span", { children: k })
|
|
444
444
|
}
|
|
445
445
|
),
|
|
446
|
-
/* @__PURE__ */ e(
|
|
446
|
+
/* @__PURE__ */ e(ce, { prices: t.prices, className: "self-start" }),
|
|
447
447
|
/* @__PURE__ */ e("span", { className: "line-clamp-2 text-xs text-slate-600", children: y })
|
|
448
448
|
] }),
|
|
449
|
-
/* @__PURE__ */
|
|
449
|
+
/* @__PURE__ */ r("span", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [
|
|
450
|
+
/* @__PURE__ */ e(Y, { variant: ne.variant, children: /* @__PURE__ */ e("span", { children: a(ne.labelKey) }) }),
|
|
451
|
+
/* @__PURE__ */ e("span", { className: "text-slate-400", children: "·" }),
|
|
452
|
+
/* @__PURE__ */ e(
|
|
453
|
+
M,
|
|
454
|
+
{
|
|
455
|
+
to: V,
|
|
456
|
+
state: T,
|
|
457
|
+
className: "text-xs font-medium text-slate-700 hover:text-slate-950",
|
|
458
|
+
children: /* @__PURE__ */ e("span", { children: a("product_details_link") })
|
|
459
|
+
}
|
|
460
|
+
)
|
|
461
|
+
] })
|
|
450
462
|
]
|
|
451
463
|
},
|
|
452
|
-
|
|
464
|
+
n
|
|
453
465
|
);
|
|
454
466
|
}) })
|
|
455
467
|
] }),
|
|
@@ -459,13 +471,13 @@ function oa() {
|
|
|
459
471
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: a("products_description") }) })
|
|
460
472
|
] }) }),
|
|
461
473
|
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 md:grid-cols-2", children: u.map((t) => /* @__PURE__ */ e(
|
|
462
|
-
|
|
474
|
+
st,
|
|
463
475
|
{
|
|
464
476
|
bike: t,
|
|
465
|
-
detailsPath:
|
|
466
|
-
productDetailsLinkState:
|
|
477
|
+
detailsPath: te(t.slug),
|
|
478
|
+
productDetailsLinkState: T,
|
|
467
479
|
fallbackLanguage: o,
|
|
468
|
-
onAction:
|
|
480
|
+
onAction: j
|
|
469
481
|
},
|
|
470
482
|
t.id
|
|
471
483
|
)) })
|
|
@@ -476,30 +488,30 @@ function oa() {
|
|
|
476
488
|
/* @__PURE__ */ e("p", { className: "text-sm text-slate-600", children: /* @__PURE__ */ e("span", { children: a("accessories_description") }) })
|
|
477
489
|
] }) }),
|
|
478
490
|
/* @__PURE__ */ e("div", { className: "mt-6 grid gap-4 sm:grid-cols-2 lg:grid-cols-4", children: K.slice(0, 4).map((t) => {
|
|
479
|
-
const
|
|
491
|
+
const n = A(t.name, i.language, o), s = A(t.description, i.language, o), k = A(t.warning, i.language, o), y = typeof t.images?.[0] == "string" ? t.images[0].trim() : "", g = pe(t.primaryImageStyle);
|
|
480
492
|
return /* @__PURE__ */ r("div", { className: "flex h-full flex-col gap-2 rounded-xl border border-slate-200 bg-white p-3 shadow-sm", children: [
|
|
481
493
|
/* @__PURE__ */ e(
|
|
482
494
|
"div",
|
|
483
495
|
{
|
|
484
496
|
className: m("relative aspect-[1618/1000] overflow-hidden rounded-xl", g.className),
|
|
485
497
|
style: g.style,
|
|
486
|
-
children: y ? /* @__PURE__ */ e("img", { src: y, alt:
|
|
498
|
+
children: y ? /* @__PURE__ */ e("img", { src: y, alt: n, className: "absolute inset-0 h-full w-full object-contain p-1", loading: "lazy" }) : /* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-center justify-center text-slate-400", children: /* @__PURE__ */ e(de, { className: "h-8 w-8", "aria-hidden": "true" }) })
|
|
487
499
|
}
|
|
488
500
|
),
|
|
489
501
|
/* @__PURE__ */ r("div", { className: "flex flex-1 flex-col gap-1", children: [
|
|
490
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children:
|
|
502
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-slate-950", children: /* @__PURE__ */ e("span", { children: n }) }),
|
|
491
503
|
/* @__PURE__ */ e("p", { className: "line-clamp-2 text-xs text-slate-600", children: /* @__PURE__ */ e("span", { children: s }) }),
|
|
492
|
-
/* @__PURE__ */ e(
|
|
504
|
+
/* @__PURE__ */ e(lt, { warning: k, className: "mt-1" })
|
|
493
505
|
] }),
|
|
494
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2", children: /* @__PURE__ */ e(
|
|
506
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2", children: /* @__PURE__ */ e(ce, { prices: t.prices }) })
|
|
495
507
|
] }, t.id);
|
|
496
508
|
}) })
|
|
497
509
|
] }),
|
|
498
|
-
/* @__PURE__ */ e(
|
|
499
|
-
/* @__PURE__ */ e(
|
|
500
|
-
/* @__PURE__ */ e(
|
|
510
|
+
/* @__PURE__ */ e(rt, { preset: x }),
|
|
511
|
+
/* @__PURE__ */ e(dt, {}),
|
|
512
|
+
/* @__PURE__ */ e(it, { preset: x, storeSlug: l ?? "" })
|
|
501
513
|
] });
|
|
502
514
|
}
|
|
503
515
|
export {
|
|
504
|
-
|
|
516
|
+
da as default
|
|
505
517
|
};
|