@loczer/storefront-sdk 0.194.0 → 0.196.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 (65) hide show
  1. package/dist/chunks/pkg/ui/dist/{Button-CxG2fSpA.js → Button-Cr_u8vnh.js} +1 -1
  2. package/dist/chunks/pkg/ui/dist/{Dialog-4leTWiev.js → Dialog-CczmPDwY.js} +1 -1
  3. package/dist/chunks/pkg/ui/dist/Drawer/{index-DA5V7R_q.js → index-CSvSVP_J.js} +1 -1
  4. package/dist/chunks/pkg/ui/dist/Map/{MapContent-BmKjdWmq.js → MapContent-CDeWtwKa.js} +1 -1
  5. package/dist/chunks/pkg/ui/dist/{Map-CsOTdTtL.js → Map-Cs7wgtH9.js} +2 -2
  6. package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-CfEqkJ0y.js → MorphingModalWizard-j1CgFGLe.js} +4 -3
  7. package/dist/chunks/pkg/ui/dist/{ResponsiveDialog-C6IWYoIg.js → ResponsiveDialog-BVwhTZQo.js} +3 -3
  8. package/dist/chunks/pkg/ui/dist/{ScrollArea-Bjwo84cv.js → ScrollArea-BqLd0xZj.js} +1 -1
  9. package/dist/chunks/pkg/ui/dist/Spinner/{index-DzMEU0iA.js → index-Cgi70z_E.js} +1 -1
  10. package/dist/chunks/pkg/ui/dist/lib/utils-DXB19bzk.js +8 -0
  11. package/dist/components/BikeProductCard/index.js +6 -6
  12. package/dist/components/BookingBikeVariantDialog/index.js +7 -7
  13. package/dist/components/BookingFlowSteps/index.js +11 -11
  14. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  15. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.d.ts.map +1 -1
  16. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +16 -15
  17. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
  18. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.d.ts.map +1 -1
  19. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +16 -15
  20. package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts +1 -1
  21. package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.d.ts.map +1 -1
  22. package/dist/components/BookingPeriodSelector/components/internal/BookingHourPickerField.js +20 -23
  23. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts +39 -0
  24. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.d.ts.map +1 -0
  25. package/dist/components/BookingPeriodSelector/components/internal/StorefrontHourPickerField.js +830 -0
  26. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts +1 -1
  27. package/dist/components/BookingPeriodSelector/useBookingPeriodController.d.ts.map +1 -1
  28. package/dist/components/BookingPeriodSelector/useBookingPeriodController.js +52 -46
  29. package/dist/components/ContactSection/index.js +35 -35
  30. package/dist/components/ContractSaleDocument/DocumentAcceptanceSection.js +4 -4
  31. package/dist/components/ContractSaleDocument/ThumbnailSidebar.js +1 -1
  32. package/dist/components/DeliveryAddressSelector/index.js +5 -5
  33. package/dist/components/Footer/index.js +11 -11
  34. package/dist/components/FulfillmentSection/index.js +9 -9
  35. package/dist/components/Header/index.js +61 -61
  36. package/dist/components/Map/index.js +1 -1
  37. package/dist/components/PoweredByLoczerBadge/index.js +5 -5
  38. package/dist/components/ProductPriceBadge/index.js +73 -73
  39. package/dist/components/StorefrontCancellationPolicyNotice/index.js +6 -6
  40. package/dist/components/StorefrontCartPanel/index.js +8 -8
  41. package/dist/components/StorefrontInsuranceNotice/index.js +6 -6
  42. package/dist/components/StorefrontPopupMessages/index.js +8 -8
  43. package/dist/components/payment/MollieCardFieldsForm.js +1 -1
  44. package/dist/components/payment/StripeCardFieldsForm.js +1 -1
  45. package/dist/index.d.ts +11 -3
  46. package/dist/lib/utils.d.ts +3 -1
  47. package/dist/lib/utils.d.ts.map +1 -1
  48. package/dist/lib/utils.js +9 -5
  49. package/dist/pages/BookingPage.js +8 -8
  50. package/dist/pages/CheckoutPaymentPage.js +1 -1
  51. package/dist/pages/ContractSaleDocumentPage.js +15 -15
  52. package/dist/pages/HomePage.js +19 -19
  53. package/dist/pages/PaymentLinkPage.js +1 -1
  54. package/dist/pages/PaymentLinkSuccessPage.js +1 -1
  55. package/dist/pages/ProductPage.js +143 -143
  56. package/dist/pages/checkout/components/CheckoutCouponCard.js +5 -5
  57. package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +1 -1
  58. package/dist/storefront.css +1 -1
  59. package/package.json +5 -1
  60. package/dist/chunks/node_modules/clsx/dist/clsx-CdyIqUTr.js +0 -16
  61. package/dist/chunks/node_modules/tailwind-merge/dist/bundle-mjs-CF4QheV5.js +0 -1608
  62. package/dist/chunks/pkg/ui/dist/lib/utils-BN5KOMSm.js +0 -8
  63. package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts +0 -22
  64. package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.d.ts.map +0 -1
  65. package/dist/components/BookingPeriodSelector/components/internal/ModalHourPickerField.js +0 -342
@@ -5,29 +5,29 @@ import { useStorefrontCart as s } from "../lib/cart.js";
5
5
  import { getAvailabilityVariant as c } from "../lib/utils.js";
6
6
  import { getLocalizedValue as l } from "../localization.js";
7
7
  import { ROUTE as ee, buildStorefrontAvailabilityKey as u, getStorefrontAvailabilityIssue as d, getStorefrontAvailabilityStatus as f, getValidStorefrontAvailabilitySchedule as te, isStorefrontAvailabilityInsufficient as p, responseSchema as ne } from "../lib/storefrontAvailability.js";
8
- import { Badge as re } from "../ui/badge.js";
9
- import { Button as m } from "../ui/button.js";
10
- import { Input as ie } from "../ui/input.js";
11
- import { useStorefront as ae, useStorefrontProducts as oe } from "../StorefrontProvider.js";
12
- import { Card as se } from "../ui/card.js";
13
- import { ProductWarningNotice as ce } from "../components/ProductWarningNotice/index.js";
14
- import { ProductPriceBadge as le } from "../components/ProductPriceBadge/index.js";
15
- import { resolveProductImageContainerStyle as ue } from "../lib/productImageStyles.js";
16
- import { apiPost as de } from "../lib/apiCall.js";
17
- import { RadioGroup as fe, RadioGroupItem as pe } from "../ui/radio-group.js";
18
- import { useEffect as h, useMemo as g, useState as _ } from "react";
19
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
20
- import { cn as b } from "@rpcbase/ui";
21
- import { Link as me, useLocation as he, useNavigate as ge, useParams as _e, useSearchParams as ve } from "@rpcbase/router";
22
- import { useTranslation as ye } from "react-i18next";
23
- import { ArrowLeft as x, ArrowRight as S, Bike as be, CheckCircle2 as xe } from "lucide-react";
8
+ import { Badge as m } from "../ui/badge.js";
9
+ import { Button as h } from "../ui/button.js";
10
+ import { Input as re } from "../ui/input.js";
11
+ import { useStorefront as ie, useStorefrontProducts as ae } from "../StorefrontProvider.js";
12
+ import { Card as oe } from "../ui/card.js";
13
+ import { ProductWarningNotice as se } from "../components/ProductWarningNotice/index.js";
14
+ import { ProductPriceBadge as ce } from "../components/ProductPriceBadge/index.js";
15
+ import { resolveProductImageContainerStyle as le } from "../lib/productImageStyles.js";
16
+ import { apiPost as ue } from "../lib/apiCall.js";
17
+ import { RadioGroup as de, RadioGroupItem as fe } from "../ui/radio-group.js";
18
+ import { useEffect as g, useMemo as _, useState as v } from "react";
19
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
20
+ import { Link as pe, useLocation as me, useNavigate as he, useParams as ge, useSearchParams as _e } from "@rpcbase/router";
21
+ import { useTranslation as ve } from "react-i18next";
22
+ import { cn as x } from "@rpcbase/ui";
23
+ import { ArrowLeft as S, ArrowRight as C, Bike as ye, CheckCircle2 as be } from "lucide-react";
24
24
  //#region src/pages/ProductPage.tsx
25
- var C = (e, t = () => !0) => {
25
+ var w = (e, t = () => !0) => {
26
26
  if (!e) return null;
27
27
  if (e.representedVariantId?.trim()) return e.representedVariantId.trim();
28
28
  let n = e.productVariants ?? [];
29
29
  return n.find((e) => t(e.id))?.id ?? n[0]?.id ?? null;
30
- }, Se = (e, t) => {
30
+ }, xe = (e, t) => {
31
31
  if (!e) return [];
32
32
  let n = o(e), r = /* @__PURE__ */ new Map();
33
33
  r.set(u(n), {
@@ -45,53 +45,53 @@ var C = (e, t = () => !0) => {
45
45
  productVariantId: i,
46
46
  quantity: t
47
47
  }), Array.from(r.values());
48
- }, Ce = (e, t) => {
48
+ }, Se = (e, t) => {
49
49
  let n = o(e), r = e.representedVariantId?.trim();
50
50
  if (r) {
51
51
  let e = t.get(u(n, r));
52
52
  if (e) return e;
53
53
  }
54
54
  return t.get(u(n));
55
- }, we = (e, t, n) => n.get(u(o(e), t)), w = (e, t, n) => {
55
+ }, Ce = (e, t, n) => n.get(u(o(e), t)), T = (e, t, n) => {
56
56
  let r = d(t);
57
57
  return r === "quantity_unavailable" ? e("availability_quantity_unavailable") : r === "unavailable" || n === "OUT_OF_STOCK" ? e("availability_out_of_stock") : t?.remaining === void 0 ? t?.fewRemaining || n === "LOW_STOCK" ? e("availability_low_stock") : e("availability_in_stock") : e("availability_remaining_count", { count: t.remaining });
58
- }, Te = (e) => "availabilityStatus" in e ? e.availabilityStatus ?? "AVAILABLE" : "AVAILABLE";
59
- function T() {
60
- let { t: d, i18n: T } = ye(), { storeSlug: E, productSlug: D } = _e(), [O] = ve(), Ee = he(), De = ge(), { addItem: Oe, itemCount: k } = s(), { storefrontConfiguration: ke } = ae(), A = ke.workspace?.workspaceLanguage, { bikes: j, accessories: M } = oe(), N = g(() => D ? a(D, {
61
- bikes: j,
62
- accessories: M
58
+ }, we = (e) => "availabilityStatus" in e ? e.availabilityStatus ?? "AVAILABLE" : "AVAILABLE";
59
+ function E() {
60
+ let { t: d, i18n: E } = ve(), { storeSlug: D, productSlug: O } = ge(), [k] = _e(), Te = me(), Ee = he(), { addItem: De, itemCount: A } = s(), { storefrontConfiguration: Oe } = ie(), j = Oe.workspace?.workspaceLanguage, { bikes: M, accessories: N } = ae(), P = _(() => O ? a(O, {
61
+ bikes: M,
62
+ accessories: N
63
63
  }) : null, [
64
+ N,
64
65
  M,
65
- j,
66
- D
67
- ]), P = g(() => t(O, E), [O, E]), F = g(() => e(P, {
66
+ O
67
+ ]), F = _(() => t(k, D), [k, D]), I = _(() => e(F, {
68
68
  start_time: "",
69
69
  end_time: ""
70
- }), [P]), I = g(() => te(F), [F]), L = P.toString(), R = `/${E ?? ""}/checkout${L ? `?${L}` : ""}`, z = `/${E ?? ""}`, Ae = z, B = Ee.state, je = typeof B?.backTo == "string" && B.backTo.startsWith(z) ? B.backTo : Ae, [V, H] = _(1), [U, W] = _(() => C(N)), G = Number.isFinite(V) ? Math.max(1, Math.min(99, Math.floor(V))) : 1, K = g(() => Se(N, G), [G, N]), [q, J] = _([]), [Me, Y] = _(!1);
71
- h(() => {
72
- if (H(1), !N) {
73
- W(null);
70
+ }), [F]), L = _(() => te(I), [I]), R = F.toString(), z = `/${D ?? ""}/checkout${R ? `?${R}` : ""}`, B = `/${D ?? ""}`, ke = B, V = Te.state, Ae = typeof V?.backTo == "string" && V.backTo.startsWith(B) ? V.backTo : ke, [H, U] = v(1), [W, G] = v(() => w(P)), K = Number.isFinite(H) ? Math.max(1, Math.min(99, Math.floor(H))) : 1, q = _(() => xe(P, K), [K, P]), [je, J] = v([]), [Me, Y] = v(!1);
71
+ g(() => {
72
+ if (U(1), !P) {
73
+ G(null);
74
74
  return;
75
75
  }
76
- W(C(N));
77
- }, [D, N]), h(() => {
78
- n(E, P);
79
- }, [P, E]), h(() => {
80
- if (!E || K.length === 0) {
76
+ G(w(P));
77
+ }, [O, P]), g(() => {
78
+ n(D, F);
79
+ }, [F, D]), g(() => {
80
+ if (!D || q.length === 0) {
81
81
  J([]), Y(!1);
82
82
  return;
83
83
  }
84
- if (!I) {
84
+ if (!L) {
85
85
  J([]), Y(!1);
86
86
  return;
87
87
  }
88
88
  let e = !1;
89
89
  return Y(!0), J([]), (async () => {
90
90
  try {
91
- let t = await de(ee, {
92
- storeSlug: E,
93
- schedule: I,
94
- products: K
91
+ let t = await ue(ee, {
92
+ storeSlug: D,
93
+ schedule: L,
94
+ products: q
95
95
  }), n = ne.parse(t);
96
96
  if (e) return;
97
97
  J(n.success ? n.availability ?? [] : []);
@@ -105,185 +105,185 @@ function T() {
105
105
  e = !0;
106
106
  };
107
107
  }, [
108
- K,
109
- I,
110
- F.end_date,
111
- F.end_time,
112
- F.start_date,
113
- F.start_time,
114
- E
108
+ q,
109
+ L,
110
+ I.end_date,
111
+ I.end_time,
112
+ I.start_date,
113
+ I.start_time,
114
+ D
115
115
  ]);
116
- let Ne = g(() => new Map(q.map((e) => [u(e.productId, e.productVariantId), e])), [q]), Pe = () => {
117
- De(je);
116
+ let Ne = _(() => new Map(je.map((e) => [u(e.productId, e.productVariantId), e])), [je]), Pe = () => {
117
+ Ee(Ae);
118
118
  };
119
- if (!N) return /* @__PURE__ */ v("div", {
119
+ if (!P) return /* @__PURE__ */ y("div", {
120
120
  className: "mx-auto max-w-3xl px-4 py-10 sm:px-6",
121
- children: /* @__PURE__ */ y("div", {
121
+ children: /* @__PURE__ */ b("div", {
122
122
  className: "rounded-xl border border-slate-200 bg-white p-4 shadow-sm",
123
123
  children: [
124
- /* @__PURE__ */ v("h1", {
124
+ /* @__PURE__ */ y("h1", {
125
125
  className: "text-xl font-semibold tracking-tight text-slate-950",
126
- children: /* @__PURE__ */ v("span", { children: d("product_not_found_title") })
126
+ children: /* @__PURE__ */ y("span", { children: d("product_not_found_title") })
127
127
  }),
128
- /* @__PURE__ */ v("p", {
128
+ /* @__PURE__ */ y("p", {
129
129
  className: "mt-2 text-sm text-slate-600",
130
- children: /* @__PURE__ */ v("span", { children: d("product_not_found_description") })
130
+ children: /* @__PURE__ */ y("span", { children: d("product_not_found_description") })
131
131
  }),
132
- /* @__PURE__ */ v("div", {
132
+ /* @__PURE__ */ y("div", {
133
133
  className: "mt-6",
134
- children: /* @__PURE__ */ y(m, {
134
+ children: /* @__PURE__ */ b(h, {
135
135
  type: "button",
136
136
  className: "gap-2",
137
137
  onClick: Pe,
138
- children: [/* @__PURE__ */ v(x, {
138
+ children: [/* @__PURE__ */ y(S, {
139
139
  className: "h-4 w-4",
140
140
  "aria-hidden": "true"
141
- }), /* @__PURE__ */ v("span", { children: d("go_back") })]
141
+ }), /* @__PURE__ */ y("span", { children: d("go_back") })]
142
142
  })
143
143
  })
144
144
  ]
145
145
  })
146
146
  });
147
- let Fe = l(N.name, T.language, A), Ie = l(N.description, T.language, A), Le = l(N.warning, T.language, A), X = typeof N.images?.[0] == "string" ? N.images[0].trim() : "", Re = ue(N.primaryImageStyle), Z = Ce(N, Ne), ze = Te(N), Be = Z ? f(Z) : ze, Ve = c(Be), He = Me ? d("availability_checking") : w(d, Z, Be), Q = Z ? p(Z) : ze === "OUT_OF_STOCK", $ = N.productVariants ?? [], Ue = $.some((e) => !!r(e, "size")) ? d("product_size_label") : d("product_variant_label"), We = !!U && I !== null;
148
- return /* @__PURE__ */ v("div", {
147
+ let Fe = l(P.name, E.language, j), Ie = l(P.description, E.language, j), Le = l(P.warning, E.language, j), X = typeof P.images?.[0] == "string" ? P.images[0].trim() : "", Re = le(P.primaryImageStyle), Z = Se(P, Ne), ze = we(P), Be = Z ? f(Z) : ze, Ve = c(Be), He = Me ? d("availability_checking") : T(d, Z, Be), Q = Z ? p(Z) : ze === "OUT_OF_STOCK", $ = P.productVariants ?? [], Ue = $.some((e) => !!r(e, "size")) ? d("product_size_label") : d("product_variant_label"), We = !!W && L !== null;
148
+ return /* @__PURE__ */ y("div", {
149
149
  className: "mx-auto max-w-7xl px-4 py-8 sm:px-6",
150
- children: /* @__PURE__ */ y("div", {
150
+ children: /* @__PURE__ */ b("div", {
151
151
  className: "flex flex-col gap-6",
152
- children: [/* @__PURE__ */ y("div", {
152
+ children: [/* @__PURE__ */ b("div", {
153
153
  className: "flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
154
- children: [/* @__PURE__ */ y(m, {
154
+ children: [/* @__PURE__ */ b(h, {
155
155
  type: "button",
156
156
  variant: "ghost",
157
157
  className: "h-auto justify-start gap-2 self-start px-0 text-sm font-medium text-slate-700 hover:bg-transparent hover:text-slate-950",
158
158
  onClick: Pe,
159
- children: [/* @__PURE__ */ v(x, {
159
+ children: [/* @__PURE__ */ y(S, {
160
160
  className: "h-4 w-4",
161
161
  "aria-hidden": "true"
162
- }), /* @__PURE__ */ v("span", { children: d("go_back") })]
163
- }), /* @__PURE__ */ v(me, {
164
- to: R,
165
- className: b(k > 0 && I ? "inline-flex" : "hidden"),
166
- children: /* @__PURE__ */ y(m, {
162
+ }), /* @__PURE__ */ y("span", { children: d("go_back") })]
163
+ }), /* @__PURE__ */ y(pe, {
164
+ to: z,
165
+ className: x(A > 0 && L ? "inline-flex" : "hidden"),
166
+ children: /* @__PURE__ */ b(h, {
167
167
  size: "sm",
168
168
  className: "gap-2",
169
- children: [/* @__PURE__ */ v("span", { children: d("checkout_button") }), /* @__PURE__ */ v(S, {
169
+ children: [/* @__PURE__ */ y("span", { children: d("checkout_button") }), /* @__PURE__ */ y(C, {
170
170
  className: "h-4 w-4",
171
171
  "aria-hidden": "true"
172
172
  })]
173
173
  })
174
174
  })]
175
- }), /* @__PURE__ */ y("div", {
175
+ }), /* @__PURE__ */ b("div", {
176
176
  className: "grid gap-6 lg:grid-cols-12",
177
- children: [/* @__PURE__ */ y("div", {
177
+ children: [/* @__PURE__ */ b("div", {
178
178
  className: "lg:col-span-7",
179
- children: [/* @__PURE__ */ v("div", {
180
- className: b("relative aspect-[1618/1000] overflow-hidden rounded-2xl", Re.className),
179
+ children: [/* @__PURE__ */ y("div", {
180
+ className: x("relative aspect-[1618/1000] overflow-hidden rounded-2xl", Re.className),
181
181
  style: Re.style,
182
- children: X ? /* @__PURE__ */ v("img", {
182
+ children: X ? /* @__PURE__ */ y("img", {
183
183
  src: X,
184
184
  alt: Fe,
185
185
  className: "absolute inset-0 h-full w-full object-contain p-2",
186
186
  loading: "lazy"
187
- }) : /* @__PURE__ */ v("div", {
187
+ }) : /* @__PURE__ */ y("div", {
188
188
  className: "absolute inset-0 flex items-center justify-center text-slate-400",
189
- children: /* @__PURE__ */ v(be, {
189
+ children: /* @__PURE__ */ y(ye, {
190
190
  className: "h-12 w-12",
191
191
  "aria-hidden": "true"
192
192
  })
193
193
  })
194
- }), /* @__PURE__ */ y("div", {
194
+ }), /* @__PURE__ */ b("div", {
195
195
  className: "mt-5 flex flex-col gap-3",
196
196
  children: [
197
- /* @__PURE__ */ y("div", {
197
+ /* @__PURE__ */ b("div", {
198
198
  className: "flex flex-wrap items-center gap-2",
199
- children: [/* @__PURE__ */ v(re, {
199
+ children: [/* @__PURE__ */ y(m, {
200
200
  variant: Ve.variant,
201
- children: /* @__PURE__ */ v("span", { children: He })
202
- }), /* @__PURE__ */ v(le, { prices: N.prices })]
201
+ children: /* @__PURE__ */ y("span", { children: He })
202
+ }), /* @__PURE__ */ y(ce, { prices: P.prices })]
203
203
  }),
204
- /* @__PURE__ */ v("h1", {
204
+ /* @__PURE__ */ y("h1", {
205
205
  className: "text-2xl font-semibold tracking-tight text-slate-950",
206
- children: /* @__PURE__ */ v("span", { children: Fe })
206
+ children: /* @__PURE__ */ y("span", { children: Fe })
207
207
  }),
208
- /* @__PURE__ */ v("p", {
208
+ /* @__PURE__ */ y("p", {
209
209
  className: "text-sm text-slate-600",
210
- children: /* @__PURE__ */ v("span", { children: Ie })
210
+ children: /* @__PURE__ */ y("span", { children: Ie })
211
211
  }),
212
- N.features?.length ? /* @__PURE__ */ y("div", {
212
+ P.features?.length ? /* @__PURE__ */ b("div", {
213
213
  className: "mt-2 space-y-2",
214
- children: [/* @__PURE__ */ v("p", {
214
+ children: [/* @__PURE__ */ y("p", {
215
215
  className: "text-sm font-semibold text-slate-950",
216
- children: /* @__PURE__ */ v("span", { children: d("product_features_title") })
217
- }), /* @__PURE__ */ v("ul", {
216
+ children: /* @__PURE__ */ y("span", { children: d("product_features_title") })
217
+ }), /* @__PURE__ */ y("ul", {
218
218
  className: "grid gap-1 text-sm text-slate-700",
219
- children: N.features.map((e, t) => /* @__PURE__ */ y("li", {
219
+ children: P.features.map((e, t) => /* @__PURE__ */ b("li", {
220
220
  className: "inline-flex items-start gap-2",
221
- children: [/* @__PURE__ */ v(xe, {
221
+ children: [/* @__PURE__ */ y(be, {
222
222
  className: "mt-0.5 h-4 w-4 text-success",
223
223
  "aria-hidden": "true"
224
- }), /* @__PURE__ */ v("span", { children: l(e, T.language, A) })]
225
- }, `${N.id}-${t}`))
224
+ }), /* @__PURE__ */ y("span", { children: l(e, E.language, j) })]
225
+ }, `${P.id}-${t}`))
226
226
  })]
227
227
  }) : null,
228
- /* @__PURE__ */ v(ce, { warning: Le })
228
+ /* @__PURE__ */ y(se, { warning: Le })
229
229
  ]
230
230
  })]
231
- }), /* @__PURE__ */ v("div", {
231
+ }), /* @__PURE__ */ y("div", {
232
232
  className: "lg:col-span-5",
233
- children: /* @__PURE__ */ y(se, {
233
+ children: /* @__PURE__ */ b(oe, {
234
234
  className: "border-slate-200 bg-white shadow-sm",
235
- children: [/* @__PURE__ */ y("div", {
235
+ children: [/* @__PURE__ */ b("div", {
236
236
  className: "border-b border-slate-200 px-4 py-4",
237
- children: [/* @__PURE__ */ v("p", {
237
+ children: [/* @__PURE__ */ y("p", {
238
238
  className: "text-sm font-semibold text-slate-950",
239
- children: /* @__PURE__ */ v("span", { children: d("add_to_cart_title") })
240
- }), /* @__PURE__ */ v("p", {
239
+ children: /* @__PURE__ */ y("span", { children: d("add_to_cart_title") })
240
+ }), /* @__PURE__ */ y("p", {
241
241
  className: "mt-1 text-xs text-slate-600",
242
- children: /* @__PURE__ */ v("span", { children: d("add_to_cart_description") })
242
+ children: /* @__PURE__ */ y("span", { children: d("add_to_cart_description") })
243
243
  })]
244
- }), /* @__PURE__ */ y("div", {
244
+ }), /* @__PURE__ */ b("div", {
245
245
  className: "grid gap-4 px-4 py-4",
246
246
  children: [
247
- I ? null : /* @__PURE__ */ v("p", {
247
+ L ? null : /* @__PURE__ */ y("p", {
248
248
  role: "alert",
249
249
  className: "text-sm text-destructive",
250
- children: /* @__PURE__ */ v("span", { children: d("booking_time_slots_required") })
250
+ children: /* @__PURE__ */ y("span", { children: d("booking_time_slots_required") })
251
251
  }),
252
- $.length > 1 ? /* @__PURE__ */ y("div", {
252
+ $.length > 1 ? /* @__PURE__ */ b("div", {
253
253
  className: "grid gap-2",
254
- children: [/* @__PURE__ */ v("p", {
254
+ children: [/* @__PURE__ */ y("p", {
255
255
  className: "text-xs font-medium text-slate-700",
256
- children: /* @__PURE__ */ v("span", { children: Ue })
257
- }), /* @__PURE__ */ v(fe, {
258
- value: U ?? "",
259
- onValueChange: W,
256
+ children: /* @__PURE__ */ y("span", { children: Ue })
257
+ }), /* @__PURE__ */ y(de, {
258
+ value: W ?? "",
259
+ onValueChange: G,
260
260
  className: "grid gap-2",
261
261
  children: $.map((e) => {
262
- let t = `variant-${N.id}-${e.id}`.toLowerCase(), n = `storefront-product-variant-option-${N.id}-${e.id}`.toLowerCase(), { label: r, description: a } = i(e), o = we(N, e.id, Ne), s = o ? p(o) : Q, c = o ? w(d, o, f(o)) : Q ? d("availability_out_of_stock") : null;
263
- return /* @__PURE__ */ y("label", {
262
+ let t = `variant-${P.id}-${e.id}`.toLowerCase(), n = `storefront-product-variant-option-${P.id}-${e.id}`.toLowerCase(), { label: r, description: a } = i(e), o = Ce(P, e.id, Ne), s = o ? p(o) : Q, c = o ? T(d, o, f(o)) : Q ? d("availability_out_of_stock") : null;
263
+ return /* @__PURE__ */ b("label", {
264
264
  htmlFor: t,
265
265
  "data-testid": n,
266
- className: b("flex items-start gap-3 rounded-xl border p-3 transition", U === e.id ? "border-slate-900 bg-slate-50" : "border-slate-200 bg-white"),
267
- children: [/* @__PURE__ */ v(pe, {
266
+ className: x("flex items-start gap-3 rounded-xl border p-3 transition", W === e.id ? "border-slate-900 bg-slate-50" : "border-slate-200 bg-white"),
267
+ children: [/* @__PURE__ */ y(fe, {
268
268
  id: t,
269
269
  value: e.id,
270
270
  className: "mt-1"
271
- }), /* @__PURE__ */ y("span", {
271
+ }), /* @__PURE__ */ b("span", {
272
272
  className: "flex flex-1 flex-col gap-0.5",
273
273
  children: [
274
- /* @__PURE__ */ v("span", {
274
+ /* @__PURE__ */ y("span", {
275
275
  className: "text-sm font-medium text-slate-950",
276
276
  children: r
277
277
  }),
278
- a ? /* @__PURE__ */ v("span", {
278
+ a ? /* @__PURE__ */ y("span", {
279
279
  className: "text-xs text-slate-600",
280
280
  children: a
281
281
  }) : null,
282
- c ? /* @__PURE__ */ v("span", {
282
+ c ? /* @__PURE__ */ y("span", {
283
283
  className: "pt-1",
284
- children: /* @__PURE__ */ v(re, {
284
+ children: /* @__PURE__ */ y(m, {
285
285
  variant: s ? "destructive" : "outline",
286
- children: /* @__PURE__ */ v("span", { children: c })
286
+ children: /* @__PURE__ */ y("span", { children: c })
287
287
  })
288
288
  }) : null
289
289
  ]
@@ -292,42 +292,42 @@ function T() {
292
292
  })
293
293
  })]
294
294
  }) : null,
295
- /* @__PURE__ */ y("div", {
295
+ /* @__PURE__ */ b("div", {
296
296
  className: "grid gap-2",
297
- children: [/* @__PURE__ */ v("p", {
297
+ children: [/* @__PURE__ */ y("p", {
298
298
  className: "text-xs font-medium text-slate-700",
299
- children: /* @__PURE__ */ v("span", { children: d("quantity_label") })
300
- }), /* @__PURE__ */ v(ie, {
299
+ children: /* @__PURE__ */ y("span", { children: d("quantity_label") })
300
+ }), /* @__PURE__ */ y(re, {
301
301
  type: "number",
302
302
  min: 1,
303
303
  max: 99,
304
- value: V,
305
- onChange: (e) => H(Number(e.target.value))
304
+ value: H,
305
+ onChange: (e) => U(Number(e.target.value))
306
306
  })]
307
307
  }),
308
- /* @__PURE__ */ y(m, {
308
+ /* @__PURE__ */ b(h, {
309
309
  className: "h-11 rounded-xl text-sm font-semibold gap-2",
310
310
  onClick: () => {
311
- !U || !I || Oe({
312
- kind: N.kind,
313
- productId: o(N),
314
- ...U ? { productVariantId: U } : {},
315
- quantity: G
311
+ !W || !L || De({
312
+ kind: P.kind,
313
+ productId: o(P),
314
+ ...W ? { productVariantId: W } : {},
315
+ quantity: K
316
316
  });
317
317
  },
318
318
  disabled: !We,
319
- children: [/* @__PURE__ */ v("span", { children: d("add_to_cart") }), /* @__PURE__ */ v(S, {
319
+ children: [/* @__PURE__ */ y("span", { children: d("add_to_cart") }), /* @__PURE__ */ y(C, {
320
320
  className: "h-4 w-4",
321
321
  "aria-hidden": "true"
322
322
  })]
323
323
  }),
324
- /* @__PURE__ */ v(me, {
325
- to: R,
326
- className: b(k > 0 && I ? "block" : "hidden"),
327
- children: /* @__PURE__ */ y(m, {
324
+ /* @__PURE__ */ y(pe, {
325
+ to: z,
326
+ className: x(A > 0 && L ? "block" : "hidden"),
327
+ children: /* @__PURE__ */ b(h, {
328
328
  variant: "outline",
329
329
  className: "h-11 w-full rounded-xl gap-2",
330
- children: [/* @__PURE__ */ v("span", { children: d("go_to_checkout") }), /* @__PURE__ */ v(S, {
330
+ children: [/* @__PURE__ */ y("span", { children: d("go_to_checkout") }), /* @__PURE__ */ y(C, {
331
331
  className: "h-4 w-4",
332
332
  "aria-hidden": "true"
333
333
  })]
@@ -342,4 +342,4 @@ function T() {
342
342
  });
343
343
  }
344
344
  //#endregion
345
- export { T as default };
345
+ export { E as default };
@@ -1,15 +1,15 @@
1
1
  import { Button as e } from "../../../ui/button.js";
2
2
  import { Input as t } from "../../../ui/input.js";
3
- import { Spinner as n } from "../../../chunks/pkg/ui/dist/Spinner/index-DzMEU0iA.js";
3
+ import { Spinner as n } from "../../../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { cn as a } from "@rpcbase/ui";
6
- import { useTranslation as o } from "react-i18next";
5
+ import { useTranslation as a } from "react-i18next";
6
+ import { cn as o } from "@rpcbase/ui";
7
7
  import { Tag as s, X as c } from "lucide-react";
8
8
  //#region src/pages/checkout/components/CheckoutCouponCard.tsx
9
9
  function l({ className: l, code: u, appliedCode: d, discountLabel: f, message: p, error: m, loading: h, disabled: g, onCodeChange: _, onApply: v, onRemove: y }) {
10
- let { t: b } = o(), x = u.trim().length > 0 && !h && !g;
10
+ let { t: b } = a(), x = u.trim().length > 0 && !h && !g;
11
11
  return /* @__PURE__ */ i("div", {
12
- className: a("grid gap-3 border-t border-slate-200 pt-3", l),
12
+ className: o("grid gap-3 border-t border-slate-200 pt-3", l),
13
13
  children: [
14
14
  /* @__PURE__ */ i("div", {
15
15
  className: "flex items-center gap-2",
@@ -1,6 +1,6 @@
1
1
  import { Button as e } from "../../../ui/button.js";
2
2
  import { Card as t } from "../../../ui/card.js";
3
- import { Spinner as n } from "../../../chunks/pkg/ui/dist/Spinner/index-DzMEU0iA.js";
3
+ import { Spinner as n } from "../../../chunks/pkg/ui/dist/Spinner/index-Cgi70z_E.js";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
5
  import { useTranslation as a } from "react-i18next";
6
6
  import { AlertTriangle as o } from "lucide-react";